Skip to content

Instantly share code, notes, and snippets.

@xiongchiamiov
Created December 16, 2022 19:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xiongchiamiov/6eef7e1d46e4fd525a9a0380b086aa09 to your computer and use it in GitHub Desktop.
Save xiongchiamiov/6eef7e1d46e4fd525a9a0380b086aa09 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
import csv
import sys
from collections import Counter
counter = Counter()
with open(sys.argv[1]) as csvfile:
reader = csv.DictReader(csvfile)
for row in reader:
counter[row['Actions Workflow']] += int(row['Quantity'])
for workflow, minutes in counter.most_common():
print("{}\t{}".format(workflow, minutes))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment