Skip to content

Instantly share code, notes, and snippets.

@dimi-tree
dimi-tree / 0_reuse_code.js
Last active August 29, 2015 14:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
import pandas as pd
df = pd.read_csv(
'http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data',
names = ['sepal length (cm)', 'sepal width (cm)', 'petal length (cm)', 'petal width (cm)', 'class']
)
# store feature matrix in "X"
X = df.drop('class', axis=1).values
levels = {'Iris-setosa': 0, 'Iris-versicolor': 1, 'Iris-virginica':2}
@dimi-tree
dimi-tree / 01-02.py
Last active February 2, 2022 20:41
Udacity: Machine Learning for Trading
# Working with multiple stocks
"""
SPY is used for reference - it's the market
Normalize by the first day's price to plot on "equal footing"
"""
import os
import pandas as pd
import matplotlib.pyplot as plt
@dimi-tree
dimi-tree / vim.md
Last active July 25, 2016 09:48
vim