Skip to content

Instantly share code, notes, and snippets.

Karthik Raman karthikraman

Block or report user

Report or block karthikraman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
karthikraman / bubbleplot.m
Created Jun 8, 2015
BubblePlot for MATLAB
View bubbleplot.m
function h=bubbleplot(varargin)
%BUBBLEPLOT Bubble plot, using MATLAB's scatter
% x, y -- data
data=sortrows([x y]);
karthikraman /
Created Jun 8, 2015
Parse BLAST XML output, with an e-value cutoff
import sys
from optparse import OptionParser
usage="Usage: %prog -f <filename> -p <positives> -l <length>"
parser = OptionParser(usage)
parser.add_option("-f", "--file", dest="filename", help="write report to FILE")
parser.add_option("-p", "--positives", type="float", dest="pos", help="% positives")
parser.add_option("-l", "--length", type="float", dest="len", help="% length")
import re
if [[ $# -eq 0 ]]
echo "Usage: `basename $0` <output file> <input files>"
exit 1
if [[ -f $ofile ]]
karthikraman /
Last active Aug 29, 2015
Bash: PDF page extractor
#Add this to your .bashrc
function pdfpextr()
# this function uses 3 arguments:
# $1 is the first page of the range to extract
# $2 is the last page of the range to extract
# $3 is the input file
# output file will be named "inputfile_pXX-pYY.pdf"
karthikraman / Beamer-python.sublime-snippet
Last active Oct 19, 2015
Snippet TeX python code block
View Beamer-python.sublime-snippet
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<!-- Optional: Set a scope to limit where the snippet will trigger -->
View Beamer-block.sublime-snippet
\item ${2:items}.
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
View Beamer-fragile-frame.sublime-snippet
<description>Beamer frame</description>
View beamer-columns.sublime-snippet
karthikraman /
Created Aug 10, 2015
Transliterator for ITRANS, HarvardKyoto
""" Transliterate texts between unicode and standard transliteration schemes.
Transliterate texts between non-latin scripts and commonly-used latin
transliteration schemes. Uses standard Unicode character blocks --
e.g. DEVANAGARI U+0900 ... U+097F -- and transliteration schemes --
e.g. the IAST convention for transliteration of Sanskrit to latin-with-dots.
The following character blocks and transliteration schemes are included:
You can’t perform that action at this time.