Skip to content

Instantly share code, notes, and snippets.

View cds-amal's full-sized avatar
🏠
Working from home

cds-amal cds-amal

🏠
Working from home
  • Flushing USA
View GitHub Profile
@cds-amal
cds-amal / csv2json.py
Created March 2, 2015 19:59
csv to json script for city of record data -- this is a starting point
import os.path
import json
import csv
from tidylib import tidy_document
import html2text as h2t
dbfolder = '../CROL-PDF/Sample Database'
# ( filename, fieldtoclean, csvdelimiter)
files = \
import sysconfig
config = sysconfig.get_config_vars()
keys = config.keys()
keys.sort()
for k in keys:
print '%s: %s' % (k, config[k])
import csv
import urllib
import re
from nyc_geoclient import Geoclient
from sys import argv
from sys import exit
script, infile, outfile = argv
g = Geoclient('9cd0a15f', '54dc84bcaca9ff4877da771750033275')
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import json
from jsl import Document, StringField, ArrayField, IntField
from jsl import DocumentField, OneOfField
class Organization(Document):
class Options(object):
title = 'Organization'
description = 'A DCAS Organization.\nSee: http://talk.beta.nyc'
definition_id = 'org'