This file contains 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
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)}' |
This file contains 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
# 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 |