index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
21,290
elidiocampeiz/ArrowFieldTraversal
refs/heads/master
/graph_utils.py
def get_graph(filename): with open(filename, 'r') as fp: text_data = fp.readlines() data = [line_string.rstrip().split(' ') for line_string in text_data] # print(data) # print(data[0])# size graph_matrix = [] #[[None]*int(data[0][1])]*int(data[0][0]) # print(graph_ma...
{"/GraphTraversal.py": ["/graph_utils.py"]}
21,293
akhidwivedi/Employee-management
refs/heads/master
/employee/forms.py
from django import forms from .models import employee from django.forms import ModelForm from django.contrib.auth import authenticate class UserLoginForm(forms.Form): username = forms.CharField() password = forms.CharField(widget=forms.PasswordInput) def clean(self,*args,**kwrgs): userna...
{"/employee/forms.py": ["/employee/models.py"], "/employee/views.py": ["/employee/forms.py", "/employee/models.py"]}
21,294
akhidwivedi/Employee-management
refs/heads/master
/employee/views.py
from django.shortcuts import render,redirect from .forms import EmployeeForm,UserLoginForm from .models import employee def employee_list(request): context ={'employee_list': employee.objects.all()} return render(request,"employee/employee_list.html",context) def employee_forms(request,id=0)...
{"/employee/forms.py": ["/employee/models.py"], "/employee/views.py": ["/employee/forms.py", "/employee/models.py"]}
21,295
akhidwivedi/Employee-management
refs/heads/master
/employee/models.py
from django.db import models from django.forms import ModelForm # Create your models her class position(models.Model): title=models.CharField(max_length=40) def __str__(self): return self.title class employee(models.Model): fullname=models.CharField(max_length=50) emp_code=model...
{"/employee/forms.py": ["/employee/models.py"], "/employee/views.py": ["/employee/forms.py", "/employee/models.py"]}
21,296
akhidwivedi/Employee-management
refs/heads/master
/employee/migrations/0001_initial.py
# Generated by Django 2.2 on 2020-04-07 10:57 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='position', f...
{"/employee/forms.py": ["/employee/models.py"], "/employee/views.py": ["/employee/forms.py", "/employee/models.py"]}
21,297
akhidwivedi/Employee-management
refs/heads/master
/employee/migrations/0003_delete_userlogin.py
# Generated by Django 2.2 on 2020-04-18 04:40 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('employee', '0002_userlogin'), ] operations = [ migrations.DeleteModel( name='UserLogin', ), ]
{"/employee/forms.py": ["/employee/models.py"], "/employee/views.py": ["/employee/forms.py", "/employee/models.py"]}
21,298
akhidwivedi/Employee-management
refs/heads/master
/employee/urls.py
from django.urls import path,include from . import views urlpatterns = [ # path('login/',views.login_view,name = 'employee_login'), path('', views.employee_forms,name='employee_insert'), path('list/',views.employee_list,name='employee_list'), path('delete/<int:id>/',views.employee_delet...
{"/employee/forms.py": ["/employee/models.py"], "/employee/views.py": ["/employee/forms.py", "/employee/models.py"]}
21,300
prasad5141/skillathon_blog
refs/heads/master
/webproject/urls.py
"""webproject URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-ba...
{"/webproject/urls.py": ["/blogapp/views.py", "/blogapi/views.py"], "/blogapi/serializers.py": ["/blogapp/models.py"], "/blogapp/views.py": ["/blogapp/models.py"], "/blogapp/admin.py": ["/blogapp/models.py"], "/blogapi/views.py": ["/blogapi/serializers.py", "/blogapp/models.py"]}
21,301
prasad5141/skillathon_blog
refs/heads/master
/blogapi/serializers.py
from rest_framework import serializers from blogapp.models import Article class GetArticlesSerializer(serializers.ModelSerializer): user = serializers.SerializerMethodField() class Meta: model = Article fields = ('title', 'content', 'user') def get_user(self, instance): username =...
{"/webproject/urls.py": ["/blogapp/views.py", "/blogapi/views.py"], "/blogapi/serializers.py": ["/blogapp/models.py"], "/blogapp/views.py": ["/blogapp/models.py"], "/blogapp/admin.py": ["/blogapp/models.py"], "/blogapi/views.py": ["/blogapi/serializers.py", "/blogapp/models.py"]}
21,302
prasad5141/skillathon_blog
refs/heads/master
/blogapp/views.py
from django.shortcuts import render, redirect from .forms import ArticleForm from django.contrib import messages from .models import Article from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from django.contrib.auth.models import User from django.contrib.auth.hashers import check_password from...
{"/webproject/urls.py": ["/blogapp/views.py", "/blogapi/views.py"], "/blogapi/serializers.py": ["/blogapp/models.py"], "/blogapp/views.py": ["/blogapp/models.py"], "/blogapp/admin.py": ["/blogapp/models.py"], "/blogapi/views.py": ["/blogapi/serializers.py", "/blogapp/models.py"]}
21,303
prasad5141/skillathon_blog
refs/heads/master
/blogapp/admin.py
from django.contrib import admin # Register your models here. from .models import Article # class ArticleAdmin(admin.ModelAdmin): # list_display = ['title', 'article'] admin.site.register(Article)
{"/webproject/urls.py": ["/blogapp/views.py", "/blogapi/views.py"], "/blogapi/serializers.py": ["/blogapp/models.py"], "/blogapp/views.py": ["/blogapp/models.py"], "/blogapp/admin.py": ["/blogapp/models.py"], "/blogapi/views.py": ["/blogapi/serializers.py", "/blogapp/models.py"]}
21,304
prasad5141/skillathon_blog
refs/heads/master
/blogapp/models.py
from django.db import models # from django.contrib.auth import User from django.contrib.auth.models import User # Create your models here. class Tag(models.Model): name = models.CharField(max_length=150, unique=True, null=False, blank=False) class Article(models.Model): title = models.CharField(max_length=2...
{"/webproject/urls.py": ["/blogapp/views.py", "/blogapi/views.py"], "/blogapi/serializers.py": ["/blogapp/models.py"], "/blogapp/views.py": ["/blogapp/models.py"], "/blogapp/admin.py": ["/blogapp/models.py"], "/blogapi/views.py": ["/blogapi/serializers.py", "/blogapp/models.py"]}
21,305
prasad5141/skillathon_blog
refs/heads/master
/blogapi/views.py
from django.shortcuts import render from rest_framework.response import Response from rest_framework import status from rest_framework.decorators import api_view, permission_classes from django.contrib.auth.models import User from .serializers import GetArticlesSerializer,CreateArticleSerializer, CreateUser from rest_f...
{"/webproject/urls.py": ["/blogapp/views.py", "/blogapi/views.py"], "/blogapi/serializers.py": ["/blogapp/models.py"], "/blogapp/views.py": ["/blogapp/models.py"], "/blogapp/admin.py": ["/blogapp/models.py"], "/blogapi/views.py": ["/blogapi/serializers.py", "/blogapp/models.py"]}
21,307
podhmo/pyramid_bubbling
refs/heads/master
/src/pyramid_bubbling/util.py
# -*- coding:utf-8 -*- from zope.interface.interface import InterfaceClass from zope.interface import ( implementedBy, implementer ) _repository = {} def clean_dynamic_interface(): global _repository _repository = {} def dynamic_interface(type_): global _repository try: return _repos...
{"/src/pyramid_bubbling/api.py": ["/src/pyramid_bubbling/__init__.py", "/src/pyramid_bubbling/components.py"], "/src/pyramid_bubbling/__init__.py": ["/src/pyramid_bubbling/interfaces.py"], "/src/pyramid_bubbling/components.py": ["/src/pyramid_bubbling/interfaces.py", "/src/pyramid_bubbling/__init__.py", "/src/pyramid_b...
21,308
podhmo/pyramid_bubbling
refs/heads/master
/src/pyramid_bubbling/interfaces.py
# -*- coding:utf-8 -*- from zope.interface import ( Interface, ) class IParentFromInstanceAdapter(Interface): def __call__(instance): pass def from_class(cls): pass class IBubbling(Interface): def get_iterator(startpoint): pass def get_bubbling_path_order(leaf): p...
{"/src/pyramid_bubbling/api.py": ["/src/pyramid_bubbling/__init__.py", "/src/pyramid_bubbling/components.py"], "/src/pyramid_bubbling/__init__.py": ["/src/pyramid_bubbling/interfaces.py"], "/src/pyramid_bubbling/components.py": ["/src/pyramid_bubbling/interfaces.py", "/src/pyramid_bubbling/__init__.py", "/src/pyramid_b...
21,309
podhmo/pyramid_bubbling
refs/heads/master
/tests/test_components.py
# -*- coding:utf-8 -*- import unittest from testfixtures import compare from zope.interface import Interface, implementer class INode(Interface): pass @implementer(INode) class base(object): pass def NodeFactory(name, iface_name, base=base): from zope.interface.interface import InterfaceClass def __i...
{"/src/pyramid_bubbling/api.py": ["/src/pyramid_bubbling/__init__.py", "/src/pyramid_bubbling/components.py"], "/src/pyramid_bubbling/__init__.py": ["/src/pyramid_bubbling/interfaces.py"], "/src/pyramid_bubbling/components.py": ["/src/pyramid_bubbling/interfaces.py", "/src/pyramid_bubbling/__init__.py", "/src/pyramid_b...
21,310
podhmo/pyramid_bubbling
refs/heads/master
/tests/test_self.py
# -*- coding:utf-8 -*- import unittest from testfixtures import compare class BubblingAttributesTests(unittest.TestCase): def test_bubbling_attribute__just_access(self): from pyramid_bubbling import bubbling_attribute class Parent(object): pass class Child(object): ...
{"/src/pyramid_bubbling/api.py": ["/src/pyramid_bubbling/__init__.py", "/src/pyramid_bubbling/components.py"], "/src/pyramid_bubbling/__init__.py": ["/src/pyramid_bubbling/interfaces.py"], "/src/pyramid_bubbling/components.py": ["/src/pyramid_bubbling/interfaces.py", "/src/pyramid_bubbling/__init__.py", "/src/pyramid_b...
21,311
podhmo/pyramid_bubbling
refs/heads/master
/setup.py
from setuptools import setup, find_packages import sys import os py3 = sys.version_info.major >= 3 version = '0.0' requires = [ "setuptools", "zope.interface", "venusian" ] tests_require = [ "testfixtures" ] long_description = "\n".join(open(f).read() for f in ["README.rst", "CHANGES.txt"]) set...
{"/src/pyramid_bubbling/api.py": ["/src/pyramid_bubbling/__init__.py", "/src/pyramid_bubbling/components.py"], "/src/pyramid_bubbling/__init__.py": ["/src/pyramid_bubbling/interfaces.py"], "/src/pyramid_bubbling/components.py": ["/src/pyramid_bubbling/interfaces.py", "/src/pyramid_bubbling/__init__.py", "/src/pyramid_b...
21,312
podhmo/pyramid_bubbling
refs/heads/master
/tests/test_it.py
# -*- coding:utf-8 -*- import unittest from testfixtures import compare from pyramid import testing from pyramid_bubbling import bubbling_attribute from zope.interface import Interface, implementer class INode(Interface): pass class Document(object): def __init__(self, name): self.name = name de...
{"/src/pyramid_bubbling/api.py": ["/src/pyramid_bubbling/__init__.py", "/src/pyramid_bubbling/components.py"], "/src/pyramid_bubbling/__init__.py": ["/src/pyramid_bubbling/interfaces.py"], "/src/pyramid_bubbling/components.py": ["/src/pyramid_bubbling/interfaces.py", "/src/pyramid_bubbling/__init__.py", "/src/pyramid_b...
21,313
podhmo/pyramid_bubbling
refs/heads/master
/src/pyramid_bubbling/api.py
# -*- coding:utf-8 -*- from zope.interface import ( providedBy, ) from . import ( Bubbling, Accessor ) from .components import ( RegistryAccessForClass, RegistryAccess ) import logging logger = logging.getLogger(__name__) def get_bubbling(request, start_point, path_name=""): try: nex...
{"/src/pyramid_bubbling/api.py": ["/src/pyramid_bubbling/__init__.py", "/src/pyramid_bubbling/components.py"], "/src/pyramid_bubbling/__init__.py": ["/src/pyramid_bubbling/interfaces.py"], "/src/pyramid_bubbling/components.py": ["/src/pyramid_bubbling/interfaces.py", "/src/pyramid_bubbling/__init__.py", "/src/pyramid_b...
21,314
podhmo/pyramid_bubbling
refs/heads/master
/demo/models.py
# -*- coding:utf-8 -*- from pyramid_bubbling.components import bubbling_event_config from zope.interface import Interface, implementer class INode(Interface): pass @implementer(INode) class Node(object): pass class Document(Node): def __init__(self, name): self.name = name class Area(Node): ...
{"/src/pyramid_bubbling/api.py": ["/src/pyramid_bubbling/__init__.py", "/src/pyramid_bubbling/components.py"], "/src/pyramid_bubbling/__init__.py": ["/src/pyramid_bubbling/interfaces.py"], "/src/pyramid_bubbling/components.py": ["/src/pyramid_bubbling/interfaces.py", "/src/pyramid_bubbling/__init__.py", "/src/pyramid_b...
21,315
podhmo/pyramid_bubbling
refs/heads/master
/demo/main.py
# -*- coding:utf-8 -*- from pyramid.testing import testConfig, DummyRequest from pyramid_bubbling.components import ParentFromInstance import sys import os sys.path.append(os.path.abspath(os.path.dirname(__file__))) from models import ( Document, Area, Button ) with testConfig() as config: config.inc...
{"/src/pyramid_bubbling/api.py": ["/src/pyramid_bubbling/__init__.py", "/src/pyramid_bubbling/components.py"], "/src/pyramid_bubbling/__init__.py": ["/src/pyramid_bubbling/interfaces.py"], "/src/pyramid_bubbling/components.py": ["/src/pyramid_bubbling/interfaces.py", "/src/pyramid_bubbling/__init__.py", "/src/pyramid_b...
21,316
podhmo/pyramid_bubbling
refs/heads/master
/src/pyramid_bubbling/__init__.py
# -*- coding:utf-8 -*- import operator as op from zope.interface import implementer from pyramid.exceptions import ConfigurationError from .interfaces import ( IBubbling, IAccess ) class BubblingConfigurationError(ConfigurationError): pass class BubblingRuntimeException(Exception): pass class _Si...
{"/src/pyramid_bubbling/api.py": ["/src/pyramid_bubbling/__init__.py", "/src/pyramid_bubbling/components.py"], "/src/pyramid_bubbling/__init__.py": ["/src/pyramid_bubbling/interfaces.py"], "/src/pyramid_bubbling/components.py": ["/src/pyramid_bubbling/interfaces.py", "/src/pyramid_bubbling/__init__.py", "/src/pyramid_b...
21,317
podhmo/pyramid_bubbling
refs/heads/master
/tests/test_config.py
# -*- coding:utf-8 -*- import unittest from pyramid import testing from testfixtures import compare class A: pass class B: def __init__(self, a): self.a = a class C: def __init__(self, b): self.b = b from zope.interface import ( Interface, implementer ) class INode(Interface): ...
{"/src/pyramid_bubbling/api.py": ["/src/pyramid_bubbling/__init__.py", "/src/pyramid_bubbling/components.py"], "/src/pyramid_bubbling/__init__.py": ["/src/pyramid_bubbling/interfaces.py"], "/src/pyramid_bubbling/components.py": ["/src/pyramid_bubbling/interfaces.py", "/src/pyramid_bubbling/__init__.py", "/src/pyramid_b...
21,318
podhmo/pyramid_bubbling
refs/heads/master
/src/pyramid_bubbling/components.py
# -*- coding:utf-8 -*- import venusian from .interfaces import ( IAccess, IEvent, IParentFromInstanceAdapter ) from zope.interface import ( implementer, provider, providedBy, implementedBy ) from zope.interface.verify import verifyObject from weakref import WeakValueDictionary from . imp...
{"/src/pyramid_bubbling/api.py": ["/src/pyramid_bubbling/__init__.py", "/src/pyramid_bubbling/components.py"], "/src/pyramid_bubbling/__init__.py": ["/src/pyramid_bubbling/interfaces.py"], "/src/pyramid_bubbling/components.py": ["/src/pyramid_bubbling/interfaces.py", "/src/pyramid_bubbling/__init__.py", "/src/pyramid_b...
21,319
podhmo/pyramid_bubbling
refs/heads/master
/gen.py
# -*- coding:utf-8 -*- print(""" pyramid_bubbling ================ bubbling event sample ---------------------------------------- """) import os import sys out = os.popen("../bin/python {}".format(sys.argv[1])) print("output ::") print("") for line in out.readlines(): print(" ", line.rstrip()) print("") for ...
{"/src/pyramid_bubbling/api.py": ["/src/pyramid_bubbling/__init__.py", "/src/pyramid_bubbling/components.py"], "/src/pyramid_bubbling/__init__.py": ["/src/pyramid_bubbling/interfaces.py"], "/src/pyramid_bubbling/components.py": ["/src/pyramid_bubbling/interfaces.py", "/src/pyramid_bubbling/__init__.py", "/src/pyramid_b...
21,330
testitesti22/ha-sun2
refs/heads/master
/custom_components/sun2/sensor.py
"""Sun2 Sensor.""" from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( CONF_MONITORED_CONDITIONS, DEVICE_CLASS_TIMESTAMP) from homeassistant.core import callback from homeassistant.util import dt as dt...
{"/custom_components/sun2/sensor.py": ["/custom_components/sun2/helpers.py"], "/custom_components/sun2/binary_sensor.py": ["/custom_components/sun2/helpers.py"]}
21,331
testitesti22/ha-sun2
refs/heads/master
/custom_components/sun2/binary_sensor.py
"""Sun2 Binary Sensor.""" from datetime import timedelta import logging import voluptuous as vol try: from homeassistant.components.binary_sensor import BinarySensorEntity except ImportError: from homeassistant.components.binary_sensor import BinarySensorDevice BinarySensorEntity = BinarySensorDevice from...
{"/custom_components/sun2/sensor.py": ["/custom_components/sun2/helpers.py"], "/custom_components/sun2/binary_sensor.py": ["/custom_components/sun2/helpers.py"]}
21,332
testitesti22/ha-sun2
refs/heads/master
/custom_components/sun2/helpers.py
"""Sun2 Helpers.""" from datetime import timedelta try: from astral import AstralError except ImportError: AstralError = TypeError from homeassistant.const import EVENT_CORE_CONFIG_UPDATE from homeassistant.core import callback from homeassistant.helpers.dispatcher import dispatcher_send from homeassistant.hel...
{"/custom_components/sun2/sensor.py": ["/custom_components/sun2/helpers.py"], "/custom_components/sun2/binary_sensor.py": ["/custom_components/sun2/helpers.py"]}
21,338
dreyk/emt
refs/heads/master
/models/resnet/model.py
import tensorflow as tf import models.resnet.resnet_gn_ws as resnet import models.resnet.layers as clayers import logging def _encoder_layer(input, planes, blocks,dilate=1, stride=1,layer=1): downsample = None if stride != 1 or input.shape[3] != planes * 4: downsample = resnet.Downsample(planes * 4, ...
{"/models/resnet/model.py": ["/models/resnet/resnet_gn_ws.py"], "/unet_one_face.py": ["/models/unet/unet.py", "/data/one_person.py"], "/fc_densnet_train.py": ["/data/alpha_base.py", "/models/fc_densenet/matting.py", "/models/resnet/model.py"], "/data/one_person.py": ["/data/coco.py"]}
21,339
dreyk/emt
refs/heads/master
/unet_one_face.py
import tensorflow as tf import models.unet.unet as unet import data.one_person as data import logging import os import argparse def train(args): logdir = args.checkpoint_dir os.makedirs(logdir) file_writer = tf.summary.create_file_writer(logdir) ds = data.data_fn(args, True) model = unet.unet((...
{"/models/resnet/model.py": ["/models/resnet/resnet_gn_ws.py"], "/unet_one_face.py": ["/models/unet/unet.py", "/data/one_person.py"], "/fc_densnet_train.py": ["/data/alpha_base.py", "/models/fc_densenet/matting.py", "/models/resnet/model.py"], "/data/one_person.py": ["/data/coco.py"]}
21,340
dreyk/emt
refs/heads/master
/sss_test.py
from imageio import imread from sss_semantic_soft_segmentation.semantic_soft_segmentation import semantic_soft_segmentation from scipy.io import loadmat if __name__ == '__main__': #img = imread('COCO_train2014_000000362884.jpg', mode='RGB') image = imread('./SIGGRAPH18SSS/samples/docia.png') ori = loadmat(...
{"/models/resnet/model.py": ["/models/resnet/resnet_gn_ws.py"], "/unet_one_face.py": ["/models/unet/unet.py", "/data/one_person.py"], "/fc_densnet_train.py": ["/data/alpha_base.py", "/models/fc_densenet/matting.py", "/models/resnet/model.py"], "/data/one_person.py": ["/data/coco.py"]}
21,341
dreyk/emt
refs/heads/master
/data/alpha_base.py
import tensorflow as tf import logging import glob import os import json import numpy as np import cv2 import random from scipy import ndimage unknown_code = 128 def pre_trimap(alpha): trimap = np.copy(alpha) k_size = 5 trimap[np.where((ndimage.grey_dilation(alpha[:, :], size=(k_size, k_size)) - ndimage...
{"/models/resnet/model.py": ["/models/resnet/resnet_gn_ws.py"], "/unet_one_face.py": ["/models/unet/unet.py", "/data/one_person.py"], "/fc_densnet_train.py": ["/data/alpha_base.py", "/models/fc_densenet/matting.py", "/models/resnet/model.py"], "/data/one_person.py": ["/data/coco.py"]}
21,342
dreyk/emt
refs/heads/master
/models/fc_densenet/matting.py
import models.fc_densenet.layers as fc_layers import tensorflow as tf def fba_fusion(alpha, img, F, B): F = ((alpha * img + (1 - alpha**2) * F - alpha * (1 - alpha) * B)) B = ((1 - alpha) * img + (2 * alpha - alpha**2) * B - alpha * (1 - alpha) * F) F = tf.clip_by_value(F,0,1) B = tf.clip_by_value(B,0...
{"/models/resnet/model.py": ["/models/resnet/resnet_gn_ws.py"], "/unet_one_face.py": ["/models/unet/unet.py", "/data/one_person.py"], "/fc_densnet_train.py": ["/data/alpha_base.py", "/models/fc_densenet/matting.py", "/models/resnet/model.py"], "/data/one_person.py": ["/data/coco.py"]}
21,343
dreyk/emt
refs/heads/master
/data/coco.py
import json import random import cv2 import numpy as np class CocoBG: def __init__(self,path): self.images = _load_coco(path) def get_random(self,w,h,rgb=True): name = random.choice(self.images) bg = cv2.imread(name) if rgb: bg = bg[:,:,::-1] return self.cr...
{"/models/resnet/model.py": ["/models/resnet/resnet_gn_ws.py"], "/unet_one_face.py": ["/models/unet/unet.py", "/data/one_person.py"], "/fc_densnet_train.py": ["/data/alpha_base.py", "/models/fc_densenet/matting.py", "/models/resnet/model.py"], "/data/one_person.py": ["/data/coco.py"]}
21,344
dreyk/emt
refs/heads/master
/live_aug.py
import cv2 import numpy as np original_img = cv2.imread('testdata/images/test.png') original_mask = cv2.imread('testdata/masks/test.png') bg = cv2.imread('testdata/default.png') original_img = cv2.resize(original_img,(160,160)) original_mask = cv2.cvtColor(original_mask,cv2.COLOR_BGR2GRAY) original_mask = cv2.resize(o...
{"/models/resnet/model.py": ["/models/resnet/resnet_gn_ws.py"], "/unet_one_face.py": ["/models/unet/unet.py", "/data/one_person.py"], "/fc_densnet_train.py": ["/data/alpha_base.py", "/models/fc_densenet/matting.py", "/models/resnet/model.py"], "/data/one_person.py": ["/data/coco.py"]}
21,345
dreyk/emt
refs/heads/master
/fc_densnet_train.py
import tensorflow as tf import data.alpha_base as data import models.fc_densenet.matting as fc_densenet import models.resnet.model as resnet_mat import logging import os import argparse import numpy as np def gauss_kernel(size=5, sigma=1.0): grid = np.float32(np.mgrid[0:size,0:size].T) gaussian = lambda x: np.e...
{"/models/resnet/model.py": ["/models/resnet/resnet_gn_ws.py"], "/unet_one_face.py": ["/models/unet/unet.py", "/data/one_person.py"], "/fc_densnet_train.py": ["/data/alpha_base.py", "/models/fc_densenet/matting.py", "/models/resnet/model.py"], "/data/one_person.py": ["/data/coco.py"]}
21,346
dreyk/emt
refs/heads/master
/play.py
import cv2 import numpy as np back = cv2.imread('./testdata/default.png') front = cv2.imread('/Users/agunin/Downloads/Alpha/People/hairs-3225896_1920.png',cv2.IMREAD_UNCHANGED) small_front = cv2.resize(front,(256,256)) smal_back= cv2.resize(back,(256,256)) a = small_front[:,:,3:].astype(np.float32)/255 res = sma...
{"/models/resnet/model.py": ["/models/resnet/resnet_gn_ws.py"], "/unet_one_face.py": ["/models/unet/unet.py", "/data/one_person.py"], "/fc_densnet_train.py": ["/data/alpha_base.py", "/models/fc_densenet/matting.py", "/models/resnet/model.py"], "/data/one_person.py": ["/data/coco.py"]}
21,347
dreyk/emt
refs/heads/master
/models/fc_densenet/model.py
import models.layers.layers as fc_layers import tensorflow as tf def FCDensNet( input_shape=(None, None, 3), n_classes=1, n_filters_first_conv=48, n_pool=5, growth_rate=16, n_layers_per_block=[4, 5, 7, 10, 12, 15, 12, 10, 7, 5, 4], dropout_p=0.2 ): if type(n...
{"/models/resnet/model.py": ["/models/resnet/resnet_gn_ws.py"], "/unet_one_face.py": ["/models/unet/unet.py", "/data/one_person.py"], "/fc_densnet_train.py": ["/data/alpha_base.py", "/models/fc_densenet/matting.py", "/models/resnet/model.py"], "/data/one_person.py": ["/data/coco.py"]}
21,348
dreyk/emt
refs/heads/master
/models/resnet/resnet_gn_ws.py
import tensorflow as tf import models.resnet.layers as clayers import logging class Conv3x3(tf.keras.layers.Layer): def __init__(self,out_planes, stride=1,dilate=1,**kwargs): super(Conv3x3, self).__init__(**kwargs) self.conv = tf.keras.layers.Conv2D(out_planes,kernel_size=3, ...
{"/models/resnet/model.py": ["/models/resnet/resnet_gn_ws.py"], "/unet_one_face.py": ["/models/unet/unet.py", "/data/one_person.py"], "/fc_densnet_train.py": ["/data/alpha_base.py", "/models/fc_densenet/matting.py", "/models/resnet/model.py"], "/data/one_person.py": ["/data/coco.py"]}
21,349
dreyk/emt
refs/heads/master
/models/unet/unet.py
import models.layers.layers as layers import tensorflow as tf def block(input, filters, norm, pooling=True): conv1 = tf.keras.layers.Conv2D(filters, 3, padding='same', kernel_initializer='he_normal')(input) n1 = norm(conv1) r1 = tf.keras.layers.Activation(tf.keras.activations.relu)(n1) conv2 = tf.kera...
{"/models/resnet/model.py": ["/models/resnet/resnet_gn_ws.py"], "/unet_one_face.py": ["/models/unet/unet.py", "/data/one_person.py"], "/fc_densnet_train.py": ["/data/alpha_base.py", "/models/fc_densenet/matting.py", "/models/resnet/model.py"], "/data/one_person.py": ["/data/coco.py"]}
21,350
dreyk/emt
refs/heads/master
/data/one_person.py
import tensorflow as tf import os import cv2 import numpy as np import glob import data.coco as coco import logging def _strong_aug(p=0.5): import albumentations return albumentations.Compose([ albumentations.HorizontalFlip(p=0.5), albumentations.ShiftScaleRotate(shift_limit=0.0625, scale_limit...
{"/models/resnet/model.py": ["/models/resnet/resnet_gn_ws.py"], "/unet_one_face.py": ["/models/unet/unet.py", "/data/one_person.py"], "/fc_densnet_train.py": ["/data/alpha_base.py", "/models/fc_densenet/matting.py", "/models/resnet/model.py"], "/data/one_person.py": ["/data/coco.py"]}
21,351
dreyk/emt
refs/heads/master
/data/alpha.py
import tensorflow as tf import os import cv2 import numpy as np import glob def data_fn(args, training): files = glob.glob(args.data_set + '/masks/*.*') for i in range(len(files)): mask = files[i] img = os.path.basename(mask) img = args.data_set + '/images/' + img files[i] = (i...
{"/models/resnet/model.py": ["/models/resnet/resnet_gn_ws.py"], "/unet_one_face.py": ["/models/unet/unet.py", "/data/one_person.py"], "/fc_densnet_train.py": ["/data/alpha_base.py", "/models/fc_densenet/matting.py", "/models/resnet/model.py"], "/data/one_person.py": ["/data/coco.py"]}
21,356
stasSajin/dw-benchmarks
refs/heads/master
/dw_benchmark/ddl/shared/utils.py
try: import importlib.resources as pkg_resources except ImportError: # Try backported to PY<37 `importlib_resources`. import importlib_resources as pkg_resources from dw_benchmark import templates def run_warmup(model, engine) -> None: print("Running warmup by selecting * from all tables in a model") ...
{"/redshift-experiments/optimized_vs_unoptimized.py": ["/dw_benchmark/ddl/shared/models.py", "/dw_benchmark/ddl/shared/utils.py", "/dw_benchmark/ddl/redshift_ddls/redshift_utils.py"], "/dw_benchmark/ddl/redshift_ddls/redshift_utils.py": ["/dw_benchmark/ddl/shared/models.py", "/dw_benchmark/ddl/shared/utils.py"]}
21,357
stasSajin/dw-benchmarks
refs/heads/master
/redshift-experiments/optimized_vs_unoptimized.py
from dw_benchmark.ddl.shared.models import TCPDS100g, TCPDS100gUnoptimized from dw_benchmark.ddl.shared.utils import run_warmup from dw_benchmark.ddl.shared.utils import create_user_with_permissions from dw_benchmark.ddl.redshift_ddls.redshift_utils import get_redshift_engine from dw_benchmark.ddl.redshift_ddls.redshif...
{"/redshift-experiments/optimized_vs_unoptimized.py": ["/dw_benchmark/ddl/shared/models.py", "/dw_benchmark/ddl/shared/utils.py", "/dw_benchmark/ddl/redshift_ddls/redshift_utils.py"], "/dw_benchmark/ddl/redshift_ddls/redshift_utils.py": ["/dw_benchmark/ddl/shared/models.py", "/dw_benchmark/ddl/shared/utils.py"]}
21,358
stasSajin/dw-benchmarks
refs/heads/master
/dw_benchmark/ddl/shared/models.py
from enum import Enum class TCPDS100g(str, Enum): s3_url: str = "s3://fivetran-benchmark/tpcds_100_dat" schema_name: str = "tcpds100g" ddl: str = "optimized.sql" class TCPDS100gUnoptimized(str, Enum): s3_url: str = "s3://fivetran-benchmark/tpcds_100_dat" schema_name: str = "tcpds100g_unoptimized...
{"/redshift-experiments/optimized_vs_unoptimized.py": ["/dw_benchmark/ddl/shared/models.py", "/dw_benchmark/ddl/shared/utils.py", "/dw_benchmark/ddl/redshift_ddls/redshift_utils.py"], "/dw_benchmark/ddl/redshift_ddls/redshift_utils.py": ["/dw_benchmark/ddl/shared/models.py", "/dw_benchmark/ddl/shared/utils.py"]}
21,359
stasSajin/dw-benchmarks
refs/heads/master
/dw_benchmark/ddl/redshift_ddls/redshift_utils.py
try: import importlib.resources as pkg_resources except ImportError: # Try backported to PY<37 `importlib_resources`. import importlib_resources as pkg_resources from dw_benchmark import templates from dw_benchmark.ddl.shared.models import TCPDS100g from dw_benchmark.ddl.shared.models import TCPDS100gUnopti...
{"/redshift-experiments/optimized_vs_unoptimized.py": ["/dw_benchmark/ddl/shared/models.py", "/dw_benchmark/ddl/shared/utils.py", "/dw_benchmark/ddl/redshift_ddls/redshift_utils.py"], "/dw_benchmark/ddl/redshift_ddls/redshift_utils.py": ["/dw_benchmark/ddl/shared/models.py", "/dw_benchmark/ddl/shared/utils.py"]}
21,360
meenasirisha145/python18
refs/heads/master
/chapter2.py
# -*- coding: utf-8 -*- """ Created on Fri Mar 16 11:52:04 2018 by Meena Sirisha""" name="meena sirisha" name.title() name.lower() name.upper() f_name="meena" l_name="sirisha" full_name=f_name+" "+l_name full_name print("Hello"+" "+full_name.title()+".") print("Languages:\nPython\nC\nJavaScript") print("Skills:\nC\tC+...
{"/mat.py": ["/matplotlib.py"]}
21,361
meenasirisha145/python18
refs/heads/master
/tweets.py
# -*- coding: utf-8 -*- """ Created on Sat Mar 24 09:29:23 2018 by Meena Sirisha""" import tweepy from tweepy import OAuthHandler from tweepy.streaming import StreamListener from tweepy import Stream consumer_key = '9czpgrhLcCi6k3xzkkRrLXef4' consumer_secret = '0wIhwcUnUyQWPScb5ndhdHBetXyu89ygVq0v33b9ffkbaVpP1U' acc...
{"/mat.py": ["/matplotlib.py"]}
21,362
meenasirisha145/python18
refs/heads/master
/var.py
# -*- coding: utf-8 -*- """ Created on Tue Jan 16 11:01:27 2018 by Meena Sirisha """ x=5 x y=8 y z=8 z import os import sys os.path.dirname(sys.executable) import keyword print(keyword.kwlist) a=b=c=1 a b c a,b,c=1,2,"tom" a b c a;b;c print(a,b,c) for i in range(4): print(i) print(i+2) for j in range(...
{"/mat.py": ["/matplotlib.py"]}
21,363
meenasirisha145/python18
refs/heads/master
/matplotlib.py
# -*- coding: utf-8 -*- """ Created on Fri Feb 9 14:55:52 2018 by Meena Sirisha """ #importong matplotlib import matplotlib as mpl import matplotlib.pyplot as plt #this is used most often #aesthetics style like aes in ggplot plt.style.use('classic') #%%plots #plotting from script import matplotlib.pyplot as plt imp...
{"/mat.py": ["/matplotlib.py"]}
21,364
meenasirisha145/python18
refs/heads/master
/mat.py
# -*- coding: utf-8 -*- """ Created on Fri Feb 9 15:50:03 2018 @author: Meena """ import matplotlib as mpl import numpy as np
{"/mat.py": ["/matplotlib.py"]}
21,365
meenasirisha145/python18
refs/heads/master
/untitled0.py
# -*- coding: utf-8 -*- """ Created on Thu Mar 15 14:29:00 2018 by Meena Sirisha""" a=list(range(1,101)) a import random a=random.sample(range(1,101),100) print(a) print(min(a)) print(max(a)) b=sorted(a) print(b) len(b) b[round(len(b)/2)] len(b)%2==0 round((len(b)/2)-1) (b[round((len(b)/2)-1)]+b[round(len(b)/2)])/2 ...
{"/mat.py": ["/matplotlib.py"]}
21,366
meenasirisha145/python18
refs/heads/master
/py2.py
# -*- coding: utf-8 -*- """ Created on Thu Mar 22 10:49:20 2018 by Meena Sirisha"""
{"/mat.py": ["/matplotlib.py"]}
21,367
meenasirisha145/python18
refs/heads/master
/np1/numpy1.py
# -*- coding: utf-8 -*- """ Created on Wed Jan 31 11:19:48 2018 by Meena Sirisha """ import numpy as np np.__version__ np.abs np.array([1,4,2,5,3]) l=[i for i in range(5)] l l np.full((3,5),3.14) x=np.arange(0,20,2) len(x) np.shape(x) np.linspace(0,1,5) np.random.random((3,3)) np.random.normal(0,1,(3,3)) np.random.r...
{"/mat.py": ["/matplotlib.py"]}
21,368
meenasirisha145/python18
refs/heads/master
/Assignment/asgn1.py
# -*- coding: utf-8 -*- """ Created on Sun Apr 1 18:58:50 2018 by Meena Sirisha""" import urllib.request import re url = "https://www.sec.gov/Archives/edgar/data/3662/0000889812-99-003241.txt" req = urllib.request.Request(url) resp = urllib.request.urlopen(req) respData = resp.read() respData theText = respData.dec...
{"/mat.py": ["/matplotlib.py"]}
21,369
meenasirisha145/python18
refs/heads/master
/charshift.py
# -*- coding: utf-8 -*- """ Created on Sat Feb 10 22:14:18 2018 @author: Meena """ strs = 'abcdefghijklmnopqrstuvwxyz' #use a string like this, instead of ord() def shifttext(): inp = input('Input string here: ') shift=int(input('input shift here: ')) cstring = [] for i in inp: ...
{"/mat.py": ["/matplotlib.py"]}
21,370
meenasirisha145/python18
refs/heads/master
/list1.py
# -*- coding: utf-8 -*- """ Created on Tue Jan 16 12:52:24 2018 by Meena Sirisha """ ##lists x=[1,2,3] x print(x) x=[1,8,5,6,8,4,5,6,4] x[0] len(x) sum(x) max(x) min(x) for i in range(len(x)): print(x[i],end=',') if 3 in x: print("yes") else: print("no") x.append(3) x sorted(x) x.index(5) #lists ...
{"/mat.py": ["/matplotlib.py"]}
21,371
meenasirisha145/python18
refs/heads/master
/pivot.py
# -*- coding: utf-8 -*- """ Created on Fri Feb 16 15:43:36 2018 by Meena Sirisha""" import numpy as np import pandas as pd rollnosL=[101,102,103,104,105,106,107,108,109,110,111] namesL=["meena","apoorva","kaustav","shubham","goldie","hitesh","shruti","vijay","lalit","achal","varun"] genderL=['F','F','M','M','M','M','F'...
{"/mat.py": ["/matplotlib.py"]}
21,372
meenasirisha145/python18
refs/heads/master
/np1/pandas2.py
# -*- coding: utf-8 -*- """ Created on Thu Feb 1 13:40:26 2018 by Meena Sirisha """ import pandas as pd from pandas import * s=Series([3,7,4,4,0.3],index=['a','b','c','d','e']) s df=DataFrame(np.arange(9).reshape(3,3),index=['b','a','c'],columns=['Paris','Berlin','madrid']) df df[:2] df[1:2] df[:2] df[df['Paris']>1] ...
{"/mat.py": ["/matplotlib.py"]}
21,373
meenasirisha145/python18
refs/heads/master
/list2.py
# -*- coding: utf-8 -*- """ Created on Wed Jan 31 10:22:49 2018 by Meena Sirisha """ l=[1,2,3] for i in range(len(l)): print(l[i],sep=" ",end=".") def square(a): """ This will square the value """ return(a**2) square(3) l.append(3) l %%timeit l = [] for n in range(1000): l.append(n**2)
{"/mat.py": ["/matplotlib.py"]}
21,374
meenasirisha145/python18
refs/heads/master
/crawlown.py
# -*- coding: utf-8 -*- """ Created on Sat Mar 31 10:20:37 2018 by Meena Sirisha""" import requests #used for calling url import csv from bs4 import BeautifulSoup #converts the text into structured form page=requests.get("https://www.fantasypros.com/nfl/reports/leaders/qb.php?year=2017") page soup = BeautifulSoup(pa...
{"/mat.py": ["/matplotlib.py"]}
21,375
meenasirisha145/python18
refs/heads/master
/BM1.py
import numpy as np import pandas as pd import csv import math from sklearn.ensemble import RandomForestRegressor from sklearn.metrics import mean_squared_error train = pd.read_csv('bigmarttrain.csv') train.isnull().sum() w = train.loc[train.Item_Weight.isnull(),'Item_Identifier'].unique() w w.shape list(w) for x in lis...
{"/mat.py": ["/matplotlib.py"]}
21,376
meenasirisha145/python18
refs/heads/master
/pivot1.py
# -*- coding: utf-8 -*- """ Created on Mon Feb 19 12:40:36 2018 by Meena Sirisha""" import numpy as np import pandas as pd data=pd.read_csv("F:\pywork\pyWork\pyProjects\mspython18/student.csv",header=0) data data.head() data.columns data.dtypes data.select_dtypes(['object'])#only string data['rollno'].dtype del data['...
{"/mat.py": ["/matplotlib.py"]}
21,377
meenasirisha145/python18
refs/heads/master
/Assignment/asgn.py
# -*- coding: utf-8 -*- """ Created on Sun Apr 1 10:22:54 2018 by Meena Sirisha""" import numpy as np import pandas as pd import math import requests #used for calling url import csv from bs4 import BeautifulSoup #converts the text into structured form data=pd.read_csv('F:\pywork\pyWork\pyProjects\pythonbasic\Assign...
{"/mat.py": ["/matplotlib.py"]}
21,378
meenasirisha145/python18
refs/heads/master
/plot.py
# -*- coding: utf-8 -*- """ Created on Mon Mar 12 14:54:37 2018 by Meena Sirisha""" x1=[1,2,3] y1=[2,4,1] x2=[2,5,6,7,8] y2=[5,4,8,6,1] import matplotlib.pyplot as plt plt.plot(x1,y1,label="line1") plt.plot(x2,y2,label="line2") plt.xlabel("X axis") plt.ylabel("Y axis") plt.show() x1,y1 tick_label=["one","two","three"...
{"/mat.py": ["/matplotlib.py"]}
21,379
meenasirisha145/python18
refs/heads/master
/np.py
# -*- coding: utf-8 -*- """ Created on Tue Jan 16 10:51:20 2018 @author: Meena """ import numpy as np
{"/mat.py": ["/matplotlib.py"]}
21,380
meenasirisha145/python18
refs/heads/master
/groupby.py
# -*- coding: utf-8 -*- """ Created on Mon Feb 19 11:14:31 2018 by Meena Sirisha""" #%%Group by import numpy as np import pandas as pd #Marks rng=np.random.RandomState(42) marks=pd.Series(rng.randint(50,100,11)) marks marks.sum() marks.std() #Dictionary dict(x=1,y=4) #Groupwise df=pd.DataFrame({'A':rng.randint(1,...
{"/mat.py": ["/matplotlib.py"]}
21,381
meenasirisha145/python18
refs/heads/master
/myplot.py
# -*- coding: utf-8 -*- """ Created on Fri Feb 9 15:02:04 2018 by Meena Sirisha """ import matplotlib.pyplot as plt import numpy as np x=np.linspace(0,10,100) plt.plot(x,np.sin(x)) plt.plot(x,np.cos(x)) plt.show()
{"/mat.py": ["/matplotlib.py"]}
21,382
meenasirisha145/python18
refs/heads/master
/pybasic1.py
# -*- coding: utf-8 -*- """ Created on Thu Mar 15 15:02:27 2018 by Meena Sirisha""" import random a=random.sample(range(1,101),100) print(a) print(min(a)) print(max(a)) b=sorted(a) print(b) def median(l): if len(l)%2==0: print(l[round(len(l)/2)]) else: print((l[round((len(l)/2)-1)]+l[round(len...
{"/mat.py": ["/matplotlib.py"]}
21,383
meenasirisha145/python18
refs/heads/master
/asgn2.py
# -*- coding: utf-8 -*- """ Created on Sat Mar 17 12:39:36 2018 by Meena Sirisha""" import random from random import randint random.seed(123) random_list = [] for i in range(1,10): random_list.append(randint(1,10)) random_list range(len(random_list)) newlist=random_list[:] newlist num=input("enter a number:") for...
{"/mat.py": ["/matplotlib.py"]}
21,384
meenasirisha145/python18
refs/heads/master
/np1/pandas.py
# -*- coding: utf-8 -*- """ Created on Wed Jan 31 14:09:02 2018 by Meena Sirisha """ #####-----PANDAS-----######## import pandas as pd pd.__version__ import tensorflow as tf tf.__version__ data=pd.Series([0.25,0.5,0.75,1.0]) data data.values data[1] data=pd.Series([0.25,0.5,0.75,1.0],index=['a','b','c','d']) data[0] ...
{"/mat.py": ["/matplotlib.py"]}
21,385
meenasirisha145/python18
refs/heads/master
/bigmart/BM1.py
import numpy as np import pandas as pd import csv import math from sklearn.ensemble import RandomForestRegressor from sklearn.metrics import mean_squared_error train = pd.read_csv('train.csv') train.isnull().sum() w = train.loc[train.Item_Weight.isnull(),'Item_Identifier'] train.loc[train.Item_Weight.isnull(),'Item_Wei...
{"/mat.py": ["/matplotlib.py"]}
21,386
meenasirisha145/python18
refs/heads/master
/pandasdata.py
# -*- coding: utf-8 -*- """ Created on Tue Feb 13 15:08:17 2018 by Meena Sirisha""" #%% Data Creation---- import numpy as np rollnosL=[101,102,103,104,105,106,107,108,109,110,111] namesL=["meena","apoorva","kaustav","shubham","goldie","hitesh","shruti","vijay","lalit","achal","varun"] genderL=['F','F','M','M','M','M',...
{"/mat.py": ["/matplotlib.py"]}
21,387
meenasirisha145/python18
refs/heads/master
/Assignment/asgn2.py
# -*- coding: utf-8 -*- """ Created on Sun Apr 1 11:42:36 2018 by Meena Sirisha""" import requests #used for calling url import csv from bs4 import BeautifulSoup #converts the text into structured form page=requests.get("https://www.sec.gov/Archives/edgar/data/3662/0000889812-99-003241.txt") type(page) data=str(pag...
{"/mat.py": ["/matplotlib.py"]}
21,388
meenasirisha145/python18
refs/heads/master
/np1/numpy2.py
# -*- coding: utf-8 -*- """ Created on Thu Feb 1 11:17:59 2018 by Meena Sirisha """ import numpy as np from numpy import * a=np.array([[0,1,2,3],[10,11,12,13]]) a a.shape np.shape(a) #%%numpy arrays type(a) a.size size(a) a.ndim a1=array([[1,2,3],[4,5,6]],float) a1 a1.shape type(a1[0,0]) is type(a1[1,2]) a1.dtype a1...
{"/mat.py": ["/matplotlib.py"]}
21,392
oswaldoneto/trokeybe
refs/heads/master
/landing/models.py
from django.db import models class Registro(models.Model): nome = models.CharField(max_length=150) telefone = models.CharField(max_length=150) email = models.EmailField() class Anuncio(models.Model): VENDER = 'V' COMPRAR = 'C' TIPO = ( (VENDER, 'VENDER'), (COMPRAR, 'COMPRAR')...
{"/landing/admin.py": ["/landing/models.py"], "/landing/views.py": ["/landing/forms.py", "/landing/mailing.py", "/landing/models.py"]}
21,393
oswaldoneto/trokeybe
refs/heads/master
/landing/admin.py
from django.contrib import admin from landing.models import Registro, Anuncio class VendoAdmin(admin.TabularInline): model = Anuncio class RegistroAdmin(admin.ModelAdmin): list_display = ('nome', 'telefone', 'email',) inlines = [VendoAdmin, ] admin.site.register(Registro, RegistroAdmin)
{"/landing/admin.py": ["/landing/models.py"], "/landing/views.py": ["/landing/forms.py", "/landing/mailing.py", "/landing/models.py"]}
21,394
oswaldoneto/trokeybe
refs/heads/master
/landing/mailing.py
import sendgrid from sendgrid.helpers.mail.mail import Mail, Email, Personalization, Substitution, Content API_KEY = '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' def send_welcome(email, nome): def prepare_data(email, nome): mail = Mail() mail.set_from(Email('contato@t...
{"/landing/admin.py": ["/landing/models.py"], "/landing/views.py": ["/landing/forms.py", "/landing/mailing.py", "/landing/models.py"]}
21,395
oswaldoneto/trokeybe
refs/heads/master
/landing/views.py
from django.views.generic.base import TemplateView from django.views.generic.edit import FormView from landing import forms from landing.forms import RegistroForm from landing.mailing import send_welcome from landing.models import Registro, Anuncio class IndexView(TemplateView): template_name = 'index.html' ...
{"/landing/admin.py": ["/landing/models.py"], "/landing/views.py": ["/landing/forms.py", "/landing/mailing.py", "/landing/models.py"]}
21,396
oswaldoneto/trokeybe
refs/heads/master
/landing/migrations/0001_initial.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-05-11 02:18 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Crea...
{"/landing/admin.py": ["/landing/models.py"], "/landing/views.py": ["/landing/forms.py", "/landing/mailing.py", "/landing/models.py"]}
21,397
oswaldoneto/trokeybe
refs/heads/master
/landing/forms.py
from django import forms class RegistroForm(forms.Form): nome = forms.CharField(required=True) email = forms.CharField(required=False) telefone = forms.CharField(required=True) marca_vender = forms.CharField(required=False) modelo_vender = forms.CharField(required=False) ano_vender = forms.Ch...
{"/landing/admin.py": ["/landing/models.py"], "/landing/views.py": ["/landing/forms.py", "/landing/mailing.py", "/landing/models.py"]}
21,415
Circles24/watson
refs/heads/master
/watson/spider/admin.py
from django.contrib import admin from .models import Task, Page admin.site.register([Task, Page])
{"/watson/spider/admin.py": ["/watson/spider/models.py"], "/watson/spider/urls.py": ["/watson/spider/views.py"], "/watson/authentication/views.py": ["/watson/authentication/serializers.py"], "/watson/spider/crawl_engine.py": ["/watson/spider/models.py"], "/watson/spider/serializers.py": ["/watson/spider/models.py", "/w...
21,416
Circles24/watson
refs/heads/master
/watson/spider/urls.py
from django.urls import path from .views import get_task, post_task urlpatterns = [ path('post', post_task, name='post task'), path('get', get_task, name='get task') ]
{"/watson/spider/admin.py": ["/watson/spider/models.py"], "/watson/spider/urls.py": ["/watson/spider/views.py"], "/watson/authentication/views.py": ["/watson/authentication/serializers.py"], "/watson/spider/crawl_engine.py": ["/watson/spider/models.py"], "/watson/spider/serializers.py": ["/watson/spider/models.py", "/w...
21,417
Circles24/watson
refs/heads/master
/watson/authentication/views.py
from rest_framework.response import Response from rest_framework.decorators import api_view from .serializers import RegisterSerializer @api_view(['POST']) def register(request): try: serializer = RegisterSerializer(data=request.data) if serializer.is_valid(): serializer.save() ...
{"/watson/spider/admin.py": ["/watson/spider/models.py"], "/watson/spider/urls.py": ["/watson/spider/views.py"], "/watson/authentication/views.py": ["/watson/authentication/serializers.py"], "/watson/spider/crawl_engine.py": ["/watson/spider/models.py"], "/watson/spider/serializers.py": ["/watson/spider/models.py", "/w...
21,418
Circles24/watson
refs/heads/master
/watson/spider/migrations/0003_page_urls.py
# Generated by Django 3.1.4 on 2020-12-06 14:41 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('spider', '0002_task_freq_data'), ] operations = [ migrations.AddField( model_name='page', name='urls', f...
{"/watson/spider/admin.py": ["/watson/spider/models.py"], "/watson/spider/urls.py": ["/watson/spider/views.py"], "/watson/authentication/views.py": ["/watson/authentication/serializers.py"], "/watson/spider/crawl_engine.py": ["/watson/spider/models.py"], "/watson/spider/serializers.py": ["/watson/spider/models.py", "/w...
21,419
Circles24/watson
refs/heads/master
/watson/spider/crawl_engine.py
from .models import Task, Page from django.utils import timezone from django.conf import settings from queue import Queue from datetime import timedelta from bs4 import BeautifulSoup from bs4.element import Comment from celery import shared_task from .stop_words import stop_words import time import random import loggi...
{"/watson/spider/admin.py": ["/watson/spider/models.py"], "/watson/spider/urls.py": ["/watson/spider/views.py"], "/watson/authentication/views.py": ["/watson/authentication/serializers.py"], "/watson/spider/crawl_engine.py": ["/watson/spider/models.py"], "/watson/spider/serializers.py": ["/watson/spider/models.py", "/w...
21,420
Circles24/watson
refs/heads/master
/watson/spider/migrations/0001_initial.py
# Generated by Django 3.1.4 on 2020-12-05 18:21 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUT...
{"/watson/spider/admin.py": ["/watson/spider/models.py"], "/watson/spider/urls.py": ["/watson/spider/views.py"], "/watson/authentication/views.py": ["/watson/authentication/serializers.py"], "/watson/spider/crawl_engine.py": ["/watson/spider/models.py"], "/watson/spider/serializers.py": ["/watson/spider/models.py", "/w...
21,421
Circles24/watson
refs/heads/master
/watson/authentication/serializers.py
from rest_framework import serializers from django.contrib.auth.models import User class RegisterSerializer(serializers.Serializer): username = serializers.CharField() email = serializers.EmailField() password = serializers.CharField() def validate_username(self, username): if User.ob...
{"/watson/spider/admin.py": ["/watson/spider/models.py"], "/watson/spider/urls.py": ["/watson/spider/views.py"], "/watson/authentication/views.py": ["/watson/authentication/serializers.py"], "/watson/spider/crawl_engine.py": ["/watson/spider/models.py"], "/watson/spider/serializers.py": ["/watson/spider/models.py", "/w...
21,422
Circles24/watson
refs/heads/master
/watson/spider/serializers.py
from rest_framework import serializers from .models import Task from .crawl_engine import start_processing import requests def is_url_valid(url): try: res = requests.head(url) is_status_valid = res.status_code == 200 is_header_valid = False possible_headers = ['content-type', 'Conte...
{"/watson/spider/admin.py": ["/watson/spider/models.py"], "/watson/spider/urls.py": ["/watson/spider/views.py"], "/watson/authentication/views.py": ["/watson/authentication/serializers.py"], "/watson/spider/crawl_engine.py": ["/watson/spider/models.py"], "/watson/spider/serializers.py": ["/watson/spider/models.py", "/w...
21,423
Circles24/watson
refs/heads/master
/watson/authentication/urls.py
from django.urls import path from rest_framework_simplejwt.views import TokenObtainPairView from .views import register urlpatterns = [ path('login', TokenObtainPairView.as_view(), name='login'), path('register', register, name='register') ]
{"/watson/spider/admin.py": ["/watson/spider/models.py"], "/watson/spider/urls.py": ["/watson/spider/views.py"], "/watson/authentication/views.py": ["/watson/authentication/serializers.py"], "/watson/spider/crawl_engine.py": ["/watson/spider/models.py"], "/watson/spider/serializers.py": ["/watson/spider/models.py", "/w...
21,424
Circles24/watson
refs/heads/master
/watson/spider/migrations/0002_task_freq_data.py
# Generated by Django 3.1.4 on 2020-12-05 18:58 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('spider', '0001_initial'), ] operations = [ migrations.AddField( model_name='task', name='freq_data', fie...
{"/watson/spider/admin.py": ["/watson/spider/models.py"], "/watson/spider/urls.py": ["/watson/spider/views.py"], "/watson/authentication/views.py": ["/watson/authentication/serializers.py"], "/watson/spider/crawl_engine.py": ["/watson/spider/models.py"], "/watson/spider/serializers.py": ["/watson/spider/models.py", "/w...
21,425
Circles24/watson
refs/heads/master
/watson/spider/views.py
from rest_framework.decorators import api_view, permission_classes from rest_framework.response import Response from rest_framework.permissions import IsAuthenticated from .models import Task from .serializers import TaskSerializer, GetTaskSerializer @api_view(['POST']) @permission_classes([IsAuthenticated]) def post_...
{"/watson/spider/admin.py": ["/watson/spider/models.py"], "/watson/spider/urls.py": ["/watson/spider/views.py"], "/watson/authentication/views.py": ["/watson/authentication/serializers.py"], "/watson/spider/crawl_engine.py": ["/watson/spider/models.py"], "/watson/spider/serializers.py": ["/watson/spider/models.py", "/w...
21,426
Circles24/watson
refs/heads/master
/watson/spider/models.py
from django.db import models from django.utils import timezone from django.contrib.auth.models import User class Task(models.Model): user = models.ForeignKey(to=User, on_delete=models.CASCADE) url = models.CharField(max_length=200) level = models.IntegerField() status_choices = (('p', 'pending'), ('i',...
{"/watson/spider/admin.py": ["/watson/spider/models.py"], "/watson/spider/urls.py": ["/watson/spider/views.py"], "/watson/authentication/views.py": ["/watson/authentication/serializers.py"], "/watson/spider/crawl_engine.py": ["/watson/spider/models.py"], "/watson/spider/serializers.py": ["/watson/spider/models.py", "/w...
21,490
ericflo/awesomestream
refs/heads/master
/tests/test_utils.py
import unittest from awesomestream.utils import permutations class PermutationsTest(unittest.TestCase): def test_multiple_permutations(self): vals = [[1, 2, 3], [4, 5], [6, 7]] self.assertEqual( list(permutations(vals)), [ [1, 4, 6], [2, 4, 6...
{"/tests/test_utils.py": ["/awesomestream/utils.py"], "/examples/sqlite_server.py": ["/awesomestream/backends.py", "/awesomestream/jsonrpc.py"], "/tests/test_backend.py": ["/awesomestream/backends.py"], "/awesomestream/repl.py": ["/awesomestream/jsonrpc.py"], "/awesomestream/backends.py": ["/awesomestream/utils.py"], "...
21,491
ericflo/awesomestream
refs/heads/master
/awesomestream/jsonrpc.py
import sys import traceback from uuid import uuid1 from urlparse import urlparse from httplib import HTTPConnection from simplejson import dumps, loads from werkzeug import Request, Response from werkzeug.exceptions import HTTPException, NotFound, BadRequest def create_app(backend): @Request.application de...
{"/tests/test_utils.py": ["/awesomestream/utils.py"], "/examples/sqlite_server.py": ["/awesomestream/backends.py", "/awesomestream/jsonrpc.py"], "/tests/test_backend.py": ["/awesomestream/backends.py"], "/awesomestream/repl.py": ["/awesomestream/jsonrpc.py"], "/awesomestream/backends.py": ["/awesomestream/utils.py"], "...
21,492
ericflo/awesomestream
refs/heads/master
/examples/sqlite_server.py
import os import sys # Munge the path a bit to make this work from directly within the examples dir sys.path.insert(0, os.path.abspath(os.path.join(__file__, '..', '..'))) from awesomestream.backends import SQLBackend from awesomestream.jsonrpc import create_app, run_server if __name__ == '__main__': backend = S...
{"/tests/test_utils.py": ["/awesomestream/utils.py"], "/examples/sqlite_server.py": ["/awesomestream/backends.py", "/awesomestream/jsonrpc.py"], "/tests/test_backend.py": ["/awesomestream/backends.py"], "/awesomestream/repl.py": ["/awesomestream/jsonrpc.py"], "/awesomestream/backends.py": ["/awesomestream/utils.py"], "...
21,493
ericflo/awesomestream
refs/heads/master
/tests/test_backend.py
import unittest from awesomestream.backends import MemoryBackend class MemoryBackendTest(unittest.TestCase): def setUp(self): self.backend = MemoryBackend(keys=['kind', 'user', 'game']) def test_basic(self): items = [ {'kind': 'play', 'user': 1, 'game': 'bloons'}, ...
{"/tests/test_utils.py": ["/awesomestream/utils.py"], "/examples/sqlite_server.py": ["/awesomestream/backends.py", "/awesomestream/jsonrpc.py"], "/tests/test_backend.py": ["/awesomestream/backends.py"], "/awesomestream/repl.py": ["/awesomestream/jsonrpc.py"], "/awesomestream/backends.py": ["/awesomestream/utils.py"], "...
21,494
ericflo/awesomestream
refs/heads/master
/awesomestream/utils.py
import time import datetime def coerce_ts(value=None): ''' Given a variety of inputs, this function will return the proper timestamp (a float). If None or no value is given, then it will return the current timestamp. ''' if value is None: return time.time() if isinstance(value, int...
{"/tests/test_utils.py": ["/awesomestream/utils.py"], "/examples/sqlite_server.py": ["/awesomestream/backends.py", "/awesomestream/jsonrpc.py"], "/tests/test_backend.py": ["/awesomestream/backends.py"], "/awesomestream/repl.py": ["/awesomestream/jsonrpc.py"], "/awesomestream/backends.py": ["/awesomestream/utils.py"], "...
21,495
ericflo/awesomestream
refs/heads/master
/setup.py
from setuptools import setup, find_packages version = '0.1' LONG_DESCRIPTION = """ AwesomeStream ============= AwesomeStream is a set of tools for creating a "stream server". That is, a server which can store information about events that happen, and can query back those events in reverse-chronological order, slice...
{"/tests/test_utils.py": ["/awesomestream/utils.py"], "/examples/sqlite_server.py": ["/awesomestream/backends.py", "/awesomestream/jsonrpc.py"], "/tests/test_backend.py": ["/awesomestream/backends.py"], "/awesomestream/repl.py": ["/awesomestream/jsonrpc.py"], "/awesomestream/backends.py": ["/awesomestream/utils.py"], "...