<commit_before># coding: utf-8
"""A tornado based Jupyter lab server."""

# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
import os

from jinja2 import FileSystemLoader
from jupyterlab_launcher import add_handlers, LabConfig

from .commands import describe, _get_config_dir, _get_runtime_dir
from ._version import __version__

#-----------------------------------------------------------------------------
# Module globals
#-----------------------------------------------------------------------------

DEV_NOTE_NPM = """It looks like you're running JupyterLab from source.
If you're working on the TypeScript sources of JupyterLab, try running

    npm run watch

from the JupyterLab repo directory in another terminal window to have the
system incrementally watch and build JupyterLab's TypeScript for you, as you
make changes.
"""

HERE = os.path.dirname(__file__)
FILE_LOADER = FileSystemLoader(HERE)
PREFIX = '/lab'


def load_jupyter_server_extension(nbapp):
    """Load the JupyterLab server extension.
    """
    # Print messages.
    nbapp.log.info('JupyterLab alpha preview extension loaded from %s' % HERE)

    web_app = nbapp.web_app
    config = LabConfig()
    config.runtime_dir = _get_runtime_dir()
    config.config_dir = _get_config_dir()
    config.page_title = 'JupyterLab Alpha Preview'
    config.name = 'JupyterLab'
    config.prefix = PREFIX
    config.version = __version__

    # Check for dev mode.
    dev_mode = False
    if hasattr(nbapp, 'dev_mode'):
        dev_mode = nbapp.dev_mode

    if dev_mode:
        nbapp.log.info(DEV_NOTE_NPM)
        config.runtime_dir = HERE
        config.config_dir = ''
        config.version = describe()
        config.dev_mode = True

    add_handlers(web_app, config)<commit_msg>do not use git description as version and update dev note<commit_after># coding: utf-8
"""A tornado based Jupyter lab server."""

# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
import os

from jinja2 import FileSystemLoader
from jupyterlab_launcher import add_handlers, LabConfig

from .commands import _get_config_dir, _get_runtime_dir
from ._version import __version__

#-----------------------------------------------------------------------------
# Module globals
#-----------------------------------------------------------------------------

DEV_NOTE_NPM = """You're running JupyterLab from source.
If you're working on the TypeScript sources of JupyterLab, try running

    npm run watch

from the JupyterLab repo directory in another terminal window to have the
system incrementally watch and build JupyterLab's TypeScript for you, as you
make changes.
"""

HERE = os.path.dirname(__file__)
FILE_LOADER = FileSystemLoader(HERE)
PREFIX = '/lab'


def load_jupyter_server_extension(nbapp):
    """Load the JupyterLab server extension.
    """
    # Print messages.
    nbapp.log.info('JupyterLab alpha preview extension loaded from %s' % HERE)

    web_app = nbapp.web_app
    config = LabConfig()
    config.runtime_dir = _get_runtime_dir()
    config.config_dir = _get_config_dir()
    config.page_title = 'JupyterLab Alpha Preview'
    config.name = 'JupyterLab'
    config.prefix = PREFIX
    config.version = __version__

    # Check for dev mode.
    dev_mode = False
    if hasattr(nbapp, 'dev_mode'):
        dev_mode = nbapp.dev_mode

    if dev_mode:
        nbapp.log.info(DEV_NOTE_NPM)
        config.runtime_dir = HERE
        config.config_dir = ''
        config.dev_mode = True

    add_handlers(web_app, config)
{'fraction_non_alphanumeric': 0.1561804008908686, 'fraction_numerical': 0.0011135857461024498, 'mean_word_length': 2.5822532402791625, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1169218', 'n_tokens_mistral': 1102, 'n_tokens_neox': 1044, 'n_words': 319}