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
#!/usr/bin/env python2.7 | |
# -*- coding: utf-8 -*- | |
"""S3DistCp | |
Run S3DistCp via boto. Currently only a limited set of S3DistCp | |
options useful for preparing AWS/EMR input data are exposed. | |
For details of S3DistCp options, see Distributed Copy Using S3DistCP: | |
http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/UsingEMR_s3distcp.html |
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
#!/usr/bin/env python2.7 | |
# -*- coding: utf-8 -*- | |
import functools | |
import inspect | |
from itertools import izip_longest | |
import json | |
import logging | |
import os | |
import sys | |
from traceback import format_tb |
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
#!/usr/bin/bash | |
# | |
# For configuring EC2 Debian/Jessie instance. | |
# | |
sudo apt-get update | |
sudo apt-get -y upgrade | |
################ | |
# general system |
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/bash | |
############################################################################## | |
# findstr | |
# | |
# Search for files containing a specified string. Show the file path, | |
# line number, and the line itself containing a specified string. | |
# | |
# EXAMPLE: | |
# | |
# To search for all the files with the file extension .html containing |
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
#!/usr/bin/env python2.7 | |
# -*- coding: utf-8 -*- | |
"""An example of A/B test using the chi-squared test for independence.""" | |
import numpy as np | |
import pandas as pd | |
from scipy.stats import chi2_contingency | |
def main(): | |
data = pd.io.parsers.read_csv('n10000.csv') |
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
#!/usr/bin/env python2.7 | |
# -*- coding: utf-8 -*- | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from scipy.stats import chi2 | |
def main(): | |
colors = 'bgrcmyk' | |
n = 40000 |
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
#!/usr/bin/env python2.7 | |
# -*- coding: utf-8 -*- | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from numpy.linalg import svd | |
class CA(object): | |
"""Simple corresondence analysis. | |
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
#!/usr/bin/env python2.7 | |
# -*- coding: utf-8 -*- | |
"""Biplot example using pcasvd from statsmodels and matplotlib. | |
This is an example of how a biplot (like that in R) can be produced | |
using pcasvd and matplotlib. Additionally, this example does k-means | |
clustering and color observations by which cluster they belong to. | |
""" | |
import matplotlib.pyplot as plt |
NewerOlder