I hereby claim:
- I am zimolzak on github.
- I am andrewzimolzak (https://keybase.io/andrewzimolzak) on keybase.
- I have a public key whose fingerprint is 6A51 5CD7 8038 FCE0 E630 12B6 3C06 12CF 1FCC D9EC
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/perl -w | |
use strict; | |
print '{| class="wikitable sortable"' . "\n"; | |
while(<>){ | |
print "|-\n"; | |
my $separator; | |
if ($. == 1){ | |
$separator = "!"; | |
} | |
else { |
from random import randint | |
for i in range(20): | |
c = 10 | |
while c > 0: | |
print c, | |
r = randint(1,7) | |
if r <= 4: | |
c -= r | |
elif r == 5 or r == 6: |
from random import uniform | |
def next_state(start_state): | |
r = uniform(0,1) | |
if start_state == 'E': | |
if r > 0.3: | |
return 'A' | |
else: | |
return 'E' | |
elif start_state == 'A': |
#!/usr/bin/perl -w | |
use strict; | |
while(<>){ | |
chomp; | |
my @f = split(/\t/); | |
print $f[1]."\n" if not /[^[:ascii:]]/ | |
} |
# Print a user-specified number of variates from distribution I just | |
# made up (which is kind of like an upside down V). I like it better | |
# than the boring old uniform distribution and friends. | |
# 0.075 ** | |
# * * | |
# * * | |
# * * | |
# * * | |
# * * |
from subprocess import getoutput | |
import os | |
command_b = "find /Users/ajz/Music/iTunes/iTunes\ Media/Music" | |
#command_b = "find /Users/ajz/Music/iTunes/iTunes\ Media/Music/Weezer" | |
command_a = "find /Users/ajz/powerbook/Users/ajz/Music/iTunes/iTunes\ Music" | |
debug = False | |
######## |
from random import sample | |
from itertools import product | |
p = product(['A', 'K', 'Q', 'J', 'T'], | |
['s', 'h', 'd', 'c']) | |
deck = [''.join(e) for e in p] | |
print(sample(deck, 3)) |
#!/usr/bin/env python3 | |
import curses | |
max_b = int(open('/sys/class/backlight/radeon_bl0/max_brightness', 'r').read()) | |
min_b = 40 | |
columns = 70 | |
def main(stdscr): | |
stdscr.clear() | |
k = 'x' | |
stdscr.addstr(1, 0, 'q to quit') |
library(ggplot2) | |
X = data.frame(d=c(0,1,2,3,4,5,6,7,8,9), segments=c(6,2,5,5,4,5,6,3,7,6), bits=c(0,1,1,2,1,2,2,3,1,2)) | |
ggplot(X, aes(bits, segments, label=d)) + geom_path(position = position_jitter(width=0.1, height=0.1)) + geom_label(position = position_jitter(width=0.3, height=0.3)) |