text
stringlengths
0
1.05M
meta
dict
#from django.shortcuts import render from placements.models import Bed, Plant, Inventory_Placement, Row from rest_framework import viewsets, generics from rest_framework.views import APIView from django_filters import rest_framework as filters from rest_framework.response import Response from api.serializers import B...
{ "repo_name": "pgenho/PPPRO", "path": "api/views.py", "copies": "1", "size": "3439", "license": "mit", "hash": 4949302394433127000, "line_mean": 30.2636363636, "line_max": 80, "alpha_frac": 0.6109334109, "autogenerated": false, "ratio": 3.8467561521252795, "config_test": false, "has_no_keywor...
from django.shortcuts import render from poker.urls import * from poker_base.poker import poker, hand_rank from poker_base.deal import texas_holdem_deal hand_names = ["High Card", "Pair", "Two Pair", "3 of a Kind", "Straight", "Flush", "Full House", "4 of a Kind", "Straight Flush"] def index(request)...
{ "repo_name": "chitty/poker_base", "path": "poker/holdem/views.py", "copies": "1", "size": "1947", "license": "mit", "hash": 1283128558759278000, "line_mean": 29.9047619048, "line_max": 74, "alpha_frac": 0.5649717514, "autogenerated": false, "ratio": 3.2181818181818183, "config_test": false, ...
from django.shortcuts import render from pyvdp.dcas.cardinquiry.accounts import debitcardinquiry, DebitCardInquiryModel from demo.forms.dcas.cardinquiry import DebitCardInquiryFormPost def debit_card_inquiry(request): if request.method == 'POST': form = DebitCardInquiryFormPost(request.POST) if ...
{ "repo_name": "ppokrovsky/pyvdp", "path": "demo/demo/views/dcas/cardinquiry.py", "copies": "1", "size": "1324", "license": "mit", "hash": 8451614768564446000, "line_mean": 35.7777777778, "line_max": 120, "alpha_frac": 0.6283987915, "autogenerated": false, "ratio": 3.6880222841225625, "config_te...
from django.shortcuts import render from pyvdp.merchantsearch import search, SearchModel from demo.forms.merchantsearch.search import MerchantSearchFormPost def merchant_search(request): if request.method == 'POST': form = MerchantSearchFormPost(request.POST) if form.is_valid(): merc...
{ "repo_name": "ppokrovsky/pyvdp", "path": "demo/demo/views/merchantsearch/search.py", "copies": "1", "size": "1965", "license": "mit", "hash": -1567512928702407400, "line_mean": 34.7272727273, "line_max": 108, "alpha_frac": 0.5409669211, "autogenerated": false, "ratio": 4.271739130434782, "conf...
from django.shortcuts import render from pyvdp.paai.fundstransferattinq.cardattributes import fundstransferinquiry, FundsTransferInquiryModel from demo.forms.paai.fundstransferattinq.cardattributes.fundstransferinquiry import FundsTransferInquiryPostForm def funds_transfer_inquiry(request): if request.method ==...
{ "repo_name": "ppokrovsky/pyvdp", "path": "demo/demo/views/paai/fundstransferattinq/cardattributes/fundstransferinquiry.py", "copies": "1", "size": "1064", "license": "mit", "hash": -276513611442457760, "line_mean": 37, "line_max": 112, "alpha_frac": 0.670112782, "autogenerated": false, "ratio": ...
from django.shortcuts import render from pyvdp.pav import cardvalidation, CardValidationModel from pyvdp.visadirect import CardAcceptorModel from demo.forms.pav.pav import CardValidationFormPost def card_validation(request): if request.method == 'POST': form = CardValidationFormPost(request.POST) ...
{ "repo_name": "ppokrovsky/pyvdp", "path": "demo/demo/views/pav/pav.py", "copies": "1", "size": "1716", "license": "mit", "hash": -9063864160801276000, "line_mean": 33.32, "line_max": 106, "alpha_frac": 0.534965035, "autogenerated": false, "ratio": 4.115107913669065, "config_test": false, "has...
from django.shortcuts import render from pyvdp.visadirect.watchlist import watchlistinquiry, WatchListInquiryModel from demo.forms.watchlist.watchlist import WlInquiryFormPost def index(request): return render(request, template_name='visadirect/watchlist/index.html') def inquiry(request): if request.metho...
{ "repo_name": "ppokrovsky/pyvdp", "path": "demo/demo/views/visadirect/watchlist.py", "copies": "1", "size": "1263", "license": "mit", "hash": 3155768520605251000, "line_mean": 31.3846153846, "line_max": 118, "alpha_frac": 0.6080760095, "autogenerated": false, "ratio": 3.838905775075988, "config...
from django.shortcuts import render from rango.models import Category, Page from rango.forms import CategoryForm, PageForm from rango.forms import UserForm, UserProfileForm from rango.bing_search import run_query from django.shortcuts import redirect from django.http import HttpResponse from django.contrib.auth.decor...
{ "repo_name": "matheuskiser/pdx_code_guild", "path": "django/tango_with_django_project/rango/views.py", "copies": "1", "size": "6776", "license": "mit", "hash": -2644901421818513400, "line_mean": 27.474789916, "line_max": 83, "alpha_frac": 0.5945985832, "autogenerated": false, "ratio": 3.89649223...
from django.shortcuts import render from ray.tune.automlboard.settings import AUTOMLBOARD_RELOAD_INTERVAL, \ AUTOMLBOARD_LOG_DIR from ray.tune.automlboard.models.models import JobRecord, \ TrialRecord, ResultRecord from ray.tune.trial import Trial import datetime def index(request): """View for the home...
{ "repo_name": "ray-project/ray", "path": "python/ray/tune/automlboard/frontend/view.py", "copies": "4", "size": "5939", "license": "apache-2.0", "hash": -1110268515703822100, "line_mean": 32.5536723164, "line_max": 77, "alpha_frac": 0.5970702138, "autogenerated": false, "ratio": 3.428983833718245...
from django.shortcuts import render from rest_framework.authentication import SessionAuthentication, BasicAuthentication from rest_framework_jwt.authentication import JSONWebTokenAuthentication from rest_framework import viewsets, serializers, permissions, mixins, status, generics from rest_framework.response import ...
{ "repo_name": "hellojerry/buddy", "path": "activities/views.py", "copies": "1", "size": "2358", "license": "mit", "hash": 3171549286274851000, "line_mean": 35.2769230769, "line_max": 87, "alpha_frac": 0.6840542833, "autogenerated": false, "ratio": 4.47438330170778, "config_test": false, "has_...
from django.shortcuts import render from rest_framework.generics import CreateAPIView from .serializers import * from rest_framework import generics from rest_framework.views import APIView from rest_framework.permissions import AllowAny from rest_framework.status import * from rest_framework.response import Response ...
{ "repo_name": "linkingcharities/linkingcharities", "path": "Linking_Charities/payment/views.py", "copies": "1", "size": "3690", "license": "mit", "hash": -604205305964238800, "line_mean": 34.8252427184, "line_max": 99, "alpha_frac": 0.6276422764, "autogenerated": false, "ratio": 4.11371237458194,...
from django.shortcuts import render from rest_framework.generics import CreateAPIView, RetrieveUpdateAPIView from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import authentication, permissions from .models import Tourist, TouristCard from .serializers import To...
{ "repo_name": "notfier/touristique", "path": "tourists/views.py", "copies": "1", "size": "1568", "license": "mit", "hash": -1812344840206158600, "line_mean": 37.243902439, "line_max": 78, "alpha_frac": 0.7346938776, "autogenerated": false, "ratio": 3.824390243902439, "config_test": false, "ha...
from django.shortcuts import render from rest_framework import generics, authentication, permissions from .models import Department from .serializers import DepartmentSerializer class DepartmentList(generics.ListAPIView): """ Get departments list. """ authentication_classes = (authentication.TokenA...
{ "repo_name": "notfier/touristique", "path": "data/views.py", "copies": "1", "size": "1177", "license": "mit", "hash": -4212603564084515300, "line_mean": 32.6285714286, "line_max": 83, "alpha_frac": 0.7281223449, "autogenerated": false, "ratio": 4.441509433962264, "config_test": false, "has_n...
from django.shortcuts import render from rest_framework import generics from rest_framework import viewsets from rest_framework import permissions from rest_framework import status from rest_framework import filters from rest_framework.response import Response from cite.serializers import * from cite.models import * ...
{ "repo_name": "everlof/RestKit-n-Django-Sample", "path": "Project_Django/cite/views.py", "copies": "1", "size": "2358", "license": "mit", "hash": 5717556976244841000, "line_mean": 30.8648648649, "line_max": 93, "alpha_frac": 0.7082273113, "autogenerated": false, "ratio": 4.100869565217391, "con...
from django.shortcuts import render from rest_framework import mixins from rest_framework import viewsets from revisions import mixins as rmixins from .models import Pack, PackIcon from .serializers import (PackSerializer, PackIconSerializer, PackCreateSerializer) ...
{ "repo_name": "shanzi/myicons", "path": "iconpacks/views.py", "copies": "3", "size": "1027", "license": "bsd-2-clause", "hash": -7434956185295158000, "line_mean": 28.3428571429, "line_max": 79, "alpha_frac": 0.6815968841, "autogenerated": false, "ratio": 4.445887445887446, "config_test": false,...
from django.shortcuts import render from rest_framework import mixins, response, status, viewsets from waffle.decorators import waffle_switch import mkt from mkt.access import acl from mkt.api.base import CORSMixin from mkt.api.authentication import (RestOAuthAuthentication, RestSh...
{ "repo_name": "mstriemer/zamboni", "path": "mkt/operators/views.py", "copies": "13", "size": "1861", "license": "bsd-3-clause", "hash": -4541082263018014700, "line_mean": 37.7708333333, "line_max": 77, "alpha_frac": 0.6996238581, "autogenerated": false, "ratio": 4.378823529411765, "config_test"...
from django.shortcuts import render from rest_framework import mixins, viewsets from waffle.decorators import waffle_switch import amo from amo.utils import paginate from mkt.api.base import CORSMixin from mkt.api.authentication import RestOAuthAuthentication from mkt.developers.models import PreloadTestPlan from mkt...
{ "repo_name": "ngokevin/zamboni", "path": "mkt/operators/views.py", "copies": "1", "size": "1397", "license": "bsd-3-clause", "hash": 7968480706433711000, "line_mean": 34.8205128205, "line_max": 77, "alpha_frac": 0.7358625626, "autogenerated": false, "ratio": 4.259146341463414, "config_test": f...
from django.shortcuts import render from rest_framework import permissions, viewsets from rest_framework.response import Response from rest_framework import status from .models import Item from .serializers import GapSerializer from django.utils.six import BytesIO from rest_framework.parsers import JSONParser """ ...
{ "repo_name": "dplin/woola", "path": "woola/r_gap/views.py", "copies": "1", "size": "1538", "license": "bsd-3-clause", "hash": -3709988955111261000, "line_mean": 25.9824561404, "line_max": 80, "alpha_frac": 0.6976592978, "autogenerated": false, "ratio": 3.9537275064267354, "config_test": false,...
from django.shortcuts import render from rest_framework import status from rest_framework.decorators import api_view, authentication_classes from rest_framework.response import Response from models import * from serializers import * from django.db import connections from rest_framework import permissions import urllib...
{ "repo_name": "EdwardMoyse/django-indigorestwrapper", "path": "indigorestwrapper/views.py", "copies": "1", "size": "7126", "license": "mit", "hash": -2678637690931754000, "line_mean": 34.4527363184, "line_max": 199, "alpha_frac": 0.6149312377, "autogenerated": false, "ratio": 4.0101294316263365, ...
from django.shortcuts import render from rest_framework import status from rest_framework.decorators import api_view from rest_framework.response import Response from news.models import News # from news.serializer import NewsSerializer from django.utils.html import strip_tags from django.template.context_processors im...
{ "repo_name": "eprivalov/sendec", "path": "api/views.py", "copies": "1", "size": "5075", "license": "apache-2.0", "hash": -6859250007304108000, "line_mean": 37.7404580153, "line_max": 138, "alpha_frac": 0.6266009852, "autogenerated": false, "ratio": 3.877005347593583, "config_test": false, "h...
from django.shortcuts import render from rest_framework import status from rest_framework.decorators import api_view from rest_framework.response import Response import math from mortgageinsurance.models import Monthly, Upfront from mortgageinsurance.params_serializer import ParamsSerializer @api_view(['GET']) def...
{ "repo_name": "amymok/owning-a-home-api", "path": "mortgageinsurance/views.py", "copies": "2", "size": "1408", "license": "cc0-1.0", "hash": -6104415598163588000, "line_mean": 32.5238095238, "line_max": 106, "alpha_frac": 0.6576704545, "autogenerated": false, "ratio": 4.022857142857143, "config...
from django.shortcuts import render from rest_framework import viewsets from rest_framework.decorators import api_view from rest_framework.response import Response from rest_framework.reverse import reverse from rest_framework_json_api.views import RelationshipView from django.contrib.auth.models import User from das...
{ "repo_name": "caneruguz/share-analytics", "path": "service/api/views.py", "copies": "1", "size": "1198", "license": "apache-2.0", "hash": 4591827288929218000, "line_mean": 33.2285714286, "line_max": 80, "alpha_frac": 0.7796327212, "autogenerated": false, "ratio": 4.188811188811189, "config_tes...
from django.shortcuts import render from rest_framework import viewsets from .models import Program, Episode, Category from .serializers import EpisodeSerializer, ProgramSerializer, CategorySerializer from rest_framework import filters import django_filters from rest_framework.generics import ListAPIView #from hay...
{ "repo_name": "mjroson/tvlibre", "path": "apps/program/views.py", "copies": "1", "size": "1759", "license": "mit", "hash": 4890700191239117000, "line_mean": 27.8360655738, "line_max": 86, "alpha_frac": 0.6878908471, "autogenerated": false, "ratio": 4.15839243498818, "config_test": false, "has...
from django.shortcuts import render from rest_framework.parsers import JSONParser from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import authentication, permissions from django.conf import settings class AuthorizeView(APIView): permission_classes = (perm...
{ "repo_name": "Joneyviana/todolist-django-angular", "path": "acessToken/views.py", "copies": "1", "size": "1841", "license": "mit", "hash": 7458921165515916000, "line_mean": 36.5714285714, "line_max": 84, "alpha_frac": 0.6382400869, "autogenerated": false, "ratio": 3.976241900647948, "config_te...
from django.shortcuts import render from rest_framework.response import Response from rest_framework import status from api.models.User import User class AuditableMixin(object,): def audit(self, request): header_user_guid = request.META.get('HTTP_SMAUTH_USERGUID') user = User.objects.get(author...
{ "repo_name": "swcurran/tfrs", "path": "backend/auditable/views.py", "copies": "1", "size": "2449", "license": "apache-2.0", "hash": 7297576722363191000, "line_mean": 35.0147058824, "line_max": 86, "alpha_frac": 0.6423029808, "autogenerated": false, "ratio": 4.027960526315789, "config_test": fa...
from django.shortcuts import render from rest_framework.response import Response from rest_framework import status class AuditableMixin(object,): def serialize_object(self, request): http_sm_user = request.META.get('HTTP_SM_USER') request.data.update({'CREATE_USER':http_sm_user,'UPDATE_USER':htt...
{ "repo_name": "jeffmcnd/tfrs", "path": "auditable/views.py", "copies": "1", "size": "1873", "license": "apache-2.0", "hash": 4128251869383138000, "line_mean": 36.46, "line_max": 86, "alpha_frac": 0.6561665777, "autogenerated": false, "ratio": 4.045356371490281, "config_test": false, "has_no_k...
from django.shortcuts import render from rest_framework.response import Response from rest_framework.views import APIView from rest_framework import status class Stats(APIView): def retrieve_player_hitting_stats(self): pass def retrieve_player_fielding_stats(self): pass def retrieve_pl...
{ "repo_name": "Manfred1ni/TriplePlay", "path": "TriplePlayServer/stats/views.py", "copies": "2", "size": "1610", "license": "mit", "hash": -485656216878068540, "line_mean": 29.3962264151, "line_max": 82, "alpha_frac": 0.5826086957, "autogenerated": false, "ratio": 4.138817480719794, "config_tes...
from django.shortcuts import render from rest_framework.views import APIView from rest_framework.response import Response from rest_framework.generics import ListCreateAPIView, RetrieveUpdateDestroyAPIView from entries.models import Entry, EntryTag, TaggedEntry from entries.serializers import EntrySerializer, EntryTa...
{ "repo_name": "erichschroeter/lieutenant", "path": "lieutenant/api/views.py", "copies": "1", "size": "1968", "license": "mit", "hash": 2277906388748106000, "line_mean": 32.9310344828, "line_max": 108, "alpha_frac": 0.6610772358, "autogenerated": false, "ratio": 4.160676532769556, "config_test":...
from django.shortcuts import render from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from wallfly.models import * from wallfly.permissions import IsRelatedToUser, IsOwnUser from wallfly.serializers import PropertySerializer, AgentSerializer, UserS...
{ "repo_name": "trcm/sacerdos", "path": "wallfly/views.py", "copies": "1", "size": "15643", "license": "mit", "hash": -569562400371218100, "line_mean": 34.0739910314, "line_max": 136, "alpha_frac": 0.5954740139, "autogenerated": false, "ratio": 4.614454277286136, "config_test": false, "has_no_...
from django.shortcuts import render from rest_framework.views import APIView from rest_framework.response import Response from api.models import Photo, AlbumAuto, AlbumUser, Face, Person, AlbumDate, AlbumPlace, AlbumThing, LongRunningJob, get_or_create_person from django.db.models import Count from django.db.models i...
{ "repo_name": "hooram/ownphotos-backend", "path": "api/views.py", "copies": "1", "size": "40535", "license": "mit", "hash": -1251551581456856800, "line_mean": 35.9844890511, "line_max": 210, "alpha_frac": 0.6988775133, "autogenerated": false, "ratio": 3.8678435114503817, "config_test": false, ...
from django.shortcuts import render from rest_pandas.views import PandasView from rest_pandas.renderers import PandasCSVRenderer, PandasTextRenderer, PandasJSONRenderer, PandasHTMLRenderer from .models import MQTTMessage from .serializers import generate_parsing_serializer_class from .conf import settings import re ...
{ "repo_name": "ast0815/mqtt-hub", "path": "mqtt_logger/views.py", "copies": "1", "size": "3374", "license": "mit", "hash": -4262687506319407600, "line_mean": 32.74, "line_max": 111, "alpha_frac": 0.6025489034, "autogenerated": false, "ratio": 4.265486725663717, "config_test": false, "has_no_k...
from django.shortcuts import render from ResumeViewer.forms import UserForm from django.template import RequestContext from django.shortcuts import render_to_response from django.contrib.auth import authenticate, login from django.http import HttpResponseRedirect, HttpResponse from django.core.context_processors impor...
{ "repo_name": "fawazn/Resume-Viewer", "path": "ResumeViewer/views.py", "copies": "1", "size": "2220", "license": "mit", "hash": -4765268516967670000, "line_mean": 30.7285714286, "line_max": 87, "alpha_frac": 0.6355855856, "autogenerated": false, "ratio": 4.586776859504132, "config_test": false,...
from django.shortcuts import render from .serializers import UserStreakSerializer from django.http import JsonResponse from rest_framework_jwt.authentication import JSONWebTokenAuthentication from buddy.permissions import IsOwnerOrReadOnly from rest_framework import generics, permissions from rest_framework.authent...
{ "repo_name": "hellojerry/buddy", "path": "analytics/views.py", "copies": "1", "size": "1623", "license": "mit", "hash": 4012291241805941000, "line_mean": 29.0555555556, "line_max": 84, "alpha_frac": 0.7141096734, "autogenerated": false, "ratio": 4.129770992366412, "config_test": false, "has_...
from django.shortcuts import render from tbutton_web.tbutton_votes.models import TbuttonRequest, TbuttonRequestComment from upvotes.views import MakeRequest, RequestList, RequestView, RequestVote, RequestFollow from upvotes.forms import get_request_form, get_anon_request_form, get_request_comment_form, get_anon_reque...
{ "repo_name": "codefisher/tbutton_web", "path": "tbutton_votes/views.py", "copies": "1", "size": "1873", "license": "mit", "hash": 8285578094214536000, "line_mean": 40.6444444444, "line_max": 122, "alpha_frac": 0.7768286172, "autogenerated": false, "ratio": 3.776209677419355, "config_test": fal...
from django.shortcuts import render from tidings.models import Watch def unsubscribe(request, watch_id): """Unsubscribe from (i.e. delete) the watch of ID ``watch_id``. Expects an ``s`` querystring parameter matching the watch's secret. GET will result in a confirmation page (or a failure page if the s...
{ "repo_name": "anushbmx/kitsune", "path": "kitsune/motidings/views.py", "copies": "6", "size": "1246", "license": "bsd-3-clause", "hash": -8518317772069788000, "line_mean": 34.6, "line_max": 88, "alpha_frac": 0.6781701445, "autogenerated": false, "ratio": 4.112211221122112, "config_test": false...
from django.shortcuts import render from ..utils.gtfsUtils import * from ..forms import UploadFileForm from ..gtfs_models import Agency from ..utils.lgUtils import * from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt import tarfile import time import zipfile import simplekml im...
{ "repo_name": "LiquidGalaxyLAB/FlOYBD", "path": "Django/mysite/floybd/gtfs/viewsGTFS.py", "copies": "2", "size": "19677", "license": "mit", "hash": -4053904879996450000, "line_mean": 36.9132947977, "line_max": 120, "alpha_frac": 0.6161000152, "autogenerated": false, "ratio": 3.6506493506493505, ...
from django.shortcuts import render from vehicles.context_processor import global_context_processor from .forms import ContactForm from dynamic_preferences.registries import global_preferences_registry # import settings so send_mail can have access to email settings from django.conf import settings from django.core.ma...
{ "repo_name": "sitture/trade-motors", "path": "src/contact/views.py", "copies": "1", "size": "2368", "license": "mit", "hash": -2196823358077469400, "line_mean": 37.8196721311, "line_max": 78, "alpha_frac": 0.5705236486, "autogenerated": false, "ratio": 4.53639846743295, "config_test": false, ...
from django.shortcuts import render from wagtail.utils.pagination import paginate from wagtail.wagtailadmin.modal_workflow import render_modal_workflow from wagtail.wagtailadmin.forms import SearchForm from wagtail.wagtailsearch import models from wagtail.wagtailsearch.utils import normalise_query_string def choose...
{ "repo_name": "mayapurmedia/wagtail", "path": "wagtail/wagtailsearch/views/queries.py", "copies": "5", "size": "1337", "license": "bsd-3-clause", "hash": -5608183706464238000, "line_mean": 32.425, "line_max": 137, "alpha_frac": 0.698578908, "autogenerated": false, "ratio": 4.101226993865031, "c...
from django.shortcuts import render from wagtail.wagtailadmin.userbar import EditPageItem, AddPageItem, ApproveModerationEditPageItem, RejectModerationEditPageItem from wagtail.wagtailadmin import hooks from wagtail.wagtailcore.models import Page, PageRevision def for_frontend(request, page_id): items = [ ...
{ "repo_name": "helenwarren/pied-wagtail", "path": "wagtail/wagtailadmin/views/userbar.py", "copies": "3", "size": "1592", "license": "bsd-3-clause", "hash": 4686307345992591000, "line_mean": 32.8936170213, "line_max": 127, "alpha_frac": 0.7060301508, "autogenerated": false, "ratio": 3.76359338061...
from django.shortcuts import render from wagtail.wagtailcore.models import Page from wagtail.wagtailsearch.models import Query # Create your views here. from django.views.generic import TemplateView class CommView(TemplateView): template_name = "communications.html" def get_context_data(self, **kwargs)...
{ "repo_name": "Upande/MaMaSe", "path": "apps/news/views.py", "copies": "1", "size": "1087", "license": "apache-2.0", "hash": 7610297496947780000, "line_mean": 27.6052631579, "line_max": 66, "alpha_frac": 0.6550137994, "autogenerated": false, "ratio": 3.9816849816849818, "config_test": false, ...
from django.shortcuts import render from web_app.forms import SongForm def basic_web_app(request): ctx = {} ctx['albums'] = [ { 'artist': 'Les Gordon', 'title': 'Abyss', 'year': '2016', 'songs': [ { 'track': 1, ...
{ "repo_name": "octaflop/django_music", "path": "apps/web_app/views.py", "copies": "1", "size": "1788", "license": "mit", "hash": -5222826570987713000, "line_mean": 25.2941176471, "line_max": 46, "alpha_frac": 0.3484340045, "autogenerated": false, "ratio": 4.318840579710145, "config_test": false...
from django.shortcuts import render from web.data import * from web.models import User, SharedTask from web.berg import getQRCodeUrl import base64 import datetime import hashlib import hmac import json import random import string import uuid # TODO: add AWS credentials here AWS_ACCESS_KEY_ID = 'XXX' AWS_SECRET_KEY =...
{ "repo_name": "savageinternet/hoedown", "path": "k4pop/web/utils.py", "copies": "1", "size": "3264", "license": "mit", "hash": 6805350066610219000, "line_mean": 29.5046728972, "line_max": 67, "alpha_frac": 0.6084558824, "autogenerated": false, "ratio": 3.464968152866242, "config_test": false, ...
from django.shortcuts import render # Generics views from django.views.generic import ListView, DetailView # Models from .models import Work # Paginator from django.core.paginator import Paginator from django.core.paginator import EmptyPage from django.core.paginator import PageNotAnInteger # Settings from django....
{ "repo_name": "Pyc0kw4k/djangocms-portfolio", "path": "djangocms_portfolio/views.py", "copies": "1", "size": "3589", "license": "apache-2.0", "hash": 1703073671937936000, "line_mean": 32.2407407407, "line_max": 83, "alpha_frac": 0.6603510727, "autogenerated": false, "ratio": 3.7898627243928193, ...
from django.shortcuts import render import commonware from gameon.submissions.models import Category, Entry, Challenge from gameon.events.models import Event log = commonware.log.getLogger('playdoh') def home(request, template='static_site/landing.html'): upcoming_events = Event.objects.get_upcoming() cur...
{ "repo_name": "mozilla/gameon", "path": "gameon/static_site/views.py", "copies": "1", "size": "1952", "license": "bsd-3-clause", "hash": -573386199938942000, "line_mean": 26.4929577465, "line_max": 70, "alpha_frac": 0.6424180328, "autogenerated": false, "ratio": 3.6417910447761193, "config_test...
from django.shortcuts import render import hashlib # def index(request): # return HttpResponse("Hello, world. You're at the polls index.") # Create your views here. from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect, HttpResponse from django.template import RequestContext,...
{ "repo_name": "icyflame/test-taking-platform", "path": "examsys/views.py", "copies": "1", "size": "4106", "license": "mit", "hash": -2963349384975051300, "line_mean": 20.274611399, "line_max": 108, "alpha_frac": 0.6941061861, "autogenerated": false, "ratio": 3.313962873284907, "config_test": tr...
from django.shortcuts import render import json from django.template import loader, RequestContext from django.http import (HttpResponse, HttpResponseRedirect, Http404, HttpResponseForbidden) from django.db.models.base import ModelBase from django.contrib.contenttypes.models import ContentType...
{ "repo_name": "contactr2m/remote_repo", "path": "src/rating/views.py", "copies": "1", "size": "3568", "license": "mit", "hash": -7590384914042046000, "line_mean": 36.9574468085, "line_max": 98, "alpha_frac": 0.6219170404, "autogenerated": false, "ratio": 4.101149425287356, "config_test": false,...
from django.shortcuts import render import json from django.views.decorators.csrf import csrf_exempt from django.http import JsonResponse from django.http import HttpResponse from rest_framework import status from core.api.custom_exceptions import CustomApiException from core.api.services import Services from rest_fra...
{ "repo_name": "divinedeveloper/mini-quora", "path": "core/api/views.py", "copies": "1", "size": "3411", "license": "apache-2.0", "hash": 373183077689045950, "line_mean": 33.12, "line_max": 112, "alpha_frac": 0.7607739666, "autogenerated": false, "ratio": 3.6133474576271185, "config_test": false...
# from django.shortcuts import render import json import random import traceback from django.views import generic from django.http.response import HttpResponse from django.views.decorators.csrf import csrf_exempt from django.utils.decorators import method_decorator # from django.shortcuts import redirect from django...
{ "repo_name": "dizzy54/fplbot", "path": "analysis/views.py", "copies": "1", "size": "6732", "license": "mit", "hash": 8309111425464867000, "line_mean": 33.5230769231, "line_max": 125, "alpha_frac": 0.5765002971, "autogenerated": false, "ratio": 4.467153284671533, "config_test": false, "has_no...
from django.shortcuts import render import logging from rest_framework import status from rest_framework.decorators import api_view from biz.firewall.models import Firewall from biz.instance.models import Instance from biz.account.models import Operation from rest_framework.response import Response from .settings imp...
{ "repo_name": "eoncloud-dev/eonboard", "path": "eoncloud_web/biz/firewall/views.py", "copies": "3", "size": "7206", "license": "apache-2.0", "hash": 6706318145384498000, "line_mean": 43.4814814815, "line_max": 125, "alpha_frac": 0.6569525396, "autogenerated": false, "ratio": 3.9120521172638436, ...
from django.shortcuts import render import numpy as np import tensorflow as tf # import django modules for CSRF from django.views.decorators.csrf import csrf_protect from django.template.context_processors import csrf from django.shortcuts import render_to_response # import django modules for Http handling from djan...
{ "repo_name": "tsuday/Image2Object", "path": "image2object/views.py", "copies": "1", "size": "3228", "license": "mit", "hash": 2970536414502873600, "line_mean": 28.0810810811, "line_max": 142, "alpha_frac": 0.7252168525, "autogenerated": false, "ratio": 3.6433408577878104, "config_test": false,...
from django.shortcuts import render import os import pprint as pp from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import render, redirect from django.core.urlresolvers import reverse from django.contrib.auth.decorators import login_required import rolodex.models as Models import ro...
{ "repo_name": "CCBG/django-rolodex", "path": "rolodex/views.py", "copies": "1", "size": "5520", "license": "mit", "hash": -161062564412452830, "line_mean": 26.8787878788, "line_max": 106, "alpha_frac": 0.6206521739, "autogenerated": false, "ratio": 4.043956043956044, "config_test": false, "ha...
from django.shortcuts import render #imports the model classes to access data in all our views. from .models import Book, Author, BookInstance, Genre, Language def index(request): """ View function for homepage """ #Generate count of some of the main objects num_books = Book.objects.all().count()#.all() is imple...
{ "repo_name": "byNio/django_local_library", "path": "catalog/views.py", "copies": "1", "size": "7747", "license": "mit", "hash": 2605639211507349500, "line_mean": 42.0388888889, "line_max": 137, "alpha_frac": 0.7604233897, "autogenerated": false, "ratio": 3.588235294117647, "config_test": false...
from django.shortcuts import render class SetRemoteAddrFromForwardedFor(object): """ Middleware that sets REMOTE_ADDR based on HTTP_X_FORWARDED_FOR, if the latter is set. This is useful if you're sitting behind a reverse proxy that causes each request's REMOTE_ADDR to be set to 127.0.0.1. Note th...
{ "repo_name": "adngdb/socorro", "path": "webapp-django/crashstats/crashstats/middleware.py", "copies": "4", "size": "1598", "license": "mpl-2.0", "hash": -777685984726918300, "line_mean": 35.3181818182, "line_max": 79, "alpha_frac": 0.6195244055, "autogenerated": false, "ratio": 4.066157760814249...
from django.shortcuts import render def api(request): """ { "id": "some-id", "method": "GET", "endpoint": "/v1/products", "description": "Some Description", "query_params": [ {'name': 'foo-bar', 'description': 'description'} ...
{ "repo_name": "brady-vitrano/ecommerce-demo", "path": "page/views.py", "copies": "1", "size": "15330", "license": "apache-2.0", "hash": -1036288461731472300, "line_mean": 42.6780626781, "line_max": 116, "alpha_frac": 0.4904761905, "autogenerated": false, "ratio": 4.397590361445783, "config_test...
from django.shortcuts import render def charts(request): exchange = {'2001-01-31': 1.064, '2002-01-31': 1.1305, '2003-01-31': 0.9417, '2004-01-31': 0.7937, '2005-01-31': 0.7609, '2006-01-31': 0.827, '2007-01-31': 0.7692, '2008-01-31': 0.6801, '2009-0...
{ "repo_name": "zknyoyo/chartkick.py", "path": "examples/demo/charts/views.py", "copies": "1", "size": "4533", "license": "mit", "hash": 5950888922588095000, "line_mean": 55.6625, "line_max": 73, "alpha_frac": 0.3582616369, "autogenerated": false, "ratio": 3.102669404517454, "config_test": false...
from django.shortcuts import render # def home(request): # return render( # request, # 'portfolio/home.html', # context={} # ) # # def about(request): # return render( # request, # 'portfolio/about.html', # context={} # ) # # def contact(request): # ...
{ "repo_name": "bacarlino/portfolio", "path": "portfolio/views.py", "copies": "1", "size": "1483", "license": "mit", "hash": 2813732380169508000, "line_mean": 17.5375, "line_max": 39, "alpha_frac": 0.4908968307, "autogenerated": false, "ratio": 3.20995670995671, "config_test": false, "has_no_k...
from django.shortcuts import render def index(request): from models import Category categories = Category.objects.all() return render(request, 'sitelight/index.html', { 'categories' : categories }) def sitemap(request): from models import Category categories = Category.objects.all() hos...
{ "repo_name": "ByteRockCode/django-sitelight", "path": "sitelight/views.py", "copies": "1", "size": "1255", "license": "mit", "hash": -1273511999197623000, "line_mean": 25.7021276596, "line_max": 136, "alpha_frac": 0.6733067729, "autogenerated": false, "ratio": 3.971518987341772, "config_test":...
from django.shortcuts import render def supported_activities(req): # so as not to force people to read REGEX to understand what they can name their activities ELLIPSES = "…" activities = {} activities["Running"] = ["run", "running"] activities["Cycling"] = ["cycling", "cycle", "bike", "biki...
{ "repo_name": "campbellr/tapiriik", "path": "tapiriik/web/views/supported_activities.py", "copies": "4", "size": "1620", "license": "apache-2.0", "hash": -4889721957127033000, "line_mean": 53, "line_max": 114, "alpha_frac": 0.6561728395, "autogenerated": false, "ratio": 3.2661290322580645, "con...
from django.shortcuts import render from django import template from crawler.models import HTML from django.db import connections from django.conf import settings from django.http import HttpResponse from django.template import RequestContext import time from datetime import datetime, timedelta from django.utils i...
{ "repo_name": "luzhuomi/collamine-client-python", "path": "webapp/crawler/views.py", "copies": "1", "size": "8310", "license": "apache-2.0", "hash": 7854004355160737000, "line_mean": 26.8859060403, "line_max": 148, "alpha_frac": 0.6399518652, "autogenerated": false, "ratio": 3.029529711994167, ...
from django.shortcuts import render # Import redirect and render shortcuts from django.shortcuts import redirect from django.shortcuts import render_to_response # Import reverse_lazy method for reversing names to URLs from django.core.urlresolvers import reverse_lazy # Import the login_required decorator which can ...
{ "repo_name": "sjsafranek/pomegranate", "path": "app/views.py", "copies": "1", "size": "1577", "license": "mit", "hash": -4021132268119042000, "line_mean": 28.7547169811, "line_max": 85, "alpha_frac": 0.7634749524, "autogenerated": false, "ratio": 4.106770833333333, "config_test": false, "has...
from django.shortcuts import render from rest_framework.views import APIView from rest_framework.response import Response import rest_framework.status import calendar from datetime import datetime, timedelta import traceback import json import requests from .models import * class Uploader(APIView): # Create ...
{ "repo_name": "prachetos/goibibo-hackathon2016", "path": "hackathon2016/idphotoupload/views.py", "copies": "1", "size": "3707", "license": "apache-2.0", "hash": -4790623247677401000, "line_mean": 30.4237288136, "line_max": 187, "alpha_frac": 0.5753978959, "autogenerated": false, "ratio": 3.964705...
from django.shortcuts import render ssb = ('/static/smash.jpg', 'Super Smash Brothers 4', 'chat/ssb') wow = ('/static/wow.jpg', 'World of Warcraft', '/chat/wow') lol = ('/static/lol.jpg', 'League of Legends', '/chat/lol') csgo = ('/static/csgo.jpg', 'CS: Global Offensive', '/chat/cs') destiny = ('/static/destiny.jpg'...
{ "repo_name": "nbeck90/game-chat", "path": "gamechat/gamechat/views.py", "copies": "1", "size": "1130", "license": "mit", "hash": -8010817043055615000, "line_mean": 33.2424242424, "line_max": 77, "alpha_frac": 0.6309734513, "autogenerated": false, "ratio": 2.8463476070528966, "config_test": fal...
from django.shortcuts import render try: from .models import BasicFilesForm, FileForm except ImportError: from models import BasicFilesForm, FileForm def pick(request): message = None basic_form = BasicFilesForm() form = FileForm() if request.method == "POST": post = request.POST.dic...
{ "repo_name": "filepicker/filepicker-django", "path": "demo/filepicker_demo/views.py", "copies": "2", "size": "1356", "license": "mit", "hash": -8733146828859347000, "line_mean": 33.7948717949, "line_max": 101, "alpha_frac": 0.5339233038, "autogenerated": false, "ratio": 4.059880239520958, "con...
from django.shortcuts import render ## 按照时间由近至远寻找板块 ## 输入范围 ## 输出内容,格式为Queryset from blog.common_select import select_block_bytime ## 按照ID寻找板块 ## 输入ID ## 输出格式为Queryset from blog.common_select import select_block_byid ## 按照时间由近至远寻找某版块下的文章 ## 输入blockid,范围(若blockid=0表示全板块搜索) ## 输出内容,格式为Queryset from blog.common_sel...
{ "repo_name": "blacksea3/medit", "path": "medit/main/views.py", "copies": "1", "size": "4847", "license": "apache-2.0", "hash": -9115835759176875000, "line_mean": 32.7398373984, "line_max": 108, "alpha_frac": 0.6529284165, "autogenerated": false, "ratio": 2.2451298701298703, "config_test": fals...
from django.shortcuts import render # views from django.contrib.auth.models import User from django.contrib.auth import logout, login, authenticate from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt import json from rest_framework import permissions from rest_framework import v...
{ "repo_name": "DamonRomano/backEndCapstone", "path": "car_sort_project/server/car_sort_app/views.py", "copies": "1", "size": "2993", "license": "mit", "hash": -7278279277867412000, "line_mean": 29.2323232323, "line_max": 87, "alpha_frac": 0.6759104577, "autogenerated": false, "ratio": 4.186013986...
from django.shortcuts import render, redirect, get_object_or_404 as getObj from django.conf import settings from django.contrib.auth import authenticate, login as auth_login, logout as auth_logout from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.contrib i...
{ "repo_name": "kensonman/IMCSmartHome", "path": "ccu/webconsole/views.py", "copies": "1", "size": "5611", "license": "apache-2.0", "hash": -6073361749932929000, "line_mean": 29.6612021858, "line_max": 88, "alpha_frac": 0.68205311, "autogenerated": false, "ratio": 3.066120218579235, "config_test...
from django.shortcuts import render, redirect, get_object_or_404, get_list_or_404 from django.conf import settings from django.contrib import messages from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.forms import ModelForm, CharField, ValidationError from django.utils.translation imp...
{ "repo_name": "m0r13/hpi-quotedb", "path": "hpi_quotedb/quotedb/views.py", "copies": "1", "size": "4618", "license": "mit", "hash": 8567769592592751000, "line_mean": 38.4700854701, "line_max": 135, "alpha_frac": 0.6446513642, "autogenerated": false, "ratio": 3.6448303078137334, "config_test": f...
from django.shortcuts import render, redirect, get_object_or_404, get_list_or_404 from django.http import HttpResponse, HttpResponseServerError from django.core.urlresolvers import reverse from django.core.exceptions import PermissionDenied from tethyscluster.cli_api import TethysCluster from tethyscluster import conf...
{ "repo_name": "CI-WATER/django-tethys_compute", "path": "tethys_compute/views.py", "copies": "1", "size": "3069", "license": "bsd-2-clause", "hash": 5208668510220775000, "line_mean": 27.691588785, "line_max": 117, "alpha_frac": 0.6301726947, "autogenerated": false, "ratio": 3.8171641791044775, ...
from django.shortcuts import render, redirect, get_object_or_404, Http404, HttpResponse from django.contrib import messages from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.http import JsonResponse from django.views.decorators.cache import cache_control f...
{ "repo_name": "akbarpn136/perek-dj", "path": "logbook/views.py", "copies": "1", "size": "21108", "license": "cc0-1.0", "hash": -4763411882556387000, "line_mean": 38.9017013233, "line_max": 118, "alpha_frac": 0.5408849725, "autogenerated": false, "ratio": 3.2771308802980905, "config_test": false...
from django.shortcuts import render, redirect, get_object_or_404, Http404, HttpResponse from django.contrib import messages from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.http impo...
{ "repo_name": "akbarpn136/perek-dj", "path": "tugas/views.py", "copies": "1", "size": "44852", "license": "cc0-1.0", "hash": 8019197063789599000, "line_mean": 41.2335216573, "line_max": 118, "alpha_frac": 0.5322616606, "autogenerated": false, "ratio": 3.299639520341352, "config_test": false, ...
from django.shortcuts import render, redirect, get_object_or_404, Http404 from django.utils.translation import gettext_lazy as _ from django.contrib import messages from django.conf import settings from django.contrib.sitemaps import Sitemap from django.contrib.auth.mixins import LoginRequiredMixin from django.template...
{ "repo_name": "stefanw/froide", "path": "froide/publicbody/views.py", "copies": "1", "size": "5329", "license": "mit", "hash": 1865674554888532500, "line_mean": 29.2784090909, "line_max": 98, "alpha_frac": 0.669356352, "autogenerated": false, "ratio": 3.690443213296399, "config_test": false, ...
from django.shortcuts import render, redirect, get_object_or_404, HttpResponse # Create your views here. from django.shortcuts import render from supra import views as supra from cliente import models as cliente import models import forms from django.utils.decorators import method_decorator from django.views.decorators...
{ "repo_name": "exildev/AutoLavadox", "path": "cierre/views.py", "copies": "1", "size": "2097", "license": "mit", "hash": 5096287941986540000, "line_mean": 35.1551724138, "line_max": 149, "alpha_frac": 0.6928946113, "autogenerated": false, "ratio": 3.4320785597381342, "config_test": false, "ha...
from django.shortcuts import render, redirect, get_object_or_404, HttpResponse from django.contrib.auth.views import login from django.contrib.auth.models import User from django.contrib.auth.hashers import check_password from django.utils.text import slugify from django.contrib.auth.decorators import login_required fr...
{ "repo_name": "akbarpn136/logapp-dj", "path": "logapp/views.py", "copies": "1", "size": "17384", "license": "mit", "hash": -4561613868313648000, "line_mean": 34.1902834008, "line_max": 119, "alpha_frac": 0.6465715601, "autogenerated": false, "ratio": 3.0616414230362805, "config_test": false, ...
from django.shortcuts import render, redirect, get_object_or_404, HttpResponse from django.http import JsonResponse from django.contrib import messages from django.contrib.auth import logout, login, authenticate from django.contrib.auth.decorators import login_required from django.core.paginator import Paginator, Empty...
{ "repo_name": "akbarpn136/perek-dj", "path": "utama/views.py", "copies": "1", "size": "16574", "license": "cc0-1.0", "hash": -1456190791158790000, "line_mean": 29.6925925926, "line_max": 120, "alpha_frac": 0.5874260891, "autogenerated": false, "ratio": 3.451478550603915, "config_test": false, ...
from django.shortcuts import render, redirect, get_object_or_404, HttpResponseRedirect, HttpResponse from order.models import Order, Customer, Product, Stock from order.forms import CustomerForm, ProductForm, StockForm, OrderForm from django.contrib.auth.decorators import login_required from datetime import datetime i...
{ "repo_name": "alejo8591/angular-labs", "path": "lab15/order/views.py", "copies": "1", "size": "11014", "license": "mit", "hash": 4440518123396212000, "line_mean": 25.3468899522, "line_max": 112, "alpha_frac": 0.6105158009, "autogenerated": false, "ratio": 4.081541882876205, "config_test": fals...
from django.shortcuts import render, redirect, get_object_or_404 from bootcamp.feeds.views import feeds from django.contrib.auth.models import User from bootcamp.feeds.models import Feed from bootcamp.feeds.views import FEEDS_NUM_PAGES from django.core.paginator import Paginator from django.contrib.auth.decorators impo...
{ "repo_name": "xavierzip/bootcamp", "path": "bootcamp/core/views.py", "copies": "3", "size": "4730", "license": "mit", "hash": -8023998144994579000, "line_mean": 36.5476190476, "line_max": 109, "alpha_frac": 0.6382663848, "autogenerated": false, "ratio": 3.7900641025641026, "config_test": false...
from django.shortcuts import render,redirect, get_object_or_404 from datetime import datetime, timedelta from django.http import HttpResponse from django.conf import settings # Create your views here. import os,paramiko from serv.models import Serv #templ_dir = TEMPLATE_DIRS def list_all(request): all_servs = Serv....
{ "repo_name": "oswalpalash/remoteusermgmt", "path": "Hackathon/serv/views.py", "copies": "1", "size": "1394", "license": "mit", "hash": 2448584150548430000, "line_mean": 26.88, "line_max": 71, "alpha_frac": 0.693687231, "autogenerated": false, "ratio": 3.111607142857143, "config_test": false, ...
from django.shortcuts import render, redirect, get_object_or_404 # from django.conf import settings from django.contrib.auth import authenticate, login, get_user_model from django.contrib.auth.forms import PasswordChangeForm, SetPasswordForm from django.contrib.auth.decorators import login_required from django.contrib ...
{ "repo_name": "mazulo/simplemooc", "path": "simplemooc/accounts/views.py", "copies": "1", "size": "2967", "license": "mit", "hash": 1168958243845939700, "line_mean": 28.67, "line_max": 73, "alpha_frac": 0.6508257499, "autogenerated": false, "ratio": 3.9246031746031744, "config_test": false, "...
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.admin.views.decorators import staff_member_required from django.contrib import messages from .forms import MailForm from .models import EmailTemplate @staff_member_required def send_mail(request, template="templated_mail/send_mail.h...
{ "repo_name": "AvocadoCoop/avocado-templated-mail", "path": "templated_mail/views.py", "copies": "1", "size": "1153", "license": "bsd-3-clause", "hash": -75009867473425780, "line_mean": 24.6222222222, "line_max": 82, "alpha_frac": 0.6253252385, "autogenerated": false, "ratio": 4.059859154929577, ...
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.admin.views.decorators import staff_member_required from django.core.urlresolvers import reverse from django.conf import settings from django.http import HttpResponse from django.template.loader import render_to_string from .models imp...
{ "repo_name": "delitamakanda/jobboard", "path": "orders/views.py", "copies": "1", "size": "2148", "license": "mit", "hash": 5398279454259921000, "line_mean": 41.96, "line_max": 126, "alpha_frac": 0.677839851, "autogenerated": false, "ratio": 3.8772563176895307, "config_test": false, "has_no_k...
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from course.models import Course from forum.models import Topic, TopicMessage, MessageComment from forum.forms import TopicForm, TopicMessageForm, MessageCommentForm @login_required def topics(req...
{ "repo_name": "starkdee/courseware", "path": "forum/views.py", "copies": "1", "size": "2574", "license": "mit", "hash": -1328478942352703000, "line_mean": 35.7857142857, "line_max": 164, "alpha_frac": 0.6825951826, "autogenerated": false, "ratio": 3.65625, "config_test": false, "has_no_keywor...
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from django.contrib.auth import logout from django.contrib import messages from django.shortcuts import HttpResponseRedirect from django.db.models import Q from django.core.exceptions import Valida...
{ "repo_name": "tombasche/BookChook", "path": "bookchook/views.py", "copies": "1", "size": "7987", "license": "mit", "hash": -3375520846184034000, "line_mean": 41.7112299465, "line_max": 389, "alpha_frac": 0.637535996, "autogenerated": false, "ratio": 3.740983606557377, "config_test": false, "...
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from collections import Counter from booking.forms import ResidentForm, SearchForm, RegisterForm from booking.models import Resident, Booking, Estate ...
{ "repo_name": "boyombo/django-stations", "path": "stations/booking/views.py", "copies": "1", "size": "2725", "license": "mit", "hash": -9185782523843420000, "line_mean": 31.4404761905, "line_max": 72, "alpha_frac": 0.6176146789, "autogenerated": false, "ratio": 3.7742382271468142, "config_test"...
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.http import HttpResponse from django.contrib import messages import json from datetime import datetime import pytz from .models import Memo,...
{ "repo_name": "kiwiheretic/logos-v2", "path": "cloud_memos/views.py", "copies": "1", "size": "5511", "license": "apache-2.0", "hash": -2459160215255640000, "line_mean": 33.8797468354, "line_max": 98, "alpha_frac": 0.6265650517, "autogenerated": false, "ratio": 3.630434782608696, "config_test": ...
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.views.decorators.http import require_POST from cmdbox.snippets.models import Snippet from cmdbox.snippets.forms import CreateSnippetForm, Ed...
{ "repo_name": "vitorfs/cmdbox", "path": "cmdbox/snippets/views.py", "copies": "1", "size": "1847", "license": "mit", "hash": -6324553276802425000, "line_mean": 33.2037037037, "line_max": 84, "alpha_frac": 0.7060097455, "autogenerated": false, "ratio": 3.7388663967611335, "config_test": false, ...
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from .forms import Setting def login(request): if request.user.is_authenticated: return redirect('/') return render(request, 'oauth/log...
{ "repo_name": "i544c/funny-dating", "path": "oauth/views.py", "copies": "1", "size": "1038", "license": "mit", "hash": -4051035987480884700, "line_mean": 29.5294117647, "line_max": 64, "alpha_frac": 0.6454720617, "autogenerated": false, "ratio": 3.9022556390977443, "config_test": false, "has_...
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from django.contrib import messages from django.contrib.auth import get_user_model from emails.forms import EmailPreferenceForm from emails.models import Email, MailoutCategory, MailoutUser User =...
{ "repo_name": "fmalina/emails", "path": "emails/views.py", "copies": "1", "size": "1824", "license": "bsd-3-clause", "hash": 7687263222600911000, "line_mean": 34.0769230769, "line_max": 80, "alpha_frac": 0.6518640351, "autogenerated": false, "ratio": 3.7453798767967146, "config_test": false, ...
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from django.contrib import messages from django.contrib.auth import logout from django.contrib.auth.models import User from django.db.models import Sum from .decorators import is_authenticated fro...
{ "repo_name": "passuf/WunderHabit", "path": "wunderhabit/views.py", "copies": "1", "size": "3512", "license": "mit", "hash": 4557151225699245600, "line_mean": 27.5528455285, "line_max": 92, "alpha_frac": 0.6967539863, "autogenerated": false, "ratio": 3.946067415730337, "config_test": false, "...
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from django.contrib import messages from .forms import ImageCreateForm from .models import Image from django.http import JsonResponse, HttpResponse from django.views.decorators.http import require_...
{ "repo_name": "hiteshgarg14/Django-Social-Website", "path": "bookmarks/images/views.py", "copies": "1", "size": "3782", "license": "mit", "hash": -7353928773386192000, "line_mean": 37.9896907216, "line_max": 120, "alpha_frac": 0.6430460074, "autogenerated": false, "ratio": 3.9232365145228214, "...
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from django.contrib import messages from models import * from campaignManager.profiles.models import CampaignProfile import sys # Create your views here. @login_required def send_invitation(reques...
{ "repo_name": "didymus13/kangaroo-black", "path": "campaignManager/campaignManager/invitations/views.py", "copies": "1", "size": "1983", "license": "mit", "hash": 2203654508578656300, "line_mean": 36.4339622642, "line_max": 95, "alpha_frac": 0.6701966717, "autogenerated": false, "ratio": 4.13125,...
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.core import serializers from django.db import transaction from django.http import HttpResponse, HttpResponseRedi...
{ "repo_name": "kiwiheretic/logos-v2", "path": "cloud_notes/views.py", "copies": "1", "size": "15497", "license": "apache-2.0", "hash": -5449209052985758000, "line_mean": 35.2927400468, "line_max": 116, "alpha_frac": 0.5901142157, "autogenerated": false, "ratio": 3.917340748230536, "config_test"...
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.conf import settings from eguard.models import Entrance, EntranceAppointment from mail.sendmail import sendEmail # Create your views here. ...
{ "repo_name": "fenglb/mysite", "path": "eguard/views.py", "copies": "1", "size": "1610", "license": "cc0-1.0", "hash": -3263895161754069500, "line_mean": 35.0512820513, "line_max": 94, "alpha_frac": 0.6628733997, "autogenerated": false, "ratio": 2.6986564299424183, "config_test": false, "has_...
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from django.forms import ModelForm from surveys.models import Survey, Question, Choice class SurveyForm(ModelForm): class Meta: model = Survey fields = ['title'] # Create your...
{ "repo_name": "raonyguimaraes/coachsurveys", "path": "src/surveys/views.py", "copies": "1", "size": "4392", "license": "mit", "hash": 6236338196435039000, "line_mean": 35.0081967213, "line_max": 109, "alpha_frac": 0.6530054645, "autogenerated": false, "ratio": 3.8191304347826085, "config_test":...
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from django.http import Http404, HttpResponse from django.contrib import messages from django.core.urlresolvers import reverse from django.core.paginator import Paginator, PageNotAnInteger, EmptyPa...
{ "repo_name": "tony-joseph/livre", "path": "items/views.py", "copies": "1", "size": "22123", "license": "bsd-3-clause", "hash": -7045458863549470000, "line_mean": 33.246130031, "line_max": 115, "alpha_frac": 0.6374813542, "autogenerated": false, "ratio": 3.6988797859889653, "config_test": false...
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from django.http import HttpResponseForbidden from django.contrib import messages from django.contrib.auth.models import User from django.core.mail import send_mail from .models import (Ticket, Ti...
{ "repo_name": "rchacon/moticket", "path": "tix/views.py", "copies": "2", "size": "5064", "license": "mit", "hash": -8469599567851602000, "line_mean": 33.924137931, "line_max": 97, "alpha_frac": 0.5622037915, "autogenerated": false, "ratio": 4.354256233877902, "config_test": false, "has_no_key...
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from django.http.response import HttpResponseNotFound from django.utils import timezone from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.utils.translation import...
{ "repo_name": "CCrypto/ccvpn3", "path": "tickets/views.py", "copies": "1", "size": "5165", "license": "mit", "hash": -8535246061611636000, "line_mean": 29.744047619, "line_max": 84, "alpha_frac": 0.6352371733, "autogenerated": false, "ratio": 3.7346348517715113, "config_test": false, "has_no_...
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.http import Http404 from django.views.generic import ListView from django.views.generic.edit import CreateView from django.shortcuts...
{ "repo_name": "almarzouq/course_mgt_sys", "path": "courses/views.py", "copies": "1", "size": "20468", "license": "mit", "hash": 5207737440548822000, "line_mean": 33.6328257191, "line_max": 151, "alpha_frac": 0.6116865351, "autogenerated": false, "ratio": 3.8531626506024095, "config_test": false...
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from django.utils import timezone from .models import Post, Comment from .forms import PostForm, CommentForm def post_list(request): posts = Post.objects.filter(published_date__lte=timezone.no...
{ "repo_name": "voron434/hello_django", "path": "blog/views.py", "copies": "1", "size": "2764", "license": "mit", "hash": -7078798511720917000, "line_mean": 29.7222222222, "line_max": 94, "alpha_frac": 0.6400144718, "autogenerated": false, "ratio": 3.4593241551939924, "config_test": false, "ha...
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from manager.models.attendee import Attendee from manager.models.invoice import Invoice, MergedInvoice from manager.models.auction_item import AuctionItem from manager.forms import InvoiceForm, Tab...
{ "repo_name": "lightcastle/auction-manager-online", "path": "manager/views/invoice.py", "copies": "1", "size": "11876", "license": "mit", "hash": -8783366376543069000, "line_mean": 35.6543209877, "line_max": 194, "alpha_frac": 0.6265577636, "autogenerated": false, "ratio": 4.273479668945664, "c...
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from manager.models.invoice import Invoice from manager.models.attendee import Attendee from manager.models.auction_item import AuctionItem from manager.forms import AuctionItemForm, ItemSearchForm...
{ "repo_name": "lightcastle/auction-manager-online", "path": "manager/views/auction_item.py", "copies": "1", "size": "6420", "license": "mit", "hash": -8345625219327727000, "line_mean": 37.4431137725, "line_max": 173, "alpha_frac": 0.6186915888, "autogenerated": false, "ratio": 4.055590650663298, ...