Ben Chuanlong Du's Blog

It is never too late to learn.

Operators in Different Programming Languages

Python Bash C/C++ Java Julia
and and -a && && &&
or or -o || || ||
not not ! ! ! !
bit and & & & & &
bit or | | | | |
bit not ~ ~ ~ ~ ~
bit xor ^ ^ ^ ^ ^
vector and
vector or
vector not
equals == -eq == == ==
not equal != -ne != != !=
greater than > -gt > > >
less than < -lt < < <
greater than or equal to >= -ge >= >= >=
less than or equal to …

Write Unit Tests Using PyTest in Python

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

Run pytest in the root directory of your project to run all test suites. You can run test cases in a specific test file (e.g., test_file.py) using the command …

Use Flake8 to Lint Python Scripts

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

Configration

It is suggested that you put the configuration into a file named .flake8 in the root directory of your project. When flake8 supports pyproject.toml later, it is best to …