7b4553c27502be5cbb8fd4a946cec60c6824ddbc,gb/hypergraph/leveldb.py,LevelDB,destroy,#LevelDB#,250
Before Change
Erase the hypergraph.
// TODO: This is very inefficient!
start_str = "v"
end_str = str_plus_1(start_str)
start_key = (u"%s" % start_str).encode("utf-8")
end_key = (u"%s" % end_str).encode("utf-8")
keys = [key for key, value in self.db.iterator(start=start_key, stop=end_key)]
for key in keys:
self.remove_key(key)
def degree_timestamp_key(self, vert_key):
value = self.db.get(vert_key)
if value is None:
return 0, -1
After Change
def destroy(self):
Erase the hypergraph.
self.db.close()
plyvel.destroy_db(self.dir_path)
self.db = plyvel.DB(self.dir_path, create_if_missing=True)
def degree_timestamp_key(self, vert_key):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: graphbrain/graphbrain
Commit Name: 7b4553c27502be5cbb8fd4a946cec60c6824ddbc
Time: 2017-02-05
Author: telmo@telmomenezes.net
File Name: gb/hypergraph/leveldb.py
Class Name: LevelDB
Method Name: destroy
Project Name: GRAAL-Research/pytoune
Commit Name: 465cf83f8787d3c56132afcc34fe12f697c1d828
Time: 2018-01-12
Author: fredy_14@live.fr
File Name: pitoune/framework/callbacks/logger.py
Class Name: CSVLogger
Method Name: on_train_end
Project Name: openeventdata/mordecai
Commit Name: 05572c0e31b9354e6b0fd4435b65b81da1b3f188
Time: 2017-12-13
Author: ahalterman0@gmail.com
File Name: mordecai/geoparse.py
Class Name: Geoparser
Method Name: batch_geoparse