Skip to content

Commit

Permalink
last minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gcroci2 committed Nov 22, 2024
1 parent 0efa3b7 commit 5190592
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions episodes/2-code-generation-optimization.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ In Codeium, code lenses appear right above your function and class definitions,

- **Docstring Generation**: For generating documentation, clicking the `Docstring` label automatically creates a docstring above your function header (or under the function header in Python). This AI-generated documentation will describe what the function does, helping you maintain well-documented, readable code. In Python, for example, the docstring will be correctly placed directly beneath the function header.

![](episodes/fig/command.webp){alt='Command'}

![](episodes/fig/docstring_python.mp4){alt='Docstring generation'}

::::::::::::::::::::::::::::::::::::: callout
Expand Down Expand Up @@ -108,8 +106,6 @@ Here are a few things to remember when using Command function of Codeium:

- For effective use, try to give clear and detailed prompts. While simple requests like “Fix this” or “Refactor” can work well due to context awareness, more specific instructions like “Write a function that takes two inputs of type `Diffable` and implements the Myers diff algorithm” can yield even better results.

![](episodes/fig/codeium_chat_best_practices.png){alt='Best Practices for Command'}

## Chat

The Codeium Chat feature offers a powerful way to interact with an AI assistant directly within your coding environment, providing instant, contextual feedback on the code. Unlike the Command function, Codeium Chat is designed for a more conversational and responsive interaction, making it easy to discuss complex coding questions and solutions. The base Chat model is available to all Codeium users and it is based on Meta’s [Llama 3.1 70B](https://ai.meta.com/blog/meta-llama-3-1/).
Expand Down Expand Up @@ -146,6 +142,8 @@ Good: Refactor @func:rawDataTransform by turning the while loop into a for loop

![](episodes/fig/best practices chat.png){alt='Best Practices for Chat'}

Note that these best practices apply to both Chat and Command modes, as they help Codeium understand your needs more effectively.

::::::::::::::::::::::::::::::::::::: callout

### 💡 Prompting Best Practices
Expand Down Expand Up @@ -581,11 +579,8 @@ plt.show()
**Comparison:**

- Combined the `pd.to_datetime` conversion and filtering steps into one.

- Removed the unnecessary `filtered_df['Year']` column and used the `dt.year` accessor to extract the year from the `'Date'` column.

- Simplified the plotting code by using the `plot` method of the Series object and removing the unnecessary `plt.figure` call.

- Removed the `label` parameter from the `plot` function, as it is not necessary when using the `plot` method of the Series object.

::::::::::::::::::::::::::::::::::::::::::::::::
Expand Down
Binary file removed episodes/fig/command.webp
Binary file not shown.
Binary file modified instructors/episode2.pptx
Binary file not shown.
Binary file removed instructors/~$episode2.pptx
Binary file not shown.

0 comments on commit 5190592

Please sign in to comment.