<commit_before>import zbar
import Image
import ImageDraw
import kanban


class Scanner(object):
    def __init__(self, imagepath):
        self.image = Image.open(imagepath).convert('L')
        self.width, self.height = self.image.size
        self.informations = []
        # create a reader
        self.scanner = zbar.ImageScanner()
        # configure the scanner
        self.scanner.parse_config('enable')

    def scan(self):
        pieces_size = int(self.get_qr_code_size() * 2)
        step_size = int(pieces_size / 5)

        y_start = 0

        iy = 0
        while y_start < self.height:
            y_start = iy * step_size
            y_end = y_start + pieces_size<commit_msg>doubles the imagesize for better results<commit_after>import zbar
import Image
import ImageDraw
import kanban


class Scanner(object):
    def __init__(self, imagepath):
        self.image = Image.open(imagepath).convert('L')
        self.width, self.height = self.image.size
        self.informations = []
        # create a reader
        self.scanner = zbar.ImageScanner()
        # configure the scanner
        self.scanner.parse_config('enable')

    def image_optimize(self):
        doubled_size = (self.image.size[0] * 2, self.image.size[1] * 2)
        self.image = self.image.resize(doubled_size, Image.ANTIALIAS).convert('L')
        self.width, self.height = self.image.size

    def scan(self):
        self.image_optimize()
        pieces_size = int(self.get_qr_code_size() * 2)
        step_size = int(pieces_size / 5)

        y_start = 0

        iy = 0
        while y_start < self.height:
            y_start = iy * step_size
            y_end = y_start + pieces_size
{'fraction_non_alphanumeric': 0.10172516359309934, 'fraction_numerical': 0.007138607971445568, 'mean_word_length': 2.3373015873015874, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1723420', 'n_tokens_mistral': 552, 'n_tokens_neox': 519, 'n_words': 116}