Ben Chuanlong Du's Blog

And let it direct your passion with reason.

Parse TOML Files in Python

  1. There are 2 popular Python libraries tomlkit and toml for parsing TOML formatted files in Python. tomlkit is preferred to toml as it is more flexible and style-preserving.

  2. A TOML file always interpret a key (even a bare ASCII integer) as string. For this reason, a dict with numerical keys …

Things to Do After Installing Linux

Note: The tips here are for Debian-based Linux distributions (Debian, Ubuntu, LinuxMint, Pop!_OS, AntiX, etc.).

Debian Specific

  1. If you installed Debian without a desktop environment, and wants to install a customized desktop environment now, make sure to install a DE manager (e.g., gdm, lightdm, etc.) as well. without …

Process Big Data Using PySpark

  1. PySpark 2.4 and older does not support Python 3.8. You have to use Python 3.7 with PySpark 2.4 or older.

  2. It can be extremely helpful to run a PySpark application locally to detect possible issues before submitting it to the Spark cluster.

    #!/usr/bin/env bash …

Permission Issues when Installing Softwares in Linux

Sometime when you install softwares in Linux, you get an error message saying that you do not have permission while you used sudo or the root account. This probably means that you do not have full access to some installation files. An easy way to solve this problem is to …

Tips on Installing Debian Series of Linux Distributions

Before Installation

Debian Specific

  1. You'd better not install back ported Debian images, as it might cause issues with other software (e.g., VirtualBox). It is suggested that you use Debian test.

Other Debian-based Linux Distributions

  1. Download the right ISO image of the Linux distribution that you want to install.

  2. Create …