<commit_before># -*- coding: utf-8 -*-
#
# Copyright © 2009-2010 CEA
# <NAME>
# Licensed under the terms of the CECILL License
# Modified for Datadog

# stdlib
import logging
import os
import os.path as osp
import platform
# To manage the agent on OSX
from subprocess import (
    CalledProcessError,
    check_call,
    check_output,
)
import sys
import thread  # To manage the windows process asynchronously

# 3p
# GUI Imports
from guidata.configtools import (
    add_image_path,
    get_family,
    get_icon,
    MONOSPACE,
)
from guidata.qt.QtCore import (
    QPoint,
    QSize,
    Qt,
    QTimer,
    SIGNAL,
)
from guidata.qt.QtGui import (
    QApplication,
    QFont,
    QGroupBox,
    QHBoxLayout,
    QInputDialog,
    QLabel,
    QListWidget,
    QMenu,
    QMessageBox,
    QPushButton,
    QSplitter,
    QSystemTrayIcon,
    QTextEdit,
    QVBoxLayout,
    QWidget,
)
from guidata.qthelpers import get_std_icon

# small hack to avoid having to patch the spyderlib library
# Needed because of py2exe bundling not being able to access
# the spyderlib image sources
import spyderlib.baseconfig
spyderlib.baseconfig.IMG_PATH = [""]
from spyderlib.widgets.sourcecode.codeeditor import CodeEditor

# 3rd Party others
import tornado.template as template
import yaml

# Datadog
from checks.check_status import (
    CollectorStatus,
    DogstatsdStatus,
    ForwarderStatus,
    logger_info,
)
from config import (
    get_confd_path,
    get_config,
    get_config_path,
    get_logging_config,
    get_version
)
from util import yLoader
from utils.flare import Flare
from utils.platform import Platform

# Constants describing the agent state
AGENT_RUNNING = 0
AGENT_START_PENDING = 1
AGENT_STOP_PENDING = 2
AGENT_STOPPED = 3
AGENT_UNKNOWN = 4

# Windows management
# Import Windows stuff only on Windows
if Platform.is_windows():
    import win32api
    import win32con
    import win32process
    import win32serviceutil
    import win32service

    # project
    from utils.pidfile import PidFile
    from utils.process import pid_exists

    WIN_STATUS_TO_AGENT = {
        win32service.SERVICE_RUNNING: AGENT_RUNNING,
        win32service.SERVICE_START_PENDING: AGENT_START_PENDING,
        win32service.SERVICE_STOP_PENDING: AGENT_STOP_PENDING,
        win32service.SERVICE_STOPPED: AGENT_STOPPED,
    }


log = logging.getLogger(__name__)

EXCLUDED_WINDOWS_CHECKS = [
    'btrfs',
    'cacti',
    'docker',
    'gearmand',
    'gunicorn',
    'hdfs',
    'kafka_consumer',
    'marathon',
    'mcache',
    'mesos',
    'network',
    'postfix',
    'zk',
]

EXCLUDED_MAC_CHECKS = [
    'cacti',
    'iis',
    'sqlserver',<commit_msg>[windows][gui] disable more checks ⛔<commit_after># -*- coding: utf-8 -*-
#
# Copyright © 2009-2010 CEA
# <NAME>
# Licensed under the terms of the CECILL License
# Modified for Datadog

# stdlib
import logging
import os
import os.path as osp
import platform
# To manage the agent on OSX
from subprocess import (
    CalledProcessError,
    check_call,
    check_output,
)
import sys
import thread  # To manage the windows process asynchronously

# 3p
# GUI Imports
from guidata.configtools import (
    add_image_path,
    get_family,
    get_icon,
    MONOSPACE,
)
from guidata.qt.QtCore import (
    QPoint,
    QSize,
    Qt,
    QTimer,
    SIGNAL,
)
from guidata.qt.QtGui import (
    QApplication,
    QFont,
    QGroupBox,
    QHBoxLayout,
    QInputDialog,
    QLabel,
    QListWidget,
    QMenu,
    QMessageBox,
    QPushButton,
    QSplitter,
    QSystemTrayIcon,
    QTextEdit,
    QVBoxLayout,
    QWidget,
)
from guidata.qthelpers import get_std_icon

# small hack to avoid having to patch the spyderlib library
# Needed because of py2exe bundling not being able to access
# the spyderlib image sources
import spyderlib.baseconfig
spyderlib.baseconfig.IMG_PATH = [""]
from spyderlib.widgets.sourcecode.codeeditor import CodeEditor

# 3rd Party others
import tornado.template as template
import yaml

# Datadog
from checks.check_status import (
    CollectorStatus,
    DogstatsdStatus,
    ForwarderStatus,
    logger_info,
)
from config import (
    get_confd_path,
    get_config,
    get_config_path,
    get_logging_config,
    get_version
)
from util import yLoader
from utils.flare import Flare
from utils.platform import Platform

# Constants describing the agent state
AGENT_RUNNING = 0
AGENT_START_PENDING = 1
AGENT_STOP_PENDING = 2
AGENT_STOPPED = 3
AGENT_UNKNOWN = 4

# Windows management
# Import Windows stuff only on Windows
if Platform.is_windows():
    import win32api
    import win32con
    import win32process
    import win32serviceutil
    import win32service

    # project
    from utils.pidfile import PidFile
    from utils.process import pid_exists

    WIN_STATUS_TO_AGENT = {
        win32service.SERVICE_RUNNING: AGENT_RUNNING,
        win32service.SERVICE_START_PENDING: AGENT_START_PENDING,
        win32service.SERVICE_STOP_PENDING: AGENT_STOP_PENDING,
        win32service.SERVICE_STOPPED: AGENT_STOPPED,
    }


log = logging.getLogger(__name__)

EXCLUDED_WINDOWS_CHECKS = [
    'btrfs',
    'cacti',
    'ceph',
    'docker',
    'docker_daemon',
    'gearmand',
    'go-metro',
    'gunicorn',
    'hdfs',
    'kafka_consumer',
    'linux_proc_extras',
    'marathon',
    'mcache',
    'mesos',
    'network',
    'postfix',
    'zk',
]

EXCLUDED_MAC_CHECKS = [
    'cacti',
    'iis',
    'sqlserver',
{'fraction_non_alphanumeric': 0.07247180624884451, 'fraction_numerical': 0.01294139397300795, 'mean_word_length': 3.369951534733441, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6458143', 'n_tokens_mistral': 1893, 'n_tokens_neox': 1843, 'n_words': 473}