This file contains 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 numpy as np | |
import pandas as pd | |
import datetime as dt | |
from sklearn.datasets import make_classification | |
def create_price_data(start_price: float = 1000.00, mu: float = .0, var: float = 1.0, n_samples: int = 1000000): | |
i = np.random.normal(mu, var, n_samples) | |
df0 = pd.date_range(periods=n_samples, freq=pd.tseries.offsets.Minute(), end=dt.datetime.today()) |
This file contains 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
from __future__ import division | |
from numpy.fft import rfft | |
from numpy import argmax, mean, diff, log, nonzero | |
from scipy.signal import blackmanharris, correlate | |
from time import time | |
import sys | |
try: | |
import soundfile as sf | |
except ImportError: | |
from scikits.audiolab import flacread |