<commit_before>#!/usr/bin/env python
# 
# Author: <NAME>.
# 
#

from scheduler_factory import SchedulerFactory

class BaseMachine:
    
    """ BaseMachine represents a compute resource and has the following
        properties:
    
    Attributes:
        name: string representing the system's name
        scheduler: an object of the BaseScheduler class
        jobLauncher: an object of the BaseJobLauncher class

    Methods:
        get_machine_name:
        print_machine_info:
        print_scheduler_info: 
        print_jobLauncher_info: 
        set_numNodes:
    """

    def __init__(self,name,scheduler_type,jobLauncher,numNodes,
                 numSockets,numCoresPerSocket):
        self.__name = name 
        self.__scheduler = SchedulerFactory.create_scheduler(scheduler_type)
        self.__jobLauncher = jobLauncher
        self.__numNodes = numNodes
        self.__numSockets = numSockets
        self.__numCoresPerSocket = numCoresPerSocket

    def print_machine_info(self):
        """ Print information about the machine"""
        print("Machine name:\n"+self.get_machine_name())
        self.print_scheduler_info()
        print("Job Launcher info: ")
        self.print_jobLauncher_info()

    def get_machine_name(self):
        """ Return a string with the system's name."""
        return self.__name

    def print_scheduler_info(self):
        """ Print information about the machine's scheduler."""
        print("Scheduler Information")
        print(str(self.__scheduler))

    def print_jobLauncher_info(self):
        """ Print information about the machine's job launcher."""
        print("Job Launcher Information")
        print(str(self.__jobLauncher))

    def set_numNodes(self,numNodes):
        self.__numNodes = numNodes

if __name__ == "__main__":
    print "This is the BaseMachine class!"<commit_msg>use the function to print scheduler info<commit_after>#!/usr/bin/env python
# 
# Author: <NAME>.
# 
#

from scheduler_factory import SchedulerFactory

class BaseMachine:
    
    """ BaseMachine represents a compute resource and has the following
        properties:
    
    Attributes:
        name: string representing the system's name
        scheduler: an object of the BaseScheduler class
        jobLauncher: an object of the BaseJobLauncher class

    Methods:
        get_machine_name:
        print_machine_info:
        print_scheduler_info: 
        print_jobLauncher_info: 
        set_numNodes:
    """

    def __init__(self,name,scheduler_type,jobLauncher,numNodes,
                 numSockets,numCoresPerSocket):
        self.__name = name 
        self.__scheduler = SchedulerFactory.create_scheduler(scheduler_type)
        self.__jobLauncher = jobLauncher
        self.__numNodes = numNodes
        self.__numSockets = numSockets
        self.__numCoresPerSocket = numCoresPerSocket

    def print_machine_info(self):
        """ Print information about the machine"""
        print("Machine name:\n"+self.get_machine_name())
        self.__scheduler.print_scheduler_info()
        print("Job Launcher info: ")
        self.print_jobLauncher_info()

    def get_machine_name(self):
        """ Return a string with the system's name."""
        return self.__name

    def print_jobLauncher_info(self):
        """ Print information about the machine's job launcher."""
        print("Job Launcher Information")
        print(str(self.__jobLauncher))

    def set_numNodes(self,numNodes):
        self.__numNodes = numNodes

if __name__ == "__main__":
    print "This is the BaseMachine class!"
{'fraction_non_alphanumeric': 0.08155829596412556, 'fraction_numerical': 0.0, 'mean_word_length': 2.841765339074273, 'pattern_counts': {'":': 2, '<': 5, '<?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': '2806024', 'n_tokens_mistral': 1006, 'n_tokens_neox': 971, 'n_words': 242}