<commit_before>#!/usr/bin/env python
#:coding=utf-8:
#:tabSize=2:indentSize=2:noTabs=true:
#:folding=explicit:collapseFolds=1:

from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.template import RequestContext, Context, loader
from django.contrib.auth.decorators import login_required
from django.views.generic.simple import direct_to_template
from django.core.paginator import Paginator, InvalidPage, EmptyPage
from django.core.urlresolvers import reverse

from lifestream.util.decorators import allow_methods

from lifestream.models import *

@allow_methods('GET')
def main_page(request, page="1"):
  item_list = Item.objects.published()
  paginator = Paginator(item_list, request.lifestream.items_per_page) 

  # Make sure page request is an int. If not, deliver first page.
  # TODO: make a better url for this like /page/1
  try:
    page = int(page)
  except ValueError:
    page = 1<commit_msg>Removed comment<commit_after>#!/usr/bin/env python
#:coding=utf-8:
#:tabSize=2:indentSize=2:noTabs=true:
#:folding=explicit:collapseFolds=1:

from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.template import RequestContext, Context, loader
from django.contrib.auth.decorators import login_required
from django.views.generic.simple import direct_to_template
from django.core.paginator import Paginator, InvalidPage, EmptyPage
from django.core.urlresolvers import reverse

from lifestream.util.decorators import allow_methods

from lifestream.models import *

@allow_methods('GET')
def main_page(request, page="1"):
  item_list = Item.objects.published()
  paginator = Paginator(item_list, request.lifestream.items_per_page) 

  # Make sure page request is an int. If not, deliver first page.
  try:
    page = int(page)
  except ValueError:
    page = 1
{'fraction_non_alphanumeric': 0.09271523178807947, 'fraction_numerical': 0.010485651214128035, 'mean_word_length': 5.867424242424242, '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': '5961203', 'n_tokens_mistral': 573, 'n_tokens_neox': 550, 'n_words': 149}