Skip to content

Instantly share code, notes, and snippets.

View helske's full-sized avatar

Jouni Helske helske

View GitHub Profile
@helske
helske / disc_golf_in_Finland.R
Last active August 29, 2015 14:25
Map of disc golf popularity in Finland
library("ggplot2")
library("cowplot")
library("sp")
library("raster")
library("scales")
library("rgeos")
# course information, scraped from fgr.fi
fgr <- read.csv("fgr.csv")
@helske
helske / sanitydocker.sh
Last active November 6, 2015 20:23
Using Rocker for package testing with SAN/UBSAN
#!/bin/bash
# This is basically a dummy version of http://dirk.eddelbuettel.com/blog/2015/01/18/
# I could not get the above working when the package which I was testing (seqHMM) was not on CRAN (so install-deps did not work)
# start docker and run /bin/bash # with winpty thing use proper path instead of $(pwd)
docker -run -ti -v $(pwd):/mnt rocker/r-devel-ubsan-clang /bin/bash
# Use littler's install.r script for installing dependencies
install.r Rcpp RcppArmadillo nloptr numDeriv igraph TraMineR
# start docker and run /bin/bash # with winpty thing use proper path instead of $(pwd)
docker -run -ti -v $(pwd):/mnt rocker/r-devel /bin/bash
# tsPI
# Use littler's install.r script for installing dependencies
install.r KFAS testthat
# check tsPI
Rdevel CMD check --as-cran tsPI_1.0.0.tar.gz
# Rlibeemd
# install solaris virtualbox: https://gist.github.com/jeroenooms/4c61c821172ad640545d
# create shared folder in virtualbox which contains your package
# install GSL: http://www.opencsw.org/packages/gsl_dev/
pkgadd -d http://get.opencsw.org/now
/opt/csw/bin/pkgutil -U
/opt/csw/bin/pkgutil -y -i gsl_dev
@helske
helske / atom_install
Last active September 27, 2019 12:55
Installing Atom and Julia to arbitrary location for non-admin user on Windows
I don't have software installation rights at all with my basic account at work, but I have localadmin rights on a separate account.
But as Atom installs itself automatically to user profile,
I can't just install Atom for my normal account using the localadmin account.
But this works: https://discuss.atom.io/t/how-to-install-atom-on-windows-to-other-places-instead-of-c/27619/12
In summary:
1. Install Atom with localadmin account
2. Run %LocalAppData%\Atom\app-VERSION\atom.exe --squirrel-uninstall VERSION (fill in version with the Semver version of Atom)
3. Move the %LocalAppData%\Atom folder to anywhere you want - make sure to move this root directory, not the app-VERSION directory
4. Run C:\Wherever\you\put\it\Atom\app-VERSION\atom.exe --squirrel-install VERSION
library(rstan)
stan_code <- "
data {
int<lower=0> N;
vector[N] y;
vector[N] a;
vector[N] x1;
vector[N] x2;
}