HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
norvig
pytudes
Jupyter Notebook2017–2026
norvig / pytudes

pytudes

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

79Distinct people
101Mentions
2Explicit recommenders
24.4KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

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

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

I love how lightweight and interactive this is. Related: Norvig's runnable intro probability notebooks at https://github.com/norvig/pytudes#pytudes-index-of-jupyter-i...

abecedarius used a recommendation phrase. 2 indexed comments match. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 9–Nov 16 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/16/2026, 8:59:02 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year101 dated mentions

Observed mentions: 2017-06-05 20:42:41 UTC to 2026-09-17 02:41:35 UTC.

051015202017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 9 mentions; 3 submissions, 6 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 13 mentions; 2 submissions, 11 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 7 mentions; 3 submissions, 4 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 13 mentions; 6 submissions, 7 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 22 mentions; 12 submissions, 10 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 16 mentions; 3 submissions, 13 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 8 mentions; 4 submissions, 4 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 7 mentions; 3 submissions, 4 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 3 mentions; 3 submissions, 0 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC936
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC13211
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC734
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC312
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC1367
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC221210
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC16313
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC844
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC734
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC330

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
Peter Norvig MIT License 2015-2026 pytudes "An étude (a French word meaning study) is an instrumental musical composition, usually short, of considerable difficulty, and designed to provide practice material for perfecting a particular musical skill." — Wikipedia This project contains pytudes—Python programs, usually short, for perfecting particular programming skills. Who is this for? To continue the musical analogy, some people think of programming like Spotify: they want to know how to install the app, find a good playlist, and hit the "play" button; after that they don't want to think about it. There are plenty of other tutorials that will tell you how to do the equivalent of that for various programming tasks—this one won't help. But if you think of programming like playing the piano—a craft that can take years to perfect—then I hope this collection can help. Index of Jupyter (IPython) Notebooks For each notebook you can hover on the title to see a description, or click the title to view on github, or click one of the letters in the left column to open the notebook on colab or nbviewer. Open Year New co nb 2026 (How to Write a (Lisp) Interpreter (in Python)) co nb 2026 Approximating Pi with a Fraction co nb 2026 Did you solve it? R y clvr ngh t rd ths sntnc? co nb 2026 Integer Palindromes co nb 2026 Largest prime factor co nb 2026 Project Euler #1–100 by Fable LLM co nb 2026 Project Euler #1–100 by Kimi LLM co nb 2026 Project Euler #1–100 by Opus LLM co nb 2026 Project Euler #1–100 by a Human co nb 2026 Truncatable Primes co nb 2025 Advent of Code 2025 co nb 2025 Advent of Code 2025: AI LLM Edition Open Year Large Language Models co nb 2022 AlphaCode Automated Programming co nb 2025 Advent of Code 2025: AI LLM Edition co nb 2019 Effectiveness of Language Models co nb 2018 How to Do Things with Words: NLP in Python co nb 2026 Integer Palindromes co nb 2024 The Languages of English, Math, and Programming co nb 2024 LLMs, Theory of Mind, and Cheryl's Birthday co nb 2023 One Letter Off co nb 2026 Project Euler #1–100 by a Human co nb 2026 Project Euler #1–100 by Fable LLM co nb 2026 Project Euler #1–100 by Opus LLM co nb 2026 Project Euler #1–100 by Kimi LLM Open Year Programming Examples co nb 2026 Approximating Pi with a Fraction co nb 2022 The Babylonian Number System co nb 2018 Beal's Conjecture Revisited co nb 2020 Bicycling Statistics co nb 2018 Can't Stop co nb 2019 Chaos with Triangles co nb 2017 Conway's Game of Life co nb 2020 Generating and Solving Mazes co nb 2026 Largest prime factor co nb 2021 Mel's Konane Board co nb 2020 Photo Focal Lengths co nb 2018 Pickleball Tournament co nb 2022 Selecting Names from a Menu co nb 2020 Tracking Polls: Electoral Votes Open Year Advent of Code co nb 2025 Advent of Code 2025: AI LLM Edition co nb 2025 Advent of Code 2025 co nb 2024 Advent of Code 2024 co nb 2023 Advent of Code 2023 co nb 2022 Advent of Code 2022 co nb 2021 Advent of Code 2021 co nb 2020 Advent of Code 2020 co nb 2018 Advent of Code 2018 co nb 2017 Advent of Code 2017 co nb 2016 Advent of Code 2016 co nb 2022 Advent of Code Utilities Open Year Probability and Uncertainty co nb 2018 A Concrete Introduction to Probability co nb 2016 Probability, Paradox, and the Reasonable Person Principle co nb 2020 Estimating Probabilities with Simulations co nb 2023 The Diamond Game: A Probability Puzzle co nb 2019 The Devil and the Coin Flip Game co nb 2020 Dice Baseball co nb 2018 Economics Simulation co nb 2024 Overtime in American Football co nb 2012 Poker Hand Ranking co nb 2020 The Unfinished Game .... of Risk co nb 2019 WWW: Who Will Win (NBA Title)? Open Year Logic and Number/Counting Puzzles co nb 2024 Counting Cluster Sizes in Paint by Numbers co nb 2014 Cryptarithmetic co nb 2018 Euler's Sum of Powers Conjecture co nb 2020 Four 4s, Five 5s, and Countdowns co nb 2020 How to Count Things co nb 2024 Number Bracelets Game co nb 2019 Pairing Socks co nb 2018 Sicherman Dice co nb 2014 Sol Golomb's Rectangle Puzzle co nb 2024 Stubborn number endings co nb 2020 Square Sum Chain Puzzle co nb 2020 When is Cheryl's Birthday? co nb 2015 When Cheryl Met Eve: A Birthday Story co nb 2015 xkcd 1313: Regex Golf co nb 2015 xkcd 1313: Regex Golf (Part 2: Infinite Problems) Open Year Sudoku and Similar Puzzles co nb 2006 Sudoku co nb 2021 Sudoku: 400,000 puzzles/second in Java co nb 2021 KenKen (Sudoku-like Puzzle) co nb 2021 Star Battle (Sudoku-like Puzzle) Open Year Word Puzzles co nb 2020 Boggle / Inverse Boggle co nb 2020 Chemical Element Spelling co nb 2026 Did you solve it? R y clvr ngh t rd ths sntnc? co nb 2020 Equilength Numbers: FOUR = 4 co nb 2017 Gesture Typing co nb 2017 Ghost: A Word game co nb 2015 Let's Code About Bike Locks co nb 2017 Scrabble: Refactoring a Crossword Game Program co nb 2020 Spelling Bee co nb 2017 Translating English into Propositional Logic co nb 2020 Wordle, Evil Wordle, Antiwordle, and Jotto co nb 2022 Winning Wordle co nb 2017 World's Longest Palindrome co nb 2020 World's Shortest Portmantout Word co nb 2018 xkcd 1970: Name Dominoes Open Year The Riddler (from 538) co nb 2022 Anigrams: Word Chains co nb 2017 Battle Royale co nb 2021 Climbing Wall co nb 2021 CrossProduct co nb 2020 Flipping Cards; A Guessing Game co nb 2019 Lottery co nb 2019 How Many Soldiers to Beat the Night King? co nb 2017 Misanthropic Neighbors co nb 2018 Properly Organized Card Hands co nb 2021 Race Track co nb 2021 Split the States co nb 2020 Tour de 538 co nb 2020 Weighing Twelve Balls co nb 2020 War. What is it Good For? Open Year Computer Science Algorithms and Concepts co nb 2017 BASIC Interpreter co nb 2017 Convex Hull Problem co nb 2026 (How to Write a (Lisp) Interpreter (in Python))
Read the full README on GitHub

