This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# generate random points in a circle | |
import numpy as np | |
import pylab as plt | |
num_samples = 1000 | |
# make a simple unit circle | |
theta = np.linspace(0, 2*np.pi, num_samples) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tested on ubuntu 12.04 | |
# dependencies | |
sudo apt-get install libsdl1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev libsdl-mixer1.2-dev libsmpeg-dev libportmidi-dev | |
# pygame | |
sudo pip install hg+http://bitbucket.org/pygame/pygame |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$pdf_previewer = "start evince"; | |
$pdf_update_method = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#install dependencies | |
brew install fltk cmake git pkg-config | |
# setup an install location e.g in home | |
mkdir $HOME/stg | |
# clone and compile stage | |
mkdir stage && cd stage | |
git clone git://github.com/rtv/Stage.git | |
export STG=$HOME/stg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use strict; | |
my @rmdirs = ('.svn'); | |
my @rmfiles = (); | |
sub filelist | |
{ | |
my ($dir, $regex) = @_; | |
opendir(DIR, $dir) || return (); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
svn log -v --xml | grep '<author.*/author>' | sort $* | uniq -c | sort -rn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mencoder "mf://*.png" -mf fps=20 -o video_name.avi -ovc lavc -lavcopts vcodec=msmpeg4v2:vbitrate=800 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# EXT is the extension of the files | |
rename 's/(\d+)\.EXT/sprintf("%03d.EXT", $1)/e' *.EXT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
if [ $# -ne 2 ]; then | |
echo usage: $0 working_copy_path zip_file_path | |
exit 1 | |
fi | |
cd $1 && svn status | grep ^[AM] | awk '{print $2}' | zip $2 -@ | |
echo "Done" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!#/bin/sh | |
mkdir ~/.janus | |
cd ~/.janus | |
git clone https://github.com/jimenezrick/vimerl.git | |
git clone https://github.com/Lokaltog/vim-powerline.git | |
git clone https://github.com/myusuf3/numbers.vim.git | |
git clone git://github.com/altercation/vim-colors-solarized.git | |
git clone https://github.com/tomasr/molokai.git |