Skip to content

Instantly share code, notes, and snippets.

@seantalts
seantalts / covid_party_risk.Rmd
Last active August 12, 2020 21:40
Covid Party Risk - 10,000 Parties Edition
---
title: "Covid Party Risk - 10,000 Parties Edition"
author: "Sean Talts"
date: "8/1/2020"
output: html_document
runtime: shiny
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
// Code generated by %%NAME%% %%VERSION%%
#include <stan/model/model_header.hpp>
namespace hepatitis_model_namespace {
using stan::io::dump;
using stan::math::lgamma;
using stan::model::assign;
using stan::model::cons_list;
using stan::model::index_max;
// Code generated by Stan version 2.19.1
#include <stan/model/model_header.hpp>
namespace hepatitis_model_namespace {
using std::istream;
using std::string;
using std::stringstream;
using std::vector;
// Code generated by Stan version 2.19.1
#include <stan/model/model_header.hpp>
namespace low_dim_gauss_mix_model_namespace {
using std::istream;
using std::string;
using std::stringstream;
using std::vector;
// Code generated by stanc3 version 0.0.1
#include <stan/model/model_header.hpp>
namespace low_dim_gauss_mix_model_namespace {
using stan::io::dump;
using stan::math::lgamma;
using stan::model::prob_grad;
using std::istream;
using std::string;
using std::stringstream;
#include <iostream>
#include <algorithm>
#include <iterator>
#include <array>
// #ifdef __APPLE__
// #include <OpenCL/cl.hpp>
// #else
#include <CL/cl.hpp>
// #endif
// Code generated by Stan version 2.18.1
#include <stan/model/model_header.hpp>
namespace gentest_mother1_model_namespace {
using std::istream;
using std::string;
using std::stringstream;
using std::vector;
@seantalts
seantalts / mother.stan
Created March 19, 2019 09:42
mitzi's mother model
// gen_test_mother1
// tests functions from current impelmentation:
// generate_functions(prog.function_decl_defs_, o);
// generate_member_var_decls_all(prog, o);
// generate_constructor(prog, model_name, o);
// generate_transform_inits_method(prog.parameter_decl_, o);
functions {
int foo(int n);
let ufb =
Core_kernel.Option.map ~f:(List.map semantic_check_statement) fb
in
(* Check that all declared functions have a definition *)
let _ =
if
Symbol_table.check_some_id_is_unassigned vm
&& !check_that_all_functions_have_definition
then
semantic_error
@seantalts
seantalts / out.txt
Last active November 26, 2018 14:45
corebuild -package menhirLib -use-menhir -menhir "menhir --table" -I src src/stan/stan.native
ocamlfind ocamldep -package menhirLib -package core -ppx 'ppx-jane -as-ppx' -modules src/stan/stan.ml > src/stan/stan.ml.depends
ocamlfind ocamldep -package menhirLib -package core -ppx 'ppx-jane -as-ppx' -modules src/stan/debug.ml > src/stan/debug.ml.depends
ocamlfind ocamldep -package menhirLib -package core -ppx 'ppx-jane -as-ppx' -modules src/stan/ast.ml > src/stan/ast.ml.depends
ocamlfind ocamldep -package menhirLib -package core -ppx 'ppx-jane -as-ppx' -modules src/stan/errors.mli > src/stan/errors.mli.depends
ocamlfind ocamlc -c -w A-4-33-40-41-42-43-34-44 -strict-sequence -g -bin-annot -short-paths -thread -package menhirLib -package core -ppx 'ppx-jane -as-ppx' -I src/stan -I src -o src/stan/errors.cmi src/stan/errors.mli
ocamlfind ocamldep -package menhirLib -package core -ppx 'ppx-jane -as-ppx' -modules src/stan/pretty_printing.ml > src/stan/pretty_printing.ml.depends
ocamlfind ocamlc -c -w A-4-33-40-41