<commit_before># /psqtraviscontainer/create.py
#
# Module which handles the creation of proot in which APT packages
# can be readily installed
#
# See /LICENCE.md for Copyright information
"""Module which handles the creation of proot.

The proot for a distribution is a special directory entered with the proot
command, which behaves like a chroot, except that no root access is required
in order to create the jail. Commands running in the proot will have filesystem
requests redirected to the proot and believe that they are running as uid 0
"""

import os

from psqtraviscontainer import common_options
from psqtraviscontainer import distro
from psqtraviscontainer import printer

from psqtraviscontainer.architecture import Alias

from termcolor import colored


def _print_distribution_details(details):
    """Print distribution details."""
    def _y_v(value):
        """Print value in distribution details."""
        return colored(value, "yellow")

    # Maps keys in configuration to a pretty-printable name.
    distro_pretty_print_map = {
        "distro": lambda v: """Distribution Name: """ + _y_v(v),
        "release": lambda v: """Release: """ + _y_v(v),
        "arch": lambda v: """Architecture: """ + _y_v(Alias.universal(v)),
        "pkgsys": lambda v: """Package System: """ + _y_v(v.__name__),
    }

    output = bytearray()
    output += colored("""\nConfigured Distribution:\n""",
                      "white",
                      attrs=["underline"]).encode()
<commit_msg>Don't print underlines on blank lines<commit_after># /psqtraviscontainer/create.py
#
# Module which handles the creation of proot in which APT packages
# can be readily installed
#
# See /LICENCE.md for Copyright information
"""Module which handles the creation of proot.

The proot for a distribution is a special directory entered with the proot
command, which behaves like a chroot, except that no root access is required
in order to create the jail. Commands running in the proot will have filesystem
requests redirected to the proot and believe that they are running as uid 0
"""

import os

from psqtraviscontainer import common_options
from psqtraviscontainer import distro
from psqtraviscontainer import printer

from psqtraviscontainer.architecture import Alias

from termcolor import colored


def _print_distribution_details(details):
    """Print distribution details."""
    def _y_v(value):
        """Print value in distribution details."""
        return colored(value, "yellow")

    # Maps keys in configuration to a pretty-printable name.
    distro_pretty_print_map = {
        "distro": lambda v: """Distribution Name: """ + _y_v(v),
        "release": lambda v: """Release: """ + _y_v(v),
        "arch": lambda v: """Architecture: """ + _y_v(Alias.universal(v)),
        "pkgsys": lambda v: """Package System: """ + _y_v(v.__name__),
    }

    output = bytearray()
    output += ("\n" +
               colored("""Configured Distribution:""",
                       "white",
                       attrs=["underline"]) +
               "\n").encode()

{'fraction_non_alphanumeric': 0.09902597402597403, 'fraction_numerical': 0.0006493506493506494, 'mean_word_length': 3.465217391304348, 'pattern_counts': {'":': 8, '<': 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': '4526245', 'n_tokens_mistral': 856, 'n_tokens_neox': 822, 'n_words': 323}