WARNING
If you're already familiar with git, virtual evnirorments and jupiter notebooks or you're not interested in it you should jump this guide.
WARNING 2
This guide is based on Linux systems. If you are using Windows something could be different. Anyway I'll try to insert refernces to the offical guides of the various tools used, so you can check the correct execution for your OS.
As well explained in the appostie page: https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository To dowload the repository you can open a terminal and use:
git clone [email protected]:BeeNick/ML_Exercises.git
Most Linux distributions came with python preinstalled, here the official page: https://www.python.org/
The exercises will be mainly in python, could be usefull set up an isolated envirorment to avoid conflicts with components of others projects wich can reqire different library versions.
To do so with python we can use virtualenv, to install virtualenv for your user you can type in the terminal:
python3 -m pip install --user -U virtualenv
And create an isolated python envirorment with:
python3 -m virtualenv mle_env
(where mle_env is the name of the new envirorment so choose wath you want)
Use:
source mle_env/bin/activate
to activate the envirorment.
While the envirorment is active any pachkage you install with pip will be installed in this isolated envriromrent. Use:
deactivate
to deactivate the envirorment.
Here the offical page: https://pypi.org/project/virtualenv/
To avoid tracing of virtual envirorment files you can create a .gitignore file and write in it the name of your virtual enviorment (that coincides with the related folder).
For our interest in this repository, the Jupiter (or IPython) notebook are essentially a way to simplify the report drafting for information generated by code exectution and make a sherable cool documented code.
Here the official page: https://jupyter.org/
To install jupiter notebook use:
python3 -m pip install -U notebook
To set up an apposite kernel for the notebook in the virtualenv:
python3 -m ipykernel install --user --name=mle_p3
To run the notebook use:
jupyter notebook
Then you should set gitignore to ignore hidden directories:
.*
!/.gitignore
I suggest to install also jupyterthemes to change the defautl theme with the one wich you are more comfortable with.
python3 -m pip install -U jupyterthemes
Show the available themes:
jt -l
Set a theme:
jt -t themename
Another advice is to install autopep8 extension to reformat the code according to PEP 8 Use:
python3 -m pip install autopep8