This file contains 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
import requests | |
zips = "59221, 73949, 86515, 42223, 86044, 84536, 97635, 02861, 71749, 81137, 63673, 88063, 89439".split(', ') | |
url = 'https://congress.api.sunlightfoundation.com/districts/locate?apikey=4356d7e2b68340a69fb9b5e156e9cd49&zip=' | |
for z in zips: | |
r = requests.get(url + z).json()['results'] | |
print z, r |
This file contains 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
#!/bin/bash | |
# WARNING this script could easily trash a image or worse a device. DO NOT USE IT WITH A DEVICE | |
# It will make a copy of the image to work on by default unless you use the -o option | |
# which you should NOT unless your image is much bigger than >16GB | |
# In other words test it on a disk image file that could be damaged. | |
# Use the -h option to see list of options | |
# You MUST use -t to do the last step truncation |