Skip to content

Instantly share code, notes, and snippets.

rdhyee / gist:4019742
Created Nov 5, 2012
Extracting Stripe event types from the documents
View gist:4019742
import requests
from StringIO import StringIO
from lxml.html import parse
from collections import defaultdict
import re
# the list of Stripe events in the documentation and is not currently available from the API itself
url = ""
r = requests.get(url)
doc = parse(StringIO(r.content)).getroot()
rdhyee /
Created Nov 9, 2012 API query method
# Goal: feed a bunch of search terms to try to get at some collections
# something to compare to:
# API doc:
# data sources:
import requests
import json
import urllib
from itertools import islice
View soccer
# -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <headingcell level=2>
# Soccer 101 - Player Positions
# <codecell>
from IPython.core.display import Image
rdhyee / Project_Notebook_Starter.ipynb
Last active Dec 16, 2015
A starter project notebook
View Project_Notebook_Starter.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
rdhyee /
Created May 22, 2013
calculating triangular numbers
from itertools import islice
def triangular():
n = 1
i = 1
while True:
yield n
i +=1
n += i
You can’t perform that action at this time.