Question
Write a python code that would read the below file if titled (commit_activity.json), loop through each option the highest total value, and then printing that
Write a python code that would read the below file if titled (commit_activity.json), loop through each option the highest "total" value, and then printing that week's "week" value in epoch timestamp. Or esentially finding what week had the greatest number of commits (after days its ordered as days starting at sunday and the total is the total number of commits which I need the highest of. The answer should be 6 since We can see it, and I want it to return the value after "week"
[ { "days": [ 0, 0, 0, 0, 0, 2, 0 ], "total": 2, "week": 1488672000 }, { "days": [ 0, 2, 0, 0, 0, 0, 0 ], "total": 2, "week": 1489276800 }, { "days": [ 0, 0, 0, 1, 0, 2, 0 ], "total": 3, "week": 1489881600 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1490486400 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1491091200 }, { "days": [ 0, 0, 0, 0, 0, 2, 0 ], "total": 2, "week": 1491696000 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1492300800 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1492905600 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1493510400 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1494115200 }, { "days": [ 0, 2, 2, 0, 0, 0, 0 ], "total": 4, "week": 1494720000 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1495324800 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1495929600 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1496534400 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1497139200 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1497744000 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1498348800 }, { "days": [ 0, 0, 0, 0, 0, 2, 1 ], "total": 3, "week": 1498953600 }, { "days": [ 0, 0, 0, 0, 0, 2, 0 ], "total": 2, "week": 1499558400 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1500163200 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1500768000 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1501372800 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1501977600 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1502582400 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1503187200 }, { "days": [ 0, 0, 0, 0, 0, 0, 3 ], "total": 3, "week": 1503792000 }, { "days": [ 2, 0, 0, 0, 0, 0, 0 ], "total": 2, "week": 1504396800 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1505001600 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1505606400 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1506211200 }, { "days": [ 0, 0, 2, 0, 0, 0, 0 ], "total": 2, "week": 1506816000 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1507420800 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1508025600 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1508630400 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1509235200 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1509840000 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1510444800 }, { "days": [ 0, 0, 2, 0, 0, 0, 0 ], "total": 2, "week": 1511049600 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1511654400 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1512259200 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1512864000 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1513468800 }, { "days": [ 0, 0, 4, 0, 0, 0, 0 ], "total": 4, "week": 1514073600 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1514678400 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1515283200 }, { "days": [ 0, 0, 0, 0, 2, 0, 0 ], "total": 2, "week": 1515888000 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1516492800 }, { "days": [ 3, 3, 0, 0, 0, 0, 0 ], "total": 6, "week": 1517097600 }, { "days": [ 0, 0, 0, 3, 0, 0, 0 ], "total": 3, "week": 1517702400 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1518307200 }, { "days": [ 0, 0, 0, 0, 0, 0, 0 ], "total": 0, "week": 1518912000 }, { "days": [ 0, 0, 1, 0, 0, 0, 0 ], "total": 1, "week": 1519516800 } ]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started