Skip to content

Commit aeb90d4

Browse files
committed
Add session4 materials and align session2 solutions structure
1 parent 25b26ac commit aeb90d4

24 files changed

Lines changed: 1238 additions & 26 deletions

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,14 @@ You can also pull updates from the original repository (upstream) when new mater
2121

2222
## Sessions
2323

24-
- [Session 1 README](./session1/README.md)
25-
- [Session 2 README](./session2/README.md)
26-
- [Session 3 README](./session3/README.md)
24+
- [Session 1 README](./session1/README.md)
25+
Setup, Python fundamentals, loops/indexing, and CSV basics.
26+
- [Session 2 README](./session2/README.md)
27+
`csv.DictReader`, key-based data access, and practical data cleaning flow.
28+
- [Session 3 README](./session3/README.md)
29+
Iterators/generators, streaming vs loading, complexity, and intro RAG concepts.
30+
- [Session 4 README](./session4/README.md)
31+
Serial vs multiprocessing basics, process management, and `Pool`-based parallel image processing.
2732

2833
## Notes
2934

session2/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ By the end of Session 2, you should be able to:
1515
2. [Part 2](./session-02-part-02.md)
1616
3. [Part 3](./session-02-part-03.md)
1717
4. [Homework](./session-02-homework.md)
18-
5. Review your [solutions](./solutions/) after attempting tasks yourself.
19-
6. Practice with [quizzes](./quizzes/) when ready.
18+
5. Write your own work in [solutions](./solutions/).
19+
6. Review [reference solutions](./session_solutions/) only after attempting tasks yourself.
20+
7. Practice with [quizzes](./quizzes/) when ready.
2021

2122
### Notes
2223

2324
- Keep your own solutions in separate files inside `solutions/`.
2425
- Use exercise-style names in `solutions/` (for example `exercise-02-01.py`, `exercise-02-02.py`).
26+
- Reference answers are in `session_solutions/`.
2527
- Update this `README.md` with progress and notes.
2628
- Do not commit `.venv/` to GitHub.

session2/session-02-part-02.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ with open("movies.csv", "r") as file:
217217
218218
> [!TIP]
219219
>
220-
> What are the time and space complexities of this script? See solutions also
220+
> What are the time and space complexities of this script?
221221
>
222222
> <details>
223223
> <summary>Show answer</summary>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Session 2 Reference Solutions
2+
3+
This folder contains reference solution code provided by Stelios.
4+
5+
Write your own code first in `session2/solutions/`.
6+
Use these files only to check your approach after you complete each task.
7+
8+
## Files
9+
10+
- `exercise-02-01.py`: Part 2 solution script (DictReader practice + incomplete CSV handling)
11+
- `exercise-02-02.py`: Part 3 solution script (mini dictionary clean + CSV cleaning flow)
12+
- `exercise-02-homework.py`: Homework solution script (Gemini helper + AI-assisted dataset cleaning)
13+
- `movies_clean.json`: output generated by the mini dictionary example in `exercise-02-02.py`
14+
15+
## Notes
16+
17+
- Quiz content is intentionally excluded.
18+
- Run scripts from the `session2` folder so dataset-relative paths work.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

session2/solutions/README.md

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,11 @@
11
# Solutions
22

3-
Use this folder to save your solutions when working locally.
3+
Use this folder to save your own Session 2 solutions when working locally.
44

5-
## Files
5+
Suggested files:
66

7-
- `exercise-02-01.py`: Part 2 solution script (DictReader practice + incomplete CSV handling)
8-
- `exercise-02-02.py`: Part 3 solution script (mini dictionary clean + CSV cleaning flow)
9-
- `exercise-02-homework.py`: Homework solution script (Gemini black-box helper + AI-assisted dataset cleaning)
10-
- `movies_clean.json`: output generated by the mini dictionary example in `exercise-02-02.py`
7+
- `exercise-02-01.py`
8+
- `exercise-02-02.py`
9+
- `exercise-02-homework.py`
1110

12-
## Homework solution
13-
14-
- File: `exercise-02-homework.py`
15-
- Run from `session2/`:
16-
17-
```bash
18-
python3 solutions/exercise-02-homework.py
19-
```
20-
21-
- Output file: `studio_ghibli_movies_ai_clean.csv`
22-
23-
## Notes
24-
25-
- Run scripts from the `session2` folder so dataset-relative paths work.
11+
This folder is intentionally empty except for this README.

session4/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## Welcome to Session 4
2+
3+
### Learning goals
4+
5+
By the end of Session 4, you should be able to:
6+
7+
- explain serial execution vs process-based parallel execution
8+
- use `multiprocessing.Process` with `start()` and `join()`
9+
- use `multiprocessing.Pool` for cleaner parallel workflows
10+
- compare serial vs parallel performance on practical tasks
11+
12+
### Recommended order
13+
14+
1. [Part 1](./session-04-part-01.md)
15+
2. [Part 2](./session-04-part-02.md)
16+
3. Write your own work in [solutions](./solutions/).
17+
4. Review [reference solutions](./session_solutions/) only after attempting tasks yourself.
18+
5. Practice with [quizzes](./quizzes/) when ready.
19+
20+
### Notes
21+
22+
- Tutorial and warm-up material is included directly inside each part markdown file.
23+
- Keep your own solutions in separate files inside `solutions/`.
24+
- Use exercise-style names in `solutions/` (for example `exercise-04-01.py`, `exercise-04-02.py`).
25+
- Reference answers are in `session_solutions/`.
26+
- Use `if __name__ == "__main__":` in multiprocessing scripts.
27+
- If `requirements.txt` is missing, create it and add:
28+
- `requests==2.32.3`
29+
- `Pillow`
30+
- `quizmd`
31+
- Keep all dependencies in `requirements.txt`, then install with:
32+
- `pip install -r requirements.txt`

0 commit comments

Comments
 (0)