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
| import os | |
| import networkx as nx | |
| import memory # include memory.py | |
| import random | |
| import math | |
| def get_filename(i): | |
| return 'foo/foo' + str(i) + '.gml' | |
| if not os.path.exists('foo'): |
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
| import os | |
| _proc_status = '/proc/%d/status' % os.getpid() | |
| _scale = {'kB': 1024.0, 'mB': 1024.0*1024.0, | |
| 'KB': 1024.0, 'MB': 1024.0*1024.0} | |
| def _VmB(VmKey): | |
| '''Private. | |
| ''' | |
| global _proc_status, _scale |