Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// MODULES //

var bench = require( '@stdlib/bench' );
var isBoolean = require( '@stdlib/assert/is-boolean' );
var isBoolean = require( '@stdlib/assert/is-boolean' ).isPrimitive;
var format = require( '@stdlib/string/format' );
var pkg = require( './../package.json' ).name;
var BooleanArray = require( './../lib' );
Expand Down
6 changes: 4 additions & 2 deletions tools/git/scripts/median_commits_per_day
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ median="${root}/tools/awk/median.awk"
# - Extract the line which begins with `Date` from each log.
# * `awk '{}'`
# - From each date line, extract the month (`$3`), day (`$4`), and year (`$6`).
# * `sort`
# - Sort in lexicographic order.
# * `uniq -c`
# - Given that same day commits are on consecutive lines, we can remove repeated lines and count the repeats to compute daily totals.
# - Remove repeated lines and count the repeats to compute daily totals.
# * `awk '{}'`
# - Extract the total from each line.
# * `awk '{}'`
# - Compute the median number of commits per day.
git log | grep Date | awk '{print $3 OFS $4 OFS $6}' | uniq -c | awk '{print $1}' | "${median}"
git log | grep Date | awk '{print $3 OFS $4 OFS $6}' | sort | uniq -c | awk '{print $1}' | "${median}"

# FIXME: does not include days in which no commits are made!
6 changes: 4 additions & 2 deletions tools/git/scripts/mode_commits_per_day
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ mode="${root}/tools/awk/mode.awk"
# - Extract the line which begins with `Date` from each log.
# * `awk '{}'`
# - From each date line, extract the month (`$3`), day (`$4`), and year (`$6`).
# * `sort`
# - Sort in lexicographic order.
# * `uniq -c`
# - Given that same day commits are on consecutive lines, we can remove repeated lines and count the repeats to compute daily totals.
# - Remove repeated lines and count the repeats to compute daily totals.
# * `awk '{}'`
# - Extract the total from each line.
# * `awk '{}'`
# - Compute the most frequent number of commits per day.
git log | grep Date | awk '{print $3 OFS $4 OFS $6}' | uniq -c | awk '{print $1}' | "${mode}"
git log | grep Date | awk '{print $3 OFS $4 OFS $6}' | sort | uniq -c | awk '{print $1}' | "${mode}"

# FIXME: does not include days in which no commits are made!
6 changes: 4 additions & 2 deletions tools/git/scripts/tabulate_total_commits_per_day
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,16 @@ tabulate="${root}/tools/awk/tabulate.awk"
# - Extract the line which begins with `Date` from each log.
# * `awk '{}'`
# - From each date line, extract the month (`$3`), day (`$4`), and year (`$6`).
# * `sort`
# - Sort in lexicographic order.
# * `uniq -c`
# - Given that same day commits are on consecutive lines, we can remove repeated lines and count the repeats to compute daily totals.
# - Remove repeated lines and count the repeats to compute daily totals.
# * `awk '{}'`
# - Extract the total from each line.
# * `awk '{}'`
# - Generate a frequency table.
# * `sort -n`
# - Sort in numeric order.
git log | grep Date | awk '{print $3 OFS $4 OFS $6}' | uniq -c | awk '{print $1}' | "${tabulate}" | sort -n
git log | grep Date | awk '{print $3 OFS $4 OFS $6}' | sort | uniq -c | awk '{print $1}' | "${tabulate}" | sort -n

# FIXME: does not include days in which no commits are made!