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/env python | |
"""Calculate time difference between two timestamps | |
First argument is the "from" time and second is the "to" time. Format should | |
be anything that works with `datetime.fromisoformat` | |
(https://docs.python.org/3/library/datetime.html#datetime.datetime.fromisoformat). | |
""" | |
from datetime import datetime |
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/env bash | |
# Add the following to .bashrc to make this work: | |
# alias venv=". venv" | |
source .venv/bin/activate && return 0 | |
read -p "Create venv in .venv/? [y/N] " -r | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then |