Initializing a Git repository

Virtual environment setup

To create a virtual environment for a new project:

To activate the virtual environment go to ./projectvenvname/scripts and then type activate.

For mac users, type source ./projectvenvname/bin/activate

At this point, you may be required to update your pip and install the latest Jupyter notebook. Type in the following command:

python -m pip install --upgrade pip

python -m pip install notebook

To add that virtual environment to Jupyter notebook:

python -m ipykernel install --user --name=projectvenvname

You can list all the virtual enviroments added to jupyter using the command (may be required to activate virtual env)

jupyter kernelspec list

To remove a virtual env from jupyter type:

jupyter kernelspec uninstall projectvenvname


References:

1) https://janakiev.com/blog/jupyter-virtual-envs/

2) https://towardsdatascience.com/creating-and-using-virtual-environment-on-jupyter-notebook-with-python-db3f5afdd56a

3) https://realpython.com/python-virtual-environments-a-primer/

How to git clone someone else's repo

We will refer to someone else's repository as the other repository.

    You can git commit as usual to your repository.

    Use git pull upstream main to pull changes from the other repository to your main branch.

Visual Code Shortcuts

Setting up git on macOS