Open-source project
norvig/pytudes avatar
norvig/pytudes

norvig/pytudes: Python études for programmers who want to practice

Python programs, usually short, of considerable difficulty, to perfect particular skills.

24,407 stars2,478 forksJupyter NotebookMIT

At a glance

What is it?
Peter Norvig's pytudes is a collection of short Python programs and Jupyter notebooks meant to be studied and rewritten, not installed as a library. It is MIT licensed, and the README frames it as practice material for people who treat programming as a craft.
Who is it for?
pytudes is for programmers who will open a notebook, read the code, and rewrite it themselves, and for teachers who want short worked examples of interpreters, spell correction, or Project Euler solutions. It is not for anyone looking for a pip-installable library, a maintained API, or a beginner tutorial that explains each line.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 6 days ago.
What is it written in?
Mainly Jupyter Notebook, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What pytudes is, and the reader it assumes

The README opens with a definition borrowed from music: an étude is "an instrumental musical composition, usually short, of considerable difficulty, and designed to provide practice material for perfecting a particular musical skill." The project applies that idea to code. It is a set of Python programs, usually short, for perfecting particular programming skills. The repository is organized into ipynb/ for Jupyter notebooks, py/ for plain Python files, data/ and txt/ for supporting material, with requirements.txt at the top level.

The README is explicit about who should stay away. It contrasts two attitudes: some programmers treat programming like a music streaming app, where the goal is to install something, find a playlist, and press play. Others treat it like playing the piano, a craft that takes years. pytudes is written for the second group. That framing matters because it sets expectations for everything else: there is no CLI, no importable package, no changelog, and no support channel described in the README. The unit of work is a notebook you read and modify.

How the notebooks are meant to be run

The README index is a table with an Open column containing two links per notebook: co for Colab, nb for nbviewer. Each row also carries a year and a title that links to the file on GitHub, with a tooltip description. The Colab links point at github.com/norvig/pytudes/blob/main/ipynb/..., which means the notebook loads directly from the repository into a hosted runtime. Nothing needs to be cloned to read or execute a notebook that way.

The dependency surface is small. requirements.txt lists just two entries:

code
numpy
matplotlib

No versions are pinned. For a collection whose notebooks span 2018 to 2026, that is a real constraint: an unpinned numpy or matplotlib can change behavior under a notebook written years earlier, and the README does not describe a tested environment or a lock file. If you run locally, you are choosing your own versions.

Installing pytudes locally and reading a first notebook

There is no package to install. The README offers Colab and nbviewer links, and the repository is the distribution. To work offline, clone it and install the two dependencies. The commands below follow the repository layout; the clone URL is the standard GitHub form for the project.

bash
git clone https://github.com/norvig/pytudes.git
cd pytudes
python -m pip install -r requirements.txt
jupyter lab ipynb/lispy.ipynb

After that, Jupyter opens the lispy notebook, described in the README tooltip as a "Tutorial on interpreters" and listed under year 2026. You should see a sequence of cells that build a small Lisp interpreter in Python, which you can execute in order. If you would rather not install anything, the README's co column opens the same file on Colab and the nb column opens it on nbviewer, where you can read the rendered output without a local kernel.

A second entry point is the py/ directory for plain scripts, and data/ and txt/ for the inputs some notebooks read. The README does not document a test command, a build step, or a supported Python version, so treat the notebook itself as the interface.

The LLM comparison notebooks are the interesting part

Several entries put human and model solutions side by side. The README lists Euler.ipynb as "Project Euler #1-100 by a Human" and, in the same year, Euler-Opus.ipynb, Euler-Kimi.ipynb, and Euler-Fable.ipynb as solutions to the same problems by named LLMs. Advent-2025.ipynb and Advent-2025-AI.ipynb split the same puzzle set between a person and large language coding models. palsum.ipynb is described as finding palindromic integers with no zero digit, "human vs LLM solutions."

This is the part of the repository that is hardest to find elsewhere in one place: the same problem, the same author's framing, different solvers. It is useful if you want to compare how a model structures a brute-force search against how a person does, or where a model's solution is shorter but less clear. It is not useful as a benchmark. The README gives no scoring methodology, no timing harness, and no pass criteria beyond the notebooks themselves. Read them as worked examples, not as measurements.

