<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

import click
from PIL import Image
from utils import get_file_list


@click.command()
@click.argument('path', type=click.Path(exists=True))
@click.option('-h', '--horizontal', is_flag=True, help='flip horizontal')
@click.option('-v', '--vertical', is_flag=True, help='flip vertical')
def flip(path, horizontal, vertical):
    """
    Flip image(s) horizontal or vertical (or both). 
    """
    for f in get_file_list(path):
        img = Image.open(f)
        if horizontal:
            img = img.transpose(Image.FLIP_LEFT_RIGHT)
        if vertical:
            img = img.transpose(Image.FLIP_TOP_BOTTOM)
        img.save(f)


if __name__ == '__main__':
    flip()<commit_msg>Fix PEP warning<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

import click
from PIL import Image
from utils import get_file_list


@click.command()
@click.argument('path', type=click.Path(exists=True))
@click.option('-h', '--horizontal', is_flag=True, help='flip horizontal')
@click.option('-v', '--vertical', is_flag=True, help='flip vertical')
def flip(path, horizontal, vertical):
    """
    Flip image(s) horizontal or vertical (or both).
    """
    for f in get_file_list(path):
        img = Image.open(f)
        if horizontal:
            img = img.transpose(Image.FLIP_LEFT_RIGHT)
        if vertical:
            img = img.transpose(Image.FLIP_TOP_BOTTOM)
        img.save(f)


if __name__ == '__main__':
    flip()
{'fraction_non_alphanumeric': 0.15395003376097233, 'fraction_numerical': 0.0013504388926401081, 'mean_word_length': 3.2586206896551726, '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': '5148109', 'n_tokens_mistral': 501, 'n_tokens_neox': 491, 'n_words': 115}