Skip to content

Instantly share code, notes, and snippets.

View sbfnk's full-sized avatar

Sebastian Funk sbfnk

View GitHub Profile
# Updated from https://gist.github.com/pkazmier to support yabai
#
# The following configuration heavily leverages modal keymaps to minimize the
# pollution of global keybindings. In addition, the modal keymaps facilitate
# the consistent use of the same keybindings across different modes. For
# example, this configuration uses 'h', 'l', 'j', and 'k' to represent west,
# east, south, and north when: changing focus, warping windows, resizing
# windows, swapping windows, and moving floating windows. Those four keys are
# mapped differently depending on the current mode to provide a consistent user
# experience.
@sbfnk
sbfnk / interveral-censored-right-truncated-distribution-estimation-with-brms.R
Last active October 26, 2022 15:41 — forked from seabbs/interveral-censored-right-truncated-distribution-estimation-with-brms.R
This gist shows how to estimate a doubly censored (i.e daily data) and right truncated (i.e due to epidemic phase) distribution using the brms package.
# Load packages
library(brms)
library(cmdstanr)
library(data.table) # here we use the development version of data.table install it with data.table::update_dev_pkg
library(purrr)
library(bpmodels) # devtools::install_github("sbfnk/bpmodels")
# Set up parallel cores
options(mc.cores = 4)