index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
39,495,705
xdiabetes/xproject_api
refs/heads/master
/xapp/api_v1/modules/payment/common.py
# common payment functions from xapp.api_v1.consts import InvoiceConsts def validate_invoice(invoice): return invoice.fake or invoice.status not in [InvoiceConsts.PAYED, InvoiceConsts.INTERNAL, InvoiceConsts.IN_PA...
{"/user_profile/models.py": ["/location/models.py", "/user_profile/helpers.py"], "/diabo/tests.py": ["/diabo/models.py", "/job/models.py", "/user_profile/serializers.py", "/user_profile/tests.py"], "/job/tests.py": ["/job/models.py", "/user_profile/tests.py"], "/diabo/views.py": ["/diabo/models.py", "/job/models.py", "...
39,495,706
xdiabetes/xproject_api
refs/heads/master
/xapp/api_v1/consts.py
from django.utils.translation import gettext as _ class InvoiceConsts: # balance types DEPOSIT = '0' WITHDRAW = '1' CLEARING = '2' # states PAYED = '0' CREATED = '1' IN_PAYMENT = '2' REJECTED = '3' INTERNAL = '4' REFUNDED = '5' # tags CHARGE_WALLET = '3' CHARG...
{"/user_profile/models.py": ["/location/models.py", "/user_profile/helpers.py"], "/diabo/tests.py": ["/diabo/models.py", "/job/models.py", "/user_profile/serializers.py", "/user_profile/tests.py"], "/job/tests.py": ["/job/models.py", "/user_profile/tests.py"], "/diabo/views.py": ["/diabo/models.py", "/job/models.py", "...
39,495,707
xdiabetes/xproject_api
refs/heads/master
/xapp/api_v1/consumers/helpers.py
from django.db.models.query import QuerySet from django.http.response import Http404 from django.utils.translation import gettext as _ class SocketException(Exception): pass class SafeNotFoundException(SocketException): status_code = 404 POST = 'POST' PUT = 'PUT' DELETE = 'DELETE' GET = 'GET' WATCH = 'WAT...
{"/user_profile/models.py": ["/location/models.py", "/user_profile/helpers.py"], "/diabo/tests.py": ["/diabo/models.py", "/job/models.py", "/user_profile/serializers.py", "/user_profile/tests.py"], "/job/tests.py": ["/job/models.py", "/user_profile/tests.py"], "/diabo/views.py": ["/diabo/models.py", "/job/models.py", "...
39,495,708
xdiabetes/xproject_api
refs/heads/master
/xapp/apps.py
from django.apps import AppConfig class XprojectConfig(AppConfig): name = 'xapp'
{"/user_profile/models.py": ["/location/models.py", "/user_profile/helpers.py"], "/diabo/tests.py": ["/diabo/models.py", "/job/models.py", "/user_profile/serializers.py", "/user_profile/tests.py"], "/job/tests.py": ["/job/models.py", "/user_profile/tests.py"], "/diabo/views.py": ["/diabo/models.py", "/job/models.py", "...
39,495,709
xdiabetes/xproject_api
refs/heads/master
/xapp/api_v1/views/UserProfileViews.py
from django.utils.translation import ugettext as _ from rest_framework import generics, status from rest_framework.authtoken.models import Token from rest_framework.generics import RetrieveUpdateAPIView from rest_framework.response import Response from xapp.api_v1.consts import UserProfileConsts from xapp.api_v1.permi...
{"/user_profile/models.py": ["/location/models.py", "/user_profile/helpers.py"], "/diabo/tests.py": ["/diabo/models.py", "/job/models.py", "/user_profile/serializers.py", "/user_profile/tests.py"], "/job/tests.py": ["/job/models.py", "/user_profile/tests.py"], "/diabo/views.py": ["/diabo/models.py", "/job/models.py", "...
39,495,710
xdiabetes/xproject_api
refs/heads/master
/xapp/api_v1/serializers/UserProfileSerializrs.py
from django.contrib.auth.models import User from django.core.validators import RegexValidator from django.db import transaction from django.db.models import Q from rest_framework import serializers from xapp.api_v1.consts import UserProfileConsts from xapp.models import UserProfile from django.utils.translation impor...
{"/user_profile/models.py": ["/location/models.py", "/user_profile/helpers.py"], "/diabo/tests.py": ["/diabo/models.py", "/job/models.py", "/user_profile/serializers.py", "/user_profile/tests.py"], "/job/tests.py": ["/job/models.py", "/user_profile/tests.py"], "/diabo/views.py": ["/diabo/models.py", "/job/models.py", "...
39,495,711
xdiabetes/xproject_api
refs/heads/master
/xapp/api_v1/modules/payment/vandar.py
import json import math import requests from django.shortcuts import get_object_or_404 from django.urls import reverse from xproject.secret import VANDAR_API_KEY, DEMO from xapp.api_v1.consts import InvoiceConsts from xapp.api_v1.modules.payment.common import validate_invoice from xapp.models import Invoice def van...
{"/user_profile/models.py": ["/location/models.py", "/user_profile/helpers.py"], "/diabo/tests.py": ["/diabo/models.py", "/job/models.py", "/user_profile/serializers.py", "/user_profile/tests.py"], "/job/tests.py": ["/job/models.py", "/user_profile/tests.py"], "/diabo/views.py": ["/diabo/models.py", "/job/models.py", "...
39,495,712
xdiabetes/xproject_api
refs/heads/master
/xapp/api_v1/urls.py
from django.conf.urls import url from django.http import HttpResponse from django.urls import path from drf_yasg import openapi from drf_yasg.views import get_schema_view from rest_framework import permissions from xapp.api_v1.views.UserProfileViews import UserProfileRUView, UserProfileAuthTokenView, \ SendXprojec...
{"/user_profile/models.py": ["/location/models.py", "/user_profile/helpers.py"], "/diabo/tests.py": ["/diabo/models.py", "/job/models.py", "/user_profile/serializers.py", "/user_profile/tests.py"], "/job/tests.py": ["/job/models.py", "/user_profile/tests.py"], "/diabo/views.py": ["/diabo/models.py", "/job/models.py", "...
39,495,713
xdiabetes/xproject_api
refs/heads/master
/xapp/api_v1/modules/payment/pep.py
import datetime import json import math import requests from django.urls import reverse from django.utils import timezone from xproject.secret import DEMO, PEP_TERMINAL_CODE, PEP_MERCHANT_CODE, PEP_PRIVATE_KEY from xapp.api_v1.consts import InvoiceConsts from xapp.api_v1.helpers import kavenegar_send_sms, datetime_to...
{"/user_profile/models.py": ["/location/models.py", "/user_profile/helpers.py"], "/diabo/tests.py": ["/diabo/models.py", "/job/models.py", "/user_profile/serializers.py", "/user_profile/tests.py"], "/job/tests.py": ["/job/models.py", "/user_profile/tests.py"], "/diabo/views.py": ["/diabo/models.py", "/job/models.py", "...
39,495,714
xdiabetes/xproject_api
refs/heads/master
/xapp/api_v1/routing.py
# chat/routing.py from django.urls import path from xapp.api_v1.consumers import DispatchConsumer websocket_urlpatterns = [ path('ws/v1/', DispatchConsumer.DispatchConsumer), ]
{"/user_profile/models.py": ["/location/models.py", "/user_profile/helpers.py"], "/diabo/tests.py": ["/diabo/models.py", "/job/models.py", "/user_profile/serializers.py", "/user_profile/tests.py"], "/job/tests.py": ["/job/models.py", "/user_profile/tests.py"], "/diabo/views.py": ["/diabo/models.py", "/job/models.py", "...
39,495,715
xdiabetes/xproject_api
refs/heads/master
/xapp/api_v1/consumers/paths.py
from typing import List from .ConsumerView import path from .consumer_views import TableProductManageByToken, TableProductManageByPk, TableSimpleJoinByPkView, \ TableSimpleJoinView, TableAggregateData, CafeTablePrintersJob, TableStatusView, TableSimpleJoinByUUIDView paths = [ path('table/<table_token>/product...
{"/user_profile/models.py": ["/location/models.py", "/user_profile/helpers.py"], "/diabo/tests.py": ["/diabo/models.py", "/job/models.py", "/user_profile/serializers.py", "/user_profile/tests.py"], "/job/tests.py": ["/job/models.py", "/user_profile/tests.py"], "/diabo/views.py": ["/diabo/models.py", "/job/models.py", "...
39,495,716
xdiabetes/xproject_api
refs/heads/master
/xapp/api_v1/consumers/consumer_views.py
from django.db import transaction from django.db.models import Q from django.utils.translation import gettext as _ from rest_framework import status from .ConsumerView import BaseConsumerView, Path, ConsumerRetrieveAPIView, ConsumerListAPIView from .ConsumerView import ConsumerResponse as Response from .ConsumerView i...
{"/user_profile/models.py": ["/location/models.py", "/user_profile/helpers.py"], "/diabo/tests.py": ["/diabo/models.py", "/job/models.py", "/user_profile/serializers.py", "/user_profile/tests.py"], "/job/tests.py": ["/job/models.py", "/user_profile/tests.py"], "/diabo/views.py": ["/diabo/models.py", "/job/models.py", "...
39,495,717
xdiabetes/xproject_api
refs/heads/master
/xapp/migrations/0001_initial.py
# Generated by Django 2.2.4 on 2021-07-10 08:59 from django.conf import settings import django.core.validators from django.db import migrations, models import django.db.models.deletion import xapp.api_v1.helpers class Migration(migrations.Migration): initial = True dependencies = [ migrations.swapp...
{"/user_profile/models.py": ["/location/models.py", "/user_profile/helpers.py"], "/diabo/tests.py": ["/diabo/models.py", "/job/models.py", "/user_profile/serializers.py", "/user_profile/tests.py"], "/job/tests.py": ["/job/models.py", "/user_profile/tests.py"], "/diabo/views.py": ["/diabo/models.py", "/job/models.py", "...
39,495,718
xdiabetes/xproject_api
refs/heads/master
/xapp/api_v1/modules/payment/index.py
from xapp.api_v1.modules.payment.pep import pep_prepare_for_payment, pep_verify_payment, pep_refund_payment from xapp.api_v1.modules.payment.vandar import vandar_prepare_for_payment, vandar_verify_payment # payment gates VANDAR = 'VANDAR' PEP = 'PEP' PAYPING = 'PAYPING' LOCAL = 'LOCAL' pg_displays = { VANDAR: 'ون...
{"/user_profile/models.py": ["/location/models.py", "/user_profile/helpers.py"], "/diabo/tests.py": ["/diabo/models.py", "/job/models.py", "/user_profile/serializers.py", "/user_profile/tests.py"], "/job/tests.py": ["/job/models.py", "/user_profile/tests.py"], "/diabo/views.py": ["/diabo/models.py", "/job/models.py", "...
39,495,719
xdiabetes/xproject_api
refs/heads/master
/sms/migrations/0009_auto_20200305_1318.py
# Generated by Django 2.2.4 on 2020-03-05 13:18 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sms', '0008_auto_20200305_1317'), ] operations = [ migrations.AlterField( model_name='operator', name='api_key', ...
{"/user_profile/models.py": ["/location/models.py", "/user_profile/helpers.py"], "/diabo/tests.py": ["/diabo/models.py", "/job/models.py", "/user_profile/serializers.py", "/user_profile/tests.py"], "/job/tests.py": ["/job/models.py", "/user_profile/tests.py"], "/diabo/views.py": ["/diabo/models.py", "/job/models.py", "...
39,495,720
xdiabetes/xproject_api
refs/heads/master
/sms/migrations/0010_auto_20200305_1325.py
# Generated by Django 2.2.4 on 2020-03-05 13:25 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sms', '0009_auto_20200305_1318'), ] operations = [ migrations.AlterField( model_name='message', name='block_code', ...
{"/user_profile/models.py": ["/location/models.py", "/user_profile/helpers.py"], "/diabo/tests.py": ["/diabo/models.py", "/job/models.py", "/user_profile/serializers.py", "/user_profile/tests.py"], "/job/tests.py": ["/job/models.py", "/user_profile/tests.py"], "/diabo/views.py": ["/diabo/models.py", "/job/models.py", "...
39,495,721
xdiabetes/xproject_api
refs/heads/master
/sms/migrations/0008_auto_20200305_1317.py
# Generated by Django 2.2.4 on 2020-03-05 13:17 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sms', '0007_auto_20191010_1300'), ] operations = [ migrations.AddField( model_name='operator', name='api_key', ...
{"/user_profile/models.py": ["/location/models.py", "/user_profile/helpers.py"], "/diabo/tests.py": ["/diabo/models.py", "/job/models.py", "/user_profile/serializers.py", "/user_profile/tests.py"], "/job/tests.py": ["/job/models.py", "/user_profile/tests.py"], "/diabo/views.py": ["/diabo/models.py", "/job/models.py", "...
39,495,722
xdiabetes/xproject_api
refs/heads/master
/xapp/models.py
from django.contrib.auth.models import User from django.core.validators import RegexValidator from django.db import models, transaction from django.db.models.signals import post_save from django.dispatch import receiver from django.utils import timezone from django.utils.translation import gettext as _ from rest_framew...
{"/user_profile/models.py": ["/location/models.py", "/user_profile/helpers.py"], "/diabo/tests.py": ["/diabo/models.py", "/job/models.py", "/user_profile/serializers.py", "/user_profile/tests.py"], "/job/tests.py": ["/job/models.py", "/user_profile/tests.py"], "/diabo/views.py": ["/diabo/models.py", "/job/models.py", "...
39,495,723
xdiabetes/xproject_api
refs/heads/master
/xapp/api_v1/helpers.py
import asyncio import calendar import datetime import json import random import jdatetime import pytz import requests from asgiref.sync import async_to_sync from django.db.models import F, Count from django.db.models.aggregates import Sum from django.shortcuts import get_object_or_404 from django.utils.translation imp...
{"/user_profile/models.py": ["/location/models.py", "/user_profile/helpers.py"], "/diabo/tests.py": ["/diabo/models.py", "/job/models.py", "/user_profile/serializers.py", "/user_profile/tests.py"], "/job/tests.py": ["/job/models.py", "/user_profile/tests.py"], "/diabo/views.py": ["/diabo/models.py", "/job/models.py", "...
39,495,724
xdiabetes/xproject_api
refs/heads/master
/xapp/api_v1/permissions.py
from rest_framework import permissions from django.shortcuts import get_object_or_404 from rest_framework.permissions import SAFE_METHODS from xapp.models import * from django.utils.translation import gettext as _ from xapp.api_v1.consts import CafeUserProfileRelationConsts ANY = "__ANY__" def is_authenticated(requ...
{"/user_profile/models.py": ["/location/models.py", "/user_profile/helpers.py"], "/diabo/tests.py": ["/diabo/models.py", "/job/models.py", "/user_profile/serializers.py", "/user_profile/tests.py"], "/job/tests.py": ["/job/models.py", "/user_profile/tests.py"], "/diabo/views.py": ["/diabo/models.py", "/job/models.py", "...
39,495,725
xdiabetes/xproject_api
refs/heads/master
/xapp/api_v1/consumers/BasicConsumer.py
import json from json import JSONDecodeError from channels.generic.websocket import AsyncWebsocketConsumer from django.utils.translation import gettext as _ from rest_framework.authtoken.models import Token from channels.db import database_sync_to_async from xapp.api_v1.consumers.ConsumerView import ConsumerResponse f...
{"/user_profile/models.py": ["/location/models.py", "/user_profile/helpers.py"], "/diabo/tests.py": ["/diabo/models.py", "/job/models.py", "/user_profile/serializers.py", "/user_profile/tests.py"], "/job/tests.py": ["/job/models.py", "/user_profile/tests.py"], "/diabo/views.py": ["/diabo/models.py", "/job/models.py", "...
39,534,170
tegardp/Arsipku
refs/heads/master
/arsip/views.py
from django.shortcuts import render, redirect from django.views.generic import ListView, CreateView, UpdateView, DetailView, DeleteView from .models import * from django.urls import reverse_lazy from django import forms # Umum View class UmumList(ListView): model = Umum template_name = 'arsip/umum/umum_list.h...
{"/arsip/admin.py": ["/arsip/models.py"], "/arsip/urls.py": ["/arsip/views.py"], "/arsip/views.py": ["/arsip/models.py"]}
39,620,401
frankie-g1/Lab2Pong
refs/heads/master
/ball.py
import pygame class Ball: RADIUS = 10 def __init__(self, x, y, vx, vy, fgcolor, bgcolor, screen, wall, ceiling, floor): # Instance variables self.x = x self.y = y self.screen = screen self.vx = vx self.vy = vy self.fgcolor = fgcolor self.bgcolor...
{"/pongLab3.py": ["/ball.py"]}
39,620,402
frankie-g1/Lab2Pong
refs/heads/master
/pongLab3.py
import pygame as pg from ball import Ball import random def main(): pg.init() pg.display.set_caption("My Pong") # Create a surface WIDTH = 800 HEIGHT = 480 BORDER = 20 VELOCITY_x = -7 FPS = 60 if (bool(random.getrandbits(1)) == True): VELOCITY_y = -7 else: VEL...
{"/pongLab3.py": ["/ball.py"]}
39,643,173
lesite/Shoplifter
HEAD
/shoplifter/payment/backend/modules/dummy.py
from shoplifter.payment.lib.credentials import GiftCard, DebitCard from shoplifter.payment.backend import BaseBackend from shoplifter.payment.backend.modules.dummy_controllers import ( enable_controllers, DummyDebitLookup) class TransactionTypeNotSupported(Exception): pass class DummyBackend(BaseBackend): ...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,174
lesite/Shoplifter
HEAD
/tests/core/util/string_examples.py
# encoding: utf-8 from shoplifter.core.util import force_unicode, slugify from ...helpers import * def assert_unicode_and_equal(got, expected): assert_equal(got, expected) assert_is_instance(got, unicode) class ForceUnicodeExamples(object): def test_force_unicode_on_unicode(self): u = u'some u...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,175
lesite/Shoplifter
HEAD
/tests/payment/credential_spec.py
# encoding: utf-8 import mongoengine from unittest import TestCase from shoplifter.payment import config from shoplifter.core import plugins as core_plugins from shoplifter.payment.lib.credentials import ( CreditCard, GiftCard, DebitCard, PaymentCredential) from nose.tools import assert_equals, assert_raises cl...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,176
lesite/Shoplifter
HEAD
/tests/payment/api_spec.py
import mongoengine import decimal from shoplifter.core import plugins as core_plugins from shoplifter.payment.lib.test_helpers import TestOrder from shoplifter.payment import plugins from shoplifter.payment import config from shoplifter.payment.models import ( Authorization, Payment, Addressee, BaseTransaction) fr...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,177
lesite/Shoplifter
HEAD
/tests/core/util/cipher_specs.py
# -*- coding: utf-8 -*- from nose.tools import assert_equals from shoplifter.core.util import Cipher class CipherSpecs(object): def setup(self): self.cipher = Cipher('testkey123456789') def can_encrypt_a_string(self): original = 'derp herp' expected_encrypted = 'a89d1d6f224e8f2a3c' ...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,178
lesite/Shoplifter
HEAD
/shoplifter/core/util/string.py
# encoding: utf-8 import re import unicodedata __all__ = ['force_unicode', 'slugify'] def force_unicode(value, encoding='utf-8', errors='strict'): """ Force a value to be unicode. If the value is a bytestring, it will call decode using the given encoding and errors strategy. If it has a __uni...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,179
lesite/Shoplifter
HEAD
/shoplifter/payment/models.py
from mongoengine import IntField, BooleanField, StringField, \ EmailField, DateTimeField, EmbeddedDocumentField, \ ReferenceField, EmbeddedDocument, Document from shoplifter.core.db.field import MoneyField from shoplifter.payment import plugins class Addressee(EmbeddedDocument): """ This is metadata t...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,180
lesite/Shoplifter
HEAD
/features/steps.py
# -*- coding: utf-8 -*- # Monkeypatching memcache client to use mockcache instead. import memcache import mockcache memcache.Client = mockcache.Client import decimal from pkg_resources import load_entry_point import mongoengine from lettuce import step, world from nose.tools import assert_equals from shoplifter.pay...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,181
lesite/Shoplifter
HEAD
/tests/__init__.py
import mongoengine as db def setup(): db.connect('shoplifter_test')
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,182
lesite/Shoplifter
HEAD
/tests/catalog/product_spec.py
# encoding: utf-8 from shoplifter.catalog.product.model import Product from tests.helpers import * from .. import db from .helpers import create_product class ProductSpec(object): def resave(self, **kwargs): "Resave the Product in self.p with some fields changed." for k, v, in kwargs.items(): ...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,183
lesite/Shoplifter
HEAD
/shoplifter/payment/exceptions.py
class LuhnCheckFail(Exception): pass class GatewayTimeOut(Exception): pass class EarlyAuthFail(Exception): pass class AuthorizationAmountTooHigh(Exception): """ TODO: Try to automatically deal with?.. """ pass class RequestError(Exception): pass class GatewayError(Exceptio...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,184
lesite/Shoplifter
HEAD
/shoplifter/payment/backend/modules/__init__.py
from shoplifter.payment.backend.modules.dummy import DummyBackend, \ DummyGiftCardBackend, DummyDebitCardBackend __all__ = ['DummyBackend', 'DummyGiftCardBackend', 'DummyDebitCardBackend']
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,185
lesite/Shoplifter
HEAD
/shoplifter/core/__init__.py
from shoplifter.core.config import PluginHost __all__ = ['plugins', ] plugins = PluginHost('shoplifter', __package__)
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,186
lesite/Shoplifter
HEAD
/tests/catalog/__init__.py
# encoding: utf-8 from shoplifter.catalog.product.model import Product, Variant def setup(): Variant.drop_collection() Product.drop_collection()
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,187
lesite/Shoplifter
HEAD
/tests/core/temp_store_specs.py
# Monkeypatching memcache client to use mockcache instead. import memcache import mockcache memcache.Client = mockcache.Client from shoplifter.core.tempstore import ( TempStore, MemcacheStore, DummyStore) from shoplifter.core.util import Cipher from unittest import TestCase from nose.tools import assert_equals, as...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,188
lesite/Shoplifter
HEAD
/shoplifter/payment/backend/modules/dummy_controllers.py
try: from web.core import RESTMethod, Controller from web.core.http import HTTPNotFound except ImportError: enable_controllers = False DummyDebitLookup = None else: enable_controllers = True class DummyDebitController(RESTMethod): def __init__(self, payment, backend, *a, **kw): ...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,189
lesite/Shoplifter
HEAD
/shoplifter/core/util/cipher.py
# encoding: utf-8 from Crypto.Cipher import AES __all__ = ['Cipher'] class Cipher(object): def __init__(self, key): self.key = key def get_cipher(self): """ Returns a Crypto AES Cipher object """ return AES.new(self.key, AES.MODE_CFB) def encrypt(self, data): """ Makes...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,190
lesite/Shoplifter
HEAD
/tests/catalog/variant_spec.py
# encoding: utf-8 from nose.tools import * from shoplifter.catalog.product.model import Product, Variant from .. import db from .helpers import create_product, create_variant class VariantSpec(object): def setup(self): self.code = 'SHOPTEE' self.name = 'Shoplifter T-Shirt' Product._tes...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,191
lesite/Shoplifter
HEAD
/shoplifter/catalog/product/model.py
# encoding: utf-8 import mongoengine as db from shoplifter.core import util from shoplifter.catalog.taxonomy.model import Taxonomy class Product(db.Document): code = db.StringField(primary_key=True, min_length=3, max_length=30, unique=True) name = db.StringField(required=True, min_length=3, max_...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,192
lesite/Shoplifter
HEAD
/shoplifter/core/tempstore.py
import memcache from shoplifter.core.util import Cipher class TempStore(object): """ Base class for Temporary Storage backends. Use as template. """ def __init__(self, key, cipher): self.cipher = cipher(key) def get(self, key): raise NotImplementedError def store(self, key, ...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,193
lesite/Shoplifter
HEAD
/shoplifter/core/config.py
import pkg_resources from marrow.util.bunch import Bunch class PluginHost(object): """ This is used to provide a simple internal API for loading and finding plugins that are advertised as entry points. Note: In the context of this documentation, I refer to 'distributon' any package or collec...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,194
lesite/Shoplifter
HEAD
/tests/catalog/taxonomy_specs.py
# encoding: utf-8 import mongoengine as db from nose.tools import * from shoplifter.catalog.taxonomy.model import Taxonomy from shoplifter.catalog.product.model import Product from ludibrio import Stub db.connect('shoplifter_test') with Stub() as get_lang: from shoplifter.core.db.field import get_lang get...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,195
lesite/Shoplifter
HEAD
/setup.py
#!/usr/bin/env python # encoding: utf-8 import os import sys from setuptools import setup, find_packages if sys.version_info < (2, 6): raise SystemExit("Python 2.6 or later is required.") setup( name = "shoplifter", version = '0.0.2', description = 'Shoplifter e-Commerce', author = 'Le Site, I...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,196
lesite/Shoplifter
HEAD
/tests/core/test_config.py
from shoplifter.core.config import PluginHost from unittest import TestCase from ..helpers import * class PluginSpecs(TestCase): def can_load_plugins_for_package(self): # Load plugins for a package part of a distribution. pls = PluginHost('shoplifter', 'shoplifter.core') assert('temp_stor...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,197
lesite/Shoplifter
HEAD
/tests/catalog/helpers.py
from shoplifter.catalog.product.model import Product, Variant def create_model(cls, save=True, force_insert=False, **kwargs): opts = getattr(cls, '_test_defaults', {}) opts.update(kwargs) i = cls(**opts) if save: i.save(force_insert=force_insert) return i def create_product(*args, **kwar...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,198
lesite/Shoplifter
HEAD
/shoplifter/core/util/__init__.py
from .string import force_unicode, slugify from .cipher import Cipher
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,199
lesite/Shoplifter
HEAD
/shoplifter/payment/__init__.py
from shoplifter.core.config import Config, PluginHost __all__ = ['config', 'plugins'] plugins = PluginHost('shoplifter', __package__) config = Config()
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,200
lesite/Shoplifter
HEAD
/shoplifter/core/db/field/__init__.py
#encoding: utf-8 import decimal from mongoengine.fields import DictField, IntField from mongoengine.base import BaseDict class MissingLanguageFunctionError(Exception): pass def get_lang(): # pragma: no cover raise MissingLanguageFunctionError class TranslatedString(BaseDict): def __unicode__(self): ...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,201
lesite/Shoplifter
HEAD
/shoplifter/catalog/taxonomy/model.py
# encoding: utf-8 import operator import mongoengine as db from shoplifter.core import util from shoplifter.core.db.field import TranslatedStringField class Taxonomy(db.Document): """ The model will help the categorization of products The taxonomy can up and down using it's self as a reference point Using set ...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,202
lesite/Shoplifter
HEAD
/shoplifter/payment/api.py
import decimal from mongoengine import Q from shoplifter.payment import plugins """ TODO: Uses another keyword than store? Was suggested 'set' for method name but will it not override native set object type? """ __all__ = ('DummyStore', 'MemcacheStore') class PayableOrder(object): @property def payment(se...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,203
lesite/Shoplifter
HEAD
/shoplifter/payment/lib/test_helpers.py
import random from mongoengine import Document from shoplifter.payment.api import PayableOrder class DummyAddress(object): """ A dummy Address. """ first_name = 'Benoit' last_name = 'C. Doe' email = 'bendoe@example.com' phone_number = '5146593328' street_number = '55' street_name =...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,204
lesite/Shoplifter
HEAD
/tests/helpers.py
# encoding: utf-8 import mongoengine as db import functools from nose.tools import * assert_invalid = functools.partial(assert_raises, db.ValidationError) def assert_is_instance(inst, cls): assert_true(isinstance(inst, cls), u"{inst} is not of type {cls}".format(inst=inst, cls=cls))
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,205
lesite/Shoplifter
HEAD
/tests/core/db/field/test_translated_text.py
# encoding: utf-8 from nose.tools import * import mongoengine as db from shoplifter.core.db.field import TranslatedStringField from shoplifter.core.db.field import TranslatedString from shoplifter.core.db.field import MissingLanguageFunctionError from shoplifter.core.db import field from mongoengine import * from mon...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,206
lesite/Shoplifter
HEAD
/shoplifter/payment/backend/__init__.py
__import__('pkg_resources').declare_namespace(__name__) from shoplifter.payment.models import Authorization, Addressee, \ AVSData, Payment, AuthorizationCapture from shoplifter.payment.lib.credentials import CreditCard class BaseBackend(object): """ This is the base class for Backends. If you write a ba...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,207
lesite/Shoplifter
HEAD
/shoplifter/payment/lib/credentials.py
import shoplifter.payment from shoplifter.payment import config class PaymentCredential(object): class CardFormatError(Exception): pass def is_luhn_valid(self): """ This checks that the CC number validates against the luhn algorithm. Code taken from http://en.wikipedi...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,643,208
lesite/Shoplifter
HEAD
/tests/core/db/field/money_field_spec.py
import decimal import mongoengine from ....helpers import assert_is_instance from nose.tools import assert_equals from shoplifter.core.db.field import MoneyField class HongZhiBi(mongoengine.Document): """ Default 2 digit precision """ value = MoneyField() class FiveDecPlacesDoc(mongoengine.Document...
{"/shoplifter/catalog/product/model.py": ["/shoplifter/core/__init__.py", "/shoplifter/catalog/taxonomy/model.py"], "/tests/catalog/__init__.py": ["/shoplifter/catalog/product/model.py"], "/shoplifter/payment/backend/modules/dummy.py": ["/shoplifter/payment/lib/credentials.py", "/shoplifter/payment/backend/__init__.py"...
39,674,974
jjh2613/django-restapi-test
refs/heads/master
/springproject/apiServer/urls.py
from django.urls import path from . import views app_name = 'apiServer' urlpatterns = [ path('', views.SampleDataView.as_view()), path('/<int:datum_id>', views.SampleDataView.as_view()), ]
{"/springproject/apiServer/views.py": ["/springproject/apiServer/serializers.py"]}
39,674,975
jjh2613/django-restapi-test
refs/heads/master
/springproject/apiServer/views.py
from rest_framework import views, response, permissions, status from .models import SampleData from .serializers import SampleDataSerializer # Create your views here. # REST API 로 구성해보자. class SampleDataView(views.APIView): def get(self, request, **kwargs): datum_id = kwargs.get('datum_id') serializer = Sam...
{"/springproject/apiServer/views.py": ["/springproject/apiServer/serializers.py"]}
39,674,976
jjh2613/django-restapi-test
refs/heads/master
/springproject/api/views.py
from django.shortcuts import render from api.forms import Form from api.models import Article # Create your views here. def write(request): if request.method == 'POST': form = Form(request.POST) if(form.is_valid()): form.save() else: form = Form() return render(request, 'write.html', {'form': ...
{"/springproject/apiServer/views.py": ["/springproject/apiServer/serializers.py"]}
39,724,113
jesiqueira/script_logof_session_login_servidor
refs/heads/master
/buscar_login.py
import subprocess import csv import os lista_servidores = os.path.join('csv','lista_servidores.csv') pessoas_session = os.path.join('csv', 'pessoas_session.csv') session = os.path.join('file','session.txt') with open(lista_servidores) as entrada: for servidor in csv.reader(entrada): servidores =...
{"/main.py": ["/util/utilitarios.py", "/client/funcionario.py"]}
39,724,114
jesiqueira/script_logof_session_login_servidor
refs/heads/master
/util/utilitarios.py
import os def criar_diretorio(diretorio): CSV_DIR = os.path.join(diretorio, "csv") FILE_DIR = os.path.join(diretorio, "file") if not os.path.isdir(CSV_DIR): os.mkdir(CSV_DIR) if not os.path.isdir(FILE_DIR): os.mkdir(FILE_DIR)
{"/main.py": ["/util/utilitarios.py", "/client/funcionario.py"]}
39,724,115
jesiqueira/script_logof_session_login_servidor
refs/heads/master
/client/teste1.py
import os user = os.environ.get('SENHA_DEFAULT') print(user)
{"/main.py": ["/util/utilitarios.py", "/client/funcionario.py"]}
39,724,116
jesiqueira/script_logof_session_login_servidor
refs/heads/master
/main.py
from util.utilitarios import criar_diretorio from client.funcionario import Funcionario import os f = Funcionario() f.criar_diretorio(os.getcwd()) opcao = 0 while opcao != 3: print("======================== Escolha Opção =====================") print('1 - Carregar Base de Dados') print('2 - Rea...
{"/main.py": ["/util/utilitarios.py", "/client/funcionario.py"]}
39,724,117
jesiqueira/script_logof_session_login_servidor
refs/heads/master
/client/teste.py
def recursao(numero, lista): if numero == 0: print('Ultimo') return True else: continuar = int(input('continuar digite 1: ')) if continuar == 1: print(lista[numero-1]) del lista[numero-1] recursao(numero -1, lista) else: ...
{"/main.py": ["/util/utilitarios.py", "/client/funcionario.py"]}
39,724,118
jesiqueira/script_logof_session_login_servidor
refs/heads/master
/client/funcionario.py
import os import csv import subprocess from datetime import datetime import concurrent.futures class Funcionario: def criar_diretorio(self, diretorio): CSV_DIR = os.path.join(diretorio, "csv") FILE_DIR = os.path.join(diretorio, "file") if not os.path.isdir(CSV_DIR): ...
{"/main.py": ["/util/utilitarios.py", "/client/funcionario.py"]}
39,736,980
blacknoize404/stickNAUTA
refs/heads/master
/src/stickNAUTA/PortalNauta.py
from json import (dump, load) from re import (search) from lxml import (html) from requests import (Session) from requests.utils import (dict_from_cookiejar, cookiejar_from_dict) class PortalNauta(object): __portal_nauta_homepage_url: str = 'https://www.portal.nauta.cu/' __portal_nauta_login_url: str = 'http...
{"/src/stickNAUTA/__init__.py": ["/src/stickNAUTA/NautaSession.py", "/src/stickNAUTA/PortalNauta.py"]}
39,736,981
blacknoize404/stickNAUTA
refs/heads/master
/setup.py
from setuptools import (setup, find_packages) with open('README.md', 'r', encoding='utf-8') as file: readme = file.read() with open('requirements.txt', 'r', encoding='utf-8') as file: requirements = [requirement[:-1] if requirement.endswith('\n') else requirement for requirement in file] setup( sc...
{"/src/stickNAUTA/__init__.py": ["/src/stickNAUTA/NautaSession.py", "/src/stickNAUTA/PortalNauta.py"]}
39,736,982
blacknoize404/stickNAUTA
refs/heads/master
/src/stickNAUTA/NautaSession.py
from __future__ import (annotations) from ctypes import (Union) from json import (load, dump) from re import (search) from lxml import (html) from requests import (Session) from requests.utils import (dict_from_cookiejar, cookiejar_from_dict) class NautaSession(object): __nauta_homepage_url: str = 'https://secu...
{"/src/stickNAUTA/__init__.py": ["/src/stickNAUTA/NautaSession.py", "/src/stickNAUTA/PortalNauta.py"]}
39,736,983
blacknoize404/stickNAUTA
refs/heads/master
/src/stickNAUTA/__init__.py
from .NautaSession import (NautaSession) from .PortalNauta import (PortalNauta) __version__ = '2.0.0' __all__ = ['NautaSession', 'PortalNauta'] __author__ = 'stickM4N jcgalindo.jcgh@gmail.com'
{"/src/stickNAUTA/__init__.py": ["/src/stickNAUTA/NautaSession.py", "/src/stickNAUTA/PortalNauta.py"]}
39,856,151
valentinoli/deep-learning-project-1
refs/heads/master
/tuning.py
from helpers import tune_hyperparameters tune_hyperparameters(start=0, end=1)
{"/network.py": ["/network_helpers.py"], "/test.py": ["/network.py", "/helpers.py", "/generate_plot.py"], "/tuning.py": ["/helpers.py"], "/helpers.py": ["/network.py"]}
39,856,152
valentinoli/deep-learning-project-1
refs/heads/master
/network_helpers.py
from __future__ import annotations from torch import nn, tensor, float """Layer helpers""" def conv(in_channels, out_channels, kernel_size = 3, padding = 1): return nn.Conv2d(in_channels, out_channels, kernel_size=kernel_size, padding=padding) def pool(kernel_size = 2, stride = 2): return nn.MaxPool2d(2, st...
{"/network.py": ["/network_helpers.py"], "/test.py": ["/network.py", "/helpers.py", "/generate_plot.py"], "/tuning.py": ["/helpers.py"], "/helpers.py": ["/network.py"]}
39,856,153
valentinoli/deep-learning-project-1
refs/heads/master
/test.py
import sys from collections import defaultdict import torch import dlc_practical_prologue as prologue from network import NaiveNet, SharedWeightNet, BenchmarkNet from helpers import train_model, compute_accuracy, bootstrapping from generate_plot import performance_plot num_samples = 1000 # Change this parameter to ...
{"/network.py": ["/network_helpers.py"], "/test.py": ["/network.py", "/helpers.py", "/generate_plot.py"], "/tuning.py": ["/helpers.py"], "/helpers.py": ["/network.py"]}
39,856,154
valentinoli/deep-learning-project-1
refs/heads/master
/helpers.py
from __future__ import annotations import sys import torch from torch import nn, Tensor from network import NaiveNet, SharedWeightNet, BenchmarkNet import dlc_practical_prologue as prologue def create_dataloader(*tensors, batch_size = 10, shuffle = True): """Creates a PyTorch data loader from the given tensors"""...
{"/network.py": ["/network_helpers.py"], "/test.py": ["/network.py", "/helpers.py", "/generate_plot.py"], "/tuning.py": ["/helpers.py"], "/helpers.py": ["/network.py"]}
39,856,155
valentinoli/deep-learning-project-1
refs/heads/master
/generate_plot.py
import matplotlib.pyplot as plt def performance_plot(display_vals, NUM_ROUNDS, BOOTSTRAP): labels= [ 'Naive(1)\ntrain', '(Naive(1)\ntest', 'Shared\nWeightNet(1)\ntrain', 'Shared\nWeightNet(1)\ntest', 'Shared\nWeightNet(1)\ntrain', 'Shared\nWeightNet(1)\ntest', ...
{"/network.py": ["/network_helpers.py"], "/test.py": ["/network.py", "/helpers.py", "/generate_plot.py"], "/tuning.py": ["/helpers.py"], "/helpers.py": ["/network.py"]}
39,856,156
valentinoli/deep-learning-project-1
refs/heads/master
/network.py
from __future__ import annotations import torch from torch import nn, Tensor from network_helpers import block_cnn, block_digit_classifier, block_output, leq class Net(nn.Module): def __init__(self, hidden_layers: int, weight_sharing: bool = False): super().__init__() # CNN block self.cnn...
{"/network.py": ["/network_helpers.py"], "/test.py": ["/network.py", "/helpers.py", "/generate_plot.py"], "/tuning.py": ["/helpers.py"], "/helpers.py": ["/network.py"]}
39,861,824
phearnow11/CodeTranslater
refs/heads/main
/function.py
import string import sympy as sp def EncodeCeasarCode(text, shift, alphabets): def shift_alphabet(alphabet): return alphabet[shift:] + alphabet[:shift] shifted_alphabets = tuple(map(shift_alphabet, alphabets)) final_alphabet = ''.join(alphabets) final_shifted_alphabet = ''.join(shifted_alpha...
{"/main.py": ["/function.py"]}
39,861,825
phearnow11/CodeTranslater
refs/heads/main
/main.py
import string import function import SudokuSolver import sympy as sp if __name__ == '__main__' : print("----------------------------------------------------------------------------------------------------------------") print("--------------------------------------------------Made by Phien---------------------...
{"/main.py": ["/function.py"]}
39,928,589
spiros26/Flask-Project
refs/heads/master
/echarge/cli/ev_group36/commands/cmd_logout.py
import click import requests url = "http://localhost:8765/evcharge/api/logout" class Context: def __init__(self, apikey): self.apikey = apikey @click.group() @click.option("--apikey") @click.pass_context def cli(ctx, apikey): ctx.obj = Context(apikey) @cli.command() @click.pass_context de...
{"/website/views.py": ["/website/models.py"], "/main.py": ["/echarge/__init__.py"], "/echarge/models.py": ["/echarge/__init__.py"], "/echarge/__init__.py": ["/echarge/backend/__init__.py", "/echarge/models.py"], "/echarge/backend/auth.py": ["/echarge/models.py", "/echarge/__init__.py"], "/echarge/backend/sessions.py": ...
39,928,590
spiros26/Flask-Project
refs/heads/master
/main.py
from echarge import create_app, db, initializer app = create_app() db.app = app initializer() if __name__ == '__main__': app.run(debug=True) #app.run(debug=True, ssl_context=('echarge/certificates/cert.prem','echarge/certificates/key.prem' ))
{"/website/views.py": ["/website/models.py"], "/main.py": ["/echarge/__init__.py"], "/echarge/models.py": ["/echarge/__init__.py"], "/echarge/__init__.py": ["/echarge/backend/__init__.py", "/echarge/models.py"], "/echarge/backend/auth.py": ["/echarge/models.py", "/echarge/__init__.py"], "/echarge/backend/sessions.py": ...
39,928,591
spiros26/Flask-Project
refs/heads/master
/echarge/cli/ev_group36/commands/cmd_login.py
import click import requests url = "http://localhost:8765/evcharge/api/login" class Context: def __init__(self, username, password): self.username = username self.password = password @click.group() @click.option("--username") @click.option("--password") @click.pass_context def cli(ctx, ...
{"/website/views.py": ["/website/models.py"], "/main.py": ["/echarge/__init__.py"], "/echarge/models.py": ["/echarge/__init__.py"], "/echarge/__init__.py": ["/echarge/backend/__init__.py", "/echarge/models.py"], "/echarge/backend/auth.py": ["/echarge/models.py", "/echarge/__init__.py"], "/echarge/backend/sessions.py": ...
39,928,592
spiros26/Flask-Project
refs/heads/master
/echarge/models.py
from . import db from flask_login import UserMixin from sqlalchemy.sql import func from sqlalchemy.dialects.postgresql import JSON class User(db.Model, UserMixin): id = db.Column(db.Integer, primary_key=True) public_id = db.Column(db.String(50), unique=True) username = db.Column(db.String(40), unique=Tru...
{"/website/views.py": ["/website/models.py"], "/main.py": ["/echarge/__init__.py"], "/echarge/models.py": ["/echarge/__init__.py"], "/echarge/__init__.py": ["/echarge/backend/__init__.py", "/echarge/models.py"], "/echarge/backend/auth.py": ["/echarge/models.py", "/echarge/__init__.py"], "/echarge/backend/sessions.py": ...
39,928,593
spiros26/Flask-Project
refs/heads/master
/echarge/__init__.py
from flask import Flask, jsonify from flask_migrate import Migrate from flask_sqlalchemy import SQLAlchemy from os import path from flask_login import LoginManager import uuid from werkzeug.security import generate_password_hash import pandas as pd import json import numpy as np import random db = SQLAlchemy() migrate...
{"/website/views.py": ["/website/models.py"], "/main.py": ["/echarge/__init__.py"], "/echarge/models.py": ["/echarge/__init__.py"], "/echarge/__init__.py": ["/echarge/backend/__init__.py", "/echarge/models.py"], "/echarge/backend/auth.py": ["/echarge/models.py", "/echarge/__init__.py"], "/echarge/backend/sessions.py": ...
39,928,594
spiros26/Flask-Project
refs/heads/master
/echarge/cli/ev_group36/commands/cmd_Admin.py
import click import requests url = "http://localhost:8765/evcharge/api/admin/usermod/" url2 = "http://localhost:8765/evcharge/api/admin/users/" url3 = "http://localhost:8765/evcharge/api/admin/healthcheck" url4 = "http://localhost:8765/evcharge/api/admin/resetsessions" url5 = "http://localhost:8765/evcharge/api/admi...
{"/website/views.py": ["/website/models.py"], "/main.py": ["/echarge/__init__.py"], "/echarge/models.py": ["/echarge/__init__.py"], "/echarge/__init__.py": ["/echarge/backend/__init__.py", "/echarge/models.py"], "/echarge/backend/auth.py": ["/echarge/models.py", "/echarge/__init__.py"], "/echarge/backend/sessions.py": ...
39,928,595
spiros26/Flask-Project
refs/heads/master
/echarge/backend/testing/check_endpoints.py
import requests from requests.auth import HTTPBasicAuth import json import jsonpath import pytest def test_admin_usermod_users(): url = "http://localhost:8765/evcharge/api/login" file = open("admin_creds.json", 'r') json_input = file.read() request_json = json.loads(json_input) response = requests....
{"/website/views.py": ["/website/models.py"], "/main.py": ["/echarge/__init__.py"], "/echarge/models.py": ["/echarge/__init__.py"], "/echarge/__init__.py": ["/echarge/backend/__init__.py", "/echarge/models.py"], "/echarge/backend/auth.py": ["/echarge/models.py", "/echarge/__init__.py"], "/echarge/backend/sessions.py": ...
39,928,596
spiros26/Flask-Project
refs/heads/master
/echarge/backend/auth.py
from flask import Blueprint, render_template, request, flash, redirect, url_for, jsonify, Response, make_response from ..models import User, RevokedToken, Evehicle from werkzeug.security import generate_password_hash, check_password_hash from .. import db from flask_login import login_user, login_required, logout_user,...
{"/website/views.py": ["/website/models.py"], "/main.py": ["/echarge/__init__.py"], "/echarge/models.py": ["/echarge/__init__.py"], "/echarge/__init__.py": ["/echarge/backend/__init__.py", "/echarge/models.py"], "/echarge/backend/auth.py": ["/echarge/models.py", "/echarge/__init__.py"], "/echarge/backend/sessions.py": ...
39,928,597
spiros26/Flask-Project
refs/heads/master
/echarge/backend/testing/test_in_chrome.py
import pytest #driver.get('http://www.thetestingworld.com/testings') from selenium import webdriver from selenium.webdriver import Chrome options = webdriver.ChromeOptions() options.add_argument('--ignore-ssl-errors=yes') options.add_argument('--ignore-certificate-errors') #driver = webdriver.Chrome(options=options) ...
{"/website/views.py": ["/website/models.py"], "/main.py": ["/echarge/__init__.py"], "/echarge/models.py": ["/echarge/__init__.py"], "/echarge/__init__.py": ["/echarge/backend/__init__.py", "/echarge/models.py"], "/echarge/backend/auth.py": ["/echarge/models.py", "/echarge/__init__.py"], "/echarge/backend/sessions.py": ...
39,928,598
spiros26/Flask-Project
refs/heads/master
/echarge/backend/sessions.py
from flask import Blueprint, jsonify, request, make_response from .auth import token_required from ..models import Session, Point, Evehicle, Station, Operator, Energyprovider import json, datetime import pandas as pd import flask_csv as fcsv sessions = Blueprint('sessions', __name__) def sort_criteria(json): try...
{"/website/views.py": ["/website/models.py"], "/main.py": ["/echarge/__init__.py"], "/echarge/models.py": ["/echarge/__init__.py"], "/echarge/__init__.py": ["/echarge/backend/__init__.py", "/echarge/models.py"], "/echarge/backend/auth.py": ["/echarge/models.py", "/echarge/__init__.py"], "/echarge/backend/sessions.py": ...
39,928,599
spiros26/Flask-Project
refs/heads/master
/echarge/backend/admin.py
from flask import Blueprint, render_template, request, flash, redirect, url_for, jsonify, Response, make_response from ..models import User, Session, Evehicle, Point from werkzeug.security import generate_password_hash, check_password_hash from .. import db, default_admin, months_to_nums import uuid import json import ...
{"/website/views.py": ["/website/models.py"], "/main.py": ["/echarge/__init__.py"], "/echarge/models.py": ["/echarge/__init__.py"], "/echarge/__init__.py": ["/echarge/backend/__init__.py", "/echarge/models.py"], "/echarge/backend/auth.py": ["/echarge/models.py", "/echarge/__init__.py"], "/echarge/backend/sessions.py": ...
39,928,600
spiros26/Flask-Project
refs/heads/master
/echarge/backend/testing/test_create_user.py
import requests import json import jsonpath import pytest def test_create_new_user(): url = "http://localhost:8765/evcharge/api/sign-up" file = open("user.json", 'r') json_input = file.read() request_json = json.loads(json_input) response = requests.post(url,request_json) assert response.stat...
{"/website/views.py": ["/website/models.py"], "/main.py": ["/echarge/__init__.py"], "/echarge/models.py": ["/echarge/__init__.py"], "/echarge/__init__.py": ["/echarge/backend/__init__.py", "/echarge/models.py"], "/echarge/backend/auth.py": ["/echarge/models.py", "/echarge/__init__.py"], "/echarge/backend/sessions.py": ...
39,928,601
spiros26/Flask-Project
refs/heads/master
/echarge/backend/__init__.py
from .views import views from .auth import auth from .admin import admin from .sessions import sessions
{"/website/views.py": ["/website/models.py"], "/main.py": ["/echarge/__init__.py"], "/echarge/models.py": ["/echarge/__init__.py"], "/echarge/__init__.py": ["/echarge/backend/__init__.py", "/echarge/models.py"], "/echarge/backend/auth.py": ["/echarge/models.py", "/echarge/__init__.py"], "/echarge/backend/sessions.py": ...
39,928,602
spiros26/Flask-Project
refs/heads/master
/echarge/backend/views.py
from flask import Blueprint, render_template, request, flash, jsonify, redirect, url_for from flask_login import login_required, current_user from ..models import Session, User, Evehicle, Point, Station from .. import db import json, uuid, random from datetime import datetime, date, timedelta from .sessions import sort...
{"/website/views.py": ["/website/models.py"], "/main.py": ["/echarge/__init__.py"], "/echarge/models.py": ["/echarge/__init__.py"], "/echarge/__init__.py": ["/echarge/backend/__init__.py", "/echarge/models.py"], "/echarge/backend/auth.py": ["/echarge/models.py", "/echarge/__init__.py"], "/echarge/backend/sessions.py": ...
39,928,603
spiros26/Flask-Project
refs/heads/master
/echarge/cli/ev_group36/commands/cmd_SessionsPerPoint.py
import click import requests url = "http://localhost:8765/evcharge/api/SessionsPerPoint/" class Context: def __init__(self, point, datefrom, dateto, format, apikey): self.point = point self.datefrom = datefrom self.dateto = dateto self.format = format self.apikey = apikey ...
{"/website/views.py": ["/website/models.py"], "/main.py": ["/echarge/__init__.py"], "/echarge/models.py": ["/echarge/__init__.py"], "/echarge/__init__.py": ["/echarge/backend/__init__.py", "/echarge/models.py"], "/echarge/backend/auth.py": ["/echarge/models.py", "/echarge/__init__.py"], "/echarge/backend/sessions.py": ...
39,972,364
Ernir/ernir.net
refs/heads/main
/homepage/schema.py
import graphene from graphene_django.types import DjangoObjectType from homepage.models import FrontPageSection class FrontPageSectionType(DjangoObjectType): class Meta: model = FrontPageSection class Query(object): all_frontpage_sections = graphene.List(FrontPageSectionType) def resolve_all_...
{"/photos/schema.py": ["/photos/models.py"], "/recipes/models.py": ["/recipes/managers.py"], "/asylum/schema.py": ["/asylum/models.py"], "/recipes/schema.py": ["/recipes/models.py"], "/schema.py": ["/asylum/schema.py", "/homepage/schema.py", "/photos/schema.py", "/recipes/schema.py"], "/recipes/admin.py": ["/recipes/mo...
39,972,365
Ernir/ernir.net
refs/heads/main
/homepage/models.py
from adminsortable.models import SortableMixin from django.db import models from markdownx.models import MarkdownxField class FrontPageSection(SortableMixin): main_text = MarkdownxField() # A field the model should be ordered by the_order = models.PositiveIntegerField(default=0, editable=False, db_index=...
{"/photos/schema.py": ["/photos/models.py"], "/recipes/models.py": ["/recipes/managers.py"], "/asylum/schema.py": ["/asylum/models.py"], "/recipes/schema.py": ["/recipes/models.py"], "/schema.py": ["/asylum/schema.py", "/homepage/schema.py", "/photos/schema.py", "/recipes/schema.py"], "/recipes/admin.py": ["/recipes/mo...
39,972,366
Ernir/ernir.net
refs/heads/main
/homepage/admin.py
from adminsortable.admin import SortableAdmin from django.contrib import admin from markdownx.admin import MarkdownxModelAdmin from .models import FrontPageSection @admin.register(FrontPageSection) class FrontPageAdmin(SortableAdmin, MarkdownxModelAdmin): pass
{"/photos/schema.py": ["/photos/models.py"], "/recipes/models.py": ["/recipes/managers.py"], "/asylum/schema.py": ["/asylum/models.py"], "/recipes/schema.py": ["/recipes/models.py"], "/schema.py": ["/asylum/schema.py", "/homepage/schema.py", "/photos/schema.py", "/recipes/schema.py"], "/recipes/admin.py": ["/recipes/mo...
39,972,367
Ernir/ernir.net
refs/heads/main
/schema.py
import graphene import homepage.schema import photos.schema import asylum.schema class Query( asylum.schema.Query, photos.schema.Query, homepage.schema.Query, graphene.ObjectType ): pass schema = graphene.Schema(query=Query)
{"/photos/schema.py": ["/photos/models.py"], "/recipes/models.py": ["/recipes/managers.py"], "/asylum/schema.py": ["/asylum/models.py"], "/recipes/schema.py": ["/recipes/models.py"], "/schema.py": ["/asylum/schema.py", "/homepage/schema.py", "/photos/schema.py", "/recipes/schema.py"], "/recipes/admin.py": ["/recipes/mo...