I hereby claim:
- I am mnic on github.
- I am mnic (https://keybase.io/mnic) on keybase.
- I have a public key ASDvf1q3PMHt5bWuwHGF2vg1YnsAa9ep-PfclEKwCWPkBQo
To claim this, I am signing this object:
from bisect import bisect_left | |
import pandas as pd | |
# Create Example Fixture | |
data = [['A', 1], ['B', 3], ['C', 5]] | |
df = pd.DataFrame(data=data, columns=('ID', 'Delta')) | |
## Example 1 | |
# Build out a very large dict with a discrete value key for every | |
# possible value in the bin. Works with ints |
import requests | |
# See API documentation: | |
# https://arcos-api.ext.nile.works/__swagger__/ | |
# base_url = 'https://arcos-api.ext.nile.works/' | |
def wapo_county_request(endpoint, state, county, key='WaPo', version='v1'): | |
"""Returns county data from Washington Post ARCOS API | |
# From http://code.activestate.com/recipes/577452-a-memoize-decorator-for-instance-methods/ | |
class memoize(object): | |
"""cache the return value of a method | |
This class is meant to be used as a decorator of methods. The return value | |
from a given method invocation will be cached on the instance whose method | |
was invoked. All arguments passed to a method decorated with memoize must | |
be hashable. |
I hereby claim:
To claim this, I am signing this object: