library

2023

[sympy] Probability and Statistics with SymPy

Uses SymPy to symbolically derive the binomial-to-Poisson distribution limit and perform maximum likelihood estimation with Fisher information for the normal distribution.

[sympy] Symbolic Mathematics with SymPy

Introduces the basics of SymPy, covering symbolic expansion, factorization, equation solving, differentiation, integration, and matrix operations with simple examples.

[sqlite3] How to Use EXISTS and IN

Explains when to use SQL's EXISTS versus IN using a customers and orders example, covering differences in NULL handling and query performance.

[sqlite3] Utilizing Self Join

Explains SQL self joins using an employee-manager hierarchy example, showing how to join a table with itself using aliases to look up related rows.

[sqlite3] Utilizing CASE Expressions

Explains how to use SQL's CASE expression to assign grades based on scores and combine it with aggregate functions to build conditional cross-tabulation queries.

[sqlite3] Common Table Expressions (CTE)

Explains SQL Common Table Expressions (CTEs) by comparing a subquery-based query with a CTE-based rewrite to show improved readability and reusability.

[sqlite3] Window Functions

Explains the differences between SQL window functions RANK, DENSE_RANK, and ROW_NUMBER for ranking data with tied scores, using a sample student scores table.

2022

[pytorch] Inverting Arrays

Explains how to invert 1D and 2D tensors in PyTorch using torch.flip and torch.fliplr, comparing them with NumPy's slice-based array reversal with code examples.

2021

2020

[sympy] 量子演算

Explores how to simulate basic quantum computing operations with SymPy, including qubit notation, bra-ket representation, and tensor products.

[sympy] Basic arithmetic

Introduces basic SymPy usage for symbolic computation in Python, covering rational numbers, pi, exponentials, and other fundamental numeric types.

[OpenCV] Face Recognition

Explains how to perform face detection with OpenCV's Haar cascade classifier and extract facial landmarks and orientation using dlib's 68-point shape predictor.

[React (typescript)] File Upload to AWS S3

Shows how to upload files from a React (TypeScript) app to AWS S3, using the AWS SDK for public buckets and presigned URLs for private buckets, with a Dropzone UI.

[matplotlib] Basic usage notes

Notes on basic matplotlib usage covering line plots, multiple plots with different styles, histograms, and 3D surface/scatter plots using meshgrid, with code examples.

[OpenCV] Image Transformation

Explains OpenCV image transformation techniques including rotation, contour-based region extraction, Gaussian blurring, and Canny edge detection, with Python examples.

[OpenCV] The Basics

Covers basic OpenCV operations in Python: loading and saving images, converting to grayscale, inverting black and white, and binarizing images, with example code.

[bash] How to use sed

Introduces the bash sed command for stream editing, showing how to replace strings in a file in place using the -e and -i options with a simple example.

[bash] How to use cat

Explains how to use the bash cat command to display and concatenate files, create here-documents, and use options like -t and -e, with practical examples.

[bash] How to use cut

Explains how to use the bash cut command to extract specific columns from tab- or space-delimited text files using the -d and -f options, with examples.

[python] Introduction to pulp

Introduces PuLP for linear optimization in Python, showing how to define variables, an objective function, and constraints to solve a simple maximization problem.

[python] Automatic posting to wordpress

Shows how to use the python-wordpress-xmlrpc library to programmatically create and publish WordPress posts, including setting tags, categories, and uploading images.

[python] twitter auto-tweet

Shows how to use the tweepy library to build a simple bot that posts automatic tweets from Python, including reading API credentials from a config file.

[python] re regular expressions

Personal notes on Python's re module, covering compiling patterns with re.compile and the differences between match, search, findall, and finditer.

[python] Get memory address

Explains Python's id() function for inspecting object memory addresses, showing how variable assignment, identical values, and reassignment affect object identity.

[scikit-learn] 4. logistic regression

Demonstrates how to perform logistic regression with scikit-learn, covering the logit and logistic (sigmoid) functions and fitting a simple one-dimensional example.

[scikit-learn] 3. linear regression

Shows how to perform multiple linear regression with two explanatory variables using scikit-learn, including data generation, model fitting, and MSE evaluation.