index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
53,270
alexdy2007/reidentification_hacky
refs/heads/master
/webserver/person/person.py
from flask_restful import Resource from db_connection.PeopleDB import PeopleDB from flask import jsonify, request crud = PeopleDB() class Person(Resource): def get(self, role=None, name=None): query = {} if name: query["name"] = name query["role"] = role people = c...
{"/tests/db_tests/crud_test.py": ["/db_connection/PeopleDB.py"], "/tests/db_tests/test_insert_person_seen_from_camera.py": ["/sockets/PictureRecSocket.py", "/db_connection/Crud.py", "/model/compare_single_to_known_faces.py", "/model/get_feature_encoded_list.py"], "/webserver/main.py": ["/webserver/person/person.py", "/...
53,271
alexdy2007/reidentification_hacky
refs/heads/master
/tests/model_tests/test_get_encoding_list.py
from unittest import TestCase from db_connection.Crud import Crud import os from model.get_feature_encoded_list import get_feature_encoding_list CURRENT_DIR = os.path.dirname(os.path.realpath(__file__)) PICTURE_DIR = CURRENT_DIR + os.sep + ".." + os.sep + "pictures" + os.sep class TestGetEncodedListOfKnownPeople(Test...
{"/tests/db_tests/crud_test.py": ["/db_connection/PeopleDB.py"], "/tests/db_tests/test_insert_person_seen_from_camera.py": ["/sockets/PictureRecSocket.py", "/db_connection/Crud.py", "/model/compare_single_to_known_faces.py", "/model/get_feature_encoded_list.py"], "/webserver/main.py": ["/webserver/person/person.py", "/...
53,272
alexdy2007/reidentification_hacky
refs/heads/master
/pre_processing/insert_test_data.py
from db_connection.Crud import Crud import os import random from shutil import copyfile CURRENT_DIR = os.path.dirname(os.path.realpath(__file__)) PICTURE_DIR = CURRENT_DIR + os.sep + ".." + os.sep + "webface" + os.sep + "src" + os.sep + "assets" + os.sep + "pictures" + os.sep DATA_DIR = CURRENT_DIR + os.sep + ".." + o...
{"/tests/db_tests/crud_test.py": ["/db_connection/PeopleDB.py"], "/tests/db_tests/test_insert_person_seen_from_camera.py": ["/sockets/PictureRecSocket.py", "/db_connection/Crud.py", "/model/compare_single_to_known_faces.py", "/model/get_feature_encoded_list.py"], "/webserver/main.py": ["/webserver/person/person.py", "/...
53,273
alexdy2007/reidentification_hacky
refs/heads/master
/webserver/take_pictures/take_pictures.py
from model.compare_single_to_known_faces import compare_face_to_known from model.get_feature_encoded_list import get_feature_encoding_list from model.montage.create_montage_from_photos import create_montage from PIL import Image import os CURRENT_DIR = os.path.dirname(os.path.realpath(__file__)) UPLOAD_FOLDER = CURREN...
{"/tests/db_tests/crud_test.py": ["/db_connection/PeopleDB.py"], "/tests/db_tests/test_insert_person_seen_from_camera.py": ["/sockets/PictureRecSocket.py", "/db_connection/Crud.py", "/model/compare_single_to_known_faces.py", "/model/get_feature_encoded_list.py"], "/webserver/main.py": ["/webserver/person/person.py", "/...
53,274
alexdy2007/reidentification_hacky
refs/heads/master
/db_connection/Crud.py
import os from pymongo import MongoClient from tests.db_tests.test_data import TEST_DATA from datetime import datetime, timedelta #mongo -u ian -p secretPassword 123.45.67.89/cool_db class Crud(object): CURRENT_DIR = os.path.dirname(os.path.realpath(__file__)) PICTURE_DIR = CURRENT_DIR + os.sep + ".." + o...
{"/tests/db_tests/crud_test.py": ["/db_connection/PeopleDB.py"], "/tests/db_tests/test_insert_person_seen_from_camera.py": ["/sockets/PictureRecSocket.py", "/db_connection/Crud.py", "/model/compare_single_to_known_faces.py", "/model/get_feature_encoded_list.py"], "/webserver/main.py": ["/webserver/person/person.py", "/...
53,275
alexdy2007/reidentification_hacky
refs/heads/master
/model/encode_image.py
import face_recognition import numpy as np def encode_image(image): """ :param image: srt file location or np.array :return: [[int,int,..],[int,int,...],...] """ if isinstance(image, str): loaded_image = face_recognition.load_image_file(image) else: loaded_image = np.array(imag...
{"/tests/db_tests/crud_test.py": ["/db_connection/PeopleDB.py"], "/tests/db_tests/test_insert_person_seen_from_camera.py": ["/sockets/PictureRecSocket.py", "/db_connection/Crud.py", "/model/compare_single_to_known_faces.py", "/model/get_feature_encoded_list.py"], "/webserver/main.py": ["/webserver/person/person.py", "/...
53,276
alexdy2007/reidentification_hacky
refs/heads/master
/tests/model_tests/montage/test_match_all_photos.py
from model.montage.montage import Montage from unittest import TestCase import os from model.montage.create_montage_from_photos import create_montage CURRENT_DIR = os.path.dirname(os.path.realpath(__file__)) PICTURE_TEST_DIR = CURRENT_DIR + os.sep + ".." + os.sep + ".." + os.sep + ".." + os.sep + "data" + os.sep + "Mon...
{"/tests/db_tests/crud_test.py": ["/db_connection/PeopleDB.py"], "/tests/db_tests/test_insert_person_seen_from_camera.py": ["/sockets/PictureRecSocket.py", "/db_connection/Crud.py", "/model/compare_single_to_known_faces.py", "/model/get_feature_encoded_list.py"], "/webserver/main.py": ["/webserver/person/person.py", "/...
53,277
alexdy2007/reidentification_hacky
refs/heads/master
/tests/socket/test_picsocket.py
from unittest import TestCase from sockets.PictureRecSocket import SocketClient from db_connection.Crud import Crud from model.compare_single_to_known_faces import compare_face_to_known from model.crop_face_from_image import crop_face_from_image from model.get_feature_encoded_list import get_feature_encoding_list impor...
{"/tests/db_tests/crud_test.py": ["/db_connection/PeopleDB.py"], "/tests/db_tests/test_insert_person_seen_from_camera.py": ["/sockets/PictureRecSocket.py", "/db_connection/Crud.py", "/model/compare_single_to_known_faces.py", "/model/get_feature_encoded_list.py"], "/webserver/main.py": ["/webserver/person/person.py", "/...
53,278
alexdy2007/reidentification_hacky
refs/heads/master
/model/montage/montage.py
from db_connection.MontageDB import MontageDB from model.encode_image import encode_image from model.montage.check_person_in_photo import is_in_photo import os CURRENT_DIR = os.path.dirname(os.path.realpath(__file__)) SAVE_FILE = CURRENT_DIR class Montage(): def __init__(self): self.montageDB = MontageDB...
{"/tests/db_tests/crud_test.py": ["/db_connection/PeopleDB.py"], "/tests/db_tests/test_insert_person_seen_from_camera.py": ["/sockets/PictureRecSocket.py", "/db_connection/Crud.py", "/model/compare_single_to_known_faces.py", "/model/get_feature_encoded_list.py"], "/webserver/main.py": ["/webserver/person/person.py", "/...
53,279
alexdy2007/reidentification_hacky
refs/heads/master
/model/montage/create_montage_from_photos.py
from imutils import build_montages import math import random import os import cv2 CURRENT_DIR = os.path.dirname(os.path.realpath(__file__)) TMP_DIR = CURRENT_DIR + os.sep + ".." + os.sep + ".." + os.sep \ + "webserver" + os.sep + "static" + os.sep + "tmp" + os.sep TMP_MONTAGE_FILE0 = TMP_DIR + "montage0.jpg" TMP...
{"/tests/db_tests/crud_test.py": ["/db_connection/PeopleDB.py"], "/tests/db_tests/test_insert_person_seen_from_camera.py": ["/sockets/PictureRecSocket.py", "/db_connection/Crud.py", "/model/compare_single_to_known_faces.py", "/model/get_feature_encoded_list.py"], "/webserver/main.py": ["/webserver/person/person.py", "/...
53,280
alexdy2007/reidentification_hacky
refs/heads/master
/sockets/PictureRecSocket.py
import socket import pickle import numpy as np import atexit class SocketClient(object): def __init__(self): #host = '192.168.0.48' host = '10.42.0.192' port = 5560 self.soc = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.soc.connect((host, port)) def get_pict...
{"/tests/db_tests/crud_test.py": ["/db_connection/PeopleDB.py"], "/tests/db_tests/test_insert_person_seen_from_camera.py": ["/sockets/PictureRecSocket.py", "/db_connection/Crud.py", "/model/compare_single_to_known_faces.py", "/model/get_feature_encoded_list.py"], "/webserver/main.py": ["/webserver/person/person.py", "/...
53,281
alexdy2007/reidentification_hacky
refs/heads/master
/tests/model_tests/test_encode_image.py
from unittest import TestCase from db_connection.Crud import Crud import os from model.crop_face_from_image import crop_face_from_image from model.encode_image import encode_image CURRENT_DIR = os.path.dirname(os.path.realpath(__file__)) PICTURE_DIR = CURRENT_DIR + os.sep + ".." + os.sep + "pictures" + os.sep MONTAGE_...
{"/tests/db_tests/crud_test.py": ["/db_connection/PeopleDB.py"], "/tests/db_tests/test_insert_person_seen_from_camera.py": ["/sockets/PictureRecSocket.py", "/db_connection/Crud.py", "/model/compare_single_to_known_faces.py", "/model/get_feature_encoded_list.py"], "/webserver/main.py": ["/webserver/person/person.py", "/...
53,282
alexdy2007/reidentification_hacky
refs/heads/master
/db_connection/MontageDB.py
from db_connection.Crud import Crud import numpy as np from bson.binary import Binary import pickle class MontageDB(Crud): def __init__(self): super().__init__() self.target_db = self.db.montagephotos def insert_new_picture(self, photo_location, face_encodings): """ :param pho...
{"/tests/db_tests/crud_test.py": ["/db_connection/PeopleDB.py"], "/tests/db_tests/test_insert_person_seen_from_camera.py": ["/sockets/PictureRecSocket.py", "/db_connection/Crud.py", "/model/compare_single_to_known_faces.py", "/model/get_feature_encoded_list.py"], "/webserver/main.py": ["/webserver/person/person.py", "/...
53,283
alexdy2007/reidentification_hacky
refs/heads/master
/tests/model_tests/test_crop_image.py
from unittest import TestCase import os from model.crop_face_from_image import crop_face_from_image CURRENT_DIR = os.path.dirname(os.path.realpath(__file__)) PICTURE_DIR = CURRENT_DIR + os.sep + ".." + os.sep + ".." + os.sep + "pictures" + os.sep class TestCropImage(TestCase): def test_crop_image(self): ...
{"/tests/db_tests/crud_test.py": ["/db_connection/PeopleDB.py"], "/tests/db_tests/test_insert_person_seen_from_camera.py": ["/sockets/PictureRecSocket.py", "/db_connection/Crud.py", "/model/compare_single_to_known_faces.py", "/model/get_feature_encoded_list.py"], "/webserver/main.py": ["/webserver/person/person.py", "/...
53,284
alexdy2007/reidentification_hacky
refs/heads/master
/tests/preprocessing_tests/test_encode_test_images.py
from unittest import TestCase from model.crop_face_from_image import crop_face_from_image from pre_processing.insert_test_data import insert_test_faces_into_db from pre_processing.encode_test_data import encode_all_people_in_db from db_connection.Crud import Crud import os CURRENT_DIR = os.path.dirname(os.path.realpat...
{"/tests/db_tests/crud_test.py": ["/db_connection/PeopleDB.py"], "/tests/db_tests/test_insert_person_seen_from_camera.py": ["/sockets/PictureRecSocket.py", "/db_connection/Crud.py", "/model/compare_single_to_known_faces.py", "/model/get_feature_encoded_list.py"], "/webserver/main.py": ["/webserver/person/person.py", "/...
53,285
alexdy2007/reidentification_hacky
refs/heads/master
/pre_processing/encode_test_data.py
from db_connection.Crud import Crud from model.encode_image import encode_image def encode_all_people_in_db(): crud = Crud() people = crud.get_person({}) for person in people: image_location = person["photo_location"] image_encoding = encode_image(image_location) if len(image_encodi...
{"/tests/db_tests/crud_test.py": ["/db_connection/PeopleDB.py"], "/tests/db_tests/test_insert_person_seen_from_camera.py": ["/sockets/PictureRecSocket.py", "/db_connection/Crud.py", "/model/compare_single_to_known_faces.py", "/model/get_feature_encoded_list.py"], "/webserver/main.py": ["/webserver/person/person.py", "/...
53,286
alexdy2007/reidentification_hacky
refs/heads/master
/model/get_feature_encoded_list.py
from db_connection.PeopleDB import PeopleDB def get_feature_encoding_list(): crud = PeopleDB() people = crud.get_person({"has_encodings":True}) encoding_list = [] name_list = [] for person in people: name_list.append(person["name"]) encoding_list.append(person["encoded_face"]) ...
{"/tests/db_tests/crud_test.py": ["/db_connection/PeopleDB.py"], "/tests/db_tests/test_insert_person_seen_from_camera.py": ["/sockets/PictureRecSocket.py", "/db_connection/Crud.py", "/model/compare_single_to_known_faces.py", "/model/get_feature_encoded_list.py"], "/webserver/main.py": ["/webserver/person/person.py", "/...
53,288
ggnight82/netflix
refs/heads/master
/account/serializers.py
from rest_framework import serializers from .models import User class UserRegistrationSerializer(serializers.ModelSerializer): password2 = serializers.CharField(style={'input_type':'password'}, write_only=True) class Meta: model = User fields = ['email', 'username','rating','first_name','last...
{"/account/serializers.py": ["/account/models.py"], "/browse/views.py": ["/browse/models.py", "/browse/serializers.py"], "/browse/admin.py": ["/browse/models.py"]}
53,289
ggnight82/netflix
refs/heads/master
/browse/serializers.py
from rest_framework import serializers from . import models class ContentsSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = models.Contents fields = '__all__'
{"/account/serializers.py": ["/account/models.py"], "/browse/views.py": ["/browse/models.py", "/browse/serializers.py"], "/browse/admin.py": ["/browse/models.py"]}
53,290
ggnight82/netflix
refs/heads/master
/my_database_setting.py
DATABASES = { 'default' : { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'netflix', 'USER': 'root', 'HOST': 'localhost', 'PORT': '3306', } } SECRET_KEY = 'za1m...
{"/account/serializers.py": ["/account/models.py"], "/browse/views.py": ["/browse/models.py", "/browse/serializers.py"], "/browse/admin.py": ["/browse/models.py"]}
53,291
ggnight82/netflix
refs/heads/master
/browse/models.py
from django.db import models # Create your models here. class Genres(models.Model): genre_genre = models.CharField(max_length=20) def __str__(self): return self.genre_genre class Actors(models.Model): actor_name = models.CharField(max_length=20) def __str__(self): return self.actor...
{"/account/serializers.py": ["/account/models.py"], "/browse/views.py": ["/browse/models.py", "/browse/serializers.py"], "/browse/admin.py": ["/browse/models.py"]}
53,292
ggnight82/netflix
refs/heads/master
/UserAccount/migrations/0001_initial.py
# Generated by Django 3.1.7 on 2021-03-09 15:33 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='User', fields=[ ('password', models.CharFie...
{"/account/serializers.py": ["/account/models.py"], "/browse/views.py": ["/browse/models.py", "/browse/serializers.py"], "/browse/admin.py": ["/browse/models.py"]}
53,293
ggnight82/netflix
refs/heads/master
/account/models.py
from django.db import models from django.contrib.auth.models import AbstractUser, BaseUserManager, AbstractBaseUser class MyUserManager(BaseUserManager): def create_user(self,email,username,rating,first_name,last_name,password=None): user = self.model( email=self.normalize_email(email), ...
{"/account/serializers.py": ["/account/models.py"], "/browse/views.py": ["/browse/models.py", "/browse/serializers.py"], "/browse/admin.py": ["/browse/models.py"]}
53,294
ggnight82/netflix
refs/heads/master
/browse/views.py
from django.shortcuts import render # Create your views here. from rest_framework import generics from .models import Genres, Actors, Contents, Videos from .serializers import ContentsSerializer class contents_list(generics.ListCreateAPIView): queryset = Contents.objects.all() serializer_class = ContentsSeria...
{"/account/serializers.py": ["/account/models.py"], "/browse/views.py": ["/browse/models.py", "/browse/serializers.py"], "/browse/admin.py": ["/browse/models.py"]}
53,295
ggnight82/netflix
refs/heads/master
/browse/migrations/0002_auto_20210314_1902.py
# Generated by Django 3.1.7 on 2021-03-14 10:02 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('browse', '0001_initial'), ] operations = [ migrations.CreateModel( name='Productions', ...
{"/account/serializers.py": ["/account/models.py"], "/browse/views.py": ["/browse/models.py", "/browse/serializers.py"], "/browse/admin.py": ["/browse/models.py"]}
53,296
ggnight82/netflix
refs/heads/master
/browse/migrations/0001_initial.py
# Generated by Django 3.1.7 on 2021-03-09 15:28 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='actor', fields=[ ...
{"/account/serializers.py": ["/account/models.py"], "/browse/views.py": ["/browse/models.py", "/browse/serializers.py"], "/browse/admin.py": ["/browse/models.py"]}
53,297
ggnight82/netflix
refs/heads/master
/UserAccount/serializers.py
from rest_framework import serializers from . models import User class UserAccountRegistrationSerializer(serializers.ModelSerializer): password2 = serializers.CharField(style={'input_type':'password'}, write_only=True) class Meta: model = User fields = ['email', 'username','rating','first_nam...
{"/account/serializers.py": ["/account/models.py"], "/browse/views.py": ["/browse/models.py", "/browse/serializers.py"], "/browse/admin.py": ["/browse/models.py"]}
53,298
ggnight82/netflix
refs/heads/master
/UserAccount/migrations/0002_auto_20210310_1649.py
# Generated by Django 3.1.7 on 2021-03-10 07:49 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('UserAccount', '0001_initial'), ] operations = [ migrations.AlterField( model_name='user', name='rating', ...
{"/account/serializers.py": ["/account/models.py"], "/browse/views.py": ["/browse/models.py", "/browse/serializers.py"], "/browse/admin.py": ["/browse/models.py"]}
53,299
ggnight82/netflix
refs/heads/master
/browse/admin.py
# Register your models here. from django.contrib import admin from . models import Contents,Genres,Actors # Register your models here. admin.site.register(Contents) admin.site.register(Genres) admin.site.register(Actors)
{"/account/serializers.py": ["/account/models.py"], "/browse/views.py": ["/browse/models.py", "/browse/serializers.py"], "/browse/admin.py": ["/browse/models.py"]}
53,300
madison08/dog-rental
refs/heads/main
/dogrental/routers/user.py
from fastapi import APIRouter, Depends, status, HTTPException from .. import database, models, schemas, hashing, oauth2 from sqlalchemy.orm import Session router = APIRouter( prefix='/user', tags=['users 👨'] ) get_db = database.get_db @router.get('') def all_users(db:Session = Depends(get_db), current_user...
{"/dogrental/main.py": ["/dogrental/database.py"], "/dogrental/models.py": ["/dogrental/database.py"]}
53,301
madison08/dog-rental
refs/heads/main
/dogrental/schemas.py
from pydantic import BaseModel from typing import Optional class User(BaseModel): firstname: str lastname: str username: str email: str password: str class Config(): orm_mode = True class Tenant(BaseModel): firstname: str lastname: str email: str adress: str cla...
{"/dogrental/main.py": ["/dogrental/database.py"], "/dogrental/models.py": ["/dogrental/database.py"]}
53,302
madison08/dog-rental
refs/heads/main
/dogrental/main.py
from fastapi import FastAPI from . import models from .database import engine from .routers import user, tenant, dog, auth from fastapi.middleware.cors import CORSMiddleware app = FastAPI(title="dog rental API") app.add_middleware( CORSMiddleware, allow_origins=["*"], allow_credentials=True, allow_m...
{"/dogrental/main.py": ["/dogrental/database.py"], "/dogrental/models.py": ["/dogrental/database.py"]}
53,303
madison08/dog-rental
refs/heads/main
/dogrental/database.py
from sqlalchemy import create_engine, engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker SQLALCHEMY_DATABASE_URL = 'sqlite:///./dogrent.db' engine = create_engine(SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False}) sesionLocal = sessionmaker(bind=e...
{"/dogrental/main.py": ["/dogrental/database.py"], "/dogrental/models.py": ["/dogrental/database.py"]}
53,304
madison08/dog-rental
refs/heads/main
/dogrental/routers/dog.py
from fastapi import APIRouter, Depends, status, HTTPException from .. import database, models, schemas, oauth2 from sqlalchemy.orm import Session router = APIRouter( prefix='/dog', tags=['dogs 🐕'] ) get_db = database.get_db @router.get('') def all_dog(db:Session = Depends(get_db), current_user: schemas.Us...
{"/dogrental/main.py": ["/dogrental/database.py"], "/dogrental/models.py": ["/dogrental/database.py"]}
53,305
madison08/dog-rental
refs/heads/main
/dogrental/routers/tenant.py
from fastapi import APIRouter, Depends, status, HTTPException from .. import database, models, schemas, oauth2 from sqlalchemy.orm import Session router = APIRouter( prefix='/tenant', tags=['tenants 👤'] ) get_db = database.get_db @router.get('') def all_tenant(db:Session = Depends(get_db), current_user: s...
{"/dogrental/main.py": ["/dogrental/database.py"], "/dogrental/models.py": ["/dogrental/database.py"]}
53,306
madison08/dog-rental
refs/heads/main
/dogrental/models.py
from sqlalchemy import Column, Integer, String, ForeignKey from .database import Base from sqlalchemy.orm import relationship class User(Base): __tablename__ = 'users' id = Column(Integer, primary_key=True, index=True) firstname = Column(String) lastname = Column(String) username = Column(String,...
{"/dogrental/main.py": ["/dogrental/database.py"], "/dogrental/models.py": ["/dogrental/database.py"]}
53,307
madison08/dog-rental
refs/heads/main
/dogrental/routers/auth.py
# from ..token import ACCESS_TOKEN_EXPIRE_MINUTES, create_access_token # from datetime import timedelta from .. import models from fastapi import APIRouter, Depends, status, HTTPException from fastapi.security import OAuth2PasswordRequestForm from .. import schemas, database, models, hashing, token from sqlalchemy.orm ...
{"/dogrental/main.py": ["/dogrental/database.py"], "/dogrental/models.py": ["/dogrental/database.py"]}
53,308
stevecshanks/pipenv-and-pyenv
refs/heads/main
/main.py
from flask import Flask app = Flask(__name__) @app.route("/hello/<name>") def hello_world(name): return {"message": f"Hello, {name.title()}!"}
{"/test_main.py": ["/main.py"]}
53,309
stevecshanks/pipenv-and-pyenv
refs/heads/main
/test_main.py
from main import app def test_hello_world(): with app.test_client() as client: response = client.get("/hello/your%20name") assert response.status_code == 200 assert response.json == {"message": "Hello, Your Name!"}
{"/test_main.py": ["/main.py"]}
53,310
CavemanIV/service-capacity-modeling
refs/heads/main
/tests/netflix/test_crdb.py
from service_capacity_modeling.capacity_planner import planner from service_capacity_modeling.interface import CapacityDesires from service_capacity_modeling.interface import DataShape from service_capacity_modeling.interface import Interval from service_capacity_modeling.interface import QueryPattern def test_crdb_b...
{"/service_capacity_modeling/models/org/netflix/crdb.py": ["/service_capacity_modeling/models/common.py"], "/service_capacity_modeling/models/org/netflix/__init__.py": ["/service_capacity_modeling/models/org/netflix/crdb.py"]}
53,311
CavemanIV/service-capacity-modeling
refs/heads/main
/tests/test_reproducible.py
from service_capacity_modeling.capacity_planner import planner from service_capacity_modeling.interface import CapacityDesires from service_capacity_modeling.interface import DataShape from service_capacity_modeling.interface import Interval from service_capacity_modeling.interface import QueryPattern uncertain_mid =...
{"/service_capacity_modeling/models/org/netflix/crdb.py": ["/service_capacity_modeling/models/common.py"], "/service_capacity_modeling/models/org/netflix/__init__.py": ["/service_capacity_modeling/models/org/netflix/crdb.py"]}
53,312
CavemanIV/service-capacity-modeling
refs/heads/main
/service_capacity_modeling/models/common.py
import logging import math import random from typing import Callable from typing import Optional from service_capacity_modeling.interface import AVG_ITEM_SIZE_BYTES from service_capacity_modeling.interface import CapacityDesires from service_capacity_modeling.interface import CapacityPlan from service_capacity_modelin...
{"/service_capacity_modeling/models/org/netflix/crdb.py": ["/service_capacity_modeling/models/common.py"], "/service_capacity_modeling/models/org/netflix/__init__.py": ["/service_capacity_modeling/models/org/netflix/crdb.py"]}
53,313
CavemanIV/service-capacity-modeling
refs/heads/main
/service_capacity_modeling/models/org/netflix/crdb.py
import logging import math from decimal import Decimal from typing import Any from typing import Dict from typing import Optional from typing import Sequence from typing import Tuple from service_capacity_modeling.interface import AccessConsistency from service_capacity_modeling.interface import AccessPattern from ser...
{"/service_capacity_modeling/models/org/netflix/crdb.py": ["/service_capacity_modeling/models/common.py"], "/service_capacity_modeling/models/org/netflix/__init__.py": ["/service_capacity_modeling/models/org/netflix/crdb.py"]}
53,314
CavemanIV/service-capacity-modeling
refs/heads/main
/service_capacity_modeling/models/org/netflix/__init__.py
from .cassandra import nflx_cassandra_capacity_model from .crdb import nflx_cockroachdb_capacity_model from .elasticsearch import nflx_elasticsearch_capacity_model from .entity import nflx_entity_capacity_model from .evcache import nflx_evcache_capacity_model from .key_value import nflx_key_value_capacity_model from .r...
{"/service_capacity_modeling/models/org/netflix/crdb.py": ["/service_capacity_modeling/models/common.py"], "/service_capacity_modeling/models/org/netflix/__init__.py": ["/service_capacity_modeling/models/org/netflix/crdb.py"]}
53,315
iesmirnoff/whiteshadoofs
refs/heads/master
/whiteshadoofs/views.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.http import HttpResponse from django.shortcuts import render, render_to_response import whiteshadoofs.models as models def main(request): if request.method == 'GET' and request.META['QUERY_STRING']: return HttpResponse(request.META['QUERY_STRING']...
{"/whiteshadoofs/views.py": ["/whiteshadoofs/models.py"], "/whiteshadoofs/admin.py": ["/whiteshadoofs/models.py"]}
53,316
iesmirnoff/whiteshadoofs
refs/heads/master
/whiteshadoofs/models.py
#!/usr/bin/env python #-*-coding:utf-8-*- """Models for db 'ws' """ """ """ from django.db import models class Role(models.Model): """Соответствует таблице role""" title = models.CharField(max_length=45) def __unicode__(self): return self.title class User(models.Model): """Соответствует табл...
{"/whiteshadoofs/views.py": ["/whiteshadoofs/models.py"], "/whiteshadoofs/admin.py": ["/whiteshadoofs/models.py"]}
53,317
iesmirnoff/whiteshadoofs
refs/heads/master
/whiteshadoofs/admin.py
#!/usr/bin/env python #-*-coding:utf-8-*- """Classes for administrator's interface""" from django.contrib import admin from whiteshadoofs.models import * admin.site.register(Role) admin.site.register(User) admin.site.register(Country) admin.site.register(Region) admin.site.register(Locality) admin.site.register(A...
{"/whiteshadoofs/views.py": ["/whiteshadoofs/models.py"], "/whiteshadoofs/admin.py": ["/whiteshadoofs/models.py"]}
53,319
pradeepvarma22/Food_Review
refs/heads/master
/FoodApp/forms.py
from FoodApp.models import ReviewModel from django import forms class CreateReviewForm(forms.ModelForm): class Meta: model = ReviewModel fields=['rate','text']
{"/FoodApp/forms.py": ["/FoodApp/models.py"], "/FoodApp/views.py": ["/FoodApp/models.py", "/FoodApp/forms.py"], "/FoodApp/urls.py": ["/FoodApp/views.py"], "/FoodApp/admin.py": ["/FoodApp/models.py"]}
53,320
pradeepvarma22/Food_Review
refs/heads/master
/FoodApp/models.py
from django.db import models from django.utils.timezone import now from django.contrib.auth.models import User RATE_CHOICES = [ ('Poor','Poor'), ('Average','Average'), ('Good','Good'), ('Excellent','Excellent') ] DIET_CHOICES = [ (1,'BreakFast'), (2,'Lunch'), (3,'Snacks'), (4,'Dinne...
{"/FoodApp/forms.py": ["/FoodApp/models.py"], "/FoodApp/views.py": ["/FoodApp/models.py", "/FoodApp/forms.py"], "/FoodApp/urls.py": ["/FoodApp/views.py"], "/FoodApp/admin.py": ["/FoodApp/models.py"]}
53,321
pradeepvarma22/Food_Review
refs/heads/master
/FoodApp/migrations/0002_auto_20210206_1420.py
# Generated by Django 3.0.4 on 2021-02-06 08:50 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('FoodApp', '0001_initial'), ] operations = [ migrations.AlterField( model_name='foodmodel', name='diet', ...
{"/FoodApp/forms.py": ["/FoodApp/models.py"], "/FoodApp/views.py": ["/FoodApp/models.py", "/FoodApp/forms.py"], "/FoodApp/urls.py": ["/FoodApp/views.py"], "/FoodApp/admin.py": ["/FoodApp/models.py"]}
53,322
pradeepvarma22/Food_Review
refs/heads/master
/FoodApp/views.py
from django.shortcuts import render,redirect from FoodApp.models import FoodModel,ReviewModel from FoodApp.forms import CreateReviewForm from django.contrib.auth import login,logout,authenticate from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.forms import AuthenticationForm import dateti...
{"/FoodApp/forms.py": ["/FoodApp/models.py"], "/FoodApp/views.py": ["/FoodApp/models.py", "/FoodApp/forms.py"], "/FoodApp/urls.py": ["/FoodApp/views.py"], "/FoodApp/admin.py": ["/FoodApp/models.py"]}
53,323
pradeepvarma22/Food_Review
refs/heads/master
/FoodApp/urls.py
from django.urls import path from django.conf import settings from django.conf.urls.static import static from FoodApp.views import Home,createReview,LogOut,LogIn,register,AllReviews from django.views.static import serve from django.conf.urls.static import static from django.conf.urls import url urlpatterns=[ pat...
{"/FoodApp/forms.py": ["/FoodApp/models.py"], "/FoodApp/views.py": ["/FoodApp/models.py", "/FoodApp/forms.py"], "/FoodApp/urls.py": ["/FoodApp/views.py"], "/FoodApp/admin.py": ["/FoodApp/models.py"]}
53,324
pradeepvarma22/Food_Review
refs/heads/master
/FoodApp/migrations/0003_auto_20210206_1422.py
# Generated by Django 3.0.4 on 2021-02-06 08:52 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('FoodApp', '0002_auto_20210206_1420'), ] operations = [ migrations.AlterField( model_name='reviewmodel', name='rate',...
{"/FoodApp/forms.py": ["/FoodApp/models.py"], "/FoodApp/views.py": ["/FoodApp/models.py", "/FoodApp/forms.py"], "/FoodApp/urls.py": ["/FoodApp/views.py"], "/FoodApp/admin.py": ["/FoodApp/models.py"]}
53,325
pradeepvarma22/Food_Review
refs/heads/master
/FoodApp/migrations/0001_initial.py
# Generated by Django 3.0.4 on 2021-02-06 08:39 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUT...
{"/FoodApp/forms.py": ["/FoodApp/models.py"], "/FoodApp/views.py": ["/FoodApp/models.py", "/FoodApp/forms.py"], "/FoodApp/urls.py": ["/FoodApp/views.py"], "/FoodApp/admin.py": ["/FoodApp/models.py"]}
53,326
pradeepvarma22/Food_Review
refs/heads/master
/FoodApp/admin.py
from django.contrib import admin from FoodApp.models import FoodModel,ReviewModel # Register your models here. admin.site.register(FoodModel) admin.site.register(ReviewModel)
{"/FoodApp/forms.py": ["/FoodApp/models.py"], "/FoodApp/views.py": ["/FoodApp/models.py", "/FoodApp/forms.py"], "/FoodApp/urls.py": ["/FoodApp/views.py"], "/FoodApp/admin.py": ["/FoodApp/models.py"]}
53,327
pradeepvarma22/Food_Review
refs/heads/master
/FoodApp/migrations/0004_auto_20210206_1426.py
# Generated by Django 3.0.4 on 2021-02-06 08:56 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('FoodApp', '0003_auto_20210206_1422'), ] operations = [ migrations.AlterField( model_name='reviewmodel', name='rate',...
{"/FoodApp/forms.py": ["/FoodApp/models.py"], "/FoodApp/views.py": ["/FoodApp/models.py", "/FoodApp/forms.py"], "/FoodApp/urls.py": ["/FoodApp/views.py"], "/FoodApp/admin.py": ["/FoodApp/models.py"]}
53,332
hollsmarie/Python_Deployment
refs/heads/master
/apps/examThree/models.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models import pytz from django.utils import timezone from time import strptime,strftime from datetime import datetime, date, time import datetime from ..loginReg.models import User class TripManager(models.Manager): def va...
{"/apps/examThree/models.py": ["/apps/loginReg/models.py"], "/apps/examThree/views.py": ["/apps/examThree/models.py", "/apps/loginReg/models.py"]}
53,333
hollsmarie/Python_Deployment
refs/heads/master
/apps/examThree/migrations/0001_initial.py
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-03-01 18:13 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('loginReg', '0001_initial'), ] op...
{"/apps/examThree/models.py": ["/apps/loginReg/models.py"], "/apps/examThree/views.py": ["/apps/examThree/models.py", "/apps/loginReg/models.py"]}
53,334
hollsmarie/Python_Deployment
refs/heads/master
/apps/examThree/views.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.core.urlresolvers import reverse from django.contrib import messages from datetime import date, time, datetime import datetime from .models import * from ..loginReg.models import User from django.shortcuts import render, HttpResponse, re...
{"/apps/examThree/models.py": ["/apps/loginReg/models.py"], "/apps/examThree/views.py": ["/apps/examThree/models.py", "/apps/loginReg/models.py"]}
53,335
hollsmarie/Python_Deployment
refs/heads/master
/apps/loginReg/models.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models import bcrypt import re NAME_REGEX = re.compile(r"^[-a-zA-Z']+$") EMAIL_REGEX = re.compile(r'^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9._-]+\.[a-zA-Z]+$') class UserManager(models.Manager): def validate(self, postData): #declare a c...
{"/apps/examThree/models.py": ["/apps/loginReg/models.py"], "/apps/examThree/views.py": ["/apps/examThree/models.py", "/apps/loginReg/models.py"]}
53,336
hollsmarie/Python_Deployment
refs/heads/master
/apps/loginReg/views.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.shortcuts import render, HttpResponse, redirect from django.contrib import messages #imports messages for errors from .models import * #imports everything from models def index(request): if "userid" in request.session: # if a session i...
{"/apps/examThree/models.py": ["/apps/loginReg/models.py"], "/apps/examThree/views.py": ["/apps/examThree/models.py", "/apps/loginReg/models.py"]}
53,337
hollsmarie/Python_Deployment
refs/heads/master
/apps/examThree/urls.py
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^add$', views.add, name='add'), url(r'^update$', views.update, name='update'), url(r'^(?P<id>\d+)/remove$', views.remove, name='remove'), url(r'^(?P<id>\d+)/show$', views.show, name='sh...
{"/apps/examThree/models.py": ["/apps/loginReg/models.py"], "/apps/examThree/views.py": ["/apps/examThree/models.py", "/apps/loginReg/models.py"]}
53,340
flychensc/apple
refs/heads/master
/app_exp_val.py
""" 绘制期望值 """ import dash import dash_html_components as html import dash_core_components as dcc from lottery import get_history, expected_value codes = ['双色球', '七乐彩', '3D', '大乐透', '排列三', '排列五', '七星彩'] count = 20 datas = [] for c in codes: print('Get %s data...' % c) try: his = get_history(c, count) ...
{"/app_exp_val.py": ["/lottery/__init__.py"], "/lottery/__init__.py": ["/lottery/ticket.py", "/lottery/utilities.py"], "/coll_plw.py": ["/lottery/__init__.py"], "/rand_select.py": ["/lottery/__init__.py"], "/app_sim_val.py": ["/lottery/__init__.py"], "/lottery/utilities.py": ["/lottery/__init__.py"], "/coll_dlt.py": ["...
53,341
flychensc/apple
refs/heads/master
/lottery/__init__.py
from .ticket import get_history from .utilities import expected_value, similar, is_winning, iter_history
{"/app_exp_val.py": ["/lottery/__init__.py"], "/lottery/__init__.py": ["/lottery/ticket.py", "/lottery/utilities.py"], "/coll_plw.py": ["/lottery/__init__.py"], "/rand_select.py": ["/lottery/__init__.py"], "/app_sim_val.py": ["/lottery/__init__.py"], "/lottery/utilities.py": ["/lottery/__init__.py"], "/coll_dlt.py": ["...
53,342
flychensc/apple
refs/heads/master
/coll_plw.py
""" 排列五的概率输出 """ from lottery import get_history import pandas as pd import dash import dash_html_components as html import dash_core_components as dcc CODE = '排列五' MIN = 1 COUNT = 200 def _calc_prob(num, datas): """ 计算num在datas里的概率 e.g.: num = 1 data = [[2,3],[1,7],[3,6]] retun...
{"/app_exp_val.py": ["/lottery/__init__.py"], "/lottery/__init__.py": ["/lottery/ticket.py", "/lottery/utilities.py"], "/coll_plw.py": ["/lottery/__init__.py"], "/rand_select.py": ["/lottery/__init__.py"], "/app_sim_val.py": ["/lottery/__init__.py"], "/lottery/utilities.py": ["/lottery/__init__.py"], "/coll_dlt.py": ["...
53,343
flychensc/apple
refs/heads/master
/rand_select.py
""" 机选, 从以往count期结果里,随机k个抽选号码,随机选择一份 """ import random from lottery import get_history, similar, is_winning, iter_history def _rand_select_list(results): pools = {} for result in results: for idx, value in enumerate(result): # 【排列】按位区分,放入历史每位的数据 pools.setdefault(idx, list()) ...
{"/app_exp_val.py": ["/lottery/__init__.py"], "/lottery/__init__.py": ["/lottery/ticket.py", "/lottery/utilities.py"], "/coll_plw.py": ["/lottery/__init__.py"], "/rand_select.py": ["/lottery/__init__.py"], "/app_sim_val.py": ["/lottery/__init__.py"], "/lottery/utilities.py": ["/lottery/__init__.py"], "/coll_dlt.py": ["...
53,344
flychensc/apple
refs/heads/master
/app_sim_val.py
""" 绘制相似度 """ import dash import dash_html_components as html import dash_core_components as dcc from lottery import get_history, similar, iter_history codes = ['双色球', '七乐彩', '3D', '大乐透', '排列三', '排列五', '七星彩'] count = 30 datas = [] for c in codes: print('Get %s data...' % c) try: his = get_history(c, ...
{"/app_exp_val.py": ["/lottery/__init__.py"], "/lottery/__init__.py": ["/lottery/ticket.py", "/lottery/utilities.py"], "/coll_plw.py": ["/lottery/__init__.py"], "/rand_select.py": ["/lottery/__init__.py"], "/app_sim_val.py": ["/lottery/__init__.py"], "/lottery/utilities.py": ["/lottery/__init__.py"], "/coll_dlt.py": ["...
53,345
flychensc/apple
refs/heads/master
/lottery/utilities.py
""" expected_value 计算彩票期望值 similar 计算相似度,【排列】判断对于位的数值相同与否。【组合】判断每个颜色相同的数值数量。 """ from numpy import mean from lottery import get_history def _expected_value(his_one): """ (每级获奖数量/销售数量)*每级奖金的汇总 """ return sum([grade['money']*(grade['num']/his_one['total']) for grade in his_one['grades']]) def expected...
{"/app_exp_val.py": ["/lottery/__init__.py"], "/lottery/__init__.py": ["/lottery/ticket.py", "/lottery/utilities.py"], "/coll_plw.py": ["/lottery/__init__.py"], "/rand_select.py": ["/lottery/__init__.py"], "/app_sim_val.py": ["/lottery/__init__.py"], "/lottery/utilities.py": ["/lottery/__init__.py"], "/coll_dlt.py": ["...
53,346
flychensc/apple
refs/heads/master
/coll_dlt.py
""" 大乐透的概率输出 """ from lottery import get_history import pandas as pd import dash import dash_html_components as html import dash_core_components as dcc CODE = '大乐透' RED_MIN = 1 BLUE_MIN = 1 COUNT = 200 def _calc_prob(num, datas): """ 计算num在datas里的概率 e.g.: num = 1 data = [[2,3],[1,7],[3,...
{"/app_exp_val.py": ["/lottery/__init__.py"], "/lottery/__init__.py": ["/lottery/ticket.py", "/lottery/utilities.py"], "/coll_plw.py": ["/lottery/__init__.py"], "/rand_select.py": ["/lottery/__init__.py"], "/app_sim_val.py": ["/lottery/__init__.py"], "/lottery/utilities.py": ["/lottery/__init__.py"], "/coll_dlt.py": ["...
53,347
flychensc/apple
refs/heads/master
/lottery/ticket.py
""" 用法: print(get_history('双色球', count=1)) 输出格式大致如下,差异在result部分,要么为dict,要么为list [ { 'date': datetime.date(2018, 7, 12), 'result': { 'red': [4,7,13,20,29,33], 'blue': 3 }, 'grades': [ {'num': 6, 'money': 8230212}, {'...
{"/app_exp_val.py": ["/lottery/__init__.py"], "/lottery/__init__.py": ["/lottery/ticket.py", "/lottery/utilities.py"], "/coll_plw.py": ["/lottery/__init__.py"], "/rand_select.py": ["/lottery/__init__.py"], "/app_sim_val.py": ["/lottery/__init__.py"], "/lottery/utilities.py": ["/lottery/__init__.py"], "/coll_dlt.py": ["...
53,361
rnels12/sorting-algos
refs/heads/main
/main.py
#!/usr/bin/env python3 """ File name : main.py Author : Ryky Nelson Created Date : October 2021 Python Version: Python 3.6.9 Main function: - to produce a list of random numbers - to call a sorting algorithm - to display the orignal and sorted lists """ import random import sort if __name__ == "__main...
{"/main.py": ["/sort.py"]}
53,362
rnels12/sorting-algos
refs/heads/main
/sort.py
#!/usr/bin/env python3 """ File name : sort.py Author : Ryky Nelson Created Date : October 2021 Python Version: Python 3.6.9 Description: a list of simple implementations of sorting algorithms """ def Bubble(A): nn = len(A) if len(A) < 2 : return A for i in range(nn - 1): swap = False...
{"/main.py": ["/sort.py"]}
53,367
mfuentesg/luhnpy
refs/heads/master
/test.py
import unittest import luhnpy class LuhnTest(unittest.TestCase): def test_digit_invalid_argument(self): with self.assertRaises(ValueError): luhnpy.digit('00x') def test_digit_hexadecimal_string(self): with self.assertRaises(ValueError): luhnpy.digit('0xff000000') ...
{"/test.py": ["/luhnpy.py"]}
53,368
mfuentesg/luhnpy
refs/heads/master
/luhnpy.py
__version__ = '1.0.0' from random import randint from functools import wraps def _digit_validator(fun): @wraps(fun) def digit_wrapper(*args, **kwargs): for arg in args: if not str(arg).isdigit(): raise ValueError('The given argument must be a string a digits') retu...
{"/test.py": ["/luhnpy.py"]}
53,369
mfuentesg/luhnpy
refs/heads/master
/setup.py
from distutils.core import setup setup( name='luhnpy', py_modules=['luhnpy'], version='1.0.0', description='A minimalistic implementation of Luhn algorithm', long_description=open('README.md').read(), long_description_content_type='text/markdown', author='Marcelo Fuentes', author_email...
{"/test.py": ["/luhnpy.py"]}
53,376
jonesclarence37/pomace
refs/heads/main
/pomace/__init__.py
from pkg_resources import ( DistributionNotFound as _DistributionNotFound, get_distribution as _get_distribution, ) from .api import * try: __version__ = _get_distribution("pomace").version except _DistributionNotFound: __version__ = "(local)"
{"/pomace/__init__.py": ["/pomace/api.py"], "/pomace/tests/test_models.py": ["/pomace/models.py"], "/tests/test_sites.py": ["/pomace/__init__.py", "/pomace/models.py"], "/notebooks/profile_default/startup/ipython_startup.py": ["/pomace/__init__.py", "/pomace/config.py", "/pomace/models.py", "/pomace/shared.py"], "/poma...
53,377
jonesclarence37/pomace
refs/heads/main
/pomace/tests/test_models.py
# pylint: disable=expression-not-assigned,unused-variable,redefined-outer-name,unused-argument import pytest import requests from ..models import Action, Locator, Page @pytest.fixture def locator(): return Locator("name", "email") @pytest.fixture def action(): return Action("fill", "email") @pytest.fixt...
{"/pomace/__init__.py": ["/pomace/api.py"], "/pomace/tests/test_models.py": ["/pomace/models.py"], "/tests/test_sites.py": ["/pomace/__init__.py", "/pomace/models.py"], "/notebooks/profile_default/startup/ipython_startup.py": ["/pomace/__init__.py", "/pomace/config.py", "/pomace/models.py", "/pomace/shared.py"], "/poma...
53,378
jonesclarence37/pomace
refs/heads/main
/tests/test_sites.py
# pylint: disable=unused-argument,expression-not-assigned from contextlib import suppress from pomace import shared from pomace.models import Page def test_locator_uses_are_persisted(expect, browser): page = Page.at("https://www.wikipedia.org") page.actions = [] page.datafile.save() page.fill_search...
{"/pomace/__init__.py": ["/pomace/api.py"], "/pomace/tests/test_models.py": ["/pomace/models.py"], "/tests/test_sites.py": ["/pomace/__init__.py", "/pomace/models.py"], "/notebooks/profile_default/startup/ipython_startup.py": ["/pomace/__init__.py", "/pomace/config.py", "/pomace/models.py", "/pomace/shared.py"], "/poma...
53,379
jonesclarence37/pomace
refs/heads/main
/notebooks/profile_default/startup/ipython_startup.py
# pylint: disable=unused-import,import-outside-toplevel import pomace from pomace import prompts as _prompts, utils as _utils from pomace.config import settings from pomace.models import Page, auto from pomace.shared import browser def _configure_logging(): import log log.reset() log.init(debug=True) ...
{"/pomace/__init__.py": ["/pomace/api.py"], "/pomace/tests/test_models.py": ["/pomace/models.py"], "/tests/test_sites.py": ["/pomace/__init__.py", "/pomace/models.py"], "/notebooks/profile_default/startup/ipython_startup.py": ["/pomace/__init__.py", "/pomace/config.py", "/pomace/models.py", "/pomace/shared.py"], "/poma...
53,380
jonesclarence37/pomace
refs/heads/main
/pomace/server.py
from urllib.parse import unquote from flask import redirect, request, url_for from flask_api import FlaskAPI from . import models, utils app = FlaskAPI("Pomace") @app.route("/") def index(): return redirect("/sites?url=http://example.com") @app.route("/sites") def pomace(): if "url" not in request.args:...
{"/pomace/__init__.py": ["/pomace/api.py"], "/pomace/tests/test_models.py": ["/pomace/models.py"], "/tests/test_sites.py": ["/pomace/__init__.py", "/pomace/models.py"], "/notebooks/profile_default/startup/ipython_startup.py": ["/pomace/__init__.py", "/pomace/config.py", "/pomace/models.py", "/pomace/shared.py"], "/poma...
53,381
jonesclarence37/pomace
refs/heads/main
/pomace/cli.py
# pylint: disable=no-self-use import os from importlib import reload import log from cleo import Application, Command from . import models, prompts, server, utils from .config import settings class BaseCommand(Command): # pragma: no cover def handle(self): self.configure_logging() self.set_dir...
{"/pomace/__init__.py": ["/pomace/api.py"], "/pomace/tests/test_models.py": ["/pomace/models.py"], "/tests/test_sites.py": ["/pomace/__init__.py", "/pomace/models.py"], "/notebooks/profile_default/startup/ipython_startup.py": ["/pomace/__init__.py", "/pomace/config.py", "/pomace/models.py", "/pomace/shared.py"], "/poma...
53,382
jonesclarence37/pomace
refs/heads/main
/pomace/tests/test_types.py
# pylint: disable=expression-not-assigned,unused-variable,redefined-outer-name,unused-argument import log import pytest from ..types import URL, Fake @pytest.fixture def url(): return URL("http://www.example.com/foo/bar") def describe_url(): def describe_init(): def with_url(expect, url): ...
{"/pomace/__init__.py": ["/pomace/api.py"], "/pomace/tests/test_models.py": ["/pomace/models.py"], "/tests/test_sites.py": ["/pomace/__init__.py", "/pomace/models.py"], "/notebooks/profile_default/startup/ipython_startup.py": ["/pomace/__init__.py", "/pomace/config.py", "/pomace/models.py", "/pomace/shared.py"], "/poma...
53,383
jonesclarence37/pomace
refs/heads/main
/pomace/types.py
import random from dataclasses import dataclass from typing import Optional from urllib.parse import urlparse import faker import log import us import zipcodes from parse import parse __all__ = ["URL"] class URL: ROOT = "@" def __init__(self, url_or_domain: str, path: Optional[str] = None): if pa...
{"/pomace/__init__.py": ["/pomace/api.py"], "/pomace/tests/test_models.py": ["/pomace/models.py"], "/tests/test_sites.py": ["/pomace/__init__.py", "/pomace/models.py"], "/notebooks/profile_default/startup/ipython_startup.py": ["/pomace/__init__.py", "/pomace/config.py", "/pomace/models.py", "/pomace/shared.py"], "/poma...
53,384
jonesclarence37/pomace
refs/heads/main
/pomace/config.py
from typing import List, Optional import log from datafiles import datafile, field from . import shared from .types import URL log.silence("datafiles", allow_warning=True) @datafile class Browser: name: str = "" width: int = 1920 height: int = 1080 headless: bool = False @datafile class Secret: ...
{"/pomace/__init__.py": ["/pomace/api.py"], "/pomace/tests/test_models.py": ["/pomace/models.py"], "/tests/test_sites.py": ["/pomace/__init__.py", "/pomace/models.py"], "/notebooks/profile_default/startup/ipython_startup.py": ["/pomace/__init__.py", "/pomace/config.py", "/pomace/models.py", "/pomace/shared.py"], "/poma...
53,385
jonesclarence37/pomace
refs/heads/main
/pomace/api.py
import inspect from typing import Optional import log from . import models, prompts, types, utils from .config import settings from .models import Page, auto __all__ = [ "auto", "clean", "fake", "freeze", "log", "Page", "prompt", "visit", ] fake = types.Fake() def visit( url:...
{"/pomace/__init__.py": ["/pomace/api.py"], "/pomace/tests/test_models.py": ["/pomace/models.py"], "/tests/test_sites.py": ["/pomace/__init__.py", "/pomace/models.py"], "/notebooks/profile_default/startup/ipython_startup.py": ["/pomace/__init__.py", "/pomace/config.py", "/pomace/models.py", "/pomace/shared.py"], "/poma...
53,386
jonesclarence37/pomace
refs/heads/main
/pomace/browser.py
import sys import log from fake_useragent import UserAgent from splinter import Browser from splinter.exceptions import DriverNotFoundError from webdriver_manager import chrome, firefox from .config import settings NAMES = ["Firefox", "Chrome"] WEBDRIVER_MANAGERS = { "chromedriver": chrome.ChromeDriverManager,...
{"/pomace/__init__.py": ["/pomace/api.py"], "/pomace/tests/test_models.py": ["/pomace/models.py"], "/tests/test_sites.py": ["/pomace/__init__.py", "/pomace/models.py"], "/notebooks/profile_default/startup/ipython_startup.py": ["/pomace/__init__.py", "/pomace/config.py", "/pomace/models.py", "/pomace/shared.py"], "/poma...
53,387
jonesclarence37/pomace
refs/heads/main
/pomace/shared.py
from splinter import Browser browser: Browser = None linebreak: bool = True
{"/pomace/__init__.py": ["/pomace/api.py"], "/pomace/tests/test_models.py": ["/pomace/models.py"], "/tests/test_sites.py": ["/pomace/__init__.py", "/pomace/models.py"], "/notebooks/profile_default/startup/ipython_startup.py": ["/pomace/__init__.py", "/pomace/config.py", "/pomace/models.py", "/pomace/shared.py"], "/poma...
53,388
jonesclarence37/pomace
refs/heads/main
/pomace/tests/test_enums.py
# pylint: disable=expression-not-assigned,unused-variable,redefined-outer-name,unused-argument from ..enums import Verb def describe_verb(): def describe_get_default_locators(): def when_click(expect): verb = Verb("click") locators = list(verb.get_default_locators("send_email")) ...
{"/pomace/__init__.py": ["/pomace/api.py"], "/pomace/tests/test_models.py": ["/pomace/models.py"], "/tests/test_sites.py": ["/pomace/__init__.py", "/pomace/models.py"], "/notebooks/profile_default/startup/ipython_startup.py": ["/pomace/__init__.py", "/pomace/config.py", "/pomace/models.py", "/pomace/shared.py"], "/poma...
53,389
jonesclarence37/pomace
refs/heads/main
/tests/conftest.py
"""Integration tests configuration file.""" # pylint: disable=unused-argument,redefined-outer-name import os import datafiles import log import pytest from pomace import shared, utils from pomace.config import settings as _settings def pytest_configure(config): log.init(debug=True) log.silence("parse", "f...
{"/pomace/__init__.py": ["/pomace/api.py"], "/pomace/tests/test_models.py": ["/pomace/models.py"], "/tests/test_sites.py": ["/pomace/__init__.py", "/pomace/models.py"], "/notebooks/profile_default/startup/ipython_startup.py": ["/pomace/__init__.py", "/pomace/config.py", "/pomace/models.py", "/pomace/shared.py"], "/poma...
53,390
jonesclarence37/pomace
refs/heads/main
/pomace/prompts.py
import os import sys from functools import wraps from importlib import import_module from typing import Optional, Tuple, no_type_check import log from IPython import embed from . import browser, enums, shared from .config import settings try: import bullet except ImportError: bullet = None # https://github...
{"/pomace/__init__.py": ["/pomace/api.py"], "/pomace/tests/test_models.py": ["/pomace/models.py"], "/tests/test_sites.py": ["/pomace/__init__.py", "/pomace/models.py"], "/notebooks/profile_default/startup/ipython_startup.py": ["/pomace/__init__.py", "/pomace/config.py", "/pomace/models.py", "/pomace/shared.py"], "/poma...
53,391
jonesclarence37/pomace
refs/heads/main
/tests/test_cli.py
# pylint: disable=unused-variable,redefined-outer-name from pathlib import Path import pytest from cleo import ApplicationTester from pomace.cli import application @pytest.fixture def cli(): return ApplicationTester(application).execute def describe_clone(): def with_url(cli): cli("clone https://...
{"/pomace/__init__.py": ["/pomace/api.py"], "/pomace/tests/test_models.py": ["/pomace/models.py"], "/tests/test_sites.py": ["/pomace/__init__.py", "/pomace/models.py"], "/notebooks/profile_default/startup/ipython_startup.py": ["/pomace/__init__.py", "/pomace/config.py", "/pomace/models.py", "/pomace/shared.py"], "/poma...
53,392
jonesclarence37/pomace
refs/heads/main
/pomace/tests/conftest.py
# pylint: disable=no-self-use,unused-argument """Unit tests configuration file.""" import datafiles import log import pytest from pomace import shared class MockElement(str): @property def outer_html(self): return f"<mockhtml>{self}</>" @property def visible(self): return True c...
{"/pomace/__init__.py": ["/pomace/api.py"], "/pomace/tests/test_models.py": ["/pomace/models.py"], "/tests/test_sites.py": ["/pomace/__init__.py", "/pomace/models.py"], "/notebooks/profile_default/startup/ipython_startup.py": ["/pomace/__init__.py", "/pomace/config.py", "/pomace/models.py", "/pomace/shared.py"], "/poma...
53,393
jonesclarence37/pomace
refs/heads/main
/pomace/tests/test_browser.py
# pylint: disable=unused-variable,expression-not-assigned from pomace import browser from pomace.config import settings def describe_launch(): def it_requires_a_browser_to_be_set(expect): settings.browser.name = "" with expect.raises(SystemExit): browser.launch() def it_rejects_i...
{"/pomace/__init__.py": ["/pomace/api.py"], "/pomace/tests/test_models.py": ["/pomace/models.py"], "/tests/test_sites.py": ["/pomace/__init__.py", "/pomace/models.py"], "/notebooks/profile_default/startup/ipython_startup.py": ["/pomace/__init__.py", "/pomace/config.py", "/pomace/models.py", "/pomace/shared.py"], "/poma...
53,394
jonesclarence37/pomace
refs/heads/main
/pomace/utils.py
import atexit import inspect import os import sys import time from bdb import BdbQuit from pathlib import Path import ipdb import log from gitman.decorators import preserve_cwd from gitman.models import Source from selenium.common.exceptions import WebDriverException from urllib3.exceptions import HTTPError from . im...
{"/pomace/__init__.py": ["/pomace/api.py"], "/pomace/tests/test_models.py": ["/pomace/models.py"], "/tests/test_sites.py": ["/pomace/__init__.py", "/pomace/models.py"], "/notebooks/profile_default/startup/ipython_startup.py": ["/pomace/__init__.py", "/pomace/config.py", "/pomace/models.py", "/pomace/shared.py"], "/poma...
53,395
jonesclarence37/pomace
refs/heads/main
/pomace/models.py
from contextlib import suppress from copy import copy from typing import Callable, List, Optional, Tuple import log from bs4 import BeautifulSoup from cached_property import cached_property from datafiles import datafile, field, mapper from selenium.common.exceptions import ( ElementNotInteractableException, W...
{"/pomace/__init__.py": ["/pomace/api.py"], "/pomace/tests/test_models.py": ["/pomace/models.py"], "/tests/test_sites.py": ["/pomace/__init__.py", "/pomace/models.py"], "/notebooks/profile_default/startup/ipython_startup.py": ["/pomace/__init__.py", "/pomace/config.py", "/pomace/models.py", "/pomace/shared.py"], "/poma...
53,396
jonesclarence37/pomace
refs/heads/main
/pomace/enums.py
import time from enum import Enum from typing import Iterator, Optional, Tuple import inflection import log from selenium.webdriver.common.keys import Keys from . import shared class Mode(Enum): NAME = "name" ID = "id" TEXT = "text" PARTIAL_TEXT = "text (partial)" # extended VALUE = "value" ...
{"/pomace/__init__.py": ["/pomace/api.py"], "/pomace/tests/test_models.py": ["/pomace/models.py"], "/tests/test_sites.py": ["/pomace/__init__.py", "/pomace/models.py"], "/notebooks/profile_default/startup/ipython_startup.py": ["/pomace/__init__.py", "/pomace/config.py", "/pomace/models.py", "/pomace/shared.py"], "/poma...
53,397
jonesclarence37/pomace
refs/heads/main
/pomace/tests/test_prompts.py
# pylint: disable=expression-not-assigned,unused-variable,redefined-outer-name,unused-argument from .. import config, prompts def describe_browser_if_unset(): def when_ci(expect, monkeypatch): monkeypatch.setenv("CI", "true") config.settings.browser.name = "" prompts.browser_if_unset() ...
{"/pomace/__init__.py": ["/pomace/api.py"], "/pomace/tests/test_models.py": ["/pomace/models.py"], "/tests/test_sites.py": ["/pomace/__init__.py", "/pomace/models.py"], "/notebooks/profile_default/startup/ipython_startup.py": ["/pomace/__init__.py", "/pomace/config.py", "/pomace/models.py", "/pomace/shared.py"], "/poma...
53,398
jonesclarence37/pomace
refs/heads/main
/pomace/__main__.py
#!/usr/bin/env python """Package entry point.""" from pomace.cli import application if __name__ == "__main__": # pragma: no cover application.run()
{"/pomace/__init__.py": ["/pomace/api.py"], "/pomace/tests/test_models.py": ["/pomace/models.py"], "/tests/test_sites.py": ["/pomace/__init__.py", "/pomace/models.py"], "/notebooks/profile_default/startup/ipython_startup.py": ["/pomace/__init__.py", "/pomace/config.py", "/pomace/models.py", "/pomace/shared.py"], "/poma...
53,399
jonesclarence37/pomace
refs/heads/main
/tests/test_api.py
# pylint: disable=unused-variable,expression-not-assigned import os from pathlib import Path import pytest import pomace from pomace.config import settings def test_package_contents(expect): names = [name for name in dir(pomace) if not name.startswith("_")] expect(names).contains("auto") expect(names)....
{"/pomace/__init__.py": ["/pomace/api.py"], "/pomace/tests/test_models.py": ["/pomace/models.py"], "/tests/test_sites.py": ["/pomace/__init__.py", "/pomace/models.py"], "/notebooks/profile_default/startup/ipython_startup.py": ["/pomace/__init__.py", "/pomace/config.py", "/pomace/models.py", "/pomace/shared.py"], "/poma...
53,401
akarishiraj/Voice-Controlled-Game-Space-Invader
refs/heads/master
/game_logic.py
# seperated logic def game_over_text(): over_text = over_font.render("GAME OVER", True, (255, 255, 255)) screen.blit(over_text, (200, 250)) def show_score(x, y): score = font.render("Score : " + str(score_value), True, (255, 255, 255)) screen.blit(score, (x, y)) def player(x, y): screen.blit(pl...
{"/keyboard_game.py": ["/configuration.py"]}