index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
9,014 | altdesktop/python-dbus-next | refs/heads/master | /dbus_next/__init__.py | from . import aio
from . import glib
from .constants import (BusType, MessageType, MessageFlag, NameFlag, RequestNameReply,
ReleaseNameReply, PropertyAccess, ArgDirection, ErrorType)
from .errors import (SignatureBodyMismatchError, InvalidSignatureError, InvalidAddressError,
... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,015 | altdesktop/python-dbus-next | refs/heads/master | /dbus_next/validators.py | import re
from .errors import InvalidBusNameError, InvalidObjectPathError, InvalidInterfaceNameError, InvalidMemberNameError
from functools import lru_cache
_bus_name_re = re.compile(r'^[A-Za-z_-][A-Za-z0-9_-]*$')
_path_re = re.compile(r'^[A-Za-z0-9_]+$')
_element_re = re.compile(r'^[A-Za-z_][A-Za-z0-9_]*$')
_member_r... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,016 | altdesktop/python-dbus-next | refs/heads/master | /test/test_introspection.py | from dbus_next import introspection as intr, ArgDirection, PropertyAccess, SignatureType
import os
example_data = open(f'{os.path.dirname(__file__)}/data/introspection.xml', 'r').read()
def test_example_introspection_from_xml():
node = intr.Node.parse(example_data)
assert len(node.interfaces) == 1
inte... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,017 | altdesktop/python-dbus-next | refs/heads/master | /dbus_next/constants.py | from enum import Enum, IntFlag
class BusType(Enum):
"""An enum that indicates a type of bus. On most systems, there are
normally two different kinds of buses running.
"""
SESSION = 1 #: A bus for the current graphical user session.
SYSTEM = 2 #: A persistent bus for the whole machine.
class Me... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,018 | altdesktop/python-dbus-next | refs/heads/master | /examples/example-service.py | #!/usr/bin/env python3
import sys
import os
sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/..'))
from dbus_next.service import ServiceInterface, method, signal, dbus_property
from dbus_next.aio.message_bus import MessageBus
from dbus_next import Variant
import asyncio
class ExampleInterface(ServiceI... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,019 | altdesktop/python-dbus-next | refs/heads/master | /dbus_next/__version__.py | __title__ = 'dbus_next'
__description__ = 'A zero-dependency DBus library for Python with asyncio support'
__url__ = 'https://github.com/altdesktop/python-dbus-next'
__version__ = '0.2.3'
__author__ = 'Tony Crisci'
__author_email__ = 'tony@dubstepdish.com'
__license__ = 'MIT'
__copyright__ = 'Copyright 2019 Tony Crisci... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,020 | altdesktop/python-dbus-next | refs/heads/master | /dbus_next/aio/proxy_object.py | from ..proxy_object import BaseProxyObject, BaseProxyInterface
from ..message_bus import BaseMessageBus
from ..message import Message, MessageFlag
from ..signature import Variant
from ..errors import DBusError
from ..constants import ErrorType
from .._private.util import replace_idx_with_fds, replace_fds_with_idx
from ... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,021 | altdesktop/python-dbus-next | refs/heads/master | /test/test_aio_low_level.py | from dbus_next.aio import MessageBus
from dbus_next import Message, MessageType, MessageFlag
import pytest
@pytest.mark.asyncio
async def test_standard_interfaces():
bus = await MessageBus().connect()
msg = Message(destination='org.freedesktop.DBus',
path='/org/freedesktop/DBus',
... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,022 | altdesktop/python-dbus-next | refs/heads/master | /dbus_next/_private/util.py | from typing import List, Any, Union
import inspect
from ..signature import SignatureTree, Variant
import ast
def signature_contains_type(signature: Union[str, SignatureTree], body: List[Any],
token: str) -> bool:
'''For a given signature and body, check to see if it contains any member... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,023 | altdesktop/python-dbus-next | refs/heads/master | /examples/aio-list-names.py | #!/usr/bin/env python3
import sys
import os
sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/..'))
from dbus_next import Message, MessageType
from dbus_next.aio import MessageBus
import asyncio
import json
loop = asyncio.get_event_loop()
async def main():
bus = await MessageBus().connect()
r... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,024 | altdesktop/python-dbus-next | refs/heads/master | /test/service/test_decorators.py | from dbus_next import PropertyAccess, introspection as intr
from dbus_next.service import method, signal, dbus_property, ServiceInterface
class ExampleInterface(ServiceInterface):
def __init__(self):
super().__init__('test.interface')
self._some_prop = 55
self._another_prop = 101
s... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,025 | altdesktop/python-dbus-next | refs/heads/master | /examples/dbus-next-send.py | #!/usr/bin/env python3
import sys
import os
sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/..'))
from dbus_next.validators import (is_bus_name_valid, is_member_name_valid, is_object_path_valid,
is_interface_name_valid)
from dbus_next.aio import MessageBus
from dbus_nex... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,026 | altdesktop/python-dbus-next | refs/heads/master | /dbus_next/errors.py | class SignatureBodyMismatchError(ValueError):
pass
class InvalidSignatureError(ValueError):
pass
class InvalidAddressError(ValueError):
pass
class AuthError(Exception):
pass
class InvalidMessageError(ValueError):
pass
class InvalidIntrospectionError(ValueError):
pass
class InterfaceN... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,027 | altdesktop/python-dbus-next | refs/heads/master | /dbus_next/message.py | from ._private.marshaller import Marshaller
from .constants import MessageType, MessageFlag, ErrorType
from ._private.constants import PROTOCOL_VERSION, HeaderField, LITTLE_ENDIAN
from .validators import assert_bus_name_valid, assert_member_name_valid, assert_object_path_valid, assert_interface_name_valid
from .errors ... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,028 | altdesktop/python-dbus-next | refs/heads/master | /test/test_marshaller.py | from typing import Any, Dict
from dbus_next._private.unmarshaller import Unmarshaller
from dbus_next import Message, Variant, SignatureTree, MessageType, MessageFlag
import json
import os
import io
import pytest
def print_buf(buf):
i = 0
while True:
p = buf[i:i + 8]
if not p:
bre... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,029 | altdesktop/python-dbus-next | refs/heads/master | /examples/glib-list-names.py | #!/usr/bin/env python3
import sys
import os
sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/..'))
from dbus_next import Message
from dbus_next.glib import MessageBus
import json
import signal
from gi.repository import GLib
main = GLib.MainLoop()
bus = MessageBus().connect_sync()
def reply_handler(re... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,030 | altdesktop/python-dbus-next | refs/heads/master | /dbus_next/message_bus.py | from ._private.address import get_bus_address, parse_address
from ._private.util import replace_fds_with_idx, replace_idx_with_fds
from .message import Message
from .constants import BusType, MessageFlag, MessageType, ErrorType, NameFlag, RequestNameReply, ReleaseNameReply
from .service import ServiceInterface
from .va... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,031 | altdesktop/python-dbus-next | refs/heads/master | /test/test_big_message.py | from dbus_next import aio, glib, Message, MessageType
from dbus_next.service import ServiceInterface, method
from test.util import check_gi_repository, skip_reason_no_gi
import pytest
has_gi = check_gi_repository()
class ExampleInterface(ServiceInterface):
def __init__(self):
super().__init__('example.i... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,032 | altdesktop/python-dbus-next | refs/heads/master | /dbus_next/aio/message_bus.py | from ..message_bus import BaseMessageBus
from .._private.unmarshaller import Unmarshaller
from ..message import Message
from ..constants import BusType, NameFlag, RequestNameReply, ReleaseNameReply, MessageType, MessageFlag
from ..service import ServiceInterface
from ..errors import AuthError
from .proxy_object import ... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,033 | altdesktop/python-dbus-next | refs/heads/master | /test/util.py | _has_gi = None
skip_reason_no_gi = 'glib tests require python3-gi'
def check_gi_repository():
global _has_gi
if _has_gi is not None:
return _has_gi
try:
from gi.repository import GLib
_has_gi = True
return _has_gi
except ImportError:
_has_gi = False
retu... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,034 | altdesktop/python-dbus-next | refs/heads/master | /test/client/test_properties.py | from dbus_next import aio, glib, Message, DBusError
from dbus_next.service import ServiceInterface, dbus_property, PropertyAccess
from test.util import check_gi_repository, skip_reason_no_gi
import pytest
has_gi = check_gi_repository()
class ExampleInterface(ServiceInterface):
def __init__(self):
super(... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,035 | altdesktop/python-dbus-next | refs/heads/master | /dbus_next/_private/marshaller.py | from ..signature import SignatureTree
from struct import pack
class Marshaller:
def __init__(self, signature, body):
self.signature_tree = SignatureTree._get(signature)
self.signature_tree.verify(body)
self.buffer = bytearray()
self.body = body
self.writers = {
... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,036 | altdesktop/python-dbus-next | refs/heads/master | /test/test_address_parser.py | from dbus_next._private.address import parse_address
def test_valid_addresses():
valid_addresses = {
'unix:path=/run/user/1000/bus': [('unix', {
'path': '/run/user/1000/bus'
})],
'unix:abstract=/tmp/dbus-ft9sODWpZk,guid=a7b1d5912379c2d471165e9b5cb74a03': [('unix', {
... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,037 | altdesktop/python-dbus-next | refs/heads/master | /test/test_tcp_address.py | from dbus_next.aio import MessageBus
from dbus_next import Message
from dbus_next._private.address import parse_address
import asyncio
import pytest
import os
@pytest.mark.asyncio
async def test_tcp_connection_with_forwarding(event_loop):
closables = []
host = '127.0.0.1'
port = '55556'
addr_info = ... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,038 | altdesktop/python-dbus-next | refs/heads/master | /bench/unmarshall.py | import io
import timeit
from dbus_next._private.unmarshaller import Unmarshaller
bluez_rssi_message = (
"6c04010134000000e25389019500000001016f00250000002f6f72672f626c75657a2f686369302f6465"
"765f30385f33415f46325f31455f32425f3631000000020173001f0000006f72672e667265656465736b"
"746f702e444275732e50726f706... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,039 | altdesktop/python-dbus-next | refs/heads/master | /test/test_signature.py | from dbus_next import SignatureTree, SignatureBodyMismatchError, Variant
from dbus_next._private.util import signature_contains_type
import pytest
def assert_simple_type(signature, type_):
assert type_.token == signature
assert type_.signature == signature
assert len(type_.children) == 0
def test_simpl... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,040 | altdesktop/python-dbus-next | refs/heads/master | /dbus_next/_private/address.py | from ..constants import BusType
from ..errors import InvalidAddressError
from urllib.parse import unquote
import re
import os
invalid_address_chars_re = re.compile(r'[^-0-9A-Za-z_/.%]')
def parse_address(address_str):
addresses = []
for address in filter(lambda a: a, address_str.split(';')):
if add... | {"/test/service/test_methods.py": ["/dbus_next/service.py", "/dbus_next/aio/__init__.py", "/dbus_next/__init__.py"], "/dbus_next/glib/proxy_object.py": ["/dbus_next/proxy_object.py", "/dbus_next/message_bus.py", "/dbus_next/message.py", "/dbus_next/errors.py", "/dbus_next/signature.py", "/dbus_next/constants.py", "/dbu... |
9,058 | 12wzy/bilibili | refs/heads/master | /bili/pipelines.py | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html
import json
import codecs
import time
from .videoItems import videoItem
from .videoTagItems import videoTagItem
import logging
... | {"/bili/pipelines.py": ["/bili/videoTagItems.py", "/bili/util/database/mysql.py"], "/bili/spiders/video.py": ["/bili/videoTagItems.py"]} |
9,059 | 12wzy/bilibili | refs/heads/master | /bili/spiders/video.py | import scrapy
import logging
import json
from scrapy.contrib.spiders import CrawlSpider
from ..videoItems import videoItem
from ..videoTagItems import videoTagItem
HTTPS = "https:"
HOST = "https://api.bilibili.com"
class biliSpider(CrawlSpider):
name = "biliSpider"
start_urls = []
tags_url = "https://api.... | {"/bili/pipelines.py": ["/bili/videoTagItems.py", "/bili/util/database/mysql.py"], "/bili/spiders/video.py": ["/bili/videoTagItems.py"]} |
9,060 | 12wzy/bilibili | refs/heads/master | /bili/util/database/mysql.py | import pymysql
import time
class MySQL():
def __init__(self):
self.host = "localhost"
self.user = 'root'
self.password = 'root'
self.dbname = 'bili'
self.charset = 'utf8mb4'
self.cursorclass = pymysql.cursors.DictCursor
self.dateFormat = "%Y-%m-%d %H:%M:%S"... | {"/bili/pipelines.py": ["/bili/videoTagItems.py", "/bili/util/database/mysql.py"], "/bili/spiders/video.py": ["/bili/videoTagItems.py"]} |
9,061 | 12wzy/bilibili | refs/heads/master | /bili/settings.py | # -*- coding: utf-8 -*-
# Scrapy settings for bilibiliSpider project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://doc.scrapy.org/en/latest/topics/settings.html
# https://doc.scrapy.org/en/lates... | {"/bili/pipelines.py": ["/bili/videoTagItems.py", "/bili/util/database/mysql.py"], "/bili/spiders/video.py": ["/bili/videoTagItems.py"]} |
9,062 | 12wzy/bilibili | refs/heads/master | /bili/videoTagItems.py | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class videoTagItem(scrapy.Item):
# define the fields for your item here like:
# name = scrapy.Field()
videoId = scrapy.Field() ... | {"/bili/pipelines.py": ["/bili/videoTagItems.py", "/bili/util/database/mysql.py"], "/bili/spiders/video.py": ["/bili/videoTagItems.py"]} |
9,079 | Harrison-Brown/Qolygen | refs/heads/main | /Qolygen.py | from Qolynomial import *
def Qolygen(points):
result = Qolynomial(0)
for i in range(len(points)):
point = points.pop(i)
q = Qolynomial(1)
d = 1
for p in points:
q *= Qolynomial(-p[0], 1)
d *= (point[0] - p[0])
q *= Qolynomial(Q(point[1]... | {"/Qolygen.py": ["/Qolynomial.py"]} |
9,080 | Harrison-Brown/Qolygen | refs/heads/main | /Qolynomial.py | class Q:
def __init__(self, n, d = 1):
self.n = n
if n == 0:
d = 1
self.d = d
self.reduce()
def __add__(self, other):
n = (self.n * other.d) + (self.d * other.n)
d = self.d * other.d
return Q(n, d)
def __sub__(self, other):
... | {"/Qolygen.py": ["/Qolynomial.py"]} |
9,083 | sschwa12/aoc2020 | refs/heads/master | /02.py | from collections import Counter
from typing import Tuple, List
from utils import read_file
data = read_file('02')
def split_pass(password: str) -> Tuple[int, int, str, str]:
policy, char, pw = password.split(' ')
policy_range = policy.split('-')
sanitized_char = char[0]
start, end = [int(p) for p in... | {"/02.py": ["/utils.py"], "/03.py": ["/utils.py"], "/09.py": ["/utils.py"], "/01.py": ["/utils.py"], "/06.py": ["/utils.py"], "/11.py": ["/utils.py"], "/05.py": ["/utils.py"], "/08.py": ["/utils.py"], "/07.py": ["/utils.py"], "/10.py": ["/utils.py"], "/04.py": ["/utils.py"]} |
9,084 | sschwa12/aoc2020 | refs/heads/master | /utils.py | from pathlib import Path
def read_file(name, *, do_strip=True):
path = Path(f'/Users/scottschwartz/code/aoc2020/inputs')
if isinstance(name, int):
name = f'{name:02d}'
with open(path / name) as f:
res = f.readlines()
if do_strip:
res = list(map(str.strip, res))
return res
... | {"/02.py": ["/utils.py"], "/03.py": ["/utils.py"], "/09.py": ["/utils.py"], "/01.py": ["/utils.py"], "/06.py": ["/utils.py"], "/11.py": ["/utils.py"], "/05.py": ["/utils.py"], "/08.py": ["/utils.py"], "/07.py": ["/utils.py"], "/10.py": ["/utils.py"], "/04.py": ["/utils.py"]} |
9,085 | sschwa12/aoc2020 | refs/heads/master | /03.py | from functools import reduce
from typing import List, Tuple
from utils import read_file
data = [list(r) for r in read_file('03')]
def count_trees(tree_map: List[str], slope: Tuple[int, int]) -> int:
right, down = slope
count = 0
idx = right
for i in range(down, len(tree_map), down):
row = tr... | {"/02.py": ["/utils.py"], "/03.py": ["/utils.py"], "/09.py": ["/utils.py"], "/01.py": ["/utils.py"], "/06.py": ["/utils.py"], "/11.py": ["/utils.py"], "/05.py": ["/utils.py"], "/08.py": ["/utils.py"], "/07.py": ["/utils.py"], "/10.py": ["/utils.py"], "/04.py": ["/utils.py"]} |
9,086 | sschwa12/aoc2020 | refs/heads/master | /09.py | from typing import List
from utils import read_file
data = [int(line) for line in read_file(9)]
def is_sum_of_addends(num: int, addends: List[int]) -> bool:
sums = set()
for i, n1 in enumerate(addends):
for n2 in addends[i + 1:]:
sums.add(n1 + n2)
return num in sums
def first_sum(m... | {"/02.py": ["/utils.py"], "/03.py": ["/utils.py"], "/09.py": ["/utils.py"], "/01.py": ["/utils.py"], "/06.py": ["/utils.py"], "/11.py": ["/utils.py"], "/05.py": ["/utils.py"], "/08.py": ["/utils.py"], "/07.py": ["/utils.py"], "/10.py": ["/utils.py"], "/04.py": ["/utils.py"]} |
9,087 | sschwa12/aoc2020 | refs/heads/master | /01.py | from typing import List, Tuple
from utils import read_file
data = [int(n) for n in read_file('01')]
# part 1
def find_addends(nums: List[int], tgt: int) -> Tuple[int, int]:
num_map = {}
for i, num in enumerate(nums):
diff = tgt - num
if num_map.get(diff):
return nums[num_map[diff... | {"/02.py": ["/utils.py"], "/03.py": ["/utils.py"], "/09.py": ["/utils.py"], "/01.py": ["/utils.py"], "/06.py": ["/utils.py"], "/11.py": ["/utils.py"], "/05.py": ["/utils.py"], "/08.py": ["/utils.py"], "/07.py": ["/utils.py"], "/10.py": ["/utils.py"], "/04.py": ["/utils.py"]} |
9,088 | sschwa12/aoc2020 | refs/heads/master | /06.py | from utils import read_file
data = read_file('06', do_strip=False)
# part 1
forms = [set(''.join(l.split('\n'))) for l in ''.join(data).split('\n\n')]
print('p1', sum([len(f) for f in forms]))
# part 2
forms = [l.split('\n') for l in ''.join(data).split('\n\n')]
print('p2', sum([len(set(f[0]).intersection(*f)) for... | {"/02.py": ["/utils.py"], "/03.py": ["/utils.py"], "/09.py": ["/utils.py"], "/01.py": ["/utils.py"], "/06.py": ["/utils.py"], "/11.py": ["/utils.py"], "/05.py": ["/utils.py"], "/08.py": ["/utils.py"], "/07.py": ["/utils.py"], "/10.py": ["/utils.py"], "/04.py": ["/utils.py"]} |
9,089 | sschwa12/aoc2020 | refs/heads/master | /11.py | from utils import read_file, flatten
data = [list(row) for row in read_file(11)]
def safe_get(d, i, j):
if i == -1 or j == -1:
return None
try:
return d[i][j]
except IndexError:
return None
def get_immediately_adjacent_els(d, i, j):
return [safe_get(d, i + x, j + y) for x in... | {"/02.py": ["/utils.py"], "/03.py": ["/utils.py"], "/09.py": ["/utils.py"], "/01.py": ["/utils.py"], "/06.py": ["/utils.py"], "/11.py": ["/utils.py"], "/05.py": ["/utils.py"], "/08.py": ["/utils.py"], "/07.py": ["/utils.py"], "/10.py": ["/utils.py"], "/04.py": ["/utils.py"]} |
9,090 | sschwa12/aoc2020 | refs/heads/master | /05.py | import math
from utils import read_file
data = read_file('05')
def get_middle(num1: int, num2: int, round='up') -> int:
if round == 'down':
return (num1 + num2) // 2
return math.ceil((num1 + num2) / 2)
def get_seat_id(boarding_pass: str) -> int:
lower_row = 0
upper_row = 127
lower_col ... | {"/02.py": ["/utils.py"], "/03.py": ["/utils.py"], "/09.py": ["/utils.py"], "/01.py": ["/utils.py"], "/06.py": ["/utils.py"], "/11.py": ["/utils.py"], "/05.py": ["/utils.py"], "/08.py": ["/utils.py"], "/07.py": ["/utils.py"], "/10.py": ["/utils.py"], "/04.py": ["/utils.py"]} |
9,091 | sschwa12/aoc2020 | refs/heads/master | /08.py | from utils import read_file
data = read_file(8)
class Interpreter:
def __init__(self, instructions):
self.pc = 0
self.accumulator = 0
self.instructions = instructions
self.executed = set()
def nop(self, _):
self.pc += 1
def acc(self, val):
self.accumulato... | {"/02.py": ["/utils.py"], "/03.py": ["/utils.py"], "/09.py": ["/utils.py"], "/01.py": ["/utils.py"], "/06.py": ["/utils.py"], "/11.py": ["/utils.py"], "/05.py": ["/utils.py"], "/08.py": ["/utils.py"], "/07.py": ["/utils.py"], "/10.py": ["/utils.py"], "/04.py": ["/utils.py"]} |
9,092 | sschwa12/aoc2020 | refs/heads/master | /07.py | from typing import List, Tuple
from utils import read_file
data = read_file(7)
def get_bag_color(bag: str):
return bag.rsplit(' ', 1)[0]
def parse_bag_str(bag_str: str) -> Tuple[str, List[Tuple[str, int]]]:
outer, inner = bag_str.split(' contain ')
outer = get_bag_color(outer)
contents = []
fo... | {"/02.py": ["/utils.py"], "/03.py": ["/utils.py"], "/09.py": ["/utils.py"], "/01.py": ["/utils.py"], "/06.py": ["/utils.py"], "/11.py": ["/utils.py"], "/05.py": ["/utils.py"], "/08.py": ["/utils.py"], "/07.py": ["/utils.py"], "/10.py": ["/utils.py"], "/04.py": ["/utils.py"]} |
9,093 | sschwa12/aoc2020 | refs/heads/master | /10.py | from collections import Counter
from functools import reduce, lru_cache
from operator import mul
from utils import read_file
data = [int(d) for d in read_file(10)]
d = sorted(data)
d.append(d[-1] + 3)
d.insert(0, 0)
def get_jolt_differences() -> int:
diffs = []
for i in range(1, len(d)):
num = d[i... | {"/02.py": ["/utils.py"], "/03.py": ["/utils.py"], "/09.py": ["/utils.py"], "/01.py": ["/utils.py"], "/06.py": ["/utils.py"], "/11.py": ["/utils.py"], "/05.py": ["/utils.py"], "/08.py": ["/utils.py"], "/07.py": ["/utils.py"], "/10.py": ["/utils.py"], "/04.py": ["/utils.py"]} |
9,094 | sschwa12/aoc2020 | refs/heads/master | /04.py | import re
from typing import List
from utils import read_file
data = read_file('04', do_strip=False)
REQUIRED_FIELDS = ('byr', 'iyr', 'eyr', 'hgt', 'hcl', 'ecl', 'pid')
EYE_COLORS = ('amb', 'blu', 'brn', 'gry', 'grn', 'hzl', 'oth')
class PassportValidator:
def __init__(self, passports):
self.passports ... | {"/02.py": ["/utils.py"], "/03.py": ["/utils.py"], "/09.py": ["/utils.py"], "/01.py": ["/utils.py"], "/06.py": ["/utils.py"], "/11.py": ["/utils.py"], "/05.py": ["/utils.py"], "/08.py": ["/utils.py"], "/07.py": ["/utils.py"], "/10.py": ["/utils.py"], "/04.py": ["/utils.py"]} |
9,102 | kostans3k/teextme | refs/heads/master | /messaging/forms.py | from django.forms import ModelForm
from messaging.models import Message
class MessageForm(ModelForm):
class Meta:
model = Message
exclude = (
'user',
'sender',
'recepient',
'date_sent',
'date_received',
'other_message')
... | {"/messaging/views.py": ["/messaging/forms.py"], "/contacts/views.py": ["/contacts/forms.py"], "/contacts/urls.py": ["/contacts/views.py"]} |
9,103 | kostans3k/teextme | refs/heads/master | /messaging/urls.py | from django.conf.urls import patterns, url
urlpatterns = patterns(
'messaging.views',
url(r'^(?P<contact_id>\d+)$',
'messages_contact',
name='messages_contact'),
)
| {"/messaging/views.py": ["/messaging/forms.py"], "/contacts/views.py": ["/contacts/forms.py"], "/contacts/urls.py": ["/contacts/views.py"]} |
9,104 | kostans3k/teextme | refs/heads/master | /messaging/views.py | from django.shortcuts import render_to_response, redirect
from django.template import RequestContext
from django.db.models import Q
from messaging.models import Message
from contacts.models import Contact
from messaging.forms import *
def messages_contact(request, contact_id):
user = request.user
qs = Mess... | {"/messaging/views.py": ["/messaging/forms.py"], "/contacts/views.py": ["/contacts/forms.py"], "/contacts/urls.py": ["/contacts/views.py"]} |
9,105 | kostans3k/teextme | refs/heads/master | /contacts/views.py | from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response
from django.template import RequestContext
from rest_framework import generics
from rest_framework.permissions import IsAuthenticated
from contacts.models import Contact
from contacts.forms import ContactForm
from contacts.se... | {"/messaging/views.py": ["/messaging/forms.py"], "/contacts/views.py": ["/contacts/forms.py"], "/contacts/urls.py": ["/contacts/views.py"]} |
9,106 | kostans3k/teextme | refs/heads/master | /customregistration/urls.py | from django.conf.urls import patterns, include, url
from django.contrib.auth import views as auth_views
urlpatterns = patterns(
'',
url(r'^register/$',
'customregistration.views.register',
name='registration_register'),
url(r'^activate/$',
'customregistration.views.activate',
... | {"/messaging/views.py": ["/messaging/forms.py"], "/contacts/views.py": ["/contacts/forms.py"], "/contacts/urls.py": ["/contacts/views.py"]} |
9,107 | kostans3k/teextme | refs/heads/master | /contacts/urls.py | from django.conf.urls import patterns, url
from rest_framework.urlpatterns import format_suffix_patterns
from contacts.views import ContactList
urlpatterns = patterns(
'contacts.views',
url(r'^$', 'contacts', name='contacts'),
url(r'^add$', 'contacts_add', name='contacts_add'),
url(r'^api$', Contac... | {"/messaging/views.py": ["/messaging/forms.py"], "/contacts/views.py": ["/contacts/forms.py"], "/contacts/urls.py": ["/contacts/views.py"]} |
9,108 | kostans3k/teextme | refs/heads/master | /teextme/urls.py | from django.conf.urls import patterns, include, url
from django.views.generic import TemplateView
from django.contrib import admin
from django.contrib.auth.decorators import login_required
admin.autodiscover()
class RequestTemplateView(TemplateView):
def get_context_data(self, **kwargs):
context = super(R... | {"/messaging/views.py": ["/messaging/forms.py"], "/contacts/views.py": ["/contacts/forms.py"], "/contacts/urls.py": ["/contacts/views.py"]} |
9,109 | kostans3k/teextme | refs/heads/master | /contacts/forms.py | from django.forms import ModelForm
from contacts.models import Contact
class ContactForm(ModelForm):
class Meta:
model = Contact
exclude = ('user', 'contact_user')
def __init__(self, user, *args, **kwargs):
self.user = user
super(ContactForm, self).__init__(*args, **kwargs)
... | {"/messaging/views.py": ["/messaging/forms.py"], "/contacts/views.py": ["/contacts/forms.py"], "/contacts/urls.py": ["/contacts/views.py"]} |
9,110 | LiquidNalee/MiniPkmnShowdown | refs/heads/main | /models/pkmn/moves/PokemonMove.py | from enum import Enum
from os.path import join
from json import load
from models.pkmn.types.PokemonType import PokemonType
from models.pkmn.stats.StatsDict import StatsDict
from database.DatabaseConfig import database_dir
class MoveCategory(Enum):
Physical = "[Ph]"
Special = "[Sp]"
Status = "[St]"
cla... | {"/models/pkmn/moves/PokemonMove.py": ["/models/pkmn/types/PokemonType.py", "/models/pkmn/stats/StatsDict.py", "/database/DatabaseConfig.py"], "/tests/models/game/battle/test_BattleGameState.py": ["/models/game/battle/BattleGameState.py", "/models/game/trainer/PokemonTrainer.py", "/models/game/trainer/utils/ArenaBadge.... |
9,111 | LiquidNalee/MiniPkmnShowdown | refs/heads/main | /tests/models/game/battle/test_BattleGameState.py | from unittest import TestCase
from models.game.battle.BattleGameState import BattleGameState
from models.game.trainer.PokemonTrainer import PokemonTrainer
from models.game.trainer.utils.ArenaBadge import ArenaBadge
from models.pkmn.PokemonModel import PokemonModel
from models.pkmn.moves.PokemonMove import MoveCategory... | {"/models/pkmn/moves/PokemonMove.py": ["/models/pkmn/types/PokemonType.py", "/models/pkmn/stats/StatsDict.py", "/database/DatabaseConfig.py"], "/tests/models/game/battle/test_BattleGameState.py": ["/models/game/battle/BattleGameState.py", "/models/game/trainer/PokemonTrainer.py", "/models/game/trainer/utils/ArenaBadge.... |
9,112 | LiquidNalee/MiniPkmnShowdown | refs/heads/main | /engine/pkmn/types/ClassicTypesRuleSet.py | from pandas import DataFrame
from engine.pkmn.types.TypesBaseRuleSet import TypesBaseRuleSet
from models.pkmn.types.PokemonType import PokemonType
class ClassicTypesRuleSet(TypesBaseRuleSet):
def __init__(self):
# Init all at 1
type_effectiveness_chart = DataFrame({ref_pkmn_type: {pkmn_type: floa... | {"/models/pkmn/moves/PokemonMove.py": ["/models/pkmn/types/PokemonType.py", "/models/pkmn/stats/StatsDict.py", "/database/DatabaseConfig.py"], "/tests/models/game/battle/test_BattleGameState.py": ["/models/game/battle/BattleGameState.py", "/models/game/trainer/PokemonTrainer.py", "/models/game/trainer/utils/ArenaBadge.... |
9,113 | LiquidNalee/MiniPkmnShowdown | refs/heads/main | /database/DatabaseConfig.py | from os.path import join, dirname, realpath
from pathlib import Path
from typing import List
from json import dump
from requests import request
from re import sub
database_dir = Path(dirname(realpath(__file__)))
__pokeApi_url = "https://pokeapi.co/api/v2/"
def updatePkmnDatabase(pkmn_list: List):
for pkmn_name, ... | {"/models/pkmn/moves/PokemonMove.py": ["/models/pkmn/types/PokemonType.py", "/models/pkmn/stats/StatsDict.py", "/database/DatabaseConfig.py"], "/tests/models/game/battle/test_BattleGameState.py": ["/models/game/battle/BattleGameState.py", "/models/game/trainer/PokemonTrainer.py", "/models/game/trainer/utils/ArenaBadge.... |
9,114 | LiquidNalee/MiniPkmnShowdown | refs/heads/main | /models/pkmn/PokemonBaseModel.py | from models.pkmn.stats.StatsDict import StatsDict
from models.pkmn.types.PokemonType import PokemonType, format_types_tuple, type_equals
class PokemonBaseModel:
def __init__(self, name: str, types: (PokemonType, PokemonType), base_stats: StatsDict):
self.name = name
self.type = format_types_tuple... | {"/models/pkmn/moves/PokemonMove.py": ["/models/pkmn/types/PokemonType.py", "/models/pkmn/stats/StatsDict.py", "/database/DatabaseConfig.py"], "/tests/models/game/battle/test_BattleGameState.py": ["/models/game/battle/BattleGameState.py", "/models/game/trainer/PokemonTrainer.py", "/models/game/trainer/utils/ArenaBadge.... |
9,115 | LiquidNalee/MiniPkmnShowdown | refs/heads/main | /tests/database/test_DatabaseInit.py | from unittest import TestCase
from database.DatabaseConfig import getPkmnDatabase
from models.game.trainer.PokemonTrainer import PokemonTrainer
from models.pkmn.natures.PokemonNature import PokemonNature
from models.pkmn.stats.StatsDict import StatsDict
from models.pkmn.types.PokemonType import PokemonType
class Te... | {"/models/pkmn/moves/PokemonMove.py": ["/models/pkmn/types/PokemonType.py", "/models/pkmn/stats/StatsDict.py", "/database/DatabaseConfig.py"], "/tests/models/game/battle/test_BattleGameState.py": ["/models/game/battle/BattleGameState.py", "/models/game/trainer/PokemonTrainer.py", "/models/game/trainer/utils/ArenaBadge.... |
9,116 | LiquidNalee/MiniPkmnShowdown | refs/heads/main | /engine/game/BattleEngine.py | from random import randint
from engine.game import InputHandler
from engine.game.BattleDisplay import displayPlayers, displayBattleGameState, displayUsedMove, \
displaySwitch, displayEndOfBattle
from engine.pkmn.types.TypesBaseRuleSet import TypesBaseRuleSet
from models.game.battle.BattleGameState import BattleGam... | {"/models/pkmn/moves/PokemonMove.py": ["/models/pkmn/types/PokemonType.py", "/models/pkmn/stats/StatsDict.py", "/database/DatabaseConfig.py"], "/tests/models/game/battle/test_BattleGameState.py": ["/models/game/battle/BattleGameState.py", "/models/game/trainer/PokemonTrainer.py", "/models/game/trainer/utils/ArenaBadge.... |
9,117 | LiquidNalee/MiniPkmnShowdown | refs/heads/main | /models/pkmn/PokemonModel.py | from typing import List
from os.path import join
from json import load
from models.pkmn.PokemonBaseModel import PokemonBaseModel
from models.pkmn.stats.StatsDict import StatsDict
from models.pkmn.types.PokemonType import PokemonType
from models.pkmn.natures.PokemonNature import PokemonNature
from models.pkmn.moves.Pok... | {"/models/pkmn/moves/PokemonMove.py": ["/models/pkmn/types/PokemonType.py", "/models/pkmn/stats/StatsDict.py", "/database/DatabaseConfig.py"], "/tests/models/game/battle/test_BattleGameState.py": ["/models/game/battle/BattleGameState.py", "/models/game/trainer/PokemonTrainer.py", "/models/game/trainer/utils/ArenaBadge.... |
9,118 | LiquidNalee/MiniPkmnShowdown | refs/heads/main | /engine/pkmn/types/TypesBaseRuleSet.py | from pandas import DataFrame
from models.pkmn.types.PokemonType import PokemonType
class TypesBaseRuleSet:
# .loc on DataFrame: effectiveness of attack on defense
# .iloc on DataFrame: effectiveness of defense on attack
def __init__(self, type_effectiveness_chart: DataFrame):
self.type_effective... | {"/models/pkmn/moves/PokemonMove.py": ["/models/pkmn/types/PokemonType.py", "/models/pkmn/stats/StatsDict.py", "/database/DatabaseConfig.py"], "/tests/models/game/battle/test_BattleGameState.py": ["/models/game/battle/BattleGameState.py", "/models/game/trainer/PokemonTrainer.py", "/models/game/trainer/utils/ArenaBadge.... |
9,119 | LiquidNalee/MiniPkmnShowdown | refs/heads/main | /tests/models/game/trainer/test_PokemonTrainer.py | from unittest import TestCase
from models.game.trainer.PokemonTrainer import PokemonTrainer
from models.pkmn.PokemonModel import PokemonModel
from models.pkmn.moves.PokemonMove import PokemonMove, MoveCategory
from models.pkmn.stats.StatsDict import StatsDict
from models.pkmn.types.PokemonType import PokemonType
from ... | {"/models/pkmn/moves/PokemonMove.py": ["/models/pkmn/types/PokemonType.py", "/models/pkmn/stats/StatsDict.py", "/database/DatabaseConfig.py"], "/tests/models/game/battle/test_BattleGameState.py": ["/models/game/battle/BattleGameState.py", "/models/game/trainer/PokemonTrainer.py", "/models/game/trainer/utils/ArenaBadge.... |
9,120 | LiquidNalee/MiniPkmnShowdown | refs/heads/main | /tests/models/pkmn/test_PokemonModel.py | from unittest import TestCase
from models.pkmn.PokemonModel import PokemonModel
from models.pkmn.moves.PokemonMove import PokemonMove, MoveCategory
from models.pkmn.types.PokemonType import PokemonType, type_equals
from models.pkmn.natures.PokemonNature import PokemonNature
from models.pkmn.stats.StatsDict import Stats... | {"/models/pkmn/moves/PokemonMove.py": ["/models/pkmn/types/PokemonType.py", "/models/pkmn/stats/StatsDict.py", "/database/DatabaseConfig.py"], "/tests/models/game/battle/test_BattleGameState.py": ["/models/game/battle/BattleGameState.py", "/models/game/trainer/PokemonTrainer.py", "/models/game/trainer/utils/ArenaBadge.... |
9,121 | LiquidNalee/MiniPkmnShowdown | refs/heads/main | /tests/models/pkmn/test_PokemonBaseModel.py | from unittest import TestCase
from models.pkmn.PokemonBaseModel import PokemonBaseModel
from models.pkmn.types.PokemonType import PokemonType, type_equals
from models.pkmn.stats.StatsDict import StatsDict
class TestPokemonBaseModel(TestCase):
def test_double_type_pokemon(self):
scizor = PokemonBaseModel(... | {"/models/pkmn/moves/PokemonMove.py": ["/models/pkmn/types/PokemonType.py", "/models/pkmn/stats/StatsDict.py", "/database/DatabaseConfig.py"], "/tests/models/game/battle/test_BattleGameState.py": ["/models/game/battle/BattleGameState.py", "/models/game/trainer/PokemonTrainer.py", "/models/game/trainer/utils/ArenaBadge.... |
9,122 | LiquidNalee/MiniPkmnShowdown | refs/heads/main | /tests/engine/game/test_BattleEngine.py | import builtins
from unittest import TestCase
import mock
from engine.game import InputHandler
from engine.game.BattleEngine import BattleEngine
from engine.pkmn.types.ClassicTypesRuleSet import ClassicTypesRuleSet
from models.game.battle.BattleGameState import BattleGameState
from models.game.trainer.PokemonTrainer i... | {"/models/pkmn/moves/PokemonMove.py": ["/models/pkmn/types/PokemonType.py", "/models/pkmn/stats/StatsDict.py", "/database/DatabaseConfig.py"], "/tests/models/game/battle/test_BattleGameState.py": ["/models/game/battle/BattleGameState.py", "/models/game/trainer/PokemonTrainer.py", "/models/game/trainer/utils/ArenaBadge.... |
9,123 | LiquidNalee/MiniPkmnShowdown | refs/heads/main | /miniShowdown.py | from argparse import ArgumentParser
from json import load
from database.DatabaseConfig import updatePkmnDatabase, updateMoveDatabase
from engine.game.BattleEngine import BattleEngine
from engine.pkmn.types.ClassicTypesRuleSet import ClassicTypesRuleSet
from models.game.battle.BattleGameState import BattleGameState
fr... | {"/models/pkmn/moves/PokemonMove.py": ["/models/pkmn/types/PokemonType.py", "/models/pkmn/stats/StatsDict.py", "/database/DatabaseConfig.py"], "/tests/models/game/battle/test_BattleGameState.py": ["/models/game/battle/BattleGameState.py", "/models/game/trainer/PokemonTrainer.py", "/models/game/trainer/utils/ArenaBadge.... |
9,124 | LiquidNalee/MiniPkmnShowdown | refs/heads/main | /models/pkmn/types/PokemonType.py | from enum import Enum
from re import sub
class PokemonType(Enum):
Normal = 1
Fighting = 2
Flying = 3
Poison = 4
Ground = 5
Rock = 6
Bug = 7
Ghost = 8
Psychic = 9
Grass = 10
Fire = 11
Water = 12
Electric = 13
Ice = 14
Dragon = 15
Steel = 16
Dark = 17
... | {"/models/pkmn/moves/PokemonMove.py": ["/models/pkmn/types/PokemonType.py", "/models/pkmn/stats/StatsDict.py", "/database/DatabaseConfig.py"], "/tests/models/game/battle/test_BattleGameState.py": ["/models/game/battle/BattleGameState.py", "/models/game/trainer/PokemonTrainer.py", "/models/game/trainer/utils/ArenaBadge.... |
9,125 | LiquidNalee/MiniPkmnShowdown | refs/heads/main | /engine/game/BattleDisplay.py | from re import sub, M
from models.game.battle.BattleGameState import BattleGameState
from models.pkmn.PokemonModel import PokemonModel
from models.pkmn.moves.PokemonMove import PokemonMove
__separation_line = '-'.join('' for _ in range(150))
def __shiftDisplayBox(box: str, shift: int):
return sub("^", "\t".join(... | {"/models/pkmn/moves/PokemonMove.py": ["/models/pkmn/types/PokemonType.py", "/models/pkmn/stats/StatsDict.py", "/database/DatabaseConfig.py"], "/tests/models/game/battle/test_BattleGameState.py": ["/models/game/battle/BattleGameState.py", "/models/game/trainer/PokemonTrainer.py", "/models/game/trainer/utils/ArenaBadge.... |
9,126 | LiquidNalee/MiniPkmnShowdown | refs/heads/main | /models/game/battle/BattleGameState.py | from models.game.trainer.PokemonTrainer import PokemonTrainer
from models.pkmn.PokemonModel import PokemonModel
from models.pkmn.moves.PokemonMove import PokemonMove
class BattleGameState:
def __init__(self, player: PokemonTrainer, opponent: PokemonTrainer):
self.turn = 1
self.player = player.mak... | {"/models/pkmn/moves/PokemonMove.py": ["/models/pkmn/types/PokemonType.py", "/models/pkmn/stats/StatsDict.py", "/database/DatabaseConfig.py"], "/tests/models/game/battle/test_BattleGameState.py": ["/models/game/battle/BattleGameState.py", "/models/game/trainer/PokemonTrainer.py", "/models/game/trainer/utils/ArenaBadge.... |
9,127 | LiquidNalee/MiniPkmnShowdown | refs/heads/main | /models/game/trainer/PokemonTrainer.py | from typing import List
from models.game.trainer.utils.ArenaBadge import ArenaBadge
from models.pkmn.PokemonModel import PokemonModel
class PokemonTrainer:
def __init__(self, name: str, team: List[PokemonModel], badges: List[ArenaBadge]):
self.name = name
self.team = [team[i] if i < len(team) el... | {"/models/pkmn/moves/PokemonMove.py": ["/models/pkmn/types/PokemonType.py", "/models/pkmn/stats/StatsDict.py", "/database/DatabaseConfig.py"], "/tests/models/game/battle/test_BattleGameState.py": ["/models/game/battle/BattleGameState.py", "/models/game/trainer/PokemonTrainer.py", "/models/game/trainer/utils/ArenaBadge.... |
9,128 | LiquidNalee/MiniPkmnShowdown | refs/heads/main | /models/pkmn/natures/PokemonNature.py | from enum import Enum
from models.pkmn.stats.StatsDict import StatsDict
# Bonus/Malus percentage from natures
nature_base_modifier = 100
nature_bonus = 10
nature_bonus_modifier = nature_base_modifier + nature_bonus
nature_malus = 10
nature_malus_modifier = nature_base_modifier - nature_malus
class _PokemonNatureIm... | {"/models/pkmn/moves/PokemonMove.py": ["/models/pkmn/types/PokemonType.py", "/models/pkmn/stats/StatsDict.py", "/database/DatabaseConfig.py"], "/tests/models/game/battle/test_BattleGameState.py": ["/models/game/battle/BattleGameState.py", "/models/game/trainer/PokemonTrainer.py", "/models/game/trainer/utils/ArenaBadge.... |
9,129 | LiquidNalee/MiniPkmnShowdown | refs/heads/main | /models/pkmn/stats/StatsDict.py |
class StatsDict:
def __init__(self, hp: int = 0, atk: int = 0, phys_def: int = 0, spe_atk: int = 0, spe_def: int = 0, spd: int = 0):
self.hp = int(hp)
self.atk = int(atk)
self.phys_def = int(phys_def)
self.spe_atk = int(spe_atk)
self.spe_def = int(spe_def)
self.spd... | {"/models/pkmn/moves/PokemonMove.py": ["/models/pkmn/types/PokemonType.py", "/models/pkmn/stats/StatsDict.py", "/database/DatabaseConfig.py"], "/tests/models/game/battle/test_BattleGameState.py": ["/models/game/battle/BattleGameState.py", "/models/game/trainer/PokemonTrainer.py", "/models/game/trainer/utils/ArenaBadge.... |
9,130 | LiquidNalee/MiniPkmnShowdown | refs/heads/main | /engine/game/InputHandler.py | from typing import List
from models.pkmn.PokemonModel import PokemonModel
from models.pkmn.moves.PokemonMove import PokemonMove
def repeatOnError(*exceptions):
def checking(function):
def checked(*args, **kwargs):
while True:
try:
result = function(*args, *... | {"/models/pkmn/moves/PokemonMove.py": ["/models/pkmn/types/PokemonType.py", "/models/pkmn/stats/StatsDict.py", "/database/DatabaseConfig.py"], "/tests/models/game/battle/test_BattleGameState.py": ["/models/game/battle/BattleGameState.py", "/models/game/trainer/PokemonTrainer.py", "/models/game/trainer/utils/ArenaBadge.... |
9,131 | LiquidNalee/MiniPkmnShowdown | refs/heads/main | /models/game/trainer/utils/ArenaBadge.py | from enum import Enum
class ArenaBadge(Enum):
Boulder = 1
Cascade = 2
Thunder = 3
Rainbow = 4
Soul = 5
Marsh = 6
Volcano = 7
Earth = 8
def __lt__(self, other):
if self.__class__ != other.__class__:
return NotImplementedError
return self.value < other.va... | {"/models/pkmn/moves/PokemonMove.py": ["/models/pkmn/types/PokemonType.py", "/models/pkmn/stats/StatsDict.py", "/database/DatabaseConfig.py"], "/tests/models/game/battle/test_BattleGameState.py": ["/models/game/battle/BattleGameState.py", "/models/game/trainer/PokemonTrainer.py", "/models/game/trainer/utils/ArenaBadge.... |
9,132 | BlueDragon23/Hearthstone | refs/heads/master | /renamescript.py | import os
for file in os.listdir('./cards'):
tokens = file.split("-")
if tokens[0].isdigit():
try:
os.rename(file, "-".join(tokens[1:]))
except Exception as e:
print(e)
| {"/main2.py": ["/data.py"]} |
9,133 | BlueDragon23/Hearthstone | refs/heads/master | /hearthpwnscraper.py | import requests
from bs4 import BeautifulSoup
import shutil
def download_images(url):
page = requests.get(url)
soup = BeautifulSoup(page.text, 'html.parser')
for link in soup.find_all('img'):
pic = requests.get(link.get('src'), stream=True)
if pic.status_code == 200:
with open(... | {"/main2.py": ["/data.py"]} |
9,134 | BlueDragon23/Hearthstone | refs/heads/master | /data.py | import json
import numpy
def read_json():
"""
Read the file, and convert the json to a python format
:return:
"""
file = open("C:\\Users\\Aidan\\Dropbox\\University\\COSC3000\ComputerGraphics\\cards.collectible.json")
cards = json.load(file)
return cards
def get_minions(cards) -> []:
... | {"/main2.py": ["/data.py"]} |
9,135 | BlueDragon23/Hearthstone | refs/heads/master | /main.py | """
Hearthstone Computer Graphics
@author: Aidan Goldthorpe
----------------------
Graphical display of Hearthstone card statistics
ESC: exit
"""
import json
import colorsys
from math import *
import time
from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GLUT import *
####################################... | {"/main2.py": ["/data.py"]} |
9,136 | BlueDragon23/Hearthstone | refs/heads/master | /testplot.py | import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import json
file = open("C:\\Users\Aidan\Dropbox\\University\COSC3000\ComputerGraphics\cards.collectible.json")
cards = json.load(file)
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
mana = []
health = []
attack = []
for card in ... | {"/main2.py": ["/data.py"]} |
9,137 | BlueDragon23/Hearthstone | refs/heads/master | /main2.py | import json
from math import *
import time
from OpenGL.GL import *
import logging
# logging.basicConfig(level=logging.DEBUG)
# OpenGL.FULL_LOGGING = True
# OpenGL.ERROR_ON_COPY = True
from OpenGL.GLU import *
from OpenGL.GLUT import *
import data
import sys
from PIL import Image
from io import BytesIO
import numpy
from... | {"/main2.py": ["/data.py"]} |
9,138 | lioenel/mybookshelf2 | refs/heads/master | /manage.py | #!/usr/bin/env python
from flask_script import Manager, prompt_pass, prompt_bool
from flask_script.commands import InvalidCommand
from app import app,db
import app.model as model
from app.utils import hash_pwd
import app.schema as schema
import sys
from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound
fro... | {"/manage.py": ["/app/utils.py", "/app/schema.py"], "/app/api.py": ["/app/schema.py", "/app/logic.py", "/app/utils.py", "/app/access.py"], "/engine/tasks.py": ["/settings.py", "/app/utils.py", "/engine/dal.py"], "/app/tests/test_logic.py": ["/app/logic.py"], "/app/tests/test_schema.py": ["/app/schema.py"], "/engine/dal... |
9,139 | lioenel/mybookshelf2 | refs/heads/master | /app/api.py | from flask import Blueprint, request, abort, current_app, jsonify
from flask_restful import Resource as BaseResource, Api
import app.model as model
import app.schema as schema
import app.logic as logic
from app.utils import success_error, mimetype_from_file_name
from app import db
from app.cors import add_cors_headers
... | {"/manage.py": ["/app/utils.py", "/app/schema.py"], "/app/api.py": ["/app/schema.py", "/app/logic.py", "/app/utils.py", "/app/access.py"], "/engine/tasks.py": ["/settings.py", "/app/utils.py", "/engine/dal.py"], "/app/tests/test_logic.py": ["/app/logic.py"], "/app/tests/test_schema.py": ["/app/schema.py"], "/engine/dal... |
9,140 | lioenel/mybookshelf2 | refs/heads/master | /engine/tasks.py | import os.path
import re
import asyncio
from asexor.task import BaseTask, TaskError
from settings import UPLOAD_DIR, IMAGE_MAGIC
from app.utils import file_hash
import logging
import engine.dal as dal
logger = logging.getLogger('tasks')
class MetadataTask(BaseTask):
NAME = 'metadata'
COMMAND = 'ebook-meta'
... | {"/manage.py": ["/app/utils.py", "/app/schema.py"], "/app/api.py": ["/app/schema.py", "/app/logic.py", "/app/utils.py", "/app/access.py"], "/engine/tasks.py": ["/settings.py", "/app/utils.py", "/engine/dal.py"], "/app/tests/test_logic.py": ["/app/logic.py"], "/app/tests/test_schema.py": ["/app/schema.py"], "/engine/dal... |
9,141 | lioenel/mybookshelf2 | refs/heads/master | /app/tests/test_logic.py | from app import db, app
import app.model as model
import app.logic as logic
from .basecase import TestCase
import os.path
ebook_file = os.path.join(os.path.dirname(
__file__), '../data/books/Kissinger, Henry/Roky v Bilem dome/Kissinger, Henry - Roky v Bilem dome.epub')
class TestLogic(TestCase):
def test_l... | {"/manage.py": ["/app/utils.py", "/app/schema.py"], "/app/api.py": ["/app/schema.py", "/app/logic.py", "/app/utils.py", "/app/access.py"], "/engine/tasks.py": ["/settings.py", "/app/utils.py", "/engine/dal.py"], "/app/tests/test_logic.py": ["/app/logic.py"], "/app/tests/test_schema.py": ["/app/schema.py"], "/engine/dal... |
9,142 | lioenel/mybookshelf2 | refs/heads/master | /app/utils.py | from functools import wraps
import bcrypt
import jwt
from datetime import datetime, timedelta
import unicodedata
import hashlib
import logging
import mimetypes
logger = logging.getLogger('utils')
def mimetype_from_file_name(fname):
return mimetypes.guess_type(fname, False)[0]
def success_error(fn):
@wraps(... | {"/manage.py": ["/app/utils.py", "/app/schema.py"], "/app/api.py": ["/app/schema.py", "/app/logic.py", "/app/utils.py", "/app/access.py"], "/engine/tasks.py": ["/settings.py", "/app/utils.py", "/engine/dal.py"], "/app/tests/test_logic.py": ["/app/logic.py"], "/app/tests/test_schema.py": ["/app/schema.py"], "/engine/dal... |
9,143 | lioenel/mybookshelf2 | refs/heads/master | /app/tests/test_schema.py | '''
Created on Apr 21, 2016
@author: ivan
'''
import unittest
from app import app,db
import app.schema as schema
import app.model as model
from .basecase import TestCase
#app.config['SQLALCHEMY_ECHO']=True
class Test(TestCase):
def test_schema_ebook(self):
ebook_data={'title': 'Sedm lumpu slohl... | {"/manage.py": ["/app/utils.py", "/app/schema.py"], "/app/api.py": ["/app/schema.py", "/app/logic.py", "/app/utils.py", "/app/access.py"], "/engine/tasks.py": ["/settings.py", "/app/utils.py", "/engine/dal.py"], "/app/tests/test_logic.py": ["/app/logic.py"], "/app/tests/test_schema.py": ["/app/schema.py"], "/engine/dal... |
9,144 | lioenel/mybookshelf2 | refs/heads/master | /engine/dal.py | import aiopg
from aiopg.sa import create_engine
import settings
import asyncio
import os
import sys
import app.model as model
from psycopg2.extras import Json
from sqlalchemy.sql import select, or_
DSN = 'dbname={db} user={user} password={password} host={host}'.format(db=settings.DB_NAME,
... | {"/manage.py": ["/app/utils.py", "/app/schema.py"], "/app/api.py": ["/app/schema.py", "/app/logic.py", "/app/utils.py", "/app/access.py"], "/engine/tasks.py": ["/settings.py", "/app/utils.py", "/engine/dal.py"], "/app/tests/test_logic.py": ["/app/logic.py"], "/app/tests/test_schema.py": ["/app/schema.py"], "/engine/dal... |
9,145 | lioenel/mybookshelf2 | refs/heads/master | /engine/tests/test_meta.py | import unittest
from unittest.mock import Mock
import engine.dal as dal
import shutil
import os.path
import asyncio
from settings import UPLOAD_DIR
from engine.tasks import MetadataTask
class TestMeta(unittest.TestCase):
def setUp(self):
fname = os.path.join(os.path.dirname(__file__),
... | {"/manage.py": ["/app/utils.py", "/app/schema.py"], "/app/api.py": ["/app/schema.py", "/app/logic.py", "/app/utils.py", "/app/access.py"], "/engine/tasks.py": ["/settings.py", "/app/utils.py", "/engine/dal.py"], "/app/tests/test_logic.py": ["/app/logic.py"], "/app/tests/test_schema.py": ["/app/schema.py"], "/engine/dal... |
9,146 | lioenel/mybookshelf2 | refs/heads/master | /app/minimal.py | from flask import Blueprint, render_template, request, flash
from flask_login import login_required
import app.model as model
import app.logic as logic
import app.access as access
bp = Blueprint('minimal', __name__)
@bp.route('/search', methods=['GET'])
@login_required
def search():
search = ''
ebooks = None... | {"/manage.py": ["/app/utils.py", "/app/schema.py"], "/app/api.py": ["/app/schema.py", "/app/logic.py", "/app/utils.py", "/app/access.py"], "/engine/tasks.py": ["/settings.py", "/app/utils.py", "/engine/dal.py"], "/app/tests/test_logic.py": ["/app/logic.py"], "/app/tests/test_schema.py": ["/app/schema.py"], "/engine/dal... |
9,147 | lioenel/mybookshelf2 | refs/heads/master | /engine/backend.py | import os.path
import sys
import asyncio
import logging
from asexor.runner import ApplicationRunnerRawSocket
from asexor.executor import Executor
from asexor.config import Config
from asexor.task import load_tasks_from
from autobahn.wamp.exception import ApplicationError
import time
import engine.dal as dal
# sys.path... | {"/manage.py": ["/app/utils.py", "/app/schema.py"], "/app/api.py": ["/app/schema.py", "/app/logic.py", "/app/utils.py", "/app/access.py"], "/engine/tasks.py": ["/settings.py", "/app/utils.py", "/engine/dal.py"], "/app/tests/test_logic.py": ["/app/logic.py"], "/app/tests/test_schema.py": ["/app/schema.py"], "/engine/dal... |
9,148 | lioenel/mybookshelf2 | refs/heads/master | /server.py | #! /usr/bin/env python
import sys
from app import app
if __name__ == "__main__":
dbg=True
host='127.0.0.1'
if len(sys.argv)>1 and 'NO_DEBUG' in sys.argv[1:]:
dbg=False
if len(sys.argv)>1 and 'VISIBLE' in sys.argv[1:]:
host='0.0.0.0'
app.run(debug=dbg, host=host, port=6006... | {"/manage.py": ["/app/utils.py", "/app/schema.py"], "/app/api.py": ["/app/schema.py", "/app/logic.py", "/app/utils.py", "/app/access.py"], "/engine/tasks.py": ["/settings.py", "/app/utils.py", "/engine/dal.py"], "/app/tests/test_logic.py": ["/app/logic.py"], "/app/tests/test_schema.py": ["/app/schema.py"], "/engine/dal... |
9,149 | lioenel/mybookshelf2 | refs/heads/master | /engine/dal2.py | import aiopg
import aiopg.sa
import settings
import asyncio
import os
import sys
DSN = 'dbname={db} user={user} password={password} host={host}'.format(db=settings.DB_NAME,
host=settings.DB_HOST,
... | {"/manage.py": ["/app/utils.py", "/app/schema.py"], "/app/api.py": ["/app/schema.py", "/app/logic.py", "/app/utils.py", "/app/access.py"], "/engine/tasks.py": ["/settings.py", "/app/utils.py", "/engine/dal.py"], "/app/tests/test_logic.py": ["/app/logic.py"], "/app/tests/test_schema.py": ["/app/schema.py"], "/engine/dal... |
9,150 | lioenel/mybookshelf2 | refs/heads/master | /app/access.py | from flask import request, redirect, flash, render_template, url_for, jsonify, Blueprint, abort
from flask_login import LoginManager, login_user, logout_user, current_user, login_required
from functools import wraps
from app.utils import check_pwd, create_token, verify_token
import app.model as model
from sqlalchemy im... | {"/manage.py": ["/app/utils.py", "/app/schema.py"], "/app/api.py": ["/app/schema.py", "/app/logic.py", "/app/utils.py", "/app/access.py"], "/engine/tasks.py": ["/settings.py", "/app/utils.py", "/engine/dal.py"], "/app/tests/test_logic.py": ["/app/logic.py"], "/app/tests/test_schema.py": ["/app/schema.py"], "/engine/dal... |
9,151 | lioenel/mybookshelf2 | refs/heads/master | /engine/tests/test_dal.py | import unittest
import asyncio
import engine.dal as dal
from settings import Testing
from app.tests.basecase import TestCase
import app.model as model
dal.DSN = 'dbname={db} user={user} password={password} host={host}'.format(db=Testing.DB_NAME,
... | {"/manage.py": ["/app/utils.py", "/app/schema.py"], "/app/api.py": ["/app/schema.py", "/app/logic.py", "/app/utils.py", "/app/access.py"], "/engine/tasks.py": ["/settings.py", "/app/utils.py", "/engine/dal.py"], "/app/tests/test_logic.py": ["/app/logic.py"], "/app/tests/test_schema.py": ["/app/schema.py"], "/engine/dal... |
9,152 | lioenel/mybookshelf2 | refs/heads/master | /engine/client.py | from autobahn.asyncio.wamp import ApplicationSession
from asyncio import coroutine, get_event_loop
import logging
import requests
import os.path
import sys
sys.path.append(os.path.join(os.path.dirname(__file__),'..'))
from app.utils import extract_token
log=logging.getLogger('client')
class ClientSession(Application... | {"/manage.py": ["/app/utils.py", "/app/schema.py"], "/app/api.py": ["/app/schema.py", "/app/logic.py", "/app/utils.py", "/app/access.py"], "/engine/tasks.py": ["/settings.py", "/app/utils.py", "/engine/dal.py"], "/app/tests/test_logic.py": ["/app/logic.py"], "/app/tests/test_schema.py": ["/app/schema.py"], "/engine/dal... |
9,153 | lioenel/mybookshelf2 | refs/heads/master | /app/tests/test_api.py | from .basecase import TestCase
from urllib.parse import quote
import flask
from flask_login import current_user
import app
class TestApi(TestCase):
def __init__(self, *args, **kwargs):
super(TestApi, self).__init__(*args, **kwargs)
self.headers = None
self.token = None
def login(self... | {"/manage.py": ["/app/utils.py", "/app/schema.py"], "/app/api.py": ["/app/schema.py", "/app/logic.py", "/app/utils.py", "/app/access.py"], "/engine/tasks.py": ["/settings.py", "/app/utils.py", "/engine/dal.py"], "/app/tests/test_logic.py": ["/app/logic.py"], "/app/tests/test_schema.py": ["/app/schema.py"], "/engine/dal... |
9,154 | lioenel/mybookshelf2 | refs/heads/master | /settings.py | import os.path
_base_dir = os.path.dirname(__file__)
DB_NAME = 'ebooks'
DB_HOST = 'localhost'
DB_USER = 'ebooks'
DB_PASSWORD = 'ebooks'
SQLALCHEMY_DATABASE_URI = 'postgresql://{user}:{password}@{host}/{db}'.format(db=DB_NAME,
host=DB_HOST... | {"/manage.py": ["/app/utils.py", "/app/schema.py"], "/app/api.py": ["/app/schema.py", "/app/logic.py", "/app/utils.py", "/app/access.py"], "/engine/tasks.py": ["/settings.py", "/app/utils.py", "/engine/dal.py"], "/app/tests/test_logic.py": ["/app/logic.py"], "/app/tests/test_schema.py": ["/app/schema.py"], "/engine/dal... |
9,155 | lioenel/mybookshelf2 | refs/heads/master | /app/logic.py | from flask import abort, request, current_app, Response, jsonify
from sqlalchemy.sql import text, desc, func
from functools import wraps
import app.model as model
import app.schema as schema
from sqlalchemy.orm.exc import NoResultFound
from app.utils import remove_diacritics, file_hash
import os.path
import logging
im... | {"/manage.py": ["/app/utils.py", "/app/schema.py"], "/app/api.py": ["/app/schema.py", "/app/logic.py", "/app/utils.py", "/app/access.py"], "/engine/tasks.py": ["/settings.py", "/app/utils.py", "/engine/dal.py"], "/app/tests/test_logic.py": ["/app/logic.py"], "/app/tests/test_schema.py": ["/app/schema.py"], "/engine/dal... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.