Ben Chuanlong Du's Blog

It is never too late to learn.

Select All Columns Except a Few from a Table

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

Comments

There is no (direct) way of select all columns except a few from a table using SQL. However, this is easily doable with DataFrame APIs (pandas, Spark/PySpark, etc.).

Tips on NetworkX

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

Tips on Omegaconf

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

  1. omegaconf can parse command-line options too. However, unlike argparse it does not enforce any constraint on command-line options.

Tips on Darglint

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

Tips and Traps

  1. It is suggested that you avoid using darglint directly, but instead you can use flake8 which will automatically call darglint if it exists.

  2. Improperly escaped \n causes darglint …

Tips on Jinja

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

Get the Dependencies of a Python Package Without Installing It

After installing a Python package, you can use the command pip3 show pkg to check detailed information about it. What if you want to get information about a Python package without installing? The RESTAPI https://pypi.org/pypi/pkg/json returns detailed information of the Python package pkg.

Note: The recursive version of dependencies implemented bellow does not take into consideration of versions, so it might not return the correct dependencies of a Python packages.