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

How to use flash card for studying?

Flash cards are very useful learning tools. They can provide so-called "active recall". That means we can use them to recall our memory and understanding about the concepts, methods and subjects. Although very useful, its creation is a real challenge. How to create effective flash cards that can help us accelerate the learning procedure? I try to answer this question in this blog post. Flash cards are the most useful tools in asking questions. That means every flash card should be a question, like "Is Abraham Lincoln a good president?" or "What is 3+5?". Each question represents a certain category: definite question and open question . What is definite question? A definite question means that the answer is unique and determined. Like "What is 3+5?", the answer is 8. This kind of questions we can use flash cards to solve them quite easily. Just like an exercise. What is open question? Open question is the kind of question which you can

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.