start new:
tmux
start new with session name:
tmux new -s myname
tell application "Keynote" | |
tell document 1 | |
set theSlides to slides | |
repeat with s in the slides | |
tell presenter notes of s | |
set font to "Helvetica" | |
set size to 24 | |
end tell | |
end repeat | |
end tell |
This guide assumes that you recently run brew upgrade postgresql
and discovered to your dismay that you accidentally bumped from one major version to another: say 9.3.x to 9.4.x. Yes, that is a major version bump in PG land.
First let's check something.
brew info postgresql
The top of what gets printed as a result is the most important:
# "impute" missing binary predictor | |
# really just marginalizes over missingness | |
# imputed values produced in generated quantities | |
N <- 1000 # number of cases | |
N_miss <- 100 # number missing values | |
x_baserate <- 0.25 # prob x==1 in total sample | |
a <- 0 # intercept in y ~ N( a+b*x , 1 ) | |
b <- 1 # slope in y ~ N( a+b*x , 1 ) |
# data from http://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/population-distribution-demography/geostat | |
# Originally seen at http://spatial.ly/2014/08/population-lines/ | |
# So, this blew up on both Reddit and Twitter. Two bugs fixed (southern Spain was a mess, | |
# and some countries where missing -- measure twice, submit once, damnit), and two silly superflous lines removed after | |
# @hadleywickham pointed that out. Also, switched from geom_segment to geom_line. | |
# The result of the code below can be seen at http://imgur.com/ob8c8ph | |
library(tidyverse) |
# Download elevation tif from eg http://www.eea.europa.eu/data-and-maps/data/digital-elevation-model-of-europe | |
# First, convert elevation tif to a space delimited xyz (lng lat elevation) file | |
# $ gdal_translate -of XYZ elevation3x3.tif /tmp/file.xyz | |
df <- read_delim('/tmp/file.xyz', delim=' ', col_names=FALSE) | |
df %>% | |
mutate(X3 = na_if(X3, 0)) %>% | |
ggplot(aes(X1, -X2 + 20 * X3/max(X3, na.rm=TRUE), group=X2)) + | |
geom_line(size=0.05) + |
The R package XML
for parsing and manipulation of XML documents in R is not actively maintained anymore, but used by many:
The R package xml2
is an actively maintained, more recent alternative.
This file documents useful resources and steps for moving from XML
to xml2
.