repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
jiweibo/triton_server
[ "a0f7868eb0cad9d6a119edf845387ceae808d350", "a0f7868eb0cad9d6a119edf845387ceae808d350" ]
[ "qa/L0_custom_ops/cuda_op_test.py", "qa/python_models/pytorch_fp32_fp32/model.py" ]
[ "#!/usr/bin/python\n\n# Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n# * Redistributions of source code must retain the above copyright\n#...
[ [ "numpy.arange" ], [ "torch.nn.Dropout2d", "torch.nn.functional.log_softmax", "torch.manual_seed", "torch.nn.Conv2d", "torch.tensor", "torch.nn.Linear", "torch.nn.functional.relu", "torch.flatten", "numpy.array", "torch.nn.functional.max_pool2d" ] ]
OzanCKN/OpenMDAO-Framework
[ "7ebd7fda0b10fbe8a86ae938dc4f135396dd9759" ]
[ "openmdao.lib/src/openmdao/lib/components/expected_improvement_multiobj.py" ]
[ "\"\"\"Expected Improvement calculation for one or more objectives.\"\"\" \n\nimport logging\n\ntry:\n from numpy import exp, abs, pi, array,isnan, diag, random\nexcept ImportError as err:\n logging.warn(\"In %s: %r\" % (__file__, err))\n_check=['numpy']\ntry:\n from math import erf\nexcept ImportError as ...
[ [ "scipy.special.erf", "numpy.isnan", "numpy.random.multivariate_normal", "numpy.exp", "numpy.array" ] ]
fmxFranky/attention-learn-to-route
[ "dd0d945c93f4a924244dd71edd9c1a836793adbb", "dd0d945c93f4a924244dd71edd9c1a836793adbb" ]
[ "reinforce_baselines.py", "problems/op/problem_op.py" ]
[ "import copy\n\nimport torch\nimport torch.nn.functional as F\nfrom scipy.stats import ttest_rel\nfrom torch.utils.data import Dataset\n\nfrom train import get_inner_model, rollout\n\n\nclass Baseline(object):\n def wrap_dataset(self, dataset):\n return dataset\n\n def unwrap_batch(self, batch):\n ...
[ [ "scipy.stats.ttest_rel", "torch.distributed.get_rank", "torch.no_grad" ], [ "torch.ones", "torch.randint", "torch.cat", "torch.zeros_like", "torch.tensor", "torch.FloatTensor" ] ]
markkua/ImpliCity
[ "2bf80ae1a05a530e0d405ce2057ab5b9c57ea21a", "2bf80ae1a05a530e0d405ce2057ab5b9c57ea21a" ]
[ "test.py", "src/model/encoder/pointnet.py" ]
[ "# encoding: utf-8\n# Author: Bingxin Ke\n# Created: 2021/10/6\n\"\"\"\n Evaluation pipeline, adapted from train.py\n Require additional field in configuration file: test/check_point, indicating the path to trained model\n usage example: python test.py config/train_test/ImpliCity-0.yaml\n\"\"\"\n\nimpo...
[ [ "torch.device", "matplotlib.use", "torch.utils.data.DataLoader", "torch.cuda.is_available" ], [ "torch.nn.Linear", "torch.nn.ReLU", "torch.cat" ] ]
jianliang90/MedCommon
[ "961384c7387cf8307275752d6399c6f9c8ce227c", "961384c7387cf8307275752d6399c6f9c8ce227c" ]
[ "experiments/old/rib_centerline_seg/rib_coarse_seg/train.py", "experiments/old/lung_airway_seg/lung_fine_seg/train_luna.py" ]
[ "\n\"\"\" segmentation of rib in coarse resolution.\n\"\"\"\n\nimport os\nimport sys\nimport warnings\ncurrent_dir = os.path.dirname(os.path.abspath(__file__))\nsys.path.append(\"/fileser/zhangfan/LungProject/lung_segment/\")\nwarnings.filterwarnings(\"ignore\")\n\nimport torch\n\nfrom network.unet import UNet\nfro...
[ [ "torch.manual_seed", "torch.cuda.manual_seed_all" ], [ "torch.nn.functional.softmax", "torch.manual_seed", "torch.from_numpy", "torch.nn.functional.sigmoid", "torch.no_grad", "torch.cuda.manual_seed_all", "numpy.array", "numpy.zeros", "numpy.where" ] ]
lypnol/adventofcode-2021
[ "8ba277d698e8c59ca9cd554acc135473f5964b87", "8ba277d698e8c59ca9cd554acc135473f5964b87" ]
[ "day-19/part-2/skasch.py", "day-20/part-2/skasch.py" ]
[ "import itertools\nfrom typing import Callable, List, Optional, Set, Tuple, cast\n\nimport numpy as np\nimport numpy.typing as npt\nfrom tool.runners.python import SubmissionPy\n\nArray = npt.NDArray[np.int_]\nTensor = Tuple[Array, Array]\n\nORIENTATIONS = [\n np.array(\n [\n [1, 0, 0],\n ...
[ [ "numpy.array" ], [ "numpy.full_like", "numpy.array", "numpy.pad" ] ]
lengjia/NAS_NPU
[ "600c05ed27c9b1ce63a5c1c4f1fc862d510cfcf0", "600c05ed27c9b1ce63a5c1c4f1fc862d510cfcf0" ]
[ "nn/unittest_nn_comparators.py", "utils/base_test_class.py" ]
[ "\"\"\"\n Test cases for functions/classes in nn_comparator.py\n -- kandasamy@cs.cmu.edu\n\"\"\"\n\n# pylint: disable=no-member\n# pylint: disable=invalid-name\n\nimport numpy as np\n# Local imports\nfrom utils.ancillary_utils import get_list_of_floats_as_str\nfrom utils.base_test_class import BaseTestClass, exec...
[ [ "numpy.diag", "numpy.linalg.eig", "numpy.linalg.norm", "numpy.all", "numpy.round", "numpy.any", "numpy.exp" ], [ "numpy.random.seed" ] ]
legacyai/tf-transformers
[ "65a5f9a4bcb3236483daa598a37b91673f56cb97", "65a5f9a4bcb3236483daa598a37b91673f56cb97", "65a5f9a4bcb3236483daa598a37b91673f56cb97", "65a5f9a4bcb3236483daa598a37b91673f56cb97" ]
[ "src/tf_transformers/text/text_decoder_encoder_only.py", "src/tf_transformers/layers/attention/bigbird_attention.py", "research/sentence_language_model/dataset_loader.py", "src/tf_transformers/models/tasks/maked_lm_model.py" ]
[ "# coding=utf-8\n# Copyright 2021 TF-Transformers Authors.\n# All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2...
[ [ "tensorflow.concat", "tensorflow.zeros", "tensorflow.cast", "tensorflow.equal", "tensorflow.argsort", "tensorflow.gather", "tensorflow.nn.top_k", "tensorflow.argmax", "tensorflow.shape", "tensorflow.identity", "tensorflow.not_equal", "tensorflow.reduce_max", "te...
handstuyennn/duckdb
[ "24b76148d3550de7a1df1c4af513c28fe8bb185b" ]
[ "tools/pythonpkg/tests/fast/pandas/test_same_name.py" ]
[ "import pytest\nimport duckdb\nimport pandas as pd\n\nclass TestMultipleColumnsSameName(object):\n\n def test_multiple_columns_with_same_name(self, duckdb_cursor):\n df = pd.DataFrame({'a': [1, 2, 3, 4], 'b': [5, 6, 7, 8], 'd': [9, 10, 11, 12]})\n df = df.rename(columns={ df.columns[1]: \"a\" })\n ...
[ [ "pandas.DataFrame" ] ]
cbwces/pytorch-smoothgrad
[ "8965f18f18ab3c2cb04f76bbce92d38e066a3463" ]
[ "lib/image_utils.py" ]
[ "import cv2\nimport numpy as np\nimport torch\nfrom torch.autograd import Variable\n\n\ndef preprocess_image(img, cuda=False):\n means=[0.485, 0.456, 0.406]\n stds=[0.229, 0.224, 0.225]\n\n preprocessed_img = img.copy()[: , :, ::-1]\n for i in range(3):\n preprocessed_img[:, :, i] = preprocessed_...
[ [ "numpy.clip", "numpy.uint8", "torch.from_numpy", "numpy.percentile", "numpy.max", "numpy.float32", "numpy.transpose", "numpy.sum", "torch.autograd.Variable" ] ]
iitrabhi/NURBS-Python
[ "f5021cf4ce7a9c4b9bddb886ee631ee159be148e" ]
[ "geomdl/visualization/VisMPL.py" ]
[ "\"\"\"\n.. module:: VisMPL\n :platform: Unix, Windows\n :synopsis: Matplotlib visualization component for NURBS-Python (experimental)\n\n.. moduleauthor:: Onur Rauf Bingol <orbingol@gmail.com>\n\n\"\"\"\n\nfrom . import Abstract\nfrom . import utilities\n\nfrom . import numpy as np\nimport matplotlib as mpl\...
[ [ "matplotlib.pyplot.legend", "matplotlib.lines.Line2D", "matplotlib.pyplot.plot", "matplotlib.pyplot.axis", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
ppengtang/fishernet
[ "f176f2b91d6268f96ed815ef0eb9f0cff0c730e9" ]
[ "tools/load_parameters.py" ]
[ "import sys\r\nimport os\r\nimport argparse\r\nimport scipy.io as sio\r\nimport numpy as np\r\n\r\nimport _init_paths\r\nimport caffe\r\n\r\ndef parse_args():\r\n \"\"\"\r\n Parse input arguments\r\n \"\"\"\r\n parser = argparse.ArgumentParser(description='Train a Fast R-CNN network')\r\n parser.add_...
[ [ "scipy.io.loadmat" ] ]
KyleAMoore/Redshift-CNN
[ "dd3bfed3a71884c65e16e01708c7b79b8b1775a4" ]
[ "display-galaxy.py" ]
[ "import matplotlib.pyplot as plt\nimport numpy as np\nfrom random import sample\n\nclass BertinVisualizer:\n \"\"\"Given an image in 5 SDSS bands,\n create an intensity plot using these images.\n This method follows recommendations from to plot these\n images.\n http://www.aspbooks.org/pu...
[ [ "numpy.clip", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig", "numpy.stack", "numpy.array", "numpy.logical_and" ] ]
fukuta0614/Chainer
[ "337fe78e1c27924c1195b8b677a9b2cd3ea68828" ]
[ "tests/chainer_tests/utils_tests/test_utils.py" ]
[ "import unittest\n\nimport numpy\n\nfrom chainer import testing\nfrom chainer import utils\n\n\nclass TestForceArray(unittest.TestCase):\n\n def test_scalar(self):\n x = utils.force_array(numpy.float32(1))\n self.assertIsInstance(x, numpy.ndarray)\n self.assertEqual(x.dtype, numpy.float32)\n...
[ [ "numpy.dtype", "numpy.array", "numpy.int32", "numpy.float32" ] ]
John-Bonnin/ConnTact
[ "86f0660cb3240179cd442d5d091134b98275ce6d" ]
[ "src/conntact/assembly_plotting.py" ]
[ "# Copyright 2021 Southwest Research Institute\n# Licensed under the Apache License, Version 2.0\n\n# from _typeshed import NoneType\nimport rospy\nimport numpy as np\nfrom std_msgs.msg import String\nfrom colorama import Fore, Back, Style\nimport matplotlib.pyplot as plt\nfrom geometry_msgs.msg import WrenchStampe...
[ [ "numpy.linspace", "numpy.min", "matplotlib.pyplot.subplots", "matplotlib.pyplot.ion", "numpy.round", "numpy.max", "matplotlib.pyplot.subplots_adjust", "numpy.array", "numpy.vstack" ] ]
ZachT1711/trax
[ "a0a3dd8d49e53fc48bb24cc08c10a8a53517e7bc" ]
[ "trax/tf_numpy/extensions/extensions_test.py" ]
[ "# coding=utf-8\n# Copyright 2020 The Trax Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by app...
[ [ "tensorflow.compat.v2.nest.map_structure", "tensorflow.compat.v2.config.experimental.list_physical_devices", "tensorflow.compat.v2.random.normal", "tensorflow.compat.v2.test.main", "tensorflow.compat.v2.compat.v1.enable_eager_execution", "tensorflow.compat.v2.distribute.cluster_resolver.TP...
NinaWie/trackintel
[ "918f9d8000438571dbc9fbb13bf4f3a607ec670a" ]
[ "tests/analysis/test_tracking_quality.py" ]
[ "import os\nimport datetime\n\nimport pytest\nimport pandas as pd\nimport geopandas as gpd\nfrom shapely.geometry import Point\n\nimport trackintel as ti\n\n\n@pytest.fixture\ndef testdata_sp_tpls_geolife_long():\n \"\"\"Generate sp and tpls sequences of the original pfs for subsequent testing.\"\"\"\n pfs, _...
[ [ "pandas.to_timedelta", "pandas.Timestamp", "pandas.testing.assert_frame_equal", "pandas.Timedelta" ] ]
djmcknight358/mycroft-precise
[ "7bffc6a2293caed7d0a8e1d3701795f0e625911b" ]
[ "precise/scripts/listen.py" ]
[ "#!/usr/bin/env python3\n# Copyright 2018 Mycroft AI Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b...
[ [ "numpy.zeros" ] ]
xqterry/3DDFA
[ "3b8f7bb4cfafa349e628d6433d7a4edc55627243" ]
[ "utils/ddfa.py" ]
[ "#!/usr/bin/env python3\n# coding: utf-8\n\nimport os.path as osp\nfrom pathlib import Path\nimport numpy as np\n\nimport torch\nimport torch.utils.data as data\nimport cv2\nimport pickle\nimport argparse\nfrom .io import _numpy_to_tensor, _load_cpu, _load_gpu\nfrom .params import *\n\n\ndef _parse_param(param):\n ...
[ [ "numpy.concatenate", "numpy.array", "numpy.take" ] ]
achiyaj/Cap2Det
[ "d16726dfb9af367d7e1685903e51acfb6cfd2820", "d16726dfb9af367d7e1685903e51acfb6cfd2820", "d16726dfb9af367d7e1685903e51acfb6cfd2820" ]
[ "dataset-tools/create_pascal_selective_search_data.py", "core/preprocess_test.py", "core/imgproc_test.py" ]
[ "r\"\"\"Extract Selective Search proposals for the VOC dataset.\n\nExample usage:\n python create_pascal_selective_search_data.py \\\n --logtostderr \\\n --data_dir=/home/user/VOC/VOCdevkit \\\n --year=VOC2012 \\\n --set=trainval \\\n --output_dir=/home/user/VOC/proposal_data\n\"\"\"\nfr...
[ [ "tensorflow.flags.DEFINE_string", "tensorflow.gfile.GFile", "numpy.stack", "numpy.save", "numpy.fromstring", "tensorflow.gfile.MakeDirs", "tensorflow.logging.set_verbosity", "tensorflow.logging.info", "tensorflow.app.run" ], [ "tensorflow.Graph", "tensorflow.test.ma...
puszolek/holo_compression
[ "46e8001d3c6ecd23caccd9f7a7b58d1a633c17a2" ]
[ "CGH_compression/encode_bytes.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"This is an implementation of encoding algorithm for computer-generated holograms that reads bmp files and encodes them as sequences of 8 pixels written in 8-bits data.\n\nThis is a part of Bachelor's thesis: \"Design of a lossless algorithm of computer-genera...
[ [ "numpy.uint8", "numpy.zeros" ] ]
cthoung/fsic
[ "3e80d26d197ce7d9e9fad2d3101040efec008a6e" ]
[ "FSIC/io/readers.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nreaders\n=======\nFSIC module to define individual file readers.\n\n\"\"\"\n\n\nimport pandas as pd\n\nfrom FSIC.settings import dtype\n\n\ndef read_csv(path, filetype, index_col='index'):\n \"\"\"Return the contents of the delimiter-separated file in `path`.\n\n Parameters\n...
[ [ "pandas.read_csv" ] ]
andreykramer/ddsp
[ "519bdd8619f0bb77910fce9e9078646bc4655d16" ]
[ "ddsp/training/models.py" ]
[ "# Copyright 2020 The DDSP Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or a...
[ [ "tensorflow.compat.v2.train.Checkpoint", "tensorflow.compat.v2.reduce_sum" ] ]
marscher/weldx
[ "a5debd8af957009b12fd366589fed1aa41f78176" ]
[ "scripts/welding_schema.py" ]
[ "# Welding schema\nif __name__ == \"__main__\":\n\n # Imports\n from pathlib import Path\n\n import asdf\n import numpy as np\n import pandas as pd\n import sympy\n from asdf.tags.core import Software\n\n # importing the weldx package with prevalent default abbreviations\n import weldx\n ...
[ [ "pandas.timedelta_range", "pandas.Timestamp", "pandas.Timedelta" ] ]
Li-Scottech/zhusuan
[ "48c0f4e0716eb387f81ee8c3f3ca97fcf01e9d1e" ]
[ "zhusuan/evaluation.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\n\nimport six\nfrom six.moves import zip, map, range\nimport tensorflow as tf\nimport numpy as np\n\nfrom zhusuan.utils import log_mean_exp, merge_dicts\n\n\n__all__ = [\n 'is_loglikelihood'...
[ [ "numpy.log", "tensorflow.assign", "tensorflow.placeholder", "numpy.max", "numpy.mean", "tensorflow.name_scope", "numpy.exp" ] ]
ManJ-PC/Sketch_to_Photo-INESC
[ "b9a4a6f55f9c41f6a5bfab07daa00155e51a8d73" ]
[ "dataAugmentation/random_zoom.py" ]
[ "\t\n# example of zoom image augmentation\nfrom numpy import expand_dims\nfrom keras.preprocessing.image import load_img\nfrom keras.preprocessing.image import img_to_array\nfrom keras.preprocessing.image import ImageDataGenerator\nfrom matplotlib import pyplot\n# load the image\nimg = load_img('img.jpg')\n# conver...
[ [ "matplotlib.pyplot.imshow", "numpy.expand_dims", "matplotlib.pyplot.subplot", "matplotlib.pyplot.show" ] ]
sanja7s/EEDC
[ "6a9aabf61bc857ad9b54d07b256610e766a0d88d" ]
[ "src/distributions/node_plug_per_type.py" ]
[ "#!/usr/bin/env python\n# -*- coding: UTF-8 -*-\n\"\"\"\n\tauthor: sanja7s\n\t---------------\n\tplot the distribution\n\"\"\"\nimport os\nimport datetime as dt\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib\nfrom collections import defaultdict\nfrom matplotlib import c...
[ [ "matplotlib.style.use", "matplotlib.pyplot.subplots", "pandas.DataFrame", "matplotlib.pyplot.savefig", "matplotlib.pyplot.show", "matplotlib.rc" ] ]
PrendiProgramming/CTRL-C
[ "33649170f94f1bdc568163762ab2c1787f2fc948" ]
[ "datasets/gsv_dataset.py" ]
[ "import os\nimport os.path as osp\n\nimport torch\nfrom torch.utils.data import Dataset\nfrom torch.utils.data.dataloader import default_collate\nfrom torchvision.transforms import functional as F\n\nimport numpy as np\nimport numpy.linalg as LA\nimport cv2\nimport json\nimport csv\nimport matplotlib.pyplot as plt\...
[ [ "numpy.dot", "numpy.expand_dims", "numpy.radians", "numpy.minimum", "torch.zeros", "numpy.concatenate", "numpy.cross", "numpy.sin", "numpy.float32", "numpy.zeros", "numpy.random.choice", "numpy.ascontiguousarray", "numpy.array", "numpy.sum", "numpy.maxim...
haribharadwaj/codebasket
[ "f673c83d7e6b440346966775e366d198c55a0b67" ]
[ "voices/voices_stc.py" ]
[ "\"\"\"\n==================================================\nCompute MNE-dSPM inverse solution on single epochs\n==================================================\n\nCompute dSPM inverse solution on single trial epochs restricted\nto a brain label.\n\n\"\"\"\n# Author: Hari Bharadwaj <hari@nmr.mgh.harvard.edu>\n#\...
[ [ "numpy.arange", "numpy.log10", "numpy.mean", "numpy.corrcoef", "numpy.argsort", "numpy.zeros" ] ]
man4ish/GenericsAPI
[ "a00ab339156a7556b22776db2b17f504c6fe3861" ]
[ "lib/GenericsAPI/Utils/CorrelationUtil.py" ]
[ "import errno\nimport json\nimport logging\nimport os\nimport shutil\nimport traceback\nimport uuid\n\nimport pandas as pd\nimport plotly.graph_objs as go\nfrom matplotlib import pyplot as plt\nfrom plotly.offline import plot\nfrom scipy import stats\nfrom natsort import natsorted\n\nfrom installed_clients.DataFile...
[ [ "matplotlib.pyplot.switch_backend", "scipy.stats.pearsonr", "matplotlib.pyplot.subplots", "pandas.DataFrame", "matplotlib.pyplot.savefig", "matplotlib.pyplot.colorbar", "scipy.stats.linregress", "matplotlib.pyplot.clf", "pandas.read_json", "pandas.ExcelWriter", "scipy.s...
jabandersnatch/polebuilder
[ "271ca46cd878038f0fb5182d7b014ea56704587a" ]
[ "RL_Algorithms/DDPG/Buffer/buffer.py" ]
[ "\"\"\"\nBuffer system for the RL\n\"\"\"\n\nimport numpy as np\n\nimport random\nfrom collections import deque\n\n\nclass ReplayBuffer:\n \"\"\"\n Replay Buffer to store the experiences.\n \"\"\"\n\n def __init__(self, buffer_size, batch_size, buffer_unbalance_gap = 0.5):\n \"\"\"\n Initi...
[ [ "numpy.expand_dims", "numpy.sum" ] ]
xunxdd/music-generator
[ "b89c9a0a743a28a8c332bedb8ad2908b3e23c9be" ]
[ "deepmusic/modules/batchbuilder.py" ]
[ "# Copyright 2016 Conchylicultor. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ...
[ [ "numpy.random.shuffle", "numpy.ones", "numpy.argmax", "numpy.zeros", "numpy.random.randint" ] ]
HPInc/ZeroBN
[ "928a35da0f86ed840ca75fd312d1c35badba87fc", "928a35da0f86ed840ca75fd312d1c35badba87fc" ]
[ "ImageNet/train_imagenet_resnetnew_lp.py", "Cifar10/models_lp/preresnet.py" ]
[ "# Copyright (c) HP-NTU Digital Manufacturing Corporate Lab, Nanyang Technological University, Singapore.\n#\n# This source code is licensed under the Apache-2.0 license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport argparse\nimport os\nimport random\nimport shutil\nimport time\n...
[ [ "torch.multiprocessing.spawn", "torch.zeros", "torch.load", "torch.sign", "torch.utils.data.DataLoader", "torch.nn.SyncBatchNorm.convert_sync_batchnorm", "torch.no_grad", "torch.cuda.is_available", "torch.save", "torch.nn.CrossEntropyLoss", "torch.distributed.init_proce...
rendner/pandas
[ "bef454f0893efe2fa5e49317635f89c03467d16e", "bef454f0893efe2fa5e49317635f89c03467d16e" ]
[ "pandas/io/sas/sasreader.py", "pandas/tests/frame/test_arithmetic.py" ]
[ "\"\"\"\nRead SAS sas7bdat or xport files.\n\"\"\"\nfrom __future__ import annotations\n\nfrom abc import (\n ABCMeta,\n abstractmethod,\n)\nfrom typing import (\n TYPE_CHECKING,\n Hashable,\n overload,\n)\n\nfrom pandas._typing import (\n CompressionOptions,\n FilePath,\n ReadBuffer,\n)\nfr...
[ [ "pandas.io.common.stringify_path", "pandas.io.sas.sas_xport.XportReader", "pandas.util._decorators.doc", "pandas.util._decorators.deprecate_nonkeyword_arguments", "pandas.io.sas.sas7bdat.SAS7BDATReader" ], [ "pandas.Series", "pandas.MultiIndex.from_tuples", "pandas.DataFrame", ...
JonathonMSmith/cdflib
[ "30fe0fdc3db0fc5d23a1caf59f72d2b038687cb1" ]
[ "cdflib/cdfwrite.py" ]
[ "\"\"\"\nThis is a python script to write a CDF file from scratch\nwithout needing to install the CDF NASA library.\nThis Python code only creates V3 CDFs.\n\n@author: Mike Liu\n\"\"\"\nfrom typing import Tuple\nimport logging\nimport numpy as np\nimport sys\nimport struct\nimport gzip\nimport hashlib\nimport platf...
[ [ "numpy.complex128", "numpy.uint32", "numpy.asarray", "numpy.uint8", "numpy.int32", "numpy.int8", "numpy.int16", "numpy.int64", "numpy.uint16", "numpy.float64", "numpy.float32" ] ]
FDUJiaG/peer_quote_data
[ "3969b13fac664b42a0fa2e87f6d6c5258741b7d1" ]
[ "op_all_tzz.py" ]
[ "import os\nimport string\nimport time\nfrom datetime import datetime\nimport numpy as np\nimport pandas as pd\nfrom common_utils import col_temp, state_dict\nfrom op_ns_data import print_info, print_new_info, find_file_path, get_col_list, get_ns_info_data, judge_df\nfrom op_ns_data import get_df_group, get_note, s...
[ [ "pandas.DataFrame" ] ]
mission-systems-pty-ltd/snark
[ "db890f73f4c4bbe679405f3a607fd9ea373deb2c" ]
[ "imaging/test/color-calc/convert/skimage/generate.py" ]
[ "#!/usr/bin/env python\n\nimport numpy as np\nimport skimage\nfrom skimage import color\nimport random\n\nrandom.seed( 0 );\n\ndef rgb2ycbcr():\n name=\"rgb2ycbcr\"\n inputs = [ ( 255, 0, 0 ),\n ( 0, 255, 0 ),\n ( 0, 0, 255 ),\n ( 12, 56, 43 ) ]\n for i in xrange( ...
[ [ "numpy.array" ] ]
galleon/bug-free-invention
[ "37bcea112da39d1390ff2b30951b36ee5dbc0e6d", "37bcea112da39d1390ff2b30951b36ee5dbc0e6d", "37bcea112da39d1390ff2b30951b36ee5dbc0e6d", "37bcea112da39d1390ff2b30951b36ee5dbc0e6d" ]
[ "skdecide/builders/discrete_optimization/ttp/ttp_parser.py", "skdecide/builders/discrete_optimization/vrp/solver/lp_vrp_iterative.py", "skdecide/hub/solver/pile_policy/pile_policy.py", "skdecide/builders/discrete_optimization/tsp/common_tools_tsp.py" ]
[ "import os, sys\nimport numpy as np\nsys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)),\"../\"))\nfrom skdecide.builders.discrete_optimization.ttp.ttp_model import TTPModel\nfolder_data = os.path.join(os.path.dirname(os.path.abspath(__file__)), \"data/\")\nfolder_data_gecco = os.path.join(os.p...
[ [ "numpy.zeros" ], [ "numpy.abs", "matplotlib.pyplot.subplots", "numpy.ones", "matplotlib.pyplot.draw", "numpy.transpose", "numpy.argsort", "matplotlib.pyplot.show", "matplotlib.pyplot.pause" ], [ "numpy.sum" ], [ "numpy.abs", "matplotlib.pyplot.subplots",...
UBC-CIC/census-explorer
[ "cb6d1d4aa7449b2a12ad1ca2fb4ba47062b5c324" ]
[ "functions/calculate_percent/calculate_percent.py" ]
[ "import pandas as pd\nimport boto3\nfrom subprocess import call\n\ndef lambda_handler(event, context):\n # clear tmp storage\n call(\"rm -rf /tmp/*\", shell=True)\n \n # get census and header data from s3\n s3 = boto3.client(\"s3\")\n s3.download_file(event[\"bucket\"], \"step-fcn-tmp/census-joine...
[ [ "pandas.read_csv" ] ]
VentCU/bbwtb
[ "0884b4299652635801765d5c679d589938036da4" ]
[ "software/control_system/sensors/pressure_sensor.py" ]
[ "#\n# Pressure Sensor Class\n# Implemented with an analog-digital converter communicating over I2C\n#\nimport board\nimport busio\nimport adafruit_ads1x15.ads1115 as ADS\nfrom adafruit_ads1x15.analog_in import AnalogIn\nfrom time import sleep\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport logging\n\np...
[ [ "numpy.square", "numpy.asarray", "numpy.arange", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show" ] ]
Venkat0273/MyStreamLitApps
[ "5077b7d07d43d8b3c9a0bc7a089f25993081601f" ]
[ "FirstApp.py" ]
[ "__author__ = 'Venkatarami Reddy'\r\nimport streamlit as st\r\nimport numpy as np\r\nimport pandas as pd\r\nimport cx_Oracle as Oracle\r\n\r\n\r\ndef db_config():\r\n engine = Oracle.makedsn(st.secrets['DB_HOST'], st.secrets['DB_PORT'], service_name=st.secrets['DB_SERVICE'])\r\n con = Oracle.connect(user=st.s...
[ [ "pandas.read_csv", "pandas.DataFrame" ] ]
201518015029022/zzzzzz
[ "a61bbb60a1035073fdb02f3af7409635dbbc1e15" ]
[ "core/networks.py" ]
[ "'''\nnetwork definitions\n'''\n\nimport itertools\n\nimport numpy as np\nimport tensorflow as tf\nfrom keras import backend as K\nfrom keras.models import Model\nfrom keras.layers import Input, Lambda\n\nfrom . import train\nfrom . import costs\nfrom .layer import stack_layers\nfrom .util import LearningHandler, m...
[ [ "numpy.empty", "tensorflow.variables_initializer", "tensorflow.train.RMSPropOptimizer", "tensorflow.Variable" ] ]
HugoBlt/deep-reinforcement-learning
[ "bc91f05dac45efbb31b831c75ed691908ae5e79c" ]
[ "p3_collab-compet/model.py" ]
[ "import numpy as np\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\ndef hidden_init(layer):\n fan_in = layer.weight.data.size()[0]\n lim = 1. / np.sqrt(fan_in)\n return (-lim, lim)\n\nclass Actor(nn.Module):\n \"\"\"Actor (Policy) Model.\"\"\"\n\n def __init__(self, state_s...
[ [ "torch.nn.BatchNorm1d", "numpy.sqrt", "torch.cat", "torch.manual_seed", "torch.nn.Linear" ] ]
Zac-HD/awra_cms
[ "ebc51df859ee665d936cf9600ea29dc8e45321d7" ]
[ "benchmarking/awrams/benchmarking/benchmark.py" ]
[ "'''\nbenchmarking setup for various comparisons\n'''\nimport pandas as pd\nimport numpy as np\nimport os\n\nimport awrams.utils.datetools as dt\nfrom awrams.utils.metatypes import ObjectDict\n\nfrom .comparison import ComparisonSet\nfrom .utils import get_catchments_by_ids, get_sites_by_ids\nfrom .model import Soi...
[ [ "pandas.io.parsers.read_csv", "pandas.DataFrame" ] ]
cjosey/PINSPEC
[ "8c4bed18097c1461b7271c1b68af6dc6f1c78806", "8c4bed18097c1461b7271c1b68af6dc6f1c78806" ]
[ "sample-input/python-scripts/heterogeneous.py", "unit-test/sample_problems.py" ]
[ "import numpy\nimport math\nimport random\nimport matplotlib.pyplot as plt\nfrom pinspec import *\nimport pinspec.process as process\nimport pinspec.plotter as plotter\nfrom pinspec.log import *\n\n\n###############################################################################\n## This python script uses PINSP...
[ [ "numpy.array" ], [ "numpy.logspace", "numpy.sqrt" ] ]
ecsnavarretemit/cmsc265-image-search-engine-skin-cli
[ "bbd5028280e40c47eb925a99babbb4e0e88f5ed9" ]
[ "run.py" ]
[ "#!/usr/bin/env python\n\n# run.py\n#\n# Author(s):\n# Exequiel Ceasar Navarrete <esnavarrete1@up.edu.ph>\n# Nelson Tejara <nhtejara@up.edu.ph>\n#\n# Licensed under MIT\n# Version 1.0.0\n\nimport os\nimport cv2\nimport fnmatch\nimport numpy as np\nfrom shutil import rmtree\n\nclass NoImagesException(Exception):...
[ [ "numpy.zeros" ] ]
psFournier/rltf
[ "d56714494f73e53ed4b41d6376d942332b406885", "aae5451415dc18deda3c0c84580df42a12dc3843" ]
[ "rltf/utils/seeding.py", "plot/dataio.py" ]
[ "# Partially based on https://github.com/openai/gym under the following license:\n#\n# The MIT License\n#\n# Copyright (c) 2016 OpenAI (http://openai.com)\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to ...
[ [ "numpy.random.RandomState" ], [ "tensorflow.Summary", "tensorflow.summary.FileWriter" ] ]
gronerl/dace
[ "886e14cfec5df4aa28ff9a5e6c0fe8150570b8c7", "886e14cfec5df4aa28ff9a5e6c0fe8150570b8c7", "886e14cfec5df4aa28ff9a5e6c0fe8150570b8c7" ]
[ "tests/intel_fpga/vector_reduce.py", "tests/numpy/rgf_exhaustivetest.py", "tests/nested_cr_test.py" ]
[ "#Sums all the element of the vector with a reduce\n\nimport dace\nimport numpy as np\nimport argparse\n\nN = dace.symbol('N')\n\n\n@dace.program\ndef vector_reduce(x: dace.float32[N], s: dace.scalar(dace.float32)):\n #transient\n tmp = dace.define_local([N], dtype=x.dtype)\n\n @dace.map\n def sum(i: _[...
[ [ "numpy.linalg.norm" ], [ "numpy.trace", "numpy.ndarray", "numpy.conjugate" ], [ "numpy.array", "numpy.ones" ] ]
chankane/pyind
[ "742bc671d3552d778024662867b64e32ae9bca9d" ]
[ "pyind/mutation.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\n\nfrom . import util\n# import util\n\n\ndef flip_bit(pop, pb):\n \"\"\"\n Flip the individual's bits\n\n Flip bits of randomly selected genes\n\n Parameters\n ----------\n pop : ndarray\n Population\n pb : float\n Probability ...
[ [ "numpy.arange", "numpy.logical_xor", "numpy.random.ranf", "numpy.random.randint" ] ]
euratom-software/msesim
[ "51a848ef444ff3a1d9a088fcecc29f57938f3c42" ]
[ "equi/check_equilibrium_sav.py" ]
[ "from scipy.io import readsav\n\nimport matplotlib.pyplot as plt\nimport numpy as np\n\n#file = '/work/sgibson/msesim/equi/MAST_equilibrium/equi_MAST_19522_t0.070.xdr'\n#file = '/work/sgibson/msesim/equi/equi_MASTU_1MA_P4_CATIA.sav'\n#file = '/work/sgibson/msesim/equi/equi_MASTU_k25_scenario_centre.sav'\nfile = '/w...
[ [ "matplotlib.pyplot.contourf", "matplotlib.pyplot.title", "scipy.io.readsav", "numpy.arange", "matplotlib.pyplot.plot", "matplotlib.pyplot.colorbar", "matplotlib.pyplot.subplot", "matplotlib.pyplot.contour", "numpy.meshgrid", "matplotlib.pyplot.show", "matplotlib.pyplot....
jlaw9/rlmolecule
[ "62da833281113fc63861f24a34b202137fdbff91" ]
[ "tests/alphazero/test_policy_wrapper.py" ]
[ "\"\"\"DB: Not spending time here recalling how to use pytest etc. Let's get the\nbasic functionality working and we can improve.\nTODO: What are the right tests here for multiple model types / input features?\"\"\"\n\nimport numpy as np\nimport pytest\nimport tensorflow as tf\nfrom tensorflow.keras import layers...
[ [ "tensorflow.keras.layers.Concatenate", "tensorflow.keras.layers.Dense", "tensorflow.keras.layers.GlobalAveragePooling1D", "tensorflow.keras.Model", "numpy.ones", "numpy.random.randn", "tensorflow.keras.layers.Input" ] ]
BAXMAY/baselines
[ "a3d96b8da4e36867f132b96dde12e68084aa75f6" ]
[ "baselines/common/retro_wrappers.py" ]
[ "from collections import deque\nimport cv2\ncv2.ocl.setUseOpenCL(False)\nfrom .atari_wrappers import WarpFrame, ClipRewardEnv, FrameStack, ScaledFloatFrame\nfrom .wrappers import TimeLimit\nimport numpy as np\nimport gym\n\n\nclass StochasticFrameSkip(gym.Wrapper):\n def __init__(self, env, n, stickprob):\n ...
[ [ "numpy.array", "numpy.random.RandomState", "numpy.random.randint" ] ]
davidalbertonogueira/SentimentAnalysis
[ "b5d45c4513ceb8c976270c317215c634e253726e" ]
[ "trainer.py" ]
[ "\nimport os\nimport sys, traceback\nimport argparse\nimport json\nimport array\nfrom tqdm import tqdm\nimport numpy as np\n\nimport torch\ncuda_available = torch.cuda.is_available()\nfrom torchtext import data, vocab\nimport torch.optim as optim\nimport torch.nn.functional as F\nimport torch.nn as nn\nfrom nn_modu...
[ [ "numpy.hstack", "torch.nn.NLLLoss", "torch.Tensor", "torch.load", "torch.no_grad", "torch.cuda.is_available", "torch.device", "sklearn.metrics.f1_score", "torch.save" ] ]
p-a-a-a-trick/ibis
[ "943347071c3f105b20ff1fb5a3332de4fd8a8e43" ]
[ "ibis/tests/expr/test_value_exprs.py" ]
[ "import functools\nimport operator\nimport uuid\nfrom collections import OrderedDict\nfrom datetime import date, datetime, time\nfrom decimal import Decimal\nfrom operator import methodcaller\n\nimport numpy as np\nimport pandas as pd\nimport pytest\nimport toolz\nfrom pytest import param\n\nimport ibis\nimport ibi...
[ [ "pandas.Timestamp", "pandas.DataFrame" ] ]
draustin/matseq
[ "16765c7c54e8ed80417b2502f1f5ef8c7640a2da" ]
[ "mathx/interpolation.py" ]
[ "import numpy as np\nimport scipy\nimport mathx\n\ndef interp_at(x, y, x_0, der=0, axis=None):\n x = np.array(x)\n y = np.array(y)\n if axis == None:\n axis = mathx.last_axis(x)\n i_0 = np.abs(x - x_0).argmin()\n i_s = max(i_0 - 1, 0)\n i_m = min(i_0 + 2, x.shape[axis])\n return scipy.in...
[ [ "numpy.abs", "numpy.clip", "scipy.interpolate.krogh_interpolate", "numpy.asarray", "numpy.arange", "numpy.ndim", "scipy.interpolate.interp1d", "numpy.floor", "numpy.angle", "numpy.array", "numpy.zeros" ] ]
daijianxin/Parser
[ "763368fb8890877694caf0281805da5351d57ef0" ]
[ "configurable.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Copyright 2016 Timothy Dozat\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n# http://www.apache.org/licenses/LICENSE-...
[ [ "tensorflow.maximum" ] ]
mobarakol/deepscm
[ "ffa5f0208c98b1f31e300f28c07c7d51090eda4a" ]
[ "deepscm/experiments/morphomnist/nf/conditional_flow_sem.py" ]
[ "import torch\nimport pyro\n\nfrom pyro.nn import pyro_method\n\nfrom pyro.distributions import Normal, TransformedDistribution\nfrom pyro.distributions.torch_transform import ComposeTransformModule\nfrom pyro.distributions.conditional import ConditionalTransformedDistribution\nfrom pyro.distributions.transforms im...
[ [ "torch.tensor", "torch.nn.Identity", "torch.cat" ] ]
FeryET/deep_utils
[ "be671aa1bfa0dfb0a2ca5675701c2383faed3e70" ]
[ "deep_utils/blocks/tf/blocks_tf.py" ]
[ "from deep_utils.utils.utils.main import shift_lst\nfrom collections import OrderedDict\n\n\nclass BlocksTF:\n @staticmethod\n def conv_norm_act(out_c, k=(3, 3), s=(1, 1), p='valid',\n norm='bn', act='relu', conv=True, index=0, conv_kwargs: dict = None,\n norm_kwargs:...
[ [ "tensorflow.keras.layers.LayerNormalization", "tensorflow.keras.layers.AveragePooling2D", "tensorflow.keras.layers.ReLU", "tensorflow.keras.layers.LeakyReLU", "tensorflow.keras.layers.Conv2D", "tensorflow.keras.Sequential", "tensorflow.keras.layers.BatchNormalization", "tensorflow....
flancian/gpt-2
[ "7a442186f370db56c70e9b7b999f8ca350e94f64" ]
[ "src/sample.py" ]
[ "import tensorflow as tf\n\nimport model\n\ndef top_k_logits(logits, k, epsilon=-1e10):\n if k == 0:\n # no truncation\n return logits\n\n def _top_k():\n values, _ = tf.nn.top_k(logits, k=k)\n min_values = values[:, -1, tf.newaxis]\n return tf.where(\n logits < m...
[ [ "tensorflow.TensorShape", "tensorflow.nn.softmax", "tensorflow.fill", "tensorflow.concat", "tensorflow.sort", "tensorflow.equal", "tensorflow.cast", "tensorflow.ones_like", "tensorflow.squeeze", "tensorflow.nn.top_k", "tensorflow.reduce_min", "tensorflow.name_scope"...
quic-tsinghal/aimet
[ "01a628694ce08f5da3a2b588bfdd4a3fa9c5b3bc" ]
[ "TrainingExtensions/torch/src/python/aimet_torch/onnx_utils.py" ]
[ "# /usr/bin/env python3.5\n# -*- mode: python -*-\n# =============================================================================\n# @@-COPYRIGHT-START-@@\n#\n# Copyright (c) 2017-2020, Qualcomm Innovation Center, Inc. All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without...
[ [ "torch.onnx.export" ] ]
mindspore-ai/mindinsight
[ "8c57fdd62eb7f8653662be2208633386ac82e8d7" ]
[ "mindinsight/domain/graph/pb_parser.py" ]
[ "# Copyright 2021 Huawei Technologies Co., Ltd\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable l...
[ [ "numpy.array" ] ]
JloveU/TrafficVisualization
[ "cc6b2ae1db3007a28feedcc139e4c3f0b46b44cf" ]
[ "tests/GeoJsonGenerator/GeoJsonGenerator.py" ]
[ "import os\nimport sys\nimport argparse\nimport geojson\nimport json\nimport numpy as np\nfrom matplotlib import image\n\n\ndef main():\n parser = argparse.ArgumentParser()\n parser.add_argument(\"--image\", type=str, default=\"GoogleSatellite-x215782-y99255-z18.jpg\", help=\"the base map image\")\n parser...
[ [ "matplotlib.image.imread" ] ]
clarencechen/max-deeplab
[ "238d2286fdd12ffb526ad48319177647af6ce6c7" ]
[ "max_deeplab/blocks.py" ]
[ "import math\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom einops import rearrange\n\n__all__ = ['linear_bn_relu', 'conv_bn_relu', 'InceptionStem', 'AxialMultiHeadAttention',\n'AxialBottleneck', 'DualPathXF', 'DecoderBottleneck', 'MaskHead']\n\nclass linear_bn_relu(nn.Module):\n \"\...
[ [ "torch.nn.BatchNorm1d", "torch.nn.Sequential", "torch.nn.functional.softmax", "torch.cat", "torch.einsum", "torch.randn", "torch.nn.Conv2d", "torch.arange", "torch.nn.Linear", "torch.nn.MaxPool2d", "torch.nn.Conv1d", "torch.nn.Upsample", "torch.nn.AvgPool2d", ...
mkoivi-ms/InnerEye-DeepLearning
[ "5879efe407ed411eb8393d6bd30757d0d775b863", "5879efe407ed411eb8393d6bd30757d0d775b863" ]
[ "Tests/ML/test_model_training.py", "Tests/ML/reports/test_segmentation_report.py" ]
[ "# ------------------------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.\n# -----------------------------------------------------------...
[ [ "numpy.expand_dims", "numpy.resize", "numpy.allclose", "numpy.array_equal" ], [ "pandas.option_context" ] ]
rafikg/Colorize_grayscale_image
[ "36368038efd241ed38865f30941dfda3b58cee94" ]
[ "model/testing.py" ]
[ "import tensorflow as tf\nimport matplotlib.pyplot as plt\nimport glob\nfrom utils import rgb_to_lab, lab_to_rgb\nfrom model import ColorizeGrayScale\nfrom config import reg\nfrom data import normalize_rgb\n\nfrom keras import backend as K\n\nK.clear_session()\n\n# load all images\nimage_files = glob.glob('../image...
[ [ "tensorflow.image.resize_with_crop_or_pad", "tensorflow.stack", "tensorflow.reshape", "tensorflow.expand_dims", "tensorflow.image.rgb_to_grayscale", "tensorflow.io.read_file", "matplotlib.pyplot.show", "tensorflow.image.decode_jpeg" ] ]
iamgroot42/robustness
[ "6fbb4a68b10c905a931d6251ab48503c185ad935" ]
[ "robustness/cifar_models/resnet.py" ]
[ "'''ResNet in PyTorch.\nFor Pre-activation ResNet, see 'preact_resnet.py'.\nReference:\n[1] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun\n Deep Residual Learning for Image Recognition. arXiv:1512.03385\n'''\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom ..tools.custom_modules im...
[ [ "torch.nn.Sequential", "torch.randn", "torch.nn.functional.avg_pool2d", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.functional.relu", "torch.nn.BatchNorm2d" ] ]
Malekhy/ws2122-lspm
[ "e4dc8b801d12f862b8ef536a0f125f346f085a00", "e4dc8b801d12f862b8ef536a0f125f346f085a00" ]
[ "ws2122-lspm/Lib/site-packages/pm4py/algo/discovery/ocel/interleavings/utils/merge_dataframe_rel_cases.py", "ws2122-lspm/Lib/site-packages/pm4py/visualization/graphs/variants/dates.py" ]
[ "'''\n This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).\n\n PM4Py is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your optio...
[ [ "pandas.concat" ], [ "matplotlib.pyplot.title", "matplotlib.pyplot.semilogx", "matplotlib.use", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "matplotlib.get_backend", "matplotlib.pyplot.clf", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.xticks", "matplot...
charlie-may86/lambdata-pt6
[ "e1a963fcbcb451709a9260ac8d593f7146b4cdc6" ]
[ "my_lambdata6/assignment.py" ]
[ "from pandas import DataFrame\n\n\ndef add_state_names_column(my_df):\n \"\"\"[This functions adds a column of corresponding state names to a df\n that has state abbrv]\n\n Args:\n my_df ([DataFrame]): [a DataFrame with a column called abbrev that has\n state abbreviations]\n\n Return:\n ...
[ [ "pandas.DataFrame" ] ]
Varnani/PyWD2015
[ "26def706610cabd63d00e6dc2ad1764e9cd8b2a0" ]
[ "src/interfaces.py" ]
[ "from PyQt4 import QtGui, QtCore, QtOpenGL\nimport numpy\nfrom matplotlib import pyplot, gridspec\nfrom matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas\nfrom matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar\nfrom matplotlib.figure import Figure\nfrom gu...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.gca", "matplotlib.backends.backend_qt4agg.NavigationToolbar2QT", "matplotlib.backends.backend_qt4agg.FigureCanvasQTAgg", "matplotlib.figure.Figure", "matplotlib.pyplot.cla", "matplotlib.pyplot.plot", "matplotlib.pyplot.get_current_fig_...
1991wangliang/EasyOCR
[ "a372c1b8bfded47f25b3ff17c07c4563d353a99a", "a372c1b8bfded47f25b3ff17c07c4563d353a99a" ]
[ "easyocr/model/model.py", "easyocr/detection.py" ]
[ "import torch.nn as nn\nfrom modules import ResNet_FeatureExtractor, BidirectionalLSTM\n\nclass Model(nn.Module):\n\n def __init__(self, input_channel, output_channel, hidden_size, num_class):\n super(Model, self).__init__()\n \"\"\" FeatureExtraction \"\"\"\n self.FeatureExtraction = ResNet...
[ [ "torch.nn.Linear", "torch.nn.AdaptiveAvgPool2d" ], [ "torch.load", "torch.quantization.quantize_dynamic", "torch.no_grad", "torch.nn.DataParallel", "numpy.array" ] ]
danieldeer/amaz3dsim
[ "7ec18e914099932c07117b64ee22fc5a2bf423da" ]
[ "Link.py" ]
[ "import numpy\n\nimport Configuration\n\n\nclass Link:\n\n def __init__(self, identifier, start_node, end_node, capacity):\n self.identifier = identifier\n\n self.start_node = start_node\n self.start_node.add_outgoing_link(self)\n\n self.end_node = end_node\n self.end_node.add_...
[ [ "numpy.sqrt" ] ]
yarikoptic/nipy
[ "5a3f080f2504f8b2c326677ea2e3101344b3f579", "5a3f080f2504f8b2c326677ea2e3101344b3f579" ]
[ "nipy/labs/bindings/setup.py", "nipy/labs/group/setup.py" ]
[ "# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\nimport os, sys\n\ndef configuration(parent_package='',top_path=None):\n from numpy.distutils.misc_util import Configuration\n config = Configuration('bindings', parent_package, top_path)\n c...
[ [ "numpy.distutils.system_info.get_info", "numpy.distutils.misc_util.Configuration" ], [ "numpy.distutils.system_info.get_info", "numpy.distutils.misc_util.Configuration" ] ]
ColoredInsaneAsylums/PrivacySensitiveTranscription
[ "07cf8f8da222b606988e7b4dee6a6bffdd0b6fe6" ]
[ "image_processing/evaluation/compare-features.py" ]
[ "import argparse\nimport cv2\nimport _pickle as pickle\n\nfrom scipy.spatial import distance\n\n# find the most similar images given a query image\ndef main(feat_path, images_path):\n print('[INFO] Working...')\n\n # similarity threshold\n threshold = 0.6\n\n # load feature vectors\n print('[INFO] Lo...
[ [ "scipy.spatial.distance.braycurtis" ] ]
pyplati/platipy
[ "b83790b3958a85e7f7d5ff6aec833fe2ed9b0a75" ]
[ "platipy/imaging/projects/cardiac/run.py" ]
[ "# Copyright 2020 University of New South Wales, University of Sydney, Ingham Institute\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENS...
[ [ "numpy.product" ] ]
shane-breeze/zdb-analysis
[ "d00b154368e0bcde6a2415727d8ba7012521fba1", "d00b154368e0bcde6a2415727d8ba7012521fba1" ]
[ "zdb/modules/draw.py", "zdb/scripts/zdb_skim.py" ]
[ "import os\nimport copy\nimport pysge\nimport oyaml as yaml\nimport numpy as np\nimport pandas as pd\n\nfrom zdb.modules.multirun import multidraw\n\ndef parallel_draw(drawer, jobs, mode, ncores, batch_opts):\n if len(jobs)==0:\n return\n\n njobs = ncores\n if mode in [\"multiprocessing\"]:\n ...
[ [ "pandas.read_hdf", "numpy.array_split", "pandas.concat" ], [ "numpy.array_split" ] ]
flome/uproot
[ "eb2ae1ffe6fb2c2ce8cb7cbdc0919d5b51c0ff0f" ]
[ "uproot/source/compressed.py" ]
[ "#!/usr/bin/env python\n\n# BSD 3-Clause License; see https://github.com/scikit-hep/uproot/blob/master/LICENSE\n\nfrom __future__ import absolute_import\n\nimport struct\nfrom copy import copy\n\nimport numpy\n\nimport uproot.const\nimport uproot.source.source\n\nclass Compression(object):\n # makes __doc__ attr...
[ [ "numpy.frombuffer", "numpy.empty" ] ]
sciforce/phones-las
[ "f95523fbbdf1dd7f1acce5b25c37b620f3eb8e9b", "f95523fbbdf1dd7f1acce5b25c37b620f3eb8e9b" ]
[ "utils/features_utils.py", "utils/vocab_utils.py" ]
[ "import tensorflow as tf\nimport joblib\n\n\ndef calculate_mfcc_op(sample_rate, coeffs, window, step, mels):\n def _mfcc_op(input_tensor):\n spectrograms = tf.contrib.signal.stft(input_tensor, frame_length=window, frame_step=step, fft_length=window)\n magnitude_spectrograms = tf.abs(spectrograms)\n...
[ [ "tensorflow.contrib.signal.linear_to_mel_weight_matrix", "tensorflow.gfile.Open", "tensorflow.contrib.signal.stft", "tensorflow.log", "tensorflow.contrib.signal.mfccs_from_log_mel_spectrograms", "tensorflow.tensordot", "tensorflow.abs" ], [ "tensorflow.io.gfile.GFile", "ten...
schwille-paint/SPT
[ "e48c10402ae65b284acd9d049472a278462fe4cd" ]
[ "scripts/workflow/02_linklocs.py" ]
[ "import os\nimport pandas as pd\nimport importlib\nimport traceback\n\nimport picasso.io as io\nimport spt.linklocs as linklocs\n\nimportlib.reload(linklocs)\n\n######################################## Define data (locs)\ndir_names=[]\nfile_names=[]\n\n### Old file\n# dir_names.extend(['/fs/pool/pool-schwille-paint...
[ [ "pandas.DataFrame" ] ]
rhong3/LUAD
[ "5c31213697b45df96d507847788e61185805c3c2" ]
[ "Scripts/Accessory2.py" ]
[ "\"\"\"\nCalculation of metrics including accuracy, AUROC, and PRC and outputing CAM of tiles 2.0\n\nCreated on 04/26/2019\n\n@author: RH\n\"\"\"\nimport matplotlib\nmatplotlib.use('Agg')\nimport os\nimport numpy as np\nimport sklearn.metrics\nfrom scipy import interp\nimport matplotlib.pyplot as plt\nimport pandas...
[ [ "matplotlib.pyplot.legend", "numpy.dot", "numpy.linspace", "numpy.asarray", "numpy.squeeze", "matplotlib.pyplot.step", "pandas.DataFrame", "matplotlib.pyplot.plot", "numpy.max", "numpy.round", "numpy.zeros_like", "numpy.hstack", "numpy.reshape", "matplotlib....
SamarthVadia/OpenFermion
[ "865d8591cad9b0681f6dd25a391a5292ed2de1d4" ]
[ "src/openfermion/ops/operators/symbolic_operator_test.py" ]
[ "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software...
[ [ "numpy.complex128", "numpy.sqrt", "numpy.float64" ] ]
mpicbg-csbd/structured_N2V
[ "82c2a0f98d354a1afeff2deab3b04fb7cfc4b21f" ]
[ "src/n2v2_flower.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torchsummary import summary\n\nimport sys\n# import ipdb\nimport itertools\nimport warnings\nimport shutil\nimport pickle\n\nfrom pprint import pprint\nfrom types import SimpleNamespace\nfrom math import floor,ceil\nfrom pathli...
[ [ "matplotlib.pyplot.legend", "torch.abs", "numpy.linspace", "torch.load", "torch.zeros", "numpy.fft.fftshift", "numpy.concatenate", "matplotlib.pyplot.plot", "torch.no_grad", "numpy.random.randint", "torch.nn.init.calculate_gain", "torch.ones", "numpy.arange", ...
mhe500/tf-agents
[ "1c4f2a0dd0abf3795a221dfc8a1771cff0e6ebb9" ]
[ "tf_agents/bandits/agents/greedy_reward_prediction_agent.py" ]
[ "# coding=utf-8\n# Copyright 2018 The TF-Agents Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b...
[ [ "tensorflow.cast", "tensorflow.Module.__init__", "tensorflow.compat.v2.summary.scalar", "tensorflow.debugging.check_numerics", "tensorflow.name_scope", "tensorflow.GradientTape" ] ]
ys1998/tactile-shape-recognition
[ "b5ab6f1cdf04ff23e14b467a590533e7ee740b52" ]
[ "GUI/other/single_sensor.py" ]
[ "# -*- coding: utf-8 -*-\n\n# Form implementation generated from reading ui file 'interface.ui'\n#\n# Created by: PyQt5 UI code generator 5.10.1\n#\n# WARNING! All changes made in this file will be lost!\nimport os, sys, glob\nfrom PyQt5 import QtCore, QtGui, QtWidgets\nfrom PyQt5.uic import loadUiType\nimport nump...
[ [ "numpy.zeros", "numpy.full" ] ]
HUST-NingKang-Lab/EXPERT
[ "34937cf30a20c0fa9e85c37e5455cbba33fbd023" ]
[ "expert/CLI/main_convert.py" ]
[ "from expert.src.utils import samples_to_countmatrix, merge_countmatrices, scale_abundance\r\nfrom expert.src.preprocessing import Transformer\r\nfrom expert.CLI.CLI_utils import find_pkg_resource\r\nimport pandas as pd\r\nfrom tqdm import tqdm\r\nimport numpy as np\r\n\r\n\r\ndef convert(cfg, args):\r\n\tprint('ru...
[ [ "pandas.read_csv" ] ]
LiamGon/BML_project_BayesNN
[ "49e374dd6b7b7ce09a774fb95c6b659de4854752" ]
[ "experiments/comparison_bias_2d.py" ]
[ "# Copyright 2018 Alexander Matthews\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agre...
[ [ "numpy.abs", "numpy.linspace", "numpy.reshape", "torch.manual_seed", "torch.from_numpy", "numpy.ceil", "torch.set_num_threads" ] ]
utagoeinc/ObjectDetectionAnnotationTools
[ "8c0726b96aa9f17985af4fb26b66e4cc95765a9b" ]
[ "YoloBoundingBoxChecker/yolo_boundingbox_checker.py" ]
[ "# python3 yolo_boundingbox_checker.py -i images -l labels -o output -c predefined_classes.txt\n\n\nimport os\nimport imghdr\nimport argparse\nimport colorsys\nimport random\nimport numpy as np\n\nfrom PIL import Image, ImageDraw, ImageFont, ImageFilter\n\nparser = argparse.ArgumentParser(description='...')\nparser...
[ [ "numpy.array", "numpy.floor" ] ]
ajaysaini725/composer
[ "00fbf95823cd50354b2410fbd88f06eaf0481662" ]
[ "composer/algorithms/cutout/cutout.py" ]
[ "# Copyright 2021 MosaicML. All Rights Reserved.\n\nimport logging\nfrom dataclasses import asdict, dataclass\nfrom typing import Optional\n\nimport numpy as np\nimport torch\nimport yahp as hp\n\nfrom composer.algorithms import AlgorithmHparams\nfrom composer.core.types import Algorithm, Event, Logger, State, Tens...
[ [ "numpy.random.randint", "torch.ones_like", "numpy.clip" ] ]
pennfranc/darts
[ "5234916f18c525fb41414d67cc5ac7e5a49c5e6a", "5234916f18c525fb41414d67cc5ac7e5a49c5e6a" ]
[ "darts/tests/test_local_forecasting_models.py", "darts/tests/test_metrics.py" ]
[ "import shutil\n\nimport numpy as np\nimport pandas as pd\n\nfrom .base_test_class import DartsBaseTestClass\nfrom ..timeseries import TimeSeries\nfrom ..utils import timeseries_generation as tg\nfrom ..metrics import mape\nfrom ..models import NaiveSeasonal, ExponentialSmoothing, ARIMA, Theta, FourTheta, FFT\nfrom...
[ [ "pandas.read_csv", "numpy.random.seed", "pandas.Timestamp" ], [ "numpy.arange", "numpy.mean", "numpy.random.rand", "pandas.date_range" ] ]
hanee211/paper14
[ "edb0739e879284aaa2b03b41252b1d4a724bb01d" ]
[ "generate_sentence_from_vector.py" ]
[ "import numpy as np\r\nimport tensorflow as tf\r\nimport helpers\r\nimport sys\r\nfrom tensorflow.contrib.rnn import LSTMCell, LSTMStateTuple\r\nfrom model import Model\r\nimport word_processing as wp\r\nimport myconf as cf\r\n\r\n\r\ndef test():\r\n\tprint(\"start Testing!!\")\r\n\t\r\n\trestore = True\r\n\r\n\tar...
[ [ "tensorflow.train.Saver", "tensorflow.global_variables_initializer", "tensorflow.ConfigProto", "numpy.loadtxt" ] ]
ashleefv/ApplNumComp
[ "ebe2ac0d08111aee58b8421cd2d8e4dee2b84662" ]
[ "CHEclassFa20/In Class Problem Solutions/Python/ODEParamEstimExample1.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Wed Oct 7 08:25:49 2020\r\n@author: Ashlee\r\nODE Example 1\r\n$\\frac{dx}{dt} = b1-b2*x\r\n\"\"\"\r\n\r\nimport numpy as np\r\nfrom scipy.optimize import curve_fit\r\nfrom scipy.integrate import odeint\r\nimport matplotlib.pyplot as plt\r\n\r\n# Data for example 1\...
[ [ "matplotlib.pyplot.legend", "numpy.linspace", "scipy.integrate.odeint", "matplotlib.pyplot.plot", "numpy.zeros", "matplotlib.pyplot.xlabel", "numpy.array", "scipy.optimize.curve_fit", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
mccalluc/cs-classics
[ "f9756199ff8ab4489c34dc941bf98ac172113ae2" ]
[ "plot_languages.py" ]
[ "import numpy as np\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nimport pylab\n\nfrom matplotlib.ticker import FormatStrFormatter\n\nimport sys\nimport pandas\nimport re\nfrom cycler import cycler\n\nif __name__ == '__main__':\n df = pandas.read_csv(sys.argv[1], sep='\\t')\n df = df[df['type'] == ...
[ [ "matplotlib.pyplot.legend", "pandas.read_csv", "matplotlib.pyplot.title", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "matplotlib.pyplot.subplots_adjust", "matplotlib.ticker.FormatStrFormatter", "matplotlib.pyplot.figure" ] ]
ussamazahid96/quad96
[ "f30929342da4c44b1c05ce03a5b484be2eac7925" ]
[ "quad96/training/agent.py" ]
[ "import os\nimport random\nimport numpy as np\nfrom collections import deque, namedtuple\n\nfrom simulator.utils import deg2rad\nfrom training.actor_critic import Actor, Critic\nfrom training.replay_buffer import PERBuffer\n\n__author__ = \"Ussama Zahid\"\n__email__ = \"ussamazahid96@gmail.com\"\n\n\n# defination f...
[ [ "numpy.hstack", "numpy.minimum", "numpy.clip", "numpy.reshape", "numpy.random.normal", "numpy.zeros" ] ]
skaws2003/DeepMaple
[ "f28f2280ed6260aefb942fa485aed41428517ee4" ]
[ "MapleGrab/MapleGrab/ArrowTrain.py" ]
[ "import tensorflow as tf\nimport numpy as np\nimport ArrowNet\nimport ArrowClassifier\nimport ArrowEdge\nimport matplotlib.pyplot as plt\nimport random\nimport cv2\nimport glob\n\n# Hyperparameters\nlearning_rate = 0.01\ntrain_batch_size = 16\nval_batch_size = 50\ntraining_epoches = 500\nsaving_epoches = 10\nARROW_...
[ [ "numpy.stack", "matplotlib.pyplot.plot", "tensorflow.global_variables_initializer", "numpy.mean", "tensorflow.Session", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
thisHermit/yellowbrick
[ "1bb171cafb468ea6867668099c1b4a0f23db2b79" ]
[ "yellowbrick/text/postag.py" ]
[ "# yellowbrick.text.postag\n# Implementation of part-of-speech visualization for text.\n#\n# Author: Rebecca Bilbro\n# Created: 2019-02-18 13:12\n#\n# Copyright (C) 2019 The scikit-yb developers\n# For license information, see LICENSE.txt\n#\n# ID: postag.py bilbro@gmail.com $\n\n\"\"\"\nImplementation of part-o...
[ [ "numpy.array", "numpy.sum", "numpy.unique" ] ]
collinsnji/machine-learning
[ "694a38ee080c333cd575faf1f920d03042e961cf" ]
[ "happiness_analysis.py" ]
[ "import pandas as pd\nimport numpy as np \nimport matplotlib.pyplot as plt\n# import tensorflow as tf\n# import sonnet as snt \n\ndataframe = pd.read_fwf('data/happiness_analysis/2015_clean.csv') #.to_string(index=False)\n\nhappiness_score = dataframe.as_matrix(['Happiness.Score'])\neconomy_gdp = dataframe.as_matri...
[ [ "matplotlib.pyplot.gca", "pandas.read_fwf", "matplotlib.pyplot.subplots", "matplotlib.pyplot.grid", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
scalfs/voxsrc21-dia
[ "244b8aa9facfcd5652d4e5fd0a6e4592e84691ba" ]
[ "uis-rnn/contrib.py" ]
[ "import numpy as np\n\n\ndef estimate_crp_alpha(train_cluster_id, search_range=1, search_step=0.01):\n \"\"\"Iterate through a range of alpha, return alpha with maximum cdf P{Y|Z}.\n Args:\n train_cluster_id: same as train_cluster_id in demo.py. See `demo.py` for\n details.\n search_range: the rang...
[ [ "numpy.ceil", "numpy.zeros" ] ]
lukassnoek/FEED_behav_analyses
[ "7530bc0d9fe0b1dd0d4b45529f762458c0529f8c" ]
[ "src/data_io.py" ]
[ "import sys\nimport logging\nimport os.path as op\nimport pandas as pd\nimport numpy as np\nfrom tqdm import tqdm \nfrom copy import copy\nfrom sklearn.preprocessing import OneHotEncoder, LabelEncoder\nfrom sklearn.model_selection import train_test_split\n\nsys.path.append('src')\nfrom noise_ceiling import convert_...
[ [ "pandas.concat", "pandas.read_csv", "sklearn.preprocessing.OneHotEncoder", "pandas.option_context", "sklearn.model_selection.train_test_split", "sklearn.preprocessing.LabelEncoder" ] ]
CarlosPena00/pytorch-unet
[ "8365bace23e4b04b9c5b75cd6720807ea8cac5ab", "8365bace23e4b04b9c5b75cd6720807ea8cac5ab" ]
[ "torchlib/models/ssegnet.py", "torchlib/static_fusion.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.init as init\n\n__all__ = ['SSegNet', 'ssegnet']\n\ndef ssegnet(pretrained=False, **kwargs):\n model = SSegNet(**kwargs)\n\n return model\n\nclass SSegNet(nn.Module):\n \"\"\"Simpler Segmentation\"\"\"\n def __init__(self, in_channels=3, num_classes=...
[ [ "torch.nn.Conv2d", "torch.nn.LeakyReLU", "torch.nn.BatchNorm2d", "torch.nn.init.constant", "torch.nn.init.xavier_normal" ], [ "numpy.array", "numpy.zeros_like" ] ]
mlxyz/insynth
[ "0d2ad6d6177944978e6d85990b9991a614d75b68", "0d2ad6d6177944978e6d85990b9991a614d75b68" ]
[ "insynth/calculators/abstract_calculator.py", "experiments/old_coverage_calculators.py" ]
[ "# Copyright (c) 2022, Chair of Software Technology\n# All rights reserved.\n# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n#\n# - Redistributions of source code must retain the above copyright notice, this list o...
[ [ "numpy.prod", "tensorflow.keras.models.Model" ], [ "tensorflow.keras.models.Model", "numpy.isnan", "numpy.argwhere", "numpy.argpartition", "numpy.prod" ] ]
drfoland/test-repo
[ "4d7e8bf8a77d6984bb8afc83c46de7cc1d273c53" ]
[ "week_3/weekly-exercises/insertionSort.py" ]
[ "### This is my own insertionSort code completed as an eLearning exercise.\n\n\n\"\"\"\nmain() function is used to demonstrate the sort() function\nusing a randomly generated list.\n\"\"\" \ndef main():\n\t### List Initialization\n\tfrom numpy import random\n\n\tLENGTH = 6\n\n\tlist = []\n\n\tfor num in range(LENGT...
[ [ "numpy.random.randint" ] ]