<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Pranjal Chaubey on Medium]]></title>
        <description><![CDATA[Stories by Pranjal Chaubey on Medium]]></description>
        <link>https://medium.com/@pranjalchaubey?source=rss-94eb6ddcedb9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*1tcpJLqbt52nQeczApGBBw.jpeg</url>
            <title>Stories by Pranjal Chaubey on Medium</title>
            <link>https://medium.com/@pranjalchaubey?source=rss-94eb6ddcedb9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 20:26:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pranjalchaubey/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Supercharging Jupyter Notebooks]]></title>
            <link>https://medium.com/data-science/supercharging-jupyter-notebooks-e22f5ad7ca18?source=rss-94eb6ddcedb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/e22f5ad7ca18</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[jupyter-notebook]]></category>
            <dc:creator><![CDATA[Pranjal Chaubey]]></dc:creator>
            <pubDate>Sun, 14 Jul 2019 17:43:06 GMT</pubDate>
            <atom:updated>2019-07-21T14:51:45.813Z</atom:updated>
            <content:encoded><![CDATA[<p>Jupyter Notebooks are currently the hottest programming environment for Pythonistas the world over, especially those who are into Machine Learning and Data Science. I discovered Jupyter Notebooks when I first started to get serious about Machine Learning a few months ago. Initially, I was simply amazed, loved how everything ran inside my browser. However, I soon got disillusioned and found the stock Jupyter Notebook interface to be very basic lacking several useful features. That’s when I decided to go hunting for some Jupyter Notebook hacks.</p><p>In this article, I present several Jupyter Notebook add-ons/extensions and a few jupyter commands that will enhance your Jupyter Notebooks and increase your productivity. In short, <em>Supercharge your </em>Jupyter Notebooks.</p><p>Once you follow the instructions below, your Jupyter Notebooks will have the following awesome features (and more, if you want):</p><ol><li>Ability to <em>switch between multiple Conda environments</em> on the fly without having to restart the Jupyter Notebook.</li><li>1-click clickable <em>Table of Contents </em>generation (you’re going to love this one!)</li><li>A super useful pop-up <em>Scratch Pad</em> (my favorite feature!), where you can play around and test your code on the side without having to change anything in the primary notebook.</li><li><em>Code Folding </em>inside the code cells. I wonder why this feature was not part of the stock Jupyter Notebooks already.</li><li>1-click<em> Code Cell hiding</em>, an important feature when you are telling your data story through visualizations….people are usually interested in your graphs and charts, not the code!</li><li>A super cool <em>Variable Inspector!</em></li><li>A <em>Spellchecker </em>for Markdown cells.</li><li><em>ZenMode </em>for those late-night coding sessions.</li><li>A <em>Code Snippets </em>menu to add commonly used python constructs like <em>List comprehensions</em> on the fly.</li><li>And finally, absolutely the best feature, <strong><em>a soothing beautiful midnight blue color scheme to save your eyes</em></strong>!</li></ol><h3>Time to Supercharge!</h3><p>First up, we will make sure our notebooks have a nice dark theme that is soothing to the eyes. The stock white background can make your eyes bleed if you are working long hours on a daily basis. Anyway, <em>once you go dark, you’re never switching back</em> 😉</p><p>Install the dark theme using the following commands,</p><pre># Kill and exit the Notebook server<br># Make sure you are in the base conda environment<br>conda activate base</pre><pre># install jupyterthemes<br>pip install jupyterthemes</pre><pre># upgrade to latest version<br>pip install --upgrade jupyterthemes</pre><p>Once the package is installed and upgraded, run the following command and turn your stock white themed Jupyter Notebooks into a lovely <em>Deep Blue Midnight Theme</em>. Your eyes will love you for this.</p><pre># Enable Dark Mode<br>jt -t onedork -fs 95 -altp -tfs 11 -nfs 115 -cellw 88% -T</pre><p>Next, let’s see if we can add all of our custom environments created in Anaconda as kernels in the Jupyter Notebooks. This would ensure that we can switch environments by simply selecting them in the <em>Kernel </em>menu. No need to restart notebooks when switching kernels.</p><p>Let’s say you have created two custom environments in Anaconda, <em>my_NLP, </em>and <em>gym</em>. To add these in your Jupyter Notebooks, follow the steps below,</p><pre># Stop and exit your Jupyter Notebook server first<br># Activate your environment in the terminal <br>conda activate my_NLP<br># Install the IPython Kernel <br>pip install ipykernel<br># Link your environment with Jupyter <br>python -m ipykernel install --user --name=my_NLP</pre><pre># Repeat steps for the other environment, gym. <br>conda activate gym<br>pip install ipykernel <br>python -m ipykernel install --user --name=gym</pre><p>Now open your Jupyter Notebooks, go to the <em>Change Kernel </em>option in the <em>Kernel </em>menu and ….Boom! You should be able to see all the kernels listed there and you can now activate them simply by clicking on them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-zo4-CAjzoZ5ugJPpOtE3A.png" /><figcaption>This is where the newly added Kernels should show up. Notice the soothing midnight blue theme.</figcaption></figure><p>For all the other cool features I mentioned above, we need to install something called <a href="https://jupyter-contrib-nbextensions.readthedocs.io/en/latest/install.html">nbextensions for Jupyter Notebooks</a>. Installing nbextensions is easy, simply follow the steps below,</p><pre># Stop and exit your Jupyter Notebook server <br># Make sure you are in the base environment<br>conda activate base</pre><pre># Install the nbextensions <br>pip install jupyter_contrib_nbextensions<br># Install the necessary JS and CSS files <br>jupyter contrib nbextension install --system</pre><p>Start the Jupyter Notebook server and you should now see a fourth option called <em>Nbextensions </em>in the opening page. Click on it to see an awesome set of features that you always wanted in Jupyter Notebooks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tkzgbCuELLu-VbNcIa8sBA.png" /><figcaption>The Nbextensions tab!</figcaption></figure><p>As you can see above, the list of extensions is huge and even a little intimidating at first sight. Not all of them are useful, and here are the ones that I use,</p><ol><li><em>Table of Contents(2) — </em>Generate a <em>table of contents</em> for the entire notebook in a single click, with hyperlinks to various sections.</li><li><em>Scratchpad — </em>Absolutely the best extension in my opinion. A separate space for you to experiment with code without disturbing the rest of the notebook.</li><li><em>Codefolding — </em>No need for any explanation here.</li><li><em>Hide Input All — </em>Hide all the code cells, while leaving the output and markdown cells visible. A very useful feature if you are trying to explain your results to non-technical people.</li><li><em>Variable Inspector — </em>To save you from the debugging blues, something similar to the variable inspector window found in Spyder IDE.</li><li><em>Spellchecker — </em>A spell checker for the content in your markdown cells.</li><li><em>Zenmode — </em>Removes extra clutter from the screen so that you can focus on what is important, the code.</li><li><em>Snippets Menu — </em>A cool collections of frequently used code snippets from list comprehensions to pandas and everything in-between. Best Part? You can modify the widget and add your custom snippets.</li></ol><p>The above list contains the extensions that I mostly use, but you’re encouraged to try out the rest. Some interesting ones include <em>ScrollDown,</em> <em>table_beautifier, and Hinterland.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AQQziwrJIecn8qA0BB3cSQ.png" /><figcaption>The Snippets extension in action along with the Table of Contents generation extension at work.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zsgT5xraGQIHlJtQxXS_nw.png" /><figcaption>The Scratchpad extension</figcaption></figure><p>Let me know what do you think about these enhancements for Jupyter Notebooks. If you face any errors in installing the extensions, feel free to drop in a comment.</p><p><strong>EDIT:</strong></p><ol><li>If you have not installed Anaconda on your system, simply ignore the commands that have <em>conda </em>in it. Also, ignore the section where we talk about adding the Anaconda environments to Jupyter Notebooks.</li><li>You’ll probably need admin rights to install all these extensions on your system.</li><li>If you didn’t like the midnight blue theme on your Notebooks, simply execute <strong><em>jt -r </em></strong>in the terminal to reset everything back to normal. You will have to restart your Jupyter Notebook, you might also have to clear your browser cache in case you still see the Midnight Blue theme after restarting.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e22f5ad7ca18" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/supercharging-jupyter-notebooks-e22f5ad7ca18">Supercharging Jupyter Notebooks</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>