Skip to content

Instantly share code, notes, and snippets.

View awagner83's full-sized avatar

Adam Wagner awagner83

View GitHub Profile
@eric-czech
eric-czech / gist:2784e9ac50745a5d2915
Last active May 29, 2018 20:53
Parallel Cross-Validation Example in R
# Parallel Cross-Validation Example
library(foreach) # install.packages('foreach')
library(caret) # install.packages('caret', dependencies = c("Depends", "Suggests"))
library(doParallel) # install.packages('doParallel')
registerDoParallel(makeCluster(4)) # Use 4 cores for parallel CV
data <- read.csv(…) # Assuming this is your dataset
cv <- caret::createFolds(nrow(data), k=10, list=T) # Create 10 folds
@kennyp
kennyp / .tmux.conf
Created March 8, 2012 19:41
My Tmux Config
# Use C-a for the prefix
set -g prefix C-a
bind C-a send-prefix
unbind C-b
# Make the delay a little shorter
set -sg escape-time 1
# Number windows starting with one
set -g base-index 1