<commit_before>"""
Utility functions to create QRCodes using `qrcode`.
"""
import qrcode
import qrcode.image.svg

from   .file_utils import replace_file_content


def save_into_qrcode(text, out_filepath, color='', box_size=10, pixel_size=1850):
    """ Save `text` in a qrcode svg image file.

    Parameters
    ----------
    text: str
        The string to be codified in the QR image.

    out_filepath: str
        Path to the output file

    color: str
        A RGB color expressed in 6 hexadecimal values.

    box_size: scalar
        Size of the QR code boxes.
    """
    try:
        qr = qrcode.QRCode(version=1, error_correction=qrcode.constants.ERROR_CORRECT_L,
                           box_size=box_size, border=0,)<commit_msg>remove contact classes from qrcode.py<commit_after>"""
Utility functions to create QRCodes using `qrcode`.
"""
import qrcode
import qrcode.image.svg

from   .file_utils import replace_file_content


def save_into_qrcode(text, out_filepath, color='', box_size=10, pixel_size=1850):
    """ Save `text` in a qrcode svg image file.

    Parameters
    ----------
    text: str
        The string to be codified in the QR image.

    out_filepath: str
        Path to the output file

    color: str
        A RGB color expressed in 6 hexadecimal values.

    box_size: scalar
        Size of the QR code boxes.

    Returns
    -------
    out_filepath: str
    """
    try:
        qr = qrcode.QRCode(version=1, error_correction=qrcode.constants.ERROR_CORRECT_L,
                           box_size=box_size, border=0,)
{'fraction_non_alphanumeric': 0.0927703134996801, 'fraction_numerical': 0.011516314779270634, 'mean_word_length': 2.4755555555555557, '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': '2051199', 'n_tokens_mistral': 522, 'n_tokens_neox': 486, 'n_words': 152}