index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
21,119
phdesign/microbit_games
refs/heads/main
/bop_it.py
from microbit import * from time import sleep from random import randint import math import music # The starting time in milliseconds we will wait for a response. WAIT_START_MS = 1500 # How quickly the wait time reduces. A smaller value means it shortens more quickly. DECAY_RATE = 50 # Starting sound volume START_VOL...
{"/bop_it.py": ["/music/__init__.py"], "/test/test_bop_it.py": ["/bop_it.py"]}
21,120
phdesign/microbit_games
refs/heads/main
/music/__init__.py
def play(music, pin="", wait=True, loop=False): pass
{"/bop_it.py": ["/music/__init__.py"], "/test/test_bop_it.py": ["/bop_it.py"]}
21,121
phdesign/microbit_games
refs/heads/main
/test/test_bop_it.py
from unittest.mock import patch from bop_it import create_exponential_decay, volume_to_step, change_volume def test_create_exponential_decay(): fn = create_exponential_decay(1500, 200) assert fn(0) == 1500 assert round(fn(10)) == 1427 assert round(fn(100)) == 910 assert round(fn(1000)) == 10 def...
{"/bop_it.py": ["/music/__init__.py"], "/test/test_bop_it.py": ["/bop_it.py"]}
21,123
xiaywang/QuantLab
refs/heads/master
/quantlab/BCI-CompIV-2a/utils/meter.py
# Copyright (c) 2019 UniMoRe, Matteo Spallanzani import math class Meter(object): def __init__(self, pp_pr, pp_gt): self.n_tracked = None self.loss = None self.avg_loss = None # main metric is classification error self.pp_pr = pp_pr self.pp_gt...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,124
xiaywang/QuantLab
refs/heads/master
/quantlab/treat/daemon.py
# Copyright (c) 2019 UniMoRe, Matteo Spallanzani # Copyright (c) 2019 ETH Zurich, Lukas Cavigelli import torch import torch.optim as optim import torch.utils.data as tud import itertools from quantlab.treat.thermo.thermostat import Thermostat import quantlab.treat.algo.lr_schedulers as lr_schedulers class DynamicSu...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,125
xiaywang/QuantLab
refs/heads/master
/quantlab/ImageNet/ResNet/resnet.py
# Copyright (c) 2019 ETH Zurich, Lukas Cavigelli # large parts of the code taken or adapted from torchvision import math import torch import torch.nn as nn #from quantlab.indiv.stochastic_ops import StochasticActivation, StochasticLinear, StochasticConv2d from quantlab.indiv.inq_ops import INQController, INQLinear, I...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,126
xiaywang/QuantLab
refs/heads/master
/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py
# Copyright (c) 2019 ETH Zurich, Lukas Cavigelli import torch import torch.nn as nn import math from quantlab.indiv.stochastic_ops import StochasticActivation, StochasticLinear, StochasticConv2d class MeyerNet(nn.Module): """Audio Event Detection quantized Network.""" def __init__(self, capacityFactor=1.0, v...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,127
xiaywang/QuantLab
refs/heads/master
/quantlab/indiv/stochastic_ops.py
# Copyright (c) 2019 UniMoRe, Matteo Spallanzani # Copyright (c) 2019 ETH Zurich, Lukas Cavigelli import math # from scipy.stats import norm, uniform import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.modules.utils import _single, _pair, _triple #from .cuda import init_ffi_lib,...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,128
xiaywang/QuantLab
refs/heads/master
/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py
# Copyright (c) 2019 UniMoRe, Matteo Spallanzani # Copyright (c) 2019 ETH Zurich, Lukas Cavigelli import math import torch.nn as nn #from quantlab.indiv.stochastic_ops import StochasticActivation, StochasticLinear, StochasticConv2d from quantlab.indiv.inq_ops import INQController, INQLinear, INQConv2d #from quantlab....
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,129
xiaywang/QuantLab
refs/heads/master
/quantlab/ImageNet/AlexNet/alexnetbaseline.py
# Copyright (c) 2019 UniMoRe, Matteo Spallanzani # Copyright (c) 2019 ETH Zurich, Lukas Cavigelli import torch import torch.nn as nn # In order for the baselines to be launched with the same logic as quantized # models, an empty quantization scheme and an empty thermostat schedule need # to be configured. # Use the ...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,130
xiaywang/QuantLab
refs/heads/master
/quantlab/ImageNet/ResNet/postprocess.py
../MobileNetv2/postprocess.py
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,131
xiaywang/QuantLab
refs/heads/master
/quantlab/ETHZ-CVL-AED/MeyerNet/preprocess.py
# Copyright (c) 2019 ETH Zurich, Lukas Cavigelli import torchvision as tv import pickle import os import numpy as np import torch class PickleDictionaryNumpyDataset(tv.datasets.VisionDataset): """Looks for a train.pickle or test.pickle file within root. The file has to contain a dictionary with classes as ke...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,132
xiaywang/QuantLab
refs/heads/master
/quantlab/CIFAR-10/VGG/preprocess.py
# Copyright (c) 2019 UniMoRe, Matteo Spallanzani import torchvision from torchvision.transforms import RandomCrop, RandomHorizontalFlip, ToTensor, Normalize, Compose from quantlab.treat.data.split import transform_random_split _CIFAR10 = { 'Normalize': { 'mean': (0.4914, 0.4822, 0.4465), 'std': ...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,133
xiaywang/QuantLab
refs/heads/master
/quantlab/BCI-CompIV-2a/EEGNet/eegnetbaseline.py
# Copyright (c) 2019 Tibor Schneider import numpy as np import torch as t import torch.nn.functional as F class EEGNetBaseline(t.nn.Module): """ EEGNet In order for the baseline to be launched with the same logic as the quantized models, an empty quantization scheme and an empty thermostat schedule ...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,134
xiaywang/QuantLab
refs/heads/master
/quantlab/ETHZ-CVL-AED/utils/meter.py
../../CIFAR-10/utils/meter.py
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,135
xiaywang/QuantLab
refs/heads/master
/quantlab/ImageNet/MobileNetv2/mobilenetv2residuals.py
# Copyright (c) 2019 UniMoRe, Matteo Spallanzani # Copyright (c) 2019 ETH Zurich, Lukas Cavigelli import math import torch.nn as nn from quantlab.indiv.stochastic_ops import StochasticActivation, StochasticLinear, StochasticConv2d from quantlab.indiv.inq_ops import INQController, INQLinear, INQConv2d from quantlab.in...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,136
xiaywang/QuantLab
refs/heads/master
/quantlab/ImageNet/AlexNet/alexnet.py
# Copyright (c) 2019 UniMoRe, Matteo Spallanzani # Copyright (c) 2019 ETH Zurich, Lukas Cavigelli import torch import torch.nn as nn from quantlab.indiv.stochastic_ops import StochasticActivation, StochasticLinear, StochasticConv2d from quantlab.indiv.inq_ops import INQController, INQLinear, INQConv2d from quantlab.i...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,137
xiaywang/QuantLab
refs/heads/master
/quantlab/ImageNet/GoogLeNet/__init__.py
from .preprocess import load_data_sets from .postprocess import postprocess_pr, postprocess_gt from .googlenet import GoogLeNet
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,138
xiaywang/QuantLab
refs/heads/master
/quantlab/ImageNet/GoogLeNet/googlenet.py
# Copyright (c) 2019 ETH Zurich, Lukas Cavigelli # large parts of the code taken or adapted from torchvision import warnings from collections import namedtuple import math import torch import torch.nn as nn import torch.nn.functional as F #from quantlab.indiv.stochastic_ops import StochasticActivation, StochasticLine...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,139
xiaywang/QuantLab
refs/heads/master
/quantlab/ETHZ-CVL-AED/MeyerNet/postprocess.py
# Copyright (c) 2019 UniMoRe, Matteo Spallanzani import torch def postprocess_pr(pr_outs): _, pr_outs = torch.max(pr_outs, dim=1) return [p.item() for p in pr_outs.detach().cpu()] def postprocess_gt(gt_labels): return [l.item() for l in gt_labels.detach().cpu()]
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,140
xiaywang/QuantLab
refs/heads/master
/quantlab/ImageNet/MobileNetv2/preprocess.py
# Copyright (c) 2019 UniMoRe, Matteo Spallanzani # Copyright (c) 2019 ETH Zurich, Lukas Cavigelli import os import torch import torchvision from torchvision.transforms import RandomResizedCrop, RandomHorizontalFlip, Resize, RandomCrop, CenterCrop, ToTensor, Normalize, Compose _ImageNet = { 'Normalize': { ...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,141
xiaywang/QuantLab
refs/heads/master
/quantlab/ImageNet/MobileNetv2/__init__.py
from .preprocess import load_data_sets from .postprocess import postprocess_pr, postprocess_gt from .mobilenetv2baseline import MobileNetv2Baseline from .mobilenetv2residuals import MobileNetv2Residuals from .mobilenetv2quantWeight import MobileNetv2QuantWeight
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,142
xiaywang/QuantLab
refs/heads/master
/quantlab/indiv/daemon.py
# Copyright (c) 2019 UniMoRe, Matteo Spallanzani import torch import torch.nn as nn from .transfer import load_pretrained def get_topo(logbook): """Return a network for the experiment and the loss function for training.""" # create the network net_config = logbook.config['indiv']['net'] if net_...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,143
xiaywang/QuantLab
refs/heads/master
/quantlab/indiv/ste_ops.py
# Copyright (c) 2019 ETH Zurich, Lukas Cavigelli import torch import quantlab.indiv as indiv class ClampWithGradInwards(torch.autograd.Function): """Clamps the input, passes the grads for inputs inside or at the """ @staticmethod def forward(ctx, x, low, high): ctx.save_for_backward(x, low, hi...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,144
xiaywang/QuantLab
refs/heads/master
/eegnet_run.py
import os import shutil import json import sys import numpy as np from contextlib import redirect_stdout, redirect_stderr import progress from tqdm import tqdm import pickle from tensorboard.backend.event_processing.event_accumulator import EventAccumulator from main import main as quantlab_main PROBLEM = "BCI-CompI...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,145
xiaywang/QuantLab
refs/heads/master
/quantlab/BCI-CompIV-2a/EEGNet/eegnet.py
# Copyright (c) 2019 Tibor Schneider import numpy as np import torch as t import torch.nn.functional as F from quantlab.indiv.inq_ops import INQController, INQLinear, INQConv2d from quantlab.indiv.ste_ops import STEActivation, STEController class EEGNet(t.nn.Module): """ Quantized EEGNet """ def __...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,146
xiaywang/QuantLab
refs/heads/master
/quantlab/MNIST/MLP/mlp.py
# Copyright (c) 2019 ETH Zurich, Lukas Cavigelli import math import torch import torch.nn as nn from quantlab.indiv.stochastic_ops import StochasticActivation, StochasticLinear from quantlab.indiv.inq_ops import INQController, INQLinear class MLP(nn.Module): """Quantized Multi-Layer Perceptron (both weights and ...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,147
xiaywang/QuantLab
refs/heads/master
/quantlab/ImageNet/GoogLeNet/preprocess.py
../MobileNetv2/preprocess.py
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,148
xiaywang/QuantLab
refs/heads/master
/quantlab/ETHZ-CVL-AED/MeyerNet/__init__.py
from .preprocess import load_data_sets from .postprocess import postprocess_pr, postprocess_gt from .meyernet import MeyerNet
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,149
xiaywang/QuantLab
refs/heads/master
/export_net_data.py
import os import numpy as np import argparse import json import torch import shutil from main import main as quantlab_main parser = argparse.ArgumentParser() parser.add_argument('-e', '--exp_id', help='experiment identification', type=int, default=999) parser.add_argument('-s', '--sample', help='index of the sample',...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,150
xiaywang/QuantLab
refs/heads/master
/main.py
# Copyright (c) 2019 UniMoRe, Matteo Spallanzani # Copyright (c) 2019 ETH Zurich, Lukas Cavigelli import argparse from quantlab.protocol.logbook import Logbook from quantlab.indiv.daemon import get_topo from quantlab.treat.daemon import get_algo, get_data from quantlab.protocol.rooms import train, test import quantla...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,151
xiaywang/QuantLab
refs/heads/master
/quantlab/MNIST/MLP/mlpbaseline.py
# Copyright (c) 2019 UniMoRe, Matteo Spallanzani import torch.nn as nn # In order for the baselines to be launched with the same logic as quantized # models, an empty quantization scheme and an empty thermostat schedule need # to be configured. # Use the following templates for the `net` and `thermostat` configurati...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,152
xiaywang/QuantLab
refs/heads/master
/quantlab/BCI-CompIV-2a/EEGNet/__init__.py
from .preprocess import load_data_sets from .postprocess import postprocess_pr, postprocess_gt from .eegnet import EEGNet from .eegnetbaseline import EEGNetBaseline
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,153
xiaywang/QuantLab
refs/heads/master
/quantlab/CIFAR-10/VGG/vgg.py
# Copyright (c) 2019 UniMoRe, Matteo Spallanzani # Copyright (c) 2019 ETH Zurich, Lukas Cavigelli import torch import torch.nn as nn from quantlab.indiv.stochastic_ops import StochasticActivation, StochasticLinear, StochasticConv2d from quantlab.indiv.inq_ops import INQController, INQLinear, INQConv2d from quantlab.i...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,154
xiaywang/QuantLab
refs/heads/master
/quantlab/indiv/inq_ops.py
# Copyright (c) 2019 ETH Zurich, Lukas Cavigelli import math import itertools import torch import torch.nn as nn import quantlab.indiv as indiv class INQController(indiv.Controller): """Instantiate typically once per network, provide it with a list of INQ modules to control and a INQ schedule, and insert a ...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,155
xiaywang/QuantLab
refs/heads/master
/quantlab/protocol/rooms.py
# Copyright (c) 2019 UniMoRe, Matteo Spallanzani # Copyright (c) 2019 ETH Zurich, Lukas Cavigelli from progress.bar import FillingSquaresBar import torch import quantlab.indiv as indiv def train(logbook, net, device, loss_fn, opt, train_l): """Run one epoch of the training experiment.""" logbook.meter.reset()...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,156
xiaywang/QuantLab
refs/heads/master
/plot_npz_tb.py
import os import numpy as np import argparse import matplotlib.pyplot as plt def plot_npz(filename, export=None, act_quant_line=None): data = dict(np.load(filename)) if 'num_trials' in data: del data['num_trials'] plot_data(data, export, act_quant_line) def plot_tb(filename, export=None, act_qua...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,157
xiaywang/QuantLab
refs/heads/master
/quantlab/indiv/__init__.py
# Copyright (c) 2019 ETH Zurich, Lukas Cavigelli class Controller(object): def __init__(self): pass def step(self, epoch, optimizer=None, tensorboardWriter=None): pass def step_preTraining(self, *args, **kwargs): self.step(*args, **kwargs) def step_preVali...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,158
xiaywang/QuantLab
refs/heads/master
/quantlab/indiv/transfer.py
# Copyright (c) 2019 UniMoRe, Matteo Spallanzani # Copyright (c) 2019 ETH Zurich, Lukas Cavigelli import os import torch from quantlab.protocol.logbook import _exp_align_, _ckpt_align_ def load_pretrained(logbook, net): #get path to pretrained network pre_config = logbook.config['indiv']['net']['pretra...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,159
xiaywang/QuantLab
refs/heads/master
/quantlab/ETHZ-CVL-AED/MeyerNet/acousticEventDetDatasetConvert.py
# Copyright (c) 2019 ETH Zurich, Lukas Cavigelli import numpy as np import re import os import pickle def readSingleFile(fname): with open(fname) as f: fileCont = f.read() arrs = re.findall('array\(\[(.*)\]\)', fileCont) arrs = [np.fromstring(a, sep=',', dtype=np.int16) for a in arrs] # ...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,160
xiaywang/QuantLab
refs/heads/master
/quantlab/BCI-CompIV-2a/EEGNet/preprocess.py
# Copyright (c) 2019 UniMoRe, Matteo Spallanzani, Tibor Schneider from os import path import numpy as np import scipy.io as sio from scipy.signal import butter, sosfilt import numpy as np import torch as t from torchvision.transforms import ToTensor, Normalize, Compose from quantlab.treat.data.split import transform...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,161
xiaywang/QuantLab
refs/heads/master
/quantlab/ImageNet/ResNet/__init__.py
from .preprocess import load_data_sets from .postprocess import postprocess_pr, postprocess_gt from .resnet import ResNet
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,162
xiaywang/QuantLab
refs/heads/master
/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py
# Copyright (c) 2019 UniMoRe, Matteo Spallanzani # Copyright (c) 2019 ETH Zurich, Lukas Cavigelli import math import torch.nn as nn # In order for the baselines to be launched with the same logic as quantized # models, an empty quantization scheme and an empty thermostat schedule need # to be configured. # Use the f...
{"/quantlab/ImageNet/ResNet/resnet.py": ["/quantlab/indiv/inq_ops.py"], "/quantlab/ETHZ-CVL-AED/MeyerNet/meyernet.py": ["/quantlab/indiv/stochastic_ops.py"], "/quantlab/ImageNet/MobileNetv2/mobilenetv2quantWeight.py": ["/quantlab/indiv/inq_ops.py", "/quantlab/ImageNet/MobileNetv2/mobilenetv2baseline.py"], "/quantlab/Im...
21,196
Lila14/multimds
refs/heads/master
/scripts/tad_negative_control.py
import numpy as np import os from matplotlib import pyplot as plt import sys mat = np.loadtxt("A_background_filtered.bed", dtype=object) m = len(mat) ns = [] num_peaks = int(sys.argv[1]) num_overlap = int(sys.argv[2]) for i in range(100): indices = np.random.randint(0, m-1, num_peaks) rand_mat = mat[indices] np.sa...
{"/scripts/test_multimds.py": ["/joint_mds.py"]}
21,197
Lila14/multimds
refs/heads/master
/scripts/loop_partners_polycomb.py
import os import numpy as np from matplotlib import pyplot as plt from scipy import stats as st import sys res_kb = int(sys.argv[1]) if os.path.isfile("polycomb_enrichment.txt"): os.system("rm polycomb_enrichment.txt") if os.path.isfile("enhancer_enrichment.txt"): os.system("rm enhancer_enrichment.txt") chroms = ...
{"/scripts/test_multimds.py": ["/joint_mds.py"]}
21,198
Lila14/multimds
refs/heads/master
/scripts/sup3.py
import os import numpy as np import sys sys.path.append("..") import data_tools as dt import plotting as plot os.system("python ../multimds.py -P 0.1 -w 0 ctrl_Scer_13_32kb.bed galactose_Scer_13_32kb.bed") struct1 = dt.structure_from_file("ctrl_Suva_13_32kb_structure.tsv") struct2 = dt.structure_from_file("galactose_S...
{"/scripts/test_multimds.py": ["/joint_mds.py"]}
21,199
Lila14/multimds
refs/heads/master
/scripts/dist_vs_compartment.py
import sys sys.path.append("..") from matplotlib import pyplot as plt import data_tools as dt import numpy as np import compartment_analysis as ca from scipy import stats as st import linear_algebra as la import os from sklearn import svm res_kb = 100 cell_type1 = "GM12878_combined" cell_type2 = "K562" chroms = (1, 2...
{"/scripts/test_multimds.py": ["/joint_mds.py"]}
21,200
Lila14/multimds
refs/heads/master
/scripts/get_sig.py
from statsmodels.stats.multitest import multipletests import sys import os in_path = sys.argv[1] prefix = in_path.split(".")[0] res = int(sys.argv[2]) ps = [] with open(in_path) as in_file: for line in in_file: line = line.strip().split() if line[0] != "\"logFC\"": #skip header ps.append(float(line[4])) in_...
{"/scripts/test_multimds.py": ["/joint_mds.py"]}
21,201
Lila14/multimds
refs/heads/master
/scripts/test_plot.py
import sys sys.path.append("..") import data_tools as dt import plotting as plot struct1 = dt.structure_from_file("GM12878_combined_21_100kb_structure.tsv") struct2 = dt.structure_from_file("K562_21_100kb_structure.tsv") plot.plot_structures_interactive((struct1, struct2))
{"/scripts/test_multimds.py": ["/joint_mds.py"]}
21,202
Lila14/multimds
refs/heads/master
/scripts/plot_compartment_strength.py
from matplotlib import pyplot as plt import sys sys.path.append("..") import compartment_analysis as ca import data_tools as dt import os paths = sys.argv[1:len(sys.argv)] prefixes = [os.path.basename(path) for path in paths] structs = [dt.structureFromBed(path) for path in paths] mats = [dt.matFromBed(path, struct) f...
{"/scripts/test_multimds.py": ["/joint_mds.py"]}
21,203
Lila14/multimds
refs/heads/master
/scripts/tadlib_input.py
import sys sys.path.append("..") import data_tools as dt import os cell_type = sys.argv[1] os.system("mkdir -p {}_tadlib_input".format(cell_type)) for chrom in (1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22): path = "hic_data/{}_{}_100kb.bed".format(cell_type, chrom) structure = dt.str...
{"/scripts/test_multimds.py": ["/joint_mds.py"]}
21,204
Lila14/multimds
refs/heads/master
/scripts/convert_to_bed.py
import os chrom_bins = {} with open("GSE88952_Sc_Su.32000.bed") as in_file: for line in in_file: line = line.strip().split() chrom_bins[line[3]] = "{}\t{}\t{}".format(line[0], line[1], line[2]) in_file.close() if not os.path.isfile("ctrl_32kb.bed"): with open("ctrl_32kb.bed", "w") as out_file: with open("ct...
{"/scripts/test_multimds.py": ["/joint_mds.py"]}
21,205
Lila14/multimds
refs/heads/master
/scripts/edger_input.py
import sys sys.path.append("..") import data_tools as dt import array_tools as at import numpy as np def compatible_chroms(paths): chroms = [dt.chromFromBed(path) for path in paths] all_min_pos = [chrom.minPos for chrom in chroms] all_max_pos = [chrom.maxPos for chrom in chroms] consensus_min = max(all_min_pos) c...
{"/scripts/test_multimds.py": ["/joint_mds.py"]}
21,206
Lila14/multimds
refs/heads/master
/relocalization_peaks.py
import numpy as np import data_tools as dt import sys import os import linear_algebra as la import array_tools as at from scipy import signal as sg from hmmlearn import hmm import argparse def call_peaks(data): """Calls peaks using Gaussian hidden markov model""" reshaped_data = data.reshape(-1,1) model = hmm.Gauss...
{"/scripts/test_multimds.py": ["/joint_mds.py"]}
21,207
Lila14/multimds
refs/heads/master
/scripts/call_peaks.py
import numpy as np import sys chrom = sys.argv[1] res = 100000 mat = np.loadtxt("{}_relocalization.tsv".format(chrom)) with open("{}_peaks.bed".format(chrom), "w") as out: for i, row in enumerate(mat): if i == 0: prev = 0 else: prev = mat[i-1,1] if i == len(mat) - 1: next = 0 else: next = mat[i+...
{"/scripts/test_multimds.py": ["/joint_mds.py"]}
21,208
Lila14/multimds
refs/heads/master
/scripts/plot_relocalization.py
import os import sys sys.path.append("/home/lur159/git/miniMDS") import data_tools as dt import linear_algebra as la from matplotlib import pyplot as plt import numpy as np gene_name = sys.argv[1] chrom_num = sys.argv[2] gene_loc = int(sys.argv[3]) prefix1 = sys.argv[4] prefix2 = sys.argv[5] res_kb = 32 max_dists = [...
{"/scripts/test_multimds.py": ["/joint_mds.py"]}
21,209
Lila14/multimds
refs/heads/master
/scripts/wig_to_bed.py
""""Convert fixedStep wig to binned bed""" import sys sys.path.append("..") from tools import Tracker wig = sys.argv[1] bin_size = int(sys.argv[2]) file_size = int(sys.argv[3]) prefix = wig.split(".")[0] tracker = Tracker("Converting {}".format(wig), file_size) tot = 0 count = 0 with open(wig) as in_file: with o...
{"/scripts/test_multimds.py": ["/joint_mds.py"]}
21,210
Lila14/multimds
refs/heads/master
/scripts/superenhancer_pie.py
from matplotlib import pyplot as plt import sys from scipy import stats as st plt.pie((int(sys.argv[1]), int(sys.argv[2])), labels=("Enhancer", "No enhancer")) plt.title("Relocalization peaks") plt.savefig("relocalization_superenhancer_pie") plt.close() plt.pie((int(sys.argv[3]), int(sys.argv[4])), labels=("Enhancer",...
{"/scripts/test_multimds.py": ["/joint_mds.py"]}
21,211
Lila14/multimds
refs/heads/master
/scripts/test_multimds.py
import sys sys.path.append("..") import data_tools as dt import numpy as np from joint_mds import Joint_MDS chrom = sys.argv[1] res_kb = 100 prefix1 = "GM12878_combined" prefix2 = "K562" path1 = "hic_data/{}_{}_{}kb.bed".format(prefix1, chrom, res_kb) path2 = "hic_data/{}_{}_{}kb.bed".format(prefix2, chrom, res_kb) ...
{"/scripts/test_multimds.py": ["/joint_mds.py"]}
21,212
Lila14/multimds
refs/heads/master
/scripts/test_quantify_z.py
from sklearn import svm import numpy as np import sys sys.path.append("..") import data_tools as dt import compartment_analysis as ca from matplotlib import pyplot as plt import os import linear_algebra as la import array_tools as at from scipy import stats as st #import plotting as plot res_kb = 100 cell_type1 = sys....
{"/scripts/test_multimds.py": ["/joint_mds.py"]}
21,213
Lila14/multimds
refs/heads/master
/scripts/relocalization_peaks.py
import numpy as np import sys sys.path.append("..") import data_tools as dt import compartment_analysis as ca import os import linear_algebra as la import array_tools as at from scipy import signal as sg from hmmlearn import hmm def normalize(values): return np.array(values)/max(values) def format_celltype(cell_type...
{"/scripts/test_multimds.py": ["/joint_mds.py"]}
21,214
Lila14/multimds
refs/heads/master
/scripts/differential_tad_boundaries.py
cell_type1 = "GM12878_combined" cell_type2 = "K562" res = 100000 boundaries = [] with open("{}_tadlib_output.txt".format(cell_type1)) as in_file: for line in in_file: line = line.split() boundary1 = line[0] + "-" + line[1] if boundary1 not in boundaries: boundaries.append(boundary1) boundary2 = line[0] + ...
{"/scripts/test_multimds.py": ["/joint_mds.py"]}
21,215
Lila14/multimds
refs/heads/master
/joint_mds.py
""" Jointly perform multi-dimensional Scaling (MDS) on two datasets """ # original author: Nelle Varoquaux <nelle.varoquaux@gmail.com> # modified by: Lila Rieber <lur159@psu.edu> # License: BSD import numpy as np import sys import warnings from sklearn.base import BaseEstimator from sklearn.metrics import euclidean_d...
{"/scripts/test_multimds.py": ["/joint_mds.py"]}
21,216
Lila14/multimds
refs/heads/master
/scripts/get_a_compartment.py
import sys sys.path.append("..") import compartment_analysis as ca import data_tools as dt import array_tools as at import os import numpy as np res = int(sys.argv[1]) res_kb = res/1000 if os.path.isfile("A_compartment_{}kb.bed".format(res_kb)): os.system("rm A_compartment_{}kb.bed".format(res_kb)) for chrom in (1,...
{"/scripts/test_multimds.py": ["/joint_mds.py"]}
21,217
Lila14/multimds
refs/heads/master
/scripts/ttest.py
import numpy as np from scipy import stats as st import sys from matplotlib import pyplot as plt mat1 = np.loadtxt(sys.argv[1], dtype=object) enrichments1 = np.array(mat1[:,6], dtype=float) mat2 = np.loadtxt(sys.argv[2], dtype=object) enrichments2 = np.array(mat2[:,6], dtype=float) print st.ttest_ind(enrichments1, enr...
{"/scripts/test_multimds.py": ["/joint_mds.py"]}
21,218
Lila14/multimds
refs/heads/master
/scripts/enhancer_pie.py
from matplotlib import pyplot as plt import sys plt.pie((int(sys.argv[1]), int(sys.argv[2])), labels=("Enhancer", "No enhancer")) plt.title("Relocalization peaks") plt.savefig("relocalization_enhancer_pie") plt.close() plt.pie((int(sys.argv[3]), int(sys.argv[4])), labels=("Enhancer", "No enhancer")) plt.title("Backgro...
{"/scripts/test_multimds.py": ["/joint_mds.py"]}
21,219
chavarera/Cinfo
refs/heads/master
/lib/windows/NetworkInfo.py
import socket from lib.windows.common.CommandHandler import CommandHandler from uuid import getnode as get_mac from lib.windows.common import Utility as utl from lib.windows import SystemInfo #import SystemInfo import re class NetworkInfo: ''' class Name:NetworkInfo Description: used to Find out network r...
{"/lib/windows/NetworkInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/HardwareInfo.py": ["/lib/windows/common/CommandHandler.py", "/lib/windows/common/RegistryHandler.py"], "/lib/windows/ServiceInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/MiscInfo.py": ["/lib/windows/common/Comm...
21,220
chavarera/Cinfo
refs/heads/master
/lib/windows/HardwareInfo.py
from lib.windows.common.CommandHandler import CommandHandler from lib.windows.common.RegistryHandler import RegistryHandler from lib.windows.common import Utility as utl class HardwareInfo: ''' class_Name:HardwareInfo Output:Return bios,cpu,usb information Functions: getBiosInfo() getCpuInfo(s...
{"/lib/windows/NetworkInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/HardwareInfo.py": ["/lib/windows/common/CommandHandler.py", "/lib/windows/common/RegistryHandler.py"], "/lib/windows/ServiceInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/MiscInfo.py": ["/lib/windows/common/Comm...
21,221
chavarera/Cinfo
refs/heads/master
/lib/windows/ServiceInfo.py
from lib.windows.common.CommandHandler import CommandHandler from lib.windows.common import Utility as utl class ServiceInfo: def __init__(self): self.cmd=CommandHandler() def Preprocess(self,text): cmd=f'wmic {text} list /format:csv' Command_res=self.cmd.getCmdOutput(cmd) ...
{"/lib/windows/NetworkInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/HardwareInfo.py": ["/lib/windows/common/CommandHandler.py", "/lib/windows/common/RegistryHandler.py"], "/lib/windows/ServiceInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/MiscInfo.py": ["/lib/windows/common/Comm...
21,222
chavarera/Cinfo
refs/heads/master
/lib/linux/get_browsers.py
''' Author : Deepak Chauhan GitHub : https://github.com/royaleagle73 Email : 2018PGCACA63@nitjsr.ac.in ''' import os class get_browsers: ''' ********* THIS SCRIPT RETURNS A LIST CONTAINING BROWSERS INSTALLED ON USER'S LINUX SYSTEM ********* CLASS get_browsers DOCINFO: get_browsers HAVE TWO FUNCTIONS I.E., 1) _...
{"/lib/windows/NetworkInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/HardwareInfo.py": ["/lib/windows/common/CommandHandler.py", "/lib/windows/common/RegistryHandler.py"], "/lib/windows/ServiceInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/MiscInfo.py": ["/lib/windows/common/Comm...
21,223
chavarera/Cinfo
refs/heads/master
/lib/windows/MiscInfo.py
from lib.windows.common.CommandHandler import CommandHandler from lib.windows.common import Utility as utl class MiscInfo: def __init__(self): self.cmd=CommandHandler() def Preprocess(self,text): cmd=f'wmic {text} list /format:csv' Command_res=self.cmd.getCmdOutput(cmd) ...
{"/lib/windows/NetworkInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/HardwareInfo.py": ["/lib/windows/common/CommandHandler.py", "/lib/windows/common/RegistryHandler.py"], "/lib/windows/ServiceInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/MiscInfo.py": ["/lib/windows/common/Comm...
21,224
chavarera/Cinfo
refs/heads/master
/lib/linux/get_network_info.py
''' Author : Deepak Chauhan GitHub : https://github.com/royaleagle73 Email : 2018PGCACA63@nitjsr.ac.in ''' import os from tabulate import tabulate class get_network_info: ''' CLASS get_network_info PROVIDES THE CURRENT NETWORK CONNECTION STATUS, IP ADDRESS, NET MASK ADDRESS AND BROADCAST ADDRESS ALONGWITH ALL INT...
{"/lib/windows/NetworkInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/HardwareInfo.py": ["/lib/windows/common/CommandHandler.py", "/lib/windows/common/RegistryHandler.py"], "/lib/windows/ServiceInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/MiscInfo.py": ["/lib/windows/common/Comm...
21,225
chavarera/Cinfo
refs/heads/master
/lib/windows/common/CommandHandler.py
from subprocess import getoutput class CommandHandler: def __init__(self,command_text=""): self.command_text=command_text def getCmdOutput(self,cmdtext): try: return getoutput(cmdtext) except Exception as ex: return ex
{"/lib/windows/NetworkInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/HardwareInfo.py": ["/lib/windows/common/CommandHandler.py", "/lib/windows/common/RegistryHandler.py"], "/lib/windows/ServiceInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/MiscInfo.py": ["/lib/windows/common/Comm...
21,226
chavarera/Cinfo
refs/heads/master
/lib/windows/FileInfo.py
import os import win32api class FileInfo: ''' class Name: FileInfo Function Names: getDrives() getFileList(path) GetCount() ''' def getDrives(self): ''' getDrives() Function Return a object list containing all drives List Output: List-->All...
{"/lib/windows/NetworkInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/HardwareInfo.py": ["/lib/windows/common/CommandHandler.py", "/lib/windows/common/RegistryHandler.py"], "/lib/windows/ServiceInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/MiscInfo.py": ["/lib/windows/common/Comm...
21,227
chavarera/Cinfo
refs/heads/master
/MainUi.py
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'Cinfo.ui' # # Created by: PyQt5 UI code generator 5.13.0 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets from lib.windows import SystemInfo,NetworkInfo,SoftwareInfo,StorageInfo from lib.w...
{"/lib/windows/NetworkInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/HardwareInfo.py": ["/lib/windows/common/CommandHandler.py", "/lib/windows/common/RegistryHandler.py"], "/lib/windows/ServiceInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/MiscInfo.py": ["/lib/windows/common/Comm...
21,228
chavarera/Cinfo
refs/heads/master
/lib/linux/get_hw_info.py
''' Author : Deepak Chauhan GitHub : https://github.com/royaleagle73 Email : 2018PGCACA63@nitjsr.ac.in ''' import os from tabulate import tabulate class get_hw_info: ''' get_hw_info HAVE A SINGLE METHOD AND A CONSTRUCTOR FUNCTION WHICH ARE NAMED AS : 1) __init__ 2) work() __init__ DOCFILE: __init__ CON...
{"/lib/windows/NetworkInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/HardwareInfo.py": ["/lib/windows/common/CommandHandler.py", "/lib/windows/common/RegistryHandler.py"], "/lib/windows/ServiceInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/MiscInfo.py": ["/lib/windows/common/Comm...
21,229
chavarera/Cinfo
refs/heads/master
/lib/windows/DeviceInfo.py
from lib.windows.common.CommandHandler import CommandHandler from lib.windows.common import Utility as utl class DeviceInfo: def __init__(self): self.cmd=CommandHandler() def Preprocess(self,text): cmd=f'wmic {text} list /format:csv' Command_res=self.cmd.getCmdOutput(cmd) ...
{"/lib/windows/NetworkInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/HardwareInfo.py": ["/lib/windows/common/CommandHandler.py", "/lib/windows/common/RegistryHandler.py"], "/lib/windows/ServiceInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/MiscInfo.py": ["/lib/windows/common/Comm...
21,230
chavarera/Cinfo
refs/heads/master
/lib/linux/get_package_list.py
''' Author : Deepak Chauhan GitHub : https://github.com/royaleagle73 Email : 2018PGCACA63@nitjsr.ac.in ''' import os class get_package_list: ''' get_package_list CLASS COMBINE A SINGLE METHOD AND A CONSTRUCTOR, WHICH ARE AS FOLLOWS: 1) __init__ 2) work() __init__ DOCFILE: __init__ SERVES THE PURPOS...
{"/lib/windows/NetworkInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/HardwareInfo.py": ["/lib/windows/common/CommandHandler.py", "/lib/windows/common/RegistryHandler.py"], "/lib/windows/ServiceInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/MiscInfo.py": ["/lib/windows/common/Comm...
21,231
chavarera/Cinfo
refs/heads/master
/lib/windows/StorageInfo.py
from lib.windows.common.CommandHandler import CommandHandler import math from lib.windows.common import Utility as utl import wmi class StorageInfo: ''' className:StorageInfo Description:this will return the Disk Total Size and partitions details and Ram Details call this method: objectName.ge...
{"/lib/windows/NetworkInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/HardwareInfo.py": ["/lib/windows/common/CommandHandler.py", "/lib/windows/common/RegistryHandler.py"], "/lib/windows/ServiceInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/MiscInfo.py": ["/lib/windows/common/Comm...
21,232
chavarera/Cinfo
refs/heads/master
/lib/linux/list_files.py
''' Author : Deepak Chauhan GitHub : https://github.com/royaleagle73 Email : 2018PGCACA63@nitjsr.ac.in ''' import os import filetype import json from datetime import datetime class list_files: ''' LIST_FILES CLASS CONTAINS THREE FUNCTIONS: 1) __INIT__ 2) WORK() 3) TYPE_COUNT() INIT BLOCK DOCKINFO : INIT B...
{"/lib/windows/NetworkInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/HardwareInfo.py": ["/lib/windows/common/CommandHandler.py", "/lib/windows/common/RegistryHandler.py"], "/lib/windows/ServiceInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/MiscInfo.py": ["/lib/windows/common/Comm...
21,233
chavarera/Cinfo
refs/heads/master
/lib/linux/get_os_info.py
''' Author : Deepak Chauhan GitHub : https://github.com/royaleagle73 Email : 2018PGCACA63@nitjsr.ac.in ''' import os from tabulate import tabulate class get_os_info: ''' CLASS get_base_info PROVIDES ALL DETAILS REGARDING OS, CPU AND USERS IN MACHINE, IT CONTAINS TWO FUNCTIONS I.E. 1) __init__ 2) work() __ini...
{"/lib/windows/NetworkInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/HardwareInfo.py": ["/lib/windows/common/CommandHandler.py", "/lib/windows/common/RegistryHandler.py"], "/lib/windows/ServiceInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/MiscInfo.py": ["/lib/windows/common/Comm...
21,234
chavarera/Cinfo
refs/heads/master
/WindowsInfo.py
from lib.windows import SystemInfo,NetworkInfo,SoftwareInfo,StorageInfo from lib.windows import HardwareInfo,FileInfo,DeviceInfo,MiscInfo,ServiceInfo import os import json import pickle def Display(d, indent=0): return json.dumps(d,sort_keys=True, indent=4) def SavePickle(data): with open('result.pickle','wb')...
{"/lib/windows/NetworkInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/HardwareInfo.py": ["/lib/windows/common/CommandHandler.py", "/lib/windows/common/RegistryHandler.py"], "/lib/windows/ServiceInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/MiscInfo.py": ["/lib/windows/common/Comm...
21,235
chavarera/Cinfo
refs/heads/master
/lib/windows/common/Utility.py
import time import json def CsvTextToDict(text): lines = text.strip().splitlines() keys=lines[0].split(",") items=[] for line in lines[1:]: if len(line)>0: items.append(dict(zip(keys,line.split(",")))) return items def ExportTOJson(data): timestr = time.strftime("%...
{"/lib/windows/NetworkInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/HardwareInfo.py": ["/lib/windows/common/CommandHandler.py", "/lib/windows/common/RegistryHandler.py"], "/lib/windows/ServiceInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/MiscInfo.py": ["/lib/windows/common/Comm...
21,236
chavarera/Cinfo
refs/heads/master
/lib/windows/SoftwareInfo.py
try: import _winreg as reg except: import winreg as reg class SoftwareInfo: ''' className:SoftwareInfo Description:Return the Installed Software name with version and publisher name ''' def getVal(self,name,asubkey): try: return reg.QueryValueEx(asubkey, name)[0] ...
{"/lib/windows/NetworkInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/HardwareInfo.py": ["/lib/windows/common/CommandHandler.py", "/lib/windows/common/RegistryHandler.py"], "/lib/windows/ServiceInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/MiscInfo.py": ["/lib/windows/common/Comm...
21,237
chavarera/Cinfo
refs/heads/master
/lib/windows/SystemInfo.py
from lib.windows.common.CommandHandler import CommandHandler from lib.windows.common.RegistryHandler import RegistryHandler from lib.windows.common import Utility as utl from datetime import datetime import platform class SystemInfo: ''' Class Name:SystemInfo Desciption:this class used to fetch the opera...
{"/lib/windows/NetworkInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/HardwareInfo.py": ["/lib/windows/common/CommandHandler.py", "/lib/windows/common/RegistryHandler.py"], "/lib/windows/ServiceInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/MiscInfo.py": ["/lib/windows/common/Comm...
21,238
chavarera/Cinfo
refs/heads/master
/lib/windows/common/RegistryHandler.py
try: import _winreg as reg except: import winreg as reg class RegistryHandler: def __init__(self,key,path): self.Hkey=self.getRootKey(key) self.path=path self.key = reg.OpenKey(self.Hkey, self.path) def getRootKey(self,key): ROOTS={'HCR':reg.HKEY...
{"/lib/windows/NetworkInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/HardwareInfo.py": ["/lib/windows/common/CommandHandler.py", "/lib/windows/common/RegistryHandler.py"], "/lib/windows/ServiceInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/MiscInfo.py": ["/lib/windows/common/Comm...
21,239
chavarera/Cinfo
refs/heads/master
/linuxUI.py
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'MainUi.ui' # # Created by: PyQt5 UI code generator 5.13.2 # # WARNING! All changes made in this file will be lost! import os import pandas as pd from PyQt5 import QtCore, QtGui, QtWidgets from lib.linux import get_browsers,get_drives,get_hw...
{"/lib/windows/NetworkInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/HardwareInfo.py": ["/lib/windows/common/CommandHandler.py", "/lib/windows/common/RegistryHandler.py"], "/lib/windows/ServiceInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/MiscInfo.py": ["/lib/windows/common/Comm...
21,240
chavarera/Cinfo
refs/heads/master
/lib/linux/get_drives.py
''' Author : Deepak Chauhan GitHub : https://github.com/royaleagle73 Email : 2018PGCACA63@nitjsr.ac.in ''' import os from tabulate import tabulate class get_drives: ''' ********* THIS SCRIPT RETURNS A VARIABLE CONTAINING DISK INFO IN HUMAN READABLE FORMT ********* CLASS get_drives DOCINFO: get_drives HAVE TWO F...
{"/lib/windows/NetworkInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/HardwareInfo.py": ["/lib/windows/common/CommandHandler.py", "/lib/windows/common/RegistryHandler.py"], "/lib/windows/ServiceInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/MiscInfo.py": ["/lib/windows/common/Comm...
21,241
chavarera/Cinfo
refs/heads/master
/LinuxInfo.py
''' Author : Deepak Chauhan GitHub : https://github.com/royaleagle73 Email : 2018PGCACA63@nitjsr.ac.in ''' import os import threading from timeit import default_timer as timer from tabulate import tabulate from lib.linux import get_browsers from lib.linux import get_drives from lib.linux import get_hw_info from lib....
{"/lib/windows/NetworkInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/HardwareInfo.py": ["/lib/windows/common/CommandHandler.py", "/lib/windows/common/RegistryHandler.py"], "/lib/windows/ServiceInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/MiscInfo.py": ["/lib/windows/common/Comm...
21,242
chavarera/Cinfo
refs/heads/master
/lib/linux/get_startup_list.py
''' Author : Deepak Chauhan GitHub : https://github.com/royaleagle73 Email : 2018PGCACA63@nitjsr.ac.in ''' import os class get_startup_list: def __init__(self): ''' __init__ DOCFILE: __init__ BLOCK CONTAINS INITIALISED VARIABLES FOR LATER USE. ''' self.data = "" # TO SAVE FETCHED D...
{"/lib/windows/NetworkInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/HardwareInfo.py": ["/lib/windows/common/CommandHandler.py", "/lib/windows/common/RegistryHandler.py"], "/lib/windows/ServiceInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/MiscInfo.py": ["/lib/windows/common/Comm...
21,243
chavarera/Cinfo
refs/heads/master
/Cinfo.py
import os if __name__=="__main__": #check platform type and Run File(if Windows It will Import from WindowsInfo) if os.name=='nt': import WindowsInfo else: import LinuxInfo
{"/lib/windows/NetworkInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/HardwareInfo.py": ["/lib/windows/common/CommandHandler.py", "/lib/windows/common/RegistryHandler.py"], "/lib/windows/ServiceInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/MiscInfo.py": ["/lib/windows/common/Comm...
21,244
chavarera/Cinfo
refs/heads/master
/lib/linux/get_ports.py
''' Author : Deepak Chauhan GitHub : https://github.com/royaleagle73 Email : 2018PGCACA63@nitjsr.ac.in ''' import os import re class get_ports: ''' ********* THIS SCRIPT RETURNS A LIST OF TUPLE CONTAINING PORTS AND PROTOCOLS OPEN ON USER'S LINUX SYSTEM ********* CLASS get_ports DOCINFO: get_ports HAVE TWO FUNCT...
{"/lib/windows/NetworkInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/HardwareInfo.py": ["/lib/windows/common/CommandHandler.py", "/lib/windows/common/RegistryHandler.py"], "/lib/windows/ServiceInfo.py": ["/lib/windows/common/CommandHandler.py"], "/lib/windows/MiscInfo.py": ["/lib/windows/common/Comm...
21,262
kazi-arafat/custometfeedbackapp
refs/heads/master
/app.py
from flask import Flask,flash,render_template,request from flask_sqlalchemy import SQLAlchemy from send_mail import send_email app = Flask(__name__) ENV = "prod" if (ENV == "dev"): app.debug = True app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://postgres:abc123@localhost/CustomerFeedback' else: app....
{"/app.py": ["/send_mail.py"]}
21,263
kazi-arafat/custometfeedbackapp
refs/heads/master
/send_mail.py
import smtplib from email.mime.text import MIMEText def send_email(customer, dealer, rating, comments): port = 587 userid = "40dc44b7a3fe59" pwd = "b7183feda5fb84" host = "smtp.mailtrap.io" to_email = "arafatkazi2448@gmail.com" from_email = "noReply@example.com" mail_body = f"<h3>Customer...
{"/app.py": ["/send_mail.py"]}
21,277
deekshati/GetADoc-Flask
refs/heads/master
/migrations/versions/cbe32a1e2540_doctor_patients_table.py
"""Doctor & Patients table Revision ID: cbe32a1e2540 Revises: Create Date: 2020-08-24 19:11:23.284040 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'cbe32a1e2540' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands...
{"/getadoc.py": ["/app/models.py"], "/app/routes.py": ["/app/forms.py", "/app/models.py"], "/app/forms.py": ["/app/models.py"]}
21,278
deekshati/GetADoc-Flask
refs/heads/master
/getadoc.py
from app import app, db from app.models import Patient, Doctor, Appointment @app.shell_context_processor def make_shell_context(): return {'db': db, 'Patient': Patient, 'Doctor': Doctor, 'Appointment': Appointment}
{"/getadoc.py": ["/app/models.py"], "/app/routes.py": ["/app/forms.py", "/app/models.py"], "/app/forms.py": ["/app/models.py"]}
21,279
deekshati/GetADoc-Flask
refs/heads/master
/app/models.py
from app import db, login from werkzeug.security import generate_password_hash, check_password_hash from flask_login import UserMixin from datetime import datetime @login.user_loader def load_user(id): if(id[0] == 'P'): return Patient.query.get(id) else: return Doctor.query.get(id) class Pati...
{"/getadoc.py": ["/app/models.py"], "/app/routes.py": ["/app/forms.py", "/app/models.py"], "/app/forms.py": ["/app/models.py"]}
21,280
deekshati/GetADoc-Flask
refs/heads/master
/app/routes.py
from secrets import token_hex from flask import render_template, url_for, redirect, flash, request from app import app, db from flask_login import current_user, login_user, logout_user, login_required from app.forms import LoginForm, DoctorRegister, PatientRegister, AppointmentForm, confirmAppointment, rejectAppointmen...
{"/getadoc.py": ["/app/models.py"], "/app/routes.py": ["/app/forms.py", "/app/models.py"], "/app/forms.py": ["/app/models.py"]}
21,281
deekshati/GetADoc-Flask
refs/heads/master
/app/forms.py
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, SubmitField, SelectField, IntegerField, TextField from wtforms.fields.html5 import DateField, TimeField, DateTimeField from wtforms.validators import ValidationError, DataRequired, Email, Length, Optional from app.models impor...
{"/getadoc.py": ["/app/models.py"], "/app/routes.py": ["/app/forms.py", "/app/models.py"], "/app/forms.py": ["/app/models.py"]}
21,289
elidiocampeiz/ArrowFieldTraversal
refs/heads/master
/GraphTraversal.py
import sys from graph_utils import * # DFS implementation that solves the Arrow Traversal problem def dfs_arrows(graph, start, goal): paths = {} paths[start] = None visited = set() visited.add(start) stack = [] stack.append(start) while len(stack) != 0: node = stack.pop() if...
{"/GraphTraversal.py": ["/graph_utils.py"]}