index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
66,141
pawan7697/django
refs/heads/main
/products/migrations/0003_auto_20210615_1842.py
# Generated by Django 3.2.3 on 2021-06-15 18:42 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('products', '0002_auto_20210614_1848'), ] operations = [ migrations.AddField( model_name='products', name='product_im...
{"/subcategory/views.py": ["/subcategory/models.py"], "/supercategory/views.py": ["/supercategory/models.py"], "/products/views.py": ["/subcategory/models.py", "/supercategory/models.py", "/products/models.py", "/products/forms.py"], "/products/forms.py": ["/products/models.py"], "/supercategory/models.py": ["/subcateg...
66,142
pawan7697/django
refs/heads/main
/subcategory/views.py
from django.shortcuts import render,redirect # Create your views here. from django.http import HttpResponse from .models import category,subcategory #from django.contrib.auth.models import User # Create your views here. def addSubcategory(request): catdata = category.objects.all() return render(request,'admi...
{"/subcategory/views.py": ["/subcategory/models.py"], "/supercategory/views.py": ["/supercategory/models.py"], "/products/views.py": ["/subcategory/models.py", "/supercategory/models.py", "/products/models.py", "/products/forms.py"], "/products/forms.py": ["/products/models.py"], "/supercategory/models.py": ["/subcateg...
66,143
pawan7697/django
refs/heads/main
/products/migrations/0001_initial.py
# Generated by Django 3.2.3 on 2021-06-13 14:42 import django.contrib.postgres.fields from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='products', fields=[ ...
{"/subcategory/views.py": ["/subcategory/models.py"], "/supercategory/views.py": ["/supercategory/models.py"], "/products/views.py": ["/subcategory/models.py", "/supercategory/models.py", "/products/models.py", "/products/forms.py"], "/products/forms.py": ["/products/models.py"], "/supercategory/models.py": ["/subcateg...
66,144
pawan7697/django
refs/heads/main
/supercategory/views.py
from django.shortcuts import render,redirect from django.http import HttpResponse from .models import category,subcategory,Supercategory # Create your views here. def addSupercateory(request): categorys = category.objects.all() subcategorys = subcategory.objects.all() return render(request,'admin/addSupercateory....
{"/subcategory/views.py": ["/subcategory/models.py"], "/supercategory/views.py": ["/supercategory/models.py"], "/products/views.py": ["/subcategory/models.py", "/supercategory/models.py", "/products/models.py", "/products/forms.py"], "/products/forms.py": ["/products/models.py"], "/supercategory/models.py": ["/subcateg...
66,145
pawan7697/django
refs/heads/main
/products/views.py
from django.shortcuts import render from django.http import HttpResponse from category.models import category from subcategory.models import subcategory from supercategory.models import Supercategory from .models import products #from .models import UploadFileForm from .forms import ImageForm # Create your views here...
{"/subcategory/views.py": ["/subcategory/models.py"], "/supercategory/views.py": ["/supercategory/models.py"], "/products/views.py": ["/subcategory/models.py", "/supercategory/models.py", "/products/models.py", "/products/forms.py"], "/products/forms.py": ["/products/models.py"], "/supercategory/models.py": ["/subcateg...
66,146
pawan7697/django
refs/heads/main
/products/forms.py
from django import forms from .models import products class ImageForm(forms.ModelForm): class Meta: model= products fields= ["product_img_nameS", "product_Smallimg"]
{"/subcategory/views.py": ["/subcategory/models.py"], "/supercategory/views.py": ["/supercategory/models.py"], "/products/views.py": ["/subcategory/models.py", "/supercategory/models.py", "/products/models.py", "/products/forms.py"], "/products/forms.py": ["/products/models.py"], "/supercategory/models.py": ["/subcateg...
66,147
pawan7697/django
refs/heads/main
/products/models.py
from django.db import models from django.conf import settings from django.contrib.postgres.fields import ArrayField # Create your models here. class products(models.Model): category_name = ArrayField(models.CharField(max_length=100), blank=True) subcategory_name = ArrayField(models.CharField(max_length=100), blank=...
{"/subcategory/views.py": ["/subcategory/models.py"], "/supercategory/views.py": ["/supercategory/models.py"], "/products/views.py": ["/subcategory/models.py", "/supercategory/models.py", "/products/models.py", "/products/forms.py"], "/products/forms.py": ["/products/models.py"], "/supercategory/models.py": ["/subcateg...
66,148
pawan7697/django
refs/heads/main
/subcategory/urls.py
from django.urls import path from .import views urlpatterns = [ path('addSubcategory/', views.addSubcategory, name='addSubcategory'), path('submitSubcategory/', views.submitSubcategory, name='submitSubcategory'), path('subcategoryView/', views.subcategoryView, name='subcategoryView'), path('subcategory...
{"/subcategory/views.py": ["/subcategory/models.py"], "/supercategory/views.py": ["/supercategory/models.py"], "/products/views.py": ["/subcategory/models.py", "/supercategory/models.py", "/products/models.py", "/products/forms.py"], "/products/forms.py": ["/products/models.py"], "/supercategory/models.py": ["/subcateg...
66,149
pawan7697/django
refs/heads/main
/subcategory/models.py
from django.db import models from django.conf import settings from category.models import category # Create your models here. class subcategory(models.Model): category_name = models.ForeignKey(category, on_delete=models.CASCADE) subcategory_name = models.CharField(max_length=50, blank=True) status = models.IntegerF...
{"/subcategory/views.py": ["/subcategory/models.py"], "/supercategory/views.py": ["/supercategory/models.py"], "/products/views.py": ["/subcategory/models.py", "/supercategory/models.py", "/products/models.py", "/products/forms.py"], "/products/forms.py": ["/products/models.py"], "/supercategory/models.py": ["/subcateg...
66,150
pawan7697/django
refs/heads/main
/products/migrations/0004_alter_products_product_smallimg.py
# Generated by Django 3.2.3 on 2021-06-16 18:46 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('products', '0003_auto_20210615_1842'), ] operations = [ migrations.AlterField( model_name='products', name='product_...
{"/subcategory/views.py": ["/subcategory/models.py"], "/supercategory/views.py": ["/supercategory/models.py"], "/products/views.py": ["/subcategory/models.py", "/supercategory/models.py", "/products/models.py", "/products/forms.py"], "/products/forms.py": ["/products/models.py"], "/supercategory/models.py": ["/subcateg...
66,151
pawan7697/django
refs/heads/main
/products/urls.py
from django.urls import path from .import views urlpatterns = [ path('addproducts/', views.addproducts, name='addproducts'), path('productSubmit/', views.productSubmit, name='productSubmit'), ]
{"/subcategory/views.py": ["/subcategory/models.py"], "/supercategory/views.py": ["/supercategory/models.py"], "/products/views.py": ["/subcategory/models.py", "/supercategory/models.py", "/products/models.py", "/products/forms.py"], "/products/forms.py": ["/products/models.py"], "/supercategory/models.py": ["/subcateg...
66,152
pawan7697/django
refs/heads/main
/category/views.py
from django.shortcuts import render,redirect from django.http import HttpResponse from .models import category # Create your views here. def categorys(request): context = {} return render(request,'admin/category.html', context) # return HttpResponse('g') def submitcategory(request): if request.metho...
{"/subcategory/views.py": ["/subcategory/models.py"], "/supercategory/views.py": ["/supercategory/models.py"], "/products/views.py": ["/subcategory/models.py", "/supercategory/models.py", "/products/models.py", "/products/forms.py"], "/products/forms.py": ["/products/models.py"], "/supercategory/models.py": ["/subcateg...
66,153
pawan7697/django
refs/heads/main
/products/migrations/0002_auto_20210614_1848.py
# Generated by Django 3.2.3 on 2021-06-14 18:48 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('products', '0001_initial'), ] operations = [ migrations.AlterField( model_name='products', name='product_Bigimg', ...
{"/subcategory/views.py": ["/subcategory/models.py"], "/supercategory/views.py": ["/supercategory/models.py"], "/products/views.py": ["/subcategory/models.py", "/supercategory/models.py", "/products/models.py", "/products/forms.py"], "/products/forms.py": ["/products/models.py"], "/supercategory/models.py": ["/subcateg...
66,154
pawan7697/django
refs/heads/main
/supercategory/migrations/0002_auto_20210612_1907.py
# Generated by Django 3.2.3 on 2021-06-12 19:07 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('subcategory', '0001_initial'), ('supercategory', '0001_initial'), ] operations = [ migrations.AddFi...
{"/subcategory/views.py": ["/subcategory/models.py"], "/supercategory/views.py": ["/supercategory/models.py"], "/products/views.py": ["/subcategory/models.py", "/supercategory/models.py", "/products/models.py", "/products/forms.py"], "/products/forms.py": ["/products/models.py"], "/supercategory/models.py": ["/subcateg...
66,155
pawan7697/django
refs/heads/main
/category/urls.py
from django.urls import path from .import views urlpatterns = [ path('categorys/', views.categorys, name='categorys'), path('submitcategory/', views.submitcategory, name='submitcategory'), path('categoryView/', views.categoryView, name='categoryView'), path('categoryEdit/<int:ids>', views.categoryEdit,...
{"/subcategory/views.py": ["/subcategory/models.py"], "/supercategory/views.py": ["/supercategory/models.py"], "/products/views.py": ["/subcategory/models.py", "/supercategory/models.py", "/products/models.py", "/products/forms.py"], "/products/forms.py": ["/products/models.py"], "/supercategory/models.py": ["/subcateg...
66,156
pawan7697/django
refs/heads/main
/dashbord/apps.py
from django.apps import AppConfig class DashbordConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'dashbord'
{"/subcategory/views.py": ["/subcategory/models.py"], "/supercategory/views.py": ["/supercategory/models.py"], "/products/views.py": ["/subcategory/models.py", "/supercategory/models.py", "/products/models.py", "/products/forms.py"], "/products/forms.py": ["/products/models.py"], "/supercategory/models.py": ["/subcateg...
66,157
pawan7697/django
refs/heads/main
/supercategory/models.py
from django.db import models from django.conf import settings from category.models import category from subcategory.models import subcategory # Create your models here. class Supercategory(models.Model): category_name = models.ForeignKey(category, on_delete=models.CASCADE) subcategory_name = models.ForeignKey(subcat...
{"/subcategory/views.py": ["/subcategory/models.py"], "/supercategory/views.py": ["/supercategory/models.py"], "/products/views.py": ["/subcategory/models.py", "/supercategory/models.py", "/products/models.py", "/products/forms.py"], "/products/forms.py": ["/products/models.py"], "/supercategory/models.py": ["/subcateg...
66,158
pawan7697/django
refs/heads/main
/subcategory/admin.py
from django.contrib import admin from .models import subcategory class SubCategoryAdmin(admin.ModelAdmin): list_display=('category_name','subcategory_name','status') # Register your models here. admin.site.register(subcategory,SubCategoryAdmin)
{"/subcategory/views.py": ["/subcategory/models.py"], "/supercategory/views.py": ["/supercategory/models.py"], "/products/views.py": ["/subcategory/models.py", "/supercategory/models.py", "/products/models.py", "/products/forms.py"], "/products/forms.py": ["/products/models.py"], "/supercategory/models.py": ["/subcateg...
66,159
pawan7697/django
refs/heads/main
/dashbord/views.py
from django.shortcuts import render from django.http import HttpResponse # Create your views here. def dashbord(request): #text={} return render(request,'admin/index.html')
{"/subcategory/views.py": ["/subcategory/models.py"], "/supercategory/views.py": ["/supercategory/models.py"], "/products/views.py": ["/subcategory/models.py", "/supercategory/models.py", "/products/models.py", "/products/forms.py"], "/products/forms.py": ["/products/models.py"], "/supercategory/models.py": ["/subcateg...
66,161
goryfigment/inventory
refs/heads/master
/inventory/models.py
from django.db import models from django.contrib.auth.models import AbstractBaseUser from django_mysql.models import JSONField import time def get_utc_epoch_time(): return int(round(time.time())) def default_link_columns(): return {"quantity": False, "price": False, "cost": False, 'name': False} def defau...
{"/inventory/controllers/transaction.py": ["/inventory/modules/base.py", "/inventory/models.py"], "/inventory/controllers/store.py": ["/inventory/models.py", "/inventory/modules/base.py"]}
66,162
goryfigment/inventory
refs/heads/master
/inventory/urls.py
"""inventory URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
{"/inventory/controllers/transaction.py": ["/inventory/modules/base.py", "/inventory/models.py"], "/inventory/controllers/store.py": ["/inventory/models.py", "/inventory/modules/base.py"]}
66,163
goryfigment/inventory
refs/heads/master
/inventory/modules/base.py
import json, math, bcrypt, re, time from django.conf import settings from django.http import HttpResponse from django.core import serializers from django.http import HttpResponseBadRequest from inventory.models import Transaction, Store, ItemLog def get_base_url(): return settings.BASE_URL def render_json(data)...
{"/inventory/controllers/transaction.py": ["/inventory/modules/base.py", "/inventory/models.py"], "/inventory/controllers/store.py": ["/inventory/models.py", "/inventory/modules/base.py"]}
66,164
goryfigment/inventory
refs/heads/master
/inventory/controllers/site.py
import time import json from django.shortcuts import render from django.http import HttpResponseRedirect from django.forms.models import model_to_dict from base import get_base_url from inventory.modules.base import get_boss, models_to_dict, epoch_strftime from inventory.models import User, Transaction, ItemLog, Employ...
{"/inventory/controllers/transaction.py": ["/inventory/modules/base.py", "/inventory/models.py"], "/inventory/controllers/store.py": ["/inventory/models.py", "/inventory/modules/base.py"]}
66,165
goryfigment/inventory
refs/heads/master
/inventory/controllers/transaction.py
import re from django.http import HttpResponse, JsonResponse, HttpResponseBadRequest from django.forms.models import model_to_dict from inventory.modules.base import decimal_format, get_boss, epoch_strftime, models_to_dict from inventory.models import Store, Transaction from inventory.decorators import login_required, ...
{"/inventory/controllers/transaction.py": ["/inventory/modules/base.py", "/inventory/models.py"], "/inventory/controllers/store.py": ["/inventory/models.py", "/inventory/modules/base.py"]}
66,166
goryfigment/inventory
refs/heads/master
/inventory/controllers/account_handler.py
import json import re import uuid import time import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from django.http import HttpResponseRedirect, HttpResponseBadRequest, JsonResponse from django.contrib.auth import authenticate, login, logout from inventory.settings_secre...
{"/inventory/controllers/transaction.py": ["/inventory/modules/base.py", "/inventory/models.py"], "/inventory/controllers/store.py": ["/inventory/models.py", "/inventory/modules/base.py"]}
66,167
goryfigment/inventory
refs/heads/master
/inventory/controllers/store.py
from django.forms.models import model_to_dict from django.http import JsonResponse, HttpResponseBadRequest from inventory.models import Store from inventory.decorators import login_required, user_permission, data_required from inventory.modules.base import get_boss @login_required @user_permission('boss_only') @data_...
{"/inventory/controllers/transaction.py": ["/inventory/modules/base.py", "/inventory/models.py"], "/inventory/controllers/store.py": ["/inventory/models.py", "/inventory/modules/base.py"]}
66,205
david-a-wheeler/hello
refs/heads/master
/test_hello_unittest.py
#!/usr/bin/python3 import unittest, io, contextlib, os import hello class TestHello(unittest.TestCase): """Test our program""" def test_output(self): """Ensure program produces correct output""" f = io.StringIO() # Create pseudo-file where output will be sent with contextlib.redirect_...
{"/test_hello_unittest.py": ["/hello.py"]}
66,206
david-a-wheeler/hello
refs/heads/master
/hello.py
#!/usr/bin/python3 """This is a trivial module to say 'Hello, world!'""" def print_hello(): """Say 'Hello, world!'""" print("Hello, world!") if __name__ == "__main__": print_hello()
{"/test_hello_unittest.py": ["/hello.py"]}
66,207
JamesSibbit/k-means
refs/heads/master
/k_means.py
from sklearn.cluster import KMeans def k_means_clustering(data): #Now carry out k-means clustering k_mean = KMeans(n_clusters = 2) return k_mean.fit(data)
{"/test.py": ["/k_means.py"]}
66,208
JamesSibbit/k-means
refs/heads/master
/test.py
from k_means import k_means_clustering import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.cluster import KMeans from scipy.stats import norm #Create some random data using normal dist and plot to see seperation mu_one = float(input("Enter mean for first normal cluster: ")) mu_two = fl...
{"/test.py": ["/k_means.py"]}
66,211
daramg-suminlee/multitask-learning-pytorch
refs/heads/main
/utils/losses.py
import torch.nn as nn import torch.nn.functional as F class MultiTaskLoss(nn.Module): def __init__(self): super(MultiTaskLoss, self).__init__() def forward(self, yhat_list: list, y_list: list): loss = 0 for yhat, y in zip(yhat_list, y_list): loss += F.mse_loss(yhat, y.view...
{"/model/shared_bottem.py": ["/model/mlp.py"], "/model/__init__.py": ["/model/mlp.py", "/model/shared_bottem.py", "/model/cgc.py"], "/model/cgc.py": ["/model/mlp.py"]}
66,212
daramg-suminlee/multitask-learning-pytorch
refs/heads/main
/model/shared_bottem.py
import torch.nn as nn from model.mlp import SingleLayerPerception as SLP from model.mlp import MultiLayerPerceptron as MLP class SharedBottom(nn.Module): def __init__( self, input_size: int, shared_size: int, tower_size: int, num_tasks: int ): super(SharedBotto...
{"/model/shared_bottem.py": ["/model/mlp.py"], "/model/__init__.py": ["/model/mlp.py", "/model/shared_bottem.py", "/model/cgc.py"], "/model/cgc.py": ["/model/mlp.py"]}
66,213
daramg-suminlee/multitask-learning-pytorch
refs/heads/main
/model/__init__.py
from model.mlp import SingleLayerPerception as SLP from model.mlp import MultiLayerPerceptron as MLP from model.omoe import OnegateMixtureOfExperts as OMOE from model.mmoe import MultigateMixtureOfExperts as MMOE from model.shared_bottem import SharedBottom from model.cgc import CustomizedGateControl as CGC
{"/model/shared_bottem.py": ["/model/mlp.py"], "/model/__init__.py": ["/model/mlp.py", "/model/shared_bottem.py", "/model/cgc.py"], "/model/cgc.py": ["/model/mlp.py"]}
66,214
daramg-suminlee/multitask-learning-pytorch
refs/heads/main
/model/mlp.py
import torch.nn as nn class SingleLayerPerception(nn.Module): def __init__(self, input_size: int, output_size: int): super(SingleLayerPerception, self).__init__() self.layer = nn.Sequential( nn.Linear(input_size, output_size), nn.LogSoftmax(1) ) def forward...
{"/model/shared_bottem.py": ["/model/mlp.py"], "/model/__init__.py": ["/model/mlp.py", "/model/shared_bottem.py", "/model/cgc.py"], "/model/cgc.py": ["/model/mlp.py"]}
66,215
daramg-suminlee/multitask-learning-pytorch
refs/heads/main
/model/cgc.py
import torch import torch.nn as nn from model.mlp import SingleLayerPerception as SLP from model.mlp import MultiLayerPerceptron as MLP class CustomizedGateControl(nn.Module): def __init__( self, input_size: int, expert_size: int, tower_size: int, num_tasks: int, nu...
{"/model/shared_bottem.py": ["/model/mlp.py"], "/model/__init__.py": ["/model/mlp.py", "/model/shared_bottem.py", "/model/cgc.py"], "/model/cgc.py": ["/model/mlp.py"]}
66,216
daramg-suminlee/multitask-learning-pytorch
refs/heads/main
/data/synthetic_data.py
import numpy as np import torch from torch.utils.data import Dataset class SyntheticDataset(Dataset): def __init__(self, num_data, feature_dim, task_corr=0.9, scale=0.5, sin_param=10, seed=1): self.num_data = num_data self.feature_dim = feature_dim self.task_corr = task_corr torch....
{"/model/shared_bottem.py": ["/model/mlp.py"], "/model/__init__.py": ["/model/mlp.py", "/model/shared_bottem.py", "/model/cgc.py"], "/model/cgc.py": ["/model/mlp.py"]}
66,261
webenable-ie/soicrm
refs/heads/master
/configtables/migrations/0001_initial.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-11-04 12:51 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='ClubTy...
{"/clubs/urls.py": ["/clubs/views.py"], "/clubs/views.py": ["/clubs/models.py"], "/clubs/models.py": ["/configtables/models.py"]}
66,262
webenable-ie/soicrm
refs/heads/master
/clubs/migrations/0003_club_region.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-11-04 19:05 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('configtables', '0001_initial'), ('clubs', '0002_aut...
{"/clubs/urls.py": ["/clubs/views.py"], "/clubs/views.py": ["/clubs/models.py"], "/clubs/models.py": ["/configtables/models.py"]}
66,263
webenable-ie/soicrm
refs/heads/master
/clubs/urls.py
from django.conf.urls import url from .views import ClubListView, ClubDetailsView urlpatterns=[ url(r'^$', ClubListView.as_view(), name="club_list"), url(r'^(?P<slug>[-\w]+)/$', ClubDetailsView.as_view(), name="club_details") ]
{"/clubs/urls.py": ["/clubs/views.py"], "/clubs/views.py": ["/clubs/models.py"], "/clubs/models.py": ["/configtables/models.py"]}
66,264
webenable-ie/soicrm
refs/heads/master
/clubs/views.py
from django.shortcuts import render from django.views.generic import ListView, DetailView from .models import Club # Create your views here. class ClubListView(ListView): def get_queryset(self): return Club.objects.all() class ClubDetailsView(DetailView): model = Club def get_context_data(se...
{"/clubs/urls.py": ["/clubs/views.py"], "/clubs/views.py": ["/clubs/models.py"], "/clubs/models.py": ["/configtables/models.py"]}
66,265
webenable-ie/soicrm
refs/heads/master
/clubs/models.py
from django.db import models from django.utils.text import slugify from django.db.models.signals import pre_save from configtables.models import Region # Create your models here. class Club(models.Model): name = models.CharField(max_length=250) slug = models.SlugField(null=True, blank=True) region = mode...
{"/clubs/urls.py": ["/clubs/views.py"], "/clubs/views.py": ["/clubs/models.py"], "/clubs/models.py": ["/configtables/models.py"]}
66,266
webenable-ie/soicrm
refs/heads/master
/configtables/models.py
from django.db import models # Create your models here. class Sport(models.Model): sport = models.CharField(max_length=100) class Region(models.Model): region = models.CharField(max_length=250) class ClubType(models.Model): club_type = models.CharField(max_length=100)
{"/clubs/urls.py": ["/clubs/views.py"], "/clubs/views.py": ["/clubs/models.py"], "/clubs/models.py": ["/configtables/models.py"]}
66,271
jhammarstedt/chatbot
refs/heads/master
/app.py
from flask import Flask,request import random from pymessenger.bot import Bot import json from brain import Dialog with open('tokens.json') as f: data = json.load(f) app = Flask(__name__) ACCESS_TOKEN =data['tokens'][0]['Access'] VERIFY_TOKEN = data['tokens'][0]['Verify'] bot = Bot(ACCESS_TOKEN)...
{"/app.py": ["/brain.py"], "/main.py": ["/brain.py", "/app.py"]}
66,272
jhammarstedt/chatbot
refs/heads/master
/brain.py
# Here is where the NLP magic will happen! import json import tmdbsimple as tm def start_api(): with open('tokens.json') as f: data = json.load(f) api = data['tokens'][0]['TMDB'] tm.API_KEY = api def get_data(): """The basic language logic for now will just be to map keywords"...
{"/app.py": ["/brain.py"], "/main.py": ["/brain.py", "/app.py"]}
66,273
jhammarstedt/chatbot
refs/heads/master
/main.py
import brain if __name__ == '__main__': brain.start_api() from app import *
{"/app.py": ["/brain.py"], "/main.py": ["/brain.py", "/app.py"]}
66,292
TongMoNumb/DeepRL
refs/heads/master
/deep_rl/crossEntropy.py
####################################################################### # Copyright (C) kgmills@ualberta.ca, June 2019 # # Keith G. Mills, Dept. Electrical and Computer Engineering, Ualberta # # Permission to modify so long as you keep this declaration # ################################...
{"/deep_rl/utils/misc.py": ["/deep_rl/crossEntropy.py"]}
66,293
TongMoNumb/DeepRL
refs/heads/master
/examples.py
####################################################################### # Copyright (C) 2017 Shangtong Zhang(zhangshangtong.cpp@gmail.com) # # Permission given to modify the code as long as you keep this # # declaration at the top # ################################...
{"/deep_rl/utils/misc.py": ["/deep_rl/crossEntropy.py"]}
66,294
TongMoNumb/DeepRL
refs/heads/master
/deep_rl/agent/DDPG_agent.py
####################################################################### # Copyright (C) 2017 Shangtong Zhang(zhangshangtong.cpp@gmail.com) # # Permission given to modify the code as long as you keep this # # declaration at the top # ################################...
{"/deep_rl/utils/misc.py": ["/deep_rl/crossEntropy.py"]}
66,295
TongMoNumb/DeepRL
refs/heads/master
/deep_rl/utils/misc.py
####################################################################### # Copyright (C) 2017 Shangtong Zhang(zhangshangtong.cpp@gmail.com) # # Permission given to modify the code as long as you keep this # # declaration at the top # ################################...
{"/deep_rl/utils/misc.py": ["/deep_rl/crossEntropy.py"]}
66,296
FransValentino/ProyekAkhir_AI
refs/heads/main
/Main.py
from Jalur import Jalur depature = input("Keberangkatan: ") destination = input("Tujuan : ") departure = depature.lower() destination = destination.lower() dept = "".join(departure.split()) dest = "".join(destination.split())
{"/Main.py": ["/Jalur.py"]}
66,297
FransValentino/ProyekAkhir_AI
refs/heads/main
/Jalur.py
Mangkubumi1 = ("tugu", "pantiwilosoprojo", "hotelarjuna" ) Mangkubumi2 = ("klinikmediksa", "bcapusat", "gkiwongsodirjan") Malioboro = ("grandina", "malioboromall", "bappeda", "smpn3", "ramaimall", "malioboro") Sudirman1 = ("uiversitaskristendutawacana", "klitren", "bethesda", "galeria",'ukdw') Sudirman2 = ("ojk", "...
{"/Main.py": ["/Jalur.py"]}
66,298
xhiggs/BacterialGenomesAligner
refs/heads/main
/src/align/suffix_tree/hash/sliding_framer.py
from src.utils.global_settings import GlobalSettings as Settings class SlidingHashFramer: class HashFrame: def __init__(self, initial_subsequence: str): if len(initial_subsequence) == Settings.CHUNK_LEN: self.value = sum( [self.__nucleo_to_num(initial_subseq...
{"/src/align/suffix_tree/hash/sliding_framer.py": ["/src/utils/global_settings.py"], "/src/representation.py": ["/src/utils/global_settings.py", "/src/affinity_structure/bacterial.py"], "/src/align/approximate.py": ["/src/align/suffix_tree/query.py", "/src/utils/fasta.py", "/src/align/suffix_tree/hash/sliding_framer.py...
66,299
xhiggs/BacterialGenomesAligner
refs/heads/main
/src/representation.py
from src.utils.global_settings import GlobalSettings from src.affinity_structure.bacterial import BacterialAffinityStructure GlobalSettings.init(tree_depth=9, segment_min_size=int(2.5e3)) affinity_structure = BacterialAffinityStructure('grouptest') for _ in range(2): affinity_structure.handle_next_genome()
{"/src/align/suffix_tree/hash/sliding_framer.py": ["/src/utils/global_settings.py"], "/src/representation.py": ["/src/utils/global_settings.py", "/src/affinity_structure/bacterial.py"], "/src/align/approximate.py": ["/src/align/suffix_tree/query.py", "/src/utils/fasta.py", "/src/align/suffix_tree/hash/sliding_framer.py...
66,300
xhiggs/BacterialGenomesAligner
refs/heads/main
/src/align/approximate.py
from src.align.suffix_tree.query import QuerySuffixTree from src.utils.fasta import FastaContent from src.align.suffix_tree.hash.sliding_framer import SlidingHashFramer as HashFramer from src.utils.global_settings import GlobalSettings as Settings class ApproximateAlign: def __init__(self, target: FastaContent.Fa...
{"/src/align/suffix_tree/hash/sliding_framer.py": ["/src/utils/global_settings.py"], "/src/representation.py": ["/src/utils/global_settings.py", "/src/affinity_structure/bacterial.py"], "/src/align/approximate.py": ["/src/align/suffix_tree/query.py", "/src/utils/fasta.py", "/src/align/suffix_tree/hash/sliding_framer.py...
66,301
xhiggs/BacterialGenomesAligner
refs/heads/main
/src/utils/global_settings.py
class GlobalSettings: CHUNK_LEN = None TREE_DEPTH = None MIN_CONSIDERING_SEGMENT_LEN = None SEGMENT_MIN_SIZE = None SEGMENTS_JOIN_SIZE = None DOT_SKIP_RATE = 1 DATA_FOLDER = './data/' @staticmethod def init(chunk_len=14, tree_depth=7, min_considering_segment_amount=int(1e2), segment...
{"/src/align/suffix_tree/hash/sliding_framer.py": ["/src/utils/global_settings.py"], "/src/representation.py": ["/src/utils/global_settings.py", "/src/affinity_structure/bacterial.py"], "/src/align/approximate.py": ["/src/align/suffix_tree/query.py", "/src/utils/fasta.py", "/src/align/suffix_tree/hash/sliding_framer.py...
66,302
xhiggs/BacterialGenomesAligner
refs/heads/main
/src/analysis/segmental.py
from src.align.segmental import SegmentalAlign class SegmentalAnalysis: def __init__(self, segmental_align: SegmentalAlign): self.__run(segmental_align) def __run(self, segmental_align: SegmentalAlign): pass
{"/src/align/suffix_tree/hash/sliding_framer.py": ["/src/utils/global_settings.py"], "/src/representation.py": ["/src/utils/global_settings.py", "/src/affinity_structure/bacterial.py"], "/src/align/approximate.py": ["/src/align/suffix_tree/query.py", "/src/utils/fasta.py", "/src/align/suffix_tree/hash/sliding_framer.py...
66,303
xhiggs/BacterialGenomesAligner
refs/heads/main
/src/utils/fasta.py
from src.utils.global_settings import GlobalSettings from copy import copy class FastaContent: class FastaSequence: def __init__(self, _description: str, _sequence: str): self.__description = _description self.__sequence = _sequence def reverse(self): self.__s...
{"/src/align/suffix_tree/hash/sliding_framer.py": ["/src/utils/global_settings.py"], "/src/representation.py": ["/src/utils/global_settings.py", "/src/affinity_structure/bacterial.py"], "/src/align/approximate.py": ["/src/align/suffix_tree/query.py", "/src/utils/fasta.py", "/src/align/suffix_tree/hash/sliding_framer.py...
66,304
xhiggs/BacterialGenomesAligner
refs/heads/main
/src/align/suffix_tree/query.py
from src.utils.fasta import FastaContent from src.utils.global_settings import GlobalSettings as Settings from src.align.suffix_tree.hash.sliding_framer import SlidingHashFramer as HashFramer from copy import copy, deepcopy class QuerySuffixTree: def __init__(self): self.__tree = dict() self.__se...
{"/src/align/suffix_tree/hash/sliding_framer.py": ["/src/utils/global_settings.py"], "/src/representation.py": ["/src/utils/global_settings.py", "/src/affinity_structure/bacterial.py"], "/src/align/approximate.py": ["/src/align/suffix_tree/query.py", "/src/utils/fasta.py", "/src/align/suffix_tree/hash/sliding_framer.py...
66,305
xhiggs/BacterialGenomesAligner
refs/heads/main
/src/affinity_structure/bacterial.py
from src.utils.global_settings import GlobalSettings as Settings from src.utils.fasta import FastaContent from src.align.segmental import SegmentalAlign from src.align.suffix_tree.query import QuerySuffixTree import os class BacterialAffinityStructure: def __init__(self, folder_name: str): self.__filenam...
{"/src/align/suffix_tree/hash/sliding_framer.py": ["/src/utils/global_settings.py"], "/src/representation.py": ["/src/utils/global_settings.py", "/src/affinity_structure/bacterial.py"], "/src/align/approximate.py": ["/src/align/suffix_tree/query.py", "/src/utils/fasta.py", "/src/align/suffix_tree/hash/sliding_framer.py...
66,306
xhiggs/BacterialGenomesAligner
refs/heads/main
/src/align/segmental.py
from src.align.suffix_tree.query import QuerySuffixTree from src.align.approximate import ApproximateAlign from src.utils.global_settings import GlobalSettings as Settings from src.utils.fasta import FastaContent from matplotlib import pyplot as plt class SegmentalAlign: class Segment: def __init__(self,...
{"/src/align/suffix_tree/hash/sliding_framer.py": ["/src/utils/global_settings.py"], "/src/representation.py": ["/src/utils/global_settings.py", "/src/affinity_structure/bacterial.py"], "/src/align/approximate.py": ["/src/align/suffix_tree/query.py", "/src/utils/fasta.py", "/src/align/suffix_tree/hash/sliding_framer.py...
66,309
sansice/stardust
refs/heads/master
/book_search/__init__.py
from flask import Flask app = Flask(__name__, static_folder='./web/dist', template_folder="./web/html") from book_search.serve.serve import serve_blueprint # register the blueprints app.register_blueprint(serve_blueprint)
{"/book_search/__init__.py": ["/book_search/serve/serve.py"], "/tests/test_book_search/test_process/test_churner/test_recommend_books.py": ["/book_search/process/churner/process_bk_books_data.py", "/book_search/process/churner/recommend_books.py"], "/tests/test_book_search/test_process/test_churner/test_process_bk_book...
66,310
sansice/stardust
refs/heads/master
/book_search/process/utils/const.py
# home_dir = "D:\sans\OneDrive - HCL Technologies Ltd\work\HCL\projects\stardust" import os project_name = 'stardust' sub_project = 'book_search' file_path = os.path.dirname(os.path.abspath(__file__)) sub_project_home = os.path.dirname(os.path.dirname(file_path)) project_home = os.path.dirname(os.path.dirname(os.path....
{"/book_search/__init__.py": ["/book_search/serve/serve.py"], "/tests/test_book_search/test_process/test_churner/test_recommend_books.py": ["/book_search/process/churner/process_bk_books_data.py", "/book_search/process/churner/recommend_books.py"], "/tests/test_book_search/test_process/test_churner/test_process_bk_book...
66,311
sansice/stardust
refs/heads/master
/tests/test_book_search/test_process/test_churner/test_recommend_books.py
import os import unittest from book_search.process.churner.process_bk_books_data import ProcessBXBooksData from book_search.process.churner.recommend_books import RecommendBooks class TestRecommendBooks(unittest.TestCase): def setUp(self): bk_books_data_processor = ProcessBXBooksData() bk_books...
{"/book_search/__init__.py": ["/book_search/serve/serve.py"], "/tests/test_book_search/test_process/test_churner/test_recommend_books.py": ["/book_search/process/churner/process_bk_books_data.py", "/book_search/process/churner/recommend_books.py"], "/tests/test_book_search/test_process/test_churner/test_process_bk_book...
66,312
sansice/stardust
refs/heads/master
/tests/test_book_search/test_process/test_churner/test_process_bk_books_data.py
import os import unittest from book_search.process.churner.process_bk_books_data import ProcessBXBooksData class TestProcessBXBooksData(unittest.TestCase): def setUp(self): self.bk_books_data_processor = ProcessBXBooksData() def tearDown(self) -> None: pass def test_skim_data(self): ...
{"/book_search/__init__.py": ["/book_search/serve/serve.py"], "/tests/test_book_search/test_process/test_churner/test_recommend_books.py": ["/book_search/process/churner/process_bk_books_data.py", "/book_search/process/churner/recommend_books.py"], "/tests/test_book_search/test_process/test_churner/test_process_bk_book...
66,313
sansice/stardust
refs/heads/master
/book_search/process/churner/recommend_books.py
import json import numpy import pandas from sklearn.neighbors import NearestNeighbors from book_search.process.utils import const import book_search.process.utils.utils as utils class RecommendBooks(metaclass=utils.Singleton): def __init__(self, data_object): self.data_object = data_object self....
{"/book_search/__init__.py": ["/book_search/serve/serve.py"], "/tests/test_book_search/test_process/test_churner/test_recommend_books.py": ["/book_search/process/churner/process_bk_books_data.py", "/book_search/process/churner/recommend_books.py"], "/tests/test_book_search/test_process/test_churner/test_process_bk_book...
66,314
sansice/stardust
refs/heads/master
/book_search/process/churner/churn_data.py
import book_search.process.utils.const as const import book_search.process.utils.utils as utils from book_search.process.churner.data_factory import DataFactory class ChurnData(metaclass=utils.Singleton): def __init__(self, data_type): data_factory = DataFactory() self.data_object = data_factory...
{"/book_search/__init__.py": ["/book_search/serve/serve.py"], "/tests/test_book_search/test_process/test_churner/test_recommend_books.py": ["/book_search/process/churner/process_bk_books_data.py", "/book_search/process/churner/recommend_books.py"], "/tests/test_book_search/test_process/test_churner/test_process_bk_book...
66,315
sansice/stardust
refs/heads/master
/tests/test_book_search/test_process/test_churner/test_churn_data.py
import os import unittest import book_search.process.churner.churn_data as const from book_search.process.churner.churn_data import ChurnData class TestChurnData(unittest.TestCase): def setUp(self): self.churn_data = ChurnData('bx_books') def tearDown(self) -> None: pass def test_get_...
{"/book_search/__init__.py": ["/book_search/serve/serve.py"], "/tests/test_book_search/test_process/test_churner/test_recommend_books.py": ["/book_search/process/churner/process_bk_books_data.py", "/book_search/process/churner/recommend_books.py"], "/tests/test_book_search/test_process/test_churner/test_process_bk_book...
66,316
sansice/stardust
refs/heads/master
/book_search/start.py
import sys import os # sys.path.append(os.path.abspath(os.path.dirname(__file__))) sys.path.append(os.path.abspath(os.path.dirname(os.path.dirname(__file__)))) from book_search import app if __name__ == '__main__': app.config.from_object('configurations.DevelopmentConfig') app.run()
{"/book_search/__init__.py": ["/book_search/serve/serve.py"], "/tests/test_book_search/test_process/test_churner/test_recommend_books.py": ["/book_search/process/churner/process_bk_books_data.py", "/book_search/process/churner/recommend_books.py"], "/tests/test_book_search/test_process/test_churner/test_process_bk_book...
66,317
sansice/stardust
refs/heads/master
/book_search/process/utils/test_imports.py
import re import os import sys import pandas import matplotlib.pyplot as plt import sklearn.metrics as metrics import numpy as np from sklearn.neighbors import NearestNeighbors from scipy.spatial.distance import correlation from sklearn.metrics.pairwise import pairwise_distances import ipywidgets as widgets from IPytho...
{"/book_search/__init__.py": ["/book_search/serve/serve.py"], "/tests/test_book_search/test_process/test_churner/test_recommend_books.py": ["/book_search/process/churner/process_bk_books_data.py", "/book_search/process/churner/recommend_books.py"], "/tests/test_book_search/test_process/test_churner/test_process_bk_book...
66,318
sansice/stardust
refs/heads/master
/book_search/process/utils/utils.py
class Singleton(type): _instances = {} def __call__(cls, *args, **kwargs): if cls not in cls._instances: cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs) return cls._instances[cls] def string_to_file(string, file): text_file = open(file, "w") text_fil...
{"/book_search/__init__.py": ["/book_search/serve/serve.py"], "/tests/test_book_search/test_process/test_churner/test_recommend_books.py": ["/book_search/process/churner/process_bk_books_data.py", "/book_search/process/churner/recommend_books.py"], "/tests/test_book_search/test_process/test_churner/test_process_bk_book...
66,319
sansice/stardust
refs/heads/master
/book_search/process/churner/data_factory.py
from book_search.process.churner.process_bk_books_data import ProcessBXBooksData from book_search.process.churner.recommend_books import RecommendBooks class DataFactory: @staticmethod def get_data_object(data_type): data_type = data_type.lower() if data_type == 'bx_books': return...
{"/book_search/__init__.py": ["/book_search/serve/serve.py"], "/tests/test_book_search/test_process/test_churner/test_recommend_books.py": ["/book_search/process/churner/process_bk_books_data.py", "/book_search/process/churner/recommend_books.py"], "/tests/test_book_search/test_process/test_churner/test_process_bk_book...
66,320
sansice/stardust
refs/heads/master
/book_search/process/churner/process_data.py
class ProcessData(object): def __init__(self): pass def skim_data(self): pass
{"/book_search/__init__.py": ["/book_search/serve/serve.py"], "/tests/test_book_search/test_process/test_churner/test_recommend_books.py": ["/book_search/process/churner/process_bk_books_data.py", "/book_search/process/churner/recommend_books.py"], "/tests/test_book_search/test_process/test_churner/test_process_bk_book...
66,321
sansice/stardust
refs/heads/master
/book_search/serve/serve.py
# from search.word_cloud.word_cloud import WordClouds from flask import render_template, Blueprint, request, jsonify from book_search.process.churner.churn_data import ChurnData serve_blueprint = Blueprint('serve', __name__) @serve_blueprint.route('/') def index(): churn_data = ChurnData('bx_books') most_popul...
{"/book_search/__init__.py": ["/book_search/serve/serve.py"], "/tests/test_book_search/test_process/test_churner/test_recommend_books.py": ["/book_search/process/churner/process_bk_books_data.py", "/book_search/process/churner/recommend_books.py"], "/tests/test_book_search/test_process/test_churner/test_process_bk_book...
66,322
sansice/stardust
refs/heads/master
/tests/test_book_search/test_process/test_utils/test_const.py
import os import unittest import book_search.process.utils.const as const class TestUnittestGenerator(unittest.TestCase): def setUp(self): pass def tearDown(self) -> None: pass def test_project_path(self): project_home = const.project_home print(project_home) s...
{"/book_search/__init__.py": ["/book_search/serve/serve.py"], "/tests/test_book_search/test_process/test_churner/test_recommend_books.py": ["/book_search/process/churner/process_bk_books_data.py", "/book_search/process/churner/recommend_books.py"], "/tests/test_book_search/test_process/test_churner/test_process_bk_book...
66,323
sansice/stardust
refs/heads/master
/book_search/process/churner/process_bk_books_data.py
import copy import numpy import pandas import logging import seaborn as sns import matplotlib.pyplot as plt from book_search.process.churner.process_data import ProcessData from book_search.process.utils import const logger = logging.getLogger() class ProcessBXBooksData(ProcessData): def __init__(self): ...
{"/book_search/__init__.py": ["/book_search/serve/serve.py"], "/tests/test_book_search/test_process/test_churner/test_recommend_books.py": ["/book_search/process/churner/process_bk_books_data.py", "/book_search/process/churner/recommend_books.py"], "/tests/test_book_search/test_process/test_churner/test_process_bk_book...
66,352
newlife591/learngit
refs/heads/master
/clik.py
##!/usr/bin/python # open chrome in windows import pyautogui as pg import pyperclip as pc import sys import time #def open_explor(str="chrome") ## This programe have 5 Jobs ## def open_explor(expname): ##打开浏览器 pg.hotkey('win','r') pg.PAUSE=2 pg.write(expname,interval=0.2,pause=0.2) pg.press('...
{"/zbgzlogin.py": ["/baitu_rec.py"]}
66,353
newlife591/learngit
refs/heads/master
/learning1.py
#!python # open chrome in windows import pyautogui as pg import sys #def open_explor(str="chrome") print('==== 打开浏览器 Press Ctrl-C to quit====') liulanqi_name = ' chrome' mb_direct1 = ' https://www.zhibugongzuo.com/news#/workinfodetail?act_id=129724224566fc2714a48723d741bf67c3e677660d83e0eee367d1b07a099457&template=1...
{"/zbgzlogin.py": ["/baitu_rec.py"]}
66,354
newlife591/learngit
refs/heads/master
/hello.py
#print('hello python') print ('nihao\\ womenhao') a=60 b=13 c=0 c=a&b; print("1-c的值为",c) c=a|b; print("2-c的值为", c) c=a^b; print("3-c的值为",c) c=~a; print("4-c的值为",c) c=a<<2; print("5-c的值为",c) c=a>>2; print("6-c的值为",c)
{"/zbgzlogin.py": ["/baitu_rec.py"]}
66,355
newlife591/learngit
refs/heads/master
/zbgzlogin.py
#登录支部工作 获取验证码 并另存图片到.\easy_img 目录下 # # from selenium import webdriver from PIL import Image from selenium.webdriver.common.keys import Keys from aip import AipOcr import os,time import requests import base64 from img_optimization import * from baitu_rec import * def main_login(): uname='13718759896' ...
{"/zbgzlogin.py": ["/baitu_rec.py"]}
66,356
newlife591/learngit
refs/heads/master
/baitu_rec.py
# encoding:utf-8 ##使用百度aip进行图像识别 ##图片保存在.\out_img目录下 import requests import json from aip import AipOcr def get_file_content(filePath): with open(filePath,'rb')as fp: return fp.read() def baidu_rec_main(PNG_filePath): # client_id 为官网获取的AK, client_secret 为官网获取的SK APP_ID='19131433' API_KEY='kS...
{"/zbgzlogin.py": ["/baitu_rec.py"]}
66,362
anyasidr/my-repository
refs/heads/master
/windows.py
import shelve import os import indexer import re from moytokenizer import Tokenizer from indexer import Position_with_lines class ContextWindow(object): """ This class is used to store context windows data """ def __init__(self, line, position, start, end): """ method cre...
{"/windows.py": ["/indexer.py", "/moytokenizer.py"], "/testSearchEngine.py": ["/unittest.py", "/make_db.py", "/indexer.py", "/searchengine.py", "/windows.py"], "/searchengine.py": ["/indexer.py", "/windows.py", "/moytokenizer.py"], "/unittest.py": ["/moytokenizer.py"], "/make_db.py": ["/indexer.py"], "/testIndexer.py":...
66,363
anyasidr/my-repository
refs/heads/master
/testSearchEngine.py
import unittest import make_db import shelve import os from indexer import Indexator, Position, Position_with_lines from searchengine import SearchEngine from windows import ContextWindow test1 = "this is my test" test2 = "my test" database = {'this': {'test1.txt': [Position_with_lines(0, 4, 0)]}, ...
{"/windows.py": ["/indexer.py", "/moytokenizer.py"], "/testSearchEngine.py": ["/unittest.py", "/make_db.py", "/indexer.py", "/searchengine.py", "/windows.py"], "/searchengine.py": ["/indexer.py", "/windows.py", "/moytokenizer.py"], "/unittest.py": ["/moytokenizer.py"], "/make_db.py": ["/indexer.py"], "/testIndexer.py":...
66,364
anyasidr/my-repository
refs/heads/master
/searchengine.py
import shelve import os import indexer import re import windows from moytokenizer import Tokenizer from indexer import Position_with_lines class SearchEngine(object): """ This class is used for searching of positions of tokens in a given database. """ def __init__(self, dbname)...
{"/windows.py": ["/indexer.py", "/moytokenizer.py"], "/testSearchEngine.py": ["/unittest.py", "/make_db.py", "/indexer.py", "/searchengine.py", "/windows.py"], "/searchengine.py": ["/indexer.py", "/windows.py", "/moytokenizer.py"], "/unittest.py": ["/moytokenizer.py"], "/make_db.py": ["/indexer.py"], "/testIndexer.py":...
66,365
anyasidr/my-repository
refs/heads/master
/unittest.py
import unittest from moytokenizer import Tokenizer from search_engine import SearchEngine class Test(unittest.TestCase): def setUp(self): self.Tokenizer = Tokenizer() # unittest for method tokenize def test_type_output(self): result = self.Tokenizer.tokenize('text') ...
{"/windows.py": ["/indexer.py", "/moytokenizer.py"], "/testSearchEngine.py": ["/unittest.py", "/make_db.py", "/indexer.py", "/searchengine.py", "/windows.py"], "/searchengine.py": ["/indexer.py", "/windows.py", "/moytokenizer.py"], "/unittest.py": ["/moytokenizer.py"], "/make_db.py": ["/indexer.py"], "/testIndexer.py":...
66,366
anyasidr/my-repository
refs/heads/master
/make_db.py
import indexer import os def make(dir = 'books', files=[], db_name='mydb'): i = indexer.Indexator(db_name) for f in files: print(f) i.indextie_with_lines(f) def make_from_dir(dir='books', db_name='database\\mydb'): i = indexer.Indexator(db_name) files = os.listdir(dir) ...
{"/windows.py": ["/indexer.py", "/moytokenizer.py"], "/testSearchEngine.py": ["/unittest.py", "/make_db.py", "/indexer.py", "/searchengine.py", "/windows.py"], "/searchengine.py": ["/indexer.py", "/windows.py", "/moytokenizer.py"], "/unittest.py": ["/moytokenizer.py"], "/make_db.py": ["/indexer.py"], "/testIndexer.py":...
66,367
anyasidr/my-repository
refs/heads/master
/testIndexer.py
import unittest import moytokenizer import os import shelve from indexer import Indexator, Position class TestIndexator(unittest.TestCase): def setUp(self): self.indexator = Indexator('database') def test_digit(self): with self.assertRaises(TypeError): self.in...
{"/windows.py": ["/indexer.py", "/moytokenizer.py"], "/testSearchEngine.py": ["/unittest.py", "/make_db.py", "/indexer.py", "/searchengine.py", "/windows.py"], "/searchengine.py": ["/indexer.py", "/windows.py", "/moytokenizer.py"], "/unittest.py": ["/moytokenizer.py"], "/make_db.py": ["/indexer.py"], "/testIndexer.py":...
66,368
anyasidr/my-repository
refs/heads/master
/moytokenizer.py
"""This module is used for tokenizing strings. The string must be divided into alphabetic characters.""" import re """ importing the module of regular expressions """ import unicodedata class Token(object): """ this class represents tokens aka alphabetic sequences """ def __init__(self...
{"/windows.py": ["/indexer.py", "/moytokenizer.py"], "/testSearchEngine.py": ["/unittest.py", "/make_db.py", "/indexer.py", "/searchengine.py", "/windows.py"], "/searchengine.py": ["/indexer.py", "/windows.py", "/moytokenizer.py"], "/unittest.py": ["/moytokenizer.py"], "/make_db.py": ["/indexer.py"], "/testIndexer.py":...
66,369
anyasidr/my-repository
refs/heads/master
/indexer.py
from moytokenizer import Tokenizer import shelve import os class Position(object): """ This class contains positions of tokens that are alphas and digits. Positions consist of beginnings and endings of tokens. """ def __init__(self, start, end): """ method that...
{"/windows.py": ["/indexer.py", "/moytokenizer.py"], "/testSearchEngine.py": ["/unittest.py", "/make_db.py", "/indexer.py", "/searchengine.py", "/windows.py"], "/searchengine.py": ["/indexer.py", "/windows.py", "/moytokenizer.py"], "/unittest.py": ["/moytokenizer.py"], "/make_db.py": ["/indexer.py"], "/testIndexer.py":...
66,370
anyasidr/my-repository
refs/heads/master
/webserver.py
from http.server import BaseHTTPRequestHandler, HTTPServer from urllib.parse import unquote import urllib.parse as urllib import os import re from searchengine import SearchEngine """ This is a response, that server sends back to the client 1st peace without from and data """ resp = """<html> <head> ...
{"/windows.py": ["/indexer.py", "/moytokenizer.py"], "/testSearchEngine.py": ["/unittest.py", "/make_db.py", "/indexer.py", "/searchengine.py", "/windows.py"], "/searchengine.py": ["/indexer.py", "/windows.py", "/moytokenizer.py"], "/unittest.py": ["/moytokenizer.py"], "/make_db.py": ["/indexer.py"], "/testIndexer.py":...
66,452
stuyspec/flask-api
refs/heads/develop
/app/views.py
from flask import render_template, flash, redirect from flask import request, session, url_for, jsonify, make_response from app import app, db, models #---------------------------------------------- Error Handlers @app.errorhandler(400) def not_found(error): return make_response(jsonify( { 'error': 'Bad request'...
{"/app/views.py": ["/app/__init__.py"], "/app/models.py": ["/app/__init__.py"], "/run.py": ["/app/__init__.py", "/db_seed.py"], "/db_seed.py": ["/app/__init__.py"]}
66,453
stuyspec/flask-api
refs/heads/develop
/db_repository/versions/.#004_migration.py
nicholas@Nicholass-MacBook-Pro.local.65212
{"/app/views.py": ["/app/__init__.py"], "/app/models.py": ["/app/__init__.py"], "/run.py": ["/app/__init__.py", "/db_seed.py"], "/db_seed.py": ["/app/__init__.py"]}
66,454
stuyspec/flask-api
refs/heads/develop
/db_repository/versions/002_migration.py
from sqlalchemy import * from migrate import * from migrate.changeset import schema pre_meta = MetaData() post_meta = MetaData() user = Table('user', pre_meta, Column('id', INTEGER, primary_key=True, nullable=False), Column('fname', VARCHAR(length=128)), Column('lname', VARCHAR(length=128)), Column('n...
{"/app/views.py": ["/app/__init__.py"], "/app/models.py": ["/app/__init__.py"], "/run.py": ["/app/__init__.py", "/db_seed.py"], "/db_seed.py": ["/app/__init__.py"]}
66,455
stuyspec/flask-api
refs/heads/develop
/db_repository/__init__.py
from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from werkzeug.contrib.fixers import ProxyFix app = Flask(__name__) app.wsgi_app = ProxyFix(app.wsgi_app) app.config.from_object('config') db = SQLAlchemy(app) import views
{"/app/views.py": ["/app/__init__.py"], "/app/models.py": ["/app/__init__.py"], "/run.py": ["/app/__init__.py", "/db_seed.py"], "/db_seed.py": ["/app/__init__.py"]}
66,456
stuyspec/flask-api
refs/heads/develop
/app/__init__.py
from flask import Flask from flask_sqlalchemy import SQLAlchemy from werkzeug.contrib.fixers import ProxyFix app = Flask(__name__) app.wsgi_app = ProxyFix(app.wsgi_app) app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True app.config.from_object('config') db = SQLAlchemy(app) import views
{"/app/views.py": ["/app/__init__.py"], "/app/models.py": ["/app/__init__.py"], "/run.py": ["/app/__init__.py", "/db_seed.py"], "/db_seed.py": ["/app/__init__.py"]}
66,457
stuyspec/flask-api
refs/heads/develop
/config.py
import os # The base directory (DO NOT CHANGE, unless you know EXACTLY what you are doing) basedir = os.path.abspath(os.path.dirname(__file__)) # The base directory for the database (DO NOT CHANGE, unless you know EXACTLY what you are doing) SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'app.db') # M...
{"/app/views.py": ["/app/__init__.py"], "/app/models.py": ["/app/__init__.py"], "/run.py": ["/app/__init__.py", "/db_seed.py"], "/db_seed.py": ["/app/__init__.py"]}
66,458
stuyspec/flask-api
refs/heads/develop
/db_repository/versions/004_migration.py
from sqlalchemy import * from migrate import * from migrate.changeset import schema pre_meta = MetaData() post_meta = MetaData() article = Table('article', post_meta, Column('id', Integer, primary_key=True, nullable=False), Column('title', String(length=500)), Column('titleSlug', String(length=500)), ...
{"/app/views.py": ["/app/__init__.py"], "/app/models.py": ["/app/__init__.py"], "/run.py": ["/app/__init__.py", "/db_seed.py"], "/db_seed.py": ["/app/__init__.py"]}
66,459
stuyspec/flask-api
refs/heads/develop
/app/models.py
from app import db from app import app from werkzeug.security import generate_password_hash, check_password_hash class Article(db.Model): id = db.Column(db.Integer, primary_key = True) title = db.Column(db.String(500)) slug = db.Column(db.String(500)) content = db.Column(db.Text) date_time = db.Co...
{"/app/views.py": ["/app/__init__.py"], "/app/models.py": ["/app/__init__.py"], "/run.py": ["/app/__init__.py", "/db_seed.py"], "/db_seed.py": ["/app/__init__.py"]}
66,460
stuyspec/flask-api
refs/heads/develop
/run.py
#!flask/bin/python from app import app import db_seed # This will run the application, change the debug do deliminate the nice error messages (every error would then result in an error 404 message) if __name__ == "__main__": app.run(debug = True, host='0.0.0.0', port=8000) # Can change back debug
{"/app/views.py": ["/app/__init__.py"], "/app/models.py": ["/app/__init__.py"], "/run.py": ["/app/__init__.py", "/db_seed.py"], "/db_seed.py": ["/app/__init__.py"]}
66,461
stuyspec/flask-api
refs/heads/develop
/db_seed.py
#!flask/bin/python from app import models, db from datetime import datetime section_sample = models.Section(name = "humor", slug = "humorstuff", description = "this is the humor department", parent_slug = "humor") ...
{"/app/views.py": ["/app/__init__.py"], "/app/models.py": ["/app/__init__.py"], "/run.py": ["/app/__init__.py", "/db_seed.py"], "/db_seed.py": ["/app/__init__.py"]}
66,470
PorterDalton1/Text_Adventure
refs/heads/master
/main.py
""" Driver file for the game. This is the file that get's started that runs everything. """ from window_GUI import WindowBase
{"/main.py": ["/window_GUI.py"]}