Ben Chuanlong Du's Blog

It is never too late to learn.

Shadow Parent Methods in Python

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

Below is an example of shadowing a parent method in a child class.

Tips and sshfs and fuse

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

  1. If you want to be able to mount remove Linux filesystem on you computer, you can install sshfs and fuse using the following command.

    wajig install sshfs fuse
    

    It is suggested …

Get Total Physical Memory in Python

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

Using os.sysconf

Notice that this ways only works on Linux but not on macOS or Windows.

Get physical memory in bytes.

Wirelss for Debian

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

  1. Depending on the wireless card on your machine, you might have to install a wireless card dirver manually. You can use the following command to check the type of the wireless …

Absolute or Relative Path for Executables

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

When you call shell commands in your code, a nature question to ask is whether you should the absolute or a relative path (command). Both ways have their advantages and disadvantages …

Rule-base Image Process

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

If you face a relative simple image recognition problem which hasn't been studied by other people before so that no public data is available for it, it is probably less effort …