<commit_before>from __future__ import print_function, division

from collections.abc import Mapping
from copy import deepcopy

import numpy as np
from astropy import log as logger

from ..densities import FlaredDisk, AlphaDisk, PowerLawEnvelope, UlrichEnvelope, AmbientMedium
from ..util.interpolate import interp1d_fast_loglog
from ..util.constants import pi, sigma, c, G
from ..sources import SphericalSource, SpotSource
from ..util.functions import FreezableClass, virtual_file
from ..grid import SphericalPolarGrid, CylindricalPolarGrid

from . import Model


def _min_none(*args):
    "Minimum of several arguments, ignoring None values"
    return min(x for x in args if x is not None)


def _max_none(*args):
    "Maximum of several arguments, ignoring None values"
    return max(x for x in args if x is not None)


class Star(FreezableClass):
<commit_msg>Fix compatibility with Python 2.7<commit_after>from __future__ import print_function, division

try:
    from collections.abc import Mapping
except ImportError:
    from collections import Mapping

from copy import deepcopy

import numpy as np
from astropy import log as logger

from ..densities import FlaredDisk, AlphaDisk, PowerLawEnvelope, UlrichEnvelope, AmbientMedium
from ..util.interpolate import interp1d_fast_loglog
from ..util.constants import pi, sigma, c, G
from ..sources import SphericalSource, SpotSource
from ..util.functions import FreezableClass, virtual_file
from ..grid import SphericalPolarGrid, CylindricalPolarGrid

from . import Model


def _min_none(*args):
    "Minimum of several arguments, ignoring None values"
    return min(x for x in args if x is not None)


def _max_none(*args):
    "Maximum of several arguments, ignoring None values"
    return max(x for x in args if x is not None)


class Star(FreezableClass):

{'fraction_non_alphanumeric': 0.05898566703417861, 'fraction_numerical': 0.002205071664829107, 'mean_word_length': 4.780254777070064, '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': '395941', 'n_tokens_mistral': 533, 'n_tokens_neox': 511, 'n_words': 215}