Skip to content

Instantly share code, notes, and snippets.

@maiamcc
Created March 10, 2015 22:00
Show Gist options
  • Save maiamcc/d99c88737b76f6584410 to your computer and use it in GitHub Desktop.
Save maiamcc/d99c88737b76f6584410 to your computer and use it in GitHub Desktop.
old func to make different filter funcs (for textMeBikes)
# run addr. through gmaps api. for all results:
# should I have multiple filters for, say, US, NY State, Brooklyn/Manhattan?
# or just filter for manhattan? To write multiple filter funcs:
# def filter_address_by(attr, val):
# def filter_func(addr_obj):
# for component in addr_obj["address_components"]:
# if attr in component["types"] and component["long_name"] == val:
# return True
# return False
# return filter_func
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment