<commit_before>import signal
import json
from subprocess import Popen, STDOUT
from sys import exit
from .config import COLORS, CONFIG_FILE, FNULL, LOG_FILE, get_logger, init_logger_handles, usr_cfg
from .utils import Crash, check_uefi, internet_enabled, pacman_exists, print_error, print_info, query_yes_no, \
    save_crash_files, set_keymap, signal_handler, start_screen, system
from .partitions import devices, auto
from os import geteuid
from . import install
from .irc import LogHandler

__all__ = ["config", "install", "irc", "menus", "partitions", "resolve_packages", "utils"]
__version__ = '2.3.0'


def main():
    try:
        if geteuid() != 0:
            print_error("Please run as root")
            exit(1)
        init_logger_handles()
        logger = get_logger(__name__)
        logger.debug(f'Version: {__version__}')
        # Pre-checks
        if not pacman_exists():
            print_error("Please install pacman")
            exit()
        if not internet_enabled():
            print_error("You need an active Internet connection")
            exit()

        # TODO: If there is a cfg then the user has prev ran the installer
        if usr_cfg:
            pass  # Goto Menu

        # First time, ask the user if they want to proceed
        start_screen()

        # Make sure pacstrap is available first
        install.pacstrap()
        # Let the installation begin
        logger.debug("Starting Installation")
        # Let the installation begin
        logger.debug("Starting Installation")<commit_msg>Bumped version from 2.3.0 to 2.3.1 for new installer release<commit_after>import signal
import json
from subprocess import Popen, STDOUT
from sys import exit
from .config import COLORS, CONFIG_FILE, FNULL, LOG_FILE, get_logger, init_logger_handles, usr_cfg
from .utils import Crash, check_uefi, internet_enabled, pacman_exists, print_error, print_info, query_yes_no, \
    save_crash_files, set_keymap, signal_handler, start_screen, system
from .partitions import devices, auto
from os import geteuid
from . import install
from .irc import LogHandler

__all__ = ["config", "install", "irc", "menus", "partitions", "resolve_packages", "utils"]
__version__ = '2.3.1'


def main():
    try:
        if geteuid() != 0:
            print_error("Please run as root")
            exit(1)
        init_logger_handles()
        logger = get_logger(__name__)
        logger.debug(f'Version: {__version__}')
        # Pre-checks
        if not pacman_exists():
            print_error("Please install pacman")
            exit()
        if not internet_enabled():
            print_error("You need an active Internet connection")
            exit()

        # TODO: If there is a cfg then the user has prev ran the installer
        if usr_cfg:
            pass  # Goto Menu

        # First time, ask the user if they want to proceed
        start_screen()

        # Make sure pacstrap is available first
        install.pacstrap()
        # Let the installation begin
        logger.debug("Starting Installation")
        # Let the installation begin
        logger.debug("Starting Installation")
{'fraction_non_alphanumeric': 0.08309364014062001, 'fraction_numerical': 0.005113454777884308, 'mean_word_length': 2.7801932367149758, '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': '775985', 'n_tokens_mistral': 898, 'n_tokens_neox': 870, 'n_words': 302}