GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author : Dheepak Krishnamurthy | |
# License : BSD 3 Clause | |
# Title : Custom HoverTool for linked hover tooltips | |
# Based on example from Bokeh Docs | |
from bokeh.io import output_notebook, show | |
from bokeh.layouts import gridplot | |
from bokeh.models import ColumnDataSource | |
from bokeh.plotting import figure | |
from bokeh.models import HoverTool, CustomJS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import absolute_import, division, print_function, unicode_literals | |
from builtins import (bytes, str, open, super, range, zip, round, input, int, pow) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import inspect | |
def kwargs2args(f): | |
argspec = inspect.getargspec(f) | |
no_arg_only = len(argspec.defaults) - len(argspec.args) | |
defaults = { argspec.args[no_arg_only+i]: d for i, d in enumerate(argspec.defaults)} | |
def function(*args, **kwargs): | |
old_args = list(argspec.args) | |
new_args = list() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
import sys | |
import json | |
def main(arg): | |
print(json.dumps(json.loads(arg), indent=2)) | |
if __name__ == '__main__': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kill -9 $(lsof -t -i PORTNUMBER) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import subprocess | |
def find_pid(port): | |
pid = subprocess.call(['lsof', '-t', '-i', ":{}".format(port)]) | |
return(pid) | |
def kill_all(list_of_ports): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while true; do | |
git --no-pager diff | |
sleep 1 | |
clear | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while true; do | |
git --no-pager diff --cached | |
sleep 1 | |
clear | |
done |