Skip to content

Instantly share code, notes, and snippets.

var cqConfig = {
stateKey: "cqstate_v7",
clickTypes: [],
achievements: [{
name: "SuperClicker",
thresholds: {
clicks: 20
},
description: ""
},
//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)
@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
@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
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);
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'))
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