Rainux Learning Notes
website·Indexed 31 days ago
https://rainux.cnA collection of themed learning notes covering software development and general knowledge. Technical content includes Python (FastAPI, Flask), Go (Gin, workspace mode), and various Creational and Behavioural Design Patterns. The documentation also features reading notes on psychology, political science, and personal study records.
What's inside Rainux Docs
- Flask is a lightweight Python Web framework based on the Werkzeug WSGI toolkit and Jinja2 template engine. It is categorized as a "micro-framework" because it provides only the core components necessary to build a web application, leaving choices like database integration and form validation to the developer via extensions.
Overview of pg_basebackup
pg_basebackup is a base hot backup tool introduced in PostgreSQL 9.1. It allows for backups without affecting other database clients. The resulting files can be used for Point-in-Time Recovery (PITR) or as a starting point for WAL shipping and streaming replication. Note: The database must have archive mode enabled to use pg_basebackup.Overview of LangGraph
LangGraph is a low-level agent orchestration framework designed for building complex, long-running, and stateful workflows. Unlike high-level LangChain APIs, LangGraph provides more direct control and greater flexibility over the execution flow. Key capabilities include built-in state management, persistence, support for human-in-the-loop interruptions, and parallel processing.Overview of Decision Tree concepts
A decision tree is a machine learning method that uses a 'divide and conquer' strategy to produce a model with strong generalization capabilities. It consists of a root node, internal nodes (attribute tests), and leaf nodes (decision results).
Key types include:
- Classification Trees: ID3 and C4.5.
- Regression Trees: CART.
Pros: Low computational complexity, easy-to-understand rules, and high accuracy. Cons: Potential for inefficiency due to multiple dataset scans/sorts and susceptibility to overfitting.
Overview of Backtracking Algorithm
Backtracking is an exhaustive search method used to solve problems by exploring all possible solutions from an initial state. It typically employs Depth-First Search (DFS) to traverse the solution space. The core process involves making a choice, exploring the resulting state, and 'backtracking' (undoing the choice) to explore other possibilities until a solution is found or all options are exhausted.Overview of Redis features and use cases
Redis (Remote Dictionary Server) is an open-source, high-performance key-value store used as a database, cache, message broker, and streaming engine. It operates primarily in-memory for extreme read/write performance while providing persistence options to prevent data loss during restarts. Key characteristics include atomic operations for concurrency safety and support for multiple deployment architectures (Standalone, Master-Slave Replication, Sentinel, and Cluster).Overview of PostgreSQL Sequences
Sequences in PostgreSQL are special single-row tables created using theCREATE SEQUENCEcommand. They are primarily used to generate unique identifiers for table rows.Overview of kind for local Kubernetes clusters
kind is a command-line tool used to run local Kubernetes clusters using Docker containers, similar to minikube. To run Kubernetes locally with kind, you need three components: Docker, kind, and kubectl.Overview of MCP Middleware
MCP Middleware allows developers to intercept and modify requests and responses as they flow through the server. It acts as a pipeline where each middleware can inspect the operation, modify data, and pass control to the next middleware in the chain. Common use cases include authentication/authorization, logging, rate limiting, request/response transformation, caching, and consistent error handling.Overview of Pandas for data analysis
Pandas is a Python third-party library specialized in data analysis, particularly for numerical and time-series data. It provides higher efficiency and more complex processing logic than Excel for tabular data. Key capabilities include:
- Reading data from xlsx, csv, and SQL sources.
- Data cleaning (deduplication, handling missing values, filling defaults, and outlier processing).
- Merging and splitting datasets.
- Indexing, querying, and filtering data.
- Grouping and aggregating data with custom field calculations.
- Data transposition (row-to-column and column-to-row).
- Time-series sampling (quarterly, monthly, business hours, or custom periods).
- Window calculations and moving statistics.
- Visualization of statistical charts and custom table styling.
Overview of English Tense Matrix
English tenses are formed by combining two dimensions: Time (Present, Past, Future, Future-in-the-Past) and State (Simple, Continuous, Perfect, Perfect Continuous). This results in 16 primary tense combinations.Time \ State Simple Continuous Perfect Perfect Continuous Past Simple Past Past Continuous Past Perfect Past Perfect Continuous Present Simple Present Present Continuous Present Perfect Present Perfect Continuous Future Simple Future Future Continuous Future Perfect Future Perfect Continuous Future-in-the-Past Simple Future in the Past Future Continuous in the Past Future Perfect in the Past Future Perfect Continuous in the Past Overview of PostgreSQL Table Partitioning
Table partitioning is used to resolve performance issues caused by excessively large tables, specifically reducing the cost of full table scans. It is generally recommended when a single table's size exceeds the available memory.
Key benefits include:
- Faster deletion of historical data: Drop entire partitions instead of deleting rows.
- Improved query performance: Significant gains when hot data is concentrated in a few partitions.
- Storage optimization: Low-frequency data can be moved to cheaper, slower storage media using tablespaces.
PostgreSQL supports three partitioning types: Range, List, and Hash. There are two implementation methods: Declarative Partitioning (recommended for PostgreSQL 10+) and Inheritance-based Partitioning. A key difference is that declarative partitioning allows index management on the parent table, whereas inheritance-based partitioning requires indexes to be managed on each child table individually.