---
title: Running Snowflake in Visual Studio Code
---
# Snowflake in Visual Studio Code
One of the downsides of solving the Jupyter Notebook with Snowflake in the browser is the lack of code auto-complete supported by common IDEs like VScode, PyCharm, etc. Also, you will also have to download the solved notebook before submitting it.
By solving the notebook localy you can overcome these issues, however you won't have the GPU Hardware for the more computationally demanding tasks in some notebooks.
To solve this problem, you can connect to the Snowflake cluster and select the kernel in VScode, which will allow you to work locally while having access to Snowsflake's hardware.
To achieve this, perform the following steps:
## 1. Connect to Snowflake Cluster
Follow the steps explained at this [link](https://hackmd.io/@FzDZ9kehQuSArsJfzbjFbw/Skt3WP26a).
Once done, you should see this in the terminal. 
Remember, that the marked URL is what you post in the browser to access your Snowflake Cluster and it will be important to connect the cluster to VScode.
## 2. Download the Notebook
First, go to HODL FS25 [webpage](https://disco.ethz.ch/courses/hodl/), and download the notebook.
Click on the shown link the course webpage.

Now click at the blue download button.

## 3. Open Notebook in VSCode
Use VSCode to open the recently downloaded Notebook.


Now, we proceed with kernel selection.
## 4. Select Kernel
You now need to select the Kernel that will run the code written in the Jupyter Notebook code blocks.
You can do this by either using the `Select Kernel` button on the top right.

or by typing the command `>Notebook: Select Notebook Kernel `

Now you select `Existing Jupyter Server...`

It will ask for you to up the URL of the Jupyter Kernel, which is the URL marked in step 1. Copy and Paste it here.

Wait for it to recognize the name ofthe cluster, then confirm.

Select the proposed Python Environment.

The top right corner of the screen should now the selected kernel.

## 4. Sanity Check
To be sure that you are able to access the cluster hardware, run the following cell
```python
import torch
device = "cuda" if torch.cuda.is_available() else "cpu"
print(device)
```
This should print `'cuda'`, since this means you are accessing to Nvidia CUDA enabled GPU's from the cluster.
## 5. Conclusion
Thats all and have fun solving the notebooks.