Longest coding streak
Level: Advanced (score: 4)
What is your longest streak of completed Bites?
In Bite 139, you learned how to calculate your current coding streak. In this Bite, you are doing data analysis to calculate the longest coding streak of completed Bites you have ever had while using PyBites.
If you have explored your PyBites settings, you may have noticed a section on Data Exports, Progress Reset and Privacy. In that section, you can download all your PyBites data in a JSON file!
For this Bite, we have cut down the JSON file. You will need to focus on the the commits.
"commits": [
{
"bite": "Bite 90. What South Park characters talk most?",
"code": "print('hello world')",
"date": "2019-10-14 22:26:23.122569+00:00",
"passed": false
},...
You will need to find all the passed commits, retrieve the associated datetimes and determine the longest streak within the dataset. We are trying to capture our longest daily streak of completed Bites (Bites that pass all tests *1).
See the docstrings for more details.
I hope this Bite gives you the confidence to download and analyze datasets from other services and see what insights you can can learn about yourself.
*1) As opposed to the platform in this Bite, a streak is defined as the number of days where you completed at least one Bite.