What Hacker News says

13 sources
(BTW, Norman's server seems to be suffering under the load; https://web.archive.org/web/20210223015500/https://www.cs.tu... has your (Way)Back if you're suffering problems in accessing it.) I've been interested in literate programming for a long time; for my self-bootstrapping PEG parser https://github.com/kragen/peg-bootstrap/blob/master/peg.md I wrote my own noweb-like system called HandAxeWeb in Lua (5.x) https://github.com/kragen/peg-bootstrap/blob/master/handaxew.... It accepts input in Markdown, HTML, ReStructuredText, etc., and it's only a couple hundred lines of Lua. For HandAxeWeb (named following the convention of StoneKnifeForth—the intent was to make it simple enough that even fairly early stages of a bootstrap could be literate programs), I wanted to be able to include multiple versions of a program in the same document, bec
Read the rest
ause I think it's often helpful to see the temporal development of a program from a simpler version to a more complex version. The simpler version is easier to understand and helps you focus on the most fundamental aspects of the program. https://www.youtube.com/watch?v=KoWqdEACyLI is a 5'30" screencast (not by me) of explaining the development of a Pong program in this fashion. I think it's usually easier to understand a program in this fashion than by trying to understand the final complete version bit by bit, the way something like "TeX: The Program" forces you to do. ๛ Still, generally speaking, soi-disant literate programming tools—including my own—generally fail to take advantage of the most compelling aspect of the computer as a communication medium: its ability to simulate. When I dive into a new code base, it's never entirely by reading it—whether top-down, bottom-up, or in any other order. The cross-reference links added by things like CWEB (or, you know, ctags) are helpful, of course, but invariably I want to see the output of the program, which CWEB doesn't support at all! (Although Knuth's TeX: The Program does manage to include TeX output despite being written in CWEB, that's in a sense sort of a coincidence; this is not a feature CWEB can provide for any programs other than TeX and METAFONT.) Books like Algorithms, by Knuth's student Sedgewick, are full of graphical representations of the outputs of the algorithms being discussed, and this is enormously helpful—perhaps even more so than the source code; see https://algs4.cs.princeton.edu/22mergesort/ for some examples from the current version of the book, which is lamentably in Java. It's better still, though, when you can edit the code and see the results—when diving into a new code base, I tend to execute modified versions of the code a lot, whether in the debugger or with extra logging or what. Paper books can't do this, but that's no excuse for not doing it when we're writing for readers who have computers. Philip Guo's Python Tutor http://pythontutor.com/ provides dynamic visualization of the memory contents of, in theory, arbitrary code (in the supported languages, including of course Python, but also C, C++, Java, JS, and Ruby). There are things you can display with animation that you can't display in a static page, but Algorithms gets quite far with static printed images, and I think static visualization is better when you can make it work, for reasons explored at length in Bret Victor's http://worrydream.com/MagicInk/. Python Tutor doesn't scale to large programs, but Dorothea Lütkehaus and Andreas Zeller's DDD can control GDB to create such visualizations for anything you can run under GDB (or JDB, Ladebug, pydb, or perl -d). Unfortunately there's no way to share the output of either DDD or Python Tutor, except maybe a screencast, and despite having been around since 01995, DDD has never been popular, I suspect because its Motif UI is clumsy to use. https://edoras.sdsu.edu/doc/ddd/article20.html shows what it looked like in 02002 and https://youtu.be/cKQ1qdo79As?t=106 shows what it looked like in 02015. ๛ Of course, spreadsheets are by far the most popular programming environment, and they have always displayed the program's output when you open it—even to the exclusion of the code, mostly. I've experimented with this sort of thing in the past, with things like http://canonical.org/~kragen/sw/bwt an interactive visualization of the Burrows–Wheeler transform, and so it's been heartening to see modern software development moving in this direction. The simplest version of this is things like Python's doctest, where you manually paste textual snippets of output in the code itself, and a testing tool automatically verifies that they're still up-to-date; Darius Bacon's Halp https://github.com/darius/halp is a more advanced version of this, where the example output updates automatically, so you can make changes to the program and see how they affect the results. ๛ The most polished versions of this approach seem to have adopted the name "explorable explanations", and many of the best examples are Amit Patel's, which he has at different times termed "interactive illustrations" https://simblob.blogspot.com/2007/07/interactive-illustratio..., "active essays" (I think? Maybe I'm misremembering and that term was current in Squeak around 02003: http://wiki.squeak.org/squeak/1125), and "interactive visual explanations". I wrote a previous comment about this on here in 02019: https://news.ycombinator.com/item?id=20954056. However, Amit's explorables, like many other versions of the genre, de-emphasize the underlying code to the point where they both don't display the actual code and don't let you edit it. They're intended to visualize an algorithm, not a codebase. Mike Bostock, d3.js's original author, has created https://bl.ocks.org/ for sharing explorable explanations made with d3, and is doing a startup called ObservableHQ which makes things like this a lot easier to build: https://beta.observablehq.com/d/e639659056145e88 but at the expense of a certain amount of polish and presentational freedom. Also, unfortunately, ObservableHQ programs seem to be tied to the company's website—you can download their output, but very much unlike TeX, the programs will only be runnable until the company goes out of business. So if you aspire to make a lasting contribution to human intellectual heritage, like TeX, GCC, or d3.js itself, ObservableHQ is not for you. ๛ R Markdown (by JJ Allaire—yes, the Cold Fusion dude—and Yihui Xie, among others) is one of the more interesting developments here; as with noweb or HandAxeWeb, you edit something very close to the "woven" version of the source code (in a dialect of Markdown); but, in a separate file alongside, RStudio maintains the results of executing the code, which are included in the "woven" output, and may be textual or graphical. Moreover, as with Halp or ObservableHQ, these results are displayed in a notebook-style interface as you're editing the code. https://bookdown.org/yihui/rmarkdown/notebook.html has a variety of examples, and Xie is rightly focused on reproducibility, which is very challenging to achieve with the existing tooling. https://bookdown.org/ lists a number of books that have been written with R Markdown, and https://github.com/rstudio/rmarkdown explains the overall project. Of course the much more common notebook-style interface, and the one that popularized the interaction style, is Jupyter (influenced by SageMath), which mixes input and output indiscriminately in the same file and peremptorily makes backward-incompatible changes in file formats; the result is a lot of friction with version-control systems. Nevertheless, it supports inline LaTeX, it's easy to use and compatible with a huge variety of existing software, and it can include publication-quality visualizations, so there's a lot of code out there in Jupyter notebooks now, far more than in any system that purports to be a "literate programming" system. Notable examples include Peter Norvig's œuvre (there's a list at https://github.com/norvig/pytudes#pytudes-index-of-jupyter-i...). I find this a very comfortable and powerful medium for this form of literate programming; recent examples include https://nbviewer.jupyter.org/url/canonical.org/~kragen/sw/de..., https://nbviewer.jupyter.org/url/canonical.org/~kragen/sw/de..., and https://nbviewer.jupyter.org/url/canonical.org/~kragen/sw/de..., which are maybe sort of embarrassingly bad but I think demonstrate the potential of the medium for vernacular expression of vulgar software, as well as lofty Norvig-type things. ๛ Konrad Hinsen has written about the reproducibility and lock-in problems introduced by Jupyter, for example in https://khinsen.wordpress.com/2015/09/03/beyond-jupyter-what..., and has been using Tudor Gîrba's Glamorous Toolkit https://gtoolkit.com/ to explore what comes next. He's been hitting the reproducibility problem pretty hard in http://www.activepapers.org/ but the primary intent there is, as with the explorable-explanations stuff, code as a means to producing research ("How should we package and publish the outcomes of computer-aided research"), rather than maintainability and understandability of code itself. I think this is a promising direction for literate programming as such, too.
In Noweb – A Simple, Extensible Tool for Literate Programming
In Show HN: "100 Page Python Intro" eBook

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.