Skip to content

Instantly share code, notes, and snippets.

View gaussian_elim.py
import numpy as np
def GEPP(A, b, doPricing = True):
'''
Gaussian elimination with partial pivoting.
input: A is an n x n numpy matrix
b is an n x 1 numpy array
output: x is the solution of Ax=b
with the entries permuted in
View coinflipper.py
import random
import sys
try:
population_size = int(sys.argv[1])
except:
e = sys.exc_info()[0]
print "Please enter the population sample size i.e how many times to filp the coin"
sys.exit()
View install_sublime_text.sh
#!/bin/sh
# Sublime Text 3 install with Package Control (last update: 9 Feb 2016)
#
# No need to download this script, just run it on your terminal:
#
# $ curl -L git.io/sublimetext | sh
#
# When you need to update Sublime Text, run this script again.
@greenspray
greenspray / db.php
Created Jan 28, 2016 — forked from luckyshot/db.php
PHP/MySQL (PDO) method with named parameters
View db.php
/*
PHP/MySQL (PDO) method with named parameters
---------------------------------------------
https://gist.github.com/luckyshot/9477105
$config = [
'mysql' => [
'database' => 'database',
'user' => 'root',