Skip to content

Instantly share code, notes, and snippets.

Rich FitzJohn richfitz

Block or report user

Report or block richfitz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View logistic.json
"version": "0.2.0",
"config": {
"base": "odin",
"include": []
"meta": {
"internal": "internal",
"user": "user",
"state": "state",
richfitz / Dockerfile
Created Feb 11, 2019
Create a really old version of R
View Dockerfile
FROM yamamuteki/debian-etch-i386
RUN apt-get update && apt-get install -y \
build-essential \
gfortran \
less \
RUN wget && \
tar -zxvf R-1.8.0.tgz
RUN cd R-1.8.0 && \
./configure && \

Keybase proof

I hereby claim:

  • I am richfitz on github.
  • I am richfitz ( on keybase.
  • I have a public key ASDSmLr0l6hCM-au6sVjf8C1QLSgSd_5Gf9fxVuOVFOmFwo

To claim this, I am signing this object:

View extract_variables.R
find_symbols <- function(expr) {
functions <- variables <- character(0)
f <- function(e) {
if (!is.recursive(e)) {
if (!is.symbol(e)) { # A literal of some type
variables <<- c(variables, deparse(e))
} else {
View kitten
#' Download kittens from the internet
#' This is the details section
#' @title Download kittens
#' @param width Width of the kitten, in pixels
#' @param height Height of the kitten, in pixels
#' @param destfile Place to download the kitten to. \code{\link{tempfile}()} makes a good place
#' @param ... Additional arguments passed through to \code{\link{download.file}}
View fish.eps
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: cairo 1.10.2 (
%%CreationDate: Fri Apr 18 22:50:20 2014
%%Pages: 1
%%BoundingBox: 0 -1 482 191
%%DocumentData: Clean7Bit
%%LanguageLevel: 2
/cairo_eps_state save def
View read_other_peoples_excel.R
parse_col <- function(x) {
d <- strsplit(x, NULL)
f <- function(x) {
sum(match(x, LETTERS) * 26^(seq_along(x) - 1L))
vapply(d, f, numeric(1))
inspect_xlsx <- function(path, sheet) {
tmp <- tempfile()
View Dockerfile
FROM stateline
# Python dependencies for the example:
RUN apt-get update && apt-get install -y \
python \
python-dev \
python-matplotlib \
python-numpy \
python-pip && \
pip install \
pyzmq \
richfitz / functions.R
Last active Aug 29, 2015
mclapply -> rrqlapply
View functions.R
use <- function(x, default){
sim_fkf <- function(fit){
n <- fit[["n"]]
dt <- fit[["dt"]]
View gist:f949282560ee78c581c3

Installation on OSX is currently a PITA if you don't have brew (I don't so that my system stays more similar to users of things, and because I'm a masochist apparently). See this issue as this will be fixed in jq 1.5. So, create an executable shell script sheep in the jq directory containing

echo "baa"

and run YACC=./sheep ./configure - make should run fine after that.

There is a library target for jq, which is great because now we only have to wrap a library, rather than write one. Further, there is a set of Python bindings that we can use as a starting point. The repo is here.

Ruby bindings here

You can’t perform that action at this time.