index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
29,720
SungjiCho/ipsi
refs/heads/master
/suneung/urls.py
from django.urls import path from suneung import views urlpatterns = [ path('suneung/', views.SuneungList.as_view()), ]
{"/review/views.py": ["/university/models.py", "/review/serializers.py"], "/jeongsi/serializers.py": ["/jeongsi/models.py"], "/university/views.py": ["/university/models.py", "/university/serializers.py", "/susi/models.py", "/susi/serializers.py", "/jeongsi/models.py", "/jeongsi/serializers.py"], "/model_to_csv.py": ["...
29,723
siddhantkudal/efarmingportal.github.io
refs/heads/main
/MYS/apps.py
from django.apps import AppConfig class MysConfig(AppConfig): name = 'MYS'
{"/index/Models/order.py": ["/index/Models/models.py"], "/index/Models/__init__.py": ["/index/Models/models.py", "/index/Models/smartfarming.py", "/index/Models/order.py"], "/index/views.py": ["/index/forms.py", "/index/Models/models.py", "/index/Models/order.py", "/index/Models/smartfarming.py"], "/index/admin.py": ["...
29,724
siddhantkudal/efarmingportal.github.io
refs/heads/main
/index/Models/order.py
from django.db import models from .models import Product from django.contrib.auth.models import User import datetime class Order(models.Model): productname = models.ForeignKey(Product, on_delete=models.CASCADE) customer = models.CharField(max_length=50) quantity = models.IntegerField(default=1) price =...
{"/index/Models/order.py": ["/index/Models/models.py"], "/index/Models/__init__.py": ["/index/Models/models.py", "/index/Models/smartfarming.py", "/index/Models/order.py"], "/index/views.py": ["/index/forms.py", "/index/Models/models.py", "/index/Models/order.py", "/index/Models/smartfarming.py"], "/index/admin.py": ["...
29,725
siddhantkudal/efarmingportal.github.io
refs/heads/main
/farmproject/urls.py
"""farmproject URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/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-b...
{"/index/Models/order.py": ["/index/Models/models.py"], "/index/Models/__init__.py": ["/index/Models/models.py", "/index/Models/smartfarming.py", "/index/Models/order.py"], "/index/views.py": ["/index/forms.py", "/index/Models/models.py", "/index/Models/order.py", "/index/Models/smartfarming.py"], "/index/admin.py": ["...
29,726
siddhantkudal/efarmingportal.github.io
refs/heads/main
/index/migrations/0010_auto_20210509_2351.py
# Generated by Django 3.1.7 on 2021-05-09 18:21 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('index', '0009_order'), ] operations = [ migrations.AlterField( model_name='order', name='datetime', ...
{"/index/Models/order.py": ["/index/Models/models.py"], "/index/Models/__init__.py": ["/index/Models/models.py", "/index/Models/smartfarming.py", "/index/Models/order.py"], "/index/views.py": ["/index/forms.py", "/index/Models/models.py", "/index/Models/order.py", "/index/Models/smartfarming.py"], "/index/admin.py": ["...
29,727
siddhantkudal/efarmingportal.github.io
refs/heads/main
/index/forms.py
from django import forms from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User """ usercreationform is inbuilt class which created basic form with validations if we want give extra fields give in fields() but in djnago User for authentication/registration process so only ...
{"/index/Models/order.py": ["/index/Models/models.py"], "/index/Models/__init__.py": ["/index/Models/models.py", "/index/Models/smartfarming.py", "/index/Models/order.py"], "/index/views.py": ["/index/forms.py", "/index/Models/models.py", "/index/Models/order.py", "/index/Models/smartfarming.py"], "/index/admin.py": ["...
29,728
siddhantkudal/efarmingportal.github.io
refs/heads/main
/index/Models/__init__.py
from .models import Product from .category import Category from .smartfarming import smartfar from .order import Order
{"/index/Models/order.py": ["/index/Models/models.py"], "/index/Models/__init__.py": ["/index/Models/models.py", "/index/Models/smartfarming.py", "/index/Models/order.py"], "/index/views.py": ["/index/forms.py", "/index/Models/models.py", "/index/Models/order.py", "/index/Models/smartfarming.py"], "/index/admin.py": ["...
29,729
siddhantkudal/efarmingportal.github.io
refs/heads/main
/index/migrations/0005_auto_20210501_0038.py
# Generated by Django 3.1.7 on 2021-04-30 19:08 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('index', '0004_product_category'), ] operations = [ migrations.AlterField( model_name='product', name='climateconditi...
{"/index/Models/order.py": ["/index/Models/models.py"], "/index/Models/__init__.py": ["/index/Models/models.py", "/index/Models/smartfarming.py", "/index/Models/order.py"], "/index/views.py": ["/index/forms.py", "/index/Models/models.py", "/index/Models/order.py", "/index/Models/smartfarming.py"], "/index/admin.py": ["...
29,730
siddhantkudal/efarmingportal.github.io
refs/heads/main
/index/templatetags/operations.py
from django import template register = template.Library() @register.filter(name='price_order') def price_order(i,quan): result = i.price * int(quan) return result
{"/index/Models/order.py": ["/index/Models/models.py"], "/index/Models/__init__.py": ["/index/Models/models.py", "/index/Models/smartfarming.py", "/index/Models/order.py"], "/index/views.py": ["/index/forms.py", "/index/Models/models.py", "/index/Models/order.py", "/index/Models/smartfarming.py"], "/index/admin.py": ["...
29,731
siddhantkudal/efarmingportal.github.io
refs/heads/main
/index/Models/smartfarming.py
from django.db import models class smartfar(models.Model): name=models.CharField(max_length=30) description=models.CharField(max_length=1000) image = models.ImageField(upload_to='uploaded/images') def __str__(self): return self.name
{"/index/Models/order.py": ["/index/Models/models.py"], "/index/Models/__init__.py": ["/index/Models/models.py", "/index/Models/smartfarming.py", "/index/Models/order.py"], "/index/views.py": ["/index/forms.py", "/index/Models/models.py", "/index/Models/order.py", "/index/Models/smartfarming.py"], "/index/admin.py": ["...
29,732
siddhantkudal/efarmingportal.github.io
refs/heads/main
/index/views.py
from django.shortcuts import render,redirect from .forms import myform from django.http import HttpResponse,HttpResponseRedirect from django.contrib import messages from .Models.models import Product from .Models.models import Category from .Models.order import Order from .Models.smartfarming import smartfar from djang...
{"/index/Models/order.py": ["/index/Models/models.py"], "/index/Models/__init__.py": ["/index/Models/models.py", "/index/Models/smartfarming.py", "/index/Models/order.py"], "/index/views.py": ["/index/forms.py", "/index/Models/models.py", "/index/Models/order.py", "/index/Models/smartfarming.py"], "/index/admin.py": ["...
29,733
siddhantkudal/efarmingportal.github.io
refs/heads/main
/index/admin.py
from django.contrib import admin # Register your models here. from .Models.models import Product from .Models.category import Category from .Models.smartfarming import smartfar from .Models.order import Order class AdminProduct(admin.ModelAdmin): list_display=['productname','category'] class AdminCategory(admin.M...
{"/index/Models/order.py": ["/index/Models/models.py"], "/index/Models/__init__.py": ["/index/Models/models.py", "/index/Models/smartfarming.py", "/index/Models/order.py"], "/index/views.py": ["/index/forms.py", "/index/Models/models.py", "/index/Models/order.py", "/index/Models/smartfarming.py"], "/index/admin.py": ["...
29,734
siddhantkudal/efarmingportal.github.io
refs/heads/main
/index/migrations/0009_order.py
# Generated by Django 3.1.7 on 2021-05-09 18:15 import datetime from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('index', ...
{"/index/Models/order.py": ["/index/Models/models.py"], "/index/Models/__init__.py": ["/index/Models/models.py", "/index/Models/smartfarming.py", "/index/Models/order.py"], "/index/views.py": ["/index/forms.py", "/index/Models/models.py", "/index/Models/order.py", "/index/Models/smartfarming.py"], "/index/admin.py": ["...
29,735
siddhantkudal/efarmingportal.github.io
refs/heads/main
/index/Models/models.py
from django.db import models from .category import Category # Create your models here. class Product(models.Model): productname = models.CharField(max_length=30) description = models.CharField(max_length=300) category = models.ForeignKey(Category , on_delete=models.CASCADE) climatecondition = models.Cha...
{"/index/Models/order.py": ["/index/Models/models.py"], "/index/Models/__init__.py": ["/index/Models/models.py", "/index/Models/smartfarming.py", "/index/Models/order.py"], "/index/views.py": ["/index/forms.py", "/index/Models/models.py", "/index/Models/order.py", "/index/Models/smartfarming.py"], "/index/admin.py": ["...
29,736
siddhantkudal/efarmingportal.github.io
refs/heads/main
/MYS/urls.py
from django.urls import path from MYS import views urlpatterns=[ path('',views.display), ]
{"/index/Models/order.py": ["/index/Models/models.py"], "/index/Models/__init__.py": ["/index/Models/models.py", "/index/Models/smartfarming.py", "/index/Models/order.py"], "/index/views.py": ["/index/forms.py", "/index/Models/models.py", "/index/Models/order.py", "/index/Models/smartfarming.py"], "/index/admin.py": ["...
29,737
siddhantkudal/efarmingportal.github.io
refs/heads/main
/MYS/views.py
from django.shortcuts import render from .models import mys import datetime # Create your views here. def display(request): temp=mys.objects.all(); temp2=datetime.datetime.now() return render(request,"mys.html",{'pdlist':temp,'time':temp2})
{"/index/Models/order.py": ["/index/Models/models.py"], "/index/Models/__init__.py": ["/index/Models/models.py", "/index/Models/smartfarming.py", "/index/Models/order.py"], "/index/views.py": ["/index/forms.py", "/index/Models/models.py", "/index/Models/order.py", "/index/Models/smartfarming.py"], "/index/admin.py": ["...
29,740
fattybobcat/foodgram-project
refs/heads/master
/recipes/views.py
from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.core.paginator import Paginator from django.http import HttpResponse from django.shortcuts import get_object_or_404, redirect, render from django.views.generic import View from api.models import Follow fro...
{"/recipes/views.py": ["/api/models.py", "/foodgram/settings.py", "/recipes/auxiliary.py", "/recipes/models.py"], "/api/views.py": ["/recipes/models.py", "/api/models.py"], "/recipes/templatetags/recipes_tag_filter.py": ["/api/models.py", "/recipes/models.py"], "/api/models.py": ["/recipes/models.py"], "/recipes/auxili...
29,741
fattybobcat/foodgram-project
refs/heads/master
/api/views.py
import json from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.models import User from django.http import JsonResponse from django.shortcuts import get_object_or_404 from django.views import View from recipes.models import Ingredient, Recipe from .models import FavoriteRecipe, Follow,...
{"/recipes/views.py": ["/api/models.py", "/foodgram/settings.py", "/recipes/auxiliary.py", "/recipes/models.py"], "/api/views.py": ["/recipes/models.py", "/api/models.py"], "/recipes/templatetags/recipes_tag_filter.py": ["/api/models.py", "/recipes/models.py"], "/api/models.py": ["/recipes/models.py"], "/recipes/auxili...
29,742
fattybobcat/foodgram-project
refs/heads/master
/recipes/templatetags/recipes_tag_filter.py
from django import template from api.models import FavoriteRecipe, Follow, Wishlist from recipes.models import TAG_CHOICES register = template.Library() @register.filter def get_recipe_tag(tags_list): tags = "" if "breakfast" in tags_list: tags += str('<li class="card__item">' '<...
{"/recipes/views.py": ["/api/models.py", "/foodgram/settings.py", "/recipes/auxiliary.py", "/recipes/models.py"], "/api/views.py": ["/recipes/models.py", "/api/models.py"], "/recipes/templatetags/recipes_tag_filter.py": ["/api/models.py", "/recipes/models.py"], "/api/models.py": ["/recipes/models.py"], "/recipes/auxili...
29,743
fattybobcat/foodgram-project
refs/heads/master
/recipes/models.py
from django.contrib.auth import get_user_model from django.core.validators import MinValueValidator from django.db import models from multiselectfield import MultiSelectField User = get_user_model() TAG_CHOICES = [ ("breakfast", "Завтрак"), ("lunch", "Обед"), ("dinner", "Ужин"), ] class...
{"/recipes/views.py": ["/api/models.py", "/foodgram/settings.py", "/recipes/auxiliary.py", "/recipes/models.py"], "/api/views.py": ["/recipes/models.py", "/api/models.py"], "/recipes/templatetags/recipes_tag_filter.py": ["/api/models.py", "/recipes/models.py"], "/api/models.py": ["/recipes/models.py"], "/recipes/auxili...
29,744
fattybobcat/foodgram-project
refs/heads/master
/api/models.py
from django.contrib.auth import get_user_model from django.db import models from recipes.models import Recipe User = get_user_model() class Follow(models.Model): """Model for subscriptions""" user = models.ForeignKey(User, on_delete=models.CASCADE, n...
{"/recipes/views.py": ["/api/models.py", "/foodgram/settings.py", "/recipes/auxiliary.py", "/recipes/models.py"], "/api/views.py": ["/recipes/models.py", "/api/models.py"], "/recipes/templatetags/recipes_tag_filter.py": ["/api/models.py", "/recipes/models.py"], "/api/models.py": ["/recipes/models.py"], "/recipes/auxili...
29,745
fattybobcat/foodgram-project
refs/heads/master
/recipes/auxiliary.py
from django.db.models import Q from .models import TAG_CHOICES def get_ingredients(request): ing_dict = {} for key in request.POST: if key.startswith("nameIngredient"): value = key[15:] ing_dict[request.POST[key]] = ( request.POST["valueIngredient_" + value], ...
{"/recipes/views.py": ["/api/models.py", "/foodgram/settings.py", "/recipes/auxiliary.py", "/recipes/models.py"], "/api/views.py": ["/recipes/models.py", "/api/models.py"], "/recipes/templatetags/recipes_tag_filter.py": ["/api/models.py", "/recipes/models.py"], "/api/models.py": ["/recipes/models.py"], "/recipes/auxili...
29,746
fattybobcat/foodgram-project
refs/heads/master
/api/urls.py
from django.urls import path from . import views urlpatterns = [ path("ingredients", views.ingredient_hints, name="ingredient_hints"), path("favorites", views.FavoriteApi.as_view(), name="favorites"), path("favorites/<int:id>", views.FavoriteApi.as_view(), ...
{"/recipes/views.py": ["/api/models.py", "/foodgram/settings.py", "/recipes/auxiliary.py", "/recipes/models.py"], "/api/views.py": ["/recipes/models.py", "/api/models.py"], "/recipes/templatetags/recipes_tag_filter.py": ["/api/models.py", "/recipes/models.py"], "/api/models.py": ["/recipes/models.py"], "/recipes/auxili...
29,747
fattybobcat/foodgram-project
refs/heads/master
/recipes/urls.py
from django.urls import path from . import views urlpatterns = [ path("", views.index, name="index"), path("recipes/<int:recipe_id>", views.recipe_single, name="recipe_single"), path("recipes/new/", views.new_recipe, name="recipe_new"), path("recipes/edit/<int:recip...
{"/recipes/views.py": ["/api/models.py", "/foodgram/settings.py", "/recipes/auxiliary.py", "/recipes/models.py"], "/api/views.py": ["/recipes/models.py", "/api/models.py"], "/recipes/templatetags/recipes_tag_filter.py": ["/api/models.py", "/recipes/models.py"], "/api/models.py": ["/recipes/models.py"], "/recipes/auxili...
29,748
fattybobcat/foodgram-project
refs/heads/master
/users/urls.py
from django.urls import include, path from . import views urlpatterns = [ path('reg/', views.SignUp.as_view(), name='reg'), path("", include("django.contrib.auth.urls")), ]
{"/recipes/views.py": ["/api/models.py", "/foodgram/settings.py", "/recipes/auxiliary.py", "/recipes/models.py"], "/api/views.py": ["/recipes/models.py", "/api/models.py"], "/recipes/templatetags/recipes_tag_filter.py": ["/api/models.py", "/recipes/models.py"], "/api/models.py": ["/recipes/models.py"], "/recipes/auxili...
29,749
fattybobcat/foodgram-project
refs/heads/master
/foodgram/settings.py
import os from dotenv import load_dotenv load_dotenv() dotenv_path = os.path.join(os.path.dirname(__file__), '.env') BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '1v%g#)q&7ta9sxe9l5)z603@5@%ho8jdxzj930zm2eq8mympwz' DEBUG = True ALLOWED_HOSTS = ['*'] SITE_ID = 1 INSTALLED_A...
{"/recipes/views.py": ["/api/models.py", "/foodgram/settings.py", "/recipes/auxiliary.py", "/recipes/models.py"], "/api/views.py": ["/recipes/models.py", "/api/models.py"], "/recipes/templatetags/recipes_tag_filter.py": ["/api/models.py", "/recipes/models.py"], "/api/models.py": ["/recipes/models.py"], "/recipes/auxili...
29,750
fattybobcat/foodgram-project
refs/heads/master
/recipes/context_processors.py
def shop_list_size(request): if request.user.is_authenticated: count = request.user.wishlist_subscriber.all().count() else: count = 0 return { "shop_list_size": count }
{"/recipes/views.py": ["/api/models.py", "/foodgram/settings.py", "/recipes/auxiliary.py", "/recipes/models.py"], "/api/views.py": ["/recipes/models.py", "/api/models.py"], "/recipes/templatetags/recipes_tag_filter.py": ["/api/models.py", "/recipes/models.py"], "/api/models.py": ["/recipes/models.py"], "/recipes/auxili...
29,751
fattybobcat/foodgram-project
refs/heads/master
/recipes/admin.py
from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.db.models import Q from django_admin_multiple_choice_list_filter.list_filters import \ MultipleChoiceListFilter from .models import Ingredient, IngredientAmount, Recipe, User TAG_CHOICES = [ ("bre...
{"/recipes/views.py": ["/api/models.py", "/foodgram/settings.py", "/recipes/auxiliary.py", "/recipes/models.py"], "/api/views.py": ["/recipes/models.py", "/api/models.py"], "/recipes/templatetags/recipes_tag_filter.py": ["/api/models.py", "/recipes/models.py"], "/api/models.py": ["/recipes/models.py"], "/recipes/auxili...
29,755
AlokD123/DisasterHack
refs/heads/master
/tweet.py
#!usr/bin/env python3.7 import tweepy import time from sensor_test import getInput from tweepy.auth import OAuthHandler API_KEY='KZ6deQGfupfWNG1Ab8NcNBz9V' API_SECRET='1gH4yPTIS5RqzQ1Jx9KIcXQ5lupSXNZyTrpDHVyV2nrStiSYz6' ACCESS_TOKEN='973718052561879041-zDzyVVhgUoGk6kSx67G1okYT1aFGzzW' ACCESS_TOKEN_SECRET='2L7MGvPx5zt...
{"/tweet.py": ["/sensor_test.py"], "/take_pic.py": ["/sensor_test.py"]}
29,756
AlokD123/DisasterHack
refs/heads/master
/solace_publish.py
import paho.mqtt.client as mqtt import paho.mqtt.publish as publish import time import json # initialize device # Connection parms for Solace Event Broker solace_url = "mr2aqty0xnecd5.messaging.solace.cloud" #solace_url = "mqtt.eclipse.org" solace_port = 21062 solace_user = "solace-cloud-client" solace_passwd = "80r...
{"/tweet.py": ["/sensor_test.py"], "/take_pic.py": ["/sensor_test.py"]}
29,757
AlokD123/DisasterHack
refs/heads/master
/take_pic.py
import paho.mqtt.client as mqtt import time import json from sensor_test import getInput from picamera import PiCamera import array import base64 def on_publish(mosq,user_data,mid): pass solace_url = "mr2aqty0xnecd5.messaging.solace.cloud" #solace_url = "mqtt.eclipse.org" solace_port = 21062 solace_user = "solace...
{"/tweet.py": ["/sensor_test.py"], "/take_pic.py": ["/sensor_test.py"]}
29,758
AlokD123/DisasterHack
refs/heads/master
/sensor_test.py
''' sensor_test.py - This is basic sensor_test example. Created by Yasin Kaya (selengalp), August 28, 2018. ''' from cellulariot import cellulariot import time import geocoder def getInput(): node = cellulariot.CellularIoTApp() node.setupGPIO() node.disable() time.sleep(1) node.enable() g = geocoder.ip('m...
{"/tweet.py": ["/sensor_test.py"], "/take_pic.py": ["/sensor_test.py"]}
29,762
Ti-Bi/algorithm_py
refs/heads/master
/test/algorithm/ValueEvaluatorTest.py
__author__ = 'Anatol Bludau' from unittest import TestCase from algorithm.ValueEvaluator import ValueEvaluator class ValueEvaluatorTest(TestCase): """ The set of testes for testing value evaluators. """ #------------------------------------------------------------------------------------------- ...
{"/src/algorithm/__init__.py": ["/src/algorithm/Shuffle.py", "/src/algorithm/Sorting.py", "/src/algorithm/ValueEvaluator.py", "/src/algorithm/StringOperations.py"]}
29,763
Ti-Bi/algorithm_py
refs/heads/master
/src/algorithm/Shuffle.py
import random __author__ = 'Anatol Bludau' class Shuffle(object): @classmethod def linear_shuffle(cls, lst): for i in list(range(1, len(lst))): index_for_switch = random.randrange(i) lst[i], lst[index_for_switch] = lst[index_for_switch], lst[i] return lst
{"/src/algorithm/__init__.py": ["/src/algorithm/Shuffle.py", "/src/algorithm/Sorting.py", "/src/algorithm/ValueEvaluator.py", "/src/algorithm/StringOperations.py"]}
29,764
Ti-Bi/algorithm_py
refs/heads/master
/src/algorithm/ValueEvaluator.py
__author__ = 'Anatol Bludau' class ValueEvaluator(object): __rpn_operators_impl = { '+': (lambda a, b: a + b), '-': (lambda a, b: a - b), '*': (lambda a, b: a * b), '/': (lambda a, b: float(a) / b) } __rpn_operators = ''.join(__rpn_operators_impl.keys()) @classmethod ...
{"/src/algorithm/__init__.py": ["/src/algorithm/Shuffle.py", "/src/algorithm/Sorting.py", "/src/algorithm/ValueEvaluator.py", "/src/algorithm/StringOperations.py"]}
29,765
Ti-Bi/algorithm_py
refs/heads/master
/test/utils/__init__.py
__author__ = 'anatolbludau'
{"/src/algorithm/__init__.py": ["/src/algorithm/Shuffle.py", "/src/algorithm/Sorting.py", "/src/algorithm/ValueEvaluator.py", "/src/algorithm/StringOperations.py"]}
29,766
Ti-Bi/algorithm_py
refs/heads/master
/test/algorithm/StringOperationsTest.py
__author__ = 'Anatol Bludau' from unittest import TestCase from algorithm.StringOperations import StringOperations class StringOperationsTest(TestCase): """ ------------------------------------------------------------------------------------------- ### is_palindromic_string() -----------------------...
{"/src/algorithm/__init__.py": ["/src/algorithm/Shuffle.py", "/src/algorithm/Sorting.py", "/src/algorithm/ValueEvaluator.py", "/src/algorithm/StringOperations.py"]}
29,767
Ti-Bi/algorithm_py
refs/heads/master
/src/algorithm/Sorting.py
import random __author__ = 'Anatol Bludau' class Sorting(object): @classmethod def selection_sort(cls, lst): """ The simple implementation of selection sort. :rtype : sorted input list :param lst: list for sorting """ for i in range(len(lst)): min_i...
{"/src/algorithm/__init__.py": ["/src/algorithm/Shuffle.py", "/src/algorithm/Sorting.py", "/src/algorithm/ValueEvaluator.py", "/src/algorithm/StringOperations.py"]}
29,768
Ti-Bi/algorithm_py
refs/heads/master
/test/algorithm/SortingTest.py
import random from unittest import TestCase from algorithm import Sorting __author__ = 'Anatol Bludau' class TestSorting(TestCase): def setUp(self): self.sorted_seq = list(range(100)) self.sorted_seq_with_doubles = list(range(100)) + list(range(35, 75)) self.empty_list = [] # ...
{"/src/algorithm/__init__.py": ["/src/algorithm/Shuffle.py", "/src/algorithm/Sorting.py", "/src/algorithm/ValueEvaluator.py", "/src/algorithm/StringOperations.py"]}
29,769
Ti-Bi/algorithm_py
refs/heads/master
/src/algorithm/__init__.py
__author__ = 'Anatol Bludau' from .Shuffle import Shuffle from .Sorting import Sorting from .ValueEvaluator import ValueEvaluator from .StringOperations import StringOperations
{"/src/algorithm/__init__.py": ["/src/algorithm/Shuffle.py", "/src/algorithm/Sorting.py", "/src/algorithm/ValueEvaluator.py", "/src/algorithm/StringOperations.py"]}
29,770
Ti-Bi/algorithm_py
refs/heads/master
/src/utils/matrix/MatrixBypass.py
__author__ = 'anatolbludau' class MatrixBypass(object): __simple_print = lambda x: print(str(x), end="\t") __print_new_line = lambda x: print() @classmethod def simple(cls, matrix, on_row=__print_new_line, on_element=__simple_print): if not matrix: return for i in matrix...
{"/src/algorithm/__init__.py": ["/src/algorithm/Shuffle.py", "/src/algorithm/Sorting.py", "/src/algorithm/ValueEvaluator.py", "/src/algorithm/StringOperations.py"]}
29,771
Ti-Bi/algorithm_py
refs/heads/master
/test/utils/matrix/MatrixBypassTest.py
__author__ = 'anatolbludau' from unittest import TestCase from utils.matrix.MatrixBypass import MatrixBypass class MatrixBypassTest(TestCase): def test_simple(self): matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] MatrixBypass.simple(matrix) def test_simple_none(self): MatrixBypass.simpl...
{"/src/algorithm/__init__.py": ["/src/algorithm/Shuffle.py", "/src/algorithm/Sorting.py", "/src/algorithm/ValueEvaluator.py", "/src/algorithm/StringOperations.py"]}
29,772
Ti-Bi/algorithm_py
refs/heads/master
/src/algorithm/StringOperations.py
__author__ = 'Anatol Bludau' class StringOperations(object): """ The class includes algorithms, related with string processing. """ @classmethod def find_the_largest_palindromic_substring_brut_force(cls, string): """ Finds the larges palindromic substring in input string. ...
{"/src/algorithm/__init__.py": ["/src/algorithm/Shuffle.py", "/src/algorithm/Sorting.py", "/src/algorithm/ValueEvaluator.py", "/src/algorithm/StringOperations.py"]}
29,773
Ti-Bi/algorithm_py
refs/heads/master
/test/algorithm/ShuffleTest.py
from unittest import TestCase from algorithm import Shuffle __author__ = 'Anatol Bludau' class TestShuffle(TestCase): def setUp(self): self.seq = list(range(10)) def test_linear_shuffle(self): Shuffle.linear_shuffle(self.seq) self.seq.sort() self.assertEqual(self.seq, list...
{"/src/algorithm/__init__.py": ["/src/algorithm/Shuffle.py", "/src/algorithm/Sorting.py", "/src/algorithm/ValueEvaluator.py", "/src/algorithm/StringOperations.py"]}
29,780
sudokid-software/bad_todo_django_app_assignment
refs/heads/master
/todo_django_app/api/views.py
from rest_framework.views import APIView from rest_framework.response import Response from .models import Todo from .serializers import TodoSerializer class TodoView(APIView): """ 2. Delete one or more TODOs. 3. Update one or more TODOs. 4. List all TODOs. a. Able to filter TODOs by state and/or ...
{"/todo_django_app/api/views.py": ["/todo_django_app/api/models.py"]}
29,781
sudokid-software/bad_todo_django_app_assignment
refs/heads/master
/todo_django_app/api/models.py
from django.db import models class Todo(models.Model): STATE_CHOICE = ( ('todo', 'todo'), ('in-progress', 'in-progress'), ('done', 'done'), ) created = models.DateTimeField(auto_now_add=True) updated = models.DateTimeField(auto_now=True) state = models.CharField(choices=S...
{"/todo_django_app/api/views.py": ["/todo_django_app/api/models.py"]}
29,782
sudokid-software/bad_todo_django_app_assignment
refs/heads/master
/todo_django_app/todo_django_app/urls.py
from django.contrib import admin from django.urls import path # from django.urls import path, include # from rest_framework.routers import DefaultRouter from api.views import TodoView, TodoViewSingle # router = DefaultRouter() # router.register('todo', TodoViewSet, base_name='todo') urlpatterns = [ path('api/t...
{"/todo_django_app/api/views.py": ["/todo_django_app/api/models.py"]}
29,785
crogan/PHSX815_Week2
refs/heads/master
/python/MySort.py
#! /usr/bin/env python import sys import numpy as np # import our Random class from python/Random.py file sys.path.append(".") from python.Random import Random ################# # MySort class ################# # class to sort lists of objects in different ways class MySort: """A crappy sorting class""" # i...
{"/python/MySort.py": ["/python/Random.py"], "/python/CoinToss.py": ["/python/Random.py"], "/python/CookieAnalysis.py": ["/python/MySort.py"], "/python/CoinAnalysis.py": ["/python/Random.py"]}
29,786
crogan/PHSX815_Week2
refs/heads/master
/python/CoinToss.py
#! /usr/bin/env python # imports of external packages to use in our code import sys import numpy as np # import our Random class from python/Random.py file sys.path.append(".") from python.Random import Random # main function for our coin toss Python code if __name__ == "__main__": # if the user includes the fla...
{"/python/MySort.py": ["/python/Random.py"], "/python/CoinToss.py": ["/python/Random.py"], "/python/CookieAnalysis.py": ["/python/MySort.py"], "/python/CoinAnalysis.py": ["/python/Random.py"]}
29,787
crogan/PHSX815_Week2
refs/heads/master
/python/CookieAnalysis.py
#! /usr/bin/env python # imports of external packages to use in our code import sys import math import numpy as np import matplotlib.pyplot as plt # import our Random class from python/Random.py file sys.path.append(".") from python.MySort import MySort # main function for our CookieAnalysis Python code if __name__ ...
{"/python/MySort.py": ["/python/Random.py"], "/python/CoinToss.py": ["/python/Random.py"], "/python/CookieAnalysis.py": ["/python/MySort.py"], "/python/CoinAnalysis.py": ["/python/Random.py"]}
29,788
crogan/PHSX815_Week2
refs/heads/master
/python/CoinAnalysis.py
#! /usr/bin/env python # imports of external packages to use in our code import sys import math import numpy as np import matplotlib.pyplot as plt # import our Random class from python/Random.py file sys.path.append(".") from python.Random import Random # main function for our coin toss Python code if __name__ == "_...
{"/python/MySort.py": ["/python/Random.py"], "/python/CoinToss.py": ["/python/Random.py"], "/python/CookieAnalysis.py": ["/python/MySort.py"], "/python/CoinAnalysis.py": ["/python/Random.py"]}
29,789
crogan/PHSX815_Week2
refs/heads/master
/python/Random.py
#! /usr/bin/env python import math import numpy as np ################# # Random class ################# # class that can generate random numbers class Random: """A random number generator class""" # initialization method for Random class def __init__(self, seed = 5555): self.seed = seed ...
{"/python/MySort.py": ["/python/Random.py"], "/python/CoinToss.py": ["/python/Random.py"], "/python/CookieAnalysis.py": ["/python/MySort.py"], "/python/CoinAnalysis.py": ["/python/Random.py"]}
29,791
froggleston/pyani
refs/heads/master
/pyani/pyani_config.py
# Copyright 2013-2015, The James Hutton Insitute # Author: Leighton Pritchard # # This code is part of the pyani package, and is governed by its licence. # Please see the LICENSE file that should have been included as part of # this package. """Configuration settings for the pyani package. """ from matplotlib.colors ...
{"/pyani/anim.py": ["/pyani/pyani_tools.py"]}
29,792
froggleston/pyani
refs/heads/master
/pyani/tetra.py
# Copyright 2013-2015, The James Hutton Insitute # Author: Leighton Pritchard # # This code is part of the pyani package, and is governed by its licence. # Please see the LICENSE file that should have been included as part of # this package. """Code to implement the TETRA average nucleotide identity method. Provides ...
{"/pyani/anim.py": ["/pyani/pyani_tools.py"]}
29,793
froggleston/pyani
refs/heads/master
/tests/test_tetra.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """test_tetra.py Test tetra.py module. These tests are intended to be run from the repository root using: nosetests -v print() statements will be caught by nosetests unless there is an error. They can also be recovered with the -s option. (c) The James Hutton Institut...
{"/pyani/anim.py": ["/pyani/pyani_tools.py"]}
29,794
froggleston/pyani
refs/heads/master
/pyani/pyani_graphics.py
# Copyright 2013-2019, The James Hutton Insitute # Author: Leighton Pritchard # # This code is part of the pyani package, and is governed by its licence. # Please see the LICENSE file that should have been included as part of # this package. """Code to implement graphics output for ANI analyses.""" # Force matplotlib...
{"/pyani/anim.py": ["/pyani/pyani_tools.py"]}
29,795
froggleston/pyani
refs/heads/master
/tests/test_multiprocessing.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """test_multiprocessing.py Test run_multiprocessing.py module. These tests are intended to be run from the repository root using: nosetests -v print() statements will be caught by nosetests unless there is an error. They can also be recovered with the -s option. (c) T...
{"/pyani/anim.py": ["/pyani/pyani_tools.py"]}
29,796
froggleston/pyani
refs/heads/master
/tests/test_anib.py
#!/usr/bin/env python """test_anib.py Test anib.py module. These tests are intended to be run from the repository root using: nosetests -v print() statements will be caught by nosetests unless there is an error. They can also be recovered with the -s option. (c) The James Hutton Institute 2017 Author: Leighton Pr...
{"/pyani/anim.py": ["/pyani/pyani_tools.py"]}
29,797
froggleston/pyani
refs/heads/master
/pyani/anim.py
# Copyright 2013-2017, The James Hutton Insitute # Author: Leighton Pritchard # # This code is part of the pyani package, and is governed by its licence. # Please see the LICENSE file that should have been included as part of # this package. """Code to implement the ANIm average nucleotide identity method. Calculates...
{"/pyani/anim.py": ["/pyani/pyani_tools.py"]}
29,798
froggleston/pyani
refs/heads/master
/tests/test_anim.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """test_anim.py Test anim.py module. These tests are intended to be run from the repository root using: nosetests -v print() statements will be caught by nosetests unless there is an error. They can also be recovered with the -s option. (c) The James Hutton Institute ...
{"/pyani/anim.py": ["/pyani/pyani_tools.py"]}
29,799
froggleston/pyani
refs/heads/master
/tests/test_parsing.py
#!/usr/bin/env python """Tests for pyani package intermediate file parsing These tests are intended to be run using the nose package (see https://nose.readthedocs.org/en/latest/). """ import os from nose.tools import assert_equal from pyani import anim # Work out where we are. We need to do this to find related da...
{"/pyani/anim.py": ["/pyani/pyani_tools.py"]}
29,800
froggleston/pyani
refs/heads/master
/tests/test_concordance.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """test_concordance.py Test for concordance of pyani package output with JSpecies These tests are intended to be run from the repository root using: nosetests -v print() statements will be caught by nosetests unless there is an error. They can also be recovered with th...
{"/pyani/anim.py": ["/pyani/pyani_tools.py"]}
29,801
froggleston/pyani
refs/heads/master
/setup.py
# try using distribute or setuptools or distutils. try: import distribute_setup distribute_setup.use_setuptools() except ImportError: pass import setuptools import os import sys import re # Get long description from README.md with open("README.md", "r") as dfh: long_description = dfh.read() # parse...
{"/pyani/anim.py": ["/pyani/pyani_tools.py"]}
29,802
froggleston/pyani
refs/heads/master
/tests/test_dependencies.py
#!/usr/bin/env python """Tests for availability of pyani dependencies We only test for dependencies from non-standard libraries. These tests are intended to be run using the nose package (see https://nose.readthedocs.org/en/latest/). """ import subprocess import sys from nose.tools import assert_equal, nottest d...
{"/pyani/anim.py": ["/pyani/pyani_tools.py"]}
29,803
froggleston/pyani
refs/heads/master
/pyani/pyani_tools.py
# Copyright 2016-2019, The James Hutton Insitute # Author: Leighton Pritchard # # This code is part of the pyani package, and is governed by its licence. # Please see the LICENSE file that should have been included as part of # this package. """Code to support pyani.""" import pandas as pd from . import pyani_config ...
{"/pyani/anim.py": ["/pyani/pyani_tools.py"]}
29,807
NatanaelGSSilva/backendhome
refs/heads/master
/config.py
class config: SQLALCHEMY_DATABASE_URI = 'sqlite:///database/revenda.db' SQLALCHEMY_TRACK_MODIFICATIONS = False SALT = "X#3jfk$%kKmGw&*jKLiPW@!jm345" JWT_SECRET_KEY = 'hjsdfhj#$@DFhsms@%ldkPç()H#Dnx3@' JWT_BLACKLIST_ENABLED = True
{"/app.py": ["/config.py", "/resources/carros.py", "/resources/propostas.py"], "/resources/propostas.py": ["/models/modelProposta.py"]}
29,808
NatanaelGSSilva/backendhome
refs/heads/master
/app.py
from flask import Flask from config import config from banco import db from resources.carros import carros from resources.marcas import marcas from resources.usuarios import usuarios from resources.propostas import propostas from flask_jwt_extended import JWTManager from blacklist import blacklist import smtplib from f...
{"/app.py": ["/config.py", "/resources/carros.py", "/resources/propostas.py"], "/resources/propostas.py": ["/models/modelProposta.py"]}
29,809
NatanaelGSSilva/backendhome
refs/heads/master
/models/modelProposta.py
from banco import db from datetime import datetime # quinta parte class Proposta(db.Model): __tablename__ = 'propostas' id = db.Column(db.Integer, autoincrement=True, primary_key=True) lance = db.Column(db.Float, nullable=False) nomePessoa = db.Column(db.String(100), nullable=False) telefone = db...
{"/app.py": ["/config.py", "/resources/carros.py", "/resources/propostas.py"], "/resources/propostas.py": ["/models/modelProposta.py"]}
29,810
NatanaelGSSilva/backendhome
refs/heads/master
/resources/carros.py
from flask import Blueprint, jsonify, request from banco import db from models.modelCarro import Carro from flask_jwt_extended import jwt_required carros = Blueprint('carros', __name__) @carros.route('/carros') def listagem(): carros = Carro.query.order_by(Carro.modelo).all() return jsonify([carro.to_json() ...
{"/app.py": ["/config.py", "/resources/carros.py", "/resources/propostas.py"], "/resources/propostas.py": ["/models/modelProposta.py"]}
29,811
NatanaelGSSilva/backendhome
refs/heads/master
/resources/propostas.py
from flask import Blueprint, jsonify, request from banco import db from models.modelProposta import Proposta from models.modelCarro import Carro from flask_jwt_extended import jwt_required from datetime import datetime, timedelta # from flask_cors import CORS, cross_origin import smtplib propostas = Blueprint('propost...
{"/app.py": ["/config.py", "/resources/carros.py", "/resources/propostas.py"], "/resources/propostas.py": ["/models/modelProposta.py"]}
29,818
astropenguin/morecopy
refs/heads/main
/morecopy/copy.py
__all__ = ["copy"] # standard library from copy import copy as stdlib_copy from copy import _copy_dispatch as stdlib_copiers # type: ignore from threading import Lock from typing import TypeVar # submodules from .copiers import copiers # type hints T = TypeVar("T") # lock object lock = Lock() # copy function...
{"/morecopy/copy.py": ["/morecopy/copiers.py"], "/morecopy/__init__.py": ["/morecopy/copy.py", "/morecopy/copiers.py"], "/tests/test_copiers.py": ["/morecopy/copiers.py"], "/tests/test_copy.py": ["/morecopy/copy.py"]}
29,819
astropenguin/morecopy
refs/heads/main
/morecopy/copiers.py
__all__ = ["copier_for"] # standard library from copy import copy from types import FunctionType from typing import Any, Callable, Dict, Iterable, TypeVar # type hints T = TypeVar("T") FT = TypeVar("FT", bound=FunctionType) IT = TypeVar("IT", bound=Iterable) Copier = Callable[[T], T] # decorator def copier_for(ty...
{"/morecopy/copy.py": ["/morecopy/copiers.py"], "/morecopy/__init__.py": ["/morecopy/copy.py", "/morecopy/copiers.py"], "/tests/test_copiers.py": ["/morecopy/copiers.py"], "/tests/test_copy.py": ["/morecopy/copy.py"]}
29,820
astropenguin/morecopy
refs/heads/main
/morecopy/__init__.py
__all__ = [ "copy", "copiers", "copier_for", ] __version__ = "0.3.0" # submodules from . import copy from . import copiers from .copy import * from .copiers import *
{"/morecopy/copy.py": ["/morecopy/copiers.py"], "/morecopy/__init__.py": ["/morecopy/copy.py", "/morecopy/copiers.py"], "/tests/test_copiers.py": ["/morecopy/copiers.py"], "/tests/test_copy.py": ["/morecopy/copy.py"]}
29,821
astropenguin/morecopy
refs/heads/main
/tests/test_copiers.py
# standard library from types import FunctionType, LambdaType from typing import Type, TypeVar # dependencies from morecopy.copiers import copiers from pytest import mark # type hints T = TypeVar("T") # test data def function(a: int, b: int) -> int: return a + b test_header = "type_, value" test_data = [ ...
{"/morecopy/copy.py": ["/morecopy/copiers.py"], "/morecopy/__init__.py": ["/morecopy/copy.py", "/morecopy/copiers.py"], "/tests/test_copiers.py": ["/morecopy/copiers.py"], "/tests/test_copy.py": ["/morecopy/copy.py"]}
29,822
astropenguin/morecopy
refs/heads/main
/tests/test_copy.py
# standard library from copy import copy as stdlib_copy from types import FunctionType, LambdaType from typing import Type, TypeVar # dependencies from morecopy.copy import copy from pytest import mark # type hints T = TypeVar("T") # test data def function(a: int, b: int) -> int: return a + b test_header = ...
{"/morecopy/copy.py": ["/morecopy/copiers.py"], "/morecopy/__init__.py": ["/morecopy/copy.py", "/morecopy/copiers.py"], "/tests/test_copiers.py": ["/morecopy/copiers.py"], "/tests/test_copy.py": ["/morecopy/copy.py"]}
29,964
seung-lab/DynamicAnnotationDB
refs/heads/master
/dynamicannotationdb/migration/alembic/versions/fac66b439033_add_view_model.py
"""Add view model Revision ID: fac66b439033 Revises: 309cf493a1e2 Create Date: 2023-03-07 12:42:08.667620 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = "fac66b439033" down_revision = "309cf493a1e2" branch_labels = No...
{"/dynamicannotationdb/database.py": ["/dynamicannotationdb/errors.py", "/dynamicannotationdb/models.py", "/dynamicannotationdb/schema.py"], "/dynamicannotationdb/__init__.py": ["/dynamicannotationdb/interface.py"], "/dynamicannotationdb/migration/__init__.py": ["/dynamicannotationdb/migration/migrate.py"], "/dynamican...
29,965
seung-lab/DynamicAnnotationDB
refs/heads/master
/dynamicannotationdb/migration/alembic/versions/814d72d74e3b_add_version_error_table.py
"""Add version error table Revision ID: 814d72d74e3b Revises: 975a79461cab Create Date: 2022-09-15 12:23:50.769937 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = "814d72d74e3b" down_revision = "975a79461cab" branch_la...
{"/dynamicannotationdb/database.py": ["/dynamicannotationdb/errors.py", "/dynamicannotationdb/models.py", "/dynamicannotationdb/schema.py"], "/dynamicannotationdb/__init__.py": ["/dynamicannotationdb/interface.py"], "/dynamicannotationdb/migration/__init__.py": ["/dynamicannotationdb/migration/migrate.py"], "/dynamican...
29,966
seung-lab/DynamicAnnotationDB
refs/heads/master
/tests/test_schema.py
import marshmallow from emannotationschemas.errors import UnknownAnnotationTypeException import pytest from sqlalchemy.ext.declarative.api import DeclarativeMeta def test_get_schema(dadb_interface): valid_schema = dadb_interface.schema.get_schema("synapse") assert isinstance(valid_schema, marshmallow.schema.S...
{"/dynamicannotationdb/database.py": ["/dynamicannotationdb/errors.py", "/dynamicannotationdb/models.py", "/dynamicannotationdb/schema.py"], "/dynamicannotationdb/__init__.py": ["/dynamicannotationdb/interface.py"], "/dynamicannotationdb/migration/__init__.py": ["/dynamicannotationdb/migration/migrate.py"], "/dynamican...
29,967
seung-lab/DynamicAnnotationDB
refs/heads/master
/dynamicannotationdb/migration/alembic/versions/8fdc843fc202_adding_permission_and_last_modified.py
"""adding permission and last modified Revision ID: 8fdc843fc202 Revises: 6e7f580ff680 Create Date: 2022-10-17 14:11:33.017738 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = "8fdc843fc202" down_revision = "6e7f580ff68...
{"/dynamicannotationdb/database.py": ["/dynamicannotationdb/errors.py", "/dynamicannotationdb/models.py", "/dynamicannotationdb/schema.py"], "/dynamicannotationdb/__init__.py": ["/dynamicannotationdb/interface.py"], "/dynamicannotationdb/migration/__init__.py": ["/dynamicannotationdb/migration/migrate.py"], "/dynamican...
29,968
seung-lab/DynamicAnnotationDB
refs/heads/master
/dynamicannotationdb/database.py
import logging from contextlib import contextmanager from typing import List from sqlalchemy import create_engine, func, inspect, or_ from sqlalchemy.ext.automap import automap_base from sqlalchemy.ext.declarative.api import DeclarativeMeta from sqlalchemy.orm import Session, scoped_session, sessionmaker from sqlalche...
{"/dynamicannotationdb/database.py": ["/dynamicannotationdb/errors.py", "/dynamicannotationdb/models.py", "/dynamicannotationdb/schema.py"], "/dynamicannotationdb/__init__.py": ["/dynamicannotationdb/interface.py"], "/dynamicannotationdb/migration/__init__.py": ["/dynamicannotationdb/migration/migrate.py"], "/dynamican...
29,969
seung-lab/DynamicAnnotationDB
refs/heads/master
/dynamicannotationdb/migration/alembic/versions/6e7f580ff680_add_error_msg.py
"""Add error msg Revision ID: 6e7f580ff680 Revises: 814d72d74e3b Create Date: 2022-09-22 14:37:41.506933 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '6e7f580ff680' down_revision = '814d72d74e3b' branch_labels = Non...
{"/dynamicannotationdb/database.py": ["/dynamicannotationdb/errors.py", "/dynamicannotationdb/models.py", "/dynamicannotationdb/schema.py"], "/dynamicannotationdb/__init__.py": ["/dynamicannotationdb/interface.py"], "/dynamicannotationdb/migration/__init__.py": ["/dynamicannotationdb/migration/migrate.py"], "/dynamican...
29,970
seung-lab/DynamicAnnotationDB
refs/heads/master
/tests/test_interface.py
import logging def test_create_or_select_database( dadb_interface, database_metadata, annotation_metadata ): aligned_volume = annotation_metadata["aligned_volume"] sql_uri = database_metadata["sql_uri"] new_sql_uri = dadb_interface.create_or_select_database(sql_uri, aligned_volume) logging.info(ne...
{"/dynamicannotationdb/database.py": ["/dynamicannotationdb/errors.py", "/dynamicannotationdb/models.py", "/dynamicannotationdb/schema.py"], "/dynamicannotationdb/__init__.py": ["/dynamicannotationdb/interface.py"], "/dynamicannotationdb/migration/__init__.py": ["/dynamicannotationdb/migration/migrate.py"], "/dynamican...
29,971
seung-lab/DynamicAnnotationDB
refs/heads/master
/dynamicannotationdb/__init__.py
__version__ = "5.7.3" from .interface import DynamicAnnotationInterface
{"/dynamicannotationdb/database.py": ["/dynamicannotationdb/errors.py", "/dynamicannotationdb/models.py", "/dynamicannotationdb/schema.py"], "/dynamicannotationdb/__init__.py": ["/dynamicannotationdb/interface.py"], "/dynamicannotationdb/migration/__init__.py": ["/dynamicannotationdb/migration/migrate.py"], "/dynamican...
29,972
seung-lab/DynamicAnnotationDB
refs/heads/master
/dynamicannotationdb/migration/alembic/versions/975a79461cab_add_is_merged.py
"""Add is merged Revision ID: 975a79461cab Revises: 5a1d7c0ad006 Create Date: 2022-09-15 11:51:21.484964 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = "975a79461cab" down_revision = "5a1d7c0ad006" branch_labels = Non...
{"/dynamicannotationdb/database.py": ["/dynamicannotationdb/errors.py", "/dynamicannotationdb/models.py", "/dynamicannotationdb/schema.py"], "/dynamicannotationdb/__init__.py": ["/dynamicannotationdb/interface.py"], "/dynamicannotationdb/migration/__init__.py": ["/dynamicannotationdb/migration/migrate.py"], "/dynamican...
29,973
seung-lab/DynamicAnnotationDB
refs/heads/master
/dynamicannotationdb/migration/__init__.py
__version__ = "5.7.3" from dynamicannotationdb.migration.migrate import DynamicMigration from dynamicannotationdb.migration.alembic.run import run_alembic_migration
{"/dynamicannotationdb/database.py": ["/dynamicannotationdb/errors.py", "/dynamicannotationdb/models.py", "/dynamicannotationdb/schema.py"], "/dynamicannotationdb/__init__.py": ["/dynamicannotationdb/interface.py"], "/dynamicannotationdb/migration/__init__.py": ["/dynamicannotationdb/migration/migrate.py"], "/dynamican...
29,974
seung-lab/DynamicAnnotationDB
refs/heads/master
/dynamicannotationdb/interface.py
import logging from sqlalchemy import create_engine from sqlalchemy.engine.url import make_url from sqlalchemy.pool import NullPool from .annotation import DynamicAnnotationClient from .database import DynamicAnnotationDB from .models import Base from .schema import DynamicSchemaClient from .segmentation import Dynam...
{"/dynamicannotationdb/database.py": ["/dynamicannotationdb/errors.py", "/dynamicannotationdb/models.py", "/dynamicannotationdb/schema.py"], "/dynamicannotationdb/__init__.py": ["/dynamicannotationdb/interface.py"], "/dynamicannotationdb/migration/__init__.py": ["/dynamicannotationdb/migration/migrate.py"], "/dynamican...
29,975
seung-lab/DynamicAnnotationDB
refs/heads/master
/dynamicannotationdb/errors.py
class TableNameNotFound(KeyError): """Table name is not found in the Metadata table""" def __init__(self, table_name: str): self.table_name = table_name self.message = f"No table named '{self.table_name}' exists." super().__init__(self.message) def __str__(self): return sel...
{"/dynamicannotationdb/database.py": ["/dynamicannotationdb/errors.py", "/dynamicannotationdb/models.py", "/dynamicannotationdb/schema.py"], "/dynamicannotationdb/__init__.py": ["/dynamicannotationdb/interface.py"], "/dynamicannotationdb/migration/__init__.py": ["/dynamicannotationdb/migration/migrate.py"], "/dynamican...
29,976
seung-lab/DynamicAnnotationDB
refs/heads/master
/tests/test_segmentation.py
import logging from emannotationschemas import type_mapping from emannotationschemas.schemas.base import ReferenceAnnotation def test_create_segmentation_table(dadb_interface, annotation_metadata): table_name = annotation_metadata["table_name"] pcg_table_name = annotation_metadata["pcg_table_name"] tabl...
{"/dynamicannotationdb/database.py": ["/dynamicannotationdb/errors.py", "/dynamicannotationdb/models.py", "/dynamicannotationdb/schema.py"], "/dynamicannotationdb/__init__.py": ["/dynamicannotationdb/interface.py"], "/dynamicannotationdb/migration/__init__.py": ["/dynamicannotationdb/migration/migrate.py"], "/dynamican...
29,977
seung-lab/DynamicAnnotationDB
refs/heads/master
/dynamicannotationdb/models.py
import enum from emannotationschemas.models import Base from sqlalchemy import ( Boolean, CheckConstraint, Column, DateTime, Float, ForeignKey, Integer, String, Text, Enum, JSON, ) from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationshi...
{"/dynamicannotationdb/database.py": ["/dynamicannotationdb/errors.py", "/dynamicannotationdb/models.py", "/dynamicannotationdb/schema.py"], "/dynamicannotationdb/__init__.py": ["/dynamicannotationdb/interface.py"], "/dynamicannotationdb/migration/__init__.py": ["/dynamicannotationdb/migration/migrate.py"], "/dynamican...
29,978
seung-lab/DynamicAnnotationDB
refs/heads/master
/dynamicannotationdb/migration/alembic/versions/7c79eff751b4_add_parent_version_column.py
"""Add parent_version column Revision ID: 7c79eff751b4 Revises: ef5c2d7f96d8 Create Date: 2022-08-08 10:02:40.077429 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql from sqlalchemy import engine_from_config from sqlalchemy.engine import reflection # revision identifiers,...
{"/dynamicannotationdb/database.py": ["/dynamicannotationdb/errors.py", "/dynamicannotationdb/models.py", "/dynamicannotationdb/schema.py"], "/dynamicannotationdb/__init__.py": ["/dynamicannotationdb/interface.py"], "/dynamicannotationdb/migration/__init__.py": ["/dynamicannotationdb/migration/migrate.py"], "/dynamican...
29,979
seung-lab/DynamicAnnotationDB
refs/heads/master
/dynamicannotationdb/segmentation.py
import datetime import logging from typing import List from marshmallow import INCLUDE from .database import DynamicAnnotationDB from .errors import ( AnnotationInsertLimitExceeded, IdsAlreadyExists, UpdateAnnotationError, ) from .key_utils import build_segmentation_table_name from .models import Segmenta...
{"/dynamicannotationdb/database.py": ["/dynamicannotationdb/errors.py", "/dynamicannotationdb/models.py", "/dynamicannotationdb/schema.py"], "/dynamicannotationdb/__init__.py": ["/dynamicannotationdb/interface.py"], "/dynamicannotationdb/migration/__init__.py": ["/dynamicannotationdb/migration/migrate.py"], "/dynamican...
29,980
seung-lab/DynamicAnnotationDB
refs/heads/master
/tests/test_database.py
import logging import datetime import pytest from sqlalchemy import Table from sqlalchemy.ext.declarative.api import DeclarativeMeta from emannotationschemas import type_mapping def test_get_table_metadata(dadb_interface, annotation_metadata): table_name = annotation_metadata["table_name"] schema_type = ann...
{"/dynamicannotationdb/database.py": ["/dynamicannotationdb/errors.py", "/dynamicannotationdb/models.py", "/dynamicannotationdb/schema.py"], "/dynamicannotationdb/__init__.py": ["/dynamicannotationdb/interface.py"], "/dynamicannotationdb/migration/__init__.py": ["/dynamicannotationdb/migration/migrate.py"], "/dynamican...
29,981
seung-lab/DynamicAnnotationDB
refs/heads/master
/dynamicannotationdb/migration/alembic/versions/309cf493a1e2_adding_warning_field.py
"""adding warning field Revision ID: 309cf493a1e2 Revises: 8fdc843fc202 Create Date: 2022-10-20 10:25:05.014779 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '309cf493a1e2' down_revision = '8fdc843fc202' branch_label...
{"/dynamicannotationdb/database.py": ["/dynamicannotationdb/errors.py", "/dynamicannotationdb/models.py", "/dynamicannotationdb/schema.py"], "/dynamicannotationdb/__init__.py": ["/dynamicannotationdb/interface.py"], "/dynamicannotationdb/migration/__init__.py": ["/dynamicannotationdb/migration/migrate.py"], "/dynamican...
29,982
seung-lab/DynamicAnnotationDB
refs/heads/master
/dynamicannotationdb/migration/alembic/versions/5a1d7c0ad006_add_status_column.py
"""add status column Revision ID: 5a1d7c0ad006 Revises: 7c79eff751b4 Create Date: 2022-08-16 13:47:38.842604 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = "5a1d7c0ad006" down_revision = "7c79eff751b4" branch_labels = ...
{"/dynamicannotationdb/database.py": ["/dynamicannotationdb/errors.py", "/dynamicannotationdb/models.py", "/dynamicannotationdb/schema.py"], "/dynamicannotationdb/__init__.py": ["/dynamicannotationdb/interface.py"], "/dynamicannotationdb/migration/__init__.py": ["/dynamicannotationdb/migration/migrate.py"], "/dynamican...
29,983
seung-lab/DynamicAnnotationDB
refs/heads/master
/dynamicannotationdb/key_utils.py
def build_segmentation_table_name( annotation_table_name: str, segmentation_source: str ) -> str: """Creates a table name that combines annotation table and appends segmentation table name Parameters ---------- annotation_table_name : str exiting annotation table name segmentation_s...
{"/dynamicannotationdb/database.py": ["/dynamicannotationdb/errors.py", "/dynamicannotationdb/models.py", "/dynamicannotationdb/schema.py"], "/dynamicannotationdb/__init__.py": ["/dynamicannotationdb/interface.py"], "/dynamicannotationdb/migration/__init__.py": ["/dynamicannotationdb/migration/migrate.py"], "/dynamican...
29,984
seung-lab/DynamicAnnotationDB
refs/heads/master
/tests/test_errors.py
import pytest from dynamicannotationdb.errors import ( TableNameNotFound, UpdateAnnotationError, AnnotationInsertLimitExceeded, NoAnnotationsFoundWithID, ) def table_not_found(): raise TableNameNotFound("test_table") def update_annotation_error(): raise UpdateAnnotationError(1, 3) def anno...
{"/dynamicannotationdb/database.py": ["/dynamicannotationdb/errors.py", "/dynamicannotationdb/models.py", "/dynamicannotationdb/schema.py"], "/dynamicannotationdb/__init__.py": ["/dynamicannotationdb/interface.py"], "/dynamicannotationdb/migration/__init__.py": ["/dynamicannotationdb/migration/migrate.py"], "/dynamican...
29,985
seung-lab/DynamicAnnotationDB
refs/heads/master
/dynamicannotationdb/schema.py
from typing import Sequence, Tuple from emannotationschemas import get_schema from emannotationschemas import models as em_models from emannotationschemas.flatten import create_flattened_schema, flatten_dict from emannotationschemas.schemas.base import ReferenceAnnotation, SegmentationField from marshmallow import EXC...
{"/dynamicannotationdb/database.py": ["/dynamicannotationdb/errors.py", "/dynamicannotationdb/models.py", "/dynamicannotationdb/schema.py"], "/dynamicannotationdb/__init__.py": ["/dynamicannotationdb/interface.py"], "/dynamicannotationdb/migration/__init__.py": ["/dynamicannotationdb/migration/migrate.py"], "/dynamican...
29,986
seung-lab/DynamicAnnotationDB
refs/heads/master
/dynamicannotationdb/migration/migrate.py
import logging from geoalchemy2.types import Geometry from psycopg2.errors import DuplicateSchema from sqlalchemy import MetaData, create_engine, ForeignKeyConstraint from sqlalchemy.engine.url import make_url from sqlalchemy.pool import NullPool from sqlalchemy import MetaData, Table from sqlalchemy.sql.ddl import Ad...
{"/dynamicannotationdb/database.py": ["/dynamicannotationdb/errors.py", "/dynamicannotationdb/models.py", "/dynamicannotationdb/schema.py"], "/dynamicannotationdb/__init__.py": ["/dynamicannotationdb/interface.py"], "/dynamicannotationdb/migration/__init__.py": ["/dynamicannotationdb/migration/migrate.py"], "/dynamican...
29,987
seung-lab/DynamicAnnotationDB
refs/heads/master
/tests/conftest.py
import logging import time import uuid import warnings import docker import psycopg2 import pytest from dynamicannotationdb import DynamicAnnotationInterface logging.basicConfig(level=logging.DEBUG) test_logger = logging.getLogger() def pytest_addoption(parser): parser.addoption( "--docker", ac...
{"/dynamicannotationdb/database.py": ["/dynamicannotationdb/errors.py", "/dynamicannotationdb/models.py", "/dynamicannotationdb/schema.py"], "/dynamicannotationdb/__init__.py": ["/dynamicannotationdb/interface.py"], "/dynamicannotationdb/migration/__init__.py": ["/dynamicannotationdb/migration/migrate.py"], "/dynamican...
29,988
seung-lab/DynamicAnnotationDB
refs/heads/master
/dynamicannotationdb/migration/alembic/versions/ef5c2d7f96d8_initial_live_db_models.py
"""Initial Live DB models Revision ID: ef5c2d7f96d8 Revises: Create Date: 2022-08-08 09:59:29.189065 """ from alembic import op import sqlalchemy as sa from sqlalchemy.engine import reflection from sqlalchemy import engine_from_config # revision identifiers, used by Alembic. revision = "ef5c2d7f96d8" down_revision ...
{"/dynamicannotationdb/database.py": ["/dynamicannotationdb/errors.py", "/dynamicannotationdb/models.py", "/dynamicannotationdb/schema.py"], "/dynamicannotationdb/__init__.py": ["/dynamicannotationdb/interface.py"], "/dynamicannotationdb/migration/__init__.py": ["/dynamicannotationdb/migration/migrate.py"], "/dynamican...