text stringlengths 0 1.05M | meta dict |
|---|---|
from django.shortcuts import render
from aspc.menu.models import Menu, MenuSerializer
from aspc.courses.models import Instructor, InstructorSerializer, CourseSerializer, Course, Department, DepartmentSerializer
from django.http import Http404
from rest_framework.views import APIView
from rest_framework.response import ... | {
"repo_name": "aspc/mainsite",
"path": "aspc/api/views.py",
"copies": "1",
"size": "8166",
"license": "mit",
"hash": -2482989327322548700,
"line_mean": 36.6359447005,
"line_max": 133,
"alpha_frac": 0.7174871418,
"autogenerated": false,
"ratio": 4.291119285338938,
"config_test": false,
"has_no... |
from django.shortcuts import render
from authentication.models import Account
from groups.serializers import GroupSerializer
from posts.models import Post
from groups.models import KGroup
from access.models import AccessRule
from access.serializers import AccessRuleSerializer
from rest_framework import viewsets
from re... | {
"repo_name": "bewallyt/Kalendr",
"path": "access/views.py",
"copies": "2",
"size": "8408",
"license": "mit",
"hash": -1788072187771823000,
"line_mean": 34.9316239316,
"line_max": 118,
"alpha_frac": 0.6182207422,
"autogenerated": false,
"ratio": 4.399790685504971,
"config_test": false,
"has_n... |
from django.shortcuts import render
from .backend import *
from .forms import InputForm
def index(request):
# Genereerib tavalise formi HTML's kui formi ei ole saadetud.
if request.method != "POST":
form = InputForm()
return render(request, "website/index.html", {'form': form})
else:
# Salvestab enda sisse... | {
"repo_name": "mrxkollo/Suvepraktika-2017",
"path": "website/views.py",
"copies": "2",
"size": "1579",
"license": "mit",
"hash": 7423621816613286000,
"line_mean": 45.1176470588,
"line_max": 203,
"alpha_frac": 0.6849489796,
"autogenerated": false,
"ratio": 2.790035587188612,
"config_test": false... |
from django.shortcuts import render
from biosensorsdb.forms import ProjectForm, NO_BIOSENSOR_PREF
from biosensorsdb.models import Project
from django.db.models import Q
from taggit.models import Tag
from django.views.decorators.clickjacking import xframe_options_exempt
import operator
@xframe_options_exempt
def index(... | {
"repo_name": "100ideas/igembiosensors",
"path": "biosensorsdb/views.py",
"copies": "2",
"size": "3005",
"license": "mit",
"hash": -3742177114854848000,
"line_mean": 35.6463414634,
"line_max": 79,
"alpha_frac": 0.6915141431,
"autogenerated": false,
"ratio": 3.687116564417178,
"config_test": fal... |
from django.shortcuts import render
from birde.models import Message,Connection,User,Chat
from django.http import HttpResponse
from django.shortcuts import redirect
import json, datetime
from django.views.decorators.csrf import csrf_exempt
import smtp_client
import pop_client
def responsePrintAll():
all_messages=... | {
"repo_name": "GiladE/birde",
"path": "birde/views.py",
"copies": "1",
"size": "7215",
"license": "mit",
"hash": -1909550096833899000,
"line_mean": 48.7655172414,
"line_max": 226,
"alpha_frac": 0.6716562717,
"autogenerated": false,
"ratio": 3.5806451612903225,
"config_test": false,
"has_no_ke... |
from django.shortcuts import render
from bitcoin_api.serializers import WalletSerializer ,WalletCreateSerializer
from django_bitcoin.models import Wallet
from django.http import Http404
from rest_framework.views import APIView
from rest_framework import generics, permissions
from rest_framework.response import Respons... | {
"repo_name": "texib/bitcoin-zoo",
"path": "bitcoin_api/views.py",
"copies": "1",
"size": "1687",
"license": "mit",
"hash": -7425647597645396000,
"line_mean": 34.8936170213,
"line_max": 84,
"alpha_frac": 0.7326615293,
"autogenerated": false,
"ratio": 4.186104218362283,
"config_test": false,
"... |
from django.shortcuts import render
from blog.forms import PostForm, PostEditForm
from blog.models import Post
from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.http import Http404
# Create your views here.
def index(re... | {
"repo_name": "ninjahoahong/django-basic-crud",
"path": "djabacrud/blog/views.py",
"copies": "2",
"size": "2071",
"license": "mit",
"hash": 6374926499244869000,
"line_mean": 32.4032258065,
"line_max": 79,
"alpha_frac": 0.6286817962,
"autogenerated": false,
"ratio": 4.23517382413088,
"config_tes... |
from django.shortcuts import render
from blog.models import Blog, BlogTag
from rest_framework import viewsets
from rest_framework.response import Response
from blog.serializers import BlogSerializer, BlogTagSerializer
def blog_detail(request, blog_slug):
"""show blog content as markdown - HTTP GET /blog/@blog_id
... | {
"repo_name": "vollov/django-blog",
"path": "blog/views.py",
"copies": "1",
"size": "1615",
"license": "mit",
"hash": 1788620735180760600,
"line_mean": 31.9795918367,
"line_max": 95,
"alpha_frac": 0.6390092879,
"autogenerated": false,
"ratio": 3.9975247524752477,
"config_test": false,
"has_no... |
from django.shortcuts import render
from blog.models import *
import logging
logger = logging.getLogger(__name__)
def list_posts(**kwargs):
limit = int(kwargs.get('limit', 100))
offset = int(kwargs.get('offset', 0))
posts = Post.objects.all()
count = posts.count()
posts = [get_post(post) for post... | {
"repo_name": "arosswilson/rossreckons",
"path": "blog/services/api.py",
"copies": "1",
"size": "1271",
"license": "mit",
"hash": 5472994610214245000,
"line_mean": 21.298245614,
"line_max": 67,
"alpha_frac": 0.5562549174,
"autogenerated": false,
"ratio": 3.3893333333333335,
"config_test": false... |
from django.shortcuts import render
from blog.models import *
# from django.http import Http404
# from django.core.exceptions import ObjectDoesNotExist
# Create your views here.
def index(request):
list = Article.objects.all()
if len(list) > 5:
list = list[:5]
return render(request, 'index.html... | {
"repo_name": "BenjyAir/python_blog",
"path": "website/blog/views.py",
"copies": "2",
"size": "2368",
"license": "apache-2.0",
"hash": 6315738389060226000,
"line_mean": 21.5523809524,
"line_max": 73,
"alpha_frac": 0.4814189189,
"autogenerated": false,
"ratio": 3.4926253687315634,
"config_test":... |
from django.shortcuts import render
from blog.models import Post
from content.models import MindStream
from django.contrib.markup.templatetags.markup import markdown
from django.template import loader, Context
from django.contrib.sites.models import Site
def get_mind_stream_random():
try:
item = MindStream... | {
"repo_name": "tedor/home-blog",
"path": "content/views.py",
"copies": "1",
"size": "1826",
"license": "bsd-3-clause",
"hash": -7529880101091842000,
"line_mean": 27.0923076923,
"line_max": 105,
"alpha_frac": 0.6122672508,
"autogenerated": false,
"ratio": 3.6740442655935612,
"config_test": false... |
from django.shortcuts import render
from blog.models import Post
from django.utils import timezone
from django.views.generic import (TemplateView, ListView,
DetailView,)
class AboutView(TemplateView):
template_name = 'about.html'
class IndexView(TemplateView):
template_name = '... | {
"repo_name": "ramza/brainjar",
"path": "brainjar/blog/views.py",
"copies": "1",
"size": "1154",
"license": "artistic-2.0",
"hash": 3106006845587587000,
"line_mean": 25.2272727273,
"line_max": 98,
"alpha_frac": 0.7279029463,
"autogenerated": false,
"ratio": 3.4759036144578315,
"config_test": fa... |
from django.shortcuts import render
from bongo.apps.bongo import models
from django.http import HttpResponsePermanentRedirect, Http404
from django.core.urlresolvers import reverse
def HomeView(request):
recent = models.Post.objects.order_by("-published")[:50]
sections = models.Section.objects.all()
# e... | {
"repo_name": "BowdoinOrient/bongo",
"path": "bongo/apps/frontend/views.py",
"copies": "1",
"size": "2964",
"license": "mit",
"hash": 1763304623203112700,
"line_mean": 30.2,
"line_max": 104,
"alpha_frac": 0.6609311741,
"autogenerated": false,
"ratio": 3.6502463054187193,
"config_test": false,
... |
from django.shortcuts import render
from bootcamp.activities.models import Notification
from django.http import HttpResponse, HttpResponseBadRequest
from django.contrib.auth.decorators import login_required
from bootcamp.decorators import ajax_required
@login_required
def notifications(request):
user = request.use... | {
"repo_name": "o5k/bootcamp-ihealth",
"path": "bootcamp/activities/views.py",
"copies": "12",
"size": "1238",
"license": "mit",
"hash": -3374443605528079000,
"line_mean": 37.71875,
"line_max": 98,
"alpha_frac": 0.7576736672,
"autogenerated": false,
"ratio": 4.328671328671328,
"config_test": fal... |
from django.shortcuts import render
from bootcamp.activities.models import Notification
from django.http import HttpResponse
from django.contrib.auth.decorators import login_required
from bootcamp.decorators import ajax_required
@login_required
def notifications(request):
user = request.user
notifications = N... | {
"repo_name": "davismathew/netbot-django",
"path": "bootcamp/activities/views.py",
"copies": "6",
"size": "1362",
"license": "mit",
"hash": -1963240645558844000,
"line_mean": 31.4285714286,
"line_max": 69,
"alpha_frac": 0.6725403818,
"autogenerated": false,
"ratio": 4.729166666666667,
"config_t... |
from django.shortcuts import render
from braces.views import LoginRequiredMixin
from django.views.generic import TemplateView, CreateView, UpdateView, DetailView, DeleteView, ListView
from mylocation.models import Function
from django.contrib import messages
from django.core.urlresolvers import reverse_lazy
# Create y... | {
"repo_name": "chadgates/locmaster",
"path": "mylocation/views.py",
"copies": "1",
"size": "1430",
"license": "bsd-3-clause",
"hash": 1525608212901591300,
"line_mean": 28.1836734694,
"line_max": 103,
"alpha_frac": 0.7573426573,
"autogenerated": false,
"ratio": 4.156976744186046,
"config_test": ... |
from django.shortcuts import render
from BunqAPI.forms import GenerateKeyForm
from BunqAPI.installation import Installation
from BunqAPI.callbacks import callback
from django.http import HttpResponse, HttpResponseForbidden
# from django.contrib.auth import authenticate
from django.contrib.auth.models import User
# from... | {
"repo_name": "OGKevin/ComBunqWebApp",
"path": "BunqAPI/views.py",
"copies": "1",
"size": "4382",
"license": "mit",
"hash": 8125265214267094000,
"line_mean": 35.5083333333,
"line_max": 78,
"alpha_frac": 0.618123716,
"autogenerated": false,
"ratio": 4.465851172273191,
"config_test": false,
"ha... |
from django.shortcuts import render
from cassandra.cluster import Cluster
from django.shortcuts import render
from django.http import HttpResponse
from administrator.queries import *
import time
import json
import string
# Create your views here.
exclude = ["scheme_id", "scheme_name", "s_constraints"]
map_attr = ["sc... | {
"repo_name": "factly/government-schemes",
"path": "users/views.py",
"copies": "2",
"size": "3853",
"license": "mit",
"hash": 2683127382424998000,
"line_mean": 21.9345238095,
"line_max": 81,
"alpha_frac": 0.6470282896,
"autogenerated": false,
"ratio": 2.8926426426426426,
"config_test": false,
... |
#from django.shortcuts import render
from categories.models import Category
from companies.models import Company
from complains.models import Complain
from rest_framework import viewsets
from rest_framework.views import APIView
from . serializers import CategorySerializer, CompanySerializer, ComplainSerializer
#clas... | {
"repo_name": "Brunux/shityjobs",
"path": "api/views.py",
"copies": "1",
"size": "1350",
"license": "mit",
"hash": 3621904894733897000,
"line_mean": 30.3953488372,
"line_max": 83,
"alpha_frac": 0.7533333333,
"autogenerated": false,
"ratio": 4.368932038834951,
"config_test": false,
"has_no_key... |
from django.shortcuts import render
from ception.activities.models import Notification
from django.http import HttpResponse, HttpResponseBadRequest
from django.contrib.auth.decorators import login_required
from ception.decorators import ajax_required
@login_required
def notifications(request):
user = request.user
... | {
"repo_name": "zyshin/Ception",
"path": "ception/activities/views.py",
"copies": "1",
"size": "1236",
"license": "mit",
"hash": 4317737516373456000,
"line_mean": 37.65625,
"line_max": 98,
"alpha_frac": 0.7572815534,
"autogenerated": false,
"ratio": 4.321678321678322,
"config_test": false,
"ha... |
from django.shortcuts import render
from classifier.models import Document, File, Community, Tag, Rating, Relationship, KeyWord
from django.views.generic.edit import FormView, UpdateView, DeleteView, CreateView
from django.contrib.auth.decorators import login_required, user_passes_test, permission_required
from django... | {
"repo_name": "ToferC/gcclassifier",
"path": "classifier/views.py",
"copies": "1",
"size": "21791",
"license": "mit",
"hash": 6481111073768543000,
"line_mean": 32.4217791411,
"line_max": 112,
"alpha_frac": 0.5955669772,
"autogenerated": false,
"ratio": 4.456237218813906,
"config_test": false,
... |
from django.shortcuts import render
from collections import defaultdict
from django.http import JsonResponse
from editions.models import Edition
def get_strings(names):
""" returns a list o fwordfrequences of propertie values in the database"""
names_string = " ".join(names)
d = defaultdict(int)
for w... | {
"repo_name": "acdh-oeaw/dig_ed_cat",
"path": "wordcloud/views.py",
"copies": "1",
"size": "1155",
"license": "mit",
"hash": -2215191146874469600,
"line_mean": 24.1086956522,
"line_max": 79,
"alpha_frac": 0.645021645,
"autogenerated": false,
"ratio": 3.75,
"config_test": false,
"has_no_keywor... |
from django.shortcuts import render
from .common import *
from .constants import *
def advanced_search(request):
""" Returns page containing multiple filters to use when searching """
data = {
"title": "Advanced Search",
"mode": "search",
"genres": GENRE_LIST,
"years": [str(x) f... | {
"repo_name": "DrDos0016/z2",
"path": "museum_site/views.py",
"copies": "1",
"size": "33451",
"license": "mit",
"hash": -2495012022762689500,
"line_mean": 35.5174672489,
"line_max": 142,
"alpha_frac": 0.5620627803,
"autogenerated": false,
"ratio": 3.6433939657989325,
"config_test": false,
"ha... |
from django.shortcuts import render
from .common import *
from .constants import *
def debug(request):
data = {"title": "DEBUG PAGE"}
#results = File.objects.filter(Q(author="Dr. Dos") | Q(review))
#print("Found", len(results), "by me")
#data["results"] = results
set_captcha_seed(request)
f ... | {
"repo_name": "DrDos0016/z2",
"path": "museum_site/debug.py",
"copies": "1",
"size": "2420",
"license": "mit",
"hash": -3451413232137410600,
"line_mean": 31.7027027027,
"line_max": 87,
"alpha_frac": 0.5524793388,
"autogenerated": false,
"ratio": 3.257065948855989,
"config_test": false,
"has_n... |
from django.shortcuts import render
from .common import *
def raise_error(request, status):
try:
status = int(status)
except ValueError:
status = 404
if status == 400:
return bad_request_400(request)
elif status == 403:
return permission_denied_403(request)
elif sta... | {
"repo_name": "DrDos0016/z2",
"path": "museum_site/errors.py",
"copies": "1",
"size": "1209",
"license": "mit",
"hash": 1269205560797957600,
"line_mean": 31.6756756757,
"line_max": 71,
"alpha_frac": 0.6608767577,
"autogenerated": false,
"ratio": 3.641566265060241,
"config_test": false,
"has_n... |
from django.shortcuts import render
from core.models import *
from core.forms import *
def index(requisicao):
contexto={
"faculdade":"FACULDADES PAULISTAS UNIDAS",
"facul":"FAPALUN",
"pagina":"HomePage"
}
return render(requisicao,"index.html",contexto)
def cadastro(requisicao):
... | {
"repo_name": "tecwebjoao/TecWeb-TF-2T-B-SI",
"path": "core/views.py",
"copies": "1",
"size": "1428",
"license": "apache-2.0",
"hash": -2209258093560421000,
"line_mean": 17.0759493671,
"line_max": 52,
"alpha_frac": 0.6253501401,
"autogenerated": false,
"ratio": 3.201793721973094,
"config_test":... |
from django.shortcuts import render
from dal.autocomplete import Select2QuerySetView
from django.contrib.auth.mixins import LoginRequiredMixin
from . import models
# Create your views here.
class CountryAutocomplete(LoginRequiredMixin, Select2QuerySetView):
def get_queryset(self):
# Don't forget to filter... | {
"repo_name": "pihentagyu/django_chms",
"path": "cities_local/views.py",
"copies": "1",
"size": "1633",
"license": "bsd-2-clause",
"hash": 5187667416504637000,
"line_mean": 28.1607142857,
"line_max": 71,
"alpha_frac": 0.6533986528,
"autogenerated": false,
"ratio": 4.123737373737374,
"config_tes... |
from django.shortcuts import render
from dashboard.models import Session, SessionLogStep, AgentLogStep
def _requests(steps):
it = iter(steps)
requests = []
for req in it:
try:
response_status = next(it).control_line.split(" ")[0]
except StopIteration:
response_statu... | {
"repo_name": "sh0ked/vmmaster-frontend",
"path": "session/views.py",
"copies": "1",
"size": "2171",
"license": "mit",
"hash": -2327307545365001000,
"line_mean": 30.4782608696,
"line_max": 103,
"alpha_frac": 0.6513127591,
"autogenerated": false,
"ratio": 3.49597423510467,
"config_test": false,
... |
from django.shortcuts import render
from data.models import Player, Champion, PlayerChampionMastery
from data.helper import *
from django.views.generic import TemplateView
import collections
from data.serializers import *
from django.http import Http404
from rest_framework.views import APIView
from rest_framework.respo... | {
"repo_name": "bobcosc/masteringmastery",
"path": "data/views.py",
"copies": "1",
"size": "2178",
"license": "mit",
"hash": -3439290052987440000,
"line_mean": 38.6181818182,
"line_max": 188,
"alpha_frac": 0.6951331497,
"autogenerated": false,
"ratio": 3.63,
"config_test": false,
"has_no_keywo... |
from django.shortcuts import render
from datasets.models import Dataset, Document, Modality, Term
from models.models import Topic
from visual.models import Polygon
from django.http import HttpResponse
import json
import os
import struct
from django.conf import settings
def allow(func):
def wrapped(request):
... | {
"repo_name": "bigartm/visartm",
"path": "api/views.py",
"copies": "1",
"size": "4532",
"license": "bsd-3-clause",
"hash": 386359172916855360,
"line_mean": 34.40625,
"line_max": 79,
"alpha_frac": 0.5467784643,
"autogenerated": false,
"ratio": 4.003533568904594,
"config_test": false,
"has_no_k... |
from django.shortcuts import render
from datetime import date, timedelta
from chicago.models import ChicagoBill, ChicagoEvent
from councilmatic_core.models import Action
from councilmatic_core.views import *
from django.conf import settings
class ChicagoIndexView(IndexView):
template_name = 'chicago/index.html'
... | {
"repo_name": "patcon/sfo-councilmatic",
"path": "chicago/views.py",
"copies": "1",
"size": "5273",
"license": "mit",
"hash": -4098700380964815400,
"line_mean": 38.3507462687,
"line_max": 114,
"alpha_frac": 0.6205196283,
"autogenerated": false,
"ratio": 3.7799283154121865,
"config_test": false,... |
from django.shortcuts import render
from datetime import date, timedelta
from toronto.models import TorontoBill, TorontoEvent, TorontoPerson, TorontoOrganization
from councilmatic_core.models import Action
from councilmatic_core.views import *
from django.conf import settings
class TorontoIndexView(IndexView):
te... | {
"repo_name": "CivicTechTO/tor-councilmatic",
"path": "toronto/views.py",
"copies": "2",
"size": "4697",
"license": "mit",
"hash": -2681252320470887400,
"line_mean": 37.8181818182,
"line_max": 114,
"alpha_frac": 0.6499893549,
"autogenerated": false,
"ratio": 3.6354489164086687,
"config_test": f... |
from django.shortcuts import render
from datetime import datetime
from django.http import HttpResponse
from django.http import HttpResponseRedirect
from trips.models import Post
from trips.models import Article
from trips.models import IDForm
from trips.models import StateForm
from trips.models import LogForm
from trip... | {
"repo_name": "MianBot/site",
"path": "site/trips/views.py",
"copies": "1",
"size": "10370",
"license": "mit",
"hash": -3255999319935977500,
"line_mean": 34.5171232877,
"line_max": 137,
"alpha_frac": 0.6766634523,
"autogenerated": false,
"ratio": 3.10200418785522,
"config_test": false,
"has_n... |
from django.shortcuts import render
from datetime import datetime
import pytz
from arxiv import feed, forms, models
# ----------------------------------------------------------------------------
# (Un-)subscribe
# ----------------------------------------------------------------------------
def subscribe(request):
... | {
"repo_name": "hbristow/django-arxiv",
"path": "arxiv/views.py",
"copies": "1",
"size": "2221",
"license": "bsd-3-clause",
"hash": -5672369071124807000,
"line_mean": 37.9649122807,
"line_max": 78,
"alpha_frac": 0.5592075642,
"autogenerated": false,
"ratio": 4.807359307359308,
"config_test": fal... |
from django.shortcuts import render
from datetime import * #specify later
from reservations.models import Reservation, Coach
#duration of one slot in the calendar, also used to create reservations
timeIncrement = timedelta(minutes=30)
activeCoach = 1
def calendar(request, mondayParam = None, coachParam = None):
... | {
"repo_name": "Nonse/Feel_Like",
"path": "cal/views.py",
"copies": "1",
"size": "2199",
"license": "apache-2.0",
"hash": -7619015901964937000,
"line_mean": 33.9206349206,
"line_max": 94,
"alpha_frac": 0.6662119145,
"autogenerated": false,
"ratio": 3.905861456483126,
"config_test": false,
"has... |
from django.shortcuts import render
from django_ajax.decorators import ajax
from ..models import Dept, Staff
def getIndexData(request):
parentId = request.POST['parentId']
if parentId:
depts = Dept.objects.filter(parent_id=parentId)
else:
depts = Dept.objects.all()
items = []
for i... | {
"repo_name": "shen427/dept",
"path": "code/DPSite/dept/deptViews/deptsView.py",
"copies": "1",
"size": "3037",
"license": "mit",
"hash": -2104000722280280300,
"line_mean": 22.5426356589,
"line_max": 80,
"alpha_frac": 0.5465920316,
"autogenerated": false,
"ratio": 3.3706992230854604,
"config_te... |
from django.shortcuts import render
from django.apps import apps
from django.contrib.auth import get_user_model
from django.core.signals import setting_changed
from django.dispatch import receiver
from rest_framework import viewsets, permissions, status
from rest_framework.decorators import detail_route, list_route
fro... | {
"repo_name": "divyamodi128/django_comments",
"path": "comment/views.py",
"copies": "1",
"size": "4288",
"license": "mit",
"hash": -8599487966974754000,
"line_mean": 34.4380165289,
"line_max": 110,
"alpha_frac": 0.6263992537,
"autogenerated": false,
"ratio": 4.425180598555212,
"config_test": fa... |
from django.shortcuts import render
from django.conf import settings
from course.models import Term, Course, CourseVersion, FollowEntry, QueryLog
from course.utils import course_create_changelog
from opencourse.models import TermUpdate, UpdateLog
from schedule.models import ScheduleEntry
def dashboard(request):
cu... | {
"repo_name": "gravitylow/OpenCourse",
"path": "dashboard/views.py",
"copies": "2",
"size": "3577",
"license": "apache-2.0",
"hash": -4890938067587923000,
"line_mean": 37.8804347826,
"line_max": 115,
"alpha_frac": 0.6334917529,
"autogenerated": false,
"ratio": 3.8796095444685466,
"config_test":... |
from django.shortcuts import render
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from util.utilities import print_message
from util.utilities import print_debug
import os
# import vcs
# import cdms2
# import numpy
import json
@login_r... | {
"repo_name": "ACME-OUI/acme-web-fe",
"path": "apps/cdat/views.py",
"copies": "1",
"size": "3578",
"license": "apache-2.0",
"hash": -2569984745689044500,
"line_mean": 29.5811965812,
"line_max": 118,
"alpha_frac": 0.6383454444,
"autogenerated": false,
"ratio": 3.658486707566462,
"config_test": f... |
from django.shortcuts import render
from django.conf import settings
from django.contrib import messages
from django.core.mail import send_mail, BadHeaderError
from django.http import HttpResponse
from .forms import ContactForm
# check if form data is valid
def contactview(request):
if request.method == 'GET':
... | {
"repo_name": "okfn/website",
"path": "sendemail/views.py",
"copies": "1",
"size": "2038",
"license": "mit",
"hash": -5610934013259847000,
"line_mean": 36.0545454545,
"line_max": 75,
"alpha_frac": 0.660451423,
"autogenerated": false,
"ratio": 3.859848484848485,
"config_test": false,
"has_no_k... |
from django.shortcuts import render
from django.conf import settings
from django.core.files import File
from oscar.core.loading import get_class, get_classes, get_model
ProductClass, Product, Category, ProductCategory = get_classes(
'catalogue.models', ('ProductClass', 'Product', 'Category',
... | {
"repo_name": "jinnykoo/christmas",
"path": "sites/demo/apps/designer/views.py",
"copies": "1",
"size": "1232",
"license": "bsd-3-clause",
"hash": 3945032484482605600,
"line_mean": 30.6153846154,
"line_max": 64,
"alpha_frac": 0.7077922078,
"autogenerated": false,
"ratio": 3.3029490616621984,
"c... |
from django.shortcuts import render
from django.conf import settings
from django.core.files import File
from oscar.core.loading import get_class, get_classes
from PIL import Image
from apps.designer.models import TshirtSKU
ProductClass, Product, Category, ProductCategory = get_classes(
'catalogue.models', ('Produc... | {
"repo_name": "jinnykoo/wuyisj",
"path": "sites/sandbox/apps/designer/views.py",
"copies": "1",
"size": "4246",
"license": "bsd-3-clause",
"hash": -3913481597528067000,
"line_mean": 28.0890410959,
"line_max": 102,
"alpha_frac": 0.7107866227,
"autogenerated": false,
"ratio": 2.948611111111111,
"... |
from django.shortcuts import render
from django.conf import settings
from django.core.urlresolvers import reverse_lazy, reverse
from django.apps import apps as django_apps
from django.contrib import messages
from django.http import HttpResponse, HttpResponseRedirect
from django.contrib.auth import authenticate, login, ... | {
"repo_name": "tuanquanghpvn/bideox",
"path": "apps/users/views.py",
"copies": "1",
"size": "2249",
"license": "mit",
"hash": -2471466165427337700,
"line_mean": 30.25,
"line_max": 72,
"alpha_frac": 0.6322810138,
"autogenerated": false,
"ratio": 4.089090909090909,
"config_test": false,
"has_no... |
from django.shortcuts import render
from django.conf import settings
from django.core.urlresolvers import reverse
from django.views.generic import DetailView, ListView, TemplateView
from django.views.generic.edit import FormView
from ticketeer.backends import backend
class HomeView(TemplateView):
template_name = "t... | {
"repo_name": "melinath/django-ticketeer",
"path": "ticketeer/views.py",
"copies": "1",
"size": "2742",
"license": "bsd-2-clause",
"hash": 3783342964019009000,
"line_mean": 27.2680412371,
"line_max": 91,
"alpha_frac": 0.7323121809,
"autogenerated": false,
"ratio": 3.108843537414966,
"config_tes... |
from django.shortcuts import render
from django.conf import settings
from django.db.models import F
from django.template.loader import render_to_string
from wagtail.wagtailcore import hooks
from wagtail.wagtailcore.models import PageRevision, UserPagePermissionsProxy
from wagtail.wagtailadmin.site_summary import Site... | {
"repo_name": "JoshBarr/wagtail",
"path": "wagtail/wagtailadmin/views/home.py",
"copies": "4",
"size": "2526",
"license": "bsd-3-clause",
"hash": -4528534856792783400,
"line_mean": 29.8048780488,
"line_max": 108,
"alpha_frac": 0.6587490103,
"autogenerated": false,
"ratio": 3.9345794392523366,
"... |
from django.shortcuts import render
from django.conf import settings
from django.db.models import F
from wagtail.wagtailcore import hooks
from wagtail.wagtailcore.models import PageRevision, UserPagePermissionsProxy
from wagtail.utils.compat import render_to_string
from wagtail.wagtailadmin.site_summary import SiteSu... | {
"repo_name": "serzans/wagtail",
"path": "wagtail/wagtailadmin/views/home.py",
"copies": "1",
"size": "2524",
"license": "bsd-3-clause",
"hash": -7972610040625939000,
"line_mean": 29.7804878049,
"line_max": 108,
"alpha_frac": 0.6584786054,
"autogenerated": false,
"ratio": 3.931464174454829,
"co... |
from django.shortcuts import render
from django.conf import settings
from django.http import Http404, HttpResponsePermanentRedirect
from django.urls import reverse
from datetime import date, timedelta, datetime
from chicago.models import ChicagoBill, ChicagoEvent
from councilmatic_core.views import *
from haystack.q... | {
"repo_name": "datamade/chi-councilmatic",
"path": "chicago/views.py",
"copies": "1",
"size": "10070",
"license": "mit",
"hash": -4735009759428631000,
"line_mean": 38.6456692913,
"line_max": 124,
"alpha_frac": 0.5894736842,
"autogenerated": false,
"ratio": 4.062121823315853,
"config_test": fals... |
from django.shortcuts import render
from django.conf import settings
from django.http import HttpResponse, FileResponse
from wsgiref.util import FileWrapper
from urllib import parse
import os
def view(request, path):
path = os.path.normpath('/' + parse.unquote(path))[1:]
abspath = os.path.normpath(os.path.join... | {
"repo_name": "mrain/OneAM",
"path": "home/views.py",
"copies": "1",
"size": "1541",
"license": "apache-2.0",
"hash": -7981556694442666000,
"line_mean": 37.525,
"line_max": 117,
"alpha_frac": 0.6346528228,
"autogenerated": false,
"ratio": 3.5920745920745922,
"config_test": false,
"has_no_keyw... |
from django.shortcuts import render
from django.conf import settings
from django.http import HttpResponse, Http404
from dv_apps.dataverse_auth.util_logins import UserLoginInfo,\
MonthlyNewUserStats,\
NEW_USER_START_YEAR
from d... | {
"repo_name": "IQSS/miniverse",
"path": "dv_apps/quality_checks/views_logins.py",
"copies": "1",
"size": "1855",
"license": "mit",
"hash": 6720144351277085000,
"line_mean": 34.6730769231,
"line_max": 75,
"alpha_frac": 0.5973045822,
"autogenerated": false,
"ratio": 4.023861171366594,
"config_tes... |
from django.shortcuts import render
from django.conf import settings
from django.http import HttpResponse, HttpResponseRedirect, JsonResponse
from django.contrib.auth.decorators import permission_required, login_required
from django.views.decorators.http import require_POST
from django.core.mail import mail_admins
from... | {
"repo_name": "nemonik/CoCreateLite",
"path": "ccl-cookbook/files/default/cocreatelite/cocreate/old_views.py",
"copies": "1",
"size": "16155",
"license": "bsd-3-clause",
"hash": -7612676178423215000,
"line_mean": 31.6383838384,
"line_max": 132,
"alpha_frac": 0.6182606004,
"autogenerated": false,
... |
from django.shortcuts import render
from django.conf import settings
from django.http import HttpResponse, HttpResponseRedirect
from django.contrib.auth.models import User
from rest_framework import status
from rest_framework.decorators import api_view, permission_classes
from rest_framework.permissions import AllowAn... | {
"repo_name": "kantanand/insmartapps",
"path": "server/learning/signup/views.py",
"copies": "1",
"size": "2392",
"license": "mit",
"hash": -4946321072917747000,
"line_mean": 35.8153846154,
"line_max": 92,
"alpha_frac": 0.5811036789,
"autogenerated": false,
"ratio": 4.13840830449827,
"config_tes... |
from django.shortcuts import render
from django.conf import settings
from django.http import HttpResponse, JsonResponse, FileResponse, StreamingHttpResponse
from urllib import parse
from wsgiref.util import FileWrapper
import os, datetime
# Create your views here.
def list(request):
directory = parse.unquote(requ... | {
"repo_name": "mrain/OneAM",
"path": "api/views.py",
"copies": "1",
"size": "2365",
"license": "apache-2.0",
"hash": -2985294261478822400,
"line_mean": 39.0847457627,
"line_max": 106,
"alpha_frac": 0.5665961945,
"autogenerated": false,
"ratio": 3.8206785137318255,
"config_test": false,
"has_n... |
from django.shortcuts import render
from django.conf import settings
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from django.contrib import admin
from .models import Session
@csrf_exempt
def send(request):
# check request
if request.method != 'POST':
retur... | {
"repo_name": "Thinker-ru/sepiida-chat",
"path": "sepiida_chat/views.py",
"copies": "1",
"size": "1029",
"license": "mit",
"hash": -2661097393730656000,
"line_mean": 24.725,
"line_max": 70,
"alpha_frac": 0.6618075802,
"autogenerated": false,
"ratio": 3.7418181818181817,
"config_test": false,
... |
from django.shortcuts import render
from django.conf import settings
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from nagios_registration.models import Host, HostGroup, Service, ServiceGroup
from nagios_registration.models import Contact, ContactGroup
from nagios_registrati... | {
"repo_name": "uw-it-aca/nagios_registration",
"path": "nagios_registration/views.py",
"copies": "1",
"size": "13447",
"license": "apache-2.0",
"hash": 5024071858023919000,
"line_mean": 29.6309794989,
"line_max": 79,
"alpha_frac": 0.5435413103,
"autogenerated": false,
"ratio": 4.72487702037948,
... |
from django.shortcuts import render
from django.conf import settings
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from common import definitions
from common.selection import SimpleSelection, Selection, SelectionItem
from common.views import AbsReferenceSelection
from commo... | {
"repo_name": "cmunk/protwis",
"path": "sitesearch/views.py",
"copies": "2",
"size": "11886",
"license": "apache-2.0",
"hash": 5646504917299219000,
"line_mean": 37.7166123779,
"line_max": 264,
"alpha_frac": 0.6693589096,
"autogenerated": false,
"ratio": 3.937065253395164,
"config_test": false,
... |
from django.shortcuts import render
from django.conf import settings
from django.http import HttpResponseRedirect, HttpResponse
from django.urls import reverse
from django.views.decorators.csrf import csrf_exempt
from fetcher import api
import requests
import json
def index(request):
return render(request, 'fetc... | {
"repo_name": "zyphrus/fetch-django",
"path": "fetcher/views.py",
"copies": "1",
"size": "1510",
"license": "mit",
"hash": 6602296198252935000,
"line_mean": 35.8292682927,
"line_max": 91,
"alpha_frac": 0.7112582781,
"autogenerated": false,
"ratio": 4.114441416893733,
"config_test": false,
"ha... |
from django.shortcuts import render
from django.conf import settings
from django.http import JsonResponse
from django.views.decorators.csrf import csrf_protect
from django.views.decorators.http import require_http_methods
from django.core.exceptions import ObjectDoesNotExist
import facebook
import json
import random
im... | {
"repo_name": "risingsunomi/oscruogames",
"path": "passgame/live_management/views.py",
"copies": "1",
"size": "3006",
"license": "mit",
"hash": -5784784851214239000,
"line_mean": 23.056,
"line_max": 104,
"alpha_frac": 0.6996007984,
"autogenerated": false,
"ratio": 3.024144869215292,
"config_tes... |
from django.shortcuts import render
from django.conf import settings
from django.http import JsonResponse
from .models import AppUser
from .models import WorkoutSummary
from .models import Challenge
import urllib2
import utils
import time
import datetime
# Create your views here.
def login(request):
user_id = req... | {
"repo_name": "cffls/SmartTrainnerServer",
"path": "SmartTrainer/users/views.py",
"copies": "1",
"size": "4370",
"license": "mit",
"hash": -8005979881450285000,
"line_mean": 41.427184466,
"line_max": 119,
"alpha_frac": 0.671624714,
"autogenerated": false,
"ratio": 3.4987990392313852,
"config_te... |
from django.shortcuts import render
from django.conf import settings
from django.template import RequestContext
from django.http import HttpResponse, HttpResponseRedirect
from django.views.decorators.csrf import csrf_exempt
from django.contrib import messages
import requests
try:
import json
except ImportError:
... | {
"repo_name": "davogler/POSTv3",
"path": "insta/views.py",
"copies": "1",
"size": "7006",
"license": "mit",
"hash": -4062808717194624000,
"line_mean": 33.1756097561,
"line_max": 86,
"alpha_frac": 0.6256066229,
"autogenerated": false,
"ratio": 3.9761634506242904,
"config_test": false,
"has_no_... |
from django.shortcuts import render
from django.conf import settings
from django.template import RequestContext
from django.template.loader import render_to_string
from wagtail.wagtailadmin.forms import SearchForm
from wagtail.wagtailcore import hooks
from wagtail.wagtailcore.models import Page, PageRevision, UserPag... | {
"repo_name": "dresiu/wagtail",
"path": "wagtail/wagtailadmin/views/home.py",
"copies": "1",
"size": "2907",
"license": "bsd-3-clause",
"hash": 6624591639887018000,
"line_mean": 32.4137931034,
"line_max": 137,
"alpha_frac": 0.6615067079,
"autogenerated": false,
"ratio": 3.902013422818792,
"conf... |
from django.shortcuts import render
from django.conf import settings
from django.template import RequestContext
from django.template.loader import render_to_string
from wagtail.wagtailcore import hooks
from wagtail.wagtailcore.models import PageRevision, UserPagePermissionsProxy
from wagtail.wagtailadmin.site_summary... | {
"repo_name": "jorge-marques/wagtail",
"path": "wagtail/wagtailadmin/views/home.py",
"copies": "1",
"size": "2268",
"license": "bsd-3-clause",
"hash": 309720605013272450,
"line_mean": 32.8507462687,
"line_max": 137,
"alpha_frac": 0.6675485009,
"autogenerated": false,
"ratio": 3.8969072164948453,
... |
from django.shortcuts import render
from django.conf import settings
from django.views.decorators.cache import cache_page
from django.http import JsonResponse
from news.models import News
from common.models import ReleaseNotes, ReleaseStatistics, Citation
from googleapiclient.discovery import build
from oauth2client.... | {
"repo_name": "protwis/protwis",
"path": "home/views.py",
"copies": "1",
"size": "4738",
"license": "apache-2.0",
"hash": 8685463504377521000,
"line_mean": 49.9462365591,
"line_max": 256,
"alpha_frac": 0.6449978894,
"autogenerated": false,
"ratio": 3.8836065573770493,
"config_test": false,
"h... |
from django.shortcuts import render
from django.conf import settings
from django.views.decorators.cache import cache_page
from news.models import News
from common.models import ReleaseNotes, ReleaseStatistics
@cache_page(60 * 60 * 24)
def index(request):
request.session.flush()
context = {}
# title of t... | {
"repo_name": "cmunk/protwis",
"path": "home/views.py",
"copies": "1",
"size": "2356",
"license": "apache-2.0",
"hash": 8948599167827073000,
"line_mean": 42.6296296296,
"line_max": 215,
"alpha_frac": 0.6808149406,
"autogenerated": false,
"ratio": 3.8686371100164205,
"config_test": false,
"has... |
from django.shortcuts import render
from django.conf import settings
from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResponse
from gatekeeper.openstack import Openstack
from gatekeeper.user import User
from gatekeeper.utils import sendemail
from gatekeeper.project import Project
from dj... | {
"repo_name": "AfricanResearchCloud/gatekeeper",
"path": "allocation/views.py",
"copies": "1",
"size": "3729",
"license": "mit",
"hash": 3906374954514812000,
"line_mean": 42.8705882353,
"line_max": 156,
"alpha_frac": 0.7157414857,
"autogenerated": false,
"ratio": 3.8762993762993765,
"config_tes... |
from django.shortcuts import render
from django.conf import settings
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_http_methods
from django.core.urlresolvers import reverse
from django.utils.module_loading import import_by_path
from django.http import HttpResponse... | {
"repo_name": "castedo/celauth",
"path": "celauth/dj/celauth/views.py",
"copies": "1",
"size": "8053",
"license": "mit",
"hash": -7605465610809831000,
"line_mean": 33.7112068966,
"line_max": 94,
"alpha_frac": 0.6704333789,
"autogenerated": false,
"ratio": 3.7595704948646125,
"config_test": fals... |
from django.shortcuts import render
from django.conf import settings
from django.views.decorators.http import require_POST
from vanilla import FormView, GenericView
from braces.views import LoginRequiredMixin, JSONResponseMixin
from twython import Twython
from .forms import TwitterSearchForm, URLForm
from .models im... | {
"repo_name": "scast/thedevlabsweb",
"path": "thedevlabsweb/recommender/views.py",
"copies": "1",
"size": "2494",
"license": "bsd-3-clause",
"hash": -217001211254549600,
"line_mean": 35.6764705882,
"line_max": 81,
"alpha_frac": 0.6543704892,
"autogenerated": false,
"ratio": 3.92755905511811,
"c... |
from django.shortcuts import render
from django.conf import settings
from django.views.generic.edit import FormView
from django.views.generic import TemplateView
from django.core.urlresolvers import reverse
from .forms import CreateNotificationForm
from postman.models import Message
from cms.models import Page
from cm... | {
"repo_name": "c4sc/arividam",
"path": "arividam/dashboard/views.py",
"copies": "1",
"size": "1367",
"license": "mit",
"hash": 8560168282455474000,
"line_mean": 32.3414634146,
"line_max": 138,
"alpha_frac": 0.7212874909,
"autogenerated": false,
"ratio": 3.9169054441260744,
"config_test": false,... |
from django.shortcuts import render
from django.conf import settings
from .models import Loan
from customer.models import Customer
from .forms import LoanForm
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse, HttpResponseRedirect
from django.core.urlresolvers import reverse... | {
"repo_name": "dgriff67/django-tech-test",
"path": "loan/views.py",
"copies": "1",
"size": "1085",
"license": "bsd-3-clause",
"hash": -2618399253714696000,
"line_mean": 35.1666666667,
"line_max": 104,
"alpha_frac": 0.734562212,
"autogenerated": false,
"ratio": 4.465020576131687,
"config_test": ... |
from django.shortcuts import render
from django.conf import settings
from requests_oauthlib import OAuth2Session
from .models import UserMapping
authorization_base_url = 'https://github.com/login/oauth/authorize'
token_url = 'https://github.com/login/oauth/access_token'
def mappingRequest(request, slack_user):
... | {
"repo_name": "fokasu/githubbot",
"path": "webapps/githubbot/views.py",
"copies": "1",
"size": "1524",
"license": "apache-2.0",
"hash": 3075360185088832500,
"line_mean": 42.5428571429,
"line_max": 95,
"alpha_frac": 0.717847769,
"autogenerated": false,
"ratio": 3.877862595419847,
"config_test": ... |
from django.shortcuts import render
from django.conf import settings
from rest_framework import status
from django.contrib.auth import authenticate, logout, login
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import viewsets
from django.contrib.auth.models im... | {
"repo_name": "ThreeDRadio/playlists",
"path": "backend/session/views.py",
"copies": "1",
"size": "2991",
"license": "mit",
"hash": 4320238885655548000,
"line_mean": 31.5108695652,
"line_max": 71,
"alpha_frac": 0.640588432,
"autogenerated": false,
"ratio": 4.580398162327718,
"config_test": fals... |
from django.shortcuts import render
from django.conf import settings
from tracker.models import Character, System, Connection
import pycrest
from django.http import HttpResponse
from datetime import datetime, timedelta
from django.utils import timezone
import time
import json
import math
# Create your views here.
def ... | {
"repo_name": "paftree/WHturk",
"path": "tracker/views.py",
"copies": "1",
"size": "5797",
"license": "mit",
"hash": 2001006771638506200,
"line_mean": 38.1689189189,
"line_max": 159,
"alpha_frac": 0.5338968432,
"autogenerated": false,
"ratio": 4.022900763358779,
"config_test": false,
"has_no_... |
from django.shortcuts import render
from django.conf import settings
import os, mimetypes
# Create your views here.
import logging
from django.shortcuts import render
from django.http import HttpResponse
from django.contrib.auth.decorators import login_required
from django.views.generic import ListView, DetailView, Te... | {
"repo_name": "reciproco/delma",
"path": "fichas/views.py",
"copies": "1",
"size": "1897",
"license": "mit",
"hash": -166315839367105660,
"line_mean": 33.4909090909,
"line_max": 76,
"alpha_frac": 0.704797048,
"autogenerated": false,
"ratio": 3.683495145631068,
"config_test": false,
"has_no_ke... |
from django.shortcuts import render
from django.conf import settings
from common.views import AbsReferenceSelection
from common.views import AbsSegmentSelection
from common.views import AbsTargetSelection
# from common.alignment_SITE_NAME import Alignment
Alignment = getattr(__import__('common.alignment_' + settings.S... | {
"repo_name": "cmunk/protwis",
"path": "similaritysearch/views.py",
"copies": "2",
"size": "4776",
"license": "apache-2.0",
"hash": 8892757748376094000,
"line_mean": 32.1666666667,
"line_max": 111,
"alpha_frac": 0.6756700168,
"autogenerated": false,
"ratio": 4.023588879528222,
"config_test": fa... |
from django.shortcuts import render
from django.conf import settings
from common.views import AbsSegmentSelection
from common.views import AbsTargetSelection
# from common.alignment_SITE_NAME import Alignment
Alignment = getattr(__import__('common.alignment_' + settings.SITE_NAME, fromlist=['Alignment']), 'Alignment')... | {
"repo_name": "fosfataza/protwis",
"path": "similaritymatrix/views.py",
"copies": "1",
"size": "2868",
"license": "apache-2.0",
"hash": -6862918393917940000,
"line_mean": 29.8387096774,
"line_max": 111,
"alpha_frac": 0.670153417,
"autogenerated": false,
"ratio": 4.261515601783061,
"config_test"... |
from django.shortcuts import render
from django.conf import settings
from .decorators import superuser_required
from airmozilla.manage import forms
from airmozilla.manage import sending
@superuser_required
def home(request):
context = {
'EMAIL_BACKEND': settings.EMAIL_BACKEND,
'EMAIL_FILE_PATH': ... | {
"repo_name": "mozilla/airmozilla",
"path": "airmozilla/manage/views/email_sending.py",
"copies": "2",
"size": "1405",
"license": "bsd-3-clause",
"hash": -4100434945151747600,
"line_mean": 30.9318181818,
"line_max": 76,
"alpha_frac": 0.5608540925,
"autogenerated": false,
"ratio": 4.07246376811594... |
from django.shortcuts import render
from django.conf import settings
from django.contrib import auth
from django.http import HttpResponse
from django.http import HttpResponseRedirect
#from django.contrib.auth.decorators import login_required
#from django.shortcuts import render_to_response
from blog.models import API_... | {
"repo_name": "mszhai/Django",
"path": "blog/views.py",
"copies": "1",
"size": "49916",
"license": "mit",
"hash": 8147919578593281000,
"line_mean": 39.4499136442,
"line_max": 444,
"alpha_frac": 0.5643680615,
"autogenerated": false,
"ratio": 2.8068072866730587,
"config_test": false,
"has_no_ke... |
from django.shortcuts import render
from django.conf import settings
from wagtail.wagtailcore import hooks
from wagtail.wagtailcore.models import PageRevision, UserPagePermissionsProxy
from wagtail.utils.compat import render_to_string
from wagtail.wagtailadmin.site_summary import SiteSummaryPanel
# Panels for the h... | {
"repo_name": "taedori81/wagtail",
"path": "wagtail/wagtailadmin/views/home.py",
"copies": "1",
"size": "2207",
"license": "bsd-3-clause",
"hash": 7213170048993203000,
"line_mean": 31.9402985075,
"line_max": 137,
"alpha_frac": 0.6615314907,
"autogenerated": false,
"ratio": 3.838260869565217,
"c... |
from django.shortcuts import render
from django.conf import settings
import json
def index(request):
context = {'LANG': request.LANGUAGE_CODE,
'LOCAL_JAVASCIPT': settings.LOCAL_JAVASCIPT,
}
return render(request, 'main/index.html', context)
def main(request):
context = ... | {
"repo_name": "JosePedroMatos/Tethys",
"path": "main/views.py",
"copies": "1",
"size": "1455",
"license": "mit",
"hash": 5152413514949081000,
"line_mean": 27.5490196078,
"line_max": 59,
"alpha_frac": 0.5979381443,
"autogenerated": false,
"ratio": 3.8289473684210527,
"config_test": false,
"has... |
from django.shortcuts import render
from django.conf import settings
import requests
import datetime
## configuration
user = settings.IDT_USER
token = settings.IDT_TOKEN
team = settings.IDT_TEAM
idt_url = "https://idonethis.com"
api_dones_url = "%s/api/v0.1/dones/?owner=%s&team=%s&page_size=100" % (idt_url, user, te... | {
"repo_name": "chadhs/idt_reporter",
"path": "idt_reporter/status/views.py",
"copies": "1",
"size": "1752",
"license": "bsd-3-clause",
"hash": 4016064686482086000,
"line_mean": 32.6923076923,
"line_max": 104,
"alpha_frac": 0.6404109589,
"autogenerated": false,
"ratio": 3.2324723247232474,
"conf... |
from django.shortcuts import render
from django.conf.urls import url, include
from django.contrib.auth.models import User
from rest_framework import routers, serializers, viewsets
from rest_framework import permissions
from ..models.Categoria import Categoria
from ..utils import SetPagination
from django.db.models impo... | {
"repo_name": "lp2dev/HOMEND",
"path": "homend_server/homend_configs/views/CategoriaView.py",
"copies": "1",
"size": "1218",
"license": "apache-2.0",
"hash": 4339233387067891700,
"line_mean": 32.8333333333,
"line_max": 62,
"alpha_frac": 0.7307060755,
"autogenerated": false,
"ratio": 4.00657894736... |
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from braces.views import GroupRequiredMixin,SuperuserRequiredMixin,LoginRequiredMixin
from django.views.generic import TemplateView
from barcode import generate
from students.models import Child_detail
# import xhtml2pdf.pisa ... | {
"repo_name": "tnemisteam/cdf-steps",
"path": "students/base_views.py",
"copies": "5",
"size": "2030",
"license": "mit",
"hash": -2917519647647745500,
"line_mean": 34.6140350877,
"line_max": 137,
"alpha_frac": 0.7014778325,
"autogenerated": false,
"ratio": 3.8740458015267176,
"config_test": fal... |
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from collections import OrderedDict
import requests
import json
from models import EntitlementProfile
from forms import SearchForm
import pprint
try:
import cStringIO as StringIO
except ImportError:
import StringIO
SEA... | {
"repo_name": "scoursen/elasticsearch-entitlements-webinar",
"path": "webinar/entitlements/views.py",
"copies": "1",
"size": "3103",
"license": "mit",
"hash": 3458989634953748000,
"line_mean": 37.7875,
"line_max": 167,
"alpha_frac": 0.5678375765,
"autogenerated": false,
"ratio": 3.86425902864259,... |
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from data.models import SkyPicture, WeatherMeasurement, RadiosondeMeasurement, MeasuringDevice
from forms import DateStationForm, DateForm
from django.shortcuts import redirect
from django.conf import settings
import numpy as ... | {
"repo_name": "FSavoy/visuo-server",
"path": "visualization/views.py",
"copies": "1",
"size": "20200",
"license": "bsd-3-clause",
"hash": -6362313270340136000,
"line_mean": 43.4933920705,
"line_max": 202,
"alpha_frac": 0.5655940594,
"autogenerated": false,
"ratio": 3.488773747841105,
"config_te... |
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django_bootstrap_markdown.models import Image
from django_bootstrap_markdown.forms import ImageForm, LibraryForm
@login_required
def markdown_image(request):
if request.method == 'POST':
form = ImageForm(req... | {
"repo_name": "aj-may/django-bootstrap-markdown",
"path": "django_bootstrap_markdown/views.py",
"copies": "1",
"size": "1745",
"license": "mit",
"hash": 1983912595251424300,
"line_mean": 30.1607142857,
"line_max": 79,
"alpha_frac": 0.5541547278,
"autogenerated": false,
"ratio": 4.58005249343832,
... |
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.contrib.auth import authenticate, login, logout
from phonebook.forms import LoginForm, ContactForm, SearchForm
from django.shortcuts import redirect
from django.core.urlresolvers import reverse
from phonebook.model... | {
"repo_name": "JulienDrecq/django-phonebook",
"path": "phonebook/views.py",
"copies": "1",
"size": "6525",
"license": "bsd-3-clause",
"hash": 3446959810245387300,
"line_mean": 36.9360465116,
"line_max": 117,
"alpha_frac": 0.6554789272,
"autogenerated": false,
"ratio": 3.789198606271777,
"config... |
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.contrib.auth import login, authenticate
from django.shortcuts import render, redirect
from app.core.models import *
from app.core.forms import *
def get_current_user(request):
user = request.user
user.refr... | {
"repo_name": "NatashaKrassevich/colocaciones",
"path": "app/core/views.py",
"copies": "1",
"size": "6010",
"license": "mit",
"hash": -3255039088647805000,
"line_mean": 34.4674556213,
"line_max": 104,
"alpha_frac": 0.6885218552,
"autogenerated": false,
"ratio": 3.146456692913386,
"config_test":... |
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.contrib.auth import logout, authenticate, login
from django.http import HttpResponseRedirect, HttpResponse
from mainapp.forms import UserRegisterForm, UserProfileForm, CreateReviewForm, CreateAdvancedQuery
from mai... | {
"repo_name": "Alistair401/10C",
"path": "SysReview/mainapp/views.py",
"copies": "1",
"size": "21047",
"license": "mit",
"hash": 5963387449001265000,
"line_mean": 36.9927797834,
"line_max": 191,
"alpha_frac": 0.6618045327,
"autogenerated": false,
"ratio": 3.824641104851899,
"config_test": false... |
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.contrib.auth import authenticate, login
from django.http import HttpResponseRedirect, Http404, HttpResponse, JsonResponse
from django.core import serializers
from rest_fr... | {
"repo_name": "sdzharkov/Trip-Split",
"path": "carAPI/views.py",
"copies": "3",
"size": "5245",
"license": "mit",
"hash": 233028058796953800,
"line_mean": 33.7417218543,
"line_max": 82,
"alpha_frac": 0.6566253575,
"autogenerated": false,
"ratio": 3.599862731640357,
"config_test": false,
"has_... |
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.http import HttpResponse
from .models import Photo, Album
from django.views.generic.edit import ModelFormMixin, ProcessFormView
from django.views.generic.detail import Si... | {
"repo_name": "SeleniumK/django-imager",
"path": "imagersite/imager_images/views.py",
"copies": "1",
"size": "3013",
"license": "mit",
"hash": 4261735716059806700,
"line_mean": 34.0348837209,
"line_max": 91,
"alpha_frac": 0.6654497179,
"autogenerated": false,
"ratio": 3.9231770833333335,
"confi... |
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.contrib.auth.views import redirect_to_login
from django.views.generic import UpdateView
from django.core.urlresolvers import reverse
from imager_user.models import ImagerProfile
from imager_user.forms import Profil... | {
"repo_name": "henrykh/django-imager",
"path": "imager_user/views.py",
"copies": "1",
"size": "1490",
"license": "mit",
"hash": 3596572092192472000,
"line_mean": 36.25,
"line_max": 74,
"alpha_frac": 0.6979865772,
"autogenerated": false,
"ratio": 3.941798941798942,
"config_test": false,
"has_n... |
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.contrib import messages
from django.http import HttpResponse, HttpResponseRedirect, Http404
from infrastructure.models import Host
from infrastructure.forms import HostAddTcpForm, HostAddSshForm, HostEditTcpForm, H... | {
"repo_name": "alexei38/webvirt",
"path": "infrastructure/host.py",
"copies": "1",
"size": "5162",
"license": "mit",
"hash": -6401110044154436000,
"line_mean": 38.7153846154,
"line_max": 150,
"alpha_frac": 0.5519178613,
"autogenerated": false,
"ratio": 4.356118143459915,
"config_test": false,
... |
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from accounts.forms import RegistrationForm, ReactivationForm
from accounts.models import ServiceCredentials, Account
from services.mgmt... | {
"repo_name": "AudioCommons/ac-mediator",
"path": "accounts/views.py",
"copies": "1",
"size": "5066",
"license": "apache-2.0",
"hash": 6274974444193702000,
"line_mean": 34.9290780142,
"line_max": 112,
"alpha_frac": 0.6776549546,
"autogenerated": false,
"ratio": 4.085483870967742,
"config_test":... |
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.http import HttpResponseForbidden
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.shortcuts import get_object_or_404
from django.utils.decorators import method_... | {
"repo_name": "tabdon/crmeasy-deploy-build",
"path": "crmapp/communications/views.py",
"copies": "2",
"size": "3528",
"license": "mit",
"hash": -1190976849384637700,
"line_mean": 32.2830188679,
"line_max": 98,
"alpha_frac": 0.6295351474,
"autogenerated": false,
"ratio": 4.339483394833948,
"conf... |
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.http import HttpResponseForbidden
from orientation.forms import SearchForm
from account.models import Profile
from schedule.models import ScheduleEntry
from schedule.utils import schedule_get_courses
import re
@lo... | {
"repo_name": "OpenCourseProject/OpenCourse",
"path": "orientation/views.py",
"copies": "2",
"size": "2374",
"license": "apache-2.0",
"hash": 9161350408244908000,
"line_mean": 36.6825396825,
"line_max": 95,
"alpha_frac": 0.5429654591,
"autogenerated": false,
"ratio": 4.997894736842105,
"config_... |
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse, HttpResponseRedirect
from album.forms import LoginForm
from django.template.context_processors import csrf
from django.shortcuts import render_to_response
from django.contrib.auth import a... | {
"repo_name": "SherSingh07/albums",
"path": "album/views.py",
"copies": "1",
"size": "3227",
"license": "apache-2.0",
"hash": -6798073918226995000,
"line_mean": 32.2680412371,
"line_max": 100,
"alpha_frac": 0.6172916021,
"autogenerated": false,
"ratio": 4.268518518518518,
"config_test": false,
... |
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from django.db.models import Max, Q
from apps.paginacion import paginacion
from apps.expediente.models import categoria, expedientes, resolucion
from apps.seguridad.models import permisos
i... | {
"repo_name": "AnthonyWainer/sisJuridico",
"path": "sisjuridico/apps/busqueda/views.py",
"copies": "1",
"size": "1960",
"license": "mit",
"hash": -4409357844420034600,
"line_mean": 49.2820512821,
"line_max": 179,
"alpha_frac": 0.7096938776,
"autogenerated": false,
"ratio": 2.9518072289156625,
"... |
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from django.http import JsonResponse
from pysentosa.config import *
from pysentosa.tradeinfo import *
from pysentosa.data import YahooData
@login_required
def monitor(request):
return ... | {
"repo_name": "henrywoo/qblog",
"path": "sentosaapp/views.py",
"copies": "1",
"size": "2195",
"license": "mit",
"hash": 5458689097779103000,
"line_mean": 31.7611940299,
"line_max": 110,
"alpha_frac": 0.6195899772,
"autogenerated": false,
"ratio": 3.7015177065767286,
"config_test": false,
"has... |
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from custom.views import group_required
from django.contrib.auth import authenticate, login
from django.utils.timezone import get_current_timezone
from django.contrib.auth.models import ... | {
"repo_name": "ejerzyk/editBoard",
"path": "BDHapp/accounts/views.py",
"copies": "1",
"size": "12835",
"license": "apache-2.0",
"hash": 5025252510323918000,
"line_mean": 30.6133004926,
"line_max": 126,
"alpha_frac": 0.6832878847,
"autogenerated": false,
"ratio": 2.9828026957936324,
"config_test... |
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.http import HttpResponseRedirect, HttpResponse
from django.contrib import messages
from .forms import RoomForm
from .models import Room
from devices.models import Device
# Create your views here.
@login_required
d... | {
"repo_name": "j-windsor/iRiot-WebApp",
"path": "rooms/views.py",
"copies": "1",
"size": "1932",
"license": "mit",
"hash": -5281596669423111000,
"line_mean": 34.1272727273,
"line_max": 77,
"alpha_frac": 0.6381987578,
"autogenerated": false,
"ratio": 4.084566596194503,
"config_test": false,
"h... |
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from django.http import HttpResponseRedirect, HttpResponse
from django.contrib import messages
from .models import Device, Function
from rooms.models import Room
import boto3
import json
import re
from random import randint
#... | {
"repo_name": "j-windsor/iRiot-WebApp",
"path": "devices/views.py",
"copies": "1",
"size": "4139",
"license": "mit",
"hash": 1724508212004693500,
"line_mean": 38.0471698113,
"line_max": 144,
"alpha_frac": 0.6330031409,
"autogenerated": false,
"ratio": 3.5376068376068375,
"config_test": false,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.