<commit_before># region Description
"""
test_base.py: Base class for Raw-packet project
Author: <NAME>
License: MIT
Copyright 2020, Raw-packet Project
"""
# endregion

# region Import
from platform import system, release
from sys import exit, stdout
try:
    from os import getuid
except ImportError:
    from ctypes import windll
from os.path import dirname, abspath, isfile, join
try:
    from pwd import getpwuid
except ModuleNotFoundError:
    pass
from random import choice, randint
try:
    from netifaces import interfaces, ifaddresses, AF_LINK, AF_INET, AF_INET6
    from netifaces import gateways
except ModuleNotFoundError:
    from socket import AF_INET, AF_INET6, gethostname, gethostbyname
    from getmac import get_mac_address
from netaddr import IPNetwork, IPAddress
from netaddr.core import AddrFormatError
from struct import pack, error
from ipaddress import IPv4Address, AddressValueError
from re import match, compile, search
import subprocess as sub
import psutil as ps
import socket as sock
from distro import linux_distribution
from prettytable import PrettyTable
from typing import Dict, List, Union
from paramiko import RSAKey, SSHClient, AutoAddPolicy
from paramiko.ssh_exception import NoValidConnectionsError, AuthenticationException
# endregion

# region Authorship information
__author__ = '<NAME>'
__copyright__ = 'Copyright 2020, Raw-packet Project'
__credits__ = ['']
__license__ = 'MIT'
__version__ = '0.2.1'
__maintainer__ = '<NAME>'
__email__ = '<EMAIL>'
__status__ = 'Development'
# endregion


# region Main class - Base
class Base:

    # region Set variables
    vendor_list: List[Dict[str, str]] = list()
    os_installed_packages_list = None
    windows_mac_address_regex = compile(r'([0-9a-f]{2}-[0-9a-f]{2}-[0-9a-f]{2}-[0-9a-f]{2}-[0-9a-f]{2}-[0-9a-f]{2})')
    # endregion

    # region Init
    def __init__(self) -> None:
        """
        Init string variables
        """

        if self.get_platform().startswith('Windows'):
            self.cINFO: str = ''
            self.cERROR: str = ''
            self.cSUCCESS: str = ''
            self.cWARNING: str = ''
            self.cEND: str = ''
        else:
            self.cINFO: str = '\033[1;34m'
            self.cERROR: str = '\033[1;31m'
            self.cSUCCESS: str = '\033[1;32m'
            self.cWARNING: str = '\033[1;33m'
            self.cEND: str = '\033[0m'

        self.c_info: str = self.cINFO + '[*]' + self.cEND + ' '
        self.c_error: str = self.cERROR + '[-]' + self.cEND + ' '
        self.c_success: str = self.cSUCCESS + '[+]' + self.cEND + ' '
        self.c_warning: str = self.cWARNING + '[!]' + self.cEND + ' '

        self.lowercase_letters: str = 'abcdefghijklmnopqrstuvwxyz'
        self.uppercase_letters: str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
        self.digits: str = '0123456789'
    # endregion

    # region Output functions
    def print_banner(self) -> None:
        """
        Print colored banner in console
        :return: None
        """

        with open(dirname(abspath(__file__)) + '/version.txt', 'r') as version_file:
            current_version = version_file.read()

        if self.get_platform().startswith('Windows'):
            green_color: str = ''
            yellow_color: str = ''
            end_color: str = ''
        else:
            green_color: str = '\033[1;32m'
            yellow_color: str = '\033[1;33m'
            end_color: str = '\033[0m'

        print(green_color + "                                          _        _   " + end_color)
        print(green_color + " _ __ __ ___      __     _ __   __ _  ___| | _____| |_ " + end_color)
        print(green_color + "| '__/ _` \ \ /\ / /___ | '_ \ / _` |/ __| |/ / _ \ __|" + end_color)
        print(green_color + "| | | (_| |\ V  V /|___|| |_) | (_| | (__|   <  __/ |_ " + end_color)
        print(green_color + "|_|  \__,_| \_/\_/      | .__/ \__,_|\___|_|\_\___|\__|" + end_color)
        print(green_color + "                        |_|                      v" + current_version + end_color)
        print(yellow_color + "\r\n             https://raw-packet.github.io/\r\n" + end_color)

    def _color_print(self, color: str = 'blue', *strings: str) -> None:
        """
        Print colored text in console
        :param color: Set color: blue, red, orange, green (default: blue)
        :param strings: Strings for printing in console
        :return: None
        """
        if color == 'blue':
            stdout.write(self.c_info)
        elif color == 'red':
            stdout.write(self.c_error)
        elif color == 'orange':
            stdout.write(self.c_warning)
        elif color == 'green':
            stdout.write(self.c_success)
        else:<commit_msg>Update base.py: add method get_banner<commit_after># region Description
