This file contains 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
# yt command line autocompletion | |
# | |
# This requires https://github.com/scop/bash-completion as well as http://github.com/yt-project/yt. | |
# | |
# To use, save it somewhere and source it (e.g. from your .bashrc). For example in your .bashrc add | |
# source ~/.yt-autocompletion | |
_yt() | |
{ | |
local cur prev words cword split |
This file contains 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
import numpy as np | |
from astropy import constants as C | |
from tqdm import tqdm | |
import os | |
import h5py | |
N = 10000 | |
nsteps = 1_000 | |
iout = 10 |
This file contains 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 copy to clipboard from IPython! | |
To install, just copy it to your profile/startup directory, typically: | |
~/.ipython/profile_default/startup/ | |
Example usage: | |
%clip hello world | |
# will store "hello world" |
This file contains 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
#!/usr/bash | |
# To use: | |
# watch_count PATTERN [ARGS...] | |
# It will match the PATTERN and pass any remaining args to tqdm (that | |
# you need btw) | |
function watch_count { | |
pattern=$1 | |
shift | |
curr=0 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
#!/usr/bin/env bash | |
# | |
# This tool is only working with SVN. I *strongly* advise to use git or mercurial for your everyday work. | |
# However, somteimes you're stuck with SVN so here's a small script to make your life easier :) | |
# | |
# This script is under the MIT license. | |
# 2017 - cphyc | |
# Preset parameters | |
NOTIFYCMD=notify-send |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
# to install, create the following function using | |
# $ funced __fish_command_not_found_handler | |
# then save it using: | |
# $ funcsave __fish_command_not_found_handler | |
function __fish_command_not_found_handler --on-event fish_command_not_found | |
set -l __packages (pkgfile --binaries --verbose -- $argv[1] ^/dev/null) | |
if test $status -eq 0 | |
printf "%s may be found in the following packages:\n" "$argv[1]" | |
printf " %s\n" $__packages |