index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
67,285 | RyanKung/qubit | refs/heads/master | /qubit/signals/signals.py | from blinker import signal
clear_flying_qubit_cache = signal('clear-fyling-qubit-cache')
| {"/qubit/__main__.py": ["/qubit/wsgiapp.py"], "/qubit/types/__init__.py": ["/qubit/types/qubit.py", "/qubit/types/states.py"], "/qubit/apis/states.py": ["/qubit/types/__init__.py", "/qubit/apis/utils.py"], "/qubit/io/celery/config.py": ["/qubit/config.py"], "/tests/apis/__init__.py": ["/qubit/wsgiapp.py"], "/qubit/io/c... |
67,286 | RyanKung/qubit | refs/heads/master | /qubit/middleware/__init__.py | from .eventsocket import QubitSocket
__all__ = ['middleware']
middleware = [QubitSocket]
| {"/qubit/__main__.py": ["/qubit/wsgiapp.py"], "/qubit/types/__init__.py": ["/qubit/types/qubit.py", "/qubit/types/states.py"], "/qubit/apis/states.py": ["/qubit/types/__init__.py", "/qubit/apis/utils.py"], "/qubit/io/celery/config.py": ["/qubit/config.py"], "/tests/apis/__init__.py": ["/qubit/wsgiapp.py"], "/qubit/io/c... |
67,287 | RyanKung/qubit | refs/heads/master | /schema/utils.py | from qubit.io.postgres import connection
from postgresql.driver.pq3 import Connection
__all__ = ['execute_file']
def execute_file(filename: str, conn: Connection) -> Connection:
'''
Execute a SQL file
'''
conn = connection()
with open(filename, 'r') as f:
cur = conn.cursor()
data... | {"/qubit/__main__.py": ["/qubit/wsgiapp.py"], "/qubit/types/__init__.py": ["/qubit/types/qubit.py", "/qubit/types/states.py"], "/qubit/apis/states.py": ["/qubit/types/__init__.py", "/qubit/apis/utils.py"], "/qubit/io/celery/config.py": ["/qubit/config.py"], "/tests/apis/__init__.py": ["/qubit/wsgiapp.py"], "/qubit/io/c... |
67,288 | RyanKung/qubit | refs/heads/master | /qubit/apis/qubit.py | from qubit.types import Qubit
from qubit.types.utils import ts_data
from qubit.core import app
from flask import request
from .utils import resp_wrapper as wrapper
from .utils import jsonize
__all__ = ['qubit_api', 'entangle', 'stem_api', 'monad_tester']
@app.route('/qubit/<qid>/', methods=['GET', 'DELETE', 'PATCH'... | {"/qubit/__main__.py": ["/qubit/wsgiapp.py"], "/qubit/types/__init__.py": ["/qubit/types/qubit.py", "/qubit/types/states.py"], "/qubit/apis/states.py": ["/qubit/types/__init__.py", "/qubit/apis/utils.py"], "/qubit/io/celery/config.py": ["/qubit/config.py"], "/tests/apis/__init__.py": ["/qubit/wsgiapp.py"], "/qubit/io/c... |
67,289 | RyanKung/qubit | refs/heads/master | /qubit/types/utils.py | from collections import namedtuple
import datetime
from dateutil.relativedelta import relativedelta
from itertools import starmap
from operator import mul
__all__ = ['ts_data', 'empty_ts_data', 'DateRange']
ts_data = namedtuple('data', ['datum', 'ts'])
def empty_ts_data():
return ts_data(datum={}, ts=str(datet... | {"/qubit/__main__.py": ["/qubit/wsgiapp.py"], "/qubit/types/__init__.py": ["/qubit/types/qubit.py", "/qubit/types/states.py"], "/qubit/apis/states.py": ["/qubit/types/__init__.py", "/qubit/apis/utils.py"], "/qubit/io/celery/config.py": ["/qubit/config.py"], "/tests/apis/__init__.py": ["/qubit/wsgiapp.py"], "/qubit/io/c... |
67,290 | RyanKung/qubit | refs/heads/master | /qubit/types/qubit.py | #! -*- eval: (venv-workon "qubit"); -*-
import json
import runpy
from types import ModuleType
from functools import partial
from qubit.io.pulsar import async
from qubit.io.postgres import types
from qubit.io.postgres import QuerySet
from qubit.io.celery import Entanglement
from qubit.io.celery import queue
from qubit.... | {"/qubit/__main__.py": ["/qubit/wsgiapp.py"], "/qubit/types/__init__.py": ["/qubit/types/qubit.py", "/qubit/types/states.py"], "/qubit/apis/states.py": ["/qubit/types/__init__.py", "/qubit/apis/utils.py"], "/qubit/io/celery/config.py": ["/qubit/config.py"], "/tests/apis/__init__.py": ["/qubit/wsgiapp.py"], "/qubit/io/c... |
67,291 | RyanKung/qubit | refs/heads/master | /qubit/types/function.py | __all__ = ['Function']
class Function(object):
@classmethod
def create(cls, name, body, side_effect=False, *args, **kwargs):
return cls.manager.insert(name=name,
body=body,
side_effect=side_effect,
*a... | {"/qubit/__main__.py": ["/qubit/wsgiapp.py"], "/qubit/types/__init__.py": ["/qubit/types/qubit.py", "/qubit/types/states.py"], "/qubit/apis/states.py": ["/qubit/types/__init__.py", "/qubit/apis/utils.py"], "/qubit/io/celery/config.py": ["/qubit/config.py"], "/tests/apis/__init__.py": ["/qubit/wsgiapp.py"], "/qubit/io/c... |
67,292 | RyanKung/qubit | refs/heads/master | /qubit/wsgiapp.py | from qubit.io.celery import queue
from qubit.core import app
from qubit.middleware import middleware
import qubit.types as types
import qubit.apis as apis
import qubit.views as views
__all__ = ['app', 'apis', 'queue', 'types', 'views', 'middleware']
| {"/qubit/__main__.py": ["/qubit/wsgiapp.py"], "/qubit/types/__init__.py": ["/qubit/types/qubit.py", "/qubit/types/states.py"], "/qubit/apis/states.py": ["/qubit/types/__init__.py", "/qubit/apis/utils.py"], "/qubit/io/celery/config.py": ["/qubit/config.py"], "/tests/apis/__init__.py": ["/qubit/wsgiapp.py"], "/qubit/io/c... |
67,293 | RyanKung/qubit | refs/heads/master | /qubit/apis/__init__.py | from . import qubit
from . import states
__all__ = ['qubit', 'states']
| {"/qubit/__main__.py": ["/qubit/wsgiapp.py"], "/qubit/types/__init__.py": ["/qubit/types/qubit.py", "/qubit/types/states.py"], "/qubit/apis/states.py": ["/qubit/types/__init__.py", "/qubit/apis/utils.py"], "/qubit/io/celery/config.py": ["/qubit/config.py"], "/tests/apis/__init__.py": ["/qubit/wsgiapp.py"], "/qubit/io/c... |
67,294 | RyanKung/qubit | refs/heads/master | /qubit/core/app.py | import flask
from qubit.config import STATIC_PATH, STATIC_URL
__all__ = ['app']
app = flask.Flask(
'qubit',
static_url_path=STATIC_URL,
static_folder=STATIC_PATH)
| {"/qubit/__main__.py": ["/qubit/wsgiapp.py"], "/qubit/types/__init__.py": ["/qubit/types/qubit.py", "/qubit/types/states.py"], "/qubit/apis/states.py": ["/qubit/types/__init__.py", "/qubit/apis/utils.py"], "/qubit/io/celery/config.py": ["/qubit/config.py"], "/tests/apis/__init__.py": ["/qubit/wsgiapp.py"], "/qubit/io/c... |
67,295 | RyanKung/qubit | refs/heads/master | /qubit/apis/utils.py | from concurrent.futures import TimeoutError
from pulsar import ensure_future
import simplejson as json
from functools import wraps
__all__ = ['jsonize', 'resp_wrapper']
def jsonize(fn):
@wraps(fn)
def handler(*args, **kwargs):
data = fn(*args, **kwargs)
return json.dumps(data, ensure_ascii=Fa... | {"/qubit/__main__.py": ["/qubit/wsgiapp.py"], "/qubit/types/__init__.py": ["/qubit/types/qubit.py", "/qubit/types/states.py"], "/qubit/apis/states.py": ["/qubit/types/__init__.py", "/qubit/apis/utils.py"], "/qubit/io/celery/config.py": ["/qubit/config.py"], "/tests/apis/__init__.py": ["/qubit/wsgiapp.py"], "/qubit/io/c... |
67,305 | LyricLy/capncord.py | refs/heads/master | /capncord/http.py | import asyncio
BASE_URL = "https://capnchat.tk"
def route(n):
return BASE_URL + n
async def get(session, route_):
resp = await session.get(route(route_))
if resp.status == 429:
await asyncio.sleep(1)
await get(session, route_)
return resp
async def post(session, route_, *, data=None... | {"/capncord/bot.py": ["/capncord/channel.py", "/capncord/http.py", "/capncord/user.py", "/capncord/message.py"], "/capncord/channel.py": ["/capncord/__init__.py", "/capncord/http.py", "/capncord/user.py"], "/capncord/__init__.py": ["/capncord/bot.py", "/capncord/channel.py", "/capncord/user.py", "/capncord/message.py"]... |
67,306 | LyricLy/capncord.py | refs/heads/master | /capncord/bot.py | from .channel import Channel
from .http import get, post
from .user import User
from .message import Message
import asyncio
import json
from collections import defaultdict
import aiohttp
import websockets
class Bot:
def __init__(self):
self.loop = asyncio.get_event_loop()
self.session = None
... | {"/capncord/bot.py": ["/capncord/channel.py", "/capncord/http.py", "/capncord/user.py", "/capncord/message.py"], "/capncord/channel.py": ["/capncord/__init__.py", "/capncord/http.py", "/capncord/user.py"], "/capncord/__init__.py": ["/capncord/bot.py", "/capncord/channel.py", "/capncord/user.py", "/capncord/message.py"]... |
67,307 | LyricLy/capncord.py | refs/heads/master | /capncord/channel.py | from . import message
from .http import get, post
from .user import User
class Channel:
def __init__(self, bot, id_):
self.bot = bot
self.id = id_
async def send(self, content):
await post(self.bot.session, "/chat", data={"text": content, "channel": self.id})
async def history(... | {"/capncord/bot.py": ["/capncord/channel.py", "/capncord/http.py", "/capncord/user.py", "/capncord/message.py"], "/capncord/channel.py": ["/capncord/__init__.py", "/capncord/http.py", "/capncord/user.py"], "/capncord/__init__.py": ["/capncord/bot.py", "/capncord/channel.py", "/capncord/user.py", "/capncord/message.py"]... |
67,308 | LyricLy/capncord.py | refs/heads/master | /capncord/__init__.py | from .bot import Bot
from .channel import Channel
from .user import User
from .message import Message
| {"/capncord/bot.py": ["/capncord/channel.py", "/capncord/http.py", "/capncord/user.py", "/capncord/message.py"], "/capncord/channel.py": ["/capncord/__init__.py", "/capncord/http.py", "/capncord/user.py"], "/capncord/__init__.py": ["/capncord/bot.py", "/capncord/channel.py", "/capncord/user.py", "/capncord/message.py"]... |
67,309 | LyricLy/capncord.py | refs/heads/master | /capncord/user.py | from .http import post
class User:
def __init__(self, bot, id_):
self.bot = bot
self.id = id_
self._name = None
self._messages_sent = None
async def update(self):
if not (self._name is None or self._messages_sent is None):
return
resp = await post(... | {"/capncord/bot.py": ["/capncord/channel.py", "/capncord/http.py", "/capncord/user.py", "/capncord/message.py"], "/capncord/channel.py": ["/capncord/__init__.py", "/capncord/http.py", "/capncord/user.py"], "/capncord/__init__.py": ["/capncord/bot.py", "/capncord/channel.py", "/capncord/user.py", "/capncord/message.py"]... |
67,310 | LyricLy/capncord.py | refs/heads/master | /capncord/message.py | from . import channel
from .user import User
import datetime
class Message:
def __init__(self, channel, id_, author, content, created_at):
self.id = id_
self.content = content
self.channel = channel
self.author = author
self.created_at = created_at
@classmethod
... | {"/capncord/bot.py": ["/capncord/channel.py", "/capncord/http.py", "/capncord/user.py", "/capncord/message.py"], "/capncord/channel.py": ["/capncord/__init__.py", "/capncord/http.py", "/capncord/user.py"], "/capncord/__init__.py": ["/capncord/bot.py", "/capncord/channel.py", "/capncord/user.py", "/capncord/message.py"]... |
67,314 | neerajvkdixit/BuddyHubServer | refs/heads/master | /python_modules/mongohelper.py | from pymongo import MongoClient
from bson.json_util import dumps
import urllib.parse
import json
from django.conf import settings
class MongoDao:
'Common base class for all employees'
empCount = 0
def __init__(self):
db_conf = settings.CURRENT_DB_CONF
print(db_conf)
self.url = 'mongodb://... | {"/BuddyHubServer/views.py": ["/python_modules/mongohelper.py"]} |
67,315 | neerajvkdixit/BuddyHubServer | refs/heads/master | /BuddyHubServer/views.py | from django.http import HttpResponse
from django.http import JsonResponse
from pymongo import MongoClient
import urllib.parse
from bson.json_util import dumps
import json
from django.views.decorators.csrf import csrf_exempt
import hashlib
from python_modules.mongohelper import MongoDao
from django.conf import settings
... | {"/BuddyHubServer/views.py": ["/python_modules/mongohelper.py"]} |
67,317 | benmao/june | refs/heads/master | /june/app.py | #!/usr/bin/env python
import os
os.environ['TZ'] = 'UTC'
os.environ["PYTHON_EGG_CACHE"] = "/tmp/egg"
PROJDIR = os.path.abspath(os.path.dirname(__file__))
ROOTDIR = os.path.split(PROJDIR)[0]
try:
import june
print('Start june version: %s' % june.__version__)
except ImportError:
import site
site.addsite... | {"/june/app.py": ["/june/lib/util.py", "/june/config.py", "/june/urls.py"], "/june/handlers/node.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/models/__init__.py", "/june/models/mixin.py"], "/june/handlers/account.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/lib/recaptcha.py", "/june/models/__i... |
67,318 | benmao/june | refs/heads/master | /june/handlers/node.py | import datetime
import tornado.web
from june.lib.handler import BaseHandler
from june.lib.util import PageMixin
from june.models import Topic, FollowNode
from june.models.mixin import NodeMixin, MemberMixin
class NodeHandler(BaseHandler, NodeMixin, PageMixin):
def head(self, slug):
pass
def get(self,... | {"/june/app.py": ["/june/lib/util.py", "/june/config.py", "/june/urls.py"], "/june/handlers/node.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/models/__init__.py", "/june/models/mixin.py"], "/june/handlers/account.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/lib/recaptcha.py", "/june/models/__i... |
67,319 | benmao/june | refs/heads/master | /june/handlers/account.py | import tornado.web
from tornado.auth import GoogleMixin
from datetime import datetime
from june.lib.handler import BaseHandler
from june.lib import validators
from june.lib.util import ObjectDict, PageMixin
from june.lib.recaptcha import RecaptchaMixin
from june.models import Member, MemberLog, Notify, create_token
fro... | {"/june/app.py": ["/june/lib/util.py", "/june/config.py", "/june/urls.py"], "/june/handlers/node.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/models/__init__.py", "/june/models/mixin.py"], "/june/handlers/account.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/lib/recaptcha.py", "/june/models/__i... |
67,320 | benmao/june | refs/heads/master | /june/lib/handler.py | import re
import datetime
import logging
from tornado.web import RequestHandler
from tornado.options import options
from tornado import escape
import june
from june.models.mixin import MemberMixin, StorageMixin
from june.lib.filters import safe_markdown, xmldatetime, topiclink
from june.lib.util import ObjectDict
cl... | {"/june/app.py": ["/june/lib/util.py", "/june/config.py", "/june/urls.py"], "/june/handlers/node.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/models/__init__.py", "/june/models/mixin.py"], "/june/handlers/account.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/lib/recaptcha.py", "/june/models/__i... |
67,321 | benmao/june | refs/heads/master | /june/config.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import memcache
from tornado.options import options
from june.lib.database import SQLAlchemy
if options.master.startswith('mysql'):
master = options.master
slaves = options.slaves.split()
db = SQLAlchemy(master, slaves, pool_recycle=3600, echo=options.debug)
... | {"/june/app.py": ["/june/lib/util.py", "/june/config.py", "/june/urls.py"], "/june/handlers/node.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/models/__init__.py", "/june/models/mixin.py"], "/june/handlers/account.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/lib/recaptcha.py", "/june/models/__i... |
67,322 | benmao/june | refs/heads/master | /june/handlers/front.py | import datetime
import hashlib
import tornado.web
from tornado.util import import_object
from tornado.options import options
from june.lib.handler import BaseHandler
from june.lib.filters import safe_markdown
from june.lib.decorators import require_user
from june.models import Topic, Member, Node, Reply
from june.model... | {"/june/app.py": ["/june/lib/util.py", "/june/config.py", "/june/urls.py"], "/june/handlers/node.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/models/__init__.py", "/june/models/mixin.py"], "/june/handlers/account.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/lib/recaptcha.py", "/june/models/__i... |
67,323 | benmao/june | refs/heads/master | /june/dashboard/handlers.py | from tornado.options import options
from june.lib.util import ObjectDict
from june.lib.handler import BaseHandler
from june.lib.decorators import require_admin
from june.models import Topic, Member, Node, Reply
from june.models.mixin import NodeMixin, TopicMixin
class DashMixin(object):
def update_model(self, mod... | {"/june/app.py": ["/june/lib/util.py", "/june/config.py", "/june/urls.py"], "/june/handlers/node.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/models/__init__.py", "/june/models/mixin.py"], "/june/handlers/account.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/lib/recaptcha.py", "/june/models/__i... |
67,324 | benmao/june | refs/heads/master | /june/backend/local.py | import os.path
from tornado.options import options
from june.backend import Backend
class LocalBackend(Backend):
def save(self, body, filename, callback=None):
path = os.path.join(options.local_static_path, filename)
f = open(path, 'w')
f.write(body)
f.close()
if not callba... | {"/june/app.py": ["/june/lib/util.py", "/june/config.py", "/june/urls.py"], "/june/handlers/node.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/models/__init__.py", "/june/models/mixin.py"], "/june/handlers/account.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/lib/recaptcha.py", "/june/models/__i... |
67,325 | benmao/june | refs/heads/master | /june/models/__init__.py | """
Member:
only the basic info of a user
role:
staff > 6
admin > 9
active > 1
not verified email = 1
deactive < 1
reputation:
reputation means the value of a member, it affects in topic and
everything
1. when user's topic is up voted, reput... | {"/june/app.py": ["/june/lib/util.py", "/june/config.py", "/june/urls.py"], "/june/handlers/node.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/models/__init__.py", "/june/models/mixin.py"], "/june/handlers/account.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/lib/recaptcha.py", "/june/models/__i... |
67,326 | benmao/june | refs/heads/master | /june/lib/decorators.py | import logging
import functools
import urlparse
class require_role(object):
def __init__(self, role):
self.role = role
def __call__(self, method):
@functools.wraps(method)
def wrapper(handler, *args, **kwargs):
if not handler.current_user:
url = handler.get... | {"/june/app.py": ["/june/lib/util.py", "/june/config.py", "/june/urls.py"], "/june/handlers/node.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/models/__init__.py", "/june/models/mixin.py"], "/june/handlers/account.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/lib/recaptcha.py", "/june/models/__i... |
67,327 | benmao/june | refs/heads/master | /june/models/mixin.py | from june.lib.decorators import cache
from june.models import create_token
from june.models import Member, Social, Notify
from june.models import Node, FollowNode
from june.models import Topic
from june.models import Storage
def get_cache_list(handler, model, id_list, key_prefix, time=600):
if hasattr(handler, 'c... | {"/june/app.py": ["/june/lib/util.py", "/june/config.py", "/june/urls.py"], "/june/handlers/node.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/models/__init__.py", "/june/models/mixin.py"], "/june/handlers/account.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/lib/recaptcha.py", "/june/models/__i... |
67,328 | benmao/june | refs/heads/master | /june/lib/util.py | import functools
from tornado import ioloop, stack_context
from tornado.options import define, options
def parse_config_file(path):
config = {}
exec(compile(open(path).read(), path, 'exec'), config, config)
for name in config:
if name in options:
options[name].set(config[name])
... | {"/june/app.py": ["/june/lib/util.py", "/june/config.py", "/june/urls.py"], "/june/handlers/node.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/models/__init__.py", "/june/models/mixin.py"], "/june/handlers/account.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/lib/recaptcha.py", "/june/models/__i... |
67,329 | benmao/june | refs/heads/master | /june/backend/__init__.py |
class Backend(object):
@classmethod
def save(cls, body, filename, callback=None):
raise NotImplemented
| {"/june/app.py": ["/june/lib/util.py", "/june/config.py", "/june/urls.py"], "/june/handlers/node.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/models/__init__.py", "/june/models/mixin.py"], "/june/handlers/account.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/lib/recaptcha.py", "/june/models/__i... |
67,330 | benmao/june | refs/heads/master | /june/urls.py | from june.handlers import front
from june.handlers import node
from june.handlers import topic
from june.handlers import account
from june.handlers import api
from june import social
from june.dashboard import handlers as dashboard
handlers = []
handlers.extend(account.handlers)
handlers.extend(dashboard.handlers)
ha... | {"/june/app.py": ["/june/lib/util.py", "/june/config.py", "/june/urls.py"], "/june/handlers/node.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/models/__init__.py", "/june/models/mixin.py"], "/june/handlers/account.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/lib/recaptcha.py", "/june/models/__i... |
67,331 | benmao/june | refs/heads/master | /june/lib/recaptcha.py | import logging
import urllib
from tornado.auth import httpclient
from tornado.options import options
class RecaptchaMixin(object):
RECAPTCHA_VERIFY_URL = "http://www.google.com/recaptcha/api/verify"
def recaptcha_render(self):
token = self._recaptcha_token()
html = ('<div id="recaptcha_div">... | {"/june/app.py": ["/june/lib/util.py", "/june/config.py", "/june/urls.py"], "/june/handlers/node.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/models/__init__.py", "/june/models/mixin.py"], "/june/handlers/account.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/lib/recaptcha.py", "/june/models/__i... |
67,332 | benmao/june | refs/heads/master | /june/backend/upyun.py | import base64
import functools
from tornado import httpclient
from tornado.options import options
from june.backend import Backend
class Upyun(object):
def __init__(self, bucket_with_dir, username, password, static_url=None):
_ = bucket_with_dir.split('/')
bucket = _[0]
self.url = 'http://... | {"/june/app.py": ["/june/lib/util.py", "/june/config.py", "/june/urls.py"], "/june/handlers/node.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/models/__init__.py", "/june/models/mixin.py"], "/june/handlers/account.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/lib/recaptcha.py", "/june/models/__i... |
67,333 | benmao/june | refs/heads/master | /setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
name='june',
version='1.0',
author='Hsiaoming Young',
author_email='lepture@me.com',
url='http://lepture.com/project/june',
packages=find_packages(),
description='June: a forum',
entry_poin... | {"/june/app.py": ["/june/lib/util.py", "/june/config.py", "/june/urls.py"], "/june/handlers/node.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/models/__init__.py", "/june/models/mixin.py"], "/june/handlers/account.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/lib/recaptcha.py", "/june/models/__i... |
67,334 | benmao/june | refs/heads/master | /june/handlers/api.py | import math
from tornado.options import options
from june.lib.handler import BaseHandler
from june.lib.decorators import require_user
from june.models import Topic, Member, Reply
from june.models.mixin import NotifyMixin
class UpTopicHandler(BaseHandler):
"""Up a topic will increase impact of the topic,
and i... | {"/june/app.py": ["/june/lib/util.py", "/june/config.py", "/june/urls.py"], "/june/handlers/node.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/models/__init__.py", "/june/models/mixin.py"], "/june/handlers/account.py": ["/june/lib/handler.py", "/june/lib/util.py", "/june/lib/recaptcha.py", "/june/models/__i... |
67,342 | Oopps/EMarket | refs/heads/main | /store_app/admin.py | from django.contrib import admin
# Register your models here.
from store_app.models import Product, ProductFeature, CustomFeature, ProductType
@admin.register(Product)
class ProductAdmin(admin.ModelAdmin):
pass
@admin.register(ProductFeature)
class ProductFeatureAdmin(admin.ModelAdmin):
pass
@admin.regi... | {"/store_app/admin.py": ["/store_app/models.py"], "/store_app/views.py": ["/store_app/serializers.py", "/store_app/models.py"], "/store_app/serializers.py": ["/store_app/models.py"], "/store_app/urls.py": ["/store_app/views.py"]} |
67,343 | Oopps/EMarket | refs/heads/main | /store_app/models.py | from django.db import models
# Create your models here.
class ProductType(models.Model):
name = models.CharField(max_length=64)
def __str__(self):
return self.name
class Product(models.Model):
name = models.CharField(max_length=64)
description = models.TextField(max_length=512)
price =... | {"/store_app/admin.py": ["/store_app/models.py"], "/store_app/views.py": ["/store_app/serializers.py", "/store_app/models.py"], "/store_app/serializers.py": ["/store_app/models.py"], "/store_app/urls.py": ["/store_app/views.py"]} |
67,344 | Oopps/EMarket | refs/heads/main | /store_app/migrations/0003_auto_20201107_1643.py | # Generated by Django 3.1.3 on 2020-11-07 16:43
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('store_app', '0002_auto_20201107_1642'),
]
operations = [
migrations.AlterField(
model_name='productfeature',
name='v... | {"/store_app/admin.py": ["/store_app/models.py"], "/store_app/views.py": ["/store_app/serializers.py", "/store_app/models.py"], "/store_app/serializers.py": ["/store_app/models.py"], "/store_app/urls.py": ["/store_app/views.py"]} |
67,345 | Oopps/EMarket | refs/heads/main | /store_app/migrations/0004_auto_20201107_1656.py | # Generated by Django 3.1.3 on 2020-11-07 16:56
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('store_app', '0003_auto_20201107_1643'),
]
operations = [
migrations.CreateModel(
name='ProductT... | {"/store_app/admin.py": ["/store_app/models.py"], "/store_app/views.py": ["/store_app/serializers.py", "/store_app/models.py"], "/store_app/serializers.py": ["/store_app/models.py"], "/store_app/urls.py": ["/store_app/views.py"]} |
67,346 | Oopps/EMarket | refs/heads/main | /store_app/views.py | from django.shortcuts import render
# Create your views here.
from rest_framework.response import Response
from rest_framework.views import APIView
from store_app.serializers import ProductSerializer
from store_app.models import Product, ProductFeature, CustomFeature, ProductType
class ProductView(APIView):
de... | {"/store_app/admin.py": ["/store_app/models.py"], "/store_app/views.py": ["/store_app/serializers.py", "/store_app/models.py"], "/store_app/serializers.py": ["/store_app/models.py"], "/store_app/urls.py": ["/store_app/views.py"]} |
67,347 | Oopps/EMarket | refs/heads/main | /store_app/serializers.py | from rest_framework import serializers
from rest_framework.exceptions import ValidationError
from store_app.models import Product, ProductFeature, CustomFeature, ProductType
class ProductSerializer(serializers.Serializer):
id = serializers.IntegerField(read_only=True)
name = serializers.CharField(max_length=... | {"/store_app/admin.py": ["/store_app/models.py"], "/store_app/views.py": ["/store_app/serializers.py", "/store_app/models.py"], "/store_app/serializers.py": ["/store_app/models.py"], "/store_app/urls.py": ["/store_app/views.py"]} |
67,348 | Oopps/EMarket | refs/heads/main | /store_app/migrations/0001_initial.py | # Generated by Django 3.1.3 on 2020-11-07 16:38
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='CustomFeature',
fields=[
... | {"/store_app/admin.py": ["/store_app/models.py"], "/store_app/views.py": ["/store_app/serializers.py", "/store_app/models.py"], "/store_app/serializers.py": ["/store_app/models.py"], "/store_app/urls.py": ["/store_app/views.py"]} |
67,349 | Oopps/EMarket | refs/heads/main | /store_app/migrations/0002_auto_20201107_1642.py | # Generated by Django 3.1.3 on 2020-11-07 16:42
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('store_app', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='customfeature',
name='value',
... | {"/store_app/admin.py": ["/store_app/models.py"], "/store_app/views.py": ["/store_app/serializers.py", "/store_app/models.py"], "/store_app/serializers.py": ["/store_app/models.py"], "/store_app/urls.py": ["/store_app/views.py"]} |
67,350 | Oopps/EMarket | refs/heads/main | /store_app/urls.py | from django.conf.urls import url
from store_app.views import ProductView
urlpatterns = [
url(r'product/', ProductView.as_view())
] | {"/store_app/admin.py": ["/store_app/models.py"], "/store_app/views.py": ["/store_app/serializers.py", "/store_app/models.py"], "/store_app/serializers.py": ["/store_app/models.py"], "/store_app/urls.py": ["/store_app/views.py"]} |
67,356 | Levstyle/film-crawler | refs/heads/master | /spider.py | import requests
from datetime import datetime
import asyncio
class Spider:
def __init__(self, url, keep_days=7):
self.url = url
self.keep_days = keep_days
self.headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0",
"Ac... | {"/seehd.py": ["/spider.py"], "/main.py": ["/seehd.py", "/dytt8.py", "/piaohua.py"], "/dytt8.py": ["/spider.py"], "/piaohua.py": ["/spider.py"]} |
67,357 | Levstyle/film-crawler | refs/heads/master | /seehd.py | from bs4 import BeautifulSoup
from spider import Spider
from datetime import datetime
class SeeHD(Spider):
def __init__(self):
super().__init__(url="http://www.seehd.so/thread-2")
def parser(self, text):
soup = BeautifulSoup(text, 'html.parser')
tds = soup.select('td.subject')
... | {"/seehd.py": ["/spider.py"], "/main.py": ["/seehd.py", "/dytt8.py", "/piaohua.py"], "/dytt8.py": ["/spider.py"], "/piaohua.py": ["/spider.py"]} |
67,358 | Levstyle/film-crawler | refs/heads/master | /main.py | from seehd import SeeHD
from dytt8 import Dytt8
from piaohua import PiaoHua
from prettytable import PrettyTable
from functools import reduce
import asyncio
def main():
movies = PrettyTable(["电影名", "地址", "时间"])
movies.align["电影名"] = "l"
movies.align["地址"] = "l"
movies.align["时间"] = "c"
tasks = [
... | {"/seehd.py": ["/spider.py"], "/main.py": ["/seehd.py", "/dytt8.py", "/piaohua.py"], "/dytt8.py": ["/spider.py"], "/piaohua.py": ["/spider.py"]} |
67,359 | Levstyle/film-crawler | refs/heads/master | /dytt8.py | from bs4 import BeautifulSoup
from spider import Spider
from datetime import datetime
from urllib.parse import urljoin
class Dytt8(Spider):
def __init__(self):
super().__init__(url="https://www.dytt8.net/html/gndy/dyzz/index.html")
def parser(self, text):
soup = BeautifulSoup(text, 'html.pars... | {"/seehd.py": ["/spider.py"], "/main.py": ["/seehd.py", "/dytt8.py", "/piaohua.py"], "/dytt8.py": ["/spider.py"], "/piaohua.py": ["/spider.py"]} |
67,360 | Levstyle/film-crawler | refs/heads/master | /piaohua.py | from bs4 import BeautifulSoup
from spider import Spider
from datetime import datetime
from urllib.parse import urljoin
class PiaoHua(Spider):
def __init__(self):
super().__init__(url="https://www.piaohua.com/html/dianying.html")
def parser(self, text):
soup = BeautifulSoup(text, 'html.parser'... | {"/seehd.py": ["/spider.py"], "/main.py": ["/seehd.py", "/dytt8.py", "/piaohua.py"], "/dytt8.py": ["/spider.py"], "/piaohua.py": ["/spider.py"]} |
67,370 | chauvinSimon/scenario_runner | refs/heads/master | /srunner/scenarios/object_crash_intersection.py | #!/usr/bin/env python
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Object crash with prior vehicle action scenario:
The scenario realizes the user controlled ego vehicle
moving along the road and encounters a cyclist ahead after taking a rig... | {"/srunner/scenarios/object_crash_intersection.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/scenarios/opposite_vehicle_taking_priority.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/chal... |
67,371 | chauvinSimon/scenario_runner | refs/heads/master | /srunner/scenariomanager/traffic_events.py | from enum import Enum
class TrafficEventType(Enum):
"""
This enum represents different traffic events that occur during driving.
"""
NORMAL_DRIVING = 0
COLLISION_STATIC = 1
COLLISION_VEHICLE = 2
COLLISION_PEDESTRIAN = 3
ROUTE_DEVIATION = 4
ROUTE_COMPLETION = 5
ROUTE_COMPLETED = ... | {"/srunner/scenarios/object_crash_intersection.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/scenarios/opposite_vehicle_taking_priority.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/chal... |
67,372 | chauvinSimon/scenario_runner | refs/heads/master | /srunner/scenarios/opposite_vehicle_taking_priority.py | #!/usr/bin/env python
# Copyright (c) 2018-2019 Intel Labs.
# authors: Fabian Oboril (fabian.oboril@intel.com)
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Scenarios in which another (opposite) vehicle 'illegally' takes
priority, e.g. by ru... | {"/srunner/scenarios/object_crash_intersection.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/scenarios/opposite_vehicle_taking_priority.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/chal... |
67,373 | chauvinSimon/scenario_runner | refs/heads/master | /srunner/challenge/autoagents/MyAgentV0.py | import carla
import matplotlib.pyplot as plt
import json
import pathlib
import numpy as np
from srunner.challenge.autoagents.autonomous_agent import AutonomousAgent
class MyAgentV0(AutonomousAgent):
def setup(self, path_to_conf_file):
"""
Initialize everything needed by your agent and set the tra... | {"/srunner/scenarios/object_crash_intersection.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/scenarios/opposite_vehicle_taking_priority.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/chal... |
67,374 | chauvinSimon/scenario_runner | refs/heads/master | /srunner/challenge/challenge_evaluator.py | #!/usr/bin/env python
# Copyright (c) 2018-2019 Intel Labs.
# authors: German Ros (german.ros@intel.com)
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
CARLA Challenge Evaluator
Provisional code to evaluate Autonomous Agents for the CARLA Aut... | {"/srunner/scenarios/object_crash_intersection.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/scenarios/opposite_vehicle_taking_priority.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/chal... |
67,375 | chauvinSimon/scenario_runner | refs/heads/master | /srunner/challenge/envs/sensor_interface.py | import copy
import logging
import numpy as np
import os
import time
from threading import Thread
import carla
def threaded(fn):
def wrapper(*args, **kwargs):
thread = Thread(target=fn, args=args, kwargs=kwargs)
thread.setDaemon(True)
thread.start()
return thread
return wrappe... | {"/srunner/scenarios/object_crash_intersection.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/scenarios/opposite_vehicle_taking_priority.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/chal... |
67,376 | chauvinSimon/scenario_runner | refs/heads/master | /srunner/scenarios/challenge_basic.py | #!/usr/bin/env python
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Basic CARLA Autonomous Driving training scenario
"""
import py_trees
from srunner.scenariomanager.atomic_scenario_behavior import *
from srunner.scenariomanager.atomic_sce... | {"/srunner/scenarios/object_crash_intersection.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/scenarios/opposite_vehicle_taking_priority.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/chal... |
67,377 | chauvinSimon/scenario_runner | refs/heads/master | /srunner/scenarios/config_parser.py | #!/usr/bin/env python
# Copyright (c) 2019 Intel Labs.
# authors: Fabian Oboril (fabian.oboril@intel.com)
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides a parser for scenario configuration files
"""
import glob
import os... | {"/srunner/scenarios/object_crash_intersection.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/scenarios/opposite_vehicle_taking_priority.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/chal... |
67,378 | chauvinSimon/scenario_runner | refs/heads/master | /srunner/scenariomanager/atomic_scenario_behavior.py | #!/usr/bin/env python
# Copyright (c) 2018-2019 Intel Labs.
# authors: Fabian Oboril (fabian.oboril@intel.com)
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides all atomic scenario behaviors required to realize
complex, real... | {"/srunner/scenarios/object_crash_intersection.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/scenarios/opposite_vehicle_taking_priority.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/chal... |
67,379 | chauvinSimon/scenario_runner | refs/heads/master | /srunner/scenariomanager/scenario_manager.py | #!/usr/bin/env python
# Copyright (c) 2018 Intel Labs.
# authors: Fabian Oboril (fabian.oboril@intel.com)
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides the Scenario and ScenarioManager implementations.
These must not be ... | {"/srunner/scenarios/object_crash_intersection.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/scenarios/opposite_vehicle_taking_priority.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/chal... |
67,380 | chauvinSimon/scenario_runner | refs/heads/master | /scenario_runner.py | #!/usr/bin/env python
# Copyright (c) 2018-2019 Intel Labs.
# authors: Fabian Oboril (fabian.oboril@intel.com)
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Welcome to CARLA scenario_runner
This is the main script to be executed when running... | {"/srunner/scenarios/object_crash_intersection.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/scenarios/opposite_vehicle_taking_priority.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/chal... |
67,381 | chauvinSimon/scenario_runner | refs/heads/master | /srunner/scenarios/basic_scenario.py | #!/usr/bin/env python
# Copyright (c) 2018-2019 Intel Labs.
# authors: Fabian Oboril (fabian.oboril@intel.com)
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provide the basic class for all user-defined scenarios.
"""
from __futu... | {"/srunner/scenarios/object_crash_intersection.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/scenarios/opposite_vehicle_taking_priority.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/chal... |
67,382 | chauvinSimon/scenario_runner | refs/heads/master | /srunner/challenge/autoagents/HumanAgent.py | import cv2
import numpy as np
import time
from threading import Thread
try:
import pygame
from pygame.locals import K_DOWN
from pygame.locals import K_LEFT
from pygame.locals import K_RIGHT
from pygame.locals import K_UP
from pygame.locals import K_a
from pygame.locals import K_d
from p... | {"/srunner/scenarios/object_crash_intersection.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/scenarios/opposite_vehicle_taking_priority.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/chal... |
67,383 | chauvinSimon/scenario_runner | refs/heads/master | /srunner/scenarios/control_loss.py | #!/usr/bin/env python
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Control Loss Vehicle scenario:
The scenario realizes that the vehicle looses control due to
bad road conditions, etc. and checks to see if the vehicle
regains control and c... | {"/srunner/scenarios/object_crash_intersection.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/scenarios/opposite_vehicle_taking_priority.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/chal... |
67,384 | chauvinSimon/scenario_runner | refs/heads/master | /srunner/scenarios/follow_leading_vehicle.py | #!/usr/bin/env python
# Copyright (c) 2018-2019 Intel Labs.
# authors: Fabian Oboril (fabian.oboril@intel.com)
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Follow leading vehicle scenario:
The scenario realizes a common driving behavior, i... | {"/srunner/scenarios/object_crash_intersection.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/scenarios/opposite_vehicle_taking_priority.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/chal... |
67,385 | chauvinSimon/scenario_runner | refs/heads/master | /srunner/scenarios/object_crash_vehicle.py | #!/usr/bin/env python
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
Object crash without prior vehicle action scenario:
The scenario realizes the user controlled ego vehicle
moving along the road and encountering a cyclist ahead.
"""
import... | {"/srunner/scenarios/object_crash_intersection.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/scenarios/opposite_vehicle_taking_priority.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/chal... |
67,386 | chauvinSimon/scenario_runner | refs/heads/master | /srunner/scenariomanager/carla_data_provider.py | #!/usr/bin/env python
# Copyright (c) 2018 Intel Labs.
# authors: Fabian Oboril (fabian.oboril@intel.com)
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides all frequently used data from CARLA via
local buffers to avoid block... | {"/srunner/scenarios/object_crash_intersection.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/scenarios/opposite_vehicle_taking_priority.py": ["/srunner/scenariomanager/atomic_scenario_behavior.py", "/srunner/scenarios/basic_scenario.py"], "/srunner/chal... |
67,419 | 97wave/dz_ORM.2_4 | refs/heads/master | /m2m-relations/articles/migrations/0005_alter_article_tags.py | # Generated by Django 3.2.7 on 2021-09-08 00:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('articles', '0004_auto_20210908_0201'),
]
operations = [
migrations.AlterField(
model_name='article',
name='tags',
... | {"/m2m-relations/articles/admin.py": ["/m2m-relations/articles/models.py"]} |
67,420 | 97wave/dz_ORM.2_4 | refs/heads/master | /m2m-relations/articles/models.py | from django.db import models
from .settings_local import *
class Article(models.Model):
title = models.CharField(max_length=256, verbose_name='Название')
text = models.TextField(verbose_name='Текст')
published_at = models.DateTimeField(verbose_name='Дата публикации')
image = models.ImageField(null=Tr... | {"/m2m-relations/articles/admin.py": ["/m2m-relations/articles/models.py"]} |
67,421 | 97wave/dz_ORM.2_4 | refs/heads/master | /m2m-relations/articles/migrations/0003_auto_20210908_0131.py | # Generated by Django 3.2.7 on 2021-09-07 22:31
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('articles', '0002_auto_20210908_0116'),
]
operations = [
migrations.AlterModelOptions(
name='scope',
options={'orderi... | {"/m2m-relations/articles/admin.py": ["/m2m-relations/articles/models.py"]} |
67,422 | 97wave/dz_ORM.2_4 | refs/heads/master | /m2m-relations/articles/admin.py | from django.contrib import admin
from django.core.exceptions import ValidationError
from django.forms import BaseInlineFormSet
from .models import Article, Relationship, Scope
import json
class RelationshipInlineFormset(BaseInlineFormSet):
def clean(self):
super(RelationshipInlineFormset, self).clean... | {"/m2m-relations/articles/admin.py": ["/m2m-relations/articles/models.py"]} |
67,423 | 97wave/dz_ORM.2_4 | refs/heads/master | /m2m-relations/articles/migrations/0010_auto_20210922_1400.py | # Generated by Django 3.1.2 on 2021-09-22 11:00
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('articles', '0009_auto_20210922_1350'),
]
operations = [
migrations.AlterModelOptions(
name='scope',
options={'ordering': ['-... | {"/m2m-relations/articles/admin.py": ["/m2m-relations/articles/models.py"]} |
67,424 | 97wave/dz_ORM.2_4 | refs/heads/master | /m2m-relations/articles/migrations/0004_auto_20210908_0201.py | # Generated by Django 3.2.7 on 2021-09-07 23:01
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('articles', '0003_auto_20210908_0131'),
]
operations = [
migrations.AlterModelOptions(
name='rel... | {"/m2m-relations/articles/admin.py": ["/m2m-relations/articles/models.py"]} |
67,425 | 97wave/dz_ORM.2_4 | refs/heads/master | /m2m-relations/articles/migrations/0008_auto_20210912_2310.py | # Generated by Django 3.1.2 on 2021-09-12 20:10
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('articles', '0007_auto_20210912_2111'),
]
operations = [
migrations.CreateModel(
name='Relations... | {"/m2m-relations/articles/admin.py": ["/m2m-relations/articles/models.py"]} |
67,426 | 97wave/dz_ORM.2_4 | refs/heads/master | /orm_migrations/school/migrations/0004_auto_20210912_1923.py | # Generated by Django 3.1.2 on 2021-09-12 16:23
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('school', '0003_auto_20210912_1909'),
]
operations = [
migrations.RenameField(
model_name='student',
old_name='teacher',
... | {"/m2m-relations/articles/admin.py": ["/m2m-relations/articles/models.py"]} |
67,427 | 97wave/dz_ORM.2_4 | refs/heads/master | /m2m-relations/articles/migrations/0006_auto_20210912_2105.py | # Generated by Django 3.1.2 on 2021-09-12 18:05
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('articles', '0005_alter_article_tags'),
]
operations = [
migrations.RenameField(
model_name='article',
old_name='tags',
... | {"/m2m-relations/articles/admin.py": ["/m2m-relations/articles/models.py"]} |
67,428 | 97wave/dz_ORM.2_4 | refs/heads/master | /m2m-relations/articles/migrations/0011_auto_20210922_1405.py | # Generated by Django 3.1.2 on 2021-09-22 11:05
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('articles', '0010_auto_20210922_1400'),
]
operations = [
migrations.AlterField(
model_name='rela... | {"/m2m-relations/articles/admin.py": ["/m2m-relations/articles/models.py"]} |
67,429 | 97wave/dz_ORM.2_4 | refs/heads/master | /m2m-relations/articles/migrations/0007_auto_20210912_2111.py | # Generated by Django 3.1.2 on 2021-09-12 18:11
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('articles', '0006_auto_20210912_2105'),
]
operations = [
migrations.AlterModelOptions(
name='scope',
options={'ordering': ['-... | {"/m2m-relations/articles/admin.py": ["/m2m-relations/articles/models.py"]} |
67,430 | 97wave/dz_ORM.2_4 | refs/heads/master | /m2m-relations/articles/migrations/0009_auto_20210922_1350.py | # Generated by Django 3.1.2 on 2021-09-22 10:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('articles', '0008_auto_20210912_2310'),
]
operations = [
migrations.RemoveField(
model_name='article',
name='relation... | {"/m2m-relations/articles/admin.py": ["/m2m-relations/articles/models.py"]} |
67,436 | HamaguchiKazuki/become-yukarin | refs/heads/master | /become_yukarin/dataset/dataset.py | import copy
import glob
import typing
from abc import ABCMeta, abstractmethod
from collections import defaultdict
from pathlib import Path
from typing import Any
from typing import Callable
from typing import Dict
from typing import List
import scipy.ndimage
import chainer
import librosa
import numpy
import pysptk
imp... | {"/become_yukarin/dataset/dataset.py": ["/become_yukarin/config/config.py", "/become_yukarin/config/sr_config.py", "/become_yukarin/data_struct.py"], "/become_yukarin/voice_changer.py": ["/become_yukarin/acoustic_converter.py", "/become_yukarin/data_struct.py", "/become_yukarin/super_resolution.py"], "/train.py": ["/be... |
67,437 | HamaguchiKazuki/become-yukarin | refs/heads/master | /become_yukarin/data_struct.py | from typing import NamedTuple, Dict, List
import numpy
import pyworld
_min_mc = -18.3
class Wave(NamedTuple):
wave: numpy.ndarray
sampling_rate: int
class AcousticFeature(NamedTuple):
f0: numpy.ndarray = numpy.nan
spectrogram: numpy.ndarray = numpy.nan
aperiodicity: numpy.ndarray = numpy.nan
... | {"/become_yukarin/dataset/dataset.py": ["/become_yukarin/config/config.py", "/become_yukarin/config/sr_config.py", "/become_yukarin/data_struct.py"], "/become_yukarin/voice_changer.py": ["/become_yukarin/acoustic_converter.py", "/become_yukarin/data_struct.py", "/become_yukarin/super_resolution.py"], "/train.py": ["/be... |
67,438 | HamaguchiKazuki/become-yukarin | refs/heads/master | /scripts/ln_atr503_to_subset.py | import argparse
from pathlib import Path
parser = argparse.ArgumentParser()
parser.add_argument('input', type=Path)
parser.add_argument('output', type=Path)
parser.add_argument('--prefix', default='')
argument = parser.parse_args()
input = argument.input # type: Path
output = argument.output # type: Path
paths = l... | {"/become_yukarin/dataset/dataset.py": ["/become_yukarin/config/config.py", "/become_yukarin/config/sr_config.py", "/become_yukarin/data_struct.py"], "/become_yukarin/voice_changer.py": ["/become_yukarin/acoustic_converter.py", "/become_yukarin/data_struct.py", "/become_yukarin/super_resolution.py"], "/train.py": ["/be... |
67,439 | HamaguchiKazuki/become-yukarin | refs/heads/master | /become_yukarin/voice_changer.py | import numpy
from .acoustic_converter import AcousticConverter
from .data_struct import AcousticFeature
from .super_resolution import SuperResolution
class VoiceChanger(object):
def __init__(
self,
acoustic_converter: AcousticConverter,
super_resolution: SuperResolution,
... | {"/become_yukarin/dataset/dataset.py": ["/become_yukarin/config/config.py", "/become_yukarin/config/sr_config.py", "/become_yukarin/data_struct.py"], "/become_yukarin/voice_changer.py": ["/become_yukarin/acoustic_converter.py", "/become_yukarin/data_struct.py", "/become_yukarin/super_resolution.py"], "/train.py": ["/be... |
67,440 | HamaguchiKazuki/become-yukarin | refs/heads/master | /train.py | import argparse
from functools import partial
from pathlib import Path
from chainer import cuda
from chainer import optimizers
from chainer import training
from chainer.dataset import convert
from chainer.iterators import MultiprocessIterator
from chainer.training import extensions
from chainerui.utils import save_arg... | {"/become_yukarin/dataset/dataset.py": ["/become_yukarin/config/config.py", "/become_yukarin/config/sr_config.py", "/become_yukarin/data_struct.py"], "/become_yukarin/voice_changer.py": ["/become_yukarin/acoustic_converter.py", "/become_yukarin/data_struct.py", "/become_yukarin/super_resolution.py"], "/train.py": ["/be... |
67,441 | HamaguchiKazuki/become-yukarin | refs/heads/master | /become_yukarin/__init__.py | from . import config
from . import dataset
from . import param
from .acoustic_converter import AcousticConverter
from .super_resolution import SuperResolution
from .vocoder import RealtimeVocoder
from .vocoder import Vocoder
from .voice_changer import VoiceChanger
| {"/become_yukarin/dataset/dataset.py": ["/become_yukarin/config/config.py", "/become_yukarin/config/sr_config.py", "/become_yukarin/data_struct.py"], "/become_yukarin/voice_changer.py": ["/become_yukarin/acoustic_converter.py", "/become_yukarin/data_struct.py", "/become_yukarin/super_resolution.py"], "/train.py": ["/be... |
67,442 | HamaguchiKazuki/become-yukarin | refs/heads/master | /become_yukarin/updater/__init__.py | from . import sr_updater
from . import updater
| {"/become_yukarin/dataset/dataset.py": ["/become_yukarin/config/config.py", "/become_yukarin/config/sr_config.py", "/become_yukarin/data_struct.py"], "/become_yukarin/voice_changer.py": ["/become_yukarin/acoustic_converter.py", "/become_yukarin/data_struct.py", "/become_yukarin/super_resolution.py"], "/train.py": ["/be... |
67,443 | HamaguchiKazuki/become-yukarin | refs/heads/master | /scripts/launch.py | """
launcher for some task that have diff params
"""
import argparse
import copy
import datetime
import hashlib
import json
import subprocess
import time
from pathlib import Path
base_command_default = \
"screen -d -m -S {project/name}_gpu{train/gpu} ;" + \
"screen -S {project/name}_gpu{train/gpu} -X stuff 'p... | {"/become_yukarin/dataset/dataset.py": ["/become_yukarin/config/config.py", "/become_yukarin/config/sr_config.py", "/become_yukarin/data_struct.py"], "/become_yukarin/voice_changer.py": ["/become_yukarin/acoustic_converter.py", "/become_yukarin/data_struct.py", "/become_yukarin/super_resolution.py"], "/train.py": ["/be... |
67,444 | HamaguchiKazuki/become-yukarin | refs/heads/master | /become_yukarin/model/model.py | import chainer
import chainer.functions as F
import chainer.links as L
from become_yukarin.config.config import ModelConfig
class Convolution1D(chainer.links.ConvolutionND):
def __init__(self, in_channels, out_channels, ksize, stride=1, pad=0,
nobias=False, initialW=None, initial_bias=None,
... | {"/become_yukarin/dataset/dataset.py": ["/become_yukarin/config/config.py", "/become_yukarin/config/sr_config.py", "/become_yukarin/data_struct.py"], "/become_yukarin/voice_changer.py": ["/become_yukarin/acoustic_converter.py", "/become_yukarin/data_struct.py", "/become_yukarin/super_resolution.py"], "/train.py": ["/be... |
67,445 | HamaguchiKazuki/become-yukarin | refs/heads/master | /setup.py | from setuptools import setup, find_packages
setup(
name='become_yukarin',
version='1.0.0',
packages=find_packages(),
url='https://github.com/Hiroshiba/become-yukarin',
author='Kazuyuki Hiroshiba',
author_email='hihokaruta@gmail.com',
description='become Yuduki Yukari with DeepLearning power... | {"/become_yukarin/dataset/dataset.py": ["/become_yukarin/config/config.py", "/become_yukarin/config/sr_config.py", "/become_yukarin/data_struct.py"], "/become_yukarin/voice_changer.py": ["/become_yukarin/acoustic_converter.py", "/become_yukarin/data_struct.py", "/become_yukarin/super_resolution.py"], "/train.py": ["/be... |
67,446 | HamaguchiKazuki/become-yukarin | refs/heads/master | /become_yukarin/model/cbhg_model.py | from functools import partial
from typing import List
import chainer
from become_yukarin.config.old_config import CBHGDiscriminatorModelConfig
from become_yukarin.config.old_config import CBHGModelConfig
class Convolution1D(chainer.links.ConvolutionND):
def __init__(self, in_channels, out_channels, ksize, strid... | {"/become_yukarin/dataset/dataset.py": ["/become_yukarin/config/config.py", "/become_yukarin/config/sr_config.py", "/become_yukarin/data_struct.py"], "/become_yukarin/voice_changer.py": ["/become_yukarin/acoustic_converter.py", "/become_yukarin/data_struct.py", "/become_yukarin/super_resolution.py"], "/train.py": ["/be... |
67,447 | HamaguchiKazuki/become-yukarin | refs/heads/master | /become_yukarin/updater/updater.py | import chainer
import chainer.functions as F
from become_yukarin.config.config import LossConfig
from become_yukarin.model.model import Discriminator
from become_yukarin.model.model import Predictor
class Updater(chainer.training.StandardUpdater):
def __init__(
self,
loss_config: LossConf... | {"/become_yukarin/dataset/dataset.py": ["/become_yukarin/config/config.py", "/become_yukarin/config/sr_config.py", "/become_yukarin/data_struct.py"], "/become_yukarin/voice_changer.py": ["/become_yukarin/acoustic_converter.py", "/become_yukarin/data_struct.py", "/become_yukarin/super_resolution.py"], "/train.py": ["/be... |
67,448 | HamaguchiKazuki/become-yukarin | refs/heads/master | /become_yukarin/config/__init__.py | from . import config
from . import sr_config
| {"/become_yukarin/dataset/dataset.py": ["/become_yukarin/config/config.py", "/become_yukarin/config/sr_config.py", "/become_yukarin/data_struct.py"], "/become_yukarin/voice_changer.py": ["/become_yukarin/acoustic_converter.py", "/become_yukarin/data_struct.py", "/become_yukarin/super_resolution.py"], "/train.py": ["/be... |
67,449 | HamaguchiKazuki/become-yukarin | refs/heads/master | /scripts/ln_jnas_subset.py | import argparse
import multiprocessing
from pathlib import Path
from jnas_metadata_loader import load_from_directory
from jnas_metadata_loader.jnas_metadata import JnasMetadata
parser = argparse.ArgumentParser()
parser.add_argument('jnas', type=Path)
parser.add_argument('output', type=Path)
parser.add_argument('--for... | {"/become_yukarin/dataset/dataset.py": ["/become_yukarin/config/config.py", "/become_yukarin/config/sr_config.py", "/become_yukarin/data_struct.py"], "/become_yukarin/voice_changer.py": ["/become_yukarin/acoustic_converter.py", "/become_yukarin/data_struct.py", "/become_yukarin/super_resolution.py"], "/train.py": ["/be... |
67,450 | HamaguchiKazuki/become-yukarin | refs/heads/master | /become_yukarin/config/old_config.py | from typing import List
from typing import NamedTuple
from typing import Optional
class CBHGDiscriminatorModelConfig(NamedTuple):
in_channels: int
hidden_channels_list: List[int]
class CBHGModelConfig(NamedTuple):
in_channels: int
conv_bank_out_channels: int
conv_bank_k: int
max_pooling_k: i... | {"/become_yukarin/dataset/dataset.py": ["/become_yukarin/config/config.py", "/become_yukarin/config/sr_config.py", "/become_yukarin/data_struct.py"], "/become_yukarin/voice_changer.py": ["/become_yukarin/acoustic_converter.py", "/become_yukarin/data_struct.py", "/become_yukarin/super_resolution.py"], "/train.py": ["/be... |
67,451 | HamaguchiKazuki/become-yukarin | refs/heads/master | /tests/test_dataset.py | import unittest
import numpy
from become_yukarin.dataset import dataset
class TestDataset(unittest.TestCase):
def setUp(self):
self.sample_rate = 24000
self.len_time = len_time = 100
self.fft_size = fft_size = 1024
self.order = order = 59
self.dummy_feature = dataset.Acous... | {"/become_yukarin/dataset/dataset.py": ["/become_yukarin/config/config.py", "/become_yukarin/config/sr_config.py", "/become_yukarin/data_struct.py"], "/become_yukarin/voice_changer.py": ["/become_yukarin/acoustic_converter.py", "/become_yukarin/data_struct.py", "/become_yukarin/super_resolution.py"], "/train.py": ["/be... |
67,452 | HamaguchiKazuki/become-yukarin | refs/heads/master | /become_yukarin/acoustic_converter.py | from functools import partial
from pathlib import Path
from typing import Optional
import chainer
import numpy
import pysptk
import pyworld
from become_yukarin.config.config import Config
from become_yukarin.data_struct import AcousticFeature
from become_yukarin.data_struct import Wave
from become_yukarin.dataset.dat... | {"/become_yukarin/dataset/dataset.py": ["/become_yukarin/config/config.py", "/become_yukarin/config/sr_config.py", "/become_yukarin/data_struct.py"], "/become_yukarin/voice_changer.py": ["/become_yukarin/acoustic_converter.py", "/become_yukarin/data_struct.py", "/become_yukarin/super_resolution.py"], "/train.py": ["/be... |
67,453 | HamaguchiKazuki/become-yukarin | refs/heads/master | /scripts/extract_spectrogram_pair.py | """
extract low and high quality spectrogram data.
"""
import argparse
import multiprocessing
from pathlib import Path
from pprint import pprint
import numpy
import pysptk
import pyworld
from tqdm import tqdm
from become_yukarin.dataset.dataset import AcousticFeatureProcess
from become_yukarin.dataset.dataset import... | {"/become_yukarin/dataset/dataset.py": ["/become_yukarin/config/config.py", "/become_yukarin/config/sr_config.py", "/become_yukarin/data_struct.py"], "/become_yukarin/voice_changer.py": ["/become_yukarin/acoustic_converter.py", "/become_yukarin/data_struct.py", "/become_yukarin/super_resolution.py"], "/train.py": ["/be... |
67,454 | HamaguchiKazuki/become-yukarin | refs/heads/master | /become_yukarin/param.py | from typing import NamedTuple
class VoiceParam(NamedTuple):
sample_rate: int = 22050
top_db: float = None
pad_second: float = 0.0
class AcousticFeatureParam(NamedTuple):
frame_period: int = 5
order: int = 8
alpha: float = 0.466
f0_estimating_method: str = 'harvest' # dio / harvest
cla... | {"/become_yukarin/dataset/dataset.py": ["/become_yukarin/config/config.py", "/become_yukarin/config/sr_config.py", "/become_yukarin/data_struct.py"], "/become_yukarin/voice_changer.py": ["/become_yukarin/acoustic_converter.py", "/become_yukarin/data_struct.py", "/become_yukarin/super_resolution.py"], "/train.py": ["/be... |
67,455 | HamaguchiKazuki/become-yukarin | refs/heads/master | /scripts/extract_acoustic_feature.py | """
extract alignments voices.
"""
import argparse
import multiprocessing
from pathlib import Path
from pprint import pprint
import numpy
from become_yukarin.acoustic_converter import AcousticConverter
from become_yukarin.config.config import create_from_json as create_config
from become_yukarin.data_struct import A... | {"/become_yukarin/dataset/dataset.py": ["/become_yukarin/config/config.py", "/become_yukarin/config/sr_config.py", "/become_yukarin/data_struct.py"], "/become_yukarin/voice_changer.py": ["/become_yukarin/acoustic_converter.py", "/become_yukarin/data_struct.py", "/become_yukarin/super_resolution.py"], "/train.py": ["/be... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.