"""
test_base.py: Base class for Raw-packet project
Author: <NAME>
License: MIT
Copyright 2020, Raw-packet Project
"""
# endregion

# region Import
from platform import system, release
from sys import exit, stdout
try:
    from os import getuid
except ImportError:
    from ctypes import windll
from os.path import dirname, abspath, isfile, join
try:
    from pwd import getpwuid
except ModuleNotFoundError:
    pass
from random import choice, randint
try:
    from netifaces import interfaces, ifaddresses, AF_LINK, AF_INET, AF_INET6
    from netifaces import gateways
except ModuleNotFoundError:
    from socket import AF_INET, AF_INET6, gethostname, gethostbyname
    from getmac import get_mac_address
from netaddr import IPNetwork, IPAddress
from netaddr.core import AddrFormatError
from struct import pack, error
from ipaddress import IPv4Address, AddressValueError
from re import match, compile, search
import subprocess as sub
import psutil as ps
import socket as sock
from distro import linux_distribution
from prettytable import PrettyTable
from typing import Dict, List, Union
from paramiko import RSAKey, SSHClient, AutoAddPolicy
from paramiko.ssh_exception import NoValidConnectionsError, AuthenticationException
# endregion

# region Authorship information
__author__ = '<NAME>'
__copyright__ = 'Copyright 2020, Raw-packet Project'
__credits__ = ['']
__license__ = 'MIT'
__version__ = '0.2.1'
__maintainer__ = '<NAME>'
__email__ = '<EMAIL>'
__status__ = 'Development'
# endregion


# region Main class - Base
class Base:

    # region Set variables
    vendor_list: List[Dict[str, str]] = list()
    os_installed_packages_list = None
    windows_mac_address_regex = compile(r'([0-9a-f]{2}-[0-9a-f]{2}-[0-9a-f]{2}-[0-9a-f]{2}-[0-9a-f]{2}-[0-9a-f]{2})')
    # endregion

    # region Init
    def __init__(self) -> None:
        """
        Init string variables
        """

        if self.get_platform().startswith('Windows'):
            self.cINFO: str = ''
            self.cERROR: str = ''
            self.cSUCCESS: str = ''
            self.cWARNING: str = ''
            self.cEND: str = ''
        else:
            self.cINFO: str = '\033[1;34m'
            self.cERROR: str = '\033[1;31m'
            self.cSUCCESS: str = '\033[1;32m'
            self.cWARNING: str = '\033[1;33m'
            self.cEND: str = '\033[0m'

        self.c_info: str = self.cINFO + '[*]' + self.cEND + ' '
        self.c_error: str = self.cERROR + '[-]' + self.cEND + ' '
        self.c_success: str = self.cSUCCESS + '[+]' + self.cEND + ' '
        self.c_warning: str = self.cWARNING + '[!]' + self.cEND + ' '

        self.lowercase_letters: str = 'abcdefghijklmnopqrstuvwxyz'
        self.uppercase_letters: str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
        self.digits: str = '0123456789'
    # endregion

    # region Output functions
    def get_banner(self) -> str:
        """
        Get string of colored banner
        :return: String of colored banner
        """
        return \
            self.cSUCCESS + \
            "                                          _        _   \n" + \
            " _ __ __ ___      __     _ __   __ _  ___| | _____| |_ \n" + \
            "| '__/ _` \ \ /\ / /___ | '_ \ / _` |/ __| |/ / _ \ __|\n" + \
            "| | | (_| |\ V  V /|___|| |_) | (_| | (__|   <  __/ |_ \n" + \
            "|_|  \__,_| \_/\_/      | .__/ \__,_|\___|_|\_\___|\__|\n" + \
            "                        |_|                      v" + __version__ + "\n" + \
            self.cEND + self.cWARNING + \
            "             https://raw-packet.github.io/\r\n" + self.cEND

    def print_banner(self) -> None:
        """
        Print colored banner in console
        :return: None
        """
        print(self.get_banner())

    def _color_print(self, color: str = 'blue', *strings: str) -> None:
        """
        Print colored text in console
        :param color: Set color: blue, red, orange, green (default: blue)
        :param strings: Strings for printing in console
        :return: None
        """
        if color == 'blue':
            stdout.write(self.c_info)
        elif color == 'red':
            stdout.write(self.c_error)
        elif color == 'orange':
            stdout.write(self.c_warning)
        elif color == 'green':
            stdout.write(self.c_success)
        else:
{'fraction_non_alphanumeric': 0.12465798402101347, 'fraction_numerical': 0.01707343767100799, 'mean_word_length': 2.239276852180078, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 18, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4087141', 'n_tokens_mistral': 3026, 'n_tokens_neox': 2872, 'n_words': 707}