text
stringlengths
0
1.05M
meta
dict
from django.shortcuts import render_to_response from django.shortcuts import get_object_or_404 from blog.models import Posts, Categories from django.contrib.sites.models import Site from django.template import RequestContext from tagging.models import Tag, TaggedItem from sources.models import Sources from sources.mode...
{ "repo_name": "halitalptekin/PyTr", "path": "src/blog/views.py", "copies": "1", "size": "2452", "license": "bsd-3-clause", "hash": 666677452321750100, "line_mean": 45.2641509434, "line_max": 104, "alpha_frac": 0.691680261, "autogenerated": false, "ratio": 3.584795321637427, "config_test": false...
from django.shortcuts import render_to_response from django.shortcuts import get_object_or_404 from django.shortcuts import redirect from django.template import RequestContext from django.http import HttpResponse from django.http import HttpResponseRedirect from django.http import Http404 from distutils.version import...
{ "repo_name": "craigotis/Squash", "path": "squash/views.py", "copies": "1", "size": "21049", "license": "mit", "hash": 2833378337854153700, "line_mean": 32.7865168539, "line_max": 137, "alpha_frac": 0.6827877809, "autogenerated": false, "ratio": 3.841058394160584, "config_test": false, "has_n...
from django.shortcuts import render_to_response from django.shortcuts import get_object_or_404 from django.template import RequestContext from django.contrib.auth.decorators import login_required from django.views.generic import TemplateView from django.http import Http404 from django_tables2 import RequestConfig from ...
{ "repo_name": "afein/django-spyglass", "path": "example/core/views.py", "copies": "1", "size": "2421", "license": "bsd-3-clause", "hash": 5590359240704124000, "line_mean": 35.6818181818, "line_max": 91, "alpha_frac": 0.7112763321, "autogenerated": false, "ratio": 4.001652892561983, "config_test...
from django.shortcuts import render_to_response from django.shortcuts import get_object_or_404, render from django.http import HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse from datetime import date from django.template import loader, Context, RequestContext import time from sagip_main...
{ "repo_name": "pageman/sagip", "path": "sagip/views.py", "copies": "1", "size": "7823", "license": "mit", "hash": 3854622969781798000, "line_mean": 34.7214611872, "line_max": 106, "alpha_frac": 0.6712258724, "autogenerated": false, "ratio": 2.9621355547141235, "config_test": false, "has_no_ke...
from django.shortcuts import render_to_response from django.shortcuts import render from django.http import HttpResponseRedirect from django.contrib import auth from django.core.urlresolvers import reverse, resolve from django import forms from django.contrib.auth.models import User from django.contrib.auth.views impor...
{ "repo_name": "paulormart/the7blogger_project", "path": "the7blogger/the7blogger/views.py", "copies": "1", "size": "2253", "license": "apache-2.0", "hash": -617561241401244400, "line_mean": 29.8767123288, "line_max": 69, "alpha_frac": 0.6622281403, "autogenerated": false, "ratio": 4.3243761996161...
from django.shortcuts import render_to_response from django.shortcuts import RequestContext from django.shortcuts import render from django.contrib.auth import login from django.http import HttpResponse from django.contrib.auth.forms import AuthenticationForm from registration.forms import * from registration.views imp...
{ "repo_name": "Glideh/django-ajax-login", "path": "views.py", "copies": "1", "size": "1245", "license": "mit", "hash": 7858374958955359000, "line_mean": 34.5714285714, "line_max": 86, "alpha_frac": 0.6963855422, "autogenerated": false, "ratio": 4.353146853146853, "config_test": false, "has_no...
from django.shortcuts import render_to_response from django.template.context import RequestContext, Context from django.core.mail import send_mail from django.template.loader import render_to_string from models import * # Create your views here. def index(request): args = {} if request.method == 'POST': ...
{ "repo_name": "PDXCodeCoop/contact_form", "path": "views.py", "copies": "1", "size": "2045", "license": "apache-2.0", "hash": -5401962068560738000, "line_mean": 33.0833333333, "line_max": 90, "alpha_frac": 0.5511002445, "autogenerated": false, "ratio": 4.190573770491803, "config_test": false, ...
from django.shortcuts import render_to_response from django.template.context import RequestContext from bccf.models import Event from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage def parents_page(request, slug=None): if slug is not None and request.is_ajax(): """ We will gen...
{ "repo_name": "orlenko/bccf", "path": "src/bccf/views/parents.py", "copies": "1", "size": "2208", "license": "unlicense", "hash": 731771342627068900, "line_mean": 34.6129032258, "line_max": 92, "alpha_frac": 0.611865942, "autogenerated": false, "ratio": 3.887323943661972, "config_test": false, ...
from django.shortcuts import render_to_response from django.template.context import RequestContext from BRWRY_bootstrap.forms import BRWRYForm, BRWRYTest, HardwareForm, InstructionForm from BRWRY_bootstrap.models import Hardware, Instruction from BRWRY_django.BRWRY_bootstrap.forms import BRWRYModelForm, BRWRYInlineForm...
{ "repo_name": "oehokie/BRWRY-old", "path": "BRWRY_django/BRWRY_bootstrap/views.py", "copies": "1", "size": "3796", "license": "mit", "hash": 4008854290110747000, "line_mean": 29.6209677419, "line_max": 111, "alpha_frac": 0.6101159115, "autogenerated": false, "ratio": 3.7034146341463416, "config...
from django.shortcuts import render_to_response from django.template.context import RequestContext from django.conf import settings from .datasources import limerick, pirozhok from .models import FacebookStatus, Subreddit from django.contrib.auth.decorators import login_required from django.http.response import HttpRes...
{ "repo_name": "orlenko/FBBot", "path": "src/FBBot/fbposter/views.py", "copies": "1", "size": "3656", "license": "apache-2.0", "hash": 2251735483595905300, "line_mean": 38.311827957, "line_max": 115, "alpha_frac": 0.6958424508, "autogenerated": false, "ratio": 3.7729618163054695, "config_test": ...
from django.shortcuts import render_to_response from django.template.context import RequestContext from django.db.models import Q from django.contrib.auth.models import User from django.utils import simplejson from django.http import HttpResponse from avatar.templatetags import avatar_tags from itertools import chain f...
{ "repo_name": "s1na/darkoob", "path": "darkoob/search/views.py", "copies": "1", "size": "4193", "license": "mit", "hash": -863645534076749000, "line_mean": 41.3535353535, "line_max": 148, "alpha_frac": 0.6064870021, "autogenerated": false, "ratio": 3.993333333333333, "config_test": false, "ha...
from django.shortcuts import render_to_response from django.template.context import RequestContext from django.http import Http404, HttpResponseRedirect from django.conf import settings from docutils.core import publish_parts from docutils.core import publish_cmdline from docutils import nodes from docutils.parsers.rst...
{ "repo_name": "Justasic/StackSmash", "path": "StackSmash/apps/docs/views.py", "copies": "1", "size": "3477", "license": "bsd-2-clause", "hash": -3098101336991739000, "line_mean": 32.7572815534, "line_max": 80, "alpha_frac": 0.6442335347, "autogenerated": false, "ratio": 4.100235849056604, "conf...
from django.shortcuts import render_to_response from django.template.context import RequestContext from django.http import HttpResponse from django.utils.encoding import smart_unicode import csv from cStringIO import StringIO from xml.etree import ElementTree as ET class OutputFormat(object): verbose_name="Abstrac...
{ "repo_name": "nikolajbaer/django-reportengine", "path": "reportengine/outputformats.py", "copies": "1", "size": "3745", "license": "bsd-3-clause", "hash": -7293655595993589000, "line_mean": 37.6082474227, "line_max": 99, "alpha_frac": 0.6496662216, "autogenerated": false, "ratio": 4.101861993428...
from django.shortcuts import render_to_response from django.template.context import RequestContext from django.http.response import HttpResponseNotAllowed class HttpMethodRestrictMixin(object): allowed_methods = [ 'options', 'get', 'head', 'post', 'put', 'delete', 'trace', 'connect', ] de...
{ "repo_name": "Alkemic/yaCBV", "path": "yacbv/mixins.py", "copies": "1", "size": "1041", "license": "mit", "hash": -3343326777970065400, "line_mean": 31.53125, "line_max": 79, "alpha_frac": 0.6647454371, "autogenerated": false, "ratio": 4.283950617283951, "config_test": false, "has_no_keyword...
from django.shortcuts import render_to_response from django.template.context import RequestContext from django.views.decorators.csrf import csrf_protect import time from BrickPi import * BrickPiSetup() # Create your views here. @csrf_protect def system(request): if request.method == 'POST': for n in range(int(req...
{ "repo_name": "asaenzestrada/tacobot", "path": "tacobot_pysa/pysa/views.py", "copies": "1", "size": "2143", "license": "mit", "hash": -8966686923751664000, "line_mean": 19.2264150943, "line_max": 91, "alpha_frac": 0.7153523098, "autogenerated": false, "ratio": 2.629447852760736, "config_test": ...
from django.shortcuts import render_to_response #from django.template.context import RequestContext import random import datetime import time def home(request): """ home page """ return render_to_response('home.html') def demo_piechart(request): """ pieChart page """ color_list = ['...
{ "repo_name": "areski/django-nvd3", "path": "nvd3_tests/testproject/views.py", "copies": "3", "size": "6340", "license": "mit", "hash": -2642829358290717700, "line_mean": 28.3564814815, "line_max": 125, "alpha_frac": 0.5976340694, "autogenerated": false, "ratio": 3.0717054263565893, "config_tes...
from django.shortcuts import render_to_response from django.template import Context from django.template.loader import get_template from apache_log_parser_regex import dictify_logline import os import operator # log_dir = '/var/log/apache2' # with Linux log_dir = 'C:/cygwin/var/log/apache2' #with Window def get_lo...
{ "repo_name": "prasadrahul/pySystem", "path": "logview/views.py", "copies": "1", "size": "1122", "license": "mit", "hash": -532305663083063740, "line_mean": 31.0571428571, "line_max": 99, "alpha_frac": 0.6577540107, "autogenerated": false, "ratio": 3.389728096676737, "config_test": false, "ha...
from django.shortcuts import render_to_response from django.template import loader,Context from django.http import HttpResponse from datetime import datetime import student as stdent import game import django.utils.simplejson as json def question(request,op): q = dict() q['first'] = '3' q['second'] = '4' q['questi...
{ "repo_name": "bernardokyotoku/skillplant", "path": "game/views.py", "copies": "1", "size": "1053", "license": "bsd-3-clause", "hash": -1913825838579544600, "line_mean": 29.9705882353, "line_max": 77, "alpha_frac": 0.7521367521, "autogenerated": false, "ratio": 3.364217252396166, "config_test":...
from django.shortcuts import render_to_response from django.template import loader,Context, RequestContext from django.db.models import Q import md5 from models import Flow, App, Behavior, OS, Protocol from forms import QueryForm def queryHome(request): if request.method == "POST": # display query.query.h...
{ "repo_name": "multiple1902/repartee", "path": "repartee/query.py", "copies": "1", "size": "1474", "license": "mit", "hash": 6228134183974451000, "line_mean": 32.5, "line_max": 81, "alpha_frac": 0.6424694708, "autogenerated": false, "ratio": 4.071823204419889, "config_test": false, "has_no_ke...
from django.shortcuts import render_to_response from django.template import loader from django.template import Context, RequestContext from django.http import HttpResponse, HttpResponseRedirect from models import BlogPost, Client_Twitter from django.conf import settings import cgi def index(request): return render...
{ "repo_name": "gennad/www_gennad_org", "path": "gennadapp/views.py", "copies": "1", "size": "4629", "license": "bsd-3-clause", "hash": -5704982245651153000, "line_mean": 32.0642857143, "line_max": 119, "alpha_frac": 0.6919421041, "autogenerated": false, "ratio": 3.831953642384106, "config_test"...
from django.shortcuts import render_to_response from django.template import loader, RequestContext from django.http import HttpResponse, HttpResponsePermanentRedirect, HttpResponseGone def direct_to_template(request, template, extra_context={}, mimetype=None, **kwargs): """ Render a given template with any ext...
{ "repo_name": "jonaustin/advisoryscan", "path": "django/django/views/generic/simple.py", "copies": "1", "size": "1392", "license": "mit", "hash": -3757485139977447400, "line_mean": 36.6216216216, "line_max": 104, "alpha_frac": 0.6530172414, "autogenerated": false, "ratio": 4.192771084337349, "c...
from django.shortcuts import render_to_response from django.template import RequestContext as Context from django.http import HttpResponseRedirect from django.contrib.admin.views.decorators import staff_member_required from django.views.decorators.cache import never_cache from django.utils.translation import ugettext a...
{ "repo_name": "caiges/populous", "path": "populous/filebrowser/views.py", "copies": "1", "size": "20100", "license": "bsd-3-clause", "hash": 7704521705286676000, "line_mean": 43.966442953, "line_max": 309, "alpha_frac": 0.5833333333, "autogenerated": false, "ratio": 3.7917374080362194, "config_...
from django.shortcuts import render_to_response from django.template import RequestContext, Context from django.http import HttpResponseForbidden, HttpResponseNotFound, \ HttpResponseServerError def render_response_index(request, *args, **kwargs): is_authenticated = request.user.is_authenticated() if is...
{ "repo_name": "grischa/mytardis-mrtardis", "path": "tardis/tardis_portal/shortcuts.py", "copies": "1", "size": "1603", "license": "bsd-3-clause", "hash": 495331552841103300, "line_mean": 34.6222222222, "line_max": 71, "alpha_frac": 0.6593886463, "autogenerated": false, "ratio": 4.286096256684492,...
from django.shortcuts import render_to_response from django.template import RequestContext, loader, Context from django.core.urlresolvers import reverse from django.contrib.auth.decorators import login_required from django.http import HttpResponseRedirect, HttpResponse from django.contrib.sites.models import Site from ...
{ "repo_name": "JoeJasinski/WindyTransit", "path": "mobiletrans/mtlocation/views.py", "copies": "1", "size": "1715", "license": "mit", "hash": 9115547371431990000, "line_mean": 34.7291666667, "line_max": 134, "alpha_frac": 0.6927113703, "autogenerated": false, "ratio": 4.093078758949881, "config...
from django.shortcuts import render_to_response from django.template import RequestContext, loader from django.http import HttpResponse, HttpResponseRedirect, HttpResponseForbidden from django.contrib.auth.decorators import permission_required from django.contrib.auth.views import login from forms import SchoolForm, Ro...
{ "repo_name": "Benjamin-Marks/mit-tab", "path": "mittab/apps/tab/views.py", "copies": "2", "size": "15599", "license": "mit", "hash": 1209598661266312400, "line_mean": 47.2941176471, "line_max": 126, "alpha_frac": 0.5004166934, "autogenerated": false, "ratio": 4.422738871562234, "config_test": ...
from django.shortcuts import render_to_response from django.template import RequestContext, loader from django.shortcuts import get_object_or_404, render from django.contrib.auth import login,logout,authenticate from django.views.generic import TemplateView,FormView from django.http import HttpResponseRedirect, HttpRes...
{ "repo_name": "emmanuel-santos/GEM", "path": "old/truco/views.py", "copies": "1", "size": "2911", "license": "mit", "hash": 8365835613789314000, "line_mean": 34.0722891566, "line_max": 114, "alpha_frac": 0.6994160082, "autogenerated": false, "ratio": 3.3848837209302327, "config_test": false, ...
from django.shortcuts import render_to_response from django.template import RequestContext, loader from posts.models import Post, Comment from django.http import Http404, HttpResponse, HttpResponseRedirect from forms import CommentForm from helpers import get_post_url, post_as_components from blog.settings import BLOG_...
{ "repo_name": "Lukasa/minimalog", "path": "posts/views.py", "copies": "1", "size": "4799", "license": "mit", "hash": -1447321171946001000, "line_mean": 34.0291970803, "line_max": 78, "alpha_frac": 0.6134611377, "autogenerated": false, "ratio": 4.084255319148936, "config_test": false, "has_no_...
from django.shortcuts import render_to_response from django.template import RequestContext from apps.members.models import Member def show_all_current_members(request): members = Member.objects.filter(is_renegade=False).order_by('function', 'started_nsi_date') return render_to_response( 'show_all_curr...
{ "repo_name": "nsi-iff/nsi_site", "path": "apps/members/views.py", "copies": "1", "size": "1044", "license": "mit", "hash": -1596348680353632800, "line_mean": 33.8, "line_max": 95, "alpha_frac": 0.6963601533, "autogenerated": false, "ratio": 3.702127659574468, "config_test": false, "has_no_ke...
from django.shortcuts import render_to_response from django.template import RequestContext from beardygeek.blog.models import Tag, Post, Category from django.contrib.auth.models import User from django.contrib.comments.models import Comment from django.contrib.contenttypes.models import ContentType from django.contrib....
{ "repo_name": "beardygeek/beardygeek-website", "path": "blog/views.py", "copies": "1", "size": "3771", "license": "bsd-3-clause", "hash": 9079483770629016000, "line_mean": 41.8522727273, "line_max": 140, "alpha_frac": 0.5433571997, "autogenerated": false, "ratio": 3.9158878504672896, "config_te...
from django.shortcuts import render_to_response from django.template import RequestContext from BeautifulSoup import BeautifulSoup from datetime import datetime import feedparser import urllib2 def news_list(request): news_dictionaries = construct_rss_dictionary() return render_to_response('news/news_list.htm...
{ "repo_name": "mingot/datacademy_django", "path": "datacademy/news/views.py", "copies": "1", "size": "1739", "license": "mit", "hash": 3778857819076875300, "line_mean": 31.8113207547, "line_max": 96, "alpha_frac": 0.5899942496, "autogenerated": false, "ratio": 4.3475, "config_test": false, "h...
from django.shortcuts import render_to_response from django.template import RequestContext from beer.models import Beer, Brewery from drinker.forms import LoginForm def home(request): return render_to_response('index.html') def BeersAll(request): beers = Beer.objects.all().order_by('name')[:5] beers_cou...
{ "repo_name": "OckiFals/crud-django", "path": "beer/views.py", "copies": "1", "size": "1848", "license": "mit", "hash": 8933755546433922000, "line_mean": 25.4, "line_max": 107, "alpha_frac": 0.6525974026, "autogenerated": false, "ratio": 3.460674157303371, "config_test": false, "has_no_keywor...
from django.shortcuts import render_to_response from django.template import RequestContext from datatableview.utils import * # Initialize datatable element def toffee_get_datatable_structure(ajax_url, options, model=None): """ Uses ``options``, a dict or DatatableOptions, into a ``DatatableStructure`` for temp...
{ "repo_name": "bingorabbit/django-toffee", "path": "toffee/utils.py", "copies": "1", "size": "2346", "license": "bsd-3-clause", "hash": -6355177959670256000, "line_mean": 31.5833333333, "line_max": 109, "alpha_frac": 0.5937766411, "autogenerated": false, "ratio": 3.5384615384615383, "config_tes...
from django.shortcuts import render_to_response from django.template import RequestContext from django.conf import settings from django import http from django.core.urlresolvers import reverse from django.views.decorators.http import require_http_methods from django.contrib import messages from classphoto import model...
{ "repo_name": "p2pu/mechanical-mooc", "path": "classphoto/views.py", "copies": "1", "size": "5584", "license": "mit", "hash": -7174568221273641000, "line_mean": 34.3417721519, "line_max": 127, "alpha_frac": 0.6493553009, "autogenerated": false, "ratio": 3.78319783197832, "config_test": false, ...
from django.shortcuts import render_to_response from django.template import RequestContext from django.conf import settings def render_template_with_alternates(template, context, context_instance = None, request = None): if not request == No...
{ "repo_name": "havencruise/emberjam", "path": "project/apps/core/utils/renderutils.py", "copies": "1", "size": "4650", "license": "mit", "hash": -2667078398470151000, "line_mean": 33.962406015, "line_max": 120, "alpha_frac": 0.6522580645, "autogenerated": false, "ratio": 4.492753623188406, "con...
from django.shortcuts import render_to_response from django.template import RequestContext from django.contrib.admin.views.decorators import staff_member_required from django.http import HttpResponseRedirect from fruitynutters.catalogue.models import Aisle, Item, Page from fruitynutters.util import get_session_cart ...
{ "repo_name": "brew/fruitynutters", "path": "webapps/fruitynutters/catalogue/views.py", "copies": "1", "size": "2484", "license": "mit", "hash": -2605834661785110500, "line_mean": 33.5, "line_max": 78, "alpha_frac": 0.6099033816, "autogenerated": false, "ratio": 3.9617224880382773, "config_test...
from django.shortcuts import render_to_response from django.template import RequestContext from django.contrib.auth.decorators import login_required from django.http import Http404 from django.db import models from inspect_model.utils import InspectModel from django.conf import settings @login_required def browse(req...
{ "repo_name": "20tab/twentytab-inspectmodel", "path": "inspectmodel/views.py", "copies": "1", "size": "1552", "license": "mit", "hash": 3603170650507551000, "line_mean": 35.0930232558, "line_max": 86, "alpha_frac": 0.5702319588, "autogenerated": false, "ratio": 3.9794871794871796, "config_test"...
from django.shortcuts import render_to_response from django.template import RequestContext from django.contrib.auth.decorators import login_required from django.views.decorators.http import require_POST from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from django.contrib.auth.vi...
{ "repo_name": "agiliq/join.agiliq.com", "path": "user_profile/views.py", "copies": "1", "size": "1652", "license": "bsd-3-clause", "hash": -5292521727224789000, "line_mean": 39.2926829268, "line_max": 75, "alpha_frac": 0.6846246973, "autogenerated": false, "ratio": 4.72, "config_test": false, ...
from django.shortcuts import render_to_response from django.template import RequestContext from django.contrib.auth.decorators import login_required from models import Channel, Measurement def index(request): c = {} c['channels']= Channel.objects.all() return render_to_response("index.html", c, context_ins...
{ "repo_name": "nesl/LabSense", "path": "deprecated/LabSenseServer/LabSenseServer/LabSenseApp/views.py", "copies": "1", "size": "1272", "license": "bsd-3-clause", "hash": -5256739371439565000, "line_mean": 41.4, "line_max": 88, "alpha_frac": 0.7232704403, "autogenerated": false, "ratio": 3.8662613...
from django.shortcuts import render_to_response from django.template import RequestContext from django.contrib.auth.decorators import login_required from accounts.forms import UserProfileForm from accounts.models import UserProfile @login_required def change_user_profile(request): """ View for display and pr...
{ "repo_name": "westphahl/verleihsystem", "path": "verleihsystem/accounts/views.py", "copies": "1", "size": "1072", "license": "isc", "hash": 8775551729069779000, "line_mean": 30.5294117647, "line_max": 68, "alpha_frac": 0.6632462687, "autogenerated": false, "ratio": 4.485355648535565, "config_t...
from django.shortcuts import render_to_response from django.template import RequestContext from django.contrib.auth.models import User from django.contrib.auth import authenticate def index(request): return render_to_response('index.html') def login(request): if request.method == 'POST': name = reques...
{ "repo_name": "lncwwn/fragment-hub", "path": "fragment_hub/views.py", "copies": "1", "size": "1033", "license": "mit", "hash": 3882511932312521700, "line_mean": 32.3548387097, "line_max": 74, "alpha_frac": 0.6853823814, "autogenerated": false, "ratio": 4.132, "config_test": false, "has_no_key...
from django.shortcuts import render_to_response from django.template import RequestContext from django.contrib.contenttypes.models import ContentType from debugged.attachments.models import Link from debugged.discography.models import Release from debugged.calendar.models import Event from debugged.bandsite.forms impo...
{ "repo_name": "bhrutledge/debugged-django", "path": "debugged/bandsite/views.py", "copies": "1", "size": "1670", "license": "mit", "hash": -2498625137449064400, "line_mean": 36.1111111111, "line_max": 93, "alpha_frac": 0.6449101796, "autogenerated": false, "ratio": 4.073170731707317, "config_te...
from django.shortcuts import render_to_response from django.template import RequestContext from django.contrib import auth from django.http import HttpResponseRedirect #from .forms import RegisterForm from django.contrib.auth.models import User # Create your views here. TEMPLATE_PATH_RESGISTER="account/register.htm...
{ "repo_name": "buaawp/pums", "path": "account/views.py", "copies": "1", "size": "2731", "license": "mit", "hash": 7963294644050724000, "line_mean": 39.1764705882, "line_max": 141, "alpha_frac": 0.6612962285, "autogenerated": false, "ratio": 4.227554179566564, "config_test": false, "has_no_key...
from django.shortcuts import render_to_response from django.template import RequestContext from django.contrib import messages as Msg from django.http import HttpResponseRedirect from django.contrib.auth.decorators import login_required from django.shortcuts import get_object_or_404 from django.contrib.auth.models impo...
{ "repo_name": "un33k/django-emailmgr", "path": "emailmgr/views.py", "copies": "2", "size": "6307", "license": "bsd-3-clause", "hash": -3438523480358950400, "line_mean": 39.4294871795, "line_max": 100, "alpha_frac": 0.6469002695, "autogenerated": false, "ratio": 4.3951219512195125, "config_test"...
from django.shortcuts import render_to_response from django.template import RequestContext from django.contrib import messages from django.core.urlresolvers import reverse from django.core.cache import cache from django.contrib.contenttypes.models import ContentType from django.contrib.auth import logout from django.co...
{ "repo_name": "Maplecroft/django-mailchimp", "path": "mailchimp/utils.py", "copies": "1", "size": "14585", "license": "bsd-3-clause", "hash": -2052848477534270500, "line_mean": 32.2232346241, "line_max": 103, "alpha_frac": 0.5755227974, "autogenerated": false, "ratio": 4.205594002306805, "confi...
from django.shortcuts import render_to_response from django.template import RequestContext from django.contrib import messages from django.core.urlresolvers import reverse from django.core.cache import cache from django.contrib.contenttypes.models import ContentType from django.contrib.auth import logout from django.c...
{ "repo_name": "extertioner/django-mailchimp", "path": "mailchimp/utils.py", "copies": "1", "size": "15040", "license": "bsd-3-clause", "hash": -5890669530163969000, "line_mean": 32.9503386005, "line_max": 103, "alpha_frac": 0.5626994681, "autogenerated": false, "ratio": 4.310690742333047, "conf...
from django.shortcuts import render_to_response from django.template import RequestContext from django.contrib.sites.models import Site from django.core.urlresolvers import reverse from django.views.decorators.clickjacking import xframe_options_exempt from django.views.decorators.cache import cache_page from django.uti...
{ "repo_name": "9dev/django-embed9", "path": "embed9/views.py", "copies": "1", "size": "2295", "license": "mit", "hash": 7779270745605735000, "line_mean": 32.75, "line_max": 134, "alpha_frac": 0.6557734205, "autogenerated": false, "ratio": 3.672, "config_test": false, "has_no_keywords": false,...
from django.shortcuts import render_to_response from django.template import RequestContext from django.core.cache import cache from sam.models import Website def hub(request): hub = cache.get("hub") if not hub: sites = Website.objects.filter(private=False) personals = [] maintains = []...
{ "repo_name": "samolds/samster", "path": "sam/views/hub.py", "copies": "1", "size": "1242", "license": "mit", "hash": 6973160049319399000, "line_mean": 29.2926829268, "line_max": 53, "alpha_frac": 0.5797101449, "autogenerated": false, "ratio": 3.869158878504673, "config_test": false, "has_no_...
from django.shortcuts import render_to_response from django.template import RequestContext from django.core.exceptions import ObjectDoesNotExist # from django.http import HttpResponse, HttpResponseRedirect from django.contrib.auth.decorators import login_required # from django.views.generic.edit import CreateView, Upd...
{ "repo_name": "amanahuja/workout-wars", "path": "workout/views.py", "copies": "1", "size": "9561", "license": "mit", "hash": 2798659098239631400, "line_mean": 27.4553571429, "line_max": 74, "alpha_frac": 0.5959627654, "autogenerated": false, "ratio": 3.904042466312781, "config_test": false, "...
from django.shortcuts import render_to_response from django.template import RequestContext from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponse, HttpResponseRedirect from session_csrf import anonymous_csrf from django.core.paginator import Paginator from ..models import Offender, ...
{ "repo_name": "mozilla/BanHammer", "path": "BanHammer/blacklist/views/offender.py", "copies": "1", "size": "4164", "license": "bsd-3-clause", "hash": 1907094730980009200, "line_mean": 33.131147541, "line_max": 97, "alpha_frac": 0.6455331412, "autogenerated": false, "ratio": 3.7112299465240643, ...
from django.shortcuts import render_to_response from django.template import RequestContext from django.core.exceptions import ObjectDoesNotExist from django.views.decorators.cache import never_cache from django.http import HttpResponse, HttpResponseRedirect from session_csrf import anonymous_csrf from ..models import ...
{ "repo_name": "mozilla/BanHammer", "path": "BanHammer/blacklist/views/zlb.py", "copies": "1", "size": "9627", "license": "bsd-3-clause", "hash": 5904613658165299000, "line_mean": 31.9691780822, "line_max": 104, "alpha_frac": 0.6070426924, "autogenerated": false, "ratio": 3.4829956584659914, "co...
from django.shortcuts import render_to_response from django.template import RequestContext from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponse, HttpResponseRedirect from session_csrf import anonymous_csrf from ..models import Config from ..forms import SettingsForm @anonymous_cs...
{ "repo_name": "mozilla/BanHammer", "path": "BanHammer/blacklist/views/setting.py", "copies": "1", "size": "1073", "license": "bsd-3-clause", "hash": -3415766122608849000, "line_mean": 30.5588235294, "line_max": 77, "alpha_frac": 0.6197576887, "autogenerated": false, "ratio": 4.361788617886178, ...
from django.shortcuts import render_to_response from django.template import RequestContext from django.core.urlresolvers import resolve import datetime from django.http import Http404 from events.models import Event from events.models import Calendar def index(request): calendars = Calendar.objects.all() even...
{ "repo_name": "theherk/django-theherk-events", "path": "events/views.py", "copies": "1", "size": "1754", "license": "bsd-3-clause", "hash": 7131403377712388000, "line_mean": 34.08, "line_max": 120, "alpha_frac": 0.7046750285, "autogenerated": false, "ratio": 3.9954441913439633, "config_test": f...
from django.shortcuts import render_to_response from django.template import RequestContext from django.core.urlresolvers import reverse from apps.myerp.tools.tool import Ajax, analysis_iterable_object from apps.myerp.tools import helper from apps.myerp.models import SysMenu, Product, ProductCategoryPrimary, ProductCate...
{ "repo_name": "HarrisonHDU/myerp", "path": "apps/myerp/views.py", "copies": "1", "size": "10791", "license": "mit", "hash": -390214988315140500, "line_mean": 31.1210191083, "line_max": 114, "alpha_frac": 0.6047595439, "autogenerated": false, "ratio": 3.0916615573267934, "config_test": false, ...
from django.shortcuts import render_to_response from django.template import RequestContext from django.core.urlresolvers import reverse from django.contrib.auth.decorators import login_required from django.http import HttpResponseRedirect from django.contrib.sites.models import Site from django.views.generic import Tem...
{ "repo_name": "JoeJasinski/WindyTransit", "path": "mobiletrans/views.py", "copies": "1", "size": "1913", "license": "mit", "hash": -282752258802772030, "line_mean": 37.28, "line_max": 95, "alpha_frac": 0.6884474647, "autogenerated": false, "ratio": 4.027368421052632, "config_test": false, "ha...
from django.shortcuts import render_to_response from django.template import RequestContext from django.core.urlresolvers import reverse from django.contrib.auth import authenticate from django.contrib.auth.models import User from django.http import HttpResponseRedirect from django.views.decorators.csrf import csrf_exem...
{ "repo_name": "Apreche/Wikibloks", "path": "allauth/openid/views.py", "copies": "1", "size": "3808", "license": "mit", "hash": 8137880958332941000, "line_mean": 35.6153846154, "line_max": 80, "alpha_frac": 0.6494222689, "autogenerated": false, "ratio": 4.356979405034325, "config_test": false, ...
from django.shortcuts import render_to_response from django.template import RequestContext from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.views.decorators.csrf import csrf_exempt from openid.consumer.discover import DiscoveryFailure from openid.consumer import con...
{ "repo_name": "Yury191/brownstonetutors", "path": "allauth/socialaccount/providers/openid/views.py", "copies": "4", "size": "3746", "license": "unlicense", "hash": -2150958968763899000, "line_mean": 38.8510638298, "line_max": 74, "alpha_frac": 0.6099839829, "autogenerated": false, "ratio": 4.6650...
from django.shortcuts import render_to_response from django.template import RequestContext from django.core.urlresolvers import reverse from system.controllers.rakuten import RakutenBooks def addEquipmentView(request): if request.method == "POST": RakutenBooks.getItem( request.POST.get("eq...
{ "repo_name": "XMLPro/ManagementSystem", "path": "system/controllers/addEquipmentView.py", "copies": "1", "size": "1873", "license": "mit", "hash": -8132394733198424000, "line_mean": 31.4909090909, "line_max": 75, "alpha_frac": 0.5629546726, "autogenerated": false, "ratio": 3.6845360824742266, ...
from django.shortcuts import render_to_response from django.template import RequestContext from django.db.models import Count from audiotracks.models import get_track_model def index(request): names = get_track_model().objects.values('artist').annotate(total=Count('artist')).distinct().order_by('artist') ...
{ "repo_name": "fgirault/smeuhsocial", "path": "apps/artist/views.py", "copies": "1", "size": "1189", "license": "mit", "hash": 7102210921086283000, "line_mean": 25.4444444444, "line_max": 136, "alpha_frac": 0.5988225399, "autogenerated": false, "ratio": 4.292418772563177, "config_test": false, ...
from django.shortcuts import render_to_response from django.template import RequestContext from django.forms import ModelForm from front.models import Client import requests import json # Create your views here. def index(request, *args, **kwargs): form = ClientForm() return render_to_response("index.html", l...
{ "repo_name": "jcabdala/atlantisapp", "path": "atlantis/front/views.py", "copies": "1", "size": "1506", "license": "bsd-3-clause", "hash": 152443827042276320, "line_mean": 30.375, "line_max": 72, "alpha_frac": 0.5484727756, "autogenerated": false, "ratio": 4.114754098360656, "config_test": fals...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import Http404,HttpResponse,HttpResponseRedirect from django.contrib.auth.decorators import permission_required from forms import DebaterForm from errors import * from models import * import mittab.libs.tab_logic...
{ "repo_name": "Benjamin-Marks/mit-tab-appengine", "path": "mittab/apps/tab/debater_views.py", "copies": "2", "size": "6441", "license": "mit", "hash": -2449026017553396000, "line_mean": 42.8163265306, "line_max": 128, "alpha_frac": 0.4947989443, "autogenerated": false, "ratio": 4.411643835616438,...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import Http404, HttpResponse from django.forms.models import modelform_factory from ajax_example.models import item def home(request): dropdown_options = item.objects.values("type").distinct() add_item_...
{ "repo_name": "wabarr/ajax_example", "path": "ajax_example/views.py", "copies": "1", "size": "1902", "license": "mit", "hash": -4784135879660182000, "line_mean": 38.6458333333, "line_max": 113, "alpha_frac": 0.5893796004, "autogenerated": false, "ratio": 4.507109004739337, "config_test": false,...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import Http404, HttpResponseRedirect from django.views.generic import list_detail from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.core.urlresolver...
{ "repo_name": "blampe/M2M", "path": "basic/profiles/views.py", "copies": "3", "size": "2564", "license": "mit", "hash": -5088857060205680000, "line_mean": 37.8636363636, "line_max": 119, "alpha_frac": 0.6688767551, "autogenerated": false, "ratio": 4.210180623973727, "config_test": false, "has...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import Http404 from django.core.paginator import EmptyPage from django_filters.filterset import FilterSet def object_filter(request, model=None, queryset=None, template_name=None, extra_context=None, conte...
{ "repo_name": "themotleyfool/django-filter-actually-maintained", "path": "django_filters/views.py", "copies": "1", "size": "1772", "license": "bsd-3-clause", "hash": 6242010471737809000, "line_mean": 35.1632653061, "line_max": 102, "alpha_frac": 0.6281038375, "autogenerated": false, "ratio": 3.85...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponse, Http404 from django.contrib.auth.decorators import login_required import api @login_required def find_mavens(request): return render_to_response("mavens.html", {}, RequestContex...
{ "repo_name": "sameenjalal/mavenize-beta", "path": "mavenize/apps/social_graph/views.py", "copies": "1", "size": "1173", "license": "mit", "hash": -3251024012163121700, "line_mean": 26.9285714286, "line_max": 67, "alpha_frac": 0.6683716965, "autogenerated": false, "ratio": 3.8084415584415585, "...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponse, HttpResponseBadRequest import json from toesaver.utils import ViewCounter def ajax_report_view(request): """ Javascript will report to this view the current user and the page he i...
{ "repo_name": "ckinsey/django-toesaver", "path": "toesaver/views.py", "copies": "1", "size": "1045", "license": "mit", "hash": 8735372127438765000, "line_mean": 25.15, "line_max": 84, "alpha_frac": 0.6976076555, "autogenerated": false, "ratio": 4.247967479674797, "config_test": false, "has_no...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponse, HttpResponsePermanentRedirect, HttpResponseGone def direct_to_template(request, template, extra_context={}, **kwargs): """ Render a given template with any extra URL parameters in th...
{ "repo_name": "toomoresuch/pysonengine", "path": "parts/google_appengine/lib/django/django/views/generic/simple.py", "copies": "32", "size": "1325", "license": "mit", "hash": -5636666393272280000, "line_mean": 36.8571428571, "line_max": 104, "alpha_frac": 0.6543396226, "autogenerated": false, "ra...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponse, HttpResponseRedirect from django.core.urlresolvers import reverse from django.shortcuts import get_object_or_404, redirect from django.db.models import Q, Count from django.core.paginator imp...
{ "repo_name": "friendofrobots/air-toolkit", "path": "air/context/views.py", "copies": "1", "size": "9146", "license": "mit", "hash": 3394108735249397000, "line_mean": 40.9541284404, "line_max": 113, "alpha_frac": 0.578722939, "autogenerated": false, "ratio": 4.3366524419156, "config_test": fals...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponse, HttpResponseRedirect from django.core.urlresolvers import reverse import django.contrib.auth.views import csv from filetransfers.api import serve_file from django.shortcuts import get_object_...
{ "repo_name": "wd5/jangr", "path": "samodei/views.py", "copies": "2", "size": "1223", "license": "bsd-3-clause", "hash": 7145816412669002000, "line_mean": 29.6, "line_max": 99, "alpha_frac": 0.7849550286, "autogenerated": false, "ratio": 3.6726726726726726, "config_test": false, "has_no_keywo...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponse, HttpResponseRedirect from hhg_app import scraper from django.contrib.auth.models import User, UserManager from hhg_app.models import Song from django.contrib.auth import login as authlogin fr...
{ "repo_name": "zackster/HipHopGoblin", "path": "hhg/hhg_app/views.py", "copies": "1", "size": "16242", "license": "bsd-3-clause", "hash": 5337542442424119000, "line_mean": 39.0049261084, "line_max": 504, "alpha_frac": 0.6329885482, "autogenerated": false, "ratio": 3.1716461628588166, "config_te...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponse, HttpResponseRedirect from pagefetch.game_models import HighScore, PlayerAchievement, UserProfile, Achievement, Category from django.contrib.auth import authenticate from django.contrib.auth.m...
{ "repo_name": "leifos/pagefetch", "path": "pagefetch_project/profiles/views.py", "copies": "1", "size": "5328", "license": "mit", "hash": -768217321843298300, "line_mean": 41.2857142857, "line_max": 119, "alpha_frac": 0.5846471471, "autogenerated": false, "ratio": 4.561643835616438, "config_tes...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponse from client import Client from datetime import datetime from time import strptime from util import prefix, cache import settings import os from models import HttpException parse_date = lamb...
{ "repo_name": "justquick/django-logjam", "path": "logjam/views.py", "copies": "1", "size": "1557", "license": "bsd-3-clause", "hash": -7488362384628464000, "line_mean": 30.7959183673, "line_max": 74, "alpha_frac": 0.6351958895, "autogenerated": false, "ratio": 3.6378504672897196, "config_test":...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponse from django.conf import settings from operator import itemgetter from datetime import datetime, timedelta import json import urllib2 import re # Get API user and token from settings user = se...
{ "repo_name": "walliski/tf-info", "path": "apps/reittiopas/views.py", "copies": "2", "size": "2025", "license": "bsd-3-clause", "hash": 5109061189567354000, "line_mean": 32.2131147541, "line_max": 128, "alpha_frac": 0.7125925926, "autogenerated": false, "ratio": 3.2766990291262137, "config_test...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponse from django.contrib.auth.decorators import login_required from django.core.context_processors import csrf from punchclock.forms import TaskForm from punchclock.models import Project, Activity,...
{ "repo_name": "Haughar/punchclock", "path": "punchclock/views.py", "copies": "1", "size": "4216", "license": "apache-2.0", "hash": 3080181228566894600, "line_mean": 35.9824561404, "line_max": 79, "alpha_frac": 0.6074478178, "autogenerated": false, "ratio": 4.302040816326531, "config_test": fals...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponse from django.contrib.gis.geos import Point, Polygon import json import requests from california.models import * def counties(request): counties = County.objects.all() return render_to_...
{ "repo_name": "evz/demo", "path": "map_demo/california/views.py", "copies": "1", "size": "3930", "license": "mit", "hash": 2682301784348095500, "line_mean": 42.6666666667, "line_max": 131, "alpha_frac": 0.5842239186, "autogenerated": false, "ratio": 3.8681102362204722, "config_test": false, "...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponse from django.core.serializers.json import DjangoJSONEncoder import json import datetime import pika from django.utils.timezone import utc def r2r(request, template, payload=None): if pay...
{ "repo_name": "gmjosack/auditor", "path": "auditor/base/shortcuts.py", "copies": "1", "size": "1724", "license": "mit", "hash": -860042521556220800, "line_mean": 25.1212121212, "line_max": 136, "alpha_frac": 0.6287703016, "autogenerated": false, "ratio": 3.990740740740741, "config_test": false,...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponse from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from django.contrib.auth.decorators import login_required from django.shortcuts import get_object_or_4...
{ "repo_name": "linkfloyd/linkfloyd", "path": "linkfloyd/links/views.py", "copies": "1", "size": "6279", "license": "bsd-3-clause", "hash": -7793958152628509000, "line_mean": 32.2222222222, "line_max": 78, "alpha_frac": 0.6230291448, "autogenerated": false, "ratio": 4.2772479564032695, "config_t...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponse from django.utils import timezone from django.conf import settings from django.views.decorators.cache import cache_page import urllib2 """ Takes in results from a vote in the following form...
{ "repo_name": "Teknologforeningen/tf-info", "path": "apps/voteresults/views.py", "copies": "1", "size": "2346", "license": "bsd-3-clause", "hash": -4355264074791289300, "line_mean": 22.9387755102, "line_max": 131, "alpha_frac": 0.5375106564, "autogenerated": false, "ratio": 3.231404958677686, "...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponse from django.views.decorators.cache import cache_page from django.core.cache import cache from django.conf import settings import json import urllib2, urllib import datetime, random cam_url =...
{ "repo_name": "Teknologforeningen/tf-info", "path": "apps/dagsen/views.py", "copies": "2", "size": "1185", "license": "bsd-3-clause", "hash": 4554440475572754000, "line_mean": 25.9318181818, "line_max": 96, "alpha_frac": 0.7021097046, "autogenerated": false, "ratio": 3.6574074074074074, "config...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponse from django.views.decorators.cache import cache_page from django.utils import timezone from django.conf import settings from datetime import datetime from datetime import date from icalendar i...
{ "repo_name": "Teknologforeningen/tf-info", "path": "apps/kalender/views.py", "copies": "3", "size": "1427", "license": "bsd-3-clause", "hash": 567966839867325950, "line_mean": 25.9433962264, "line_max": 115, "alpha_frac": 0.6923615978, "autogenerated": false, "ratio": 3.8777173913043477, "conf...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponse from sam.models import Post from django.db.models import Q from django.core.cache import cache from TwitterAPI import TwitterAPI from django.conf import settings from datetime import datetime,...
{ "repo_name": "samolds/samster", "path": "sam/views/river.py", "copies": "1", "size": "10574", "license": "mit", "hash": 6130626145488454000, "line_mean": 39.6692307692, "line_max": 178, "alpha_frac": 0.5524872328, "autogenerated": false, "ratio": 3.6487232574189097, "config_test": false, "ha...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponse import json def context_template_response(func): def wrapper(*args): response = func(*args) if isinstance(response, tuple): template = response[0] variables = {} ...
{ "repo_name": "reidHoruff/django-easy", "path": "easy/decorators.py", "copies": "1", "size": "1272", "license": "bsd-2-clause", "hash": -6582974700017340000, "line_mean": 23, "line_max": 59, "alpha_frac": 0.6737421384, "autogenerated": false, "ratio": 4.47887323943662, "config_test": false, "...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponse import salesforce as sf import config import json def index_view(request): sfdc = sf.Salesforce(domain="na1-blitz03.soma") try: sfdc.authenticate( client_id=confi...
{ "repo_name": "htarevern/salesforce-prospector", "path": "prospecting/views.py", "copies": "1", "size": "4160", "license": "mit", "hash": -647876369960540000, "line_mean": 27.6896551724, "line_max": 84, "alpha_frac": 0.5519230769, "autogenerated": false, "ratio": 4.147557328015952, "config_test...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponse def register(request): loggedIn = request.user.is_authenticated() profile = None if loggedIn: profile = request.user.get_profile() return render_to_response('adelie_r...
{ "repo_name": "jennselby/adelie", "path": "views.py", "copies": "1", "size": "1133", "license": "mit", "hash": -7329779458757683000, "line_mean": 35.5483870968, "line_max": 71, "alpha_frac": 0.6337157988, "autogenerated": false, "ratio": 4.478260869565218, "config_test": false, "has_no_keywor...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponse from django.contrib.auth import authenticate, login, logout from django.contrib.auth.models import User from rss.polling import sitepoller from rss.models import Subscription from rss.model...
{ "repo_name": "leemac/JellyfishRss", "path": "rss/views.py", "copies": "1", "size": "9217", "license": "mit", "hash": -2501473207687269000, "line_mean": 31.6843971631, "line_max": 124, "alpha_frac": 0.6388195725, "autogenerated": false, "ratio": 4.426993275696446, "config_test": false, "has_n...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponseRedirect, Http404 from django.core.urlresolvers import reverse from tweets.forms import TweetForm import cass NUM_PER_PAGE = 40 def timeline(request): form = TweetForm(request.POST or N...
{ "repo_name": "adhish20/TwitterWithCassandra", "path": "tweets/views.py", "copies": "1", "size": "2293", "license": "mit", "hash": 3657092338966804000, "line_mean": 32.7205882353, "line_max": 79, "alpha_frac": 0.6641953772, "autogenerated": false, "ratio": 3.7284552845528456, "config_test": fal...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponseRedirect,HttpResponse from django.core.urlresolvers import reverse from django.utils.functional import lazy from bcore.apps.administrator.views import AUTH_FAILED_URL from django.contrib.auth.d...
{ "repo_name": "ttokic/django-defender", "path": "defender/views.py", "copies": "1", "size": "2483", "license": "apache-2.0", "hash": 9114764961540406000, "line_mean": 44.1454545455, "line_max": 122, "alpha_frac": 0.7515102698, "autogenerated": false, "ratio": 3.673076923076923, "config_test": f...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponseRedirect from contactus.forms import ContactForm from django.core.mail import send_mail, BadHeaderError from google.appengine.api.mail import EmailMessage # Create your views here. def contac...
{ "repo_name": "Laimiux/mydeatree", "path": "contactus/views.py", "copies": "1", "size": "1265", "license": "bsd-3-clause", "hash": -1394150135674163200, "line_mean": 42.6551724138, "line_max": 111, "alpha_frac": 0.6292490119, "autogenerated": false, "ratio": 3.787425149700599, "config_test": fa...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponseRedirect from django.contrib.auth.decorators import login_required from models import * from forms import * def list_all(request): suggestions = Suggestion.objects.order_by("-rating_score...
{ "repo_name": "copelco/Durham-Open-Data-Catalog", "path": "OpenDataCatalog/suggestions/views.py", "copies": "1", "size": "2804", "license": "mit", "hash": -131001665628725920, "line_mean": 37.4109589041, "line_max": 140, "alpha_frac": 0.637660485, "autogenerated": false, "ratio": 3.89444444444444...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponseRedirect from django.contrib.auth.models import User def index(request): return render_to_response('index.html', None) def run(request): pass def save(request): pass # user s...
{ "repo_name": "lncwwn/js-partner", "path": "js_partner/views.py", "copies": "1", "size": "1205", "license": "mit", "hash": 3623055440477363700, "line_mean": 24.125, "line_max": 74, "alpha_frac": 0.6705394191, "autogenerated": false, "ratio": 4.16955017301038, "config_test": false, "has_no_key...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponseRedirect from django.contrib import messages from generic_confirmation.forms import ConfirmationForm def confirm_by_form(request, template_name='confirm.html', success_t...
{ "repo_name": "eskeli/django-generic-confirmation", "path": "generic_confirmation/views.py", "copies": "1", "size": "3022", "license": "bsd-3-clause", "hash": 5362332877589609000, "line_mean": 39.2933333333, "line_max": 84, "alpha_frac": 0.5893448048, "autogenerated": false, "ratio": 4.9138211382...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from django.contrib.admin.views.decorators import staff_member_required from .utils import ( get_blocked_ips, get_blocked_usernames, u...
{ "repo_name": "philippeowagner/django-defender", "path": "defender/views.py", "copies": "2", "size": "1252", "license": "apache-2.0", "hash": -2879790354045209600, "line_mean": 32.8378378378, "line_max": 73, "alpha_frac": 0.7252396166, "autogenerated": false, "ratio": 3.9371069182389937, "confi...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse #from django.db import transaction from models import Comment from formClasses import RequestForm, ModifyForm from datetime import dateti...
{ "repo_name": "HM2MC/Webfront", "path": "m2m/request/views.py", "copies": "1", "size": "12428", "license": "mit", "hash": -3362246847689261600, "line_mean": 39.614379085, "line_max": 226, "alpha_frac": 0.5021725137, "autogenerated": false, "ratio": 4.898699251083958, "config_test": true, "has...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from django.template import RequestContext from django.shortcuts import render from django.views.generic import ListView from apps.elicita...
{ "repo_name": "tturpen/django-csaesrapp", "path": "apps/elicitation/views.py", "copies": "1", "size": "2905", "license": "bsd-2-clause", "hash": -4486945850787994000, "line_mean": 39.3472222222, "line_max": 89, "alpha_frac": 0.6444061962, "autogenerated": false, "ratio": 4.361861861861862, "con...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from xml.dom.minidom import parseString from django.core.context_processors import csrf from django import forms from django.http import Ht...
{ "repo_name": "amiq11/cloud2014-A2", "path": "vmfront/vmmanager/views.py", "copies": "1", "size": "7339", "license": "mit", "hash": -3795226320900946000, "line_mean": 35.695, "line_max": 141, "alpha_frac": 0.5230957896, "autogenerated": false, "ratio": 4.034634414513469, "config_test": false, ...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from .models import PartnerLogo from .forms import PartnerLogoForm def LogoUpload(request): # Handle file upload if request.meth...
{ "repo_name": "Upande/MaMaSe", "path": "apps/partners/views.py", "copies": "1", "size": "1087", "license": "apache-2.0", "hash": -8841468520051083000, "line_mean": 30.0571428571, "line_max": 82, "alpha_frac": 0.6899724011, "autogenerated": false, "ratio": 4.213178294573644, "config_test": false...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponseRedirect from forms import CategoriaForm from crud.models import Categoria def lista (request): categorias = Categoria.objects.all() context = RequestContext(request, {'categorias': categori...
{ "repo_name": "joaquimrabelo/start_django", "path": "crud/categoria.py", "copies": "1", "size": "1436", "license": "bsd-2-clause", "hash": -7856788776480000000, "line_mean": 30.2391304348, "line_max": 74, "alpha_frac": 0.7444289694, "autogenerated": false, "ratio": 3.545679012345679, "config_te...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponseRedirect from .forms import ConfirmationForm from .models import DeferredValidationError def confirm(request, token, template='confirm.html', success_message=None, success_url=None, form_class...
{ "repo_name": "m000/django_generic_confirmation", "path": "generic_confirmation/views.py", "copies": "1", "size": "2375", "license": "bsd-3-clause", "hash": -1914680746571401500, "line_mean": 42.1818181818, "line_max": 122, "alpha_frac": 0.6261052632, "autogenerated": false, "ratio": 4.6844181459...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponseRedirect from forms import StatusForm from crud.models import Status def lista (request): status = Status.objects.all() context = RequestContext(request, {'status': status}) return render_t...
{ "repo_name": "joaquimrabelo/start_django", "path": "crud/status.py", "copies": "1", "size": "1339", "license": "bsd-2-clause", "hash": -6790327454452800000, "line_mean": 28.1304347826, "line_max": 67, "alpha_frac": 0.7259148618, "autogenerated": false, "ratio": 3.6785714285714284, "config_test...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import JsonResponse from rest_framework import status from rest_framework.decorators import api_view from rest_framework.response import Response from rest_framework.views import APIView from telemetry.models im...
{ "repo_name": "banctilrobitaille/RockETS-Basestation", "path": "dashboards/views.py", "copies": "1", "size": "7602", "license": "mit", "hash": -6913858564481956000, "line_mean": 47.7307692308, "line_max": 120, "alpha_frac": 0.5656406209, "autogenerated": false, "ratio": 5.167912984364378, "conf...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import StreamingHttpResponse, HttpResponse from django.views.decorators.csrf import csrf_exempt from guacamole import client import logging import uuid import threading logger = logging.getLogger(__name__) soc...
{ "repo_name": "rescale/django-guacamole", "path": "guacamole/views.py", "copies": "1", "size": "2976", "license": "mit", "hash": 300577246235920200, "line_mean": 25.8108108108, "line_max": 77, "alpha_frac": 0.5655241935, "autogenerated": false, "ratio": 4.269727403156384, "config_test": false, ...