title: CS 519 Exercise 1 author: Michael Cohen date: 4/14/2018
fontsize: 12pt margin-left: 60pt margin-right: 60pt margin-bottom: 30pt margin-top: 20pt
9 1 0 0 0 10.546 | |
11 0 0 0 0 34.943 | |
13 0 0 0 1 2.834 | |
15 0 0 0 1 17.532 | |
33 1 0 0 0 1.418 | |
36 0 0 0 0 48.033 | |
43 2 0 0 0 16.706 | |
47 0 0 0 0 24.999 | |
50 0 0 0 0 24.999 | |
56 0 1 0 0 3.869 |
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stderr", | |
"output_type": "stream", |
1 189 0 189 0 0 1 1 1 1 1 0 100 169 39 34 | |
2 287 0 287 0 0 1 1 2 2 1 0 90 149.5 15 34 | |
3 242 0 242 0 1 2 0 1 1 1 1 100 23.5 9 20 | |
4 199 0 199 0 0 1 1 1 1 1 0 90 46 53 48 | |
5 286 0 286 0 1 2 0 1 1 3 0 90 10 12 46 |
import re | |
import PyPDF2 | |
from collections import defaultdict | |
import matplotlib.pyplot as plt | |
import warnings | |
import seaborn as sns | |
sns.set() | |
warnings.filterwarnings('ignore') |
title: CS 519 Exercise 1 author: Michael Cohen date: 4/14/2018
fontsize: 12pt margin-left: 60pt margin-right: 60pt margin-bottom: 30pt margin-top: 20pt
from collections import Counter, defaultdict | |
from pandas import DataFrame, Series | |
import json | |
import seaborn | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from matplotlib.ticker import FuncFormatter, MaxNLocator | |
from sklearn.linear_model import LinearRegression | |
from sklearn.preprocessing import PolynomialFeatures |
library(ggplot2) | |
observations <- 5 | |
mu = 10 | |
trials <- 100 | |
confidence.interval <- function(threshold = .975, variance = 4) { | |
x <- rnorm(observations, mean = mu, sd = sqrt(variance)) | |
df <- length(x) - 1 | |
SE <- sd(x) / sqrt(length(x)) |
import websocket # pip install websocket_client | |
import _thread | |
import json | |
def main(): | |
def on_open(ws): | |
def run(*args): | |
msg = { | |
'type': 'subscribe', | |
'product_ids': ['ETH-USD'] |
import hmac, hashlib, locale, math, time, requests, base64 | |
from requests.auth import AuthBase | |
class CoinbaseExchangeAuth(AuthBase): | |
def __init__(self, api_key, secret_key, passphrase): | |
self.api_key = api_key | |
self.secret_key = secret_key | |
self.passphrase = passphrase |
library(dplyr) | |
library(readr) | |
library(reshape2) | |
library(stringr) | |
library(ggplot2) | |
library(pdftools) | |
setwd('/Users/mcohen/Downloads/Scratch/codeplay/R/motogp/lap_times') | |