- OS : Ubuntu 14.04.1 LTS Desktop 64-bit (http://www.ubuntu.com/download/alternative-downloads#external)
- Python Distribution : Anaconda Python (https://store.continuum.io/cshop/anaconda/)
- Hardware : Lenovo Thinkpad L440
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Lyndon.py | |
Algorithms on strings and sequences based on Lyndon words. | |
David Eppstein, October 2011.""" | |
import unittest | |
from Eratosthenes import MoebiusFunction | |
def LengthLimitedLyndonWords(s,n): | |
"""Generate nonempty Lyndon words of length <= n over an s-symbol alphabet. | |
The words are generated in lexicographic order, using an algorithm from |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HANGMANPICS = [''' | |
+---+ | |
| | | |
| | |
| | |
| | |
| | |
=========''', ''' | |
+---+ |
(Originally posted on twitter, here incorporating responses)
As of version 2.6, there is provisional support for using pandoc using jupyter notebookss (.ipynb
files) as input and output format.
Markdown to Jupyter Notebook, and back https://github.com/aaren/notedown