<commit_before>import sendgrid
import config as config
from utils import parse_iso_date

from sendgrid.helpers.mail import  Mail, Content

sg = sendgrid.SendGridAPIClient(apikey=config.SENDGRID_API_KEY)
from_mail = sendgrid.Email(config.SENDGRID_FROM_MAIL)


def render_download_link(link):
    """
    Renders a regular old HTML anchor link element.

    Args:
        link (string): The URL of the link to be rendered.

    Returns:
        string: The HTML anchor element.

    """
    return "<a href='{0}'>{1}</a>".format(link, link)


def render_list_elements(elements):
    """
    Renders a HTML unordered list inner content from annotation export results.

    Args:
        elements (array): Array of dictionaries with a title and date key.

    Returns:
        The HTML string output.

    """
    output = ""
    for el in elements:
        output += "<li>{0} (Last updated at {1})</li>".format(el["title"], parse_iso_date(el["date"]))
    return output


def render_list(data):<commit_msg>Fix video title utf-8 error<commit_after>import sendgrid
import config as config
from utils import parse_iso_date

from sendgrid.helpers.mail import  Mail, Content

sg = sendgrid.SendGridAPIClient(apikey=config.SENDGRID_API_KEY)
from_mail = sendgrid.Email(config.SENDGRID_FROM_MAIL)


def render_download_link(link):
    """
    Renders a regular old HTML anchor link element.

    Args:
        link (string): The URL of the link to be rendered.

    Returns:
        string: The HTML anchor element.

    """
    return "<a href='{0}'>{1}</a>".format(link, link)


def render_list_elements(elements):
    """
    Renders a HTML unordered list inner content from annotation export results.

    Args:
        elements (array): Array of dictionaries with a title and date key.

    Returns:
        The HTML string output.

    """
    output = ""
    for el in elements:
        utf_title = el["title"].encode('utf-8')
        output += "<li>{0} (Last updated at {1})</li>".format(utf_title, parse_iso_date(el["date"]))
    return output


def render_list(data):
{'fraction_non_alphanumeric': 0.10648596321393998, 'fraction_numerical': 0.00484027105517909, 'mean_word_length': 3.2972972972972974, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '1829926', 'n_tokens_mistral': 633, 'n_tokens_neox': 624, 'n_words': 197}