Skip to content

Collection of theory, coding katas aka separated exercises with problems and solutions and algorithm challenges for Python, SQL, PyTorch, langraph, etc..

Notifications You must be signed in to change notification settings

amaldu/data-science-katas

Repository files navigation

Katas exercises for Data Science

Repo with katas for several data science topics and random exercises I stored on my computer for years

In order to work with the virtual environment created with Poetry and the jupyter notebooks follow the next steps:

1. Create and Activate the Poetry Environment

If you haven’t initialized the environment yet, run:

poetry install  # Create the environment and install dependencies
poetry shell

To verify the environment path:

poetry env info --path

2. Add the Kernel to Jupyter

poetry run python -m ipykernel install --user --name=myenv --display-name"name-to-display"

Replace name-to-display with a name that is easy to differentiate from the other environemts you work with

3. Select the Kernel in VSCode

  1. Open any notebook you want to work in
  2. Click on top right Select Kernel
  3. Find the name-to-display that you previously decided

Instructions on how to run server for SQL exercises

☝️ You need to install few things before:

  1. Docker
  2. Docker extension
  3. PostgreSQL extension

1. Open the docker-compose.yaml

⚠️ Before moving forward, check that the image version suits your environment and it's not from the Jurassic

2. Run the PostgreSQL container by clicking on ▷ Run service

3. Click on the Elephant (left bar) aka PostgreSQL extension

Add a new connection and fill the required fields with the values from docker-compose.yaml. Test & Save & Connect.

SQL connect server

4. Run the script migrate.py

poetry run python sql/migrate.py

Refresh localhost postgres and you should see them:

SQL tables

Remember that in order to execute the cells on jupyter nobook with SQL code you have to add %%sql at the begining

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •