Online Regular Expression Tester
The Python module
re
automatically compiles a plain/text pattern usingre.compile
and caches it, so there's not much benefit to compile plain/text patterns by yourself.Some regular expression patterns are defined using a single leading backslash, e.g.,
\s
,\b
, etc. However, since special characters (e.g.,\
) need to be escaped in strings in most programming languages, you will need the string"\\s"
Hands on the Python Library toml
Tips & Traps¶
- Please refer to Parse TOML File in Python for general tips on parsing TOML in Python.
Installatoion¶
Replace Single Quotes With Double Quotes in Python Code
There are 2 ways.
-
Format the Python code using black, which will automatically convert single quotes to double quotes when applicable. (Note that you can format the code again using yapf if you want the code to formatted by yapf finally.)
-
Use the tool myint/unify to help you.
Inner Join of Spark DataFrames
Tips and Traps¶
Select only needed columns before joining.
Rename joining column names to be identical (if different) before joining.
Remote Development in Visual Studio Code
There are 2 approaches to develop remotely in Visual Studio Code. The first way is to leverage the extension pack Remote Development. For more details, please refer to Remote Development with VS Code and VS Code Remote Development.
The second (prefered) approach is to leverage cdr/code-server. For more details …