Skip to content

Instantly share code, notes, and snippets.

Avatar

Gabriel A. Devenyi gdevenyi

View GitHub Profile
@gdevenyi
gdevenyi / antsMultivariateTemplateConstruction2.sh
Created Jun 30, 2020
antsMultivariateTemplateConstruction2.sh modified for qbatch
View antsMultivariateTemplateConstruction2.sh
#!/bin/bash
shopt -s extglob
VERSION="0.0.0"
UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# trap keyboard interrupt (control-c)
trap control_c SIGINT
function setPath {
@gdevenyi
gdevenyi / install-brain-view2.sh
Created Aug 27, 2015
Script to install brain-view2 on ubuntu 14.04.3
View install-brain-view2.sh
#!/bin/bash
set -e
apt-get update
apt-get install -y build-essential gdebi-core git libcoin80-dev qt4-qmake libqt4-dev libqt4-core libboost-dev autogen pkg-config libtool libpcre++-dev gdb automake
cd ~
wget http://packages.bic.mni.mcgill.ca/minc-toolkit/Debian/minc-toolkit-1.9.10-20150710-Ubuntu_14.04-x86_64.deb
gdebi -n ~/minc-toolkit-1.9.10-20150710-Ubuntu_14.04-x86_64.deb
@gdevenyi
gdevenyi / Documentation.md
Last active Aug 29, 2015 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)
View Documentation.md

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@gdevenyi
gdevenyi / SKM.R
Created Nov 13, 2014
KMeansClustering sampling in R
View SKM.R
library (sparcl)
#input data
data <- read.csv("PIBPETSUVR_firstscan.csv", header=TRUE, row.names="RID")
#Throw away columns with dates and such not needed
data[1:5] <- list(NULL)
data[11] <- list(NULL)
data[ncol(data)] <- list(NULL)
#Initialize Empty Classification Table
View bibtex2markdown.rb
#!/usr/bin/env ruby
#
# This script is a wrapper around pandoc that uses pandoc's
# builtin citeproc support to generate a markdown bibliography
# from bibtex.
#
# Inspired by Jacob Barney's [bib2mkd][] script.
#
# [bib2mkd]: http://jmbarney.dyndns.org/?/linux/bib2mkd/
#
You can’t perform that action at this time.