Skip to content

Instantly share code, notes, and snippets.

@markcheno
markcheno / pippy.js
Last active August 29, 2015 14:20 — forked from adrianseeley/pippy.js
var request = require('request');
var sqlite3 = require('sqlite3').verbose();
var db = new sqlite3.Database('fx.db');
var heartbeat = 10000;
function parse_quote (str) {
var quote = [];
var lines = str.split('\n');
for (var line_idx = 0; line_idx < lines.length; line_idx++) {
var line = lines[line_idx];
####################################################################################################################
# Name : DATACLEANING S&P
# Author : Nikos Rachmanis
# Version : 1.0
# Copyright : Your copyright notice
# Description : Data cleaning and merging
####################################################################################################################
####################################################################################################################
### Libraries + Settings ###########################################################################################
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
@markcheno
markcheno / README.md
Last active August 29, 2015 14:07 — forked from chrisjacob/README.md

Intro

Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Author: Chris Jacob @_chrisjacob

Tutorial (Gist): https://gist.github.com/833223

The Result

@markcheno
markcheno / dvi.r
Last active August 29, 2015 14:06 — forked from ivannp/dvi.r
require(quantmod)
require(SIT)
dvi.indicator = function(prices) {
dvi = TTR:::DVI(prices)[,3]
indicator.long = ifelse(dvi <= 0.5, 1, 0)
indicator.short = ifelse(dvi > 0.5, -1, 0)
indicator = reclass(cbind(indicator.short + indicator.long), prices)
@markcheno
markcheno / dnn.py
Created August 10, 2014 17:35 — forked from syhw/dnn.py
"""
A deep neural network with or w/o dropout in one file.
"""
import numpy, theano, sys, math
from theano import tensor as T
from theano import shared
from theano.tensor.shared_randomstreams import RandomStreams
from collections import OrderedDict
import random, time, operator, math
from deap import base
from deap import creator
from deap import tools
from deap import gp
import cloud
import jsonrpclib
import operator
import numpy
from math import sqrt
from deap import gp
# Our dataset is 100 random arrays of 0s and 1s
# and the function we are trying to find is simply
# Mostly stolen from deap's symbreg GP example
import operator
import math
import random
import string
import inspect
import ctypes
import numpy
from scipy import optimize
import operator
import math
import random
import struct
import numpy
from deap import algorithms
from deap import base
from deap import creator