Miscellaneous fixes #36

Merged
mattbk merged 3 commits from fix-on into master 2017-11-27 22:15:59 -06:00
2 changed files with 3 additions and 1 deletions
Showing only changes of commit 2b188237bb - Show all commits

View File

@ -141,7 +141,7 @@ def history():
# Calculate streak lengths. Based on https://stackoverflow.com/a/33403822/2152245. # Calculate streak lengths. Based on https://stackoverflow.com/a/33403822/2152245.
def streak_lengths(x): def streak_lengths(x):
# find the boundaries where numbers are not consecutive # find the boundaries where numbers are not consecutive
boundaries = [i for i in range(1, len(x)) if x[i] < x[i-1]] boundaries = [i for i in range(1, len(x)) if x[i] <= x[i-1]]
# add the start and end boundaries # add the start and end boundaries
boundaries = [0] + boundaries + [len(x)] boundaries = [0] + boundaries + [len(x)]
# take the boundaries as pairwise slices # take the boundaries as pairwise slices

View File

@ -82,7 +82,9 @@
<div class='row' id='plotly-plot'></div> <div class='row' id='plotly-plot'></div>
<div class='debug'>
{{ debug }} {{ debug }}
</div>
</body> </body>