1e792729ce59d1cd71bb776d74bb3e427b580a4e,pliers/extractors/api/clarifai.py,ClarifaiAPIVideoExtractor,_to_df,#ClarifaiAPIVideoExtractor#Any#,142

Before Change


                est_duration = 0.0
            else:
                est_duration = data_dict["onset_"] / float(frame_num)
            data_dict["duration_"] = min(est_duration,
                                         result.stim.duration - data_dict["onset_"])
            data_dict["order_"] = frame_num
            rows.append(data_dict)
        return pd.DataFrame(rows)

After Change


        durations = []
        data = []
        frames = result._data[0]["data"]["frames"]
        for i, frame_res in enumerate(frames):
            data.append(self._parse_annotations(frame_res))
            onset = frame_res["frame_info"]["time"] / 1000.0
            if (i + 1) == len(frames):
                end = result.stim.duration
                print(end)
            else:
                end = frames[i+1]["frame_info"]["time"] / 1000.0
            onsets.append(onset)
            durations.append(end - onset)

        result._onsets = onsets
        result._durations = durations
        df = pd.DataFrame(data)
        result.features = list(df.columns)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: tyarkoni/pliers
Commit Name: 1e792729ce59d1cd71bb776d74bb3e427b580a4e
Time: 2018-04-13
Author: quinten.mcnamara@gmail.com
File Name: pliers/extractors/api/clarifai.py
Class Name: ClarifaiAPIVideoExtractor
Method Name: _to_df


Project Name: mindsdb/mindsdb
Commit Name: bd5d7fcca55a596c8a75984eb6df720083cf796f
Time: 2019-03-01
Author: jorge.torres.maldonado@gmail.com
File Name: mindsdb/libs/ml_models/probabilistic_validator.py
Class Name: ProbabilisticValidator
Method Name: _closest


Project Name: eth-cscs/reframe
Commit Name: e3f9de083ed935a54ecb97665e9fb01de976cded
Time: 2020-12-14
Author: jgp@cscs.ch
File Name: cscs-checks/microbenchmarks/gpu/gpu_burn/gpu_burn_test.py
Class Name: GpuBurnTest
Method Name: report_smallest_node