aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/line_count/summarize-history.py
diff options
context:
space:
mode:
authorGravatar ncteisen <ncteisen@gmail.com>2017-12-11 18:09:31 -0800
committerGravatar ncteisen <ncteisen@gmail.com>2017-12-11 18:10:00 -0800
commit5f8bf79bbf4915b928f75c83c66592b1fa97657e (patch)
tree38753ccc2a25774e87c27cd0af185e3d7c8cbe0a /tools/line_count/summarize-history.py
parent888093c6ed0d24eed699173b5fb35235fe7a6069 (diff)
yapf tools
Diffstat (limited to 'tools/line_count/summarize-history.py')
-rwxr-xr-xtools/line_count/summarize-history.py17
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
+ ])