Skip to content

Instantly share code, notes, and snippets.

@adamarbour
adamarbour / lenovo-z13-voidlinux-install.md
Last active June 17, 2024 23:55
Lenovo z13 Void Linux Field Notes

Void Linux Field Notes (Lenovo z13 Edition)

This contains the notes from my installation of Void Linux onto my Lenovo z13 (gen1) laptop1 with the following specs:

  • AMD Ryzen™ 7 PRO 6860Z
  • 13.3" 2.8K (2880 x 1800) OLED
  • 32 GB LPDDR5 6400MHz
  • Integrated AMD Radeon™ 680M Graphic
  • WiFi 6E 802.11AX
  • WWAN Fibocom L860-GL-16 4G CAT16

Footnotes

  1. https://download.lenovo.com/pccbbs/mobiles_pdf/z13_z16_gen1_hmm_en.pdf

@rmcelreath
rmcelreath / prior_likelihood_conflict.r
Created September 11, 2023 11:29
Demonstration of how normal and student-t distributions interact in Bayesian updating
# prior - likelihood conflict
library(rethinking)
yobs <- 0
mtt <- ulam(
alist(
y ~ dstudent(2,mu,1),
mu ~ dstudent(2,10,1)
@rmcelreath
rmcelreath / p_under_null.r
Created July 7, 2023 14:24
distribution of pvalues under null for t.test and binomial models
# distribution of null p-values in binomial glm
library(rethinking)
# t test
# pval has uniform distribution under null
f <- function(N=10) {
y1 <- rnorm(N)
y2 <- rnorm(N)
@Especuloide
Especuloide / Circular_Waves_Code.py
Created October 14, 2022 10:56
Semi-Circular Waves
import numpy as np
import matplotlib.animation as animation
from matplotlib import pyplot
hr = 1000
vr = 1000
fig, g = pyplot.subplots(figsize=(hr/100,vr/100))
pyplot.subplots_adjust(top = 0.979, left = 0.024, right = 0.972, bottom = 0.039)
@pythoninthegrass
pythoninthegrass / starship.toml
Last active May 19, 2024 07:09
Starship prompt setup
# SOURCES
# https://starship.rs/config
# https://starship.rs/presets/nerd-font.html#configuration
# DEBUG via:
# starship explain
# STARSHIP_LOG=trace
"$schema" = 'https://starship.rs/config-schema.json'
@twiecki
twiecki / GLM-hierarchical-jax.ipynb
Last active September 7, 2022 23:21
notebooks/GLM-hierarchical.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@iiLaurens
iiLaurens / generate.py
Last active November 2, 2022 16:17
Blackjack Markov Decision Process generator for python MDPToolBox
import numpy as np
import pandas as pd
from itertools import product
from functools import reduce
ACTIONLIST = {
0: 'skip',
1: 'draw'
}
@ericyd
ericyd / main.rs
Created March 24, 2020 04:20
Flow field in rust
// Cargo.toml
// ===============
// [package]
// name = "flow-field-1"
// version = "0.1.0"
// authors = ["ericyd <eric@ericyd.com>"]
//
// [dependencies]
// nannou = "0.13"
//
@eveskew
eveskew / discrete_missingness_multiple_cats.R
Created December 4, 2018 20:12
Discrete missing values in Stan when the number of categories > 2
# Categorical missing data in Stan
# Demonstrated with three categories
# Code and ideas adapted from @rmcelreath
# https://gist.github.com/rmcelreath/9406643583a8c99304e459e644762f82
# Code and ideas discussed with @dmontecino
# https://gist.github.com/dmontecino/b804853e4b36a57990a7108a35201cf5
@AustinRochford
AustinRochford / bayes_param_survival_pymc3.ipynb
Last active November 1, 2021 10:46
Bayesian Parametric Survival Analysis with PyMC3
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.