Skip to content

Instantly share code, notes, and snippets.

leifulstrup / gist:3c661f427bf987866c76ec7035bd1141
Last active January 15, 2018 15:10
getNAICSdescription(naicsCode) #using Code For America Server
View gist:3c661f427bf987866c76ec7035bd1141
# #includes details on queries
#!!! missing NAICS codes - key errors
# see
# get 2017 updated xml NAICS code listing here -
import requests
from bs4 import BeautifulSoup
import re
import ast
View gist:eab4d36538d90b27e200c2e0833a9dd6
import requests
from bs4 import BeautifulSoup
import re
likelyURLlookup = {} # use dynamic programming to build a lookup table
def getLikelyURL(vendorname):
except KeyError:
leifulstrup / gist:c2d11e201112b98294bccdd09b5b7fb7
Created September 13, 2017 19:24
Simple OSX Python function to communicate alert via Mac text to speech capability - useful when waiting for long data processing to finish
View gist:c2d11e201112b98294bccdd09b5b7fb7
import os
def alertMe(phrase):
text2speak = 'say ' + '"' + phrase + '"'
alertMe("Alert Me Function Works")