6a98de289a02db6bd0c715affac9242a52c633e3,flow/visualize/time_space_diagram.py,,get_time_space_data,#Any#Any#,76

Before Change


    dt = params["sim"].sim_step

    // number of simulation steps
    max_time = max(max(data[veh_id]["time"]) for veh_id in data.keys())
    min_time = min(min(data[veh_id]["time"]) for veh_id in data.keys())
    num_steps = int((max_time - min_time)/dt)

    // Get the function from switcher dictionary
    func = switcher[params["scenario"]]

After Change


    }

    // Collect a list of all the unique times.
    all_time = []
    for veh_id in data.keys():
        all_time.extend(data[veh_id]["time"])
    all_time = np.sort(np.unique(all_time))

    // Get the function from switcher dictionary
    func = switcher[params["scenario"]]

    // Execute the function
    pos, speed = func(data, params, all_time)

    return pos, speed, all_time

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: flow-project/flow
Commit Name: 6a98de289a02db6bd0c715affac9242a52c633e3
Time: 2019-06-10
Author: akreidieh@gmail.com
File Name: flow/visualize/time_space_diagram.py
Class Name:
Method Name: get_time_space_data


Project Name: Calamari-OCR/calamari
Commit Name: de52463f855369ad17148054fa5a0a634c6b99a1
Time: 2021-01-19
Author: christoph.wick@planet-ai.de
File Name: calamari_ocr/ocr/dataset/datareader/pagexml/reader.py
Class Name: PageXMLReader
Method Name: cutout


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