<commit_before>import platform
import os
import time


class BaseColors(object):
    """
    Holds base colors used in `terminal`
    """
    HEADER = "\033[95m"
    BLUE = "\033[94m"
    GREEN = "\033[92m"
    WARNING = "\033[93m"
    RED = "\033[91m"
    ENDCOLOR = "\033[0m"
    BOLD = "\033[1m"
    UNDERLINE = "\033[4m"


class OSXDodger(BaseColors):
    allowed_version = "10.6.1"
    allowed_system = "darwin"

    def __init__(self):
        self.app_dir = "/Applications/"
        self.system_files = [".DS_Store", ".localized"]

    def load_applications(self):
        """
        Read all applications in the `/Applications/` dir
        """
        if self.pc_is_macintosh():
            all_apps = os.listdir(self.app_dir)
            print(BaseColors.GREEN + "Loading applications...")
            time.sleep(1)

            print("\n\nAPP NUMBER\t\tAPPLICATION NAME" + BaseColors.ENDCOLOR)

            for index, app in enumerate(all_apps):
                if app not in self.system_files:
                    print (index + 1), "\t\t\t" + app.replace(".app", "")

    def select_applications(self):
        """
        Allow user to select an application they want
        not to appear on the Dock
        """
        pass

    def load_dodger_filer(self):
        """
        Load the file to modify for the application
        chosen by the user in `select_applications`

        The file to be loaded for is `info.plist`
        """
        pass

    def dodge_application(self):
        """
        Remive the application from the Dock
        """
        pass

    @classmethod
    def pc_is_macintosh(cls):
        """
        Check if it is an `Apple Computer` i.e a Mac
        @return bool
        """
        system = platform.system().lower()
        sys_version = int((platform.mac_ver())[0].replace(".", ""))
        allowed_version = int(cls.allowed_version.replace(".", ""))

        if (system == cls.allowed_system) and (sys_version >= allowed_version):
            return True
        else:
            print("\nSorry :(")
            print("FAILED. OsX-dock-dodger is only applicable to computers " +
                  "running OS X {} or higher".format(cls.allowed_version))
            return False

dodge = OSXDodger()
dodge.load_applications()<commit_msg>Revert "Load all applications in the  directory"<commit_after>import platform


class OSXDodger(object):
    allowed_version = "10.6.1"
    allowed_system = "darwin"

    def __init__(self, applications_dir):
        self.app_dir = applications_dir

    def load_applications(self):
        """
        Read all applications in the `/Applications/` dir
        """
        self.pc_is_macintosh()

    def select_applications(self):
        """
        Allow user to select an application they want
        not to appear on the Dock
        """
        pass

    def load_dodger_filer(self):
        """
        Load the file to modify for the application
        chosen by the user in `select_applications`

        The file to be loaded for is `info.plist`
        """
        pass

    def dodge_application(self):
        """
        Remive the application from the Dock
        """
        pass

    @classmethod
    def pc_is_macintosh(cls):
        """
        Check if it is an `Apple Computer` i.e a Mac
        @return bool
        """
        system = platform.system().lower()
        sys_version = int((platform.mac_ver())[0].replace(".", ""))
        allowed_version = int(cls.allowed_version.replace(".", ""))

        if (system == cls.allowed_system) and (sys_version >= allowed_version):
            return True
        else:
            print("\nSorry :(")
            print("FAILED. OsX-dock-dodger is only applicable to computers " +
                  "running OS X {} or higher".format(cls.allowed_version))
            return False

dodge = OSXDodger("/Applications/")
dodge.load_applications()
{'fraction_non_alphanumeric': 0.11397904421160235, 'fraction_numerical': 0.012522361359570662, 'mean_word_length': 2.0200617283950617, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4903290', 'n_tokens_mistral': 1193, 'n_tokens_neox': 1132, 'n_words': 305}