Skip to content

Instantly share code, notes, and snippets.

@richfitz
richfitz / github_gpg_key.md
Last active March 18, 2021 19:09 — forked from ankurk91/github_gpg_key.md
Github : Signing commits using GPG (Ubuntu/Mac)

Github : Signing commits using GPG (Ubuntu/Mac) 🔐

  • Do you have an Github account ? If not create one.
  • Install required tools
  • Latest Git Client
  • gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
@richfitz
richfitz / R on Bede
Last active July 21, 2020 13:52 — forked from mondus/R on Bede
#!/bin/bash
# Script for installing R 3.6.3 on Bede
#
# The require dependancies are
# * bzip2
# * curl
# |-> openssl
# * pcre
# * xz
# * R
{
"version": "0.2.0",
"config": {
"base": "odin",
"include": []
},
"meta": {
"internal": "internal",
"user": "user",
"state": "state",
@richfitz
richfitz / Dockerfile
Created February 11, 2019 09:10
Create a really old version of R
FROM yamamuteki/debian-etch-i386
RUN apt-get update && apt-get install -y \
build-essential \
gfortran \
less \
wget
RUN wget http://cran.r-project.org/src/base/R-1/R-1.8.0.tgz && \
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 (https://keybase.io/richfitz) on keybase.
  • I have a public key ASDSmLr0l6hCM-au6sVjf8C1QLSgSd_5Gf9fxVuOVFOmFwo

To claim this, I am signing this object:

find_symbols <- function(expr) {
functions <- variables <- character(0)
f <- function(e) {
if (!is.recursive(e)) {
if (!is.symbol(e)) { # A literal of some type
return()
}
variables <<- c(variables, deparse(e))
} else {
@richfitz
richfitz / kitten
Last active November 11, 2016 16:17
#' 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}}
#'
@richfitz
richfitz / fish.eps
Last active January 17, 2016 19:22
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: cairo 1.10.2 (http://cairographics.org)
%%CreationDate: Fri Apr 18 22:50:20 2014
%%Pages: 1
%%BoundingBox: 0 -1 482 191
%%DocumentData: Clean7Bit
%%LanguageLevel: 2
%%EndComments
%%BeginProlog
/cairo_eps_state save def
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()
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 \