<commit_before># -*- coding: utf-8 -*-

"""Notebook contents manager."""

#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------

import io
import os
import os.path as op

from tornado import web

try:
    import nbformat
except ImportError:
    from IPython import nbformat

try:
    from traitlets import Unicode, Bool
    from traitlets.config import Configurable
except ImportError:
    from IPython.utils.traitlets import Unicode, Bool
    from IPython.config.configurable import Configurable

try:
    from notebook.services.contents.filemanager import FileContentsManager
except ImportError:
    from IPython.html.services.contents.filemanager import FileContentsManager

from .format_manager import convert, format_manager<commit_msg>Fix: "NameError: name '_' is not defined" running `ipymd` from commandline<commit_after># -*- coding: utf-8 -*-

"""Notebook contents manager."""

#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------

import io
import os
import os.path as op

from tornado import web

try:
    import nbformat
except ImportError:
    from IPython import nbformat

try:
    from traitlets import Unicode, Bool
    from traitlets.config import Configurable
except ImportError:
    from IPython.utils.traitlets import Unicode, Bool
    from IPython.config.configurable import Configurable

try:
    from notebook import transutils
    from notebook.services.contents.filemanager import FileContentsManager
except ImportError:
    from IPython.html.services.contents.filemanager import FileContentsManager

from .format_manager import convert, format_manager
{'fraction_non_alphanumeric': 0.22639425731639978, 'fraction_numerical': 0.0011043622308117063, 'mean_word_length': 2.076400679117148, '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': '2861198', 'n_tokens_mistral': 425, 'n_tokens_neox': 416, 'n_words': 142}