Column Name | Description |
---|---|
mc | Sim Number |
uid | Patient unique ID |
duration.stay.days | ? |
isolation.days | ? |
symptom.days | ? |
is.symptomatic | T/F if patient is symptomatic |
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
## Affan's reproduce | |
library(distributions3) | |
library(ggplot2) | |
library(tidyverse) | |
library(R.utils) | |
library(zoo) | |
library(tictoc) | |
#load("formatted_US_death_data.rds") |
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
rm(list = ls()) | |
library(nimble) | |
library(coda) # For manipulation of MCMC results. | |
library(mgcv) | |
library(ggplot2) | |
library(ggpubr) | |
#library(tidyverse) # not on the cluster | |
library(ggmcmc) |
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
function get_agedist(st) | |
grps = (0:4, 5:16, 17:49, 50:65, 66:99) | |
_data = CSV.File("sc-est2019.csv") |> DataFrame! | |
# select only the relevant columns | |
select!(_data, Not(8:17)) | |
# filter to include both male/female, state | |
filter!(r -> r[:SEX] == 0 && r[:NAME] == st && r[:AGE] <= 99, _data) | |
# calculate the the age groups | |
transform!(_data, :AGE => ByRow(x -> findfirst(grp -> x in grp, grps)) => :AGEGRP) |
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
julia> a = "test"; expr = "$a = zeros(Float64, 10)" # note the string is interpolated, easier to read | |
"test = zeros(Float64, 10)" | |
julia> julia_expr = Meta.parse(expr) | |
:(test = zeros(Float64, 10)) | |
julia> dump(julia_expr) # see the Abstract Syntax Tree of the expression (only for informational purposes) | |
Expr | |
head: Symbol = | |
args: Array{Any}((2,)) |
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
# Affan Shoukat | |
# Center for Infectious Disease Modelling and Analysis | |
# Yale University, Dec 2020 | |
# Repository: https://gist.github.com/affans/f529f8cd727989143c979afd9174b984 | |
module covid19ode | |
using OrdinaryDiffEq | |
using Parameters | |
using LinearAlgebra | |
using ForwardDiff | |
using ProgressMeter |
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
## push local working path for all code. | |
push!(LOAD_PATH, "$(homedir())/Documents/Repository") | |
## load packages | |
using BenchmarkTools | |
using Logging | |
# remove from production | |
logger = SimpleLogger(stdout, Logging.Debug) | |
global_logger(logger) | |
@info "Debug Logging is on for this session." |
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
using srun from command line | |
srun -J $jobname -n $np -o "job%4t.out" -D $exehome $(srunargs) $exename $exeflags $worker_arg | |
or sbatch script | |
#!/bin/sh | |
#SBATCH --partition=defq | |
#SBATCH --nodes=16 | |
#SBATCH --ntasks=512 |