<commit_before># Copyright 2015 Cisco Systems, Inc.
# All Rights Reserved.
#
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
#    not use this file except in compliance with the License. You may obtain
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.

"""Utility methods for scheduler solvers."""

import os.path

from oslo_config import cfg
from oslo_log import log as logging

from nova.i18n import _LE

rack_config_file_opts = [
    cfg.StrOpt('rack_config',
            default='',
            help='The config file specifying physical rack configuration. By '
                 'default Cisco\'s Neutron ML2 plugin config is supported, '
                 'otherwise the format of the config file needs to be '
                 'compatible with Cisco\'s Neutron ML2 plugin config file.'),
    cfg.StrOpt('rack_config_prefix',
            default='',
            help='The section name in rack config file should start with the '
                 'prefix, so the config parser can recognize the section as '
                 'information of a specific rack or ToR switch. For example, '
                 'in Cisco\'s Neutron ML2 plugin config a section name like '
                 '[ml2_mech_cisco_nexus:1.1.1.1] identifies a specific ToR '
                 'switch, then the prefix is \'ml2_mech_cisco_nexus\'.')
]

CONF = cfg.CONF
CONF.register_opts(rack_config_file_opts)

LOG = logging.getLogger(__name__)


def get_host_racks_config():<commit_msg>Let scheduler.solvers.utils import all methods from nova.scheduler.filters.utils<commit_after># Copyright 2015 Cisco Systems, Inc.
# All Rights Reserved.
#
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
#    not use this file except in compliance with the License. You may obtain
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.

"""Utility methods for scheduler solvers."""

import os.path

from oslo_config import cfg
from oslo_log import log as logging

from nova.i18n import _LE
from nova.scheduler.filters.utils import *  # noqa

rack_config_file_opts = [
    cfg.StrOpt('rack_config',
            default='',
            help='The config file specifying physical rack configuration. By '
                 'default Cisco\'s Neutron ML2 plugin config is supported, '
                 'otherwise the format of the config file needs to be '
                 'compatible with Cisco\'s Neutron ML2 plugin config file.'),
    cfg.StrOpt('rack_config_prefix',
            default='',
            help='The section name in rack config file should start with the '
                 'prefix, so the config parser can recognize the section as '
                 'information of a specific rack or ToR switch. For example, '
                 'in Cisco\'s Neutron ML2 plugin config a section name like '
                 '[ml2_mech_cisco_nexus:1.1.1.1] identifies a specific ToR '
                 'switch, then the prefix is \'ml2_mech_cisco_nexus\'.')
]

CONF = cfg.CONF
CONF.register_opts(rack_config_file_opts)

LOG = logging.getLogger(__name__)


def get_host_racks_config():
{'fraction_non_alphanumeric': 0.07322175732217573, 'fraction_numerical': 0.00993723849372385, 'mean_word_length': 2.757367387033399, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 2, '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': '970686', 'n_tokens_mistral': 1046, 'n_tokens_neox': 1015, 'n_words': 421}