Add subdirectories
Add /ipynb/ and /py/ subdirectories to keep the home page neater.
This commit is contained in:
1 parent
ff96ec21ba
commit
88819c4cd0
61 files changed
+47
-45
No files matched your search
@@ -3,45 +3,46 @@
|
|||||||
*Etudes* are exercises to practice or demonstrate skills, long used by piano players.
|
*Etudes* are exercises to practice or demonstrate skills, long used by piano players.
|
||||||
|
|
||||||
This project contains **pytudes**—Python programs to practice or demonstrate skills.
|
This project contains **pytudes**—Python programs to practice or demonstrate skills.
|
||||||
|
Some are in Jupyter (IPython) notebooks, some in *.py files.
|
||||||
|
|
||||||
# pytudes: Index of Jupyter (IPython) Notebooks
|
# pytudes: Index of Jupyter (IPython) Notebooks
|
||||||
|
|
||||||
|Logic and Number Puzzles|
|
|Logic and Number Puzzles|
|
||||||
|---|
|
|---|
|
||||||
|[Advent of Code 2016](https://github.com/norvig/pytudes/blob/master/Advent%20of%20Code.ipynb)<br>*Puzzle site with a coding puzzle each day for Advent 2016*|
|
|[Advent of Code 2016](https://github.com/norvig/pytudes/blob/master/ipynb/Advent%20of%20Code.ipynb)<br>*Puzzle site with a coding puzzle each day for Advent 2016*|
|
||||||
|[Translating English Sentences into Propositional Logic Statements](https://github.com/norvig/pytudes/blob/master/PropositionalLogic.ipynb)<br>*Automatically converting informal English sentences into formal Propositional Logic.*|
|
|[Translating English Sentences into Propositional Logic Statements](https://github.com/norvig/pytudes/blob/master/ipynb/PropositionalLogic.ipynb)<br>*Automatically converting informal English sentences into formal Propositional Logic.*|
|
||||||
|[The Puzzle of the Misanthropic Neighbors](https://github.com/norvig/pytudes/blob/master/Mean%20Misanthrope%20Density.ipynb)<br>*How crowded will this neighborhood be, if nobody wants to live next door to anyone else?*|
|
|[The Puzzle of the Misanthropic Neighbors](https://github.com/norvig/pytudes/blob/master/ipynb/Mean%20Misanthrope%20Density.ipynb)<br>*How crowded will this neighborhood be, if nobody wants to live next door to anyone else?*|
|
||||||
|[Countdown to 2016](https://github.com/norvig/pytudes/blob/master/Countdown.ipynb)<br>*Solving the equation 10 _ 9 _ 8 _ 7 _ 6 _ 5 _ 4 _ 3 _ 2 _ 1 = 2016. From an Alex Bellos puzzle.*|
|
|[Countdown to 2016](https://github.com/norvig/pytudes/blob/master/ipynb/Countdown.ipynb)<br>*Solving the equation 10 _ 9 _ 8 _ 7 _ 6 _ 5 _ 4 _ 3 _ 2 _ 1 = 2016. From an Alex Bellos puzzle.*|
|
||||||
|[Sicherman Dice](https://github.com/norvig/pytudes/blob/master/Sicherman%20Dice.ipynb)<br>*Find a pair of dice that is like a regular pair of dice, only different.*|
|
|[Sicherman Dice](https://github.com/norvig/pytudes/blob/master/ipynb/Sicherman%20Dice.ipynb)<br>*Find a pair of dice that is like a regular pair of dice, only different.*|
|
||||||
|[Beal's Conjecture Revisited](https://github.com/norvig/pytudes/blob/master/Beal.ipynb)<br>*A search for counterexamples to Beal's Conjecture*|
|
|[Beal's Conjecture Revisited](https://github.com/norvig/pytudes/blob/master/ipynb/Beal.ipynb)<br>*A search for counterexamples to Beal's Conjecture*|
|
||||||
|[When is Cheryl's Birthday?](https://github.com/norvig/pytudes/blob/master/Cheryl.ipynb)<br>*Solving the "Cheryl's Birthday" logic puzzle.*|
|
|[When is Cheryl's Birthday?](https://github.com/norvig/pytudes/blob/master/ipynb/Cheryl.ipynb)<br>*Solving the "Cheryl's Birthday" logic puzzle.*|
|
||||||
|[When Cheryl Met Eve: A Birthday Story](https://github.com/norvig/pytudes/blob/master/Cheryl-and-Eve.ipynb)<br>*Inventing new puzzles in the Style of Cheryl's Birthday.*|
|
|[When Cheryl Met Eve: A Birthday Story](https://github.com/norvig/pytudes/blob/master/ipynb/Cheryl-and-Eve.ipynb)<br>*Inventing new puzzles in the Style of Cheryl's Birthday.*|
|
||||||
|[Sol Golomb's Rectangle Puzzle](https://github.com/norvig/pytudes/blob/master/Golomb-Puzzle.ipynb)<br>*A Puzzle involving placing rectangles of different sizes inside a square. Bonus: cryptarithmetic.*|
|
|[Sol Golomb's Rectangle Puzzle](https://github.com/norvig/pytudes/blob/master/ipynb/Golomb-Puzzle.ipynb)<br>*A Puzzle involving placing rectangles of different sizes inside a square. Bonus: cryptarithmetic.*|
|
||||||
|[WWW: Will Warriors Win?](https://github.com/norvig/pytudes/blob/master/WWW.ipynb)<br>*Golden State Warriors probability of winning the 2016 NBA title.*|
|
|[WWW: Will Warriors Win?](https://github.com/norvig/pytudes/blob/master/ipynb/WWW.ipynb)<br>*Golden State Warriors probability of winning the 2016 NBA title.*|
|
||||||
|
|
||||||
|Word Games|
|
|Word Games|
|
||||||
|---|
|
|---|
|
||||||
|[Ghost](https://github.com/norvig/pytudes/blob/master/Ghost.ipynb)<br>*The word game Ghost (add letters, try to avoid making a word).*|
|
|[Ghost](https://github.com/norvig/pytudes/blob/master/ipynb/Ghost.ipynb)<br>*The word game Ghost (add letters, try to avoid making a word).*|
|
||||||
|[World's Longest Palindrome](https://github.com/norvig/pytudes/blob/master/pal3.ipynb)<br>*Searching for a long Panama-style palindrome, this time letter-by-letter.*|
|
|[World's Longest Palindrome](https://github.com/norvig/pytudes/blob/master/ipynb/pal3.ipynb)<br>*Searching for a long Panama-style palindrome, this time letter-by-letter.*|
|
||||||
|[Refactoring a Crossword Game Program](https://github.com/norvig/pytudes/blob/master/Scrabble.ipynb)<br>*Refactoring the Scrabble / Word with Friends game from Udacity 212.*|
|
|[Refactoring a Crossword Game Program](https://github.com/norvig/pytudes/blob/master/ipynb/Scrabble.ipynb)<br>*Refactoring the Scrabble / Word with Friends game from Udacity 212.*|
|
||||||
|[xkcd 1313: Regex Golf](https://github.com/norvig/pytudes/blob/master/xkcd1313.ipynb)<br>*Find the smallest regular expression; inspired by Randall Monroe.*|
|
|[xkcd 1313: Regex Golf](https://github.com/norvig/pytudes/blob/master/ipynb/xkcd1313.ipynb)<br>*Find the smallest regular expression; inspired by Randall Monroe.*|
|
||||||
|[xkcd 1313: Regex Golf (Part 2: Infinite Problems)](https://github.com/norvig/pytudes/blob/master/xkcd1313-part2.ipynb)<br>*Regex Golf: better, faster, funer. With Stefan Pochmann.*|
|
|[xkcd 1313: Regex Golf (Part 2: Infinite Problems)](https://github.com/norvig/pytudes/blob/master/ipynb/xkcd1313-part2.ipynb)<br>*Regex Golf: better, faster, funer. With Stefan Pochmann.*|
|
||||||
|[Let's Code About Bike Locks](https://github.com/norvig/pytudes/blob/master/Fred%20Buns.ipynb)<br>*A tale of a bicycle combination lock that uses letters instead of digits. Inspired by Bike Snob NYC.*|
|
|[Let's Code About Bike Locks](https://github.com/norvig/pytudes/blob/master/ipynb/Fred%20Buns.ipynb)<br>*A tale of a bicycle combination lock that uses letters instead of digits. Inspired by Bike Snob NYC.*|
|
||||||
|[Gesture Typing](https://github.com/norvig/pytudes/blob/master/Gesture%20Typing.ipynb)<br>*What word has the longest path on a gesture-typing smartphone keyboard? Inspired by Nicolas Schank and Shumin Zhai.*|
|
|[Gesture Typing](https://github.com/norvig/pytudes/blob/master/ipynb/Gesture%20Typing.ipynb)<br>*What word has the longest path on a gesture-typing smartphone keyboard? Inspired by Nicolas Schank and Shumin Zhai.*|
|
||||||
|[How to Do Things with Words, or Statistical Natural Language Processing in Python](https://github.com/norvig/pytudes/blob/master/How%20to%20Do%20Things%20with%20Words.ipynb)<br>*Spelling Correction, Secret Codes, Word Segmentation, and more: grab your bag of words.*|
|
|[How to Do Things with Words, or Statistical Natural Language Processing in Python](https://github.com/norvig/pytudes/blob/master/ipynb/How%20to%20Do%20Things%20with%20Words.ipynb)<br>*Spelling Correction, Secret Codes, Word Segmentation, and more: grab your bag of words.*|
|
||||||
|
|
||||||
|Computer Science Algorithms, Concepts, and Problems|
|
|Computer Science Algorithms, Concepts, and Problems|
|
||||||
|---|
|
|---|
|
||||||
|[A Chaos Game with Triangles](https://github.com/norvig/pytudes/blob/master/Sierpinski.ipynb)<br>*A surprising appearance of the Sierpinski triangle in a random walk between vertexes.*|
|
|[A Chaos Game with Triangles](https://github.com/norvig/pytudes/blob/master/ipynb/Sierpinski.ipynb)<br>*A surprising appearance of the Sierpinski triangle in a random walk between vertexes.*|
|
||||||
|[BASIC Interpreter](https://github.com/norvig/pytudes/blob/master/BASIC.ipynb)<br>*How to write an interpreter for the BASIC programming language.*|
|
|[BASIC Interpreter](https://github.com/norvig/pytudes/blob/master/ipynb/BASIC.ipynb)<br>*How to write an interpreter for the BASIC programming language.*|
|
||||||
|[Bad Grade, Good Experience](https://github.com/norvig/pytudes/blob/master/Snobol.ipynb)<br>*As a student, did you ever get a bad grade on a programming assignment? (Snobol, Concordance)*|
|
|[Bad Grade, Good Experience](https://github.com/norvig/pytudes/blob/master/ipynb/Snobol.ipynb)<br>*As a student, did you ever get a bad grade on a programming assignment? (Snobol, Concordance)*|
|
||||||
|[Conway's Game of Life](https://github.com/norvig/pytudes/blob/master/Life.ipynb)<br>*The cellular automata zero-player game.*|
|
|[Conway's Game of Life](https://github.com/norvig/pytudes/blob/master/ipynb/Life.ipynb)<br>*The cellular automata zero-player game.*|
|
||||||
|[A Concrete Introduction to Probability](https://github.com/norvig/pytudes/blob/master/Probability.ipynb)<br>*Code and examples of the basic principles of Probability Theory.*|
|
|[A Concrete Introduction to Probability](https://github.com/norvig/pytudes/blob/master/ipynb/Probability.ipynb)<br>*Code and examples of the basic principles of Probability Theory.*|
|
||||||
|[Probability, Paradox, and the Reasonable Person Principle](https://github.com/norvig/pytudes/blob/master/ProbabilityParadox.ipynb)<br>*Some classic paradoxes in Probability Theory, and how too think about disagreements.*|
|
|[Probability, Paradox, and the Reasonable Person Principle](https://github.com/norvig/pytudes/blob/master/ipynb/ProbabilityParadox.ipynb)<br>*Some classic paradoxes in Probability Theory, and how too think about disagreements.*|
|
||||||
|[The Convex Hull Problem](https://github.com/norvig/pytudes/blob/master/Convex%20Hull.ipynb)<br>*A classic Computer Science Algorithm.*|
|
|[The Convex Hull Problem](https://github.com/norvig/pytudes/blob/master/ipynb/Convex%20Hull.ipynb)<br>*A classic Computer Science Algorithm.*|
|
||||||
|[The Traveling Salesperson Problem](https://github.com/norvig/pytudes/blob/master/TSP.ipynb)<br>*Another of the classics.*|
|
|[The Traveling Salesperson Problem](https://github.com/norvig/pytudes/blob/master/ipynb/TSP.ipynb)<br>*Another of the classics.*|
|
||||||
|[Economics Simulation](https://github.com/norvig/pytudes/blob/master/Economics.ipynb)<br>*A simulation of a simple economic game.*|
|
|[Economics Simulation](https://github.com/norvig/pytudes/blob/master/ipynb/Economics.ipynb)<br>*A simulation of a simple economic game.*|
|
||||||
|[Project Euler Utilities](https://github.com/norvig/pytudes/blob/master/Project%20Euler%20Utils.ipynb)<br>*My utility functions for the Project Euler problems, including `Primes` and `Factors`.*|
|
|[Project Euler Utilities](https://github.com/norvig/pytudes/blob/master/ipynb/Project%20Euler%20Utils.ipynb)<br>*My utility functions for the Project Euler problems, including `Primes` and `Factors`.*|
|
||||||
|
|
||||||
# pytudes: Index of Python Files
|
# pytudes: Index of Python Files
|
||||||
|
|
||||||
@@ -50,25 +51,26 @@ The following are not notebooks, but raw `.py` files, although some of them have
|
|||||||
|
|
||||||
| **File** | **Description** | **Documentation**|
|
| **File** | **Description** | **Documentation**|
|
||||||
|:--------|:-------------------|----|
|
|:--------|:-------------------|----|
|
||||||
|[SET.py](https://github.com/norvig/pytudes/blob/master/SET.py)|Analyze the card game [SET](http://www.setgame.com/set).|[SET.html](http://norvig.com/SET.html)|
|
|[SET.py](https://github.com/norvig/pytudes/blob/master/py/SET.py)|Analyze the card game [SET](http://www.setgame.com/set).|[SET.html](http://norvig.com/SET.html)|
|
||||||
|[beal.py](https://github.com/norvig/pytudes/blob/master/beal.py)|Search for counterexamples to Beal's Conjecture|[beal.html](http://norvig.com/beal.html)
|
|[beal.py](https://github.com/norvig/pytudes/blob/master/py/beal.py)|Search for counterexamples to Beal's Conjecture|[beal.html](http://norvig.com/beal.html)
|
||||||
|[docex.py](https://github.com/norvig/pytudes/blob/master/docex.py)|A framework for running unit tests, similar to `doctest`.|
|
|[docex.py](https://github.com/norvig/pytudes/blob/master/py/docex.py)|A framework for running unit tests, similar to `doctest`.|
|
||||||
|[ibol.py](https://github.com/norvig/pytudes/blob/master/ibol.py)|An Exercise in Species Barcoding|[ibol.html](http://norvig.com/ibol.html)
|
|[ibol.py](https://github.com/norvig/pytudes/blob/master/py/ibol.py)|An Exercise in Species Barcoding|[ibol.html](http://norvig.com/ibol.html)
|
||||||
|[lettercount.py](https://github.com/norvig/pytudes/blob/master/lettercount.py)|Convert Google Ngram Counts to Letter Counts|[mayzner.html](http://norvig.com/mayzner.html)
|
|[lettercount.py](https://github.com/norvig/pytudes/blob/master/py/lettercount.py)|Convert Google Ngram Counts to Letter Counts|[mayzner.html](http://norvig.com/mayzner.html)
|
||||||
|[lis.py](https://github.com/norvig/pytudes/blob/master/lis.py)|Lisp Interpreter written in Python|[lispy.html](http://norvig.com/lispy.html)
|
|[lis.py](https://github.com/norvig/pytudes/blob/master/py/lis.py)|Lisp Interpreter written in Python|[lispy.html](http://norvig.com/lispy.html)
|
||||||
|[lispy.py](https://github.com/norvig/pytudes/blob/master/lispy.py)|Even Better Lisp Interpreter written in Python|[lispy2.html](http://norvig.com/lispy2.html)
|
|[lispy.py](https://github.com/norvig/pytudes/blob/master/py/lispy.py)|Even Better Lisp Interpreter written in Python|[lispy2.html](http://norvig.com/lispy2.html)
|
||||||
|[lispytest.py](https://github.com/norvig/pytudes/blob/master/lispytest.py)|Tests for Lisp Interpreters|
|
|[lispytest.py](https://github.com/norvig/pytudes/blob/master/py/lispytest.py)|Tests for Lisp Interpreters|
|
||||||
|[pal.py](https://github.com/norvig/pytudes/blob/master/pal.py)|Find long palindromes|[palindrome.html](http://norvig.com/palindrome.html)
|
|[pal.py](https://github.com/norvig/pytudes/blob/master/py/pal.py)|Find long palindromes|[palindrome.html](http://norvig.com/palindrome.html)
|
||||||
|[pal2.py](https://github.com/norvig/pytudes/blob/master/pal2.py)|Find longer palindromes|[palindrome.html](http://norvig.com/palindrome.html)
|
|[pal2.py](https://github.com/norvig/pytudes/blob/master/py/pal2.py)|Find longer palindromes|[palindrome.html](http://norvig.com/palindrome.html)
|
||||||
|[pal3.py](https://github.com/norvig/pytudes/blob/master/pal3.py)|Find even longer palindromes|[palindrome.html](http://norvig.com/palindrome.html)
|
|[pal3.py](https://github.com/norvig/pytudes/blob/master/py/pal3.py)|Find even longer palindromes|[palindrome.html](http://norvig.com/palindrome.html)
|
||||||
|[py2html.py](https://github.com/norvig/pytudes/blob/master/py2html.py)|Pretty-printer to format Python files as html|
|
|[py2html.py](https://github.com/norvig/pytudes/blob/master/py/py2html.py)|Pretty-printer to format Python files as html|
|
||||||
|[spell.py](https://github.com/norvig/pytudes/blob/master/spell.py)|Spelling corrector|[spell-correct.html](http://norvig.com/spell-correct.html)
|
|[spell.py](https://github.com/norvig/pytudes/blob/master/py/spell.py)|Spelling corrector|[spell-correct.html](http://norvig.com/spell-correct.html)
|
||||||
|[sudoku.py](https://github.com/norvig/pytudes/blob/master/sudoku.py)|Program to solve sudoku puzzles|[sudoku.html](http://norvig.com/sudoku.html)
|
|[sudoku.py](https://github.com/norvig/pytudes/blob/master/py/sudoku.py)|Program to solve sudoku puzzles|[sudoku.html](http://norvig.com/sudoku.html)
|
||||||
|[testaccum.py](https://github.com/norvig/pytudes/blob/master/testaccum.py)|Tests for my failed Python `accumulation display` proposal|[pyacc.html](http://norvig.com/pyacc.html)
|
|[testaccum.py](https://github.com/norvig/pytudes/blob/master/py/testaccum.py)|Tests for my failed Python `accumulation display` proposal|[pyacc.html](http://norvig.com/pyacc.html)
|
||||||
|[yaptu.py](https://github.com/norvig/pytudes/blob/master/yaptu.py)|Yet Another Python Templating Utility|
|
|[yaptu.py](https://github.com/norvig/pytudes/blob/master/py/yaptu.py)|Yet Another Python Templating Utility|
|
||||||
|
|
||||||
# Etudes for Programmers
|
# Etudes for Programmers
|
||||||
|
|
||||||
I got the idea for the "etudes" part of the name from this [1978 book by Charles Wetherell](https://books.google.com/books/about/Etudes_for_programmers.html?id=u89WAAAAMAAJ):
|
I got the idea for the "etudes" part of the name from this [1978 book by Charles Wetherell](https://books.google.com/books/about/Etudes_for_programmers.html?id=u89WAAAAMAAJ)
|
||||||
|
that was very influential to me when I was learning to program around 1980.
|
||||||
|
|
||||||

|

|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
|
500 Internal Server Error
An error occurred: An error occurred Gitea Version: 28.1.0 |