Skip to content

Instantly share code, notes, and snippets.

View carbocation's full-sized avatar

James Pirruccello carbocation

View GitHub Profile
@carbocation
carbocation / pelican-high.svg
Created December 22, 2024 16:29
the result of feeding a modification of simonw's pelican prompt to o1 pro
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@carbocation
carbocation / auroc_from_r2.R
Last active September 16, 2025 04:07
Compute expected AUROC from R^2
#' Compute expected AUROC from R^2 under the liability-threshold model
#'
#' This function implements the closed-form approximation for AUROC given the
#' proportion of variance explained (R^2) on the liability scale and the disease
#' prevalence p. It attempts to follow the liability-threshold/binormal ROC
#' derivation of Wray et al. (2010), *The Genetic Interpretation of Area under
#' the ROC Curve in Genomic Profiling* (PLoS Genetics 6(2): e1000864).
#'
#' In their notation, h2_L (heritability on the liability scale) plays the same
#' mathematical role as the input R^2 here: the variance explained in the latent
@carbocation
carbocation / openfoam.md
Last active May 23, 2026 21:55
Installing OpenFOAM on Apple Silicon macOS without docker

Native OpenFOAM v2512 On Apple Silicon macOS

This guide describes how to compile OpenFOAM v2512 natively on Apple Silicon macOS without Docker. The build described here produced native arm64 OpenFOAM binaries using Homebrew GCC and OpenMPI.

Overview

The main macOS-specific issue is that OpenFOAM should be built on a case-sensitive filesystem. The default macOS APFS volume is normally case-insensitive, which can cause include collisions such as OpenFOAM's wchar.H versus the system wchar.h.

The approach is: