Skip to content

Instantly share code, notes, and snippets.

Scott Odle sodle

View GitHub Profile
@sodle
sodle / verbal_timedelta.py
Created May 20, 2017
Python function to express timedeltas verbally.
View verbal_timedelta.py
def verbal_timedelta(td):
"""Expresses a Python timedelta verbally
:param td: A Python timedelta
:type td: timedelta
:return: A verbal description of the time relative to now
:rtype: str"""
if td.days != 0:
abs_days = abs(td.days)
if abs_days > 7:
abs_delta = '{} weeks'.format(td.days // 7)
@sodle
sodle / tempe.user.js
Created May 1, 2017
Userscript to add "Development Projects" link to Tempe.gov homepage
View tempe.user.js
// ==UserScript==
// @name Tempe.gov Site Update
// @namespace http://asu.edu/
// @version 0.1
// @description Adds Development Projects link to Tempe.gov homepage
// @author Scott Odle, Chris Staggers, McGregor Crowley
// @match *://*.tempe.gov/*
// @grant none
// @require https://code.jquery.com/jquery-3.2.1.min.js
// ==/UserScript==
You can’t perform that action at this time.