Python programs to practice or demonstrate skills.
Jupyter Notebook Python HTML
Switch branches/tags
Nothing to show
Clone or download
Latest commit 4522be0 May 20, 2018
Failed to load latest commit information.
data Create Apr 10, 2018
ipynb Add files via upload May 20, 2018
py Add files via upload Apr 10, 2018
.travis.yml Added all jupyter notebooks to Travis Dec 28, 2017
LICENSE Create LICENSE Nov 21, 2017 Update May 20, 2018
requirements.txt Update requirements.txt Mar 15, 2018


"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 for perfecting programming skills.

Some are in Jupyter (IPython) notebooks, some in .py files. You can view the files here, or clone the project, or run the notebooks online by clicking this button: Binder

Index of Jupyter (IPython) Notebooks

Logic and Number Puzzles
Advent of Code 2017
Puzzle site with a coding puzzle each day for Advent 2017.
Advent of Code 2016
Puzzle site with a coding puzzle each day for Advent 2016.
The Devil and the Coin Flip Game
How to beat the Devil at his own game.
Translating English Sentences into Propositional Logic Statements
Automatically converting informal English sentences into formal Propositional Logic.
The Puzzle of the Misanthropic Neighbors
How crowded will this neighborhood be, if nobody wants to live next door to anyone else?
Four 4s, Five 5s, and Countdown to 2016
Solving the equation 10 _ 9 _ 8 _ 7 _ 6 _ 5 _ 4 _ 3 _ 2 _ 1 = 2016. From an Alex Bellos puzzle.
Sicherman Dice
Find a pair of dice that is like a regular pair of dice, only different.
Beal's Conjecture Revisited
A search for counterexamples to Beal's Conjecture
When is Cheryl's Birthday?
Solving the "Cheryl's Birthday" logic puzzle.
When Cheryl Met Eve: A Birthday Story
Inventing new puzzles in the Style of Cheryl's Birthday.
Sol Golomb's Rectangle Puzzle
A Puzzle involving placing rectangles of different sizes inside a square. Bonus: cryptarithmetic.
WWW: Who WIll Win (NBA Title)?
Computing the probability of winning the NBA title, for my home town Warriors, or any other team.
The Riddler: Battle Royale
A puzzle involving allocating your troops and going up against an opponent.
Math Concepts
A Concrete Introduction to Probability
Code and examples of the basic principles of Probability Theory.
Probability, Paradox, and the Reasonable Person Principle
Some classic paradoxes in Probability Theory, and how to think about disagreements.
Symbolic Algebra, Simplification, and Differentiation
A computer algebra system that manipulates expressions, including symbolic differentiation.
Economics Simulation
A simulation of a simple economic game.
How to Count Things
Combinatorial math: how to count how many things there are, when there are a lot of them.
Word Games
xkcd 1970: Name Dominoes
Lay out dominoes legally; the dominoes have people names, not numbers.
The word game Ghost (add letters, try to avoid making a word).
World's Longest Palindrome
Searching for a long Panama-style palindrome, this time letter-by-letter.
Refactoring a Crossword Game Program
Refactoring the Scrabble / Word with Friends game from Udacity 212.
xkcd 1313: Regex Golf
Find the smallest regular expression; inspired by Randall Monroe.
xkcd 1313: Regex Golf (Part 2: Infinite Problems)
Regex Golf: better, faster, funner. With Stefan Pochmann.
Let's Code About Bike Locks
A tale of a bicycle combination lock that uses letters instead of digits. Inspired by Bike Snob NYC.
Gesture Typing
What word has the longest path on a gesture-typing smartphone keyboard?
How to Do Things with Words, or Statistical Natural Language Processing in Python
Spelling Correction, Secret Codes, Word Segmentation, and more: grab your bag of words.
Computer Science Algorithms, Concepts, and Problems
BASIC Interpreter
How to write an interpreter for the BASIC programming language.
Bad Grade, Good Experience
As a student, did you ever get a bad grade on a programming assignment? (Snobol, Concordance)
Conway's Game of Life
The cellular automata zero-player game.
A Chaos Game with Triangles
A surprising appearance of the Sierpinski triangle in a random walk between vertexes.
The Convex Hull Problem
A classic Computer Science Algorithm.
The Traveling Salesperson Problem
Another of the classics.
Generating Mazes
Make a maze by generating a random tree superimposed on a grid.
Project Euler Utilities
My utility functions for the Project Euler problems, including Primes and Factors.

Index of Python Files

File Description Documentation Analyze the card game SET. SET.html Search for counterexamples to Beal's Conjecture beal.html A framework for running unit tests, similar to doctest. An Exercise in Species Barcoding ibol.html Convert Google Ngram Counts to Letter Counts mayzner.html Lisp Interpreter written in Python lispy.html Even Better Lisp Interpreter written in Python lispy2.html Tests for Lisp Interpreters Find long palindromes palindrome.html Find longer palindromes palindrome.html Find even longer palindromes palindrome.html Pretty-printer to format Python files as html Spelling corrector spell-correct.html Program to solve sudoku puzzles sudoku.html Tests for my failed Python accumulation display proposal pyacc.html 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.