Skip to content

Instantly share code, notes, and snippets.

@seanyeh
seanyeh / base32.py
Created October 12, 2014 17:39
base32 fun
ALPHABET_RANGE = list(range(65,91)) + list(range(50, 56))
ALPHABET = list(map(chr, ALPHABET_RANGE))
PADDING_LENGTHS = [0, 6, 4, 3, 1]
def _to_base(to_base, x):
result = []
while x > 0:
rem = x % to_base
x = int(x/to_base)
__COUNT__GLOBAL__=0
__GLOBAL__print() {
for var in "$@"
do
printf "$(__VAL__ "$var")"
done
printf "\n"
}

Keybase proof

I hereby claim:

  • I am seanyeh on github.
  • I am seanyeh (https://keybase.io/seanyeh) on keybase.
  • I have a public key whose fingerprint is 320E 92CA A505 0722 3B1D 8724 4774 9DC7 EC5E 2C03

To claim this, I am signing this object: