<commit_before># -*- coding: utf-8  -*-
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.core.exceptions import PermissionDenied, ObjectDoesNotExist
from django.core.urlresolvers import reverse
from django.db.models import Count
from django.http import HttpResponseRedirect, Http404
from django.shortcuts import render, get_object_or_404
from django.views.decorators import csrf
from django.utils import timezone
from post_office import mail


from accounts.utils import get_user_gender
from core.models import StudentClubYear
from core import decorators
from bulb.models import Category, Book, Request, Point, Group, Membership, Session, Report, ReaderProfile
from bulb.forms import BookForm, GroupForm, SessionForm, ReportForm, ReaderProfileForm
from bulb import utils


@login_required
def index(request):
    groups = Group.objects.current_year().undeleted().order_by("?")[:6]
    group_count = Group.objects.current_year().undeleted().count()
    group_user_count = (User.objects.filter(reading_group_memberships__isnull=False) | \
                        User.objects.filter(reading_group_coordination__isnull=False)).distinct().count()<commit_msg>Unneede calls.<commit_after># -*- coding: utf-8  -*-
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.core.exceptions import PermissionDenied, ObjectDoesNotExist
from django.core.urlresolvers import reverse
from django.db.models import Count
from django.shortcuts import render, get_object_or_404
from django.views.decorators import csrf
from django.utils import timezone
from post_office import mail


from accounts.utils import get_user_gender
from core.models import StudentClubYear
from core import decorators
from bulb.models import Category, Book, Request, Point, Group, Membership, Session, Report, ReaderProfile
from bulb.forms import BookForm, GroupForm, SessionForm, ReportForm, ReaderProfileForm
from bulb import utils


@login_required
def index(request):
    groups = Group.objects.current_year().undeleted().order_by("?")[:6]
    group_count = Group.objects.current_year().undeleted().count()
    group_user_count = (User.objects.filter(reading_group_memberships__isnull=False) | \
                        User.objects.filter(reading_group_coordination__isnull=False)).distinct().count()
{'fraction_non_alphanumeric': 0.08427672955974842, 'fraction_numerical': 0.005450733752620545, 'mean_word_length': 5.6834733893557425, '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': '4687076', 'n_tokens_mistral': 672, 'n_tokens_neox': 641, 'n_words': 179}