Skip to content

Instantly share code, notes, and snippets.

View robmcdan's full-sized avatar

Rob McDaniel robmcdan

View GitHub Profile

Keybase proof

I hereby claim:

  • I am robmcdan on github.
  • I am robmcdan (https://keybase.io/robmcdan) on keybase.
  • I have a public key ASDP2nJ6nJFxd-PXXKGk48ZGDYsiMG45CbEgmen-i27wYwo

To claim this, I am signing this object:

@robmcdan
robmcdan / git pretty stat
Created April 10, 2019 18:29 — forked from sephiroth74/git pretty stat
Show lines added/deleted and total commits per author in a period of time on all branches
git log --all --numstat --pretty="%H" --author="author" --since=1.year | awk 'NF==3 {plus+=$1; minus+=$2} NF==1 {total++} END {printf("lines added: +%d\nlines deleted: -%d\ntotal commits: %d\n", plus, minus, total)}'
@robmcdan
robmcdan / gap.py
Last active August 29, 2015 14:20 — forked from michiexile/gap.py
# gap.py
# (c) 2013 Mikael Vejdemo-Johansson
# BSD License
#
# SciPy function to compute the gap statistic for evaluating k-means clustering.
# Gap statistic defined in
# Tibshirani, Walther, Hastie:
# Estimating the number of clusters in a data set via the gap statistic
# J. R. Statist. Soc. B (2001) 63, Part 2, pp 411-423