SLIDE 1
set list tuple set set() Sets methods .intersection() - - PowerPoint PPT Presentation
set list tuple set set() Sets methods .intersection() - - PowerPoint PPT Presentation
set list tuple set set() Sets methods .intersection() .union() .difference() set sets methods .add() .update() .remove() .discard() list comprehension lists generators generator list next() list list list list 1 - 1 -
SLIDE 2
SLIDE 3
SLIDE 4
set
SLIDE 5
list tuple set
set()
SLIDE 6
Sets methods .intersection() .union() .difference()
SLIDE 7
set sets methods .add() .update() .remove() .discard()
SLIDE 8
list comprehension lists
SLIDE 9
generators generator list next()
SLIDE 10
list list
SLIDE 11
list list
SLIDE 12
SLIDE 13
SLIDE 14
1
SLIDE 15
1
SLIDE 16
SLIDE 17
class class attributes Class methods class
- 1. Created a class in a saved script;
- 2. Launched the script in the shell;
SLIDE 18
class class attributes Class methods class
I can access attributes of my class by using the proper syntax.
SLIDE 19
attributes
SLIDE 20
function class
SLIDE 21
SLIDE 22
class self.year None
SLIDE 23
__str__ special function
SLIDE 24
__str__ special function
SLIDE 25
special function __dict__
SLIDE 26
special functions
- bject.__str__(self)
- bject.__dict__(self)
- bject.__del__(self)
- bject.__hash__(self)
- bject.__repr__(self)
- bject.__bytes__(self)
- bject.__format__(self)
special functions
SLIDE 27
SLIDE 28
exceptions
SLIDE 29
SLIDE 30
handle exception try-except
SLIDE 31
handle exceptions
SLIDE 32
SLIDE 33
Lambdas functions anonymous functions Lambdas function lambda function
SLIDE 34
Lambdas attributes functions
SLIDE 35
SLIDE 36
Map function list
SLIDE 37
lists list
SLIDE 38
lists list list
sum len
SLIDE 39
lists list list
sum len
list comprehension
SLIDE 40
for map
sum len
SLIDE 41
for list comprehension map
- for while
- As little as possible
SLIDE 42
Filter function filter function numbers_list lambda function module operator x%2
SLIDE 43
filter list strings
SLIDE 44
SLIDE 45
Python Python Anaconda
Python
libraries pip tcl/tk
- ther
SLIDE 46
libraries pip tcl/tk
- ther
> pip --version > pip 18.1 > pip install matplotlib > # to install something > py -2 –m pip install matplotlib > # …selecting the right version of Py > pip install --upgrade matplotlib > # to install and upgrade something
SLIDE 47
libraries pip tcl/tk
- ther
pip tcl/tk
SLIDE 48
pip tcl/tk
SLIDE 49
Python Python
SLIDE 50
$ virtualenv –p /usr/bin/python3.6 «my_project» $ source ‘path/to/env/bin/activate’ (my_project) user@localhost:~$
… do things in the environment…
(my_project) user@localhost:~$ deactivate $ > virtualenv –p /usr/bin/python3.6 «my_project» > ‘path/to/env/Script/activate’ (my_project) C://path/to/env >
… do things in the environment…
(my_project) C://path/to/env > deactivate >
py -3 -m venv «my_project»
SLIDE 51
SLIDE 52
SLIDE 53
… …
SLIDE 54
Repository Working copy
SLIDE 55
SLIDE 56
Git
SLIDE 57
SLIDE 58
$ git config --global user.name "[my username]" $ git config --global user.email "[my email address]"
SLIDE 59
$ git init # I initialized my folder as a local repository $ git clone git://github.com/link_to_project.git # I copy inside my local repository a perfect copy of the remote repository … hours of work on the code … $ git add . # my code is now in the staging area ready to be confirmed and committed into my local repository $ git commit -m ‘Added support to X functionality‘ # I committed my code to the local repository $ git push origin master # I uploaded the content of my local repository to the remote repository
SLIDE 60
git init git clone [url] git add [file] git add . git commit –m "[message]" git push [alias] [branch] git pull
SLIDE 61