diff options
author | ncteisen <ncteisen@gmail.com> | 2017-12-11 18:09:31 -0800 |
---|---|---|
committer | ncteisen <ncteisen@gmail.com> | 2017-12-11 18:10:00 -0800 |
commit | 5f8bf79bbf4915b928f75c83c66592b1fa97657e (patch) | |
tree | 38753ccc2a25774e87c27cd0af185e3d7c8cbe0a /tools/line_count/summarize-history.py | |
parent | 888093c6ed0d24eed699173b5fb35235fe7a6069 (diff) |
yapf tools
Diffstat (limited to 'tools/line_count/summarize-history.py')
-rwxr-xr-x | tools/line_count/summarize-history.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/tools/line_count/summarize-history.py b/tools/line_count/summarize-history.py index d2ef7ec324..80b0ed7a7e 100755 --- a/tools/line_count/summarize-history.py +++ b/tools/line_count/summarize-history.py @@ -13,22 +13,25 @@ # See the License for the specific language governing permissions and # limitations under the License. - import subprocess import datetime # this script is only of historical interest: it's the script that was used to # bootstrap the dataset + def daterange(start, end): - for n in range(int((end - start).days)): - yield start + datetime.timedelta(n) + for n in range(int((end - start).days)): + yield start + datetime.timedelta(n) + start_date = datetime.date(2017, 3, 26) end_date = datetime.date(2017, 3, 29) for dt in daterange(start_date, end_date): - dmy = dt.strftime('%Y-%m-%d') - print dmy - subprocess.check_call(['tools/line_count/yaml2csv.py', '-i', '../count/%s.yaml' % dmy, '-d', dmy, '-o', '../count/%s.csv' % dmy]) - + dmy = dt.strftime('%Y-%m-%d') + print dmy + subprocess.check_call([ + 'tools/line_count/yaml2csv.py', '-i', '../count/%s.yaml' % dmy, '-d', + dmy, '-o', '../count/%s.csv' % dmy + ]) |