Ben Chuanlong Du's Blog

It is never too late to learn.

Logging in PySpark

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. Excessive logging is better than no logging! This is generally true in distributed big data applications.

  2. Use loguru if it is available. If you have to use the logging module, be …

Markdown vs RestructureText vs MyST for Documentation

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Comparison

  1. Compared to Markdown, RestructuredText is more fully-featured, much more standardized and uniform, and has built-in support for extensions. However, ReStructuredText is also criticized for its complex and confusing syntax. The …

Markedly Structured Text

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

MySt is an extension of CommonMarkdown with some goodies introduced from RestructuredText. The jupyter-book project supports MySt syntax.

References

https://github.com/executablebooks/MyST-Parser

https://myst-parser.readthedocs.io/en/latest/

Device Managment in PyTorch

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. Modules can hold parameters of different types on different devices, so it's not always possible to unambiguously determine the device. The recommended workflow in PyTorch is to create the device object …

Tips on Outlook

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Tip and Traps

  1. Always be careful when yu use "Reply All". Make sure that the recipients are the right ones. Avoid forward a large group meeting to people and have a …