aboutsummaryrefslogtreecommitdiff
path: root/license_summary.py
diff options
context:
space:
mode:
authorYuchen Pei <hi@ypei.me>2022-05-19 22:23:10 +1000
committerYuchen Pei <hi@ypei.me>2022-05-19 22:23:10 +1000
commit3db93bc6f7b46bc322694e6658b8f559433a03c6 (patch)
tree1273a17e11e0d9888ae57676906c68f8bb77e287 /license_summary.py
parent09c05e86a1096b08eb7483b970207d47d0388665 (diff)
Replacing the files with a haskell rewrite.
Diffstat (limited to 'license_summary.py')
-rw-r--r--license_summary.py25
1 files changed, 0 insertions, 25 deletions
diff --git a/license_summary.py b/license_summary.py
deleted file mode 100644
index 177e756..0000000
--- a/license_summary.py
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-# summary of the License: fields found in Files: clauses
-
-import pandas as pd
-
-def histogram(values):
- hist = {}
-
- for v in values:
- v_ = v.lower()
- hist[v_] = hist.get(v_, 0) + 1
-
- return hist
-
-if __name__ == '__main__':
- store = pd.HDFStore('cp.h5')
- cpf = store['cp_files']
-
- licenses = list(histogram(cpf['_license']))
-
- for (k, v) in sorted(licenses, key=lambda x: x[1], reverse=True):
- print '%-40s %6d' % (k.encode('utf8'), v)
-