Giter Site home page Giter Site logo

modernpython's Introduction

Modern Python: Big ideas, Little Code

This code is offered as an accompaniment to a Python Video course by Raymond Hettinger.

See Modern Python: Big Ideas, Little Code.

Raymond runs an international Python training and consulting company and is available for basic, intermediate, and advanced python training.

Getting Setup

  1. Install Python 3.6.1 or later from https://www.python.org

  2. Setup and activate a virtual environment:

    $ python3.6 -m venv modernpython
    $ source modernpython/bin/activate
  1. Install the packages used in the examples:
    (modernpython) $ pip install pyflakes
    (modernpython) $ pip install bottle
    (modernpython) $ pip install pytest
    (modernpython) $ pip install hypothesis
    (modernpython) $ pip install mypy

Resampling

This code demonstrates simulations, resampling, bootstrapping, hypothesis testing, and estimating confidence intervals.

Machine Learning

The kmeans.py file implements k-means from scratch. The congress_data directory has CSV files with the voting histories of senators in the 114th U.S. Congress. The congress.py file demonstrates ETL (extract-transfrom-load) and unsupervised machine learning (k-means) to analyze the voting clusters.

Publisher Subscriber

This code implements a simple publisher-subscriber notification service. The pubsub.py implements the data model and core services. The session.py loads sample data. The webapp.py file runs a webserver for the application. The views directory has the Bottle templates and the static directory has the static resources (icons and photos).

To start the service, run:

    (modernpython) $ python webapp.py

Then point your browser to http://localhost:8080/

The login information is in the session.py file.

Testing

The quadratic.py file is a module with a simple function to demonstrate various approaches to testing included in test_quadratic.py.

Validation

The pricing_tool.py file is used to demonstrate the descriptor based data validation tools in validators.py

modernpython's People

Contributors

rhettinger avatar alexlab2017 avatar

Watchers

James Cloos avatar Akshay avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.