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
| from wand.image import Image as WandImage | |
| import sys | |
| if __name__ == '__main__': | |
| print "Welcome to wand-text.py!" | |
| if len(sys.argv) != 3: | |
| print "Usage:\n\n\tpython wand-text.py <input_pdf_filename> <output_image_basename>" | |
| print "Ex: \n\n\tpython wand-text.py pdfdocument.pdf page" |
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
| """ | |
| Misc tools/functions written by Ross Delinger | |
| """ | |
| def assemblePipeLine(*args, **kwargs): | |
| """ | |
| Given an arbitrary number of functions we create a pipeline where the output | |
| is piped between functions. you can also specify a tuple of arguments that | |
| should be passed to functions in the pipeline. The first arg is always the |
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
| declare -A FIPS | |
| declare -A STNAME | |
| FIPS[AK]=02; STNAME[AK]=Alaska | |
| FIPS[AL]=01; STNAME[AL]=Alabama | |
| FIPS[AR]=05; STNAME[AR]=Arkansas | |
| FIPS[AS]=60; STNAME[AS]=American Samoa | |
| FIPS[AZ]=04; STNAME[AZ]=Arizona | |
| FIPS[CA]=06; STNAME[CA]=California | |
| FIPS[CO]=08; STNAME[CO]=Colorado | |
| FIPS[CT]=09; STNAME[CT]=Connecticut |
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
| stack_exchange_api = 'https://api.stackexchange.com/2.1' | |
| request_url = "{0}/users/{1}/associated".format( | |
| stack_exchange_api, usernames['stack_exchange']) | |
| api_request = urllib2.Request( | |
| request_url, | |
| headers={"Accept": "application/json"}) | |
| api_z_response = urllib2.urlopen(api_request) | |
| from zlib import decompress, MAX_WBITS | |
| api_response = decompress(api_z_response.read(), 16+MAX_WBITS) | |
| se_accounts_json = json.loads(api_response) |