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
# Print iterations progress | |
# Ref: https://stackoverflow.com/questions/3173320/text-progress-bar-in-the-console/34325723#34325723 | |
def printProgressBar (iteration, total, prefix = '', suffix = '', decimals = 1, length = 100, fill = '█', printEnd = "\r"): | |
""" | |
Call in a loop to create terminal progress bar | |
@params: | |
iteration - Required : current iteration (Int) | |
total - Required : total iterations (Int) | |
prefix - Optional : prefix string (Str) | |
suffix - Optional : suffix string (Str) |
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/sh | |
input_ext=".csv" | |
# simple check on input file extension | |
if [ "${1%$input_ext}" != $1 ] | |
then | |
header_file="${1%$input_ext}.header" | |
stript_file="${1%$input_ext}.noheader" |
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
# tips from Ben Lindsay: http://benjlindsay.com/blog/running-jupyter-lab-remotely/ | |
# This function does a few things when you type jllocal: | |
# Runs ssh tunneling command if it's not already running | |
# Grabs the Jupyter token from the remote machine | |
# Opens a tab in your browser with the right url and token for you | |
# When you're done with Jupyter Lab, you just type jllocal kill and it will shut down the ssh connection. | |
function jllocal { |
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
# tips from Ben Lindsay: http://benjlindsay.com/blog/running-jupyter-lab-remotely/ | |
alias jlremote='jupyter lab --no-browser --port=8888' |
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
for f in *.tif; do mv -v --backup=numbered "$f" "dest/$(date -r $f +%Y%m%d-%H%M%S).tif"; 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
#!/usr/bin/python | |
""" | |
$ test.py -h | |
usage: test.py -i <inputfile> -o <outputfile> | |
$ test.py -i BMP -o | |
usage: test.py -i <inputfile> -o <outputfile> | |
$ test.py -i inputfile |