index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
51,233 | pavansai018/E-Learning-Portal | refs/heads/master | /educationPortal/migrations/0037_auto_20210801_0841.py | # Generated by Django 3.2.5 on 2021-08-01 12:41
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('educationPortal', '0036_auto_20210731_2146'),
]
operations = [
migrations.AddField(
model_name='assignment',
... | {"/educationPortal/views.py": ["/educationPortal/models.py"]} |
51,234 | pavansai018/E-Learning-Portal | refs/heads/master | /educationPortal/migrations/0020_alter_announcement_body.py | # Generated by Django 3.2.5 on 2021-07-29 18:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('educationPortal', '0019_auto_20210729_1134'),
]
operations = [
migrations.AlterField(
model_name='announcement',
nam... | {"/educationPortal/views.py": ["/educationPortal/models.py"]} |
51,235 | pavansai018/E-Learning-Portal | refs/heads/master | /educationPortal/migrations/0038_auto_20210801_1229.py | # Generated by Django 3.2.5 on 2021-08-01 16:29
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('educationPortal', '0037_auto_20210801_0841'),
]
operations = [
migrations.AddField(
model_name='assignment',
... | {"/educationPortal/views.py": ["/educationPortal/models.py"]} |
51,236 | pavansai018/E-Learning-Portal | refs/heads/master | /educationPortal/migrations/0026_conversation_lastinteracted.py | # Generated by Django 3.2.5 on 2021-07-31 01:33
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('educationPortal', '0025_auto_20210730_1745'),
]
operations = [
migrations.AddField(
model_name='con... | {"/educationPortal/views.py": ["/educationPortal/models.py"]} |
51,237 | pavansai018/E-Learning-Portal | refs/heads/master | /educationPortal/models.py | from django.contrib.auth.models import AbstractUser
from django.db import models
from django.db.models.fields import CharField
from django.db.models.fields.files import FileField, ImageField
from django.utils.timezone import localtime, now
from datetime import datetime
import time
import os
class User(AbstractUser):
... | {"/educationPortal/views.py": ["/educationPortal/models.py"]} |
51,238 | pavansai018/E-Learning-Portal | refs/heads/master | /educationPortal/migrations/0005_auto_20210728_1025.py | # Generated by Django 3.2.5 on 2021-07-28 14:25
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('educationPortal', '0004_classroom'),
]
operations = [
migrations.AddField(
model_name='classroom',
name='subject',
... | {"/educationPortal/views.py": ["/educationPortal/models.py"]} |
51,239 | pavansai018/E-Learning-Portal | refs/heads/master | /educationPortal/migrations/0006_announcement.py | # Generated by Django 3.2.5 on 2021-07-29 15:07
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('educationPortal', '0005_auto_20210728_1025'),
]
operations = [
migrations.CreateModel(... | {"/educationPortal/views.py": ["/educationPortal/models.py"]} |
51,240 | pavansai018/E-Learning-Portal | refs/heads/master | /educationPortal/migrations/0043_auto_20210801_1936.py | # Generated by Django 3.2.5 on 2021-08-01 23:36
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('educationPortal', '0042_auto_20210801_1754'),
]
operations = [
migrations.AddField(
model_name='submission',
... | {"/educationPortal/views.py": ["/educationPortal/models.py"]} |
51,241 | pavansai018/E-Learning-Portal | refs/heads/master | /educationPortal/migrations/0023_alter_user_profile_pic.py | # Generated by Django 3.2.5 on 2021-07-30 01:05
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('educationPortal', '0022_user_profile_pic'),
]
operations = [
migrations.AlterField(
model_name='user',
name='profile... | {"/educationPortal/views.py": ["/educationPortal/models.py"]} |
51,242 | pavansai018/E-Learning-Portal | refs/heads/master | /educationPortal/migrations/0042_auto_20210801_1754.py | # Generated by Django 3.2.5 on 2021-08-01 21:54
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('educationPortal', '0041_auto_20210801_1719'),
]
operations = [
migrations.AlterField(
model_name='announcement',... | {"/educationPortal/views.py": ["/educationPortal/models.py"]} |
51,243 | pavansai018/E-Learning-Portal | refs/heads/master | /educationPortal/migrations/0004_classroom.py | # Generated by Django 3.2.5 on 2021-07-28 01:28
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('educationPortal', '0003_auto_20210725_1530'),
]
operations = [
migrations.... | {"/educationPortal/views.py": ["/educationPortal/models.py"]} |
51,244 | pavansai018/E-Learning-Portal | refs/heads/master | /educationPortal/migrations/0034_auto_20210731_2144.py | # Generated by Django 3.2.5 on 2021-08-01 01:44
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('educationPortal', '0033_auto_20210731_2144'),
]
operations = [
migrations.AlterField(
model_name='announcement',... | {"/educationPortal/views.py": ["/educationPortal/models.py"]} |
51,250 | frhrdr/patepy | refs/heads/master | /test_application/validation_experiments.py | import numpy as np
from pate_accountant import PATEPyTorch
# load vote files provided by the paper and use the stated hyperparameters.
# repeatedly let the conident gnmax algorithm answer random queries from the dataset up to the limit given in the paper.
# If the implementation is correct, the final data-dependent ep... | {"/test_application/validation_experiments.py": ["/pate_accountant.py"], "/pate_accountant.py": ["/aliases.py"], "/aliases.py": ["/pate_core.py"]} |
51,251 | frhrdr/patepy | refs/heads/master | /pate_accountant.py | import numpy as np
from aliases import get_log_q, rdp_max_vote, rdp_threshold, rdp_to_dp, \
local_sensitivity, local_to_smooth_sens, rdp_eps_release
class PATEPyTorch:
"""
This implementation is per sample. Minibatched version coming later...
class is meant to guide training of an arbitrary student model in t... | {"/test_application/validation_experiments.py": ["/pate_accountant.py"], "/pate_accountant.py": ["/aliases.py"], "/aliases.py": ["/pate_core.py"]} |
51,252 | frhrdr/patepy | refs/heads/master | /aliases.py | from pate_core import compute_logq_gaussian, rdp_data_independent_gaussian, rdp_gaussian, _log1mexp, \
compute_eps_from_delta, compute_logpr_answered
from smooth_sensitivity import compute_local_sensitivity_bounds_gnmax, compute_local_sensitivity_bounds_threshold, \
compute_rdp_of_smooth_sensitivity_gaussian, compu... | {"/test_application/validation_experiments.py": ["/pate_accountant.py"], "/pate_accountant.py": ["/aliases.py"], "/aliases.py": ["/pate_core.py"]} |
51,253 | frhrdr/patepy | refs/heads/master | /pate_core.py | # Copyright 2017 The 'Scalable Private Learning with PATE' Authors All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | {"/test_application/validation_experiments.py": ["/pate_accountant.py"], "/pate_accountant.py": ["/aliases.py"], "/aliases.py": ["/pate_core.py"]} |
51,290 | antonnifo/iReporter | refs/heads/develop | /app/api/v1/redflags/views.py | """views for Red-flags"""
from flask import jsonify, make_response, request
from flask_restful import Resource
from .models import RedFlagModel
class RedFlags(Resource):
"""docstring for RedFlags class"""
def __init__(self):
"""initiliase the redflag class"""
self.db = RedFlagModel()
de... | {"/app/api/v1/redflags/views.py": ["/app/api/v1/redflags/models.py"], "/run.py": ["/app/__init__.py"], "/app/api/v2/incidents/views_redflags.py": ["/app/api/v2/users/models.py", "/app/api/v2/validators.py", "/app/api/v2/incidents/models.py", "/app/api/v2/token_decorator.py"], "/app/api/v2/token_decorator.py": ["/app/ap... |
51,291 | antonnifo/iReporter | refs/heads/develop | /app/db_con.py | '''driver for interacting with PostgreSQL from the Python scripting language'''
import os
import psycopg2 as p
import psycopg2.extras
from werkzeug.security import generate_password_hash
DATABASE_URL = os.getenv('DATABASE_URL')
DATABASE_URL_TEST = os.getenv('DATABASE_URL_TEST')
def connection(url):
con = p.conne... | {"/app/api/v1/redflags/views.py": ["/app/api/v1/redflags/models.py"], "/run.py": ["/app/__init__.py"], "/app/api/v2/incidents/views_redflags.py": ["/app/api/v2/users/models.py", "/app/api/v2/validators.py", "/app/api/v2/incidents/models.py", "/app/api/v2/token_decorator.py"], "/app/api/v2/token_decorator.py": ["/app/ap... |
51,292 | antonnifo/iReporter | refs/heads/develop | /run.py | """Run docstring"""
import os
from flask import jsonify, make_response
from app import create_app
APP = create_app(os.getenv("FLASK_CONF") or 'default')
@APP.errorhandler(404)
def page_not_found(e):
"""error handler default method for error 404"""
return make_response(
jsonify(
{"messa... | {"/app/api/v1/redflags/views.py": ["/app/api/v1/redflags/models.py"], "/run.py": ["/app/__init__.py"], "/app/api/v2/incidents/views_redflags.py": ["/app/api/v2/users/models.py", "/app/api/v2/validators.py", "/app/api/v2/incidents/models.py", "/app/api/v2/token_decorator.py"], "/app/api/v2/token_decorator.py": ["/app/ap... |
51,293 | antonnifo/iReporter | refs/heads/develop | /app/api/v2/incidents/views_redflags.py | """Views for Redflags"""
from flask import jsonify, make_response, request
from flask_restful import Resource
from app.api.v2.users.models import UserModel
from ..validators import (can_only_edit_draft, non_existance_incident,
only_admin_can_edit, only_creater_can_delete,
... | {"/app/api/v1/redflags/views.py": ["/app/api/v1/redflags/models.py"], "/run.py": ["/app/__init__.py"], "/app/api/v2/incidents/views_redflags.py": ["/app/api/v2/users/models.py", "/app/api/v2/validators.py", "/app/api/v2/incidents/models.py", "/app/api/v2/token_decorator.py"], "/app/api/v2/token_decorator.py": ["/app/ap... |
51,294 | antonnifo/iReporter | refs/heads/develop | /app/api/v2/token_decorator.py | import datetime
import os
from functools import wraps
import jwt
from flask import jsonify, make_response, request
from app.api.v2.users.models import UserModel
secret = os.getenv('SECRET_KEY')
def require_token(f):
@wraps(f)
def secure(*args, ** kwargs):
token = None
if 'token' in request.... | {"/app/api/v1/redflags/views.py": ["/app/api/v1/redflags/models.py"], "/run.py": ["/app/__init__.py"], "/app/api/v2/incidents/views_redflags.py": ["/app/api/v2/users/models.py", "/app/api/v2/validators.py", "/app/api/v2/incidents/models.py", "/app/api/v2/token_decorator.py"], "/app/api/v2/token_decorator.py": ["/app/ap... |
51,295 | antonnifo/iReporter | refs/heads/develop | /app/tests/v2/testing_data.py | from werkzeug.security import generate_password_hash
password = generate_password_hash("hello123")
test_user = {
"first_name": "john",
"last_name": "doe",
"email": "johndoe@example.com",
"phone": "0707741793",
"isAdmin": True,
"registered": "Thu, 13 Dec 2018 21:00:00 GMT... | {"/app/api/v1/redflags/views.py": ["/app/api/v1/redflags/models.py"], "/run.py": ["/app/__init__.py"], "/app/api/v2/incidents/views_redflags.py": ["/app/api/v2/users/models.py", "/app/api/v2/validators.py", "/app/api/v2/incidents/models.py", "/app/api/v2/token_decorator.py"], "/app/api/v2/token_decorator.py": ["/app/ap... |
51,296 | antonnifo/iReporter | refs/heads/develop | /app/api/v2/validators.py | """for fields validations purposes"""
import re
from flask import jsonify, request
from flask_restful import reqparse
def validate_integer(value):
"""method to check for only integers"""
if not re.match(r"^[0-9]+$", value):
raise ValueError("Pattern not matched")
def validate_coordinates(value):
... | {"/app/api/v1/redflags/views.py": ["/app/api/v1/redflags/models.py"], "/run.py": ["/app/__init__.py"], "/app/api/v2/incidents/views_redflags.py": ["/app/api/v2/users/models.py", "/app/api/v2/validators.py", "/app/api/v2/incidents/models.py", "/app/api/v2/token_decorator.py"], "/app/api/v2/token_decorator.py": ["/app/ap... |
51,297 | antonnifo/iReporter | refs/heads/develop | /app/tests/v1/test_redflags.py | """Tests for redflags run with pytest"""
import json
import unittest
from ... import create_app
class RedFlagTestCase(unittest.TestCase):
"""
This class represents the redflag test cases
"""
def setUp(self):
APP = create_app("testing")
self.app = APP.test_client()
self.redfl... | {"/app/api/v1/redflags/views.py": ["/app/api/v1/redflags/models.py"], "/run.py": ["/app/__init__.py"], "/app/api/v2/incidents/views_redflags.py": ["/app/api/v2/users/models.py", "/app/api/v2/validators.py", "/app/api/v2/incidents/models.py", "/app/api/v2/token_decorator.py"], "/app/api/v2/token_decorator.py": ["/app/ap... |
51,298 | antonnifo/iReporter | refs/heads/develop | /app/api/v2/incidents/models.py | """Incidents Models"""
import datetime
from flask import request
from flask_restful import reqparse
from app.db_con import connection
from app.db_con import DATABASE_URL as url
import re
import psycopg2.extras
from ..validators import parser, parser_edit_location, parser_edit_comment, parser_edit_status
class Inciden... | {"/app/api/v1/redflags/views.py": ["/app/api/v1/redflags/models.py"], "/run.py": ["/app/__init__.py"], "/app/api/v2/incidents/views_redflags.py": ["/app/api/v2/users/models.py", "/app/api/v2/validators.py", "/app/api/v2/incidents/models.py", "/app/api/v2/token_decorator.py"], "/app/api/v2/token_decorator.py": ["/app/ap... |
51,299 | antonnifo/iReporter | refs/heads/develop | /app/tests/v2/test_users.py | """Tests for users run with pytest"""
import unittest
import json
import jwt
import datetime
import os
from ... import create_app
from app.db_con import create_tables, super_user, destroy_tables
from app.tests.v2.testing_data import (
test_user, user, user2, user3, user4,data5, data6, data7)
secret = os.getenv('S... | {"/app/api/v1/redflags/views.py": ["/app/api/v1/redflags/models.py"], "/run.py": ["/app/__init__.py"], "/app/api/v2/incidents/views_redflags.py": ["/app/api/v2/users/models.py", "/app/api/v2/validators.py", "/app/api/v2/incidents/models.py", "/app/api/v2/token_decorator.py"], "/app/api/v2/token_decorator.py": ["/app/ap... |
51,300 | antonnifo/iReporter | refs/heads/develop | /app/api/v2/users/models.py | '''model for users view file'''
import datetime
import psycopg2.extras
from flask import request
from flask_restful import reqparse
from werkzeug.security import check_password_hash, generate_password_hash
from app.db_con import connection
from app.db_con import DATABASE_URL as url
from ..validators import validate_... | {"/app/api/v1/redflags/views.py": ["/app/api/v1/redflags/models.py"], "/run.py": ["/app/__init__.py"], "/app/api/v2/incidents/views_redflags.py": ["/app/api/v2/users/models.py", "/app/api/v2/validators.py", "/app/api/v2/incidents/models.py", "/app/api/v2/token_decorator.py"], "/app/api/v2/token_decorator.py": ["/app/ap... |
51,301 | antonnifo/iReporter | refs/heads/develop | /app/api/v1/redflags/models.py | """model for view for incidents"""
import datetime
from flask import jsonify, make_response, request
from flask_restful import Resource, reqparse
from app.api.v2.validators import (
validate_integer, validate_coordinates, validate_string)
parser = reqparse.RequestParser(bundle_errors=True)
parser.add_argument('c... | {"/app/api/v1/redflags/views.py": ["/app/api/v1/redflags/models.py"], "/run.py": ["/app/__init__.py"], "/app/api/v2/incidents/views_redflags.py": ["/app/api/v2/users/models.py", "/app/api/v2/validators.py", "/app/api/v2/incidents/models.py", "/app/api/v2/token_decorator.py"], "/app/api/v2/token_decorator.py": ["/app/ap... |
51,302 | antonnifo/iReporter | refs/heads/develop | /app/api/v1/routes.py | """all routes"""
from flask import Blueprint
from flask_restful import Api
from .redflags.views import RedFlag, RedFlags, UpdateComment, UpdateLocation
VERSION_UNO = Blueprint('api', __name__, url_prefix='/api/v1')
API = Api(VERSION_UNO)
API.add_resource(RedFlags, '/red-flags')
API.add_resource(RedFlag, '/red-flags/<... | {"/app/api/v1/redflags/views.py": ["/app/api/v1/redflags/models.py"], "/run.py": ["/app/__init__.py"], "/app/api/v2/incidents/views_redflags.py": ["/app/api/v2/users/models.py", "/app/api/v2/validators.py", "/app/api/v2/incidents/models.py", "/app/api/v2/token_decorator.py"], "/app/api/v2/token_decorator.py": ["/app/ap... |
51,303 | antonnifo/iReporter | refs/heads/develop | /app/api/v2/incidents/views_interventions.py | """Views for Interventions"""
from flask import jsonify, make_response, request
from flask_restful import Resource
from app.api.v2.users.models import UserModel
from ..validators import (can_only_edit_draft, non_existance_incident,
only_admin_can_edit, only_creater_can_delete,
... | {"/app/api/v1/redflags/views.py": ["/app/api/v1/redflags/models.py"], "/run.py": ["/app/__init__.py"], "/app/api/v2/incidents/views_redflags.py": ["/app/api/v2/users/models.py", "/app/api/v2/validators.py", "/app/api/v2/incidents/models.py", "/app/api/v2/token_decorator.py"], "/app/api/v2/token_decorator.py": ["/app/ap... |
51,304 | antonnifo/iReporter | refs/heads/develop | /app/tests/v2/test_incidents.py | """Tests for incidents in v2 run with pytest"""
import datetime
import json
import os
import unittest
import jwt
from ... import create_app
from app.db_con import create_tables, super_user, destroy_tables
from app.tests.v2.testing_data import (
test_user, user, user2, user3, user4, redflag_data, redflag_data3, re... | {"/app/api/v1/redflags/views.py": ["/app/api/v1/redflags/models.py"], "/run.py": ["/app/__init__.py"], "/app/api/v2/incidents/views_redflags.py": ["/app/api/v2/users/models.py", "/app/api/v2/validators.py", "/app/api/v2/incidents/models.py", "/app/api/v2/token_decorator.py"], "/app/api/v2/token_decorator.py": ["/app/ap... |
51,305 | antonnifo/iReporter | refs/heads/develop | /app/api/v2/routes.py | """all for version 2 routes"""
from flask import Blueprint
from flask_restful import Api
from .users.views import UserSignUp, UserSignIn, Users, Search, UserStatus
from .incidents.views_interventions import (Interventions, Intervention, UpdateInterventionLocation,
UpdateInterventionCommen... | {"/app/api/v1/redflags/views.py": ["/app/api/v1/redflags/models.py"], "/run.py": ["/app/__init__.py"], "/app/api/v2/incidents/views_redflags.py": ["/app/api/v2/users/models.py", "/app/api/v2/validators.py", "/app/api/v2/incidents/models.py", "/app/api/v2/token_decorator.py"], "/app/api/v2/token_decorator.py": ["/app/ap... |
51,306 | antonnifo/iReporter | refs/heads/develop | /app/api/v2/users/views.py | """Views for users"""
import os
import datetime
from flask import jsonify,request
from flask_restful import Resource
from app.api.v2.token_decorator import require_token
from app.api.v2.validators import only_admin_can_edit
import jwt
from .models import UserModel
secret = os.getenv('SECRET_KEY')
def nonexistent_use... | {"/app/api/v1/redflags/views.py": ["/app/api/v1/redflags/models.py"], "/run.py": ["/app/__init__.py"], "/app/api/v2/incidents/views_redflags.py": ["/app/api/v2/users/models.py", "/app/api/v2/validators.py", "/app/api/v2/incidents/models.py", "/app/api/v2/token_decorator.py"], "/app/api/v2/token_decorator.py": ["/app/ap... |
51,307 | antonnifo/iReporter | refs/heads/develop | /app/__init__.py | from flask import Blueprint, Flask
from app.api.v1.routes import VERSION_UNO as v1
from app.api.v2.routes import VERSION_TWO as v2
from app.instance.config import APP_CONFIG
from app.db_con import create_tables, super_user, destroy_tables
def create_app(config_name):
'''The create_app function wraps the creation... | {"/app/api/v1/redflags/views.py": ["/app/api/v1/redflags/models.py"], "/run.py": ["/app/__init__.py"], "/app/api/v2/incidents/views_redflags.py": ["/app/api/v2/users/models.py", "/app/api/v2/validators.py", "/app/api/v2/incidents/models.py", "/app/api/v2/token_decorator.py"], "/app/api/v2/token_decorator.py": ["/app/ap... |
51,349 | brano2/vcd-parser | refs/heads/master | /tests/test_parser.py | from datetime import datetime
import pytest
import vcd_parser
from vcd_parser import VCD
def test_tokenize():
TOKENS = ['$keyword', '"', 'word', '123', '16/8/2048', '-0.42', '4:20', '#0', 'b001011"']
WHITESPACE = [' ', '\t', '\n', ' ', '\t\t\t', '\n\n\n', ' \t ', '\r\n', '\t \r\n \t \n\t']
class DummyF... | {"/tests/test_parser.py": ["/vcd_parser/__init__.py"], "/demo/demo.py": ["/vcd_parser/__init__.py"], "/vcd_parser/__init__.py": ["/vcd_parser/vcd.py"]} |
51,350 | brano2/vcd-parser | refs/heads/master | /demo/demo.py | from vcd_parser import VCD
# Open the file and parse its contents
vcd1 = VCD('data.vcd')
# Display the parsed data
print('VCD header data:')
print('\tComments:')
for comment in vcd1.comments:
print('\t\t' + comment)
print('\tDate: ' + vcd1.date.isoformat())
print('\tVersion: ' + vcd1.version)
print(f'\tTimescale:... | {"/tests/test_parser.py": ["/vcd_parser/__init__.py"], "/demo/demo.py": ["/vcd_parser/__init__.py"], "/vcd_parser/__init__.py": ["/vcd_parser/vcd.py"]} |
51,351 | brano2/vcd-parser | refs/heads/master | /vcd_parser/vcd.py | from pathlib import Path
from typing import Callable, ClassVar, Dict, List, Union
from warnings import warn
from dateutil.parser import parse as parse_datetime
class VcdSyntaxError(Exception):
pass
END = '$end'
class VCD:
KEYWORD_PARSERS: ClassVar[Dict[str, Callable[['VCD'], None]]]
def __init__(self, ... | {"/tests/test_parser.py": ["/vcd_parser/__init__.py"], "/demo/demo.py": ["/vcd_parser/__init__.py"], "/vcd_parser/__init__.py": ["/vcd_parser/vcd.py"]} |
51,352 | brano2/vcd-parser | refs/heads/master | /vcd_parser/__init__.py | from .vcd import VCD
| {"/tests/test_parser.py": ["/vcd_parser/__init__.py"], "/demo/demo.py": ["/vcd_parser/__init__.py"], "/vcd_parser/__init__.py": ["/vcd_parser/vcd.py"]} |
51,353 | brano2/vcd-parser | refs/heads/master | /setup.py | from pathlib import Path
from setuptools import find_packages, setup
BASEDIR = Path(__file__).parent
setup(
name='vcd-parser',
version='0.0.2',
description='A parser for Value Change Dump (VCD) files (generated by PulseView)',
long_description=(BASEDIR/'README.md').read_text(),
long_description_c... | {"/tests/test_parser.py": ["/vcd_parser/__init__.py"], "/demo/demo.py": ["/vcd_parser/__init__.py"], "/vcd_parser/__init__.py": ["/vcd_parser/vcd.py"]} |
51,365 | dineshdb/ocr | refs/heads/master | /train.py | import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'
import tensorflow as tf
import numpy as np
from keras.datasets import mnist
from keras.models import Sequential
from keras.layers import Dense
from keras.layers import Dropout
from keras.layers import Flatten
from keras.layers.convolutional import Conv2D
from keras.laye... | {"/web.py": ["/predictor.py"]} |
51,366 | dineshdb/ocr | refs/heads/master | /predictor.py | import os
import sys
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'
import tensorflow as tf
import cv2
import numpy as np
from keras.models import load_model
import scipy.special
import scipy.misc as misc
# Create MSER (Maximally Stable External Regions) object
mser = cv2.MSER_create()
#pre_trained model with accuracy 83%
mo... | {"/web.py": ["/predictor.py"]} |
51,367 | dineshdb/ocr | refs/heads/master | /web.py | from flask import Flask, render_template, request, redirect, url_for, send_from_directory, flash, Response, jsonify
from werkzeug.utils import secure_filename
import os
from predictor import find_texts
UPLOAD_FOLDER = "./public/uploads/"
ALLOWED_EXTENSIONS = set(['png', 'jpg', 'jpeg', 'gif'])
app = Flask(__name__)
a... | {"/web.py": ["/predictor.py"]} |
51,374 | Phelimb/bigsi-ebi-api | refs/heads/master | /bigsi_aggregator/constants.py | SEQUENCE_QUERY_KEY = "seq"
THRESHOLD_KEY = "threshold"
SCORE_KEY = "score"
COMPLETED_BIGSI_QUERIES_COUNT_KEY = "completed_bigsi_queries"
TOTAL_BIGSI_QUERIES_COUNT_KEY = "total_bigsi_queries"
RESULTS_KEY = "results"
| {"/bigsi_aggregator/tasks.py": ["/bigsi_aggregator/extensions.py", "/bigsi_aggregator/models.py"], "/bigsi_aggregator/helpers.py": ["/bigsi_aggregator/tasks.py"], "/bigsi_aggregator/__init__.py": ["/bigsi_aggregator/extensions.py", "/bigsi_aggregator/views.py", "/bigsi_aggregator/settings.py"], "/bigsi_aggregator/model... |
51,375 | Phelimb/bigsi-ebi-api | refs/heads/master | /bigsi_aggregator/extensions.py | """Flask and other extensions instantiated here.
To avoid circular imports with views and create_app(), extensions are instantiated here. They will be initialized
(calling init_app()) in application.py.
"""
from flask_celery import Celery
# from flask.ext.redis import Redis
celery = Celery()
# redis = Redis()
| {"/bigsi_aggregator/tasks.py": ["/bigsi_aggregator/extensions.py", "/bigsi_aggregator/models.py"], "/bigsi_aggregator/helpers.py": ["/bigsi_aggregator/tasks.py"], "/bigsi_aggregator/__init__.py": ["/bigsi_aggregator/extensions.py", "/bigsi_aggregator/views.py", "/bigsi_aggregator/settings.py"], "/bigsi_aggregator/model... |
51,376 | Phelimb/bigsi-ebi-api | refs/heads/master | /bigsi_aggregator/tasks.py | import requests
import json
from flask_celery import single_instance
from bigsi_aggregator.extensions import celery
from bigsi_aggregator.models import SequenceSearch
class BigsiClient:
def __init__(self, url):
self.base_url = url
def search(self, seq, threshold, score):
url = "{base_url}/s... | {"/bigsi_aggregator/tasks.py": ["/bigsi_aggregator/extensions.py", "/bigsi_aggregator/models.py"], "/bigsi_aggregator/helpers.py": ["/bigsi_aggregator/tasks.py"], "/bigsi_aggregator/__init__.py": ["/bigsi_aggregator/extensions.py", "/bigsi_aggregator/views.py", "/bigsi_aggregator/settings.py"], "/bigsi_aggregator/model... |
51,377 | Phelimb/bigsi-ebi-api | refs/heads/master | /bigsi_aggregator/settings.py | import os
BIGSI_URLS = os.environ.get("BIGSI_URLS", "http://localhost:8000").split()
REDIS_IP = os.environ.get("REDIS_IP", "localhost")
| {"/bigsi_aggregator/tasks.py": ["/bigsi_aggregator/extensions.py", "/bigsi_aggregator/models.py"], "/bigsi_aggregator/helpers.py": ["/bigsi_aggregator/tasks.py"], "/bigsi_aggregator/__init__.py": ["/bigsi_aggregator/extensions.py", "/bigsi_aggregator/views.py", "/bigsi_aggregator/settings.py"], "/bigsi_aggregator/model... |
51,378 | Phelimb/bigsi-ebi-api | refs/heads/master | /bigsi_aggregator/helpers.py | from bigsi_aggregator.tasks import search_bigsi_and_update_results
class BigsiAggregator:
def __init__(self, bigsi_urls):
self.bigsi_urls = bigsi_urls
def search_and_aggregate(self, sequence_search):
for url in self.bigsi_urls:
result = search_bigsi_and_update_results.delay(url, ... | {"/bigsi_aggregator/tasks.py": ["/bigsi_aggregator/extensions.py", "/bigsi_aggregator/models.py"], "/bigsi_aggregator/helpers.py": ["/bigsi_aggregator/tasks.py"], "/bigsi_aggregator/__init__.py": ["/bigsi_aggregator/extensions.py", "/bigsi_aggregator/views.py", "/bigsi_aggregator/settings.py"], "/bigsi_aggregator/model... |
51,379 | Phelimb/bigsi-ebi-api | refs/heads/master | /bigsi_aggregator/__init__.py | from flask import Flask
from flask_cors import CORS
from flask_restful import Api
from bigsi_aggregator.extensions import celery
from bigsi_aggregator.views import SequenceSearchListResource
from bigsi_aggregator.views import SequenceSearchResource
from bigsi_aggregator.settings import REDIS_IP
app = Flask(__name__)
... | {"/bigsi_aggregator/tasks.py": ["/bigsi_aggregator/extensions.py", "/bigsi_aggregator/models.py"], "/bigsi_aggregator/helpers.py": ["/bigsi_aggregator/tasks.py"], "/bigsi_aggregator/__init__.py": ["/bigsi_aggregator/extensions.py", "/bigsi_aggregator/views.py", "/bigsi_aggregator/settings.py"], "/bigsi_aggregator/model... |
51,380 | Phelimb/bigsi-ebi-api | refs/heads/master | /bigsi_aggregator/models.py | import redis
import json
from bigsi_aggregator import constants
from bigsi_aggregator.settings import REDIS_IP
import hashlib
DEFAULT_SEARCH_RESULTS_TTL = 48 * 60 * 60 # 2 days
def generate_search_key(_id):
return "sequence_search:%s" % _id
def generate_search_results_key(_id):
return "sequence_search_re... | {"/bigsi_aggregator/tasks.py": ["/bigsi_aggregator/extensions.py", "/bigsi_aggregator/models.py"], "/bigsi_aggregator/helpers.py": ["/bigsi_aggregator/tasks.py"], "/bigsi_aggregator/__init__.py": ["/bigsi_aggregator/extensions.py", "/bigsi_aggregator/views.py", "/bigsi_aggregator/settings.py"], "/bigsi_aggregator/model... |
51,381 | Phelimb/bigsi-ebi-api | refs/heads/master | /bigsi_aggregator/views.py | from flask import redirect
from flask_restful import Resource
from flask_restful import reqparse
from flask_restful import fields, marshal_with, marshal
from bigsi_aggregator.helpers import BigsiAggregator
from bigsi_aggregator.settings import BIGSI_URLS
from bigsi_aggregator.models import SequenceSearch
from bigsi_agg... | {"/bigsi_aggregator/tasks.py": ["/bigsi_aggregator/extensions.py", "/bigsi_aggregator/models.py"], "/bigsi_aggregator/helpers.py": ["/bigsi_aggregator/tasks.py"], "/bigsi_aggregator/__init__.py": ["/bigsi_aggregator/extensions.py", "/bigsi_aggregator/views.py", "/bigsi_aggregator/settings.py"], "/bigsi_aggregator/model... |
51,385 | FDUSoftware2020/backend | refs/heads/master | /issue/migrations/0001_initial.py | # Generated by Django 3.0.3 on 2020-04-30 08:27
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('account', '0004_auto_20200430_1627'),
]
operations = [
migrations.CreateModel(
... | {"/issue/admin.py": ["/issue/models.py"], "/image/views.py": ["/account/models.py"], "/issue/views.py": ["/issue/models.py", "/account/models.py", "/comment/models.py", "/account/utils/message.py"], "/account/utils/verification.py": ["/account/models.py"], "/account/utils/message.py": ["/account/models.py", "/issue/mod... |
51,386 | FDUSoftware2020/backend | refs/heads/master | /issue/migrations/0003_auto_20200505_1435.py | # Generated by Django 3.0.3 on 2020-05-05 06:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('account', '0004_auto_20200430_1627'),
('issue', '0002_auto_20200430_2111'),
]
operations = [
migrations.AlterField(
mode... | {"/issue/admin.py": ["/issue/models.py"], "/image/views.py": ["/account/models.py"], "/issue/views.py": ["/issue/models.py", "/account/models.py", "/comment/models.py", "/account/utils/message.py"], "/account/utils/verification.py": ["/account/models.py"], "/account/utils/message.py": ["/account/models.py", "/issue/mod... |
51,387 | FDUSoftware2020/backend | refs/heads/master | /account/models.py | from django.db import models
# Create your models here.
class User(models.Model):
''' 用户类
'''
username = models.CharField(max_length=100, unique=True) # 用户名
email = models.CharField(max_length=100, unique=True) # 学邮
password = models.CharField(max_length=100, default="") # 密码
... | {"/issue/admin.py": ["/issue/models.py"], "/image/views.py": ["/account/models.py"], "/issue/views.py": ["/issue/models.py", "/account/models.py", "/comment/models.py", "/account/utils/message.py"], "/account/utils/verification.py": ["/account/models.py"], "/account/utils/message.py": ["/account/models.py", "/issue/mod... |
51,388 | FDUSoftware2020/backend | refs/heads/master | /issue/admin.py | from django.contrib import admin
from .models import Issue, Answer
# Register your models here.
class AnswerInline(admin.TabularInline):
model = Answer
fields = ['replier', 'pub_date', 'content']
extra = 0
class IssueAdmin(admin.ModelAdmin):
# add list at the admin site
list_display = ('Type', 't... | {"/issue/admin.py": ["/issue/models.py"], "/image/views.py": ["/account/models.py"], "/issue/views.py": ["/issue/models.py", "/account/models.py", "/comment/models.py", "/account/utils/message.py"], "/account/utils/verification.py": ["/account/models.py"], "/account/utils/message.py": ["/account/models.py", "/issue/mod... |
51,389 | FDUSoftware2020/backend | refs/heads/master | /image/urls.py | from django.urls import path
from . import views
app_name = 'image'
urlpatterns = [
# ex: /image/upload/
path('upload/', views.upload, name='upload'),
] | {"/issue/admin.py": ["/issue/models.py"], "/image/views.py": ["/account/models.py"], "/issue/views.py": ["/issue/models.py", "/account/models.py", "/comment/models.py", "/account/utils/message.py"], "/account/utils/verification.py": ["/account/models.py"], "/account/utils/message.py": ["/account/models.py", "/issue/mod... |
51,390 | FDUSoftware2020/backend | refs/heads/master | /issue/migrations/0004_auto_20200505_1445.py | # Generated by Django 3.0.3 on 2020-05-05 06:45
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('account', '0004_auto_20200430_1627'),
('issue', '0003_auto_20200505_1435'),
]
operations = [
migrat... | {"/issue/admin.py": ["/issue/models.py"], "/image/views.py": ["/account/models.py"], "/issue/views.py": ["/issue/models.py", "/account/models.py", "/comment/models.py", "/account/utils/message.py"], "/account/utils/verification.py": ["/account/models.py"], "/account/utils/message.py": ["/account/models.py", "/issue/mod... |
51,391 | FDUSoftware2020/backend | refs/heads/master | /comment/urls.py | from django.urls import path
from . import views
app_name = 'comment'
urlpatterns = [
# ex: /comment/create/
path('create/', views.comment_create, name='comment_create'),
# ex: /comment/2/delete/
path('<int:comment_id>/delete/', views.comment_delete, name='comment_delete'),
# ex: /comment/2/detail/
... | {"/issue/admin.py": ["/issue/models.py"], "/image/views.py": ["/account/models.py"], "/issue/views.py": ["/issue/models.py", "/account/models.py", "/comment/models.py", "/account/utils/message.py"], "/account/utils/verification.py": ["/account/models.py"], "/account/utils/message.py": ["/account/models.py", "/issue/mod... |
51,392 | FDUSoftware2020/backend | refs/heads/master | /issue/models.py | from django.db import models
# Create your models here.
class Issue(models.Model):
''' 定义Issue类
'''
class IssueType(models.IntegerChoices):
ISSUE = 0
ARTICLE = 1
Type = models.IntegerField(choices=IssueType.choices) # 类型, issue or articl... | {"/issue/admin.py": ["/issue/models.py"], "/image/views.py": ["/account/models.py"], "/issue/views.py": ["/issue/models.py", "/account/models.py", "/comment/models.py", "/account/utils/message.py"], "/account/utils/verification.py": ["/account/models.py"], "/account/utils/message.py": ["/account/models.py", "/issue/mod... |
51,393 | FDUSoftware2020/backend | refs/heads/master | /account/migrations/0003_auto_20200424_1657.py | # Generated by Django 3.0.3 on 2020-04-24 08:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('account', '0002_auto_20200327_1541'),
]
operations = [
migrations.AddField(
model_name='user',
name='contribution',
... | {"/issue/admin.py": ["/issue/models.py"], "/image/views.py": ["/account/models.py"], "/issue/views.py": ["/issue/models.py", "/account/models.py", "/comment/models.py", "/account/utils/message.py"], "/account/utils/verification.py": ["/account/models.py"], "/account/utils/message.py": ["/account/models.py", "/issue/mod... |
51,394 | FDUSoftware2020/backend | refs/heads/master | /issue/urls.py | from django.urls import path
from . import views
app_name = 'issue'
urlpatterns = [
# ex: /issue/create/
path('create/', views.issue_create, name='issue_create'),
# ex: /issue/2/delete/
path('<int:issue_id>/delete/', views.issue_delete, name='issue_delete'),
# ex: /issue/2/detail/
path('<int:issu... | {"/issue/admin.py": ["/issue/models.py"], "/image/views.py": ["/account/models.py"], "/issue/views.py": ["/issue/models.py", "/account/models.py", "/comment/models.py", "/account/utils/message.py"], "/account/utils/verification.py": ["/account/models.py"], "/account/utils/message.py": ["/account/models.py", "/issue/mod... |
51,395 | FDUSoftware2020/backend | refs/heads/master | /comment/models.py | from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.db import models
# Create your models here.
class Comment(models.Model):
"""
Define Comment Model, Level 1.
"""
from_id = models.ForeignKey('account.User', on_delete=... | {"/issue/admin.py": ["/issue/models.py"], "/image/views.py": ["/account/models.py"], "/issue/views.py": ["/issue/models.py", "/account/models.py", "/comment/models.py", "/account/utils/message.py"], "/account/utils/verification.py": ["/account/models.py"], "/account/utils/message.py": ["/account/models.py", "/issue/mod... |
51,396 | FDUSoftware2020/backend | refs/heads/master | /account/migrations/0004_auto_20200430_1627.py | # Generated by Django 3.0.3 on 2020-04-30 08:27
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('account', '0003_auto_20200424_1657'),
]
operations = [
migrations.AlterField(
model_name='user',
name='signature',
... | {"/issue/admin.py": ["/issue/models.py"], "/image/views.py": ["/account/models.py"], "/issue/views.py": ["/issue/models.py", "/account/models.py", "/comment/models.py", "/account/utils/message.py"], "/account/utils/verification.py": ["/account/models.py"], "/account/utils/message.py": ["/account/models.py", "/issue/mod... |
51,397 | FDUSoftware2020/backend | refs/heads/master | /image/views.py | import os
import json
from django.utils import timezone
from django.http import HttpResponse
from django.utils import timezone
from django.conf import settings
from account.models import User
# Create your views here.
# HOST = "http://127.0.0.1:8000"
HOST = "http://182.92.131.202:8000"
def upload(request):
''' ... | {"/issue/admin.py": ["/issue/models.py"], "/image/views.py": ["/account/models.py"], "/issue/views.py": ["/issue/models.py", "/account/models.py", "/comment/models.py", "/account/utils/message.py"], "/account/utils/verification.py": ["/account/models.py"], "/account/utils/message.py": ["/account/models.py", "/issue/mod... |
51,398 | FDUSoftware2020/backend | refs/heads/master | /account/migrations/0002_auto_20200327_1541.py | # Generated by Django 3.0.3 on 2020-03-27 07:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('account', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='VerificationCode',
fields=[
... | {"/issue/admin.py": ["/issue/models.py"], "/image/views.py": ["/account/models.py"], "/issue/views.py": ["/issue/models.py", "/account/models.py", "/comment/models.py", "/account/utils/message.py"], "/account/utils/verification.py": ["/account/models.py"], "/account/utils/message.py": ["/account/models.py", "/issue/mod... |
51,399 | FDUSoftware2020/backend | refs/heads/master | /account/migrations/0005_message.py | # Generated by Django 3.0.3 on 2020-06-07 06:47
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('account', '0004_auto_20200430_1627'),
]
operations = [
migrations.CreateModel(
name='Message',
... | {"/issue/admin.py": ["/issue/models.py"], "/image/views.py": ["/account/models.py"], "/issue/views.py": ["/issue/models.py", "/account/models.py", "/comment/models.py", "/account/utils/message.py"], "/account/utils/verification.py": ["/account/models.py"], "/account/utils/message.py": ["/account/models.py", "/issue/mod... |
51,400 | FDUSoftware2020/backend | refs/heads/master | /issue/views.py | import json
from django.http import HttpResponse
from django.utils import timezone
from .models import Issue, Answer
from account.models import User, Message
from comment.models import Comment
from account.utils.message import create_message
# Create your views here.
def issue_create(request):
''' 创建一个新Issue
... | {"/issue/admin.py": ["/issue/models.py"], "/image/views.py": ["/account/models.py"], "/issue/views.py": ["/issue/models.py", "/account/models.py", "/comment/models.py", "/account/utils/message.py"], "/account/utils/verification.py": ["/account/models.py"], "/account/utils/message.py": ["/account/models.py", "/issue/mod... |
51,401 | FDUSoftware2020/backend | refs/heads/master | /account/urls.py | from django.urls import path
from . import views
app_name = 'account'
urlpatterns = [
# ex: /account/register
path('register/', views.register, name='register'),
# ex: /account/login
path('login/', views.login, name='login'),
# ex: /account/logout
path('logout/', views.logout, name='logout'),
# ... | {"/issue/admin.py": ["/issue/models.py"], "/image/views.py": ["/account/models.py"], "/issue/views.py": ["/issue/models.py", "/account/models.py", "/comment/models.py", "/account/utils/message.py"], "/account/utils/verification.py": ["/account/models.py"], "/account/utils/message.py": ["/account/models.py", "/issue/mod... |
51,402 | FDUSoftware2020/backend | refs/heads/master | /account/migrations/0006_auto_20200607_1455.py | # Generated by Django 3.0.3 on 2020-06-07 06:55
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('account', '0005_message'),
]
operations = [
migrations.AlterField(
model_name='message',
... | {"/issue/admin.py": ["/issue/models.py"], "/image/views.py": ["/account/models.py"], "/issue/views.py": ["/issue/models.py", "/account/models.py", "/comment/models.py", "/account/utils/message.py"], "/account/utils/verification.py": ["/account/models.py"], "/account/utils/message.py": ["/account/models.py", "/issue/mod... |
51,403 | FDUSoftware2020/backend | refs/heads/master | /account/utils/verification.py | from ..models import VerificationCode
def make_verification_code():
''' 随机生成4位验证码
'''
code = ""
for i in range(4):
code += str(random.randint(0, 9))
return code
def save_verification_code(email, code):
''' 保存验证码,email不可为空
'''
if not VerificationCode.objects.filter(email=ema... | {"/issue/admin.py": ["/issue/models.py"], "/image/views.py": ["/account/models.py"], "/issue/views.py": ["/issue/models.py", "/account/models.py", "/comment/models.py", "/account/utils/message.py"], "/account/utils/verification.py": ["/account/models.py"], "/account/utils/message.py": ["/account/models.py", "/issue/mod... |
51,404 | FDUSoftware2020/backend | refs/heads/master | /issue/migrations/0002_auto_20200430_2111.py | # Generated by Django 3.0.3 on 2020-04-30 13:11
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('account', '0004_auto_20200430_1627'),
('issue', '0001_initial'),
]
operations = [
migrations.RenameField(
model_name='an... | {"/issue/admin.py": ["/issue/models.py"], "/image/views.py": ["/account/models.py"], "/issue/views.py": ["/issue/models.py", "/account/models.py", "/comment/models.py", "/account/utils/message.py"], "/account/utils/verification.py": ["/account/models.py"], "/account/utils/message.py": ["/account/models.py", "/issue/mod... |
51,405 | FDUSoftware2020/backend | refs/heads/master | /comment/migrations/0001_initial.py | # Generated by Django 3.0.4 on 2020-05-04 09:21
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
('account', '0004_auto_20200430_1627'),
]
... | {"/issue/admin.py": ["/issue/models.py"], "/image/views.py": ["/account/models.py"], "/issue/views.py": ["/issue/models.py", "/account/models.py", "/comment/models.py", "/account/utils/message.py"], "/account/utils/verification.py": ["/account/models.py"], "/account/utils/message.py": ["/account/models.py", "/issue/mod... |
51,406 | FDUSoftware2020/backend | refs/heads/master | /account/utils/message.py | from ..models import User, Message
from issue.models import Issue, Answer
from comment.models import Comment
def create_message(Type, obj):
''' 创建message,有如下三大类情况:
1)问题新增回答:obj是Answer实例
2)文章新增评论:obj是Comment实例
3)回答新增评论:obj是Comment实例
'''
if Type == Message.MsgType.AnswerToIssue:
content ... | {"/issue/admin.py": ["/issue/models.py"], "/image/views.py": ["/account/models.py"], "/issue/views.py": ["/issue/models.py", "/account/models.py", "/comment/models.py", "/account/utils/message.py"], "/account/utils/verification.py": ["/account/models.py"], "/account/utils/message.py": ["/account/models.py", "/issue/mod... |
51,407 | FDUSoftware2020/backend | refs/heads/master | /comment/views.py | from django.shortcuts import render
import json
from django.http import HttpResponse
from django.utils import timezone
from django.contrib.contenttypes.models import ContentType
from account.models import User, Message
from issue.models import Issue, Answer
from .models import Comment
from account.utils.message import ... | {"/issue/admin.py": ["/issue/models.py"], "/image/views.py": ["/account/models.py"], "/issue/views.py": ["/issue/models.py", "/account/models.py", "/comment/models.py", "/account/utils/message.py"], "/account/utils/verification.py": ["/account/models.py"], "/account/utils/message.py": ["/account/models.py", "/issue/mod... |
51,408 | FDUSoftware2020/backend | refs/heads/master | /account/views.py | import json, random, datetime
from django.shortcuts import render
from django.http import HttpResponse
from django.core.mail import send_mail
from django.utils import timezone
from .models import User, VerificationCode, Message
from .utils.verification import make_verification_code, check_verification_code, save_verifi... | {"/issue/admin.py": ["/issue/models.py"], "/image/views.py": ["/account/models.py"], "/issue/views.py": ["/issue/models.py", "/account/models.py", "/comment/models.py", "/account/utils/message.py"], "/account/utils/verification.py": ["/account/models.py"], "/account/utils/message.py": ["/account/models.py", "/issue/mod... |
51,426 | blorenz/braner | refs/heads/master | /cmsplugin_video_gallery/admin.py | from inline_ordering.admin import OrderableStackedInline
import forms
import models
class VideoInline(OrderableStackedInline):
model = models.Video
form = forms.VideoForm
# gallery = models.ForeignKey(VideoGalleryPlugin, verbose_name=_("Gallery"))
# src = models.ImageField(_("Poster image file"), upload_to=g... | {"/braner/settings/__init__.py": ["/braner/settings/basesettings.py"]} |
51,427 | blorenz/braner | refs/heads/master | /cmsplugin_video_gallery/settings.py | from django.conf import settings
# Autoplay
CMS_VIMEO_DEFAULT_AUTOPLAY = getattr(settings, 'CMS_VIMEO_DEFAULT_AUTOPLAY', True)
# Width & Height
CMS_VIMEO_DEFAULT_WIDTH = getattr(settings, 'CMS_VIMEO_DEFAULT_WIDTH', 640)
CMS_VIMEO_DEFAULT_HEIGHT = getattr(settings, 'CMS_VIMEO_DEFAULT_HEIGHT', 420)
# Border
CMS_VIMEO_... | {"/braner/settings/__init__.py": ["/braner/settings/basesettings.py"]} |
51,428 | blorenz/braner | refs/heads/master | /cmsplugin_video_gallery/models.py | import threading
from cms.models import CMSPlugin
from django.db import models
from django.utils.translation import ugettext_lazy as _
from inline_ordering.models import Orderable
from cmsplugin_video_gallery import settings
import utils
localdata = threading.local()
localdata.TEMPLATE_CHOICES = utils.autodiscover_t... | {"/braner/settings/__init__.py": ["/braner/settings/basesettings.py"]} |
51,429 | blorenz/braner | refs/heads/master | /braner_plugins/cmsplugin_custom_contact/forms.py | from django import forms
from cmsplugin_contact.forms import ContactForm
class CustomContactForm(forms.Form):
email = forms.EmailField()
content = forms.CharField(widget=forms.Textarea())
name = forms.CharField()
company = forms.CharField()
phone = forms.CharField() | {"/braner/settings/__init__.py": ["/braner/settings/basesettings.py"]} |
51,430 | blorenz/braner | refs/heads/master | /cmsplugin_video_gallery/cms_plugins.py | from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from django.utils.translation import ugettext_lazy as _
import admin
import models
class CMSVideoGalleryPlugin(CMSPluginBase):
model = models.VideoGalleryPlugin
inlines = [admin.VideoInline, ]
name = _('Video gallery')
... | {"/braner/settings/__init__.py": ["/braner/settings/basesettings.py"]} |
51,431 | blorenz/braner | refs/heads/master | /braner_plugins/cmsplugin_custom_contact/models.py | from django.db import models
from cmsplugin_contact.models import BaseContact
from django.utils.translation import ugettext_lazy as _
class CustomContact(BaseContact):
phone_label = models.CharField(
_('Phone label'),
default=_('Phone'), max_length=20)
name_label = models.CharField(
_('... | {"/braner/settings/__init__.py": ["/braner/settings/basesettings.py"]} |
51,432 | blorenz/braner | refs/heads/master | /braner/settings/basesettings.py | """
Django settings for braner project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
imp... | {"/braner/settings/__init__.py": ["/braner/settings/basesettings.py"]} |
51,433 | blorenz/braner | refs/heads/master | /cmsplugin_video_gallery/migrations/0004_auto__del_field_video_video_width__del_field_video_video_height__del_f.py | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'Video.video_width'
db.delete_column(u'cmsplugin_video_g... | {"/braner/settings/__init__.py": ["/braner/settings/basesettings.py"]} |
51,434 | blorenz/braner | refs/heads/master | /braner/settings/__init__.py | from .basesettings import *
from .localsettings import * | {"/braner/settings/__init__.py": ["/braner/settings/basesettings.py"]} |
51,435 | blorenz/braner | refs/heads/master | /braner/views.py | from django.http import HttpResponseRedirect
def home(request):
return HttpResponseRedirect("/en/")
| {"/braner/settings/__init__.py": ["/braner/settings/basesettings.py"]} |
51,446 | namanchikara/Voice-based-email-system-for-visually-challenged | refs/heads/master | /voicemail/__init__.py | import sys
from pathlib import Path
from config import MailConfig
from mail.Mail import Mail
from mail.Recipient import Recipient
sys.path.extend([str(Path(sys.argv[0]).parent), str(Path(sys.argv[0]).parent.parent)])
from voicemail.Audio import Audio
from voicemail.SpeechToText import SpeechToText
from voicemail.Tex... | {"/voicemail/__init__.py": ["/voicemail/Audio.py", "/voicemail/SpeechToText.py", "/voicemail/TextToSpeech.py"]} |
51,447 | namanchikara/Voice-based-email-system-for-visually-challenged | refs/heads/master | /voicemail/config/LanguageConfig.py | text_to_speech_english = 'en'
speech_to_text_english = 'en-IN' | {"/voicemail/__init__.py": ["/voicemail/Audio.py", "/voicemail/SpeechToText.py", "/voicemail/TextToSpeech.py"]} |
51,448 | namanchikara/Voice-based-email-system-for-visually-challenged | refs/heads/master | /voicemail/SpeechToText.py | import speech_recognition as sr
from enum import Enum
from config import LanguageConfig
from TextToSpeech import TextToSpeech
class SpeechToText:
def __init__(self, audio, language=LanguageConfig.speech_to_text_english):
self.r = sr.Recognizer()
self.audio = audio
self.message = None
... | {"/voicemail/__init__.py": ["/voicemail/Audio.py", "/voicemail/SpeechToText.py", "/voicemail/TextToSpeech.py"]} |
51,449 | namanchikara/Voice-based-email-system-for-visually-challenged | refs/heads/master | /voicemail/Audio.py | import speech_recognition as sr
from TextToSpeech import TextToSpeech
class Audio:
def __init__(self):
self.r = sr.Recognizer()
self.audio = None
def record(self):
with sr.Microphone() as source:
print("I'm listening, Go on")
TextToSpeech("I'm listening, Go on... | {"/voicemail/__init__.py": ["/voicemail/Audio.py", "/voicemail/SpeechToText.py", "/voicemail/TextToSpeech.py"]} |
51,450 | namanchikara/Voice-based-email-system-for-visually-challenged | refs/heads/master | /voicemail/TextToSpeech.py | import hashlib
import os
import tempfile
import time
import pyglet
import pyttsx3
from gtts import gTTS
from config import LanguageConfig
class TextToSpeech:
def __init__(self, text, language=LanguageConfig.text_to_speech_english) -> None:
self.text = text
self.lang = language
self.file_... | {"/voicemail/__init__.py": ["/voicemail/Audio.py", "/voicemail/SpeechToText.py", "/voicemail/TextToSpeech.py"]} |
51,451 | namanchikara/Voice-based-email-system-for-visually-challenged | refs/heads/master | /voicemail/mail/Compose.py | from TextToSpeech import TextToSpeech
from Audio import Audio
from SpeechToText import SpeechToText
from config import LanguageConfig
from difflib import SequenceMatcher
class Compose:
def __init__(self, language=LanguageConfig.speech_to_text_english):
self.subject = ''
self.body = ''
se... | {"/voicemail/__init__.py": ["/voicemail/Audio.py", "/voicemail/SpeechToText.py", "/voicemail/TextToSpeech.py"]} |
51,452 | namanchikara/Voice-based-email-system-for-visually-challenged | refs/heads/master | /voicemail/mail/Recipient.py | from TextToSpeech import TextToSpeech
from SpeechToText import SpeechToText
from Audio import Audio
from difflib import SequenceMatcher
class Recipient:
def __init__(self):
self.email_addresses = {
"Naman": "singhnamanchikara@gmail.com",
"Shantanu": "shantanublahblah@gmail.com",
... | {"/voicemail/__init__.py": ["/voicemail/Audio.py", "/voicemail/SpeechToText.py", "/voicemail/TextToSpeech.py"]} |
51,453 | namanchikara/Voice-based-email-system-for-visually-challenged | refs/heads/master | /voicemail/mail/Mail.py | import smtplib
from TextToSpeech import TextToSpeech
from mail.Compose import Compose
from SpeechToText import SpeechToText
from Audio import Audio
class Mail:
def __init__(self, email, password, to_mail):
self.email_address = email
self.password = password
self.email = Compose()
... | {"/voicemail/__init__.py": ["/voicemail/Audio.py", "/voicemail/SpeechToText.py", "/voicemail/TextToSpeech.py"]} |
51,456 | cdbethune/sloth-d3m-wrapper | refs/heads/master | /SlothD3MWrapper/__init__.py | from SlothD3MWrapper.Storc import Storc
__version__ = '2.0.1'
__all__ = [
"Storc"
] | {"/SlothD3MWrapper/__init__.py": ["/SlothD3MWrapper/Storc.py"]} |
51,457 | cdbethune/sloth-d3m-wrapper | refs/heads/master | /setup.py | from distutils.core import setup
setup(name='SlothD3MWrapper',
version='2.0.1',
description='A thin wrapper for interacting with New Knowledge time series tool library Sloth',
packages=['SlothD3MWrapper'],
install_requires=["Sloth==2.0.2"],
dependency_links=[
"git+https://github.com/NewKnow... | {"/SlothD3MWrapper/__init__.py": ["/SlothD3MWrapper/Storc.py"]} |
51,458 | cdbethune/sloth-d3m-wrapper | refs/heads/master | /SlothD3MWrapper/Storc.py | import sys
import os.path
import numpy as np
import pandas
from Sloth import Sloth
from tslearn.datasets import CachedDatasets
from d3m.primitive_interfaces.transformer import TransformerPrimitiveBase
from d3m.primitive_interfaces.base import CallResult
from d3m import container, utils
from d3m.container import Data... | {"/SlothD3MWrapper/__init__.py": ["/SlothD3MWrapper/Storc.py"]} |
51,459 | nirvguy/pyS | refs/heads/master | /pyS/S/language.py | from .datatypes import SInt, STuple, SList
from . import RT
class SInstruction(SInt):
"""S Instruction
"""
def __init__(self, z):
SInt.__init__(self, z)
def decode(self):
"""Decodes S Instruction into a S Runtime Instruction
"""
(a, y) = STuple(self.z).decode()
... | {"/pyS/S/language.py": ["/pyS/S/datatypes.py"], "/pyS/S/interp.py": ["/pyS/S/language.py", "/pyS/S/RT.py"], "/pyS/parser/parser.py": ["/pyS/S/language.py"], "/pyS/parser/lexer_rules.py": ["/pyS/parser/tokens.py"], "/pyS/Sdbg.py": ["/pyS/S/language.py", "/pyS/S/interp.py"], "/pyS/Srun.py": ["/pyS/S/language.py", "/pyS/S... |
51,460 | nirvguy/pyS | refs/heads/master | /pyS/S/RT.py | from enum import Enum
class InstructionType(Enum):
"""Enum for the instruction types
"""
Assign=0
Increment=1
Decrement=2
Goto=3
class Instruction:
"""Runtime S Instruction
Attributes:
label (int): Label number at the instruction
... | {"/pyS/S/language.py": ["/pyS/S/datatypes.py"], "/pyS/S/interp.py": ["/pyS/S/language.py", "/pyS/S/RT.py"], "/pyS/parser/parser.py": ["/pyS/S/language.py"], "/pyS/parser/lexer_rules.py": ["/pyS/parser/tokens.py"], "/pyS/Sdbg.py": ["/pyS/S/language.py", "/pyS/S/interp.py"], "/pyS/Srun.py": ["/pyS/S/language.py", "/pyS/S... |
51,461 | nirvguy/pyS | refs/heads/master | /pyS/S/interp.py | #!/usr/bin/env
from .language import SProgram
from .RT import InstructionType
class StopProgram(Exception):
pass
class Variables:
def __init__(self):
self._vars = {}
def set(self, nvar, value):
if value <= 0:
self._vars.pop(nvar, None)
else:
self._vars[nvar... | {"/pyS/S/language.py": ["/pyS/S/datatypes.py"], "/pyS/S/interp.py": ["/pyS/S/language.py", "/pyS/S/RT.py"], "/pyS/parser/parser.py": ["/pyS/S/language.py"], "/pyS/parser/lexer_rules.py": ["/pyS/parser/tokens.py"], "/pyS/Sdbg.py": ["/pyS/S/language.py", "/pyS/S/interp.py"], "/pyS/Srun.py": ["/pyS/S/language.py", "/pyS/S... |
51,462 | nirvguy/pyS | refs/heads/master | /pyS/config.py | VERSION='0.1.0'
LIST_LINES = 10
| {"/pyS/S/language.py": ["/pyS/S/datatypes.py"], "/pyS/S/interp.py": ["/pyS/S/language.py", "/pyS/S/RT.py"], "/pyS/parser/parser.py": ["/pyS/S/language.py"], "/pyS/parser/lexer_rules.py": ["/pyS/parser/tokens.py"], "/pyS/Sdbg.py": ["/pyS/S/language.py", "/pyS/S/interp.py"], "/pyS/Srun.py": ["/pyS/S/language.py", "/pyS/S... |
51,463 | nirvguy/pyS | refs/heads/master | /pyS/parser/parser.py | from ply.lex import lex
from ply.yacc import yacc
from ..S.language import SProgram
from . import lexer_rules
from . import parser_rules
def parse(strcode):
lexer = lex(module=lexer_rules)
parser = yacc(module=parser_rules)
return SProgram.encode(parser.parse(strcode, lexer))
| {"/pyS/S/language.py": ["/pyS/S/datatypes.py"], "/pyS/S/interp.py": ["/pyS/S/language.py", "/pyS/S/RT.py"], "/pyS/parser/parser.py": ["/pyS/S/language.py"], "/pyS/parser/lexer_rules.py": ["/pyS/parser/tokens.py"], "/pyS/Sdbg.py": ["/pyS/S/language.py", "/pyS/S/interp.py"], "/pyS/Srun.py": ["/pyS/S/language.py", "/pyS/S... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.