Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chapter Colabs

This repository contains the Oxford chapter notebooks used in the classroom and in Google Colab.

Running the notebooks

Google Colab

No local install is needed. Open a notebook and click Open in Colab. Each notebook installs the same pinned packages listed in requirements.txt when it detects Colab.

Local (Poetry)

Requires Poetry and Python 3.10–3.13.

poetry install
poetry run jupyter notebook

poetry install is the only local setup command: it installs NEURON, plotting/widget libraries, and Jupyter. Notebooks set NEURON_MODULE_OPTIONS=-nogui so NEURON does not abort Jupyter when no GUI display is available.

Optional: register a named kernel for VS Code / JupyterLab:

poetry run python -m ipykernel install --user --name chapter-colabs

Then select the chapter-colabs kernel.

Set H (micro:bit)

Colab_H.ipynb needs USB serial access, so run it with a local runtime (or local Jupyter). Connecting Colab to a local Jupyter server additionally requires jupyter_http_over_ws; that is not part of the shared runtime pins.

Why this pattern

  • pyproject.toml is the source of truth for the local Poetry environment (including Jupyter).
  • requirements.txt is the Colab subset of those pins (no Jupyter; Colab already provides it). Keep the shared pins in sync when bumping versions.
  • Install cells only run on Colab, so local Poetry packages are not reinstalled every time a notebook opens.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages