Skip to content

Instantly share code, notes, and snippets.

@fawce
fawce / fetcher2dot0.md
Last active April 21, 2017 23:03
Draft documentation for Quantopian fetcher 2.0

Fetcher 2.0

Fetcher - Load any CSV file

Quantopian provides a 11-year history of US equity market data in minute and daily bars. The US market data provides a backbone for financial analysis, but some of the most promising areas of research are finding signals in non-market data. Fetcher provides your algorithm with access to external time series data. Any time series that can be retrieved as a csv file via http or https can be incorporated into a Quantopian algorithm.

Fetcher lets you load csv files over http. To use it, invoke fetch_csv(url) in your initialize method. fetch_csv will retrieve the text of the csv file using the (wonderful) requests module. The csv is parsed into a pandas dataframe using pandas.io.parsers.read_csv. You may then specify your own methods to modify the entire dataframe prior to the start of the simulation. During simulation, the rows of the csv/dataframe are streamed to your algorithm's handle_data method as additional properties of the data parameter.

Best of all, your F

@jbenet
jbenet / simple-git-branching-model.md
Last active July 21, 2025 21:02
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@aaronlifton3
aaronlifton3 / es.sh
Last active December 23, 2015 09:49 — forked from rajraj/es.sh
cd ~
sudo yum update
sudo yum install java-1.7.0-openjdk -y
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.5.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share
@phoenix24
phoenix24 / sample-cluster-client
Last active May 19, 2022 18:12
sample akka cluster client.
package spikes.cluster
import akka.actor._
import com.typesafe.config.ConfigFactory
import akka.contrib.pattern.{ClusterClient, ClusterReceptionistExtension}
object DemoMaster {
def main(args: Array[String]): Unit = {
import java.util.List;
import java.util.ArrayList;
/*
* Lexical analyzer for Scheme-like minilanguage:
* (define (foo x) (bar (baz x)))
*/
public class Lexer {
public static enum Type {
// This Scheme-like language has three token types:
type 'a monoid = {zero : 'a; plus : 'a -> 'a -> 'a}
let sum (m : 'a monoid) (l : 'a list) : 'a = List.fold_left m.plus m.zero l
let string_summer = sum {zero = ""; plus = (^)}
let int_summer = sum {zero = 0; plus = (+)}
@x1ddos
x1ddos / index.html
Last active December 18, 2015 17:59
AngularJS 1.1.5 + Google Closure Library (just a little) + Closure Compiler (obviously) experiment
<html ng-app="ng-demo-app">
<head>
<title>AngularJS simple app demo</title>
</head>
<body ng-controller="MainCtrl">
<input type="text" ng-model="name" ng-required>
<div>{{name}}</div>
<div ng-controller="ChildCtrl">
<input type="text" ng-model="salut">
<div>{{salutation}}</div>
@coder4web
coder4web / redis_install_centos.txt
Last active September 10, 2017 01:45
Redis install on CentOS 6.4
BTW yum has last Redis too, remi repository at least.
$ sudo -i
$ yum list redis
$ redis.x86_64 2.6.13-1.el6.remi remi
But today we want compile redis from source (see http://redis.io/download)
$ yum install make gcc tcl
$ cd /usr/local/src
class MyApp::Interface::NavigationBar
include ActionView::Helpers::UrlHelper
delegate :url_helpers, to: 'Rails.application.routes'
def initialize(template, current_user)
@template = template
@current_user = current_user
end
@freakhill
freakhill / list_comprehension.rb
Last active December 17, 2015 06:19
having fun with "haskell like list comprehension in ruby" - https://gist.github.com/andkerosine/3356675
#!/usr/bin/env ruby-head
class VeryBasicObject < BasicObject
undef :==
undef :!=
undef :!
end
class Captured < VeryBasicObject
def method_missing meth, *args