<commit_before>"""Base classes for `flavio`"""


import numpy as np
from .config import config
from collections import OrderedDict
import copy
import math
from flavio._parse_errors import constraints_from_string, combine_distributions, string_from_constraints
import scipy.stats

def _is_number(s):
    try:
        float(s)
        return True
    except ValueError:
        return False


class NamedInstanceClass(object):
    """Base class for classes that have named instances that can be accessed<commit_msg>Revert "[classes] Remove unneeded import"<commit_after>"""Base classes for `flavio`"""


import numpy as np
from .config import config
from collections import OrderedDict
import copy
import math
from flavio._parse_errors import constraints_from_string, combine_distributions, errors_from_string, string_from_constraints
import scipy.stats

def _is_number(s):
    try:
        float(s)
        return True
    except ValueError:
        return False


class NamedInstanceClass(object):
    """Base class for classes that have named instances that can be accessed
{'fraction_non_alphanumeric': 0.05865921787709497, 'fraction_numerical': 0.0, 'mean_word_length': 4.48469387755102, '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': '5128494', 'n_tokens_mistral': 290, 'n_tokens_neox': 286, 'n_words': 108}