Skip to content

thesheff17/pythonexamples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python3 examples/tutorials

More information can be found at the python website.

Please make pull requests if you see issues or want enhancements.

notebook examples

File Names Binder Links
0001_introduction.ipynb Binder
0002_strings.ipynb Binder
0003_numbers.ipynb Binder
0004_lists_and_tuples.ipynb Binder
0005_dict.ipynb Binder
0006_boolean.ipynb Binder
0007_loops_if_statements.ipynb Binder
0008_file_manipulation.ipynb Binder
0009_error_handling_logging.ipynb Binder
0010_classes.ipynb Binder
0011_arg_parser.ipynb Binder
0012_unittests.ipynb Binder
0013_handling_exceptions.ipynb Binder
0014_single_pid_scripts.ipynb Binder
0015_list_comprehension.ipynb Binder
0016_calling_c_from_python.ipynb Binder
0017_sqlachemy.ipynb Binder
0018_decorators.ipynb Binder
0019_memory_speed_optimizations.ipynb Binder
0020_args_kwargs.ipynb Binder

running this locally on your computer

  • you should run this inside a virtualenv setup. A virtualenv is an isolated area to install 3rd party tools using what is in requirements.txt file. pip is the package manager to install 3rd party tools for python.
  • Each operating system installation is a little different. See here for installing on each platform: mac/linux/windows
  • once you have the python virtualenv activated we want to clone the repo:
mkdir ~/git/
cd ~/git/
git clone git@github.com:thesheff17/pythonexamples.git
  • now create a virtualenv for this project. Always use a virtualenv env.
mkdir ~/.virtualenv
cd ~/.virtualenv
python3 -m venv pythonexamples
source pythonexamples/bin/activate
  • now lets install the pip packages:
cd ~/git/pythonexamples
pip install -r requirements.txt
  • you can always see what packages are installed with:
pip freeze
  • now run the juypter notebook:
cd src
juypter notebook
  • The juypter notebook should automatically launch your web browser and visit the correct url. if it doesn't copy paste the url from the terminal that starts with: http://127.0.0.1:8888/. If you get any errors make sure your virtualenv is activated and pip packages are correct. Below is an example of my output after starting juypter.
[I 06:32:16.576 NotebookApp] Serving notebooks from local directory: ~/git/pythonexamples/src
[I 06:32:16.576 NotebookApp] The Jupyter Notebook is running at:
[I 06:32:16.576 NotebookApp] http://localhost:8888/?token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[I 06:32:16.576 NotebookApp]  or http://127.0.0.1:8888/?token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[I 06:32:16.576 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 06:32:16.585 NotebookApp]

    To access the notebook, open this file in a browser:
        file:///~/Library/Jupyter/runtime/nbserver-43778-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
     or http://127.0.0.1:8888/?token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Software used to power these tutorials.

About

attempt to teach people python3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published