From: M. Taylor Saotome-Westlake Date: Sun, 8 Jan 2023 19:35:35 +0000 (-0800) Subject: memoir wordcount automation precision X-Git-Url: http://534655.efjtl6rk.asia/source?a=commitdiff_plain;h=2ac4b08210a9fddf103df3e1d7f37b8af797e491;p=Ultimately_Untrue_Thought.git memoir wordcount automation precision I think the LibreOffice Calc graph I brought up earlier was just graphing the datapoints in sequence; the horizontal axis was "Git tree time" (sampled every 5 commits) rather than sidereal time. If we grab an end-of-day wordcount for every day, and stuff every day into the spreadsheet, then the datapoints in sequence are sidereal time. --- diff --git a/notes/memoir_wordcounts.csv b/notes/memoir_wordcounts.csv index 52d63c6..bfb43b5 100644 --- a/notes/memoir_wordcounts.csv +++ b/notes/memoir_wordcounts.csv @@ -1,85 +1,287 @@ -03/25/2022,5965 +03/26/2022,5965 +03/27/2022,5965 +03/28/2022,5965 +03/29/2022,5965 +03/30/2022,5965 +03/31/2022,5965 +04/01/2022,5965 +04/02/2022,5965 +04/03/2022,5965 +04/04/2022,5965 +04/05/2022,5965 +04/06/2022,5965 +04/07/2022,5965 +04/08/2022,5965 04/09/2022,5965 +04/10/2022,5965 +04/11/2022,5965 +04/12/2022,5965 +04/13/2022,5965 +04/14/2022,5965 04/15/2022,5965 +04/16/2022,5965 +04/17/2022,5965 +04/18/2022,5965 +04/19/2022,5965 +04/20/2022,5965 04/21/2022,5990 +04/22/2022,5990 +04/23/2022,5990 04/24/2022,5997 +04/25/2022,5997 +04/26/2022,5997 +04/27/2022,5997 +04/28/2022,6126 04/29/2022,6141 +04/30/2022,6746 +05/01/2022,7125 +05/02/2022,7125 +05/03/2022,7125 +05/04/2022,7125 +05/05/2022,7125 05/06/2022,7127 +05/07/2022,7392 05/08/2022,7392 +05/09/2022,7392 +05/10/2022,7392 +05/11/2022,7392 05/12/2022,7392 +05/13/2022,7412 05/14/2022,7412 -05/15/2022,7420 -05/15/2022,7757 +05/15/2022,8117 +05/16/2022,8117 +05/17/2022,8117 +05/18/2022,8117 05/19/2022,7819 05/20/2022,8783 -05/22/2022,8682 -05/22/2022,8783 -05/29/2022,8858 -05/29/2022,9785 +05/21/2022,8783 +05/22/2022,8787 +05/23/2022,8787 +05/24/2022,8787 +05/25/2022,8682 +05/26/2022,8682 +05/27/2022,8682 +05/28/2022,8682 +05/29/2022,10110 05/30/2022,10308 -06/04/2022,10655 -06/05/2022,11001 +05/31/2022,10308 +06/01/2022,10308 +06/02/2022,10308 +06/03/2022,10308 +06/04/2022,10921 06/05/2022,11437 +06/06/2022,11437 +06/07/2022,11537 +06/08/2022,11537 06/09/2022,11537 06/10/2022,11537 +06/11/2022,13077 06/12/2022,13077 -06/16/2022,13076 +06/13/2022,13077 +06/14/2022,13077 +06/15/2022,13077 +06/16/2022,13077 +06/17/2022,13076 +06/18/2022,13089 +06/19/2022,13089 +06/20/2022,13089 +06/21/2022,13089 +06/22/2022,13089 +06/23/2022,13089 06/24/2022,13089 -06/26/2022,13285 +06/25/2022,12391 +06/26/2022,13313 +06/27/2022,13313 +06/28/2022,13313 +06/29/2022,13313 +06/30/2022,13313 +07/01/2022,13313 +07/02/2022,13313 07/03/2022,13341 +07/04/2022,13341 +07/05/2022,13341 +07/06/2022,13341 +07/07/2022,13341 07/08/2022,13341 -07/17/2022,15026 -07/17/2022,16167 -07/22/2022,16458 -07/23/2022,15642 -07/23/2022,15717 -07/23/2022,19852 -07/29/2022,18832 -07/29/2022,20082 -07/31/2022,20229 +07/09/2022,13349 +07/10/2022,14761 +07/11/2022,14761 +07/12/2022,14761 +07/13/2022,14761 +07/14/2022,14761 +07/15/2022,14983 +07/16/2022,14983 +07/17/2022,16414 +07/18/2022,16414 +07/19/2022,16414 +07/20/2022,16414 +07/21/2022,16458 +07/22/2022,17815 +07/23/2022,20289 +07/24/2022,20082 +07/25/2022,20082 +07/26/2022,20082 +07/27/2022,20082 +07/28/2022,20082 +07/29/2022,20170 +07/30/2022,19882 +07/31/2022,20391 +08/01/2022,20391 +08/02/2022,20391 08/03/2022,20388 +08/04/2022,20381 08/05/2022,21349 -08/07/2022,23247 -08/13/2022,24379 -08/14/2022,25009 -08/19/2022,25483 -08/20/2022,26132 +08/06/2022,22781 +08/07/2022,24301 +08/08/2022,24301 +08/09/2022,24301 +08/10/2022,24301 +08/11/2022,24301 +08/12/2022,24379 +08/13/2022,24800 +08/14/2022,25177 +08/15/2022,25177 +08/16/2022,25177 +08/17/2022,25177 +08/18/2022,25205 +08/19/2022,25615 08/20/2022,34503 +08/21/2022,34900 +08/22/2022,34900 +08/23/2022,34900 +08/24/2022,34900 08/25/2022,35059 -08/27/2022,36215 +08/26/2022,35853 +08/27/2022,36459 08/28/2022,36784 -09/02/2022,37671 -09/03/2022,39599 +08/29/2022,36784 +08/30/2022,36784 +08/31/2022,36784 +09/01/2022,37008 +09/02/2022,38663 +09/03/2022,40167 09/04/2022,40484 +09/05/2022,41661 +09/06/2022,41661 +09/07/2022,41661 +09/08/2022,41661 09/09/2022,41815 -09/11/2022,44068 +09/10/2022,42902 +09/11/2022,44094 +09/12/2022,44094 +09/13/2022,44094 +09/14/2022,44171 09/15/2022,44858 +09/16/2022,45554 09/17/2022,45628 -09/18/2022,45706 +09/18/2022,46675 +09/19/2022,46675 +09/20/2022,46675 +09/21/2022,46675 09/22/2022,46724 -09/25/2022,47740 -09/30/2022,49173 +09/23/2022,46724 +09/24/2022,46745 +09/25/2022,47741 +09/26/2022,47741 +09/27/2022,47741 +09/28/2022,47741 +09/29/2022,47865 09/30/2022,49533 -10/02/2022,51024 -10/07/2022,51922 -10/09/2022,52989 -10/14/2022,53472 -10/16/2022,56344 -10/20/2022,58146 +10/01/2022,50660 +10/02/2022,51674 +10/03/2022,51674 +10/04/2022,51674 +10/05/2022,51674 +10/06/2022,51826 +10/07/2022,52190 +10/08/2022,52618 +10/09/2022,53486 +10/10/2022,53486 +10/11/2022,53486 +10/12/2022,53486 +10/13/2022,53408 +10/14/2022,53841 +10/15/2022,56326 +10/16/2022,58138 +10/17/2022,58138 +10/18/2022,58138 +10/19/2022,58138 +10/20/2022,58312 10/21/2022,60860 +10/22/2022,61571 +10/23/2022,62788 +10/24/2022,62788 10/25/2022,62922 -10/28/2022,62974 -10/29/2022,64086 +10/26/2022,62922 +10/27/2022,62974 +10/28/2022,63215 +10/29/2022,64488 10/30/2022,66302 -11/04/2022,66317 +10/31/2022,66302 +11/01/2022,66302 +11/02/2022,66302 +11/03/2022,66302 11/04/2022,67058 +11/05/2022,67849 11/06/2022,68083 -11/10/2022,68083 +11/07/2022,68113 +11/08/2022,68222 +11/09/2022,68222 +11/10/2022,68227 +11/11/2022,68913 11/12/2022,69792 -11/18/2022,71296 -11/20/2022,71859 +11/13/2022,70738 +11/14/2022,70738 +11/15/2022,70738 +11/16/2022,70738 +11/17/2022,70806 +11/18/2022,71400 +11/19/2022,71859 +11/20/2022,73074 +11/21/2022,73179 +11/22/2022,73179 +11/23/2022,73179 11/24/2022,73348 +11/25/2022,73972 +11/26/2022,73972 11/27/2022,74002 +11/28/2022,74002 +11/29/2022,74002 +11/30/2022,74002 +12/01/2022,74002 +12/02/2022,74002 12/03/2022,74002 +12/04/2022,74002 +12/05/2022,74002 +12/06/2022,74002 +12/07/2022,74002 +12/08/2022,74020 +12/09/2022,74021 +12/10/2022,74021 +12/11/2022,74021 +12/12/2022,74021 +12/13/2022,74021 +12/14/2022,74021 +12/15/2022,74021 12/16/2022,74039 +12/17/2022,74039 +12/18/2022,74039 +12/19/2022,74039 +12/20/2022,74039 +12/21/2022,74039 +12/22/2022,74043 +12/23/2022,74043 +12/24/2022,74043 +12/25/2022,74055 12/26/2022,74255 +12/27/2022,74255 +12/28/2022,74255 +12/29/2022,74255 +12/30/2022,74255 +12/31/2022,74255 +01/01/2023,74255 +01/02/2023,74285 +01/03/2023,74285 +01/04/2023,74295 +01/05/2023,74295 +01/06/2023,74757 diff --git a/notes/memoir_wordcounts.py b/notes/memoir_wordcounts.py index ef36de5..bfe63c7 100755 --- a/notes/memoir_wordcounts.py +++ b/notes/memoir_wordcounts.py @@ -38,7 +38,7 @@ def look_back(): wordcounts = [] keep_going = True while keep_going: - subprocess.run(["git", "checkout", "HEAD~5"]) + subprocess.run(["git", "checkout", "HEAD~1"]) wordcount = wordcount_at_this_sha() date = date_at_this_sha() if date < datetime.date(2022, 4, 1): @@ -48,6 +48,17 @@ def look_back(): subprocess.run(["git", "checkout", "master"]) return sorted(wordcounts) +def normalize_dates(wordcounts): + eod_wordcounts = [] + for i in range(len(wordcounts)-1): + date, wordcount = wordcounts[i] + next_date, next_wordcount = wordcounts[i+1] + gap = next_date - date + if gap >= datetime.timedelta(1): + eod_wordcounts.append((date, wordcount)) + for i in range(gap.days-1): + eod_wordcounts.append((date + datetime.timedelta(i+1), wordcount)) + return eod_wordcounts def write_csv(wordcounts): with open("memoir_wordcounts.csv", 'w') as f: @@ -57,5 +68,5 @@ def write_csv(wordcounts): if __name__ in "__main__": - wordcounts = look_back() + wordcounts = normalize_dates(look_back()) write_csv(wordcounts)