Menu

Tree [8ce5f8] master /
 History

HTTPS access


File Date Author Commit
 asyncio 2024-02-07 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [bf25ff] Add asyncio example
 connexion 2020-10-11 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [18fb6c] Reorg packages and modules
 csv 2023-05-21 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [520360] Move CSV examples to separate package
 dbus 2024-03-29 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [9c2224] Add D-Bus example
 flask 2020-10-11 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [18fb6c] Reorg packages and modules
 json 2023-05-23 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [9cbf20] Add json.loads() example
 pandas 2023-03-03 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [b2f666] Add regression example
 regression 2020-10-25 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [f7966c] Add unit test
 snippets 2023-05-21 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [520360] Move CSV examples to separate package
 .editorconfig 2023-05-21 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [d9f7de] Add EditorConfig file
 .gitignore 2025-01-09 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [8ce5f8] Remove empty line
 .markdownlint.json 2023-03-03 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [73b903] Disable MD007
 LICENSE 2024-02-07 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [bf25ff] Add asyncio example
 README.md 2025-01-09 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [e4a123] Remove tips section, add packaging links, clean...
 docker-run.sh 2020-12-26 M. 'howlingmad' Neifer M. 'howlingmad' Neifer [d102a1] Adjust license info

Read Me

Python Examples

Collection of Python code examples for my blog F7L8C9.

Licensed under the MIT License. See file LICENSE.

Virtual Environments and Packages

Some examples need external libraries. Install these with pip.

  • pip install <package> to install package
  • pip install --upgrade <package> to upgrade installed package
  • pip list - to list packages in the current environment
  • pip list --outdated - to list outdated packages
  • pip show <package> - to get details about a package that is installed in the current environment
  • pip uninstall <package> to uninstall package

Create repeatable installations with the following commands.

pip freeze > requirements.txt
pip install -r requirements.txt

File requirements.txt should be checked into source control. See also Installing Python Modules.

Create virtual environments with the venv module.

python -m venv .venv

On Linux bash, activate environment with source .venv/bin/activate.

Or, alternatively with virtualenv.

virtualenv venv

Directory .venv/ should be ignored by source control.

See Pipenv for a more sophisticated virtualenv management tool.

See pyenv to set up and use several Python versions in parallel.

Tasks

  • Write blog post about linear regression and plotting the results. See blog article
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.