<commit_before>from django.contrib.auth.decorators import login_required
from django.http.response import HttpResponseForbidden
from django.template.loader import render_to_string
from django.template.context import RequestContext


class Auth(object):

    def __init__(self, permissions_validators):
        self.permissions_validators = permissions_validators

    def is_authenticated(self, request):
        rm = request.method.upper()

        if not request.user or not request.user.is_active:
            return False

        if not self.permissions_validators.has_key(rm):
            return False

        validators = self.permissions_validators.get(rm)

        if not isinstance(validators, (list, tuple)):
            validators = [validators]

        for validator in validators:
            if validator(request.user, request.account_pk, request.obj_pk):
                return True
        return False


class AuthWrapper(Auth):

    def __init__(self, permissions_validators):<commit_msg>Removed account from auth wrapper<commit_after>from django.contrib.auth.decorators import login_required
from django.http.response import HttpResponseForbidden
from django.template.loader import render_to_string
from django.template.context import RequestContext


class Auth(object):

    def __init__(self, permissions_validators):
        self.permissions_validators = permissions_validators

    def is_authenticated(self, request):
        rm = request.method.upper()

        if not request.user or not request.user.is_active:
            return False

        if not self.permissions_validators.has_key(rm):
            return False

        validators = self.permissions_validators.get(rm)

        if not isinstance(validators, (list, tuple)):
            validators = [validators]

        for validator in validators:
            if validator(request.user, request.obj_pk):
                return True
        return False


class AuthWrapper(Auth):

    def __init__(self, permissions_validators):
{'fraction_non_alphanumeric': 0.06838453914767097, 'fraction_numerical': 0.0, 'mean_word_length': 3.1120162932790225, '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': '3066699', 'n_tokens_mistral': 534, 'n_tokens_neox': 511, 'n_words': 136}