<commit_before># coding=UTF-8
# Generate training sets for text recognition

import Image, ImageOps

# Single image transformations

def edentity(im):
    """
    Identity function for Image objects.
    """
    return im


def invert(im):
    """
    Just a wrapper around the ImageOps function,
    takes an image and returns it with colors inverted.
    """
    return ImageOps.invert(im)

<commit_msg>added two new tranformations for pairs of images, that only act on the first image<commit_after># coding=UTF-8
# Generate training sets for text recognition

import Image, ImageOps

# Single image transformations

def edentity(im):
    """
    Identity function for Image objects.
    """
    return im


def invert(im):
    """
    Just a wrapper around the ImageOps function,
    takes an image and returns it with colors inverted.
    """
    return ImageOps.invert(im)


def return_first(im0, im1):
    """
    Returns first argument.
    """
    return im0


def invert_first(im0, im1):
    """
    Applies ImageOps.invert() to the first argument
    and returns it.
    """
    return ImagesOps.invert(im0)


{'fraction_non_alphanumeric': 0.08489722966934764, 'fraction_numerical': 0.0071492403932082215, 'mean_word_length': 3.0727272727272728, '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': '3174125', 'n_tokens_mistral': 331, 'n_tokens_neox': 318, 'n_words': 122}