Skip to content

Instantly share code, notes, and snippets.


Mridul Singhai singhai0

  • San Francisco, CA
View GitHub Profile
singhai0 /
Created Mar 27, 2019
See list of git stashed changes
function stashbox() {
local branch_name=$(git stash list | fzf --ansi -m --preview "echo {} | cut -d':' -f1 | xargs -I % sh -c 'git stash show --color=always % | less -R'")
if [[ $branch_name ]]; then
echo $branch_name | cut -d':' -f1| xargs git stash pop
singhai0 /
Created Aug 22, 2018 — forked from dannguyen/
How to use matplotlib's basemap and Python 3.x to plot earthquake data on a world map

Mapping earthquakes in Python 3.x using matplotlib and matplotlib's basemap

(with a big assist from Anaconda)

I currently use Python for nearly all of my data science and wrangling work these days but usually find myself switching to R to visualize data using ggplot2. This is due in part to ggplot2's general excellence, but also because I had a lot of trouble learning Python's most popular viz library, matplotlib on my own...its homepage is decent enough...but its variety of plotting APIs (--pylab? OOP? %matplotlib???) has led to widely differing examples and best practices among the many online matplotlib guides (not dissimilar to the general problem of trying to practice either Python 2.x or 3.x).

That changed yesterday when I stumbled across [Nicolas P. Rougier's beautifully designed and com

singhai0 / addtogoodreads.js
Last active Dec 11, 2017
Bookmarklet to open Goodreads listing for an Amazon book (in the same tab/window).
View addtogoodreads.js