Skip to content

Instantly share code, notes, and snippets.

Eric van Zanten evz

Block or report user

Report or block evz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
import multiprocessing
import time
class ChildThread(multiprocessing.Process):
def __init__(self, stopper, counter, **kwargs):
self.stopper = stopper
self.counter = counter
def run(self):
import sqlalchemy as sa
from sqlalchemy.orm import create_session
engine = sa.create_engine('postgresql://localhost:5432/dedupeapi')
db_session = create_session(bind=engine,
evz /
Created Jul 5, 2016
Download and extract data about CPS lead tests
import subprocess
import sys
from io import StringIO
import csv
if __name__ == "__main__":
proc = subprocess.Popen(['java',
View ralston_training.json
"distinct": [
"payer_address": "950 f. street nw, suite 300, washington, dc, 20004",
"payer_name": "pharmaceutical research & manufacturers of america (phrma)",
"record_id": 500
"payer_address": "950 e paces ferry rd ne, ste 2450, atlanta, ga, 30326",
evz /
Created Mar 10, 2016
Faster loader for open ee meter datastore
import csv
import sqlalchemy as sa
import os
import pytz
from datetime import datetime
import itertools
tz = pytz.timezone('America/Chicago')
# DB_CONN = os.environ['DATABASE_URL']
evz /
Created Feb 9, 2016
Edgelist to Tree
if __name__ == "__main__":
import pprint
import copy
engine = init_engine(DB_CONN)
children = [(1,2),(1,3),(2,4)]
edgelist = engine.execute(children)
View matching_traceback.txt
INFO:dedupe.api:reading training from file
^CTraceback (most recent call last):
File "", line 2, in <module>
File "/home/eric/code/dedupe-api/api/", line 144, in queue_daemon
File "/home/eric/code/dedupe-api/api/", line 88, in processMessage
upd_args['return_value'] = func(*args, **kwargs)
File "/home/eric/code/dedupe-api/api/tasks/", line 35, in bulkMarkClusters
evz / nyc_loaddata_traceback.txt
Created Oct 8, 2015
NYC loaddata 2015-10-08
View nyc_loaddata_traceback.txt
Traceback (most recent call last):
File "/home/datamade/.virtualenvs/nyc/lib/python3.4/site-packages/django/db/models/", line 405, in get_or_create
return self.get(**lookup), False
File "/home/datamade/.virtualenvs/nyc/lib/python3.4/site-packages/django/db/models/", line 334, in get
core.models.DoesNotExist: Event matching query does not exist.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
View ynr_traceback.txt
Request Method: GET
Request URL:,country:us,state:mn,place:st_paul,ward:1/council-member-for-ward-1
Django Version: 1.8.3
Python Version: 2.7.9
Installed Applications:
evz / appveyor.log
Created Oct 1, 2015
Just in case the appveyor log is not persistent ...
View appveyor.log
[00:00:00] Build started
[00:00:02] git clone -q C:\projects\dedupe
[00:00:05] git fetch -q origin +refs/pull/416/merge:
[00:00:06] git checkout -qf FETCH_HEAD
[00:00:06] Running Install scripts
[00:00:06] SET PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
[00:00:06] powershell .\\appveyor\\install.ps1
[00:00:07] Installing Python
[00:00:07] 2.7 for
You can’t perform that action at this time.