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
gs -dBATCH -dNOPAUSE -sDEVICE=png16m -r600 -dUseCropBox -sOutputFile=item-%03d.png input.pdf |
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
- bundle exec jekyll build 2>&1 | tee output.log | |
- grep -i "error" output.log > /dev/null ; test $? -ne 0 # fail if there is an error in output.log |
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
FROM ubuntu:16.04 | |
MAINTAINER [email protected] | |
RUN apt-get update &&\ | |
apt-get install --no-install-recommends -y \ | |
ksh \ | |
xvfb \ | |
wget &&\ | |
apt-get clean -y && rm -rf /var/lib/apt/lists/* |
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 can take a while. Run in a screen environment. | |
# Modify for the version you want to install. | |
RVERSION=3.2.2 | |
sudo apt-get install screen gfortran libreadline6-dev libx11-dev libxt-dev | |
cd ~ |
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
library(caret) | |
library(doMC) | |
registerDoMC(cores = 4) # use multiple cores | |
set.seed(1234) | |
col.of.interest <- c( | |
'response', 'A', 'B', '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
```{r echo = FALSE, results = 'show'} | |
library(knitr) | |
``` | |
# Vergleich Pendeln mit Auto vs. Bahn mit BahnCard 50 | |
```{r} | |
# Fahrten pro Jahr (Wochenenden pro Jahr abzgl. Urlaub/Feiertage) | |
n.fahrten <- (52 - 7) * 2 # Fahrten in eine Richtung |
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 | |
# Rename image files with md5 hash | |
mkdir out | |
for f in *.tif | |
do | |
splt=(${f//_/ }) | |
c=$(cat ${splt[0]}\_${splt[1]}\_* | md5) # 329L_23_* | |
o=${splt[0]}\_${splt[1]}\-${c:0:10}\_${splt[2]} |
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
library(RColorBrewer) | |
brewer.pal(30, "RdYlBu") |
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 creates eps files from all .gd or .exec files in a directory. | |
if [ ! -d "img/" ]; | |
then | |
mkdir img | |
fi | |
rm img/*-gd.eps | |
touch execfile # Create execfile |
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
def rgb(r,g,b): # Just returns r, g, b in this case. Can be used to reformat RGB values if necessary. | |
return r,g,b | |
def heat(min, max, val, type): # Takes min and max values and the value to be heatmapped. Type is the look up table, see below. | |
min = float(min) | |
max = float(max) | |
val = float(val) | |
val = (val - min) / (max - min) # normalize val to min and max |