<commit_before>from __future__ import division
import colorsys
from itertools import cycle

import numpy as np
import matplotlib as mpl

from six import string_types
from six.moves import range

import husl
from .xkcd_rgb import xkcd_rgb




def desaturate(color, prop):
    """Decrease the saturation channel of a color by some percent.

    Parameters
    ----------
    color : matplotlib color
        hex, rgb-tuple, or html color name
    prop : float
        saturation channel of color will be multiplied by this value

    Returns
    -------
    new_color : rgb tuple
        desaturated color code in RGB tuple representation

    """
    # Check inputs
    if not 0 <= prop <= 1:
        raise ValueError("prop must be between 0 and 1")<commit_msg>Fixed compatibility with python 3.x<commit_after>from __future__ import division
import colorsys
from itertools import cycle

import numpy as np
import matplotlib as mpl

from six import string_types
from six.moves import range

from . import husl
from .xkcd_rgb import xkcd_rgb




def desaturate(color, prop):
    """Decrease the saturation channel of a color by some percent.

    Parameters
    ----------
    color : matplotlib color
        hex, rgb-tuple, or html color name
    prop : float
        saturation channel of color will be multiplied by this value

    Returns
    -------
    new_color : rgb tuple
        desaturated color code in RGB tuple representation

    """
    # Check inputs
    if not 0 <= prop <= 1:
        raise ValueError("prop must be between 0 and 1")
{'fraction_non_alphanumeric': 0.0645577792123951, 'fraction_numerical': 0.005810200129115558, 'mean_word_length': 2.6470588235294117, 'pattern_counts': {'":': 0, '<': 7, '<?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': '6485527', 'n_tokens_mistral': 440, 'n_tokens_neox': 410, 'n_words': 190}