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
# This script installs libcurl and R 3.3.0 on a linux server | |
# when you can't use apt-get. Note that libcurl is a requirement | |
# for R 3.3.0 | |
# also see: http://pj.freefaculty.org/blog/?p=315 | |
export PATH=$HOME/packages/bin:$PATH | |
export LD_LIBRARY_PATH=$HOME/packages/lib:$LD_LIBRARY_PATH | |
export CFLAGS="-I$HOME/packages/include" | |
export LDFLAGS="-L$HOME/packages/lib" |
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
print_graph = function(g, type = NULL, filename = NULL, height = 6, width = 6, path = ifelse(type == "tikz", "tex", "pdf")) { | |
print(g) | |
if(!is.null(type)) { | |
if(type == "tikz") { | |
tikz(paste0(path, "/", filename), height = height, width = width) | |
print(g) | |
dev.off() |
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 installs GCC 4.9.3 | |
# to use it navigate to your home directory and type: | |
# sh install-gcc-4.9.3.sh | |
# download and install gcc 4.9.3 | |
wget https://ftp.gnu.org/gnu/gcc/gcc-4.9.3/gcc-4.9.3.tar.gz | |
tar xzf gcc-4.9.3.tar.gz | |
cd gcc-4.9.3 |
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
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) |
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
--- | |
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') | |
``` |
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 | |
# get the latest version | |
VER=$(wget --no-check-certificate -qO- https://s3.amazonaws.com/rstudio-desktop/current.ver) | |
# download it | |
wget https://download1.rstudio.org/rstudio-${VER}-amd64.deb | |
# install it | |
sudo dpkg -i rstudio-${VER}-amd64.deb | |
# clean up | |
rm -f rstudio-${VER}-amd64.deb |
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
#' Install Dependent Packages | |
#' | |
#' @param pkg.dir refers to the package directory that contains the | |
#' \code{Description} file | |
#' @param dependencies defines which dependencies of the dependent packages are | |
#' to be installed | |
#' @param repos is the (CRAN) repository used to install dependencies | |
#' @param lib is the library to which packages are installed | |
install_dep = function(pkg.dir = ".", dependencies = TRUE, repos = getOption("repos")[1], lib = .libPaths()[1]) { | |
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 | |
cat -e -t -v $1 |
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 | |
curl -O http://r.research.att.com/libs/gfortran-4.8.2-darwin13.tar.bz2 | |
sudo tar fvxz gfortran-4.8.2-darwin13.tar.bz2 -C / |
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 | |
sudo apt-get install qt5-default | |
wget http://kcachegrind.sourceforge.net/kcachegrind-0.7.4.tar.gz | |
tar xvf kcachegrind-0.7.4.tar.gz | |
cd kcachegrind-0.7.4 | |
qmake && make | |
sudo install -m 755 qcachegrind/qcachegrind /usr/local/bin | |
sudo install -m 644 qcachegrind/qcachegrind.desktop \ | |
/usr/local/share/applications/ |