- 1. Python Other
- 2. PyPi - Python Package Index
- 2.1. What is PyPi?
- 2.2. pip
- 2.3. Configure pip on Windows to avoid SSL issues
- 2.4. Upgrade pip
- 2.5. Upgrade PIP on Windows
- 2.6. PYTHONPATH
- 2.7. Requirements
- 2.8. Virtualenv
- 3. Python Web server
- 3.1. Hello world web
- 3.2. Dump web environment info
- 3.3. Web echo
- 3.4. Web form
- 3.5. Resources
- 4. Networking
- 4.1. Secure shell
- 4.2. ssh
- 4.3. ssh from Windows
- 4.4. Parallel ssh
- 4.5. telnet
- 4.6. prompt for password
- 4.7. ftp
- 5. Interactive shell
- 5.1. The Python interactive shell
- 5.2. REPL - Read Evaluate Print Loop
- 5.3. Using Modules
- 5.4. Getting help
- 5.5. Exercise: Interactive shell
- 6. Logging
- 6.1. Simple logging
- 6.2. Simple logging - set level
- 6.3. Simple logging to a file
- 6.4. Simple logging format
- 6.5. Simple logging change date format
- 6.6. getLogger
- 6.7. Time-based logrotation
- 6.8. Size-based logrotation
- 7. Closures
- 7.1. Counter local - not working
- 7.2. Counter with global
- 7.3. Create incrementors
- 7.4. Create internal function
- 7.5. Create function by a function
- 7.6. Create function with parameters
- 7.7. Counter closure
- 7.8. Make incrementor with def (closure)
- 7.9. Make incrementor with lambda
- 7.10. Exercise: closure bank
- 7.11. Exercise: counter with parameter
- 7.12. Solution: closure bank
- 7.13. Solution: counter with parameter
- 8. Decorators
- 8.1. Decorators: simple example
- 8.2. Decorators - Flask
- 8.3. Decorators - Pytest
- 8.4. Decorators caching - no cache
- 8.5. Decorators caching - with cache
- 8.6. LRU - Least recently used cache
- 8.7. LRU - Least recently used cache
- 8.8. OOP - classmethod - staticmethod
- 8.9. Use cases for decorators in Python
- 8.10. Function assignment
- 8.11. Function assignment - alias print to say
- 8.12. Function assignment - don't do this
- 8.13. Passing functions as parameters
- 8.14. Traversing directory tree
- 8.15. Declaring Functions inside other function
- 8.16. Returning a new function from a function
- 8.17. Returning a closure
- 8.18. Decorator
- 8.19. Decorator Demo
- 8.20. Decorator to register function
- 8.21. A recursive Fibonacci
- 8.22. trace fibo
- 8.23. tron decorator
- 8.24. Decorate with direct call
- 8.25. Decorate with parameter
- 8.26. Decorator accepting parameter
- 8.27. Decorate function with any signature
- 8.28. Decorate function with any signature - implementation
- 8.29. Decorate function with any signature - skeleton
- 8.30. Decorate function with any signature - skeleton with name
- 8.31. Functool - partial
- 8.32. Exercise: Logger decorator
- 8.33. Exercise: decorators decorator
- 8.34. Solution: Logger decorator
- 8.35. Solution: Logger decorator (testing)
- 8.36. Solution decorators decorator
- 8.37. A list of functions
- 8.38. Insert element in sorted list using insort
- 9. Context managers (with statement)
- 9.1. Why use context managers?
- 9.2. Using Context Manager
- 9.3. Context Manager examples
- 9.4. cd in a function
- 9.5. open in function
- 9.6. open in for loop
- 9.7. open in function using with
- 9.8. Plain context manager
- 9.9. Param context manager
- 9.10. Context manager that returns a value
- 9.11. Use my tempdir - return
- 9.12. Use my tempdir - exception
- 9.13. cwd context manager
- 9.14. tempdir context manager
- 9.15. Context manager with class
- 9.16. Context managers with class
- 9.17. Context manager: with for file
- 9.18. With - context managers
- 9.19. Exercise: Context manager
- 9.20. Exercise: Tempdir on Windows
- 9.21. Solution: Context manager
- 10. Advanced lists
- 10.1. Change list while looping: endless list
- 10.2. Change list while looping
- 10.3. Copy list before iteration
- 10.4. for with flag
- 10.5. for else
- 10.6. enumerate
- 10.7. do while
- 10.8. list slice is copy
- 11. Warnings
- 11.1. Warnings
- 12. CSV
- 12.1. What is a CSV file?
- 12.2. CSV file without title row
- 12.3. CSV file with header
- 12.4. Read CSV file into lists
- 12.5. CSV with newlines missing closing quote
- 12.6. CSV to dictionary
- 12.7. CSV Attributes
- 12.8. CSV dialects
- 12.9. Reading CSV the naive way
- 12.10. CSV with quotes and newlines
- 12.11. Reading a CSV file
- 12.12. Exercise: CSV as dictionary of dictionaries
- 12.13. Exercise: CSV as dictionary of tuples of dictionaries
- 12.14. Exercise: count row length in csv files
- 12.15. Solution: CSV as dictionary of dictionaries
- 12.16. Solution: CSV as dictionary of tuples of dictionaries
- 12.17. Solution: count row length in csv files
- 13. Excel
- 13.1. Spreadsheets
- 13.2. Python Excel
- 13.3. Create an Excel file from scratch
- 13.4. Worksheets in Excel
- 13.5. Add expressions to Excel
- 13.6. Format field
- 13.7. Number series and chart
- 13.8. Read Excel file
- 13.9. Update Excel file
- 13.10. Barchart
- 13.11. Exercise: Excel
- 14. XML
- 14.1. XML Data
- 14.2. Expat - Callbacks
- 14.3. XML DOM - Document Object Model
- 14.4. XML SAX - Simple API for XML
- 14.5. SAX collect
- 14.6. XML elementtree
- 14.7. SAX with coroutine
- 15. Matplotlib
- 15.1. About Matplotlib
- 15.2. Matplotlib Line
- 15.3. Matplotlib Line with dates
- 15.4. Matplotlib Simple Pie
- 15.5. Matplotlib Simple Pie with params
- 15.6. Matplotlib Pie
- 15.7. Matplotlib Pie (test cases)
- 15.8. Plot, scatter, histogram
- 16. Seaborn
- 16.1. Searborn use examples
- 16.2. Seaborn tip
- 16.3. Seaborn Anscombes Quartet
- 17. Tox
- 17.1. Tox Examples
- 18. Selenium
- 18.1. Selenium installation
- 18.2. Get started with Selenium
- 18.3. Selenium Headless Screenshot
- 19. Playwright
- 19.1. Playwright installation
- 19.2. Playwright demo
- 19.3. Playwright screenshot
- 20. Advancted functions
- 20.1. Variable scopes
- 20.2. Name resolution order (LEGB)
- 20.3. Scoping: global seen from fuction
- 20.4. Assignment creates local scope
- 20.5. Local scope gone wrong
- 20.6. Changing global variable from a function
- 20.7. Global variables mutable in functions
- 20.8. Scoping issues
- 20.9. sub in sub
- 20.10. Scoping sub in sub (enclosing scope)
- 20.11. Function objects
- 20.12. Functions are created at run time
- 20.13. Mutable default
- 20.14. Use None as default parameter
- 20.15. Inner function created every time the outer function runs
- 20.16. Static variable
- 20.17. Static variable in generated function
- 20.18. Inspect
- 21. Variable number of function arguments
- 21.1. Python function arguments - a reminder
- 21.2. Functions with unknown number of argumerns
- 21.3. Variable length argument list with * and **
- 21.4. Passing arguments as they were received (but incorrectly)
- 21.5. Unpacking args before passing them on
- 21.6. Exercise: implement the my_sum function
- 21.7. Solution: implement the my_sum function
- 21.8. Exercise: implement the reduce function
- 21.9. Soluton: implement the reduce function
- 21.10. Exercise: sort pairs
- 21.11. Solution: sort pairs
- 22. Python Packages
- 22.1. Why Create package
- 22.2. Create package
- 22.3. Internal usage
- 22.4. use module in package - relative path
- 22.5. use package (does not work)
- 22.6. package importing (and exporting) module
- 22.7. use package (module) with import
- 22.8. use package with import
- 22.9. Creating an installable Python package
- 22.10. Create tar.gz file
- 22.11. Install Package
- 22.12. Dependencies
- 22.13. Add README file
- 22.14. Add README file (setup.py)
- 22.15. Include executables
- 22.16. Add tests
- 22.17. Add tests calc
- 22.18. Add tests all
- 22.19. setup.py
- 22.20. Run tests and create package
- 22.21. Exercise: package
- 22.22. Exercise: create executable
- 23. Distribution of Python code
- 23.1. Distribution demo 1
- 23.2. Distribution demo 2
- 23.3. Distribution demo 3
- 24. Distribute Python application as an exe
- 24.1. Packaging applications (creating executable binaries)
- 24.2. Using PyInstaller
- 24.3. Other PyInstaller examples
- 24.4. Other
- 24.5. Py2app for Mac
- 25. Ctypes
- 25.1. ctypes - hello
- 25.2. concat
- 25.3. links
- 26. 2to3
- 26.1. Convertig from Python 2 to Python 3
- 26.2. division
- 26.3. print in Python 2
- 26.4. print in Python 3
- 26.5. input and raw_input
- 26.6. Code that works on both 2 and 3
- 26.7. Compare different types
- 26.8. Octal numbers
- 26.9. 2to3 Resources
- 27. Design Patterns
- 27.1. What are Design Patterns?
- 27.2. Don't replace built-in objects
- 27.3. Facade - simple interface to complex system
- 27.4. Monkey Patching
- 27.5. Creation DPs "Just One"
- 27.6. Singleton
- 27.7. Monostate (Borg)
- 27.8. Dispatch table
- 28. Python Pitfalls
- 28.1. Reuse of existing module name
- 28.2. Use the same name more than once
- 28.3. Compare string and number
- 28.4. Compare different types
- 28.5. Sort mixed data
- 29. Linters
- 29.1. Static Code Analyzis - Linters
- 29.2. PEP8
- 29.3. F811 - redefinition of unused
- 29.4. Warn when Redefining functions
- 30. Signals
- 30.1. Signals and Python
- 30.2. Sending Signal
- 30.3. Catching Signal
- 30.4. Catching Ctrl-C on Unix
- 30.5. Catching Ctrl-C on Unix confirm
- 30.6. Alarm signal and timeouts
- 30.7. Exercise: Catching Ctrl-C on Unix 2nd time
- 30.8. Exercise: Signals
- 30.9. Ctrl-z
- 31. Data Science
- 31.1. Data Scince Resources
- 32. FAQ
- 32.1. How not to name example scirpts?
- 32.2. Platform independent code
- 32.3. How to profile a python code to find causes of slowness?
- 32.4. pdb = Python Debugger
- 32.5. Avoid Redefining functions
- 33. Algorithm
- 33.1. Exercise: Find the odd value
- 33.2. Solution: Find the odd value
- 33.3. Exercise: Generalized find the odd value
- 33.4. Solution: Generlized Find the odd value
- 33.5. Exercise: Shortest sublist with sum over limit
- 33.6. Solution: Shortest sublist with sum over limit
- 34. Refactor
- 34.1. Refactoring example - change variable name
- 34.2. How to Refactor
- 34.3. Exercise: Fix deep indentation
- 35. Overview of Python syntax
- 35.1. Scalars
- 35.2. Numbers
- 35.3. Strings
- 35.4. int - float - string conversion
- 35.5. Booleans
- 35.6. Lists
- 35.7. Queue and Stack
- 35.8. Dictionaries
- 35.9. Tuples
- 35.10. Sets
- 35.11. I/O
- 35.12. STDIN - Standard input
- 35.13. CLI
- 35.14. Control flow
- 35.15. While - Loops
- 35.16. For - Loops
- 35.17. Conditionals
- 35.18. Comparision operators
- 35.19. Boolean operators
- 35.20. The conditional (ternary) operator
- 35.21. Random Values
- 35.22. Math
- 35.23. Exceptions
- 35.24. Files
- 35.25. Functions
- 35.26. Modules
- 36. Serialization (Marshalling)
- 36.1. Why Serialization is needed?
- 36.2. Questions to ask
- 36.3. Various tools for serialization
- 36.4. Serialization with h5py
- 36.5. Serialization of single Numpy array
- 36.6. Serialization of multiple Numpy arrays
- 37. Other slides
- 37.1. Other slides
- 37.2. Atom for Python
- 37.3. IDLE - Integrated DeveLopment Environment
- 37.4. sh-bang - executable on Linux/Apple
- 37.5. pydoc
- 37.6. Spyder Intro
- 37.7. Interactive Debugging
- 37.8. Parameter passing
- 37.9. Command line arguments and main
- 37.10. Name of the current function in Python
- 37.11. Name of the caller function in Python
- 37.12. Stack trace in Python using inspect
- 37.13. Getting the class name of an object
- 37.14. Circular references
- 37.15. Context managers: with (file) experiments
- 37.16. range vs xrange in Python
- 37.17. profile (with hotshot) slow code
- 37.18. Python Descriptors
- 37.19. Python from .NET
- 37.20. Matplotlib subplot
- 37.21. Jupyter StackOverflow - historgram
- 37.22. Jupyter StackOverflow - OpenSourcer
- 37.23. Jupyter StackOverflow - cross tabulation
- 37.24. Jupyter StackOverflow - salaries
- 37.25. Jupyter StackOverflow - replace values
- 37.26. NameError
- 37.27. UnboundLocalError
- 37.28. Insert element in sorted list using bisect
- 37.29. Gravatar in Python
- 37.30. Debug with ptpython
- 37.31. REPL - Interactive debugging with ptpython
- 37.32. Print in color on the CLI
- 37.33. Easy Install
- 37.34. sorting with sorted using a key
- 37.35. get and set locale
- 37.36. Modify time anomality
- 37.37. Some strange code
- 37.38. is vs ==
- 37.39. print_function
- 37.40. Dividers (no break or continue)
- 37.41. Remove file
- 37.42. Modules: more
- 37.43. import hooks
- 37.44. Python resources
- 37.45. Progress bar
- 37.46. from __future__
- 37.47. Variable scope
- 37.48. scope
- 37.49. type
- 37.50. Look deeper in a list
- 37.51. More examples