text
stringlengths
0
1.05M
meta
dict
from flask import render_template, redirect, url_for, request, flash, current_app from flask_login import login_required, login_user, logout_user, current_user from app.admin import admin from app.admin.forms import LoginForm, PostForm, CategoryForm from app.models import Admin, Post, Category from app import db from m...
{ "repo_name": "jasonqiao36/blog", "path": "app/admin/views.py", "copies": "1", "size": "3702", "license": "mit", "hash": 6941644202241340000, "line_mean": 29.0495867769, "line_max": 101, "alpha_frac": 0.652640264, "autogenerated": false, "ratio": 3.2148541114058355, "config_test": false, "has...
from flask import render_template, redirect, url_for, request, flash, Markup, current_app from itsdangerous import TimedJSONWebSignatureSerializer as Serializer from flask_login import login_user, login_required, logout_user, current_user from .forms import LoginForm, RegistrationForm, PasswordResetForm, PasswordResetR...
{ "repo_name": "tomaszzacharczuk/weather_app", "path": "app/auth/views.py", "copies": "1", "size": "7012", "license": "mit", "hash": -2571996325191267300, "line_mean": 37.7403314917, "line_max": 108, "alpha_frac": 0.6307758129, "autogenerated": false, "ratio": 4.002283105022831, "config_test": f...
from flask import render_template, redirect, url_for, request, flash from . import auth from .form import LoginForm from ..models import Teacher, Student,Permission from flask.ext.login import login_required, login_user, logout_user,session,current_user from .LoginAction import LoginAction import os logout_url = 'http...
{ "repo_name": "pvpnvz/internshipsystem", "path": "app/auth/views.py", "copies": "1", "size": "1273", "license": "mit", "hash": 33430227792179736, "line_mean": 29.1707317073, "line_max": 88, "alpha_frac": 0.6782538399, "autogenerated": false, "ratio": 3.204663212435233, "config_test": false, "...
from flask import render_template, redirect, url_for, request, flash, session from .. import main from . import get_template_data from app.user import User from app.main.forms import LoginForm from app import admin_api_client from flask_login import login_user, logout_user @main.route('/login', methods=['GET']) def ...
{ "repo_name": "alphagov/notify-frontend", "path": "app/main/views/login.py", "copies": "1", "size": "1462", "license": "mit", "hash": 1085226553965308900, "line_mean": 29.4583333333, "line_max": 99, "alpha_frac": 0.6073871409, "autogenerated": false, "ratio": 3.8779840848806364, "config_test": ...
from flask import render_template, redirect, url_for, request, jsonify from app import app, db, models from sqlalchemy import func from .forms import InputForm, CreateCatalog, EditCatalog, PhotoToGroups, CheckGroupName import flickrapi import webbrowser import re import celery api_key = u'' api_secret = u'' flickr = ...
{ "repo_name": "And-Sm/FHelper", "path": "app/views.py", "copies": "1", "size": "19121", "license": "mit", "hash": 6337203983357206000, "line_mean": 45.8651960784, "line_max": 209, "alpha_frac": 0.5663929711, "autogenerated": false, "ratio": 3.667242040659762, "config_test": false, "has_no_key...
from flask import render_template, redirect, url_for, request, session from flask.json import dumps from flask.ext.login import current_user from . import heatmap from .forms import SelectFiles from ..models import Bed from .models import Heatmap @heatmap.route('/', methods=['GET', 'POST']) def base(): # create ...
{ "repo_name": "MediciPrime/lcdb_website", "path": "app/heatmap/views.py", "copies": "1", "size": "1944", "license": "mit", "hash": -8359659021038979000, "line_mean": 37.88, "line_max": 107, "alpha_frac": 0.6692386831, "autogenerated": false, "ratio": 4.033195020746888, "config_test": false, "...
from flask import render_template, redirect, url_for, session, flash, abort from flask_wtf import FlaskForm from wtforms import RadioField, SubmitField, FormField, BooleanField from wtforms.fields.html5 import IntegerRangeField from wtforms.validators import DataRequired from app.main.forms import SoftwareSubmitForm fr...
{ "repo_name": "softwaresaved/software-assessment-framework", "path": "app/views.py", "copies": "1", "size": "24436", "license": "bsd-3-clause", "hash": 85673324591320060, "line_mean": 45.9040307102, "line_max": 223, "alpha_frac": 0.6332460304, "autogenerated": false, "ratio": 4.278011204481793, ...
from flask import render_template, redirect, url_for, session, flash from .. import main from . import get_template_data from flask_login import login_required from app.main.forms import ServiceForm from app import admin_api_client from notify_client.errors import APIError @main.route('/create-service', methods=['GE...
{ "repo_name": "alphagov/notify-frontend", "path": "app/main/views/create_service.py", "copies": "1", "size": "1032", "license": "mit", "hash": 7276008476368640000, "line_mean": 30.2727272727, "line_max": 87, "alpha_frac": 0.6608527132, "autogenerated": false, "ratio": 3.8943396226415095, "confi...
from flask import render_template, redirect, url_for, session, flash from .. import main from . import get_template_data from flask_login import login_required from app.main.forms import SmsForm from app import admin_api_client from notify_client.errors import APIError @main.route('/service/<int:service_id>/send-sms...
{ "repo_name": "alphagov/notify-frontend", "path": "app/main/views/send_sms.py", "copies": "1", "size": "1699", "license": "mit", "hash": 1250027358937771000, "line_mean": 38.511627907, "line_max": 110, "alpha_frac": 0.6150676869, "autogenerated": false, "ratio": 3.750551876379691, "config_test"...
from flask import (render_template, redirect, url_for, session) from flask_login import login_required, current_user from app.main import main from app import service_api_client from app.notify_client.service_api_client import ServicesBrowsableItem from app.utils import is_gov_user @main.route("/services") @login_req...
{ "repo_name": "gov-cjwaszczuk/notifications-admin", "path": "app/main/views/choose_service.py", "copies": "1", "size": "1258", "license": "mit", "hash": 2112821813324161500, "line_mean": 36, "line_max": 96, "alpha_frac": 0.6828298887, "autogenerated": false, "ratio": 3.6358381502890174, "config...
from flask import render_template, redirect, url_for, session, request as flask_request, jsonify, current_app, flash from flask_login import login_required, current_user from app.models import Users, Posts, EventPosts, Documents from . import main from app.main.forms import MeetingNotesForm, NewsForm, EventForm, StaffD...
{ "repo_name": "nycrecords/intranet", "path": "app/main/views.py", "copies": "1", "size": "34538", "license": "mit", "hash": 2646563806173772300, "line_mean": 42.3362609787, "line_max": 170, "alpha_frac": 0.6256007875, "autogenerated": false, "ratio": 4.187439379243453, "config_test": false, "...
from flask import render_template, redirect, url_for, session, request, flash from lcbru_events import app, db from lcbru_events.forms.genvasc_collaborators import PracticeForm, DelegateEditForm, DelegateDeleteForm from lcbru_events.model.genvasc_collaborators import Practice, Delegate, Meeting import time @app.route(...
{ "repo_name": "rabramley/lcbru-events", "path": "lcbru_events/views/genvasc_collaborators.py", "copies": "1", "size": "4602", "license": "mit", "hash": -6247651837344453000, "line_mean": 39.7345132743, "line_max": 122, "alpha_frac": 0.7151238592, "autogenerated": false, "ratio": 3.266146202980837...
from flask import render_template, redirect, url_for, session, request from flask.ext.classy import FlaskView from flask.ext.login import logout_user from flask_wtf import Form from wtforms import StringField, PasswordField from wtforms.validators import DataRequired, EqualTo from apps import db from apps.admin import ...
{ "repo_name": "tuanquanghpvn/flask-intro", "path": "apps/admin/views/dashboard.py", "copies": "1", "size": "4625", "license": "mit", "hash": -4873738967138919000, "line_mean": 27.5555555556, "line_max": 120, "alpha_frac": 0.5876756757, "autogenerated": false, "ratio": 4.30633147113594, "config_...
from flask import render_template, redirect, __version__, request from app import app from app import db, models @app.route('/') @app.route('/index') @app.route('/home') @app.route('/note') def index(): # this view will render the notes list notes = models.Note.query.all() return render_template('home.html', ...
{ "repo_name": "pedrozok/qnotes", "path": "app/views.py", "copies": "1", "size": "1413", "license": "mit", "hash": 7768799756445634000, "line_mean": 27.26, "line_max": 105, "alpha_frac": 0.6348195329, "autogenerated": false, "ratio": 3.6138107416879794, "config_test": false, "has_no_keywords":...
from flask import render_template, render_template_string, flash, request from flask import redirect, url_for from itertools import groupby from . import app, rankingint, keygenerator, quotes from .database import session, Entry, followers, User, PWReset from flask.ext.login import login_user, logout_user, login_requir...
{ "repo_name": "j10sanders/crossword", "path": "crossword/views.py", "copies": "1", "size": "27939", "license": "mit", "hash": 9015209227835576000, "line_mean": 39.6695778748, "line_max": 133, "alpha_frac": 0.5694906761, "autogenerated": false, "ratio": 3.9075524475524475, "config_test": false, ...
from flask import render_template, request, abort, flash, g, redirect, url_for,jsonify, Flask from config import * import requests import smtplib from email.mime.text import MIMEText #Default Loader for Views, This class allows the interpretation of the different URL app = Flask(__name__) @app.route('/') @app.route('...
{ "repo_name": "marcolivierarsenault/AlarmSystemMonitoring", "path": "views.py", "copies": "1", "size": "1081", "license": "mit", "hash": -6796564964830170000, "line_mean": 30.8235294118, "line_max": 93, "alpha_frac": 0.6660499537, "autogenerated": false, "ratio": 3.2658610271903323, "config_tes...
from flask import render_template, request, abort, flash from flask_login import login_required, current_user from dmutils.apiclient import APIError from dmutils import flask_featureflags from ...main import main from ... import data_api_client from ..forms.frameworks import G7SelectionQuestions @main.route('/frame...
{ "repo_name": "mtekel/digitalmarketplace-supplier-frontend", "path": "app/main/views/frameworks.py", "copies": "1", "size": "2645", "license": "mit", "hash": -5143501642353171000, "line_mean": 29.7558139535, "line_max": 76, "alpha_frac": 0.6241965974, "autogenerated": false, "ratio": 3.8669590643...
from flask import render_template, request, abort, flash, redirect, url_for from uchan.lib import roles from uchan.lib.exceptions import BadRequestError, ArgumentError from uchan.lib.moderator_request import request_moderator from uchan.lib.service import board_service, moderator_service, report_service from uchan.lib...
{ "repo_name": "Floens/uchan", "path": "uchan/view/mod/mod_report.py", "copies": "1", "size": "3203", "license": "mit", "hash": 2664250723669580300, "line_mean": 31.3535353535, "line_max": 101, "alpha_frac": 0.6668748049, "autogenerated": false, "ratio": 3.6110484780157837, "config_test": false,...
from flask import render_template, request, abort, g, Blueprint from app import app, babel import requests from .forms import SearchForm import datetime import json import time import keen bp = Blueprint('frontend', __name__, url_prefix='/<lang_code>') keen.project_id = app.config['KEEN_PROJECT_ID'] keen.write_key = a...
{ "repo_name": "abonte/southtyrolean-healthservices-waitingtimes", "path": "app/views.py", "copies": "1", "size": "5863", "license": "mit", "hash": -115418652638797260, "line_mean": 32.1299435028, "line_max": 127, "alpha_frac": 0.6234009893, "autogenerated": false, "ratio": 3.6529595015576324, "...
from flask import render_template, request, abort from flask_login import login_required from tantalus.appfactory.auth import ensure_user_admin, new_user, update_password from tantalus_db.base import db from tantalus_db.encode import jsonify from tantalus_db.models import User, Relation from tantalus_db.paginator imp...
{ "repo_name": "thijsmie/tantalus", "path": "src/tantalus/web/user.py", "copies": "1", "size": "2835", "license": "mit", "hash": 2744394471405128000, "line_mean": 33.5731707317, "line_max": 120, "alpha_frac": 0.6444444444, "autogenerated": false, "ratio": 3.696219035202086, "config_test": false,...
from flask import render_template, request, abort from flask_login import login_required from tantalus.appfactory.auth import ensure_user_admin from tantalus_db.base import db from tantalus_db.encode import jsonify from tantalus_db.models import Relation from tantalus_db.paginator import Paginator from tantalus_db.ut...
{ "repo_name": "thijsmie/tantalus", "path": "src/tantalus/web/relation.py", "copies": "1", "size": "1856", "license": "mit", "hash": -5040558071838951000, "line_mean": 26.7164179104, "line_max": 76, "alpha_frac": 0.7009698276, "autogenerated": false, "ratio": 3.5623800383877158, "config_test": f...
from flask import render_template, request, abort from flask_login import login_required from tantalus_db.encode import jsonify from tantalus_db.models import Product, Group, BtwType from tantalus_db.paginator import Paginator from tantalus_db.utility import get_or_none from tantalus.appfactory.auth import ensure_use...
{ "repo_name": "thijsmie/tantalus", "path": "src/tantalus/web/product.py", "copies": "1", "size": "2760", "license": "mit", "hash": 920368703290787200, "line_mean": 28.6774193548, "line_max": 114, "alpha_frac": 0.6884057971, "autogenerated": false, "ratio": 3.565891472868217, "config_test": fals...
from flask import render_template, request, abort, redirect, url_for from datetime import datetime from nayami.common.app import app from nayami.common.auth import user_auth from nayami.model.post import Post @app.route('/', methods=['GET']) def index_page(): return render_template('index.html') @app.route('/p...
{ "repo_name": "Coderhypo/namiya", "path": "nayami/route/post.py", "copies": "1", "size": "3039", "license": "apache-2.0", "hash": 8542458815825398000, "line_mean": 32.3956043956, "line_max": 92, "alpha_frac": 0.6363935505, "autogenerated": false, "ratio": 3.3804226918798665, "config_test": fals...
from flask import render_template, request, abort, redirect, url_for from flask_login import login_required from flask_weasyprint import HTML, render_pdf from tantalus_db.base import db from tantalus_db.encode import jsonify from tantalus_db.models import Transaction, Product, Relation from tantalus_db.paginator impor...
{ "repo_name": "thijsmie/tantalus", "path": "src/tantalus/web/transaction.py", "copies": "1", "size": "5668", "license": "mit", "hash": -5085383690737421000, "line_mean": 32.9401197605, "line_max": 135, "alpha_frac": 0.710303458, "autogenerated": false, "ratio": 3.9306518723994452, "config_test"...
from flask import render_template, request, abort, session from webViews.dockletrequest import dockletRequest import os, inspect this_folder = os.path.realpath(os.path.abspath(os.path.split(inspect.getfile(inspect.currentframe()))[0])) version_file = open(this_folder + '/../../VERSION') version = version_file.read() ...
{ "repo_name": "FirmlyReality/docklet", "path": "web/webViews/view.py", "copies": "4", "size": "1192", "license": "bsd-3-clause", "hash": -3636235999129459700, "line_mean": 27.380952381, "line_max": 106, "alpha_frac": 0.6317114094, "autogenerated": false, "ratio": 3.8451612903225807, "config_tes...
from flask import render_template, request, Blueprint, jsonify, json, flash, redirect, url_for, session, send_from_directory from flask import g, session from werkzeug import abort from app import app, db from app import login_manager, facebook from app.cache import cache from flask_login import current_user, login_use...
{ "repo_name": "paleomedia/idleg_flask", "path": "app/idleg/views.py", "copies": "1", "size": "11805", "license": "mit", "hash": 3515124940575352000, "line_mean": 33.926035503, "line_max": 176, "alpha_frac": 0.6862346463, "autogenerated": false, "ratio": 3.2466996699669965, "config_test": false,...
from flask import render_template, request, Blueprint from flask.ext.socketio import emit from messenger import Messenger from app import db, models, socketio # Abstraction required to create an application factory. chat = Blueprint('chat', __name__) @chat.route('/') def index(): ''' Homepage of website that...
{ "repo_name": "jawrainey/healthchat", "path": "app/views.py", "copies": "1", "size": "3473", "license": "mit", "hash": -1062371279274708200, "line_mean": 30.5727272727, "line_max": 80, "alpha_frac": 0.6533256551, "autogenerated": false, "ratio": 3.770901194353963, "config_test": false, "has_n...
from flask import render_template, request, Blueprint, redirect, flash, url_for from flask_login import current_user,login_required from papertalk import utils from papertalk.utils import disqus from papertalk.models.sites import Mendeley, SSRN, Arxiv, PubMed from papertalk.models import reactions, articles from papert...
{ "repo_name": "karissa/papertalk", "path": "papertalk/views/article.py", "copies": "1", "size": "3319", "license": "mit", "hash": -1406805881868623000, "line_mean": 25.9837398374, "line_max": 79, "alpha_frac": 0.6001807773, "autogenerated": false, "ratio": 3.7292134831460673, "config_test": fal...
from flask import render_template, request, Blueprint, redirect from flask_login import current_user from papertalk.models import reactions, articles from papertalk.forms import ReactionForm from papertalk.utils import disqus reaction_blueprint = Blueprint("reaction", __name__) @reaction_blueprint.route('/reaction/<...
{ "repo_name": "karissa/papertalk", "path": "papertalk/views/reaction.py", "copies": "1", "size": "1276", "license": "mit", "hash": -5190743792330564000, "line_mean": 35.4571428571, "line_max": 98, "alpha_frac": 0.6684952978, "autogenerated": false, "ratio": 3.914110429447853, "config_test": fal...
from flask import render_template, request, current_app, abort from flask_login import current_user from app.main import main # from app.utils.similarity import similarity from app.utils.searcher import query as searcher_query from app.models import Category, Tag, Article, Permission, AnonymousUser @main.app_context...
{ "repo_name": "mapan1984/Hidden-Island", "path": "app/main/views.py", "copies": "1", "size": "2599", "license": "mit", "hash": -670125096259458300, "line_mean": 23.3490566038, "line_max": 73, "alpha_frac": 0.6338628439, "autogenerated": false, "ratio": 3.812407680945347, "config_test": false, ...
from flask import render_template, request, current_app as app, abort, url_for, flash from flask_security import current_user, login_required from flask_wtf import Form from sqlalchemy.orm import joinedload from werkzeug.utils import redirect from wtforms import StringField from wtforms.validators import DataRequired ...
{ "repo_name": "DBeath/flask-feedrsub", "path": "feedrsub/authors/views.py", "copies": "1", "size": "6166", "license": "mit", "hash": -7887573288576665000, "line_mean": 28.7874396135, "line_max": 92, "alpha_frac": 0.6678559844, "autogenerated": false, "ratio": 3.5974329054842475, "config_test": ...
from flask import render_template, request, current_app, jsonify from werkzeug.utils import secure_filename from . import rest import json, uuid, os, subprocess, time #This URL (website.com/rest/debug) is used to test the website and provide debug output. It's really only a developer tool. @rest.route('/debug') def r...
{ "repo_name": "TheVindicators/Vis", "path": "app/rest/views.py", "copies": "1", "size": "5680", "license": "mit", "hash": -1463411946226106000, "line_mean": 62.1111111111, "line_max": 202, "alpha_frac": 0.6591549296, "autogenerated": false, "ratio": 3.8378378378378377, "config_test": true, "h...
from flask import render_template, request, current_app, render_template_string, session from flask import send_from_directory, redirect, url_for from aptlyweb import app, db from flask_security import login_required, login_user from flask_security import logout_user from flask_security import LoginForm from flask_secu...
{ "repo_name": "istarion/aptly-web", "path": "aptlyweb/views.py", "copies": "1", "size": "3071", "license": "apache-2.0", "hash": -6565640388049545000, "line_mean": 29.4059405941, "line_max": 88, "alpha_frac": 0.6727450342, "autogenerated": false, "ratio": 3.673444976076555, "config_test": false...
from flask import render_template, request, flash, redirect, url_for, current_app from ..models import User, OnlineInfo, Role from . import main from flask_login import login_required, current_user from .forms import EditProfileForm, EditProfileAdminForm, PostForm from ..models import db, Permission, Post from ..decora...
{ "repo_name": "gzxultra/FlaskLoginManagement", "path": "app/main/views.py", "copies": "1", "size": "3709", "license": "mit", "hash": -36436772075841150, "line_mean": 38.8817204301, "line_max": 81, "alpha_frac": 0.6610946347, "autogenerated": false, "ratio": 3.5766634522661525, "config_test": fa...
from flask import render_template, request, flash, redirect, url_for, g from app import app, db from models import Player, Tournament, Game from forms import CreateTournament, AddPlayers, RoundResults from datetime import date import sys import sqlite3 DATABASE = 'test.db' @app.route('/', methods=['GET', 'POST']) def...
{ "repo_name": "crdoconnor/chess_app", "path": "app/views.py", "copies": "1", "size": "4492", "license": "mit", "hash": -4675718538246199000, "line_mean": 35.2258064516, "line_max": 105, "alpha_frac": 0.6863312556, "autogenerated": false, "ratio": 3.281227173119065, "config_test": false, "has_...
from flask import render_template, request, flash, redirect, url_for, g from app import app, lm, db from .forms import LoginForm, UploadPostForm, SignUpForm, PostForm from .model import User, Post from flask_login import login_user, logout_user, current_user, login_required import markdown from sqlalchemy.exc import In...
{ "repo_name": "andersbogsnes/blog", "path": "app/views.py", "copies": "1", "size": "5634", "license": "mit", "hash": -8614197449164573000, "line_mean": 29.4594594595, "line_max": 89, "alpha_frac": 0.6366702165, "autogenerated": false, "ratio": 3.5977011494252875, "config_test": false, "has_no...
from flask import render_template, request, flash, redirect, url_for, make_response, session, g from wwag import app, database, forms from wwag.decorators import player_login_required from MySQLdb import IntegrityError @app.route("/games") def games(): games = database.execute("SELECT * FROM Game ORDER BY StarRating...
{ "repo_name": "zhoutong/wwag", "path": "wwag/views/games.py", "copies": "1", "size": "3029", "license": "mit", "hash": 210839374463618980, "line_mean": 58.3921568627, "line_max": 401, "alpha_frac": 0.7111257841, "autogenerated": false, "ratio": 3.380580357142857, "config_test": false, "has_no...
from flask import render_template, request, flash, redirect, url_for, make_response, session, g from wwag import app, database, forms from wwag.decorators import player_login_required, staff_login_required from MySQLdb import IntegrityError from datetime import datetime @app.route("/instance_runs") def instance_runs()...
{ "repo_name": "zhoutong/wwag", "path": "wwag/views/instance_runs.py", "copies": "1", "size": "8186", "license": "mit", "hash": 5490564875303620000, "line_mean": 66.652892562, "line_max": 288, "alpha_frac": 0.7470070853, "autogenerated": false, "ratio": 3.440941572089113, "config_test": false, ...
from flask import render_template, request, flash, redirect, url_for, make_response, session, g from wwag import app, database, forms from wwag.decorators import player_login_required, viewer_login_required from MySQLdb import IntegrityError from datetime import datetime @app.route("/videos") def videos(): videos = ...
{ "repo_name": "zhoutong/wwag", "path": "wwag/views/videos.py", "copies": "1", "size": "4665", "license": "mit", "hash": -2498983963866073000, "line_mean": 54.5357142857, "line_max": 303, "alpha_frac": 0.7093247588, "autogenerated": false, "ratio": 3.4100877192982457, "config_test": false, "ha...
from flask import render_template, request, flash, redirect, url_for, make_response, session, g from wwag import app, database, forms from wwag.decorators import staff_login_required from MySQLdb import OperationalError import hashlib @app.route("/viewers/new") def viewers_new(): form = forms.ViewerRegistrationForm(...
{ "repo_name": "zhoutong/wwag", "path": "wwag/views/viewers.py", "copies": "1", "size": "3433", "license": "mit", "hash": -8171184899941460000, "line_mean": 62.5740740741, "line_max": 286, "alpha_frac": 0.7235653947, "autogenerated": false, "ratio": 3.4057539682539684, "config_test": false, "h...
from flask import render_template, request, flash, redirect, url_for, make_response, session, g from wwag import app, database, forms from wwag.decorators import staff_login_required @app.route("/equipment") @staff_login_required def equipment(): equipment = database.execute("SELECT * FROM Equipment").fetchall() r...
{ "repo_name": "zhoutong/wwag", "path": "wwag/views/equipment.py", "copies": "1", "size": "2155", "license": "mit", "hash": -8134289353432204000, "line_mean": 50.3095238095, "line_max": 197, "alpha_frac": 0.735962877, "autogenerated": false, "ratio": 3.5154975530179446, "config_test": false, "...
from flask import render_template, request, flash, redirect, url_for, make_response, session, g from wwag import app, database, forms import hashlib from datetime import datetime @app.route("/users/login") def users_login(): login_form = forms.LoginForm() return render_template('users/login.html', login_form=login...
{ "repo_name": "zhoutong/wwag", "path": "wwag/views/users.py", "copies": "1", "size": "4747", "license": "mit", "hash": 8536724899256451000, "line_mean": 61.4605263158, "line_max": 431, "alpha_frac": 0.7105540341, "autogenerated": false, "ratio": 3.590771558245083, "config_test": false, "has_n...
from flask import render_template, request, flash, redirect, url_for, make_response, session, g from wwag import app, database from datetime import datetime @app.before_request def before_request(): if '/static/' in request.path: return if session.get('user_type') == "Player": player = database.execute("SE...
{ "repo_name": "zhoutong/wwag", "path": "wwag/views/__init__.py", "copies": "1", "size": "2184", "license": "mit", "hash": 14296300924726804, "line_mean": 44.5, "line_max": 248, "alpha_frac": 0.7078754579, "autogenerated": false, "ratio": 3.4502369668246446, "config_test": false, "has_no_keywo...
from flask import render_template, request, flash, redirect, url_for from flask.ext.login import login_user, logout_user, current_user, login_required from fimiwal import app, db, models, login_manager, bcrypt, q from .forms import SettingsPass, SettingsGeneral, AddClient from .client import ClientClass from .scan impo...
{ "repo_name": "thatarchguy/Fimiwal", "path": "fimiwal/views.py", "copies": "1", "size": "7744", "license": "mit", "hash": 404325942761450750, "line_mean": 30.1004016064, "line_max": 81, "alpha_frac": 0.6288739669, "autogenerated": false, "ratio": 3.8260869565217392, "config_test": false, "has...
from flask import render_template, request, flash, redirect, url_for from flask.ext.login import login_user, logout_user from app import app from app import login_manager from forms import LoginForm @app.route('/') def homepage(): name = request.args.get('name') number = request.args.get('number') return ...
{ "repo_name": "garwon/blog", "path": "views.py", "copies": "1", "size": "1027", "license": "mit", "hash": -9041776020990762000, "line_mean": 33.2333333333, "line_max": 79, "alpha_frac": 0.6611489776, "autogenerated": false, "ratio": 3.694244604316547, "config_test": false, "has_no_keywords": ...
from flask import render_template, request, flash, redirect, url_for from hellodb import app, db from hellodb.models import Member from hellodb.form import MemberForm @app.route('/') def home(): members = Member.query.limit(10).all() return render_template('home.html', members=members) @app.route('/add', me...
{ "repo_name": "somat/python-unas", "path": "projects/hellodb/hellodb/views.py", "copies": "1", "size": "1638", "license": "mit", "hash": 5133033181340997000, "line_mean": 30.5, "line_max": 68, "alpha_frac": 0.6459096459, "autogenerated": false, "ratio": 3.5, "config_test": false, "has_no_keyw...
from flask import render_template, request, flash, redirect, url_for from . import estimation from .models import Question, Estimate from .forms import EstimateForm from flask.ext.login import login_required, current_user import random from .. import db def create_fake_question(): fake_question = Question(text='Ho...
{ "repo_name": "rahimnathwani/measure-anything", "path": "project/estimation/views.py", "copies": "1", "size": "1918", "license": "mit", "hash": -4095854443102348300, "line_mean": 41.6444444444, "line_max": 180, "alpha_frac": 0.7122002086, "autogenerated": false, "ratio": 3.7027027027027026, "co...
from flask import render_template, request, flash, redirect, url_for,\ jsonify, session, abort, current_app from . import models from .extensions import db from . import forms from .extensions import data_files from .forms import RoleForm from .forms import DimensionForm from .forms import VariableForm from .fo...
{ "repo_name": "msscully/datamart", "path": "datamart/views.py", "copies": "1", "size": "24688", "license": "mit", "hash": -4742820581028338000, "line_mean": 41.0579216354, "line_max": 154, "alpha_frac": 0.5692239145, "autogenerated": false, "ratio": 4.085388052291908, "config_test": false, "h...
from flask import render_template, request, flash, redirect, url_for, send_file from sqlalchemy import or_ from werkzeug.utils import secure_filename import re import os from time import time from PIL import Image from pyfsw import app, db, cache from pyfsw import CACHE_TIME, UPLOAD_PATH from pyfsw import filter_rank...
{ "repo_name": "diath/pyfsw", "path": "pyfsw/views/community_guilds.py", "copies": "1", "size": "15597", "license": "mit", "hash": -3450649113269398000, "line_mean": 31.0925925926, "line_max": 152, "alpha_frac": 0.7071872796, "autogenerated": false, "ratio": 3.0203330751355537, "config_test": fa...
from flask import render_template, request, flash, redirect, url_for, session from flask_mysqldb import MySQL from passlib.hash import sha256_crypt from app.forms import RegistrationForm, TaskForm from app.access_control import login_required, for_guests from app import app # MySQL connection. mysql = MySQL(app) # Ro...
{ "repo_name": "alchermd/flask-todo-app", "path": "app/views.py", "copies": "1", "size": "5776", "license": "mit", "hash": 4028761848736278500, "line_mean": 33.8012048193, "line_max": 132, "alpha_frac": 0.6069944598, "autogenerated": false, "ratio": 4.323353293413174, "config_test": false, "ha...
from flask import render_template, request, flash, url_for from wtforms import PasswordField, SubmitField from wtforms import ValidationError from wtforms.validators import Length, DataRequired from uchan.lib import validation from uchan.lib.exceptions import ArgumentError from uchan.lib.mod_log import mod_log from uc...
{ "repo_name": "Floens/uchan", "path": "uchan/view/mod/mod_self.py", "copies": "1", "size": "1773", "license": "mit", "hash": 1109724194542342700, "line_mean": 39.2954545455, "line_max": 107, "alpha_frac": 0.728144388, "autogenerated": false, "ratio": 3.966442953020134, "config_test": false, "...
from flask import render_template, request, Flask #from app import app import pymysql as mdb import pandas as pd import sys, re import program_rankings as rank import numpy as np import copy app = Flask(__name__) @app.route('/contact') def contact(): """Page with contact information.""" return render_template...
{ "repo_name": "kdsimmons/CharityChooser", "path": "views.py", "copies": "1", "size": "8912", "license": "apache-2.0", "hash": -3137475180570534000, "line_mean": 40.4511627907, "line_max": 172, "alpha_frac": 0.5773114901, "autogenerated": false, "ratio": 3.7461118116855823, "config_test": false,...
from flask import render_template, request, jsonify, Blueprint from .models import Recipe, Category from .schemas import RecipeSchema, PaginationSchema recipes = Blueprint("recipes", __name__) DEFAULT_PER_PAGE = 10 MAX_PER_PAGE = 1000 @recipes.route('/api/v1/<int:id>') def api_get_recipe(id): recipe = Recipe.q...
{ "repo_name": "spk/flask-recipes", "path": "app/views.py", "copies": "1", "size": "2282", "license": "mit", "hash": 6243370281415676000, "line_mean": 28.2564102564, "line_max": 73, "alpha_frac": 0.671340929, "autogenerated": false, "ratio": 3.3608247422680413, "config_test": false, "has_no_ke...
from flask import render_template, request, jsonify, current_app from flask_login import current_user from . import main @main.app_errorhandler(403) def forbidden(e): current_app.logger.warning('Unauthorized access attempt (%s) at route %s (%s).', current_user.get_id() or 'guest', request.path, request.me...
{ "repo_name": "Limpan/bytardag", "path": "web/app/main/errors.py", "copies": "1", "size": "1337", "license": "mit", "hash": 5640074732498032000, "line_mean": 38.3235294118, "line_max": 89, "alpha_frac": 0.7000747943, "autogenerated": false, "ratio": 3.7875354107648724, "config_test": false, "...
from flask import render_template, request, jsonify, json, send_file from jinja2.filters import FILTERS from maraschino.tools import get_setting_value, requires_auth from maraschino import logger, app, WEBROOT import urllib2 import StringIO import base64 import re def couchpotato_http(): if get_setting_value('cou...
{ "repo_name": "awagnon/maraschino", "path": "modules/couchpotato.py", "copies": "3", "size": "14369", "license": "mit", "hash": 3826648899988406000, "line_mean": 29.3143459916, "line_max": 138, "alpha_frac": 0.596492449, "autogenerated": false, "ratio": 3.660891719745223, "config_test": false, ...
from flask import render_template, request, jsonify from app import app from app.modules.login import Login from app.modules.benchkit import BenchKit @app.route('/') @app.route('/index') def index(): return render_template('index.html') @app.route('/login/') def login(): return render_template('login.html...
{ "repo_name": "k33k00/tesseract_infinity", "path": "t_infinity.old/app/views.py", "copies": "1", "size": "1774", "license": "mit", "hash": -5705601396781034000, "line_mean": 25.1029411765, "line_max": 75, "alpha_frac": 0.6612175874, "autogenerated": false, "ratio": 3.8068669527896994, "config_t...
from flask import render_template, request, jsonify from app import app from app.watson import analyze_tone, get_sentiments, speech_text from app.wav_combine import combine_waves, read_wav from app.playlists import play_song from app.mood_analysis import get_max_emotion import json @app.route('/') @app.route('/index'...
{ "repo_name": "wylliec/Muzify", "path": "app/views.py", "copies": "1", "size": "1968", "license": "mit", "hash": 2224262735396286000, "line_mean": 29.75, "line_max": 65, "alpha_frac": 0.6478658537, "autogenerated": false, "ratio": 2.9908814589665655, "config_test": false, "has_no_keywords": f...
from flask import render_template, request, jsonify from app import app from random import choice import MySQLdb @app.route('/') @app.route('/index') def index(): return render_template("index.html", title = 'Home') @app.route('/get') def get(): cnxn = MySQLdb.connect(host = "localhost", user = "root...
{ "repo_name": "Luvinahlc/ProjectTimeline", "path": "app/views.py", "copies": "1", "size": "4261", "license": "bsd-3-clause", "hash": 1394992335498003000, "line_mean": 29.4428571429, "line_max": 129, "alpha_frac": 0.5545646562, "autogenerated": false, "ratio": 3.240304182509506, "config_test": f...
from flask import render_template, request, jsonify from application.mongo_db import mongo from . import module from .setup import setup from bson.objectid import ObjectId @module.route('/', methods=("GET", "POST")) def index(): kwargs = {"dependencies": setup()} return render_template("component_groups/com...
{ "repo_name": "megrela/flask-cms-control-panel", "path": "application/modules/component_groups/router.py", "copies": "1", "size": "1195", "license": "mit", "hash": 597956282580286300, "line_mean": 23.387755102, "line_max": 78, "alpha_frac": 0.579916318, "autogenerated": false, "ratio": 3.66564417...
from flask import render_template, request, jsonify from flask.ext.login import current_user, login_required from .views import frontend from ybk.log import serve_log as log from ybk.models import Quote, Collection, Position @frontend.route('/trade/') @login_required def trade(): nav = 'trade' exchange = re...
{ "repo_name": "yxdong/ybk", "path": "ybk/frontend/trade.py", "copies": "1", "size": "7489", "license": "mit", "hash": -6333543450458179000, "line_mean": 27.9921568627, "line_max": 77, "alpha_frac": 0.4406871365, "autogenerated": false, "ratio": 3.6781094527363183, "config_test": false, "has_n...
from flask import render_template, request, jsonify from flask.ext.login import login_required from ybk.models import Collection, Quote from ybk.utils import Pagination from .views import frontend @frontend.route('/collection/') @login_required def collection(): nav = 'collection' search = request.args.get...
{ "repo_name": "yxdong/ybk", "path": "ybk/frontend/collection.py", "copies": "1", "size": "3563", "license": "mit", "hash": -6135124759173935000, "line_mean": 30.2543859649, "line_max": 66, "alpha_frac": 0.529329217, "autogenerated": false, "ratio": 3.6357142857142857, "config_test": false, "h...
from flask import render_template, request, jsonify from flask.ext.socketio import SocketIO, emit from sqlalchemy import text from IPy import IP from index import app, db socketio = SocketIO(app) # set postgres like this: export DATABASE_URL='postgresql://pat:[password]@localhost/ip_coordinates' @socketio.on('clien...
{ "repo_name": "pfarnach/pulse", "path": "application/app.py", "copies": "1", "size": "1740", "license": "mit", "hash": -2877411337799383000, "line_mean": 31.2222222222, "line_max": 122, "alpha_frac": 0.7057471264, "autogenerated": false, "ratio": 3.372093023255814, "config_test": false, "has_...
from flask import render_template, request, jsonify from flask import Flask, flash, redirect, url_for from passlib.hash import pbkdf2_sha256 from flask.ext.pymongo import PyMongo import datetime from flask import Flask, redirect, url_for, session, request, jsonify from flask_oauthlib.client import OAuth app = Flask(...
{ "repo_name": "PaulAYoung/f2014_iolab", "path": "pymongoProject/iolabpymongo/app.py", "copies": "1", "size": "3170", "license": "unlicense", "hash": -3576664544370983400, "line_mean": 28.6261682243, "line_max": 100, "alpha_frac": 0.6848580442, "autogenerated": false, "ratio": 3.3158995815899583, ...
from flask import render_template, request, jsonify #from flask import redirect, url_for, send_from_directory from app import app import sqlite3 import json import os # ROUTING/VIEW FUNCTIONS @app.route('/') @app.route('/index') def index(): return render_template('index.html') @app.route('/_read_db', methods=['GET...
{ "repo_name": "vgm64/worklunch", "path": "worklunch/app/views.py", "copies": "1", "size": "1410", "license": "mit", "hash": -5114718674070700000, "line_mean": 26.1153846154, "line_max": 66, "alpha_frac": 0.6758865248, "autogenerated": false, "ratio": 3.2714617169373548, "config_test": false, ...
from flask import render_template, request, jsonify from flask_login import login_required, current_user from blueprints.account.models import User from dm import db from . import bp from .models import Note @bp.route('/list', methods=['GET']) @login_required def note_list(): t = request.args.get('s-type') t...
{ "repo_name": "justin-sh/amber-and-justin", "path": "blueprints/note/views.py", "copies": "1", "size": "2032", "license": "apache-2.0", "hash": -5137207247350194000, "line_mean": 27.2222222222, "line_max": 96, "alpha_frac": 0.5708661417, "autogenerated": false, "ratio": 3.3256955810147297, "con...
from flask import render_template, request, jsonify from . import groups @groups.app_errorhandler(403) def forbidden(e): if request.accept_mimetypes.accept_json and \ not request.accept_mimetypes.accept_html: response = jsonify({'error': 'forbidden'}) response.status_code = 403 ...
{ "repo_name": "fabiansinz/labloid", "path": "app/groups/errors.py", "copies": "1", "size": "1026", "license": "mit", "hash": 4228735750746324000, "line_mean": 31.0625, "line_max": 62, "alpha_frac": 0.6725146199, "autogenerated": false, "ratio": 3.9767441860465116, "config_test": false, "has_n...
from flask import render_template, request, jsonify from . import main_bp @main_bp.app_errorhandler(403) def forbidden(e): if request.accept_mimetypes.accept_json and \ not request.accept_mimetypes.accept_html: response = jsonify({'error': 'forbidden'}) response.status_code = 403 ...
{ "repo_name": "AlvinCJin/RealEstateApp", "path": "app/main/errors.py", "copies": "1", "size": "1030", "license": "bsd-3-clause", "hash": -7695158444002823000, "line_mean": 31.1875, "line_max": 62, "alpha_frac": 0.6699029126, "autogenerated": false, "ratio": 3.8721804511278197, "config_test": fa...
from flask import render_template, request, jsonify from . import main #FIXME - UTC @main.app_errorhandler(403) def forbidden(e): if request.accept_mimetypes.accept_json and \ not request.accept_mimetypes.accept_html: response = jsonify({'error': 'forbidden'}) response.status_code = 403...
{ "repo_name": "dj80hd/konsole", "path": "app/main/errors.py", "copies": "1", "size": "1030", "license": "mit", "hash": 3849201670755202600, "line_mean": 31.1875, "line_max": 62, "alpha_frac": 0.6699029126, "autogenerated": false, "ratio": 3.9163498098859315, "config_test": false, "has_no_keyw...
from flask import render_template, request, jsonify from . import main @main.app_errorhandler(403) def forbidden(e): if request.accept_mimetypes.accept_json and \ not request.accept_mimetypes.accept_html: response = jsonify({'error': 'forbidden'}) response.status_code = 403 ret...
{ "repo_name": "michaelgichia/Twezana", "path": "app/main/errors.py", "copies": "1", "size": "1041", "license": "mit", "hash": -214825571702337020, "line_mean": 31.5625, "line_max": 62, "alpha_frac": 0.6724303554, "autogenerated": false, "ratio": 3.958174904942966, "config_test": false, "has_n...
from flask import render_template, request, jsonify from . import main @main.app_errorhandler(403) def forbidden(e=None): if request.accept_mimetypes.accept_json and \ not request.accept_mimetypes.accept_html: response = jsonify({'error': 'forbidden'}) response.status_code = 403 ...
{ "repo_name": "conferency/find-my-reviewers", "path": "app/modules/main/errors.py", "copies": "1", "size": "1051", "license": "mit", "hash": -2326282611541396500, "line_mean": 31.84375, "line_max": 62, "alpha_frac": 0.6745956232, "autogenerated": false, "ratio": 3.8925925925925924, "config_test...
from flask import render_template, request, jsonify from . import main @main.app_errorhandler(403) def forbidden(e): # provide json if needed if request.accept_mimetypes.accept_json and \ not request.accept_mimetypes.accept_html: response = jsonify({'error': 'forbidden'}) response.st...
{ "repo_name": "Zhaoyanzhang/-myflasky", "path": "app/main/errors.py", "copies": "1", "size": "1045", "license": "mit", "hash": -7665336374804898000, "line_mean": 30.6666666667, "line_max": 62, "alpha_frac": 0.6708133971, "autogenerated": false, "ratio": 3.943396226415094, "config_test": false, ...
from flask import render_template, request, jsonify from operator import attrgetter from serve import * from models import * from app import db @app.route('/') @app.route('/index.html') def index(): datasets = Dataset.query.all() return render_template('index.html', datasets=datasets) @app.route('/dataset/...
{ "repo_name": "omtcyf0/VisARTM", "path": "views.py", "copies": "1", "size": "7642", "license": "apache-2.0", "hash": -4723321668056383000, "line_mean": 46.7625, "line_max": 122, "alpha_frac": 0.61083486, "autogenerated": false, "ratio": 3.821, "config_test": false, "has_no_keywords": false, ...
from flask import render_template, request, jsonify import requests import math from app import app import json @app.route('/') @app.route('/index') def index(): return render_template("index.html") @app.route('/tfidf', methods = ['POST']) def retrieve_document(): url = 'http://api.icndb.com/jokes/random/10...
{ "repo_name": "vianuevm/findingnorris", "path": "app/views.py", "copies": "1", "size": "3449", "license": "mit", "hash": -2098871426212213500, "line_mean": 28.2288135593, "line_max": 89, "alpha_frac": 0.6187300667, "autogenerated": false, "ratio": 3.6077405857740588, "config_test": false, "ha...
from flask import render_template, request, jsonify import web.util.tools as tools import lib.http as http import lib.es as es import urllib2 def get(p): host = p['c']['host']; index = p['c']['index']; # search keyword p["q"] = tools.get('q', '*') p["fq"] = tools.get('fq', '*') # load field ...
{ "repo_name": "unkyulee/elastic-cms", "path": "src/web/modules/post/controllers/filter/control.py", "copies": "1", "size": "1807", "license": "mit", "hash": 2556572284251525600, "line_mean": 30.701754386, "line_max": 75, "alpha_frac": 0.5561704483, "autogenerated": false, "ratio": 3.5362035225048...
from flask import render_template, request, jsonify from app.main import main @main.app_errorhandler(404) def page_not_found(error): if (request.accept_mimetypes.accept_json and not request.accept_mimetypes.accept_html): response = jsonify({'error': 'not found'}) response.status_code ...
{ "repo_name": "mapan1984/Hidden-Island", "path": "app/main/errors.py", "copies": "1", "size": "1061", "license": "mit", "hash": -2957327389480404500, "line_mean": 30.2058823529, "line_max": 62, "alpha_frac": 0.6786050895, "autogenerated": false, "ratio": 3.9442379182156135, "config_test": false...
from flask import render_template, request, jsonify, redirect, url_for from functools import wraps from werkzeug.exceptions import Forbidden PERM_ERROR_MESSAGE = 'You do not have permission to access this page or perform this action.' def import_user(): try: from flask_login import current_user r...
{ "repo_name": "smeggingsmegger/impression", "path": "impression/decorators.py", "copies": "1", "size": "3132", "license": "bsd-3-clause", "hash": 1093058182432128300, "line_mean": 33.0434782609, "line_max": 105, "alpha_frac": 0.5482120051, "autogenerated": false, "ratio": 4.848297213622291, "co...
from flask import render_template, request, jsonify, Response, abort import json from sqlalchemy.exc import IntegrityError from shuttl import csrf from shuttl.misc import shuttlOrgs from shuttl.MiddleWare.OrganizationMiddleware import subdomain_login_required, organization_required from shuttl.Models.Website import We...
{ "repo_name": "shuttl-io/shuttl", "path": "shuttl/Views/website.py", "copies": "1", "size": "4506", "license": "mit", "hash": -2660705167198698500, "line_mean": 34.4803149606, "line_max": 115, "alpha_frac": 0.6806480249, "autogenerated": false, "ratio": 3.9250871080139373, "config_test": false,...
from flask import render_template, request, jsonify, Response, abort import json from sqlalchemy.exc import IntegrityError from shuttl import csrf from shuttl.misc import shuttlOrgs from shuttl.MiddleWare.OrganizationMiddleware import subdomain_login_required, organization_required from shuttl.Models.Website import We...
{ "repo_name": "shuttl-io/shuttl", "path": "shuttl/Views/publishers.py", "copies": "1", "size": "2314", "license": "mit", "hash": 4803042582570034000, "line_mean": 42.6603773585, "line_max": 122, "alpha_frac": 0.7216940363, "autogenerated": false, "ratio": 3.6043613707165107, "config_test": fals...
from flask import render_template, request, jsonify, Response import json import sendgrid from bson import json_util from bson.objectid import ObjectId import op import urllib2 from settings import * @app.route('/') def home_page(): ''' Home page, which is the entire frontend app lol. ''' return rend...
{ "repo_name": "theopak/operator", "path": "operator-server/__init__.py", "copies": "1", "size": "3552", "license": "mit", "hash": 8032538141766001000, "line_mean": 29.6206896552, "line_max": 158, "alpha_frac": 0.6576576577, "autogenerated": false, "ratio": 3.5555555555555554, "config_test": fal...
from flask import render_template, request, jsonify from . import main @main.app_errorhandler(403) def forbidden(e): if request.accept_mimetypes.accept_json and \ not request.accept_mimetypes.accept_html: response = jsonify({'error': 'forbidden'}) response.status_code = 403 ...
{ "repo_name": "EOOOL/flaskq", "path": "app/main/errors.py", "copies": "2", "size": "1050", "license": "mit", "hash": 2607301805269762600, "line_mean": 30.8125, "line_max": 62, "alpha_frac": 0.6495238095, "autogenerated": false, "ratio": 4.00763358778626, "config_test": false, "has_no_keywords...
from flask import render_template, request, jsonify, send_from_directory, Blueprint, current_app import os from .isitdown import IsItDown, get_last_pings from werkzeug.local import LocalProxy basedir = os.path.abspath(os.path.dirname(__file__)) frontend_bp = Blueprint('index', __name__, static_folder=os.path.join(ba...
{ "repo_name": "FedericoPonzi/Isitdown.site", "path": "isitdown/routes.py", "copies": "1", "size": "1671", "license": "apache-2.0", "hash": 8964223101153707000, "line_mean": 31.7647058824, "line_max": 118, "alpha_frac": 0.7043686415, "autogenerated": false, "ratio": 3.1292134831460676, "config_t...
from flask import render_template, request, jsonify, session, redirect, url_for from . import pay from .. import basic import requests from ..models import Course, User, Coupon, School, Order @pay.route('/<c_id>') def show(c_id): item = Course.query_one(Course.c_id == c_id) session['course'] = c_id ...
{ "repo_name": "A1014280203/elearning", "path": "app/pay/api.py", "copies": "1", "size": "5092", "license": "mit", "hash": -7174542127974310000, "line_mean": 35.0962962963, "line_max": 118, "alpha_frac": 0.5635237715, "autogenerated": false, "ratio": 3.421736158578264, "config_test": false, "h...
from flask import render_template, request, jsonify, url_for from ..models import User, School, Course, Paper from . import main @main.route('/') def index(): return render_template('main/index.html') @main.route('/mall') def mall(): p = int(request.args.get('p') or 1) p -= 1 items = C...
{ "repo_name": "A1014280203/elearning", "path": "app/main/api.py", "copies": "1", "size": "1560", "license": "mit", "hash": 8816162938639656000, "line_mean": 26.3636363636, "line_max": 75, "alpha_frac": 0.5833333333, "autogenerated": false, "ratio": 3.1643002028397564, "config_test": false, "h...
from flask import render_template, request, json, jsonify from maraschino import app, logger from maraschino.tools import requires_auth, get_setting_value, create_dir, download_image from maraschino.noneditable import server_api_address from maraschino.models import XbmcServer from jinja2.filters import FILTERS from tv...
{ "repo_name": "insertnamehere1/maraschino", "path": "xbmcmm.py", "copies": "4", "size": "32681", "license": "mit", "hash": -8688904777199461000, "line_mean": 28.9002744739, "line_max": 148, "alpha_frac": 0.5772467183, "autogenerated": false, "ratio": 3.5846221344740594, "config_test": false, ...
from flask import render_template, request, json, Response from unfuddle import Unfuddle from config import UNFUDDLE_ACCOUNT, UNFUDDLE_PASS, UNFUDDLE_USERNAME, SWIMMERS, DEBUG from app import app unfuddle = Unfuddle(UNFUDDLE_ACCOUNT, UNFUDDLE_USERNAME, UNFUDDLE_PASS) @app.route('/') def home(): return render_tem...
{ "repo_name": "newsapps/swimlanes", "path": "app/views.py", "copies": "2", "size": "2048", "license": "mit", "hash": 206983966915830370, "line_mean": 25.9473684211, "line_max": 86, "alpha_frac": 0.6303710938, "autogenerated": false, "ratio": 3.2100313479623823, "config_test": false, "has_no_k...
from flask import render_template, request, json, send_from_directory from bleach import linkify from app import app, db import models as m @app.route('/') def index(): params = { 'title': 'Hashtag Listener', } return render_template('index.html', **params) @app.route('/api', methods=['POST']) ...
{ "repo_name": "okfn/hashtag-listener", "path": "controllers.py", "copies": "1", "size": "1538", "license": "mit", "hash": -1481555101495986200, "line_mean": 28.5769230769, "line_max": 79, "alpha_frac": 0.5851755527, "autogenerated": false, "ratio": 3.7512195121951217, "config_test": false, "h...
from flask import render_template, request, make_response from flask_wtf import Form from wtforms.fields.html5 import DecimalRangeField from wtforms import RadioField from bokeh.embed import components from bokeh.plotting import figure import random from app import app class MyForm(Form): my_slider = DecimalRangeF...
{ "repo_name": "jakebrinkmann/2015-PUG-flask-data-vis", "path": "app/views.py", "copies": "1", "size": "1144", "license": "mit", "hash": 5427268480350457000, "line_mean": 32.6470588235, "line_max": 83, "alpha_frac": 0.6276223776, "autogenerated": false, "ratio": 3.608832807570978, "config_test":...
from flask import render_template, request, \ flash, redirect, url_for, current_app from flask_security import roles_accepted, current_user import uuid import datetime from sqlalchemy import func from pgscm import sqla from . import report from pgscm.db import models from pgscm import const as c from pgscm.utils ...
{ "repo_name": "HaManhDong/pgscm", "path": "pgscm/report/views.py", "copies": "2", "size": "7937", "license": "apache-2.0", "hash": -6325522244335104000, "line_mean": 48.9182389937, "line_max": 79, "alpha_frac": 0.5069925665, "autogenerated": false, "ratio": 4.525085518814139, "config_test": fal...
from flask import render_template, request from app import app, db from util_communication import slaveCall, slaveRead import time from datetime import datetime from thread import start_new_thread # config rooms = { 0: {"name": "living room", "slave": 0x04, "sensor": 0, "currentTemp": None, "currentHum": None, "h...
{ "repo_name": "fhopeman/mgmt-center", "path": "app/environment.py", "copies": "1", "size": "4592", "license": "mit", "hash": -6833222711986902000, "line_mean": 31.338028169, "line_max": 119, "alpha_frac": 0.6398083624, "autogenerated": false, "ratio": 3.6386687797147386, "config_test": false, ...
from flask import render_template, request from app import app, flickr import xml.etree.ElementTree as ET import random import json from urllib2 import Request, urlopen def getLicenses(): try: licenses = {} response = flickr.photos_licenses_getInfo() if response.attrib['stat'] == 'ok': ...
{ "repo_name": "rishubil/tonic", "path": "app/controllers.py", "copies": "1", "size": "4183", "license": "apache-2.0", "hash": -900775968599575800, "line_mean": 35.3826086957, "line_max": 95, "alpha_frac": 0.5455414774, "autogenerated": false, "ratio": 4.006704980842912, "config_test": false, ...
from flask import render_template, request from app import app from brewmaster import BrewMaster # ROUTING/VIEW FUNCTIONS @app.route('/', methods=['GET']) @app.route('/index', methods=['GET']) def index(): search_term = request.args.get('search_term', None) if search_term: brew = BrewMaster(search_te...
{ "repo_name": "stormpython/brewmaster", "path": "app/views.py", "copies": "1", "size": "1084", "license": "mit", "hash": 3365090226161070600, "line_mean": 27.5263157895, "line_max": 77, "alpha_frac": 0.6614391144, "autogenerated": false, "ratio": 3.0535211267605633, "config_test": false, "has...
from flask import render_template, request from app import app from clients import page_client, blog_client import base from dateutil import parser @app.route('/writings') def blog(): pageData = page_client.find('writings') if pageData == None or pageData.text == '{}': return render_template('404.html'...
{ "repo_name": "allison-knauss/arkweb", "path": "web/views/blog.py", "copies": "1", "size": "1661", "license": "mit", "hash": 2274316729724253700, "line_mean": 29.7592592593, "line_max": 118, "alpha_frac": 0.5954244431, "autogenerated": false, "ratio": 3.4176954732510287, "config_test": false, ...
from flask import render_template, request from app import app import MySQLdb from models import tweet_features, get_tweet_html, validate_tweet @app.route('/') @app.route('/input') def landing(): return render_template("input.html", img_count=0) # input template -> score. Carries image info. @app.route('/sc...
{ "repo_name": "aspera1631/TS_web_app", "path": "app/views.py", "copies": "1", "size": "2692", "license": "mit", "hash": 5922673718611068000, "line_mean": 34.4342105263, "line_max": 119, "alpha_frac": 0.6151560178, "autogenerated": false, "ratio": 3.4690721649484537, "config_test": false, "has...
from flask import render_template, request from app import app import pymysql as mdb import json import cPickle as pickle import os @app.route('/') @app.route('/index') def index(): return render_template("input.html") @app.route('/slides') def input(): return render_template("slides.html") @...
{ "repo_name": "weiwang/curatir", "path": "app/views.py", "copies": "1", "size": "3984", "license": "mit", "hash": -3988681664236006000, "line_mean": 47, "line_max": 332, "alpha_frac": 0.6134538153, "autogenerated": false, "ratio": 3.2898431048720065, "config_test": false, "has_no_keywords": f...
from flask import render_template, request from app import app def read_data( fn='./data/ALF_TEST.json' ): from tinydb import TinyDB records = TinyDB( fn ).all() return records def select_metric( records, metric ): return [ {'domain':domain,'fire_year':rec['fire_year'], 'replicate':rec[ 'replicate' ],...
{ "repo_name": "EarthScientist/bokeh-flask-app", "path": "app/views.py", "copies": "1", "size": "3707", "license": "mit", "hash": -7830927071887398000, "line_mean": 32.3963963964, "line_max": 179, "alpha_frac": 0.5945508497, "autogenerated": false, "ratio": 3.4134438305709023, "config_test": fal...
from flask import render_template, request from app import app from sklearn import metrics from gensim.models import Word2Vec import numpy as np import os import logging log = logging.getLogger() # Download the w2v model from here: https://mega.nz/#F!4VZFGIAa!uGx0JoqTr3KcN1bIwt1LzA # Insert the path to the donwloade...
{ "repo_name": "vaddina/word2emoji", "path": "search.py", "copies": "1", "size": "2611", "license": "mit", "hash": -2448893665856058400, "line_mean": 31.2345679012, "line_max": 111, "alpha_frac": 0.6579854462, "autogenerated": false, "ratio": 3.2967171717171717, "config_test": false, "has_no_k...
from flask import render_template, request from app import app from solver import * from pylatexenc import latexwalker from pylatexenc.latex2text import default_macro_dict, LatexNodes2Text, MacroDef @app.route('/', methods=['GET', 'POST']) def index(): return render_template('index.html') def get_modules(user_i...
{ "repo_name": "robalar/A2_Project", "path": "app/views.py", "copies": "1", "size": "2453", "license": "mit", "hash": 395498778462475650, "line_mean": 24.8210526316, "line_max": 116, "alpha_frac": 0.6461475744, "autogenerated": false, "ratio": 3.5862573099415203, "config_test": false, "has_no_...
from flask import render_template, request from bson import ObjectId from website import carts, reviews, photos from website.views.utils import base_context # Cart page def cart_page(cid): context = base_context() context['cart'] = carts.find_one(_id=ObjectId(cid)); context['reviews'] = context['cart'].ge...
{ "repo_name": "stuycs-softdev-fall-2013/proj3-7-cartwheels", "path": "website/views/carts.py", "copies": "1", "size": "1802", "license": "bsd-3-clause", "hash": -6187695006936258000, "line_mean": 30.0689655172, "line_max": 105, "alpha_frac": 0.5837957825, "autogenerated": false, "ratio": 3.754166...
from flask import render_template, request from emonitor.extensions import cache from emonitor.modules.streets.city import City from emonitor.modules.streets.street import Street from emonitor.modules.alarmobjects.alarmobject import AlarmObject from emonitor.modules.alarmobjects.alarmobjecttype import AlarmObjectType ...
{ "repo_name": "digifant/eMonitor", "path": "emonitor/modules/locations/content_frontend.py", "copies": "3", "size": "1790", "license": "bsd-3-clause", "hash": 992268013445572500, "line_mean": 46.1052631579, "line_max": 221, "alpha_frac": 0.6737430168, "autogenerated": false, "ratio": 3.3271375464...
from flask import render_template, request from emonitor.extensions import db, events from emonitor.modules.events.eventhandler import Eventhandler def getAdminContent(self, **params): """ Deliver admin content of module events :param params: use given parameters of request :return: rendered template...
{ "repo_name": "digifant/eMonitor", "path": "emonitor/modules/events/content_admin.py", "copies": "3", "size": "5006", "license": "bsd-3-clause", "hash": 581808702191305000, "line_mean": 50.6082474227, "line_max": 131, "alpha_frac": 0.5605273672, "autogenerated": false, "ratio": 4.178631051752921,...