This file contains hidden or 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 | |
from sys import argv, exit | |
from os import listdir, path | |
from email.Parser import Parser | |
from email.utils import parsedate, parseaddr | |
import cPickle as pickle | |
import sys | |
import itertools | |
import igraph |
This file contains hidden or 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
var offset = 0; | |
var selection = window.getSelection(); | |
var range = selection.getRangeAt(0); | |
var start = range.startOffset; | |
var end = range.endOffset; | |
if ( selection.baseNode.parentNode.hasChildNodes() ) { | |
for ( var i = 0 ; selection.baseNode.parentNode.childNodes.length > i ; i++ ) { | |
var cnode = selection.baseNode.parentNode.childNodes[i]; | |
if (cnode.nodeType == document.TEXT_NODE) { |