Ben Chuanlong Du's Blog

It is never too late to learn.

Use nbdime to Diff and Merge JupyterLab Notebooks

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

nbdime is a tool for diffing and merging of Jupyter notebooks. Notice that nbdime integrates with git well.

Tips and Traps

If you install nbdime to your local directory, make sure …

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 …

Tips on Google Colab

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

  1. The default user is the root user, so you can install software as needed.

  2. Google Colab notebook does not support terminal but it can be hacked to run JupyterLab.

  3. You can …

Debug Code in JupyterLab Notebooks

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

Use the %debug Magic

The easiest way to debug a Jupyter notebook is to use the %debug magic command. Whenever you encounter an error or exception, just open a new notebook …

Tips on Jupyter Binder

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

  1. By default a Jupyter notebook server is shown. You can manually switch to the JupyterLab server by changin tree to lab? in the URL. For more details, please refer to binder-examples …