Skip to content

Instantly share code, notes, and snippets.

Avatar

robertofraile

View GitHub Profile
View EliasOmega.py
"""
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.
"""
View hashplit.py
#!/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
You can’t perform that action at this time.