<commit_before>"""
This module holds a fast Factorization class.
"""
from random import randint


class Factorization:
    """
    Simple module to factorize large numbers really quickly.
    """
    @classmethod
    def factorize(cls, pq):
        """
        Factorizes the given large integer.

        :param pq: the prime pair pq.
        :return: a tuple containing the two factors p and q.
        """
        if pq % 2 == 0:
            return 2, pq // 2

        y, c, m = randint(1, pq - 1), randint(1, pq - 1), randint(1, pq - 1)<commit_msg>Document where factorization.py comes from<commit_after>"""
This module holds a fast Factorization class.
"""
from random import randint


class Factorization:
    """
    Simple module to factorize large numbers really quickly.
    """
    @classmethod
    def factorize(cls, pq):
        """
        Factorizes the given large integer.

        Implementation from https://comeoncodeon.wordpress.com/2010/09/18/pollard-rho-brent-integer-factorization/.

        :param pq: the prime pair pq.
        :return: a tuple containing the two factors p and q.
        """
        if pq % 2 == 0:
            return 2, pq // 2

        y, c, m = randint(1, pq - 1), randint(1, pq - 1), randint(1, pq - 1)
{'fraction_non_alphanumeric': 0.1088, 'fraction_numerical': 0.0224, 'mean_word_length': 2.191326530612245, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '2209745', 'n_tokens_mistral': 410, 'n_tokens_neox': 374, 'n_words': 140}