Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 numpy as np | |
from scipy.stats import t, zscore | |
def grubbs(X, test='two-tailed', alpha=0.05): | |
''' | |
Performs Grubbs' test for outliers recursively until the null hypothesis is | |
true. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 numpy as np | |
import matplotlib.pyplot as plt | |
N = 100 | |
x = np.zeros(N) | |
x[50] = 1 | |
# compute the dct | |
X = np.zeros(N) | |
for k in range(N): |
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
""" | |
Computes the two dimensional discrete cosine transform, first over rows, than over columns | |
""" | |
import numpy as np | |
import matplotlib.pyplot as plt | |
# create input image | |
N1, N2 = 100, 100 | |
x = np.zeros((N1, N2)) |
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
from bokeh.plotting import figure, show | |
from bokeh.io import output_file | |
import numpy as np | |
import pandas as pd | |
output_file('n_filings.html') | |
# read the filing data | |
filings = pd.read_csv('filings.csv') |
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
CREATE DATABASE campaign_expenditures; | |
USE `campaign_expenditures`; | |
# create the filing table | |
CREATE TABLE filings ( | |
filing_id INT, | |
fec_committee_id VARCHAR(255), | |
committee_name VARCHAR(255), | |
PRIMARY KEY (filing_id) | |
); |
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 numpy as np | |
import pandas as pd | |
import time | |
N = int(1e7) | |
M = 100 | |
counter = 0 | |
df = pd.DataFrame({'y1': np.zeros(N)}) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.