Duplicate unix's 'sort | uniq -c | sort -nr
(seq)
| 32 | return "\n".join(template % (x, y) for (x, y) in items) |
| 33 | |
| 34 | def sort_uniq_c(seq): |
| 35 | "Duplicate unix's 'sort | uniq -c | sort -nr'" |
| 36 | count_first = ((y,x) for (x,y) in histogram(seq).items()) |
| 37 | return format2cols(sorted(count_first, reverse=True)) |
| 38 | |
| 39 | if __name__ == "__main__": |
| 40 | print sort_uniq_c(authors(repos(work_path = '.'))) |
no test coverage detected