Skip to content

Instantly share code, notes, and snippets.

View goerz's full-sized avatar

Michael Goerz goerz

View GitHub Profile
@cormullion
cormullion / animation-sketch.jl
Created June 6, 2023 14:37
an animated something
using Luxor, Thebes, MathTeXEngine
function frame(scene, framenumber)
background("white")
sethue("black")
fontsize(15)
eased_n = scene.easingfunction(framenumber, 0, 1, scene.framerange.stop)
helloworld()
eyepoint(200, 200, 100)
setline(0.5)
@Azzaare
Azzaare / startup.jl
Last active March 22, 2023 07:29
Azzaare's startup.jl
# Add this file to ~/.julia/config/ (mkdir config if necessary)
try
using Revise
catch e
@warn "Error initializing Revise: trying install" exception=(e, catch_backtrace())
using Pkg
Pkg.add("Revise")
end
@tobi
tobi / kindle.rb
Last active September 25, 2022 02:37
Download your Kindle Highlights to local markdown files. Great for Obsidian.md.
#!/usr/bin/env ruby
# gem install active_support
require 'active_support/inflector'
require 'active_support/core_ext/string'
# gem install webrick (only ruby3)
require 'webrick'
# gem install mechanize
@goerz
goerz / rtd_latest_warning.py
Created August 5, 2019 19:26
Sphinx plugin for inserting a warning on the "latest" version
"""Add a warning to the top of any documentation page for the "latest" version
on ReadTheDocs (RTD). Somewhat confusingly, "latest" is the latest development
version, not the latest release (which is stable).
Note that RTD has a builtin feature to show a similar warning on the
documentation of old releases. This can be enable in the Admin section on RTD,
under "Advanced Settings", "Show version warning"
"""
# This program is public domain
# Author: Michael Goerz
@goerz
goerz / Krotov_time_discretization.ipynb
Last active August 5, 2019 07:42
Time Discretization in Quantum Optimal Control
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@steven2358
steven2358 / ffmpeg.md
Last active April 21, 2024 02:08
FFmpeg cheat sheet
@goerz
goerz / .ctags
Created February 3, 2018 20:20 — forked from Evizero/.ctags
more comprehensive ctags definitions for the julia language based on the one in the official julia repository (inclusive vim tagbar)
--langdef=julia
--langmap=julia:.jl
--regex-julia=/^[ \t]*(@with_kw[ \t]+)?(abstract type|primitive type|struct|mutable struct|typealias)[ \t]+([^ \t({[]+).*$/\3/t,type/
--regex-julia=/^[ \t]*(macro)[ \t]+([^ \t({[]+).*$/\2/m,macro/
--regex-julia=/^[ \t]*(@inline[ \t]+|@noinline[ \t]+)?(function)[ \t]+([^ \t({[]+)[^(]*\([ \t]*([^ \t;,=)({]+).*$/\3 (\4, …)/f,function/
--regex-julia=/^[ \t]*(@inline[ \t]+|@noinline[ \t]+)?(function)[ \t]+([^ \t({[]+)[^(]*(\([ \t]*\).*|\([ \t]*)$/\3/f,function/
--regex-julia=/^[ \t]*(@inline[ \t]+|@noinline[ \t]+)?(([^@#$ \t({[]+)|\(([^@#$ \t({[]+)\)|\((\$)\))[ \t]*(\{.*\})?[ \t]*\([ \t]*\)[ \t]*=([^=].*$|$)/\3\4\5/f,function/
--regex-julia=/^[ \t]*(@inline[ \t]+|@noinline[ \t]+)?(([^@#$ \t({[]+)|\(([^@#$ \t({[]+)\)|\((\$)\))[ \t]*(\{.*\})?[ \t]*\([ \t]*([^ \t;,=)({]+).*\)[ \t]*=([^=].*$|$)/\3\4\5 (\7, …)/f,function/
--regex-julia=/^(const)[ \t]+([^ \t({[]+).*[ ]*=.*$/\2/c,const/
@goerz
goerz / revtex.tplx
Last active February 22, 2021 09:33
custom jupyter nbconvert latex template, using revtex
((*- extends 'article.tplx' -*))
% See http://blog.juliusschulz.de/blog/ultimate-ipython-notebook#templates
% for some useful tips
%===============================================================================
% Document class
%===============================================================================
((* block docclass *))
@goerz
goerz / linreg.ipynb
Created January 2, 2018 19:49
Linear Regression Notes (Notebook)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@goerz
goerz / Elements of Statistical Learning.md
Last active December 24, 2022 17:44
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