Skip to content

Instantly share code, notes, and snippets.

View gtuckerkellogg's full-sized avatar

Greg Tucker-Kellogg gtuckerkellogg

View GitHub Profile
@gtuckerkellogg
gtuckerkellogg / evernote-links-to-orgmode.applescript
Created February 10, 2012 15:11
emacs org-mode links to evernote notes
@gtuckerkellogg
gtuckerkellogg / gtk-modes.el
Created February 23, 2012 03:51
AppleScript editing continuation lines
; AppleScript is just intolerable, but
; at least I can now add continuation lines properly
;
(require 'applescript-mode)
(defun as-insert-continuation-line ()
"Insert the weird AppleScript continuation character"
(interactive)
(ucs-insert "00C2" 1 nil)
(newline)
(indent-according-to-mode)
// This is a little bit for using extended args
var f = function (id) {
// The first arg is an id. let's get the rest.
// the args variable will come back as a real array, after the first arg
var args = [].slice.call(arguments,1);
return(args)
} ;
require(RCurl)
myCsv <- getURL(dblink)
dbs <- read.csv(textConnection(myCsv))
library(ggplot2)
names(dbs) <- c("Year","Databases")
dbs[[1]] <- as.factor(dbs[[1]])
p <- qplot(x=Year,y=Databases,data=dbs,geom="bar",fill="gray")
p + theme_bw() + opts(axis.text.x = theme_text(angle=90, hjust=1.2, size=16),
axis.title.x=theme_text(size=16),
axis.title.y=theme_text(size=16,angle=90),
@gtuckerkellogg
gtuckerkellogg / journal.org[*Org Src CAPTURE-journal.org[ R ]*]
Created August 25, 2012 07:12
Generate bar plot of databases in NAR annual issue
dblink <- "https://docs.google.com/spreadsheet/pub?key=0Amd94LRhVxVWdElNYVdHblVLRjZKR1lwaFFFZHVyWUE&single=true&gid=0&output=csv"
require(RCurl)
myCsv <- getURL(dblink)
dbs <- read.csv(textConnection(myCsv))
library(ggplot2)
names(dbs) <- c("Year","Databases")
dbs[[1]] <- as.factor(dbs[[1]])
p <- qplot(x=Year,y=Databases,data=dbs,geom="bar",fill="gray")
p + theme_bw() + opts(axis.text.x = theme_text(angle=90, hjust=1.2, size=16),
axis.title.x=theme_text(size=16),

This is not what I was expecting. How can I get rid of the parentheses and the quotations?

c("x","y","z")
#+RESULTS:
#+TITLE: iKNOW alternative block
#+AUTHOR: Greg Tucker-Kellogg
#+EMAIL: gtuckerkellogg@gmail.com
#+DATE: 2012-09-09 Sun
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE: en
#+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
# TrueCrypt 7.1 is incompatible with Homebrew, largely because it
# hardcodes some osxfuse libs in /usr/local/lib. A tedious solutions
# was outlined in
# https://github.com/mxcl/homebrew/pull/10183#commitcomment-1425634,
# which I've modified ever so slightly
MV="/bin/mv -f"
RM="/bin/rm"
require(tm)
source("code/tmt.R")
require(plyr)
require(Rstem)
require(wordcloud)
ans.good <- tolower(clean(as.character(unlist(feedback[feedback$average < 65 ,6]))))
ans.good <- removePunctuation(removeWords(ans.good,stopwords()))
#ans.good <- removeWords(ans.good,c("lecture","lectures"))
ans.good <- ans.good[!is.na(ans.good)]
ans.good <- ans.good[sapply(ans.good,ans.lengths) > 8 ]

LSM2241 Lecture 5 feedback

front matter