Skip to content

Instantly share code, notes, and snippets.

# -*- coding: utf-8 -*-
import httplib
import re
import threadingq
from urlparse import urlsplit
class ConcurrentWorker(object):
def __init__(self, num_threads, first_task):
self.task_queue = [first_task]
self.lock = threading.Condition()
@sirwart
sirwart / .block
Last active October 15, 2016 01:06
Fatal Encounters Deaths by State
license: mit
@sirwart
sirwart / .block
Last active October 15, 2016 01:07
Fatal Encounters Deaths by Year
license: mit
@sirwart
sirwart / README.md
Created April 12, 2016 23:35
Simple Scatterplot
@sirwart
sirwart / .block
Last active April 13, 2016 00:28
Rate of Police Involved Deaths vs Violent Crime
license: gpl-3.0
@sirwart
sirwart / .block
Created April 16, 2016 06:33
Albers USA Projection
license: gpl-3.0
@sirwart
sirwart / .block
Last active July 17, 2016 22:56
Per-Capita Police Involved Deaths by State
license: gpl-3.0
@sirwart
sirwart / index.html
Last active July 13, 2016 03:00
San Francisco Zero Waste Data
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script src="https://d3js.org/d3.v4.min.js"></script>
<style>
body {
margin: 0;
font-family: "Helvetica Neue", Helvetica, Sans-Serif;
}
svg {
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sirwart
sirwart / .block
Created September 22, 2016 18:48
Tampa Bay Census Tracts
license: mit