This file contains hidden or 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
### Keybase proof | |
I hereby claim: | |
* I am ivh on github. | |
* I am ivh (https://keybase.io/ivh) on keybase. | |
* I have a public key whose fingerprint is 2F58 0A63 0958 CE18 C8E9 A0E3 6A04 7682 6F21 FC37 | |
To claim this, I am signing this object: |
This file contains hidden or 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 python3 | |
import matplotlib | |
matplotlib.rcParams['text.usetex'] = False | |
from pylab import * | |
# raw data sheets at | |
# https://goo.gl/photos/m61RPXcwU31ccrwM7 | |
beers = array(['Hofbräu Lager', | |
'Budvar Pilsner', |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 | |
import codecs | |
import lxml.html | |
out=codecs.open('names_emails.dat','w','utf-8') | |
out2=open('emails.dat','w') | |
for link in open('comlinks.txt'): | |
html=lxml.html.parse(link) | |
d=html.xpath('.//div[@class="profile_box"]')[0] |
This file contains hidden or 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 | |
""" | |
Calculate the points for running on Fitocracy | |
""" | |
mile = 1.609344 | |
def basepoints(d,p): | |
d/=mile | |
p*=mile | |
return (0.000555476190476192 * p**2 - 0.8333 * p + 382) \ |
This file contains hidden or 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 | |
import csv | |
import datetime | |
import sys | |
from pylab import * | |
try: INFILE = open(sys.argv[1]) | |
except: INFILE = open('cardioActivities.csv') |
This file contains hidden or 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 | |
import os | |
from getpass import getpass | |
import gdata.photos, gdata.photos.service | |
def findImages(base='/media/S95/DCIM/'): | |
jpgs=[] | |
for path,dirs,files in os.walk(base): |
This file contains hidden or 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
# | |
# calculate and display rule 30 pattern | |
# http://en.wikipedia.org/wiki/Rule_30 | |
# | |
from pylab import * | |
def r30(a,b,c): | |
if a and b and c: return False | |
if a and b and not c: return False | |
if a and not b and c: return False |