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.
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
# disable visual plots | |
import matplotlib | |
matplotlib.use("Agg") | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import pystan | |
from scipy.stats.distributions import cauchy, norm, t as student_t | |
import arviz as az | |
import pickle | |
import gzip |
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 os | |
import sys | |
import threading | |
import pystan | |
import logging | |
# silence logger, there are better ways to do this | |
# see PyStan docs | |
logging.getLogger("pystan").propagate=False | |
def drain_pipe(captured_stdout, stdout_pipe): |
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
# Running times | |
[success] 13.95% test_stan_file_io.TestStanFileIO.test_stan_model_from_file: 80.9590s | |
[success] 13.32% test_pickle.TestPickle.test_model_unique_names: 77.2730s | |
[success] 8.18% test_extra_compile_args.TestExtraCompileArgs.test_extra_compile_args: 47.4787s | |
[success] 7.81% test_chains.TestRhatZero.test_rhat_zero: 45.3319s | |
[success] 7.09% test_pickle.TestPickle.test_pickle_model_and_reload: 41.1400s | |
[success] 6.97% test_rstan_getting_started.TestRStanGettingStarted.test_stan_file: 40.4583s | |
[success] 6.93% test_rstan_stan_args.TestPyStanArgs.test_stan_args_basic: 40.1854s | |
[success] 6.87% test_pickle.TestPickle.test_pickle_fit: 39.8326s |
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 datetime import datetime | |
def hetu(date, gender): | |
""" | |
hetu(date, gender) | |
Parameters | |
---------- | |
date : datetime.datetime object | |
gender : str {'male', 'female'} |
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.
NewerOlder