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
library(matlib) | |
gamma <- 2 | |
rho11 <- 1.15 | |
rho22 <- 0.05 | |
mu1 <- 0.3 | |
r <- 0.05 | |
delta <- 0.05 | |
x <- rnorm(1000000) |
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
https://twitter.com/g_leech_/status/1728731355029393447?t=VN50RyPqwWFfcC63tMP_ng&s=19 | |
https://twitter.com/g_leech_/status/1723630099507871780?t=YFYUi0eNkkLXOzzmbMtoGA&s=19 | |
https://twitter.com/g_leech_/status/1623044128190697483 | |
https://twitter.com/g_leech_/status/1639725932448456705 | |
https://twitter.com/g_leech_/status/1630276985963556865 | |
https://twitter.com/g_leech_/status/1622321776595189765 | |
https://twitter.com/g_leech_/status/1668960035068694533 | |
https://twitter.com/g_leech_/status/1715654603973312949 | |
https://twitter.com/g_leech_/status/1713930232632135986 | |
https://twitter.com/g_leech_/status/1711441986878644597 |
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 gjp | |
# https://github.com/niplav/iqisa/blob/master/iqisa.py | |
import iqisa as iqs | |
import matplotlib.pyplot as plt | |
df=gjp.load_markets() | |
df["isCorrect"] = (df.outcome == df.answer_option).astype(float) | |
fig = plt.figure(figsize=(9, 9)) |
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.
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
# You can get your own copy of the MCMC trace: https://github.com/g-leech/masks_v_mandates#run | |
# but I've included the quantiles in this script for reproducibility. | |
import numpy as np | |
sns.set_style("whitegrid") | |
def exp_reduction(a, x): | |
reductions = 1 - np.exp((-1.0) * a * x) | |
return reductions.mean() |
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 | |
# impossible 0 | |
# v unlik 10 | |
# unlik 25 | |
# lik 75 | |
# vv likely 99.5 | |
preds = [ | |
[0, 1], | |
[0.75, 1], |
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
#!/usr/bin/env python | |
# coding: utf-8 | |
# ## Excess COVID-19 mortality vs reported deaths over time | |
# | |
# split bar? | |
# | |
# y-axis: deaths | |
# x-axis: time | |
# |
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
def handle_utterance_str(text) : | |
if text[0] != "'" and text[0] != '"' : | |
text = f'"{text}"' | |
text = text.replace('"', '\"') | |
text = text.replace("'", '\"') | |
return "handle_utterance(1,{},Output)".format(text) | |
def escape_and_call_prolexa(text) : | |
libPrefix = "prolexa:" |
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
#%tensorflow_version 2.x | |
import pandas as pd | |
import numpy as np | |
import re | |
from nltk import word_tokenize | |
from nltk.stem import WordNetLemmatizer | |
from scipy.sparse import hstack | |
from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer |
NewerOlder