index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
41,990
shuohan/espreso
refs/heads/master
/isbi/get_brain_pics.py
#!/usr/bin/env python import nibabel as nib import numpy as np from pathlib import Path from PIL import Image from image_processing_3d import quantile_scale from scipy.ndimage import zoom filename = '20121_02_FLAIRPre_2D.nii' obj = nib.load(filename) data = obj.get_fdata(dtype=np.float32) zooms = obj.header.get_zoom...
{"/tests/test_loss.py": ["/ssp/loss.py"], "/ssp/train.py": ["/ssp/config.py", "/ssp/loss.py", "/ssp/utils.py"], "/tests/test_networks.py": ["/ssp/network.py"], "/scripts/compare_kernel.py": ["/ssp/utils.py"], "/ssp/network.py": ["/ssp/config.py"], "/tests/test_fwhm.py": ["/ssp/utils.py"], "/tests/test_kernel.py": ["/ss...
41,991
shuohan/espreso
refs/heads/master
/setup.py
import os from setuptools import setup, find_packages from glob import glob scripts = glob('scripts/*') version = '0.1.0' setup(name='ssp', version=version, description='Slice selection profile estimation in 2D MRI', author='Shuo Han', url='https://github.com/shuohan/ssp', author_email='...
{"/tests/test_loss.py": ["/ssp/loss.py"], "/ssp/train.py": ["/ssp/config.py", "/ssp/loss.py", "/ssp/utils.py"], "/tests/test_networks.py": ["/ssp/network.py"], "/scripts/compare_kernel.py": ["/ssp/utils.py"], "/ssp/network.py": ["/ssp/config.py"], "/tests/test_fwhm.py": ["/ssp/utils.py"], "/tests/test_kernel.py": ["/ss...
41,992
shuohan/espreso
refs/heads/master
/isbi/get_brain_profiles.py
#!/usr/bin/env python import numpy as np import matplotlib.pyplot as plt from pathlib import Path import matplotlib from psf_est.utils import calc_fwhm def plot(est, filename): font = {'size': 8} matplotlib.rc('font', **font) est_hm = np.max(est) / 2 est_fwhm, est_left, est_right = calc_fwhm(est)...
{"/tests/test_loss.py": ["/ssp/loss.py"], "/ssp/train.py": ["/ssp/config.py", "/ssp/loss.py", "/ssp/utils.py"], "/tests/test_networks.py": ["/ssp/network.py"], "/scripts/compare_kernel.py": ["/ssp/utils.py"], "/ssp/network.py": ["/ssp/config.py"], "/tests/test_fwhm.py": ["/ssp/utils.py"], "/tests/test_kernel.py": ["/ss...
41,993
shuohan/espreso
refs/heads/master
/tests/test_interp.py
#!/usr/bin/env python import numpy as np import torch import torch.nn.functional as F import matplotlib.pyplot as plt # data = torch.arange(20)[None, None, ...].float() # output = F.interpolate(data, scale_factor=0.5, mode='linear').squeeze() # print(data) # print(output) data = plt.imread('lena.png')[:256, :256, 0...
{"/tests/test_loss.py": ["/ssp/loss.py"], "/ssp/train.py": ["/ssp/config.py", "/ssp/loss.py", "/ssp/utils.py"], "/tests/test_networks.py": ["/ssp/network.py"], "/scripts/compare_kernel.py": ["/ssp/utils.py"], "/ssp/network.py": ["/ssp/config.py"], "/tests/test_fwhm.py": ["/ssp/utils.py"], "/tests/test_kernel.py": ["/ss...
41,994
shuohan/espreso
refs/heads/master
/tests/test_fwhm.py
#!/usr/bin/env python import numpy as np import matplotlib.pyplot as plt from pathlib import Path from ssp.utils import calc_fwhm from lr_simu.kernel import create_gaussian_kernel def test_fwhm(): dirname = Path('results_fwhm') dirname.mkdir(exist_ok=True) kernel = create_gaussian_kernel(1 / 8) fwh...
{"/tests/test_loss.py": ["/ssp/loss.py"], "/ssp/train.py": ["/ssp/config.py", "/ssp/loss.py", "/ssp/utils.py"], "/tests/test_networks.py": ["/ssp/network.py"], "/scripts/compare_kernel.py": ["/ssp/utils.py"], "/ssp/network.py": ["/ssp/config.py"], "/tests/test_fwhm.py": ["/ssp/utils.py"], "/tests/test_kernel.py": ["/ss...
41,995
shuohan/espreso
refs/heads/master
/isbi/calc_phantom_fwhm.py
#!/usr/bin/env python import numpy as np import pandas as pd import nibabel as nib from pathlib import Path from collections import OrderedDict from psf_est.utils import calc_fwhm est_dirname = '../tests/results_isbi2021_phantom_final' est_pattern = 'phantom_%smm_%smm_smooth-1.0/kernel/avg_epoch-30000.npy' fwhm =...
{"/tests/test_loss.py": ["/ssp/loss.py"], "/ssp/train.py": ["/ssp/config.py", "/ssp/loss.py", "/ssp/utils.py"], "/tests/test_networks.py": ["/ssp/network.py"], "/scripts/compare_kernel.py": ["/ssp/utils.py"], "/ssp/network.py": ["/ssp/config.py"], "/tests/test_fwhm.py": ["/ssp/utils.py"], "/tests/test_kernel.py": ["/ss...
41,996
shuohan/espreso
refs/heads/master
/tests/compare_interp.py
#!/usr/bin/env python import numpy as np import torch from PIL import Image import matplotlib.pyplot as plt from scipy.interpolate import interp2d from scipy.ndimage import zoom from torch.nn.functional import interpolate scale = 1 / 4 # data = np.array(Image.open('lena.png').convert('L')).astype(np.float32) / 255 d...
{"/tests/test_loss.py": ["/ssp/loss.py"], "/ssp/train.py": ["/ssp/config.py", "/ssp/loss.py", "/ssp/utils.py"], "/tests/test_networks.py": ["/ssp/network.py"], "/scripts/compare_kernel.py": ["/ssp/utils.py"], "/ssp/network.py": ["/ssp/config.py"], "/tests/test_fwhm.py": ["/ssp/utils.py"], "/tests/test_kernel.py": ["/ss...
41,997
shuohan/espreso
refs/heads/master
/tests/test_kernel.py
#!/usr/bin/env python import matplotlib.pyplot as plt from pathlib import Path from ssp.network import KernelNet1d def test_kernel(): dirname = Path('results_kernel') dirname.mkdir(exist_ok=True) filename = dirname.joinpath('kernel.png') net = KernelNet1d().cuda() assert net.impulse.shape == (1...
{"/tests/test_loss.py": ["/ssp/loss.py"], "/ssp/train.py": ["/ssp/config.py", "/ssp/loss.py", "/ssp/utils.py"], "/tests/test_networks.py": ["/ssp/network.py"], "/scripts/compare_kernel.py": ["/ssp/utils.py"], "/ssp/network.py": ["/ssp/config.py"], "/tests/test_fwhm.py": ["/ssp/utils.py"], "/tests/test_kernel.py": ["/ss...
41,998
shuohan/espreso
refs/heads/master
/isbi/get_simu_pics.py
#!/usr/bin/env python import nibabel as nib import numpy as np from pathlib import Path from PIL import Image from image_processing_3d import quantile_scale from scipy.ndimage import zoom dirname = '/data/phantom/simu' basename = 'SUPERRES-ADNIPHANTOM_20200711_PHANTOM-T2-TSE-3D-CORONAL-PRE-ACQ1-01mm_resampled_type-g...
{"/tests/test_loss.py": ["/ssp/loss.py"], "/ssp/train.py": ["/ssp/config.py", "/ssp/loss.py", "/ssp/utils.py"], "/tests/test_networks.py": ["/ssp/network.py"], "/scripts/compare_kernel.py": ["/ssp/utils.py"], "/ssp/network.py": ["/ssp/config.py"], "/tests/test_fwhm.py": ["/ssp/utils.py"], "/tests/test_kernel.py": ["/ss...
41,999
shuohan/espreso
refs/heads/master
/ssp/loss.py
import torch import numpy as np import torch.nn.functional as F class GANLoss(torch.nn.Module): r"""Loss of the original GAN with cross entropy. For the discriminator :math:`D`, this loss minimizes the binary cross entropy with logits: .. math:: l = - \mathrm{mean}_x (y \ln(\sigma(D(x))) ...
{"/tests/test_loss.py": ["/ssp/loss.py"], "/ssp/train.py": ["/ssp/config.py", "/ssp/loss.py", "/ssp/utils.py"], "/tests/test_networks.py": ["/ssp/network.py"], "/scripts/compare_kernel.py": ["/ssp/utils.py"], "/ssp/network.py": ["/ssp/config.py"], "/tests/test_fwhm.py": ["/ssp/utils.py"], "/tests/test_kernel.py": ["/ss...
42,000
shuohan/espreso
refs/heads/master
/ssp/config.py
"""Handles the configuration of this algorithm. """ from singleton_config import Config as Config_ class Config(Config_): """The algorithm configuration. Attributes: kn_num_channels (int): The number of channels for :class:`psf_est.network.KernelNet`. kn_kernel_sizes (list[int]):...
{"/tests/test_loss.py": ["/ssp/loss.py"], "/ssp/train.py": ["/ssp/config.py", "/ssp/loss.py", "/ssp/utils.py"], "/tests/test_networks.py": ["/ssp/network.py"], "/scripts/compare_kernel.py": ["/ssp/utils.py"], "/ssp/network.py": ["/ssp/config.py"], "/tests/test_fwhm.py": ["/ssp/utils.py"], "/tests/test_kernel.py": ["/ss...
42,001
shuohan/espreso
refs/heads/master
/scripts/train2d.py
#!/usr/bin/env python import argparse parser = argparse.ArgumentParser() parser.add_argument('-i', '--input', help='Input image.') parser.add_argument('-o', '--output', help='Output directory.') parser.add_argument('-bs', '--batch-size', default=32, type=int, help='The number of samples per mini-b...
{"/tests/test_loss.py": ["/ssp/loss.py"], "/ssp/train.py": ["/ssp/config.py", "/ssp/loss.py", "/ssp/utils.py"], "/tests/test_networks.py": ["/ssp/network.py"], "/scripts/compare_kernel.py": ["/ssp/utils.py"], "/ssp/network.py": ["/ssp/config.py"], "/tests/test_fwhm.py": ["/ssp/utils.py"], "/tests/test_kernel.py": ["/ss...
42,003
KkLearner/MacDonaldAnalyse
refs/heads/master
/MacDonaldAnalyse/spiders/TestSpider.py
import scrapy,re,json,uuid from scrapy.selector import Selector from MacDonaldAnalyse.items import CommunityItem import urllib class TestSpider(scrapy.Spider): name = 'Test' handle_httpstatus_list = [404] allowed_domains = ['map.baidu.com','fang.com','leju.com','anjuke.com','sina.com.cn', ...
{"/MacDonaldAnalyse/spiders/TestSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/CommunitySpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/FoodSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/MacDonaldSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDona...
42,004
KkLearner/MacDonaldAnalyse
refs/heads/master
/MacDonaldAnalyse/spiders/CommunitySpider.py
import scrapy,json,urllib,MySQLdb,re,logging, uuid from scrapy.selector import Selector from MacDonaldAnalyse.items import CommunityItem class CommunitySpider(scrapy.Spider): name = 'Community' handle_httpstatus_list = [404] allowed_domains = ['map.baidu.com','fang.com','leju.com','anjuke.com','sina.com.cn...
{"/MacDonaldAnalyse/spiders/TestSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/CommunitySpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/FoodSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/MacDonaldSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDona...
42,005
KkLearner/MacDonaldAnalyse
refs/heads/master
/MacDonaldAnalyse/spiders/FoodSpider.py
import scrapy,json,urllib,MySQLdb from MacDonaldAnalyse.items import BaiduFoodItem class FoodSpider(scrapy.Spider): name = 'Food' allowed_domains = ['map.baidu.com'] ak = 'LI5syaP0yQLSsgDXdPkRXb0rMnEZBhOx' radius = 1000 url = 'http://api.map.baidu.com/place/v2/search?query=美食&location={0},{1}' \ ...
{"/MacDonaldAnalyse/spiders/TestSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/CommunitySpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/FoodSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/MacDonaldSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDona...
42,006
KkLearner/MacDonaldAnalyse
refs/heads/master
/MacDonaldAnalyse/spiders/MacDonaldSpider.py
import scrapy,json,urllib from MacDonaldAnalyse.items import MacDonaldItem class MacDonaldSpider(scrapy.Spider): name = 'MacDonald' allowed_domains = ['map.baidu.com'] ak = 'LI5syaP0yQLSsgDXdPkRXb0rMnEZBhOx' index = 0 distance = 1000 url = 'http://api.map.baidu.com/place/v2/search?query=麦当劳&tag...
{"/MacDonaldAnalyse/spiders/TestSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/CommunitySpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/FoodSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/MacDonaldSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDona...
42,007
KkLearner/MacDonaldAnalyse
refs/heads/master
/MacDonaldAnalyse/items.py
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # https://doc.scrapy.org/en/latest/topics/items.html import scrapy class ScrapytestItem(scrapy.Item): # define the fields for your item here like: name = scrapy.Field() list = scrapy.Field() set = scrap...
{"/MacDonaldAnalyse/spiders/TestSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/CommunitySpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/FoodSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/MacDonaldSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDona...
42,008
KkLearner/MacDonaldAnalyse
refs/heads/master
/MacDonaldAnalyse/spiders/Dianping_Business_District.py
from scrapy import Request from scrapy.spiders import Spider from MacDonaldAnalyse.items import Business_District_Item import random # 用于随机更换UserAgent import json class BusinessDistrictShop(Spider): name = "BusinessDistrictShop" def start_requests(self): File = open('DaZhongDianPing_json.txt') ...
{"/MacDonaldAnalyse/spiders/TestSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/CommunitySpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/FoodSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/MacDonaldSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDona...
42,009
KkLearner/MacDonaldAnalyse
refs/heads/master
/MacDonaldAnalyse/spiders/FangchengSpider.py
import scrapy from scrapy.selector import Selector from MacDonaldAnalyse.items import FangchengItem class FangchengSpider(scrapy.Spider): name = 'Fangcheng' allowed_domains = ['fangcheng.cn'] def start_requests(self): urls = [] for i in range(1,6): if i != 2: fo...
{"/MacDonaldAnalyse/spiders/TestSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/CommunitySpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/FoodSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/MacDonaldSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDona...
42,010
KkLearner/MacDonaldAnalyse
refs/heads/master
/MacDonaldAnalyse/pipelines.py
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html import codecs, MySQLdb, json, traceback from MacDonaldAnalyse.items import MacDonaldItem\ , BaiduTrafficItem, BaiduFoodIte...
{"/MacDonaldAnalyse/spiders/TestSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/CommunitySpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/FoodSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/MacDonaldSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDona...
42,011
KkLearner/MacDonaldAnalyse
refs/heads/master
/MacDonaldAnalyse/spiders/BaiduSpider.py
import scrapy,json,re,urllib from scrapy.selector import Selector from MacDonaldAnalyse.items import MacDonaldItem,BaiduTrafficItem,ParkingLotItem class BaiduSpider(scrapy.Spider): name = 'baidu' allowed_domains = ['map.baidu.com'] ak = 'LI5syaP0yQLSsgDXdPkRXb0rMnEZBhOx' index = 0 distance = 1000 ...
{"/MacDonaldAnalyse/spiders/TestSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/CommunitySpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/FoodSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/MacDonaldSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDona...
42,012
KkLearner/MacDonaldAnalyse
refs/heads/master
/MacDonaldAnalyse/spiders/SchoolSpider.py
import scrapy,json,urllib,MySQLdb from MacDonaldAnalyse.items import SchoolItem class SchoolSpider(scrapy.Spider): name = 'School' allowed_domains = ['map.baidu.com'] ak = 'LI5syaP0yQLSsgDXdPkRXb0rMnEZBhOx' radius = 1000 tag = {"教育培训;高等院校": 0, "教育培训;中学": 1, "教育培训;小学": 2, "教育培训;幼儿园": 3, ...
{"/MacDonaldAnalyse/spiders/TestSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/CommunitySpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/FoodSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDonaldAnalyse/spiders/MacDonaldSpider.py": ["/MacDonaldAnalyse/items.py"], "/MacDona...
42,024
ueslialmeida/renu
refs/heads/master
/linkrepo/admin.py
from django.contrib import admin from .models import Link class LinkController(admin.ModelAdmin): list_display = ["__str__", "create", "updated"] search_fields = ('title',) class Meta: model = Link # Register your models here. admin.site.register(Link, LinkController)
{"/linkrepo/admin.py": ["/linkrepo/models.py"]}
42,025
ueslialmeida/renu
refs/heads/master
/linkrepo/models.py
from django.db import models # Create your models here. class Link(models.Model): title = models.CharField(max_length=256, blank=False, null=False) notes = models.TextField(blank=True, null=True) url = models.URLField(blank=True, null=True) create = models.DateTimeField(auto_now_add=True, auto_now=Fa...
{"/linkrepo/admin.py": ["/linkrepo/models.py"]}
42,035
Esenbahar/Django
refs/heads/master
/books/urls.py
from django.urls import path from . import views urlpatterns = [ path('',views.index, name='index'), # anasayfaya istek gelirse indexi aç. #buradan sonra ana url de bunları işle. path('books',views.books, name='books'), path('authors',views.authors, name='authors'), path('authordetails/<int:autho...
{"/books/views.py": ["/books/models.py"]}
42,036
Esenbahar/Django
refs/heads/master
/books/models.py
from django.db import models # Create your models here. class Author(models.Model): def __str__(self): return self.name # ben obje olarak istemiyorum direk olarak yazarın ismini istiyorum demiiş oluyoruz. name = models.CharField(max_length=50) created = models.DateTimeField('date created') #...
{"/books/views.py": ["/books/models.py"]}
42,037
Esenbahar/Django
refs/heads/master
/books/views.py
from django.shortcuts import render from django.http import HttpResponse from django.template import loader from .models import Author from django.http import Http404 # Create your views here. #Kullanıcı request gönderir yani bir istek gönderir bu istekleri burada gerçekleştireceğiz.bunun için kütüphane ekleriz. #from...
{"/books/views.py": ["/books/models.py"]}
42,038
doruktiktiklar/sadedegel
refs/heads/master
/tests/test_bertcluster_summ.py
# pylint: skip-file import numpy as np import pytest @pytest.mark.skip() def test_bert_cluster_model(): tokenizer = AutoTokenizer.from_pretrained("dbmdz/bert-base-turkish-cased") # noqa: F821 model = BertModel.from_pretrained("dbmdz/bert-base-turkish-cased", output_hidden_states=True) # noqa: F821 summ...
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,039
doruktiktiklar/sadedegel
refs/heads/master
/sadedegel/dataset/_core.py
import glob from os.path import dirname, join, expanduser, basename, splitext from loguru import logger import numpy as np import re from enum import Enum from .util import safe_json_load, safe_read from pathlib import Path class CorpusTypeEnum(Enum): RAW = ('raw', '*.txt') SENTENCE = ('sents', '*.json') ...
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,040
doruktiktiklar/sadedegel
refs/heads/master
/sadedegel/dataset/extended/_core.py
from os.path import expanduser, getsize from pathlib import Path import json from typing import Iterator, Tuple import glob import click __download_message__ = """Ensure that you have properly downloaded extended corpus using python -m sadedegel.dataset.extended download --access-key xxx --secret...
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,041
doruktiktiklar/sadedegel
refs/heads/master
/tests/summarizer/test_tags.py
from .context import Rouge1Summarizer from .context import KMeansSummarizer, AutoKMeansSummarizer, DecomposedKMeansSummarizer from .context import RandomSummarizer, PositionSummarizer, LengthSummarizer, BandSummarizer def test_baseline_tags(): rand = RandomSummarizer() pos = PositionSummarizer() length = ...
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,042
doruktiktiklar/sadedegel
refs/heads/master
/tests/datasets/context.py
import sys from pathlib import Path sys.path.insert(0, (Path(__file__) / '..' / '..').absolute()) from sadedegel.dataset import load_raw_corpus, load_sentence_corpus,load_annotated_corpus # noqa # pylint: disable=unused-import, wrong-import-position from sadedegel.dataset.extended import load_extended_metadata, load...
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,043
doruktiktiklar/sadedegel
refs/heads/master
/sadedegel/ml/sbd.py
from os.path import dirname from pathlib import Path from sklearn.ensemble import RandomForestClassifier # type: ignore from sklearn.feature_extraction import DictVectorizer # type: ignore from sklearn.pipeline import Pipeline # type: ignore from joblib import dump, load # type: ignore from loguru import logger ...
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,044
doruktiktiklar/sadedegel
refs/heads/master
/tests/test_metrics.py
from pytest import approx, raises from .context import rouge1_score def test_rouge1_recall(): assert rouge1_score(["big", "cat", "on", "bed"], ["My", "little", "cat", "is", "on", "bed", "!"], metric="recall") == approx(3 / 4) def test_rouge1_precision(): assert rouge1_score(["big", "...
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,045
doruktiktiklar/sadedegel
refs/heads/master
/sadedegel/dataset/extended/__init__.py
from ._core import load_extended_metadata, load_extended_raw_corpus, load_extended_sents_corpus
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,046
doruktiktiklar/sadedegel
refs/heads/master
/tests/server/context.py
import sys from pathlib import Path sys.path.insert(0, (Path(__file__) / '..' / '..').absolute()) from sadedegel.server.__main__ import app # noqa # pylint: disable=unused-import, wrong-import-position
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,047
doruktiktiklar/sadedegel
refs/heads/master
/tests/datasets/test_filepath.py
import pytest from pathlib import Path from .context import file_paths, CorpusTypeEnum def test_corpustype_enum(): with pytest.raises(ValueError): file_paths("my_flumsy_corpus_type") def test_corpus_equality(): fp_raw = file_paths(CorpusTypeEnum.RAW, use_basename=True, noext=True) fp_sent = file...
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,048
doruktiktiklar/sadedegel
refs/heads/master
/tests/test_sbd_ml.py
from sklearn.feature_extraction import FeatureHasher from sklearn.linear_model import PassiveAggressiveClassifier as PA from sklearn.pipeline import Pipeline from .context import load_raw_corpus, load_sentence_corpus, Doc, flatten, is_eos, create_model, load_model, save_model def test_span_feature_hashed(): raw_c...
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,049
doruktiktiklar/sadedegel
refs/heads/master
/sadedegel/summarize/__main__.py
from collections import defaultdict from math import ceil from typing import List, Union from tqdm import tqdm # type: ignore import click from tabulate import tabulate import warnings import numpy as np # type: ignore from sklearn.metrics import ndcg_score # type: ignore from sadedegel.dataset import load_annota...
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,050
doruktiktiklar/sadedegel
refs/heads/master
/tests/summarizer/test_cluster.py
from pytest import warns import pytest from .context import KMeansSummarizer, AutoKMeansSummarizer, DecomposedKMeansSummarizer, Doc, SimpleTokenizer, \ BertTokenizer, tokenizer_context @pytest.mark.parametrize("normalized", [True, False]) @pytest.mark.parametrize("tokenizer", [SimpleTokenizer.__name__, BertTokeni...
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,051
doruktiktiklar/sadedegel
refs/heads/master
/sadedegel/tokenize/_sent.py
from abc import ABCMeta, abstractmethod from typing import List import re import nltk alphabets = "([A-Za-z])" prefixes = "(Mr|St|Mrs|Ms|Dr)[.]" suffixes = "(Inc|Ltd|Jr|Sr|Co)" starters = r"(Mr|Mrs|Ms|Dr|He\s|She\s|It\s|They\s|Their\s|Our\s|We\s|But\s|However\s|That\s|This\s|Wherever)" acronyms = "([A-Z][.][A-Z][.](?...
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,052
doruktiktiklar/sadedegel
refs/heads/master
/sadedegel/tokenize/__init__.py
from ._sent import RegexpSentenceTokenizer, NLTKPunctTokenizer # noqa: F401 from ..bblock.util import tr_lower, tr_upper, __tr_upper__, __tr_lower__ # noqa: F401 # This is kepts for backward compatibility # from .. import Doc, Sentences # noqa: F401 from .. import Doc, Sentences
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,053
doruktiktiklar/sadedegel
refs/heads/master
/work/_summ.py
# pylint: skip-file import json from typing import List, Any from sklearn.cluster import KMeans from sklearn.metrics import euclidean_distances from sklearn.base import BaseEstimator, TransformerMixin import pandas as pd import numpy as np import torch from torch.nn.utils.rnn import pad_sequence class JsonFileTokeni...
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,054
doruktiktiklar/sadedegel
refs/heads/master
/tests/test_config.py
from .context import get_all_configs, describe_config def test_all_configs(): assert isinstance(get_all_configs(), dict) def test_describe_config_str(): assert isinstance(describe_config('word_tokenizer'), str) def test_describe_config_print(capsys): describe_config('word_tokenizer', True) capture...
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,055
doruktiktiklar/sadedegel
refs/heads/master
/tests/datasets/test_dataset_loaders.py
from .context import load_raw_corpus, load_sentence_corpus, load_annotated_corpus import pytest raw_corpus_parameters = [(load_raw_corpus, True, 98), (load_raw_corpus, False, 98)] sentence_including_corpus_parameters = [(load_sentence_corpus, True, 98), ...
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,056
doruktiktiklar/sadedegel
refs/heads/master
/sadedegel/ml/__init__.py
from .sbd import create_model, load_model, save_model
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,057
doruktiktiklar/sadedegel
refs/heads/master
/sadedegel/dataset/util.py
import warnings import json def safe_read(file: str): try: with open(file) as fp: return fp.read() except: warnings.warn(f"Error in reading {file}", UserWarning) raise def safe_json_load(file: str): try: return json.loads(safe_read(file)) except: w...
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,058
doruktiktiklar/sadedegel
refs/heads/master
/scripts/merger.py
from pathlib import Path from typing import Iterable from os.path import basename, splitext import sys from difflib import context_diff import click import numpy as np from sadedegel.dataset._core import safe_json_load from sadedegel.dataset import load_sentence_corpus, file_paths def file_diff(i1: Iterable, i2: Iter...
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,059
doruktiktiklar/sadedegel
refs/heads/master
/tests/datasets/test_util.py
import pytest from json.decoder import JSONDecodeError from .context import util def test_safe_file_open_failed(): with pytest.warns(UserWarning, match=r'Error in reading \w+$'), pytest.raises(FileNotFoundError): _ = util.safe_read("NoSuchFile") @pytest.fixture(scope="session") def corrupted_json(tmpdir...
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,060
doruktiktiklar/sadedegel
refs/heads/master
/sadedegel/summarize/rouge.py
from typing import List import numpy as np # type: ignore from ._base import ExtractiveSummarizer from ..bblock import Sentences class Rouge1Summarizer(ExtractiveSummarizer): """Assign a higher importance score based on ROUGE1 score of the sentences within the document. metric : {'f1', 'precision','recall'}...
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,061
doruktiktiklar/sadedegel
refs/heads/master
/sadedegel/bblock/__init__.py
from .doc import Doc, Sentences from .word_tokenizer import BertTokenizer, SimpleTokenizer, WordTokenizer
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,062
doruktiktiklar/sadedegel
refs/heads/master
/sadedegel/config.py
__all__ = ['set_config', 'get_config', 'describe_config', 'get_all_configs'] from typing import Any from functools import wraps from collections import namedtuple from contextlib import contextmanager import warnings from .bblock.doc import Sentences Configuration = namedtuple("Configuration", "config, description, v...
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,063
doruktiktiklar/sadedegel
refs/heads/master
/sadedegel/metrics/__init__.py
from ._score import rouge1_score
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,064
doruktiktiklar/sadedegel
refs/heads/master
/tests/server/test_basics.py
from fastapi.testclient import TestClient import pytest from itertools import product from .context import app client = TestClient(app) def test_random_summarizer_req(): response = client.post("/api/summarizer/random", json=dict( doc="Kapıyı aç Veysel Efendi! Mahmut Hoca'nın emriyle Uganda Cumhurbaşkanı'...
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,065
doruktiktiklar/sadedegel
refs/heads/master
/tests/test_dataset_loaders.py
import pytest from .context import load_raw_corpus, load_sentence_corpus __corpus_length__ = 98 # MOVED to datasets/test_dataset_loaders @pytest.mark.skip() def test_load_raw_iter(): doc_iter = load_raw_corpus(return_iter=True) assert sum(1 for _ in doc_iter) == __corpus_length__ @pytest.mark.skip() def t...
{"/sadedegel/dataset/_core.py": ["/sadedegel/dataset/util.py"], "/tests/datasets/context.py": ["/sadedegel/dataset/extended/__init__.py"], "/sadedegel/dataset/extended/__init__.py": ["/sadedegel/dataset/extended/_core.py"], "/tests/datasets/test_filepath.py": ["/tests/datasets/context.py"], "/sadedegel/tokenize/__init_...
42,069
jkimbo/pyinfra
refs/heads/develop
/tests/test_api.py
# pyinfra # File: tests/test_api.py # Desc: tests for the pyinfra API from unittest import TestCase from socket import gaierror, error as socket_error from mock import patch, mock_open from paramiko import SSHException, AuthenticationException # Patch in paramiko fake classes from pyinfra.api import ssh from .parami...
{"/tests/test_api.py": ["/pyinfra/api/ssh.py"], "/pyinfra/api/state.py": ["/pyinfra/api/util.py"], "/pyinfra/api/ssh.py": ["/pyinfra/api/util.py"]}
42,070
jkimbo/pyinfra
refs/heads/develop
/pyinfra/api/state.py
# pyinfra # File: pyinfra/api/state.py # Desc: class that represents the current pyinfra.state from __future__ import division, unicode_literals, print_function from uuid import uuid4 from inspect import getargspec import six from gevent.pool import Pool from pyinfra import logger from .config import Config # from...
{"/tests/test_api.py": ["/pyinfra/api/ssh.py"], "/pyinfra/api/state.py": ["/pyinfra/api/util.py"], "/pyinfra/api/ssh.py": ["/pyinfra/api/util.py"]}
42,071
jkimbo/pyinfra
refs/heads/develop
/pyinfra/api/util.py
# pyinfra # File: pyinfra/api/util.py # Desc: utility functions from __future__ import division, unicode_literals, print_function import re from hashlib import sha1 from copy import deepcopy from imp import load_source from types import FunctionType import six from jinja2 import Template from .attrs import AttrBase...
{"/tests/test_api.py": ["/pyinfra/api/ssh.py"], "/pyinfra/api/state.py": ["/pyinfra/api/util.py"], "/pyinfra/api/ssh.py": ["/pyinfra/api/util.py"]}
42,072
jkimbo/pyinfra
refs/heads/develop
/pyinfra/api/ssh.py
# pyinfra # File: pyinfra/api/ssh.py # Desc: handle all SSH related stuff from __future__ import division, unicode_literals, print_function from os import path from socket import ( gaierror, error as socket_error, timeout as timeout_error ) import six import gevent from termcolor import colored from paramiko...
{"/tests/test_api.py": ["/pyinfra/api/ssh.py"], "/pyinfra/api/state.py": ["/pyinfra/api/util.py"], "/pyinfra/api/ssh.py": ["/pyinfra/api/util.py"]}
42,079
mlindysay/Boxlog
refs/heads/master
/main/admin.py
from django.contrib import admin from .models import Box, Item admin.site.register(Box) admin.site.register(Item)
{"/main/admin.py": ["/main/models.py"]}
42,080
mlindysay/Boxlog
refs/heads/master
/main/models.py
from __future__ import unicode_literals import datetime from django.db import models from django.utils import timezone class Box(models.Model): box_id = models.CharField(max_length=200) box_label = models.CharField(max_length=200) pub_date = models.DateTimeField('date published') def __str__(self): ...
{"/main/admin.py": ["/main/models.py"]}
42,081
mlindysay/Boxlog
refs/heads/master
/main/urls.py
from django.conf.urls import url from . import views app_name = 'main' urlpatterns = [ url(r'^$', views.index), url(r'^id/(\w+)/$', views.viewBox), url(r'^updateBox/$', views.updateBox), url(r'^addItem/$', views.addItem), url(r'^label/(\w+)/$', views.genLabel), #url(r'^(?P<pk>[0-9]+)/$', views...
{"/main/admin.py": ["/main/models.py"]}
42,124
gegealf/mon-site-marchand
refs/heads/master
/modele.py
import sqlite3 ma_base_de_donnees = "bdd_site_marchand" socket = sqlite3.connect(ma_base_de_donnees) request = socket.cursor() # création des tables : request.execute( """ CREATE TABLE IF NOT EXISTS utilisateurs( id_utilisateur INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, email TEXT...
{"/main.py": ["/controleur.py"], "/controleur.py": ["/modele.py"]}
42,125
gegealf/mon-site-marchand
refs/heads/master
/main.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask import Flask, render_template # pip install flask from os import path import logging.config import logging # pour le fichier de config : log_file_path = path.join(path.dirname(path.abspath(__file__)), 'log.config') logging.config.fileConfig(log_file_path) log =...
{"/main.py": ["/controleur.py"], "/controleur.py": ["/modele.py"]}
42,126
gegealf/mon-site-marchand
refs/heads/master
/controleur.py
from flask import render_template, session, request, redirect, url_for, abort import logging import hashlib import re from modele import MaBaseDeDonnees as MBDD log = logging.getLogger(__name__) def page_d_accueil(): """ """ liste_categories = _recuperer_categories() liste_produits = _re...
{"/main.py": ["/controleur.py"], "/controleur.py": ["/modele.py"]}
42,139
bryantutiven2/instituto_angular
refs/heads/main
/backend/servicios_institucion/views.py
from django.http import HttpResponse, Http404 from django.db.models import Q from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from rest_framework import viewsets from django.conf import settings from django.core.mail import send_mail from .m...
{"/backend/servicios_institucion/views.py": ["/backend/servicios_institucion/models.py", "/backend/servicios_institucion/serializers.py"], "/backend/servicios_institucion/admin.py": ["/backend/servicios_institucion/models.py"], "/backend/servicios_institucion/serializers.py": ["/backend/servicios_institucion/models.py"...
42,140
bryantutiven2/instituto_angular
refs/heads/main
/backend/servicios_institucion/admin.py
from django.contrib import admin from .models import Colegio, Pagina_inicio, Red_social, Secciones_educativas, Telefono, Noticia modelos = [ Colegio, Pagina_inicio, Red_social, Secciones_educativas, Telefono, Noticia ] # Register your models here. admin.site.register(modelos)
{"/backend/servicios_institucion/views.py": ["/backend/servicios_institucion/models.py", "/backend/servicios_institucion/serializers.py"], "/backend/servicios_institucion/admin.py": ["/backend/servicios_institucion/models.py"], "/backend/servicios_institucion/serializers.py": ["/backend/servicios_institucion/models.py"...
42,141
bryantutiven2/instituto_angular
refs/heads/main
/backend/servicios_institucion/models.py
from django.db import models class Colegio(models.Model): id_colegio = models.AutoField(primary_key = True, unique=True) nombre = models.CharField(max_length= 100) direccion = models.CharField(max_length=100) email = models.EmailField(max_length=100, default=None, null=True, blank=True) logo...
{"/backend/servicios_institucion/views.py": ["/backend/servicios_institucion/models.py", "/backend/servicios_institucion/serializers.py"], "/backend/servicios_institucion/admin.py": ["/backend/servicios_institucion/models.py"], "/backend/servicios_institucion/serializers.py": ["/backend/servicios_institucion/models.py"...
42,142
bryantutiven2/instituto_angular
refs/heads/main
/backend/servicios_institucion/apps.py
from django.apps import AppConfig class ServiciosInstitucionConfig(AppConfig): name = 'servicios_institucion'
{"/backend/servicios_institucion/views.py": ["/backend/servicios_institucion/models.py", "/backend/servicios_institucion/serializers.py"], "/backend/servicios_institucion/admin.py": ["/backend/servicios_institucion/models.py"], "/backend/servicios_institucion/serializers.py": ["/backend/servicios_institucion/models.py"...
42,143
bryantutiven2/instituto_angular
refs/heads/main
/backend/servicios_institucion/migrations/0002_secciones_educativas_titulo.py
# Generated by Django 3.1 on 2020-10-16 21:23 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('servicios_institucion', '0001_initial'), ] operations = [ migrations.AddField( model_name='secciones_educativas', ...
{"/backend/servicios_institucion/views.py": ["/backend/servicios_institucion/models.py", "/backend/servicios_institucion/serializers.py"], "/backend/servicios_institucion/admin.py": ["/backend/servicios_institucion/models.py"], "/backend/servicios_institucion/serializers.py": ["/backend/servicios_institucion/models.py"...
42,144
bryantutiven2/instituto_angular
refs/heads/main
/backend/servicios_institucion/urls.py
from django.urls import path from django.conf.urls import include from rest_framework.urlpatterns import format_suffix_patterns from servicios_institucion import views urlpatterns = [ path('get_colegio/<str:id>/', views.ColegioViewSet.as_view()), path('get_telefono/', views.TelefonoViewSet.as_view()), ...
{"/backend/servicios_institucion/views.py": ["/backend/servicios_institucion/models.py", "/backend/servicios_institucion/serializers.py"], "/backend/servicios_institucion/admin.py": ["/backend/servicios_institucion/models.py"], "/backend/servicios_institucion/serializers.py": ["/backend/servicios_institucion/models.py"...
42,145
bryantutiven2/instituto_angular
refs/heads/main
/backend/servicios_institucion/migrations/0003_auto_20201016_1636.py
# Generated by Django 3.1 on 2020-10-16 21:36 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('servicios_institucion', '0002_secciones_educativas_titulo'), ] operations = [ migrations.AddField( model_name='seccio...
{"/backend/servicios_institucion/views.py": ["/backend/servicios_institucion/models.py", "/backend/servicios_institucion/serializers.py"], "/backend/servicios_institucion/admin.py": ["/backend/servicios_institucion/models.py"], "/backend/servicios_institucion/serializers.py": ["/backend/servicios_institucion/models.py"...
42,146
bryantutiven2/instituto_angular
refs/heads/main
/backend/servicios_institucion/serializers.py
from .models import Colegio, Pagina_inicio, Red_social, Secciones_educativas, Telefono, Noticia from rest_framework import serializers class ColegioSerializer(serializers.ModelSerializer): class Meta: model = Colegio fields = '__all__' class PaginaSerializer(serializers.ModelSerializer): ...
{"/backend/servicios_institucion/views.py": ["/backend/servicios_institucion/models.py", "/backend/servicios_institucion/serializers.py"], "/backend/servicios_institucion/admin.py": ["/backend/servicios_institucion/models.py"], "/backend/servicios_institucion/serializers.py": ["/backend/servicios_institucion/models.py"...
42,147
bryantutiven2/instituto_angular
refs/heads/main
/backend/servicios_institucion/migrations/0004_noticia_titulo.py
# Generated by Django 3.1 on 2020-10-16 22:19 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('servicios_institucion', '0003_auto_20201016_1636'), ] operations = [ migrations.AddField( model_name='noticia', ...
{"/backend/servicios_institucion/views.py": ["/backend/servicios_institucion/models.py", "/backend/servicios_institucion/serializers.py"], "/backend/servicios_institucion/admin.py": ["/backend/servicios_institucion/models.py"], "/backend/servicios_institucion/serializers.py": ["/backend/servicios_institucion/models.py"...
42,148
bryantutiven2/instituto_angular
refs/heads/main
/backend/servicios_institucion/migrations/0001_initial.py
# Generated by Django 3.1 on 2020-10-15 19:56 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Colegio', fi...
{"/backend/servicios_institucion/views.py": ["/backend/servicios_institucion/models.py", "/backend/servicios_institucion/serializers.py"], "/backend/servicios_institucion/admin.py": ["/backend/servicios_institucion/models.py"], "/backend/servicios_institucion/serializers.py": ["/backend/servicios_institucion/models.py"...
42,152
raselTarikul/simulation
refs/heads/master
/src/gridsingularity/apps/simulation/models.py
from django.db import models from gridsingularity.apps.base.models import BaseModel # Create your models here. class SimulationResult(BaseModel): """ This Class represent the simulation result """ active = models.DecimalField(max_digits=5, decimal_places=2) reactive = models.DecimalField(max_digits=5, de...
{"/src/gridsingularity/apps/simulation/serializers.py": ["/src/gridsingularity/apps/simulation/models.py"], "/src/gridsingularity/apps/simulation/urls.py": ["/src/gridsingularity/apps/simulation/views.py"], "/src/gridsingularity/apps/simulation/views.py": ["/src/gridsingularity/apps/simulation/models.py", "/src/gridsin...
42,153
raselTarikul/simulation
refs/heads/master
/src/gridsingularity/apps/simulation/serializers.py
from rest_framework import serializers from .models import SimulationResult class SimulationResultSerializer(serializers.ModelSerializer): class Meta: model = SimulationResult fields = ('id', 'active', 'reactive')
{"/src/gridsingularity/apps/simulation/serializers.py": ["/src/gridsingularity/apps/simulation/models.py"], "/src/gridsingularity/apps/simulation/urls.py": ["/src/gridsingularity/apps/simulation/views.py"], "/src/gridsingularity/apps/simulation/views.py": ["/src/gridsingularity/apps/simulation/models.py", "/src/gridsin...
42,154
raselTarikul/simulation
refs/heads/master
/src/gridsingularity/apps/simulation/urls.py
from django.urls import path from .views import CreateSimulation, GetSimulation, GetSimulationActive, GetSimulationReActive urlpatterns = [ path('simulations/', CreateSimulation.as_view(), name='create-simulation'), path('simulations/<int:id>/', GetSimulation.as_view(), name='get-simulation')...
{"/src/gridsingularity/apps/simulation/serializers.py": ["/src/gridsingularity/apps/simulation/models.py"], "/src/gridsingularity/apps/simulation/urls.py": ["/src/gridsingularity/apps/simulation/views.py"], "/src/gridsingularity/apps/simulation/views.py": ["/src/gridsingularity/apps/simulation/models.py", "/src/gridsin...
42,155
raselTarikul/simulation
refs/heads/master
/src/gridsingularity/exceptions/exceptions.py
from rest_framework.exceptions import APIException class NotFoundException(APIException): status_code = 404
{"/src/gridsingularity/apps/simulation/serializers.py": ["/src/gridsingularity/apps/simulation/models.py"], "/src/gridsingularity/apps/simulation/urls.py": ["/src/gridsingularity/apps/simulation/views.py"], "/src/gridsingularity/apps/simulation/views.py": ["/src/gridsingularity/apps/simulation/models.py", "/src/gridsin...
42,156
raselTarikul/simulation
refs/heads/master
/src/gridsingularity/apps/simulation/tests.py
from django.urls import reverse from rest_framework import status from rest_framework.test import APITestCase from gridsingularity.apps.simulation.models import SimulationResult class CreateSimulationTest(APITestCase): """ Test crate silulation """ def test_create_silulation(self): """ ...
{"/src/gridsingularity/apps/simulation/serializers.py": ["/src/gridsingularity/apps/simulation/models.py"], "/src/gridsingularity/apps/simulation/urls.py": ["/src/gridsingularity/apps/simulation/views.py"], "/src/gridsingularity/apps/simulation/views.py": ["/src/gridsingularity/apps/simulation/models.py", "/src/gridsin...
42,157
raselTarikul/simulation
refs/heads/master
/src/gridsingularity/apps/simulation/views.py
from rest_framework import status from rest_framework.response import Response from rest_framework.views import APIView from django.core.exceptions import ObjectDoesNotExist from gridsingularity.utils import sim from gridsingularity.exceptions.exceptions import NotFoundException from .models import SimulationResult fr...
{"/src/gridsingularity/apps/simulation/serializers.py": ["/src/gridsingularity/apps/simulation/models.py"], "/src/gridsingularity/apps/simulation/urls.py": ["/src/gridsingularity/apps/simulation/views.py"], "/src/gridsingularity/apps/simulation/views.py": ["/src/gridsingularity/apps/simulation/models.py", "/src/gridsin...
42,158
raselTarikul/simulation
refs/heads/master
/src/gridsingularity/apps/base/models.py
from django.db import models # Create your models here. class BaseModel(models.Model): """Abstract model that defines a set of fields which are common to all models""" created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) class Meta: abstr...
{"/src/gridsingularity/apps/simulation/serializers.py": ["/src/gridsingularity/apps/simulation/models.py"], "/src/gridsingularity/apps/simulation/urls.py": ["/src/gridsingularity/apps/simulation/views.py"], "/src/gridsingularity/apps/simulation/views.py": ["/src/gridsingularity/apps/simulation/models.py", "/src/gridsin...
42,170
IvanRmz/FSDI114
refs/heads/master
/assignment2.py
def reverseStr(string): length = len(string) if length == 1: return string return string[length-1] + reverseStr(string[0:length-1]) def productOfItems(list): lengthOfList = len(list) newList = [] for i in range(lengthOfList): newList.append(1) for j in range(lengthOfLis...
{"/main.py": ["/MyQueue.py"]}
42,171
IvanRmz/FSDI114
refs/heads/master
/assignment1.py
def areAnagrams(string_one, string_two): if len(string_one) != len(string_two): return False for character in string_one: if character not in string_two: break string_two = string_two.replace(character, "", 1) return len(string_two) == 0 if __name__ ==...
{"/main.py": ["/MyQueue.py"]}
42,172
IvanRmz/FSDI114
refs/heads/master
/MyQueue.py
class Queue: def __init__(self): self.items = [] def is_empty(self): return self.items == [] def enqueue(self,item): self.items.insert(0, item) def dequeue(self): return self.items.pop() def size(self): return len(self.items) class Queue2Stacks: ...
{"/main.py": ["/MyQueue.py"]}
42,173
IvanRmz/FSDI114
refs/heads/master
/MyLinkedList.py
class Node: def __init__(self, data): self.data = data self.next = None class DLNode: def __init__(self, data): self.prev = None super().__init__(data) class LinkedList: def __init__(self): self.head = None def add(self, data, prev_node=None, position=None): ...
{"/main.py": ["/MyQueue.py"]}
42,174
IvanRmz/FSDI114
refs/heads/master
/main.py
from MyStack import Stack from MyQueue import Queue2Stacks def reverseStr(string): stack = Stack() for character in string: stack.push(character) newStr = '' while stack.size() > 0: newStr += stack.pop() return newStr specialCase = { '[' : ']', ']' : '[', '(' : ')', ...
{"/main.py": ["/MyQueue.py"]}
42,176
fs6/ha_cloud_music
refs/heads/master
/custom_components/ha_cloud_music/api_voice.py
import re class ApiVoice(): def __init__(self, hass, api_music): self.hass = hass self.api_music = api_music async def text_event(self,event): hass = self.hass _text = event.data.get('text') #_log_info('监听语音小助手的文本:' + _text) # 我想听xxx的歌 pattern = re.comp...
{"/custom_components/ha_cloud_music/media_player.py": ["/custom_components/ha_cloud_music/api_const.py", "/custom_components/ha_cloud_music/api_media.py", "/custom_components/ha_cloud_music/api_voice.py", "/custom_components/ha_cloud_music/api_tts.py"], "/custom_components/ha_cloud_music/api_media.py": ["/custom_compon...
42,177
fs6/ha_cloud_music
refs/heads/master
/custom_components/ha_cloud_music/media_player.py
import json import os import logging import voluptuous as vol import requests import time import datetime import random import re import urllib.parse import uuid import math import base64 import asyncio ################### 接口定义 ################### # 常量 from .api_const import DOMAIN, VERSION, ROOT_PATH, TrueOrFalse, w...
{"/custom_components/ha_cloud_music/media_player.py": ["/custom_components/ha_cloud_music/api_const.py", "/custom_components/ha_cloud_music/api_media.py", "/custom_components/ha_cloud_music/api_voice.py", "/custom_components/ha_cloud_music/api_tts.py"], "/custom_components/ha_cloud_music/api_media.py": ["/custom_compon...
42,178
fs6/ha_cloud_music
refs/heads/master
/custom_components/ha_cloud_music/api_media.py
# 内置VLC播放器 from .api_vlc import VlcPlayer class ApiMedia(): def __init__(self, media, cfg): self.hass = media._hass self.media = media self.is_notify = bool(cfg['is_notify']) self.is_debug = bool(cfg['is_debug']) self._LOGGER = cfg['_LOGGER'] # 判断是否支持VLC sel...
{"/custom_components/ha_cloud_music/media_player.py": ["/custom_components/ha_cloud_music/api_const.py", "/custom_components/ha_cloud_music/api_media.py", "/custom_components/ha_cloud_music/api_voice.py", "/custom_components/ha_cloud_music/api_tts.py"], "/custom_components/ha_cloud_music/api_media.py": ["/custom_compon...
42,179
fs6/ha_cloud_music
refs/heads/master
/custom_components/ha_cloud_music/api_const.py
import os, json DOMAIN = 'ha_cloud_music' VERSION = '2.4.1' DOMAIN_API = '/' + DOMAIN + '-api' ROOT_PATH = '/' + DOMAIN + '-local/' + VERSION def TrueOrFalse(val, trueStr, falseStr): if val: return trueStr return falseStr # 获取配置路径 def get_config_path(name): return os.path.join(os.path.dirname(__f...
{"/custom_components/ha_cloud_music/media_player.py": ["/custom_components/ha_cloud_music/api_const.py", "/custom_components/ha_cloud_music/api_media.py", "/custom_components/ha_cloud_music/api_voice.py", "/custom_components/ha_cloud_music/api_tts.py"], "/custom_components/ha_cloud_music/api_media.py": ["/custom_compon...
42,180
fs6/ha_cloud_music
refs/heads/master
/custom_components/ha_cloud_music/binary_sensor.py
""" 功能:判断当前日期是否节假日. 配置 binary_sensor: - platform: ha_cloud_music """ import logging import time import requests import json from datetime import datetime, timedelta import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import CONF_NAME, WEEKDAYS from homeass...
{"/custom_components/ha_cloud_music/media_player.py": ["/custom_components/ha_cloud_music/api_const.py", "/custom_components/ha_cloud_music/api_media.py", "/custom_components/ha_cloud_music/api_voice.py", "/custom_components/ha_cloud_music/api_tts.py"], "/custom_components/ha_cloud_music/api_media.py": ["/custom_compon...
42,181
fs6/ha_cloud_music
refs/heads/master
/custom_components/ha_cloud_music/api_tts.py
import os, hashlib, asyncio, threading, time, requests from mutagen.mp3 import MP3 from urllib.request import urlopen, quote, urlretrieve from homeassistant.helpers import template from homeassistant.const import (STATE_IDLE, STATE_PAUSED, STATE_PLAYING, STATE_OFF, STATE_UNAVAILABLE) session = requests.session() from...
{"/custom_components/ha_cloud_music/media_player.py": ["/custom_components/ha_cloud_music/api_const.py", "/custom_components/ha_cloud_music/api_media.py", "/custom_components/ha_cloud_music/api_voice.py", "/custom_components/ha_cloud_music/api_tts.py"], "/custom_components/ha_cloud_music/api_media.py": ["/custom_compon...
42,182
fs6/ha_cloud_music
refs/heads/master
/custom_components/ha_cloud_music/api_vlc.py
import datetime from homeassistant.const import (STATE_IDLE, STATE_PAUSED, STATE_PLAYING, STATE_OFF, STATE_UNAVAILABLE) ###################内置VLC播放器########################## class VlcPlayer(): def __init__(self): import vlc self.vlc = vlc self._instance = vlc.Instance() self._vlc =...
{"/custom_components/ha_cloud_music/media_player.py": ["/custom_components/ha_cloud_music/api_const.py", "/custom_components/ha_cloud_music/api_media.py", "/custom_components/ha_cloud_music/api_voice.py", "/custom_components/ha_cloud_music/api_tts.py"], "/custom_components/ha_cloud_music/api_media.py": ["/custom_compon...
42,198
sunitsai/2userDjango
refs/heads/master
/app/views.py
from django.shortcuts import render from .models import * from random import randint from .utils import * # Create your views here. def RegistrationPage(request): return render(request,"app/register.html") def LoginPage(request): return render(request,"app/login.html") def ImagePage(request): return ...
{"/app/views.py": ["/app/models.py"]}
42,199
sunitsai/2userDjango
refs/heads/master
/app/urls.py
from django.urls import path,include from . import views urlpatterns = [ path("",views.RegistrationPage,name="registerpage"), path("registeruser/",views.RegisterUser,name="registeruser"), path("loginpage/",views.LoginPage,name="loginpage"), path("loginuser/",views.LoginUser,name="loginuser"), path(...
{"/app/views.py": ["/app/models.py"]}
42,200
sunitsai/2userDjango
refs/heads/master
/app/models.py
from django.db import models # Create your models here. class User(models.Model): email = models.EmailField(max_length=50) password = models.CharField(max_length=50) otp = models.IntegerField() role = models.CharField(max_length=50) is_verified = models.BooleanField(default=False) is_created =...
{"/app/views.py": ["/app/models.py"]}
42,203
vicenteneto/foursquare-api-sample
refs/heads/master
/foursquare_sample_util/constants.py
class Settings: CONFIG_SUFFIX = 'Config' VIEWS = 'views'
{"/manage.py": ["/foursquare_sample/app.py"], "/foursquare_sample/app.py": ["/foursquare_sample_util/constants.py"]}
42,204
vicenteneto/foursquare-api-sample
refs/heads/master
/manage.py
from flask_script import Manager, Server from foursquare_sample.app import create_app manager = Manager(create_app) manager.add_option('-c', '--config', default='Development', required=False, dest='config') manager.add_command('runserver', Server(threaded=True)) if __name__ == '__main__': manager.run()
{"/manage.py": ["/foursquare_sample/app.py"], "/foursquare_sample/app.py": ["/foursquare_sample_util/constants.py"]}
42,205
vicenteneto/foursquare-api-sample
refs/heads/master
/foursquare_sample/app.py
from importlib import import_module from flask import Flask from foursquare_sample import settings from foursquare_sample.settings import VIEWS from foursquare_sample_util.constants import Settings def create_app(config): app = Flask(__name__) if config is not None: configuration = getattr(settings...
{"/manage.py": ["/foursquare_sample/app.py"], "/foursquare_sample/app.py": ["/foursquare_sample_util/constants.py"]}