Skip to content

Instantly share code, notes, and snippets.

#Set up data partition
sudo mkdir /data
sudo chmod 777 /data
sudo "echo /dev/xvdb /data ext4 rw,user,exec,comment=cloudconfig 0 2 >> /etc/fstab"
sudo mount /data
#Install build environment
sudo sed -i "s/enabled=0/enabled=1" /etc/yum.repos.d/epel.epo
sudo yum -y update
sudo yum -y upgrade
##### Install a lot of stuff first #####
$sudo apt-get update
##install python
$ wget http://09c8d0b2229f813c1b93-c95ac804525aac4b6dba79b00b39d1d3.r79.cf1.rackcdn.com/Anaconda-2.0.1-Linux-x86_64.sh
$ sudo bash anaconda........sh
##install necessary libs
$ sudo apt-get install -y python-matplotlib python-tornado ipython ipython-notebook python-setuptools python-pip
#!/usr/bin/env python
"""
simple example script for running notebooks and reporting exceptions.
Usage: `checkipnb.py foo.ipynb [bar.ipynb [...]]`
Each cell is submitted to the kernel, and checked for errors.
"""
import os,sys,time
@sglyon
sglyon / knitr.mk
Created March 15, 2014 23:59 — forked from halpo/knitr.mk
################################################################################
# Copyright 2011
# Andrew Redd
# 11/23/2011
#
# Description of File:
# Makefile for knitr compiling
#
################################################################################
all:pdf # default rule DO NOT EDIT
############################################################
## Using Genetic Algorithms in Quantitative Trading
##
## thertrader@gmail.com - Mar 2014
############################################################
library(PerformanceAnalytics)
library(rgenoud)
library(quantmod)
library(TTR)
from bs4 import BeautifulSoup
from urllib2 import urlopen
from datetime import datetime, timedelta
from time import sleep
import sys
import csv
# CONSTANTS
ESPN_URL = "http://scores.espn.go.com"
# Repeat an operation n times, e.g.
# @dotimes 100 println("hi")
macro dotimes(n, body)
quote
for i = 1:$(esc(n))
$(esc(body))
end
end
end