moved to
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/env python3 | |
from collections import defaultdict | |
from math import log | |
import sys | |
depths_by_target = defaultdict(list) | |
with open(sys.argv[1]) as f: |
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/env python3 | |
import sys | |
lines = [] | |
parent_by_id = {} | |
rel_by_id = {} | |
with open(sys.argv[1]) as f: | |
for line in f: |
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/env python3 | |
from collections import defaultdict | |
from math import log | |
from pysblgnt import morphgnt_rows | |
items_by_target = defaultdict(list) | |
count_by_item = defaultdict(int) | |
total_item_count = 0 |
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/env python | |
from collections import defaultdict | |
bigrams = defaultdict(set) # mapping first letter to possible second letter | |
trigrams = set() | |
with open("/usr/share/dict/words") as words: | |
for word in words: | |
word = word.replace("\n", "#") |
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
- | |
title: "Voter Participation" | |
screen_name: "pmarca" | |
first_id: 488428182282858498 | |
first_timestamp: "2014-07-13T16:02:07-05:00" | |
tweets: | |
- "2014-07-13T16:02:07-05:00 Common thing one hears in US is \"Political system broken; Founding Fathers never intended politics to be dominated by moneyed interests.\"" | |
- "2014-07-13T16:03:08-05:00 But in 1776, voting \"restricted to property owners—most of whom are white male Protestants over the age of 21\". http://t.co/x2AVaTBaEa" | |
- "2014-07-13T16:03:51-05:00 In 1789, George Washington was elected President. \"Only 6% of the population can vote.\" http://t.co/PpX4aLQcM8" | |
- "2014-07-13T16:04:38-05:00 Not until 1856 was voting expanded even to all white men (eliminating property ownership requirement) -- http://t.co/PpX4aLQcM8" |
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
{"name": "P0", "children": [{"name": "AB", "children": [{"name": "ABa", "children": [{"name": "ABal", "children": [{"name": "ABalp", "children": [{"name": "ABalpa", "children": [{"name": "ABalpap", "children": [{"name": "ABalpapa", "children": [{"name": "ABalpapap", "children": [{"name": "ABalpapapa", "children": [{"name": "RMDDL"}, {"name": "ABalpapapap", "children": [{"name": "SMBDL"}, {"name": "ABalpapapapa"}]}]}, {"name": "ABalpapapp", "children": [{"name": "SMBVL"}, {"name": "ABalpapappa"}]}]}, {"name": "ABalpapaa", "children": [{"name": "ABalpapaap", "children": [{"name": "arc_ant_V"}, {"name": "ABalpapaapp"}]}, {"name": "ABalpapaaa", "children": [{"name": "hyp2_V"}, {"name": "RIPL"}]}]}]}, {"name": "ABalpapp", "children": [{"name": "ABalpappa", "children": [{"name": "ABalpappaa", "children": [{"name": "ABalpappaap", "children": [{"name": "I2L"}, {"name": "ABalpappaapp"}]}, {"name": "ABalpappaaa"}]}, {"name": "ABalpappap", "children": [{"name": "mc3V"}, {"name": "e2V"}]}]}, {"name": "ABalpappp", "childr |
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
# frustratingly, we need to have "real" gcc to build the i386-elf binutils/gcc | |
brew install gcc | |
# $PROJECT_HOME should be the parent directory under which you'll download | |
# everything and build the toolchain | |
cd $PROJECT_HOME | |
mkdir toolchain |
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
// calculated Coordinated Mars Time (MTC) | |
var d = new Date(); | |
var millis = d.getTime(); | |
var jd_ut = 2440587.5 + (millis / 8.64E7); | |
var jd_tt = jd_ut + (35 + 32.184) / 86400; | |
var j2000 = jd_tt - 2451545.0; | |
var msd = (((j2000 - 4.5) / 1.027491252) + 44796.0 - 0.00096); | |
var mtc = (24 * msd) % 24; |