Skip to content

Instantly share code, notes, and snippets.

We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 6.
Policy or Program,What it does     ,Policy proposals tested by TRIM3
Earned Income Tax Credit ,Provides refundable credits for low-income working families ,"Tested two options for increasing the EITC, including an increase of 40 percent in the maximum credit"
Child and Dependent Care Tax Credit ,A non-refundable credit to cover expenses for child care or care for an incapacitated dependent ,"Tested a fully-refundable credit with higher rates for families with under $70,000 adjusted gross income, but no eligibility over $70,000"
Child Care and Development Fund ,Federally-funded child care subsidies,Guarantee a subsidy to eligible families under 150 percent of poverty
Minimum Wage,Federally-mandated wage of $7.25 per hour,Tested increasing the wage to $10.25 per hour by 2020; second option set a ceiling of 10th percentile of state’s actual wages
Supplemental Nutrition Assistance Program (SNAP),"Federal entitlement program that gives in-kind, noncash benefits to eligible adults and children ","Tested increasin
import csv
import json
import subprocess
jData = []
remap = {"Custodial Arrest":"custodial","NonCustodial Arrest":"noncustodial","Contact":"contact"}
cr = csv.reader(open("data/source_data.csv",'rU'))
function niceUnits(tspEquiv){
var tblspEquiv;
if(tspEquiv < 3){ return tspEquiv + " teaspoon" + plural(tspEquiv);}
else{
tblspEquiv = parseFloat(tspEquiv)/3.0;
if (tblspEquiv < 4){
var remainder = (tspEquiv%3 == 0) ? "" : " and " + niceUnits(tspEquiv%3)
return Math.floor(tblspEquiv) + " tablespoon" + plural(Math.floor(tblspEquiv)) + remainder;
} else{
cupEquiv = parseFloat(tblspEquiv/16.0);
@bchartoff
bchartoff / email to calendar
Last active September 29, 2021 01:44
An AppleScript to automatically create a calendar event from an e-mail containing a date and time of the form "March 10, 2015 12:00 - 2:00 PM". Distributed under MIT license (see below)
(*
Create Calendar event from Message
*)
set theContent to string
-- A subroutine to strip all tags from html
on remove_markup(this_text)
set copy_flag to true
set the clean_text to ""
repeat with this_char in this_text
@bchartoff
bchartoff / .bash_profile
Created January 29, 2015 16:16
My .bash_profile
#aliases
alias ll="ls -lha"
alias h=history
alias hg="history | grep"
alias ..="cd .."
#Path
export PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/local/git/bin:/bin:/usr/sbin:/sbin:~/bin
#Sublime
//listen for change event, call menuChanged func
dropDown.on("change", menuChanged });
function menuChanged() {
var selectedValue = d3.event.target.value;
//get the name of the selected option from the change event object
countryData.indicators.forEach(function (d) {
//loop through your source data, however it happens to be organized (this is just an example)
var cqConfig = {
stateKey: "cqstate_v7",
clickTypes: [],
achievements: [{
name: "SuperClicker",
thresholds: {
clicks: 20
},
description: ""
},
@bchartoff
bchartoff / gist:bdd2a96a0c3b72b2942c
Created May 27, 2014 20:17
Molten Chocolate Cake
MAKES 6 INDIVIDUAL CAKES
5 1/2 ounces imported bittersweet (not unsweetened) chocolate
such as Caillbotte or Valrhona
11 Tablespoons unsalted butter
3 large eggs
3 egg yolks
1/4 cup plus 2 Tablespoons sugar
from rpy2 import robjects
r = robjects.r
r.library("ggplot2")
robjects.r("p = ggplot(aes(price, carat), data=diamonds) + geom_point() + facet_grid(clarity ~ color, scales = 'free')")
r.ggsave('faceted_plot.jpeg')
robjects.r('print(p)')
r['dev.off']()