- Installing python 3.7
- Installing PyCharm IDE
- Instaling Jupyter notebook
- Getting familiar with command line
-
PyCharm 2020.2
-
Python 3.7
-
On Mac it is called terminal
-
It is file management system
-
Whatever you can do with your mouse, you can do with command line
-
Every file on PC has path, which uniquely describes it
-
Meaning that using path we can do everything what we can perform using mouse
- open, close, delete, rename, move
-
Root directory
-
Why is directory important?
- We can open files from current directory by calling just its name
- We can open file from other directory, but its path should be specified
-
Types of file path:
- Absolute
- Relative
-
Absolute file path tells us where particular file is located relative to root directory
-
Relative file path tells us where particular file is located relative to some other directory
-
What is system path?
- Programs stored in folders that are in system path, can be opened by simply calling their names regardless of folder (file path) we are currently located in !!!
-
All files stored in system pathS must have unique name !!!
- What is necessary to run file on command line?
- What we need to specify?
- Using which program we want to open specific file.
- What specific file we want to open.
- What activities we can perform on cmd/terminal?
- What is workflow?
- Traveling from one place to another (from one folder to another)
- Opening files from some specific place
- Renaming, deleting, moving files
- pwd present working directory
- ls list files from present working directory
- cd change directory
- cp copy
- mv move
- cd .. go one folder back
- cd present working directory
- dir list files from present working directory
- cd change directory
- copy copy
- move move
- cd .. go one folder back
-
Be very careful !
-
On command line, you can really make a mess
-
It is just one command from totally destroying PC
-
Example
- Create txt file on desktop
- Open it using notepad
- Type on cmd ‘notepad filepath’
-
Command line / terminal
-
Using IDEs
-
Using jupyter
- Simplest way to run commands
- Just open terminal and type ‘python’
- It will work if you included python in system path
- No support in writing code
- Someone who knows all syntax by heart, or
- Someone who perfectly knows building blocks and know how to combine different elements into useful and meaningful unit/module.
- (Some elements of creativity is required).
- An IDE is as important for developer as a calculator for a mathematician.
- Autocomplete
- Documentation
- Syntax highlight and validation
- Debugging
- Refactoring
- Code generation
- VCS
- Learning syntax by heart
- Learning over-specific and narrowly specialised functions and methods
-
Give us opportunity to focus on important and general things.
-
Provide us with tools to query documentation fast.
-
Release burden of learning language syntax by heart.
-
Give us possibility to choose from!
-
We are going to use both programs/editors
-
PyCharm is the best product in the market and for most of the tasks it is 5 places in front of its competition
-
Jupyter is becoming more and more popular (PyCharm Professional has Jupyter notebook integrated within IDE)
-
Also, jupyter is good for visualisation and presentations
-
But still, jupyter lacks most of intellisense features
-
Pay attention at ‘include as system variable’. It should be checked.
-
Python should be in system variables.
-
Just follow the steps: ‘next, next…finish’
-
Doesn’t have to be included in system path variables
-
Open command line
-
Type: ‘pip install jupyter’
- Editor
- Console
- Project window
- Variable explorer
- Quick documentation
- Function/class implementation details
- Parameter info
- Find class/function by name i.e. auto import
- Debugging
- Version control
- Find and replace
- Rename
- Refactor code
- Syntax highlight
- Find usage
-
Mac shortcuts
- Shift + command + I
- Option + J
- Command + P
- Control + space space
- control+alt+t
-
Windows shortcuts
- Control + shift + I
- Control + Q
- Control + P
- Control + space space
- option+command+t
-
command+tab
-
command+tab-tab
-
Don’t be afraid of making mistakes.
-
Python errors are going to become your second nature.
-
Google is going to be your best friend.
- VScode
- Eclipse
- Visual studio
- Xcode
- Jupyter lab
-
How to see what libraries you have installed?
- Command: pip list
- Storing data into variables.
- Thank you for your most valuable resource, your time.