text
stringlengths
0
1.05M
meta
dict
from django.shortcuts import render from django.http import HttpResponse from rest_framework.renderers import JSONRenderer from .dbmanager import DatabaseManager as dbm from .timeslot import TimeSlot as ts from .serializers import * import datetime from datetime import date import calendar import os database = dbm("/"...
{ "repo_name": "Gazing/Frawt", "path": "django/frawt/api/views.py", "copies": "1", "size": "3150", "license": "mit", "hash": -7371983421768694000, "line_mean": 39.9090909091, "line_max": 116, "alpha_frac": 0.6111111111, "autogenerated": false, "ratio": 3.8985148514851486, "config_test": false, ...
from django.shortcuts import render from django.http import HttpResponse from sign.models import User from django.contrib.auth.hashers import make_password, check_password # Create your views here. def index(request): password = make_password('123456', None, 'pbkdf2_sha256') # res = check_password('123456', pa...
{ "repo_name": "LiuWynn/isign", "path": "sign/views.py", "copies": "1", "size": "1718", "license": "apache-2.0", "hash": -6587371434858197000, "line_mean": 27.9661016949, "line_max": 69, "alpha_frac": 0.6733021077, "autogenerated": false, "ratio": 3.588235294117647, "config_test": false, "has_...
from django.shortcuts import render from django.http import HttpResponse from splash.models import Beacons, Beacon_Reading from django.db.models import Count beacons = Beacons.objects.all() beaconlist = "<table class=\"table\">" for beacon in beacons: beaconlist = beaconlist + "<tr><td>" + str(beacon.beacon_id) +...
{ "repo_name": "DarthMaxwell/Beacon-Web", "path": "splash/views.py", "copies": "1", "size": "7294", "license": "mit", "hash": -6793053918263106000, "line_mean": 34.4077669903, "line_max": 228, "alpha_frac": 0.5259117083, "autogenerated": false, "ratio": 3.6764112903225805, "config_test": false, ...
from django.shortcuts import render from django.http import HttpResponse from src.utils import database_cass as database from plots.src.plots import * import json import datetime ## REST API CubesJSON def cubesJSON(request): if request.method == 'GET': minTS = request.GET.get('mints', '') maxTS = ...
{ "repo_name": "phantomlinux/IoT-tracking", "path": "VAUGHN/webapp/plots/views.py", "copies": "2", "size": "2669", "license": "apache-2.0", "hash": 7459526292048326000, "line_mean": 34.1184210526, "line_max": 110, "alpha_frac": 0.5702510303, "autogenerated": false, "ratio": 3.5492021276595747, "...
from django.shortcuts import render from django.http import HttpResponse from stock.models import Producto, Color, TipoProducto, TipoEstampado, Talla from django.views.generic import CreateView, ListView, UpdateView, DeleteView from .forms import AgregarProductoForm, CrearColorForm, CrearTipoProductoForm, CrearTipoEsta...
{ "repo_name": "crodriguezud/Facturador", "path": "facturador/stock/views.py", "copies": "1", "size": "2853", "license": "apache-2.0", "hash": -8375211979049275000, "line_mean": 26.9705882353, "line_max": 117, "alpha_frac": 0.724851034, "autogenerated": false, "ratio": 3.054603854389722, "config...
from django.shortcuts import render from django.http import HttpResponse from Store.models import * from rest_framework.renderers import JSONRenderer from rest_framework.parsers import JSONParser from Store.serializers import * class JSONResponse(HttpResponse): """ An HttpResponse that renders its content into...
{ "repo_name": "G-Ark/StoreManagement", "path": "Store/views.py", "copies": "1", "size": "2584", "license": "mit", "hash": -6353751929768430000, "line_mean": 31.3, "line_max": 61, "alpha_frac": 0.7527089783, "autogenerated": false, "ratio": 3.7341040462427744, "config_test": false, "has_no_key...
from django.shortcuts import render from django.http import HttpResponse from task.models import Task from user.models import User from deal.models import Deal from django.db import transaction import json import datetime # Create your views here. def new(request): resp = {} if request.method != 'POST': ...
{ "repo_name": "pkumercury/pkucourier", "path": "task/views.py", "copies": "2", "size": "9680", "license": "mit", "hash": 1025915397890212600, "line_mean": 36.0881226054, "line_max": 115, "alpha_frac": 0.6085743802, "autogenerated": false, "ratio": 3.670838073568449, "config_test": false, "has...
from django.shortcuts import render from django.http import HttpResponse from textblob import TextBlob import requests # Create your views here. def index(request): context = {'req_post': False} template_name = '1.html' if request.POST: req_post = True string_to_analyze = request.POS...
{ "repo_name": "gladsonvm/facebook-sentimental-analysis", "path": "senti/mrsenti/views.py", "copies": "1", "size": "1716", "license": "mit", "hash": 5372961840183547000, "line_mean": 35.5106382979, "line_max": 100, "alpha_frac": 0.6252913753, "autogenerated": false, "ratio": 3.5601659751037342, ...
#from django.shortcuts import render from django.http import HttpResponse from ticket.models import * from django.utils.html import * from myFunction.functions import * from json import dumps import re __ERROR="error" __ILLEGAL="illegal" __FAILURE="failure" __SUCCESS="success" guestColumns={"name":4,"grade":1,"classN...
{ "repo_name": "sqd/NNEZArtFestival2015Sys", "path": "backend/ticket/views.py", "copies": "1", "size": "3183", "license": "mit", "hash": 7794248162212218000, "line_mean": 31.4795918367, "line_max": 97, "alpha_frac": 0.6638391455, "autogenerated": false, "ratio": 4.024020227560051, "config_test":...
from django.shortcuts import render from django.http import HttpResponse from tickets.models import Location, Reason, Ticket from django.db.models import Count from django.db import connection import dateutil.parser ''' def weekdaycount(locid): cursor = connection.cursor() cursor.execute("SELECT strftime('%w',...
{ "repo_name": "JOUR491-NewsApplications/JOUR491-Parking", "path": "parking/tickets/views.py", "copies": "1", "size": "1422", "license": "mit", "hash": -2202224983803513900, "line_mean": 42.0909090909, "line_max": 156, "alpha_frac": 0.7081575246, "autogenerated": false, "ratio": 3.812332439678284,...
from django.shortcuts import render from django.http import HttpResponse from topology.models import Machine, Threat from operator import itemgetter def index(request): context_dict = {} machine_list = Machine.objects.all() context_dict['machines'] = machine_list context_dict['number_of_machines'] = le...
{ "repo_name": "DylanWatson/VENT", "path": "topology/views.py", "copies": "1", "size": "5533", "license": "mit", "hash": -4427459866754275300, "line_mean": 30.9826589595, "line_max": 93, "alpha_frac": 0.6303994217, "autogenerated": false, "ratio": 3.5719819238218204, "config_test": false, "has...
from django.shortcuts import render from django.http import HttpResponse from twitch.models import StreamPreference, Stream from twitch import api from urllib.error import HTTPError import json def get_first_available_stream(): streams = get_available_streams() pref = StreamPreference.objects.all() for us...
{ "repo_name": "nicka101/CloudBroWeb", "path": "twitch/views.py", "copies": "1", "size": "1495", "license": "mit", "hash": 3463606715066816000, "line_mean": 30.829787234, "line_max": 121, "alpha_frac": 0.6093645485, "autogenerated": false, "ratio": 4.410029498525073, "config_test": false, "has...
from django.shortcuts import render from django.http import HttpResponse from uberjobs.models import EconCategory, EconSeries from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure from datetime import datetime from scipy import stats import json # Create you...
{ "repo_name": "Capez/02-ppm-data", "path": "www/uberjobs/views.py", "copies": "2", "size": "5298", "license": "apache-2.0", "hash": 5629531634579548000, "line_mean": 29.1022727273, "line_max": 86, "alpha_frac": 0.6326915817, "autogenerated": false, "ratio": 3.4380272550292017, "config_test": fa...
from django.shortcuts import render from django.http import HttpResponse from volunteer.forms import MemberForm from volunteer.models import Member from volunteer.geo import GeoLoc from django.http import HttpResponseRedirect import requests import os # Create your views here. class appView: d...
{ "repo_name": "Fazer56/Assignment3", "path": "charitysite/volunteer/views.py", "copies": "1", "size": "2673", "license": "mit", "hash": 6078357406683490000, "line_mean": 29.375, "line_max": 113, "alpha_frac": 0.5742611298, "autogenerated": false, "ratio": 3.3921319796954315, "config_test": fals...
from django.shortcuts import render from django.http import HttpResponse # HttpResponseRedirect, HttpResponseBadRequest, HttpResponseServerError, # HttpResponseForbidden from django.template import RequestContext, loader import json from ui.models import ImportEvent, TreatmentProject from datetime import date, datetime...
{ "repo_name": "Ecotrust/WJA", "path": "wja/ui/views.py", "copies": "1", "size": "3078", "license": "apache-2.0", "hash": -1586433968481885700, "line_mean": 35.2117647059, "line_max": 87, "alpha_frac": 0.6682910981, "autogenerated": false, "ratio": 3.871698113207547, "config_test": false, "has...
from django.shortcuts import render from django.http import HttpResponse import json as simplejson from focusgroups.models import * from focusgroups.forms import * from focusgroups.admin import * from species.admin import * # Create your views here. def _queryset_filtrado(request): params = {} if request.sess...
{ "repo_name": "CARocha/ciatEspecies", "path": "focusgroups/views.py", "copies": "1", "size": "4100", "license": "mit", "hash": -5369005529394610000, "line_mean": 31.03125, "line_max": 94, "alpha_frac": 0.617804878, "autogenerated": false, "ratio": 3.9122137404580153, "config_test": false, "ha...
from django.shortcuts import render from django.http import HttpResponse import json,datetime from apps.message.models import News from apps.game.models import Game,PlayerGameProfile,TeamGameProfile from apps.team.models import Team,TeamProfile,Player,PlayerProfile from django.contrib.auth import REDIRECT_FIELD_NAME, l...
{ "repo_name": "zWingz/webbasketball", "path": "apps/welcome/views.py", "copies": "1", "size": "2789", "license": "mit", "hash": 7453649901784816000, "line_mean": 47.1034482759, "line_max": 125, "alpha_frac": 0.6715668698, "autogenerated": false, "ratio": 3.5259165613147916, "config_test": false...
from django.shortcuts import render from django.http import HttpResponse import json, datetime from user.models import User from will.models import Will # Create your views here. def new(request): resp = {} if request.method != 'POST': resp['status'] = 1 resp['message'] = 'Wrong Http method!' ...
{ "repo_name": "wyxpku/pkucourier", "path": "will/views.py", "copies": "2", "size": "3777", "license": "mit", "hash": -3730661025787001300, "line_mean": 31.8434782609, "line_max": 81, "alpha_frac": 0.6195393169, "autogenerated": false, "ratio": 3.6528046421663443, "config_test": false, "has_no...
from django.shortcuts import render from django.http import HttpResponse import json from django.db.models import Q import helpers, blockchain_func from bitcoin.rpc import Proxy as rpcProcessedProxy from bitcoinrpc.authproxy import JSONRPCException, AuthServiceProxy as rpcRawProxy import external_db def submit_transa...
{ "repo_name": "Peerapps/PeerMarket-Server", "path": "peermarket/views.py", "copies": "1", "size": "2139", "license": "mit", "hash": -6878227038827174000, "line_mean": 28.7083333333, "line_max": 108, "alpha_frac": 0.5759700795, "autogenerated": false, "ratio": 4.45625, "config_test": false, "h...
from django.shortcuts import render from django.http import HttpResponse import json import datetime import email import smtplib import time from itfornonprofits.models import Project from itfornonprofits.models import Sector from itfornonprofits.models import Skill from itfornonprofits.models import Engineer def inde...
{ "repo_name": "mic47/itfornonprofit", "path": "itfornonprofits/views.py", "copies": "1", "size": "11372", "license": "mit", "hash": 6546100608612659000, "line_mean": 38.901754386, "line_max": 206, "alpha_frac": 0.638058389, "autogenerated": false, "ratio": 3.4491962390051563, "config_test": fal...
from django.shortcuts import render from django.http import HttpResponse import json import rtw.settings as settings import sys import webbrowser from rtmapi import Rtm def index(request): context = {"DEBUG": settings.DEBUG} api = Rtm(settings.RTM_API_KEY, settings.RTM_API_SECRET, "read", None) if not ap...
{ "repo_name": "ArnaudBrousseau/rtw", "path": "rtw/views.py", "copies": "1", "size": "1470", "license": "unlicense", "hash": -7136460554774965000, "line_mean": 30.9565217391, "line_max": 77, "alpha_frac": 0.6326530612, "autogenerated": false, "ratio": 3.6206896551724137, "config_test": false, ...
from django.shortcuts import render from django.http import HttpResponse import json import time import requests import hashlib import random import os from bs4 import BeautifulSoup # Create your views here. api_key = os.environ.get("api_key", "") shared_secret = os.environ.get("shared_secret", "") def index(reques...
{ "repo_name": "xoneco/slidesharekaraoke", "path": "main/views.py", "copies": "1", "size": "5206", "license": "mit", "hash": 4695520234015867000, "line_mean": 36.731884058, "line_max": 126, "alpha_frac": 0.5991164041, "autogenerated": false, "ratio": 3.8735119047619047, "config_test": false, "...
from django.shortcuts import render from django.http import HttpResponse import json def read_data(fn): with open(fn, 'r') as f: data = f.read() return data def import_data(fn): data = read_data(fn) return json.loads(data) def home_page(request): return HttpResponse('<html><title>Artist S...
{ "repo_name": "julzhk/artistsearch", "path": "artist_search/search/views.py", "copies": "1", "size": "1787", "license": "mit", "hash": -3392144666667385300, "line_mean": 29.2881355932, "line_max": 91, "alpha_frac": 0.5741466144, "autogenerated": false, "ratio": 3.5811623246492985, "config_test"...
from django.shortcuts import render from django.http import HttpResponse import json def extract_keys(data, keys): out = {} for key in keys: if key in data: out[key] = data[key] return out def extract(data, key): try: out = [] for d in data: row = {} ...
{ "repo_name": "dvcrn/om-react-native-demo", "path": "server/api/views.py", "copies": "1", "size": "2254", "license": "epl-1.0", "hash": -3541847558299202600, "line_mean": 35.3548387097, "line_max": 114, "alpha_frac": 0.4968944099, "autogenerated": false, "ratio": 3.3996983408748114, "config_tes...
from django.shortcuts import render from django.http import HttpResponse import logging from pymongo import MongoClient import json # Create your views here. logger = logging.getLogger(__name__) def doc(request, col_id, doc_id): client = MongoClient('localhost', 27017) db = client['kkoma'] col = db[col_i...
{ "repo_name": "sungtaek/django-mongo", "path": "mongo/views.py", "copies": "1", "size": "2638", "license": "apache-2.0", "hash": -8464620784303308000, "line_mean": 35.1369863014, "line_max": 94, "alpha_frac": 0.5792266869, "autogenerated": false, "ratio": 3.50332005312085, "config_test": false,...
from django.shortcuts import render from django.http import HttpResponse import os from .models import Greeting import json import sys from django.http import JsonResponse import time from django.conf import settings from django.conf.urls.static import static import requests from bs4 import BeautifulSoup import cgi i...
{ "repo_name": "kar288/exquery", "path": "hello/views.py", "copies": "1", "size": "24481", "license": "mit", "hash": 5324666402407287000, "line_mean": 30.8348504551, "line_max": 213, "alpha_frac": 0.5938074425, "autogenerated": false, "ratio": 3.0089724680432646, "config_test": false, "has_no_...
from django.shortcuts import render from django.http import HttpResponse import os, threading, csv, tempfile from collections import OrderedDict #from django.core.servers.basehttp import FileWrapper #from wsgiref.util import FileWrapper # Create your views here. def index(request): return render(request, 'drawin...
{ "repo_name": "amarjeetkapoor1/Sim", "path": "Sim_site/drawing_freecad/views.py", "copies": "1", "size": "2930", "license": "mit", "hash": -7015941902497477000, "line_mean": 37.0519480519, "line_max": 167, "alpha_frac": 0.5825938567, "autogenerated": false, "ratio": 3.2700892857142856, "config_...
from django.shortcuts import render from django.http import HttpResponse import random def index(request): list = ["http://giant.gfycat.com/LiquidSevereHoatzin.gif", "http://giant.gfycat.com/LimitedPeriodicJaeger.gif","http://cfile5.uf.tistory.com/image/2235764955FB760830559F","http://cfile23.uf.tistory.com/image/...
{ "repo_name": "hshinf/Restaurant-Roulette", "path": "base/views.py", "copies": "1", "size": "2027", "license": "mit", "hash": -6604679586959692000, "line_mean": 41.2291666667, "line_max": 236, "alpha_frac": 0.5367538234, "autogenerated": false, "ratio": 3.3896321070234112, "config_test": false,...
from django.shortcuts import render from django.http import HttpResponse import redis, json from datetime import datetime as dt import time from .models import Message, Listener CHANNEL_NAME = 'messages' LISTENER = None # Create your views here. def hello(request): # Test API endpoint to check if server is runn...
{ "repo_name": "scarescrow/LongPollChat", "path": "redischat/views.py", "copies": "1", "size": "2949", "license": "mit", "hash": -8535373350120943000, "line_mean": 27.0952380952, "line_max": 74, "alpha_frac": 0.6588674127, "autogenerated": false, "ratio": 4.001356852103121, "config_test": false,...
from django.shortcuts import render from django.http import HttpResponse import requests import utils from models import * import json def index(request): return render(request, "index.html", {}) def image_search(request): print request if request.method == 'GET': utils.get_tags(request.GET.get('...
{ "repo_name": "briansudo/Atlas", "path": "client/views.py", "copies": "1", "size": "1583", "license": "apache-2.0", "hash": 3475547703830721500, "line_mean": 35.8139534884, "line_max": 157, "alpha_frac": 0.6753000632, "autogenerated": false, "ratio": 3.6141552511415527, "config_test": false, ...
from django.shortcuts import render from django.http import HttpResponse import subprocess import re import random import string import time import os ''' For this code to work: 1) The user running the web server (www-data) must be in the group lp. 2) The command scanimage -L must be available. ''' # Constants SCAN...
{ "repo_name": "luiscarlosgph/nas", "path": "scanner/views.py", "copies": "1", "size": "2273", "license": "mit", "hash": -1289796711196128500, "line_mean": 30.1369863014, "line_max": 128, "alpha_frac": 0.6836779586, "autogenerated": false, "ratio": 3.130853994490358, "config_test": false, "has...
from django.shortcuts import render from django.http import HttpResponse # Import the Category model from rango.models import Category from rango.models import Page def index(request): # Query the database for a list of ALL categories currently stored. # Order the categories by no. likes in descending order. ...
{ "repo_name": "stesesia/tangowithdjango", "path": "rango/views.py", "copies": "1", "size": "2493", "license": "mit", "hash": 33550792898641370, "line_mean": 43.5178571429, "line_max": 96, "alpha_frac": 0.6999598877, "autogenerated": false, "ratio": 4.373684210526315, "config_test": false, "ha...
from django.shortcuts import render from django.http import HttpResponse # Load app specific settings from django.apps import apps # Helper from django.db.models import get_model from django.template import TemplateDoesNotExist, loader import os.path import json #from rest_framework.decorators import api_view from dj...
{ "repo_name": "dplin/woola", "path": "woola/core/views.py", "copies": "1", "size": "4778", "license": "bsd-3-clause", "hash": -9068100625390541000, "line_mean": 31.5034013605, "line_max": 225, "alpha_frac": 0.6485977396, "autogenerated": false, "ratio": 3.7269890795631824, "config_test": false,...
from django.shortcuts import render from django.http import HttpResponse # Create your views here. def index(request): context = { 'title': "World Borders", 'message': "A world map"} return render(request, 'world/index.html', context) from django.db.models import Q from models import WorldBorder, BufferedWorl...
{ "repo_name": "cascadian/geodjango-basic", "path": "web/world/views.py", "copies": "1", "size": "1556", "license": "mit", "hash": 5107862378938278000, "line_mean": 36.9512195122, "line_max": 85, "alpha_frac": 0.7030848329, "autogenerated": false, "ratio": 4.536443148688047, "config_test": false...
from django.shortcuts import render from django.http import HttpResponse # Create your views here. def index(request): # return HttpResponse("<h1>The Fett homepage</h1>") return render(request, 'bokplot/index.html', {}) from bokeh.plotting import figure from bokeh.resources import CDN from bokeh.embed import ...
{ "repo_name": "Cyberface/django-fett", "path": "mysite/bokplot/views.py", "copies": "1", "size": "3716", "license": "mit", "hash": 259748499244479330, "line_mean": 32.4774774775, "line_max": 106, "alpha_frac": 0.630247578, "autogenerated": false, "ratio": 2.6448398576512457, "config_test": fals...
from django.shortcuts import render from django.http import HttpResponse # Create your views here. import requests from . import Music_Repo as MR from .forms import TrackForm, GenreForm MT = MR.MusicTrack() GT = MR.GenreTrack() addGenres = GT.getGTAll() if type(addGenres) == str: print addGenres + "\n" def Mu...
{ "repo_name": "krishnasagar14/Project", "path": "MusicApp/views.py", "copies": "1", "size": "6424", "license": "mit", "hash": 5036166522104619000, "line_mean": 41.8333333333, "line_max": 119, "alpha_frac": 0.5555728518, "autogenerated": false, "ratio": 3.5161466885604815, "config_test": false, ...
from django.shortcuts import render from django.http import HttpResponse # Create your views here. def HomeView(request): return HttpResponse("HomeView") def UsersView(request): return HttpResponse('this is list of users') def UserView(request,username_id): return HttpResponse('this is the user %s' % (...
{ "repo_name": "niksolaz/TvApp", "path": "tvapp/views.py", "copies": "1", "size": "1389", "license": "mit", "hash": 7379201015029993000, "line_mean": 36.5675675676, "line_max": 92, "alpha_frac": 0.724262059, "autogenerated": false, "ratio": 3.463840399002494, "config_test": false, "has_no_keyw...
from django.shortcuts import render from django.http import HttpResponse from bespeak_meal.models import Week_menu, Person, Order def index(request): (person_list, week_menu, b, l) = _get_info() context = {'person_list': person_list, 'week_menu': week_menu, 'breakfast_deadline': b, 'lu...
{ "repo_name": "zhengxinxing/bespeak_meal", "path": "views.py", "copies": "1", "size": "1347", "license": "mit", "hash": 825187313455402400, "line_mean": 34.0833333333, "line_max": 78, "alpha_frac": 0.6334125099, "autogenerated": false, "ratio": 2.6701902748414374, "config_test": false, "has_n...
from django.shortcuts import render from django.http import HttpResponse from blog.models import Post from home.views import cached_page ABOUT_ME = """ I'm a full-stack web developer based in Bangalore, India. I love writing beautiful code to build delightful products. [Here's my resume](https://stackoverflow.com/use...
{ "repo_name": "pixyj/pramod.io", "path": "about/views.py", "copies": "1", "size": "5093", "license": "mit", "hash": 5764878460636341000, "line_mean": 33.8424657534, "line_max": 152, "alpha_frac": 0.7295065854, "autogenerated": false, "ratio": 2.3238921882137964, "config_test": false, "has_no_...
from django.shortcuts import render from django.http import HttpResponse from datetime import date, timedelta import json from core.models import Squat, SquatSet def index(request, username): response = {"user": username, "date": str(date.today()), "workouts": []} # Find all ...
{ "repo_name": "manish/fitnessroom", "path": "core/views.py", "copies": "1", "size": "1461", "license": "mit", "hash": 3736383032970082300, "line_mean": 35.525, "line_max": 69, "alpha_frac": 0.6420260096, "autogenerated": false, "ratio": 3.8346456692913384, "config_test": false, "has_no_keywor...
from django.shortcuts import render from django.http import HttpResponse from datetime import datetime, timedelta from servo.models.calendar import Calendar, CalendarEvent def edit(req, id): pass def index(request): calendars = Calendar.objects.filter(user=request.user) return render(request, "calendars/index.ht...
{ "repo_name": "aucor/servo", "path": "servo/views/calendar.py", "copies": "1", "size": "2216", "license": "bsd-2-clause", "hash": -5225007293625646000, "line_mean": 28.5466666667, "line_max": 73, "alpha_frac": 0.7166064982, "autogenerated": false, "ratio": 3.090655509065551, "config_test": fals...
from django.shortcuts import render from django.http import HttpResponse from django.template import RequestContext, loader from polls.models import Question, Player, Team, Incident, Update # Create your views here. def index(request): latest_question_list = Question.objects.order_by("-pub_date")[:5] template = lo...
{ "repo_name": "aaronkrolik/rule46", "path": "mysite/polls/views.py", "copies": "1", "size": "1997", "license": "apache-2.0", "hash": -5054104535558511000, "line_mean": 29.2727272727, "line_max": 70, "alpha_frac": 0.7160741112, "autogenerated": false, "ratio": 3.252442996742671, "config_test": f...
from django.shortcuts import render from django.http import HttpResponse from . import forms ## Initalize dictionary of neighborhood coordinates neighborhood_coord_dict = forms.get_neighborhood_dict() c = {"neighborhoods": neighborhood_coord_dict} ## Blank/unknown site page def blank(request): return render(reque...
{ "repo_name": "EmilyWebber/Healthy-Neighborhoods", "path": "Healthy-Neighborhoods/maps/views.py", "copies": "1", "size": "1428", "license": "mit", "hash": -4562369710652162600, "line_mean": 26.4807692308, "line_max": 67, "alpha_frac": 0.7079831933, "autogenerated": false, "ratio": 3.0447761194029...
from django.shortcuts import render from django.http import HttpResponse from .models import Greeting from uuid import uuid4 # Create your views here. def index(request): # return HttpResponse('Hello from Python!') return render(request, 'index.html') def upload_file(request): print('Uploading stuff') ...
{ "repo_name": "jjas0nn/solvem", "path": "hello/views.py", "copies": "1", "size": "1171", "license": "mit", "hash": -1642710256742537500, "line_mean": 26.2325581395, "line_max": 65, "alpha_frac": 0.6276686593, "autogenerated": false, "ratio": 3.877483443708609, "config_test": false, "has_no_ke...
from django.shortcuts import render from django.http import HttpResponse from .models import Greeting import urllib import json import os import logging # Create your views here. def index(request): logger = logging.getLogger(__name__) kim_api = '25fjm8zy' #in future, can change this kim_key = os.enviro...
{ "repo_name": "jjmilburn/listenlocally", "path": "main/views.py", "copies": "1", "size": "3817", "license": "mit", "hash": -8167474430703874000, "line_mean": 38.3505154639, "line_max": 89, "alpha_frac": 0.5669373854, "autogenerated": false, "ratio": 3.8055832502492524, "config_test": false, "...
from django.shortcuts import render from django.http import HttpResponse from .models import Person from .forms import SignUpForm def worker_signup(request): if request.method == 'GET': # return the login form form = SignUpForm() return render(request, 'user_auth/w_login.html', context={'...
{ "repo_name": "GautamAnghore/crowdworker-platform", "path": "project/user_auth/views.py", "copies": "1", "size": "1087", "license": "mit", "hash": 5872094812563205000, "line_mean": 30.9705882353, "line_max": 80, "alpha_frac": 0.5703771849, "autogenerated": false, "ratio": 4.41869918699187, "con...
from django.shortcuts import render from django.http import HttpResponse from mozdns.utils import get_zones from core.search.compiler.django_compile import compile_to_django import simplejson as json from gettext import gettext as _ from MySQLdb import OperationalError from jinja2 import Environment, PackageLoader, ...
{ "repo_name": "rtucker-mozilla/mozilla_inventory", "path": "core/search/views.py", "copies": "1", "size": "4150", "license": "bsd-3-clause", "hash": -1337776543249031700, "line_mean": 32.2, "line_max": 78, "alpha_frac": 0.6072289157, "autogenerated": false, "ratio": 3.882132834424696, "config_t...
from django.shortcuts import render from django.http import HttpResponse from oncall.models import OncallAssignment from oncall.forms import OncallForm from oncall.constants import ONCALL_TYPES import simplejson as json def getoncall(request, oncall_type): """ Returns information about who is oncall. Oncall...
{ "repo_name": "mozilla/inventory", "path": "oncall/views.py", "copies": "2", "size": "2743", "license": "bsd-3-clause", "hash": 295521893620733900, "line_mean": 28.8152173913, "line_max": 79, "alpha_frac": 0.5800218739, "autogenerated": false, "ratio": 4.01610541727672, "config_test": false, ...
from django.shortcuts import render from django.http import HttpResponse from rest_framework import status from rest_framework.decorators import api_view, authentication_classes, permission_classes from rest_framework.response import Response from django.http import JsonResponse from django.views.decorators.csrf impor...
{ "repo_name": "colanconnon/CryptoMessage", "path": "CryptoMessageDjango/CryptoMessageApi/views.py", "copies": "1", "size": "7703", "license": "mit", "hash": 4788972088441686000, "line_mean": 32.6375545852, "line_max": 119, "alpha_frac": 0.6646761002, "autogenerated": false, "ratio": 4.32996065205...
from django.shortcuts import render from django.http import HttpResponse from rest_framework import status from rest_framework.decorators import api_view from rest_framework.response import Response from rest_framework.views import APIView from rest_framework.renderers import JSONRenderer from api.models import Trade...
{ "repo_name": "frederick623/dom", "path": "api/views.py", "copies": "1", "size": "2142", "license": "apache-2.0", "hash": -2778206897311921700, "line_mean": 34.7166666667, "line_max": 103, "alpha_frac": 0.6951447246, "autogenerated": false, "ratio": 4.08, "config_test": false, "has_no_keyword...
from django.shortcuts import render from django.http import HttpResponse from uuid import uuid4 from voxel_globe.meta import models from voxel_globe.meta.tools import getHistory from .models import Session # Create your views here. def make_order_1(request): uuid = uuid4() session = Session(uuid=uuid, owner=requ...
{ "repo_name": "andyneff/voxel-globe", "path": "voxel_globe/order/build_voxel_world/views.py", "copies": "1", "size": "4954", "license": "mit", "hash": 1738798094250614000, "line_mean": 33.6433566434, "line_max": 125, "alpha_frac": 0.6534113847, "autogenerated": false, "ratio": 3.2127107652399483,...
from django.shortcuts import render from django.http import HttpResponse from voxel_globe.meta import models from uuid import uuid4 # Create your views here. def make_order_1(request): #Choose the image set image_set_list = models.ImageSet.objects.all() response = render(request, 'visualsfm/html/make_order_1.h...
{ "repo_name": "VisionSystemsInc/voxel_globe", "path": "voxel_globe/visualsfm/views.py", "copies": "2", "size": "1905", "license": "mit", "hash": -3684475090936077000, "line_mean": 32.4210526316, "line_max": 92, "alpha_frac": 0.6692913386, "autogenerated": false, "ratio": 3.2844827586206895, "co...
from django.shortcuts import render from django.http import HttpResponse from voxel_globe.meta import models from voxel_globe.meta.tools import getHistory from uuid import uuid4 from .models import Session # Create your views here. def make_order_1(request): #Choose the image collection uuid = uuid4(); sessio...
{ "repo_name": "andyneff/voxel-globe", "path": "voxel_globe/order/visualsfm/views.py", "copies": "1", "size": "3014", "license": "mit", "hash": 2847264607404323300, "line_mean": 33.25, "line_max": 92, "alpha_frac": 0.6539482415, "autogenerated": false, "ratio": 3.5251461988304094, "config_test":...
from django.shortcuts import render from django.http import HttpResponse import json import decimal from django.core import serializers # other init import monitor.setup import datetime from monitor.models import BalanceHistory from monitor.models import ExchangeHistory from monitor.models import BotHistory class ...
{ "repo_name": "gserv/mining_monitor", "path": "monitor/views.py", "copies": "1", "size": "1508", "license": "mit", "hash": 7678216657482899000, "line_mean": 31.085106383, "line_max": 69, "alpha_frac": 0.7062334218, "autogenerated": false, "ratio": 3.8666666666666667, "config_test": false, "ha...
from django.shortcuts import render from django.http import HttpResponse import json import uuid import logging import StringIO from pyVEP import VEP from MutationInfo import MutationInfo print 'Initializing MutationInfo..' mi = MutationInfo() print 'Done' root_logger = logging.getLogger() root_logger.setLevel(lo...
{ "repo_name": "kantale/MutationInfo", "path": "web/MutationInfoApp/views.py", "copies": "1", "size": "3877", "license": "mit", "hash": 4367105905494070000, "line_mean": 33.3097345133, "line_max": 161, "alpha_frac": 0.5682228527, "autogenerated": false, "ratio": 3.556880733944954, "config_test":...
from django.shortcuts import render from django.http import HttpResponse import listener HOST = '192.168.4.97' PORT = '8765' upnpListener = listener.UpnpListener('50000', HOST, PORT) HUE_TEMPLATE = '<?xml version="1.0"?>\n' HUE_TEMPLATE += '<root xmlns="urn:schemas-upnp-org:device-1-0">\n' HUE_TEMPLATE += '<specVer...
{ "repo_name": "msphair/django_echo_bridge", "path": "upnp/views.py", "copies": "1", "size": "2591", "license": "apache-2.0", "hash": 8019534799539156000, "line_mean": 40.7903225806, "line_max": 92, "alpha_frac": 0.6935546121, "autogenerated": false, "ratio": 2.8101952277657265, "config_test": f...
from django.shortcuts import render from django.http import HttpResponse import requests import os import json import datetime from stormreplay import StormReplayAnalyzer from tasks import LocallyStoredReplayParsingTask from tasks import S3StoredReplayParsingTask from tempfile import NamedTemporaryFile import base6...
{ "repo_name": "karlgluck/heroes-of-the-storm-replay-parser", "path": "api/views.py", "copies": "3", "size": "4525", "license": "mit", "hash": -3639004781090075000, "line_mean": 40.8981481481, "line_max": 133, "alpha_frac": 0.6426519337, "autogenerated": false, "ratio": 3.8741438356164384, "conf...
from django.shortcuts import render from django.http import HttpResponse import requests from .models import Movie # Views here: def index(request): return HttpResponse("Hello, world. You're at the polls index.") def add(request, movie_imdbid): r = requests.get('http://www.omdbapi.com/', params = {'i':...
{ "repo_name": "smorgant/echo", "path": "movies/views.py", "copies": "1", "size": "1432", "license": "apache-2.0", "hash": -1674455757780386300, "line_mean": 27.0980392157, "line_max": 102, "alpha_frac": 0.6410614525, "autogenerated": false, "ratio": 3.5012224938875307, "config_test": false, "...
from django.shortcuts import render from django.http import HttpResponse # Import the Category model from rango.models import Category from rango.models import Page from rango.forms import CategoryForm from rango.forms import PageForm def index(request): # Query the database for a list of ALL categories current...
{ "repo_name": "cclai999/rango", "path": "tango_with_django_project/rango/views.py", "copies": "1", "size": "4229", "license": "mit", "hash": 5872515015533719000, "line_mean": 36.7589285714, "line_max": 96, "alpha_frac": 0.6455426815, "autogenerated": false, "ratio": 4.24172517552658, "config_te...
from django.shortcuts import render from django.http import HttpResponse # JSON support # from django.core import serializers import json # models from django.contrib.auth.models import User from .models import Volunteer, Task, Location, ShiftLog, VolunteerRequest #CSRF exemption for testing from django.views.decora...
{ "repo_name": "aalder/ABVP-App", "path": "vp_app/vpadmin/views.py", "copies": "1", "size": "7451", "license": "mit", "hash": 8064592049240857000, "line_mean": 35.1699029126, "line_max": 129, "alpha_frac": 0.6142799624, "autogenerated": false, "ratio": 3.587385652383245, "config_test": false, ...
from django.shortcuts import render from django.http import HttpResponse # Screen dimensions: 1366 x 768 def index(request): # tmp_directory = os.path.join('mediapanel', 'tmp', 'Photo albums') # for root, dirs, files in os.walk(tmp_directory, topdown=False): # for name in files: # os.remove...
{ "repo_name": "Ultimatum22/MediaPanel", "path": "panel/views.py", "copies": "1", "size": "2180", "license": "apache-2.0", "hash": 5496197060672698000, "line_mean": 25.9259259259, "line_max": 98, "alpha_frac": 0.6270642202, "autogenerated": false, "ratio": 3.3641975308641974, "config_test": fals...
from django.shortcuts import render from django.http import HttpResponseNotFound from django.template import RequestContext, loader, Template, TemplateDoesNotExist from django.views.decorators.csrf import requires_csrf_token import logging logger = logging.getLogger(__name__) # Get an instance of a logger from apps....
{ "repo_name": "MySmile/mysmile", "path": "apps/preferences/views.py", "copies": "1", "size": "2324", "license": "bsd-3-clause", "hash": -4914940964834785000, "line_mean": 40.5, "line_max": 169, "alpha_frac": 0.6592082616, "autogenerated": false, "ratio": 4.0700525394045535, "config_test": false...
from django.shortcuts import render from django.http import HttpResponsePermanentRedirect, HttpResponseNotFound from django.core.urlresolvers import reverse from django.db import transaction, connection, connections from datetime import date, timedelta import re from collections import namedtuple from nyc.models impo...
{ "repo_name": "datamade/nyc-councilmatic", "path": "nyc/views.py", "copies": "1", "size": "8035", "license": "mit", "hash": -6559831585123065000, "line_mean": 35.0313901345, "line_max": 108, "alpha_frac": 0.5652769135, "autogenerated": false, "ratio": 4.402739726027397, "config_test": false, ...
from django.shortcuts import render from django.http import HttpResponseRedirect as Redirect from django.contrib.auth.decorators import login_required from django.contrib.auth.forms import AuthenticationForm from django.core.exceptions import ObjectDoesNotExist from django.shortcuts import get_object_or_404 from django...
{ "repo_name": "XXangelXX/egresados", "path": "backend/formulario/views.py", "copies": "1", "size": "7766", "license": "mit", "hash": 4918073196884796000, "line_mean": 33.2114537445, "line_max": 118, "alpha_frac": 0.6221993304, "autogenerated": false, "ratio": 3.514027149321267, "config_test": f...
from django.shortcuts import render from django.http import HttpResponseRedirect, Http404 from django.contrib import messages from video.models import Video from notification.signals import notify from .forms import CommentForm from .models import Comment # Create your views here. def comment_thread(request, pk): ...
{ "repo_name": "topaz1874/srvup", "path": "src/comment/views.py", "copies": "1", "size": "3437", "license": "mit", "hash": 3908018476851308000, "line_mean": 35.9677419355, "line_max": 75, "alpha_frac": 0.5280768112, "autogenerated": false, "ratio": 4.945323741007194, "config_test": false, "has...
from django.shortcuts import render from django.http import HttpResponseRedirect, Http404 from django.core.urlresolvers import reverse_lazy from django.contrib.auth import login as django_login, authenticate from django.contrib.auth.decorators import login_required from django.conf import settings from .forms import S...
{ "repo_name": "theju/smp", "path": "scheduler/views.py", "copies": "1", "size": "3431", "license": "mit", "hash": 4968844025695543000, "line_mean": 30.1909090909, "line_max": 69, "alpha_frac": 0.6423783154, "autogenerated": false, "ratio": 4.1892551892551895, "config_test": false, "has_no_key...
from django.shortcuts import render from django.http import HttpResponseRedirect, Http404 from django.core.urlresolvers import reverse from django.contrib.auth.decorators import login_required from .models import Program, Station from .forms import ProgramForm, StationForm # Create your views here. def index(request)...
{ "repo_name": "clede/Radiotrack", "path": "radiotracking/views.py", "copies": "1", "size": "4551", "license": "apache-2.0", "hash": -4070419192494382000, "line_mean": 36, "line_max": 80, "alpha_frac": 0.6664469347, "autogenerated": false, "ratio": 4.023872679045093, "config_test": false, "has...
from django.shortcuts import render from django.http import HttpResponseRedirect, Http404 from django.core.urlresolvers import reverse from .models import Topic, Entry from .forms import TopicForm, EntryForm from django.contrib.auth.decorators import login_required # Create your views here. def index(request): """...
{ "repo_name": "waiilaiiz/python_practice", "path": "learning_log/learning_logs/views.py", "copies": "1", "size": "2576", "license": "mit", "hash": -4624716916543027000, "line_mean": 30.875, "line_max": 88, "alpha_frac": 0.6564705882, "autogenerated": false, "ratio": 3.663793103448276, "config_t...
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from muser.models import UserProfile import json import logging logger = logging.getLogger(__name__) #@login_required def ...
{ "repo_name": "youtaya/mothertree", "path": "monthertree/muser/views.py", "copies": "1", "size": "1309", "license": "mit", "hash": 4043577445061884000, "line_mean": 30.1666666667, "line_max": 74, "alpha_frac": 0.7532467532, "autogenerated": false, "ratio": 3.1092636579572446, "config_test": fal...
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from django.contrib.auth.models import User from django.contrib.auth import authenticate, login, logout from django.shortcuts import redirect from django.shortcuts import get_object_or_404, render from django.urls import reve...
{ "repo_name": "Cosmin96/StudentBlackMarket", "path": "SBM/views.py", "copies": "1", "size": "3350", "license": "mit", "hash": 8902108225495448000, "line_mean": 31.2211538462, "line_max": 85, "alpha_frac": 0.7605970149, "autogenerated": false, "ratio": 3.6772777167947313, "config_test": false, ...
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from django.contrib.auth.models import User from mainapp.models import Product, Request from django.contrib.auth import authenticate, login, logout from django.shortcuts import redirect from django.shortcuts import get_object...
{ "repo_name": "Cosmin96/StudentBlackMarket", "path": "mainapp/views.py", "copies": "1", "size": "5481", "license": "mit", "hash": -7855892193291789000, "line_mean": 34.5974025974, "line_max": 145, "alpha_frac": 0.7414705346, "autogenerated": false, "ratio": 3.6011826544021024, "config_test": fa...
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from django.core.exceptions import ObjectDoesNotExist from django.utils import timezone from django.core.urlresolvers import reverse from UserProfile.models import Profile from Pledge.forms import CommitmentForm from Pledg...
{ "repo_name": "raytung/Slice", "path": "Pledge/views.py", "copies": "1", "size": "2810", "license": "mit", "hash": 701614147469287400, "line_mean": 40.3235294118, "line_max": 107, "alpha_frac": 0.5971530249, "autogenerated": false, "ratio": 4.496, "config_test": false, "has_no_keywords": fals...
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from django.core.servers.basehttp import FileWrapper from django.contrib.auth import authenticate, login from django.views.decorators.csrf import csrf_exempt from django.contrib.auth.models import User, Group from login.model...
{ "repo_name": "jnayak1/cs3240-s16-team16", "path": "external/views.py", "copies": "1", "size": "5552", "license": "mit", "hash": -1499706685667394300, "line_mean": 35.0584415584, "line_max": 125, "alpha_frac": 0.6734510086, "autogenerated": false, "ratio": 4.225266362252664, "config_test": fals...
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse from Apps.forum.models import Issue, Responses from common import helpers def Index(request): sqlData = Issue.objects.all() htmlData = { 'questions' : sqlData, ...
{ "repo_name": "dcjohnson/Ethics-World", "path": "EthicsWorld/Apps/forum/views.py", "copies": "1", "size": "1547", "license": "mit", "hash": 5268817558436773000, "line_mean": 34.976744186, "line_max": 101, "alpha_frac": 0.6936005171, "autogenerated": false, "ratio": 4.333333333333333, "config_te...
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse from database.project import interface def Index(request): try: project = interface.GetPres(request.GET['projecthash']) htmldata = { 'pres': project } return render(re...
{ "repo_name": "UALR-CodeTalks/codetalks", "path": "codetalks/apps/editor/views.py", "copies": "1", "size": "1442", "license": "mit", "hash": -3944413114607773700, "line_mean": 33.3333333333, "line_max": 119, "alpha_frac": 0.7510402219, "autogenerated": false, "ratio": 3.5170731707317073, "confi...
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse from django.template import RequestContext from core.models import Montadora, Cor, Modelo, Carro, Moto def index(request): return render(request, 'webui/index.html', ...
{ "repo_name": "tiagoprn/experiments", "path": "django/drf_veiculos_app/src/veiculos/apps/webui/views.py", "copies": "1", "size": "4641", "license": "mit", "hash": -2968423567507940400, "line_mean": 28.00625, "line_max": 79, "alpha_frac": 0.6610644258, "autogenerated": false, "ratio": 3.6950636942...
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse from django.views.decorators.csrf import csrf_exempt from .models import Vendor,Languages,Locations,Cusines,Timings,Charges import sys import json # Create your views here. @csrf_...
{ "repo_name": "kunal-exuberant/search-directory", "path": "DjangoServer/cookxplor/views.py", "copies": "1", "size": "2723", "license": "mit", "hash": 4664065894740448000, "line_mean": 60.8863636364, "line_max": 525, "alpha_frac": 0.676827029, "autogenerated": false, "ratio": 3.9926686217008798, ...
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse from .models import Comment # Create your views here. def list(request): return render(request, "comments/comment_list.html", context = { 'comments': Comment.objects....
{ "repo_name": "orionblastar/K666", "path": "comments/views.py", "copies": "1", "size": "4727", "license": "mit", "hash": -3725325650186919400, "line_mean": 35.3615384615, "line_max": 134, "alpha_frac": 0.6608842818, "autogenerated": false, "ratio": 3.772545889864326, "config_test": false, "ha...
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from django.http import JsonResponse from django.core.management import call_command from django.core.exceptions import ObjectDoesNotExist from rest_framework.response import Response from rest_framework import status from re...
{ "repo_name": "HPI-DeepLearning/CaptchaService", "path": "server/api/captcha_service/views.py", "copies": "1", "size": "9782", "license": "mit", "hash": -9195252694446393000, "line_mean": 35.0959409594, "line_max": 126, "alpha_frac": 0.6421999591, "autogenerated": false, "ratio": 4.06905158069883...
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from django import forms from django.forms.models import modelformset_factory, ModelForm from django.contrib.auth import logout from django.contrib.auth.decorators import login_required from picostack.vms.models import (VmIns...
{ "repo_name": "AlphaStaxLLC/picostack", "path": "picostack/vms/views.py", "copies": "1", "size": "4865", "license": "mit", "hash": -7281861108290190000, "line_mean": 35.037037037, "line_max": 73, "alpha_frac": 0.6098663926, "autogenerated": false, "ratio": 4.1439522998296425, "config_test": fal...
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import get_object_or_404 from polls.models import Question, Choice from django.shortcuts import render from django.core.urlresolvers import reverse from django.views import generic from django.utils impo...
{ "repo_name": "leifos/tango_with_tests", "path": "django_tutorial/polls/views.py", "copies": "1", "size": "1848", "license": "mit", "hash": 3254590953404852700, "line_mean": 34.5576923077, "line_max": 94, "alpha_frac": 0.6801948052, "autogenerated": false, "ratio": 4.219178082191781, "config_te...
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from django.template import RequestContext from django.contrib.auth import authenticate, login, logout from django.contrib.auth.decorators import login_required from django.shortcuts import get_object_or_404, render, render_t...
{ "repo_name": "kburts/django-playlist", "path": "django_playlist/auth/views.py", "copies": "1", "size": "5081", "license": "mit", "hash": 5763081202385739000, "line_mean": 42.0677966102, "line_max": 95, "alpha_frac": 0.6520370006, "autogenerated": false, "ratio": 4.700277520814061, "config_test...
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from django.template import RequestContext from django.shortcuts import render_to_response import json import time, os from django.core import serializers from datetime import datetime import os.path import urllib, urllib2 im...
{ "repo_name": "thebachchaoproject/safewatch-ivr", "path": "safewatch_ivr_app/views.py", "copies": "1", "size": "7499", "license": "mit", "hash": -678058002529630100, "line_mean": 33.3990825688, "line_max": 176, "alpha_frac": 0.6995599413, "autogenerated": false, "ratio": 3.075881870385562, "con...
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from django.template.loader import get_template from django.template import Context from django.core.context_processors import csrf from django.contrib import auth from django.shortcuts import render_to_response from django.c...
{ "repo_name": "mnithya/cs3240-s15-team06-test", "path": "polls/views.py", "copies": "1", "size": "9136", "license": "mit", "hash": 3544390553974428700, "line_mean": 34.8274509804, "line_max": 139, "alpha_frac": 0.6376970228, "autogenerated": false, "ratio": 4.049645390070922, "config_test": fal...
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from django.urls import reverse from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from meet.models import * from meet.forms import * from index.models import User from urllib import parse from openpyxl ...
{ "repo_name": "light-white/meeting", "path": "meet/views.py", "copies": "1", "size": "8724", "license": "apache-2.0", "hash": -458297544077128960, "line_mean": 40.3173076923, "line_max": 109, "alpha_frac": 0.5946008843, "autogenerated": false, "ratio": 3.6477079796264857, "config_test": false, ...
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from django.utils.encoding import smart_unicode from django.core.exceptions import ObjectDoesNotExist from friends.models import Friend from users.models import UserInfo from utils.packed_json import toJSON from utils.packed_...
{ "repo_name": "youtaya/mothertree", "path": "monthertree/friends/views.py", "copies": "1", "size": "9303", "license": "mit", "hash": 6054196425490304000, "line_mean": 29.2045454545, "line_max": 84, "alpha_frac": 0.7043964313, "autogenerated": false, "ratio": 3.222376169033599, "config_test": fa...
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from django.utils import timezone from datetime import timedelta import json from utils.packed_json import toJSON def today(request): cTime = timezone.localtime(timezone.now()) nextDelta = timedelta(days = 1) nextTime = c...
{ "repo_name": "youtaya/mothertree", "path": "monthertree/news/views.py", "copies": "1", "size": "1146", "license": "mit", "hash": -4125766263580351500, "line_mean": 26.9512195122, "line_max": 85, "alpha_frac": 0.6910994764, "autogenerated": false, "ratio": 3.3025936599423633, "config_test": fal...
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from FileManager.forms import CloudFileForm from FileManager.models import CloudFile, Genre import json def index(request): return render(request, 'index-fm.html') def show_genres(request): return render(request, ...
{ "repo_name": "Yuvv/LearnTestDemoTempMini", "path": "py-django/FileUpload/FileManager/views.py", "copies": "1", "size": "1629", "license": "mit", "hash": -3380259163952524000, "line_mean": 29.7358490566, "line_max": 80, "alpha_frac": 0.599140577, "autogenerated": false, "ratio": 4.032178217821782...
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from MainApp.models import Medicine,Users,Orders,Purchase from django.core.exceptions import ObjectDoesNotExist from datetime import datetime def HomePage(request): l=CartList(request) isLoggedin=False u,isLoggedin=LogChe...
{ "repo_name": "praveenjindal62/MediHomeProject", "path": "MainApp/views.py", "copies": "2", "size": "5698", "license": "mit", "hash": -6270686594185878000, "line_mean": 29.9673913043, "line_max": 132, "alpha_frac": 0.7113022113, "autogenerated": false, "ratio": 2.8967971530249113, "config_test"...
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from .models import * from .forms import MapeoConsulta, MapaConsulta import json from itertools import chain from datetime import datetime # Create your views here. def _queryset_filtrado(request): params = {} if '...
{ "repo_name": "ErickMurillo/ciat_plataforma", "path": "mapeo/views.py", "copies": "3", "size": "6953", "license": "mit", "hash": 3186539874589466600, "line_mean": 37.2032967033, "line_max": 140, "alpha_frac": 0.6246224651, "autogenerated": false, "ratio": 3.264319248826291, "config_test": false...
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from songs.models import Song, Phrase, SongPhrase from .forms import UploadFileForms from django.views.decorators.csrf import csrf_exempt import numpy as np import datetime def transition_matrix(songs, phrases=None): ''' T...
{ "repo_name": "ZmjbS/edda", "path": "songs/views.py", "copies": "1", "size": "18423", "license": "mit", "hash": 3977880250352610000, "line_mean": 33.5, "line_max": 197, "alpha_frac": 0.6703034251, "autogenerated": false, "ratio": 3.096822995461422, "config_test": false, "has_no_keywords": fal...
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from bs4 import BeautifulSoup as bs import requests import json WIKI_PAGE_BASE = "https://en.wikipedia.org/wiki/" WIKI_API_BASE = "https://en.wikipedia.org/w/api.php?format=json&action=query" WIKI_EXTRACT = WIKI_API_BASE...
{ "repo_name": "TimelyToga/wtf_is", "path": "wtf_proj/wtf_proj/views.py", "copies": "1", "size": "3001", "license": "mit", "hash": 2670901523744053000, "line_mean": 23.5983606557, "line_max": 114, "alpha_frac": 0.6394535155, "autogenerated": false, "ratio": 3.6687041564792175, "config_test": fal...
from django.shortcuts import render from django.http import HttpResponseRedirect, JsonResponse, HttpResponse from django.core.urlresolvers import reverse from django.utils import timezone from django.views.decorators.csrf import csrf_exempt from .forms import JobCreateForm, JobRunForm from .models import Job, Dataset, ...
{ "repo_name": "GitOnion/climate-commander", "path": "django-server/climate_commander/jobs/views.py", "copies": "1", "size": "8305", "license": "mit", "hash": 424324871449619140, "line_mean": 46.7298850575, "line_max": 131, "alpha_frac": 0.6102347983, "autogenerated": false, "ratio": 3.95664602191...
from django.shortcuts import render from django.http import HttpResponseRedirect, JsonResponse from django.urls import reverse, reverse_lazy from django.views.generic import ListView, DetailView, CreateView, UpdateView, DeleteView from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.messages.vi...
{ "repo_name": "asommer70/photolandia", "path": "photos/views.py", "copies": "1", "size": "2584", "license": "mit", "hash": -4009014326377068500, "line_mean": 32.1282051282, "line_max": 89, "alpha_frac": 0.7182662539, "autogenerated": false, "ratio": 4.313856427378965, "config_test": false, "h...
from django.shortcuts import render from django.http import HttpResponseRedirect # Forms to use in pages import forms # Dictionaries to pass to template context import dicts # Models to access our db's tables import models # Helper functions to make form processing easier import helpers ### User Actions ### def log...
{ "repo_name": "CCI-MOC/ui", "path": "sample_code/old-views-for-forms.py", "copies": "1", "size": "9186", "license": "apache-2.0", "hash": 8219266858913871000, "line_mean": 31.5744680851, "line_max": 131, "alpha_frac": 0.570433268, "autogenerated": false, "ratio": 4.536296296296296, "config_test...
from django.shortcuts import render from django.http import HttpResponseRedirect from django.conf import settings from tukey.webforms.forms import OSDCForm, OSDCInviteForm, OSDCSupportForm, PDCForm def build_message(form, is_invite=False, is_pdc=False): msg_list = [] msg_list.append('From:\n') msg_list.app...
{ "repo_name": "occ-data/tukey-portal", "path": "tukey/webforms/views.py", "copies": "2", "size": "7427", "license": "apache-2.0", "hash": 7213528163495761000, "line_mean": 44.5644171779, "line_max": 250, "alpha_frac": 0.5335936448, "autogenerated": false, "ratio": 4.394674556213018, "config_tes...
from django.shortcuts import render from django.http import HttpResponseRedirect from django.conf import settings from forms import ContactForm from django.core.mail import send_mail def contact(request): if request.method == 'POST': # If the form has been submitted... form = ContactForm(request.POST) ...
{ "repo_name": "mpampols/directoalartista.com", "path": "directoalartista/apps/contact/views.py", "copies": "1", "size": "1538", "license": "mit", "hash": -1432590566508374500, "line_mean": 34.7674418605, "line_max": 73, "alpha_frac": 0.5871261378, "autogenerated": false, "ratio": 4.34463276836158...
from django.shortcuts import render from django.http import HttpResponseRedirect from django.contrib.admin.views.decorators import staff_member_required try: from django.urls import reverse except ImportError: from django.core.urlresolvers import reverse from .utils import ( get_blocked_ips, get_blocked_us...
{ "repo_name": "kencochrane/django-defender", "path": "defender/views.py", "copies": "1", "size": "1200", "license": "apache-2.0", "hash": -5224233312382810000, "line_mean": 31.4324324324, "line_max": 73, "alpha_frac": 0.7233333333, "autogenerated": false, "ratio": 3.883495145631068, "config_tes...
from django.shortcuts import render from django.http import HttpResponseRedirect from django.contrib.auth.decorators import login_required from django.contrib.auth import views as auth_views from django.contrib.auth import logout from django.views.decorators.csrf import csrf_protect from django.shortcuts import render_...
{ "repo_name": "Ignoramuss/LDERP", "path": "LDERPdjango/login/views.py", "copies": "1", "size": "8998", "license": "apache-2.0", "hash": -1995132010349618200, "line_mean": 38.814159292, "line_max": 110, "alpha_frac": 0.6353634141, "autogenerated": false, "ratio": 4.101185050136737, "config_test"...
from django.shortcuts import render from django.http import HttpResponseRedirect from django.contrib.auth.decorators import login_required from django.views.generic import DetailView from .forms import RegistrationForm from .models import Location # Create your views here. # this login required decorator is to not allo...
{ "repo_name": "kapucko/fit2gether", "path": "fit2gether_core/views.py", "copies": "1", "size": "1268", "license": "mit", "hash": -3300544606094131000, "line_mean": 34.2222222222, "line_max": 76, "alpha_frac": 0.6940063091, "autogenerated": false, "ratio": 4.32764505119454, "config_test": false,...