Skip to content

Instantly share code, notes, and snippets.

View Nishnha's full-sized avatar
🎵
NP: In Your Atmosphere - Live at the Nokia … (0:16/5:45)

Nish Sinha Nishnha

🎵
NP: In Your Atmosphere - Live at the Nokia … (0:16/5:45)
View GitHub Profile
@Nishnha
Nishnha / regulations_gov_webscraper_io_sitemap.json
Created September 5, 2018 06:45
Webscraper.io Sitemap Export for Regulations.gov Comment Scraping
{"_id":"regulations_gov","startUrl":["https://www.regulations.gov/document?D=ED-2017-OS-0074-[0002-16468]"],"selectors":[{"id":"comment_body","type":"SelectorText","parentSelectors":["_root"],"selector":"div.GIY1LSJIXD > div:nth-of-type(2)","multiple":false,"regex":"","delay":0},{"id":"city","type":"SelectorText","parentSelectors":["_root"],"selector":"div.GIY1LSJNTC div.basicAttr:nth-of-type(2) span.breakWord","multiple":false,"regex":"","delay":0},{"id":"country","type":"SelectorText","parentSelectors":["_root"],"selector":"div.basicAttr:nth-of-type(3) span.breakWord","multiple":false,"regex":"","delay":0},{"id":"state","type":"SelectorText","parentSelectors":["_root"],"selector":"div.basicAttr:nth-of-type(4) span.breakWord","multiple":false,"regex":"","delay":0},{"id":"category","type":"SelectorText","parentSelectors":["_root"],"selector":"div.basicAttr:nth-of-type(5) span.breakWord","multiple":false,"regex":"","delay":0},{"id":"name","type":"SelectorText","parentSelectors":["_root"],"selector":"div.GIY1LS
@Nishnha
Nishnha / EMCalc.py
Created November 23, 2017 17:24
Expectation-Maximization Calculator for Two Normal Distributions
import math
print("This program assumes a standard deviation of 1 for k=2 normal distributions")
print("Enter your initial values (on separate lines) and a blank line when you've finished.")
# Takes in an unknown number of value arguments.
initialVals = []
while True:
val = input()
if val == "":