d3js Multiline chart with brushing and mouseover
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
import boto | |
#type that you want to get pricing on | |
MY_TYPE = u'm1.small' | |
ec2 = boto.connect_ec2() | |
spots = ec2.get_spot_price_history(instance_type= MY_TYPE) | |
spot_prices = [i.price for i in spots] |
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
import os | |
import boto.ec2.connection as boto | |
AWS_ACCESS_KEY = os.getenv('AWS_ACCESS_KEY') | |
AWS_SECRET_KEY = os.getenv('AWS_SECRET_KEY') | |
conn = boto.EC2Connection(aws_access_key_id=AWS_ACCESS_KEY, aws_secret_access_key=AWS_SECRET_KEY) | |
results = conn.get_spot_price_history( instance_type='cg1.4xlarge', product_description='Linux/UNIX') | |
for r in results: |
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
import boto, datetime, time | |
# Enter your AWS credentials | |
aws_key = "YOUR_AWS_KEY" | |
aws_secret = "YOUR_AWS_SECRET" | |
# Details of instance & time range you want to find spot prices for | |
instanceType = 'm1.xlarge' | |
startTime = '2012-07-01T21:14:45.000Z' | |
endTime = '2012-07-30T23:14:45.000Z' |
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
# Protodash | |
class Instance(Resource): | |
resource_type = "instance" | |
metric_resource_type = resource_type | |
api_key = "instances" | |
id_key = "instance_id" | |
metric_id_key = "instance" #our resource ids are chaos | |
metric_column = "InstanceMetric" |
After provisioning an EC2 instance and opening up HTTP traffic, here are the commands I ran via ssh:
sudo yum install httpd
sudo apachectl start
sudo yum install R
which R
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 | |
SNAPID="SNAP" | |
BACKUPDBID="TEMPDB" | |
#config groups | |
SECURITYGROUP="Mysecgrup" | |
PARAMSGROUP="Myparamsgrup" | |
#rds verifying commands |
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
import luigi | |
import os | |
#from WorkflowUtils import WorkflowUtils | |
import logging as log | |
class ATask(luigi.Task): | |
# Task parameters | |
dataset_name = luigi.Parameter() | |
upstream_task = luigi.Parameter() |
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
import luigi | |
import tempfile | |
import datetime | |
from luigi.contrib import rdbms | |
from lib.luigi import logger | |
from luigi.postgres import MultiReplacer | |
try: | |
import MySQLdb |
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
//stops all files in root directory from being tracked in git | |
git rm --cached . -r | |
//if you need to modify .gitignore, or create it again because it disappeared, do it before the next command | |
//tracks all files except those in .gitignore | |
git add . | |
//commit | |
git commit -m 'commit message' |
OlderNewer