repo
stringlengths
2
99
file
stringlengths
13
225
code
stringlengths
0
18.3M
file_length
int64
0
18.3M
avg_line_length
float64
0
1.36M
max_line_length
int64
0
4.26M
extension_type
stringclasses
1 value
RBNN
RBNN-master/imagenet/models_imagenet/resnet.py
import torch.nn as nn import math import torch.utils.model_zoo as model_zoo import torch.nn.init as init from modules import * BN = None __all__ = ['resnet18_1w1a', 'resnet34_1w1a'] model_urls = { 'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.pth', 'resnet34': 'https://download.pytorch....
5,965
31.248649
97
py
RBNN
RBNN-master/imagenet/models_imagenet/__init__.py
from .resnet import *
21
21
21
py
RBNN
RBNN-master/imagenet/models_cifar/resnet2.py
'''ResNet in PyTorch. For Pre-activation ResNet, see 'preact_resnet.py'. Reference: [1] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun Deep Residual Learning for Image Recognition. arXiv:1512.03385 ''' import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.init as init from modules ...
4,704
33.343066
107
py
RBNN
RBNN-master/imagenet/models_cifar/resnet.py
''' Properly implemented ResNet-s for CIFAR10 as described in paper [1]. The implementation and structure of this file is hugely influenced by [2] which is implemented for ImageNet and doesn't have option A for identity. Moreover, most of the implementations on the web is copy-paste from torchvision's resnet and has w...
6,508
31.708543
120
py
RBNN
RBNN-master/imagenet/models_cifar/vgg.py
'''VGG for CIFAR10. FC layers are removed. (c) YANG, Wei ''' import torch.nn as nn import torch.utils.model_zoo as model_zoo import math from modules import * __all__ = ['vgg_small_1w1a'] model_urls = { 'vgg11': 'https://download.pytorch.org/models/vgg11-bbd30ac9.pth', 'vgg13': 'https://download.pytorch.org...
7,083
30.766816
113
py
RBNN
RBNN-master/imagenet/models_cifar/__init__.py
from .resnet import * from .resnet_bireal import * from .resnet2 import * from .vgg import *
93
22.5
28
py
RBNN
RBNN-master/imagenet/models_cifar/resnet_bireal.py
''' Properly implemented ResNet-s for CIFAR10 as described in paper [1]. The implementation and structure of this file is hugely influenced by [2] which is implemented for ImageNet and doesn't have option A for identity. Moreover, most of the implementations on the web is copy-paste from torchvision's resnet and has w...
6,557
31.626866
120
py
RBNN
RBNN-master/imagenet/utils/common.py
import os import torch import logging.config import shutil import torch.nn as nn import numpy import datetime def setup_logging(log_file='log.txt',filemode='w'): """Setup logging configuration """ logging.basicConfig(level=logging.DEBUG, format="%(asctime)s - %(levelname)s - %(messa...
2,252
27.884615
93
py
RBNN
RBNN-master/imagenet/utils/options.py
import argparse import os """ args """ parser = argparse.ArgumentParser(description='RotationNet') # Logging parser.add_argument( '--results_dir', metavar='RESULTS_DIR', default='./results', help='results dir') parser.add_argument( '--save', metavar='SAVE', default='', help='saved fol...
3,679
18.067358
60
py
RBNN
RBNN-master/cifar/main.py
import argparse import os import time import logging import random import torch import torch.nn as nn import torch.backends.cudnn as cudnn import models_cifar import models_imagenet import numpy as np from torch.autograd import Variable from utils.options import args from utils.common import * from modules import * fro...
12,926
38.411585
161
py
RBNN
RBNN-master/cifar/modules/binarized_modules.py
import torch import torch.nn as nn import math import numpy as np import torch.nn.functional as F from torch.autograd import Function, Variable from scipy.stats import ortho_group from utils.options import args class BinarizeConv2d(nn.Conv2d): def __init__(self, *kargs, **kwargs): super(BinarizeConv2d, se...
3,835
34.518519
101
py
RBNN
RBNN-master/cifar/modules/__init__.py
from .binarized_modules import *
32
32
32
py
RBNN
RBNN-master/cifar/dataset/dataset.py
from datetime import datetime import os import torch from torch import nn import torch.nn.functional as F from torchvision import transforms, datasets from torch.utils.data import DataLoader def load_data(type='both',dataset='cifar10',data_path='/data',batch_size = 256,batch_size_test=256,num_workers=0): # load da...
3,858
37.59
134
py
RBNN
RBNN-master/cifar/dataset/__init__.py
from .dataset import load_data, add_module_fromdict from .imagenet import get_imagenet_iter_dali as get_imagenet
112
55.5
60
py
RBNN
RBNN-master/cifar/dataset/imagenet.py
import time import torch.utils.data import nvidia.dali.ops as ops import nvidia.dali.types as types import torchvision.datasets as datasets from nvidia.dali.pipeline import Pipeline import torchvision.transforms as transforms from nvidia.dali.plugin.pytorch import DALIClassificationIterator, DALIGenericIterator class...
6,546
51.376
131
py
RBNN
RBNN-master/cifar/models_imagenet/resnet.py
import torch.nn as nn import math import torch.utils.model_zoo as model_zoo import torch.nn.init as init from modules import * BN = None __all__ = ['resnet18_1w1a', 'resnet34_1w1a'] model_urls = { 'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.pth', 'resnet34': 'https://download.pytorch....
5,965
31.248649
97
py
RBNN
RBNN-master/cifar/models_imagenet/__init__.py
from .resnet import *
21
21
21
py
RBNN
RBNN-master/cifar/models_cifar/resnet2.py
'''ResNet in PyTorch. For Pre-activation ResNet, see 'preact_resnet.py'. Reference: [1] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun Deep Residual Learning for Image Recognition. arXiv:1512.03385 ''' import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.init as init from modules ...
4,704
33.343066
107
py
RBNN
RBNN-master/cifar/models_cifar/resnet.py
''' Properly implemented ResNet-s for CIFAR10 as described in paper [1]. The implementation and structure of this file is hugely influenced by [2] which is implemented for ImageNet and doesn't have option A for identity. Moreover, most of the implementations on the web is copy-paste from torchvision's resnet and has w...
6,508
31.708543
120
py
RBNN
RBNN-master/cifar/models_cifar/vgg.py
'''VGG for CIFAR10. FC layers are removed. (c) YANG, Wei ''' import torch.nn as nn import torch.utils.model_zoo as model_zoo import math from modules import * __all__ = ['vgg_small_1w1a'] model_urls = { 'vgg11': 'https://download.pytorch.org/models/vgg11-bbd30ac9.pth', 'vgg13': 'https://download.pytorch.org...
7,083
30.766816
113
py
RBNN
RBNN-master/cifar/models_cifar/__init__.py
from .resnet import * from .resnet_bireal import * from .resnet2 import * from .vgg import *
93
22.5
28
py
RBNN
RBNN-master/cifar/models_cifar/resnet_bireal.py
''' Properly implemented ResNet-s for CIFAR10 as described in paper [1]. The implementation and structure of this file is hugely influenced by [2] which is implemented for ImageNet and doesn't have option A for identity. Moreover, most of the implementations on the web is copy-paste from torchvision's resnet and has w...
6,557
31.626866
120
py
RBNN
RBNN-master/cifar/utils/common.py
import os import torch import logging.config import shutil import torch.nn as nn import numpy import datetime def setup_logging(log_file='log.txt',filemode='w'): """Setup logging configuration """ logging.basicConfig(level=logging.DEBUG, format="%(asctime)s - %(levelname)s - %(messa...
2,252
27.884615
93
py
RBNN
RBNN-master/cifar/utils/options.py
import argparse import os """ args """ parser = argparse.ArgumentParser(description='RotationNet') # Logging parser.add_argument( '--results_dir', metavar='RESULTS_DIR', default='./results', help='results dir') parser.add_argument( '--save', metavar='SAVE', default='', help='saved fol...
3,554
18.010695
60
py
DeepLabV3FineTuning
DeepLabV3FineTuning-master/sources/dataloader.py
# from __future__ import print_function # from __future__ import division import torch import numpy as np from torchvision import transforms import os import glob from PIL import Image class DataLoaderSegmentation(torch.utils.data.dataset.Dataset): def __init__(self, folder_path, mode): super(DataLoaderSeg...
2,806
38.535211
97
py
DeepLabV3FineTuning
DeepLabV3FineTuning-master/sources/main_training.py
import torch import torch.nn as nn import torch.optim as optim import torchvision import os import argparse import pathlib # Local import from dataloader import DataLoaderSegmentation from custom_model import initialize_model from train import train_model print("PyTorch Version: ",torch.__version__) print("Torchvisio...
4,292
39.5
205
py
DeepLabV3FineTuning
DeepLabV3FineTuning-master/sources/custom_model.py
import torchvision from torchvision import models import torch class DeepLabV3Wrapper(torch.nn.Module): def __init__(self, model): super(DeepLabV3Wrapper, self).__init__() self.model = model def forward(self, input): output = self.model(input)['out'] return output def initiali...
960
33.321429
124
py
DeepLabV3FineTuning
DeepLabV3FineTuning-master/sources/main_inference.py
import torch import numpy as np from torchvision import transforms import cv2 from PIL import Image import custom_model # Number of classes in the dataset num_classes = 5 device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") model, input_size = custom_model.initialize_model(num_classes, keep_featu...
1,775
27.190476
114
py
DeepLabV3FineTuning
DeepLabV3FineTuning-master/sources/main_export.py
import torch import custom_model # Number of classes in the dataset num_classes = 2 device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") model_deeplabv3, input_size = custom_model.initialize_model(num_classes, keep_feature_extract=True, use_pretrained=False) state_dict = torch.load("training_out...
824
34.869565
121
py
DeepLabV3FineTuning
DeepLabV3FineTuning-master/sources/train.py
import os import torch import numpy as np import time import copy import cv2 def debug_export_before_forward(inputs, labels, idx): # im = inputs[0]*255; im = inputs[0]; im = im.to('cpu').numpy() im[0, :, :] = im[0, :, :] * 0.229 + 0.485 im[1, :, :] = im[1, :, :] * 0.224 + 0.456 im[2, :, :] = im...
4,494
33.05303
112
py
DeepLabV3FineTuning
DeepLabV3FineTuning-master/sample_dataset/convert_cvat_xml_to_label_image.py
import argparse import numpy as np import os import cv2 import xml.etree.ElementTree as ET from collections import defaultdict from pathlib import Path import shutil def create_path_list(xml_directory): # Read xml labels, which should be on the format %06d.xml xml_path_list = [] for r, d, f in os.walk(xml...
3,359
32.939394
159
py
platpal
platpal-master/delete.py
#!/usr/bin/env python import re import sys import os from os.path import abspath, dirname, exists, join from subprocess import call # path OPT_WKS = abspath(dirname(__file__)) OPT_CMD = join(OPT_WKS, "batch.py") OPT_DIR = join(OPT_WKS, "vmware", "vtdoc", "analyze", "sve...
1,718
25.859375
80
py
platpal
platpal-master/batch.py
#!/usr/bin/env python import os import sys import json from os.path import abspath, basename, dirname, exists, join from subprocess import call from collections import OrderedDict # path OPT_WKS = abspath(dirname(__file__)) OPT_CMD = join(OPT_WKS, "workflow.py") # main if __name__ == ...
949
24
67
py
platpal
platpal-master/workflow.py
#!/usr/bin/env python import sys from os.path import abspath, exists, join from subprocess import check_call from argparse import ArgumentParser # paths OPT_PATH_CUR = abspath(join(__file__, "..")) OPT_PATH_RAW = join(OPT_PATH_CUR, "vmware", "trace") # cmds OPT_CMD_VMBOX = join(OPT_PATH_CUR, "vmw...
3,127
27.962963
68
py
platpal
platpal-master/vendor.py
#!/usr/bin/env python import re import sys from os.path import abspath, dirname, exists, join from subprocess import call # path OPT_WKS = abspath(dirname(__file__)) OPT_CMD = join(OPT_WKS, "batch.py") OPT_DIR = join(OPT_WKS, "vmware", "vtdoc", "analyze", "svendor") RE...
1,189
24.319149
80
py
platpal
platpal-master/result/exploits/cve-to-hash.py
#!/usr/bin/env python import sys from os.path import exists, join from datetime import datetime OPT_CVE_DIR = "/Users/meng/workbench/mpcc/vmware/vtdoc/analyze/exploit" if __name__ == "__main__": pn = sys.argv[1] hashes = [] with open(pn, "r") as f: for l in f: l = l.strip() ...
488
21.227273
71
py
platpal
platpal-master/result/svendors/vendor-to-hash.py
#!/usr/bin/env python import re import sys from os.path import abspath, dirname, exists, join from subprocess import call # path OPT_DIR = "/Users/meng/workbench/mpcc/vmware/vtdoc/analyze/svendor" RE_PTN = re.compile("^(\d+),\"(.*)\",\d+$") # main if __name__ == "__main__": pn = sys.argv[1] hashes = set() ...
1,267
23.862745
67
py
platpal
platpal-master/analyze/plugin.py
#!/usr/bin/env python import re import sys from os.path import exists, join from collections import OrderedDict import conf # consts OPT_SUFFIX = "log" # regex patterns RE_LINE_PTN = re.compile("^\[(.*? .*?).*?\] (\d+/\d+) (\w+) (.*)$") RE_SEC_PTN = re.compile("^([\w-]+):(\w+)$") RE_CBK_PTN ...
12,657
28.165899
77
py
platpal
platpal-master/analyze/script.py
#!/usr/bin/env python import os import re import sys from os.path import exists, join, getsize import conf # consts OPT_SUFFIX = "log" # regex patterns RE_LINE_PTN = re.compile("^\[(.*? .*?).*?\] (\d+/\d+) (\w+) (.*)$") RE_CONS_PTN = re.compile("^\[(\d+)-(\d+)\]\[(\d+)\](.*)$") # utils def path_raw...
2,475
22.140187
75
py
platpal
platpal-master/analyze/collect.py
#!/usr/bin/env python import sys import strace def process(plat, prod, hashes, detail = True): fops = set() nets = set() exes = set() abnormal = dict() # find suitable parser if plat == "mac": fn = strace.parse_mac elif plat == "win": fn = strace.parse_win # parse a...
1,798
20.674699
79
py
platpal
platpal-master/analyze/compare.py
#!/usr/bin/env python import sys import plugin def process(prod, hashes): for h in hashes: try: result = plugin.compare_plats(prod, h) except: result = None if result is not None: print "=== %s ===" % h print result if __name__ == "__main...
555
18.172414
60
py
platpal
platpal-master/analyze/conf.py
#!/usr/bin/env python from os.path import abspath, exists, join # paths OPT_PATH_CUR = abspath(join(__file__, "..")) OPT_PATH_RAW = abspath(join(OPT_PATH_CUR, "..", "vmware", "trace")) OPT_PATH_MID = abspath(join(OPT_PATH_CUR, "data", "mid")) OPT_PATH_END = abspath(join(OPT_PATH_CUR, "data...
766
28.5
74
py
platpal
platpal-master/analyze/strace.py
#!/usr/bin/env python import re import json from os.path import exists, join from argparse import ArgumentParser from collections import OrderedDict import conf # consts OPT_SUFFIX = "out" OPT_HOME_MAC = "/Users/bft/" OPT_HOME_WIN = "C:\\Users\\bft\\" # utils def path_raw(plat, tag, sample): px = conf.prefix(p...
9,801
22.505995
83
py
platpal
platpal-master/acrobat/driver/gen/template.py
#!/usr/bin/env python import re from os.path import abspath, dirname, exists, join from enum import Enum from collections import OrderedDict # paths OPT_DIR_ROOT = abspath(dirname(dirname(__file__))) OPT_DIR_HOOK = join(OPT_DIR_ROOT, "gen", "hook") OPT_FILE_LOGIC = join(OPT_DIR_ROOT, ...
3,742
23.625
80
py
platpal
platpal-master/acrobat/driver/gen/gen.py
#!/usr/bin/env python from template import * if __name__ == "__main__": group = [] with open(OPT_LIST_HOOK, "r") as f: for line in f: line = line.strip() hook = parse_hook(line) group.append(hook) commentize(group, "logic", OPT_FILE_LOGIC) commentize(group...
353
21.125
52
py
platpal
platpal-master/acrobat/driver/gen/parse.py
#!/usr/bin/env python import re import os import sys OPT_PTN_POKE = re.compile( "^POKE\s*\(\s*(\w+?)\s*,\s*\(.+?\),\s*\((.+?)\),\s*\(.+?\)\s*\)$" ) OPT_BLACKLIST = [ "PDDocPermsReady", "PDEContainerXAPMetadataDidChange", "PDPageGetPrintMatrix", "AVDocWillRefreshUI" ...
1,837
24.178082
73
py
platpal
platpal-master/acrobat/driver/build/win.py
#!/usr/bin/env python import os from os.path import basename, join from shutil import copy, copytree from conf import * # const PROJ_EXTN = "api" PROJ_FULL = "%s.%s" % (PROJ_NAME, PROJ_EXTN) PROJ_ARCH = "x86" # paths FILE_SYMS = join(PATH_INF, "Symbols.exp") PATH_DLIB = join(PATH_OBJ, "%s.lib" % PROJ_NAME) PATH_EX...
3,375
21.965986
86
py
platpal
platpal-master/acrobat/driver/build/run.py
#!/usr/bin/env python import sys from os import remove from os.path import exists, isfile, join from shutil import copy, copytree, rmtree from conf import * # set platform if HOST == "mac": from mac import * elif HOST == "win": from win import * else: exit("Unknown host: %s" % HOST) # paths FROM = PATH_...
2,041
19.42
70
py
platpal
platpal-master/acrobat/driver/build/conf.py
#!/usr/bin/env python from os import makedirs from os.path import abspath, exists, join from platform import system from shutil import rmtree from subprocess import check_output, CalledProcessError from sys import exit # host HOST = system() if HOST == "Darwin": HOST = "mac" SHARED = "/Users/meng/Shared/build...
2,268
22.153061
55
py
platpal
platpal-master/acrobat/driver/build/mac.py
#!/usr/bin/env python from os.path import basename, join from shutil import copy, copytree from conf import * # const PROJ_EXTN = "acroplugin" PROJ_FULL = "%s.%s" % (PROJ_NAME, PROJ_EXTN) PROJ_ARCH = raw_input("arch: ") # paths FILE_PINF = join(PATH_INF, "Info.plist") FILE_SYMS = join(PATH_INF, "Symbols.exp") FILE...
2,458
21.354545
79
py
platpal
platpal-master/vmware/scan-product.py
#!/usr/bin/env python import os import sys import json from os.path import abspath, basename, dirname, exists, join from subprocess import call from collections import OrderedDict # path OPT_WKS = abspath(dirname(__file__)) OPT_DIR_VTDOC = join(OPT_WKS, "vtdoc", "analyze") # enums OPT_ENUM...
812
22.228571
60
py
platpal
platpal-master/vmware/box.py
#!/usr/bin/env python import os import sys import json import signal import requests from os.path import abspath, basename, dirname, exists, expanduser, getsize, join from shutil import copy from time import sleep from enum import Enum from hashlib import sha256 from subprocess import call, check_output, Popen, STDOUT...
13,853
29.855234
97
py
platpal
platpal-master/vmware/scan-exploit.py
#!/usr/bin/env python import os import sys from os.path import abspath, basename, dirname, exists, join from glob import glob from subprocess import call # path OPT_WKS = abspath(dirname(__file__)) OPT_DIR_VTDOC = join(OPT_WKS, "vtdoc", "analyze") # enums OPT_ENUM_PLAT = ["mac", ...
1,346
21.830508
60
py
platpal
platpal-master/vmware/scan-srecent.py
#!/usr/bin/env python import os import sys import json from os.path import abspath, basename, dirname, exists, join from subprocess import call from collections import OrderedDict # path OPT_WKS = abspath(dirname(__file__)) OPT_DIR_VTDOC = join(OPT_WKS, "vtdoc", "analyze") # enums OPT_ENUM...
954
22.292683
60
py
platpal
platpal-master/vmware/batch.py
#!/usr/bin/env python import os import sys import json from os.path import abspath, basename, dirname, exists, join from subprocess import call from collections import OrderedDict # path OPT_WKS = abspath(dirname(__file__)) OPT_CMD_BOX = join(OPT_WKS, "box.py") # main if __name__ == "__ma...
827
22
78
py
MAIAN
MAIAN-master/tool/parse_code.py
from instruction_list import * def print_code(code,ops): for o in ops: print('%6x : %4d : %2s : %12s : %s' % (o['id'],o['id'], o['op'],o['o'] , o['input']) ) print('Total byte/code size: %d %d' % (len(code)/2,len(ops)) ) def get_one_op( code, pos, size_of_input, debug=False ): if pos + 2 + size_o...
1,674
24.769231
122
py
MAIAN
MAIAN-master/tool/instruction_list.py
cops = { "0x00":"STOP", "0x01":"ADD", "0x02":"MUL", "0x03":"SUB", "0x04":"DIV", "0x05":"SDIV", "0x06":"MOD", "0x07":"SMOD", "0x08":"ADDMOD", "0x09":"MULMOD", "0x0a":"EXP", "0x0b":"SIGNEXTEND", "0x10":"LT", "0x11":"GT", "0x12":"SLT", "0x13":"SGT", "0x14...
7,192
23.056856
35
py
MAIAN
MAIAN-master/tool/gui-maian.py
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'form.ui' # # Created by: PyQt5 UI code generator 5.6 # # WARNING! All changes made in this file will be lost! try: import PyQt5 except: print("\033[91m[-] Python module PyQt5 is missing.\033[0m Please install it (on Ubuntu: sudo apt...
22,794
39.416667
218
py
MAIAN
MAIAN-master/tool/check_suicide.py
from __future__ import print_function from parse_code import * from values import get_params, set_params, initialize_params, print_params, MyGlobals, clear_globals from execute_block import * from blockchain import * def ether_suicide( op, stack, trace, debug ): # Once SUICIDE is executed, the contract is kill...
4,410
31.91791
180
py
MAIAN
MAIAN-master/tool/maian.py
''' Copyright (c) 2018, Ivica Nikolic <cube444@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, ...
7,987
42.650273
189
py
MAIAN
MAIAN-master/tool/check_leak.py
from __future__ import print_function from parse_code import * from values import get_params, set_params, initialize_params, print_params, MyGlobals, clear_globals from execute_block import * from blockchain import * def ether_leak( op, stack, trace, debug ): global s # CALL leaks if op == 'CALL'...
5,936
34.130178
171
py
MAIAN
MAIAN-master/tool/blockchain.py
from __future__ import print_function from web3 import Web3, KeepAliveRPCProvider, IPCProvider import subprocess, signal import time import sys import os from values import MyGlobals def start_private_chain(chain,etherbase,debug=False): devnull = open(os.devnull, 'w') if chain!= 'remptychain': ...
4,235
34.3
306
py
MAIAN
MAIAN-master/tool/misc.py
from __future__ import print_function from values import MyGlobals from hashlib import * from z3 import * def print_stack(stack): print('\033[90m------------------------------------- STACK -------------------------------------') for s in stack[::-1]: if 'z3' in s: if is_bv_value( simplify(...
5,817
32.245714
127
py
MAIAN
MAIAN-master/tool/check_lock.py
from __future__ import print_function from parse_code import * from values import get_params, set_params, initialize_params, print_params, MyGlobals, clear_globals from execute_block import * def ether_lock_can_recieve( op, stack, trace, debug ): # Once STOP/RETURN is executed, the search can be stoppped ...
4,701
30.77027
185
py
MAIAN
MAIAN-master/tool/execute_block.py
from __future__ import print_function import os import sys import re from execute_instruction import * from values import get_params, initialize_params, print_params from values import MyGlobals, clear_globals from misc import * def execute_one_block( ops , stack , pos , trace, storage, mmemory, data, configurations...
14,211
37.514905
212
py
MAIAN
MAIAN-master/tool/execute_instruction.py
from __future__ import print_function import copy from math import * from instruction_list import * from parse_code import * from values import get_params,set_params,print_params,is_params from values import create_configuration,add_configuration,configuration_exist,seen_configuration,print_configuration from values im...
20,718
34.846021
215
py
MAIAN
MAIAN-master/tool/contracts.py
from __future__ import print_function from web3 import Web3, KeepAliveRPCProvider, IPCProvider import os.path import json import sched, time import sys import glob import sys import json import rlp from rlp.utils import decode_hex, encode_hex, ascii_chr, str_to_bytes from subprocess import Popen, PIPE, STDOUT from valu...
5,386
30.688235
155
py
MAIAN
MAIAN-master/tool/values.py
from web3 import Web3, KeepAliveRPCProvider, IPCProvider import copy from z3 import * # Get value def get_params(param, input): if (param+str(input)) in MyGlobals.st: return MyGlobals.st[param+str(input)] else: print('need to set the parameters: %s ' % (param+str(input) ) ) exit(4) ...
4,399
23.719101
100
py
tvm
tvm-main/conftest.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
4,701
42.137615
137
py
tvm
tvm-main/version.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
7,491
31.154506
99
py
tvm
tvm-main/apps/extension/python/tvm_ext/__init__.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
2,542
30.7875
93
py
tvm
tvm-main/apps/extension/tests/test_ext.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
3,361
26.557377
89
py
tvm
tvm-main/apps/lldb/tvm.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
5,972
30.436842
99
py
tvm
tvm-main/apps/dso_plugin_module/test_plugin_module.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
1,868
36.38
85
py
tvm
tvm-main/apps/microtvm/ethosu/convert_labels.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
1,843
35.156863
100
py
tvm
tvm-main/apps/microtvm/ethosu/convert_image.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
2,666
34.092105
101
py
tvm
tvm-main/apps/microtvm/arduino/template_project/microtvm_api_server.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
26,611
37.568116
111
py
tvm
tvm-main/apps/microtvm/cmsisnn/convert_image.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
2,892
33.855422
101
py
tvm
tvm-main/apps/microtvm/reference-vm/base-box-tool.py
#!/usr/bin/env python3 # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "L...
21,466
33.020602
102
py
tvm
tvm-main/apps/microtvm/zephyr_cmsisnn/model/convert_labels.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
1,874
31.327586
95
py
tvm
tvm-main/apps/microtvm/zephyr_cmsisnn/model/convert_input.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
2,266
32.338235
94
py
tvm
tvm-main/apps/microtvm/zephyr/template_project/microtvm_api_server.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
45,534
34.741758
138
py
tvm
tvm-main/apps/bundle_deploy/build_model.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
6,491
37.642857
101
py
tvm
tvm-main/apps/ios_rpc/init_proj.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
1,845
29.766667
71
py
tvm
tvm-main/apps/ios_rpc/tests/ios_rpc_test.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
4,352
36.205128
97
py
tvm
tvm-main/apps/ios_rpc/tests/ios_rpc_mobilenet.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
6,368
33.241935
97
py
tvm
tvm-main/apps/wasm-standalone/wasm-graph/tools/build_graph_lib.py
#!/usr/bin/env python3 # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "L...
3,979
34.221239
89
py
tvm
tvm-main/apps/tf_tvmdsoop/tests/test_tfop_module.py
#!/usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "L...
4,230
35.791304
96
py
tvm
tvm-main/apps/cpp_clml/scripts/clml_codegen.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache Licen...
2,074
30.923077
81
py
tvm
tvm-main/apps/sgx/read_results.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
1,022
32
81
py
tvm
tvm-main/apps/sgx/src/build_model.py
#!/usr/bin/python3 # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "Lice...
1,950
30.467742
87
py
tvm
tvm-main/apps/cpp_rtvm/scripts/download_models.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache Licen...
1,339
35.216216
99
py
tvm
tvm-main/apps/android_camera/models/prepare_model.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
5,118
35.564286
100
py
tvm
tvm-main/apps/topi_recipe/reduce/test_reduce_map.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
3,179
32.829787
100
py
tvm
tvm-main/apps/topi_recipe/broadcast/test_broadcast_map.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
4,594
33.037037
80
py
tvm
tvm-main/apps/topi_recipe/rnn/lstm.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
7,707
36.417476
97
py
tvm
tvm-main/apps/topi_recipe/rnn/matexp.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
6,054
32.638889
95
py
tvm
tvm-main/apps/topi_recipe/conv/test_conv_int8_arm.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
7,792
33.790179
99
py
tvm
tvm-main/apps/topi_recipe/conv/depthwise_conv2d_test.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
11,648
42.466418
100
py
tvm
tvm-main/apps/topi_recipe/conv/test_conv2d_hwcn_map.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
3,341
32.089109
99
py