pytudes README

README проекта с github.com/norvig/pytudes. Одним файлом markdown: README.md.

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, providing practice pieces for perfecting particular programming prowess.

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

Click a title to see a notebook on GitHub, or click the [colab] icon next to it to run it in Colab[colab]. Hover over a title to see the full name, year, and a description.

🆕 New in 2026

🤖 Large Language Models

🎲 Probability and Uncertainty

🎄 Advent of Code (Problems from adventofcode.com)

🌉 Project Euler (Problems from projecteuler.net)

🧩 Logic and Number Puzzles

🔢 Grid Puzzles and Board Games

🔠 Word Games and Puzzles

🧠 The Riddler and xkcd

💻 Computer Science

📊 Data and Simulation

Index of Python Files

File Description Documentation
beal.py Search for counterexamples to Beal's Conjecture documentation
docex.py An obsolete framework for running unit tests, similar to doctest
ibol.py An Exercise in Species Barcoding documentation
lettercount.py Convert Google Ngram Counts to Letter Counts documentation
lis.py Lisp Interpreter written in Python documentation
lispy.py Even Better Lisp Interpreter written in Python documentation
lispytest.py Tests for Lisp Interpreters
pal.py Find long palindromes documentation
pal2.py Find longer palindromes documentation
pal3.py Find even longer palindromes documentation
pytudes.py Pre-process text to generate this README.md file.
py2html.py Pretty-printer to format Python files as html
SET.py Analyze the card game SET documentation
spell.py Spelling corrector documentation
sudoku.py Program to solve sudoku puzzles documentation
testaccum.py Tests for my failed Python accumulation display proposal documentation
yaptu.py Yet Another Python Templating Utility

Etudes for Programmers

I got the idea for the "etudes" part of the name from this 1978 book by Charles Wetherell that was very influential to me when I was first learning to program. I still have my copy, but it is now easier to find a pdf than a hard copy.

Reviews of pytudes

Here's what some people are saying about pytudes:

pytudes (norvig/pytudes)

Ищем в базе…

Что это такое?Pytudes — личная коллекция Питера Норвига из коротких, намеренно сложных программ на Python и ноутбуков Jupyter. Каждая написана, чтобы отточить один конкретный навык программирования, в духе музыкального этюда.
Это библиотека, которую я подключаю, или набор отдельных ноутбуков?Это не библиотека, а каталог из десятков независимых ноутбуков Jupyter и простых .py-скриптов. Каждый решает свою головоломку или алгоритм, и их открывают по отдельности, а не импортируют.
Как мне изучать ноутбуки?Выберите любую запись из индексных таблиц в README и нажмите ссылку 'co', чтобы открыть её в Google Colab, или 'nb', чтобы посмотреть на nbviewer/GitHub. Можно также клонировать репозиторий и запускать .py-файлы напрямую.
Что нужно, чтобы их запустить?Достаточно Python 3 и, для ноутбуков, Jupyter или браузера с Google Colab. Репозиторий не объявляет дополнительных зависимостей pip и не содержит Dockerfile.
Это пошаговый учебник для новичков?Нет. Норвиг прямо противопоставляет его урокам «установил и поехали»: он рассчитан на тех, кто готов воспринимать программирование как ремесло, которым занимаются годами, а не как быстрое прохождение.
Что стоит за названием 'pytudes'?Название сочетает 'Python' и 'étude' — «этюд», короткую музыкальную пьесу, написанную для отработки одного конкретного навыка. Норвиг применяет ту же идею к задачам по программированию.
Есть ли здесь решения Advent of Code?Да, есть решения для Advent of Code с 2016 по 2025 год, включая ноутбук 'AI LLM Edition' за 2025 год, в котором сравниваются решения, сгенерированные LLM.
Есть ли ноутбуки, которые сравнивают решения людей и ИИ?Да, в наборе ноутбуков 2026 года задачи Project Euler с 1 по 100 решаются отдельно вручную и с помощью LLM Fable, Kimi и Opus для сравнения.
Какие темы, кроме головоломок, здесь освещаются?Охватываются вероятность и неопределённость, логические головоломки в духе судоку, словесные игры, колонка Riddler на FiveThirtyEight и базовые темы информатики — интерпретаторы Lisp и задача коммивояжёра.
Автор
norvig
Размер
137 MB
Звёзды
24.4K
Обновлён
КоммитNov 19
Возраст
9 г
Коммиты · 90 дней