Add files via upload

This commit is contained in:
Peter Norvig 2020-04-23 15:24:02 -07:00 committed by GitHub
parent 96aae11e86
commit e3653b86b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,6 +4,7 @@
# 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](https://en.wikipedia.org/wiki/%C3%89tude)
This project contains **pytudes**—Python programs, usually short, for perfecting particular programming skills.
Some programs are in Jupyter (`.ipynb`) notebooks, some in `.py` files. For each notebook you can:
- Click on [co](https://colab.research.google.com) to **run** the file on Colab
@ -29,6 +30,7 @@ Some programs are in Jupyter (`.ipynb`) notebooks, some in `.py` files. For each
| [co](https://colab.research.google.com/github/norvig/pytudes/blob/master/ipynb/Life.ipynb) [dn](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2Fblob%2Fmaster%2Fipynb%2FLife.ipynb) [my](https://mybinder.org/v2/gh/norvig/pytudes/master?filepath=ipynb%2FLife.ipynb) [nb](https://nbviewer.jupyter.org/github/norvig/pytudes/blob/master/ipynb/Life.ipynb) | <b><a href="ipynb/Life.ipynb" title="The cellular automata zero-player game">Conway's Game of Life</a></b> |
| [co](https://colab.research.google.com/github/norvig/pytudes/blob/master/ipynb/Dice%20Baseball.ipynb) [dn](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2Fblob%2Fmaster%2Fipynb%2FDice%20Baseball.ipynb) [my](https://mybinder.org/v2/gh/norvig/pytudes/master?filepath=ipynb%2FDice%20Baseball.ipynb) [nb](https://nbviewer.jupyter.org/github/norvig/pytudes/blob/master/ipynb/Dice%20Baseball.ipynb) | <b><a href="ipynb/Dice%20Baseball.ipynb" title="Simulating baseball games">Dice Baseball</a></b> |
| [co](https://colab.research.google.com/github/norvig/pytudes/blob/master/ipynb/Maze.ipynb) [dn](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2Fblob%2Fmaster%2Fipynb%2FMaze.ipynb) [my](https://mybinder.org/v2/gh/norvig/pytudes/master?filepath=ipynb%2FMaze.ipynb) [nb](https://nbviewer.jupyter.org/github/norvig/pytudes/blob/master/ipynb/Maze.ipynb) | <b><a href="ipynb/Maze.ipynb" title="Make a maze by generating a random tree superimposed on a grid">Generating Mazes</a></b> |
| [co](https://colab.research.google.com/github/norvig/pytudes/blob/master/ipynb/PhotoFocalLengths.ipynb) [dn](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2Fblob%2Fmaster%2Fipynb%2FPhotoFocalLengths.ipynb) [my](https://mybinder.org/v2/gh/norvig/pytudes/master?filepath=ipynb%2FPhotoFocalLengths.ipynb) [nb](https://nbviewer.jupyter.org/github/norvig/pytudes/blob/master/ipynb/PhotoFocalLengths.ipynb) | <b><a href="ipynb/PhotoFocalLengths.ipynb" title="Generate charts of what focal lengths were used on a photo trip.">Photo Focal Lengths</a></b> |
| [co](https://colab.research.google.com/github/norvig/pytudes/blob/master/ipynb/Pickleball.ipynb) [dn](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2Fblob%2Fmaster%2Fipynb%2FPickleball.ipynb) [my](https://mybinder.org/v2/gh/norvig/pytudes/master?filepath=ipynb%2FPickleball.ipynb) [nb](https://nbviewer.jupyter.org/github/norvig/pytudes/blob/master/ipynb/Pickleball.ipynb) | <b><a href="ipynb/Pickleball.ipynb" title="Scheduling a doubles tournament fairly and efficiently">Pickleball Tournament</a></b> |
| [co](https://colab.research.google.com/github/norvig/pytudes/blob/master/ipynb/Project%20Euler%20Utils.ipynb) [dn](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2Fblob%2Fmaster%2Fipynb%2FProject%20Euler%20Utils.ipynb) [my](https://mybinder.org/v2/gh/norvig/pytudes/master?filepath=ipynb%2FProject%20Euler%20Utils.ipynb) [nb](https://nbviewer.jupyter.org/github/norvig/pytudes/blob/master/ipynb/Project%20Euler%20Utils.ipynb) | <b><a href="ipynb/Project%20Euler%20Utils.ipynb" title="My utility functions for the Project Euler problems, including `Primes` and `Factors`">Project Euler Utilities</a></b> |
| [co](https://colab.research.google.com/github/norvig/pytudes/blob/master/ipynb/Orderable%20Cards.ipynb) [dn](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2Fblob%2Fmaster%2Fipynb%2FOrderable%20Cards.ipynb) [my](https://mybinder.org/v2/gh/norvig/pytudes/master?filepath=ipynb%2FOrderable%20Cards.ipynb) [nb](https://nbviewer.jupyter.org/github/norvig/pytudes/blob/master/ipynb/Orderable%20Cards.ipynb) | <b><a href="ipynb/Orderable%20Cards.ipynb" title="Can you get your hand of cards into a nice order with just one move?">Properly Ordered Card Hands</a></b> |
@ -49,7 +51,6 @@ Some programs are in Jupyter (`.ipynb`) notebooks, some in `.py` files. For each
| [co](https://colab.research.google.com/github/norvig/pytudes/blob/master/ipynb/NightKing.ipynb) [dn](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2Fblob%2Fmaster%2Fipynb%2FNightKing.ipynb) [my](https://mybinder.org/v2/gh/norvig/pytudes/master?filepath=ipynb%2FNightKing.ipynb) [nb](https://nbviewer.jupyter.org/github/norvig/pytudes/blob/master/ipynb/NightKing.ipynb) | <b><a href="ipynb/NightKing.ipynb" title="Investigasting a battle between the army of the dead and the army of the living">How Many Soldiers Do You Need to Beat the Night King?</a></b> |
| [co](https://colab.research.google.com/github/norvig/pytudes/blob/master/ipynb/Fred%20Buns.ipynb) [dn](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2Fblob%2Fmaster%2Fipynb%2FFred%20Buns.ipynb) [my](https://mybinder.org/v2/gh/norvig/pytudes/master?filepath=ipynb%2FFred%20Buns.ipynb) [nb](https://nbviewer.jupyter.org/github/norvig/pytudes/blob/master/ipynb/Fred%20Buns.ipynb) | <b><a href="ipynb/Fred%20Buns.ipynb" title="A tale of a bicycle combination lock that uses letters instead of digits. Inspired by Bike Snob NYC">Let's Code About Bike Locks</a></b> |
| [co](https://colab.research.google.com/github/norvig/pytudes/blob/master/ipynb/Socks.ipynb) [dn](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2Fblob%2Fmaster%2Fipynb%2FSocks.ipynb) [my](https://mybinder.org/v2/gh/norvig/pytudes/master?filepath=ipynb%2FSocks.ipynb) [nb](https://nbviewer.jupyter.org/github/norvig/pytudes/blob/master/ipynb/Socks.ipynb) | <b><a href="ipynb/Socks.ipynb" title="What is the probability that you will be able to pair up socks as you randomly pull them out of the dryer?">Pairing Socks</a></b> |
| [co](https://colab.research.google.com/github/norvig/pytudes/blob/master/ipynb/PhotoFocalLengths.ipynb) [dn](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2Fblob%2Fmaster%2Fipynb%2FPhotoFocalLengths.ipynb) [my](https://mybinder.org/v2/gh/norvig/pytudes/master?filepath=ipynb%2FPhotoFocalLengths.ipynb) [nb](https://nbviewer.jupyter.org/github/norvig/pytudes/blob/master/ipynb/PhotoFocalLengths.ipynb) | <b><a href="ipynb/PhotoFocalLengths.ipynb" title="Generate charts of what focal lengths were used on a photo trip.">Photo Focal Lengths</a></b> |
| [co](https://colab.research.google.com/github/norvig/pytudes/blob/master/ipynb/Portmantout.ipynb) [dn](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2Fblob%2Fmaster%2Fipynb%2FPortmantout.ipynb) [my](https://mybinder.org/v2/gh/norvig/pytudes/master?filepath=ipynb%2FPortmantout.ipynb) [nb](https://nbviewer.jupyter.org/github/norvig/pytudes/blob/master/ipynb/Portmantout.ipynb) | <b><a href="ipynb/Portmantout.ipynb" title="Find a long word that squishes together a bunch of words">Portmantout Words</a></b> |
| [co](https://colab.research.google.com/github/norvig/pytudes/blob/master/ipynb/Mean%20Misanthrope%20Density.ipynb) [dn](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2Fblob%2Fmaster%2Fipynb%2FMean%20Misanthrope%20Density.ipynb) [my](https://mybinder.org/v2/gh/norvig/pytudes/master?filepath=ipynb%2FMean%20Misanthrope%20Density.ipynb) [nb](https://nbviewer.jupyter.org/github/norvig/pytudes/blob/master/ipynb/Mean%20Misanthrope%20Density.ipynb) | <b><a href="ipynb/Mean%20Misanthrope%20Density.ipynb" title="How crowded will this neighborhood be, if nobody wants to live next door to anyone else?">The Puzzle of the Misanthropic Neighbors</a></b> |
| [co](https://colab.research.google.com/github/norvig/pytudes/blob/master/ipynb/Scrabble.ipynb) [dn](https://beta.deepnote.org/launch?template=python_3.6&url=https%3A%2F%2Fgithub.com%2Fnorvig%2Fpytudes%2Fblob%2Fmaster%2Fipynb%2FScrabble.ipynb) [my](https://mybinder.org/v2/gh/norvig/pytudes/master?filepath=ipynb%2FScrabble.ipynb) [nb](https://nbviewer.jupyter.org/github/norvig/pytudes/blob/master/ipynb/Scrabble.ipynb) | <b><a href="ipynb/Scrabble.ipynb" title="Refactoring the Scrabble / Word with Friends game from Udacity 212">Refactoring a Crossword Game Program</a></b> |
@ -116,4 +117,5 @@ I got the idea for the *"etudes"* part of the name from
this [1978 book](https://books.google.com/books/about/Etudes_for_programmers.html?id=u89WAAAAMAAJ)
by [Charles Wetherell](http://demin.ws/blog/english/2012/08/25/interview-with-charles-wetherell)
that was very influential to me when I was first learning to program. I still have my copy.
![](https://images-na.ssl-images-amazon.com/images/I/51ZnZH29dvL._SX394_BO1,204,203,200_.jpg)