❮ Index
❯
TOC: Python Programming
- First steps
- What is Python?
- What is needed to write a program?
- The source (code) of Python
- Python 2 vs. Python 3
- Installation
- Installation on Linux
- Installation on Apple Mac OSX
- Installation on MS Windows
- Installation of Anaconda
- Editors, IDEs
- Documentation
- Program types
- Python on the command line
- First script - hello world
- Examples
- Comments
- Variables
- Exercise: Hello world
- What is programming?
- What are the programming languages
- A written human language
- A programming language
- Words and punctuation matter!
- Types matter to Python (a bit)
- String vs int
- String vs float
- int and float
- Literals, Value Types in Python
- Floating point limitation
- Floating point -compare using round
- round
- Value Types in Numpy
- Rectangle (numerical operations)
- Multiply string
- Add numbers
- Add strings
- Exercise: Calculations
- Solution: Calculations
- Second steps
- Modules
- A main function
- The main function - called
- Indentation
- Conditional main
- Input - Output I/O
- print in Python 2
- print in Python 3
- print in Python 2 as if it was Python 3
- Exception: SyntaxError: Missing parentheses in call
- Prompting for user input in Python 2
- Prompting for user input in Python 3
- Python2 input or raw_input?
- Prompting both Python 2 and Python 3
- Add numbers entered by the user (oups)
- Add numbers entered by the user (fixed)
- Can we convert a string to int or float?
- How can I check if a string can be converted to a number?
- Converting string to int
- Converting float to int
- How can I check if a string can be converted to a number?
- Conditionals: if
- Conditionals: if - else
- Divide by 0
- Conditionals: if - else (other example)
- Conditionals: else if
- Conditionals: elif
- Ternary operator (Conditional Operator)
- Case or Switch in Python
- Exercise: Rectangle
- Exercise: Calculator
- Exercise: Age limit
- Exercise: What is this language?
- Exercise: Standard Input
- Solution: Area of rectangle
- Solution: Calculator
- Solution: Calculator eval
- Solution: Age limit
- Solution: What is this language?
- STDIN vs Command line arguments
- Command line arguments
- Command line arguments - len
- Command line arguments - exit
- Exercise: Rectangle (argv)
- Exercise: Calculator (argv)
- Solution: Area of rectangle (argv)
- Solution: Calculator (argv)
- Solution: Calculator eval
- Compilation vs. Interpretation
- Is Python compiled or interpreted?
- Flake8 checking
- Pylint checking
- Numbers
- Numbers
- Operators for Numbers
- Integer division and the __future__
- Pseudo Random Number (uniform distribution)
- Fixed random numbers
- Rolling dice - randrange
- Random choice
- built-in method
- Exception: TypeError: 'module' object is not callable
- Fixing the previous code
- Exception: AttributeError: module 'random' has no attribute
- Exercise: Number guessing game - level 0
- Exercise: Fruit salad
- Solution: Number guessing game - level 0
- Solution: Fruit salad
- Comparison and Boolean
- if statement again
- Comparison operators
- Compare numbers, compare strings
- Do NOT Compare different types!
- Complex if statement with boolean operators
- Chained expressions
- Boolean operators
- Boolean truth tables
- Boolean values: True and False
- Using True and False in variables
- Comparison returns True or False
- Assign comparisons to variables
- Flag
- Toggle
- Short circuit
- Short circuit fixed
- Does this value count as True or False?
- True and False values in Python
- Incorrect use of conditions
- Exercise: compare numbers
- Exercise: compare strings
- Solution: compare numbers
- Solution: compare strings
- Strings
- Single quoted and double quoted strings
- Long lines
- Multiline strings
- Triple quoted strings (multiline)
- Triple quoted comments - documentation
- String length (len)
- String repetition and concatenation
- A character in a string
- String slice (instead of substr)
- Change a string
- How to change a string
- String copy
- String functions and methods (len, upper, lower)
- index in string
- index in string with range
- Find all in the string
- rindex in string with range
- find in string
- in string
- index if in string
- Encodings: ASCII, Windows-1255, Unicode
- raw strings
- ord
- chr - number to character
- Exercise: one string in another string
- Exercise: Character to Unicode-8 - CLI
- Exercise: from Unicode to character - CLI
- Exercise: ROT13
- Solution: one string in another string
- Solution: compare strings
- Solution: to Unicode CLI
- Solution: from Unicode CLI
- Solution: Show characters based on Unicode code-points
- Solution: ROT13
- Loops
- Loops: for-in and while
- for-in loop on strings
- for-in loop on list
- for-in loop on range
- Iterable, iterator
- for in loop with early end using break
- for in loop skipping parts using continue
- for in loop with break and continue
- while loop
- Infinite while loop
- While with complex expression
- While with break
- While True
- Testing the refactoring of the while loop
- Duplicate input call
- Duplicate input call with loop
- Eliminate duplicate input call
- do while loop
- while with many continue calls
- Break out from multi-level loops
- For-else
- Exercise: Print all the locations in a string
- Exercise: Number guessing game
- Exercise: Count unique characters
- Exercise: Convert for-loop to while-loop
- Solution: Print all the locations in a string
- Solution 1 for Number Guessing
- Solution 2 for Number Guessing (x)
- Solution 3 for Number Guessing (s)
- Solution for Number Guessing (debug)
- Solution for Number Guessing (move)
- Solution for Number Guessing (multi-game)
- Solution: Count unique characters
- Solution: Convert for-loop to while-loop
- Formatted strings
- format - sprintf
- printf using old %-syntax
- Examples using format with names
- Format columns
- Examples using format - alignment
- Format - string
- Format characters and types (binary, octal, hexa)
- Format floating point number
- Examples using format - indexing
- Format characters and types using f-format
- f-format (formatted string literals)
- Format floating point numbers using f-format
- Format braces, bracket, and parentheses
- parameterized formatter
- format binary, octal, hexa numbers
- Examples using format with attributes of objects
- raw f-format
- Lists
- Anything can be a list
- Any layout
- Access elements of a list
- List slice with steps
- Change a List
- Change sublist vs change element of a list
- Change with steps
- List assignment and list copy
- Shallow vs. Deep copy of lists
- join
- join list of numbers
- split
- for loop on lists
- in list
- Where is the element in the list
- Index improved
- [].insert
- [].append
- [].remove
- Remove element by index [].pop
- Remove first element of list
- Remove several elements of list by index
- Use list as a queue - FIFO
- Queue using deque from collections
- Fixed size queue
- List as a stack - LIFO
- stack with deque
- Exercies: Queue
- Exercise: Stack
- Exercise: MasterMind
- Solution: Queue with list
- Solution: Queue with deque
- Solution: Reverse Polish calculator (stack) with lists
- Solution: Reverse Polish calculator (stack) with deque
- Solution: MasterMind
- MasterMind to debug
- Debugging Queue
- sort
- sort numbers
- key sort of strings
- sort mixed values
- sort mixed values fixed with str
- sorting with sorted
- sort vs. sorted
- Sorted and change - shallow copy
- Sorting characters of a string
- range
- Looping over index
- Enumerate lists
- List operators
- List of lists
- List assignment
- List documentation
- Exercise: color selector menu
- Exercise: count digits
- Exercise: Create list
- Exercise: Count words
- Exercise: Check if number is prime
- Exercise: DNA sequencing
- Solution: menu
- Solution: count digits
- Solution: Create list
- Solution: Count words
- Solution: Check if number is prime
- Solution: DNA sequencing
- Solution: DNA sequencing other
- Solution: DNA sequencing using replace
- Solution: DNA sequencing using regex
- Solution: DNA sequencing with filter
- Solution: DNA sequencing with filter and lambda
- [].extend
- append vs. extend
- split and extend
- Tuples
- 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
- 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
- Regular Expressions
- What are Regular Expressions (aka. Regexes)?
- What are Regular Expressions good for?
- Examples
- Where can I use it ?
- grep
- Regexes first match
- Match numbers
- Capture
- Capture more
- Capture even more
- Named capture
- findall
- findall with capture
- findall with capture more than one
- Any Character
- Match dot
- Character classes
- Common characer classes
- Negated character class
- Character classes summary
- Character classes and Unicode characters
- Character classes for Hebrew text
- Match digits
- Word Characters
- Exercise: add numbers
- Solution: add numbers
- Solution: add numbers
- Solution: add numbers
- Regular Expressions - part 2
- Optional character
- Regex match 0 or more (the * quantifier)
- Quantifiers
- Quantifiers limit
- Quantifiers on character classes
- Greedy quantifiers
- Minimal quantifiers
- Anchors
- Anchors with mulitline
- Anchors on both end
- Match ISBN numbers
- Matching a section
- Matching a section - minimal
- Matching a section negated character class
- Regular Expressions - part 3
- Two regex with logical or
- Alternatives
- Grouping and Alternatives
- Internal variables
- More internal variables
- Regex DNA
- Regex IGNORECASE
- DOTALL S (single line)
- MULTILINE M
- Combine Regex flags
- Regex VERBOSE X
- Substitution
- Substitution and MULTILINE - remove leading spaces
- findall capture
- Fixing dates
- Fixing dates - 1
- Fixing dates - 2
- Fixing dates - 3
- Fixing dates - 4
- Anchor edge of word
- Double numbers
- Remove spaces
- Replace string in Assembly code
- Replace string in Assembly code - using mapping dict
- Replace string in Assembly code - using alternatives
- Replace string in Assembly code - generate regex
- Full example of previous
- Split with regex
- Exercises: Regexes part 1
- Exercise: Regexes part 2
- Exercise: Sort SNMP numbers
- Exercise: parse hours log file and create report
- Exercise: Parse ini file
- Exercise: Replace Python
- Exercise: Extract phone numbers
- Solution: Sort SNMP numbers
- Solution: parse hours log file and give report
- Solution: Processing INI file manually
- Solution: Processing config file
- Solution: Extract phone numbers
- Regular Expressions Cheat sheet
- Fix bad JSON
- Fix very bad JSON
- Raw string or escape
- Remove spaces regex
- Regex Unicode
- Anchors Other example
- 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
- 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
- Classes - OOP - Object Oriented Programming
- Why Object Oriented Programming?
- Generic Object Oriented Programming terms
- OOP in Python
- OOP in Python (numbers, strings, lists)
- OOP in Python (argparse)
- Create a class
- Create instance of class
- Import module containing class
- Import class from module
- Initialize instance (not a constructor)
- Self is the instance
- Init uses same name as attribute and getters
- Initialize an instance - (not a constructor), attributes and getters
- Setters - assign to the attributes
- Attributes are not special
- Private attributes
- Methods
- Inheritance
- Inheritance - another level
- Modes of method inheritance
- Modes of method inheritance - implicit
- Modes of method inheritance - override
- Modes of method inheritance - extend
- Modes of method inheritance - delegate - provide
- Composition - Line
- Composition - Line with type annotation
- Hidden attributes
- Hidden attributes in a subclass
- Some comments
- Exercise: Add move_rad to based on radians
- Exercise: Improve previous examples
- Exercise: Polygon
- Exercise: Number
- Exercise: Library
- Exercise: Bookexchange
- Exercise: Represent turtle graphics
- Solution - Polygon
- 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
- Web development with Python Flask
- Python Flask intro
- Python Flask installation
- Flask: Hello World
- Flask: Run Hello World
- Flask: testing hello world
- Flask generated page - time
- Flask generated page - time tested
- Flask: Echo GET
- Flask: Echo GET - testing
- Flask: Echo GET - client
- Flask: Echo POST
- Flask: Echo POST - testing
- Flask: Echo POST - client
- Exercise: Flask calculator
- Solution: Flask calculator
- Flask GET and POST in two functions
- Flask GET and POST in two functions - testing
- Flask GET and POST in one function
- Flask GET and POST in one function - testing
- Flask Logging
- Flask URL routing
- Flask Path or route parameters
- Flask Path or route parameters - testing
- Flask route parameters - separate route to root page
- Flask route parameters - default values
- Flask Path or route parameters (int)
- Flask Path or route parameters add (int)
- Flask Path or route parameters add (path)
- Exercise: Calculator with path
- Solution: Calculator with path
- Flask Redirect
- Flask Internal Redirect with url_for
- Flask Internal Redirect with parameters
- Exercise: Random redirect
- Solution: Random redirect
- Flask Jinja template
- Flask Jinja template - testing
- Flask Jinja template with parameters
- Flask Jinja template with conditional
- Flask Jinja template with loop
- Flask Jinja template dictionary
- Flask Jinja template list of dictionaries
- Flask Jinja include
- Jinja extend template layout block
- Jinja template inheritance - super
- Static files
- Flask: Counter
- Color selector without session
- Session management
- Flask custom 404 page
- Flask Error page
- Exercise: Flask persistent counter
- Exercise: Flask persistent multi-counter
- Solution: Flask persistent counter
- Solution: Flask persistent multi-counter
- Flask Exercises
- Flask login
- Flask JSON API
- Flask and AJAX with Vanila JavaScript
- Flask and AJAX with JQuery
- Flask POST JSON data to web application
- passlib
- Flask Testing
- Flask Deploy app
- Flask Simple Authentication + test
- Flask REST API
- Flask REST API - Echo
- Flask REST API - parameters in path
- Flask REST API - parameter parsing
- Flask REST API - parameter parsing - required
- Login
- Configuratio
- Web development with Python FastAPI
- Install FastAPI
- FastAPI - Hello World
- FastAPI - Test Hello World
- FastAPI with Docker compose
- FastAPI - Dynamic response
- FastAPI - Echo GET - Query Parameters
- FastAPI - Echo GET - Query Parameters - test
- FastAPI - Echo POST - request body
- FastAPI - Echo POST - request body - test
- FastAPI - Calculator GET
- FastAPI - Calculator GET - Test
- FastAPI - Path Parameters - str
- FastAPI - Path Parameters - str - test
- FastAPI - Path Parameters - int
- FastAPI - Path Parameters - int - test
- FastAPI - Path Parameters - specific values with enum
- FastAPI - Path Parameters - specific values with enum - test
- FastAPI - Path containing a directory path
- FastAPI - Path containing a directory path - test
- Return main HTML page
- Return main HTML page - test
- Return main HTML file
- Send 400 error
- Send 400 error - test
- FastAPI - in memory counter
- FastAPI - on disk counter
- FastAPI - on disk multi-counter uising JSON
- FastAPI - get header from request
- FastAPI - set arbitrary header in response
- FastAPI - serve static files - JavaScript example
- FastAPI mounted sub-applications
- FastAPI - todo
- 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
- Functional programming in Python
- Programming Paradigms
- Functional programming
- Iterators (Iterables)
- range
- range with list
- range vs. list size
- for loop with transformation
- map
- map with list
- size of map
- map delaying function call
- map on many values
- double with lambda
- What is lambda in Python?
- lambda returning tuple
- map returning tuples
- lambda with two parameters
- map for more than one iterable
- map on uneven lists
- replace None (for Python 2)
- map on uneven lists - fixed (for Python 2)
- map mixed iterators
- map fetch value from dictionary
- Exercise: string to length
- Exercise: row to length
- Exercise: compare rows
- Solution: string to length
- Solution: row to length
- Solution: compare rows
- filter in a loop
- filter
- filter with lambda
- filter - map example
- filter - map in one expression
- Get indices of values
- reduce
- reduce empty list
- reduce with default
- reduce list of dictionaries
- zip
- Combining two lists using zip
- Creating dictionary from two lists using zip
- all, any
- Compare elements of list with scalar
- List comprehension - double
- List comprehension - simple expression
- List generator
- List comprehension
- Dict comprehension
- Lookup table with lambda
- Read lines without newlines
- Read key-value pairs
- Create index-to-value mapping in a dictionary based on a list of values
- Exercise: min, max, factorial
- Exercise: Prime numbers
- Exercise: Many validator functions
- Exercise: Calculator using lookup table
- Exercise: parse file
- Solution: min, max, factorial
- Solution: Prime numbers
- Solution: Many validator functions
- Solution: Calculator using lookup table
- map with condtion
- map with lambda
- map with lambda with condition
- List comprehension - complex
- Change list before iteration over map object
- Replace list before iteration over map object
- Iterators - with and without Itertools
- Advantages of iterators and generators
- The Fibonacci research institute
- Fibonacci plain
- Fibonacci copy-paste
- Iterators Glossary
- What are iterators and iterables?
- A file-handle is an iterator
- range is iterable but it is not an iterator
- Iterator: a counter
- Using iterator
- Iterator without temporary variable
- The type of the iterator
- Using iterator with next
- Mixing for and next
- Iterable which is not an iterator
- Iterator returning multiple values
- Range-like iterator
- Unbound or infinite iterator
- Unbound iterator Fibonacci
- Operations on Unbound iterator
- itertools
- itertools - count
- itertools - cycle
- Exercise: iterators - reimplement the range function
- Exercise: iterators - cycle
- Exercise: iterators - alter
- Exercise: iterators - limit Fibonacci
- Exercise: iterators - Fibonacci less memory
- Exercise: read char
- Exercise: read section
- Exercise: collect packets
- Exercise: compare files
- Solution: iterators - limit Fibonacci
- Solution: iterators - Fibonacci less memory
- Solution: read section
- Solution: compare files
- Solution: collect packets
- Generators and Generator Expressions
- Generators Glossary
- Iterators vs Generators
- List comprehension and Generator Expression
- List comprehension vs Generator Expression - less memory
- List comprehension vs Generator Expression - lazy evaluation
- Generator: function with yield - call next
- Generators - call next
- Generator with yield
- Generators - fixed counter
- Generators - counter
- Generators - counter with parameter
- Generators - my_range
- Fibonacci - generator
- Infinite series
- Integers
- Integers + 3
- Integers + Integers
- Filtered Fibonacci
- The series.py
- generator - unbound count (with yield)
- iterator - cycle
- Exercise: Alternator
- Exercise: Prime number generator
- Exercise: generator
- Operations on infinite lists
- Infinite random number generator
- Infinite random set generator
- 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
- SciPy - for Scientific Computing in Python
- Python and Biology
- Chemistry
- numpy
- What is NumPy
- Install Numpy
- Numpy - vector
- NumPy 2D arrays
- Numpy - set type
- NumPy arrays: ones and zeros
- Numpy: eye
- NumPy array random
- NumPy Random integers
- NumPy array type change by division (int to float)
- Numpy: Array methods: transpose
- Numpy: reference, not copy
- Numpy: copy array
- Numpy: Elementwise Operations on Arrays
- Numpy: multiply, matmul, dot for vectors
- Numpy: multiply, matmul, dot for vector and matrix
- Numpy: multiply, matmul, dot for matrices
- Numpy: casting - converting from strings to integer.
- Numpy: indexing 1d array
- Numpy: slice is a reference
- Numpy: slice - copy
- Numpy: abs value on a Numpy array
- Numpy: Logical not on a Numpy array
- Numpy: Vectorize a function
- Numpy: Vectorize len
- Numpy: Vectorize lambda
- Numpy: Filtering array (selecting some of the values from an array)
- Numpy: Filter matrix values
- Numpy: Filter matrix rows (selecting some rows)
- Numpy: Some statistics (sum, mean, std, var)
- Numpy: Serialization (saving an array to a file)
- Numpy: Load from Matlab file to a Numpy array
- Numpy: Save a Numpy array as a Matlab file
- Numpy: Horizontal stack vectors (hstack)
- Numpy: Append or vertically stack vectors and matrices (vstack)
- Numpy uint8
- Numpy int8
- More Numpy
- Pandas
- Pandas
- Datasets
- Planets data
- StackOverflow Survey data
- Planets - Read CSV into Dataframes
- Planets - DataFrame Statistics
- Pandas Read CSV various datatypes
- Pandas Read CSV set dtype
- Pandas Read CSV convert values
- Pandas split multivalue column into separate columns
- Pandas split multivalue column into separate columns - get_dummies
- Planets - Show first and last rows
- Planets DataFrame select columns
- Planets DataFrame select rows
- Planets DataFrame select rows and columns
- DataFrame filter rows by size
- DataFrame filter rows by value
- DataFrame filter rows by value in list
- DataFrame filter elementwise boolean and
- DataFrame sort (sort_values)
- DataFrame loc vs. iloc
- Pandas Planets - Add calculated column, remove / delete column (drop)
- Pandas Planets - calculate
- Pandas read CSV set index column
- Count values
- Select top items
- Pandas Show histogram
- Pandas read selected columns
- Pandas read file in chunks
- Pandas read selected rows in chunks
- Combine columns to create a new column
- Add a new column (conditional)
- Pandas read Excel
- Create Excel file for experiment with random data
- Calculate Genome metrics
- Exercise: Pandas
- TODO: Stack Overflow example
- 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
- Testing
- Testing with unittest
- Testing with PyTest
- Pytest features
- Test methods
- Pytest setup
- Pytest - AUT - Application Under Test
- How to use the module?
- Pytest - simple passing test
- Pytest failing test in one function
- Pytest failing test separated
- Pytest run all the test files
- Exercise: test simple module
- Pytest expected exception
- Pytest a nice Fibonacci example
- Pytest testing Fibonacci
- Pytest expected exception
- Pytest testing expected exception
- Pytest Change the text of the exception
- Pytest Missing exception
- Pytest Other exception is raised
- Pytest No exception is raised
- Exercise: test more exceptions
- Solution: test more exceptions
- PyTest: Multiple Failures
- PyTest: Multiple Failures output
- PyTest Selective running of test functions
- PyTest: stop on first failure
- Pytest: expect a test to fail (xfail or TODO tests)
- Pytest: expect a test to fail (xfail or TODO tests)
- PyTest: show xfailed tests with -rx
- Pytest: skipping tests
- Pytest: show skipped tests with -rs
- Pytest: show extra test summmary info with -r
- Pytest: skipping tests output in verbose mode
- Pytest verbose mode
- Pytest quiet mode
- PyTest print STDOUT and STDERR using -s
- Exercise: test math functions
- Exercise: test this app
- Exercise: test the csv module
- Solution: Pytest test math functions
- Solution: Pytest test this app
- Solution: test the csv module
- PyTest using classes
- Exercise: module
- Exercise: Open Source
- parametrize PyTest with pytest.mark.parametrize
- parametrize PyTest with multiple parameters
- Pytest and forking
- Exercise: Write tests for script combining files
- Solution: Write tests for script combining files
- Pytest: Flask echo
- Pytest: testing Flask echo
- Pytest resources
- Anagram on the command line
- PyTest testing CLI
- Pytest assert
- PyTest failure reports
- PyTest compare numbers
- PyTest compare numbers relatively
- PyTest compare strings
- PyTest compare long strings
- PyTest is one string in another strings
- PyTest test any expression
- PyTest element in list
- PyTest compare short lists
- PyTest compare short lists - verbose output
- PyTest compare lists
- PyTest compare dictionaries - different values
- PyTest compare dictionaries - missing-keys
- PyTest Fixtures
- PyTest: What are Fixtures?
- PyTest: test with functions
- PyTest Fixture setup and teardown xUnit style
- PyTest Fixture setup and teardown output
- PyTest: Fixture Class setup and teardown
- PyTest: Fixture Class setup and teardown output
- What is Dependency injection?
- Pytest fixture - tmpdir
- Pytest and tempdir
- Pytest CLI key-value store
- Pytest testing key-value store - environment variable
- Pytest testing key-value store - environment variable (outside)
- Application that prints to STDOUT and STDERR
- Pytest capture STDOUT and STDERR with capsys
- PyTest - write your own fixture
- Pytest Fixture - autouse fixtures
- Share fixtures among test files: conftest.py
- Manual fixtures (dependency injection)
- Pytest Fixture providing value
- Pytest Fixture providing value with teardown
- Pytest create fixture with file(s) - app and test
- Pytest create fixture with file(s) - helper function
- Pytest create fixture with file(s) - fixture
- Pytest with Docker - application
- Pytest with Docker - test
- Pytest with Docker - improved
- Pytest fixture inject data
- Pytest fixture for MongoDB
- Pytest parameters
- Pytest parametrized fixture
- Pytest parametrized fixture with dependency injection
- Pytest parametrized fixture to use Docker
- Pytest Mocking
- Pytest: Mocking - why?
- Pytest: Mocking - what?
- Pytest: What is Mocking? - Test Doubles
- Pytest: Monkey Patching
- Pytest: Hard-coded path
- Pytest: Hard-coded path - manually replace attribute
- Pytest: Hard-coded path - monkeypatch attribute
- Pytest: Hard-coded path - monkeypatch attribute - tempdir
- Pytest: Mocking slow external API call
- Pytest: Mocking slow external API call - manually replace function
- Pytest: Mocking slow external API call - manually replace function - broken remote
- Pytest: Mocking slow external API call - monkeypatch
- Pytest: Mocking STDIN
- Pytest: Mocking STDIN manually mocking
- Pytest: Mocking STDIN - monkeypatch
- Pytest: Mocking random numbes - the application
- Pytest: Mocking random numbes
- Pytest: Mocking multiple random numbers
- Pytest: Mocking environment variables
- Pytest: Mocking time
- Pytest: Mocking time (test expiration)
- Pytest: mocking specific timestamp with datetime
- Pytest: mocking specific timestamp with datetime
- Pytest: mocking datetime.date.today
- Pytest: mocking datetime date
- Pytest: One dimensional spacefight
- Pytest: Mocking input and output in the game
- Pytest: Mocking input and output in the game - no tools
- Pytest: Mocking random in the game
- Pytest: Mocking random in the game - no tools
- Pytest: Flask app sending mail
- Pytest: Mocking Flask app sending mail
- Pytest: Mocking - collecting stats example
- Pytest command line options
- PyTest: Run tests in parallel with xdist
- PyTest: Order of tests
- PyTest: Randomize Order of tests
- PyTest: Force default order
- PyTest test discovery
- PyTest test discovery - ignore some tests
- Pytest dry-run - collect-only
- PyTest select tests by name
- Pytest use markers to select tests
- PyTest select tests by marker
- No test selected
- Pytest reporting in JUnit XML or JSON format
- Pytest reporting in JUnit XML format
- Pytest reporting in JSON format
- Pytest JSON report
- Add extra command line parameters to Pytest - conftest - getoption
- Add extra command line parameters to Pytest - as a fixture
- Add extra command line parameters to Pytest - used in the autouse fixtures
- PyTest: Test Coverage
- Pytest and flake8
- Pytest and mypy
- Pytest - other
- Testing with Pytest
- Testing functions
- Testing class and methods
- Pytest - execute
- Pytest - execute
- Pytest simple module to be tested
- Pytest simple tests - success
- Pytest simple tests - success output
- Pytest simple tests - failure
- Pytest simple tests - failure output
- PyTest bank deposit
- PyTest expected exceptions (bank deposit)
- PyTest expected exceptions (bank deposit) - no exception happens
- PyTest expected exceptions (bank deposit) - different exception is raised
- PyTest expected exceptions - divide
- PyTest expected exceptions output
- PyTest expected exceptions (text changed)
- PyTest expected exceptions (text changed) output
- PyTest expected exceptions (other exception)
- PyTest expected exceptions (other exception) output
- PyTest expected exceptions (no exception)
- PyTest expected exceptions (no exception) output
- PyTest compare short lists - output
- Testing Master Mind
- 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
- Advanced OOP
- Stringify class
- Multiple inheritance
- Multiple inheritance - diamond
- Interfaces
- Abstract Base Class
- Abstract Base Class with abc
- ABC working example
- ABC - cannot instantiate the base-class
- ABC - must implement methods
- Class Attributes
- Class count instances
- Destructor: __del__
- Class count instances - decrease also (destructor: __del__)
- Keep track of instances
- Keep track of instances properly (weakref)
- Destructor delayed
- Destructor delayed for both
- Class Attributes in Instances
- Attributes with method access
- Methods are class attributes - add method
- Methods are class attributes - replace method
- Methods are class attributes - Enhance method (Monkey patching)
- Method types
- Instance methods
- Class methods
- Class methods accessing class attributes
- Default Constructor
- Alternative constructor with class method
- Static methods
- Module functions
- Class and static methods
- Special methods
- Opearator overloading
- Operator overloading methods
- Declaring attributes (dataclasses)
- Dataclasses and __repr__
- Dataclasses and __eq__
- Dataclasses create __init__ and call __post_init__
- Dataclasses can provide default values to attributes
- Dataclasses and default factory
- Read only (frozen) Dataclass
- Serialization of instances with pickle
- Class in function
- Exercise: rectangle
- Exercise: SNMP numbers
- Exercise: Implement a Gene inheritance model combining DNA
- Exercise: imaginary numbers - complex numbers
- Solution: Rectangle
- Solution: Implement a Gene inheritance model combining DNA
- Instance Attribute
- Use Python @propery to fix bad interface (the bad interface)
- Use Python @propery to fix bad interface (first attempt)
- Use Python @propery to fix bad API
- Use Python @propery decorator to fix bad API
- Use Python @propery for value validation
- 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
- Other slides
- Other slides
- Atom for Python
- IDLE - Integrated DeveLopment Environment
- sh-bang - executable on Linux/Apple
- Strings as Comments
- pydoc
- Spyder Intro
- Interactive Debugging
- Parameter passing
- Command line arguments and main
- Infinite loop
- break
- continue
- While with many conditions
- while loop with many conditions
- Format with conversion (stringifiation with str or repr)
- Name of the current function in Python
- Name of the caller function in Python
- Stack trace in Python using inspect
- Module Fibonacci
- PyTest - assertion
- PyTest - failure
- PyTest - list
- SAX with coroutine
- Getting the class name of an object
- Inheritance - super
- Inheritance - super - other class
- 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
- Abstract Base Class without abc
- Abstract Base Class with abc Python 2 ?
- Abstract Base Class with metaclass
- Create class with metaclass
- Python Descriptors
- alter iterator
- Create a counter queue
- A Queue of tasks
- Filtered Fibonacci with ifilter
- 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
- Pandas Stocks
- Pandas Stocks
- Merge Dataframes
- Analyze Alerts
- Analyze IFMetrics
- Calculate Genome metrics - add columns
- Calculate Genome metrics - vectorized
- Calculate Genome metrics - vectorized numpy
- Pandas more
- Pandas Series
- Pandas Series with names
- Matplotlib subplot
- Jupyter StackOverflow - historgram
- Jupyter StackOverflow - OpenSourcer
- Jupyter StackOverflow - cross tabulation
- Jupyter StackOverflow - salaries
- Jupyter StackOverflow - replace values
- ord in a file
- NameError
- UnboundLocalError
- Insert element in sorted list using bisect
- Insert element in sorted list using insort
- Pytest: monkeypatching time
- PyTest: no random order
- Classes
- Create a class inherit from object
- Abstract Base Class without ABC
- 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 ==