Python 3: From None to Machine Learning¶
- Title
Python 3: from None to Machine Learning
- Author
Matt Harasymczuk
- Language
English
- ISBN
978-83-957186-2-5
- Year
2015-2022
- Online Access
- License
Creative Commons Attribution-ShareAlike 4.0 International License
Big Picture¶

Note¶
For consulting or training course requests please email matt@astrotech.io
Before training course please setup your environment
More information in Install
About¶
Agenda¶
Agenda
- 1. Agenda
- 1.1. Python: Basics
- 1.2. Python: Intermediate (level 1)
- 1.3. Python: Intermediate (level 2)
- 1.4. Python: Advanced
- 1.5. Python: Design Patterns
- 1.6. Python: Test Driven Development
- 1.7. Python: DevOps, CI/CD
- 1.8. Python: Performance Optimization
- 1.9. Python: Data Science and Analysis
- 1.10. Python: Numpy
- 1.11. Python: Pandas
- 1.12. Python: Microservices
- 1.13. Python: Django
- 1.14. Python: FastAPI
- 1.15. Python: Flask
- 1.16. Python: Graphical User Interface
Agenda¶
Agenda
- 1.1. Python: Basics
- 1.2. Python: Intermediate (level 1)
- 1.3. Python: Intermediate (level 2)
- 1.4. Python: Advanced
- 1.5. Python: Design Patterns
- 1.6. Python: Test Driven Development
- 1.7. Python: DevOps, CI/CD
- 1.8. Python: Performance Optimization
- 1.9. Python: Data Science and Analysis
- 1.10. Python: Numpy
- 1.11. Python: Pandas
- 1.12. Python: Microservices
- 1.13. Python: Django
- 1.14. Python: FastAPI
- 1.15. Python: Flask
- 1.16. Python: Graphical User Interface
Install¶
Install
- 1. Install
- 1.1. Wymagania szkolenia
- 1.2. Wymagania dodatkowe dla szkoleń Data Science
- 1.3. Wymagania dodatkowe dla szkoleń Machine Learning
- 1.4. Czy można korzystać z pakietu Anaconda?
- 1.5. Czy można korzystać ze swojego komputera?
- 1.6. Czy szkolenie zacznie lub skończy się wcześniej?
- 1.7. Czy szkolenie będzie nagrywane?
- 1.8. Jaka jest wymagana dostępność?
- 1.9. Jak będzie wyglądało monitorowanie postępu?
- 1.10. Jakie środowisko programistyczne?
- 1.11. Czy mogę korzystać z innego IDE niż PyCharm?
- 1.12. Czy dostanę materiały do szkolenia?
- 1.13. Jaką jakość mają materiały?
- 1.14. Czy będą zadania praktyczne?
- 1.15. Czy konieczne jest konto na Github?
- 2. Install Python
- 3. Install Git
- 4. Install Github
- 5. Install IDE
- 6. Install Project
- 7. Install Doctest
Python Basics¶
Python Basics
- 1. About
- 2. Syntax
- 3. Types
- 4. Iterables
- 5. Mappings
- 6. Conditional
- 7. Exception
- 8. Loops
- 9. Comprehensions
- 9.1. Comprehension About
- 9.2. Comprehension List
- 9.3. Comprehension Set
- 9.4. Comprehension Dict
- 9.5. Comprehension Tuple
- 9.6. Comprehension Map
- 9.7. Comprehension Filter
- 9.8. Generator Expression
- 9.9. Comprehension Nested
- 9.10. Comprehension All, Any
- 9.11. Comprehension Conditionals
- 9.12. Comprehension Performance
- 10. Files
- 11. Functions
- 12. Object Oriented Programming
- 12.1. OOP Class Define
- 12.2. OOP Class Instance
- 12.3. OOP Attribute About
- 12.4. OOP Attribute Define
- 12.5. OOP Attribute Set
- 12.6. OOP Attribute Get
- 12.7. OOP Init Define
- 12.8. OOP Init Setattr
- 12.9. OOP Init Validation
- 12.10. OOP Method About
- 12.11. OOP Method Parameters
- 12.12. OOP Method Arguments
- 12.13. OOP Methods and Attributes
- 12.14. OOP Methods and Methods
- 12.15. OOP Stringify About
- 12.16. OOP Stringify Str
- 12.17. OOP Stringify Repr
- 12.18. OOP Inheritance About
- 12.19. OOP Inheritance Inherit
- 12.20. OOP Inheritance Overload
- 12.21. OOP Inheritance Super
- 12.22. OOP Inheritance Patterns
- 12.23. OOP Architecture Rationale
- 12.24. OOP Architecture Class Diagram
- 13. Recap
Python Intermediate¶
Python Intermediate
- 1. About
- 2. Unpack
- 3. Enum
- 4. Match
- 5. Type Annotation
- 5.1. Type Annotation Basics
- 5.2. Type Annotation Primitives
- 5.3. Type Annotation Sequences
- 5.4. Type Annotation Mapping
- 5.5. Type Annotation Sequences
- 5.6. Type Annotation TypedDict
- 5.7. Type Annotation NamedTuple
- 5.8. Type Annotation Callable
- 5.9. Type Annotation Types
- 5.10. Type Annotation Extra
- 5.11. Type Annotation Deprecated
- 5.12. Type Annotation Check
- 5.13. Type Annotation Annotate
- 5.14. Type Annotation Cython
- 5.15. Type Annotation Mypyc
- 6. Dataclass
- 6.1. Dataclass About
- 6.2. Dataclass Define Basic
- 6.3. Dataclass Define Special
- 6.4. Dataclass Define Nested
- 6.5. Dataclass Mechanism
- 6.6. Dataclass Postinit
- 6.7. Dataclass Mutable Attrs
- 6.8. Dataclass Field
- 6.9. Dataclass Metadata
- 6.10. Dataclass Parameters
- 6.11. Dataclass Helpers
- 6.12. Dataclass Inheritance
- 6.13. Dataclass Introspect
- 7. JSON
- 8. CSV
- 9. Regular Expressions
- 9.1. Syntax About
- 9.2. Syntax Qualifier
- 9.3. Syntax Anchor
- 9.4. Syntax Negation
- 9.5. Syntax Identifier
- 9.6. Syntax Quantifier
- 9.7. Syntax Group
- 9.8. Syntax Flag
- 9.9. Syntax Look Ahead/Behind
- 9.10. Syntax Flavors
- 9.11. Syntax Use Cases
- 9.12. RE Match
- 9.13. RE Search
- 9.14. RE Findall, Finditer
- 9.15. RE Compare
- 9.16. RE Compile
- 9.17. RE Group
- 9.18. RE Multiline
- 9.19. RE Substitute
- 9.20. RE Split
- 9.21. RE Lazy
- 9.22. RE Type Annotation
- 9.23. Regex Cheatsheet
- 10. Datetime and Timezones
- 11. Operator
- 11.1. Operator String About
- 11.2. Operator String Str
- 11.3. Operator String Repr
- 11.4. Operator String Format
- 11.5. Operator String Operators
- 11.6. Operator Arithmetic About
- 11.7. Operator Left
- 11.8. Operator Increment
- 11.9. Operator Right
- 11.10. Operator Comparison
- 11.11. Operator Comparison
- 11.12. Operator Contains
- 11.13. Operator Boolean
- 11.14. Operator Module
- 11.15. Operator Builtin
- 11.16. Operator Accessors
- 11.17. Operator Numerical
- 12. Modules and Packages
- 13. Logging
- 14. Mathematics
- 15. Tests
Python Advanced¶
Python Advanced
- 1. About
- 2. Syntax
- 3. Generators
- 4. Functional Programming
- 4.1. FuncProg About
- 4.2. FuncProg Scope
- 4.3. FuncProg Pure Functions
- 4.4. FuncProg Recurrence
- 4.5. FuncProg Immutable
- 4.6. FuncProg First-class Functions
- 4.7. FuncProg Higher-Order
- 4.8. FuncProg Referential Transparency
- 4.9. FuncProg Namespace
- 4.10. FuncProg Function Attributes
- 4.11. FuncProg Functools
- 4.12. FuncProg Callable
- 4.13. Pattern Closure
- 4.14. Pattern Callback
- 4.15. FuncProg Lambda
- 4.16. Pattern MapReduce
- 4.17. Pattern Maybe
- 5. Decorators
- 5.1. Decorator About
- 5.2. Decorator Types
- 5.3. Decorator Wrapper
- 5.4. Decorator About Object
- 5.5. Decorator About Arguments
- 5.6. Decorate Function
- 5.7. Decorate Stacked
- 5.8. Decorate Method
- 5.9. Decorate Class
- 5.10. Decorator Function
- 5.11. Decorator Method
- 5.12. Decorator Class
- 5.13. Decorator Arguments
- 5.14. Decorator Stdlib Functools
- 5.15. Decorator Recap
- 6. Object Oriented Programming
- 6.1. OOP Attribute Mutable/Immutable
- 6.2. OOP Attribute ClassVar
- 6.3. OOP Attribute Access Modifiers
- 6.4. OOP Attribute Slots
- 6.5. OOP Method About
- 6.6. OOP Method Access Modifiers
- 6.7. OOP Method Staticmethod
- 6.8. OOP Method Classmethod
- 6.9. OOP Inheritance Patterns
- 6.10. OOP Inheritance Problems
- 6.11. OOP Inheritance Overload
- 6.12. OOP Inheritance Super
- 6.13. OOP Inheritance MRO
- 6.14. OOP Abstract Interface
- 6.15. OOP Abstract Class
- 6.16. OOP Abstract Protocol
- 6.17. OOP Abstract Polymorphism
- 6.18. OOP Object Relations
- 6.19. OOP Object Identity
- 6.20. OOP Object Constructor
- 6.21. OOP Class Factory
- 6.22. OOP Class Metaclass
- 7. Protocols
- 8. Performance
- 9. Concurrency
- 9.1. About
- 9.2. AsyncIO About
- 9.3. AsyncIO Awaitable
- 9.4. AsyncIO Coroutine
- 9.5. AsyncIO Sleep
- 9.6. AsyncIO Run
- 9.7. AsyncIO Wait
- 9.8. AsyncIO Wait For
- 9.9. AsyncIO Task
- 9.10. AsyncIO Future
- 9.11. AsyncIO Shield
- 9.12. AsyncIO Debug
- 9.13. AsyncIO Event Loop
- 9.14. AsyncIO Queue
- 9.15. AsyncIO Stream
- 9.16. AsyncIO Synchronization
- 9.17. AsyncIO Iterator
- 9.18. AsyncIO Iterator
- 9.19. AsyncIO Comprehensions
- 9.20. AsyncIO Context Manager
- 9.21. AsyncIO 3rd Party
- 9.22. Multiprocessing About
- 9.23. Multiprocessing Server
- 9.24. Multiprocessing Client
- 9.25. Multiprocessing 3rd Party
- 9.26. Threading About
- 9.27. Threading Timer
- 9.28. Threading Queues
- 9.29. Threading Create
- 9.30. Threading Synchronization
- 9.31. Threading Join
- 9.32. Threading Worker
- 10. Recap
Database¶
Database
- 1. About
- 2. Theory
- 3. Normalization
- 4. NoSQL
- 5. SQL
- 5.1. SQL About
- 5.2. SQL Data Types
- 5.3. SQL Constraints
- 5.4. SQL Table
- 5.5. SQL Index
- 5.6. SQL Insert
- 5.7. SQL Update
- 5.8. SQL Delete
- 5.9. SQL Transaction
- 5.10. SQL Select From
- 5.11. SQL Select Limit
- 5.12. SQL Select Order By
- 5.13. SQL Select Where
- 5.14. SQL Select Group By
- 5.15. SQL Select Subquery
- 5.16. SQL Select Distinct
- 5.17. SQL Select Functions
- 5.18. SQL Join
- 5.19. SQL Injection
- 5.20. SQL Use Cases
- 6. SQLite3
- 7. SQLAlchemy
- 7.1. SQLAlchemy About
- 7.2. Connection DSN
- 7.3. Connection Engine
- 7.4. Connection Pool
- 7.5. Core Model
- 7.6. Core Operators
- 7.7. Core Insert
- 7.8. Core Select
- 7.9. Core Result
- 7.10. Core Update
- 7.11. Core Delete
- 7.12. Core Join
- 7.13. Core Text
- 7.14. Core Introspect
- 7.15. ORM About
- 7.16. Connection Session
- 7.17. Model Base
- 7.18. Model Define
- 7.19. Model Column
- 7.20. Model Types
- 7.21. Model Indexes
- 7.22. Model Relations
- 7.23. Model Dataclass
- 7.24. Schema Metadata
- 7.25. Schema Reflection
- 7.26. Migration About
- 7.27. Migration Create
- 7.28. Migration Apply
- 7.29. Migration Rollback
- 7.30. Query About
- 7.31. Query Fetch
- 7.32. Query Filter
- 7.33. Query Limit
- 7.34. Query Order By
- 7.35. Query Group By
- 7.36. Query Subquery
- 7.37. Query Union
- 7.38. Query Join
- 7.39. Query Count
- 7.40. Query Distinct
- 7.41. Query Exists
- 7.42. Query Update
- 7.43. Query Delete
- 7.44. Query Execute
- 7.45. Query Debug
- 7.46. Query Profile
- 7.47. Func About
- 7.48. Func Date
- 7.49. Func Group
- 7.50. Func Numeric
- 7.51. Func Count
- 7.52. Func Count
- 7.53. SQLAlchemy Extensions
- 7.54. Case Study
- 7.55. SQLAlchemy Use Cases
- 8. Case Study
Design Patterns¶
Design Patterns
- 1. About
- 2. UML
- 3. Idiom
- 4. Type Annotation
- 4.1. Type Annotation Basics
- 4.2. Type Annotation Primitives
- 4.3. Type Annotation Sequences
- 4.4. Type Annotation Mapping
- 4.5. Type Annotation Sequences
- 4.6. Type Annotation TypedDict
- 4.7. Type Annotation NamedTuple
- 4.8. Type Annotation Callable
- 4.9. Type Annotation Types
- 4.10. Type Annotation Extra
- 4.11. Type Annotation Deprecated
- 4.12. Type Annotation Check
- 4.13. Type Annotation Annotate
- 4.14. Type Annotation Cython
- 4.15. Type Annotation Mypyc
- 5. Dataclass
- 5.1. Dataclass About
- 5.2. Dataclass Define Basic
- 5.3. Dataclass Define Special
- 5.4. Dataclass Define Nested
- 5.5. Dataclass Mechanism
- 5.6. Dataclass Postinit
- 5.7. Dataclass Mutable Attrs
- 5.8. Dataclass Field
- 5.9. Dataclass Metadata
- 5.10. Dataclass Parameters
- 5.11. Dataclass Helpers
- 5.12. Dataclass Inheritance
- 5.13. Dataclass Introspect
- 6. Operator
- 6.1. Operator String About
- 6.2. Operator String Str
- 6.3. Operator String Repr
- 6.4. Operator String Format
- 6.5. Operator String Operators
- 6.6. Operator Arithmetic About
- 6.7. Operator Left
- 6.8. Operator Increment
- 6.9. Operator Right
- 6.10. Operator Comparison
- 6.11. Operator Comparison
- 6.12. Operator Contains
- 6.13. Operator Boolean
- 6.14. Operator Module
- 6.15. Operator Builtin
- 6.16. Operator Accessors
- 6.17. Operator Numerical
- 7. Object Oriented Programming
- 7.1. OOP Attribute Mutable/Immutable
- 7.2. OOP Attribute ClassVar
- 7.3. OOP Attribute Access Modifiers
- 7.4. OOP Method About
- 7.5. OOP Method Access Modifiers
- 7.6. OOP Method Staticmethod
- 7.7. OOP Method Classmethod
- 7.8. OOP Inheritance Patterns
- 7.9. OOP Inheritance Problems
- 7.10. OOP Inheritance Overload
- 7.11. OOP Inheritance Super
- 7.12. OOP Inheritance MRO
- 7.13. OOP Abstract Interface
- 7.14. OOP Abstract Class
- 7.15. OOP Abstract Protocol
- 7.16. OOP Abstract Polymorphism
- 7.17. OOP Object Identity
- 7.18. OOP Object Constructor
- 8. Protocols
- 9. Decorators
- 9.1. Decorator About
- 9.2. Decorator Types
- 9.3. Decorator Wrapper
- 9.4. Decorator About Object
- 9.5. Decorator About Arguments
- 9.6. Decorate Function
- 9.7. Decorate Stacked
- 9.8. Decorate Method
- 9.9. Decorate Class
- 9.10. Decorator Function
- 9.11. Decorator Method
- 9.12. Decorator Class
- 9.13. Decorator Arguments
- 9.14. Decorator Stdlib Functools
- 9.15. Decorator Recap
- 10. Behavioral
- 11. Structural
- 12. Creational
- 13. Practices
- 14. Paradigms
Numpy¶
Pandas¶
Pandas
- 1. About
- 2. Import & Export
- 3. Series
- 4. DataFrame
- 4.1. DataFrame Create
- 4.2. DataFrame Attributes
- 4.3. DataFrame Index
- 4.4. DataFrame Sample
- 4.5. DataFrame Getitem
- 4.6. DataFrame Slice
- 4.7. DataFrame At
- 4.8. DataFrame Loc
- 4.9. DataFrame Select
- 4.10. DataFrame Query
- 4.11. DataFrame Update
- 4.12. DataFrame Alter
- 4.13. DataFrame NA
- 4.14. DataFrame Sort
- 4.15. DataFrame Statistics
- 4.16. DataFrame Rolling
- 4.17. DataFrame Mapping
- 4.18. DataFrame Pivot
- 4.19. DataFrame Group By
- 4.20. DataFrame Aggregations
- 4.21. DataFrame Join
- 4.22. DataFrame Plotting
- 5. Date
- 6. Recap
- 7. Case Studies
- 7.1. API Gmail Stats
- 7.2. CSV COVID-19
- 7.3. CSV Phones
- 7.4. Excel AATC Sensors
- 7.5. HTML Apollo 11
- 7.6. HTML ESA Astronauts
- 7.7. HTML ESPN Standings
- 7.8. HTML Livescores Standings
- 7.9. HTML NBA Standings
- 7.10. HTML Per Capita
- 7.11. HTML Plan Zajec
- 7.12. HTML Talary
- 7.13. JSON Coinbase
- 7.14. PDF E-Toll
Matplotlib¶
Stdlib¶
DevOps¶
DevOps
- 1. About
- 2. Good Engineering Practices
- 3. Tests
- 4. Debugging
- 5. Type Annotation
- 6. CI/CD
- 6.1. CI/CD Devtools Ecosystem
- 6.2. CI/CD Python
- 6.3. Flit
- 6.4. Tests
- 6.5. CI/CD Tools
- 6.6. Wheel
- 6.7. CI/CD Pipelines
- 6.8. Linters
- 6.9. Behavioral Testing
- 6.10. Code Style
- 6.11. Code Coverage
- 6.12. Internationalization
- 6.13. DB Schema Migration
- 6.14. Distributing
- 6.15. Security
- 6.16. Smoke Tests
- 6.17. Static Code Analysis
- 6.18. Test Automation
- 6.19. Type Checking
- 6.20. UI testing
- 6.21. Mutation Testing
Network¶
Network
- 1. About
- 2. Protocols
- 3. Web
- 3.1. HTTP using stdlib
- 3.2.
http.HTTPStatus
- 3.3.
urllib
- 3.4.
http.server
- 3.5.
http.client
- 3.6. Connecting
- 3.7. GET Request
- 3.8. GET Request in chunks
- 3.9. GET Request to Not Existing Resource
- 3.10. HEAD Request
- 3.11. POST Request
- 3.12. Basic Auth
- 3.13. Assignments
- 3.14. HTTP using
requests
- 3.15. HTML Scrapping
- 3.16. HTTP Frameworks
- 3.17. FastAPI
- 3.18. Templates with
Jinja2
- 3.19. PaaS - Platform as a Service
- 3.20. Asynchronous processing
- 3.21. SOAP and WSDL
- 4. Transport
HTTP and Microservices¶
HTTP and Microservices
- 1. About
- 2. HTTP Protocol
- 3. Microservices
- 3.1. Microservices About
- 3.2. Microservices Architecture
- 3.3. Microservices Distributed Systems
- 3.4. Microservice Reactive
- 3.5. Microservice Cloud
- 3.6. Microservice API
- 3.7. Microservice Problems
- 3.8. Microservice Event
- 3.9. Microservice Lifecycle
- 3.10. Microservices Choreography
- 3.11. Microservice Discovery
- 3.12. Microservice Runtime
- 3.13. Microservice Database
- 3.14. Microservices Good Practices
- 4. Auth
Django¶
FastAPI¶
FastAPI
- 1. About
- 2. FastAPI
- 2.1. FastAPI About
- 2.2. FastAPI Install
- 2.3. FastAPI Architecture
- 2.4. FastAPI Schema
- 2.5. FastAPI Documentation
- 2.6. FastAPI GET
- 2.7. FastAPI POST
- 2.8. FastAPI Status
- 2.9. FastAPI Cookies
- 2.10. FastAPI Headers
- 2.11. FastAPI Files
- 2.12. FastAPI WebSockets
- 2.13. FastAPI Config
- 2.14. FastAPI Dependencies
- 2.15. FastAPI Routers
- 2.16. FastAPI Middleware
- 2.17. FastAPI Background Tasks
- 3. Pydantic
- 4. Database
- 5. Auth
- 6. DevOps
- 7. Use Cases
- 8. Appendix
Data Science¶
Data Science
Machine Learning¶
Object Oriented Programming¶
Object Oriented Programming
Blogposts¶
Blogposts
Dragon¶
Dragon
- 1. Dragon v1.0
- 2. Dragon v2.0
- 3. Dragon v3.0
- 4. ADR Template
- 5. Dragon ADR Init Name
- 6. Dragon ADR Init Position
- 7. Dragon ADR Position Set
- 8. Dragon ADR Position Change
- 8.1. Problem
- 8.2. Option 1
- 8.3. Option 2
- 8.4. Option 3
- 8.5. Option 4
- 8.6. Option 5
- 8.7. Option 6
- 8.8. Option 7
- 8.9. Option 8
- 8.10. Option 9
- 8.11. Option 10
- 8.12. Option 11
- 8.13. Option 12
- 8.14. Option 13
- 8.15. Option 14
- 8.16. Option 15
- 8.17. Option 16
- 8.18. Option 17
- 8.19. Option 18
- 8.20. Option 19
- 8.21. Option 20
- 8.22. Option 21
- 8.23. Option 22
- 8.24. Option 23
- 8.25. Option 24
- 8.26. Option 25
- 8.27. Option 26
- 8.28. Option 27
- 8.29. Option 28
- 8.30. Decision
- 9. Dragon ADR Damage Make
- 10. Dragon ADR Damage Take