<commit_before># TO DO: CLEANING!!!
from django.shortcuts import render_to_response, get_object_or_404, redirect
from django import forms
from django.template import RequestContext
from django.http import HttpResponseRedirect, HttpResponse
from django.core.urlresolvers import reverse
from django.views.decorators.csrf import csrf_exempt
from django.contrib.auth.decorators import login_required
from django.db.models import Q
from django.views.generic.list_detail import object_list
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger

from videoportal.models import Video, Comment
from videoportal.forms import VideoForm, CommentForm
from transloadit.client import Client

import appsettings as settings

from BitTorrent.btmakemetafile import calcsize, make_meta_file, ignore

import djangotasks

import simplejson as json
import transmissionrpc
import urllib2
import datetime
import os
import shutil
import re
from threading import Event
from traceback import print_exc
from sys import argv

def list(request):
    ''' This view is the front page of OwnTube. It just gets the first 15 available video and
    forwards them to the template. We use Django's Paginator to have pagination '''
    latest_videos_list = Video.objects.filter(encodingDone=True).order_by('-date')<commit_msg>Changed ordering in videos list so that the videos with same date are ordered by modfication date<commit_after># TO DO: CLEANING!!!
from django.shortcuts import render_to_response, get_object_or_404, redirect
from django import forms
from django.template import RequestContext
from django.http import HttpResponseRedirect, HttpResponse
from django.core.urlresolvers import reverse
from django.views.decorators.csrf import csrf_exempt
from django.contrib.auth.decorators import login_required
from django.db.models import Q
from django.views.generic.list_detail import object_list
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger

from videoportal.models import Video, Comment
from videoportal.forms import VideoForm, CommentForm
from transloadit.client import Client

import appsettings as settings

from BitTorrent.btmakemetafile import calcsize, make_meta_file, ignore

import djangotasks

import simplejson as json
import transmissionrpc
import urllib2
import datetime
import os
import shutil
import re
from threading import Event
from traceback import print_exc
from sys import argv

def list(request):
    ''' This view is the front page of OwnTube. It just gets the first 15 available video and
    forwards them to the template. We use Django's Paginator to have pagination '''
    latest_videos_list = Video.objects.filter(encodingDone=True).order_by('-date','-modified')
{'fraction_non_alphanumeric': 0.04797047970479705, 'fraction_numerical': 0.004428044280442804, 'mean_word_length': 6.023316062176166, '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': '7421218', 'n_tokens_mistral': 740, 'n_tokens_neox': 715, 'n_words': 287}