<commit_before># -*- coding: utf-8 -*-
"""
    flask_security.core
    ~~~~~~~~~~~~~~~~~~~

    Flask-Security core module

    :copyright: (c) 2012 by <NAME>.
    :copyright: (c) 2017 by CERN.
    :copyright: (c) 2017 by ETH Zurich, Swiss Data Science Center.
    :license: MIT, see LICENSE for more details.
"""

from datetime import datetime

import pkg_resources
from flask import current_app, render_template
from flask_babelex import Domain
from flask_login import UserMixin as BaseUserMixin
from flask_login import AnonymousUserMixin, LoginManager, current_user
from flask_principal import Identity, Principal, RoleNeed, UserNeed, \
    identity_loaded
from itsdangerous import URLSafeTimedSerializer
from passlib.context import CryptContext
from werkzeug.datastructures import ImmutableList
from werkzeug.local import LocalProxy

from .forms import ChangePasswordForm, ConfirmRegisterForm, \
    ForgotPasswordForm, LoginForm, PasswordlessLoginForm, RegisterForm, \
    ResetPasswordForm, SendConfirmationForm
from .utils import config_value as cv
from .utils import _, get_config, hash_data, localize_callback, string_types, \
    url_for_security, verify_hash
from .views import create_blueprint

# Convenient references
_security = LocalProxy(lambda: current_app.extensions['security'])


#: Default Flask-Security configuration
_default_config = {
    'BLUEPRINT_NAME': 'security',
    'CLI_ROLES_NAME': 'roles',
    'CLI_USERS_NAME': 'users',
    'URL_PREFIX': None,
    'SUBDOMAIN': None,
    'FLASH_MESSAGES': True,
    'I18N_DOMAIN': 'flask_security',
    'PASSWORD_HASH': '<PASSWORD>',
    'PASSWORD_SALT': None,
    'PASSWORD_SINGLE_HASH': set([
        'django_argon2',
        'django_bcrypt_sha256',
        'django_pbkdf2_sha256',
        'django_pbkdf2_sha1',
        'django_bcrypt',
        'django_salted_md5',
        'django_salted_sha1',
        'django_des_crypt',
        'plaintext'
    ]),
    'LOGIN_URL': '/login',
    'LOGOUT_URL': '/logout',
    'REGISTER_URL': '/register',<commit_msg>Use {} instead of set([])<commit_after># -*- coding: utf-8 -*-
"""
    flask_security.core
    ~~~~~~~~~~~~~~~~~~~

    Flask-Security core module

    :copyright: (c) 2012 by <NAME>.
    :copyright: (c) 2017 by CERN.
    :copyright: (c) 2017 by ETH Zurich, Swiss Data Science Center.
    :license: MIT, see LICENSE for more details.
"""

from datetime import datetime

import pkg_resources
from flask import current_app, render_template
from flask_babelex import Domain
from flask_login import UserMixin as BaseUserMixin
from flask_login import AnonymousUserMixin, LoginManager, current_user
from flask_principal import Identity, Principal, RoleNeed, UserNeed, \
    identity_loaded
from itsdangerous import URLSafeTimedSerializer
from passlib.context import CryptContext
from werkzeug.datastructures import ImmutableList
from werkzeug.local import LocalProxy

from .forms import ChangePasswordForm, ConfirmRegisterForm, \
    ForgotPasswordForm, LoginForm, PasswordlessLoginForm, RegisterForm, \
    ResetPasswordForm, SendConfirmationForm
from .utils import config_value as cv
from .utils import _, get_config, hash_data, localize_callback, string_types, \
    url_for_security, verify_hash
from .views import create_blueprint

# Convenient references
_security = LocalProxy(lambda: current_app.extensions['security'])


#: Default Flask-Security configuration
_default_config = {
    'BLUEPRINT_NAME': 'security',
    'CLI_ROLES_NAME': 'roles',
    'CLI_USERS_NAME': 'users',
    'URL_PREFIX': None,
    'SUBDOMAIN': None,
    'FLASH_MESSAGES': True,
    'I18N_DOMAIN': 'flask_security',
    'PASSWORD_HASH': '<PASSWORD>',
    'PASSWORD_SALT': None,
    'PASSWORD_SINGLE_HASH': {
        'django_argon2',
        'django_bcrypt_sha256',
        'django_pbkdf2_sha256',
        'django_pbkdf2_sha1',
        'django_bcrypt',
        'django_salted_md5',
        'django_salted_sha1',
        'django_des_crypt',
        'plaintext',
    },
    'LOGIN_URL': '/login',
    'LOGOUT_URL': '/logout',
    'REGISTER_URL': '/register',
{'fraction_non_alphanumeric': 0.10483473112974839, 'fraction_numerical': 0.013320177602368031, 'mean_word_length': 4.286831812255541, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3062393', 'n_tokens_mistral': 1327, 'n_tokens_neox': 1251, 'n_words': 319}