Skip to content

Commit

Permalink
markdown source builds
Browse files Browse the repository at this point in the history
Auto-generated via `{sandpaper}`
Source  : 9c9f62b
Branch  : main
Author  : Olga Minaeva <[email protected]>
Time    : 2024-10-28 11:48:15 +0000
Message : Merge pull request #3 from olgaminaeva/setup_gcroci2

add setup instructions
  • Loading branch information
actions-user committed Oct 28, 2024
1 parent a747bc7 commit a744cb0
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 54 deletions.
26 changes: 2 additions & 24 deletions 1-introduction-ai-coding.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,31 +47,8 @@ With a foundation of how AI models for coding assistants function — how they a

Now that we've compared some of the top AI coding assistants, you can see that each tool offers unique features and benefits. For this lesson, we’ll focus on teaching you how to use AI coding assistants with Codeium as our primary example. Codeium offers a powerful, beginner-friendly experience that helps you speed up coding through intelligent completions, refactoring suggestions, and support for multiple programming languages.

In the next section, we’ll walk through the steps to set up Codeium in your development environment, so you can start taking advantage of these features right away.

## Setting up Codeium ##

1. Make sure you have an Integrated Development Environment (IDE) installed on your computer. Go to [the Codeium download page](https://codeium.com/download) to see a list of supported IDEs and installation instructions. In the current lesson, we will be working in Visual Studio Code (VS Code), therefore, we recommend installing VS Code. You can download it from the [VS Code download page](https://code.visualstudio.com/Download).

2. You can follow the [Codeium installation instructions in VS Code](https://codeium.com/vscode_tutorial) on the official website.

3. Open Extension Marketplace: Open the Extension Marketplace, which is the icon with boxes on the primary sidebar in your VS Code.

4. Install Codeium: Type Codeium in the marketplace search bar, open up the page and click the blue Install button.

![](episodes/fig/install_extension.png)

5. Authorize: After installation is complete, you should be prompted by Visual Studio Code with a pop-up on the bottom right to authorize Codeium.
*If not, you should see an option to sign in to your Codeium account in the bottom left Accounts tab of your Visual Studio Code window.*
Click the Sign in with Auth to use Codeium option. Either method (popup or Accounts tab) should redirect you to the Codeium website.

6. Create Account: If you do not have a Codeium account yet, you will be redirected to create an account.

7. Sign In: If you are not signed in, please sign in with your account details. Once you sign in, you will be redirected back to Visual Studio Code via pop-up.
Click Open Visual Studio Code, which should redirect you back to Visual Studio Code.
*If you are using a browser-based IDE, instead of being redirected back with pop-up, you will be routed to instructions on how to complete authentication by providing an access token. Please follow these instructions instead of Step 6, and then continue on with "Using Codeium."*

8. All Done! You will be asked to confirm the authentication in Visual Studio Code (click Open in the resulting pop-up).
For setting up Codeium, you can follow the instructions on [this lesson's setup page](https://olgaminaeva.github.io/gen-ai-coding/#setting-up-codeium).

### Using Codeium as your Coding Assistant ###

Expand All @@ -83,6 +60,7 @@ In this lesson, we will learn about the three ways Codeium can assist with codin

**Command:** With Command, you can tell Codeium what changes you want to make to your code in plain language. Codeium will then suggest the changes, which you can choose to accept, reject, or adjust as needed.


::::::::::::::::::::::::::::::::::::: keypoints

- AI coding assistants work by combining ML, contextual code understanding, and NLP to help developers code faster and more efficiently.
Expand Down
5 changes: 5 additions & 0 deletions files/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
matplotlib
numpy
seaborn
pandas
notebook
4 changes: 2 additions & 2 deletions md5sum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"config.yaml" "790425e500d6378f12b71ef070346a1c" "site/built/config.yaml" "2024-10-28"
"index.md" "34399a5e151cea103c92aa7767f4c118" "site/built/index.md" "2024-09-13"
"links.md" "8184cf4149eafbf03ce8da8ff0778c14" "site/built/links.md" "2022-04-22"
"episodes/1-introduction-ai-coding.md" "891461968bb730cfdc090c382bad9d6f" "site/built/1-introduction-ai-coding.md" "2024-10-28"
"episodes/1-introduction-ai-coding.md" "52db45b4529b3ad3a03d990982d4c941" "site/built/1-introduction-ai-coding.md" "2024-10-28"
"episodes/2-code-generation-optimization.md" "018ae28b4d724c1150ec9d86c025e840" "site/built/2-code-generation-optimization.md" "2024-10-28"
"episodes/3-ethical-and-security-considerations.md" "5975f32200f6cc97a7ed79dd8ae4dc26" "site/built/3-ethical-and-security-considerations.md" "2024-10-28"
"instructors/instructor-notes.md" "d96cb9e76302dee237d0897fb5c1b1a7" "site/built/instructor-notes.md" "2024-09-13"
"learners/reference.md" "86cca05410972bf6feb3e65095c6c89b" "site/built/reference.md" "2024-10-23"
"learners/setup.md" "5456593e4a75491955ac4a252c05fbc9" "site/built/setup.md" "2024-01-26"
"learners/setup.md" "8293b26b3885f8ff2300885235fbcd73" "site/built/setup.md" "2024-10-28"
"profiles/learner-profiles.md" "60b93493cf1da06dfd63255d73854461" "site/built/learner-profiles.md" "2022-04-22"
90 changes: 62 additions & 28 deletions setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,87 @@
title: Setup
---

FIXME: Setup instructions live in this document. Please specify the tools and
the data sets the Learner needs to have installed.
For this lesson, the setup includes a coding environment, an AI coding assistant, and datasets for practical exercises.

## Code Editor

The recommended code editor for this lesson is Visual Studio Code, a popular code editor frequently used by researchers. You can download it from [the official website](https://code.visualstudio.com/). Follow the instructions on the website to install it on your operating system.

## Setting up Codeium

1. Make sure you have an Integrated Development Environment (IDE) installed on your computer. Go to [the Codeium download page](https://codeium.com/download) to see a list of supported IDEs and installation instructions. Visual Studio Code is on the list, so if you followed the previous step, you are all set.

2. Open Extension Marketplace: Open the Extension Marketplace, which is the icon with boxes on the primary sidebar in your VS Code.

3. Install Codeium: Type Codeium in the marketplace search bar, open up the page and click the blue Install button.

![](episodes/fig/install_extension.png)

4. Authorize: After installation is complete, you should be prompted by Visual Studio Code with a pop-up on the bottom right to authorize Codeium.
*If not, you should see an option to sign in to your Codeium account in the bottom left Accounts tab of your Visual Studio Code window.*
Click the Sign in with Auth to use Codeium option. Either method (popup or Accounts tab) should redirect you to the Codeium website.

5. Create Account: If you do not have a Codeium account yet, you will be redirected to create an account.

6. Sign In: If you are not signed in, please sign in with your account details. Once you sign in, you will be redirected back to Visual Studio Code via pop-up.
Click Open Visual Studio Code, which should redirect you back to Visual Studio Code.
*If you are using a browser-based IDE, instead of being redirected back with pop-up, you will be routed to instructions on how to complete authentication by providing an access token. Please follow these instructions instead of Step 6, and then continue on with "Using Codeium."*

7. All Done! You will be asked to confirm the authentication in Visual Studio Code (click Open in the resulting pop-up).

You can alternatively follow the [Codeium installation instructions in VS Code](https://codeium.com/vscode_tutorial) on the official website, which will guide you through the same steps.

## Data Sets

<!--
FIXME: place any data you want learners to use in `episodes/data` and then use
a relative link ( [data zip file](data/lesson-data.zip) ) to provide a
link to it, replacing the example.com link.
-->
Download the [data zip file](https://example.com/FIXME) and unzip it to your Desktop
For this lesson, we will work with datasets tracking atmospheric CO2 levels, specifically the Trends in Atmospheric Carbon Dioxide dataset, available [here](https://datahub.io/core/co2-ppm). This dataset, sourced from the U.S. Government's Earth System Research Laboratory, Global Monitoring Division, includes two primary series:

1. Mauna Loa Series – The longest continuous record of atmospheric CO₂ concentrations, dating back to 1958, from measurements at Mauna Loa Observatory in Hawaii.

2. Global Average Series – A calculated global average of atmospheric CO₂ levels from marine surface sites worldwide.

## Software Setup
During the exercises, we will download and analyze these datasets together, so there’s no need to prepare or download anything in advance.

::::::::::::::::::::::::::::::::::::::: discussion
## Setting Up Your Python Environment

### Details
### Installing Python

Setup for different systems can be presented in dropdown menus via a `spoiler`
tag. They will join to this discussion block, so you can give a general overview
of the software used in this lesson here and fill out the individual operating
systems (and potentially add more, e.g. online setup) in the solutions blocks.
For the practical exercises in this lesson, we will use Python. If Python isn't already installed on your system, download it from the [official Python website](https://www.python.org/downloads/) and follow the provided instructions for installation.

:::::::::::::::::::::::::::::::::::::::::::::::::::
### Setting Up a Virtual Environment

:::::::::::::::: spoiler
To ensure a consistent and isolated Python environment, we recommend using a virtual environment. Virtual environments allow you to manage dependencies specific to each project without affecting other Python projects or your global Python setup.

### Windows
Install [`virtualenv`](https://virtualenv.pypa.io/en/latest/installation.html) if it's not already available by running:

Use PuTTY
```bash
pip install virtualenv
```

::::::::::::::::::::::::
Alternatively, you can use `pipx` to manage `virtualenv` installation:

:::::::::::::::: spoiler
```bash
pipx install virtualenv
```

### MacOS
Then, in your project directory, you can create a virtual environment:

Use Terminal.app
```bash
python3 -m venv .venv
```

::::::::::::::::::::::::
This command will create a `.venv` folder in your current directory to store all environment-specific files.

To activate the virtual environment, you will use the following command:

:::::::::::::::: spoiler
- On Windows, run `.venv\Scripts\activate.bat`
- On macOS/Linux, run `source .venv/bin/activate`

### Linux
After activation, you should see the name of your environment (e.g., `.venv`) appear in your terminal prompt, indicating that the environment is active.

Use Terminal
Once the environment is activated, you can install the packages needed for this lesson. Run the following command to install the necessary dependencies:

::::::::::::::::::::::::
```bash
pip install -r https://raw.githubusercontent.com/olgaminaeva/gen-ai-coding/refs/heads/main/learners/files/requirements.txt
```

When you're finished with your work, after the end of this lesson, deactivate the virtual environment by typing `deactivate`. This will return you to your global Python environment.

0 comments on commit a744cb0

Please sign in to comment.