Skip to content

Instantly share code, notes, and snippets.

View jcwright77's full-sized avatar

John C. Wright jcwright77

View GitHub Profile
@truatpasteurdotfr
truatpasteurdotfr / gist:c160ffaa4b46a47ad196220194e715f0
Created February 17, 2017 13:32
vagrant-virtualbox-singularity-osx.txt
# install vagrant
macmini:vagrant tru$ VERS=1.9.1
macmini:vagrant tru$ curl https://releases.hashicorp.com/vagrant/${VERS}/vagrant_${VERS}.dmg > vagrant_${VERS}.dmg
macmini:vagrant tru$ curl https://releases.hashicorp.com/vagrant/${VERS}/vagrant_${VERS}_SHA256SUMS > vagrant_${VERS}_SHA256SUMS
macmini:vagrant tru$ grep vagrant_${VERS}.dmg vagrant_${VERS}_SHA256SUMS | shasum -a 256 -c && \
macmini:vagrant tru$ hdiutil mount vagrant_${VERS}.dmg && \
macmini:vagrant tru$ sudo installer -pkg /Volumes/Vagrant/Vagrant.pkg -target /
macmini:vagrant tru$ hdiutil unmount /Volumes/Vagrant
# installing VirtualBox
macmini:vagrant tru$ VERSVB=5.1.14
@krrg
krrg / main.cpp
Created October 20, 2015 16:05
Example of using MPI Split
#include <mpi.h>
#include <iostream>
using namespace std;
int main(int argc, char *argv[]) {
MPI::Init_thread(MPI_THREAD_FUNNELED);
@lmullen
lmullen / Makefile
Last active May 30, 2024 09:34
PDF slides and handouts using Pandoc and Beamer
SLIDES := $(patsubst %.md,%.md.slides.pdf,$(wildcard *.md))
HANDOUTS := $(patsubst %.md,%.md.handout.pdf,$(wildcard *.md))
all : $(SLIDES) $(HANDOUTS)
%.md.slides.pdf : %.md
pandoc $^ -t beamer --slide-level 2 -o $@
%.md.handout.pdf : %.md
pandoc $^ -t beamer --slide-level 2 -V handout -o $@
@twiecki
twiecki / sim_drift_gpu.py
Created December 9, 2011 16:23
Simulating drift-processes on the GPU using PyCuda
from __future__ import division
import pycuda.compiler
import pycuda.gpuarray as gpuarray
import pycuda.autoinit
import pycuda.curandom
from pycuda.cumath import exp as pycuda_exp
from pycuda.compiler import SourceModule
import matplotlib.pyplot as plt
from kabuki.utils import scipy_stochastic