Skip to content

Instantly share code, notes, and snippets.

Jan Tilly jtilly

Block or report user

Report or block jtilly

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
jtilly / emax.m
Last active Nov 20, 2015
Emax Type I Extreme Value / Generalized Extreme Value
View emax.m
% Mean utilities
mu1 = 2;
mu2 = 3;
mu3 = 1;
% Scale parameter
sigma = 0.4;
% Draw Type I extreme value errors
R = -evrnd(0,1,100000,3);
jtilly / nan.f90
Created Nov 27, 2015
Intel Fortran NAN
View nan.f90
real(dp), PARAMETER :: NAN = TRANSFER((/ Z'00000000', Z'7FF80000' /), 1.0_8)
jtilly /
Last active Nov 29, 2015
Install docker-engine on Ubuntu Trusty
sudo apt-get install docker-engine=1.8.3-0~trusty
sudo gpasswd -a ${USER} docker
sudo service docker restart
newgrp docker
jtilly /
Created Dec 22, 2015
Install gfortran on Mac OS X for RcppArmadillo
curl -O
sudo tar fvxz gfortran-4.8.2-darwin13.tar.bz2 -C /
cat -e -t -v $1
jtilly /
Last active Jan 7, 2016
Shell script that downloads and installs the latest version of RStudio Desktop (Ubuntu / Debian)
# get the latest version
VER=$(wget --no-check-certificate -qO-
# download it
# install it
sudo dpkg -i rstudio-${VER}-amd64.deb
# clean up
rm -f rstudio-${VER}-amd64.deb
jtilly / random_numbers_parallel.Rmd
Last active Jan 15, 2016
Random Number Generation in Parallel: Reproducibility (
View random_numbers_parallel.Rmd
title: 'Random Number Generation in Parallel: Reproducibility'
author: "Jan Tilly"
date: "January 15, 2016"
output: html_document
```{r global_options, include=FALSE}
knitr::opts_chunk$set(results = 'hold')
jtilly / ols.f90
Created Feb 19, 2016
Compute OLS with Fortran and Lapack
View ols.f90
function ols(y, x, n, k) result (beta)
implicit none
external DGELS
integer, intent(in) :: n, k
real(dp), allocatable, intent(in) :: y(:), x(:, :)
integer :: info, lwork
real(dp) :: beta(k)
jtilly / print_graph.R
Created Apr 10, 2016
Print graphs to screen and save them as Tikz or PDF
View print_graph.R
print_graph = function(g, type = NULL, filename = NULL, height = 6, width = 6, path = ifelse(type == "tikz", "tex", "pdf")) {
if(!is.null(type)) {
if(type == "tikz") {
tikz(paste0(path, "/", filename), height = height, width = width)
jtilly / time
Created May 30, 2016
Check memory usage
View time
alias time='/usr/bin/time -f "\nCPU: %Us\tReal: %es\tRAM: %MKB"'
You can’t perform that action at this time.