<commit_before>#!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4


from django.http import HttpResponse
from django.template import RequestContext
from django.shortcuts import render_to_response

from apps.tree.models import *


def index(req):
	allTrees = Tree.objects.all()
	if len(allTrees) != 0:
		t = allTrees[0]
	return render_to_response("tree/index.html",
	    { "trees": allTrees, "t": t },
	    context_instance=RequestContext(req))<commit_msg>fixing a bug where you got an error with no trees<commit_after>#!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4


from django.http import HttpResponse
from django.template import RequestContext
from django.shortcuts import render_to_response

from apps.tree.models import *


def index(req):
	allTrees = Tree.objects.all()
	t = Tree()
	if len(allTrees) != 0:
		t = allTrees[0]
	return render_to_response("tree/index.html",
	    { "trees": allTrees, "t": t },
	    context_instance=RequestContext(req))
{'fraction_non_alphanumeric': 0.11795407098121086, 'fraction_numerical': 0.010438413361169102, 'mean_word_length': 4.674556213017752, 'pattern_counts': {'":': 4, '<': 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': '1411269', 'n_tokens_mistral': 344, 'n_tokens_neox': 325, 'n_words': 89}