index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
38,474 | MayfeelYang/angr | refs/heads/master | /angr/surveyor.py | #!/usr/bin/env python
import multiprocessing
#import concurrent.futures
import logging
import weakref
import functools
l = logging.getLogger("angr.surveyor")
#
# Surveyor debugging
#
STOP_RUNS = False
PAUSE_RUNS = False
def enable_singlestep():
global PAUSE_RUNS
PAUSE_RUNS = True
def disable_singlestep():... | {"/angr/surveyors/caller.py": ["/angr/surveyors/explorer.py", "/angr/errors.py", "/angr/surveyors/__init__.py"], "/tests/test_argv.py": ["/angr/__init__.py"], "/angr/path.py": ["/angr/errors.py", "/angr/path_history.py"], "/angr/simos.py": ["/angr/errors.py", "/angr/tablespecs.py"], "/tests/test_block_cache.py": ["/ang... |
38,475 | MayfeelYang/angr | refs/heads/master | /angr/surveyors/explorer.py | #!/usr/bin/env python
from ..surveyor import Surveyor
import simuvex
import collections
import networkx
import logging
l = logging.getLogger("angr.surveyors.explorer")
class Explorer(Surveyor):
"""
Explorer implements a symbolic exploration engine!
WARNING: Explorers are not really maintained - Use path... | {"/angr/surveyors/caller.py": ["/angr/surveyors/explorer.py", "/angr/errors.py", "/angr/surveyors/__init__.py"], "/tests/test_argv.py": ["/angr/__init__.py"], "/angr/path.py": ["/angr/errors.py", "/angr/path_history.py"], "/angr/simos.py": ["/angr/errors.py", "/angr/tablespecs.py"], "/tests/test_block_cache.py": ["/ang... |
38,476 | MayfeelYang/angr | refs/heads/master | /tests/test_function_manager.py | import nose
import angr
from archinfo import ArchAMD64
import logging
l = logging.getLogger("angr.tests")
import os
test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../binaries/tests'))
def test_amd64():
logging.getLogger('angr.analyses.cfg').setLevel(logging.DEBUG)
fauxware... | {"/angr/surveyors/caller.py": ["/angr/surveyors/explorer.py", "/angr/errors.py", "/angr/surveyors/__init__.py"], "/tests/test_argv.py": ["/angr/__init__.py"], "/angr/path.py": ["/angr/errors.py", "/angr/path_history.py"], "/angr/simos.py": ["/angr/errors.py", "/angr/tablespecs.py"], "/tests/test_block_cache.py": ["/ang... |
38,477 | MayfeelYang/angr | refs/heads/master | /angr/analysis.py | import sys
import contextlib
from collections import defaultdict
import logging
l = logging.getLogger('angr.analysis')
import progressbar
from .errors import AngrAnalysisError
registered_analyses = {}
def register_analysis(analysis, name):
registered_analyses[name] = analysis
class AnalysisLogEntry(object):
... | {"/angr/surveyors/caller.py": ["/angr/surveyors/explorer.py", "/angr/errors.py", "/angr/surveyors/__init__.py"], "/tests/test_argv.py": ["/angr/__init__.py"], "/angr/path.py": ["/angr/errors.py", "/angr/path_history.py"], "/angr/simos.py": ["/angr/errors.py", "/angr/tablespecs.py"], "/tests/test_block_cache.py": ["/ang... |
38,478 | MayfeelYang/angr | refs/heads/master | /angr/factory.py | from simuvex import SimIRSB, SimProcedures, SimUnicorn, SimState, BP_BEFORE, BP_AFTER, SimUnicornError
from simuvex import s_options as o, s_cc
from simuvex.s_errors import SimSegfaultError, SimReliftException
from .surveyors.caller import Callable
import logging
l = logging.getLogger('angr.factory')
class AngrObject... | {"/angr/surveyors/caller.py": ["/angr/surveyors/explorer.py", "/angr/errors.py", "/angr/surveyors/__init__.py"], "/tests/test_argv.py": ["/angr/__init__.py"], "/angr/path.py": ["/angr/errors.py", "/angr/path_history.py"], "/angr/simos.py": ["/angr/errors.py", "/angr/tablespecs.py"], "/tests/test_block_cache.py": ["/ang... |
38,479 | MayfeelYang/angr | refs/heads/master | /tests/test_strtol.py | import nose
import angr
import simuvex
import subprocess
import logging
l = logging.getLogger('angr.tests.strtol')
import os
test_location = str(os.path.dirname(os.path.realpath(__file__)))
def run_strtol(threads):
test_bin = os.path.join(test_location, "../../binaries/tests/x86_64/strtol_test")
b = angr.Pr... | {"/angr/surveyors/caller.py": ["/angr/surveyors/explorer.py", "/angr/errors.py", "/angr/surveyors/__init__.py"], "/tests/test_argv.py": ["/angr/__init__.py"], "/angr/path.py": ["/angr/errors.py", "/angr/path_history.py"], "/angr/simos.py": ["/angr/errors.py", "/angr/tablespecs.py"], "/tests/test_block_cache.py": ["/ang... |
38,480 | MayfeelYang/angr | refs/heads/master | /angr/exploration_techniques/explorer.py | from . import ExplorationTechnique
class Explorer(ExplorationTechnique):
"""
Search for up to "num_find" paths that satisfy condition "find", avoiding condition "avoid". Stashes found paths into "find_stash' and avoided paths into "avoid_stash".
The "find" and "avoid" parameters may be any of:
- An a... | {"/angr/surveyors/caller.py": ["/angr/surveyors/explorer.py", "/angr/errors.py", "/angr/surveyors/__init__.py"], "/tests/test_argv.py": ["/angr/__init__.py"], "/angr/path.py": ["/angr/errors.py", "/angr/path_history.py"], "/angr/simos.py": ["/angr/errors.py", "/angr/tablespecs.py"], "/tests/test_block_cache.py": ["/ang... |
38,481 | MayfeelYang/angr | refs/heads/master | /tests/test_veritesting.py | import sys
import nose
import angr
import logging
l = logging.getLogger('angr_tests.veritesting')
import os
location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../binaries/tests'))
addresses_veritesting_a = {
'x86_64': 0x400674
}
addresses_veritesting_b = {
'x86_64': 0x4006af
}
de... | {"/angr/surveyors/caller.py": ["/angr/surveyors/explorer.py", "/angr/errors.py", "/angr/surveyors/__init__.py"], "/tests/test_argv.py": ["/angr/__init__.py"], "/angr/path.py": ["/angr/errors.py", "/angr/path_history.py"], "/angr/simos.py": ["/angr/errors.py", "/angr/tablespecs.py"], "/tests/test_block_cache.py": ["/ang... |
38,520 | d4rkspir1t/groupdetection-dgmg | refs/heads/main | /json_to_csv.py | import json
import csv
header = ['fr_no', 'x', 'y', 'w', 'h', 'cx', 'cy', 'cen_dep', 'dep_avg', 'orient', 'group']
f = open('yolo_db_orientation_20210810_cd_1.json')
data = json.load(f)
f.close()
print(data)
with open('yolo_db_orientation_20210810_cd_1.csv', 'w') as f:
csv_file = csv.writer(f, delimiter=';')
... | {"/growl_tests_code.py": ["/growl_utils/utils.py"]} |
38,521 | d4rkspir1t/groupdetection-dgmg | refs/heads/main | /build_graph_rica.py | import pandas as pd
import os
import csv
import copy
from pprint import pprint
import math
import dgl
import numpy as np
import networkx as nx
import matplotlib.pyplot as plt
import torch
import torch.nn as nn
import torch.nn.functional as F
import scipy.sparse as sp
from dgl.nn import SAGEConv
import itertools
from sk... | {"/growl_tests_code.py": ["/growl_utils/utils.py"]} |
38,522 | d4rkspir1t/groupdetection-dgmg | refs/heads/main | /growl_utils/utils.py | import os
import csv
from sklearn.metrics import roc_auc_score
import torch
import torch.nn as nn
import torch.nn.functional as F
from dgl.nn import SAGEConv
person_log = 'geometryGT/'
fformation_log = 'fformationGT.csv'
class GraphSAGE(nn.Module):
def __init__(self, in_feats, h_feats):
super(GraphSAGE,... | {"/growl_tests_code.py": ["/growl_utils/utils.py"]} |
38,523 | d4rkspir1t/groupdetection-dgmg | refs/heads/main | /build_graph.py | import pandas as pd
import os
import csv
import copy
from pprint import pprint
import math
import dgl
import numpy as np
import networkx as nx
import matplotlib.pyplot as plt
import torch
import torch.nn as nn
import torch.nn.functional as F
import scipy.sparse as sp
from dgl.nn import SAGEConv
import itertools
from sk... | {"/growl_tests_code.py": ["/growl_utils/utils.py"]} |
38,524 | d4rkspir1t/groupdetection-dgmg | refs/heads/main | /growl_tests_code.py | import pandas as pd
import os
import csv
import copy
from pprint import pprint
import math
import dgl
import numpy as np
import networkx as nx
import matplotlib.pyplot as plt
import torch
import torch.nn as nn
import torch.nn.functional as F
import scipy.sparse as sp
from dgl.nn import SAGEConv
import itertools
from sk... | {"/growl_tests_code.py": ["/growl_utils/utils.py"]} |
38,525 | d4rkspir1t/groupdetection-dgmg | refs/heads/main | /extract_orientation.py | import csv
import json
import math
import numpy as np
import os
import matplotlib.pyplot as plt
from PIL import Image
import cv2
from pprint import pprint
from deep_orientation import beyer # noqa # pylint: disable=unused-import
from deep_orientation import mobilenet_v2 # noqa # pylint: disable=unused-import
fro... | {"/growl_tests_code.py": ["/growl_utils/utils.py"]} |
38,526 | d4rkspir1t/groupdetection-dgmg | refs/heads/main | /retest_growl.py | from subprocess import Popen
import sys
import time
filename = 'growl_tests_code.py'
iter = 0
while True:
print("\nStarting " + filename)
p = Popen("python " + filename, shell=True)
p.wait()
iter += 1
time.sleep(60)
print('DONE ', iter, ' STEPS')
if iter == 30:
break | {"/growl_tests_code.py": ["/growl_utils/utils.py"]} |
38,539 | vongola12324/HWReviewers | refs/heads/master | /main.py | import importlib.util
import os
import codecs
from subprocess import *
from pathlib import Path
from stu import *
from chardet.universaldetector import UniversalDetector
from datetime import datetime
# Homework config
# TODO: Use a json to save config
availableExt = ('.c',)
compiler = {
'.c': 'gcc-6',
'.cpp': ... | {"/main.py": ["/stu.py"]} |
38,540 | vongola12324/HWReviewers | refs/heads/master | /stu.py | from enum import Enum
class Student:
def __init__(self, filename=None):
self.filename = filename
temp = filename.split('_')
self.name = temp[0]
self.nid = temp[-1]
self.status = Status.waiting
class Status(Enum):
# Error:
can_not_compile = -1
can_not_run = -2
... | {"/main.py": ["/stu.py"]} |
38,563 | zw-team/UNet-Crowd | refs/heads/master | /eval/eval_whole.py | import random
import math
import numpy as np
import sys
from PIL import Image
import time
import torch
from utils import show
import scipy.io as scio
def eval_model(config, eval_loader, modules, if_show_sample=False):
net = modules['model'].eval()
ae_batch = modules['ae']
se_batch = modules['se']
groun... | {"/net/Encoder.py": ["/net/MagnifyCell.py"], "/net/MNet.py": ["/net/MagnifyCell.py", "/net/Decoder.py", "/net/Encoder.py"], "/net/Decoder.py": ["/net/MagnifyCell.py"]} |
38,564 | zw-team/UNet-Crowd | refs/heads/master | /net/Encoder.py | import torch
import torch.nn as nn
from net.MagnifyCell import BasicMagnifyCell
from net.BasicConv2d import BasicConv2d
class Encoder(nn.Module):
def __init__(self, pretrain=True, IF_CELL=True, IF_BN=True, **kwargs):
super(Encoder, self).__init__()
self.B1_C2 = nn.Sequential(
BasicMagni... | {"/net/Encoder.py": ["/net/MagnifyCell.py"], "/net/MNet.py": ["/net/MagnifyCell.py", "/net/Decoder.py", "/net/Encoder.py"], "/net/Decoder.py": ["/net/MagnifyCell.py"]} |
38,565 | zw-team/UNet-Crowd | refs/heads/master | /op_wrapper/HybridMSE.py | import torch
import torch.nn as nn
import torch.nn.functional as functional
from torch.autograd import Function
from torch.nn import Module
class HybridMSEFunction(Function):
@staticmethod
def forward(ctx, *args):
if len(args) != 3:
print("wrong input parameters number, check the input")
... | {"/net/Encoder.py": ["/net/MagnifyCell.py"], "/net/MNet.py": ["/net/MagnifyCell.py", "/net/Decoder.py", "/net/Encoder.py"], "/net/Decoder.py": ["/net/MagnifyCell.py"]} |
38,566 | zw-team/UNet-Crowd | refs/heads/master | /eval/eval_by_cropping.py | import random
import math
import numpy as np
import sys
from PIL import Image
from utils import *
import time
import torch
import scipy.io as scio
def eval_model(config, eval_loader, modules, if_show_sample=False):
net = modules['model'].eval()
ae_batch = modules['ae']
se_batch = modules['se']
atten = ... | {"/net/Encoder.py": ["/net/MagnifyCell.py"], "/net/MNet.py": ["/net/MagnifyCell.py", "/net/Decoder.py", "/net/Encoder.py"], "/net/Decoder.py": ["/net/MagnifyCell.py"]} |
38,567 | zw-team/UNet-Crowd | refs/heads/master | /net/MNet.py | import torch
import torch.nn as nn
import torchvision.models as model
import torch.nn.functional as functional
from net.MagnifyCell import BasicMagnifyCell
from net.Decoder import Decoder
from net.Encoder import Encoder
class MNet(nn.Module):
def __init__(self, pretrain=True, IF_EN_CELL=False, IF_DE_CELL=Fals... | {"/net/Encoder.py": ["/net/MagnifyCell.py"], "/net/MNet.py": ["/net/MagnifyCell.py", "/net/Decoder.py", "/net/Encoder.py"], "/net/Decoder.py": ["/net/MagnifyCell.py"]} |
38,568 | zw-team/UNet-Crowd | refs/heads/master | /net/MagnifyCell.py | import torch
import torch.nn as nn
import torch.nn.functional as functional
class BasicMagnifyCell(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, magnify_factor=1, pooling_size=2, if_Bn=True, activation=nn.ReLU(inplace=True)):
su... | {"/net/Encoder.py": ["/net/MagnifyCell.py"], "/net/MNet.py": ["/net/MagnifyCell.py", "/net/Decoder.py", "/net/Encoder.py"], "/net/Decoder.py": ["/net/MagnifyCell.py"]} |
38,569 | zw-team/UNet-Crowd | refs/heads/master | /net/Decoder.py | import torch
import torch.nn as nn
import torch.nn.functional as functional
from net.MagnifyCell import BasicMagnifyCell
from net.BasicConv2d import BasicConv2d
class Decoder(nn.Module):
def __init__(self, IF_CELL=True, IF_BN=True, **kwargs):
super(Decoder, self).__init__()
self.Decoder_Block_1 = n... | {"/net/Encoder.py": ["/net/MagnifyCell.py"], "/net/MNet.py": ["/net/MagnifyCell.py", "/net/Decoder.py", "/net/Encoder.py"], "/net/Decoder.py": ["/net/MagnifyCell.py"]} |
38,601 | panzhigang1989/pyNew | refs/heads/master | /tests/conftest.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2020/7/11 11:06 下午
# @Author : Aries
# @File : conftest.py
# @Software: IntelliJ IDEA
# 参数和结合fixture使用
# 1。传入值和数据
# 2。传入fixture方法 将数据传入到fixture方法中,
# fixture使用request接受数据,方法体中使用request.param使用数据
import pytest
import yaml
@pytest.fixture()
def calc()... | {"/tests/test_calc.py": ["/pythoncode/calc.py"]} |
38,602 | panzhigang1989/pyNew | refs/heads/master | /pythoncode/calc.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2020/7/11 10:47 上午
# @Author : Aries
# @File : calc.py
# @Software: IntelliJ IDEA
# 计算器功能
from decimal import Decimal
class Calculator:
# 加法
def add(self, a, b):
return Decimal(str(a)) + Decimal(str(b))
# 除法
def div(self, a, b):
... | {"/tests/test_calc.py": ["/pythoncode/calc.py"]} |
38,603 | panzhigang1989/pyNew | refs/heads/master | /pythoncode/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2020/7/11 11:08 上午
# @Author : Aries
# @File : __init__.py.py
# @Software: IntelliJ IDEA
#
| {"/tests/test_calc.py": ["/pythoncode/calc.py"]} |
38,604 | panzhigang1989/pyNew | refs/heads/master | /tests/test_calc.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2020/7/11 11:46 下午
# @Author : Aries
# @File : test_calc.py
# @Software: IntelliJ IDEA
#
import pytest
import sys
import yaml
sys.path.append("..")
print(sys.path)
from pythoncode.calc import Calculator
from decimal import Decimal
class TestCalc:
# 类里面执行... | {"/tests/test_calc.py": ["/pythoncode/calc.py"]} |
38,634 | SnehalA/lpot | refs/heads/master | /lpot/ux/components/configuration_wizard/params_feeder.py | # -*- coding: utf-8 -*-
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,635 | SnehalA/lpot | refs/heads/master | /lpot/data/datasets/coco_dataset.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,636 | SnehalA/lpot | refs/heads/master | /examples/helloworld/tf_example5/test.py | import tensorflow as tf
tf.compat.v1.disable_eager_execution()
import numpy as np
def main():
import lpot
from lpot import common
quantizer = lpot.Quantization('./conf.yaml')
quantizer.model = common.Model("./mobilenet_v1_1.0_224_frozen.pb")
quantized_model = quantizer()
# Optional, run benc... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,637 | SnehalA/lpot | refs/heads/master | /examples/helloworld/tf_example3/test.py | import tensorflow as tf
import time
import numpy as np
tf.compat.v1.disable_eager_execution()
def main():
import lpot
from lpot import common
quantizer = lpot.Quantization('./conf.yaml')
# Get graph from slim checkpoint
from tf_slim.nets import inception
model_func = inception.inception_v1
... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,638 | SnehalA/lpot | refs/heads/master | /test/test_tensorflow_query_yaml.py | #
# -*- coding: utf-8 -*-
#
import unittest
import yaml
import os
from lpot.adaptor.tensorflow import TensorflowQuery
class TestTFQueryYaml(unittest.TestCase):
@classmethod
def setUpClass(self):
self.tf_yaml_path = os.path.join(os.getcwd() + "/../lpot/adaptor/tensorflow.yaml")
with open(se... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,639 | SnehalA/lpot | refs/heads/master | /lpot/policy/policy.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unl... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,640 | SnehalA/lpot | refs/heads/master | /lpot/ux/utils/workload/workload.py | # -*- coding: utf-8 -*-
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,641 | SnehalA/lpot | refs/heads/master | /lpot/adaptor/tf_utils/quantize_graph/quantize_graph_common.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unl... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,642 | SnehalA/lpot | refs/heads/master | /lpot/adaptor/onnxrt.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unl... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,643 | SnehalA/lpot | refs/heads/master | /lpot/ux/components/benchmark/benchmark_model.py | # -*- coding: utf-8 -*-
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,644 | SnehalA/lpot | refs/heads/master | /lpot/ux/utils/json_serializer.py | # -*- coding: utf-8 -*-
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,645 | SnehalA/lpot | refs/heads/master | /lpot/ux/web/router.py | # -*- coding: utf-8 -*-
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,646 | SnehalA/lpot | refs/heads/master | /lpot/adaptor/pytorch.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unl... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,647 | SnehalA/lpot | refs/heads/master | /lpot/ux/utils/parser.py | # -*- coding: utf-8 -*-
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,648 | SnehalA/lpot | refs/heads/master | /lpot/ux/utils/workload/workloads_list.py | # -*- coding: utf-8 -*-
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,649 | SnehalA/lpot | refs/heads/master | /lpot/ux/components/tune/execute_tune.py | # -*- coding: utf-8 -*-
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,650 | SnehalA/lpot | refs/heads/master | /examples/tensorflow/nlp/bert/tune_squad.py | #!/usr/bin/env python
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,651 | SnehalA/lpot | refs/heads/master | /lpot/ux/utils/templates/metric.py | # -*- coding: utf-8 -*-
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,652 | SnehalA/lpot | refs/heads/master | /lpot/data/transforms/imagenet_transform.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,653 | SnehalA/lpot | refs/heads/master | /test/test_onnx_model.py | import sys
import onnx
from onnx import helper, TensorProto, numpy_helper
import unittest
import numpy as np
sys.path.append('..')
from lpot.adaptor.ox_utils.onnx_model import ONNXModel
from lpot.adaptor.ox_utils.onnx_calibrate import CalibrationDataReader
def get_onnx_model():
model = torchvision.models.resnet18... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,654 | SnehalA/lpot | refs/heads/master | /test/test_filter.py | import unittest
import tensorflow as tf
import numpy as np
import os
from lpot.data import FILTERS, TRANSFORMS, DATASETS, DATALOADERS
from lpot.utils.create_obj_from_config import create_dataset, get_preprocess, create_dataloader
class TestCOCOFilter(unittest.TestCase):
def testLabelBalanceCOCORecord(self):
... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,655 | SnehalA/lpot | refs/heads/master | /lpot/ux/utils/hw_info.py | # -*- coding: utf-8 -*-
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,656 | SnehalA/lpot | refs/heads/master | /lpot/benchmark.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unl... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,657 | SnehalA/lpot | refs/heads/master | /test/test_onnx_calibrate.py | import os
import shutil
import sys
import unittest
import numpy as np
import onnx
from onnx import helper, TensorProto, numpy_helper
sys.path.append('..')
# from lpot.data.dataloaders.onnx_dataloader import ONNXDataLoader
# from lpot.data.datasets.imagenet_dataset import ImagenetDataset
# from lpot.data.transforms.im... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,658 | SnehalA/lpot | refs/heads/master | /lpot/ux/web/configuration.py | # -*- coding: utf-8 -*-
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,659 | SnehalA/lpot | refs/heads/master | /lpot/pruning.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unl... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,660 | SnehalA/lpot | refs/heads/master | /examples/helloworld/tf_example4/test.py | import tensorflow as tf
import time
import numpy as np
from tensorflow import keras
from lpot.data import DATASETS, DataLoader
from lpot import common
tf.compat.v1.disable_eager_execution()
def main():
import lpot
quantizer = lpot.Quantization('./conf.yaml')
dataset = quantizer.dataset('dummy', shape=(10... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,661 | SnehalA/lpot | refs/heads/master | /lpot/adaptor/adaptor.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unl... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,662 | SnehalA/lpot | refs/heads/master | /examples/helloworld/tf_example1/test.py | import tensorflow as tf
tf.compat.v1.disable_eager_execution()
import numpy as np
def main():
import lpot
from lpot import common
quantizer = lpot.Quantization('./conf.yaml')
quantizer.model = common.Model("./mobilenet_v1_1.0_224_frozen.pb")
quantized_model = quantizer()
if __name__ == "__m... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,663 | SnehalA/lpot | refs/heads/master | /lpot/ux/web/server.py | # -*- coding: utf-8 -*-
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,664 | SnehalA/lpot | refs/heads/master | /test/test_adaptor_onnxrt.py | import os
import shutil
import unittest
import torch
import torchvision
import yaml
import onnx
from lpot.adaptor import FRAMEWORKS
def build_static_yaml():
fake_yaml = """
model:
name: imagenet
framework: onnxrt_qlinearops
quantization: ... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,665 | SnehalA/lpot | refs/heads/master | /lpot/ux/components/benchmark/execute_benchmark.py | # -*- coding: utf-8 -*-
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,666 | SnehalA/lpot | refs/heads/master | /lpot/data/transforms/coco_transform.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,667 | SnehalA/lpot | refs/heads/master | /lpot/adaptor/ox_utils/onnx_calibrate.py | #!/usr/bin/env python
# coding: utf-8
#
# Copyright (c) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,668 | SnehalA/lpot | refs/heads/master | /test/test_adaptor_pytorch.py |
import torch
import torch.nn.quantized as nnq
from torch.quantization import QuantStub, DeQuantStub
import torchvision
import unittest
import os
from lpot.adaptor import FRAMEWORKS
from lpot.model import MODELS
import lpot.adaptor.pytorch as lpot_torch
from lpot import Quantization, common
import shutil
import copy
im... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,669 | SnehalA/lpot | refs/heads/master | /test/test_transform.py | """Tests for the transform module."""
import numpy as np
import random
import unittest
import os
from lpot.data import TRANSFORMS, DATALOADERS
from lpot.utils.create_obj_from_config import get_postprocess, create_dataset
from lpot.utils.utility import LazyImport
from PIL import Image
mx = LazyImport('mxnet')
tf = LazyI... | {"/lpot/ux/utils/workload/workload.py": ["/lpot/ux/utils/json_serializer.py"], "/lpot/adaptor/onnxrt.py": ["/lpot/adaptor/adaptor.py", "/lpot/adaptor/ox_utils/onnx_calibrate.py"], "/lpot/ux/web/router.py": ["/lpot/ux/components/benchmark/execute_benchmark.py", "/lpot/ux/components/configuration_wizard/params_feeder.py"... |
38,699 | cyuanli/DRL_Seminar_BlackJack | refs/heads/master | /evaluation.py | from Blackjack import BlackjackEnv
from blackjack_dqn import BlackjackDqn
n_train_episodes = 200000
n_test_episodes = 10000
n_batch_size = 100
t_train_interval = 10
environment_configurations = [{"one_card_dealer": True},
{},
{"card_values": [2] * 52},
... | {"/evaluation.py": ["/blackjack_dqn.py"], "/blackjack_dqn.py": ["/Agents/dqn.py"]} |
38,700 | cyuanli/DRL_Seminar_BlackJack | refs/heads/master | /blackjack_dqn.py | import argparse
import Blackjack
import gym
import numpy as np
from tqdm import trange
from Agents.dqn import DqnAgent
class BlackjackDqn(DqnAgent):
def __init__(self, env):
DqnAgent.__init__(self, env, state_dim=104, action_space=2)
def _transform_state(self, state):
one_hot = [False for _ i... | {"/evaluation.py": ["/blackjack_dqn.py"], "/blackjack_dqn.py": ["/Agents/dqn.py"]} |
38,701 | cyuanli/DRL_Seminar_BlackJack | refs/heads/master | /Agents/dqn.py | import numpy as np
import random
import tensorflow as tf
from tqdm import trange
# tf.keras.mixed_precision.experimental.set_policy('mixed_float16')
class QNetwork():
def __init__(self, state_dim):
self.model = tf.keras.Sequential([
tf.keras.layers.Input(state_dim),
tf.keras.laye... | {"/evaluation.py": ["/blackjack_dqn.py"], "/blackjack_dqn.py": ["/Agents/dqn.py"]} |
38,702 | cyuanli/DRL_Seminar_BlackJack | refs/heads/master | /dqn.py | import argparse
import Blackjack
from datetime import datetime
import gym
import numpy as np
import random
import tensorflow as tf
from tqdm import trange
# tf.keras.mixed_precision.experimental.set_policy('mixed_float16')
class QNetworkModel(tf.keras.Model):
def __init__(self):
super(QNetworkModel, sel... | {"/evaluation.py": ["/blackjack_dqn.py"], "/blackjack_dqn.py": ["/Agents/dqn.py"]} |
38,733 | Dortov/Chart-Loader | refs/heads/main | /main.py | import sys
from PyQt5.QtWidgets import QApplication, QMainWindow, QMenu, QVBoxLayout, QSizePolicy, QMessageBox, QWidget, QPushButton, QLabel, QFileDialog
from PyQt5.QtGui import QIcon
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backends.backend_qt5agg import Naviga... | {"/main.py": ["/dl_charts.py", "/dl_gui.py"]} |
38,734 | Dortov/Chart-Loader | refs/heads/main | /dl_charts.py | # файл Charts c графиками
import sys
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.figure import Figure
from collections import OrderedDict
import datetime
from datetime import datetime
from da... | {"/main.py": ["/dl_charts.py", "/dl_gui.py"]} |
38,735 | Dortov/Chart-Loader | refs/heads/main | /dl_gui.py | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'dl_gui.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
... | {"/main.py": ["/dl_charts.py", "/dl_gui.py"]} |
38,737 | Nguyephi/ticketbox_python | refs/heads/master | /migrations/versions/dadbd821288e_.py | """empty message
Revision ID: dadbd821288e
Revises: 1778db3149ec
Create Date: 2019-07-07 16:34:16.930812
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'dadbd821288e'
down_revision = '1778db3149ec'
branch_labels = None
depends_on = None
def upgrade():
# ... | {"/app.py": ["/components/users/__init__.py", "/components/events/__init__.py", "/models/model.py", "/components/events/forms/forms.py"], "/components/users/__init__.py": ["/components/users/forms/forms.py", "/models/model.py"], "/components/users/forms/forms.py": ["/models/model.py"], "/components/events/__init__.py":... |
38,738 | Nguyephi/ticketbox_python | refs/heads/master | /app.py | import os
from flask import Flask, render_template, redirect, url_for, request, flash
from components.users import users_blueprint
from components.events import events_blueprint
from flask_uploads import UploadSet, configure_uploads, IMAGES, patch_request_class
from flask_sqlalchemy import SQLAlchemy
from flask_migrate... | {"/app.py": ["/components/users/__init__.py", "/components/events/__init__.py", "/models/model.py", "/components/events/forms/forms.py"], "/components/users/__init__.py": ["/components/users/forms/forms.py", "/models/model.py"], "/components/users/forms/forms.py": ["/models/model.py"], "/components/events/__init__.py":... |
38,739 | Nguyephi/ticketbox_python | refs/heads/master | /components/users/__init__.py | from werkzeug.security import generate_password_hash, check_password_hash
from flask_login import login_user, login_required, logout_user, LoginManager, UserMixin, current_user
from components.users.forms.forms import SignUpForm, LogInForm, EditProfile
from models.model import User, db, Event
from flask import Blueprin... | {"/app.py": ["/components/users/__init__.py", "/components/events/__init__.py", "/models/model.py", "/components/events/forms/forms.py"], "/components/users/__init__.py": ["/components/users/forms/forms.py", "/models/model.py"], "/components/users/forms/forms.py": ["/models/model.py"], "/components/events/__init__.py":... |
38,740 | Nguyephi/ticketbox_python | refs/heads/master | /migrations/versions/1778db3149ec_.py | """empty message
Revision ID: 1778db3149ec
Revises: 0ea6fdd0bc88
Create Date: 2019-07-07 16:14:44.629456
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1778db3149ec'
down_revision = '0ea6fdd0bc88'
branch_labels = None
depends_on = None
def upgrade():
# ... | {"/app.py": ["/components/users/__init__.py", "/components/events/__init__.py", "/models/model.py", "/components/events/forms/forms.py"], "/components/users/__init__.py": ["/components/users/forms/forms.py", "/models/model.py"], "/components/users/forms/forms.py": ["/models/model.py"], "/components/events/__init__.py":... |
38,741 | Nguyephi/ticketbox_python | refs/heads/master | /migrations/versions/29986b354dbb_.py | """empty message
Revision ID: 29986b354dbb
Revises: dadbd821288e
Create Date: 2019-07-08 11:20:03.678173
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '29986b354dbb'
down_revision = 'dadbd821288e'
branch_labels = None
depends_on = None
def upgrade():
# ... | {"/app.py": ["/components/users/__init__.py", "/components/events/__init__.py", "/models/model.py", "/components/events/forms/forms.py"], "/components/users/__init__.py": ["/components/users/forms/forms.py", "/models/model.py"], "/components/users/forms/forms.py": ["/models/model.py"], "/components/events/__init__.py":... |
38,742 | Nguyephi/ticketbox_python | refs/heads/master | /components/users/forms/forms.py | from flask_wtf import FlaskForm
from flask_login import current_user
from wtforms.fields import StringField, PasswordField, SubmitField
from wtforms.validators import InputRequired, DataRequired, ValidationError
from models.model import User
class SignUpForm(FlaskForm):
name = StringField('Name', validators=[Inpu... | {"/app.py": ["/components/users/__init__.py", "/components/events/__init__.py", "/models/model.py", "/components/events/forms/forms.py"], "/components/users/__init__.py": ["/components/users/forms/forms.py", "/models/model.py"], "/components/users/forms/forms.py": ["/models/model.py"], "/components/events/__init__.py":... |
38,743 | Nguyephi/ticketbox_python | refs/heads/master | /components/events/__init__.py | import os
import secrets
from flask import Blueprint, render_template, redirect, url_for, flash, current_app
from flask_login import login_user, login_required, logout_user, LoginManager, UserMixin, current_user
from flask_wtf.file import FileField, FileAllowed
from flask_uploads import UploadSet, IMAGES
from models.m... | {"/app.py": ["/components/users/__init__.py", "/components/events/__init__.py", "/models/model.py", "/components/events/forms/forms.py"], "/components/users/__init__.py": ["/components/users/forms/forms.py", "/models/model.py"], "/components/users/forms/forms.py": ["/models/model.py"], "/components/events/__init__.py":... |
38,744 | Nguyephi/ticketbox_python | refs/heads/master | /models/model.py | from flask_sqlalchemy import SQLAlchemy
from flask_login import UserMixin
from werkzeug.security import generate_password_hash, check_password_hash
# from components.users.forms.forms import SignUpForm
db = SQLAlchemy()
class RatingUser(db.Model):
__tablename__ = 'rating_users'
id = db.Column(db.Integer, pri... | {"/app.py": ["/components/users/__init__.py", "/components/events/__init__.py", "/models/model.py", "/components/events/forms/forms.py"], "/components/users/__init__.py": ["/components/users/forms/forms.py", "/models/model.py"], "/components/users/forms/forms.py": ["/models/model.py"], "/components/events/__init__.py":... |
38,745 | Nguyephi/ticketbox_python | refs/heads/master | /components/events/forms/forms.py | from flask_wtf import FlaskForm
from flask_wtf.file import FileField, FileAllowed, FileRequired
from wtforms.fields import StringField, PasswordField, SubmitField, TextAreaField, IntegerField, SelectField
from wtforms.fields.html5 import DateField
from wtforms.validators import InputRequired, DataRequired, ValidationEr... | {"/app.py": ["/components/users/__init__.py", "/components/events/__init__.py", "/models/model.py", "/components/events/forms/forms.py"], "/components/users/__init__.py": ["/components/users/forms/forms.py", "/models/model.py"], "/components/users/forms/forms.py": ["/models/model.py"], "/components/events/__init__.py":... |
38,768 | Monish99/Invoice | refs/heads/master | /invoice/views.py | import mysql
from django.shortcuts import HttpResponse, render
from mysql.connector import Error
from .inv import someRandom
from .sndMail import det
def create_connection(hn, un, pw, dbn):
connection = None
try:
connection = mysql.connector.connect(
host=hn,
user=un,
... | {"/invoice/views.py": ["/invoice/inv.py", "/invoice/sndMail.py"]} |
38,769 | Monish99/Invoice | refs/heads/master | /invoice/sndMail.py | import smtplib
from email.mime.application import MIMEApplication
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.image import MIMEImage
import mysql
from mysql.connector import Error
def create_connection(hn, un, pw, dbn):
connection = None
try:
co... | {"/invoice/views.py": ["/invoice/inv.py", "/invoice/sndMail.py"]} |
38,770 | Monish99/Invoice | refs/heads/master | /invoice/inv.py | from docx import Document
import mysql
from mysql.connector import Error
from docx2pdf import convert
from docx.enum.text import WD_ALIGN_PARAGRAPH
def create_connection(hn, un, pw, dbn):
connection = None
try:
connection = mysql.connector.connect(
host=hn,
user=un,
... | {"/invoice/views.py": ["/invoice/inv.py", "/invoice/sndMail.py"]} |
38,771 | Monish99/Invoice | refs/heads/master | /invoice/urls.py | from django.urls import path, include
from . import views
urlpatterns =[
path('',views.home),
path('display',views.display)
]
| {"/invoice/views.py": ["/invoice/inv.py", "/invoice/sndMail.py"]} |
38,772 | Monish99/Invoice | refs/heads/master | /invoice/admin.py | from django.contrib import admin
from .models import Trainer, college
# Register your models here.
admin.site.register(Trainer)
admin.site.register(college)
| {"/invoice/views.py": ["/invoice/inv.py", "/invoice/sndMail.py"]} |
38,777 | taehyeonjeon07/sueorang-sign-language | refs/heads/master | /dataset_split.py | import os
from util import make_dir
import shutil
dataset_folder = 'gestures'
gestures_list = os.listdir(dataset_folder)
gestures_list.sort()
print('gesture folder list -->', gestures_list)
print('\n',len(gestures_list) ,'of classes will be split(none class folder skip)')
n_of_valid_set = 100
make_dir(os.path.join(d... | {"/dataset_split.py": ["/util.py"]} |
38,778 | taehyeonjeon07/sueorang-sign-language | refs/heads/master | /util.py | import os
def make_dir(dir_name):
try:
if not(os.path.isdir(dir_name)):
os.makedirs(os.path.join(dir_name))
except OSError as e:
if e.errno != errno.EEXIST:
print("Failed to create directory!!!!!")
raise
| {"/dataset_split.py": ["/util.py"]} |
38,797 | DmitryPorotov/FileWatcher | refs/heads/master | /ssh_client.py | from paramiko import transport, RSAKey, SFTPClient, client
import socket
import util
class SshClient:
def __init__(self, server: str, path_to: str, path_from: str, key_file: str = '~/.ssh/id_rsa'):
self._sftp_client = None # type: SFTPClient
parts = server.split("@")
self.server = parts[1... | {"/ssh_client.py": ["/util.py"], "/test_sock.py": ["/ssh_client.py"], "/watcher.py": ["/path_watcher.py", "/db_handler.py", "/ssh_client.py"], "/path_watcher.py": ["/ssh_client.py", "/db_handler.py", "/util.py"]} |
38,798 | DmitryPorotov/FileWatcher | refs/heads/master | /db_handler.py | import sqlite3
import uuid
from _datetime import datetime
from pathlib import Path
class DbHandler:
def __init__(self):
self.conn = sqlite3.connect(str(Path.home()) + '/.local/share/FileWatcher/sync.db')
self.cur = self.conn.cursor()
self.cur.execute('''
CREATE TABLE IF NOT EXI... | {"/ssh_client.py": ["/util.py"], "/test_sock.py": ["/ssh_client.py"], "/watcher.py": ["/path_watcher.py", "/db_handler.py", "/ssh_client.py"], "/path_watcher.py": ["/ssh_client.py", "/db_handler.py", "/util.py"]} |
38,799 | DmitryPorotov/FileWatcher | refs/heads/master | /test_sock.py | import ssh_client
cl = ssh_client.SshClient('dmitrydev.adquant.net', '/root/test')
cl.connect() | {"/ssh_client.py": ["/util.py"], "/test_sock.py": ["/ssh_client.py"], "/watcher.py": ["/path_watcher.py", "/db_handler.py", "/ssh_client.py"], "/path_watcher.py": ["/ssh_client.py", "/db_handler.py", "/util.py"]} |
38,800 | DmitryPorotov/FileWatcher | refs/heads/master | /watcher.py | import json
from path_watcher import PathWatcher
from db_handler import DbHandler
from pathlib import Path
from ssh_client import SshClient
import signal
db = None
ssh_clients = []
def main():
conf = read_config()
path_watchers = []
global db
db = DbHandler()
for c in conf['sync']:
ssh_cl... | {"/ssh_client.py": ["/util.py"], "/test_sock.py": ["/ssh_client.py"], "/watcher.py": ["/path_watcher.py", "/db_handler.py", "/ssh_client.py"], "/path_watcher.py": ["/ssh_client.py", "/db_handler.py", "/util.py"]} |
38,801 | DmitryPorotov/FileWatcher | refs/heads/master | /util.py | from pathlib import Path
def resolve_home_dir(path, is_dir=False):
if '~' in path:
path = str(Path.home()) + path.split('~')[1]
if is_dir:
path += '/'
return path
| {"/ssh_client.py": ["/util.py"], "/test_sock.py": ["/ssh_client.py"], "/watcher.py": ["/path_watcher.py", "/db_handler.py", "/ssh_client.py"], "/path_watcher.py": ["/ssh_client.py", "/db_handler.py", "/util.py"]} |
38,802 | DmitryPorotov/FileWatcher | refs/heads/master | /path_watcher.py | import asyncio
import os
import stat
import inotify.adapters
from ssh_client import SshClient
from db_handler import DbHandler
import util
import sys
from pathlib import Path
class PathWatcher:
_temp_files = ['___jb_old___', '___jb_tmp___', 'goutputstream-']
_attrib_event = 'IN_ATTRIB'
_copy_events = ['IN... | {"/ssh_client.py": ["/util.py"], "/test_sock.py": ["/ssh_client.py"], "/watcher.py": ["/path_watcher.py", "/db_handler.py", "/ssh_client.py"], "/path_watcher.py": ["/ssh_client.py", "/db_handler.py", "/util.py"]} |
38,804 | kapitsa2811/semisupervised-vae-metric-embedding | refs/heads/master | /model/SSVAE.py | """
---------------------------------------------------------------------
-- Author: Jhosimar George Arias Figueroa
---------------------------------------------------------------------
Semisupervised generative model with metric embedding auxiliary task
"""
import matplotlib.pyplot as plt
import tensorflow as tf
im... | {"/model/SSVAE.py": ["/networks/CatVAENetwork.py", "/losses/LossFunctions.py", "/utils/partition.py", "/utils/assignment.py"]} |
38,805 | kapitsa2811/semisupervised-vae-metric-embedding | refs/heads/master | /utils/partition.py | """
---------------------------------------------------------------------
-- Author: Jhosimar George Arias Figueroa
---------------------------------------------------------------------
Util functions for partitioning input data
"""
import numpy as np
def partition_train_val(x_train, y_train, proportion, num_classe... | {"/model/SSVAE.py": ["/networks/CatVAENetwork.py", "/losses/LossFunctions.py", "/utils/partition.py", "/utils/assignment.py"]} |
38,806 | kapitsa2811/semisupervised-vae-metric-embedding | refs/heads/master | /networks/CatVAENetwork.py | """
---------------------------------------------------------------------
-- Author: Jhosimar George Arias Figueroa
---------------------------------------------------------------------
Categorical Variational Autoencoder Networks
"""
import tensorflow as tf
class CatVAENetwork:
eps = 1e-8
def __init__... | {"/model/SSVAE.py": ["/networks/CatVAENetwork.py", "/losses/LossFunctions.py", "/utils/partition.py", "/utils/assignment.py"]} |
38,807 | kapitsa2811/semisupervised-vae-metric-embedding | refs/heads/master | /utils/assignment.py | """
---------------------------------------------------------------------
-- Author: Jhosimar George Arias Figueroa
---------------------------------------------------------------------
Util functions for assignment of unlabeled data
"""
import tensorflow as tf
def bincount_matrix(x, num_classes):
"""Count number... | {"/model/SSVAE.py": ["/networks/CatVAENetwork.py", "/losses/LossFunctions.py", "/utils/partition.py", "/utils/assignment.py"]} |
38,808 | kapitsa2811/semisupervised-vae-metric-embedding | refs/heads/master | /losses/LossFunctions.py | # -*- coding: utf-8 -*-
"""
---------------------------------------------------------------------
-- Author: Jhosimar George Arias Figueroa
---------------------------------------------------------------------
Loss functions used for training our model
"""
import tensorflow as tf
class LossFunctions:
eps = 1e-8... | {"/model/SSVAE.py": ["/networks/CatVAENetwork.py", "/losses/LossFunctions.py", "/utils/partition.py", "/utils/assignment.py"]} |
38,831 | MhdMousaHAMAD/collaborative-filtering | refs/heads/master | /recommenders/collaborative_filtering.py | from math import sqrt
from sklearn.cross_validation import KFold
from sklearn.metrics import mean_squared_error
import csv
import time
# Return Pearson Correlation Coefficient for rows at key1 and key2 in dataset dictionary
# Rows represent users or items when the dictionary is transposed
def similarity_pearson(datas... | {"/main.py": ["/recommenders/collaborative_filtering.py"]} |
38,832 | MhdMousaHAMAD/collaborative-filtering | refs/heads/master | /main.py | from recommenders.collaborative_filtering import CollaborativeFiltering
from recommenders.collaborative_filtering import similarity_cosine
from recommenders.collaborative_filtering import similarity_pearson
import csv
# Read dataset
def read_dataset(path):
dataset = []
with open(path, newline='') as file:
... | {"/main.py": ["/recommenders/collaborative_filtering.py"]} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.