<commit_before># -*- coding: utf-8 -*-

'''
from flask import Flask
from flask.ext.musers import MUsers

app = Flask(__name__)
MUsers(app)
.
.
.
'''


from flask.ext.login import LoginManager
from .models import User


__version__ = '0.2.0'


class MUsers(object):
    def __init__(self, app=None):
        self.login_manager = LoginManager()
        self.login_manager.user_loader(self.load_user)

        if app is not None:
            self.init_app(app)

    def init_app(self, app):
        self.login_manager.init_app(app)

        app.extensions = getattr(app, 'extensions', {})
        app.extensions['musers'] = self
        self.app = app

    def load_user(self, userid):
        return User.get_active_user_by_pk_or_none(userid)<commit_msg>New version 0.2.1<commit_after># -*- coding: utf-8 -*-

'''
from flask import Flask
from flask.ext.musers import MUsers

app = Flask(__name__)
MUsers(app)
.
.
.
'''


from flask.ext.login import LoginManager
from .models import User


__version__ = '0.2.1'


class MUsers(object):
    def __init__(self, app=None):
        self.login_manager = LoginManager()
        self.login_manager.user_loader(self.load_user)

        if app is not None:
            self.init_app(app)

    def init_app(self, app):
        self.login_manager.init_app(app)

        app.extensions = getattr(app, 'extensions', {})
        app.extensions['musers'] = self
        self.app = app

    def load_user(self, userid):
        return User.get_active_user_by_pk_or_none(userid)
{'fraction_non_alphanumeric': 0.1206896551724138, 'fraction_numerical': 0.007294429708222812, 'mean_word_length': 2.8593350383631715, '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': '2938903', 'n_tokens_mistral': 524, 'n_tokens_neox': 503, 'n_words': 109}