Skip to content

Instantly share code, notes, and snippets.

View gdevenyi's full-sized avatar

Gabriel A. Devenyi gdevenyi

View GitHub Profile
@gdevenyi
gdevenyi / nvenc-install.sh
Created September 17, 2023 17:41 — forked from denji/nvenc-install.sh
Installation script of CUDA-accelerated `ffmpeg` with NVIDIA Encoder
#!/bin/bash
# ==================================================================
# This script will compile and install a static ffmpeg build with
# support for NVENC in Ubuntu. Developed in Ubuntu 22.04 LTS,
# with NVIDIA Drivers v510.73 and CUDA v11.6
# It assumes NVIDA drivers are installed and that you have a
# CUDA-compatible GPU. You can check installed drivers with:
# $ apt list *nvidia-driver-* | grep installed
# $ nvidia-smi
# ==================================================================
@gdevenyi
gdevenyi / antsMultivariateTemplateConstruction2.sh
Created June 30, 2020 20:58
antsMultivariateTemplateConstruction2.sh modified for qbatch
#!/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 / SKM.R
Created November 13, 2014 02:11
KMeansClustering sampling in 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
@gdevenyi
gdevenyi / Documentation.md
Last active August 29, 2015 14:26 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)

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
#!/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/
#
@gdevenyi
gdevenyi / install-brain-view2.sh
Created August 27, 2015 00:02
Script to install brain-view2 on ubuntu 14.04.3
#!/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