Skip to content

Commit b34e5b3

Browse files
authored
Merge pull request #5 from elimu-ai/3-simulate-videolearningevents
Simulate video learning events
2 parents dd42276 + f512afa commit b34e5b3

File tree

93 files changed

+448
-29658
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+448
-29658
lines changed

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "pip" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "daily"
12+
open-pull-requests-limit: 2
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Simulate events (daily)
2+
3+
on:
4+
schedule:
5+
- cron: 59 11 * * *
6+
7+
jobs:
8+
simulate_events:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Set up Python 3.10
14+
uses: actions/setup-python@v3
15+
with:
16+
python-version: "3.11"
17+
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install flake8
22+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
23+
24+
- name: Lint with flake8
25+
run: |
26+
# stop the build if there are Python syntax errors or undefined names
27+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
28+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
29+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
30+
31+
- name: Simulate VideoLearningEvents
32+
run: |
33+
python simulate-video-learning-events.py
34+
35+
- name: Git Config
36+
run: |
37+
git config user.name 'Nya Ξlimu'
38+
git config user.email '[email protected]'
39+
- name: Git Commit
40+
run: |
41+
git add **/*.csv
42+
git commit -m 'chore(ml): simulate events' --allow-empty
43+
- name: Git Push
44+
run: |
45+
git push
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Simulate events
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
simulate_events:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.9", "3.10", "3.11"]
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v3
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install flake8
27+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
28+
29+
- name: Lint with flake8
30+
run: |
31+
# stop the build if there are Python syntax errors or undefined names
32+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
33+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
34+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
35+
36+
- name: Simulate VideoLearningEvents
37+
run: |
38+
python simulate-video-learning-events.py

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.venv

README.md

Lines changed: 4 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,10 @@
1-
# DataGeneratorSimulator
2-
It will generate usage and performance data from user.
1+
# ML: Event Simulator
32

4-
## Tutorial
5-
*[Building a Data-Driven Education System](http://www2.datainnovation.org/2016-data-driven-education.pdf)
6-
7-
*[Enhancing Teaching and Learning Through Educational Data Mining and Learning Analytics](https://tech.ed.gov/wp-content/uploads/2014/03/edm-la-brief.pdf)
8-
9-
10-
# Focus two major areas:
11-
## Content Analytics
12-
13-
Are teachers using the best possible content? This level of data analysis takes a deeper dive to better inform the design of new course content and understand its impact (or lack thereof) on students.
14-
15-
## Learning Analytics
16-
17-
Game-based learning and adaptive learning systems are growing in use. This technology is designed to build statistical models of student knowledge, tracking their progress in order to personalize the learning experience.
18-
19-
## Requirement
20-
21-
pip install python-testdata
22-
23-
24-
## Examples
25-
We integrate the awsome fake-factory package to generate data using FakeData,
26-
this allows us to usage data event:
27-
* id
28-
* deviceId
29-
* studentId
30-
* packageName
31-
* literacySkill
32-
* and much much more
33-
34-
lets create a very simple factory that generates Users:
3+
## Simulate `VideoLearningEvent`s
354

365
```python
37-
import testdata
38-
import datetime
39-
40-
class Usage(testdata.DictFactory):
41-
id = testdata.CountingFactory(10)
42-
deviceId = testdata.CountingFactory(10)
43-
studentId = testdata.CountingFactory(10)
44-
packageName = testdata.RandomSelection(['Literacy', 'Game', 'Speech'])
45-
literacySkill = testdata.RandomLengthStringFactory()
46-
numeracySkill = testdata.RandomLengthStringFactory()
47-
letter = testdata.RandomLengthStringFactory()
48-
number = testdata.RandomLengthStringFactory()
49-
word = testdata.RandomLengthStringFactory()
50-
51-
for usage in Usage().generate(10): # let say we only want 10 users
52-
print usage
53-
#{'numeracySkill': 'PwBiXKjwddG', 'studentId': 17, 'word': 'XctugWiHPobIvHNGEbYlgyOUuuqCSKgoTFAhJSQzUUleDEkygyZOWBnGYiLBXbywpwxAsisToqDDWGPHQqbOOlmGVVa', 'packageName': 'Literacy', 'number': 'IrtJUAxnFVOQyvvqlpIsmkaWnRvADBzWBiCYUPvfSwvdHS', 'literacySkill': 'hSQSRXUevpdYMGAs', 'deviceId': 17, 'letter': 'JYuWfonIdptbdpFhBNhLIkLoyhuUgRUvdiUWBcfReeezORAtXhJvNuLZASFeRCAvxvPgOeTZ', 'id': 17}
54-
#{'numeracySkill': 'ozTpqAwdLstMzeijgJBGYMLantLSMESfYEBMQQxkjILBgNXohBjMbwqrhGsnjoSlcsCGOnTsdgMICQfB', 'studentId': 18, 'word': 'CnhxwMonHnMlEtxcpGowQymEeZtxvlUBDaKHEKRC', 'packageName': 'Literacy', 'number': 'xkerlJLhlyOgsTxHqMPffjPLOqbjgZqtggGzxPTkOleoZtEaDiYnpKxrouCcgRPjdtf', 'literacySkill': 'VlEeAOKKOIgweFTxBeNiOWmoztGPWSqhsIxTr', 'deviceId': 18, 'letter': 'NwJUuHLOkaJHsIvlSQeggfT', 'id': 18}
55-
#{'numeracySkill': 'uaUQunGtHwrFTuRlVrhwEUisIWlcrZXUZKIlILoPoCgnVWHwrrRaHhxQJVnECUtSvppzQDtpiqUSds', 'studentId': 19, 'word': 'vOTlRRgSXwgmXAthOYnQTTtPJyGxGbbMOj', 'packageName': 'Game', 'number': 'bDmhALNhnmazlonmBIjvwWzXgQfPQQekWJErEvJjWWHrufxuINyHuNiLPvFWynVwdNTaTGIgvvGCAqFRZ', 'literacySkill': 'BpfiZyRAzovNbEhtznPSaqsaZhRkFHlWNpmbzBXKCmBJPnuYiQyEToMaOkVJOVZKNCCAyGpZSpGhfseBMfGaFvltHaJyfcdota', 'deviceId': 19, 'letter': 'nvwanqC', 'id': 19}
6+
pip install -r requirements.txt
7+
python simulate-video-learning-events.py
568
```
579

5810
---

dashboard/LICENSE.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

dashboard/README.md

Lines changed: 0 additions & 118 deletions
This file was deleted.

dashboard/assets/css/animate.min.css

Lines changed: 0 additions & 6 deletions
This file was deleted.

dashboard/assets/css/bootstrap.min.css

Lines changed: 0 additions & 5 deletions
This file was deleted.

dashboard/assets/css/demo.css

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)