Tips and Traps¶
Starting from Python 3.7,
dict
preserves insertion order (i.e.,dict
is ordered). There is no need to useOrderedDict
any more in Python 3.7+. However,set
in Python is implemented as an unordered hashset and thus is neither ordered nor sorted. A trick to dedup an iterablevalues
Install Python in macOS
There are a few ways to install Python in Mac.
-
Install system-wide via the official Python installation package.
-
Install locally using Homebrew (recommended).
You should avoid installing multiple versions of Python in your system. It usually brings more troubles than conveniences. Python virtual environemnts ( via uv ) and Docker containers are …
My Docker Images
Recommended Docker Images and Tags
Most of my Docker images have different variants
(corresponding to tags latest
, next
, etc)
for different use cases.
And each tag might have histocial versions
with the pattern mmddhh
(mm
, dd
and hh
stand for the month, day and hour)
for fallback if a tag …
Use pdftk to Manipulating PDF Files
-
It is suggested that you use Python modules or Stirling-PDF instead of
pdftk
to manipulating PDFs for several reasons. First, even thoughpdftk
is a great command-line tool, it is hard to remember its syntax. On the contratry, Python code is easy to read and understand (even though it is …
Editing PDF Files
Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Type | Name | Comments |
---|---|---|
Web Tools | Stirling-PDF |
- robust - local hosted - Docker container based |
Parseur | - AI-based PDF parser | |
DocuSign | - Great for convert PDF files to MS Office files … |
Android Emulators
Name | Free | OS | Hyper-v Compat on Win | ARM-only App Support | Development |
---|---|---|---|---|---|
GenyMotion [1] | Limited | Windows, macOS, Linux | Partial | Limited | Active |
BlueStacks [2] | Yes | Windows, macOS | No | Yes | Active |
LDPlayer [3] | Yes | Windows | No | Yes | Active |
xDroid [9] | Limited | Linux | NA | Limited | Active |
MuMu App Player [5] | Yes | macOS (M chip … |