text
stringlengths
0
1.05M
meta
dict
from django.shortcuts import render, redirect from django.views.generic import FormView, View, TemplateView from django.contrib.auth import login, logout from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.models import Group from Ventanilla.models import TablaAlumno, CatalogoTipoAlumno, ...
{ "repo_name": "CallmeTorre/Idalia", "path": "ESCOM/Area/views.py", "copies": "1", "size": "4576", "license": "apache-2.0", "hash": 5266044404304816000, "line_mean": 40.2342342342, "line_max": 164, "alpha_frac": 0.6826923077, "autogenerated": false, "ratio": 3.349926793557833, "config_test": fal...
from django.shortcuts import render, redirect from django.views.generic import FormView, View, TemplateView from Ventanilla.utils import generarCodigo, errorTipoAlumno, setVariablesSesion,enviarCorreo from Ventanilla.models import TablaAlumno, CatalogoTipoAlumno, TablaSolicitud, CatalogoEstadoSolicitud, CatalogoTipoDoc...
{ "repo_name": "CallmeTorre/Idalia", "path": "ESCOM/SolicitarDocumento/views.py", "copies": "1", "size": "4769", "license": "apache-2.0", "hash": -253190347819719650, "line_mean": 45.7647058824, "line_max": 198, "alpha_frac": 0.678548962, "autogenerated": false, "ratio": 3.202820685023506, "conf...
from django.shortcuts import render, redirect from django.views.generic import FormView, View, TemplateView from django.http import HttpResponse from reportlab.pdfgen import canvas from reportlab.lib.pagesizes import letter from reportlab.lib.styles import getSampleStyleSheet from reportlab.lib.units import inch fro...
{ "repo_name": "CallmeTorre/Idalia", "path": "ESCOM/Ventanilla/views.py", "copies": "1", "size": "7907", "license": "apache-2.0", "hash": -2391682896640556500, "line_mean": 39.5487179487, "line_max": 164, "alpha_frac": 0.6814215252, "autogenerated": false, "ratio": 3.298706716729245, "config_tes...
from django.shortcuts import render, redirect from django.views.generic import ListView, CreateView, TemplateView, DetailView, UpdateView, View, DeleteView from django.views.generic.base import RedirectView from django.core.urlresolvers import reverse_lazy from django.conf import settings from datetime import datetime ...
{ "repo_name": "SINTEF-Infosec/Incident-Information-Sharing-Tool", "path": "incidents/views.py", "copies": "1", "size": "35260", "license": "apache-2.0", "hash": -7289043336187825000, "line_mean": 35.4266528926, "line_max": 158, "alpha_frac": 0.6375212706, "autogenerated": false, "ratio": 4.111953...
from django.shortcuts import render,redirect from django.views.generic import TemplateView,CreateView,UpdateView,DeleteView from django.core.urlresolvers import reverse_lazy from django.contrib.auth import authenticate,login from django.views import generic from django.views.generic import View from .forms import User...
{ "repo_name": "Ferdous-Al-Imran/Aqualizer", "path": "website/website/home/views.py", "copies": "1", "size": "1146", "license": "mit", "hash": -6270798846097980000, "line_mean": 24.4666666667, "line_max": 78, "alpha_frac": 0.7513089005, "autogenerated": false, "ratio": 3.4518072289156625, "confi...
from django.shortcuts import render,redirect from django.views.generic import TemplateView, ListView, DetailView from django.views.generic.edit import CreateView,UpdateView,DeleteView from django.urls import reverse_lazy from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.decorators impor...
{ "repo_name": "holytortoise/abwreservierung", "path": "src/schilder/views.py", "copies": "1", "size": "19187", "license": "mit", "hash": 8145158944188055000, "line_mean": 56.6506024096, "line_max": 173, "alpha_frac": 0.4628526646, "autogenerated": false, "ratio": 4.367868553172068, "config_test...
from django.shortcuts import render, redirect from django.views.generic import TemplateView, ListView from .forms import SearchForm from .models import Book from django.core.urlresolvers import reverse class SearchViewMixin(object): """A mixin for the home view.""" def get_context_data(self, **kwargs): ...
{ "repo_name": "gitgik/booksearch", "path": "search/views.py", "copies": "1", "size": "1443", "license": "mit", "hash": -8982405074323095000, "line_mean": 31.7954545455, "line_max": 92, "alpha_frac": 0.6638946639, "autogenerated": false, "ratio": 4.281899109792285, "config_test": false, "has_n...
from django.shortcuts import render, redirect from django.views.generic import TemplateView from django.contrib.auth import login, authenticate from django.contrib.auth.forms import UserCreationForm from main.forms import RegistrationForm from django.contrib.auth.decorators import login_required from .models import For...
{ "repo_name": "roansong/weatherapp", "path": "byte_orbit/main/views.py", "copies": "1", "size": "2538", "license": "mit", "hash": 8217766617599375000, "line_mean": 31.974025974, "line_max": 82, "alpha_frac": 0.6938534279, "autogenerated": false, "ratio": 4.080385852090032, "config_test": false,...
from django.shortcuts import render, redirect from django.views.generic import TemplateView from django.db.models import IntegerField, Count, Case, When from orcamentos.proposal.models import Proposal from orcamentos.crm.forms import EmployeeForm from .mixins import DashboardMixin def home(request): if request.us...
{ "repo_name": "rg3915/orcamentos", "path": "orcamentos/core/views.py", "copies": "1", "size": "2243", "license": "mit", "hash": 2116141588528511700, "line_mean": 34.6031746032, "line_max": 80, "alpha_frac": 0.6295140437, "autogenerated": false, "ratio": 3.984014209591474, "config_test": false, ...
from django.shortcuts import render, redirect from django.views.generic import TemplateView from praises.models import Praise class PraiseListView(TemplateView): template_name = 'praises.html' def get(self, request): params = request.GET if params: praises = Praise.objects.order_b...
{ "repo_name": "prontotools/pronto-praise", "path": "pronto_praise/praises/views.py", "copies": "1", "size": "1183", "license": "mit", "hash": -6914935424697940000, "line_mean": 25.2888888889, "line_max": 66, "alpha_frac": 0.5967878276, "autogenerated": false, "ratio": 3.8284789644012944, "confi...
from django.shortcuts import render, redirect from django.views.generic import UpdateView, DeleteView from .models import Storage from django_tables2 import RequestConfig from .tables import StorageTable from django.contrib.auth.decorators import login_required from .forms import StorageForm, QuestionForm def index(r...
{ "repo_name": "BNordstrom16/ShareSpaceWeb", "path": "ShareSpace/views.py", "copies": "1", "size": "2263", "license": "mit", "hash": -4418599696420305000, "line_mean": 27.6455696203, "line_max": 86, "alpha_frac": 0.6805125939, "autogenerated": false, "ratio": 3.9632224168126093, "config_test": f...
from django.shortcuts import render,redirect from django.views.generic import View from contact_manager.forms import EventForm,ContactForm from django import forms from contact_manager.models import Contact, Event import os import requests from datetime import date, datetime from django.contrib.messages import error ...
{ "repo_name": "ConnorH2582/sample-proj", "path": "contact_manager/views.py", "copies": "1", "size": "5413", "license": "mit", "hash": 1146209971123124000, "line_mean": 48.2090909091, "line_max": 200, "alpha_frac": 0.6717162387, "autogenerated": false, "ratio": 4.04559043348281, "config_test": f...
from django.shortcuts import render, redirect from django.views.generic import View from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from sites_and_links.models import Domain, Link from .forms import AddDomainForm, AddLinkForm from scanner_engine.tasks impor...
{ "repo_name": "Josowsky/Simple-Site-Monitor", "path": "admin_panel/views.py", "copies": "1", "size": "10573", "license": "mit", "hash": 1112971440030691500, "line_mean": 33.1064516129, "line_max": 96, "alpha_frac": 0.5545256786, "autogenerated": false, "ratio": 4.235977564102564, "config_test":...
from django.shortcuts import render, redirect from django.views.generic import View from django.contrib.auth.mixins import LoginRequiredMixin from django.http import HttpResponse, HttpResponseRedirect, HttpResponseBadRequest from django.core.urlresolvers import reverse import requests import json from uuid import uuid...
{ "repo_name": "daisychainme/daisychain", "path": "daisychain/channel_github/views.py", "copies": "1", "size": "10069", "license": "mit", "hash": -1104376671034721000, "line_mean": 37.1401515152, "line_max": 90, "alpha_frac": 0.5635117688, "autogenerated": false, "ratio": 4.585154826958106, "con...
from django.shortcuts import render, redirect from django.views.generic import View from django.contrib.auth.mixins import LoginRequiredMixin from logging import getLogger from channel_mail.models import MailAccount from channel_mail.forms import EmailForm log = getLogger('channel') class AuthenticationView(Login...
{ "repo_name": "daisychainme/daisychain", "path": "daisychain/channel_mail/views.py", "copies": "1", "size": "2149", "license": "mit", "hash": -9131484205578942000, "line_mean": 33.6612903226, "line_max": 78, "alpha_frac": 0.6193578409, "autogenerated": false, "ratio": 4.449275362318841, "config...
from django.shortcuts import render, redirect from django.views.generic import View from django.contrib.auth.models import User from .libs import amazon from .models import Status def index(request): return render(request, 'bookshelf/index.html', {}) class Search(View): def get(self, request, *args, **kwarg...
{ "repo_name": "kobtea/booklemap", "path": "bookshelf/views.py", "copies": "1", "size": "2504", "license": "mit", "hash": -2370408257876619000, "line_mean": 32.8378378378, "line_max": 75, "alpha_frac": 0.5099840256, "autogenerated": false, "ratio": 4.159468438538206, "config_test": false, "has...
from django.shortcuts import render, redirect from django.views.generic import View from django.core.urlresolvers import reverse from django.contrib import messages from django.db.models import Q from .models import Email from .forms import EmailAdminForm from .email_service import send_email_obj from nightreads.user_...
{ "repo_name": "avinassh/nightreads", "path": "nightreads/emails/views.py", "copies": "1", "size": "2165", "license": "mit", "hash": -7291427264379408000, "line_mean": 35.6949152542, "line_max": 77, "alpha_frac": 0.6517321016, "autogenerated": false, "ratio": 3.7392055267702937, "config_test": f...
from django.shortcuts import render,redirect from django.views.generic import View from django.http import HttpResponse, JsonResponse,Http404 from game.models import League, Team, TeamPick from users.models import User from game.services import get_weekly_record,tally_weekly_results from django.utils.text import slugif...
{ "repo_name": "bgilroy26/pickem_football", "path": "pickem_football/game/views.py", "copies": "2", "size": "8408", "license": "mit", "hash": -1873497075184337200, "line_mean": 38.2897196262, "line_max": 185, "alpha_frac": 0.61952902, "autogenerated": false, "ratio": 3.5993150684931505, "config_...
from django.shortcuts import render, redirect from django.views.generic import View from django.http import HttpResponse from django.contrib import messages from django.utils.translation import ugettext, ugettext_lazy as _ from forms import PostForm class PostView(View): # Allowed methods on the view ht...
{ "repo_name": "Emiliemorais/blog_django_plugin", "path": "django_blog/views.py", "copies": "1", "size": "1119", "license": "bsd-2-clause", "hash": 334363114810966100, "line_mean": 26.975, "line_max": 86, "alpha_frac": 0.6166219839, "autogenerated": false, "ratio": 4.287356321839081, "config_tes...
from django.shortcuts import render,redirect from django.views.generic import View from django.http import JsonResponse,Http404 from django.utils.text import slugify from fantasy.services import get_player_season_stats import requests import json import nflgame # Create your views here. class AllQuarterbacksView(View...
{ "repo_name": "ConnorH2582/fffAPI", "path": "tripleFapi/fantasy/views.py", "copies": "1", "size": "12476", "license": "mit", "hash": 6306196162088049000, "line_mean": 76.4906832298, "line_max": 928, "alpha_frac": 0.6256813081, "autogenerated": false, "ratio": 2.773677189862161, "config_test": f...
from django.shortcuts import render, redirect from django.views.generic import View from django.http import JsonResponse from weekend.models import Instagram from django.http import HttpResponse import os class GayPrideView(View): def get(self,request): return JsonResponse({ "event":"gay_...
{ "repo_name": "ecatkins/week6weekend", "path": "project/weekend/views.py", "copies": "1", "size": "2921", "license": "mit", "hash": -5466652814428647000, "line_mean": 33.3647058824, "line_max": 166, "alpha_frac": 0.5970558028, "autogenerated": false, "ratio": 3.5665445665445668, "config_test": ...
from django.shortcuts import render,redirect from django.views.generic import View from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required from harvest.models import Job from tablemanager.models import Publish from harvest.jobstatemachine import JobStatemachine f...
{ "repo_name": "parksandwildlife/borgcollector", "path": "harvest/views.py", "copies": "2", "size": "2198", "license": "bsd-3-clause", "hash": -4915608938565111000, "line_mean": 27.9210526316, "line_max": 99, "alpha_frac": 0.6592356688, "autogenerated": false, "ratio": 3.911032028469751, "config...
from django.shortcuts import render, redirect from django.views.generic import View from django.views.generic.list import ListView from django.http import Http404 from django.contrib.auth import authenticate, login, logout from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist...
{ "repo_name": "mentix02/Saltan", "path": "salt/user.py", "copies": "1", "size": "5061", "license": "apache-2.0", "hash": -2225073228458009600, "line_mean": 28.2543352601, "line_max": 104, "alpha_frac": 0.7016399921, "autogenerated": false, "ratio": 3.3100065402223677, "config_test": false, "h...
from django.shortcuts import render, redirect from django.views.generic import View from . models import Portfolio, Security, Holding, Transaction from . form_buy_new_security import PortfolioForm, HoldingForm, SecurityForm from django.http import HttpResponse class UserCreatePortfolio(View): template_name = 'portfol...
{ "repo_name": "caveatemptors-2015/special-garbanzo", "path": "project/portfolioX/views.py", "copies": "1", "size": "3593", "license": "mit", "hash": -3932945721079268400, "line_mean": 29.1932773109, "line_max": 105, "alpha_frac": 0.7419983301, "autogenerated": false, "ratio": 3.1000862812769627, ...
from django.shortcuts import render, redirect from django.views.generic import View from sentiment.models import Tweet, Word from sentiment.bayes import * from django.db.models import Avg from django.http import JsonResponse class IndexView(View): template = 'sentiment/index.html' def get(self, request): ...
{ "repo_name": "adamrj/Debate-Sentiment-Analysis", "path": "project/sentiment/views.py", "copies": "1", "size": "3556", "license": "mit", "hash": 352480835070348900, "line_mean": 31.6330275229, "line_max": 119, "alpha_frac": 0.6718222722, "autogenerated": false, "ratio": 3.0841283607979184, "con...
from django.shortcuts import render, redirect from django.views.generic import View from .forms import LoginForm # from django.http import HttpResponse from django.contrib.auth import authenticate, login class LoginView(View): def get(self,request): form=LoginForm() template_name="cuentas/login.html" context...
{ "repo_name": "rotcehcm/DjangoCintaRojaBatch8", "path": "cuentas/views.py", "copies": "1", "size": "1202", "license": "cc0-1.0", "hash": -683905339663099900, "line_mean": 21.679245283, "line_max": 61, "alpha_frac": 0.6855241265, "autogenerated": false, "ratio": 2.896385542168675, "config_test":...
from django.shortcuts import render, redirect from django.views.generic import View, TemplateView from django.http import HttpResponse from django.core.mail import EmailMessage from django.conf import settings from .forms import NewEmail from .models import Tarea class homework(View): template_name = 'homework.html' ...
{ "repo_name": "diego-d5000/Estudiala", "path": "estudiala/estudiala/tareas/views.py", "copies": "1", "size": "1492", "license": "mit", "hash": -154960748843375500, "line_mean": 27.6923076923, "line_max": 82, "alpha_frac": 0.7292225201, "autogenerated": false, "ratio": 3.1543340380549685, "confi...
from django.shortcuts import render, redirect from django.views.generic.list import ListView from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.views.generic.detail import DetailView from django.views.generic import TemplateView from django.contrib.auth.mixins import LoginRequiredMixin...
{ "repo_name": "ant-Korn/math_tournaments", "path": "math_tournaments/tournaments/views/views_task.py", "copies": "1", "size": "3216", "license": "mit", "hash": -1525525186445586400, "line_mean": 36.3953488372, "line_max": 96, "alpha_frac": 0.7142412935, "autogenerated": false, "ratio": 3.94601226...
from django.shortcuts import render, redirect from django.views.generic.list import ListView from django.views.generic import CreateView from models import Request from profiles.models import Profile # Create your views here. class RequestListView(ListView): model = Request def request_list(request): reqs ...
{ "repo_name": "nbeck90/city-swap", "path": "cityswap/requests/views.py", "copies": "1", "size": "1416", "license": "mit", "hash": 1674755030500874200, "line_mean": 23.8421052632, "line_max": 79, "alpha_frac": 0.6723163842, "autogenerated": false, "ratio": 3.746031746031746, "config_test": false...
from django.shortcuts import render, redirect from django.views import generic from django.views.generic import CreateView from .forms import EmployeeRegistration, ClientRegistration, ApplicantRegistration from .forms import ApplicantLogin, EmployeeMatchSkill, EmployeeLogin, ClientLogin from .models import Employee, Cl...
{ "repo_name": "zobeltran/webdevtproject", "path": "jobportal/views.py", "copies": "1", "size": "7132", "license": "apache-2.0", "hash": -8815341026877137000, "line_mean": 31.5662100457, "line_max": 115, "alpha_frac": 0.6783510937, "autogenerated": false, "ratio": 3.8972677595628413, "config_tes...
from django.shortcuts import render, redirect from django.views import generic import extra_views from . import mixin from .. import forms from .. import models class ChapterPictureInline(extra_views.InlineFormSet): model = models.ChapterPicture form_class = forms.ChapterForm can_delete = False ext...
{ "repo_name": "leonardoo/lemanga", "path": "apps/manga/views/chapter.py", "copies": "1", "size": "1545", "license": "mit", "hash": -900622746939819900, "line_mean": 30.5306122449, "line_max": 75, "alpha_frac": 0.6530744337, "autogenerated": false, "ratio": 4.065789473684211, "config_test": fals...
from django.shortcuts import render, redirect from django.views import View from django.conf import settings from djcat.path import Path class Catalog(View): def __init__(self): super().__init__() def get(self, request, *args, **kwargs): """ Route between render category and item ...
{ "repo_name": "avigmati/djcat", "path": "tests/catalog/views.py", "copies": "1", "size": "1899", "license": "bsd-3-clause", "hash": 1845944023057739500, "line_mean": 34.8301886792, "line_max": 115, "alpha_frac": 0.6008425487, "autogenerated": false, "ratio": 4.031847133757962, "config_test": fa...
from django.shortcuts import render, redirect from documentapp.models import document from documentapp.models import functionModel from documentapp.form import PostForm from django.contrib.auth import authenticate from django.contrib import auth from django.http import HttpResponse from django.contrib.auth.models impo...
{ "repo_name": "hayasilin/Document-Manager-Python", "path": "documentapp/views.py", "copies": "1", "size": "3977", "license": "mit", "hash": -4107823833240270000, "line_mean": 29.8389830508, "line_max": 142, "alpha_frac": 0.6971695521, "autogenerated": false, "ratio": 2.566290550070522, "config_...
from django.shortcuts import render, redirect from emails.forms import ContactForm, ChangeSubredditsForm from django.contrib.auth.models import User import fileinput def index(request): print(User.objects.all()) if request.method=='POST': form = ContactForm(request.POST) if form.is_valid(): if form.cleaned_dat...
{ "repo_name": "js97/reddit-digest", "path": "reddit-digest/mysite/emails/views.py", "copies": "1", "size": "1865", "license": "mit", "hash": 531931100969787400, "line_mean": 28.6031746032, "line_max": 70, "alpha_frac": 0.6954423592, "autogenerated": false, "ratio": 3.0523731587561374, "config_t...
from django.shortcuts import render, redirect from events.logo.models import Submission from events.logo.forms import SubmissionForm from general import models as generalmodels from django.utils import timezone from events import models as event_models def check_end(event): return event.end_time <= timezone.now()...
{ "repo_name": "compsoc-ssc/compsocssc", "path": "events/logo/views.py", "copies": "1", "size": "1249", "license": "mit", "hash": -8094152896030855000, "line_mean": 26.7555555556, "line_max": 90, "alpha_frac": 0.6709367494, "autogenerated": false, "ratio": 3.8549382716049383, "config_test": fals...
from django.shortcuts import render, redirect from events.sell_it.models import Submission from events.sell_it.forms import SubmissionForm from general import models as generalmodels from django.utils import timezone from events import models as event_models def check_end(event): return event.end_time <= timezone...
{ "repo_name": "compsoc-ssc/compsocssc", "path": "events/sell_it/views.py", "copies": "1", "size": "1291", "license": "mit", "hash": 8351968524073468000, "line_mean": 27.6888888889, "line_max": 96, "alpha_frac": 0.6661502711, "autogenerated": false, "ratio": 3.6572237960339944, "config_test": fa...
from django.shortcuts import render, redirect from feed.models import Author import uuid from django.contrib.auth.models import User # Create your views here. def register(request): if request.user.is_authenticated(): return redirect('/feed') else: return render(request, 'register.html') def...
{ "repo_name": "CMPUT404W16T01/CMPUT404-project-socialdistribution", "path": "register/views.py", "copies": "2", "size": "1273", "license": "apache-2.0", "hash": 259927872012473150, "line_mean": 27.9318181818, "line_max": 97, "alpha_frac": 0.6323644933, "autogenerated": false, "ratio": 3.8, "con...
from django.shortcuts import render, redirect from .forms import CeleryForm, ParagonForm from dupa.models import Paragon import pytesseract from .tasks import mul,items_from_image from PIL import Image, ImageFilter def start_page(request): return render(request,'base.html') def produkty(request): return ren...
{ "repo_name": "micbuz/project2", "path": "boot/dupa/views.py", "copies": "1", "size": "2487", "license": "apache-2.0", "hash": -4799871193306294000, "line_mean": 27.5862068966, "line_max": 75, "alpha_frac": 0.6115802171, "autogenerated": false, "ratio": 3.268068331143233, "config_test": false, ...
from django.shortcuts import render, redirect from .forms import FilterNumberObservationsForm def make_order(request): if request.method == 'POST': form = FilterNumberObservationsForm(request.POST) if form.is_valid(): import voxel_globe.filter_number_observations.tasks as tasks voxel_world_id =...
{ "repo_name": "ngageoint/voxel-globe", "path": "voxel_globe/filter_number_observations/views.py", "copies": "2", "size": "1441", "license": "mit", "hash": 1586936029858698000, "line_mean": 37.9459459459, "line_max": 96, "alpha_frac": 0.6426092991, "autogenerated": false, "ratio": 3.99168975069252...
from django.shortcuts import render, redirect from .forms import FormLeave from .models import * from userpanel.models import * from datetime import date from workdays import networkdays # Create your views here. def leave_request(request): if not request.user.is_authenticated(): return redirect('/') ...
{ "repo_name": "avinash795k/leaveProject", "path": "leaveapp/views.py", "copies": "1", "size": "12190", "license": "mit", "hash": 3694761491114908000, "line_mean": 67.8700564972, "line_max": 293, "alpha_frac": 0.6231337162, "autogenerated": false, "ratio": 3.979758406790728, "config_test": false...
from django.shortcuts import render, redirect from .forms import LoginForm, RegisterForm, NewContactForm from .models import Contact from django.contrib.auth import authenticate, login from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.core.urlresolvers imp...
{ "repo_name": "robertohueso/django_contacts", "path": "contacts/views.py", "copies": "1", "size": "4303", "license": "mit", "hash": 8507602088079247000, "line_mean": 38.4770642202, "line_max": 130, "alpha_frac": 0.6167789914, "autogenerated": false, "ratio": 4.2519762845849804, "config_test": f...
from django.shortcuts import render, redirect from .forms import * from django.http import HttpResponse from .vcf_functions import * from .upload_vcf_functions import * from .exac_functions import * from .esp_xlsx import evs_xlsx_file from .esp_vcf import filter_vcf from .models import Document, UserProfile, Vcf from d...
{ "repo_name": "raqsilva/VcfDataExporter", "path": "polls/views.py", "copies": "1", "size": "15837", "license": "apache-2.0", "hash": -1791512316974248700, "line_mean": 44.2485714286, "line_max": 155, "alpha_frac": 0.5645008524, "autogenerated": false, "ratio": 4.137147335423197, "config_test": ...
from django.shortcuts import render, redirect from .forms import * from .models import * def quickreg(request): form = QuickForm(request.POST or None) if request.method == 'POST': if form.is_valid(): print(request.POST.get('name')) obj = quick( name = request.POST.get('name'), email = request.POST.ge...
{ "repo_name": "OSDLabs/QuarkWebsite2017", "path": "quickreg/views.py", "copies": "3", "size": "1300", "license": "apache-2.0", "hash": -4613512368574421000, "line_mean": 30.7317073171, "line_max": 67, "alpha_frac": 0.67, "autogenerated": false, "ratio": 3.1325301204819276, "config_test": false,...
from django.shortcuts import render, redirect from .forms import * from proxmoxer import ProxmoxAPI from managevm import secrets from .models import * from django.contrib.auth.models import User from django.shortcuts import get_object_or_404 from django.core.mail import send_mail import datetime import ldap def index(...
{ "repo_name": "zujko/manage-vm", "path": "main/views.py", "copies": "1", "size": "5490", "license": "mit", "hash": 7099436071773060000, "line_mean": 47.1578947368, "line_max": 404, "alpha_frac": 0.5996357013, "autogenerated": false, "ratio": 3.5695708712613783, "config_test": false, "has_no_k...
from django.shortcuts import render, redirect from .forms import UserLoginForm, UserRegisterForm from django.contrib.auth import authenticate, get_user_model, login, logout def login_view(request): next = request.GET.get('next') title = "Login" form = UserLoginForm(request.POST or None) if form.is_val...
{ "repo_name": "qrizan/moopy", "path": "moopy/accounts/views.py", "copies": "1", "size": "1590", "license": "mit", "hash": -4638777452375980000, "line_mean": 28.4444444444, "line_max": 77, "alpha_frac": 0.6352201258, "autogenerated": false, "ratio": 3.945409429280397, "config_test": false, "ha...
from django.shortcuts import render, redirect from general import models import random from django.db import transaction import haikunator # Create your views here. def index(request): context_dict = {} context_dict['nbar'] = 'home' return render(request, 'index.html', context_dict) def artists(request): ...
{ "repo_name": "memnonila/art", "path": "general/views.py", "copies": "1", "size": "1995", "license": "mit", "hash": -530843662061125300, "line_mean": 28.776119403, "line_max": 77, "alpha_frac": 0.6686716792, "autogenerated": false, "ratio": 3.5247349823321557, "config_test": false, "has_no_ke...
from django.shortcuts import render, redirect from hoax.models import Corpus from django.db import connection from django.contrib.auth.decorators import login_required from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.http import HttpResponse from nltk.book import * from collections ...
{ "repo_name": "barliant/fnc-id", "path": "django_project/hoaxdetector/mainapp/views.py", "copies": "1", "size": "18515", "license": "apache-2.0", "hash": 6596334086532452000, "line_mean": 39.5142231947, "line_max": 165, "alpha_frac": 0.7029975695, "autogenerated": false, "ratio": 2.55802707930367...
from django.shortcuts import render, redirect from hoax.models import Hoax from django.db import connection from gensim import corpora from django.contrib.auth.decorators import login_required from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger import csv from django.http import HttpResponse # Cre...
{ "repo_name": "barliant/fnc-id", "path": "django_project/old/hoaxdetector/hoax/views.py", "copies": "1", "size": "6300", "license": "apache-2.0", "hash": 5872637717669759000, "line_mean": 30.5, "line_max": 141, "alpha_frac": 0.6846031746, "autogenerated": false, "ratio": 3.0244839174267883, "co...
from django.shortcuts import render, redirect from homepage.models import Feeds, AuthForm, RegisterForm import feedparser from django.contrib.auth import authenticate, login, logout from django.http import HttpResponseRedirect from django.views.generic.base import TemplateView class HomeIndexView( TemplateView ): ...
{ "repo_name": "polarkac/ReaderSS", "path": "ReaderSS/homepage/views.py", "copies": "1", "size": "2640", "license": "mit", "hash": 2174861178475828700, "line_mean": 35.1643835616, "line_max": 84, "alpha_frac": 0.6367424242, "autogenerated": false, "ratio": 4.036697247706422, "config_test": false...
from django.shortcuts import render, redirect from lcc.models import Lcc from lcc.lcc_parser import LccData def index(request): lcc_query = request.GET.get('lcc') lcc_list = [] if lcc_query: try: lcc = LccData.parse(lcc_query) except ValueError: pass else: ...
{ "repo_name": "hackerspace-silesia/lcchack", "path": "lcc_hack/lcc/views.py", "copies": "1", "size": "1399", "license": "mit", "hash": -1247433030449347600, "line_mean": 28.1458333333, "line_max": 61, "alpha_frac": 0.5446747677, "autogenerated": false, "ratio": 3.3389021479713605, "config_test"...
from django.shortcuts import render, redirect from league.models import League from league.forms import LeagueForm, NewTeamForm, PlayerOnDeckForm from league.util import fill_league_with_players def index(request, *args, **kwargs): ''' Create the league page or select one ''' data = {} data['leagues'] = Le...
{ "repo_name": "neeljpatel/wolveff", "path": "league/views.py", "copies": "1", "size": "3108", "license": "mit", "hash": 1355278365187680000, "line_mean": 34.3181818182, "line_max": 84, "alpha_frac": 0.546975547, "autogenerated": false, "ratio": 3.8560794044665014, "config_test": false, "has_n...
from django.shortcuts import render, redirect from maestor.models import Disk, Server, SmartReport, Attribute, WarningCriteria, IOStat, Flag, DiskFlag, FlagRange from django.contrib.auth.decorators import login_required import datetime def index(request): if request.user.is_authenticated(): return redirect(...
{ "repo_name": "amschaal/maestor", "path": "maestor/views.py", "copies": "1", "size": "1752", "license": "mit", "hash": 2840412980151757000, "line_mean": 33.3529411765, "line_max": 115, "alpha_frac": 0.7077625571, "autogenerated": false, "ratio": 3.6198347107438016, "config_test": false, "has_...
from django.shortcuts import render, redirect from metronus_app.forms.timeLog2Form import TimeLog2Form from metronus_app.model.task import Task from django.shortcuts import get_object_or_404 from metronus_app.common_utils import get_current_employee_or_403 from metronus_app.model.timeLog import TimeLog from metronus_ap...
{ "repo_name": "Metronus/metronus", "path": "Metronus-Project/metronus_app/controllers/timeLogController.py", "copies": "1", "size": "10583", "license": "mpl-2.0", "hash": 151852408897292700, "line_mean": 41.1035856574, "line_max": 196, "alpha_frac": 0.6212149886, "autogenerated": false, "ratio": ...
from django.shortcuts import render, redirect from .model.forms import LoginForm from .model.utility import TeacherHandle tea_hdl = None # Create your views here. def login(request): global tea_hdl if request.method == 'POST': form = LoginForm(request.POST) # check the teacher's ID i...
{ "repo_name": "XinHeCS/shanghaiTechTSmatching", "path": "TSmatching/tea_views.py", "copies": "1", "size": "1590", "license": "mit", "hash": 5958356137846714000, "line_mean": 27.9272727273, "line_max": 62, "alpha_frac": 0.5635220126, "autogenerated": false, "ratio": 3.732394366197183, "config_te...
from django.shortcuts import render, redirect from models import Bar, Beer, BarRating from django.contrib.auth.models import User from django.contrib.auth import authenticate, login, logout import json # Create your views here. def index(request): bar_list = Bar.objects.all() beer_list = Beer.objects.all() ...
{ "repo_name": "mgborgman/pcg2015_mgb", "path": "pdx_beer_finder/beer_googles/views.py", "copies": "1", "size": "3661", "license": "mit", "hash": -7852722166061594000, "line_mean": 26.9465648855, "line_max": 171, "alpha_frac": 0.635345534, "autogenerated": false, "ratio": 3.7092198581560285, "co...
from django.shortcuts import render, redirect from .models import Caixa, Conta, Transacao from django.views.generic.edit import DeleteView, CreateView, UpdateView from django.core.urlresolvers import reverse, reverse_lazy from django.views.generic.list import ListView from braces.views import GroupRequiredMixin import ...
{ "repo_name": "rafaelnsantos/batfinancas", "path": "financas/views.py", "copies": "1", "size": "4590", "license": "mit", "hash": 3681410911409648600, "line_mean": 35.4285714286, "line_max": 119, "alpha_frac": 0.6882352941, "autogenerated": false, "ratio": 3.458929917106255, "config_test": false...
from django.shortcuts import render, redirect from .models import Comment, Review from productapp.models import Product from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.contrib.auth.decorators import login_required def make_page_range(current,total_page): divn = 10 range_index=div...
{ "repo_name": "bestgunman/Gitwaxingproduct", "path": "Projectreview/reviewapp/views.py", "copies": "1", "size": "3106", "license": "mit", "hash": -6518530133611065000, "line_mean": 29.0194174757, "line_max": 72, "alpha_frac": 0.718305304, "autogenerated": false, "ratio": 3.0343473994111876, "co...
from django.shortcuts import render, redirect from .models import Entity, Asset, Scene from .forms import AssetForm, SceneForm, EntityForm from django.contrib import messages from django.views.generic import CreateView def home(request): scenes = Scene.objects.all() entities = Entity.objects.all() conte...
{ "repo_name": "robertshiple/GARDEN-BOT-VR", "path": "gardenbotvr/views.py", "copies": "1", "size": "1569", "license": "mpl-2.0", "hash": -2915415371858537000, "line_mean": 28.0740740741, "line_max": 70, "alpha_frac": 0.6711281071, "autogenerated": false, "ratio": 3.762589928057554, "config_test...
from django.shortcuts import render,redirect from .models import * from django.contrib import messages from django.db.models import Q from django.template import Context from django.template.defaulttags import register from collections import OrderedDict cat_names = {} def events(request): cat = [] for i in CATEGOR...
{ "repo_name": "a-y-u-s-h/QuarkWebsite2017", "path": "events/views.py", "copies": "3", "size": "4439", "license": "apache-2.0", "hash": -7424283758507529000, "line_mean": 25.4285714286, "line_max": 106, "alpha_frac": 0.6992565893, "autogenerated": false, "ratio": 2.7865662272441933, "config_test...
from django.shortcuts import render,redirect from .models import * from django.http import HttpResponse from math import pow,sqrt from .forms import * import json def get_rating(user_id,movie_id): """Dado um id de usuário e um id de filme a função retorna a classificação que o usuário fez. """ try: ...
{ "repo_name": "gabriellmb05/trabalho2_comercio", "path": "app/views.py", "copies": "1", "size": "12305", "license": "apache-2.0", "hash": 7748840480065359000, "line_mean": 41.9929328622, "line_max": 153, "alpha_frac": 0.6903098545, "autogenerated": false, "ratio": 3.0243599304001987, "config_te...
from django.shortcuts import render, redirect from .models import Post, Comment from .forms import CommentForm # Create your views here. def index(request): post_list = Post.objects.all() return render(request, 'blog/index.html', { 'post_list': post_list, }) def post_detail(request, pk): post = Post.objects.get...
{ "repo_name": "paullab/my-first-blog", "path": "blog/views.py", "copies": "1", "size": "1284", "license": "apache-2.0", "hash": 5412435932354858000, "line_mean": 25.7708333333, "line_max": 53, "alpha_frac": 0.6978193146, "autogenerated": false, "ratio": 2.9115646258503403, "config_test": false,...
from django.shortcuts import render, redirect from .models import Product, Tag, ColorTag from products.forms import MyUserCreationForm from django.contrib.auth.forms import AuthenticationForm from django.contrib.auth import login, logout # Create your views here. def index(request): return render(request, 'base.h...
{ "repo_name": "hanakamer/sinek-tasarim", "path": "products/views.py", "copies": "1", "size": "1823", "license": "mit", "hash": 1213442209500551700, "line_mean": 24.3333333333, "line_max": 61, "alpha_frac": 0.6385079539, "autogenerated": false, "ratio": 4.006593406593407, "config_test": false, ...
from django.shortcuts import render, redirect from models import Profile from game_calendar.models import Event from django.contrib.auth.decorators import login_required from django.views.generic import UpdateView, ListView from django.core.urlresolvers import reverse_lazy, reverse from chat.models import ChatRoom @l...
{ "repo_name": "nbeck90/game-chat", "path": "gamechat/profiles/views.py", "copies": "1", "size": "3804", "license": "mit", "hash": 630673907476015000, "line_mean": 26.5652173913, "line_max": 78, "alpha_frac": 0.6708727655, "autogenerated": false, "ratio": 3.8776758409785934, "config_test": false...
from django.shortcuts import render, redirect from .models import UserMsg, MyCommMsg, MyCommDevice from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from django.utils import timezone from django.contrib.auth.models import User import binascii from itertools import chain from oper...
{ "repo_name": "johngrantuk/myCommServer", "path": "myCommServer/views.py", "copies": "1", "size": "8026", "license": "mit", "hash": 7159229370253374000, "line_mean": 45.3930635838, "line_max": 254, "alpha_frac": 0.5797408423, "autogenerated": false, "ratio": 4.64198958935801, "config_test": fal...
from django.shortcuts import render, redirect from .models import UsersRedirect, SettingsUser, AnalyticsTwo, AnalyticsOne from django.contrib.auth.models import User from django.contrib.auth import authenticate, login, logout # Create your views here. percentage = 50 siteTwo = 'page1.html' siteOne = 'page2.html' if...
{ "repo_name": "vigzmv/AB-Split-Tester", "path": "testerhack/views.py", "copies": "1", "size": "5675", "license": "mit", "hash": 1114521496190871200, "line_mean": 29.8423913043, "line_max": 148, "alpha_frac": 0.619030837, "autogenerated": false, "ratio": 3.905712319339298, "config_test": false, ...
from django.shortcuts import render, redirect from .models import Video from django.contrib.auth import authenticate from django.contrib.auth.forms import UserCreationForm from django.http.response import HttpResponse from .forms import LoginForm def home(request): videos = Video.objects.all().order_by('title')[:...
{ "repo_name": "sharifulrocky/djangolife", "path": "video/views.py", "copies": "1", "size": "1615", "license": "mit", "hash": -7530695207737628000, "line_mean": 31.32, "line_max": 74, "alpha_frac": 0.6043343653, "autogenerated": false, "ratio": 4.461325966850829, "config_test": false, "has_no_...
from django.shortcuts import render, redirect from models import WorldSave from forms import RequestWorldSaveForm from django.http import HttpResponseRedirect, HttpResponse from django.core.servers.basehttp import FileWrapper from django.core.files import File import os # Create your views here. import subprocess from...
{ "repo_name": "kelly-ry4n/darkcraft-backend", "path": "darkcraft/world_save/views.py", "copies": "1", "size": "2086", "license": "unlicense", "hash": -4508540138629119500, "line_mean": 30.1492537313, "line_max": 112, "alpha_frac": 0.6577181208, "autogenerated": false, "ratio": 3.738351254480287, ...
from django.shortcuts import render, redirect from mysite import settings import requests import json from django.http import HttpResponse # Create your views here. def home(request): return render(request, "main/home.html", {"env" : settings.env}) def callback(request): print('callback received') print(...
{ "repo_name": "ashishdasnurkar/auth0-django-sample", "path": "03-Session Handling/mysite/main/views.py", "copies": "1", "size": "1517", "license": "mit", "hash": -8697192736115741000, "line_mean": 32.7111111111, "line_max": 103, "alpha_frac": 0.6539222149, "autogenerated": false, "ratio": 3.69099...
from django.shortcuts import render, redirect from mysite import settings import requests import json # Create your views here. def home(request): return render(request, "main/home.html", {"env" : settings.env}) def callback(request): print('callback received') print(request.GET.get('code')) json_hea...
{ "repo_name": "ashishdasnurkar/auth0-django-sample", "path": "01-Login/mysite/main/views.py", "copies": "1", "size": "1348", "license": "mit", "hash": 3096506836090722000, "line_mean": 34.4736842105, "line_max": 103, "alpha_frac": 0.6535608309, "autogenerated": false, "ratio": 3.6042780748663104,...
from django.shortcuts import render,redirect from oauth_backend import OauthBackend from django.http import HttpResponse, HttpResponseForbidden from django.http import Http404 from django.utils.crypto import get_random_string from django.conf import settings from django.contrib.auth import authenticate, login from tuke...
{ "repo_name": "LabAdvComp/tukey_portal", "path": "tukey/oauth/views.py", "copies": "1", "size": "2252", "license": "apache-2.0", "hash": 707967083339516900, "line_mean": 37.1694915254, "line_max": 93, "alpha_frac": 0.6873889876, "autogenerated": false, "ratio": 4.225140712945591, "config_test":...
from django.shortcuts import render, redirect from op_tasks.models import Product, Dataset from django.contrib.auth.decorators import login_required from tasks import user_authorized from django.contrib.auth.decorators import login_required from base import LOGIN_URL @login_required(login_url=LOGIN_URL) def view_prod...
{ "repo_name": "draperlaboratory/stout", "path": "exp_portal/products.py", "copies": "2", "size": "2478", "license": "apache-2.0", "hash": -8339395999576065000, "line_mean": 32.04, "line_max": 92, "alpha_frac": 0.7493946731, "autogenerated": false, "ratio": 3.4705882352941178, "config_test": fal...
from django.shortcuts import render, redirect from op_tasks.models import UserProfile from django.core import mail from django.conf import settings from tasks import user_authorized from base import LOGIN_URL from django.contrib.auth.decorators import login_required def send_email(request): print request if ...
{ "repo_name": "draperlaboratory/stout", "path": "exp_portal/email.py", "copies": "2", "size": "1225", "license": "apache-2.0", "hash": -5504319776650367000, "line_mean": 33.0277777778, "line_max": 131, "alpha_frac": 0.6848979592, "autogenerated": false, "ratio": 3.977272727272727, "config_test"...
from django.shortcuts import render, redirect from op_tasks.models import UserProfile, Product, Dataset, OpTask # Create your views here. def home_page(request): if request.user.is_staff: return render(request, 'developerhome.html') def view_dev_status(request): if request.user.is_staff: user...
{ "repo_name": "draperlaboratory/stout", "path": "developer/views.py", "copies": "2", "size": "1512", "license": "apache-2.0", "hash": 2016454158668781300, "line_mean": 36.825, "line_max": 140, "alpha_frac": 0.6759259259, "autogenerated": false, "ratio": 3.9375, "config_test": false, "has_no_k...
from django.shortcuts import render, redirect from op_tasks.models import UserProfile, Product, Dataset, OpTask, TaskListItem, Experiment from django.contrib.auth.decorators import login_required from django.contrib.auth import get_user_model from django.http import JsonResponse, HttpResponseForbidden from op_tasks i...
{ "repo_name": "draperlaboratory/stout", "path": "exp_portal/users.py", "copies": "2", "size": "8386", "license": "apache-2.0", "hash": 5648228471289193000, "line_mean": 37.6451612903, "line_max": 190, "alpha_frac": 0.6408299547, "autogenerated": false, "ratio": 3.6636085626911314, "config_test"...
from django.shortcuts import render,redirect from piebase.models import Project,Priority,Severity,TicketStatus from forms import CreateProjectForm,PriorityIssueForm,PriorityIssueFormEdit,SeverityIssueForm,SeverityIssueFormEdit,TicketStatusForm,TicketStatusFormEdit import json, random, string from django.utils import ti...
{ "repo_name": "druuu/pietrack", "path": "project/views.py", "copies": "1", "size": "11745", "license": "mit", "hash": 2598191224748551000, "line_mean": 49.1923076923, "line_max": 180, "alpha_frac": 0.6837803321, "autogenerated": false, "ratio": 3.770465489566613, "config_test": false, "has_no...
from django.shortcuts import render, redirect from register_site.models import EntriesIndex, WatchersIndex, RedirectionsIndex from scanner_engine.utils.redirection.utils import run_redirection_scan from scanner_engine.utils.watcher.utils import run_watcher_scan from .models import WatcherScanResult, RedirectionScanResu...
{ "repo_name": "Josowsky/SiteScanner-Backend", "path": "scanner_engine/views.py", "copies": "1", "size": "3073", "license": "mit", "hash": -2175811672920032800, "line_mean": 42.2816901408, "line_max": 137, "alpha_frac": 0.6160104133, "autogenerated": false, "ratio": 4.221153846153846, "config_te...
from django.shortcuts import render, redirect from suite.forms import RegistrationForm,EditProfileForm from suite.models import User from django.contrib.auth.forms import UserChangeForm, PasswordChangeForm from django.contrib.auth import update_session_auth_hash from django.views.generic import View from django.contri...
{ "repo_name": "fsxfreak/club-suite", "path": "clubsuite/suite/views/view_account.py", "copies": "1", "size": "1631", "license": "mit", "hash": 4074833160597600000, "line_mean": 36.0681818182, "line_max": 88, "alpha_frac": 0.7124463519, "autogenerated": false, "ratio": 3.9112709832134294, "confi...
from django.shortcuts import render, redirect from tapiriik.auth import User def settings(request): available_settings = { "allow_activity_flow_exception_bypass_via_self": {"Title": "Route activities via", "Description": "Allows activities to flow through this service to avoid a flo...
{ "repo_name": "dmschreiber/tapiriik", "path": "tapiriik/web/views/settings.py", "copies": "16", "size": "1584", "license": "apache-2.0", "hash": 5770739995980712000, "line_mean": 41.8108108108, "line_max": 163, "alpha_frac": 0.6136363636, "autogenerated": false, "ratio": 4.525714285714286, "con...
from django.shortcuts import render, redirect from TouchSave_App.models import * from django.contrib.auth import authenticate, login, logout from django.contrib.auth.decorators import login_required from django.http import HttpResponseRedirect, HttpResponse from django.core.mail import send_mail from django.core.urlres...
{ "repo_name": "Thyri/TouchSave", "path": "TouchSave_App/views.py", "copies": "1", "size": "5131", "license": "mit", "hash": 3818739129303830500, "line_mean": 21.6035242291, "line_max": 95, "alpha_frac": 0.6507503411, "autogenerated": false, "ratio": 3.0342992312241277, "config_test": false, "...
from django.shortcuts import render, redirect from user_profile.models import Profile from django.contrib.auth.decorators import login_required from django.http import HttpResponse from api.models import Server import json # Create your views here. @login_required def profile(request, guid): """Returns a specifi...
{ "repo_name": "grepme/cmput410-project", "path": "user_profile/views.py", "copies": "1", "size": "2541", "license": "apache-2.0", "hash": -5343868689347842000, "line_mean": 32.88, "line_max": 111, "alpha_frac": 0.6800472255, "autogenerated": false, "ratio": 4.105008077544427, "config_test": fal...
from django.shortcuts import render, redirect from users.forms import * from django.contrib.auth import authenticate, login, logout # Create your views here. def create(request): if request.method == 'POST': user_form = UserCreationForm(request.POST) if user_form.is_valid(): user = user...
{ "repo_name": "ISeaTeL/ISeaTeL_Cup_Site", "path": "users/views.py", "copies": "1", "size": "1367", "license": "mit", "hash": -1505495133406139100, "line_mean": 36.9722222222, "line_max": 76, "alpha_frac": 0.6210680322, "autogenerated": false, "ratio": 4.219135802469136, "config_test": false, ...
from django.shortcuts import render, redirect from users.forms import UserForm from django.contrib.auth.models import User from django.views.generic import View from django.contrib.auth.hashers import make_password, check_password from django.contrib.auth import authenticate, login, logout # Create your views here. c...
{ "repo_name": "caveatemptors-2015/special-garbanzo", "path": "project/users/views.py", "copies": "1", "size": "2028", "license": "mit", "hash": 5486257093709435000, "line_mean": 36.5555555556, "line_max": 77, "alpha_frac": 0.607495069, "autogenerated": false, "ratio": 4.164271047227926, "config...
from django.shortcuts import render,redirect from users.forms import UserForm,UserProfileForm, UserExtendedProfileForm from users.models import User,UserProfile from game.models import League, Team, TeamPick from django.contrib.auth import authenticate, login, logout from django.views.generic import View from django.ht...
{ "repo_name": "ConnorH2582/pickem_football", "path": "pickem_football/users/render_views.py", "copies": "2", "size": "6750", "license": "mit", "hash": -721407040124367400, "line_mean": 55.7226890756, "line_max": 231, "alpha_frac": 0.641037037, "autogenerated": false, "ratio": 3.979952830188679, ...
from django.shortcuts import render, redirect from users import forms from django.contrib import auth def signup(request): errors = [] if request.method == 'POST': form = forms.SignupForm(request.POST) if form.is_valid(): username = form.cleaned_data['username'] email = ...
{ "repo_name": "ananko/web_collections", "path": "users/views.py", "copies": "1", "size": "2095", "license": "mit", "hash": -2553625331834434000, "line_mean": 40.0784313725, "line_max": 94, "alpha_frac": 0.5799522673, "autogenerated": false, "ratio": 4.515086206896552, "config_test": false, "h...
from django.shortcuts import render, redirect from watsan.models.forms import RegisterUserForm, OrganizationForm, UserMetaForm, AddUserForm from django.contrib.auth import authenticate, login from django.http import HttpResponse from django.contrib.auth.decorators import login_required from django.contrib.auth.models i...
{ "repo_name": "spatialcollective/watsan", "path": "watsan/views/registration_views.py", "copies": "1", "size": "3252", "license": "mit", "hash": 6154436522345797000, "line_mean": 42.36, "line_max": 188, "alpha_frac": 0.7450799508, "autogenerated": false, "ratio": 3.2981744421906694, "config_tes...
from django.shortcuts import render, redirect from website.models import Cozinheiro, Post, Pagina from website.forms import ContatoForm from django.core.mail import EmailMessage from django.template import Context from django.template.loader import get_template # Create your views here. def index(request): cont...
{ "repo_name": "LabHackerSP/comidaimigrante", "path": "server/website/views.py", "copies": "1", "size": "2202", "license": "apache-2.0", "hash": 9003832488651971000, "line_mean": 30.9130434783, "line_max": 67, "alpha_frac": 0.6003633061, "autogenerated": false, "ratio": 3.738539898132428, "confi...
from django.shortcuts import render, redirect import csv import time import json import requests from django.core.urlresolvers import reverse from django import forms from . import models import os class EnterIDForm(forms.Form): ''' Short form to enter in a meeting ID. Validate_trip_id function cleans the ...
{ "repo_name": "cszc/Meet-Halfway", "path": "meethalfway/views.py", "copies": "1", "size": "9065", "license": "apache-2.0", "hash": 7389290969138949000, "line_mean": 34.41015625, "line_max": 132, "alpha_frac": 0.628681743, "autogenerated": false, "ratio": 4.1525423728813555, "config_test": false...
from django.shortcuts import render, redirect import csv import time import json import requests from django.core.urlresolvers import reverse from django import forms from . import models class EnterIDForm(forms.Form): ''' Short form to enter in a meeting ID. Validate_trip_id function cleans the ID and ch...
{ "repo_name": "ladyson/pllc", "path": "meethalfway/views.py", "copies": "1", "size": "8997", "license": "apache-2.0", "hash": -5871954882437080000, "line_mean": 34.2823529412, "line_max": 132, "alpha_frac": 0.6285428476, "autogenerated": false, "ratio": 4.178820250812819, "config_test": false, ...
from django.shortcuts import render, redirect import json from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from rest_framework.renderers import JSONRenderer from authentication import get_token from api_controller import ApiNetconf, ApiRest import envs from django.forms.models i...
{ "repo_name": "sfloresk/nso-dashboard-demo", "path": "web_app/views.py", "copies": "1", "size": "11651", "license": "apache-2.0", "hash": 3676912872350391000, "line_mean": 35.0712074303, "line_max": 114, "alpha_frac": 0.5516264698, "autogenerated": false, "ratio": 4.308801775147929, "config_tes...
from django.shortcuts import render,redirect import json, os, datetime from django.conf import settings from django.http import HttpResponse from django.contrib.auth.decorators import login_required import apps.team.logics as Logics import apps.message.logics as MsgLogics from apps.team.models import Team,Player from a...
{ "repo_name": "zWingz/webbasketball", "path": "apps/team/views.py", "copies": "1", "size": "19621", "license": "mit", "hash": -2672799072306376700, "line_mean": 35.9902723735, "line_max": 178, "alpha_frac": 0.6171040867, "autogenerated": false, "ratio": 3.3818925649235148, "config_test": false,...
from django.shortcuts import render,redirect import json, os, datetime import copy from django.conf import settings from django.http import HttpResponse # import apps.game.logics as Logics from apps.game.models import Game from apps.team.models import Team,TeamProfile,Player from apps.message.models import News from ut...
{ "repo_name": "zWingz/webbasketball", "path": "apps/admin/views.py", "copies": "1", "size": "4284", "license": "mit", "hash": -3014855278604293000, "line_mean": 32.984, "line_max": 107, "alpha_frac": 0.6621939736, "autogenerated": false, "ratio": 3.6214833759590794, "config_test": false, "has...
from django.shortcuts import render,redirect import json, os, datetime,random import copy from django.conf import settings from django.http import HttpResponse from django.http import HttpResponseRedirect import apps.game.logics as Logics from apps.game.models import Game,PlayerGameProfile,TeamGameProfile from apps.tea...
{ "repo_name": "zWingz/webbasketball", "path": "apps/game/views.py", "copies": "1", "size": "10198", "license": "mit", "hash": 6573080616297868000, "line_mean": 42.9078947368, "line_max": 184, "alpha_frac": 0.5995004995, "autogenerated": false, "ratio": 3.6320754716981134, "config_test": false, ...
from django.shortcuts import render, redirect import os import csv def parse_csv(source_dir): module_dir = os.path.join(os.path.dirname(__file__), source_dir) with open(module_dir, newline='') as csvfile: spamreader = csv.reader(csvfile, delimiter=' ', quotechar=',') i = 1 text = [] ...
{ "repo_name": "noracami/psychic-wight", "path": "psychicwight/quiz/views.py", "copies": "1", "size": "4262", "license": "mit", "hash": -7734692532328630000, "line_mean": 30.6607142857, "line_max": 78, "alpha_frac": 0.4717992104, "autogenerated": false, "ratio": 2.083431257344301, "config_test":...
from django.shortcuts import render, redirect import requests, json from django.core.urlresolvers import reverse from django.contrib import messages from .forms import IVContactForm from openiv.wide_settings import * # Create your views here. def index(request): if request.method == 'POST': form = IVContactForm...
{ "repo_name": "amoschou/openiv", "path": "contact/views.py", "copies": "1", "size": "3416", "license": "mpl-2.0", "hash": 5132363403485338000, "line_mean": 31.2264150943, "line_max": 82, "alpha_frac": 0.6024590164, "autogenerated": false, "ratio": 3.51440329218107, "config_test": false, "has_...
from django.shortcuts import render, redirect import requests from bs4 import BeautifulSoup from pushbullet import Pushbullet def search(request): return render(request, 'plexrequests/search.html') def results(request): if 'q' in request.POST: q = request.POST['q'] m_list = get_movies(q) ...
{ "repo_name": "lokenx/plexrequests", "path": "plexrequests/views.py", "copies": "2", "size": "2140", "license": "mit", "hash": 8713693260149543000, "line_mean": 28.3150684932, "line_max": 83, "alpha_frac": 0.5934579439, "autogenerated": false, "ratio": 3.424, "config_test": false, "has_no_key...
from django.shortcuts import render, redirect import stripe from django.contrib.auth.decorators import login_required from website.models import Order from django.conf import settings from website.models import Sell stripe.api_key = settings.STRIPE_SECRET_KEY @login_required def checkout(request, id): publish...
{ "repo_name": "PI-Technology/django-main-app", "path": "checkout/views.py", "copies": "2", "size": "2095", "license": "mit", "hash": 3336846059120884000, "line_mean": 28.9285714286, "line_max": 73, "alpha_frac": 0.6062052506, "autogenerated": false, "ratio": 3.8724584103512014, "config_test": f...
from django.shortcuts import render, redirect # Create your views here. from . import models from . import forms from django.http import HttpResponseRedirect def list_persons(request): c = {} persons = models.Person.objects.all() c['persons'] = persons return render(request, template_name='persons/pe...
{ "repo_name": "g10k/sw_lessons", "path": "lesson4/persons/views.py", "copies": "1", "size": "1135", "license": "bsd-3-clause", "hash": -1130519578093570000, "line_mean": 27.4, "line_max": 80, "alpha_frac": 0.6704845815, "autogenerated": false, "ratio": 3.6731391585760518, "config_test": false, ...
from django.shortcuts import render, redirect from accounts.models import UserProfile def index(request): users = UserProfile.objects.all() message = request.session.get('message', None) info = request.session.get('info', None) warning = request.session.get('warning', None) alert = request.sessi...
{ "repo_name": "tomi77/bizzfuzz", "path": "accounts/views.py", "copies": "1", "size": "1763", "license": "mit", "hash": 7427399363649398000, "line_mean": 24.5507246377, "line_max": 67, "alpha_frac": 0.6165626773, "autogenerated": false, "ratio": 4.034324942791762, "config_test": false, "has_no...
from django.shortcuts import render, redirect from cats.forms import CatForm, BreedForm from cats.models import Cat, Breed def index(request): return render(request, 'index.html') def cats(request): return render(request, 'object_list.html', {'single_view_name': 'single_cat', 'objects': Cat.objects.all()})...
{ "repo_name": "beneboy/catdb", "path": "bad/cats/views.py", "copies": "1", "size": "1367", "license": "mit", "hash": -1014561859142470100, "line_mean": 26.34, "line_max": 116, "alpha_frac": 0.6166788588, "autogenerated": false, "ratio": 3.3099273607748185, "config_test": false, "has_no_keywor...
from django.shortcuts import render, redirect from django.conf import settings import foursquare from .forms import LocationForm from .models import Place from django.db.models import QuerySet def home(request, tmpl='places/home.html'): data = {} place_list = Place.objects.all() data['place_list'] = plac...
{ "repo_name": "CzechHackathon2014/juice-my-device", "path": "jmd/places/views.py", "copies": "1", "size": "5960", "license": "mit", "hash": -107938074969790860, "line_mean": 29.7268041237, "line_max": 138, "alpha_frac": 0.5890939597, "autogenerated": false, "ratio": 3.1786666666666665, "config_...