❮ Index
❯
TOC: Python Programming
- Files
- File types: Text vs Binary
- Open vs. Read vs. Load
- Binary files: Images
- Reading an Excel file
- Reading a YAML file
- Read and analyze a text file
- Open and read file (easy but not recommended)
- Open and read file using with (recommended)
- Read file remove newlines
- Filename on the command line
- Filehandle with return
- Read all the lines into a list
- Read all the characters into a string (slurp)
- Not existing file
- Open file exception handling
- Open many files - exception handling
- Writing to file
- Print to file
- Append to file
- Binary mode
- Does file exist? Is it a file?
- Direct access of a line in a file
- Exercise: count digits
- Exercise: remove newlines
- Exercise: print lines with Report:
- Exercise: color selector
- Exercise: ROT13
- Exercise: Combine lists
- Exercise: Number guessing game - save to file
- Solution: count numbers
- Solution: remove newlines
- Solution: print lines with Report:
- Solution: color selector
- Solution: ROT13
- Solution: Combine lists
- Solution: Combine lists with tuple
- Filehandle using with and not using it
- Dictionary (hash)
- What is a dictionary
- When to use dictionaries
- Various dictionary examples
- Dictionary
- Create dictionary
- keys
- Loop over keys
- Loop over dictionary keys
- Loop using items
- values
- Not existing key
- Get key
- Does the key exist?
- Does the value exist?
- Delete key
- List of dictionaries
- Shared dictionary
- immutable collection: tuple as dictionary key
- immutable numbers: numbers as dictionary key
- Sort a dictionary
- Sort dictionary values
- Sort dictionary by value
- Sort dictionary keys by value (another example)
- Insertion Order is kept
- Change order of keys in dictionary - OrderedDict
- Set order of keys in dictionary - OrderedDict
- Setdefault
- Exercise: count characters
- Exercise: count words
- Exercise: count words from a file
- Exercise: Apache log
- Exercise: Combine lists again
- Exercise: counting DNA bases
- Exercise: Count Amino Acids
- Exercise: List of dictionaries
- Exercise: Dictionary of dictionaries
- Exercise: Age limit with dictionaries
- Exercise: Merge files with timestamps
- Solution: count characters
- Default Dict
- Solution: count characters with default dict
- Solution: count words (plain)
- Solution: count words (defaultdict)
- Solution: count words (Counter)
- Solution: count words in file
- Solution: Apache log
- Solution: Apache log using split
- Solution: Combine files
- Solution: Combine files-improved
- Solution: counting DNA bases
- Solution: Count Amino Acids
- Solution: List of dictionaries
- Solution: Dictionary of dictionaries
- Solution: Age limit with dictionaries
- Solution: Merge files with timestamps
- Do not change dictionary in loop
- Named tuple (sort of immutable dictionary)
- Create dictionary from List
- Sort Hungarian letters (lookup table)
- Sets
- sets
- set operations
- Creating a set
- Creating a set from a list
- Converting set to list
- Creating an empty set
- Adding an element to a set (add)
- Merging one set into another set (update)
- set intersection
- set subset
- set symmetric difference
- set union
- set relative complement (difference)
- Set of numbers
- Set of lists
- Set of tuples
- Create set from List
- Code Reuse
- Functions (subroutines)
- Why use functions?
- Defining simple function
- Passing positional parameters to a function
- Function parameters can be named
- Mixing positional and named parameters
- Mixing positional and named parameters - order
- Default values, optional parameters, optional parameters
- Default value in first param
- Several defaults, using names
- Default list
- Arbitrary number of arguments `*`
- Arbitrary number of arguments passing a lists
- Arbitrary number of arguments passing a tuple
- Fixed parmeters before the others
- Pass arbitrary number of functions
- Arbitrary key-value pairs in parameters `**`
- Pass a real dictionary
- The dictionary contains copy
- The dictionary contains copy but NOT deep copy!
- Extra key-value pairs in parameters
- Extra key-value pairs in parameters for email
- Every parameter option
- Duplicate declaration of functions (multiple signatures)
- Pylint duplicate declaration
- Return more than one value
- Recursive factorial
- Recursive Fibonacci
- Non-recursive Fibonacci
- Unbound recursion
- Set recurions limit
- Variable assignment and change - Immutable
- Variable assignment and change - Mutable list
- Variable assignment and change - Mutabled dict
- Parameter passing of functions
- Passing references
- Function documentation
- Sum ARGV
- Copy-paste code
- Copy-paste code fixed
- Copy-paste code further improvement
- Palindrome
- Exit vs return vs break and continue
- Exercise: statistics
- Exercise: Pascal's triangle
- Exercise: Pascal's triangle functions
- Exercise: recursive dependency tree
- Exercise: dependency tree
- Exercise: Tower of Hanoi
- Exercise: Merge and Bubble sort
- Exercise: Refactor previous solutions to use functions
- Exercise: Number guessing - functions
- Solution: statistics
- Solution: Pascal triangle
- Solution: Pascal triangle functions
- Solution: recursive
- Solution: Tower of Hanoi
- Solution: Merge and Bubble sort
- Modules
- Goal of having modules
- Before modules
- Create modules
- path to load modules from - The module search path
- sys.path - the module search path
- Project directory layouts
- Flat project directory structure
- Absolute path
- Relative path
- Relative path explained
- Submodules
- Python modules are compiled
- How "import" and "from" work?
- Execute at import time
- Runtime loading of modules
- Conditional loading of modules
- What is in our namespace?
- Runtime import
- Duplicate importing of functions
- Duplicate importing of functions - solved
- Script or library
- Script or library - import
- Script or library - from import
- Scope of import
- Import multiple times
- Do not import *
- Exercise: Number guessing
- Exercies: Scripts and modules
- Exercise: Module my_sum
- Exercise: Convert your script to module
- Exercise: Add doctests to your own code
- Solution: Module my_sum
- Loaded modules and their path
- Built-in modules
- PyCharm
- Visual Studio Code
- Python standard modules (standard packages)
- math
- sys
- os
- python which OS are we running on (os, platform)
- Current directory (getcwd, pwd, chdir)
- OS path
- os.path.join
- Directory listing
- Directory listing using glob
- Traverse directory tree - list directories recursively
- OS dir (mkdir, makedirs, remove, rmdir)
- expanduser - handle tilde ~ the home directory of the user
- Get process ID
- External command with system
- Accessing the system environment variables from Python
- Set environment variables on the fly
- Reading the .env environment file in Python
- Set env and run command
- Pathlib
- shutil
- time
- datetime
- Current date and time datetime now
- Converting string to datetime (parsing date and time string)
- Parse datetime string with and without timezone information
- datetime fromisoformat
- date fromisoformat (only date, no time)
- datetime arithmeticis (subtract)
- Timezone aware datetime
- datetime arithmeticis (compare, sort)
- datetime arithmeticis (addition)
- Rounding datetime object to nearest second (removing microseconds)
- Rounding datetime object to date (removing hours, minutes, seconds)
- Convert datetime object to date object
- Convert datetime object to time object
- Today (date)
- subprocess
- External CLI tool to demo subprocess
- Run with os.system
- Run external process let STDOUT and STDERR through
- Run external process and capture STDOUT and STDERR separately
- Run external process and capture STDOUT and STDERR merged together
- subprocess in the background
- subprocess collect output while external program is running
- Exercise: Processes
- Subprocess TBD
- Command line arguments with argparse
- Command line arguments
- Modules to handle the command line
- argparse
- Basic usage of argparse
- Positional argument
- Many positional argument
- Convert to integers
- Convert to integer
- Named arguments
- Boolean Flags
- Short names
- argparse print help explicitely
- Argparse xor - mutual exlucise - only one - exactly one
- Argparse argument with default and optional value
- Conditional required parameter with argparse
- Exercise: Command line parameters
- Exercise: argparse positional and named
- Other
- JSON
- YAML
- Exception handling
- Hierarchy of calls
- Handling errors as return values
- Handling errors as exceptions
- A simple exception
- Prevention
- Working on a list
- Catch ZeroDivisionError exception
- Module to open files and calculate something
- File for exception handling example
- Open files - exception
- Handle divide by zero exception
- Handle files - exception
- Catch all the exceptions and show their type
- List exception types
- Hierarchy of Exceptions
- Order of exception handling - bad
- Order of exception handling - good
- How to raise an exception
- Raise ValueError exception
- Stack trace of exceptions
- No need for exception to print Stack trace
- Raise Exception from
- Exercise: Exception int conversion
- Exercise: Raise Exception
- Solution: Exception int conversion (specific)
- Solution: Exception int conversion (all other)
- Solution: Raise Exception
- PyPi - Python Package Index
- Database
- SQLite Database Access
- SQLite
- Connecting to SQLite database
- Connecting to in-memory SQLite database
- Create TABLE in SQLite
- INSERT data into SQLite database
- SELECT data from SQLite database
- SELECT aggregate data from SQLite database
- SELECT data from SQLite database into dictionaries
- UPDATE data in SQLite database
- A counter
- SQLite in-memory AUTOINCREMENT
- SQLite in-memory field with DEFAULT value
- SQLite transactions
- MySQL
- Install MySQL support
- Create database user (manually)
- Create database (manually)
- Create table (manually)
- Connect to MySQL
- Connect to MySQL and Handle exception
- Select data
- Select more data
- Select all data fetchall
- Select some data fetchmany
- Select some data WHERE clause
- Select into dictionaries
- Insert data
- Update data
- Delete data
- Exercise MySQL
- Exercise: MySQL Connection
- Solution: MySQL Connection
- PostgreSQL
- SQLAlchemy
- SQLAlchemy hierarchy
- SQLAlchemy engine
- SQLAlchemy autocommit
- SQLAlchemy engine CREATE TABLE
- SQLAlchemy engine INSERT
- SQLAlchemy engine SELECT
- SQLAlchemy engine SELECT all
- SQLAlchemy engine SELECT fetchall
- SQLAlchemy engine SELECT aggregate
- SQLAlchemy engine SELECT IN
- SQLAlchemy engine SELECT IN with placeholders
- SQLAlchemy engine connection
- SQLAlchemy engine transaction
- SQLAlchemy engine using context managers
- Exercise: Create table
- SQLAlchemy Metada
- SQLAlchemy types
- SQLAlchemy ORM - Object Relational Mapping
- SQLAlchemy ORM create
- SQLAlchemy ORM schema
- SQLAlchemy ORM reflection
- SQLAlchemy ORM INSERT after automap
- SQLAlchemy ORM INSERT
- SQLAlchemy ORM SELECT
- SQLAlchemy ORM SELECT cross tables
- SQLAlchemy ORM SELECT and INSERT
- SQLAlchemy ORM UPDATE
- SQLAlchemy ORM logging
- Solution: Create table
- Exercise: Inspector
- SQLAlchemy CREATE and DROP
- SQLAlchemy Notes
- SQLAlchemy Meta SQLite CREATE
- SQLAlchemy Meta Reflection
- SQLAlchemy Meta INSERT
- SQLAlchemy Meta SELECT
- MongoDB
- MongoDB CRUD
- Install MongoDB support
- MongoDB in Docker compose
- Python MongoDB drop database
- Python MongoDB insert
- MongoDB CLI
- Python MongoDB find
- Python MongoDB find refine
- Python MongoDB update
- Python MongoDB remove (delete)
- Python MongoDB replace
- Python MongoDB upsert
- Python Mongodb: TypeError: upsert must be True or False
- Python MongoDB Async with motor - connect
- Python MongoDB Async with motor - insert and find
- Redis
- Web client - web scraping
- get HTML page using urllib
- Download image using urllib
- get HTML page using requests
- Download image using requests
- Download image as a stream using requests
- Download zip file using requests
- Extract zip file
- Beautiful Soup to parse HTML
- requests - JSON - API
- httpbin.org
- requests get from httpbin - JSON
- requests get IP from httpbin - JSON
- requests get JSON User-Agent
- requests change User-Agent
- requests get header
- requests change header
- requests post
- Interactive Requests
- Download the weather - scraping
- Download the weather - API call with requests
- Download the weather - API call with requests
- Tweet
- bit.ly
- API config file
- Exercise: Combine web server and client
- Python Web server
- Networking
- Interactive shell
- Testing Demo
- Testing Flask
- How do you test your code?
- What is testing?
- What is testing really?
- Testing demo tools
- Testing demo methodology
- Testing demo - AUT - Application Under Test
- Testing demo - use the module
- Testing demo: doctest
- Testing demo: doctest with failure
- Testing demo: Unittest success
- Testing demo: Unittest failure
- Testing demo: pytest using classes
- Testing demo: pytest using classes - failure
- Testing demo: pytest without classes
- Testing demo: pytest without classes failure
- Testing demo: Failure in one sub
- Testing demo: pytest run doctests
- Testing demo: pytest run unittest
- Test demo: test coverage
- Exercise: Testing demo - anagrams
- Exercise: Test previous solutions
- Solution: Testing demo
- GitHub
- GitHub data
- GitHub API: REST vs GraphQL
- Where is it used
- GitHub get organization members
- Details about an orgarnization REST
- Details about an user REST
- REST - List of repositories by organization (pagination!)
- REST - List of reposistories by user (pagination!)
- GraphQL - List repositories by organization
- GitHub API KEY (PERSONAL TOKEN)
- GitHub REST API
- GitHub REST API execute query
- GitHub API GraphQL
- GitHub GraphQL explorer
- GitHub GraphQL execute query
- GitHub GraphQL execute query async
- GitHub GraphQL who am i
- GitHub GraphQL list my repositories
- GitHub GraphQL list of repositories by username
- GitHub GraphQL list issues by username
- GitHub GraphQL list issues using parameter
- GitHub GraphQL list issues using several parameters
- GitHub GraphQL contribution counts
- GitHub GraphQL list Pull-Requests
- GitHub GraphSQL paging using cursor
- GitHub GraphQL activities
- Types in Python
- Testing Intro
- Logging
- Closures
- Counter local - not working
- Counter with global
- Create incrementors
- Create internal function
- Create function by a function
- Create function with parameters
- Counter closure
- Make incrementor with def (closure)
- Make incrementor with lambda
- Exercise: closure bank
- Exercise: counter with parameter
- Solution: closure bank
- Solution: counter with parameter
- Decorators
- Decorators: simple example
- Decorators - Flask
- Decorators - Pytest
- Decorators caching - no cache
- Decorators caching - with cache
- LRU - Least recently used cache
- LRU - Least recently used cache
- OOP - classmethod - staticmethod
- Use cases for decorators in Python
- Function assignment
- Function assignment - alias print to say
- Function assignment - don't do this
- Passing functions as parameters
- Traversing directory tree
- Declaring Functions inside other function
- Returning a new function from a function
- Returning a closure
- Decorator
- Decorator Demo
- Decorator to register function
- A recursive Fibonacci
- trace fibo
- tron decorator
- Decorate with direct call
- Decorate with parameter
- Decorator accepting parameter
- Decorate function with any signature
- Decorate function with any signature - implementation
- Decorate function with any signature - skeleton
- Decorate function with any signature - skeleton with name
- Functool - partial
- Exercise: Logger decorator
- Exercise: decorators decorator
- Solution: Logger decorator
- Solution: Logger decorator (testing)
- Solution decorators decorator
- A list of functions
- Context managers (with statement)
- Why use context managers?
- Using Context Manager
- Context Manager examples
- cd in a function
- open in function
- open in for loop
- open in function using with
- Plain context manager
- Param context manager
- Context manager that returns a value
- Use my tempdir - return
- Use my tempdir - exception
- cwd context manager
- tempdir context manager
- Context manager with class
- Context managers with class
- Context manager: with for file
- With - context managers
- Exercise: Context manager
- Exercise: Tempdir on Windows
- Solution: Context manager
- Advanced lists
- Advanced Exception handling
- Exceptions else
- Exceptions finally
- Exit and finally
- Catching exceptions
- Home made exception
- Home made exception with attributes
- Home made exception hierarcy
- Home made exception hierarcy - 1
- Home made exception hierarcy - 2
- Home made exception hierarcy - 3
- Exercise: spacefight with exceptions
- Exercies: Raise My Exception
- Solution: spacefight with exceptions
- Solution: Raise My Exception
- Exception finally return
- Warnings
- CSV
- What is a CSV file?
- CSV file without title row
- CSV file with header
- Read CSV file into lists
- CSV with newlines missing closing quote
- CSV to dictionary
- CSV Attributes
- CSV dialects
- Reading CSV the naive way
- CSV with quotes and newlines
- Reading a CSV file
- Exercise: CSV as dictionary of dictionaries
- Exercise: CSV as dictionary of tuples of dictionaries
- Exercise: count row length in csv files
- Solution: CSV as dictionary of dictionaries
- Solution: CSV as dictionary of tuples of dictionaries
- Solution: count row length in csv files
- Excel
- XML
- Matplotlib
- Seaborn
- Jupyter notebooks
- What is Jupyter Notebook?
- Jupyter on Windows
- Jupyter on Linux and OSX
- Jupyter New notebook
- Jupyter Notebook file format
- Jupyter notebook edit and command mode
- Jupyter notebook Intellisense (TAB completition)
- Jupyter add
- Planets
- Jupyter input
- File chooser
- IPy Widgets
- Jupyter Notebook and Markdown
- Latex in Jupyter Notebook
- Jupyter StackOverflow
- Use SciPy image
- Create Random image
- Load image using OpenCV
- Genes using Jupyter
- More Jupyter examples
- Jupyter Notebook: run on other port
- Jupyter Notebook: public IP
- Other Jupyter Notebook Kernels
- Jupyter Notebook convert to other format (nbconvert)
- Jupyter Notebook extensions
- Jupyter notebook Checkpoints
- Jupyter notebook autoreload
- Tox
- Selenium
- Playwright
- Advancted functions
- Variable scopes
- Name resolution order (LEGB)
- Scoping: global seen from fuction
- Assignment creates local scope
- Local scope gone wrong
- Changing global variable from a function
- Global variables mutable in functions
- Scoping issues
- sub in sub
- Scoping sub in sub (enclosing scope)
- Function objects
- Functions are created at run time
- Mutable default
- Use None as default parameter
- Inner function created every time the outer function runs
- Static variable
- Static variable in generated function
- Inspect
- Variable number of function arguments
- Python function arguments - a reminder
- Functions with unknown number of argumerns
- Variable length argument list with * and **
- Passing arguments as they were received (but incorrectly)
- Unpacking args before passing them on
- Exercise: implement the my_sum function
- Solution: implement the my_sum function
- Exercise: implement the reduce function
- Soluton: implement the reduce function
- Exercise: sort pairs
- Solution: sort pairs
- Python Packages
- Why Create package
- Create package
- Internal usage
- use module in package - relative path
- use package (does not work)
- package importing (and exporting) module
- use package (module) with import
- use package with import
- Creating an installable Python package
- Create tar.gz file
- Install Package
- Dependencies
- Add README file
- Add README file (setup.py)
- Include executables
- Add tests
- Add tests calc
- Add tests all
- setup.py
- Run tests and create package
- Exercise: package
- Exercise: create executable
- Distribution of Python code
- Distribute Python application as an exe
- Ctypes
- 2to3
- Design Patterns
- Parallel
- Threads
- Python Threading docs
- Threaded counters
- Simple threaded counters
- Simple threaded counters (parameterized)
- Pass parameters to threads - Counter with attributes
- Create a central counter
- Lock - acquire - release
- Counter - plain
- GIL - Global Interpreter Lock
- Thread load
- Exercise: thread files
- Exercise: thread URL requests.
- Exercise: thread queue
- Solution: thread queue
- Solution: thread URL requests.
- Concurrency
- Forking
- Asynchronous programming with AsyncIO
- Use cases for Async
- Event loop
- Print sync
- Print async
- Sync sleep
- Async sleep
- Sync sleep in loop
- Async sleep in loop
- Async sleep in loop with gather
- coroutines
- Async Tasks
- Count Async
- Passing the baton while sleeping 0 sec
- Async sleep in a queue
- Async http
- Sync http requests
- Async http requests
- Async http requests with queue
- Sync chores
- Async chores
- Async more
- Asynchronus programming with Twisted
- Multiprocess
- Multiprocess CPU count
- Multiprocess N files: Pool
- Multiprocess load
- Multiprocess: Pool
- Multiprocess load async
- Multiprocess and logging
- Exercise: Process N files in parallel
- Exercise: Process N Excel files in parallel
- Exercise: Fetch URLs in parallel
- Exercise: Fetch URLs from one site.
- Solution: Process N files in parallel
- Solution: Fetch URLs in parallel
- Multitasking
- Improving Performance - Optimizing code
- Problems
- Optimization strategy
- Locate the source of the problem
- Optimizing tactics
- DSU: Decorate Sort Undecorate
- Profile code
- Slow example
- profile slow code
- cProfile slow code
- Benchmarking
- Benchmarking subs
- Counting words - which implementation is faster?
- for loop or reduce to add numbers?
- Levenshtein distance
- Generate words
- Levenshtein - pylev
- Levenshtein - editdistance
- Editdistance benchmark
- A Tool to Generate text files
- Count characters
- Memory leak
- Garbage collection
- Weak reference
- Exercise: benchmark list-comprehension, map, for
- Exercise: Benchmark Levenshtein
- Exercise: sort files
- Exercise: compare split words:
- Exercise: count words
- GUI with Python/Tk
- Sample Tk Demo app
- Simple file dialog
- GUI Toolkits
- Installation
- Python Tk Documentation
- Python Tk Button
- Python Tk Button with action
- Python Tk Label
- Python Tk Label - font size and color
- Python Tk echo - change text of label
- Python Tk Keybinding
- Python Tk Mouse clicks
- Python Tk Mouse movements (motions)
- Python Tk Entry (one-line text entry)
- Python Tk Entry for passwords and other secrets (hidden text)
- Python Tk Checkbox
- Python Tk Radiobutton
- Python Tk Listbox
- Python Tk Listbox Multiple
- Python Tk Menubar
- Python Tk Text
- Python Tk Dialogs
- Python Tk simple dialog to get a single string, int, or float
- Python Tk Filedialog
- Python Tk messagebox
- Python Tk - custom simple dialog with its own widgets and buttons
- Python Tk Combobox
- Python Tk OptionMenu
- Python Tk Scale
- Python Tk Progressbar
- Python Tk Frame
- Python Tk display images using Canvas
- Python Tk display Hebrew text (right to left)
- Python Tk Colorchooser
- Python Tk Timer event (after)
- Python Tk Class-based Label + Button
- Tk: Runner
- Tk: Runner with threads
- Tk: Old Simple Tk app with class
- Tk: Old Hello World
- Tk: Old Quit button
- Tk: Old File selector
- Tk: Old Checkbox
- Tk: Old Getting started with Tk
- Exercise: Tk - Calculator one line
- Exercise: Tk - Calculator with buttons
- Exercise: Tk - Convert between CSV and Excel files
- Exercise: Tk - Shopping list
- Exercise: Tk - TODO list
- Exercise: Tk - Notepad
- Exercise: Tk - Copy files
- Exercise: Tk - Implement Master Mind board
- Exercise: Tk - a GUI for a grep-like application
- Solution: Tk - Calculator one line
- Solution: Tk - Calculator with buttons
- Solution: Tk - Convert between CSV and Excel files
- Solution: Tk - Implement Master Mind board
- Solution: Tk - Notepad
- Python Pitfalls
- Linters
- Python .NET
- Python and Java
- Jython - Python running on the JVM
- Signals
- Data Science
- PIL - Pillow
- Install Pillow
- Create First Image
- Write Text on Image
- Select font for Text on Image
- Font directories
- Get size of an Image
- Get size of text
- Resize an existing Image
- Crop an existing Image
- Combine two images
- Rotated text
- Rotated text in top-right corner
- Embed image (put one image on another one)
- Draw a triangle
- Draw a triangle and write text in it
- Draw a triangle and write rotated text in it
- Draw a rectangle
- Draw circle
- Draw heart
- Rectangle with rounded corners
- TODO
- FAQ
- Appendix
- Algorithm
- Scapy
- Virtualenv for root
- Install Scapy
- Tcpdump
- Scapy ping an IP using ICMP
- Scapy ping ICMP
- Scapy display (show)
- Scapy ip
- Scapy Configuration
- Scapy List interfaces
- Scapy ping-pong
- Scapy sniffing - capturing packets
- Scapy ping between two IPs that do not belong to my server
- Scapy Traceroute
- Scapy TCP port 80
- Scapy Layers
- Scapy HTTP
- Turtle
- Refactor
- Machine Learning
- Machine Learning 2
- Number of features
- Linear regression
- Cost function
- Gradient descent
- Matrices
- Machine Learning - Multiple features
- Feature Scaling
- Gradient Descent - Learning Rate
- Features
- Polynomial Regression
- Normal Equation
- Multiple features
- Logistic regression (for classification)
- Multi-feature Classification (Iris)
- Kaggle - Melbourne housing listing
- Machine Learning Resources
- Regression Analyzis
- Classification Analysis
- Unbiased evaluation of a model
- Splitting data
- Model selection and validation
- K-fold valiadtion
- Learning Curves
- Hypermatameter tuning (optimization)
- The k-Nearest Neighbors (kNN)
- K-Means Clustering
- Boston housing prices
- Decision Tree
- Random Forrest
- Resnet 50
- Octave
- OpenCV
- OpenCV Installation
- Download images
- OpenCV Read image
- OpenCV - read image and fail
- OpenCV resize (rescale) images
- OpenCV cropping image
- OpenCV crop, resize and save image
- OpenCV - draw on new images
- OpenCV - draw rectangle
- OpenCV - draw circle
- OpenCV convert BGR to greyscale and back to BGR
- OpenCV blur image
- OpenCV Gaussian blur
- OpenCV Median blur
- OpenCV Bilateral blur
- OpenCV blur part of an image
- OpenCV - Thresholding
- OpenCV - Simple Thresholding
- OpenCV - Adaptive Thresholding
- OpenCV - Gradients and Edges
- OpenCV - finding edges using Canny
- OpenCV - Laplacian Gradients
- OpenCV - Sobel Gradients
- OpenCV - Canny Dilate Erode
- OpenCV Move of an Image
- OpenCV - Rotate Image
- OpenCV - Flip Image
- OpenCV - Contours
- OpenCV - Draw contours of an image on a blank image
- OpenCV - ColorSpaces
- OpenCV - BGR to RGB
- OpenCV - BGR to HSV
- OpenCV - BGR to LAB
- OpenCV - Split and merge color channels
- OpenCV - bitwise operations
- OpenCV - masking
- OpenCV - grayscale historgrams
- OpenCV - color historgrams
- OpenCV - Face detection
- OpenCV - Face recognition
- Jupyter notebook
- Download movies
- OpenCV Read video
- Show images - accept key presses
- OpenCV Resources
- Overview of Python syntax
- Serialization (Marshalling)
- MLOps
- The goal of MLOps
- Agile Manifesto
- DevOps
- Machine Learning Operations
- What is MLOps?
- MLOps community
- Silicon
- Off-line (batch) vs On-line (streaming) learning
- Security question of MLOps
- Data
- MLOps progress
- Reload modules in Jupyter Notebook
- Testing ML
- What to track?
- What are the inputs and what are the artifacts?
- Tooling for MLOps
- DVC
- Data Pipelines (Workflow management)
- MLFlow
- MLFLow Tracking server backends
- MLFlow Tracking
- MLFlow Projects
- MLFlow Models
- Resources
- Goals of SCM
- MLOps notes
- Python types at PyWeb 2025.01
- Python types at PyWeb 2025.01
- The Answer
- Add
- Add in function
- Shift-left (testing, programming)
- Function with type annotation
- Use mypy
- How add type annotation?
- Infer (deduct) the type
- Type in unannotated function
- Built-in types
- Complex types
- Either this or that type (Union)
- Optional type (variable can also be None)
- Define type alias
- Define complex type alias
- Define type for enum and complex dictionary
- mypy generics - plain
- mypy generics - cannot be any type
- mypy generics - limit the types by listing
- mypy generics - limit by functionality
- Two variables of the same and different types
- mypy suggestions
- The end
- Bloopers
- Define the type of variables
- Define the return type
- Complex types for Python 3.8 and before
- Either this or that type for Python before 3.10
- Python types at PyWeb 2025.05
- Python types at PyWeb 2025.05
- The Answer
- Add
- Add in function
- Shift-left (testing, programming)
- Function with type annotation
- Use mypy
- How add type annotation?
- Infer (deduct) the type
- Type in unannotated function
- Type in annotated function
- Built-in types
- Complex types
- Either this or that type (Union)
- Either this or that type for Python before 3.10
- Optional type (variable can also be None)
- Define type alias
- Define complex type alias
- Define type for enum and complex dictionary
- mypy generics - plain
- mypy generics - cannot be any type
- mypy generics - limit the types by listing
- mypy generics - limit by functionality
- Two variables of the same and different types
- mypy suggestions
- The end
- Bloopers
- Define the type of variables
- Define the return type
- Complex types for Python 3.8 and before
- Other slides
- Other slides
- Atom for Python
- IDLE - Integrated DeveLopment Environment
- sh-bang - executable on Linux/Apple
- pydoc
- Spyder Intro
- Interactive Debugging
- Parameter passing
- Command line arguments and main
- Name of the current function in Python
- Name of the caller function in Python
- Stack trace in Python using inspect
- SAX with coroutine
- Getting the class name of an object
- iterator - pairwise
- iterator - grouped
- itertools - groupby
- Circular references
- Context managers: with (file) experiments
- itertools - izip
- mixing iterators
- mixing iterators
- itertools - pairwise
- itertools - grouped
- range vs xrange in Python
- profile (with hotshot) slow code
- Create class with metaclass
- Python Descriptors
- alter iterator
- Create a counter queue
- A Queue of tasks
- Python from .NET
- assert to verify values
- mycalc as a self testing module
- doctest
- Export import
- Export import with __all__
- import module
- deep copy list
- deep copy dictionary
- Matplotlib subplot
- Jupyter StackOverflow - historgram
- Jupyter StackOverflow - OpenSourcer
- Jupyter StackOverflow - cross tabulation
- Jupyter StackOverflow - salaries
- Jupyter StackOverflow - replace values
- NameError
- UnboundLocalError
- Insert element in sorted list using bisect
- Insert element in sorted list using insort
- Classes
- Create a class inherit from object
- Gravatar in Python
- Debug with ptpython
- REPL - Interactive debugging with ptpython
- Print in color on the CLI
- Easy Install
- sorting with sorted using a key
- get and set locale
- Modify time anomality
- Some strange code
- is vs ==