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
#!/bin/bash | |
text=`cat` | |
echo -E $text | grep -o '@\w*' | sort -n | uniq | sed -n 's/@\(.*\)/\\citation\{\1\}/p' >> ~/smallbib.aux | |
bibtool --preserve.key.case=on -s -d -x ~/smallbib.aux /Users/noamross/Dropbox/Public/library.bib -o ~/smallbib.bib | |
echo -E "$text" | pandoc -f markdown -t html --smart --mathjax --bibliography=/Users/noamross/smallbib.bib --csl=/Users/noamross/Dropbox/Public/pd/ecology.csl --template=/Users/noamross/Dropbox/Public/pd/noam.html --base-header-level=2 | |
rm ~/smallbib.* |
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
#!/bin/bash | |
filename="$TM_FILEPATH" | |
basename="${filename%.*}" | |
text=`cat ` | |
echo -E $text | grep -o '@\w*' | sort -n | uniq | sed -n 's/@\(.*\)/\\citation\{\1\}/p' >> ~/smallbib.aux | |
bibtool --preserve.key.case=on -s -d -x ~/smallbib.aux /Users/noamross/Dropbox/Public/library.bib -o ~/smallbib.bib |
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
javascript:(function() {window.location=window.location.toString().replace(/^http:\/\/www\.jstor\.org\/stable\/.*\/(.*?)$/,'http://www.jstor.org/stable/pdfplus/$1.pdf?acceptTC=true');}()) |
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
#!/bin/bash | |
# This script is set to run any time a new file is added to my "Papers" folder, using launchd | |
# 1 - Find papers with JSTOR or Science cover sheets and remove the first page | |
text1="kind:pdf Your use of the JSTOR archive indicates your acceptance of" #JSTOR papers | |
text2="kind:pdf is published weekly, except the last week in December" #Science papers | |
#Add more of these as you find text snippets that identify cover sheets from different publishers. Then add more loops belo |
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
using terms from application "Quicksilver" | |
on process text _bashcom | |
do shell script "/bin/bash -ic '" & _bashcom & "'" | |
end process text | |
end using terms from |
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
# Save this in ~/Libary/Application Support/Quicksilver/Actions and relaunch | |
# Quicksilver. Then just enter a text bash command and activate "BashGrowl" in | |
# the second pane. I like it for todo.txt and system status calls. | |
using terms from application "Quicksilver" | |
on process text theCommand | |
set _text to do shell script "/bin/bash -ic " & quoted form of theCommand | |
try | |
tell application "System Events" |
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
proftable <- function(file) { | |
require(plyr) | |
sample.interval <- as.numeric(strsplit(readLines(file, 1), "=")[[1L]][2L])/1e+06 | |
profdata <- as.matrix(read.table(file, header=FALSE, sep=" ", colClasses="character", skip=1, fill=TRUE, na.strings="")) | |
total.time <- nrow(profdata)*sample.interval | |
stacktable <- data.frame(table(aaply(profdata, 1, function(x) paste(rev(na.omit(x)), collapse=" > ")))) | |
names(stacktable) <- c("Stack","PctTime") | |
stacktable$PctTime <- 100*stacktable$PctTime/nrow(profdata) | |
stacktable <- stacktable[order(stacktable$PctTime, decreasing=TRUE), c("PctTime", "Stack")] | |
rownames(stacktable) <- NULL |
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
#' Use the data editor for a CSV file | |
#' | |
#' This function loads a CSV file, lets the user edit it in the native data | |
#' editor, then re-saves it, prompting the user for a new name if desired. | |
#' | |
fix.csv <- function(file, new.name=TRUE, sep=",", comment.char="") { | |
tmpframe <- read.csv(file, sep=sep,quote="", colClasses="character", | |
stringsAsFactors=FALSE, comment.char="", | |
blank.lines.skip=FALSE, na.strings="") | |
tmpframe <- edit(tmpframe) |
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
Noam Ross | |
--------- | |
### 13-01-22 14:50:15 | |
Abstract | |
======== | |
Forest disease spreads through plant communities structured by species composition, age distribution, and spatial arrangement. I propose to examine the consequences of the interaction of these components of population structure on a model systems of *Phytophthora ramorum* invasion in California redwood forests. First, I will compare the dynamic behavior of a series of epidemiological models that include different configurations of population structures. Then I will fit these models to time-series data from a network of disease monitoring plots to determine what components of forest population structure are most important for prediction of disease spread. Using the most parsimoniuous models, I will determine optimal schedules of treatment to minimize the probability of disease outbreak. |