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
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> | |
<title>Node-Link Tree</title> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.v2.js"></script> | |
<link type="text/css" rel="stylesheet" href="tree.css"/> | |
</head> | |
<body> | |
<div id="buttons"> | |
<button class="depth first active" onclick="update(false)">Depth</button> |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import csv | |
import os | |
from collections import defaultdict, Counter | |
comparisons = defaultdict(dict) | |
true_genres = {} | |
test_genres = {} |
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
<!-- paste this at the top of your HIT's source --> | |
<script type="text/javascript"> | |
function turkGetParam(name) { | |
name = name.replace(/[[]/,"\[").replace(/[]]/,"\]"); | |
var regexS = "[?&]"+name+"=([^&#]*)"; | |
var regex = new RegExp(regexS); | |
var results = regex.exec(window.location.href); | |
if (results == null) { | |
return ""; |
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
var searchFor = /\bshe\b|\bhis\b|\bher\b|\bhim\b|\bhe\b|\bms\b|\bmrs\b|\bmr\b|woman|\bman\b|women|\bmen\b|\bfemale|\bmale\b|\bmales\b|\bgirl\b|\bboy\b|\bgirls\b|\bboys\b|\bgirly\b|\bboyish\b|\bgirlhood\b|\bboyhood\b|\bgirlfriend|\bboyfriend|\bwife|\bhusband\b|\bwives\b|\bhusbands\b|daughter|\bson\b|\bsons\b|\bsister|\bbrother|\bmother|grandmother|godmother|stepmother|father|\baunt\b|\buncle\b|\baunts\b|\buncles\b|\bniece\b|\bnephew\b|\bnieces\b|\bnephews\b|\bherself\b|\bhimself\b|\blady|\bladies\b|\bgentlemen\b|\bgentleman\b|\bmom\b|\bdad\b|\bmoms\b|\bdads\b|mommy|daddy|mommies|daddies|ladiez|\bmenz\b|\bmanly\b|\bmanliness\b|\bmanhood\b|\bmankind\b|\bguy\b|\bguys\b|\bdude\b|\bdudes\b|\bdudely\b|\bmaternity\b|\bpaternity\b|\bmaternal\b|\bpaternal\b|\bmatroniz|\bpatroniz|\bmatronize|\bpatronize|klansman|airman|airmen|alderman|aldermen|anchorman|anchormen|assemblyman|assemblymen|bogeyman|bogeymen|bondsman|bondsmen|businessman|businessmen|cameraman|cameramen|caveman|cavemen|chairman|clergyman|congressman|congress |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# current as of 2014-12-20 | |
# mostly derived from https://nixos.org/wiki/Nix_on_OS_X#Using_the_Testing_Branch | |
curl https://nixos.org/nix/install | sh | |
NIXDIR=~/nixtest # or wherever you like | |
mkdir -p $NIXDIR | |
cd $NIXDIR | |
git clone https://github.com/joelteon/nixpkgs.git # this is the yosemite branch | |
nix-channel --remove nixpkgs | |
cd ~/.nix-defexpr |
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
source $stdenv/setup | |
mkdir -p $out/bin | |
cp /usr/bin/security $out/bin |
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
put_on_tv() { | |
IP=$(ipconfig getifaddr en1) | |
PORT=$(($RANDOM%63000+2001)) | |
FILENAME=$(basename "$*") | |
FILEEXT=${FILENAME##*.} | |
ln -s "$1" $TMPDIR/$PORT.$FILEEXT | |
( | |
cd $TMPDIR | |
python -m SimpleHTTPServer $PORT & | |
ssh -t livingroom_pi "omxplayer -o hdmi -r http://$IP:$PORT/$PORT.$FILEEXT" |
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
<p>What do two different ways of filtering a list compile to?</p> | |
<p>(Example: take a list of tuples (a,b), and return a list of a for every (a,b) where b > 1.)</p> | |
<table> | |
<tr> | |
<th> | |
`map fst . filter ((>1) . snd)` | |
</th> | |
<th> |
OlderNewer