-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Episode 2 code generation and optimization #14
Conversation
Thank you!Thank you for your pull request 😃 🤖 This automated message can help you check the rendered files in your submission for clarity. If you have any questions, please feel free to open an issue in {sandpaper}. If you have files that automatically render output (e.g. R Markdown), then you should check for the following:
Rendered Changes🔍 Inspect the changes: https://github.com/olgaminaeva/gen-ai-coding/compare/md-outputs..md-outputs-PR-14 The following changes were observed in the rendered markdown documents:
What does this mean?If you have source files that require output and figures to be generated (e.g. R Markdown), then it is important to make sure the generated figures and output are reproducible. This output provides a way for you to inspect the output in a diff-friendly manner so that it's easy to see the changes that occur due to new software versions or randomisation. ⏱️ Updated at 2024-10-25 14:50:02 +0000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Exercise 1: adjust the text in order to instruct students about which website we will take the data from, and which file/s we will use for the exercises.
- Exercise 2: consider that they will have the csv file already read in the
df
variable. We decided to replace the exercise with something more along these lines:
naive way
avg_int = []
for i in range(df.shape[0]):
avg_int.append(df.iloc[i]['Average'] - df.iloc[i]['Interpolated'])
df['Avg-Int'] = avg_int
more elegant and optimized way:
df['Avg-Int_opt'] = df.apply(lambda x: x['Average'] - x['Interpolated'], axis=1)
assert df['Avg-Int'].equals(df['Avg-Int_opt'])
- Exercise 3: right now, there is not bug. Modify this accordingly.
Auto-generated via `{sandpaper}` Source : 773a5f5 Branch : main Author : Giulia Crocioni <[email protected]> Time : 2024-10-25 14:54:59 +0000 Message : Merge pull request #14 from olgaminaeva/episode-2-code-generation-and-optimization Episode 2 code generation and optimization
Auto-generated via `{sandpaper}` Source : ba84616 Branch : md-outputs Author : GitHub Actions <[email protected]> Time : 2024-10-25 14:55:41 +0000 Message : markdown source builds Auto-generated via `{sandpaper}` Source : 773a5f5 Branch : main Author : Giulia Crocioni <[email protected]> Time : 2024-10-25 14:54:59 +0000 Message : Merge pull request #14 from olgaminaeva/episode-2-code-generation-and-optimization Episode 2 code generation and optimization
My VS Code stopped working, so I'm not sure if the exercises 2 and 3 are actually working. Also, I'm a novice at Python, so I'd appreciate your corrections or improvements.