Skip to content

Instantly share code, notes, and snippets.

Avatar

Abraham Flaxman aflaxman

View GitHub Profile
View 2022_01_29b_vaccine_and_infection_correlation_replication.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View numpyro_abc_kernel.py
import numpy as np, pandas as pd, matplotlib.pyplot as plt
from collections import namedtuple
from jax import random, lax
from jax.flatten_util import ravel_pytree
import jax.numpy as jnp
import numpyro
import numpyro.distributions as dist
from numpyro.infer import MCMC, util, init_to_sample
from numpyro.infer.mcmc import MCMCKernel
View numpyro_metropolis_kernel_2.py
from collections import namedtuple
from jax import random
from jax.flatten_util import ravel_pytree
import jax.numpy as jnp
import numpyro
import numpyro.distributions as dist
from numpyro.infer import MCMC, util
from numpyro.infer.mcmc import MCMCKernel
MetState = namedtuple("MetState", ["z", "rng_key"])
View numpyro_metropolis_kernel.py
from collections import namedtuple
from jax import random
from jax.flatten_util import ravel_pytree
import jax.numpy as jnp
import numpyro
import numpyro.distributions as dist
from numpyro.infer import MCMC, util
from numpyro.infer.mcmc import MCMCKernel
MetState = namedtuple("MetState", ["z", "rng_key"]) # does it matter if it is called z or u?
View 2022_01_01a_numpyro_ab_testing_model.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View 2021_02_12a_ergm_for_households.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View 2020_11_12d_pymc_latent_scaled_poisson.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View 2020_11_11a_pymc_spline_example.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View 2020_05_07a_covid19_parametric_death_redistribution_for_nyc_discontinuity.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aflaxman
aflaxman / sdc_sources.csv
Created Apr 24, 2020
Government-mandated social distancing by location and date
View sdc_sources.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 15 columns, instead of 14. in line 1.
name,country,admin1,Mass gathering restrictions,Stay at Home Order,Educational facilities closed,Initial business closures,Non-essential services closed,Travel severely limited,Source Mass gathering restrictions,Source Stay at Home Order,Source Educational facilities closed,Source Initial business closure,Source Non-essential services closed,Source Travel severely limited
Baden-Wurttemberg,Germany,Baden-Wurttemberg,full implementation,21.03.2020,17.03.2020,full implementation,21.03.2020,not implemented,https://stm.baden-wuerttemberg.de/fileadmin/redaktion/dateien/PDF/Coronainfos/200322_Rechtsverordnung_englisch.pdf,https://stm.baden-wuerttemberg.de/fileadmin/redaktion/dateien/PDF/Coronainfos/200322_Rechtsverordnung_englisch.pdf,https://stm.baden-wuerttemberg.de/fileadmin/redaktion/dateien/PDF/200317_StM_VO_IfSG_Corona.pdf,https://stm.baden-wuerttemberg.de/fileadmin/redaktion/dateien/PDF/Coronainfos/200322_Rechtsverordnung_englisch.pdf,https://stm.baden-wuerttemberg.de/fileadmin/redaktion/dateien/PDF/Coronainf