I hereby claim:
- I am alienfluid on github.
- I am farhan (https://keybase.io/farhan) on keybase.
- I have a public key whose fingerprint is 1A95 F6A8 4B52 8F81 3D09 DD0F 064B 8FA3 0210 0988
To claim this, I am signing this object:
| #!/usr/bin/env Rscript | |
| library(tm) | |
| num.words <- as.integer(commandArgs(trailingOnly = TRUE)) | |
| f <- file("stdin") | |
| input.lines <- readLines(f) | |
| close(f) | |
| full.text <- tolower(paste(input.lines, collapse = " ")) | |
| freqs <- sort(termFreq(PlainTextDocument(full.text), control=list(wordLengths= c(1,Inf))), decreasing=T)[1:num.words] | |
| for (i in 1:num.words) { | |
| cat(freqs[i], names(freqs)[i], "\n", sep=' ') |
I hereby claim:
To claim this, I am signing this object:
| a = list(list("a", "b"), list(list(list(list(list("c")))), list(list("d"))), 1) | |
| is_list = function (x) { | |
| if (class(x) == "list") { | |
| 1 + max(sapply(x, is_list)) | |
| } else { | |
| 0 | |
| } | |
| } |
| julia> ODBC.connect("mysql-prod2") | |
| ODBC Connection Object | |
| ---------------------- | |
| Connection Data Source: mysql-prod2 | |
| mysql-prod2 Connection Number: 1 | |
| Contains resultset? No | |
| julia> results = query("select * FROM company LIMIT 100") | |
| ERROR: no method unsafe_copy!(Ptr{UTF8String},Ptr{Uint32},Int64) | |
| in ODBCCopy! at /Users/fahmed/.julia/ODBC/src/backend.jl:129 |
| ## build a nice design matrix | |
| ## formula can be a vector of column names or a standard formula | |
| design <- function(formula, response, data){ | |
| if(is.character(formula)){ | |
| data <- data[,formula] | |
| formula <- ~. | |
| } | |
| if(is.null(dim(data))) data <- as.matrix(data) | |
| if(is.null(rownames(data))) rownames(data) <- 1:nrow(data) | |
| response <- c(response) |