1. Python Other
  2. PyPi - Python Package Index
    1. What is PyPi?
    2. pip
    3. Configure pip on Windows to avoid SSL issues
    4. Upgrade pip
    5. Upgrade PIP on Windows
    6. PYTHONPATH
    7. Requirements
    8. Virtualenv
  3. Web client - web scraping
    1. get HTML page using urllib
    2. Download image using urllib
    3. get HTML page using requests
    4. Download image using requests
    5. Download image as a stream using requests
    6. Download zip file using requests
    7. Extract zip file
    8. Beautiful Soup to parse HTML
    9. requests - JSON - API
    10. httpbin.org
    11. requests get from httpbin - JSON
    12. requests get IP from httpbin - JSON
    13. requests get JSON User-Agent
    14. requests change User-Agent
    15. requests get header
    16. requests change header
    17. requests post
    18. Interactive Requests
    19. Download the weather - scraping
    20. Download the weather - API call with requests
    21. Download the weather - API call with requests
    22. Tweet
    23. bit.ly
    24. API config file
    25. Exercise: Combine web server and client
  4. Python Web server
    1. Hello world web
    2. Dump web environment info
    3. Web echo
    4. Web form
    5. Resources
  5. Networking
    1. Secure shell
    2. ssh
    3. ssh from Windows
    4. Parallel ssh
    5. telnet
    6. prompt for password
    7. ftp
  6. Interactive shell
    1. The Python interactive shell
    2. REPL - Read Evaluate Print Loop
    3. Using Modules
    4. Getting help
    5. Exercise: Interactive shell
  7. Types in Python
    1. mypy
    2. Changing types
    3. Changing types when reading a number
    4. Types of variables
    5. Types of function parameters
    6. Types function returns None or bool
    7. Types used properly
    8. TODO: mypy
  8. Logging
    1. Simple logging
    2. Simple logging - set level
    3. Simple logging to a file
    4. Simple logging format
    5. Simple logging change date format
    6. getLogger
    7. Time-based logrotation
    8. Size-based logrotation
  9. Closures
    1. Counter local - not working
    2. Counter with global
    3. Create incrementors
    4. Create internal function
    5. Create function by a function
    6. Create function with parameters
    7. Counter closure
    8. Make incrementor with def (closure)
    9. Make incrementor with lambda
    10. Exercise: closure bank
    11. Exercise: counter with parameter
    12. Solution: closure bank
    13. Solution: counter with parameter
  10. Decorators
    1. Decorators: simple example
    2. Decorators - Flask
    3. Decorators - Pytest
    4. Decorators caching - no cache
    5. Decorators caching - with cache
    6. LRU - Least recently used cache
    7. LRU - Least recently used cache
    8. OOP - classmethod - staticmethod
    9. Use cases for decorators in Python
    10. Function assignment
    11. Function assignment - alias print to say
    12. Function assignment - don't do this
    13. Passing functions as parameters
    14. Traversing directory tree
    15. Declaring Functions inside other function
    16. Returning a new function from a function
    17. Returning a closure
    18. Decorator
    19. Decorator Demo
    20. Decorator to register function
    21. A recursive Fibonacci
    22. trace fibo
    23. tron decorator
    24. Decorate with direct call
    25. Decorate with parameter
    26. Decorator accepting parameter
    27. Decorate function with any signature
    28. Decorate function with any signature - implementation
    29. Decorate function with any signature - skeleton
    30. Decorate function with any signature - skeleton with name
    31. Functool - partial
    32. Exercise: Logger decorator
    33. Exercise: decorators decorator
    34. Solution: Logger decorator
    35. Solution: Logger decorator (testing)
    36. Solution decorators decorator
    37. A list of functions
    38. Insert element in sorted list using insort
  11. Context managers (with statement)
    1. Why use context managers?
    2. Using Context Manager
    3. Context Manager examples
    4. cd in a function
    5. open in function
    6. open in for loop
    7. open in function using with
    8. Plain context manager
    9. Param context manager
    10. Context manager that returns a value
    11. Use my tempdir - return
    12. Use my tempdir - exception
    13. cwd context manager
    14. tempdir context manager
    15. Context manager with class
    16. Context managers with class
    17. Context manager: with for file
    18. With - context managers
    19. Exercise: Context manager
    20. Exercise: Tempdir on Windows
    21. Solution: Context manager
  12. Advanced lists
    1. Change list while looping: endless list
    2. Change list while looping
    3. Copy list before iteration
    4. for with flag
    5. for else
    6. enumerate
    7. do while
    8. list slice is copy
  13. Warnings
    1. Warnings
  14. CSV
    1. What is a CSV file?
    2. CSV file without title row
    3. CSV file with header
    4. Read CSV file into lists
    5. CSV with newlines missing closing quote
    6. CSV to dictionary
    7. CSV Attributes
    8. CSV dialects
    9. Reading CSV the naive way
    10. CSV with quotes and newlines
    11. Reading a CSV file
    12. Exercise: CSV as dictionary of dictionaries
    13. Exercise: CSV as dictionary of tuples of dictionaries
    14. Exercise: count row length in csv files
    15. Solution: CSV as dictionary of dictionaries
    16. Solution: CSV as dictionary of tuples of dictionaries
    17. Solution: count row length in csv files
  15. Excel
    1. Spreadsheets
    2. Python Excel
    3. Create an Excel file from scratch
    4. Worksheets in Excel
    5. Add expressions to Excel
    6. Format field
    7. Number series and chart
    8. Read Excel file
    9. Update Excel file
    10. Barchart
    11. Exercise: Excel
  16. XML
    1. XML Data
    2. Expat - Callbacks
    3. XML DOM - Document Object Model
    4. XML SAX - Simple API for XML
    5. SAX collect
    6. XML elementtree
    7. SAX with coroutine
  17. Matplotlib
    1. About Matplotlib
    2. Matplotlib Line
    3. Matplotlib Line with dates
    4. Matplotlib Simple Pie
    5. Matplotlib Simple Pie with params
    6. Matplotlib Pie
    7. Matplotlib Pie (test cases)
    8. Plot, scatter, histogram
  18. Seaborn
    1. Searborn use examples
    2. Seaborn tip
    3. Seaborn Anscombes Quartet
  19. Tox
    1. Tox Examples
  20. Selenium
    1. Selenium installation
    2. Get started with Selenium
    3. Selenium Headless Screenshot
  21. Playwright
    1. Playwright installation
    2. Playwright demo
    3. Playwright screenshot
  22. Advancted functions
    1. Variable scopes
    2. Name resolution order (LEGB)
    3. Scoping: global seen from fuction
    4. Assignment creates local scope
    5. Local scope gone wrong
    6. Changing global variable from a function
    7. Global variables mutable in functions
    8. Scoping issues
    9. sub in sub
    10. Scoping sub in sub (enclosing scope)
    11. Function objects
    12. Functions are created at run time
    13. Mutable default
    14. Use None as default parameter
    15. Inner function created every time the outer function runs
    16. Static variable
    17. Static variable in generated function
    18. Inspect
  23. Variable number of function arguments
    1. Python function arguments - a reminder
    2. Functions with unknown number of argumerns
    3. Variable length argument list with * and **
    4. Passing arguments as they were received (but incorrectly)
    5. Unpacking args before passing them on
    6. Exercise: implement the my_sum function
    7. Solution: implement the my_sum function
    8. Exercise: implement the reduce function
    9. Soluton: implement the reduce function
    10. Exercise: sort pairs
    11. Solution: sort pairs
  24. Python Packages
    1. Why Create package
    2. Create package
    3. Internal usage
    4. use module in package - relative path
    5. use package (does not work)
    6. package importing (and exporting) module
    7. use package (module) with import
    8. use package with import
    9. Creating an installable Python package
    10. Create tar.gz file
    11. Install Package
    12. Dependencies
    13. Add README file
    14. Add README file (setup.py)
    15. Include executables
    16. Add tests
    17. Add tests calc
    18. Add tests all
    19. setup.py
    20. Run tests and create package
    21. Exercise: package
    22. Exercise: create executable
  25. Distribution of Python code
    1. Distribution demo 1
    2. Distribution demo 2
    3. Distribution demo 3
  26. Distribute Python application as an exe
    1. Packaging applications (creating executable binaries)
    2. Using PyInstaller
    3. Other PyInstaller examples
    4. Other
    5. Py2app for Mac
  27. Ctypes
    1. ctypes - hello
    2. concat
    3. links
  28. 2to3
    1. Convertig from Python 2 to Python 3
    2. division
    3. print in Python 2
    4. print in Python 3
    5. input and raw_input
    6. Code that works on both 2 and 3
    7. Compare different types
    8. Octal numbers
    9. 2to3 Resources
  29. Design Patterns
    1. What are Design Patterns?
    2. Don't replace built-in objects
    3. Facade - simple interface to complex system
    4. Monkey Patching
    5. Creation DPs "Just One"
    6. Singleton
    7. Monostate (Borg)
    8. Dispatch table
  30. Improving Performance - Optimizing code
    1. Problems
    2. Optimization strategy
    3. Locate the source of the problem
    4. Optimizing tactics
    5. DSU: Decorate Sort Undecorate
    6. Profile code
    7. Slow example
    8. profile slow code
    9. cProfile slow code
    10. Benchmarking
    11. Benchmarking subs
    12. Counting words - which implementation is faster?
    13. for loop or reduce to add numbers?
    14. Levenshtein distance
    15. Generate words
    16. Levenshtein - pylev
    17. Levenshtein - editdistance
    18. Editdistance benchmark
    19. A Tool to Generate text files
    20. Count characters
    21. Memory leak
    22. Garbage collection
    23. Weak reference
    24. Exercise: benchmark list-comprehension, map, for
    25. Exercise: Benchmark Levenshtein
    26. Exercise: sort files
    27. Exercise: compare split words:
    28. Exercise: count words
  31. Python Pitfalls
    1. Reuse of existing module name
    2. Use the same name more than once
    3. Compare string and number
    4. Compare different types
    5. Sort mixed data
  32. Linters
    1. Static Code Analyzis - Linters
    2. PEP8
    3. F811 - redefinition of unused
    4. Warn when Redefining functions
  33. Signals
    1. Signals and Python
    2. Sending Signal
    3. Catching Signal
    4. Catching Ctrl-C on Unix
    5. Catching Ctrl-C on Unix confirm
    6. Alarm signal and timeouts
    7. Exercise: Catching Ctrl-C on Unix 2nd time
    8. Exercise: Signals
    9. Ctrl-z
  34. Data Science
    1. Data Scince Resources
  35. FAQ
    1. How not to name example scirpts?
    2. Platform independent code
    3. How to profile a python code to find causes of slowness?
    4. pdb = Python Debugger
    5. Avoid Redefining functions
  36. Algorithm
    1. Exercise: Find the odd value
    2. Solution: Find the odd value
    3. Exercise: Generalized find the odd value
    4. Solution: Generlized Find the odd value
    5. Exercise: Shortest sublist with sum over limit
    6. Solution: Shortest sublist with sum over limit
  37. Refactor
    1. Refactoring example - change variable name
    2. How to Refactor
    3. Exercise: Fix deep indentation
  38. Overview of Python syntax
    1. Scalars
    2. Numbers
    3. Strings
    4. int - float - string conversion
    5. Booleans
    6. Lists
    7. Queue and Stack
    8. Dictionaries
    9. Tuples
    10. Sets
    11. I/O
    12. STDIN - Standard input
    13. CLI
    14. Control flow
    15. While - Loops
    16. For - Loops
    17. Conditionals
    18. Comparision operators
    19. Boolean operators
    20. The conditional (ternary) operator
    21. Random Values
    22. Math
    23. Exceptions
    24. Files
    25. Functions
    26. Modules
  39. Serialization (Marshalling)
    1. Why Serialization is needed?
    2. Questions to ask
    3. Various tools for serialization
    4. Serialization with h5py
    5. Serialization of single Numpy array
    6. Serialization of multiple Numpy arrays
  40. Other slides
    1. Other slides
    2. Atom for Python
    3. IDLE - Integrated DeveLopment Environment
    4. sh-bang - executable on Linux/Apple
    5. pydoc
    6. Spyder Intro
    7. Interactive Debugging
    8. Parameter passing
    9. Command line arguments and main
    10. Name of the current function in Python
    11. Name of the caller function in Python
    12. Stack trace in Python using inspect
    13. Getting the class name of an object
    14. Circular references
    15. Context managers: with (file) experiments
    16. range vs xrange in Python
    17. profile (with hotshot) slow code
    18. Python Descriptors
    19. Python from .NET
    20. Matplotlib subplot
    21. Jupyter StackOverflow - historgram
    22. Jupyter StackOverflow - OpenSourcer
    23. Jupyter StackOverflow - cross tabulation
    24. Jupyter StackOverflow - salaries
    25. Jupyter StackOverflow - replace values
    26. NameError
    27. UnboundLocalError
    28. Insert element in sorted list using bisect
    29. Gravatar in Python
    30. Debug with ptpython
    31. REPL - Interactive debugging with ptpython
    32. Print in color on the CLI
    33. Easy Install
    34. sorting with sorted using a key
    35. get and set locale
    36. Modify time anomality
    37. Some strange code
    38. is vs ==
    39. print_function
    40. Dividers (no break or continue)
    41. Remove file
    42. Modules: more
    43. import hooks
    44. Python resources
    45. Progress bar
    46. from __future__
    47. Variable scope
    48. scope
    49. type
    50. Look deeper in a list