Skip to main content

Modify Jupyter Notebook

In this article, I will provide some methods to make the jupyter notebook the way you like.

Change the Theme: 

The tool for changing the theme of a jupyter notebook is: jupyter-themes

The command that I use is:


jt -t onedork -f dejavu -fs 14 -nfs 14 -tf dejavu -tfs 14 -dfs 14 -ofs 14 -cellw 88% -T


The meaning of each parameter can be found in the link above. BTW, I like dejavu font.

Wrap the line:

Usually when we write a very long statement, we want it to be wrapped in a certain length limit. We can modify the notebook.json file.

The way to find your directory of notebook.json file is:


jupyter --config-dir


Then you will get the path for directory nbconfig folder, the notebook.json file is inside this folder.

open notebook.json file, then add the following code:


  "MarkdownCell": {
    "cm_config": {
      "lineWrapping": true
    }
  },
  "CodeCell": {
    "cm_config": {
      "lineWrapping": true
    }
  }

save, exit. Your jupyter notebook now have line-wrapping capability!

Add the navigation bar:

Sometimes our jupyter notebook can become very long and messy, so it is very important to have a navigation bar since jupyter doesn't provide this tool, we need to search for it.

The tool that I found is jupyter-navbar.

Install this is very easy:


python setup.py


Then you get a navigation bar in your jupyter notebook.

In the future, if I learn more things about modifying jupyter, I will document them in here.

Good day, bye-bye!

See you in the next article!

Comments

Popular posts from this blog

The bird-eye view of computer science

Today I went to the library and borrow a huge book called " Computer Science --- Handbook (Second Edition)". Cover of the book "Computer Science Handbook (Second Edition) This book is edited by Allen B. Tucker , and it is a very comprehensive and encyclopedia-like book which contains almost every area in computer science. Here is its table of contents, I will post one article about my understanding everyday, please subscribe this blog and get the newest article! Here's a very useful post designed by Dominic William. He also provides a video on Youtube . Maps of Computer Science Table of Contents of the book: There are two articles in front of specialized sections, they are: Computer Science: The Discipline and its Impact (By Allen B. Tucker and Peter Wegner ) Ethical Issues for Computer Scientists (By Deborah G. Johnson and Keith W. Miller ) Now we will list all 11 sections and the papers inside each section: Section I: Algorithms an...

19 things I learned from Ryan Holiday's Interview

This is an amazing interview with Ryan Holiday. The talked a lot of things, like being a father, how to have a good life, how to treat criticism and how to stay productive. You definitely should check it out. In below I summarized 19 things which I find most interesting in this video, I will share them with you. And hope you can also share your own idea and understanding in the comment section, I'll meet you there. Here are 19 things that I've learned from the interview: How to figure out "what you want to write": Try to figure out the things that you wished you could learn 5 / 10 years ago. And write something for your own needs. It can always be someone else's needs. When you are writing a book, know your audience . Ryan always thinks about that he is writing the book to the younger version of himself. Learn how to say "no" to things. But when you are at the beginning, say "yes" to everything, because that means opportunity. ...