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 | |
import matplotlib.pyplot as plt | |
from sklearn.neighbors import NearestNeighbors | |
x1 = np.genfromtxt("class1.csv", delimiter = ",") | |
x2 = np.genfromtxt("class2.csv", delimiter = ",") | |
x3 = np.genfromtxt("class3.csv", delimiter = ",") | |
y1 = np.zerosimport numpy as np | |
import matplotlib.pyplot as plt |
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 | |
import matplotlib.pyplot as plt | |
from sklearn import cluster | |
x1 = np.genfromtxt("class1.csv", delimiter = ",") | |
x2 = np.genfromtxt("class2.csv", delimiter = ",") | |
x3 = np.genfromtxt("class3.csv", delimiter = ",") | |
y1 = np.zeros(x1.shape[0]) | |
y2 = np.ones(x2.shape[0]) |
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 | |
import matplotlib.pyplot as plt | |
from sklearn import cluster | |
x1 = np.genfromtxt("class1.csv", delimiter = ",") | |
x2 = np.genfromtxt("class2.csv", delimiter = ",") | |
x3 = np.genfromtxt("class3.csv", delimiter = ",") | |
y1 = np.zeros(x1.shape[0]) | |
y2 = np.ones(x2.shape[0]) |
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 4 columns, instead of 5 in line 1.
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
"Murder","Assault","UrbanPop","Rape" | |
Alabama,13.2,236,58,21.2 | |
Alaska,10,263,48,44.5 | |
Arizona,8.1,294,80,31 | |
Arkansas,8.8,190,50,19.5 | |
California,9,276,91,40.6 | |
Colorado,7.9,204,78,38.7 | |
Connecticut,3.3,110,77,11.1 | |
Delaware,5.9,238,72,15.8 | |
Florida,15.4,335,80,31.9 |
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
{ | |
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Description" : "AWS CloudFormation Template: This template installs a single-instance with dev environment for elastic beanstalk as well as Jenkins server. This template creates an Amazon EC2 instance. You will be billed for the AWS resources used if you create a stack from this template.", | |
"Parameters" : { | |
"EC2Tag" : { | |
"Description" : "EC2 tag name", | |
"Type" : "String" | |
}, |
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 | |
export AWS_ACCESS_KEY_ID=YOURAWSKEYHERE | |
export AWS_SECRET_ACCESS_KEY=YOURAWSSECRETACCESSKEYHERE | |
HOSTNAME=`curl http://169.254.169.254/latest/meta-data/public-hostname` | |
TTL=60 | |
R53CMD=/usr/bin/route53 | |
ZONEID=Z1SP2Z8BRPBI0E | |
CNAME=host.domain.com. |
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 python | |
from boto.vpc import VPCConnection | |
from boto.ec2 import get_region | |
EC2_REGION='ap-northeast-1' | |
VPC_CIDR='10.99.0.0/16' | |
PUBLIC_CIDR='10.99.0.0/24' | |
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 python | |
from boto.vpc import VPCConnection | |
from boto.ec2 import get_region, connect_to_region | |
import baker | |
import time | |
def create_vpc(region, vpc_cidr): | |
ec2region = get_region(region) | |
conn = VPCConnection(region=ec2region) | |
return conn.create_vpc(vpc_cidr) |
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
from fabric.api import run, env, sudo | |
from fabric.context_managers import cd | |
def check(): | |
for k in env: | |
print k, env[k] | |
def install_httpd(): | |
sudo("yum -y install httpd") |
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 | |
sudo yum -y install emacs git gcc make python-devel | |
curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | sudo python | |
sudo pip install virtualenvwrapper | |
. virtualenvwrapper.sh | |
mkvirtualenv bootcamp |