View gist:3c661f427bf987866c76ec7035bd1141
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
# http://naics.codeforamerica.org #includes details on queries | |
#!!! missing NAICS codes - key errors | |
# see https://www.census.gov/eos/www/naics/ | |
# get 2017 updated xml NAICS code listing here - https://www.census.gov/eos/www/naics/2017NAICS/2017_NAICS_Structure.xlsx | |
import requests | |
from bs4 import BeautifulSoup | |
import re | |
import ast |
View gist:eab4d36538d90b27e200c2e0833a9dd6
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 | |
from bs4 import BeautifulSoup | |
import re | |
likelyURLlookup = {} # use dynamic programming to build a lookup table | |
def getLikelyURL(vendorname): | |
try: | |
likelyURLlookup[vendorname] | |
except KeyError: |
View gist:c2d11e201112b98294bccdd09b5b7fb7
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 os | |
def alertMe(phrase): | |
text2speak = 'say ' + '"' + phrase + '"' | |
os.system(text2speak) | |
alertMe("Alert Me Function Works") |