text stringlengths 0 1.05M | meta dict |
|---|---|
from django.shortcuts import render
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.http import HttpResponseRedirect
from bins.models import *
from django.contrib.auth.decorators import login_required
from django.core import serializers
from django.http import Http... | {
"repo_name": "Diksha-Rathi/Smart-Bin-GHC",
"path": "bins/views.py",
"copies": "1",
"size": "5043",
"license": "mit",
"hash": 2445167715787326000,
"line_mean": 35.8175182482,
"line_max": 117,
"alpha_frac": 0.6886773746,
"autogenerated": false,
"ratio": 3.5315126050420167,
"config_test": false,
... |
from django.shortcuts import render
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.utils import timezone
from .models import TPage
# Create your views here.
from django.view... | {
"repo_name": "Upande/MaMaSe",
"path": "apps/testapp/views.py",
"copies": "1",
"size": "2136",
"license": "apache-2.0",
"hash": -2206172139641183500,
"line_mean": 29.0845070423,
"line_max": 236,
"alpha_frac": 0.6540262172,
"autogenerated": false,
"ratio": 3.670103092783505,
"config_test": false... |
from django.shortcuts import render
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.shortcuts import redirect
from django.db import IntegrityError
from django.contrib import messages
from main.models import Link
from main.models import Tag
# Create your views her... | {
"repo_name": "grepme/CMPUT410Lab06",
"path": "main/views.py",
"copies": "1",
"size": "2015",
"license": "apache-2.0",
"hash": 6682669244225829000,
"line_mean": 25.88,
"line_max": 111,
"alpha_frac": 0.6198511166,
"autogenerated": false,
"ratio": 4.01394422310757,
"config_test": false,
"has_no... |
from django.shortcuts import render
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.shortcuts import redirect
from django.db.models import Q
from django.core import serializers
from django.http import HttpResponse, JsonResponse, HttpResponseRedirect
import urllib2
... | {
"repo_name": "TeamUACS1/410Project",
"path": "main/apiviews.py",
"copies": "1",
"size": "14166",
"license": "apache-2.0",
"hash": 8939304024421539000,
"line_mean": 39.1303116147,
"line_max": 270,
"alpha_frac": 0.6890441903,
"autogenerated": false,
"ratio": 3.062256809338521,
"config_test": fal... |
from django.shortcuts import render
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.shortcuts import redirect
import re
from main.models import Link
from main.models import Tag
def index(request):
context = RequestContext(request)
links = Link.objects.al... | {
"repo_name": "stankiev/CMPUT410-Lab6",
"path": "bookmarks/main/views.py",
"copies": "1",
"size": "1331",
"license": "apache-2.0",
"hash": -2157621216749181700,
"line_mean": 27.9347826087,
"line_max": 102,
"alpha_frac": 0.6468820436,
"autogenerated": false,
"ratio": 3.6168478260869565,
"config_... |
from django.shortcuts import render
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.shortcuts import redirect
from main.models import Link
from main.models import Tag
# Create your views here.
def index(request):
context = RequestContext(request)
links =... | {
"repo_name": "davischau/CMPUT410Lab6",
"path": "bookmarks/main/views.py",
"copies": "1",
"size": "1353",
"license": "apache-2.0",
"hash": -2054930079734996700,
"line_mean": 29.7727272727,
"line_max": 103,
"alpha_frac": 0.6511456024,
"autogenerated": false,
"ratio": 3.6176470588235294,
"config_... |
from django.shortcuts import render
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.shortcuts import redirect
from main.models import Link
from main.models import Tag
def index(request):
#Request the context of the request.
#The context contains information s... | {
"repo_name": "pranner/CMPUT410-Lab6-Django",
"path": "bookmarks/main/views.py",
"copies": "1",
"size": "1376",
"license": "apache-2.0",
"hash": 5909019353211454000,
"line_mean": 26,
"line_max": 100,
"alpha_frac": 0.7129360465,
"autogenerated": false,
"ratio": 3.3891625615763545,
"config_test":... |
from django.shortcuts import render
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.shortcuts import redirect
from main.models import Link
from main.models import Tag
# Create your views here.
def index(request):
context = RequestContext(request)
... | {
"repo_name": "cntnboys/410Lab6",
"path": "bookmarks/main/views.py",
"copies": "1",
"size": "1325",
"license": "apache-2.0",
"hash": 5990676807453372000,
"line_mean": 24.0188679245,
"line_max": 101,
"alpha_frac": 0.6362264151,
"autogenerated": false,
"ratio": 3.7535410764872523,
"config_test": ... |
from django.shortcuts import render
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.views.generic import TemplateView
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from decimal import *
from employee.models import *... | {
"repo_name": "asm-technologies/management",
"path": "employee/views.py",
"copies": "1",
"size": "4578",
"license": "mit",
"hash": 5492783543188775000,
"line_mean": 36.5245901639,
"line_max": 164,
"alpha_frac": 0.6732197466,
"autogenerated": false,
"ratio": 3.001967213114754,
"config_test": fal... |
from django.shortcuts import render
from django.shortcuts import render_to_response
from django.template import RequestContext
from googleplaces import GooglePlaces, types, lang
from django.core.mail import send_mail
from django.http import HttpResponseRedirect
YOUR_API_KEY = 'A****************************************... | {
"repo_name": "Diksha-Rathi/find-my-place",
"path": "find-my-place/views.py",
"copies": "1",
"size": "2451",
"license": "mit",
"hash": 854364793601444400,
"line_mean": 34.5217391304,
"line_max": 142,
"alpha_frac": 0.6711546308,
"autogenerated": false,
"ratio": 3.8781645569620253,
"config_test":... |
from django.shortcuts import render
from django.shortcuts import render_to_response
from django.template import RequestContext
from models import Field, Config, Entry
def config_index(request, active_only=False, chip_only=True):
comps = Config.objects.order_by('name')
return render_to_response('index.html',
... | {
"repo_name": "patrickglass/creo",
"path": "server/creo/views.py",
"copies": "2",
"size": "1172",
"license": "apache-2.0",
"hash": 1521650000193467600,
"line_mean": 31.5555555556,
"line_max": 71,
"alpha_frac": 0.5861774744,
"autogenerated": false,
"ratio": 4.507692307692308,
"config_test": fals... |
from django.shortcuts import render
from django.shortcuts import render_to_response
from django.template import RequestContext
from .models import *
from .tools.tool import Ajax
from .tools import helper
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.http import HttpResponse, HttpR... | {
"repo_name": "HarrisonHDU/myerp",
"path": "apps/sims/views.py",
"copies": "1",
"size": "1537",
"license": "mit",
"hash": -4684230216115775000,
"line_mean": 28.8431372549,
"line_max": 72,
"alpha_frac": 0.7284681131,
"autogenerated": false,
"ratio": 3.6650602409638555,
"config_test": false,
"h... |
from django.shortcuts import render
from django.shortcuts import render_to_response
from django.template import RequestContext
from rest_framework import generics, permissions
from question_answer.models import Question, Answer, Tag
from question_answer.serializers import QuestionListSerializer, QuestionSerializer, Tag... | {
"repo_name": "caihaoyu/code_god",
"path": "question_answer/views.py",
"copies": "1",
"size": "4750",
"license": "mit",
"hash": 4271936729832440300,
"line_mean": 37.6260162602,
"line_max": 97,
"alpha_frac": 0.6307368421,
"autogenerated": false,
"ratio": 4.294755877034358,
"config_test": false,
... |
from django.shortcuts import render
from django.shortcuts import render_to_response
from django.views.decorators.csrf import csrf_exempt
from django.http.response import JsonResponse
from django.http import HttpResponseRedirect
from django.contrib import auth
from django.core.context_processors import csrf
from django.... | {
"repo_name": "Edgar324/GeoVis",
"path": "scatterdatareview/views.py",
"copies": "1",
"size": "2568",
"license": "apache-2.0",
"hash": 4495619470018869000,
"line_mean": 31.9358974359,
"line_max": 99,
"alpha_frac": 0.6674454829,
"autogenerated": false,
"ratio": 3.926605504587156,
"config_test": ... |
from django.shortcuts import render
from django.shortcuts import render_to_response
from django.views.decorators.csrf import csrf_protect, csrf_exempt
from django.http import HttpResponse, HttpResponseRedirect
from django.template import RequestContext, Template
import forms
from getcourses import get_section_list
@c... | {
"repo_name": "nathan-williams/uvaschedule_me",
"path": "uvaschedule_me/views.py",
"copies": "1",
"size": "8184",
"license": "mit",
"hash": -5034021410553303000,
"line_mean": 42.5372340426,
"line_max": 189,
"alpha_frac": 0.4853372434,
"autogenerated": false,
"ratio": 4.2272727272727275,
"config... |
from django.shortcuts import render
from django.shortcuts import render_to_response
from django.views.generic import CreateView, UpdateView, DeleteView, DetailView
from installer_config.models import EnvironmentProfile, UserChoice, Step
from installer_config.forms import EnvironmentForm
from django.core.urlresolvers im... | {
"repo_name": "alibulota/Package_Installer",
"path": "installer/installer_config/views.py",
"copies": "1",
"size": "2214",
"license": "mit",
"hash": 3094298680526928000,
"line_mean": 35.9,
"line_max": 91,
"alpha_frac": 0.7149954833,
"autogenerated": false,
"ratio": 4.233269598470363,
"config_te... |
from django.shortcuts import render
from django.shortcuts import render_to_response
# session requires HttpResponse
from django.http import HttpResponse
from article.models import Article
#from django.template.loader import get_template
#from django.template import Context
def hello(request):
name=request.GET["k"]... | {
"repo_name": "puuparta/django_bootcamp",
"path": "article/views.py",
"copies": "1",
"size": "1141",
"license": "mit",
"hash": 3683317591338457000,
"line_mean": 26.8292682927,
"line_max": 61,
"alpha_frac": 0.7204206836,
"autogenerated": false,
"ratio": 3.5434782608695654,
"config_test": false,
... |
from django.shortcuts import render
from django.shortcuts import render_to_response,redirect, get_object_or_404
from django.core.urlresolvers import reverse
from .models import Message, Hashtag, Profile, Notification, Circle
from django.contrib.auth.models import User
from django.template import RequestContext
from d... | {
"repo_name": "yabirgb/caucab",
"path": "social/views.py",
"copies": "1",
"size": "3676",
"license": "mit",
"hash": -319873091767403700,
"line_mean": 34.3461538462,
"line_max": 106,
"alpha_frac": 0.6542437432,
"autogenerated": false,
"ratio": 4.172531214528944,
"config_test": false,
"has_no_k... |
from django.shortcuts import render
from django.shortcuts import render_to_response, redirect
from django.template import RequestContext
from .forms import SignUpForm
from django.views import generic
def add_signup(request):
# Get the context from the request.
context = RequestContext(request)
# A HTTP P... | {
"repo_name": "kobox/wzornik-achilles",
"path": "src/patternbook/views.py",
"copies": "1",
"size": "1261",
"license": "mit",
"hash": -1357207007823758600,
"line_mean": 33.1081081081,
"line_max": 83,
"alpha_frac": 0.6502775575,
"autogenerated": false,
"ratio": 4.303754266211604,
"config_test": f... |
from django.shortcuts import render
from django.shortcuts import render_to_response, RequestContext
from django.http import HttpResponse
from django.http import HttpResponse, HttpResponseRedirect
from django.http import Http404
from django.shortcuts import get_object_or_404, render
from django.views.decorators.csrf imp... | {
"repo_name": "lanke/InfoPlatform",
"path": "smartAdmin/groupManage/views.py",
"copies": "1",
"size": "2805",
"license": "apache-2.0",
"hash": 7699582121949367000,
"line_mean": 39.652173913,
"line_max": 89,
"alpha_frac": 0.7843137255,
"autogenerated": false,
"ratio": 3.1659142212189617,
"config... |
from django.shortcuts import render
from django.shortcuts import resolve_url
from django.shortcuts import get_object_or_404
from django.contrib import messages
from django.core.urlresolvers import reverse_lazy
from django.views.generic import FormView
from django.views.generic.detail import SingleObjectMixin
from .for... | {
"repo_name": "usa-mimi/tutorial",
"path": "tutorial/polls/views.py",
"copies": "1",
"size": "1765",
"license": "mit",
"hash": 8890706205883674000,
"line_mean": 26.7936507937,
"line_max": 62,
"alpha_frac": 0.6716162193,
"autogenerated": false,
"ratio": 3.595482546201232,
"config_test": false,
... |
from django.shortcuts import render
from django.template import Context, loader
from django.shortcuts import redirect ,render_to_response
from api import views as api_views
from rest_framework import status
from rest_framework.decorators import api_view
from django.http import HttpResponseRedirect
from controllers.my_d... | {
"repo_name": "jdkizer9/cs5555Lab2",
"path": "mydata/callback/views.py",
"copies": "1",
"size": "1025",
"license": "mit",
"hash": 2057422882168239400,
"line_mean": 33.1666666667,
"line_max": 71,
"alpha_frac": 0.7697560976,
"autogenerated": false,
"ratio": 3.882575757575758,
"config_test": false... |
from django.shortcuts import render
from django.template import Context, loader
from django.shortcuts import redirect ,render_to_response
from django.http import HttpResponseRedirect
from django.http import HttpResponse
from controllers.my_data_network_controller import DPUNetworkController, GithubNetworkController
... | {
"repo_name": "jdkizer9/cs5555Lab2",
"path": "mydata/home/views.py",
"copies": "1",
"size": "2349",
"license": "mit",
"hash": 8534047247972180000,
"line_mean": 34.5909090909,
"line_max": 132,
"alpha_frac": 0.6990208599,
"autogenerated": false,
"ratio": 3.8955223880597014,
"config_test": false,
... |
from django.shortcuts import render
from django.template import Context
from django.views import View
from impulse.alert.models import Monitor
from impulse.event.models import Event
from impulse.event.services import event_service
class EventDetailView(View):
def get(self, request, event_external_id, monitor_ex... | {
"repo_name": "akurihara/impulse",
"path": "impulse/event/views.py",
"copies": "1",
"size": "1057",
"license": "mit",
"hash": -4423146833829361000,
"line_mean": 29.2,
"line_max": 87,
"alpha_frac": 0.6745506149,
"autogenerated": false,
"ratio": 4.034351145038168,
"config_test": false,
"has_no_... |
from django.shortcuts import render
from django.template import Context, RequestContext
from django.contrib.auth.models import User, Group
from django.contrib.auth import logout
from django.contrib.auth.decorators import login_required
from django.contrib.auth import logout
from django.contrib.auth import authenticate,... | {
"repo_name": "jnayak1/cs3240-s16-team16",
"path": "reports/views.py",
"copies": "1",
"size": "13728",
"license": "mit",
"hash": -3222513201916804600,
"line_mean": 38.4482758621,
"line_max": 229,
"alpha_frac": 0.7312062937,
"autogenerated": false,
"ratio": 3.531772575250836,
"config_test": fals... |
from django.shortcuts import render
from django.template import Context, Template
from django.http import HttpResponseRedirect
from restaurant.models import Restaurant
from home.models import Grade,Users
from django.template.context_processors import request
from restaurant.forms import RestaurantForm
def restaurants... | {
"repo_name": "itucsProject2/Proje1",
"path": "restaurant/views.py",
"copies": "1",
"size": "1241",
"license": "unlicense",
"hash": 2445435753894693400,
"line_mean": 30.8205128205,
"line_max": 72,
"alpha_frac": 0.7050765512,
"autogenerated": false,
"ratio": 4.369718309859155,
"config_test": fal... |
from django.shortcuts import render
from django.template import Context, Template
from models import UploadFileForm
from models import sound3dGenerator
import re
message = {
'none': '',
'failUpload': 'Fail in upload, please check input sound file!!',
'failGenerate': 'Fail in generation, please check inpu... | {
"repo_name": "cameronlai/sound3d",
"path": "views.py",
"copies": "1",
"size": "1099",
"license": "mit",
"hash": 1964181945615053000,
"line_mean": 31.3235294118,
"line_max": 76,
"alpha_frac": 0.6396724295,
"autogenerated": false,
"ratio": 4.276264591439689,
"config_test": false,
"has_no_keywo... |
from django.shortcuts import render
from django.template import loader
from django.http import HttpResponse
from django.db.models import Q
from models import BlogPost
from models import PushSubscriber
import datetime
import calendar
# Create your views here.
def view_post(request, post_id):
template = loader.get_te... | {
"repo_name": "sonictt1/django_material_blog",
"path": "views.py",
"copies": "1",
"size": "5940",
"license": "apache-2.0",
"hash": 4071499314532853000,
"line_mean": 50.652173913,
"line_max": 302,
"alpha_frac": 0.6412457912,
"autogenerated": false,
"ratio": 3.6109422492401215,
"config_test": fal... |
from django.shortcuts import render
from django.template import loader
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from bs4 import BeautifulSoup, PageElement
import os
# print('%s' % os.getcwd())
# /Users/coufo/Desktop/TestWireframes2/WireFrameSite/mysite
def index(requ... | {
"repo_name": "CoufalikJaroslav/pencil-django-presenter",
"path": "mysite/polls/views.py",
"copies": "1",
"size": "1436",
"license": "mit",
"hash": -8036487285969370000,
"line_mean": 28.9166666667,
"line_max": 71,
"alpha_frac": 0.6566852368,
"autogenerated": false,
"ratio": 3.6726342710997444,
... |
from django.shortcuts import render
from django.template import loader
from django.http import HttpResponse
import config
import inspect
from contest.models import Contest, ContestSetting, ProblemSet
from contest.forms import ProblemSetForm, ProblemInputForm
from django.shortcuts import redirect
from django.contrib imp... | {
"repo_name": "CargoSpace/CargoSpaceChallenge",
"path": "dashboard/views.py",
"copies": "1",
"size": "2145",
"license": "apache-2.0",
"hash": -2998556776184581600,
"line_mean": 38.0181818182,
"line_max": 112,
"alpha_frac": 0.7552447552,
"autogenerated": false,
"ratio": 3.617200674536256,
"confi... |
from django.shortcuts import render
from django.template import loader
from django.http import HttpResponse
import config
import inspect
from django.shortcuts import redirect
from django.contrib import messages
from .models import School, Group, Member
from django.contrib.auth.decorators import login_required
from .for... | {
"repo_name": "CargoSpace/CargoSpaceChallenge",
"path": "acm/views.py",
"copies": "1",
"size": "5135",
"license": "apache-2.0",
"hash": -1809141560588698000,
"line_mean": 32.7894736842,
"line_max": 112,
"alpha_frac": 0.7357351509,
"autogenerated": false,
"ratio": 3.2790549169859515,
"config_tes... |
from django.shortcuts import render
from django.template import loader
from django.template.response import SimpleTemplateResponse
import jingo
def jinja_for_django(template_name, context=None, **kw):
"""
If you want to use some built in logic (or a contrib app) but need to
override the templates to work... | {
"repo_name": "andymckay/olympia",
"path": "src/olympia/zadmin/__init__.py",
"copies": "2",
"size": "1889",
"license": "bsd-3-clause",
"hash": -4567257282157491000,
"line_mean": 38.3541666667,
"line_max": 79,
"alpha_frac": 0.7114875596,
"autogenerated": false,
"ratio": 4.097613882863341,
"confi... |
from django.shortcuts import render
from django.template import loader
from django.views import generic
from django.http import HttpResponseRedirect
from django.shortcuts import get_object_or_404, redirect
from rbls.forms import AddrForm
from rbls.models import Rbllist
from rbls.bin.blcheck import _ipstatus
rbls = Rb... | {
"repo_name": "speedlight/rblmonitor",
"path": "src/rbls/views.py",
"copies": "1",
"size": "1389",
"license": "mit",
"hash": 7949800061574404000,
"line_mean": 29.1956521739,
"line_max": 60,
"alpha_frac": 0.626349892,
"autogenerated": false,
"ratio": 3.8264462809917354,
"config_test": false,
"... |
from django.shortcuts import render
from django.template import RequestContext, loader
from django.http import HttpResponse
from django.http import JsonResponse
from startnow import Scheduler
import json
from django.views.decorators.csrf import ensure_csrf_cookie
def handlePostMethod(request):
print "Inside post ... | {
"repo_name": "madhurrajn/samashthi",
"path": "startnow/views.py",
"copies": "1",
"size": "1450",
"license": "bsd-3-clause",
"hash": -7032158380498441000,
"line_mean": 28.5918367347,
"line_max": 73,
"alpha_frac": 0.6662068966,
"autogenerated": false,
"ratio": 3.877005347593583,
"config_test": f... |
from django.shortcuts import render
from django.template import RequestContext, loader
from django.http import HttpResponse
from .models import Circuito, GranPremio
from django.core.exceptions import ObjectDoesNotExist
# Create your views here.
def index(request):
template = loader.get_template('competicion/index... | {
"repo_name": "lendoly/djangoF1",
"path": "SC/competicion/views.py",
"copies": "1",
"size": "1693",
"license": "apache-2.0",
"hash": -4082185069348566000,
"line_mean": 30.9433962264,
"line_max": 64,
"alpha_frac": 0.6798582398,
"autogenerated": false,
"ratio": 3.59447983014862,
"config_test": fa... |
from django.shortcuts import render
from django.template import RequestContext, loader
from django import forms
from django.utils.safestring import mark_safe
from pull_scores import *
ALL_TRACTS = 802
'''
All values are floats, the number of stores in a census tract
Childcare services (including eaerly learnign pro... | {
"repo_name": "NeighborhoodMatch/mapping",
"path": "initial_code/website/nmatch/views.py",
"copies": "1",
"size": "4780",
"license": "mit",
"hash": 7072843214907466000,
"line_mean": 24.1631578947,
"line_max": 127,
"alpha_frac": 0.670292887,
"autogenerated": false,
"ratio": 2.836795252225519,
"c... |
# from django.shortcuts import render
# from django.template import RequestContext, loader
# from django.shortcuts import get_object_or_404, render
# from django.core.urlresolvers import reverse
# # Create your views here.
# from django.http import HttpResponse, HttpResponseRedirect
# from .models import Choice,Questio... | {
"repo_name": "zhljen/django-tutorial",
"path": "polls/views.py",
"copies": "2",
"size": "2404",
"license": "bsd-3-clause",
"hash": -4422812182533947400,
"line_mean": 33.8550724638,
"line_max": 75,
"alpha_frac": 0.6988352745,
"autogenerated": false,
"ratio": 3.9153094462540716,
"config_test": f... |
from django.shortcuts import render
from django.template import RequestContext
# from django_countries import countries
from js1kg.search.forms import SearchDestinationForm
from js1kg.project.models import Project
from js1kg.wishlist.models import *
def index(request):
if request.method == 'GET':
# create... | {
"repo_name": "dazhaoniel/1kg-more",
"path": "js1kg/views.py",
"copies": "1",
"size": "1461",
"license": "apache-2.0",
"hash": 4570713479393365500,
"line_mean": 34.6585365854,
"line_max": 76,
"alpha_frac": 0.6194387406,
"autogenerated": false,
"ratio": 4.4815950920245395,
"config_test": false,
... |
from django.shortcuts import render
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')
ncols... | {
"repo_name": "amarandon/smeuhsocial",
"path": "apps/artist/views.py",
"copies": "1",
"size": "1084",
"license": "mit",
"hash": -894138921100567600,
"line_mean": 23.0888888889,
"line_max": 116,
"alpha_frac": 0.5756457565,
"autogenerated": false,
"ratio": 4.234375,
"config_test": false,
"has_n... |
from django.shortcuts import render
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_template_name='... | {
"repo_name": "arneb/django-generic-confirmation",
"path": "generic_confirmation/views.py",
"copies": "1",
"size": "2314",
"license": "bsd-3-clause",
"hash": -388215615097574460,
"line_mean": 41.0727272727,
"line_max": 84,
"alpha_frac": 0.6348314607,
"autogenerated": false,
"ratio": 4.61876247504... |
from django.shortcuts import render
from django.template import RequestContext
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from .models import ImageUpload
from .forms import ImageForm, your_form_name, CustomRGB
from django.http import HttpResponse
from django.core.manageme... | {
"repo_name": "griffincalme/MicroDeconvolution",
"path": "website/MicroDeconvolution/views.py",
"copies": "1",
"size": "3167",
"license": "apache-2.0",
"hash": -1635611297729814000,
"line_mean": 28.8867924528,
"line_max": 103,
"alpha_frac": 0.6406694032,
"autogenerated": false,
"ratio": 4.1561679... |
from django.shortcuts import render
from django.template import RequestContext
from django.shortcuts import render, render_to_response
from django.views.generic import View
from django.http import HttpResponse
from customers import models as m
import sys, json, datetime, os
class Submit_Product(View):
try:
de... | {
"repo_name": "abhaystoic/barati",
"path": "barati/vendors/views_cluster/submit_product.py",
"copies": "1",
"size": "9735",
"license": "apache-2.0",
"hash": -8222631413890303000,
"line_mean": 57.2934131737,
"line_max": 201,
"alpha_frac": 0.6417051875,
"autogenerated": false,
"ratio": 3.6055555555... |
from django.shortcuts import render
from django.template import RequestContext
from django.shortcuts import render_to_response, get_object_or_404
from django.http import HttpResponse, HttpResponseRedirect
import json
# Authentication
from django.contrib.auth.forms import UserCreationForm, AuthenticationForm
from django... | {
"repo_name": "lancha90/menu",
"path": "server/views.py",
"copies": "1",
"size": "3104",
"license": "apache-2.0",
"hash": 8233790730225081000,
"line_mean": 33.1208791209,
"line_max": 125,
"alpha_frac": 0.7429123711,
"autogenerated": false,
"ratio": 3.341227125941873,
"config_test": false,
"ha... |
from django.shortcuts import render
from django.template import RequestContext
from django.shortcuts import render_to_response
# Create your views here.
from django.http import HttpResponse
from rango.models import Category
from rango.models import Page
#def index(request):
# return HttpResponse("hello world says by... | {
"repo_name": "akula/tango_with_django_project",
"path": "rango/views.py",
"copies": "1",
"size": "1484",
"license": "mit",
"hash": 911105770752382100,
"line_mean": 37.0512820513,
"line_max": 98,
"alpha_frac": 0.7075471698,
"autogenerated": false,
"ratio": 3.89501312335958,
"config_test": false... |
from django.shortcuts import render
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.core import serializers
from django.http import HttpResponseForbidden
from django.http import HttpResponse
from datetime import datetime, timedelta
import json, os
from logic.twitt... | {
"repo_name": "LasseRegin/djangoTwitter",
"path": "twitter_project/views.py",
"copies": "1",
"size": "6348",
"license": "mit",
"hash": 1559432968111462700,
"line_mean": 23.9921259843,
"line_max": 99,
"alpha_frac": 0.6710775047,
"autogenerated": false,
"ratio": 3.6714864083285135,
"config_test":... |
from django.shortcuts import render
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.http import HttpResponse, HttpResponseRedirect
from django.contrib.auth import authenticate, login, logout
# Import the vpn model
from django.contrib.auth.decorators import login_re... | {
"repo_name": "highway7/py_1",
"path": "ssn_demo/views.py",
"copies": "1",
"size": "6868",
"license": "apache-2.0",
"hash": 1003758517681833200,
"line_mean": 38.0227272727,
"line_max": 95,
"alpha_frac": 0.6605998835,
"autogenerated": false,
"ratio": 4.380102040816326,
"config_test": false,
"h... |
from django.shortcuts import render
from django.template import RequestContext
from django.shortcuts import render_to_response, render
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect,HttpResponse
from django.template.res... | {
"repo_name": "py-geek/City-Air",
"path": "location/views.py",
"copies": "1",
"size": "1230",
"license": "mit",
"hash": -1811084302161874000,
"line_mean": 28.3095238095,
"line_max": 94,
"alpha_frac": 0.6674796748,
"autogenerated": false,
"ratio": 3.2887700534759357,
"config_test": false,
"has... |
from django.shortcuts import render
from django.template import RequestContext
from django.utils import timezone
from api.models import Post, Author, Comment, Friending, Node
from .forms import PostForm, CommentForm
from django.http import HttpResponseRedirect, HttpResponseForbidden, HttpResponse
from django.core.urlre... | {
"repo_name": "CMPUT404Group/CMPUT404-project-socialdistribution",
"path": "post/views.py",
"copies": "1",
"size": "39308",
"license": "apache-2.0",
"hash": 4429404800936232000,
"line_mean": 37.38671875,
"line_max": 210,
"alpha_frac": 0.5901088837,
"autogenerated": false,
"ratio": 3.7518373580223... |
from django.shortcuts import render
from django.template import RequestContext
from django.views.generic import TemplateView
from django.http import HttpResponse
import django.http
import json
from django.db import transaction
from django.views.decorators.csrf import csrf_exempt
from proposition.models import Proposi... | {
"repo_name": "ericmok/eri53",
"path": "proposition/views.py",
"copies": "1",
"size": "2770",
"license": "unlicense",
"hash": -6754518899121074000,
"line_mean": 26.4356435644,
"line_max": 101,
"alpha_frac": 0.725631769,
"autogenerated": false,
"ratio": 3.3373493975903616,
"config_test": false,
... |
from django.shortcuts import render
from django.template import RequestContext
from django.views.generic import View
from django.http import HttpResponse
from customers import models as m
from dashboard import Dashboard
import sys, json
class My_Orders(Dashboard, View):
try:
def __init__(self):
self.... | {
"repo_name": "abhaystoic/barati",
"path": "barati/customers/views_cluster/my_orders.py",
"copies": "1",
"size": "3735",
"license": "apache-2.0",
"hash": 4486102474532465700,
"line_mean": 43.4642857143,
"line_max": 135,
"alpha_frac": 0.6176706827,
"autogenerated": false,
"ratio": 3.62621359223300... |
from django.shortcuts import render
from django.template import RequestContext
from django.views.generic import View
from django.http import HttpResponse
from customers import models as m
from wishlist import Wishlist
import sys, json
class Remove_From_Wishlist(Wishlist, View):
try:
def __init__(self):
... | {
"repo_name": "abhaystoic/barati",
"path": "barati/customers/views_cluster/remove_from_wishlist.py",
"copies": "1",
"size": "1064",
"license": "apache-2.0",
"hash": -5871811887125335000,
"line_mean": 35.6896551724,
"line_max": 89,
"alpha_frac": 0.6785714286,
"autogenerated": false,
"ratio": 3.733... |
from django.shortcuts import render
from django.template import RequestContext
from django.views.generic import View
from django.http import HttpResponse
from customers import models as m
import sys, json, datetime
class Save_Main_Preferences(View):
try:
def __init__(self):
#self.template_name = ''
... | {
"repo_name": "abhaystoic/barati",
"path": "barati/customers/views_cluster/save_main_preferences.py",
"copies": "1",
"size": "1586",
"license": "apache-2.0",
"hash": -4407566863312207400,
"line_mean": 37.6829268293,
"line_max": 106,
"alpha_frac": 0.6475409836,
"autogenerated": false,
"ratio": 4.1... |
from django.shortcuts import render
from django.template import RequestContext
from .forms import formulario_usuario, formulario_trabajo
from models import Usuarios, Trabajos
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from rest_framework.renderers import JSONRenderer
from ... | {
"repo_name": "Jarotru/Practica-IV",
"path": "app/views.py",
"copies": "1",
"size": "5417",
"license": "mit",
"hash": -4237173015129601000,
"line_mean": 32.2331288344,
"line_max": 109,
"alpha_frac": 0.673989293,
"autogenerated": false,
"ratio": 3.606524633821571,
"config_test": false,
"has_no... |
from django.shortcuts import render
from django.template import RequestContext
from vikalp.helper_functions.functional import get_page
from vikalp.views.views import article_service
from vikalp.views.article_list_view import ArticleList
article_list = ArticleList()
def get_title(category):
return category.title
... | {
"repo_name": "vikalpindia/vikalp",
"path": "vikalp/views/policy_edits_view.py",
"copies": "1",
"size": "1261",
"license": "apache-2.0",
"hash": -8742831871031065000,
"line_mean": 42.4827586207,
"line_max": 113,
"alpha_frac": 0.6843774782,
"autogenerated": false,
"ratio": 4.303754266211604,
"co... |
from django.shortcuts import render
from django.template.loader import get_template
from django.http import HttpResponse
from .forms import newMember
from ematrikeln.models import *
from django.shortcuts import redirect
def index(req):
allMembers = User.objects.all()
return(render(req,'index.html',{'all':allM... | {
"repo_name": "orriborri/ematrikeln",
"path": "ematrikeln/ematrikeln/views.py",
"copies": "1",
"size": "2256",
"license": "mit",
"hash": -8712618399819709000,
"line_mean": 36.5833333333,
"line_max": 211,
"alpha_frac": 0.6678492239,
"autogenerated": false,
"ratio": 3.1895332390381896,
"config_te... |
from django.shortcuts import render
from django.template.loader import get_template
from django.template import Context
from django.http import Http404, HttpResponse, HttpResponseRedirect
import datetime
def hello(request):
return HttpResponse("Hello world")
def current_datetime(request):
now = datetime.dat... | {
"repo_name": "fbreversg/django_playing",
"path": "book/views.py",
"copies": "1",
"size": "2338",
"license": "mit",
"hash": -6048836603612520000,
"line_mean": 27.512195122,
"line_max": 88,
"alpha_frac": 0.6753635586,
"autogenerated": false,
"ratio": 3.807817589576547,
"config_test": false,
"h... |
from django.shortcuts import render
from django.template.loader import render_to_string
from django.http import HttpResponse
from django.db.models import Max, Min
from shownotes.models import Show
import json
import searches
TOPIC_SEARCH_LIMIT = 10
RESULTS_SEARCH_LIMIT = 20
def index(request):
agg = Show.object... | {
"repo_name": "lifenoodles/nasearch",
"path": "shownotes/views.py",
"copies": "1",
"size": "2028",
"license": "mit",
"hash": -5387990823513115000,
"line_mean": 31.7096774194,
"line_max": 79,
"alpha_frac": 0.6267258383,
"autogenerated": false,
"ratio": 3.7007299270072993,
"config_test": false,
... |
from django.shortcuts import render
from django.template.loader import render_to_string
from .forms import *
from lib.core.utils import load_class
class AbstractWidget(object):
field_instance = None
arguments = {}
context = None
def __init__(self, field, arguments=None, context=None):
self.fi... | {
"repo_name": "mrcrgl/gge-storage",
"path": "templated_forms/widgets.py",
"copies": "1",
"size": "3149",
"license": "mit",
"hash": -1003495522110570100,
"line_mean": 24.3951612903,
"line_max": 91,
"alpha_frac": 0.6694188631,
"autogenerated": false,
"ratio": 4.001270648030496,
"config_test": fal... |
from django.shortcuts import render
from django.template.response import TemplateResponse
from django.core.mail import EmailMessage
from django.contrib import messages
from django.conf import settings
from django.shortcuts import render_to_response, redirect
from django.template import RequestContext, loader, Context
... | {
"repo_name": "arbin/aloeveraofforever",
"path": "aloeveraofforever/aloeveraofforever/flp/views.py",
"copies": "1",
"size": "12092",
"license": "mit",
"hash": -6162807350295683000,
"line_mean": 39.5805369128,
"line_max": 130,
"alpha_frac": 0.649520344,
"autogenerated": false,
"ratio": 3.623614024... |
from django.shortcuts import render
from django.template.response import TemplateResponse
from django.http import HttpResponse, HttpResponseRedirect
from django.core import serializers
import logging
import json
from qpage.models import *
from .models import *
from .method import *
from qcms.models import Article, Ca... | {
"repo_name": "gzqichang/wa",
"path": "qsite/qsite/views.py",
"copies": "1",
"size": "7846",
"license": "mit",
"hash": 4085740318013921300,
"line_mean": 28.2,
"line_max": 103,
"alpha_frac": 0.5907211166,
"autogenerated": false,
"ratio": 3.84401390958768,
"config_test": false,
"has_no_keywords... |
from django.shortcuts import render
from django.template.response import TemplateResponse
from models import *
import random
# Create your views here.
def reverse_pitch(request):
# "Static" text here. OPTIONAL
intro = "US Ignite Will Convene Reverse Pitch Events in Nine Communities Throughout the United State... | {
"repo_name": "us-ignite/us_ignite",
"path": "us_ignite/smart_gigabit_communities/views.py",
"copies": "1",
"size": "1477",
"license": "bsd-3-clause",
"hash": -243480648344023100,
"line_mean": 66.1363636364,
"line_max": 800,
"alpha_frac": 0.7664184157,
"autogenerated": false,
"ratio": 3.917771883... |
from django.shortcuts import render
from django.template.response import TemplateResponse
from Questions.models import *
from TestAllocation.models import *
import datetime
from django.http import HttpResponse
import requests
# Create your views here.
def mcq(request):
ob=QuizQuestion.objects.all().order_by('?')[:4]
... | {
"repo_name": "SJIT-Hackerspace/SJIT-CodingPortal",
"path": "Student/views.py",
"copies": "1",
"size": "12619",
"license": "apache-2.0",
"hash": -2726682545637226000,
"line_mean": 30.3126550868,
"line_max": 395,
"alpha_frac": 0.680323322,
"autogenerated": false,
"ratio": 3.1088938162108892,
"co... |
from django.shortcuts import render
from django.urls import reverse_lazy
from apps.utils import views
from . import models, forms
# Create your views here.
class TipoNegocioBaseView(object):
model = models.TipoNegocio
form_class = forms.TipoNegocioForm
success_url = reverse_lazy('emprendimiento:lista_tipo... | {
"repo_name": "0sw4l/villas-de-san-pablo",
"path": "apps/emprendimiento/views.py",
"copies": "1",
"size": "5109",
"license": "mit",
"hash": 8649645591196888000,
"line_mean": 28.1942857143,
"line_max": 213,
"alpha_frac": 0.7803875514,
"autogenerated": false,
"ratio": 2.858981533296027,
"config_t... |
from django.shortcuts import render
from django.urls import reverse_lazy
from django.views.decorators.cache import never_cache
from django.views.decorators.http import require_GET
from django.views.generic import RedirectView
from ratelimit.decorators import ratelimit
from kuma.api.v1.views import search as search_api... | {
"repo_name": "mozilla/kuma",
"path": "kuma/search/views.py",
"copies": "1",
"size": "2177",
"license": "mpl-2.0",
"hash": -8954964260071146000,
"line_mean": 31.9848484848,
"line_max": 90,
"alpha_frac": 0.6936150666,
"autogenerated": false,
"ratio": 3.75993091537133,
"config_test": false,
"ha... |
from django.shortcuts import render
from django.urls import reverse_lazy
from apps.utils import views
from . import models, forms
# Create your views here.
class VacanteBaseView(object):
model = models.Vacante
form_class = forms.VacanteForm
success_url = reverse_lazy('empleabilidad:lista_vacantes')
cla... | {
"repo_name": "0sw4l/villas-de-san-pablo",
"path": "apps/empleabilidad/views.py",
"copies": "1",
"size": "1277",
"license": "mit",
"hash": 5094666404386182000,
"line_mean": 26.170212766,
"line_max": 81,
"alpha_frac": 0.7729052467,
"autogenerated": false,
"ratio": 3.1845386533665834,
"config_tes... |
from django.shortcuts import render
from django.urls import reverse
from django.db import transaction
from scriptus_write.forms import UploadFileForm
from scriptus_write.utils import ostorybook as osb
from scriptus_write.utils import visutils as vis
from scriptus_write.model.story import Scene
from scriptus_write.mod... | {
"repo_name": "sinmaniphel/scriptus_write",
"path": "views/html.py",
"copies": "1",
"size": "1561",
"license": "apache-2.0",
"hash": 5882019042614471000,
"line_mean": 27.9074074074,
"line_max": 72,
"alpha_frac": 0.6777706598,
"autogenerated": false,
"ratio": 3.8353808353808354,
"config_test": f... |
from django.shortcuts import render
from django.urls import reverse
from django.http import HttpResponseRedirect
from checkout.forms import CheckoutForm
from checkout.models import Order, OrderItem
from checkout import checkout
from cart import cart
from accounts import profile
def show_checkout(request, template_na... | {
"repo_name": "mathuin/pyment",
"path": "django/checkout/views.py",
"copies": "1",
"size": "1804",
"license": "mit",
"hash": -7814751077648873000,
"line_mean": 36.5833333333,
"line_max": 67,
"alpha_frac": 0.6590909091,
"autogenerated": false,
"ratio": 4.305489260143198,
"config_test": false,
... |
from django.shortcuts import render
from django.urls import reverse
from django.http import HttpResponseRedirect
from .forms import CarForm,RentForm, CarFormFactory
from .models import Car, Rent, CarModelForm, RentModelForm
from django.forms import modelformset_factory
from django.forms import modelform_factory
from d... | {
"repo_name": "wasit7/tutorials",
"path": "django/django_generic_view/generic/myapp/views.py",
"copies": "1",
"size": "4857",
"license": "mit",
"hash": -4147191878859660000,
"line_mean": 24.0360824742,
"line_max": 75,
"alpha_frac": 0.6775787523,
"autogenerated": false,
"ratio": 3.240160106737825,... |
from django.shortcuts import render
from django.urls import reverse
from django.http import HttpResponseRedirect
import sqlite3
import datetime
from .utilities import *
def index(request):
with connect() as con:
sessions = con.execute('SELECT * FROM sessions NATURAL JOIN movies').fetchall()
return r... | {
"repo_name": "Mogby/CineMaster",
"path": "cinemaster/session/views.py",
"copies": "1",
"size": "1395",
"license": "mit",
"hash": 4091334416259008500,
"line_mean": 34.7948717949,
"line_max": 104,
"alpha_frac": 0.6200716846,
"autogenerated": false,
"ratio": 4.043478260869565,
"config_test": fals... |
from django.shortcuts import render
from django.urls import reverse
from .forms import CustomSurveyForm
from .models import SenateProjects, StudentProjects
from django.shortcuts import get_object_or_404
from django.http import HttpResponseRedirect
def senate_project_survey(request, projectid):
"""
Generalized view ... | {
"repo_name": "ByrdOfAFeather/AlphaTrion",
"path": "Project/views.py",
"copies": "1",
"size": "2528",
"license": "mit",
"hash": -816587688429682200,
"line_mean": 22.2018348624,
"line_max": 88,
"alpha_frac": 0.7318037975,
"autogenerated": false,
"ratio": 3.444141689373297,
"config_test": false,
... |
from django.shortcuts import render
from django.utils.crypto import get_random_string
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User, make_password
from django.contrib.auth import login
from django.conf import settings
from altauth.models import AlternativePasswor... | {
"repo_name": "MirkoRossini/django-altauth",
"path": "src/main/python/altauth/views.py",
"copies": "1",
"size": "4972",
"license": "mit",
"hash": -4055868603803111400,
"line_mean": 34.5142857143,
"line_max": 84,
"alpha_frac": 0.6082059533,
"autogenerated": false,
"ratio": 4.459192825112107,
"co... |
from django.shortcuts import render
from django.utils.decorators import method_decorator
from django.http import HttpResponse, HttpResponseRedirect
from django.template import RequestContext
from django.views.generic.edit import UpdateView
from guardian.decorators import permission_required_or_403
from js1kg.project.mo... | {
"repo_name": "dazhaoniel/1kg-more",
"path": "js1kg/organization/views.py",
"copies": "1",
"size": "2342",
"license": "apache-2.0",
"hash": -5360194922495357000,
"line_mean": 38.05,
"line_max": 199,
"alpha_frac": 0.7143467122,
"autogenerated": false,
"ratio": 3.8330605564648117,
"config_test": ... |
from django.shortcuts import render
from django.utils.decorators import method_decorator
from django.utils import timezone
from django.template import RequestContext
from django.views.generic.edit import CreateView, UpdateView
from guardian.decorators import permission_required_or_403
from js1kg.project.models import P... | {
"repo_name": "dazhaoniel/1kg-more",
"path": "js1kg/project/views.py",
"copies": "1",
"size": "3042",
"license": "apache-2.0",
"hash": -5211687627842844000,
"line_mean": 31.7204301075,
"line_max": 150,
"alpha_frac": 0.6591058514,
"autogenerated": false,
"ratio": 3.797752808988764,
"config_test"... |
from django.shortcuts import render
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from usuarios.decorator import check_login
from supra import views as supra
import models
from usuarios import models as usuarios
import forms
class TipoActividadFormView(supra... | {
"repo_name": "exildev/Piscix",
"path": "actividades/views.py",
"copies": "2",
"size": "3502",
"license": "mit",
"hash": 8221829687338025000,
"line_mean": 31.128440367,
"line_max": 153,
"alpha_frac": 0.6933181039,
"autogenerated": false,
"ratio": 3.163504968383017,
"config_test": false,
"has_... |
from django.shortcuts import render
from django.utils.decorators import method_decorator
from django.views.generic import View
from silk.auth import login_possibly_required, permissions_possibly_required
from silk.models import Profile
from silk.views.code import _code_context, _code_context_from_request
class Profil... | {
"repo_name": "jazzband/silk",
"path": "silk/views/profile_detail.py",
"copies": "4",
"size": "1516",
"license": "mit",
"hash": 2881158477394314000,
"line_mean": 35.0952380952,
"line_max": 88,
"alpha_frac": 0.6167546174,
"autogenerated": false,
"ratio": 4.075268817204301,
"config_test": false,
... |
from django.shortcuts import render
from django.utils.encoding import force_text
from django.utils.safestring import mark_safe
from django.views.generic import View, FormView, TemplateView
from Main.models import Category, Article, Comment
import copy;
from Main.forms import WriteForm, CommentForm
from datetime import ... | {
"repo_name": "Lobo-Prix/Blog",
"path": "Blog/Main/views.py",
"copies": "1",
"size": "3868",
"license": "mit",
"hash": -5169327884084911000,
"line_mean": 40.2795698925,
"line_max": 209,
"alpha_frac": 0.6641479937,
"autogenerated": false,
"ratio": 3.740740740740741,
"config_test": false,
"has_... |
from django.shortcuts import render
from django.utils.http import urlquote
from django.utils.http import urlencode
from django.http import HttpResponse
from django.db.models import Max
from math import sqrt
from first_app.models import *
from first_app.utils import *
action_dict = dict()
# Create your views here.
de... | {
"repo_name": "CONSOLNY/rglk",
"path": "first_app/BAKviews.py",
"copies": "1",
"size": "3532",
"license": "mit",
"hash": -52909288302342740,
"line_mean": 27.2177419355,
"line_max": 109,
"alpha_frac": 0.5924549871,
"autogenerated": false,
"ratio": 3.082819383259912,
"config_test": false,
"has_... |
from django.shortcuts import render
from django.utils import simplejson as json
from md_plotter.dimension_flattener import DimensionFlattener
import os
import logging
import re
from django import http
# from md_plotter import JSONResponseMixin
# class MyCustomUserView():
# pass
# class JSONDetailView(JSONResponseM... | {
"repo_name": "thegreatmichael/DimEnsion-Reduction-Plotter",
"path": "plotter/md_plotter/views.py",
"copies": "1",
"size": "1514",
"license": "mit",
"hash": 5209186399204262000,
"line_mean": 34.2325581395,
"line_max": 101,
"alpha_frac": 0.714663144,
"autogenerated": false,
"ratio": 3.058585858585... |
from django.shortcuts import render
from django.utils import simplejson
from django.http import HttpResponse
import urllib2
import json
def homepage(request):
return render(request,'homepage.html')
def userIsLogged(request):
result = []
if ('isLogged' in request.session):
result.append({"isLogged":request.sessi... | {
"repo_name": "vitoss/Corpo-Chat",
"path": "Frontend/Frontend/views.py",
"copies": "1",
"size": "1623",
"license": "mit",
"hash": -8385822435068707000,
"line_mean": 31.46,
"line_max": 167,
"alpha_frac": 0.7159581023,
"autogenerated": false,
"ratio": 3.6802721088435373,
"config_test": false,
"... |
from django.shortcuts import render
from django.utils import timezone
from django.contrib.auth.decorators import login_required
from django.db.models import Q
from django.template import RequestContext
from guardian.decorators import permission_required_or_403
from .models import MessageThread, Message
from .forms impo... | {
"repo_name": "dazhaoniel/1kg-more",
"path": "js1kg/message/views.py",
"copies": "1",
"size": "2298",
"license": "apache-2.0",
"hash": -40729602650162820,
"line_mean": 34.3538461538,
"line_max": 171,
"alpha_frac": 0.6679721497,
"autogenerated": false,
"ratio": 3.792079207920792,
"config_test": ... |
from django.shortcuts import render
from django.utils import timezone
from django.shortcuts import render, render_to_response
from django.http import HttpResponse, HttpResponseRedirect
from django.core.urlresolvers import reverse_lazy, reverse
from django.views.decorators.csrf import csrf_protect
from django.contrib.au... | {
"repo_name": "harinarayan/samyogam",
"path": "recruit/views.py",
"copies": "1",
"size": "3629",
"license": "apache-2.0",
"hash": 6375721245720857000,
"line_mean": 28.2661290323,
"line_max": 86,
"alpha_frac": 0.7280242491,
"autogenerated": false,
"ratio": 3.407511737089202,
"config_test": false... |
from django.shortcuts import render
from django.utils import timezone
from .models import Passbook
from .forms import PassbookForm
from django.shortcuts import redirect
from django.shortcuts import get_object_or_404
def index(request):
return render(request, 'piggybank/index.html', {})
def mypassbook(request):
... | {
"repo_name": "manojpandey/hackenvision16",
"path": "tinybank/tinybank/piggybank/views.py",
"copies": "2",
"size": "1749",
"license": "mit",
"hash": 6400405777287349000,
"line_mean": 37.0217391304,
"line_max": 93,
"alpha_frac": 0.6798170383,
"autogenerated": false,
"ratio": 3.6821052631578945,
... |
from django.shortcuts import render
from django.utils import timezone
from .models import Post
from django.shortcuts import render, get_object_or_404
from .forms import PostForm
from django.shortcuts import redirect
def post_list(request):
posts = Post.objects.filter(published_date__lte=timezone.now()).order_by('p... | {
"repo_name": "Jonothompson/my-django-blog",
"path": "blog/views.py",
"copies": "1",
"size": "1523",
"license": "mit",
"hash": 3245931103203006000,
"line_mean": 36.1707317073,
"line_max": 94,
"alpha_frac": 0.6323046619,
"autogenerated": false,
"ratio": 3.669879518072289,
"config_test": false,
... |
from django.shortcuts import render
from django.utils import timezone
from .models import Post
from django.shortcuts import render, get_object_or_404
from .forms import PostForm
from django.shortcuts import redirect
# Create your views here.
def post_list(request):
posts = Post.objects.filter(published_date__l... | {
"repo_name": "sunbc0120/djangoboy",
"path": "blog/views.py",
"copies": "1",
"size": "1513",
"license": "mit",
"hash": 986700683721400400,
"line_mean": 31.8913043478,
"line_max": 94,
"alpha_frac": 0.6358228685,
"autogenerated": false,
"ratio": 3.6196172248803826,
"config_test": false,
"has_no... |
from django.shortcuts import render
from django.utils import timezone
from .models import Todo
from .forms import TodoForm
from django.shortcuts import redirect
from django.shortcuts import get_object_or_404
def index(request):
todos=Todo.objects.order_by('deadline')
return render(request, 'index.html', {'todos':tod... | {
"repo_name": "tu-mcleish/PPSN",
"path": "Aufgabe2/todo/todoapp/views.py",
"copies": "1",
"size": "1111",
"license": "mit",
"hash": 4429789206932680000,
"line_mean": 29.027027027,
"line_max": 56,
"alpha_frac": 0.7137713771,
"autogenerated": false,
"ratio": 3.0190217391304346,
"config_test": fal... |
from django.shortcuts import render
from django.utils import timezone
import django_rq
from rq.job import Job
from api.models import ModelRun, KubePod, KubeMetric
import os
# Create your views here.
def index(request):
return render(request, 'main/index.html')
def worker(request, pod_name):
worker = KubeP... | {
"repo_name": "mlbench/mlbench",
"path": "mlbench/master/main/views.py",
"copies": "1",
"size": "1682",
"license": "apache-2.0",
"hash": 7773472686708321000,
"line_mean": 26.5737704918,
"line_max": 71,
"alpha_frac": 0.6337693222,
"autogenerated": false,
"ratio": 3.364,
"config_test": false,
"... |
from django.shortcuts import render
from django.utils import timezone
# Create your views here.
from django.http import HttpResponse
"""
def index(request):
return HttpResponse("Hello, world. You're at the polls index.")
"""
def results(request, question_id):
response = "You're looking at the results of qu... | {
"repo_name": "nchikkam/web",
"path": "mysite/polls/views.py",
"copies": "1",
"size": "3361",
"license": "mit",
"hash": 3192503163236082000,
"line_mean": 27.2521008403,
"line_max": 75,
"alpha_frac": 0.6926509967,
"autogenerated": false,
"ratio": 3.963443396226415,
"config_test": false,
"has_n... |
from django.shortcuts import render
from django.utils import timezone
from rest_framework import viewsets, filters, generics
from rest_framework.response import Response
from .models import *
from .serializers import LeadSerializer, CallSerializer, AdTypeSerializer
def calls_per_flight(request):
now = timezone.... | {
"repo_name": "edilio/dental",
"path": "marketing/views.py",
"copies": "1",
"size": "2393",
"license": "mit",
"hash": 8408171640466555000,
"line_mean": 32.25,
"line_max": 78,
"alpha_frac": 0.636857501,
"autogenerated": false,
"ratio": 3.8973941368078178,
"config_test": false,
"has_no_keywords... |
from django.shortcuts import render
from django.utils.text import slugify
from django.urls import reverse
from django.http import HttpResponseRedirect
from wagtail.admin.modal_workflow import render_modal_workflow
from .forms import AuthorAdminForm
def get_result(instance):
if instance:
return {
... | {
"repo_name": "PARINetwork/pari",
"path": "author/views.py",
"copies": "1",
"size": "1283",
"license": "bsd-3-clause",
"hash": 8909849471150167000,
"line_mean": 23.6730769231,
"line_max": 62,
"alpha_frac": 0.597817615,
"autogenerated": false,
"ratio": 4.305369127516778,
"config_test": false,
... |
from django.shortcuts import render
from django.utils.timezone import now
from django.views.generic import TemplateView
from daiquiri.core.views import ModelPermissionMixin
from .forms import ContactForm
from .utils import send_contact_message
def contact(request):
contact_form = ContactForm(request.POST or Non... | {
"repo_name": "aipescience/django-daiquiri",
"path": "daiquiri/contact/views.py",
"copies": "1",
"size": "1383",
"license": "apache-2.0",
"hash": -5573394028052292000,
"line_mean": 27.8125,
"line_max": 74,
"alpha_frac": 0.6290672451,
"autogenerated": false,
"ratio": 4.3627760252365935,
"config_... |
from django.shortcuts import render
from django.utils.translation import string_concat
from django.utils.translation import ugettext_lazy as _
from respite import Views, Resource
from respite.decorators import route, before
from respite.urls import templates
from models import Article
class ArticleViews(Views, Resou... | {
"repo_name": "jgorset/django-respite",
"path": "tests/project/app/views.py",
"copies": "1",
"size": "1599",
"license": "mit",
"hash": -3323340944249024000,
"line_mean": 28.0727272727,
"line_max": 87,
"alpha_frac": 0.5728580363,
"autogenerated": false,
"ratio": 4.441666666666666,
"config_test":... |
from django.shortcuts import render
from django.utils.translation import ugettext as _
from django.contrib import messages
from django.contrib.auth.mixins import LoginRequiredMixin
from django.views import View
from subscriber_management.models import List, Subscriber
from campaign_management.models import Campaign
fro... | {
"repo_name": "minimail/minimail",
"path": "analytics_management/views.py",
"copies": "1",
"size": "21442",
"license": "mit",
"hash": -2740314143664363500,
"line_mean": 40.1554702495,
"line_max": 144,
"alpha_frac": 0.5828747318,
"autogenerated": false,
"ratio": 4.042609351432881,
"config_test":... |
from django.shortcuts import render
from django.utils.translation import ugettext as _
from django.db.models import Avg, Sum
import datetime
from django.core.exceptions import PermissionDenied
from django.http.response import HttpResponseRedirect
import logging
logger = logging.getLogger(__name__)
#application import... | {
"repo_name": "vollov/lotad",
"path": "game/views.py",
"copies": "1",
"size": "11697",
"license": "mit",
"hash": 7353083817252888000,
"line_mean": 31.2231404959,
"line_max": 114,
"alpha_frac": 0.5631358468,
"autogenerated": false,
"ratio": 3.78666235027517,
"config_test": false,
"has_no_keywo... |
from django.shortcuts import render
from django.utils.translation import ugettext as _
from django.db.models import Avg, Sum
import datetime
from models import Season, Game, PlayerGameScore
from team.models import Player
from service import GamePhotoHelper
from content.models import Image
import logging
logger = log... | {
"repo_name": "vollov/ocbl.ca",
"path": "django/game/views.py",
"copies": "1",
"size": "6124",
"license": "mit",
"hash": -2834386007621242000,
"line_mean": 31.0628272251,
"line_max": 124,
"alpha_frac": 0.5795231875,
"autogenerated": false,
"ratio": 3.537839399191219,
"config_test": false,
"ha... |
from django.shortcuts import render
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.decorators import login_required
from feed.models import FeedItem
@login_required
def home(request):
"""
User's home.
"""
context = {
"feed_list": None,
"feed_title": ""... | {
"repo_name": "jsargiot/simple-django-feed",
"path": "feed/views.py",
"copies": "1",
"size": "1096",
"license": "mit",
"hash": 1058340172847394000,
"line_mean": 34.3548387097,
"line_max": 170,
"alpha_frac": 0.6414233577,
"autogenerated": false,
"ratio": 3.7027027027027026,
"config_test": false,... |
from django.shortcuts import render
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ugettext as __
from django.conf import settings
from translation_server.models import *
from translation_server.serializers import *
from rest_framework import viewsets
from rest_framework im... | {
"repo_name": "gdelnegro/django-translation-server",
"path": "translation_server/views.py",
"copies": "1",
"size": "2189",
"license": "mit",
"hash": 8804022525850251000,
"line_mean": 38.1071428571,
"line_max": 81,
"alpha_frac": 0.6934673367,
"autogenerated": false,
"ratio": 4.598739495798319,
"... |
from django.shortcuts import render
from django.views.decorators.cache import cache_page
from django.core import serializers
from django.conf import settings
from django.shortcuts import render, redirect, get_object_or_404
from django.http import HttpResponseRedirect, HttpResponse, Http404
from django.contrib.gis.short... | {
"repo_name": "pellagic-puffbomb/django-mapfiles",
"path": "djangomapfiles/views.py",
"copies": "1",
"size": "4352",
"license": "bsd-3-clause",
"hash": 1408919035592935400,
"line_mean": 33.816,
"line_max": 77,
"alpha_frac": 0.6206341912,
"autogenerated": false,
"ratio": 3.9420289855072466,
"con... |
from django.shortcuts import render
from django.views.decorators.cache import cache_page
from .models import *
@cache_page(60)
def index(request):
slider_block = MainSliderBlock.objects.first()
awards_block = AwardsBlock.objects.first()
education_block = EducationBlock.objects.first()
portfolio_block ... | {
"repo_name": "cthtuf/django-cv",
"path": "main/views.py",
"copies": "1",
"size": "1699",
"license": "mit",
"hash": 81829208754004580,
"line_mean": 35.1489361702,
"line_max": 63,
"alpha_frac": 0.6733372572,
"autogenerated": false,
"ratio": 3.4673469387755103,
"config_test": false,
"has_no_key... |
from django.shortcuts import render
from django.views.decorators.csrf import csrf_exempt
from api.models import Post, Comment, Image, Friending, Author, Node
from api.serializers import PostSerializer, CommentSerializer, ImageSerializer, AuthorSerializer, FriendingSerializer
from api.serializers import UserSerializer
f... | {
"repo_name": "CMPUT404Group/CMPUT404-project-socialdistribution",
"path": "api/views.py",
"copies": "1",
"size": "48993",
"license": "apache-2.0",
"hash": 9132379800379256000,
"line_mean": 40.8029010239,
"line_max": 225,
"alpha_frac": 0.6279468495,
"autogenerated": false,
"ratio": 4.241083795013... |
from django.shortcuts import render
from django.views.decorators.csrf import csrf_exempt
from django.conf import settings
from simple_salesforce import Salesforce
import base64
import hashlib
import hmac
import json
@csrf_exempt
def index(request):
"""
When this view is loaded in a canvas app, Salesforce send... | {
"repo_name": "TopOPPS/salesforce_user_group_April_3_2014",
"path": "demo/views.py",
"copies": "1",
"size": "2691",
"license": "mit",
"hash": 3615528226043104000,
"line_mean": 35.8767123288,
"line_max": 119,
"alpha_frac": 0.6651802304,
"autogenerated": false,
"ratio": 4.028443113772455,
"config... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.