Skip to content

Instantly share code, notes, and snippets.

View goerz's full-sized avatar

Michael Goerz goerz

View GitHub Profile
@goerz
goerz / apsrev4-2-titles.bst
Last active May 30, 2026 15:58
Modified bibtex style based on apsrev4.2 that adds titles for journal articles
%%
%% This is file `apsrev4-2-titles.bst', and is a hand-edited version of apsrev4-2.bst.
%% Its only modification is that it will display titles for articles.
%% Unlike the "longbibliography" option recommended at
%% https://journals.aps.org/revtex/revtex-faq#Bibtex,
%% it does not write out the first names of all authors.
%% The feature of apsrev4.2 to add DOI links is preserved.
%%
%% Author: Michael Goerz <https://michaelgoerz.net>
%%
### A Pluto.jl notebook ###
# v0.20.21
using Markdown
using InteractiveUtils
# ╔═╡ 5a30164f-91f9-4ac5-acae-c2e57a05427c
begin
using StaticArrays: SVector
using LinearAlgebra: ⋅
@goerz
goerz / Elements of Statistical Learning.md
Last active November 6, 2025 11:56
PDF bookmarks for "Hastie, Tibshirani, Friedman - The Elements of Statistical Learning" (LaTeX)

This gist contains out.tex, a tex file that adds a PDF outline ("bookmarks") to the freely available pdf file of the book

The Elements of Statistical Learning (2nd ed), by Trevor Hastie, Robert Tibshirani, and Jerome Friedman

https://web.stanford.edu/~hastie/ElemStatLearn/

The bookmarks allow to navigate the contents of the book while reading it on a screen.

Usage

@goerz
goerz / juliamono.css
Created October 8, 2024 23:11
Specification of JuliaMono Font for Blink
@font-face {
font-family: "JuliaMono";
font-style: normal;
font-weight: 200;
font-feature-settings: "liga" 0, "calt" 0;
font-variant-ligatures: none;
src: url("https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.056/JuliaMono-Light.woff2");
}
@font-face {
font-family: "JuliaMono";
@goerz
goerz / light.js
Last active October 8, 2024 18:14
Light Color Scheme for Blink
black = '#000000';
red = '#B9211B';
green = '#429429#';
yellow = '#96942D';
blue = '#081B90';
magenta = '#8A2E90';
cyan = '#419295';
white = '#C7C7C7';
lightBlack = '#686868';
lightRed = '#ED776D';
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@goerz
goerz / check_inventory.jl
Created March 27, 2024 21:54
Testing an `objects.inv` inventory file in Julia
# Assumptions
#
# * current working directory is the root directory of the project ("DocInventories") in this case
# * the documentation for the project has been built locally in `docs/build/`
# * the documentation has also been deployed online and is available at the `root_url` hard-coded in the script. Otherwise, do not call `check_url`
# * running on Unix (otherwise: adjust that path separator)
using HTTP
using URIs
using DocInventories
@goerz
goerz / 3-level_mod.svg
Last active March 26, 2024 02:36
Three-Wave Mixing AutoDiff Example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@goerz
goerz / mwe.jl
Created March 20, 2024 21:24
Julia Parametrization MWE
# This MWE is to explore the use of RecursiveArrayTools for optimizing
# parameters for control functions.
#
# We want two things:
#
# * Extract control parameters that might occur in a set of Hamiltonians, each
# Hamiltonian containing multiple controls, and each control containing an
# AbstractVector of parameters (a ComponentArray seems very useful, but it
# could be any AbstractVector). This should be done with a function
# `get_parameters()` that collects all control parameters in a
using Pkg
Pkg.activate(temp=true)
Pkg.add("MarkdownAST")
import MarkdownAST
"""
replace(f::Function, root::Node)