Introduction to Python
Agenda
Anaconda
Anaconda
Jupyter
PyCharm
PyCharm
PyCharm
Git
Git
Structure
Flow
545.06K

0_Before You Start update

1. Introduction to Python

BEFORE YOU START

2. Agenda

• Anaconda
• Jupyter
• PyCharm
• Git

3.

Anaconda

4. Anaconda

Source - https://www.anaconda.com/
Anaconda distribution comes with over 250 packages automatically installed, and over 8,000 additional open-source
packages can be installed from PyPI as well as the conda package and virtual environment manager.
Anaconda Navigator

5. Anaconda

1.
2.
3.
4.
5.
6.
7.
8.
Load conda from - https://www.anaconda.com/
Run it
Run terminal
Type `conda create --name python-lab python=3.9` (type `y` when asked)
After successful creation, type `conda activate python-lab`
Type `conda install jupyter` (type `y` when asked)
Type `conda install -c conda-forge numpy=1.22.3 pandas=1.4.2 gensim=4.1.2` (type `y` when asked)
SUCCESS
For more information, Manage environments.

6.

Jupyter

7. Jupyter

Project Jupyter is a non-profit, open-source project, born out of the IPython Project in 2014.
To run Jupyter notebook, just type `Jupyter notebook` in your conda terminal. Please make
sure that a proper conda environment is activated.
After that, you will be able to browse your root folder and create a notebook.

8.

PyCharm

9. PyCharm

Source - https://www.jetbrains.com/pycharm/
Install PyCharm Community Edition (if you have your own Professional one, it’s okay ;-) )
After successful installation, go to the repo folder and right-click on it choosing
Interpreter Setting: Python -> Settings -> Python Interpreter

10. PyCharm

In a drop-down menu, click `Show All…`. If you do not see `python-lab`, click on ‘+’, then
choose ‘Conda Environment`, click on ‘Existing environment’
If the suggested environment is not ‘python-lab’, you will need to browse to find interpreter
for one. Just click on ‘…’ button and browse Anaconda environments to find necessary
`python.exe` file. Usually, it can be found here:
Users/<User>/Anaconda/envs/python-lab/python.exe
After that, close all windows by clicking on all OKs.

11. PyCharm

If everything is okay, you should see the similar window:

12.

Git

13. Git

In this module you will work with GITHUB accounts.
Please use your PRIVATE repository from STAGE 1 and invite mentor from the file shared in Teams.
If for some reason you have not yet sent invitations to the coordinators before this stage, please also invite:
Hanna Gorskoviene (hannapetrashka), Viktoriya Shapkarina (ViktoriyaSh) as Collaborator
The name of your account should include your name and surname to easily find you.

14. Git

Source - https://git-scm.com/
Install Git. Please do make sure that `Git from command line and also 3rd party software` is
picked as well as integration with Windows Explorer (for quicker launch of Git Bash).
On your local machine, go to the folder where the project will reside.
Right-click and choose `Git Bash Here`.
In the command line, run `git clone https://github.com/alcahir/Python-Course.git`
After cloning is finished, you should go into the repo and create your own branch by running:
`git checkout -b <FirstName_LastName>` for your personal credentials.

15. Structure

16. Flow

For your home-tasks I recommend to use simple GitHub flow:
1.Create a Branch: from the main branch (main or master), create a branch with a meaningful name: <module_name><task_number>.
2.Complete the task on this branch. Commit changes with clear messages.
3.Push your branch to the remote repository: git push origin <branch-name>.
4.Create a Pull Request (PR) from your branch to the main branch. Include a clear description of the changes.
5.Address any comments by committing further changes to the same branch.
6.Once a PR approved(by mentor) and merged (by you or mentor ), the branch can be deleted. Do not reuse the branch for other
tasks.
IMPORTANT: Submitting a pull request confirms that you have completed the homework task and allows the mentor to begin reviewing it.
Links:
https://andersenlab.org/dry-guide/latest/github/
https://docs.github.com/en/get-started/using-github/github-flow
https://www.geeksforgeeks.org/git-flow-vs-github-flow/
English     Русский Rules