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
""" | |
Elias Omega code in Python | |
http://en.wikipedia.org/wiki/Elias_omega_coding | |
Peter Elias, "Universal codeword sets and representations of the integers", IEEE Trans. Information Theory 21(2):194-203, Mar 1975. | |
Also known as the log* (or "logstar") code in Rohan Baxter's 1996 PhD thesis. | |
Type 'python EliasOmega.py' to run the tests. | |
""" |
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
#!/usr/bin/env python | |
# Hashplit 2010-04-14: Split a file into separate files using | |
# directives of the form # file <filename> | |
import re | |
import sys | |
if len(sys.argv) != 2: | |
exit("""hashplit: Split a file into sub-files |