Skip to content

Commit

Permalink
fix: unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-elimu committed Sep 30, 2024
1 parent ea0b9a7 commit 2e9c9d1
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 77 deletions.
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
id,timestamp,android_id,package_name,video_id,video_title,learning_event_type,additional_data
0,1727710306707,e387e38700000002,ai.elimu.analytics,1,akili and me - letter a,VIDEO_OPENED,
0,1727710329753,e387e38700000002,ai.elimu.analytics,1,akili and me - letter a,VIDEO_COMPLETED,{'video_playback_position_ms': 55224}
0,1727710306708,e387e38700000002,ai.elimu.analytics,2,akili and me - letter b,VIDEO_OPENED,
0,1727710354524,e387e38700000002,ai.elimu.analytics,2,akili and me - letter b,VIDEO_COMPLETED,{'video_playback_position_ms': 8722}
0,1727710306708,e387e38700000002,ai.elimu.analytics,10,akili and me - music,VIDEO_OPENED,
0,1727710326301,e387e38700000002,ai.elimu.analytics,10,akili and me - music,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 2585}
0,1727710306708,e387e38700000002,ai.elimu.analytics,42,one small step,VIDEO_OPENED,
0,1727710364700,e387e38700000002,ai.elimu.analytics,42,one small step,VIDEO_COMPLETED,{'video_playback_position_ms': 37429}
0,1727710306708,e387e38700000002,ai.elimu.analytics,42,one small step,VIDEO_OPENED,
0,1727710355480,e387e38700000002,ai.elimu.analytics,42,one small step,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 58008}
0,1727710306708,e387e38700000002,ai.elimu.analytics,8,akili and me - family,VIDEO_OPENED,
0,1727710357776,e387e38700000002,ai.elimu.analytics,8,akili and me - family,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 21752}
0,1727710306708,e387e38700000002,ai.elimu.analytics,2,akili and me - letter b,VIDEO_OPENED,
0,1727710365132,e387e38700000002,ai.elimu.analytics,2,akili and me - letter b,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 53325}
0,1727710306708,e387e38700000002,ai.elimu.analytics,7,akili and me - letter g,VIDEO_OPENED,
0,1727710354171,e387e38700000002,ai.elimu.analytics,7,akili and me - letter g,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 25535}
0,1727710306709,e387e38700000002,ai.elimu.analytics,13,akili and me - the rectangle song,VIDEO_OPENED,
0,1727710342814,e387e38700000002,ai.elimu.analytics,13,akili and me - the rectangle song,VIDEO_COMPLETED,{'video_playback_position_ms': 49901}
0,1727710306709,e387e38700000002,ai.elimu.analytics,13,akili and me - the rectangle song,VIDEO_OPENED,
0,1727710308589,e387e38700000002,ai.elimu.analytics,13,akili and me - the rectangle song,VIDEO_COMPLETED,{'video_playback_position_ms': 1088}
0,1727710306709,e387e38700000002,ai.elimu.analytics,5,akili and me - letter e,VIDEO_OPENED,
0,1727710359165,e387e38700000002,ai.elimu.analytics,5,akili and me - letter e,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 17045}
0,1727710306709,e387e38700000002,ai.elimu.analytics,10,akili and me - music,VIDEO_OPENED,
0,1727710356608,e387e38700000002,ai.elimu.analytics,10,akili and me - music,VIDEO_COMPLETED,{'video_playback_position_ms': 17024}
0,1727710306709,e387e38700000002,ai.elimu.analytics,14,akili and me - counting compilation,VIDEO_OPENED,
0,1727710311434,e387e38700000002,ai.elimu.analytics,14,akili and me - counting compilation,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 40852}
0,1727711366844,e387e38700000002,ai.elimu.analytics,9,akili and me - jump jump jump,VIDEO_OPENED,
0,1727711394713,e387e38700000002,ai.elimu.analytics,9,akili and me - jump jump jump,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 23840}
0,1727711366844,e387e38700000002,ai.elimu.analytics,8,akili and me - family,VIDEO_OPENED,
0,1727711382639,e387e38700000002,ai.elimu.analytics,8,akili and me - family,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 43545}
0,1727711366844,e387e38700000002,ai.elimu.analytics,6,akili and me - letter f,VIDEO_OPENED,
0,1727711425421,e387e38700000002,ai.elimu.analytics,6,akili and me - letter f,VIDEO_COMPLETED,{'video_playback_position_ms': 56783}
0,1727711366845,e387e38700000002,ai.elimu.analytics,5,akili and me - letter e,VIDEO_OPENED,
0,1727711372684,e387e38700000002,ai.elimu.analytics,5,akili and me - letter e,VIDEO_COMPLETED,{'video_playback_position_ms': 3092}
0,1727711366845,e387e38700000002,ai.elimu.analytics,35,akili and me - letter k,VIDEO_OPENED,
0,1727711421832,e387e38700000002,ai.elimu.analytics,35,akili and me - letter k,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 11811}
0,1727711366845,e387e38700000002,ai.elimu.analytics,34,akili and me - letter j,VIDEO_OPENED,
0,1727711394680,e387e38700000002,ai.elimu.analytics,34,akili and me - letter j,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 59559}
0,1727711366846,e387e38700000002,ai.elimu.analytics,33,akili and me - letter i,VIDEO_OPENED,
0,1727711378294,e387e38700000002,ai.elimu.analytics,33,akili and me - letter i,VIDEO_COMPLETED,{'video_playback_position_ms': 35045}
0,1727711366846,e387e38700000002,ai.elimu.analytics,6,akili and me - letter f,VIDEO_OPENED,
0,1727711415905,e387e38700000002,ai.elimu.analytics,6,akili and me - letter f,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 9700}
0,1727711366846,e387e38700000002,ai.elimu.analytics,1,akili and me - letter a,VIDEO_OPENED,
0,1727711391733,e387e38700000002,ai.elimu.analytics,1,akili and me - letter a,VIDEO_COMPLETED,{'video_playback_position_ms': 17070}
Original file line number Diff line number Diff line change
@@ -1,37 +1,5 @@
id,timestamp,android_id,package_name,video_id,video_title,learning_event_type,additional_data
0,1727710308419,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727710338696,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_COMPLETED,{'video_playback_position_ms': 36610}
0,1727710308420,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727710317800,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_COMPLETED,{'video_playback_position_ms': 44516}
0,1727710308420,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727710323035,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 20036}
0,1727710308421,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727710344971,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_COMPLETED,{'video_playback_position_ms': 54628}
0,1727710308421,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727710322215,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_COMPLETED,{'video_playback_position_ms': 8047}
0,1727710308421,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727710325962,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_COMPLETED,{'video_playback_position_ms': 55016}
0,1727710308421,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727710337924,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_COMPLETED,{'video_playback_position_ms': 52213}
0,1727710308422,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727710331688,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_COMPLETED,{'video_playback_position_ms': 10909}
0,1727710308422,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727710328149,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 54020}
0,1727710308422,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727710346433,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 25283}
0,1727710308422,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727710364893,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 56527}
0,1727710308423,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727710318744,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_COMPLETED,{'video_playback_position_ms': 27253}
0,1727710308423,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727710352849,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 52847}
0,1727710308423,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727710359642,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_COMPLETED,{'video_playback_position_ms': 19517}
0,1727710308423,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727710310282,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 53747}
0,1727710308424,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727710312773,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 22918}
0,1727710308424,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727710337049,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_COMPLETED,{'video_playback_position_ms': 42383}
0,1727710308424,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727710339896,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_COMPLETED,{'video_playback_position_ms': 5633}
0,1727711369664,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727711420486,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 27946}
0,1727711369664,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727711383654,e387e38700000001,ai.elimu.analytics,1,piper,VIDEO_COMPLETED,{'video_playback_position_ms': 30871}
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
id,timestamp,android_id,package_name,video_id,video_title,learning_event_type,additional_data
0,1727710308450,e387e38700000002,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727710311661,e387e38700000002,ai.elimu.analytics,1,piper,VIDEO_COMPLETED,{'video_playback_position_ms': 38788}
0,1727710308450,e387e38700000002,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727710314452,e387e38700000002,ai.elimu.analytics,1,piper,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 19375}
0,1727710308451,e387e38700000002,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727710340291,e387e38700000002,ai.elimu.analytics,1,piper,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 36597}
0,1727710308451,e387e38700000002,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727710318549,e387e38700000002,ai.elimu.analytics,1,piper,VIDEO_COMPLETED,{'video_playback_position_ms': 41049}
0,1727710308451,e387e38700000002,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727710359681,e387e38700000002,ai.elimu.analytics,1,piper,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 23848}
0,1727711370481,e387e38700000002,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727711420825,e387e38700000002,ai.elimu.analytics,1,piper,VIDEO_COMPLETED,{'video_playback_position_ms': 41704}
0,1727711370481,e387e38700000002,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727711430131,e387e38700000002,ai.elimu.analytics,1,piper,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 54809}
0,1727711370481,e387e38700000002,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727711413430,e387e38700000002,ai.elimu.analytics,1,piper,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 5621}
0,1727711370481,e387e38700000002,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727711388381,e387e38700000002,ai.elimu.analytics,1,piper,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 52442}
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
id,timestamp,android_id,package_name,video_id,video_title,learning_event_type,additional_data
0,1727710308474,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727710317777,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 55214}
0,1727711371214,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727711385883,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 35238}
0,1727711371214,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727711417400,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_COMPLETED,{'video_playback_position_ms': 49995}
0,1727711371215,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727711385045,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_COMPLETED,{'video_playback_position_ms': 21515}
0,1727711371215,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727711404028,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_COMPLETED,{'video_playback_position_ms': 34949}
0,1727711371217,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727711429023,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_COMPLETED,{'video_playback_position_ms': 42637}
0,1727711371217,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727711413850,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_COMPLETED,{'video_playback_position_ms': 9913}
0,1727711371217,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727711380492,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 20704}
0,1727711371217,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727711415334,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_COMPLETED,{'video_playback_position_ms': 15377}
0,1727711371217,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727711422412,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_COMPLETED,{'video_playback_position_ms': 40435}
0,1727711371218,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727711415468,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 56767}
0,1727711371218,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727711390382,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_COMPLETED,{'video_playback_position_ms': 13780}
0,1727711371218,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727711395499,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 36152}
0,1727711371219,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727711406980,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 37553}
0,1727711371219,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_OPENED,
0,1727711400720,e387e38700000003,ai.elimu.analytics,1,piper,VIDEO_CLOSED_BEFORE_COMPLETION,{'video_playback_position_ms': 42048}
6 changes: 3 additions & 3 deletions simulate-video-learning-events.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def simulate_video_learning_event(android_id, videos_df: pandas.DataFrame, video
'learning_event_type': learning_event_types[0]
})

# A `VIDEO_OPENED_EVENT` should always be followed by a `VIDEO_CLOSED_BEFORE_COMPLETED` or
# a `VIDEO_COMPLETED` event.
# A `VIDEO_OPENED_EVENT` should always be followed by a `VIDEO_CLOSED_BEFORE_COMPLETED`
# event or a `VIDEO_COMPLETED` event.
second_learning_event_type = random.choice(learning_event_types[1:])

# Increase timestamp to simulate passage of time between the `VIDEO_OPENED` event and the
Expand All @@ -68,7 +68,7 @@ def simulate_video_learning_event(android_id, videos_df: pandas.DataFrame, video
'package_name': package_name,
'video_id': random_video.id,
'video_title': random_video.title,
'learning_event_type': random.choice(learning_event_types[-2:]),
'learning_event_type': second_learning_event_type,
'additional_data': {'video_playback_position_ms': random.randrange(1000, 60000)}
})

Expand Down

0 comments on commit 2e9c9d1

Please sign in to comment.