Skip to content

Instantly share code, notes, and snippets.

View AbeHandler's full-sized avatar

Abe Handler AbeHandler

View GitHub Profile
groups{
{
name: Orleans,
icon: hall of justice
races: {
groups{
name: Civil District Court Judge
icon: none,
candidates{
A{real name, display name, color}
client = DocumentCloud()
docs = client.documents.search('projectid: 1542-city-of-new-orleans-contracts') #all the docs in the corpus
doc = client.documents.get({id}) #particular doc in the corpus
print doc.full_text
@AbeHandler
AbeHandler / List of think tanks
Last active August 29, 2015 14:15
think tank list
Acton Institute
Alexis de Tocqueville Institution
Allegheny Institute for Public Policy
American Action Forum
American Civil Rights Union
American Enterprise Institute
American Foreign Policy Council
American Institute for Economic Research
AmericanIranian Council
American Israel Public Affairs Committee
@AbeHandler
AbeHandler / gist:06aceb2f281bb502d5c4
Created March 5, 2015 21:06
FCC_corpus_maker.py
from documentcloud import DocumentCloud
client = DocumentCloud()
all_fcc = client.documents.search("FCC")
for doc in all_fcc:
print doc.full_text
@AbeHandler
AbeHandler / gist:31bd4ccfb5cb8d9d20a0
Created June 29, 2015 21:00
consent decree raw counts
d['consent decree']
[(u'legal agreement', 2), (u'OPP consent', 2), (u'police actions', 2), (u'police consent', 2), (u'Lance Africk', 2), (u'citys credit rating.With', 2), (u'remarks here.A spokeswoman', 2), (u'Justice Center', 2), (u'Friday morning', 2), (u'U.S. Justice', 2), (u'undue burden', 2), (u'city request', 2), (u'training.This week', 2), (u'consent decree.Gusmans attorneys', 2), (u'JusticeLive blog', 2), (u'federal lawsuit', 2), (u'delays hearing', 2), (u'budget documents', 2), (u'Weekly | Editor', 2), (u'jail budget', 2), (u'monitoring team', 2), (u'massive costs', 2), (u'| Editor Edmund', 2), (u'necessary NOLA.com', 2), (u'price tag', 2), (u'new consent', 2), (u'judge delays hearing', 2), (u'draft consent', 2), (u'community group', 2), (u'police chief', 2), (u'administration appeals Orleans', 2), (u'city jail', 2), (u'administration appeals', 2), (u'sprawling legal settlement', 2), (u'Editor Edmund Lewis', 2), (u'Times-PicayuneThe city', 2), (u'new jail', 2), (u'jail facility', 2), (u'total cost',
"\e[A":history-search-backward
"\e[B":history-search-forward
@AbeHandler
AbeHandler / gist:6b147e75fa486691d842
Created July 7, 2015 13:56
py-89 : graphing calculator
%matplotlib inline
import numpy as np
import math
import matplotlib.pyplot as plt
def graph(x_range, n1, n2, *args):
for funct in args:
y = []
xs = []
for i in range(0,len(x_range)):
<html>
<head>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<title> Track Mouse </title>
<script type="text/javascript">
function mouse_position()
{
$("body").mousemove(function(e) {
console.log(e.pageX);
console.log(e.pageY);
function mouse_position()
{
$("body").mousemove(function(e) {
console.log(e.pageX);
console.log(e.pageY);
});
}
# http://seiler.it/running-docker-amazon-ec2/
sudo apt-get update
wget -qO- https://get.docker.com/ | sh
sudo docker run hello-world
# run the ubuntu docker.
sudo docker run -i -t ubuntu /bin/bash
sudo git clone https://github.com/orchardup/docker-nginx
cd docker-nginx/