<commit_before>from django.shortcuts import render_to_response
from search.models import *
import query

def index(request):
    q = request.GET.get('q') # the query terms
    s = request.GET.get('s') # sort type: a - authority, h - hubbiness
    b = request.GET.get('b') # beta: weigting between word frequency and authority/hubbiness

    try:
        b = float(b)
        if b > 1.0 or b < 0.0: b = 0.7
    except Exception:
        b = .7

    print b
    print float(b)

    if q:
        results = query.get_results(q, "authority" if s == "a" else "hubbiness", b)
        return render_to_response('search/results.html', { 'q': q, 's': s, 'b': b, 'results': results })
    else:
        return render_to_response('search/index.html', { })<commit_msg>removed unnecessary print statements in views.py<commit_after>from django.shortcuts import render_to_response
from search.models import *
import query

def index(request):
    q = request.GET.get('q') # the query terms
    s = request.GET.get('s') # sort type: a - authority, h - hubbiness
    b = request.GET.get('b') # beta: weigting between word frequency and authority/hubbiness

    try:
        b = float(b)
        if b > 1.0 or b < 0.0: b = 0.7
    except Exception:
        b = .7

    if q:
        results = query.get_results(q, "authority" if s == "a" else "hubbiness", b)
        return render_to_response('search/results.html', { 'q': q, 's': s, 'b': b, 'results': results })
    else:
        return render_to_response('search/index.html', { })
{'fraction_non_alphanumeric': 0.13663366336633664, 'fraction_numerical': 0.009240924092409241, 'mean_word_length': 2.79, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5363294', 'n_tokens_mistral': 510, 'n_tokens_neox': 497, 'n_words': 153}