Skip to content

Instantly share code, notes, and snippets.

@peiyunh
peiyunh / tmux_local_install.sh
Created September 18, 2016 03:08 — forked from ryin/tmux_local_install.sh
bash script for installing tmux without root access
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.8
@peiyunh
peiyunh / fixGpuRandSeed.m
Last active August 27, 2016 05:47
Fix GPU's random seed in Matlab
randSeed = 0;
rng(randSeed);
a = gpuArray(rand(1,5));
% uncomment below to fix gpu random seed
%randStream = parallel.gpu.RandStream('CombRecursive', 'Seed', randSeed);
%parallel.gpu.RandStream.setGlobalStream(randStream);
vl_nndropout(a, 'rate', 0.5)