<commit_before>import re
from django.conf import settings


def can_execute_unsafe_code(course_id):
    """
    Determine if this course is allowed to run unsafe code.

    For use from the ModuleStore.  Checks the `course_id` against a list of whitelisted
    regexes.

    Returns a boolean, true if the course can run outside the sandbox.

    """
    # To decide if we can run unsafe code, we check the course id against
    # a list of regexes configured on the server.
    for regex in settings.COURSES_WITH_UNSAFE_CODE:
        if re.match(regex, course_id):
            return True
    return False<commit_msg>actually, I think we use single quotes for docstrings<commit_after>import re
from django.conf import settings


def can_execute_unsafe_code(course_id):
    '''
    Determine if this course is allowed to run unsafe code.

    For use from the ModuleStore.  Checks the `course_id` against a list of whitelisted
    regexes.

    Returns a boolean, true if the course can run outside the sandbox.

    '''
    # To decide if we can run unsafe code, we check the course id against
    # a list of regexes configured on the server.
    for regex in settings.COURSES_WITH_UNSAFE_CODE:
        if re.match(regex, course_id):
            return True
    return False
{'fraction_non_alphanumeric': 0.0493730407523511, 'fraction_numerical': 0.0, 'mean_word_length': 3.028391167192429, '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': '5378317', 'n_tokens_mistral': 364, 'n_tokens_neox': 350, 'n_words': 161}