Ben Chuanlong Du's Blog

It is never too late to learn.

Tips on mkdocs

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

https://github.com/mkdocs/mkdocs

https://pypi.org/project/mkdocs-blog-plugin/

https://ddrscott.github.io/blog/2018/move-to-mkdocs/

https://github.com/danielfrg/mkdocs-jupyter

Hands on the Resource Module in Python

Tips and Traps

This module provides basic mechanisms for measuring and controlling system resources utilized by a process and its subprocesses. It cannot be used to check resource usage of other processes.

Check Resources Used by Processes Using Python

Use the tracemalloc Library

https://docs.python.org/3/library/tracemalloc.html#module-tracemalloc

The tracemalloc module is a debug tool to trace memory blocks allocated by Python. It provides the following information:

  • Traceback where an object was allocated
  • Statistics on allocated memory blocks per filename and per line number: total size, number and average size of allocated memory blocks