Skip to content
 
 

Latest commit

 

History

155 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Think Python, 3rd edition (course fork)

This is a fork of AllenDowney/ThinkPython, adapted for use in a Python course. The online version of this fork is at https://y-rosenthal.github.io/yrThinkPython/.

The original book is Think Python: How to Think Like a Computer Scientist, 3rd edition, by Allen B. Downey. The original online version is at https://allendowney.github.io/ThinkPython/, and the home page for the book is at Green Tea Press. You can order print and electronic versions of Think Python 3e from Bookshop.org and Amazon.

Like the original, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Layout

  • chapters/ – the chapter notebooks (chap00.ipynbchap19.ipynb). Edit these.
  • blank/ – "fill in the blanks" versions of each chapter with most code removed.
  • solutions/ – suggested solutions to the exercises (chapters 4 and 5 so far). Each file is a copy of the chapter notebook with the # Solution goes here cells filled in. The website shows these behind a collapsed "Suggested solution" dropdown under each exercise; the notebooks that Colab opens are unchanged.
  • jb/ – Jupyter Book configuration (_config.yml, _toc.yml), the landing pages (index.md, blank.md) and prep_notebooks.py, which strips %%expect magics, adds section labels and merges in the solutions before the HTML build.
  • thinkpython.py, diagram.py, structshape.py, words.txt, photos.zip – helper modules and data files used by the notebooks.

Publishing the website

The site is built by the GitHub Actions workflow in .github/workflows/deploy-book.yml. On every push to the v3 branch it copies the notebooks from chapters/ into jb/, builds the HTML with Jupyter Book, and publishes the result to the gh-pages branch, which GitHub Pages serves. The workflow can also be started by hand from the repository's Actions tab.

To build locally:

pip install "jupyter-book<2"
cp chapters/chap[01][0-9].ipynb jb/
cd jb
python prep_notebooks.py
jb build .
# open _build/html/index.html

Keeping up with the original

The upstream remote points at the original repository:

git fetch upstream
git merge upstream/v3

About

Jupyter notebooks and other resources for Think Python by Allen Downey, published by O'Reilly Media.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages