By default, IPython (kernel of Jupyter/Lab notebook) disables executation of untrusted code without explicit user input. If you have notebook whose output containings JavaScript (e.g., JS-based visualiation) and code wasn't run by you (e.g., the notebook is shared by someone else), the JS-based output won't be shown …
Speedup Docker Pulling and Pushing
Pulling/pushing Docker images is extremely slow in China. There are a few ways to speed up docker pulling/pushing in China.
Using the Official China Mirror
Now the best way is to use the offical China mirror. Please refer to Docker 中国官方镜像加速 …
Construct pandas DataFrames in Python
Unpacking Assignment in Python
The unpacking assignment assigns elements of a tuple/list to variables at once.
Runtime Paths in Python
__file__
is the path of the Python script.
Note that if you make a sybolic link to a Python script and run the symbolic link,
then __file__
is the path of the symbolic link.
Of course, you can use os.path.realpath
to get real path of files.
pathlib.Path …
Good Ways to Do Scientific Computing
-
Break down the work into smaller modules and develop pipelines (consists of module) for the work. Be sure to save (important) intermediate results so that you can resume failed modules withouting reruning succeeded ones.
-
Manage your project in GitHub and use issues to manage tasks to do and their priorities …