96c26bd09d02bb9cddbc083c75ba2ea65b5d377a,plantcv/plantcv/color_palette.py,,color_palette,#Any#,6

Before Change


        color = rainbow[randrange(0, 255)]
        return [color]
    else:
        dist = int(len(rainbow) / num)
        colors = []
        index = 0
        for i in range(1, num + 1):
            colors.append(rainbow[index])
            index += dist
        return colors

After Change


        colors = cmap(np.linspace(0, 1, num), bytes=True)
        colors = colors[:, 0:3].tolist()
        // colors are sequential, if params.color_sequence is random then shuffle the colors
        if params.color_sequence == "random":
            np.random.shuffle(colors)
        // Save the color scale for further use
        params.saved_color_scale = colors

        return colors
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: danforthcenter/plantcv
Commit Name: 96c26bd09d02bb9cddbc083c75ba2ea65b5d377a
Time: 2020-07-16
Author: noahfahlgren@gmail.com
File Name: plantcv/plantcv/color_palette.py
Class Name:
Method Name: color_palette


Project Name: tensorflow/tpu
Commit Name: c1db25d9281a9374005d5c8b4e183b8e6d7d2ace
Time: 2017-09-06
Author: frankchn@google.com
File Name: cloud_tpu/models/resnet/estimator_resnet.py
Class Name:
Method Name: input_fn


Project Name: IndicoDataSolutions/finetune
Commit Name: 42e1e47ff386be77b740b64771644ea7aa875880
Time: 2020-02-26
Author: benlt@hotmail.co.uk
File Name: finetune/target_models/masked_language_model.py
Class Name: MaskedLanguageModelPipeline
Method Name: text_to_tokens_mask