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
import datetime as dt | |
import time | |
import unittest | |
def aws_age_seconds(ec2_launch_time): | |
""" | |
Parse the ec2 launch time string and return how old it is in seconds. | |
""" | |
# Strip trailing subsecond part |
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
# Functions to activate/deactivate Continuum Analytics Anaconda Python distribution | |
# by manipulating the $PATH. | |
export ANACONDA_PATH="$HOME/anaconda/bin" | |
function have_anaconda(){ | |
[[ -n $path[(r)$ANACONDA_PATH] ]] | |
} | |
function anaconda_on(){ | |
if have_anaconda ; then |