Skip to content

Commit e77134d

Browse files
committed
Updates to M01
1 parent 7e2d9dc commit e77134d

File tree

3 files changed

+291
-632
lines changed

3 files changed

+291
-632
lines changed

notebooks/M01_GettingStarted/M01_ImportHello.ipynb

+149-79
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,80 @@
3232
{
3333
"cell_type": "code",
3434
"execution_count": 2,
35-
"id": "c74a6f8c-6006-4d05-b8b6-dab3d1afd0f0",
35+
"id": "1f71bcb5-9fbf-41ea-ba8d-8b8ad0019e0b",
3636
"metadata": {
3737
"tags": []
3838
},
3939
"outputs": [],
4040
"source": [
4141
"data = []\n",
42-
"files = glob.glob(\"./hello/*_*.txt\")\n",
42+
"files = glob.glob(\"./hello/*_*.txt\")"
43+
]
44+
},
45+
{
46+
"cell_type": "code",
47+
"execution_count": 3,
48+
"id": "70f85b50-7275-4819-b0ac-566ffc84d24b",
49+
"metadata": {
50+
"tags": []
51+
},
52+
"outputs": [
53+
{
54+
"name": "stdout",
55+
"output_type": "stream",
56+
"text": [
57+
"21\n"
58+
]
59+
}
60+
],
61+
"source": [
62+
"print(len(files))"
63+
]
64+
},
65+
{
66+
"cell_type": "code",
67+
"execution_count": 4,
68+
"id": "3576e753-ce37-409d-ae52-9c3a6dd22834",
69+
"metadata": {
70+
"tags": []
71+
},
72+
"outputs": [],
73+
"source": [
74+
"n_students = 40"
75+
]
76+
},
77+
{
78+
"cell_type": "code",
79+
"execution_count": 5,
80+
"id": "e2f371fc-53e6-4053-b4a2-0bce5f4ebd58",
81+
"metadata": {
82+
"tags": []
83+
},
84+
"outputs": [
85+
{
86+
"data": {
87+
"text/plain": [
88+
"19"
89+
]
90+
},
91+
"execution_count": 5,
92+
"metadata": {},
93+
"output_type": "execute_result"
94+
}
95+
],
96+
"source": [
97+
"n_students - len(files)"
98+
]
99+
},
100+
{
101+
"cell_type": "code",
102+
"execution_count": 6,
103+
"id": "4a44ab38-4c3e-4e17-a5cc-da98f8a84f0d",
104+
"metadata": {
105+
"tags": []
106+
},
107+
"outputs": [],
108+
"source": [
43109
"for i, file in enumerate(files):\n",
44110
" sid = file.split(\"/\")[2].split(\"_\")[0]\n",
45111
" line = open(file, 'r').read().strip()\n",
@@ -49,7 +115,7 @@
49115
},
50116
{
51117
"cell_type": "code",
52-
"execution_count": 3,
118+
"execution_count": 7,
53119
"id": "d639031b-10ed-47ad-a3fd-87ddc9c91d74",
54120
"metadata": {
55121
"tags": []
@@ -61,7 +127,7 @@
61127
},
62128
{
63129
"cell_type": "code",
64-
"execution_count": 4,
130+
"execution_count": 8,
65131
"id": "9ec8280b-a44b-4cfa-bd40-9188012fa5a2",
66132
"metadata": {
67133
"tags": []
@@ -71,33 +137,47 @@
71137
"name": "stdout",
72138
"output_type": "stream",
73139
"text": [
74-
"00 | tar3kh | My name is Timothy Rodriguez and I recently watched and enjoyed Oppenhiemer\n",
140+
"00 | db5kb | I watched Godzilla minus One and it was a fun watch.\n",
141+
"\n",
142+
"01 | uwa6xv | The last movie I watched was Jurassic Park for the technical orientation.\n",
143+
"\n",
144+
"02 | sck4jh | Interstellar\n",
145+
"\n",
146+
"03 | ycv3fh | The most recent film I enjoyed would have to be the Barbie movie.\n",
147+
"\n",
148+
"04 | ki5rb | The most recent movie I watched and enjoyed was Godzilla Minus One.\n",
75149
"\n",
76-
"01 | fxj5fe | The most recent film I watched and enjoyed was Napoleon.\n",
150+
"05 | ia5qk | The most recent movie I enjoyed was a modern bollywood love story called Rocky Aur Rani.\n",
77151
"\n",
78-
"02 | zsf9pd | I recently watched the movie Oppenheimer.\n",
152+
"06 | rca2t | I saw Barbie and I thought it was good.\n",
79153
"\n",
80-
"03 | ia5qk | The most recent movie I enjoyed was a modern bollywood love story called Rocky Aur Rani.\n",
154+
"07 | cbv6gd | I watched Dogtooth recently and really enjoyed it.\n",
81155
"\n",
82-
"04 | rca2t | I saw Barbie and I thought it was good.\n",
156+
"08 | uts4gf | Hello! My name is Olivia Kantor. My favorite movie I've seen recently is Boys In the Boat.\n",
83157
"\n",
84-
"05 | ycv3fh | The most recent film I enjoyed would have to be the Barbie movie.\n",
158+
"09 | dfe2zj | my first class file\n",
85159
"\n",
86-
"06 | dfe2zj | my first class file\n",
160+
"10 | qzu3js | Question: What is the most recent film you watched and enjoyed? Answer: The most recent film which I have enjoyed recently is Mission Impossible: Dead Reckoning Part One.\n",
87161
"\n",
88-
"07 | qzu3js | Question: What is the most recent film you watched and enjoyed? Answer: The most recent film which I have enjoyed recently is Mission Impossible: Dead Reckoning Part One.\n",
162+
"11 | qfw3cr | The last movie that I saw was Remember the Titans with Denzel Washington\n",
89163
"\n",
90-
"08 | djz6nn | I watched killers of the flower moon and like it.\n",
164+
"12 | nge4py | I enjoyed watching Mario on Netflix with my kids\n",
91165
"\n",
92-
"09 | uts4gf | Hello! My name is Olivia Kantor. My favorite movie I've seen recently is Boys In the Boat.\n",
166+
"13 | rah5ff | The last movie I saw was Saltburn, it definitely got weird!\n",
93167
"\n",
94-
"10 | cbv6gd | I watched Dogtooth recently and really enjoyed it.\n",
168+
"14 | zsf9pd | I recently watched the movie Oppenheimer.\n",
95169
"\n",
96-
"11 | sck4jh | Interstellar\n",
170+
"15 | ctx8bn | The most recent film I watched and enjoyed was Burlesque.\n",
97171
"\n",
98-
"12 | dss2q | What is the most recent film you watched and enjoyed? The Green Knight (2021).\n",
172+
"16 | tar3kh | My name is Timothy Rodriguez and I recently watched and enjoyed Oppenhiemer\n",
99173
"\n",
100-
"13 | db5kb | I watched Godzilla minus One and it was a fun watch.\n",
174+
"17 | fxj5fe | The most recent film I watched and enjoyed was Napoleon.\n",
175+
"\n",
176+
"18 | mxg9xv | \n",
177+
"\n",
178+
"19 | djz6nn | I watched killers of the flower moon and like it.\n",
179+
"\n",
180+
"20 | dss2q | What is the most recent film you watched and enjoyed? The Green Knight (2021).\n",
101181
"\n"
102182
]
103183
}
@@ -116,31 +196,28 @@
116196
"\n",
117197
"This and the following table were extracted by ChatGPT.\n",
118198
"\n",
119-
"| No. | Movie Title | Occurrences | Parenthetic Information |\n",
120-
"|-----|---------------------------------------|-------------|-----------------------------------|\n",
121-
"| 19 | Avatar: Way of Water | 1 | |\n",
122-
"| 5 | Air | 1 | |\n",
123-
"| 22 | Across the Spiderverse | 1 | |\n",
124-
"| 10 | Barbie | 2 | |\n",
125-
"| 15 | Django Unchained | 1 | |\n",
126-
"| 17 | Harry Potter | 1 | |\n",
127-
"| 21 | Harry Potter and the Half-Blood Prince| 1 | |\n",
128-
"| 14 | Heart of Stone | 1 | |\n",
129-
"| 16 | Jailer | 1 | |\n",
130-
"| 6 | Jurassic Park | 1 | |\n",
131-
"| 2 | Mayday Air Disaster | 1 | This is a series, not a movie |\n",
132-
"| 4 | Oppenheimer | 6 | |\n",
133-
"| 12 | One Piece Film: Red | 1 | |\n",
134-
"| 7 | Pulp Fiction | 1 | |\n",
135-
"| 20 | Red Notice | 1 | |\n",
136-
"| 11 | Shawshank Redemption | 1 | |\n",
137-
"| 18 | Star Trek | 1 | 2009 release |\n",
138-
"| 1 | The Martian | 1 | |\n",
139-
"| 9 | The Highwaymen | 1 | |\n",
140-
"| 13 | The little things | 1 | |\n",
141-
"| 3 | The Other Guys | 1 | |\n",
142-
"| 8 | Scream 5 | 1 | |\n",
143-
"| 23 | Yeh Jawaani Hai Deewani | 1 | |"
199+
"Here's the table showing the movie titles and their respective counts:\n",
200+
"\n",
201+
"| Movie Title | Count |\n",
202+
"|-------------------------------------------------|-------|\n",
203+
"| Godzilla Minus One | 2 |\n",
204+
"| Jurassic Park | 1 |\n",
205+
"| Interstellar | 1 |\n",
206+
"| Barbie | 2 |\n",
207+
"| Rocky Aur Rani | 1 |\n",
208+
"| Dogtooth | 1 |\n",
209+
"| Boys In the Boat | 1 |\n",
210+
"| Mission Impossible: Dead Reckoning Part One | 1 |\n",
211+
"| Remember the Titans | 1 |\n",
212+
"| Mario | 1 |\n",
213+
"| Saltburn | 1 |\n",
214+
"| Oppenheimer | 2 |\n",
215+
"| Burlesque | 1 |\n",
216+
"| Napoleon | 1 |\n",
217+
"| Killers of the Flower Moon | 1 |\n",
218+
"| The Green Knight | 1 |\n",
219+
"\n",
220+
"This table provides a clear and structured overview of the movie titles mentioned in the text and how many times each was referenced."
144221
]
145222
},
146223
{
@@ -150,40 +227,33 @@
150227
"source": [
151228
"# Student and Title\n",
152229
"\n",
153-
"| No. | User Code | Content | Movie Title |\n",
154-
"|-----|-----------|------------------------------------------------------------------------------------------------------------------|---------------------------------------|\n",
155-
"| 00 | ssl6np | The most recent film I watched and enjoyed was The Martian | The Martian |\n",
156-
"| 01 | nrg6cb | ... 'Mayday Air Disaster' series recently ... | Mayday Air Disaster |\n",
157-
"| 02 | qqx3eh | | |\n",
158-
"| 03 | yhp7nq | The last movie I watched was The Other Guys. | The Other Guys |\n",
159-
"| 04 | waa4bq | ... last movie I saw was Oppenheimer, I really enjoyed watching Air. | Oppenheimer, Air |\n",
160-
"| 05 | xuw9ap | ... most recent movie I watched and enjoyed was Oppenheimer | Oppenheimer |\n",
161-
"| 06 | zh8war | Baki | |\n",
162-
"| 07 | csl5hw | The most recent film I enjoyed is Oppenheimer. | Oppenheimer |\n",
163-
"| 08 | clotane | The most recent film I enjoyed is Oppenheimer. | Oppenheimer |\n",
164-
"| 09 | aalbaran | I recently watched Jurassic Park. | Jurassic Park |\n",
165-
"| 10 | atferentinos | ... Recently, I watched \"Pulp Fiction\" ... | Pulp Fiction |\n",
166-
"| 11 | aqsaxm | ... I recently watched Scream 5. | Scream 5 |\n",
167-
"| 12 | tds8tv | I recently watched and enjoyed Oppenheimer | Oppenheimer |\n",
168-
"| 13 | rtt4fb | ... The most recent movie I have watched and enjoyed is The Highwaymen ... | The Highwaymen |\n",
169-
"| 14 | rmd9ev | ... The most recent film I watched and enjoyed was Barbie. ... | Barbie |\n",
170-
"| 15 | bdj9wf | ... most recent movie that I watched and enjoyed was Shawshank Redemption, ... | Shawshank Redemption |\n",
171-
"| 16 | gshoriz | Most recent film I watched and enjoyed is One Piece Film: Red | One Piece Film: Red |\n",
172-
"| 17 | haq3wm | ... What is the most recent film you watched and enjoyed?\\ The little things featuring Denzel Washington | The little things |\n",
173-
"| 18 | vvk6rd | The most recent film I watched and enjoyed is heart of stone | Heart of Stone |\n",
174-
"| 19 | wfn8aj | ... I have recently watched the movie “Django Unchained” ... | Django Unchained |\n",
175-
"| 20 | qzx7av | ... The most recent film I watched was called Jailer. | Jailer |\n",
176-
"| 21 | krb3ym | Oppenheimer | Oppenheimer |\n",
177-
"| 22 | uay3yb | ... most recent film you watched and enjoyed? Harry Potter | Harry Potter |\n",
178-
"| 23 | dkr5ud | Star Trek (the 2009 release) | Star Trek |\n",
179-
"| 24 | rn7ena | ... I just watched Avatar: Way of Water ... | Avatar: Way of Water |\n",
180-
"| 25 | 141654114| I'm Eric. I really like Oppenheimer. | Oppenheimer |\n",
181-
"| 26 | sbv5dn | ... re-watched the movie Red Notice on Netflix ... | Red Notice |\n",
182-
"| 27 | mbf4ay | ... The most recent film I have watched and enjoyed is Oppenheimer. | Oppenheimer |\n",
183-
"| 28 | dja8tx | Harry Potter and the Half-Blood Prince | Harry Potter and the Half-Blood Prince|\n",
184-
"| 29 | aec4hr | The most recent film I watched and enjoyed was across the spiderverse. | Across the Spiderverse |\n",
185-
"| 30 | hve2ku | ... I have seen Oppenheimer 3 and half times now ... | Oppenheimer |\n",
186-
"| 31 | jrr4n | ... re-watched the movie \"Yeh Jawaani Hai Deewani\" ... | Yeh Jawaani Hai Deewani |"
230+
"Here's the table created from the original block of text, with an added column for the normalized movie names:\n",
231+
"\n",
232+
"| ID | User | Comment | Normalized Movie Name |\n",
233+
"|----|--------|--------------------------------------------------------------|-----------------------------------------------|\n",
234+
"| 00 | db5kb | I watched Godzilla minus One and it was a fun watch. | Godzilla Minus One |\n",
235+
"| 01 | uwa6xv | The last movie I watched was Jurassic Park for... | Jurassic Park |\n",
236+
"| 02 | sck4jh | Interstellar | Interstellar |\n",
237+
"| 03 | ycv3fh | The most recent film I enjoyed would have to be the Barbie...| Barbie |\n",
238+
"| 04 | ki5rb | The most recent movie I watched and enjoyed was Godzilla... | Godzilla Minus One |\n",
239+
"| 05 | ia5qk | The most recent movie I enjoyed was a modern bollywood... | Rocky Aur Rani |\n",
240+
"| 06 | rca2t | I saw Barbie and I thought it was good. | Barbie |\n",
241+
"| 07 | cbv6gd | I watched Dogtooth recently and really enjoyed it. | Dogtooth |\n",
242+
"| 08 | uts4gf | Hello! My name is Olivia Kantor. My favorite movie I've... | Boys In the Boat |\n",
243+
"| 09 | dfe2zj | my first class file | None |\n",
244+
"| 10 | qzu3js | Question: What is the most recent film you watched and... | Mission Impossible: Dead Reckoning Part One |\n",
245+
"| 11 | qfw3cr | The last movie that I saw was Remember the Titans with... | Remember the Titans |\n",
246+
"| 12 | nge4py | I enjoyed watching Mario on Netflix with my kids | Mario |\n",
247+
"| 13 | rah5ff | The last movie I saw was Saltburn, it definitely got weird! | Saltburn |\n",
248+
"| 14 | zsf9pd | I recently watched the movie Oppenheimer. | Oppenheimer |\n",
249+
"| 15 | ctx8bn | The most recent film I watched and enjoyed was Burlesque. | Burlesque |\n",
250+
"| 16 | tar3kh | My name is Timothy Rodriguez and I recently watched... | Oppenheimer |\n",
251+
"| 17 | fxj5fe | The most recent film I watched and enjoyed was Napoleon. | Napoleon |\n",
252+
"| 18 | mxg9xv | | None |\n",
253+
"| 19 | djz6nn | I watched killers of the flower moon and like it. | Killers of the Flower Moon |\n",
254+
"| 20 | dss2q | What is the most recent film you watched and enjoyed?... | The Green Knight |\n",
255+
"\n",
256+
"This table includes the ID, user, their comment, and the normalized movie name extracted from each comment."
187257
]
188258
},
189259
{
@@ -197,7 +267,7 @@
197267
],
198268
"metadata": {
199269
"kernelspec": {
200-
"display_name": "base",
270+
"display_name": "Python 3 (ipykernel)",
201271
"language": "python",
202272
"name": "python3"
203273
},
@@ -211,7 +281,7 @@
211281
"name": "python",
212282
"nbconvert_exporter": "python",
213283
"pygments_lexer": "ipython3",
214-
"version": "3.11.5"
284+
"version": "3.11.4"
215285
},
216286
"widgets": {
217287
"application/vnd.jupyter.widget-state+json": {

0 commit comments

Comments
 (0)