This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding: utf-8 | |
| # Author: Sander van Rijn <s.vanrijn@esciencecenter.nl> | |
| # Date: 2025-12-04 10:03 | |
| from pathlib import Path | |
| import pandas as pd | |
| import matplotlib.pyplot as plt | |
| import numpy as np |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # User configuration | |
| export PATH="$HOME/.pyenv/bin/:$HOME/.pyenv/shims/:$PATH" | |
| eval "$(pyenv init -)" | |
| eval "$(pyenv virtualenv-init -)" | |
| export PYENV_VIRTUALENV_DISABLE_PROMPT=1 | |
| # Theme customisation | |
| prompt_virtualenv() { # show pyenv version-name if not using 'system' | |
| local version="$(pyenv version-name)" | |
| if [[ $version != "system" ]]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [alias] | |
| fush = push --force-with-lease | |
| lg = log --oneline --graph --all | |
| siff = diff --staged | |
| wiff = diff --word-diff | |
| swiff = diff --staged --word-diff | |
| rpo = remote prune origin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Add this function in your ~/.bash_aliases file, which takes the desired remote machine as argument: | |
| remotenotebook() { ssh -4 -L 8891:localhost:8891 $1 -t "~/.ipynb"; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git remote add SECOND [SECOND_URL] | |
| git push SECOND master | |
| git remote add BOTH [ORIG_URL] | |
| git remote set-url --push BOTH [ORIG_URL] | |
| git remote set-url --push --add BOTH [SECOND_URL] | |
| git push BOTH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| for a in */; do | |
| for b in $a/*/; do | |
| dir=${b##*//} | |
| mkdir -p $dir$a | |
| mv $a$dir* $dir$a | |
| done | |
| rm -rf $a | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding: utf-8 | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| from matplotlib.colors import Normalize | |
| def recreate(n=8000, s=5, scale=1.45, ymax=.68): | |
| norm = Normalize(vmin=0, vmax=1, clip=True) | |
| origin = np.array([.5, 0]) |