<commit_before>from bokeh.plotting import ColumnDataSource, figure, hplot, output_file, show
from bokeh.models import LinearColorMapper, HoverTool
from bokeh.models.actions import Callback
from bokeh.models.widgets import Slider
from bokeh.io import vform
import colorsys

# for plot 2: create colour spectrum of resolution N and brightness I, return as list of decimal RGB value tuples
def generate_color_range(N, I):
    HSV_tuples = [ (x*1.0/N, 0.5, I) for x in range(N) ]
    RGB_tuples = map(lambda x: colorsys.hsv_to_rgb(*x), HSV_tuples)
    for_conversion = []
    for RGB_tuple in RGB_tuples:
        for_conversion.append((int(RGB_tuple[0]*255), int(RGB_tuple[1]*255), int(RGB_tuple[2]*255)))
    hex_colors = [ rgb_to_hex(RGB_tuple) for RGB_tuple in for_conversion ]<commit_msg>now imports ColumnDataSource from bokeh.models instead of bokeh.plotting<commit_after>from bokeh.plotting import figure, hplot, output_file, show
from bokeh.models import  ColumnDataSource, LinearColorMapper, HoverTool
from bokeh.models.actions import Callback
from bokeh.models.widgets import Slider
from bokeh.io import vform
import colorsys

# for plot 2: create colour spectrum of resolution N and brightness I, return as list of decimal RGB value tuples
def generate_color_range(N, I):
    HSV_tuples = [ (x*1.0/N, 0.5, I) for x in range(N) ]
    RGB_tuples = map(lambda x: colorsys.hsv_to_rgb(*x), HSV_tuples)
    for_conversion = []
    for RGB_tuple in RGB_tuples:
        for_conversion.append((int(RGB_tuple[0]*255), int(RGB_tuple[1]*255), int(RGB_tuple[2]*255)))
    hex_colors = [ rgb_to_hex(RGB_tuple) for RGB_tuple in for_conversion ]
{'fraction_non_alphanumeric': 0.09290953545232274, 'fraction_numerical': 0.02078239608801956, 'mean_word_length': 5.1773584905660375, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2124731', 'n_tokens_mistral': 589, 'n_tokens_neox': 546, 'n_words': 161}