/python-for-everyone

The material for my Python course.

Primary LanguageJupyter Notebook

Sarah can edit ...... by clicking on the pencil.

Python for Everyone

Binder

Learn Python with help and practice. These Jupyter notebooks support my CIS-15 class at Cabrillo College. The notebooks teach the principles of programming with activities that give you practice and projects to challeng you.

Using the Notebooks

The notebooks have interconnected content and require installed modules. This section will show you how to get the notebooks running on your desktop. Before you begin you will need to have the following software installed:

  • Python >= 3.7 (with pip and venv)
  • Bash, zsh or a compatible shell
  • Git

Installing Python and Git will vary based on your OS. Linux, Mac and Windows are all supported. Bash or zsh are installed by default on Mac and Linux. On Windows you can get get Ubuntu from the Microsoft Store.

Clone the repository:

git clone https://github.com/mike-matera/python-for-everyone.git 

Create a virtual environment inside of the project directory:

cd python-for-everyone
python3 -m venv venv 

Activate the virtual environment:

. ./venv/bin/activate

Packages used by the notebooks are listed in requirements.txt. Update pip to the latest version then use pip to install the requirements:

pip install --upgrade pip
pip install -r requirements.txt

Now you can start the Jupyter server from the command line:

jupyter lab welcome.ipynb

Jupyter tries to open a new browser tab. If a browser doesn't appear after starting Jupyter open a tab manually and visit the URLs that are shown in Jupyter's output.

Hosting

I use AWS Cloud9 in my course. Cloud9 is web based and users access the Jupyter server from the same browser that's connected to the Cloud9 instance. Cloud9 gives the class a uniform and predictable way to access their code and they never have to worry about losing files, but it costs money. I use t2.micro instances with 8GB of storage (which is the default for Cloud9). The cost of an instance is:

  • Runtime: $0.0116 per Hour (prices)
  • Storage: $0.10 per GB-month of provisioned storage (prices)

A student that uses the desktop for 10 hours a week (or 40 hours a month) will cost about $1.26 per month. Cloud9 stops the VM when a user is not connected. It's possible to disable that behavior and if a student does, the cost (based on 720 hours) will be about $9.15 per month. I get credit through AWS Educate that covers the cost of my classes.

There are other Jupyter hosting solutions that I have not tried.

Contributing

This project is under active development. Please contact me if you want to collaborate.

License

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.