index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
89,997
EdnaCorzo/ecommerce
refs/heads/main
/app.py
from flask import Flask, render_template, request, jsonify, redirect, session from flask_login import LoginManager,login_user,logout_user,login_required,current_user from flask_wtf import form from formas import FormComent, FormEditarUsuario, FormEliminarProduct, FormEliminarUsuario, FormLista, FormProduct, FormUser...
{"/app.py": ["/formas.py", "/db.py"]}
89,998
EdnaCorzo/ecommerce
refs/heads/main
/formas.py
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, SubmitField from flask_wtf.file import FileField, FileAllowed, FileRequired from wtforms.validators import DataRequired class FormUser(FlaskForm): nombre = StringField('Nombre y Apellido', validators=[DataRequired(m...
{"/app.py": ["/formas.py", "/db.py"]}
90,001
j-ollivier/cvligne
refs/heads/master
/main/views.py
from django.shortcuts import render from django.http import HttpResponse from django.template import loader from .models import Navbar, ExpTable, FormationTable, Projects, ProjectsDocs, FooterItems def CV(request): context = { 'style': '/static/style_season.css', 'main_img': '/static/main_img.png'...
{"/main/views.py": ["/main/models.py"], "/devblog/admin.py": ["/devblog/models.py"], "/main/admin.py": ["/main/models.py"], "/devblog/views.py": ["/devblog/models.py", "/main/models.py"]}
90,002
j-ollivier/cvligne
refs/heads/master
/main/migrations/0012_auto_20161111_1005.py
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-11-11 09:05 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('main', '0011_auto_20161110_1316'), ] operations = [ ...
{"/main/views.py": ["/main/models.py"], "/devblog/admin.py": ["/devblog/models.py"], "/main/admin.py": ["/main/models.py"], "/devblog/views.py": ["/devblog/models.py", "/main/models.py"]}
90,003
j-ollivier/cvligne
refs/heads/master
/devblog/models.py
from django.db import models from django.utils import timezone ##################################################################### class Post(models.Model): """ A simpe post model to populate the site's devblog. """ # Variables pour les choix pré-remplis category_choices = ( ('CV', '...
{"/main/views.py": ["/main/models.py"], "/devblog/admin.py": ["/devblog/models.py"], "/main/admin.py": ["/main/models.py"], "/devblog/views.py": ["/devblog/models.py", "/main/models.py"]}
90,004
j-ollivier/cvligne
refs/heads/master
/devblog/urls.py
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.DevblogHome, name='DevblogHome'), ]
{"/main/views.py": ["/main/models.py"], "/devblog/admin.py": ["/devblog/models.py"], "/main/admin.py": ["/main/models.py"], "/devblog/views.py": ["/devblog/models.py", "/main/models.py"]}
90,005
j-ollivier/cvligne
refs/heads/master
/main/migrations/0013_auto_20161111_1440.py
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-11-11 13:40 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('main', '0012_auto_20161111_1005'), ] operations = [ migrations.AddField( ...
{"/main/views.py": ["/main/models.py"], "/devblog/admin.py": ["/devblog/models.py"], "/main/admin.py": ["/main/models.py"], "/devblog/views.py": ["/devblog/models.py", "/main/models.py"]}
90,006
j-ollivier/cvligne
refs/heads/master
/devblog/admin.py
from django.contrib import admin from .models import Post # Register your models here. class AdminPost(admin.ModelAdmin): list_display = [ 'uid', 'title','posted_date', 'category'] ordering = ['posted_date'] admin.site.register(Post, AdminPost)
{"/main/views.py": ["/main/models.py"], "/devblog/admin.py": ["/devblog/models.py"], "/main/admin.py": ["/main/models.py"], "/devblog/views.py": ["/devblog/models.py", "/main/models.py"]}
90,007
j-ollivier/cvligne
refs/heads/master
/main/migrations/0005_formationtable.py
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-11-09 12:59 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('main', '0004_auto_20161109_1324'), ] operations = [ migrations.CreateModel( ...
{"/main/views.py": ["/main/models.py"], "/devblog/admin.py": ["/devblog/models.py"], "/main/admin.py": ["/main/models.py"], "/devblog/views.py": ["/devblog/models.py", "/main/models.py"]}
90,008
j-ollivier/cvligne
refs/heads/master
/main/urls.py
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.CV, name='CV'), url(r'^cv/', views.CV, name='CV'), url(r'^projets/', views.Projets, name='Projets'), url(r'^focus/(?P<project_uid>\d+)', views.ProjetFocus, name='focus'), ]
{"/main/views.py": ["/main/models.py"], "/devblog/admin.py": ["/devblog/models.py"], "/main/admin.py": ["/main/models.py"], "/devblog/views.py": ["/devblog/models.py", "/main/models.py"]}
90,009
j-ollivier/cvligne
refs/heads/master
/main/migrations/0001_initial.py
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-11-06 06:39 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Navbar',...
{"/main/views.py": ["/main/models.py"], "/devblog/admin.py": ["/devblog/models.py"], "/main/admin.py": ["/main/models.py"], "/devblog/views.py": ["/devblog/models.py", "/main/models.py"]}
90,010
j-ollivier/cvligne
refs/heads/master
/main/models.py
from django.db import models ##################################################################### class Navbar(models.Model): """ To facilitate devblog's navbar building and tidiness I build the navbar in a class and let the templates do the html for me. """ # Variables # Att...
{"/main/views.py": ["/main/models.py"], "/devblog/admin.py": ["/devblog/models.py"], "/main/admin.py": ["/main/models.py"], "/devblog/views.py": ["/devblog/models.py", "/main/models.py"]}
90,011
j-ollivier/cvligne
refs/heads/master
/main/admin.py
from django.contrib import admin from .models import Navbar , ExpTable, FormationTable, Projects, ProjectsDocs, FooterItems ##################################################################### class AdminNavbar(admin.ModelAdmin): list_display = [ 'uid', 'name','picture', 'link'] ordering = ['uid'] ad...
{"/main/views.py": ["/main/models.py"], "/devblog/admin.py": ["/devblog/models.py"], "/main/admin.py": ["/main/models.py"], "/devblog/views.py": ["/devblog/models.py", "/main/models.py"]}
90,012
j-ollivier/cvligne
refs/heads/master
/main/migrations/0009_projectsdocs_link.py
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-11-10 09:30 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('main', '0008_auto_20161110_1026'), ] operations = [ migrations.AddField( ...
{"/main/views.py": ["/main/models.py"], "/devblog/admin.py": ["/devblog/models.py"], "/main/admin.py": ["/main/models.py"], "/devblog/views.py": ["/devblog/models.py", "/main/models.py"]}
90,013
j-ollivier/cvligne
refs/heads/master
/devblog/views.py
from django.shortcuts import render from django.http import HttpResponse from django.template import loader from .models import Post from main.models import Navbar, FooterItems # TODO : # enhance categories dic entry to have a link to a page listing all posts including this category def DevblogHome(request): cont...
{"/main/views.py": ["/main/models.py"], "/devblog/admin.py": ["/devblog/models.py"], "/main/admin.py": ["/main/models.py"], "/devblog/views.py": ["/devblog/models.py", "/main/models.py"]}
90,014
j-ollivier/cvligne
refs/heads/master
/main/migrations/0008_auto_20161110_1026.py
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-11-10 09:26 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('main', '0007_projects'), ] operations = [ mi...
{"/main/views.py": ["/main/models.py"], "/devblog/admin.py": ["/devblog/models.py"], "/main/admin.py": ["/main/models.py"], "/devblog/views.py": ["/devblog/models.py", "/main/models.py"]}
90,015
j-ollivier/cvligne
refs/heads/master
/main/migrations/0007_projects.py
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-11-10 09:05 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('main', '0006_auto_20161109_1433'), ] operations = [ migrations.CreateModel( ...
{"/main/views.py": ["/main/models.py"], "/devblog/admin.py": ["/devblog/models.py"], "/main/admin.py": ["/main/models.py"], "/devblog/views.py": ["/devblog/models.py", "/main/models.py"]}
90,023
tanvirulz/annotrain
refs/heads/master
/annotation.py
import shutil import datetime import os class Annotation: def __init__(self,ID=None,name=None,address=None,dataset_ID = None,tag=None,desc=None,comment=None,created_at=None,numfile=None): self.ID = ID #unique id self.name = name #usergiven Name self.address = address #address to the folder...
{"/sandbox.py": ["/helperfunctions.py"], "/model.py": ["/helperfunctions.py"], "/maintest.py": ["/annotrain.py"], "/annotrain.py": ["/dataset.py", "/annotation.py", "/model.py", "/config.py", "/helperfunctions.py"], "/annotrain_shell.py": ["/annotrain.py"]}
90,024
tanvirulz/annotrain
refs/heads/master
/sandbox.py
#sandbox for silly test codes import datetime import json from dateutil.parser import parse as datetime_parse from helperfunctions import * from cmd2 import Cmd class REPL(Cmd): prompt = "life> " intro = "Welcome to the real world!" def __init__(self): Cmd.__init__(self) if __name__ == '__main...
{"/sandbox.py": ["/helperfunctions.py"], "/model.py": ["/helperfunctions.py"], "/maintest.py": ["/annotrain.py"], "/annotrain.py": ["/dataset.py", "/annotation.py", "/model.py", "/config.py", "/helperfunctions.py"], "/annotrain_shell.py": ["/annotrain.py"]}
90,025
tanvirulz/annotrain
refs/heads/master
/config.py
# global config variables. Will have to change this for parallel sessions. DEFAULT_DATA_ROOT_DIR = "alldata" DEFAULT_PROJECT_NAME = "workspace"
{"/sandbox.py": ["/helperfunctions.py"], "/model.py": ["/helperfunctions.py"], "/maintest.py": ["/annotrain.py"], "/annotrain.py": ["/dataset.py", "/annotation.py", "/model.py", "/config.py", "/helperfunctions.py"], "/annotrain_shell.py": ["/annotrain.py"]}
90,026
tanvirulz/annotrain
refs/heads/master
/dataset.py
import shutil import datetime import os class Dataset: def __init__(self, ID=None,name=None,address=None,tag=None,desc = None,comment=None,created_at=None,numfile=None): self.ID = ID #unique ID self.name = name #usergiven name self.address = address #address to the folder self.annot...
{"/sandbox.py": ["/helperfunctions.py"], "/model.py": ["/helperfunctions.py"], "/maintest.py": ["/annotrain.py"], "/annotrain.py": ["/dataset.py", "/annotation.py", "/model.py", "/config.py", "/helperfunctions.py"], "/annotrain_shell.py": ["/annotrain.py"]}
90,027
tanvirulz/annotrain
refs/heads/master
/model.py
import os import datetime import shutil from helperfunctions import * class Model: def __init__(self,ID=None,name=None,address=None,desc=None,comment=None, tag=None, created_at=None,mtype=None,parent_model=None,trained_on_dataset_ID = None, trained_on_annotation_ID=None): ...
{"/sandbox.py": ["/helperfunctions.py"], "/model.py": ["/helperfunctions.py"], "/maintest.py": ["/annotrain.py"], "/annotrain.py": ["/dataset.py", "/annotation.py", "/model.py", "/config.py", "/helperfunctions.py"], "/annotrain_shell.py": ["/annotrain.py"]}
90,028
tanvirulz/annotrain
refs/heads/master
/maintest.py
import json import os import sys import random import argparse import shutil import uuid import datetime from annotrain import AnnoTrain #uuid4 promises unique id for next approx(3600) years. Fingers crossed! ''' def save_session(dd,id_generator,file_name): #dd["id_gen"] = id_generator.int_val() ...
{"/sandbox.py": ["/helperfunctions.py"], "/model.py": ["/helperfunctions.py"], "/maintest.py": ["/annotrain.py"], "/annotrain.py": ["/dataset.py", "/annotation.py", "/model.py", "/config.py", "/helperfunctions.py"], "/annotrain_shell.py": ["/annotrain.py"]}
90,029
tanvirulz/annotrain
refs/heads/master
/helperfunctions.py
import uuid from dateutil.parser import parse# as datetime_parse def datetime_parse(ds): if ds: return parse(ds) else: return None #id_counter = 0 def gen_ID(pre="",post=""): return pre+str(uuid.uuid4())+post #id_counter +=1 #return pre+str(id_counter)+post #check if b is...
{"/sandbox.py": ["/helperfunctions.py"], "/model.py": ["/helperfunctions.py"], "/maintest.py": ["/annotrain.py"], "/annotrain.py": ["/dataset.py", "/annotation.py", "/model.py", "/config.py", "/helperfunctions.py"], "/annotrain_shell.py": ["/annotrain.py"]}
90,030
tanvirulz/annotrain
refs/heads/master
/annotrain.py
import shutil import json import os import datetime from dataset import Dataset from annotation import Annotation from model import Model from config import * from helperfunctions import * class AnnoTrain: def __init__(self, p_name=None, data_root=None): self.data_all = {} self.anno_all = {} ...
{"/sandbox.py": ["/helperfunctions.py"], "/model.py": ["/helperfunctions.py"], "/maintest.py": ["/annotrain.py"], "/annotrain.py": ["/dataset.py", "/annotation.py", "/model.py", "/config.py", "/helperfunctions.py"], "/annotrain_shell.py": ["/annotrain.py"]}
90,031
tanvirulz/annotrain
refs/heads/master
/annotrain_shell.py
import os #from cmd2 import Cmd import cmd2 import argparse from annotrain import AnnoTrain class AnnoTrainShell(cmd2.Cmd): """The annotrain shell""" prompt = 'ats>: ' intro = "Welcome to the AnnoTrain shell!" ws = None init_parser = argparse.ArgumentParser() init_parser.add_argument('-...
{"/sandbox.py": ["/helperfunctions.py"], "/model.py": ["/helperfunctions.py"], "/maintest.py": ["/annotrain.py"], "/annotrain.py": ["/dataset.py", "/annotation.py", "/model.py", "/config.py", "/helperfunctions.py"], "/annotrain_shell.py": ["/annotrain.py"]}
90,032
tanvirulz/annotrain
refs/heads/master
/testgen.py
import json import os import sys import random import argparse idgen = 0 froot = "dummy-data-sets" if not os.path.exists(froot): os.makedirs(froot) num_dset = 10 random.seed() for i in range(10): #dset_name = "d{}".format(i) dset_name = "c{}".format(i) dset_addr = froot + "/"+dset_name if not ...
{"/sandbox.py": ["/helperfunctions.py"], "/model.py": ["/helperfunctions.py"], "/maintest.py": ["/annotrain.py"], "/annotrain.py": ["/dataset.py", "/annotation.py", "/model.py", "/config.py", "/helperfunctions.py"], "/annotrain_shell.py": ["/annotrain.py"]}
90,038
sanghuynh1501/wavenet_denoising
refs/heads/master
/data_loader.py
import librosa import numpy as np import pandas as pd from tqdm import tqdm from scipy import signal from scipy.io import wavfile from hdf5_data import HDF5DatasetWriter def load_data(data_path, second, total=0): df = pd.read_csv(data_path, sep='\t') print(df.head(10)) dataset = None if "train" in d...
{"/data_loader.py": ["/hdf5_data.py"], "/training.py": ["/hdf5_data.py", "/model.py"]}
90,039
sanghuynh1501/wavenet_denoising
refs/heads/master
/layers.py
import numpy as np import tensorflow as tf from tensorflow import keras from tensorflow.keras.layers import Layer class AddSingletonDepth(Layer): def __init__(self): super(AddSingletonDepth, self).__init__() def call(self, x, mask=None): x = tf.expand_dims(x, axis=-1) # add a dimension of t...
{"/data_loader.py": ["/hdf5_data.py"], "/training.py": ["/hdf5_data.py", "/model.py"]}
90,040
sanghuynh1501/wavenet_denoising
refs/heads/master
/hdf5_data.py
import os import h5py import numpy as np import random class HDF5DatasetWriter: def __init__(self, dims, output_path, batch_size=128, buffer_size=100): if os.path.exists(output_path): raise ValueError(output_path) self.db = h5py.File(output_path, "w") self.audios = self.db.crea...
{"/data_loader.py": ["/hdf5_data.py"], "/training.py": ["/hdf5_data.py", "/model.py"]}
90,041
sanghuynh1501/wavenet_denoising
refs/heads/master
/training.py
import numpy as np from tqdm import tqdm from torch import nn import torch import random from hdf5_data import HDF5DatasetGenerator from model import AutoEncoder batch_size = 128 learning_rate = 0.01 train_gen = HDF5DatasetGenerator(db_path="train.hdf5", batch_size=batch_size) test_gen = HDF5DatasetGenerator(db_path=...
{"/data_loader.py": ["/hdf5_data.py"], "/training.py": ["/hdf5_data.py", "/model.py"]}
90,042
sanghuynh1501/wavenet_denoising
refs/heads/master
/model.py
import math from collections import OrderedDict import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.parameter import Parameter class AutoEncoder(nn.Module): def __init__(self): super(AutoEncoder, self).__init__() self.encoder = nn.Sequential( nn.Conv2d(1,...
{"/data_loader.py": ["/hdf5_data.py"], "/training.py": ["/hdf5_data.py", "/model.py"]}
90,043
ZendaInnocent/news-api
refs/heads/main
/api/server/tokens.py
from datetime import datetime, timedelta from typing import Optional from decouple import config from fastapi.security import OAuth2PasswordBearer from jose import jwt oauth2_scheme = OAuth2PasswordBearer(tokenUrl='users/login') # openssl rand -hex 32 SECRET_KEY = config('JWT_SECRET') ALGORITHM = config('JWT_ALGORIT...
{"/api/server/routes.py": ["/api/server/database.py", "/api/server/models.py", "/api/server/tokens.py"], "/api/server/auth.py": ["/api/server/database.py", "/api/server/models.py", "/api/server/tokens.py"], "/api/server/app.py": ["/api/server/auth.py", "/api/server/database.py", "/api/server/models.py", "/api/server/ro...
90,044
ZendaInnocent/news-api
refs/heads/main
/scraper/news/pipelines.py
# Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html import pymongo # useful for handling different item types with a single interface from itemadapter import ItemAdapter from scrapy.exceptions import D...
{"/api/server/routes.py": ["/api/server/database.py", "/api/server/models.py", "/api/server/tokens.py"], "/api/server/auth.py": ["/api/server/database.py", "/api/server/models.py", "/api/server/tokens.py"], "/api/server/app.py": ["/api/server/auth.py", "/api/server/database.py", "/api/server/models.py", "/api/server/ro...
90,045
ZendaInnocent/news-api
refs/heads/main
/api/server/routes.py
from fastapi import APIRouter, Depends from fastapi_pagination import Page, Params, paginate from .database import retrieve_news from .models import ResponseModel from .tokens import oauth2_scheme router = APIRouter() @router.get('/', response_description='News retrieved', response_model=Page) async def get_news(to...
{"/api/server/routes.py": ["/api/server/database.py", "/api/server/models.py", "/api/server/tokens.py"], "/api/server/auth.py": ["/api/server/database.py", "/api/server/models.py", "/api/server/tokens.py"], "/api/server/app.py": ["/api/server/auth.py", "/api/server/database.py", "/api/server/models.py", "/api/server/ro...
90,046
ZendaInnocent/news-api
refs/heads/main
/api/server/auth.py
from decouple import config from fastapi import Depends, HTTPException, status from jose import JWTError, jwt from passlib.context import CryptContext from .database import database from .models import TokenData, User, UserInDB from .tokens import oauth2_scheme SECRET_KEY = config('JWT_SECRET') ALGORITHM = config('JW...
{"/api/server/routes.py": ["/api/server/database.py", "/api/server/models.py", "/api/server/tokens.py"], "/api/server/auth.py": ["/api/server/database.py", "/api/server/models.py", "/api/server/tokens.py"], "/api/server/app.py": ["/api/server/auth.py", "/api/server/database.py", "/api/server/models.py", "/api/server/ro...
90,047
ZendaInnocent/news-api
refs/heads/main
/scraper/news/spiders/dar24.py
# Spider for dar24.com import scrapy from bs4 import BeautifulSoup def get_link(item): return item.find('h2', {'class': 'title'}).find('a').get('href') def get_title(item): return item.find('h2', {'class': 'title'}).find('a').text def get_image_url(item): return item.find( 'div', {'class': 'f...
{"/api/server/routes.py": ["/api/server/database.py", "/api/server/models.py", "/api/server/tokens.py"], "/api/server/auth.py": ["/api/server/database.py", "/api/server/models.py", "/api/server/tokens.py"], "/api/server/app.py": ["/api/server/auth.py", "/api/server/database.py", "/api/server/models.py", "/api/server/ro...
90,048
ZendaInnocent/news-api
refs/heads/main
/api/server/database.py
import motor.motor_asyncio from decouple import config # name of the database MONGODB_DB = config('DB_NAME', default='news_api') # name of the collection MONGODB_COLLECTION = config('COLLECTION_NAME', default='news') # mongodb://<dbUser>:<dbUserPassword>@host:port MONGO_DETAILS = config('MONGO_DETAILS', default='mo...
{"/api/server/routes.py": ["/api/server/database.py", "/api/server/models.py", "/api/server/tokens.py"], "/api/server/auth.py": ["/api/server/database.py", "/api/server/models.py", "/api/server/tokens.py"], "/api/server/app.py": ["/api/server/auth.py", "/api/server/database.py", "/api/server/models.py", "/api/server/ro...
90,049
ZendaInnocent/news-api
refs/heads/main
/scraper/news/spiders/itv.py
# Spider for itv.co.tz import scrapy from bs4 import BeautifulSoup def get_link(item): return item.find('span', {'class': 'field-content'}).find('a').get('href') def get_title(item): return item.find('span', {'class': 'field-content'}).find('a').text def get_image_url(item): return item.find( ...
{"/api/server/routes.py": ["/api/server/database.py", "/api/server/models.py", "/api/server/tokens.py"], "/api/server/auth.py": ["/api/server/database.py", "/api/server/models.py", "/api/server/tokens.py"], "/api/server/app.py": ["/api/server/auth.py", "/api/server/database.py", "/api/server/models.py", "/api/server/ro...
90,050
ZendaInnocent/news-api
refs/heads/main
/api/server/models.py
from typing import Optional from pydantic import BaseModel class Token(BaseModel): access_token: str token_type: str class TokenData(BaseModel): username: Optional[str] = None class User(BaseModel): username: str password: str class UserInDB(User): hashed_password: str def ResponseMod...
{"/api/server/routes.py": ["/api/server/database.py", "/api/server/models.py", "/api/server/tokens.py"], "/api/server/auth.py": ["/api/server/database.py", "/api/server/models.py", "/api/server/tokens.py"], "/api/server/app.py": ["/api/server/auth.py", "/api/server/database.py", "/api/server/models.py", "/api/server/ro...
90,051
ZendaInnocent/news-api
refs/heads/main
/scraper/news/spiders/millardayo.py
# Spider for MillardAyo.com import scrapy from bs4 import BeautifulSoup class MillardAyoSpider(scrapy.Spider): name = 'millardayo' allowed_urls = ['www.millardayo.com'] start_urls = [ 'https://millardayo.com', ] def parse(self, response, **kwargs): # extracting data - link, imag...
{"/api/server/routes.py": ["/api/server/database.py", "/api/server/models.py", "/api/server/tokens.py"], "/api/server/auth.py": ["/api/server/database.py", "/api/server/models.py", "/api/server/tokens.py"], "/api/server/app.py": ["/api/server/auth.py", "/api/server/database.py", "/api/server/models.py", "/api/server/ro...
90,052
ZendaInnocent/news-api
refs/heads/main
/api/main.py
import uvicorn if __name__ == '__main__': uvicorn.run('server.app:app', reload=True, host='0.0.0.0', port=80)
{"/api/server/routes.py": ["/api/server/database.py", "/api/server/models.py", "/api/server/tokens.py"], "/api/server/auth.py": ["/api/server/database.py", "/api/server/models.py", "/api/server/tokens.py"], "/api/server/app.py": ["/api/server/auth.py", "/api/server/database.py", "/api/server/models.py", "/api/server/ro...
90,053
ZendaInnocent/news-api
refs/heads/main
/api/server/app.py
from datetime import timedelta from decouple import config from fastapi import Depends, FastAPI, HTTPException from fastapi.middleware.cors import CORSMiddleware from fastapi.security import OAuth2PasswordRequestForm from fastapi_pagination import add_pagination from .auth import authenticate_user, get_password_hash ...
{"/api/server/routes.py": ["/api/server/database.py", "/api/server/models.py", "/api/server/tokens.py"], "/api/server/auth.py": ["/api/server/database.py", "/api/server/models.py", "/api/server/tokens.py"], "/api/server/app.py": ["/api/server/auth.py", "/api/server/database.py", "/api/server/models.py", "/api/server/ro...
90,069
fresher96/arabic-speech-commands
refs/heads/master
/src/utils.py
import os from math import ceil import numpy as np from scipy.io import wavfile from collections import defaultdict import pandas as pd # Ensure that the current file is a wave file def is_wav_file(file_name): return file_name.lower().endswith('.wav') # Create a dictionary to match each class_name with its file...
{"/main.py": ["/src/configs.py", "/src/data.py", "/src/trainer.py", "/src/model.py"], "/src/transforms.py": ["/src/utils.py", "/src/load.py"], "/pytorch_streaming.py": ["/src/configs.py", "/src/data.py", "/src/trainer.py", "/src/model.py", "/src/ClassDict.py"], "/feature_extraction.py": ["/src/ClassDict.py", "/src/conf...
90,070
fresher96/arabic-speech-commands
refs/heads/master
/main.py
from comet_ml import Experiment from src.configs import get_args from src.data import get_dataloader from src.trainer import ModelTrainer from src.model import * def load_model(args): model_constructor = globals()[args.model] model = model_constructor(args) return model def run(): args = get_args()...
{"/main.py": ["/src/configs.py", "/src/data.py", "/src/trainer.py", "/src/model.py"], "/src/transforms.py": ["/src/utils.py", "/src/load.py"], "/pytorch_streaming.py": ["/src/configs.py", "/src/data.py", "/src/trainer.py", "/src/model.py", "/src/ClassDict.py"], "/feature_extraction.py": ["/src/ClassDict.py", "/src/conf...
90,071
fresher96/arabic-speech-commands
refs/heads/master
/src/transforms.py
import torch import numpy as np import random import torchaudio from src.utils import * from src.load import load_silence from librosa.effects import time_stretch class Random_Transform(object): def __init__(self, height, width): self.height = height self.width = width def __call__(self, si...
{"/main.py": ["/src/configs.py", "/src/data.py", "/src/trainer.py", "/src/model.py"], "/src/transforms.py": ["/src/utils.py", "/src/load.py"], "/pytorch_streaming.py": ["/src/configs.py", "/src/data.py", "/src/trainer.py", "/src/model.py", "/src/ClassDict.py"], "/feature_extraction.py": ["/src/ClassDict.py", "/src/conf...
90,072
fresher96/arabic-speech-commands
refs/heads/master
/pytorch_streaming.py
import os import numpy as np import pyaudio from threading import Timer from comet_ml import Experiment from src.configs import get_args from src.data import get_dataloader from src.trainer import ModelTrainer from src.model import * from src.ClassDict import ClassDict from src.data import get_transform def load_mod...
{"/main.py": ["/src/configs.py", "/src/data.py", "/src/trainer.py", "/src/model.py"], "/src/transforms.py": ["/src/utils.py", "/src/load.py"], "/pytorch_streaming.py": ["/src/configs.py", "/src/data.py", "/src/trainer.py", "/src/model.py", "/src/ClassDict.py"], "/feature_extraction.py": ["/src/ClassDict.py", "/src/conf...
90,073
fresher96/arabic-speech-commands
refs/heads/master
/src/configs.py
import argparse import os import numpy as np import random import torch def set_defaults(): parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) # comet_ml configs parser.add_argument('--comet_key', type=str, default='') parser.add_argument('--comet_project', type=...
{"/main.py": ["/src/configs.py", "/src/data.py", "/src/trainer.py", "/src/model.py"], "/src/transforms.py": ["/src/utils.py", "/src/load.py"], "/pytorch_streaming.py": ["/src/configs.py", "/src/data.py", "/src/trainer.py", "/src/model.py", "/src/ClassDict.py"], "/feature_extraction.py": ["/src/ClassDict.py", "/src/conf...
90,074
fresher96/arabic-speech-commands
refs/heads/master
/feature_extraction.py
import torch import numpy as np import os from scipy.io import wavfile import torchaudio from src import utils from src import transforms from src.ClassDict import ClassDict from src import load import random from comet_ml import Experiment from src.configs import get_args from src.data import get_dataloader from sr...
{"/main.py": ["/src/configs.py", "/src/data.py", "/src/trainer.py", "/src/model.py"], "/src/transforms.py": ["/src/utils.py", "/src/load.py"], "/pytorch_streaming.py": ["/src/configs.py", "/src/data.py", "/src/trainer.py", "/src/model.py", "/src/ClassDict.py"], "/feature_extraction.py": ["/src/ClassDict.py", "/src/conf...
90,075
fresher96/arabic-speech-commands
refs/heads/master
/src/data.py
import torch import numpy as np import os import torchaudio from src import utils from src import transforms from src.ClassDict import ClassDict import random class ASCDataset(torch.utils.data.Dataset): def __init__(self, data_root, dataset, transform, s_transform, nsilence, signal_samples, signal_sr, noise_pk...
{"/main.py": ["/src/configs.py", "/src/data.py", "/src/trainer.py", "/src/model.py"], "/src/transforms.py": ["/src/utils.py", "/src/load.py"], "/pytorch_streaming.py": ["/src/configs.py", "/src/data.py", "/src/trainer.py", "/src/model.py", "/src/ClassDict.py"], "/feature_extraction.py": ["/src/ClassDict.py", "/src/conf...
90,076
fresher96/arabic-speech-commands
refs/heads/master
/src/plots.py
import os import numpy as np import matplotlib.pyplot as plt from matplotlib.ticker import MultipleLocator import json from configs import get_args import torchaudio def plot_features(args, spectrogram, mel_spectrogram, mfcc, num_frames): plt.figure(1, figsize=(8, 8)) plt.subplots_adjust(left=0.08, right=1.1...
{"/main.py": ["/src/configs.py", "/src/data.py", "/src/trainer.py", "/src/model.py"], "/src/transforms.py": ["/src/utils.py", "/src/load.py"], "/pytorch_streaming.py": ["/src/configs.py", "/src/data.py", "/src/trainer.py", "/src/model.py", "/src/ClassDict.py"], "/feature_extraction.py": ["/src/ClassDict.py", "/src/conf...
90,077
fresher96/arabic-speech-commands
refs/heads/master
/src/trainer.py
import os from comet_ml import Experiment import torch from torch import nn from torch.nn import functional as F from torch import optim from tqdm import tqdm import numpy as np import random from sklearn.metrics import confusion_matrix import matplotlib.pyplot as plt from src.ClassDict import ClassDict from src.data ...
{"/main.py": ["/src/configs.py", "/src/data.py", "/src/trainer.py", "/src/model.py"], "/src/transforms.py": ["/src/utils.py", "/src/load.py"], "/pytorch_streaming.py": ["/src/configs.py", "/src/data.py", "/src/trainer.py", "/src/model.py", "/src/ClassDict.py"], "/feature_extraction.py": ["/src/ClassDict.py", "/src/conf...
90,078
fresher96/arabic-speech-commands
refs/heads/master
/src/ClassDict.py
class ClassDict: dct = ['cancel', 'one', 'move', 'record', 'stop', 'down', 'backward', 'zoom out', 'close', 'eight', 'undo', 'options', 'previous', 'open', 'rotate', 'next', 'disable', 't...
{"/main.py": ["/src/configs.py", "/src/data.py", "/src/trainer.py", "/src/model.py"], "/src/transforms.py": ["/src/utils.py", "/src/load.py"], "/pytorch_streaming.py": ["/src/configs.py", "/src/data.py", "/src/trainer.py", "/src/model.py", "/src/ClassDict.py"], "/feature_extraction.py": ["/src/ClassDict.py", "/src/conf...
90,079
fresher96/arabic-speech-commands
refs/heads/master
/src/model.py
import torch from torch import nn from torch.nn import functional as F class LogisticRegression(nn.Module): def __init__(self, args): super(LogisticRegression, self).__init__() self.name = self.__class__.__name__ self.input_shape = args.nfeature * args.signal_width self.dropout ...
{"/main.py": ["/src/configs.py", "/src/data.py", "/src/trainer.py", "/src/model.py"], "/src/transforms.py": ["/src/utils.py", "/src/load.py"], "/pytorch_streaming.py": ["/src/configs.py", "/src/data.py", "/src/trainer.py", "/src/model.py", "/src/ClassDict.py"], "/feature_extraction.py": ["/src/ClassDict.py", "/src/conf...
90,080
fresher96/arabic-speech-commands
refs/heads/master
/src/load.py
import os import numpy as np from scipy.io import wavfile # Read the wave file, and check its length (number of samples) def load_data(class_name, file_name, signal_samples, data_root, signal_sr, check_length=True): file_path = os.path.join(data_root, 'dataset', class_name, file_name) if class_name == 'backgr...
{"/main.py": ["/src/configs.py", "/src/data.py", "/src/trainer.py", "/src/model.py"], "/src/transforms.py": ["/src/utils.py", "/src/load.py"], "/pytorch_streaming.py": ["/src/configs.py", "/src/data.py", "/src/trainer.py", "/src/model.py", "/src/ClassDict.py"], "/feature_extraction.py": ["/src/ClassDict.py", "/src/conf...
90,081
Brendan-Lucas/CENGC
refs/heads/master
/ItemInput.py
import Validations as validate import datetime MAX_VOLUME = 80000 TAX_RATE = 23 def get_name(): while(True): name = raw_input("Item Name: ") validation = validate.validate_name(name) if validation: print (validation) else: return name def get_volume(remaini...
{"/BuildItem.py": ["/Validations.py"], "/QueryScript.py": ["/SMS.py", "/BuildItem.py"], "/CLI.py": ["/Validations.py", "/QueryScript.py", "/SMS.py"]}
90,082
Brendan-Lucas/CENGC
refs/heads/master
/BuildItem.py
import Validations as validate import datetime MAX_VOLUME = 80000 TAX_RATE = 23 def expiration_days_to_date(days): today = datetime.date.today() timedelta = datetime.timedelta(days=days) expiration_date = today + timedelta return expiration_date def apply_tax(price): return price * TAX_RATE * 0.0...
{"/BuildItem.py": ["/Validations.py"], "/QueryScript.py": ["/SMS.py", "/BuildItem.py"], "/CLI.py": ["/Validations.py", "/QueryScript.py", "/SMS.py"]}
90,083
Brendan-Lucas/CENGC
refs/heads/master
/Validations.py
# all validations for user input def validate_numericality(input): try: float(input) return False except ValueError: return True def validate_length(input, maxlength): if len(input) > maxlength: return True else: return False def validate_magnitude(inp, min=-1,...
{"/BuildItem.py": ["/Validations.py"], "/QueryScript.py": ["/SMS.py", "/BuildItem.py"], "/CLI.py": ["/Validations.py", "/QueryScript.py", "/SMS.py"]}
90,084
Brendan-Lucas/CENGC
refs/heads/master
/SMS.py
from twilio.rest import Client from urllib.parse import urlencode from urllib.request import Request, urlopen EXPIRY_MESSAGE = "Warning: Item %s, ID %s expires in %d days.\nStorage at %s capacity." STORAGE_MESSAGE = "Warning: Your storage is down to %d%% capacity." api_address = "https://api.twilio.com/2010-04-01/Acc...
{"/BuildItem.py": ["/Validations.py"], "/QueryScript.py": ["/SMS.py", "/BuildItem.py"], "/CLI.py": ["/Validations.py", "/QueryScript.py", "/SMS.py"]}
90,085
Brendan-Lucas/CENGC
refs/heads/master
/QueryScript.py
#from bson import json_util import json import uuid from SMS import send_alert, expiry_alert import BuildItem from datetime import date, datetime runStartup = True; COSTFILE = 'Costs.json' CAPACITY = 80000 DATABASEFILE = 'Store.json' gStorage = {} gItems = {} """QUERY: AddItem""" def AddItem(name, volume, price, day...
{"/BuildItem.py": ["/Validations.py"], "/QueryScript.py": ["/SMS.py", "/BuildItem.py"], "/CLI.py": ["/Validations.py", "/QueryScript.py", "/SMS.py"]}
90,086
Brendan-Lucas/CENGC
refs/heads/master
/QUERIES.py
import json import datetime def itemsWithName(name, filepath): file = open(filepath, 'r') JSON =file.read() file.close() d=json.loads(JSON) for item in d["Items"]: if item["Name"] == name: print (item) def allItems(filepath): file = open(filepath, 'r') JSO...
{"/BuildItem.py": ["/Validations.py"], "/QueryScript.py": ["/SMS.py", "/BuildItem.py"], "/CLI.py": ["/Validations.py", "/QueryScript.py", "/SMS.py"]}
90,087
Brendan-Lucas/CENGC
refs/heads/master
/CLI.py
import Validations as validate import QueryScript import SMS def get_name(): while(True): name = input("Item Name: ") validation = validate.validate_name(name) if validation: print(validation) else: return name def get_volume(remaining_storage): while (T...
{"/BuildItem.py": ["/Validations.py"], "/QueryScript.py": ["/SMS.py", "/BuildItem.py"], "/CLI.py": ["/Validations.py", "/QueryScript.py", "/SMS.py"]}
90,090
pker98/HappyWheelsV3
refs/heads/master
/UI/Print_salesman_menu.py
import os class Print_salesman_menu(object): def __init__(self): pass def ID_menu(self): os.system("cls||clear") print("\t~Log in~") id = input("Enter your ID: ") return id def password_menu(self, id): os.system("cls||clear") print("\t~...
{"/Controller/Order_controller.py": ["/UI/Print_cancel_order_menu.py"], "/Controller/Main_controller.py": ["/Controller/Order_controller.py"], "/main.py": ["/Controller/Main_controller.py", "/Utilizations/Format_text.py"]}
90,091
pker98/HappyWheelsV3
refs/heads/master
/Controller/Order_controller.py
from Repository.Orders_repo import Orders_repo from UI.Print_cancel_order_menu import Print_cancel_order_menu from Services.Cancel_order_service import Cancel_order_service from Utilizations.Salesman_validation import Salesman_validation from Utilizations.Salesman_validation import Salesman_validation class Order_con...
{"/Controller/Order_controller.py": ["/UI/Print_cancel_order_menu.py"], "/Controller/Main_controller.py": ["/Controller/Order_controller.py"], "/main.py": ["/Controller/Main_controller.py", "/Utilizations/Format_text.py"]}
90,092
pker98/HappyWheelsV3
refs/heads/master
/Controller/Main_controller.py
from UI.Print_main_menu import Print_main_menu from Controller.Rent_controller import Rent_controller from Controller.Salesman_controller import Salesman_controller from Controller.Order_controller import Order_controller from Controller.Information_controller import Information_controller class Main_controller(object...
{"/Controller/Order_controller.py": ["/UI/Print_cancel_order_menu.py"], "/Controller/Main_controller.py": ["/Controller/Order_controller.py"], "/main.py": ["/Controller/Main_controller.py", "/Utilizations/Format_text.py"]}
90,093
pker98/HappyWheelsV3
refs/heads/master
/Utilizations/Format_text.py
from tabulate import tabulate class Format_text(object): def __init__(self): pass ######### Rent process ########## def main_menu_format(self): header = tabulate([["Press 'I' for information\t\t\t\t\t\tPress 'X' for exit"]], tablefmt="plain") formatted_header = ''.join('{:^50}'...
{"/Controller/Order_controller.py": ["/UI/Print_cancel_order_menu.py"], "/Controller/Main_controller.py": ["/Controller/Order_controller.py"], "/main.py": ["/Controller/Main_controller.py", "/Utilizations/Format_text.py"]}
90,094
pker98/HappyWheelsV3
refs/heads/master
/UI/Print_cancel_order_menu.py
import os class Print_cancel_order_menu: def __init__(self): pass def find_by_num(self): os.system('cls||clear') print("~~Cancel order~~\n") order_num = input("Enter order number: ") return order_num def confirmation(self): print("Order successfully cancele...
{"/Controller/Order_controller.py": ["/UI/Print_cancel_order_menu.py"], "/Controller/Main_controller.py": ["/Controller/Order_controller.py"], "/main.py": ["/Controller/Main_controller.py", "/Utilizations/Format_text.py"]}
90,095
pker98/HappyWheelsV3
refs/heads/master
/UI/Print_information.py
from Models.Salesman import Salesman from Repository.Salesman_repo import Salesman_repo import os class Print_information(object): def __init__(self): pass def information_main_page(self): """ Prints out the information window from main menu """ os.system('cls||clear') print("\t...
{"/Controller/Order_controller.py": ["/UI/Print_cancel_order_menu.py"], "/Controller/Main_controller.py": ["/Controller/Order_controller.py"], "/main.py": ["/Controller/Main_controller.py", "/Utilizations/Format_text.py"]}
90,096
pker98/HappyWheelsV3
refs/heads/master
/main.py
from Controller.Main_controller import Main_controller from Repository.Cars_repo import Cars_repo from Controller.Rent_controller import Rent_controller from Utilizations.Arts import Arts from Utilizations.Format_text import Format_text import os def main(): os.system("cls||clear") print_art_page = Arts() ...
{"/Controller/Order_controller.py": ["/UI/Print_cancel_order_menu.py"], "/Controller/Main_controller.py": ["/Controller/Order_controller.py"], "/main.py": ["/Controller/Main_controller.py", "/Utilizations/Format_text.py"]}
90,097
adefelicibus/planemo
refs/heads/master
/planemo/io.py
from __future__ import print_function import os import sys import click from galaxy.tools.deps import commands from galaxy.tools.deps.commands import which def shell(cmds, **kwds): info(cmds) return commands.shell(cmds, **kwds) def info(message, *args): if args: message = message % args _ec...
{"/planemo/commands/cmd_shed_diff.py": ["/planemo/io.py"], "/planemo/commands/cmd_shed_upload.py": ["/planemo/io.py"], "/planemo/shed_lint.py": ["/planemo/shed.py", "/planemo/io.py"], "/tests/shed_app_test_utils.py": ["/tests/shed_app.py"], "/planemo/shed.py": ["/planemo/io.py"]}
90,098
adefelicibus/planemo
refs/heads/master
/planemo/commands/cmd_shed_download.py
""" """ import click from planemo.cli import pass_context from planemo import options from planemo import shed target_path = click.Path( file_okay=True, writable=True, resolve_path=True, ) @click.command("shed_download") @options.optional_project_arg(exists=True) @click.option( '--destination', ...
{"/planemo/commands/cmd_shed_diff.py": ["/planemo/io.py"], "/planemo/commands/cmd_shed_upload.py": ["/planemo/io.py"], "/planemo/shed_lint.py": ["/planemo/shed.py", "/planemo/io.py"], "/tests/shed_app_test_utils.py": ["/tests/shed_app.py"], "/planemo/shed.py": ["/planemo/io.py"]}
90,099
adefelicibus/planemo
refs/heads/master
/planemo/galaxy_serve.py
import os from planemo import galaxy_config from planemo import galaxy_run def serve(ctx, path, **kwds): # TODO: Preceate a user. # TODO: Setup an admin user. # TODO: Pass through more parameters. # TODO: Populate test-data directory as FTP directory. with galaxy_config.galaxy_config(ctx, path, *...
{"/planemo/commands/cmd_shed_diff.py": ["/planemo/io.py"], "/planemo/commands/cmd_shed_upload.py": ["/planemo/io.py"], "/planemo/shed_lint.py": ["/planemo/shed.py", "/planemo/io.py"], "/tests/shed_app_test_utils.py": ["/tests/shed_app.py"], "/planemo/shed.py": ["/planemo/io.py"]}
90,100
adefelicibus/planemo
refs/heads/master
/planemo/commands/cmd_shed_lint.py
import click import sys from planemo.cli import pass_context from planemo import options from planemo import shed from planemo import shed_lint @click.command('shed_lint') @options.optional_project_arg(exists=True) @options.report_level_option() @options.fail_level_option() @options.click.option( '--tools', ...
{"/planemo/commands/cmd_shed_diff.py": ["/planemo/io.py"], "/planemo/commands/cmd_shed_upload.py": ["/planemo/io.py"], "/planemo/shed_lint.py": ["/planemo/shed.py", "/planemo/io.py"], "/tests/shed_app_test_utils.py": ["/tests/shed_app.py"], "/planemo/shed.py": ["/planemo/io.py"]}
90,101
adefelicibus/planemo
refs/heads/master
/tests/test_shed_diff.py
""" Integration tests for shed_diff command. """ import os from .test_utils import ( CliShedTestCase, PRE_PYTHON_27, ) DIFF_LINES = [ "diff -r _local_/related_file _custom_shed_/related_file", "< A related non-tool file (modified).", "> A related non-tool file.", ] class ShedUploadTestCase(CliSh...
{"/planemo/commands/cmd_shed_diff.py": ["/planemo/io.py"], "/planemo/commands/cmd_shed_upload.py": ["/planemo/io.py"], "/planemo/shed_lint.py": ["/planemo/shed.py", "/planemo/io.py"], "/tests/shed_app_test_utils.py": ["/tests/shed_app.py"], "/planemo/shed.py": ["/planemo/io.py"]}
90,102
adefelicibus/planemo
refs/heads/master
/planemo/commands/cmd_shed_diff.py
""" """ import os import shutil import tempfile import click from planemo.cli import pass_context from planemo.io import shell from planemo import options from planemo import shed @click.command("shed_diff") @options.optional_project_arg(exists=True) @options.shed_owner_option() @options.shed_name_option() @options...
{"/planemo/commands/cmd_shed_diff.py": ["/planemo/io.py"], "/planemo/commands/cmd_shed_upload.py": ["/planemo/io.py"], "/planemo/shed_lint.py": ["/planemo/shed.py", "/planemo/io.py"], "/tests/shed_app_test_utils.py": ["/tests/shed_app.py"], "/planemo/shed.py": ["/planemo/io.py"]}
90,103
adefelicibus/planemo
refs/heads/master
/planemo/commands/cmd_shed_upload.py
""" """ import json import sys import click from planemo.cli import pass_context from planemo import options from planemo import shed from planemo.io import error from planemo.io import info from planemo.io import shell tar_path = click.Path( exists=True, file_okay=True, dir_okay=False, resolve_path...
{"/planemo/commands/cmd_shed_diff.py": ["/planemo/io.py"], "/planemo/commands/cmd_shed_upload.py": ["/planemo/io.py"], "/planemo/shed_lint.py": ["/planemo/shed.py", "/planemo/io.py"], "/tests/shed_app_test_utils.py": ["/tests/shed_app.py"], "/planemo/shed.py": ["/planemo/io.py"]}
90,104
adefelicibus/planemo
refs/heads/master
/planemo/shed_lint.py
import os import re import yaml from galaxy.tools.lint import LintContext from galaxy.tools.linters.help import rst_invalid from planemo.lint import lint_xsd from planemo.shed import ( path_to_repo_name, REPO_TYPE_UNRESTRICTED, REPO_TYPE_TOOL_DEP, REPO_TYPE_SUITE, CURRENT_CATEGORIES, ) from planemo....
{"/planemo/commands/cmd_shed_diff.py": ["/planemo/io.py"], "/planemo/commands/cmd_shed_upload.py": ["/planemo/io.py"], "/planemo/shed_lint.py": ["/planemo/shed.py", "/planemo/io.py"], "/tests/shed_app_test_utils.py": ["/tests/shed_app.py"], "/planemo/shed.py": ["/planemo/io.py"]}
90,105
adefelicibus/planemo
refs/heads/master
/tests/shed_app_test_utils.py
from collections import namedtuple import contextlib import shutil import socket from tempfile import mkdtemp import threading from requests import post from time import time as now from werkzeug.serving import run_simple from .shed_app import ( app, InMemoryShedDataModel, ) DEFAULT_OP_TIMEOUT = 2 def mock...
{"/planemo/commands/cmd_shed_diff.py": ["/planemo/io.py"], "/planemo/commands/cmd_shed_upload.py": ["/planemo/io.py"], "/planemo/shed_lint.py": ["/planemo/shed.py", "/planemo/io.py"], "/tests/shed_app_test_utils.py": ["/tests/shed_app.py"], "/planemo/shed.py": ["/planemo/io.py"]}
90,106
adefelicibus/planemo
refs/heads/master
/planemo/shed.py
import copy import fnmatch from planemo import glob import hashlib import json import os import tarfile from tempfile import ( mkstemp, mkdtemp, ) import shutil from six import iteritems import yaml try: from bioblend import toolshed except ImportError: toolshed = None from planemo.io import ( er...
{"/planemo/commands/cmd_shed_diff.py": ["/planemo/io.py"], "/planemo/commands/cmd_shed_upload.py": ["/planemo/io.py"], "/planemo/shed_lint.py": ["/planemo/shed.py", "/planemo/io.py"], "/tests/shed_app_test_utils.py": ["/tests/shed_app.py"], "/planemo/shed.py": ["/planemo/io.py"]}
90,107
adefelicibus/planemo
refs/heads/master
/tests/test_shed_lint.py
from .test_utils import CliTestCase class ShedLintTestCase(CliTestCase): def test_valid_repos(self): with self._isolate_repo("single_tool"): self._check_exit_code(["shed_lint"]) with self._isolate_repo("multi_repos_nested"): self._check_exit_code(["shed_lint", "--recursiv...
{"/planemo/commands/cmd_shed_diff.py": ["/planemo/io.py"], "/planemo/commands/cmd_shed_upload.py": ["/planemo/io.py"], "/planemo/shed_lint.py": ["/planemo/shed.py", "/planemo/io.py"], "/tests/shed_app_test_utils.py": ["/tests/shed_app.py"], "/planemo/shed.py": ["/planemo/io.py"]}
90,108
adefelicibus/planemo
refs/heads/master
/tests/shed_app.py
""" Test app to emulate planemo-relevant portions of the the ToolShed API... for now :). """ import os import json from uuid import uuid4 from flask import ( Flask, request, send_file, ) app = Flask(__name__) @app.route("/api/repositories") def get_repositories(): repos = app.config["model"].get_rep...
{"/planemo/commands/cmd_shed_diff.py": ["/planemo/io.py"], "/planemo/commands/cmd_shed_upload.py": ["/planemo/io.py"], "/planemo/shed_lint.py": ["/planemo/shed.py", "/planemo/io.py"], "/tests/shed_app_test_utils.py": ["/tests/shed_app.py"], "/planemo/shed.py": ["/planemo/io.py"]}
90,135
yiqingj/TileStache
refs/heads/master
/tests/vectormap.py
__author__ = 'yiqingj' from math import pi, cos, sin, log, exp, atan import sys, os, json import mapnik from map import vector_pb2, common_pb2 DEG_TO_RAD = pi / 180 RAD_TO_DEG = 180 / pi # Default number of rendering threads to spawn, should be roughly equal to number of CPU cores available NUM_THREADS = 4 def mi...
{"/TileStache/Vector/TnProtoEncoder.py": ["/map/__init__.py"]}
90,136
yiqingj/TileStache
refs/heads/master
/map/__init__.py
__author__ = 'yiqingj'
{"/TileStache/Vector/TnProtoEncoder.py": ["/map/__init__.py"]}
90,137
yiqingj/TileStache
refs/heads/master
/TileStache/Vector/TnProtoEncoder.py
from map import vector_pb2, common_pb2 __author__ = 'yiqingj' def _highwayToPBRoadType(highway): if highway is None: return common_pb2.RT_UNKNOWN elif highway.startswith('motorway'): return common_pb2.RT_HIGHWAY elif highway.startswith('primary'): return common_pb2.RT_HIGHWAY ...
{"/TileStache/Vector/TnProtoEncoder.py": ["/map/__init__.py"]}
90,138
yiqingj/TileStache
refs/heads/master
/server.py
__author__ = 'yiqingj' import httplib from pyramid.config import Configurator from pyramid.response import Response from pyramid.httpexceptions import HTTPFound from pyramid.view import view_config from wsgiref.simple_server import make_server import TileStache from map import vector_pb2 from tests import vectormap ...
{"/TileStache/Vector/TnProtoEncoder.py": ["/map/__init__.py"]}
90,139
yiqingj/TileStache
refs/heads/master
/TileStache/Goodies/VecTiles/protobuf.py
''' Implementation of Telenav Protobuf encoder. ''' from map import vector_pb2, common_pb2 from shapely.wkb import loads import mapnik __author__ = 'yiqingj' def _matchRoadType(kind, highway): ''' use highway tag if kind is not available . ''' if highway is None: return common_pb2.RT_UNKNOW...
{"/TileStache/Vector/TnProtoEncoder.py": ["/map/__init__.py"]}
90,140
yiqingj/TileStache
refs/heads/master
/tests/proto_tests.py
__author__ = 'yiqingj' from map import vector_pb2 if __name__ == '__main__': f = open('/Users/yiqingj/Documents/workspace/git/mapnik/demo/c++/tile.proto','rb') tile = vector_pb2.VectorMapTile() tile.ParseFromString(f.read()) f.close() print tile
{"/TileStache/Vector/TnProtoEncoder.py": ["/map/__init__.py"]}
90,144
pitikdmitry/http-webserver
refs/heads/master
/main.py
from Server.server import Server from Handler.handler import Handler import logging import sys from models.config import Config logging.basicConfig( level=logging.ERROR, format='%(name)s: %(message)s', stream=sys.stderr, ) if __name__ == '__main__': config = Config("/etc/httpd.conf") handler = Ha...
{"/main.py": ["/Server/server.py", "/Handler/handler.py", "/models/config.py"], "/Handler/serializer.py": ["/models/response.py"], "/Handler/parser.py": ["/models/request.py"], "/Handler/handler.py": ["/Handler/executor.py", "/Handler/parser.py", "/Handler/serializer.py"], "/Handler/executor.py": ["/models/config.py", ...
90,145
pitikdmitry/http-webserver
refs/heads/master
/Handler/serializer.py
from models.response import Response class Serializer: def __init__(self): pass @staticmethod def dump(response): if response.status_code == Response.OK: return Serializer.good_response(response).encode() + response.body else: return Serializer.bad_respons...
{"/main.py": ["/Server/server.py", "/Handler/handler.py", "/models/config.py"], "/Handler/serializer.py": ["/models/response.py"], "/Handler/parser.py": ["/models/request.py"], "/Handler/handler.py": ["/Handler/executor.py", "/Handler/parser.py", "/Handler/serializer.py"], "/Handler/executor.py": ["/models/config.py", ...
90,146
pitikdmitry/http-webserver
refs/heads/master
/Handler/parser.py
from models.request import Request import logging class Parser: def __init__(self): self._log = logging.getLogger("parser") def get_values(self, data): try: arr = data.split("\r\n") method, query, protocol = self.method_query_protocol(arr[0]) url = self.ur...
{"/main.py": ["/Server/server.py", "/Handler/handler.py", "/models/config.py"], "/Handler/serializer.py": ["/models/response.py"], "/Handler/parser.py": ["/models/request.py"], "/Handler/handler.py": ["/Handler/executor.py", "/Handler/parser.py", "/Handler/serializer.py"], "/Handler/executor.py": ["/models/config.py", ...
90,147
pitikdmitry/http-webserver
refs/heads/master
/tcp_echo_client.py
import asyncio async def tcp_echo_client(message, loop): reader, writer = await asyncio.open_connection('127.0.0.1', 10001, loop=loop) print('Send: %r' % message) writer.write(message.encode()) data = await reader.read(100) print('Received: %r' ...
{"/main.py": ["/Server/server.py", "/Handler/handler.py", "/models/config.py"], "/Handler/serializer.py": ["/models/response.py"], "/Handler/parser.py": ["/models/request.py"], "/Handler/handler.py": ["/Handler/executor.py", "/Handler/parser.py", "/Handler/serializer.py"], "/Handler/executor.py": ["/models/config.py", ...
90,148
pitikdmitry/http-webserver
refs/heads/master
/Handler/handler.py
import logging from Handler.executor import Executor from Handler.parser import Parser from Handler.serializer import Serializer class Handler: def __init__(self): self._parser = Parser() self._executor = Executor() self._serializer = Serializer() self._log = logging.getLogger("ha...
{"/main.py": ["/Server/server.py", "/Handler/handler.py", "/models/config.py"], "/Handler/serializer.py": ["/models/response.py"], "/Handler/parser.py": ["/models/request.py"], "/Handler/handler.py": ["/Handler/executor.py", "/Handler/parser.py", "/Handler/serializer.py"], "/Handler/executor.py": ["/models/config.py", ...
90,149
pitikdmitry/http-webserver
refs/heads/master
/models/config.py
import os import logging class Config: def __init__(self, file_name): self._file_name = file_name self._cpu_limit = 4 self._thread_limit = 256 self._document_root = "/var/www/html" self._host = "0.0.0.0" self._port = 80 self._log = logging.getLogger("conf...
{"/main.py": ["/Server/server.py", "/Handler/handler.py", "/models/config.py"], "/Handler/serializer.py": ["/models/response.py"], "/Handler/parser.py": ["/models/request.py"], "/Handler/handler.py": ["/Handler/executor.py", "/Handler/parser.py", "/Handler/serializer.py"], "/Handler/executor.py": ["/models/config.py", ...
90,150
pitikdmitry/http-webserver
refs/heads/master
/Handler/executor.py
import os import logging from models.config import Config from models.content_types import ContentTypes from models.exceptions import BadFilePathException, ForbiddenException from models.file import File from urllib import parse import aiofiles from models.response import Response class Executor: def __init__...
{"/main.py": ["/Server/server.py", "/Handler/handler.py", "/models/config.py"], "/Handler/serializer.py": ["/models/response.py"], "/Handler/parser.py": ["/models/request.py"], "/Handler/handler.py": ["/Handler/executor.py", "/Handler/parser.py", "/Handler/serializer.py"], "/Handler/executor.py": ["/models/config.py", ...
90,151
pitikdmitry/http-webserver
refs/heads/master
/models/exceptions.py
class BadFilePathException(BaseException): pass class ForbiddenException(BaseException): pass
{"/main.py": ["/Server/server.py", "/Handler/handler.py", "/models/config.py"], "/Handler/serializer.py": ["/models/response.py"], "/Handler/parser.py": ["/models/request.py"], "/Handler/handler.py": ["/Handler/executor.py", "/Handler/parser.py", "/Handler/serializer.py"], "/Handler/executor.py": ["/models/config.py", ...
90,152
pitikdmitry/http-webserver
refs/heads/master
/Server/server.py
import asyncio import logging import os import uvloop class Server: def __init__(self, address, port, config, handler): self._address = address self._port = port self._config = config self._handler = handler self._log = logging.getLogger("server") asyncio.set_even...
{"/main.py": ["/Server/server.py", "/Handler/handler.py", "/models/config.py"], "/Handler/serializer.py": ["/models/response.py"], "/Handler/parser.py": ["/models/request.py"], "/Handler/handler.py": ["/Handler/executor.py", "/Handler/parser.py", "/Handler/serializer.py"], "/Handler/executor.py": ["/models/config.py", ...
90,153
pitikdmitry/http-webserver
refs/heads/master
/models/response.py
from datetime import datetime class Response: # status-codes OK = '200 OK' NOT_FOUND = '404 Not Found' METHOD_NOT_ALLOWED = '405 Method Not Allowed' FORBIDDEN = '403 Forbidden' # def __init__(self, status_code, protocol, connection, conte...
{"/main.py": ["/Server/server.py", "/Handler/handler.py", "/models/config.py"], "/Handler/serializer.py": ["/models/response.py"], "/Handler/parser.py": ["/models/request.py"], "/Handler/handler.py": ["/Handler/executor.py", "/Handler/parser.py", "/Handler/serializer.py"], "/Handler/executor.py": ["/models/config.py", ...
90,154
pitikdmitry/http-webserver
refs/heads/master
/models/request.py
class Request: def __init__(self, method, protocol, url, connection): self._method = method self._protocol = protocol self._url = url self._connection = connection @property def method(self): return self._method @property def protocol(self): return ...
{"/main.py": ["/Server/server.py", "/Handler/handler.py", "/models/config.py"], "/Handler/serializer.py": ["/models/response.py"], "/Handler/parser.py": ["/models/request.py"], "/Handler/handler.py": ["/Handler/executor.py", "/Handler/parser.py", "/Handler/serializer.py"], "/Handler/executor.py": ["/models/config.py", ...
90,155
pitikdmitry/http-webserver
refs/heads/master
/models/file.py
class File: def __init__(self, file_path=None, content_type=None): self._file_path = file_path self._content_type = content_type @property def file_path(self): return self._file_path @property def content_type(self): return self._content_type
{"/main.py": ["/Server/server.py", "/Handler/handler.py", "/models/config.py"], "/Handler/serializer.py": ["/models/response.py"], "/Handler/parser.py": ["/models/request.py"], "/Handler/handler.py": ["/Handler/executor.py", "/Handler/parser.py", "/Handler/serializer.py"], "/Handler/executor.py": ["/models/config.py", ...
90,156
smchugh/balderdash
refs/heads/master
/tests/integration/Players.py
import unittest import json from common import NoAuthTest, AuthTokenTest, get_incremental_username, \ get_incremental_email, get_incremental_avatar_url from application.models.Player import Player from application.services.PlayersService import PlayersService class NoAuthPlayersIndex(NoAuthTest): def test_i...
{"/tests/integration/Players.py": ["/application/models/Player.py", "/application/services/PlayersService.py"], "/application/controllers/DefinitionFillers.py": ["/application/inputs/DefinitionFillers.py", "/application/models/DefinitionFiller.py", "/application/services/DefinitionFillersService.py", "/application/serv...