<commit_before>from tyr.servers.server import Server

class CacheServer(Server):

    SERVER_TYPE = 'cache'

    CHEF_RUNLIST=['role[RoleCache]']

    def __init__(self, group=None, server_type=None, instance_type=None,
                    environment=None, ami=None, region=None, role=None,
                    keypair=None, availability_zone=None, security_groups=None,
                    block_devices=None, chef_path=None, couchbase_version=None,
                    couchbase_username=None, couchbase_password=None):

        if server_type is None: server_type = self.SERVER_TYPE

        self.couchbase_version = couchbase_version
        self.couchbase_username = couchbase_username
        self.couchbase_password = <PASSWORD>

        super(CacheServer, self).__init__(group, server_type, instance_type,
                                            environment, ami, region, role,
                                            keypair, availability_zone,
                                            security_groups, block_devices,
                                            chef_path)

    def configure(self):

        super(CacheServer, self).configure()

        # This is just a temporary fix to override the default security
        # groups for Cache servers until the security_groups argument is
        # removed.

        self.security_groups = [
            'management',
            'chef-nodes',
            self.envcl,
            '{env}-cache-management'.format(env=self.environment[0])
        ]<commit_msg>Specified a different instance type based on the environment<commit_after>from tyr.servers.server import Server

class CacheServer(Server):

    SERVER_TYPE = 'cache'

    CHEF_RUNLIST=['role[RoleCache]']

    def __init__(self, group=None, server_type=None, instance_type=None,
                    environment=None, ami=None, region=None, role=None,
                    keypair=None, availability_zone=None, security_groups=None,
                    block_devices=None, chef_path=None, couchbase_version=None,
                    couchbase_username=None, couchbase_password=None):

        if server_type is None: server_type = self.SERVER_TYPE

        self.couchbase_version = couchbase_version
        self.couchbase_username = couchbase_username
        self.couchbase_password = <PASSWORD>

        super(CacheServer, self).__init__(group, server_type, instance_type,
                                            environment, ami, region, role,
                                            keypair, availability_zone,
                                            security_groups, block_devices,
                                            chef_path)

    def configure(self):

        super(CacheServer, self).configure()

        if self.environment == 'prod':
            self.instance_type = 'r3.large'
        else:
            self.instance_type = 'm3.large'

        # This is just a temporary fix to override the default security
        # groups for Cache servers until the security_groups argument is
        # removed.

        self.security_groups = [
            'management',
            'chef-nodes',
            self.envcl,
            '{env}-cache-management'.format(env=self.environment[0])
        ]
{'fraction_non_alphanumeric': 0.07782220855121501, 'fraction_numerical': 0.0012303906490310674, 'mean_word_length': 1.9087656529516994, 'pattern_counts': {'":': 0, '<': 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': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1852234', 'n_tokens_mistral': 817, 'n_tokens_neox': 784, 'n_words': 178}