{"id":13485760,"url":"https://github.com/rhettinger/modernpython","last_synced_at":"2025-03-27T19:31:45.398Z","repository":{"id":39898116,"uuid":"88130568","full_name":"rhettinger/modernpython","owner":"rhettinger","description":"Sample code for the video course: Modern Python: Big Ideas, Little Code","archived":false,"fork":false,"pushed_at":"2022-11-27T18:28:51.000Z","size":188,"stargazers_count":453,"open_issues_count":3,"forks_count":153,"subscribers_count":28,"default_branch":"master","last_synced_at":"2024-10-30T20:45:42.038Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rhettinger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-13T06:04:19.000Z","updated_at":"2024-10-04T20:20:42.000Z","dependencies_parsed_at":"2023-01-22T11:15:13.552Z","dependency_job_id":null,"html_url":"https://github.com/rhettinger/modernpython","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhettinger%2Fmodernpython","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhettinger%2Fmodernpython/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhettinger%2Fmodernpython/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhettinger%2Fmodernpython/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhettinger","download_url":"https://codeload.github.com/rhettinger/modernpython/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245910902,"owners_count":20692515,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T18:00:31.244Z","updated_at":"2025-03-27T19:31:45.095Z","avatar_url":"https://github.com/rhettinger.png","language":"Python","funding_links":[],"categories":["Python","Uncategorized"],"sub_categories":["Uncategorized"],"readme":"Modern Python: Big ideas, Little Code\n=====================================\n\nThis code is offered as an accompaniment to a Python Video course\nby Raymond Hettinger.\n\nSee [Modern Python: Big Ideas, Little Code][1].\n\nRaymond runs an international Python training and consulting\ncompany and is available for basic, intermediate, and advanced\npython training.\n\n[1]: http://www.informit.com/store/modern-python-livelessons-big-ideas-and-little-code-9780134743417\n\n\nGetting Setup\n-------------\n\n1) Install Python 3.6.1 or later from https://www.python.org\n\n2) Setup and activate a virtual environment:\n\n```bash\n    $ python3.6 -m venv modernpython\n    $ source modernpython/bin/activate\n```\n\n3) Install the packages used in the examples:\n\n```bash\n    (modernpython) $ pip install pyflakes\n    (modernpython) $ pip install bottle\n    (modernpython) $ pip install pytest\n    (modernpython) $ pip install hypothesis\n    (modernpython) $ pip install mypy\n```\n\nResampling\n----------\n\nThis code demonstrates simulations, resampling, bootstrapping,\nhypothesis testing, and estimating confidence intervals.\n\n\nMachine Learning\n----------------\n\nThe `kmeans.py` file implements k-means from scratch.  The\n`congress_data` directory has CSV files with the voting histories\nof senators in the 114th U.S. Congress.  The `congress.py` file\ndemonstrates ETL (extract-transfrom-load) and unsupervised\nmachine learning (k-means) to analyze the voting clusters.\n\n\nPublisher Subscriber\n--------------------\n\nThis code implements a simple publisher-subscriber notification\nservice.  The `pubsub.py` implements the data model and core\nservices.  The `session.py` loads sample data.  The `webapp.py`\nfile runs a webserver for the application.  The `views` directory\nhas the Bottle templates and the `static` directory has the\nstatic resources (icons and photos).\n\nTo start the service, run:\n\n```bash\n    (modernpython) $ python webapp.py\n```\n\nThen point your browser to `http://localhost:8080/`\n\nThe login information is in the `session.py` file.\n\n\nTesting\n-------\n\nThe `quadratic.py` file is a module with a simple function to\ndemonstrate various approaches to testing included in\n`test_quadratic.py`.\n\n\nValidation\n----------\n\nThe `pricing_tool.py` file is used to demonstrate the descriptor\nbased data validation tools in `validators.py`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhettinger%2Fmodernpython","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhettinger%2Fmodernpython","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhettinger%2Fmodernpython/lists"}