084d3cb097d1eacea365bf0612ce11928ad22414,core/eolearn/core/eodata.py,EOPatch,load_aws,#,725

Before Change


        features = [path[len(patch_location):path.rfind(".")].split("/") for path in paths]
        features = [(feature[0], feature[1]) if len(feature) > 1 else (feature[0], None) for feature in features]
        features = [(FeatureType(ftype), fname) for ftype, fname in features]
        streams = (s3client.get_object(Bucket=bucket_name, Key=path)["Body"].read() for path in paths)

        for stream, feature in zip(streams, features):
            eopatch[feature] = pickle.loads(stream)

After Change


        ftrs = [(feature[0], feature[1]) if len(feature) > 1 else (feature[0], None) for feature in ftrs]
        ftrs = [(FeatureType(ftype), fname) for ftype, fname in ftrs]

        requested_features = [(ftype, fname) for ftype, fname in FeatureParser(features)]
        load_content = []
        for (ftype, fname), path in zip(ftrs, paths):
            if ftype in [ftype for ftype, _ in requested_features]:
                if (ftype, fname) in requested_features or (ftype, Ellipsis) in requested_features:
                    load_content.append([(ftype, fname), path])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 8

Instances


Project Name: sentinel-hub/eo-learn
Commit Name: 084d3cb097d1eacea365bf0612ce11928ad22414
Time: 2019-11-29
Author: matic.lubej@sinergise.com
File Name: core/eolearn/core/eodata.py
Class Name: EOPatch
Method Name: load_aws


Project Name: autoreject/autoreject
Commit Name: e6dc6899d0aa846636c48562c79b161347c35235
Time: 2019-06-04
Author: mainakjas@gmail.com
File Name: autoreject/ransac.py
Class Name: Ransac
Method Name: fit


Project Name: tyarkoni/pliers
Commit Name: 0e62a365308c002945120551c8026f746f61e987
Time: 2017-05-10
Author: quinten.mcnamara@gmail.com
File Name: pliers/extractors/api.py
Class Name: ClarifaiAPIExtractor
Method Name: _extract


Project Name: riga/tfdeploy
Commit Name: 20ea228773616f824fa5099d0a6e51b7f829d094
Time: 2016-03-10
Author: marcelrieger@me.com
File Name: tfdeploy.py
Class Name: Operation
Method Name: eval