Skip to content

Instantly share code, notes, and snippets.

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
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
@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
@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 / 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

#!/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'
####################################################################################################################
# Name : DATACLEANING S&P
# Author : Nikos Rachmanis
# Version : 1.0
# Copyright : Your copyright notice
# Description : Data cleaning and merging
####################################################################################################################
####################################################################################################################
### Libraries + Settings ###########################################################################################
@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];
@markcheno
markcheno / golang_job_queue.md
Created May 26, 2016 14:13 — forked from harlow/golang_job_queue.md
Job queues in Golang
@markcheno
markcheno / fix-wordpress-permissions.sh
Created July 27, 2016 02:17 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory