This file contains hidden or 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 quandl | |
import pandas as pd | |
from sqlalchemy import create_engine | |
# Link to list of symbols | |
https://www.quandl.com/data/SCF-Continuous-Futures/documentation/documentation | |
# Sign up at Quandl.com to get Auth Token | |
token = 'your auth token from quandl.com' |
This file contains hidden or 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
# Gist example of IB wrapper ... | |
# | |
# Download API from http://interactivebrokers.github.io/# | |
# | |
# Install python API code /IBJts/source/pythonclient $ python3 setup.py install | |
# | |
# Note: The test cases, and the documentation refer to a python package called IBApi, | |
# but the actual package is called ibapi. Go figure. | |
# | |
# Get the latest version of the gateway: |
This file contains hidden or 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 random | |
import pandas | |
from sklearn.cross_validation import train_test_split | |
from sklearn.linear_model import LogisticRegression | |
from sklearn.metrics import accuracy_score | |
from sklearn.preprocessing import LabelEncoder | |
from sklearn.utils import check_array | |
import tensorflow as tf |
This file contains hidden or 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
'''A python script to export the raw data from mailchimp lists and campaigns. | |
The output of this script will be a CSV file with the open and click rates for each campaign | |
and each list member (identified by an email.) You can use this data for further analysis | |
as seen here: | |
http://www.silota.com/docs/recipes/sql-email-customer-list-segmentation-lead-scoring.html | |
Written by Ganesh, 2017. | |
''' | |
import requests |
This file contains hidden or 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
# Example from "Statistics is Easy" by Dennis Shasha and Manda Wilson | |
from statistics import mean | |
from random import shuffle | |
drug = [54, 73, 53, 70, 73, 68, 52, 65, 65] | |
placebo = [54, 51, 58, 44, 55, 52, 42, 47, 58, 46] | |
observed_diff = mean(drug) - mean(placebo) | |
n = 10000 | |
count = 0 |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |