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/bash | |
# on centos minimal | |
yum install gcc | |
yum install make | |
yum install ncurses-devel | |
yum install lua lua-devel | |
yum install ruby ruby-devel | |
yum install python python-devel | |
yum install perl perl-devel |
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
module HashConverter | |
class << self | |
def to_underscore hash | |
convert hash, :underscore | |
end | |
def to_camel_case hash | |
convert hash, :camelize | |
end | |
def convert obj, *method | |
case obj |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
def mad_based_outlier(points, thresh=3.5): | |
if len(points.shape) == 1: | |
points = points[:,None] | |
median = np.median(points, axis=0) | |
diff = np.sum((points - median)**2, axis=-1) | |
diff = np.sqrt(diff) | |
med_abs_deviation = np.median(diff) | |
modified_z_score = 0.6745 * diff / med_abs_deviation |