Where pytudes is the wrong tool

If you need a library, pytudes is not one. There is no setup.py or pyproject.toml in the top-level listing, no version, and no release. The recent releases field is empty. Nothing here is designed to be imported into your application, and the README never suggests it should be.

The second limitation is freshness at the notebook level. The repository's last push was on 2026-09-16, which is recent, but the index shows notebooks dated 2018, 2019, 2022, 2025, and 2026. A notebook written in 2018 may use idioms or library calls that have since changed, and because requirements.txt pins nothing, you cannot reconstruct the author's original environment from the repository. The README does not document rollback, per-notebook dependency versions, or a compatibility matrix.

Third, the project is single-author and pedagogical. There is no contributor guide in the README, no issue triage policy, and no stated support expectation. If a notebook fails on your machine, the README gives you no path forward beyond reading the code.

How it compares to a structured course or a puzzle site

Project Euler is the obvious alternative for the math-and-programming half of this repository, and pytudes contains its own Euler notebook plus three LLM variants. The difference is approach: Project Euler hands you a problem and checks your answer, while pytudes hands you someone else's solution and expects you to study it. One is a test, the other is a text.

For learning interpreters and language models, the alternative is a book or a lecture series, which sequences material and explains each step. pytudes does the opposite: it drops a working implementation in front of you and leaves the explanation to the code and the tooltips. That is a deliberate choice consistent with the étude metaphor, and it is also why the collection rewards readers who already program. A beginner looking for a guided path will find the notebooks terse; an experienced programmer looking for a compact, complete example of a Lisp interpreter or a character-level n-gram model will find exactly that.

Licence, maintenance and what upgrading costs

The project is MIT licensed, per the README header and the LICENSE file at the repository root. MIT permits use, modification, and redistribution with the licence and copyright notice retained. That makes the code usable as teaching material or as a starting point in your own work, subject to the usual attribution. This is a description of the licence text, not legal advice; if you plan to redistribute modified notebooks inside a commercial product, read the LICENSE file yourself.

Upgrade cost is unusual here. There is no version to bump and no migration guide, because there are no releases. The practical cost is per notebook: if you depend on one, you are depending on a file that may not have been touched since its listed year, against unpinned numpy and matplotlib. The repository's last push was on 2026-09-16, so new material does arrive, but the README does not say which notebooks were updated in that push. Pin the dependencies yourself if you need reproducibility, since the repository does not.

Editorial conclusion

pytudes is for programmers who will open a notebook, read the code, and rewrite it themselves, and for teachers who want short worked examples of interpreters, spell correction, or Project Euler solutions. It is not for anyone looking for a pip-installable library, a maintained API, or a beginner tutorial that explains each line. Before adopting it as course material, check the year column in the README index, since notebooks range from 2018 to 2026, and confirm that the Python and dependency versions in the notebook you plan to use still match your environment.

Frequently asked questions

Do I need to install anything to use norvig/pytudes?

No. The README's index has a co column linking each notebook to Colab and an nb column linking to nbviewer, so you can read and run notebooks in a hosted runtime. For local work you clone the repository and install the two entries in requirements.txt, numpy and matplotlib.

Is norvig/pytudes a library I can import into my project?

No. The top-level repository listing shows no packaging files and no releases, and the README describes the contents as short programs for perfecting programming skills. The unit of use is a notebook or a script you read and adapt, not a dependency you add.

What are the Project Euler notebooks in norvig/pytudes?

The README lists Euler.ipynb as solutions to the first 100 Project Euler problems by a human, alongside Euler-Opus.ipynb, Euler-Kimi.ipynb, and Euler-Fable.ipynb, each described as solutions to the same problems by a named LLM. They are presented as worked examples rather than as a scored benchmark.

What licence does norvig/pytudes use?

MIT. The README header links to the LICENSE file and states the licence, and the file is present at the repository root. That permits reuse and modification provided the licence and copyright notice are kept.

Official sources

  1. Issues
  2. License: MIT
  3. norvig/pytudes on GitHub
  4. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/norvig-pytudes.svg)](https://hysenlabs.com/projects/norvig-pytudes)