I hereby claim:
- I am mreid on github.
- I am mreid (https://keybase.io/mreid) on keybase.
- I have a public key whose fingerprint is 0290 8892 E023 A876 460B D320 2B84 F83F 283D 58D8
To claim this, I am signing this object:
| --- Phantasms | |
| --- Used to create this piece: https://www.youtube.com/watch?v=-j5uSu7hiCo | |
| --- Adapted from the `jf_strum.lua` strum sequencer for just friends, w/syn, and crow | |
| --- https://llllllll.co/t/jf-strum/59169 | |
| s = sequins | |
| a = s{0,3,8,5,10,15,s{19,24,31}} | |
| b = s{1,2,3,-1} | |
| c = s{0,3,8,s{3,5,0,5}} |
| ---strum sequencer for just friends, w/syn, mangrove and crow | |
| --- Adapted from script by WilliamHazard: https://llllllll.co/t/jf-strum/59169 | |
| --- Used in https://youtu.be/-j5uSu7hiCo?si=krmbytEQypPDsq5D | |
| s = sequins | |
| a = s{0,3,8,5,10,15,s{19,24,31}} | |
| b = s{1,2,3,-1} | |
| c = s{0,3,8,s{3,5,0,5}} | |
| d = s{0,3,5,15,s{12,17,8,10}} |
| # Example implementation of simple arithmetic coding in Python (2.7+). | |
| # | |
| # USAGE | |
| # | |
| # python -i arithmetic.py | |
| # >>> m = {'a': 1, 'b': 1, 'c': 1} | |
| # >>> model = dirichlet(m) | |
| # >>> encode(model, "aabbaacc") | |
| # '00011110011110010' | |
| # |
| # Example Huffman coding implementation | |
| # Distributions are represented as dictionaries of { 'symbol': probability } | |
| # Codes are dictionaries too: { 'symbol': 'codeword' } | |
| def huffman(p): | |
| '''Return a Huffman code for an ensemble with distribution p.''' | |
| assert(sum(p.values()) == 1.0) # Ensure probabilities sum to 1 | |
| # Base case of only two symbols, assign 0 or 1 arbitrarily | |
| if(len(p) == 2): |
I hereby claim:
To claim this, I am signing this object:
| 101110000011111111001001101101001010101001110011010000110100010111100111000000010111110000110101011011100000110000000101101100000101111010001001111000000000111000000011 |
| # A command-line noisy channel | |
| # | |
| # USAGE: python channel.py BLOCK_SIZE FLIP_PROBABILITY | |
| # | |
| # EXAMPLE: | |
| # $ echo "0000000" | python channel.py 7 0.8 | |
| # 0000100 | |
| # | |
| # AUTHOR: Mark Reid <[email protected]> | |
| # CREATED: 2013-10-21 |
| # Hamming (7,4) Coding | |
| # | |
| # Reads binary stream from standard input and outputs Hamming (7,4) encoded | |
| # version to standard output. | |
| # | |
| # USAGE: python h74-encode.py | |
| # | |
| # EXAMPLE: | |
| # $ echo "0001" | python h74-encode.py | |
| # 1000101 |
| # LZ78 Encoding | |
| # | |
| # Performs LZ78 encoding on the standard input and writes result to standard output | |
| # using algorithm described in MacKay textbook. | |
| # | |
| # Note: | |
| # - All input symbols are encoded using 7-bit ASCII. | |
| # - Pointer index is encoded using logarithmically increasing number of bits | |
| # | |
| # USAGE: python lz78-encode.py |
| # LZ77 Encoding | |
| # | |
| # Simple implementation of Lempel-Ziv 77 (a.k.a. "Sliding Window") coding | |
| # as described in Section 13.4 of Cover & Thomas' "Information Theory". | |
| # | |
| # USAGE: python encode.py INPUT_STREAM | |
| # | |
| # EXAMPLE (from lectures): | |
| # $ python encode.py abbababbababbab | |
| # (0,a) |