Skip to content
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

Merged
merged 16 commits into from
Oct 25, 2024

Conversation

olgaminaeva
Copy link
Collaborator

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.

@olgaminaeva olgaminaeva requested a review from gcroci2 October 22, 2024 22:56
@olgaminaeva olgaminaeva linked an issue Oct 22, 2024 that may be closed by this pull request
Copy link

github-actions bot commented Oct 22, 2024

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:

  • 🎯 correct output
  • 🖼️ correct figures
  • ❓ new warnings
  • ‼️ new errors

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:

 code-generation-optimization.md                    | 455 +++++++++++++++++++--
 config.yaml                                        |   6 +-
 ...efficiency.md => enhancing-coding-efficiency.md |  36 +-
 ...ns.md => ethical-and-security-considerations.md |   0
 fig/RAG.png (new)                                  | Bin 0 -> 82150 bytes
 fig/Tabnine_AI_logo.png (new)                      | Bin 0 -> 48816 bytes
 fig/amazon_Q_developer_logo.png (new)              | Bin 0 -> 26910 bytes
 fig/atmentions1.gif (new)                          | Bin 0 -> 2523143 bytes
 fig/chat_vscode_where_to_find.png (new)            | Bin 0 -> 150371 bytes
 fig/codeium_chat_best_practices.png (new)          | Bin 0 -> 431626 bytes
 fig/codeium_command_vscode.mp4 (new)               | Bin 0 -> 2836440 bytes
 fig/command.webp (new)                             | Bin 0 -> 9672 bytes
 fig/github_copilot_logo.png (new)                  | Bin 0 -> 414079 bytes
 fig/hugging_chat_logo.webp (new)                   | Bin 0 -> 5470 bytes
 files/genai_giulia.pptx (new)                      | Bin 0 -> 9037195 bytes
 files/~$genai_giulia.pptx (new)                    | Bin 0 -> 165 bytes
 ...ction-AI-coding.md => introduction-ai-coding.md |   7 +-
 md5sum.txt                                         |  10 +-
 18 files changed, 456 insertions(+), 58 deletions(-)
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

github-actions bot pushed a commit that referenced this pull request Oct 22, 2024
github-actions bot pushed a commit that referenced this pull request Oct 23, 2024
github-actions bot pushed a commit that referenced this pull request Oct 23, 2024
github-actions bot pushed a commit that referenced this pull request Oct 23, 2024
github-actions bot pushed a commit that referenced this pull request Oct 23, 2024
Copy link
Collaborator

@gcroci2 gcroci2 left a 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.

episodes/fig/at_mentions.png Outdated Show resolved Hide resolved
episodes/fig/best practices chat.png Outdated Show resolved Hide resolved
episodes/fig/codeium chat best practices.png Outdated Show resolved Hide resolved
episodes/code-generation-optimization.md Show resolved Hide resolved
github-actions bot pushed a commit that referenced this pull request Oct 23, 2024
@olgaminaeva olgaminaeva requested a review from gcroci2 October 25, 2024 12:47
github-actions bot pushed a commit that referenced this pull request Oct 25, 2024
github-actions bot pushed a commit that referenced this pull request Oct 25, 2024
@gcroci2 gcroci2 merged commit 773a5f5 into main Oct 25, 2024
3 checks passed
@gcroci2 gcroci2 deleted the episode-2-code-generation-and-optimization branch October 25, 2024 14:55
github-actions bot pushed a commit that referenced this pull request Oct 25, 2024
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
github-actions bot pushed a commit that referenced this pull request Oct 25, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

episode 2: Code generation and optimization
2 participants