<commit_before># https://www.w3.org/TR/filter-effects/#funcdef-contrast
# https://www.w3.org/TR/SVG/filters.html#TransferFunctionElementAttributes

from . import rgb_clamp

def calc_rgb(rgb, ratio = 100):
    r = float(ratio)
    return rgb_clamp((c * r + 255 * (50 - r / 2)) / 100 for c in rgb)<commit_msg>change for coding style consistency in converters.contrast<commit_after># https://www.w3.org/TR/filter-effects/#funcdef-contrast
# https://www.w3.org/TR/SVG/filters.html#TransferFunctionElementAttributes

from . import rgb_clamp

def calc_rgb(rgb, ratio=100):
    r = float(ratio)
    return rgb_clamp((c * r + 255 * (50 - r / 2)) / 100 for c in rgb)
{'fraction_non_alphanumeric': 0.1445966514459665, 'fraction_numerical': 0.0426179604261796, 'mean_word_length': 3.91044776119403, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, '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': '2223068', 'n_tokens_mistral': 262, 'n_tokens_neox': 228, 'n_words': 52}