Skip to content

Instantly share code, notes, and snippets.

@WardBrian
WardBrian / genealogyOfPL30KFtEdition.md
Created April 20, 2026 13:57
The Genealogy of Programming Languages (30K Ft Edition) by Robert Muller

The Genealogy of Programming Languages (30K Ft Edition)

Bob Muller — Jan. 2020

1600                                                   Symbolic Algebra

...                                                         |
                                                                           Set Theory
1879                                                   Symbolic Logic
@WardBrian
WardBrian / doll.py
Created February 12, 2026 17:17
jax models in objects and functions
"""
The "doll house" interface focuses trying to give you
everything you might need wrapped up nicely. It is built on
the "lego" interface.
"""
from lego import constrain, init_random, unconstrain
@WardBrian
WardBrian / linear_regression.py
Last active January 20, 2026 19:54
functional-style jax models (take 3)
from jax import random, jit
import jax.numpy as jnp
from jax.scipy import stats
from util import (
ravelize_function,
make_log_density,
constrain,
positive,
real,
@WardBrian
WardBrian / BoostUT.cmake
Last active September 22, 2025 03:49
CTest registration for Boost.UT. License: BSD-3-Clause
FetchContent_Declare(boost_ut
GIT_REPOSITORY https://github.com/boost-ext/ut.git
GIT_TAG v2.3.1)
FetchContent_MakeAvailable(boost_ut)
# link this object to your test executable, then call discover_boost_ut_test() on it
add_library(boost_ut_runner OBJECT test_runner.cpp)
target_link_libraries(boost_ut_runner PUBLIC Boost::ut)
@WardBrian
WardBrian / data.json
Created July 22, 2025 14:05
Multimodal model with a neat coding style
{
"D": 2,
"r": 2.5,
"p": 0.6666666666666666
}
@WardBrian
WardBrian / ge_ac.lircd.conf
Last active November 5, 2025 17:16
lirc remotes
# based on tutorial from https://www.cnx-software.com/2017/03/12/how-to-control-your-air-conditioner-with-raspberry-pi-board-and-anavi-infrared-phat/
begin remote
name ge_ac
flags RAW_CODES
eps 30
aeps 100
ptrail 0
let style_of_string : string -> Fmt.style option = function
| "b" | "bold" -> Some `Bold
| "i" -> Some `Italic
| "u" -> Some `Underline
| "f" | "faint" -> Some `Faint
| "r" | "reset" -> Some `None
| "reverse" -> Some `Reverse
| "black" -> Some (`Fg `Black)
| "cyan" -> Some (`Fg `Cyan)
| "green" -> Some (`Fg `Green)
@WardBrian
WardBrian / analysis.R
Last active December 2, 2025 15:45
Lotka-Volterra
# code adapted from https://github.com/stan-dev/example-models/blob/master/knitr/lotka-volterra/lotka-volterra-predator-prey.Rmd
library(posterior)
library(reshape2)
library(ggplot2)
lynx_hare_df <-
read.csv("https://raw.githubusercontent.com/stan-dev/example-models/refs/heads/master/knitr/lotka-volterra/hudson-bay-lynx-hare.csv",
comment.char="#")
@WardBrian
WardBrian / linear_regression.py
Last active February 6, 2026 05:31
functional-style jax models (take 2)
from jax import random, jit
import jax.numpy as jnp
from jax.scipy import stats
from util import ravelize_function, make_log_density
__all__ = ["log_density", "log_density_vec", "init_draw_zero"]
def constrain_parameters(sigma_unc, alpha, beta):
@WardBrian
WardBrian / analysis.R
Last active June 11, 2026 16:22
Disease Transmission
# posterior predictive check using the pred_cases generated quantity
install.packages("bayesplot")
library(posterior)
library(ggplot2)
# load from data
d <- jsonlite::read_json('./data.json')
cases <- unlist(d$cases)
n_days <- d$n_days