Skip to content

Instantly share code, notes, and snippets.

Michael Goerz goerz

Block or report user

Report or block goerz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@goerz
goerz / rtd_latest_warning.py
Created Aug 5, 2019
Sphinx plugin for inserting a warning on the "latest" version
View rtd_latest_warning.py
"""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 / pytest.log
Created Jul 16, 2019
Error messages for pytest on krotov package caused by update to qutip 4.4
View pytest.log
.venv/py37/bin/isort --recursive --check-only src tests
Skipped 1 files
.venv/py37/bin/black --skip-string-normalization --line-length 79 --diff --check src tests
All done! ✨ 🍰 ✨
25 files would be left unchanged.
.venv/py37/bin/py.test -v --doctest-modules --cov=krotov --nbval --sanitize-with docs/nbval_sanitize.cfg --durations=10 -s src tests docs/notebooks/*.ipynb README.rst docs/*.rst
============================= test session starts ==============================
platform darwin -- Python 3.7.3, pytest-4.6.3, py-1.8.0, pluggy-0.12.0 -- /Users/goerz/Documents/Programming/github/krotov/.venv/py37/bin/python
cachedir: .pytest_cache
rootdir: /Users/goerz/Documents/Programming/github/krotov, inifile: setup.cfg
@goerz
goerz / pytest.log
Created Jul 16, 2019
Error messages for pytest on krotov package caused by update to qutip 4.4
View pytest.log
.venv/py37/bin/isort --recursive --check-only src tests
Skipped 1 files
.venv/py37/bin/black --skip-string-normalization --line-length 79 --diff --check src tests
All done! ✨ 🍰 ✨
25 files would be left unchanged.
.venv/py37/bin/py.test -v --doctest-modules --cov=krotov --nbval --sanitize-with docs/nbval_sanitize.cfg --durations=10 -s src tests docs/notebooks/*.ipynb README.rst docs/*.rst
============================= test session starts ==============================
platform darwin -- Python 3.7.3, pytest-4.6.3, py-1.8.0, pluggy-0.12.0 -- /Users/goerz/Documents/Programming/github/krotov/.venv/py37/bin/python
cachedir: .pytest_cache
rootdir: /Users/goerz/Documents/Programming/github/krotov, inifile: setup.cfg
@goerz
goerz / EditInNeovim.applescript
Created May 28, 2019
Use Neovim in iTerm as a GUI editor
View EditInNeovim.applescript
on run {input, parameters}
set cmd to ""
if input is not {} then
set filePath to POSIX path of input
set cmd to ":e " & filePath
end if
tell application "iTerm"
set mywindow to (create window with profile "neovim")
tell the current session in mywindow
@goerz
goerz / apsrev4-2-titles.bst
Last active Apr 29, 2019
Modified bibtex style based on apsrev4.2 that adds titles for journal articles
View apsrev4-2-titles.bst
%%
%% 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>
%%
@goerz
goerz / angularfreq.ipynb
Created Apr 13, 2019
Frequencies vs Angular Frequencies in Quantum Dynamics
View angularfreq.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@goerz
goerz / terminalfix.vim
Created Mar 30, 2019
Settings that solve some weird vim behavior like starting in REPLACE mode (put this at the end of your vimrc)
View terminalfix.vim
" Terminal fixes
"
" These originate from some linux distribution's system vimrc. I can't say
" that I understand the details what's going on here, but without these
" settings, I've had problems like vim starting in REPLACE mode for
" TERM=xterm-256color (neovim is fine)
if &term =~? 'xterm'
let s:myterm = 'xterm'
else
@goerz
goerz / Krotov_time_discretization.ipynb
Last active Aug 5, 2019
Time Discretization in Quantum Optimal Control
View Krotov_time_discretization.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View 2019-01-08_mg_mirror_adiabatic_analysis.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@goerz
goerz / README.md
Last active Jan 6, 2019
Screenshots for jupytext.vim
View README.md
You can’t perform that action at this time.