This file contains hidden or 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
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 |
This file contains hidden or 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
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() |
This file contains hidden or 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 | |
# 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. |
This file contains hidden or 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
/* | |
PHP/MySQL (PDO) method with named parameters | |
--------------------------------------------- | |
https://gist.github.com/luckyshot/9477105 | |
$config = [ | |
'mysql' => [ | |
'database' => 'database', | |
'user' => 'root', |