Skip to content

Instantly share code, notes, and snippets.

View ssahu's full-sized avatar

Sarthak Sahu ssahu

  • San Francisco, CA
View GitHub Profile
@robclewley
robclewley / notebook_importing.py
Created April 15, 2015 15:54
Module to import from ipython notebooks
"""
Module directly collated from
http://nbviewer.ipython.org/github/adrn/ipython/blob/1.x/examples/notebooks/Importing%20Notebooks.ipynb
"""
import io, os, sys, types
from IPython.nbformat import current
from IPython.core.interactiveshell import InteractiveShell
def find_notebook(fullname, path=None):
"""find a notebook, given its fully qualified name and an optional path
@jennybc
jennybc / 2014-09-18_numeric-index-gotcha.md
Last active August 29, 2015 14:06
How quickly indexing with numeric can burn you

Inspired by recent @johnmyleswhite tweets on indexing (though they focus more on NA stuff)

My standard advice to R novices is "don't worry about numeric vs integer too much, for now", but I just created an indexing example that scares me.

I did not realize it was sooo easy to create this gotcha when indexing with numeric (which I know is not a great idea).

@marianposaceanu
marianposaceanu / linux_fun.md
Last active March 16, 2025 22:31
How to have some fun using the terminal.

Linux fun-o-matic

How to have some fun using the terminal.

  1. Install cowsay [0] via : sudo apt-get install cowsay
  2. Install fortune [1] via : sudo apt-get install fortune
  3. Make sure you have Ruby installed via : ruby -v
  4. Install the lolcat [2] via : gem gem install lolcat
  5. Profit!
@artyom
artyom / .pythonrc.py
Created September 27, 2012 12:58
pretty python interpreter (tab-completion, etc.) for Linux & Mac OS X
#!/usr/bin/env python
# save this file as $HOME/.pythonrc.py
# add `export PYTHONSTARTUP=$HOME/.pythonrc.py` to your .bashrc
import os
import atexit
import sys, pprint
import readline, rlcompleter