<commit_before>import logging

docker_base_url = 'unix://var/run/docker.sock'
max_tries = 120
sleep_time = 1


class ContainerConfig(object):
    def __init__(self, image_name, version, container_name, host_port):
        self._host_ip = "localhost"
        self._version = version
        self.host_port = host_port
        self.environment = {}
        self.port_bindings = {}
        self.volumes = {}
        self.container_name = container_name
        self.container_links = {}
        self.image_name = image_name

    def bind_ports(self, host, container):
        if host:
            self.port_bindings[host] = container

    def link_containers(self, target, current):
        self.container_links[target] = current
        logging.warning("Container {} linked to {}".format(current, target))

    def mount_volume(self, host, container):
        self.volumes[host] = container

    def add_env(self, key, value):
        if key not in self.environment.keys():
            self.environment[key] = value
            logging.warning("Env variable {} set to {}".format(key, value))
        else:
            raise ValueError("Can't override {}.It has been initialized".format(key))

    @property
    def image(self):
        return "{}:{}".format(self.image_name, self._version)

    @property
    def host_ip(self):
        return self._host_ip


# class DbConfig(ContainerConfig):
#     def __init__(self, image_name, version):
#         super(DbConfig, self).__init__(image_name=image_name, version=version)
#
#     @property
#     def username(self):
#         raise NotImplementedError()
#
#     @property
#     def password(self):
#         raise NotImplementedError()
#
#     @property
#     def db(self):
#         raise NotImplementedError()
#
#
# class SeleniumConfig(ContainerConfig):
#     def __init__(self, image_name, name, host_port, container_port,
#                  host_vnc_port, container_vnc_port, version="latest"):
#         super(SeleniumConfig, self).__init__(image_name=image_name, version=version)


<commit_msg>config py deleted commented code<commit_after>import logging

docker_base_url = 'unix://var/run/docker.sock'
max_tries = 120
sleep_time = 1


class ContainerConfig(object):
    def __init__(self, image_name, version, container_name, host_port):
        self._host_ip = "localhost"
        self._version = version
        self.host_port = host_port
        self.environment = {}
        self.port_bindings = {}
        self.volumes = {}
        self.container_name = container_name
        self.container_links = {}
        self.image_name = image_name

    def bind_ports(self, host, container):
        if host:
            self.port_bindings[host] = container

    def link_containers(self, target, current):
        self.container_links[target] = current
        logging.warning("Container {} linked to {}".format(current, target))

    def mount_volume(self, host, container):
        self.volumes[host] = container

    def add_env(self, key, value):
        if key not in self.environment.keys():
            self.environment[key] = value
            logging.warning("Env variable {} set to {}".format(key, value))
        else:
            raise ValueError("Can't override {}.It has been initialized".format(key))

    @property
    def image(self):
        return "{}:{}".format(self.image_name, self._version)

    @property
    def host_ip(self):
        return self._host_ip


{'fraction_non_alphanumeric': 0.11321303841676368, 'fraction_numerical': 0.002328288707799767, 'mean_word_length': 2.8019911504424777, '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': '751275', 'n_tokens_mistral': 1021, 'n_tokens_neox': 989, 'n_words': 224}