This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import multiprocessing | |
import time | |
class ChildThread(multiprocessing.Process): | |
def __init__(self, stopper, counter, **kwargs): | |
super().__init__(**kwargs) | |
self.stopper = stopper | |
self.counter = counter | |
def run(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sqlalchemy as sa | |
from sqlalchemy.orm import create_session | |
engine = sa.create_engine('postgresql://localhost:5432/dedupeapi') | |
db_session = create_session(bind=engine, | |
autocommit=False, | |
autoflush=False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import sys | |
from io import StringIO | |
import csv | |
if __name__ == "__main__": | |
proc = subprocess.Popen(['java', | |
'-jar', | |
'../tabula-java/target/tabula-0.9.0-jar-with-dependencies.jar', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if __name__ == "__main__": | |
import pprint | |
import copy | |
engine = init_engine(DB_CONN) | |
children = [(1,2),(1,3),(2,4)] | |
edgelist = engine.execute(children) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INFO:dedupe.api:reading training from file | |
^CTraceback (most recent call last): | |
File "run_queue.py", line 2, in <module> | |
queue_daemon() | |
File "/home/eric/code/dedupe-api/api/queue.py", line 144, in queue_daemon | |
processMessage() | |
File "/home/eric/code/dedupe-api/api/queue.py", line 88, in processMessage | |
upd_args['return_value'] = func(*args, **kwargs) | |
File "/home/eric/code/dedupe-api/api/tasks/review_tasks.py", line 35, in bulkMarkClusters | |
initializeMatching(session_id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traceback (most recent call last): | |
File "/home/datamade/.virtualenvs/nyc/lib/python3.4/site-packages/django/db/models/query.py", line 405, in get_or_create | |
return self.get(**lookup), False | |
File "/home/datamade/.virtualenvs/nyc/lib/python3.4/site-packages/django/db/models/query.py", line 334, in get | |
self.model._meta.object_name | |
core.models.DoesNotExist: Event matching query does not exist. | |
During handling of the above exception, another exception occurred: | |
Traceback (most recent call last): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Environment: | |
Request Method: GET | |
Request URL: http://127.0.0.1:8001/election/council-member-2015/post/ocd-division,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: | |
('django.contrib.admin', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[00:00:00] Build started | |
[00:00:02] git clone -q https://github.com/datamade/dedupe.git 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 | |
[00:00:07] |
NewerOlder