<commit_before>import re

def browser_variants(prop, value):
    if prop == "opacity":
        # IE opacity filter
        try:
            value = float(value)
            definitions.append( ("filter", "alpha(opacity={value})".format( value=int(round(value*100)) )) )
        except ValueError:
            pass
    elif prop == "-ms-filter":
        # New IE -ms-filter to old filter
        definitions.append( ("filter", value[1:-1]) )
    elif prop in ["box-orient", "box-pack", "box-align", "box-flex", "background-size", "box-shadow", "border-radius", "transform", "transition", "column-count", "column-gap", "column-width", "resize"]:
        definitions.append( ("-o-"+prop, value) )
        definitions.append( ("-moz-"+prop, value) )
        definitions.append( ("-webkit-"+prop, value) )
    elif prop == "text-overflow":
        definitions.append( ("-o-"+prop, value) )
    elif prop == "display" and value=="box":
        definitions.append( (prop, "-moz-"+value) )
        definitions.append( (prop, "-webkit-"+value) )
    else:
        bradius = re.match(r'^border-([^-]+)-([^-]+)-radius$', prop)
        if bradius:
            definitions.append( ("-moz-border-radius-{y}{x}".format(y=bradius.group(1), x=bradius.group(2)), value) )
            definitions.append( ("-webkit-"+prop, value) )

    for (prop, value) in definitions:
        gradient = re.match(r'^(linear-gradient|radial-gradient)\s*\((.*)\)$', value)
        if gradient:
            function = gradient.group(1)
            params = gradient.group(2)
            definitions.append( (prop, "-o-{func}({params})".format(func=function, params=params)) )
            definitions.append( (prop, "-moz-{func}({params})".format(func=function, params=params)) )
            definitions.append( (prop, "-webkit-{func}({params})".format(func=function, params=params)) )

    definitions = [(prop, value)]

    return definitions
<commit_msg>Implemented -ms prefix and background-clip variants<commit_after>import re

def browser_variants(prop, value):
    if prop == "opacity":
        # IE opacity filter
        try:
            value = float(value)
            definitions.append( ("filter", "alpha(opacity={value})".format( value=int(round(value*100)) )) )
        except ValueError:
            pass
    elif prop == "-ms-filter":
        # New IE -ms-filter to old filter
        definitions.append( ("filter", value[1:-1]) )
    elif prop in ["box-orient", "box-pack", "box-align", "box-flex", "background-size", "box-shadow", "border-radius", "transform", "transition", "column-count", "column-gap", "column-width", "resize"]:
        definitions.append( ("-o-"+prop, value) )
        definitions.append( ("-ms-"+prop, value) )
        definitions.append( ("-moz-"+prop, value) )
        definitions.append( ("-webkit-"+prop, value) )
    elif prop == "background-clip":
        definitions.append( ("-webkit-"+prop, value) )
        if value == "padding-box":
            definitions.append( ("-moz-"+prop, "padding") )
        elif value == "border-box":
            definitions.append( ("-moz-"+prop, "border") )
    elif prop == "text-overflow":
        definitions.append( ("-o-"+prop, value) )
    elif prop == "display" and value=="box":
        definitions.append( (prop, "-moz-"+value) )
        definitions.append( (prop, "-webkit-"+value) )
    else:
        bradius = re.match(r'^border-([^-]+)-([^-]+)-radius$', prop)
        if bradius:
            definitions.append( ("-moz-border-radius-{y}{x}".format(y=bradius.group(1), x=bradius.group(2)), value) )
            definitions.append( ("-webkit-"+prop, value) )

    for (prop, value) in definitions:
        gradient = re.match(r'^(linear-gradient|radial-gradient)\s*\((.*)\)$', value)
        if gradient:
            function = gradient.group(1)
            params = gradient.group(2)
            definitions.append( (prop, "-o-{func}({params})".format(func=function, params=params)) )
            definitions.append( (prop, "-ms-{func}({params})".format(func=function, params=params)) )
            definitions.append( (prop, "-moz-{func}({params})".format(func=function, params=params)) )
            definitions.append( (prop, "-webkit-{func}({params})".format(func=function, params=params)) )

    definitions = [(prop, value)]

    return definitions

{'fraction_non_alphanumeric': 0.19341372912801486, 'fraction_numerical': 0.004174397031539889, 'mean_word_length': 2.810070671378092, 'pattern_counts': {'":': 11, '<': 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': '2058318', 'n_tokens_mistral': 1326, 'n_tokens_neox': 1310, 'n_words': 268}