<commit_before>from django.utils.functional import wraps
from django.shortcuts import redirect, get_object_or_404
from models import User

def authors_only(view):
    def wrapper(request, user_id, *args, **kwargs):
        user = get_object_or_404(User, id=user_id)
        if user == request.user:
             return view(request, user_id, **kwargs)
        else:
            return redirect('/')
    return wraps(view)(wrapper)<commit_msg>trying to get commits to register<commit_after>from django.utils.functional import wraps
from django.shortcuts import redirect, get_object_or_404
from models import User

def authors_only(view):
    def wrapper(request, user_id, *args, **kwargs):
        user = get_object_or_404(User, id=user_id)
        if user == request.user:
             return view(request, user_id, **kwargs)
        else:
            return redirect('/')
    return wraps(view)(wrapper)


    
{'fraction_non_alphanumeric': 0.09659714599341383, 'fraction_numerical': 0.013172338090010977, 'mean_word_length': 3.322274881516588, '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': '3287268', 'n_tokens_mistral': 278, 'n_tokens_neox': 257, 'n_words': 74}