<commit_before># Monkey-patch Quantity
import astropy.units as u

@classmethod
def _parse_quantity(cls, q):
    try:
        val,unit = q.split()
    except:
        val = q
        unit = u.dimensionless_unscaled

    return u.Quantity(float(val), unit)

u.Quantity.from_string = _parse_quantity

from . import coordinates
from . import dynamics
from . import integrate
from . import io
from . import potential

# Add a custom log level
from astropy import log as logger
import logging

def debug_factory(logger, debug_level):
    def custom_debug(msg, *args, **kwargs):
        if logger.level >= debug_level:
           return
        logger._log(debug_level, msg, args, kwargs)
    return custom_debug

logging.addLevelName(logging.INFO+5, 'IMPORTANT')
setattr(logger, 'important', debug_factory(logger, logging.INFO+5))
<commit_msg>default log level above info<commit_after># Monkey-patch Quantity
import astropy.units as u

@classmethod
def _parse_quantity(cls, q):
    try:
        val,unit = q.split()
    except:
        val = q
        unit = u.dimensionless_unscaled

    return u.Quantity(float(val), unit)

u.Quantity.from_string = _parse_quantity

from . import coordinates
from . import dynamics
from . import integrate
from . import io
from . import potential

# Add a custom log level
from astropy import log as logger
import logging

def debug_factory(logger, debug_level):
    def custom_debug(msg, *args, **kwargs):
        if logger.level >= debug_level:
           return
        logger._log(debug_level, msg, args, kwargs)
    return custom_debug

logging.addLevelName(logging.INFO+5, 'IMPORTANT')
setattr(logger, 'important', debug_factory(logger, logging.INFO+5))
logger.setLevel(logging.INFO+1)

{'fraction_non_alphanumeric': 0.09238814642649622, 'fraction_numerical': 0.002905287623474724, 'mean_word_length': 3.654054054054054, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1825250', 'n_tokens_mistral': 529, 'n_tokens_neox': 520, 'n_words': 155}