Skip to content

Instantly share code, notes, and snippets.

@smowton
smowton / extcalls.py
Created November 9, 2020 18:24
extcalls.py
#!/usr/bin/python3
import collections
import json
import sys
if len(sys.argv) < 2 or sys.argv[1] not in ["projects", "calls"]:
print("Usage: extcalls.py projects|calls [limit]", file = sys.stderr)
sys.exit(1)
@smowton
smowton / 7daysum.py
Created July 30, 2020 15:23
Python to add 7-day rolling sum to a CSV
#!/usr/bin/python
import datetime
import sys
# Adds a 7-day rolling sum to a CSV
# Input: date,cases
# date format: yyyy-mm-dd
# Output: date,cases,last7days