General Tips¶
The method
subprocess.run
is preferred over older high-level APIs (subprocess.call
,subprocess.check_call
andsubprocess.check_output
). The methodsubprocess.Popen
(which powers the high-level APIs) can be used if you need advanced controls. When running a shell command usingsubprocess.run
,Avoid using system shell (i.e., avoid using
shell=True
) for 2 reasons. First, avoid shell injection attack. Second, there is no need for you to manually escape special characters in the command.
Windows Operating System
Tips and Traps
-
You can download a Windows 10 Virtual Machine at Get a Windows 10 development environment !
-
winget is the official Windows Package Manager CLI and Chocolatey is a cool community-driven software management tool for Windows.
-
When a file is being synchronized by Dropbox, it might be unaccessible temporarily …
Hands on pathlib.Path
Understand Execuation of SQL Statements
Execuation Order¶
A SQL statement selects rows and columns from a big (rectangular) table.
You put columns that you want to select after SELECT
and rows you want to select after FROM
.
A SQL statement is executed as follows.
First,
the (INNER|LEFT|RIGHT|FULL) JOIN (ON)
is executed if any (see more explanation later).
Second,
the WHERE
Map Keys in macOS
Update: As of MacOS Sierra 10.12.1,
the remapping of Caps Lock
to Escape
can be done natively in the Keyboard System Preferences pane.
Follow the steps below to remap Caps Lock to Escape (without relying on 3rd party software).
- Open System Preferences and click on
Keyboard
- Click on …
Map Keys in Windows
** Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement! **
If you are a heavy Vim user and you have work on Windows, it is suggested that you Swap the Caps Lock key with the Escape key. The swaped key mapping …