<commit_before>from jinja2 import evalcontextfilter, Markup
from time import time
import re
import dateutil.parser
import dateutil.tz
from flask import Blueprint
import markdown as Markdown

blueprint = Blueprint('base', __name__)

URL_ROOT = ''

DOMAIN = 'http://mydomain.tld'


@blueprint.app_context_processor
def context_processor():
    """
    Add helper functions to context for all projects.
    """
    def static_url(project, path):
        cachebuster = int(time())
        if path.startswith('/'):
            path = path[1:]
        if project == "base":
            project = ""
        return "%s/%s?t=%s" % (project, path, cachebuster)

    def page_url(pagename=''):
        return "%s/%s" % (DOMAIN, pagename) 

    context = {
            'static_url': static_url,
            'page_url': page_url,
    }

    return context


@blueprint.app_template_filter()
def drop_cap(text):<commit_msg>add absolute url to static path<commit_after>from jinja2 import evalcontextfilter, Markup
from time import time
import re
import dateutil.parser
import dateutil.tz
from flask import Blueprint
import markdown as Markdown

blueprint = Blueprint('base', __name__)

URL_ROOT = ''

DOMAIN = 'http://mydomain.tld'


@blueprint.app_context_processor
def context_processor():
    """
    Add helper functions to context for all projects.
    """
    def static_url(project, path):
        cachebuster = int(time())
        if path.startswith('/'):
            path = path[1:]
        if project == "base":
            project = ""
        return "/%s/%s?t=%s" % (project, path, cachebuster)

    def page_url(pagename=''):
        return "%s/%s" % (DOMAIN, pagename) 

    context = {
            'static_url': static_url,
            'page_url': page_url,
    }

    return context


@blueprint.app_template_filter()
def drop_cap(text):
{'fraction_non_alphanumeric': 0.1179989124524198, 'fraction_numerical': 0.002175095160413268, 'mean_word_length': 2.9065817409766455, 'pattern_counts': {'":': 2, '<': 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': '1013591', 'n_tokens_mistral': 575, 'n_tokens_neox': 558, 'n_words': 152}