<commit_before>import os
import time
import shutil
import codecs
import urllib
import datetime
import cPickle as pickle
import traceback

from django import http
from django.conf import settings
from django.template.response import TemplateResponse
import django.utils.simplejson as json
from django.contrib.auth.decorators import login_required
import django.contrib.auth.views as auth_views
from django.template.loader import render_to_string
from django.core.files.uploadedfile import SimpleUploadedFile
from django.views.static import serve
from django.shortcuts import get_object_or_404
from django.views.decorators.csrf import csrf_exempt

import ide.utils
import ide.settings
import ide.models
import ide.forms
import ide.tasks
from ide.templatetags.ntags import hashstr

import pusher

GOOD_CSTATES = ("SUCCESS", "STARTED", "RECEIVED")

def login (request):
  return auth_views.login(request)
  
@login_required
def home (request):
  try:
    base_dir = request.user.preferences.basedir
    <commit_msg>fixes #41<commit_after>import os
import time
import shutil
import codecs
import urllib
import datetime
import cPickle as pickle
import traceback

from django import http
from django.conf import settings
from django.template.response import TemplateResponse
import django.utils.simplejson as json
from django.contrib.auth.decorators import login_required
import django.contrib.auth.views as auth_views
from django.template.loader import render_to_string
from django.core.files.uploadedfile import SimpleUploadedFile
from django.views.static import serve
from django.shortcuts import get_object_or_404
from django.views.decorators.csrf import csrf_exempt

import ide.utils
import ide.settings
import ide.models
import ide.forms
import ide.tasks
from ide.templatetags.ntags import hashstr

GOOD_CSTATES = ("SUCCESS", "STARTED", "RECEIVED")

def login (request):
  return auth_views.login(request)
  
@login_required
def home (request):
  try:
    base_dir = request.user.preferences.basedir
    
{'fraction_non_alphanumeric': 0.05841238142785821, 'fraction_numerical': 0.00399400898652022, 'mean_word_length': 5.747474747474747, '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': '5407821', 'n_tokens_mistral': 588, 'n_tokens_neox': 580, 'n_words': 187}