The project
Four events were saved as lines of JSON. e1 appears twice. You'll read every line, count views even when an id repeats, remember the last id, then count each id only once and write that.
The steps
Your files
stream.pyyou write thismain.pyyou write thisdata/events.jsonl4 records