index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
56,804
tornadoyi/rl-lab
refs/heads/master
/rllab/envs/wrapper/utils.py
from easydict import EasyDict as edict def get_user_data(env): env = env.unwrapped ud = getattr(env, '__userdata__', None) if ud is None: ud = edict() env.__userdata__ = ud env.__class__.userdata = property(lambda self: self.__userdata__) return ud
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,805
tornadoyi/rl-lab
refs/heads/master
/rllab/rl/profiling/__init__.py
from .profiling import Profiling, indicator
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,806
tornadoyi/rl-lab
refs/heads/master
/rllab/torchlab/nn/functional/__init__.py
from torch.nn.functional import * from .loss import *
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,807
tornadoyi/rl-lab
refs/heads/master
/rllab/rl/features/mlp.py
from collections import OrderedDict import numpy as np from torch import nn from .features import register @register("mlp") class mlp(nn.Sequential): def __init__(self, input_shape, num_layers=2, num_hidden=64, activation=None, layer_norm=False): """ Stack of fully-connected layers to be used in a...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,808
tornadoyi/rl-lab
refs/heads/master
/test/game.py
import gym from rllab import envs import pygame env = gym.make('ShuttleRun-100m-hard-v0') #env = gym.make('Race-100m-hard-v0') env.reset() while True: env.render() keys = pygame.key.get_pressed() action = -1 if keys[pygame.K_SPACE]: action = 0 elif keys[pygame.K_LEFT]: action = 1 elif keys...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,809
tornadoyi/rl-lab
refs/heads/master
/rllab/torchlab/distributed/optimizer.py
from torch import distributed as dist class Optimizer(object): def __init__(self, optimizer, params=None): self._optimizer = optimizer self._params = params or [p for grp in self._optimizer.param_groups for p in grp['params']] def __getattr__(self, name): if name.startswith('_'): ...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,810
tornadoyi/rl-lab
refs/heads/master
/rllab/rl/features/__init__.py
from .features import * from . import mlp, cnn
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,811
tornadoyi/rl-lab
refs/heads/master
/rllab/torchlab/nn/modules/__init__.py
from .tensor import * from .conv import *
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,812
tornadoyi/rl-lab
refs/heads/master
/rllab/envs/__init__.py
import gym # import envs from . import race as _ _make = gym.make def make(id, **kwargs): from .wrapper import Profiling, RewardRatio, atari env = _make(id) # check env type k = kind(env) if k == 'atari': env = atari.wrap(env, **kwargs) # add profiling wrapper env = Profiling(env) ...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,813
tornadoyi/rl-lab
refs/heads/master
/rllab/algorithms/deepq/__init__.py
from .trainer import train def execute(args): if args.command == 'train': train(**args.arguments)() else: pass
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,814
tornadoyi/rl-lab
refs/heads/master
/rllab/torchlab/__init__.py
# expose public objects from torch from torch import * from .core import * from . import cuda from . import distributed from . import nn from . import optim from . import profiling from . import utils # export others from torch import torch as _torch utils.exposer.expose(_torch, globals(), filter=lambda k: k.startsw...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,815
tornadoyi/rl-lab
refs/heads/master
/rllab/torchlab/utils/__init__.py
from . import exposer from . import shell
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,816
tornadoyi/rl-lab
refs/heads/master
/rllab/torchlab/distributed/__init__.py
from torch.distributed import * from .launcher import * from .optimizer import *
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,817
tornadoyi/rl-lab
refs/heads/master
/rllab/algorithms/deepq/deepq.py
from rllab import torchlab as tl from rllab.torchlab import nn from rllab.torchlab.nn import functional as F from rllab.rl.profiling import indicator from .network import QFunc class DeepQ(nn.Module): def __init__( self, ob_space, ac_space, feature_creator, ...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,818
tornadoyi/rl-lab
refs/heads/master
/rllab/envs/wrapper/__init__.py
from .profiling import Profiling from .reward_ratio import RewardRatio
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,819
tornadoyi/rl-lab
refs/heads/master
/rllab/envs/race/race.py
from .runway import RunwayEnv class RaceEnv(RunwayEnv): def __init__(self, score_mode='normal', **kwargs): # config self._score_mode = score_mode super(RaceEnv, self).__init__(**kwargs) def step(self, action): ob, r, d, info = super(RaceEnv, self).step(action) #...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,820
tornadoyi/rl-lab
refs/heads/master
/rllab/envs/wrapper/reward_ratio.py
import gym class RewardRatio(gym.Wrapper): def step(self, action): ob, r, d, info = super(RewardRatio, self).step(action) r = r * self.spec.reward_threshold return ob, r, d, info
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,821
tornadoyi/rl-lab
refs/heads/master
/rllab/torchlab/profiling/profiling.py
import os from collections import OrderedDict from torch.utils.tensorboard import SummaryWriter from . import indicator class Profiling(object): def __init__( self, log_dir, step_func, ): self._log_dir = log_dir self._writer = SummaryWriter(self.log_dir) ...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,822
tornadoyi/rl-lab
refs/heads/master
/rllab/torchlab/profiling/__init__.py
from .profiling import Profiling from .indicator import create as indicator
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,823
tornadoyi/rl-lab
refs/heads/master
/rllab/torchlab/optim/__init__.py
from torch.optim import * from .optim import *
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,824
tornadoyi/rl-lab
refs/heads/master
/rllab/algorithms/deepq/experiments/cartpole.py
import sys import os from rllab import cli from rllab import define if __name__ == '__main__': cmd, extras = sys.argv[1], sys.argv[2:] if cmd == 'train': argv = [ 'env.id="CartPole-v0"', 'total_steps=int(1e5)', 'optimizer.lr=1e-3', 'rb.size=50000', ...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,825
tornadoyi/rl-lab
refs/heads/master
/setup.py
from os.path import dirname, join from setuptools import setup, find_packages # Project name NAME = 'rl-lab' # Define version information with open(join(dirname(__file__), 'rllab/VERSION'), 'rb') as f: VERSION = f.read().decode('ascii').strip() setup(name=NAME, version=VERSION, description="Lab...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,826
tornadoyi/rl-lab
refs/heads/master
/rllab/torchlab/profiling/condition.py
__CONDITIONS = {} def register(name): global __CONDITIONS def _thunk(func): __CONDITIONS[name] = func return func return _thunk def create(type, *args, **kwargs): if type not in __CONDITIONS: raise Exception('Unknown condition {}'.format(type)) return __CONDITIONS[type](*args, **...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,827
tornadoyi/rl-lab
refs/heads/master
/rllab/torchlab/distributed/launcher.py
import os from torch.multiprocessing import Process import torch.distributed as dist def _on_process_launch( rank, world_size, backend, init_method, timeout, store, group_name, target, args, kwargs ): # init process group grp_args = { 'rank': rank, 'backend': ...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,828
tornadoyi/rl-lab
refs/heads/master
/rllab/envs/race/__init__.py
from .race import RaceEnv from .shuttle_run import ShuttleRunEnv
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,829
tornadoyi/rl-lab
refs/heads/master
/rllab/algorithms/deepq/experiments/breakout.py
import sys import os from rllab import cli from rllab import define if __name__ == '__main__': cmd, extras = sys.argv[1], sys.argv[2:] if cmd == 'train': argv = [ 'env.id="BreakoutNoFrameskip-v0"', 'env.frame_stack=True', 'deepq.gamma=0.99', 'total_steps=int(1e7)', ...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,830
tornadoyi/rl-lab
refs/heads/master
/rllab/rl/profiling/profiling.py
from rllab.torchlab import profiling from rllab.torchlab.profiling import indicator from rllab import define class Profiling(profiling.Profiling): def __init__(self, env, **kwargs): super(Profiling, self).__init__(define.profiling_path(), **kwargs) self.env = env def __call__(self, *args, **...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,831
tornadoyi/rl-lab
refs/heads/master
/rllab/torchlab/cuda/cuda.py
import os import sys from easydict import EasyDict as edict from rllab.torchlab.utils import shell def nvsmi_query(*fileds, tree_format=False): # get primitive information cmd = 'nvidia-smi --format=csv,noheader,nounits --query-gpu={}'.format(','.join(fileds)) lines = shell.run(cmd).split('\n')[:-1] #...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,832
tornadoyi/rl-lab
refs/heads/master
/rllab/envs/race/render.py
from rllab.envs import render class Render(render.Render): def __init__(self, *args, **kwargs): super(Render, self).__init__(*args, **kwargs) def on_render(self): w, h = self.screen.get_width(), self.screen.get_height() # clear screen self.screen.fill(render.Color('white'...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,833
tornadoyi/rl-lab
refs/heads/master
/rllab/torchlab/cuda/__init__.py
from torch.cuda import * from .cuda import *
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,834
tornadoyi/rl-lab
refs/heads/master
/rllab/envs/wrapper/profiling.py
import gym from .utils import get_user_data class Profiling(gym.Wrapper): def __init__(self, *args, **kwargs): super(Profiling, self).__init__(*args, **kwargs) self.ud = get_user_data(self) self.ud.num_resets = 0 def reset(self): ob = super(Profiling, self).reset() self...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,835
tornadoyi/rl-lab
refs/heads/master
/rllab/torchlab/nn/modules/tensor.py
from inspect import ismethoddescriptor import torch from torch import nn import humps def __init__(self, *args, **kwargs): self.args = args self.kwargs = kwargs nn.Module.__init__(self) def _create_module_class(name, func): return type( name, (nn.Module, ), { "__ini...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,836
tornadoyi/rl-lab
refs/heads/master
/rllab/torchlab/profiling/indicator.py
import numpy as np import torch from . import condition __INDICATORS = {} def register(name): global __INDICATORS def _thunk(func): __INDICATORS[name] = func return func return _thunk def create(type, name=None): if type not in __INDICATORS: raise Exception('Unknown indicator type ...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,837
tornadoyi/rl-lab
refs/heads/master
/rllab/torchlab/core/__init__.py
from .device import * del device
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,838
tornadoyi/rl-lab
refs/heads/master
/rllab/torchlab/nn/modules/conv.py
import numpy as np def eval_conv_output_size(conv, input_size): ''' :param conv: convolution kernel :param input_size: int or tuple with format size / (H, W) / (D, H, W) :return: ''' input_size = np.asarray(input_size) kernel_size = np.asarray(conv.kernel_size) dilation = np.asarray(...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,839
tornadoyi/rl-lab
refs/heads/master
/rllab/rl/features/cnn.py
import numpy as np from collections import OrderedDict from rllab.torchlab import nn from .features import register @register("conv_only") class conv_only(nn.Sequential): def __init__(self, input_shape, input_format='NCHW', convs=[(32, 8, 4), (64, 4, 2), (64, 3, 1)], **conv_kwargs): ''' convolutio...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,840
tornadoyi/rl-lab
refs/heads/master
/rllab/define.py
import os _ROOT_PATH = os.path.expanduser('~/.rl-lab') _MODEL_PATH = 'models' _PROFILING_PATH = 'profiling' _EXPERIMENT_PATH = None def root_path(): return _ROOT_PATH def set_root_path(p): global _ROOT_PATH _ROOT_PATH = p def model_path(): if os.path.isabs(_MODEL_PATH): return _MODEL_PATH retur...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,841
tornadoyi/rl-lab
refs/heads/master
/rllab/envs/render/render.py
import pygame class Render(object): def __init__(self, env, caption=None, win_size=(640, 480)): self._env = env # init if not pygame.get_init(): pygame.init() if not pygame.font.get_init(): pygame.font.init() pygame.display.set_caption(caption or str(env)) pygame....
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,842
tornadoyi/rl-lab
refs/heads/master
/rllab/torchlab/utils/exposer.py
def expose(src, dst, override=False, filter=None): if filter is None: filter = lambda _: False for k in dir(src): v = getattr(src, k) if (not override and k in dst) or filter(k): continue dst[k] = v
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,843
tornadoyi/rl-lab
refs/heads/master
/rllab/cli.py
import signal import argparse from easydict import EasyDict as edict from rllab import algorithms as modules from rllab import define MODULES = dict([(n, getattr(modules, n)) for n in dir(modules) if hasattr(getattr(modules, n), 'execute')]) def initialize_path(args, dargs): # set path if args.root_path is n...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,844
tornadoyi/rl-lab
refs/heads/master
/rllab/torchlab/optim/optim.py
import inspect from torch import optim def build(**kwargs): name = kwargs.get('name', None) if name is None: raise Exception('Build optimizer without name') # get optimizer opt = getattr(optim, name) if opt is None: raise Exception('Can not find optimizer {}'.format(name)) # filter args o...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,845
tornadoyi/rl-lab
refs/heads/master
/rllab/rl/features/features.py
from gym.spaces import Box __FEATURES = {} def register(name): global __FEATURES def _thunk(func): __FEATURES[name] = func return func return _thunk def build(ob_space, name=None, **feature_kwargs): # specific feature input_shape = (None, ) + ob_space.shape if name is not No...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,846
tornadoyi/rl-lab
refs/heads/master
/rllab/envs/race/shuttle_run.py
from .runway import RunwayEnv class ShuttleRunEnv(RunwayEnv): def __init__(self, score_mode='normal', **kwargs): # config self._score_mode = score_mode super(ShuttleRunEnv, self).__init__(**kwargs) def reset(self): ob = super(ShuttleRunEnv, self).reset() self._half_fin...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,847
tornadoyi/rl-lab
refs/heads/master
/rllab/algorithms/deepq/network.py
from collections import OrderedDict from rllab import torchlab as tl from rllab.torchlab import nn class QFunc(nn.Module): def __init__( self, ac_space, feature_creator, hiddens=(256, ), dueling=True, layer_norm=False, **_, ):...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,848
tornadoyi/rl-lab
refs/heads/master
/rllab/torchlab/utils/shell.py
import subprocess def run(cmd, shell=True, timeout=None): with subprocess.Popen(cmd, shell=shell, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) as p: p.wait(timeout) if p.returncode == 0: return p.stdout.read().decode() else: raise Exception('Command run error\n{}'....
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,849
tornadoyi/rl-lab
refs/heads/master
/rllab/envs/render/__init__.py
from pygame import * from .render import Render del font from . import font
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,850
tornadoyi/rl-lab
refs/heads/master
/rllab/envs/race/runway.py
import numpy as np import gym from gym import spaces class RunwayEnv(gym.Env): def __init__( self, length=1, init_pos=0, move_success_rate=1.0, **kwargs ): super(RunwayEnv, self).__init__(**kwargs) # config self._length = le...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,851
tornadoyi/rl-lab
refs/heads/master
/rllab/algorithms/deepq/trainer.py
from rllab import torchlab as tl from rllab.torchlab import optim, distributed from rllab import envs from rllab.rl import features from rllab.rl.profiling import Profiling, indicator from rllab.rl.common.schedule import LinearSchedule from . import replay_buffer from .deepq import DeepQ class Trainer(object): de...
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,852
tornadoyi/rl-lab
refs/heads/master
/rllab/torchlab/nn/__init__.py
from torch.nn import * from .modules import * del functional from . import functional
{"/rllab/torchlab/core/device.py": ["/rllab/torchlab/__init__.py"], "/rllab/rl/profiling/__init__.py": ["/rllab/rl/profiling/profiling.py"], "/rllab/rl/features/mlp.py": ["/rllab/rl/features/features.py"], "/rllab/rl/features/__init__.py": ["/rllab/rl/features/features.py"], "/rllab/torchlab/nn/modules/__init__.py": ["...
56,868
msh5/escher
refs/heads/master
/escher/__init__.py
import os import sys from escher.__version__ import __version__ PROJECT_ROOT = os.path.dirname(os.path.realpath(__file__)) PROJECT_VENDOR = os.sep.join([PROJECT_ROOT, 'vendor']) sys.path.insert(0, PROJECT_VENDOR)
{"/escher/cmd/esdsl.py": ["/escher/__init__.py"], "/escher/cmd/escat.py": ["/escher/__init__.py"], "/escher/cmd/essearch.py": ["/escher/__init__.py"]}
56,869
msh5/escher
refs/heads/master
/escher/cmd/esdsl.py
''' Define subcommands for 'esdsl'. ''' import json import click from escher import __version__ @click.group() @click.option('--pretty', '-p', is_flag=True) @click.option('--indent', '-n', type=int) @click.version_option(version=__version__, message='escher %(version)s') @click.pass_context def cli(ctx, pretty, ind...
{"/escher/cmd/esdsl.py": ["/escher/__init__.py"], "/escher/cmd/escat.py": ["/escher/__init__.py"], "/escher/cmd/essearch.py": ["/escher/__init__.py"]}
56,870
msh5/escher
refs/heads/master
/escher/cmd/escat.py
''' Define subcommands for 'escat'. ''' import json import click from elasticsearch import Elasticsearch from escher import __version__ from tabulate import tabulate ALLOCATION_BYTES_OPTIONS = [ 'b', 'k', 'kb', 'm', 'mb', 'g', 'gb', 't', 'tb', 'p', 'pb' ] @click.group() @click.option('--host', '-h', default='l...
{"/escher/cmd/esdsl.py": ["/escher/__init__.py"], "/escher/cmd/escat.py": ["/escher/__init__.py"], "/escher/cmd/essearch.py": ["/escher/__init__.py"]}
56,871
msh5/escher
refs/heads/master
/escher/cmd/essearch.py
''' Define subcommands for 'essearch'. ''' import json import click from elasticsearch import Elasticsearch from escher import __version__ def build_request_body(queries, aggs): body = {} if queries: body['query'] = [] for query in queries: query_dict = json.dumps(query) ...
{"/escher/cmd/esdsl.py": ["/escher/__init__.py"], "/escher/cmd/escat.py": ["/escher/__init__.py"], "/escher/cmd/essearch.py": ["/escher/__init__.py"]}
56,872
Mal-lol-git/Total_Scanner
refs/heads/master
/settings.py
#VIRUS_TOTAL_SCANNER SETTINGS from urllib.parse import urljoin #VIRUS_TOTAL #URL, API_KEY API_KEY = '[API]' API_URL = 'https://www.virustotal.com/api/v3/' API_SEARCH = urljoin(API_URL, 'intelligence/search') API_ATTACH = urljoin(API_URL, 'files/') #SEARCH_OPTION OPTION_DAYS = [] OPTION_SCAN_TYPE ...
{"/TotalScan/TotalScan_class.py": ["/settings.py"], "/TotalScan/Save.py": ["/settings.py"], "/main.py": ["/Data/Keyword.py", "/TotalScan/Save.py", "/TotalScan/Search.py", "/thread.py"], "/TotalScan/Search.py": ["/TotalScan/Option_filter.py", "/TotalScan/TotalScan_class.py"]}
56,873
Mal-lol-git/Total_Scanner
refs/heads/master
/TotalScan/Option_filter.py
import chardet #Arg number def _Option_filter(option, data, row): try: if option == '1': if chardet.detect(''.join(data['data'][row]['attributes']['names'][0]).encode())['encoding'] == 'utf-8': return True if option == '2': if chardet.detect(''.join(data['da...
{"/TotalScan/TotalScan_class.py": ["/settings.py"], "/TotalScan/Save.py": ["/settings.py"], "/main.py": ["/Data/Keyword.py", "/TotalScan/Save.py", "/TotalScan/Search.py", "/thread.py"], "/TotalScan/Search.py": ["/TotalScan/Option_filter.py", "/TotalScan/TotalScan_class.py"]}
56,874
Mal-lol-git/Total_Scanner
refs/heads/master
/thread.py
# -*- coding:utf-8 -*- from concurrent.futures import ThreadPoolExecutor def Tasker(f, number, *args): with ThreadPoolExecutor(max_workers=number) as executor: executor.map(f, *args) return True
{"/TotalScan/TotalScan_class.py": ["/settings.py"], "/TotalScan/Save.py": ["/settings.py"], "/main.py": ["/Data/Keyword.py", "/TotalScan/Save.py", "/TotalScan/Search.py", "/thread.py"], "/TotalScan/Search.py": ["/TotalScan/Option_filter.py", "/TotalScan/TotalScan_class.py"]}
56,875
Mal-lol-git/Total_Scanner
refs/heads/master
/TotalScan/TotalScan_class.py
#-*- coding: utf-8 -*- import json import requests from settings import * class TotalScanner(): def __init__(self): super().__init__() def _Connect(self): try: session = requests.Session() session.headers = {'X-Apikey': API_KEY} return session ...
{"/TotalScan/TotalScan_class.py": ["/settings.py"], "/TotalScan/Save.py": ["/settings.py"], "/main.py": ["/Data/Keyword.py", "/TotalScan/Save.py", "/TotalScan/Search.py", "/thread.py"], "/TotalScan/Search.py": ["/TotalScan/Option_filter.py", "/TotalScan/TotalScan_class.py"]}
56,876
Mal-lol-git/Total_Scanner
refs/heads/master
/TotalScan/Save.py
from settings import * def hash_save(): with open(HASH_SAVE_PATH, 'w') as f: for row in list(set(MD5)): f.write('%s\n' % row)
{"/TotalScan/TotalScan_class.py": ["/settings.py"], "/TotalScan/Save.py": ["/settings.py"], "/main.py": ["/Data/Keyword.py", "/TotalScan/Save.py", "/TotalScan/Search.py", "/thread.py"], "/TotalScan/Search.py": ["/TotalScan/Option_filter.py", "/TotalScan/TotalScan_class.py"]}
56,877
Mal-lol-git/Total_Scanner
refs/heads/master
/Data/Keyword.py
#Keyword keywords = {'tag:macros doc run-file', 'tag:doc exploit', 'tag:email', 'tag:peexe', 'tag:vba url-pattern exe-pattern create-ole'}
{"/TotalScan/TotalScan_class.py": ["/settings.py"], "/TotalScan/Save.py": ["/settings.py"], "/main.py": ["/Data/Keyword.py", "/TotalScan/Save.py", "/TotalScan/Search.py", "/thread.py"], "/TotalScan/Search.py": ["/TotalScan/Option_filter.py", "/TotalScan/TotalScan_class.py"]}
56,878
Mal-lol-git/Total_Scanner
refs/heads/master
/main.py
#-*- coding: utf-8 -*- import csv from time import time from Data.Keyword import keywords from TotalScan.Save import hash_save from TotalScan.Search import * from thread import * #========Main======== day = input('ex)2020-01-01, Date :') OPTION_DAYS.append(" fs:"+day+"00:00:00+ fs:"+day+"23:59:59-") print(''' [+] [...
{"/TotalScan/TotalScan_class.py": ["/settings.py"], "/TotalScan/Save.py": ["/settings.py"], "/main.py": ["/Data/Keyword.py", "/TotalScan/Save.py", "/TotalScan/Search.py", "/thread.py"], "/TotalScan/Search.py": ["/TotalScan/Option_filter.py", "/TotalScan/TotalScan_class.py"]}
56,879
Mal-lol-git/Total_Scanner
refs/heads/master
/TotalScan/Search.py
#-*- coding: utf-8 -*- import re import chardet from urllib import parse from TotalScan.Option_filter import _Option_filter from TotalScan.TotalScan_class import * def KeywordSearch(keyword): try: #Total Query key_enc = parse.quote(keyword) query = keyword + OPTION_DAYS[0] #Total...
{"/TotalScan/TotalScan_class.py": ["/settings.py"], "/TotalScan/Save.py": ["/settings.py"], "/main.py": ["/Data/Keyword.py", "/TotalScan/Save.py", "/TotalScan/Search.py", "/thread.py"], "/TotalScan/Search.py": ["/TotalScan/Option_filter.py", "/TotalScan/TotalScan_class.py"]}
56,888
Suguru36/raspizero_sensor
refs/heads/master
/TestSourceCode/get_ip.py
#!/usr/bin/env python #pythonの標準ライブラリですね import socket try: #socket.AF_INET:IVv4のアドレス, socket.SOCK_DGRAM:UDPネットワークの #IPv6の場合はAF_INET→IF_INET6 s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) #タイムアウトを10秒 s.settimeout(10) #ipアドレス8.8.8.8:80に接続します。 # 8.8.8.8はgoogle Public DNSPCのIP。 # ...
{"/EnvionmentSensorLogger.py": ["/papirus_cont.py", "/Bme280Cnt.py"]}
56,889
Suguru36/raspizero_sensor
refs/heads/master
/TestSourceCode/PapirusTest.py
#!/usr/bin/env python from papirus import PapirusTextPos papi = PapirusTextPos() papi.AddText("00-00 00:00", 0 ,0 ,Id="date-time") papi.AddText("00.000", 0 ,20 ,Id="temp") #papi.Add papi.UpdateText("Start", "New Text")
{"/EnvionmentSensorLogger.py": ["/papirus_cont.py", "/Bme280Cnt.py"]}
56,890
Suguru36/raspizero_sensor
refs/heads/master
/EnvionmentSensorLogger.py
#!/usr/bin/env python from papirus_cont import papirus_cont from Bme280Cnt import Bme280Cnt from time import sleep import ambient # # Ambient Livraryが必要です。 # https://ambidata.io/refs/python/ # class EnvionmentSensorLogger(object): def __init__(self): self.papi = papirus_cont() self.Bme280 = Bme2...
{"/EnvionmentSensorLogger.py": ["/papirus_cont.py", "/Bme280Cnt.py"]}
56,891
Suguru36/raspizero_sensor
refs/heads/master
/VL53L1Xcnt.py
import sys sys.path.insert(0,"build/lib.linux-armv7l-2.7/") import VL53L1X import time from datetime import datetime tof = VL53L1X.VL53L1X(i2c_bus=1, i2c_address=0x29) tof.open() # Initialise the i2c bus and configure the sensor tof.start_ranging(1) # Start ranging, 1 = Short Range, 2 = Medium Range, 3 = Long Range d...
{"/EnvionmentSensorLogger.py": ["/papirus_cont.py", "/Bme280Cnt.py"]}
56,892
Suguru36/raspizero_sensor
refs/heads/master
/TestSourceCode/temptest.py
import smbus from time import sleep bus = smbus.SMBus(1) Temp = [] Pres = [] Humi = [] tt = 0.0 # Write Sensor I2C def writeSensor(reg_addr, data): bus.write_byte_data(0x76, reg_addr, data) # Get Calibration Data def getCalibration(): calib = [] for i in range(0x88, 0x88+24): calib.append(bus.read_byte_data...
{"/EnvionmentSensorLogger.py": ["/papirus_cont.py", "/Bme280Cnt.py"]}
56,893
Suguru36/raspizero_sensor
refs/heads/master
/TestSourceCode/papi_ipaddr.py
#!/usr/bin/env python import os import sys import socket from PIL import Image from PIL import ImageDraw from PIL import ImageFont import datetime import time from papirus import Papirus import RPi.GPIO as GPIO # Assume Papirus Zero SW1 = 21 # Check EPD_SIZE is defined EPD_SIZE=0.0 if os.path.exists('/etc/default...
{"/EnvionmentSensorLogger.py": ["/papirus_cont.py", "/Bme280Cnt.py"]}
56,894
Suguru36/raspizero_sensor
refs/heads/master
/Bme280Cnt.py
#!/usr/bin/env python import smbus from time import sleep class Bme280Cnt(object): _slave_addres = 0x76 Temp = [] Pres = [] Humi = [] tt = 0.0 # Initialize Sensor def __init__(self): self.bus = smbus.SMBus(1) self.Tovs = 1 # Temperature oversampling x 1 self...
{"/EnvionmentSensorLogger.py": ["/papirus_cont.py", "/Bme280Cnt.py"]}
56,895
Suguru36/raspizero_sensor
refs/heads/master
/papirus_cont.py
#!/usr/bin/env python from papirus import PapirusTextPos from datetime import datetime import time import socket class papirus_cont(object): def __init__(self): self.papi = PapirusTextPos(False) self.papi.Clear() self.papi.AddText("DATE:", 0 ,0 ,Id="datetext") self.papi.AddText...
{"/EnvionmentSensorLogger.py": ["/papirus_cont.py", "/Bme280Cnt.py"]}
56,900
Incanus3/dynamic-rest-deferred-many-relations-test
refs/heads/master
/related_ids_test/serializers.py
from dynamic_rest.serializers import DynamicModelSerializer, DynamicRelationField from .models import Parent, Child class ChildSerializer(DynamicModelSerializer): class Meta: model = Child fields = '__all__' class ParentSerializer(DynamicModelSerializer): class Meta: model = Parent fields = '__a...
{"/related_ids_test/serializers.py": ["/related_ids_test/models.py"], "/related_ids_test/views.py": ["/related_ids_test/models.py", "/related_ids_test/serializers.py"], "/related_ids_test/urls.py": ["/related_ids_test/views.py"]}
56,901
Incanus3/dynamic-rest-deferred-many-relations-test
refs/heads/master
/related_ids_test/migrations/0001_initial.py
# Generated by Django 2.0.8 on 2018-11-09 15:37 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Child', fields=[ ...
{"/related_ids_test/serializers.py": ["/related_ids_test/models.py"], "/related_ids_test/views.py": ["/related_ids_test/models.py", "/related_ids_test/serializers.py"], "/related_ids_test/urls.py": ["/related_ids_test/views.py"]}
56,902
Incanus3/dynamic-rest-deferred-many-relations-test
refs/heads/master
/related_ids_test/models.py
from django.db.models import Model, CharField, ForeignKey, PROTECT class Parent(Model): class Meta: db_table = 'parents' name = CharField(max_length = 32) class Child(Model): class Meta: db_table = 'children' name = CharField(max_length = 32) parent = ForeignKey(Parent, related_name = 'children'...
{"/related_ids_test/serializers.py": ["/related_ids_test/models.py"], "/related_ids_test/views.py": ["/related_ids_test/models.py", "/related_ids_test/serializers.py"], "/related_ids_test/urls.py": ["/related_ids_test/views.py"]}
56,903
Incanus3/dynamic-rest-deferred-many-relations-test
refs/heads/master
/related_ids_test/views.py
from dynamic_rest.viewsets import DynamicModelViewSet from .models import Parent, Child from .serializers import ParentSerializer, ChildSerializer class ChildViewSet(DynamicModelViewSet): queryset = Child.objects serializer_class = ChildSerializer class ParentViewSet(DynamicModelViewSet): queryset ...
{"/related_ids_test/serializers.py": ["/related_ids_test/models.py"], "/related_ids_test/views.py": ["/related_ids_test/models.py", "/related_ids_test/serializers.py"], "/related_ids_test/urls.py": ["/related_ids_test/views.py"]}
56,904
Incanus3/dynamic-rest-deferred-many-relations-test
refs/heads/master
/related_ids_test/urls.py
from django.conf.urls import url, include from dynamic_rest.routers import DynamicRouter from .views import ParentViewSet, ChildViewSet crud_router = DynamicRouter() crud_router.register_resource(ParentViewSet) crud_router.register_resource(ChildViewSet) urlpatterns = [ url(r'^crud/', include(crud_router.urls)), ]...
{"/related_ids_test/serializers.py": ["/related_ids_test/models.py"], "/related_ids_test/views.py": ["/related_ids_test/models.py", "/related_ids_test/serializers.py"], "/related_ids_test/urls.py": ["/related_ids_test/views.py"]}
56,905
andreslearns/andres_helper
refs/heads/master
/networkauto.py
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'guipy.ui' # # Created by: PyQt5 UI code generator 5.15.0 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, QtGui,...
{"/main.py": ["/networkauto.py"]}
56,906
andreslearns/andres_helper
refs/heads/master
/main.py
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtWidgets import QMessageBox, QFileDialog, QGraphicsBlurEffect from PyQt5.QtCore import QTimer from networkauto import Ui_MainWindow from ipaddress import ip_network from datetime import datetime from nornir import InitNornir from nornir.plugins.tasks.networking imp...
{"/main.py": ["/networkauto.py"]}
56,907
andreslearns/andres_helper
refs/heads/master
/hook-nornir.py
from PyInstaller.utils.hooks import copy_metadata, collect_data_files datas = copy_metadata('nornir') datas += collect_data_files('nornir')
{"/main.py": ["/networkauto.py"]}
56,963
stasyao/bakecake
refs/heads/master
/users/migrations/0003_auto_20211029_1603.py
# Generated by Django 3.2.8 on 2021-10-29 13:03 import django.contrib.auth.models from django.db import migrations, models import users.models class Migration(migrations.Migration): dependencies = [ ('users', '0002_customuser_agreement'), ] operations = [ migrations.CreateModel( ...
{"/users/migrations/0003_auto_20211029_1603.py": ["/users/models.py"], "/users/views.py": ["/shop/models.py", "/users/forms.py"], "/shop/forms.py": ["/shop/models.py"], "/shop/admin.py": ["/shop/models.py", "/bakecake_statistics/models.py", "/bakecake_statistics/stat_utils.py"], "/users/forms.py": ["/shop/models.py", "...
56,964
stasyao/bakecake
refs/heads/master
/users/views.py
from django.contrib.auth.decorators import login_required from django.shortcuts import get_object_or_404, redirect, render from django.urls import reverse_lazy from django.views.generic import CreateView from shop.models import Order from .forms import CancellationOrderForm, CustomUserCreationForm class SignUpView(C...
{"/users/migrations/0003_auto_20211029_1603.py": ["/users/models.py"], "/users/views.py": ["/shop/models.py", "/users/forms.py"], "/shop/forms.py": ["/shop/models.py"], "/shop/admin.py": ["/shop/models.py", "/bakecake_statistics/models.py", "/bakecake_statistics/stat_utils.py"], "/users/forms.py": ["/shop/models.py", "...
56,965
stasyao/bakecake
refs/heads/master
/bakecake_statistics/migrations/0001_initial.py
# Generated by Django 3.2.8 on 2021-11-02 19:31 from django.db import migrations class Migration(migrations.Migration): initial = True dependencies = [ ('shop', '0003_auto_20211102_2034'), ] operations = [ migrations.CreateModel( name='OrderStatistics', fiel...
{"/users/migrations/0003_auto_20211029_1603.py": ["/users/models.py"], "/users/views.py": ["/shop/models.py", "/users/forms.py"], "/shop/forms.py": ["/shop/models.py"], "/shop/admin.py": ["/shop/models.py", "/bakecake_statistics/models.py", "/bakecake_statistics/stat_utils.py"], "/users/forms.py": ["/shop/models.py", "...
56,966
stasyao/bakecake
refs/heads/master
/shop/forms.py
import datetime from django import forms from django.forms.widgets import ( CheckboxSelectMultiple, RadioSelect, TextInput, Textarea ) from shop.models import Cake, Order, Topping, CakeLevel, CakeForm class CakeConstructorForm(forms.ModelForm): def __init__(self, **kwargs): kwargs['initial'] = { ...
{"/users/migrations/0003_auto_20211029_1603.py": ["/users/models.py"], "/users/views.py": ["/shop/models.py", "/users/forms.py"], "/shop/forms.py": ["/shop/models.py"], "/shop/admin.py": ["/shop/models.py", "/bakecake_statistics/models.py", "/bakecake_statistics/stat_utils.py"], "/users/forms.py": ["/shop/models.py", "...
56,967
stasyao/bakecake
refs/heads/master
/shop/urls.py
from django.urls import path from . import views # app_name = 'shop' urlpatterns = [ path('', views.show_main_page, name='home'), path('cake', views.make_cake_page, name='make_cake_page'), path('order_details', views.order_details, name='order_details'), path('make_order', views.make_order, name='mak...
{"/users/migrations/0003_auto_20211029_1603.py": ["/users/models.py"], "/users/views.py": ["/shop/models.py", "/users/forms.py"], "/shop/forms.py": ["/shop/models.py"], "/shop/admin.py": ["/shop/models.py", "/bakecake_statistics/models.py", "/bakecake_statistics/stat_utils.py"], "/users/forms.py": ["/shop/models.py", "...
56,968
stasyao/bakecake
refs/heads/master
/shop/admin.py
import csv from django.contrib import admin from django.contrib.admin import sites from django.contrib.auth import get_user_model from django.http.response import HttpResponse from django.urls import path from .models import (Berry, Cake, CakeForm, CakeLevel, CancellationOrder, Decor, Order, Prom...
{"/users/migrations/0003_auto_20211029_1603.py": ["/users/models.py"], "/users/views.py": ["/shop/models.py", "/users/forms.py"], "/shop/forms.py": ["/shop/models.py"], "/shop/admin.py": ["/shop/models.py", "/bakecake_statistics/models.py", "/bakecake_statistics/stat_utils.py"], "/users/forms.py": ["/shop/models.py", "...
56,969
stasyao/bakecake
refs/heads/master
/users/forms.py
from django import forms from django.contrib.auth.forms import UserChangeForm, UserCreationForm from django.forms.widgets import TextInput, Textarea from shop.models import CancellationOrder from .models import CustomUser class CancellationOrderForm(forms.ModelForm): class Meta: model = CancellationOrde...
{"/users/migrations/0003_auto_20211029_1603.py": ["/users/models.py"], "/users/views.py": ["/shop/models.py", "/users/forms.py"], "/shop/forms.py": ["/shop/models.py"], "/shop/admin.py": ["/shop/models.py", "/bakecake_statistics/models.py", "/bakecake_statistics/stat_utils.py"], "/users/forms.py": ["/shop/models.py", "...
56,970
stasyao/bakecake
refs/heads/master
/users/admin.py
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from .forms import CustomUserChangeForm, CustomUserCreationForm from .models import CustomUser, UsersCount class CustomUserAdmin(UserAdmin): add_form = CustomUserCreationForm form = CustomUserChangeForm model = CustomUser ...
{"/users/migrations/0003_auto_20211029_1603.py": ["/users/models.py"], "/users/views.py": ["/shop/models.py", "/users/forms.py"], "/shop/forms.py": ["/shop/models.py"], "/shop/admin.py": ["/shop/models.py", "/bakecake_statistics/models.py", "/bakecake_statistics/stat_utils.py"], "/users/forms.py": ["/shop/models.py", "...
56,971
stasyao/bakecake
refs/heads/master
/shop/migrations/0003_auto_20211102_2034.py
# Generated by Django 3.2.8 on 2021-11-02 17:34 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('shop', '0002_auto_20211029_1603'), ] operations = [ migrations.CreateModel( name='CancellationOrderSummary', fields=...
{"/users/migrations/0003_auto_20211029_1603.py": ["/users/models.py"], "/users/views.py": ["/shop/models.py", "/users/forms.py"], "/shop/forms.py": ["/shop/models.py"], "/shop/admin.py": ["/shop/models.py", "/bakecake_statistics/models.py", "/bakecake_statistics/stat_utils.py"], "/users/forms.py": ["/shop/models.py", "...
56,972
stasyao/bakecake
refs/heads/master
/bakecake_statistics/models.py
from django.db import models from shop.models import Order class OrderStatistics(Order): class Meta: proxy = True verbose_name_plural = 'статистика по магазину'
{"/users/migrations/0003_auto_20211029_1603.py": ["/users/models.py"], "/users/views.py": ["/shop/models.py", "/users/forms.py"], "/shop/forms.py": ["/shop/models.py"], "/shop/admin.py": ["/shop/models.py", "/bakecake_statistics/models.py", "/bakecake_statistics/stat_utils.py"], "/users/forms.py": ["/shop/models.py", "...
56,973
stasyao/bakecake
refs/heads/master
/bakecake_statistics/stat_utils.py
import collections from django.contrib.auth import get_user_model from django.db.models import Count from shop.models import Cake, Order User = get_user_model() def get_statistics(): statistics = { 'orders': {'Всего заказов': Order.objects.count()}, 'statuses': dict(collections.Counter( ...
{"/users/migrations/0003_auto_20211029_1603.py": ["/users/models.py"], "/users/views.py": ["/shop/models.py", "/users/forms.py"], "/shop/forms.py": ["/shop/models.py"], "/shop/admin.py": ["/shop/models.py", "/bakecake_statistics/models.py", "/bakecake_statistics/stat_utils.py"], "/users/forms.py": ["/shop/models.py", "...
56,974
stasyao/bakecake
refs/heads/master
/shop/migrations/0002_auto_20211029_1603.py
# Generated by Django 3.2.8 on 2021-10-29 13:03 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('shop', '0001_initial'), ...
{"/users/migrations/0003_auto_20211029_1603.py": ["/users/models.py"], "/users/views.py": ["/shop/models.py", "/users/forms.py"], "/shop/forms.py": ["/shop/models.py"], "/shop/admin.py": ["/shop/models.py", "/bakecake_statistics/models.py", "/bakecake_statistics/stat_utils.py"], "/users/forms.py": ["/shop/models.py", "...
56,975
stasyao/bakecake
refs/heads/master
/shop/models.py
from django.db import models from django.contrib.auth import get_user_model User = get_user_model() class CakeLevel(models.Model): level_num = models.PositiveSmallIntegerField( verbose_name='число уровней торта', default=1 ) price = models.PositiveSmallIntegerField( verbose_name=...
{"/users/migrations/0003_auto_20211029_1603.py": ["/users/models.py"], "/users/views.py": ["/shop/models.py", "/users/forms.py"], "/shop/forms.py": ["/shop/models.py"], "/shop/admin.py": ["/shop/models.py", "/bakecake_statistics/models.py", "/bakecake_statistics/stat_utils.py"], "/users/forms.py": ["/shop/models.py", "...
56,976
stasyao/bakecake
refs/heads/master
/users/urls.py
from django.urls import path from .views import SignUpView, show_orders, cancel_order urlpatterns = [ path('signup/', SignUpView.as_view(), name='signup'), path('account/', show_orders, name='account'), path('cancel/<int:order_id>', cancel_order, name='cancel'), ]
{"/users/migrations/0003_auto_20211029_1603.py": ["/users/models.py"], "/users/views.py": ["/shop/models.py", "/users/forms.py"], "/shop/forms.py": ["/shop/models.py"], "/shop/admin.py": ["/shop/models.py", "/bakecake_statistics/models.py", "/bakecake_statistics/stat_utils.py"], "/users/forms.py": ["/shop/models.py", "...
56,977
stasyao/bakecake
refs/heads/master
/shop/migrations/0001_initial.py
# Generated by Django 3.2.8 on 2021-10-26 11:50 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import shop.models class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MOD...
{"/users/migrations/0003_auto_20211029_1603.py": ["/users/models.py"], "/users/views.py": ["/shop/models.py", "/users/forms.py"], "/shop/forms.py": ["/shop/models.py"], "/shop/admin.py": ["/shop/models.py", "/bakecake_statistics/models.py", "/bakecake_statistics/stat_utils.py"], "/users/forms.py": ["/shop/models.py", "...
56,978
stasyao/bakecake
refs/heads/master
/shop/views.py
from django.contrib.auth.decorators import login_required from django import urls from django.http import JsonResponse from django.shortcuts import redirect, render from shop.models import PromoCode from .forms import CakeConstructorForm, OrderDetailsForm def show_main_page(request): return render(request, 'sup...
{"/users/migrations/0003_auto_20211029_1603.py": ["/users/models.py"], "/users/views.py": ["/shop/models.py", "/users/forms.py"], "/shop/forms.py": ["/shop/models.py"], "/shop/admin.py": ["/shop/models.py", "/bakecake_statistics/models.py", "/bakecake_statistics/stat_utils.py"], "/users/forms.py": ["/shop/models.py", "...
56,979
stasyao/bakecake
refs/heads/master
/users/models.py
from django.contrib.auth.models import AbstractUser from django.core.exceptions import ValidationError from django.db import models from phonenumber_field.modelfields import PhoneNumberField def validate_agreement(value): if not value: raise ValidationError( 'Для регистрации необходимо согласи...
{"/users/migrations/0003_auto_20211029_1603.py": ["/users/models.py"], "/users/views.py": ["/shop/models.py", "/users/forms.py"], "/shop/forms.py": ["/shop/models.py"], "/shop/admin.py": ["/shop/models.py", "/bakecake_statistics/models.py", "/bakecake_statistics/stat_utils.py"], "/users/forms.py": ["/shop/models.py", "...
56,992
meoke/pangtreevis
refs/heads/master
/dash_app/components/pangtreebuild.py
import os from io import StringIO from typing import Union, Optional import dash_html_components as html from pangtreebuild.consensus import simple_tree_generator, tree_generator from pangtreebuild.consensus.cutoffs import MAX2, NODE3 from pangtreebuild.datamodel.DataType import DataType from pangtreebuild.datamodel....
{"/dash_app/callbacks/visualisation.py": ["/dash_app/server.py", "/dash_app/layout/layout_ids.py", "/dash_app/layout/pages.py"], "/dash_app/layout/pages.py": ["/dash_app/layout/layout_ids.py"], "/run.py": ["/dash_app/app.py"], "/dash_app/callbacks/consensustree.py": ["/dash_app/layout/layout_ids.py", "/dash_app/server....
56,993
meoke/pangtreevis
refs/heads/master
/dash_app/layout/layout_ids.py
id_pang_button = 'pang_button' id_pangenome_upload = 'pangenome_upload' id_pangenome_hidden = 'pangenome_hidden' id_pangenome_parameters_hidden = 'pangenome_parameters_hidden' id_program_parameters = 'program_parameters' id_pangenome_info = 'pangenome_info' id_full_consensustable_hidden = 'full_consensustable_hidde...
{"/dash_app/callbacks/visualisation.py": ["/dash_app/server.py", "/dash_app/layout/layout_ids.py", "/dash_app/layout/pages.py"], "/dash_app/layout/pages.py": ["/dash_app/layout/layout_ids.py"], "/run.py": ["/dash_app/app.py"], "/dash_app/callbacks/consensustree.py": ["/dash_app/layout/layout_ids.py", "/dash_app/server....
56,994
meoke/pangtreevis
refs/heads/master
/dash_app/callbacks/visualisation.py
from typing import List from dash.exceptions import PreventUpdate from ..server import app from dash.dependencies import Input, Output, State from ..layout.layout_ids import * from ..layout.pages import get_task_description_layout from ..components import tools, poagraph @app.callback( Output(id_pangenome_hidden...
{"/dash_app/callbacks/visualisation.py": ["/dash_app/server.py", "/dash_app/layout/layout_ids.py", "/dash_app/layout/pages.py"], "/dash_app/layout/pages.py": ["/dash_app/layout/layout_ids.py"], "/run.py": ["/dash_app/app.py"], "/dash_app/callbacks/consensustree.py": ["/dash_app/layout/layout_ids.py", "/dash_app/server....
56,995
meoke/pangtreevis
refs/heads/master
/dash_app/layout/pages.py
import dash_bootstrap_components as dbc import dash_html_components as html import dash_core_components as dcc from pangtreebuild.output.PangenomeJSON import PangenomeJSON from .layout_ids import * import dash_cytoscape as cyto import dash_table from ..components import mafgraph as mafgraph_component from ..components...
{"/dash_app/callbacks/visualisation.py": ["/dash_app/server.py", "/dash_app/layout/layout_ids.py", "/dash_app/layout/pages.py"], "/dash_app/layout/pages.py": ["/dash_app/layout/layout_ids.py"], "/run.py": ["/dash_app/app.py"], "/dash_app/callbacks/consensustree.py": ["/dash_app/layout/layout_ids.py", "/dash_app/server....
56,996
meoke/pangtreevis
refs/heads/master
/run.py
from dash_app.app import app if __name__ == '__main__': app.run_server(debug=True, port=8052, host='0.0.0.0', dev_tools_ui=False)
{"/dash_app/callbacks/visualisation.py": ["/dash_app/server.py", "/dash_app/layout/layout_ids.py", "/dash_app/layout/pages.py"], "/dash_app/layout/pages.py": ["/dash_app/layout/layout_ids.py"], "/run.py": ["/dash_app/app.py"], "/dash_app/callbacks/consensustree.py": ["/dash_app/layout/layout_ids.py", "/dash_app/server....
56,997
meoke/pangtreevis
refs/heads/master
/dash_app/components/mafgraph.py
from typing import Dict, Union, Any, Tuple, List from pangtreebuild.output.PangenomeJSON import PangenomeJSON from ..layout.colors import colors CytoscapeNode = Dict[str, Union[str, Dict[str, Any]]] CytoscapeEdge = Dict[str, Union[str, Dict[str, Any]]] def get_mafgraph_stylesheet(): return [ { ...
{"/dash_app/callbacks/visualisation.py": ["/dash_app/server.py", "/dash_app/layout/layout_ids.py", "/dash_app/layout/pages.py"], "/dash_app/layout/pages.py": ["/dash_app/layout/layout_ids.py"], "/run.py": ["/dash_app/app.py"], "/dash_app/callbacks/consensustree.py": ["/dash_app/layout/layout_ids.py", "/dash_app/server....