This file contains hidden or 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
# Download Boost C++ library | |
wget http://sourceforge.net/projects/boost/files/boost/1.58.0/boost_1_58_0.tar.gz/download | |
# Extract | |
tar -zxvf download | |
# Install http://wiki.tiker.net/BoostInstallationHowto | |
cd boost_1_58_0 | |
./bootstrap.sh --prefix=/home/hpc3151/pool --libdir=/home/hpc3151/pool/lib --with-libraries=signals,thread,python,mpi | |
./bjam -j4 variant=release link=shared install |
This file contains hidden or 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(parallel) | |
cores <- detectCores() | |
load <- read.table("/proc/loadavg",sep=" ")$V1 | |
cores*.8 - load |
This file contains hidden or 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.packages("caret", dependencies = c("Depends", "Suggests")) |
This file contains hidden or 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
#!/usr/bin/env Rscript | |
# Reference: http://jfisher-usgs.github.io/r/2012/07/03/knitr-jekyll/ | |
input <- commandArgs(trailingOnly = TRUE) | |
KnitPost <- function(input, base.url = "/") { | |
require(knitr) | |
opts_knit$set(base.url = base.url) | |
fig.path <- paste0("../figs/", sub(".Rmd$", "", basename(input)), "/") | |
opts_chunk$set(fig.path = fig.path) |
This file contains hidden or 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
# C++ functions parser | |
# Reference: http://stackoverflow.com/questions/6133989/what-grep-command-will-include-the-current-function-name-in-its-output | |
# Usage: ./cpp-parser.sh <file.cpp> | |
awk -v re='return' '/^[[:alpha:]]/{f=FNR"-"$0} $0~re{printf "%s\n%d:%s\n--\n",f,FNR,$0; f="" }' $1 |
NewerOlder