<commit_before>''' The resources module provides the Resources class for easily configuring
how BokehJS code and CSS resources should be located, loaded, and embedded in
Bokeh documents.

Also provides some pre-configured Resources objects:

Attributes:
    CDN : load minified BokehJS from CDN
    INLINE : provide minified BokehJS from library static directory

'''

from os.path import abspath, join, normpath, realpath, relpath, split, splitext
import sys
import logging
logger = logging.getLogger(__name__)

import six

from . import __version__, settings

def _server_static_dir():
    return join(abspath(split(__file__)[0]), "server", "static")

def _static_path(path):
    path = normpath(join(_server_static_dir(), path))
    if sys.platform == 'cygwin': path = realpath(path)
    return path

def _cdn_base_url():
    return "http://cdn.pydata.org"

def _get_cdn_urls(version=None, minified=True):
    if version is None:
        version = __version__.split('-')[0]

    # check the 'dev' fingerprint
    dev = version.split('.')[-2]
    # check if we want minified js and css
    _min = ".min" if minified else ""

    base_url = _cdn_base_url()
    rel_container = 'bokeh/release'
    dev_container = 'bokeh/dev'
    container = rel_container if not dev.startswith(('dev', 'rc')) else dev_container

    result = {
        'js_files'  : ['%s/%s/bokeh-%s%s.js' % (base_url, container, version, _min)],
        'css_files' : ['%s/%s/bokeh-%s%s.css' % (base_url, container, version, _min)],<commit_msg>Make the container expression more readable.<commit_after>''' The resources module provides the Resources class for easily configuring
how BokehJS code and CSS resources should be located, loaded, and embedded in
Bokeh documents.

Also provides some pre-configured Resources objects:

Attributes:
    CDN : load minified BokehJS from CDN
    INLINE : provide minified BokehJS from library static directory

'''

from os.path import abspath, join, normpath, realpath, relpath, split, splitext
import sys
import logging
logger = logging.getLogger(__name__)

import six

from . import __version__, settings

def _server_static_dir():
    return join(abspath(split(__file__)[0]), "server", "static")

def _static_path(path):
    path = normpath(join(_server_static_dir(), path))
    if sys.platform == 'cygwin': path = realpath(path)
    return path

def _cdn_base_url():
    return "http://cdn.pydata.org"

def _get_cdn_urls(version=None, minified=True):
    if version is None:
        version = __version__.split('-')[0]

    # check the 'dev' fingerprint
    dev = version.split('.')[-2]
    # check if we want minified js and css
    _min = ".min" if minified else ""

    base_url = _cdn_base_url()
    dev_container = 'bokeh/dev'
    rel_container = 'bokeh/release'
    container = dev_container if dev.startswith(('dev', 'rc')) else rel_container

    result = {
        'js_files'  : ['%s/%s/bokeh-%s%s.js' % (base_url, container, version, _min)],
        'css_files' : ['%s/%s/bokeh-%s%s.css' % (base_url, container, version, _min)],
{'fraction_non_alphanumeric': 0.11897738446411013, 'fraction_numerical': 0.0019665683382497543, 'mean_word_length': 4.00327868852459, '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': '6494160', 'n_tokens_mistral': 1000, 'n_tokens_neox': 978, 'n_words': 295}