<commit_before># (C) Datadog, Inc. 2010-2016
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)

# stdlib
import logging
import os
import re
import socket
import struct
import time

# 3rd party
from docker import Client, tls

# project
from utils.platform import Platform
from utils.singleton import Singleton

DATADOG_ID = 'com.datadoghq.sd.check.id'


class MountException(Exception):
    pass


class CGroupException(Exception):
    pass

# Default docker client settings
DEFAULT_TIMEOUT = 5
DEFAULT_VERSION = 'auto'
CHECK_NAME = 'docker_daemon'
CONFIG_RELOAD_STATUS = ['start', 'die', 'stop', 'kill']  # used to trigger service discovery

DEFAULT_CONTAINER_EXCLUDE = ["container_image:gcr.io/google_containers/pause.*"]

log = logging.getLogger(__name__)


class DockerUtil:
    __metaclass__ = Singleton

    DEFAULT_SETTINGS = {"version": DEFAULT_VERSION}
    DEFAULT_PROCFS_GW_PATH = "proc/net/route"

    def __init__(self, **kwargs):
        self._docker_root = None
        self.events = []
        self.hostname = None
        self._default_gateway = None

        if 'init_config' in kwargs and 'instance' in kwargs:<commit_msg>[docker] Use proper tag when filtering pause containers (#2998)<commit_after># (C) Datadog, Inc. 2010-2016
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)

# stdlib
import logging
import os
import re
import socket
import struct
import time

# 3rd party
from docker import Client, tls

# project
from utils.platform import Platform
from utils.singleton import Singleton

DATADOG_ID = 'com.datadoghq.sd.check.id'


class MountException(Exception):
    pass


class CGroupException(Exception):
    pass

# Default docker client settings
DEFAULT_TIMEOUT = 5
DEFAULT_VERSION = 'auto'
CHECK_NAME = 'docker_daemon'
CONFIG_RELOAD_STATUS = ['start', 'die', 'stop', 'kill']  # used to trigger service discovery

DEFAULT_CONTAINER_EXCLUDE = ["docker_image:gcr.io/google_containers/pause.*"]

log = logging.getLogger(__name__)


class DockerUtil:
    __metaclass__ = Singleton

    DEFAULT_SETTINGS = {"version": DEFAULT_VERSION}
    DEFAULT_PROCFS_GW_PATH = "proc/net/route"

    def __init__(self, **kwargs):
        self._docker_root = None
        self.events = []
        self.hostname = None
        self._default_gateway = None

        if 'init_config' in kwargs and 'instance' in kwargs:
{'fraction_non_alphanumeric': 0.08960875052587294, 'fraction_numerical': 0.010096760622633571, 'mean_word_length': 4.203501094091903, 'pattern_counts': {'":': 2, '<': 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': '616239', 'n_tokens_mistral': 766, 'n_tokens_neox': 723, 'n_words': 213}