<commit_before>from django.conf import settings


def hosts(request):
    hosts = {
        'SOO_HOST': settings.SOO_HOST,
        'HELP_HOST': settings.HELP_HOST,
        'SSO_HOST': settings.SSO_HOST,
        'PROFILE_HOST': settings.PROFILE_HOST
    }

    return hosts

def feature_flags(request):
    return {
        'features': {
            'FEATURE_NEW_SHARED_HEADER_ENABLED': (
                settings.FEATURE_NEW_SHARED_HEADER_ENABLED
            )
        }
    }

def sso_processor(request):
    url = request.build_absolute_uri()
    sso_host = settings.SSO_HOST
    soo_host = settings.SOO_HOST
    return {
        'sso_is_logged_in': request.user.is_authenticated,
        'sso_login_url': '{0}accounts/login/?next={1}'.format(sso_host, soo_host),
        'sso_register_url': '{0}accounts/signup/'.format(sso_host),
        'sso_logout_url': '{0}accounts/logout/?next={1}'.format(sso_host, soo_host),
        'sso_profile_url': settings.SSO_PROFILE_URL,
    }


def header_footer_context_processor(request):
    active_classes = getattr(settings, 'HEADER_FOOTER_CSS_ACTIVE_CLASSES', {})
    return {
        'header_footer_contact_us_url': settings.HEADER_FOOTER_CONTACT_US_URL,
        'header_footer_css_active_classes': active_classes,
    }
<commit_msg>Removed feature flags - not using. Updated sso_processor.<commit_after>from django.conf import settings


def hosts(request):
    hosts = {
        'SOO_HOST': settings.SOO_HOST,
        'HELP_HOST': settings.HELP_HOST,
        'SSO_HOST': settings.SSO_HOST,
        'PROFILE_HOST': settings.PROFILE_HOST
    }

    return hosts


def sso_processor(request):
    sso_host = settings.SSO_HOST
    soo_host = settings.SOO_HOST
    url = request.build_absolute_uri()
    login_url = settings.SSO_PROXY_LOGIN_URL
    return {
        'sso_is_logged_in': request.user.is_authenticated,
        'sso_login_url': '{0}?next={1}'.format(login_url, url),
        'sso_register_url': '{0}accounts/signup/'.format(sso_host),
        'sso_logout_url': '{0}accounts/logout/?next={1}'.format(sso_host, url),
        'sso_profile_url': settings.SSO_PROFILE_URL,
    }


def header_footer_context_processor(request):
    active_classes = getattr(settings, 'HEADER_FOOTER_CSS_ACTIVE_CLASSES', {})
    return {
        'header_footer_contact_us_url': settings.HEADER_FOOTER_CONTACT_US_URL,
        'header_footer_css_active_classes': active_classes,
    }

{'fraction_non_alphanumeric': 0.1115257048092869, 'fraction_numerical': 0.0041459369817578775, 'mean_word_length': 3.5187265917602994, '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': '99187', 'n_tokens_mistral': 858, 'n_tokens_neox': 840, 'n_words': 110}