Custom CSS Jupyterlab Ext

Jupyterlab is a definite improvement on the older IPython notebook interface - both in features and in appearance. There is now even an in-built “Dark Theme” that can be enabled. But is that all? As we know, Jupyterlab is a browser based app and is ipso facto, written on a base of HTML, CSS and Javascript. So if we want to change the appearance over and above what we get out of the box with jupyterlab, we can. Now, it is possible to make any CSS changes by hacking into the internals of the notebook, but thanks to a nifty Jupyterlab extension by Adam Wallner, we don’t have to. ...

December 10, 2019 · 3 min · Abhiram R

Setting Up Python3.8 and Jupyterlab

I’m using Ubuntu 16.04 on this machine, so that’s what the steps of installation here will be for. But this installation shouldn’t largely vary on any distro that’s 14.04 and higher. Step 1 - Download Python source code Binary installations are available for Windows and Mac but you can either install Python3.8 on Ubuntu using “apt” or download and install from source. I did the latter. Obtain the gz file from here. ...

November 7, 2019 · 2 min · Abhiram R

Git Jupyterlab Ext

Disclaimer : Extensions in Jupyter-lab are still very much experimental. But this one seems to be working fabulously so far. jupyterlab-git is an extension that lets you stage and commit changes to notebooks made right from within the Jupyterlab interface. This is best installed within the confines of a virtual environment, as is anything experimental. Installation steps - a) Ensure that you have the latest version of jupyterlab (=1.2.0 at the time of this writing) and NodeJS(=12.13.0 at this time) ...

October 31, 2019 · 1 min · Abhiram R

Pandas Notes

These are the commands I use a lot using Pandas - Get rows with NaNs in any column df[df.isna().any(axis=1)] Get dataframe excluding all NaNs in a particular Column df[df['<col_name>'].notnull()] Get counts of number of Nulls per column df.isnull().sum() Increase width of columns displayed in Jupyter Notebooks - This is possibly one of my most used commands for every notebook that involves dataframes. pd.set_option('display.max_colwidth',400)

August 23, 2019 · 1 min · Abhiram R

ML Interpretability

I attended an interesting Webinar titled “A Data Science Playbook for Explainable ML/AI” conducted by Chief Data Scientist,Josh Poduska, and VP of Marketing, Jon Rooney of Domino Data. This post lays out some of the highlights (in my opinion) of the talk, peppered with my understandings and some additional points that might be of interest. I will breaking this learning-post up into two parts - the first part discussing the theoretical concepts of interpretability and Part-2 on different Open Source models that are in practice today. This is Part-1. ...

August 16, 2019 · 5 min · Abhiram R

Bangpypers PreWorkshop Setup

A guide to installing a newer version of Python is available here. We at Bangpypers conduct a lot of workshops and some steps are common for all of them. To that end, this post is meant to serve as guide for people to install Python on Ubuntu and Windows (if required), setting up virtualenv and installing the package(s) germane to the corresponding Workshop. Ubuntu Check your existing version of Python to see if you already have what’s required. ...

February 22, 2019 · 2 min · Abhiram R

F U Python Commands

The previous post was for commands Unix. This post is about the Python commands I use or Google frequently. To find the absolute path of the directory of the current file being executed - abs_path = os.path.dirname(os.path.realpath(file)) To copy a file from source to destination (using shutil)- from shutil import copyfile copyfile(src, dst) To copy a file or directory from source to destination (using shutil)- from shutil import copy copy(src, dst) ...

January 9, 2019 · 1 min · Abhiram R

Unix Commands I Use

I keep Googling commands for some of these situations regularly - General - 1) To find files one level below your current directory - I was trying to find which repos in my set of folders have a setup.py file. So, this is what I’d use. find . -maxdepth 2 -iname setup.py 2) To find what process is running on port 2181 - sudo lsof -n -i :2181 | grep LISTEN ...

December 24, 2018 · 1 min · Abhiram R

My HIPC 2018 experience

The HIPC Conference this year (2018) was held at the Radisson Blu hotel in Bangalore, India from 17-20 December. This year, HIPC celebrated its 25th year of running and it was amazing. --WIP–

December 21, 2018 · 1 min · Abhiram R

Nginx Gunicorn Ref Links

So, I looked up a lot of links while learning how to configure Gunicorn and Nginx for a Flask app I’m building. An article on the specifics of what I learnt will follow this one. This one focuses on the links and resources themselves - First of all, you’re probably asking - Why do I need Gunicorn and Nginx? That’s what I looked up first as well. https://serverfault.com/questions/331256/why-do-i-need-nginx-and-something-like-gunicorn Next, how to actually go about the whole process? The obvious links: - https://gunicorn.org/#quickstart - https://www.linode.com/docs/web-servers/nginx/how-to-configure-nginx/ - http://nginx.org/en/docs/beginners_guide.html - https://www.fullstackpython.com/green-unicorn-gunicorn.html ...

October 1, 2018 · 2 min · Abhiram R