Ben Chuanlong Du's Blog

It is never too late to learn.

Tips on the Almond Scala Kernel

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

  1. kernel.silent(true) supress outputs of cells.

  2. Currently each line in a cell have an output, which is messy. There are 2 ways to avoid this.

    val resObj = {
        ...
        ...
    }
    
    {{
        ...
        ...
    }}
    

References

Use Spark …

Remove System Applications in macOS

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

The macOS has some system applications (e.g., Numbers, Keynotes, etc.) come installed by default. You cannot uninstall them from Application in Finder. However, there's one way to remove those applications …

Schdule Jobs in Python

Tips and Traps

  1. If you schedule a job $J_1$ using schedule in IPython shell, and then interrupt the following loop that checks and runs pending jobs,
    while True:
         schedule.run_pending()
    
    the scheduled job $J_1$ is still there unless you stop the current IPython shell. The effective consequence of this is that if you schedule another job $J_2$, and start to run it using the following loop,

The Installation Location of Python Packages Using Pip

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

When installing a Python package using pip without using sudo or the root user, the package is installed into the user's local directory at ~/.local/lib/python3.7/site-packages (using Python …