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
| # -*- coding: utf-8; -*- | |
| from bson import Binary | |
| from pymongo import Connection | |
| from pymongo.database import Database | |
| db = Database(Connection(), "yourdb") | |
| def _clean_dict(x): | |
| dic = {} |
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 | |
| # -*- coding: utf-8 -*- | |
| import sys | |
| # This is the framework for graphs we use on this work | |
| import networkx as nx | |
| # Tool to determine wether elements are on the same set | |
| from networkx.utils import UnionFind | |
| # We need this in python to "clone" objects | |
| import copy |
NewerOlder