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
foo |
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
import networkx as nx | |
def main(): | |
G = nx.Graph() | |
# states = ['new mexico', 'oklahoma', 'texas'] | |
# states = ['new mexico', 'oklahoma', 'texas', 'arkansas', 'louisiana', 'mississippi'] |
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
AboutContent = { | |
defaultSection: "branching-and-merging", | |
init: function() { | |
if ($("body#about").length === 0) return; | |
AboutContent.observeNav(), | |
AboutContent.observePopState(), | |
AboutContent.showSection(AboutContent.getSection()) | |
}, | |
observePopState: function() { | |
if (window.history && window.history.pushState) return $(window).bind("popstate", |
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
sqlite> SELECT survey.user_id, q5, q6, event_code, timestamp FROM survey, events WHERE survey.user_id == events.user_id AND (event_code == 1 OR event_code == 2 OR event_code == 4 OR event_code == 5) AND timestamp/1000 >= CAST(strftime("%s", "2010-11-03 00:00:00") as INTEGER) AND timestamp/1000 < CAST(strftime("%s", "2010-11-10 00:00:00") as INTEGER); |
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
import csv, sys | |
from datetime import datetime, timedelta | |
reader = csv.reader(open("all_sessions_sorted.txt", 'rb'), delimiter="|") | |
timestamp = None | |
user = 0 | |
sessions = [] |
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
pdf(file="testing.pdf", width=11, height=4.5, family="Helvetica") | |
# read in table and remove rows with NAs | |
agedata <- na.omit(read.table("sessions_by_age_10min.txt", sep="|", header=T)) | |
color <- c("#0000FF", "#FF1D25", "#009103", "#F7941E", "#00A8E2", "#FFA4D6") | |
# (probably an easier way to do this) | |
agedata$color[agedata$q6==0] <- color[1] | |
agedata$color[agedata$q6==1] <- color[2] |