This file contains hidden or 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
library(ggplot2) | |
library(dplyr) | |
library(reshape2) | |
df=structure(list(Year = c(2013L, 2012L, 2011L, 2010L, 2009L, 2008L, | |
2007L, 2006L, 2005L, 2004L, 2003L, 2002L, 2001L, 2000L, 1999L, | |
1998L, 1997L), | |
City = structure(c(14L, 8L, 12L, 13L, 1L, 2L, | |
6L, 4L, 14L, 8L, 15L, 5L, 10L, 9L, 7L, 3L, 11L), | |
.Label = c("Boston", "Chicago", "Dallas", "Houston", "Kansas City", "Long Beach", |
This file contains hidden or 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
mstr = '123456789' #Enter string to translate here | |
wordNum <- read.delim("~/bin/memory/wordNum.txt", | |
colClasses=c("character","character"),header=F) | |
dict<-new.env() | |
buildDict=function(word,num){ | |
dict[[num]]<- paste(word,dict[[num]],sep=" ") | |
} | |
foo=mapply(buildDict,wordNum$V1,wordNum$V2) | |
rec <- function(x, y) { | |
if (is.null(x)) return; |
This file contains hidden or 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 re | |
from cStringIO import StringIO | |
from sys import argv | |
import random | |
mstr = str(argv[1]) | |
adict = {} | |
wl = open('wordNum.txt') |
This file contains hidden or 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 re | |
fh = open('cmudict-0.4.scm', 'r') | |
adict = {} | |
wl = open('wordlist.txt') | |
line = wl.readline() | |
while line: | |
line = line.strip() |
NewerOlder