23a45d5eb839c763c94c0e413ad599d9f9b5e184,codes/scripts/create_lmdb.py,,,#,8

Before Change


        // The encode is only essential in Python 3
        txn.put(key, data)
        txn.put(meta_key, meta.encode("ascii"))
print("Finish writing to lmdb - {}.".format(len(file_list)))

// create keys cache
keys_cache_file = os.path.join(lmdb_save_path, "_keys_cache.p")
env = lmdb.open(lmdb_save_path, readonly=True, lock=False, readahead=False, meminit=False)

After Change


env = lmdb.open(lmdb_save_path, map_size=data_size * 10)
print("Finish reading {} images.\nWrite lmdb...".format(len(img_list)))

pbar = ProgressBar(len(img_list))
with env.begin(write=True) as txn:  // txn is a Transaction object
    for i, v in enumerate(img_list):
        pbar.update("Write {}".format(v))
        base_name = os.path.splitext(os.path.basename(v))[0]
        key = base_name.encode("ascii")
        data = dataset[i]
        if dataset[i].ndim == 2:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: xinntao/BasicSR
Commit Name: 23a45d5eb839c763c94c0e413ad599d9f9b5e184
Time: 2018-09-06
Author: wxt1994@126.com
File Name: codes/scripts/create_lmdb.py
Class Name:
Method Name:


Project Name: autoreject/autoreject
Commit Name: a1478b9a6b93b40c0b5260ec046d80ffc4ba9394
Time: 2016-06-02
Author: mainakjas@gmail.com
File Name: autoreject/utils.py
Class Name:
Method Name: clean_by_interp


Project Name: autoreject/autoreject
Commit Name: a9b7436594414f8522419a1508b884f025bf9d4f
Time: 2016-05-25
Author: mainakjas@gmail.com
File Name: autoreject/autoreject.py
Class Name: ConsensusAutoReject
Method Name: _interpolate_bad_epochs