Skip to content

Instantly share code, notes, and snippets.

View isc-rsingh's full-sized avatar

Raj Singh isc-rsingh

View GitHub Profile
@isc-rsingh
isc-rsingh / cleanbostoncrimes.py
Last active May 2, 2021 03:34
Cleans up broken lines and unquoted strings in Boston crime incident data CSV files
# get the data from https://data.boston.gov/dataset/crime-incident-reports-august-2015-to-date-source-new-system
badfile = open('bostonpolice.csv', 'r')
betterfile = open('tmp.csv', 'w')
while True:
line = badfile.readline().strip()
if not line:
break
# figure out if the line has been broken incorrectly
@isc-rsingh
isc-rsingh / installzpm.cls
Created February 14, 2022 16:29
Script for InterSystems IRIS terminal. Useful if you don't have ZPM in your IRIS and can install with this one call in the terminal. Courtesy of @guillaume Rongier and @sergei Shutov and @Sergey Mikhailenko
set $namespace="%SYS" do ##class(Security.SSLConfigs).Create("ssl") set r=##class(%Net.HttpRequest).%New(),r.Server="pm.community.intersystems.com",r.SSLConfiguration="ssl" do r.Get("/packages/zpm/latest/installer"),$system.OBJ.LoadStream(r.HttpResponse.Data,"c")
{
"datasets": [
{
"name": "The Museum of Modern Art (MoMA) Collection",
"url": "https://github.com/MuseumofModernArt/collection"
},
{
"name": "Coronavirus (Covid-19) Data in the United States",
"url": "https://github.com/nytimes/covid-19-data"
},