e053c88faa955ad7d4cdee48b90e1c21b7689aa5,loudml-influx/loudml/influx.py,InfluxDataSource,get_times_data,#InfluxDataSource#Any#Any#Any#,255

Before Change


            if t0 is None:
                t0 = ts

            yield (ts - t0) / 1000, X, timeval

    def save_timeseries_prediction(self, prediction, model):
        logging.info("saving "%s" prediction to "%s"", model.name, self.name)

After Change



        // Build final result
        t0 = None
        result = []

        for bucket in buckets:
            X = np.zeros(nb_features, dtype=float)
            timeval = bucket["time"]
            ts = str_to_ts(timeval)

            for i, feature in enumerate(features):
                agg_val = bucket["values"].get(feature.name)

                if agg_val is None:
                    if feature.default is np.nan:
                        logging.info(
                            "missing data: field "%s", metric "%s", bucket: %s",
                            feature.field, feature.metric, timeval,
                        )
                    agg_val = feature.default

                X[i] = agg_val

            if t0 is None:
                t0 = ts

            result.append(((ts - t0) / 1000, X, timeval))

        return result

    def save_timeseries_prediction(self, prediction, model):
        logging.info("saving "%s" prediction to "%s"", model.name, self.name)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 9

Non-data size: 5

Instances


Project Name: regel/loudml
Commit Name: e053c88faa955ad7d4cdee48b90e1c21b7689aa5
Time: 2018-03-22
Author: vianney@redmintnetwork.fr
File Name: loudml-influx/loudml/influx.py
Class Name: InfluxDataSource
Method Name: get_times_data


Project Name: tensorflow/models
Commit Name: f498fa1070baf207a5cdfcd9ed76bb91f515d5f4
Time: 2020-07-24
Author: rxsang@google.com
File Name: orbit/controller_test.py
Class Name:
Method Name: summaries_with_matching_keyword


Project Name: chainer/chainercv
Commit Name: 12d8b1210b6a999164d7f2da503f3addbcf9b44d
Time: 2018-04-24
Author: Hakuyume@users.noreply.github.com
File Name: chainercv/links/model/yolo/yolo_v3.py
Class Name: Darknet53Extractor
Method Name: __call__


Project Name: azavea/raster-vision
Commit Name: f504faede42cf641dc4286ed5cd65a38f8dd2891
Time: 2018-09-24
Author: rdemanuele@gmail.com
File Name: src/rastervision/core/box.py
Class Name: Box
Method Name: get_windows


Project Name: tensorflow/models
Commit Name: e54fcee236a1258302342bd703ee27cbba0c12e3
Time: 2020-07-24
Author: rxsang@google.com
File Name: orbit/controller_test.py
Class Name:
Method Name: summaries_with_matching_keyword


Project Name: commonsense/conceptnet5
Commit Name: e809acfe2fc641630dd978b12576e35af1acc87e
Time: 2019-03-26
Author: rspeer@luminoso.com
File Name: conceptnet5/uri.py
Class Name:
Method Name: uri_prefixes


Project Name: tensorflow/magenta
Commit Name: 11833589796193f0705583aa1fab62958e10cd15
Time: 2019-09-23
Author: fjord@google.com
File Name: magenta/models/onsets_frames_transcription/create_dataset_maestro.py
Class Name:
Method Name: generate_sharded_filenames


Project Name: andresriancho/w3af
Commit Name: 2ded693c959c91dc3e4daca276460d6c64ada479
Time: 2019-12-16
Author: andres.riancho@gmail.com
File Name: w3af/core/data/db/cached_disk_dict.py
Class Name: CachedDiskDict
Method Name: _get_keys_for_memory


Project Name: pantsbuild/pants
Commit Name: c25903e6a9696c86acd5a7ee4d2d442a9e8e2b0c
Time: 2019-05-27
Author: 1305167+cosmicexplorer@users.noreply.github.com
File Name: src/python/pants/backend/jvm/targets/scala_library.py
Class Name: ScalaLibrary
Method Name: java_sources