repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
brunompacheco/part-counting
[ "dbf71e7465c8e384e3c60694f65819a65742193b", "dbf71e7465c8e384e3c60694f65819a65742193b", "dbf71e7465c8e384e3c60694f65819a65742193b" ]
[ "src/features/base.py", "src/data/base.py", "src/visualization/test_results.py" ]
[ "from pathlib import Path\n\nimport numpy as np\nimport open3d as o3d\nimport torch\n\nfrom src.data.rgbd import load_rgbd\nfrom src.data.pcd import load_pcd\nfrom .cropping import mask_selection_volume, box_mask_from_rgbd\n\n\ndef preprocess_box_for_cv(img_fpath: Path) -> o3d.geometry.PointCloud:\n \"\"\"Load a...
[ [ "torch.device", "numpy.array", "torch.cuda.is_available" ], [ "numpy.concatenate", "numpy.arange", "torch.utils.data.Subset", "numpy.moveaxis" ], [ "pandas.concat", "pandas.Series", "matplotlib.pyplot.annotate", "matplotlib.pyplot.subplots", "pandas.DataFram...
carefree0910/carefree-flow
[ "7035015a072cf8142074d01683889f90950d2939", "7035015a072cf8142074d01683889f90950d2939" ]
[ "cflow/misc/internal_/data.py", "cflow/misc/toolkit.py" ]
[ "import os\n\nimport numpy as np\n\nfrom abc import abstractmethod\nfrom abc import ABCMeta\nfrom typing import Any\nfrom typing import Dict\nfrom typing import Type\nfrom typing import Tuple\nfrom typing import Callable\nfrom typing import Optional\nfrom cftool.misc import Saving\nfrom oneflow.utils.data import Da...
[ [ "numpy.arange", "numpy.random.multinomial", "numpy.random.shuffle" ], [ "numpy.linspace", "numpy.arange", "numpy.issubdtype", "matplotlib.pyplot.plot", "numpy.max", "numpy.array", "numpy.exp", "matplotlib.pyplot.figure" ] ]
TheMarex/charge
[ "85e35f7a6c8b8c161ecd851124d1363d5a450573" ]
[ "src/python/numeric.py" ]
[ "import numpy as np\n\nfrom functions import make_piecewise_linear, PiecewiseFunction, LinearFunction\n\ndef link_consumption(T, f, g, M):\n L = f(T)\n R = g(T)\n max_t_idx = np.iinfo(np.dtype('uint32')).max\n opt_H = np.full_like(L, float('inf'))\n opt_delta_idx = np.full_like(L, max_t_idx, dtype='u...
[ [ "numpy.maximum", "numpy.dtype", "numpy.full_like", "numpy.argmax", "numpy.roll" ] ]
NengLu/topopy
[ "df61e8133ca921daf7d9980d122a2afc5e1ad925" ]
[ "test/temp/test_07_Network_stream_poi.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on September 25, 2018\nTesting suite for topopy.Flow.get_stream_poi() function\n@author: J. Vicente Perez\n@email: geolovic@hotmail.com\n@date: September 25, 2018\n\"\"\"\n\nimport unittest\nimport sys\nimport numpy as np\n# Add to the path code fold...
[ [ "numpy.array_equal" ] ]
Foltrex/bsu
[ "769ddac58eddd5877e40949227998575fd4dec77" ]
[ "architecture/lab3-poisson/task.py" ]
[ "from math import sin\n\nimport numpy as np\nfrom mpi4py import MPI\n\n\nclass Task:\n f = staticmethod(lambda x, y: x * y)\n f_left = f1 = staticmethod(lambda y: y ** 2)\n f_right = f2 = staticmethod(lambda y: sin(y))\n f_bottom = f3 = staticmethod(lambda x: x ** 3)\n f_top = f4 = staticmethod(lambd...
[ [ "numpy.zeros" ] ]
georgiarichards/otc_codeine
[ "a05a6d23b24c250fb0f8cc5367919a12979870c5" ]
[ "figures_otc.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# # This notebook graphs the sales and expenditure data of OTC codeine for 31 countries\n\n# In[1]:\n\n\nimport pandas as pd\nimport numpy as np\nimport seaborn as sns\nimport matplotlib.pyplot as plt\n \n#and make the plots appear in the notebook\nget_ipython().run_line_m...
[ [ "matplotlib.pyplot.legend", "pandas.read_csv", "matplotlib.pyplot.figure", "matplotlib.pyplot.savefig", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.ylabel" ] ]
marcdemers/pytorch_geometric_temporal
[ "2c99d690cf183e6c9e7ff40d15ba2f8b875c1aaf" ]
[ "torch_geometric_temporal/nn/recurrent/gconv_gru.py" ]
[ "import torch\nfrom torch_geometric.nn import ChebConv\n\n\nclass GConvGRU(torch.nn.Module):\n r\"\"\"An implementation of the Chebyshev Graph Convolutional Gated Recurrent Unit\n Cell. For details see this paper: `\"Structured Sequence Modeling with Graph\n Convolutional Recurrent Networks.\" <https://arx...
[ [ "torch.tanh", "torch.sigmoid", "torch.zeros" ] ]
Exorust/Discrete-Event-Simulation
[ "1d5d43c88521db7c0e010966f6df685256492d71" ]
[ "Process Generation Script.py" ]
[ "import numpy as np\n# exp_dist <-> f(x, beta) = (1/beta) * exp(-(1/beta) * x)\nbeta = 10\nprocess_count = 20\na=np.round(np.random.exponential(scale=beta, size=(process_count,2)))\nnp.savetxt(\"process.csv\", a, delimiter=\",\",fmt=\"%i\")\n\n# Generates Arrival time and burst time\n" ]
[ [ "numpy.savetxt", "numpy.random.exponential" ] ]
waterahr/HR-Net
[ "52f8d9d8837fca1307aff4df4ed676cab2bb296a", "52f8d9d8837fca1307aff4df4ed676cab2bb296a", "52f8d9d8837fca1307aff4df4ed676cab2bb296a" ]
[ "src/network/hiarBayesGoogLenet_gap_v4.py", "src/train_berk.py", "src/extract_feature.py" ]
[ "import sys\nsys.path.append(\"..\")\nimport os\nfrom keras.models import Model\nfrom keras.layers import Activation, Input, Flatten, Dense, Dropout, BatchNormalization, Conv2D, MaxPooling2D, AveragePooling2D, concatenate, GlobalAveragePooling2D, Lambda\nfrom keras.layers.convolutional import Conv2D, MaxPooling2D, ...
[ [ "numpy.load" ], [ "pandas.read_csv", "numpy.array", "numpy.zeros", "sklearn.model_selection.train_test_split" ], [ "numpy.array", "numpy.zeros", "pandas.read_csv" ] ]
rabaneda/S1chain
[ "b2c0c2efc6b8b09c92f66d5e10074f3c1df04e03" ]
[ "source/winddir.py" ]
[ "\"\"\"\nCreated on Wed May 20 15:52:47 2020\n\n@author: Alberto\n\"\"\"\n\nimport numpy as np\nimport scipy.stats as st\nfrom nc_methods import NetCDFManager\nimport warnings\n\n#------------------------------------------------------------------------------\n\nclass WIND(NetCDFManager):\n \n kernels = {'op_s...
[ [ "numpy.degrees", "numpy.cos", "numpy.ones", "numpy.sin", "numpy.tanh", "numpy.mean", "numpy.transpose", "numpy.exp", "numpy.angle", "numpy.array", "numpy.zeros" ] ]
jsandersen/CMT
[ "1be6e36b9a6042386395bc654c9dd4b579e6ce6d", "1be6e36b9a6042386395bc654c9dd4b579e6ce6d" ]
[ "training/Toxic_CNN2_MCD.py", "training/IMDB_CNN2_BBB.py" ]
[ "import tensorflow as tf\ntf.compat.v1.disable_v2_behavior()\n\nfrom src.datasets.toxic import Toxic\nfrom src.datasets.util import splits\nfrom src.models.cnn2 import getCNN2\nfrom src.models.embedding import * \nfrom src.models.predict import predict_mcdropout\nimport yaml\n\nimport pandas as pd\nimport tensorflo...
[ [ "tensorflow.keras.models.load_model", "pandas.concat", "tensorflow.compat.v1.disable_v2_behavior" ], [ "pandas.concat", "tensorflow.keras.optimizers.Adadelta", "tensorflow.compat.v1.disable_v2_behavior" ] ]
arti1117/python-machine-learning-pandas-data-analytics
[ "132b0f3326aeb028348bc9e07d38d18e4ec2e18e" ]
[ "PART04/23_matplotlib_pie.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sun Aug 9 19:22:34 2020\n\n@author: arti\n\"\"\"\n\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\nplt.style.use('default')\n\ndf = pd.read_csv('./auto-mpg.csv', header=None)\n\ndf.columns = ['mpg', 'cylinders', 'displacement', 'horsepow...
[ [ "matplotlib.pyplot.legend", "pandas.read_csv", "matplotlib.pyplot.title", "matplotlib.pyplot.axis", "matplotlib.pyplot.show", "matplotlib.pyplot.style.use" ] ]
andypbarrett/nsidc-seaice
[ "167a16309f7eaadd5c613b54a7df26eb1f48c2f3" ]
[ "seaice/data/test/test_regression/test_api.py" ]
[ "from unittest.mock import patch\nimport datetime as dt\nimport os\nimport unittest\n\nfrom nose.tools import assert_equals, assert_true, assert_false, assert_raises\nimport numpy as np\nimport numpy.testing as npt\nimport pandas as pd\n\nimport seaice.data as sid\nimport seaice.data.api as api\nimport seaice.data....
[ [ "pandas.PeriodIndex", "pandas.period_range", "numpy.dstack", "numpy.full", "numpy.testing.assert_array_equal", "pandas.DatetimeIndex", "numpy.ones", "numpy.all", "pandas.Period", "numpy.array" ] ]
shenghh2015/segmentation_models
[ "473c528c724f62ff38ac127747dd8babb7de6b85", "473c528c724f62ff38ac127747dd8babb7de6b85", "473c528c724f62ff38ac127747dd8babb7de6b85" ]
[ "translate/train_model.py", "thesis/train_HeLa_unet.py", "thesis/segmentation_models_v1/metrics.py" ]
[ "import os\nimport cv2\nfrom skimage import io\nimport sys\n# import keras\nimport tensorflow as tf\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport argparse\nfrom natsort import natsorted\n# sys.path.append('../')\nimport segmentation_models_v1 as sm\nfrom segmentation_models_v1 import Unet, Linknet, P...
[ [ "tensorflow.keras.callbacks.ModelCheckpoint", "tensorflow.multiply", "numpy.uint8", "tensorflow.keras.callbacks.ReduceLROnPlateau", "numpy.stack", "numpy.concatenate", "tensorflow.keras.losses.Huber", "tensorflow.keras.backend.square", "tensorflow.keras.optimizers.Adam", "n...
tetradsensors/tetrad-viz-toolkit
[ "908bed14e676143c4a0b1812d90aed6501479653" ]
[ "viztools/tools/snapshot.py" ]
[ "import numpy as np\nfrom viztools.tools import generate_image\n\nclass Snapshot:\n \"\"\"\n Formalized view of the data saved in our database. This just cleans it up\n and makes sure everything is correct before it can be used elsewhere. \n \"\"\"\n def __init__(self,\n lats,\n ...
[ [ "numpy.array" ] ]
mederrata/probability
[ "89d248c420b8ecabfd9d6de4a1aa8d3886920049", "89d248c420b8ecabfd9d6de4a1aa8d3886920049", "89d248c420b8ecabfd9d6de4a1aa8d3886920049", "89d248c420b8ecabfd9d6de4a1aa8d3886920049", "89d248c420b8ecabfd9d6de4a1aa8d3886920049", "89d248c420b8ecabfd9d6de4a1aa8d3886920049", "89d248c420b8ecabfd9d6de4a1aa8d388692004...
[ "tensorflow_probability/python/vi/optimization_test.py", "tensorflow_probability/python/distributions/kumaraswamy.py", "tensorflow_probability/python/math/special.py", "tensorflow_probability/python/optimizer/differential_evolution.py", "tensorflow_probability/python/math/psd_kernels/internal/util.py", "t...
[ "# Copyright 2018 The TensorFlow Probability 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 a...
[ [ "tensorflow.compat.v2.zeros_like", "tensorflow.compat.v2.exp", "tensorflow.compat.v2.Variable", "numpy.log", "numpy.sqrt", "tensorflow.compat.v2.control_dependencies", "tensorflow.compat.v1.global_variables_initializer", "tensorflow.compat.v2.convert_to_tensor", "tensorflow.com...
phgupta/XBOS
[ "1fea0b024d97ae142d97b3a94510403928ed44b7", "1fea0b024d97ae142d97b3a94510403928ed44b7" ]
[ "services/occupancy/server.py", "services/indoor_temperature_prediction/server.py" ]
[ "from concurrent import futures\nimport time\nimport grpc\nimport logging\nlogging.basicConfig(format='%(asctime)s,%(msecs)d %(levelname)-8s [%(filename)s:%(lineno)d] %(message)s', datefmt='%Y-%m-%d:%H:%M:%S', level=logging.DEBUG)\nimport occupancy_pb2\nimport occupancy_pb2_grpc\n\n_ONE_DAY_IN_SECONDS = 60 * 60 * 2...
[ [ "pandas.concat", "numpy.array", "pandas.Series" ], [ "numpy.var", "numpy.mean", "pandas.DataFrame" ] ]
xionghuichen/RLAssistant
[ "efbde6609cfbd60646f935b450dac65bcaa340e6" ]
[ "RLA/easy_log/tester.py" ]
[ "#!/usr/bin/env python\n# coding=utf-8\n\n# Author : Xionghui Chen\n# Created : 2017-11-12\n# Modified : 2017-11-12\n# Version : 1.0\nfrom collections import deque\nimport dill\nimport time\nimport os\n\nimport datetime\nimport os.path as osp\nfrom RLA.easy_log.const import *\nfrom RLA.easy_...
[ [ "tensorflow.get_default_session", "tensorflow.Graph", "tensorflow.train.latest_checkpoint", "tensorflow.get_collection", "tensorflow.stack", "tensorflow.core.framework.summary_pb2.Summary", "numpy.mean", "tensorflow.train.Saver" ] ]
YukiHata-ITS/uda_nd013-c1-vision-starter
[ "4785970ae56a21905d63ae429b3a6ee717804668" ]
[ "workspace/inference_video.py" ]
[ "import argparse\nimport time\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport tensorflow as tf\nfrom matplotlib import animation\n\nfrom object_detection.builders.dataset_builder import build as build_dataset\nfrom object_detection.utils.config_util import get_configs_from_pipeline_file\nfrom object_...
[ [ "matplotlib.pyplot.subplot", "matplotlib.animation.FuncAnimation", "tensorflow.saved_model.load", "matplotlib.pyplot.figure" ] ]
periakiva/finding_berries
[ "1dfc7cf00c384321e39872921051dc9535355e53", "1dfc7cf00c384321e39872921051dc9535355e53", "1dfc7cf00c384321e39872921051dc9535355e53" ]
[ "models/fpn/fpn_decoder.py", "training/cranberry_segmentation/sandbox.py", "evaluation/segmentation/list_evaluator.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\nclass Conv3x3GNReLU(nn.Module):\n def __init__(self, in_channels, out_channels, upsample=False):\n super().__init__()\n self.upsample = upsample\n self.block = nn.Sequential(\n nn.Conv2d(\n i...
[ [ "torch.nn.Sequential", "torch.nn.Dropout2d", "torch.cat", "torch.nn.Conv2d", "torch.nn.functional.interpolate", "torch.nn.GroupNorm", "torch.nn.ReLU" ], [ "scipy.ndimage.label", "numpy.array" ], [ "torch.nn.CrossEntropyLoss", "matplotlib.pyplot.cm.get_cmap", ...
cbigit/unet
[ "89d5576624620293419f1fa8fc16b47219dcad0e" ]
[ "2D/plot_tf_inference_examples.py" ]
[ "#\n# -*- coding: utf-8 -*-\n#\n# Copyright (c) 2019 Intel Corporation\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# Unle...
[ [ "matplotlib.pyplot.imshow", "tensorflow.__version__.split", "matplotlib.pyplot.title", "matplotlib.use", "tensorflow.python._pywrap_util_port.IsMklEnabled", "matplotlib.pyplot.savefig", "numpy.round", "matplotlib.pyplot.subplot", "tensorflow.pywrap_tensorflow.IsMklEnabled", ...
willfrey/ray
[ "288a81b42ef0186ab4db33b30191614a7bdb69f6", "288a81b42ef0186ab4db33b30191614a7bdb69f6", "288a81b42ef0186ab4db33b30191614a7bdb69f6" ]
[ "python/ray/workflow/tests/test_checkpoint_2.py", "python/ray/tests/test_failure_4.py", "rllib/utils/tf_utils.py" ]
[ "import ray\nimport time\nimport pytest\nfrom ray.tests.conftest import * # noqa\n\nimport numpy as np\nfrom ray import workflow\nfrom ray.workflow.tests import utils\nfrom ray.exceptions import RaySystemError\n\n\nSIZE = 2 ** 15\n\n\n@ray.remote\ndef checkpoint_dag(checkpoint):\n @ray.remote\n def large_inp...
[ [ "numpy.arange", "numpy.mean" ], [ "numpy.zeros" ], [ "tensorflow.python.client.device_lib.list_local_devices" ] ]
jaayeon/emotion_classification
[ "5514360803b80f1b3dc607c077a14785d9a01669", "5514360803b80f1b3dc607c077a14785d9a01669" ]
[ "Resnet_GRU/data_loader.py", "VGG_GRU/main.py" ]
[ "#!/usr/bin/python\r\n# encoding: utf-8\r\n\r\nimport glob\r\nimport os\r\nimport random\r\nimport torch\r\nimport numpy as np\r\nfrom torch.utils import data\r\nimport cv2\r\nfrom PIL import Image\r\nfrom utils import *\r\nfrom torchvision import transforms\r\nimport random\r\nimport numpy as np\r\nimport random\r...
[ [ "torch.LongTensor", "numpy.resize", "numpy.expand_dims", "torch.utils.data.DataLoader", "torch.from_numpy", "numpy.zeros", "numpy.random.randint" ], [ "torch.nn.CrossEntropyLoss", "torch.cuda.manual_seed", "torch.cat", "torch.cuda.device_count", "torch.no_grad",...
pinsleepe/great_expectations
[ "37329c906a5a159b54257dbcd897850177eecbcc" ]
[ "tests/execution_engine/test_sparkdf_execution_engine.py" ]
[ "import datetime\nimport logging\nimport os\nimport random\n\nimport numpy as np\nimport pandas as pd\nimport pytest\n\nimport great_expectations.exceptions as ge_exceptions\nfrom great_expectations.core.batch_spec import (\n AzureBatchSpec,\n GCSBatchSpec,\n PathBatchSpec,\n RuntimeDataBatchSpec,\n ...
[ [ "numpy.isnan", "numpy.allclose", "pandas.DataFrame" ] ]
jnefoussi/pytechfin
[ "4d5bc44410b7161ab3acd65b2474468a84e576af" ]
[ "pytechfin/carol_techfin.py" ]
[ "from collections import defaultdict\nimport pandas as pd\n\n# TODO: Add custom pipeline function from \n# https://github.com/rafarui/techfin-reprocess/blob/master/functions/custom_pipeline.py\n\n# TODO: Add track_tasks function from\n# https://github.com/rafarui/techfin-reprocess/blob/master/functions/carol_task.p...
[ [ "pandas.DataFrame" ] ]
qifwa493/Camera_surface_area
[ "ebac18bd01ba7c615be63626aeb30bd9e07f53bb" ]
[ "versions/V1.2/Components/py_getContour.py" ]
[ "# -*- coding: utf-8 -*-\n\n# Functions for finding a possible contour in the target image\n\nimport cv2\nimport numpy as np\n\n\ndef showImg(winName, mat, Width=None, Height=None):\n # Get image size\n if Width is None or Height is None:\n Height, Width = mat.shape[:2]\n\n # Display image\n cv2....
[ [ "numpy.zeros" ] ]
luoyan407/predict_trustworthiness_smallscale
[ "b7e1e2a68b0aee9b484228d1b5686f7252919e97", "b7e1e2a68b0aee9b484228d1b5686f7252919e97", "b7e1e2a68b0aee9b484228d1b5686f7252919e97" ]
[ "confidnet/models/segnet_selfconfid.py", "confidnet/models/vgg16_oodconfid.py", "confidnet/loaders/loader.py" ]
[ "import torch.nn as nn\nimport torch.nn.functional as F\n\nfrom confidnet.models.model import AbstractModel\nfrom confidnet.models.segnet import segnetDown2, segnetDown3, segnetUp2, segnetUp3\n\n\nclass SegnetSelfConfid(AbstractModel):\n def __init__(self, config_args, device):\n super().__init__(config_a...
[ [ "torch.nn.Dropout", "torch.nn.Conv2d", "torch.nn.functional.dropout", "torch.nn.MaxUnpool2d" ], [ "torch.nn.Linear", "torch.nn.MaxPool2d", "torch.nn.Dropout", "torch.nn.BatchNorm2d" ], [ "numpy.random.seed", "torch.utils.data.DataLoader", "torch.utils.data.sampl...
ChitandaXu/ECG_classify
[ "bffd810dd7c0a03c18dfc58d3150c7b98b528105" ]
[ "ecg_classify/gen_data.py" ]
[ "import numpy as np\nimport os\nimport pandas as pd\nfrom ecg_classify.constants import DIM, heartbeat_factory, CLASS_NUM, TRAIN_SIZE, TEST_SIZE, LABEL_LIST\nfrom ecg_classify.gen_feature import gen_feature\n\n\ndef read_data(force=False):\n if (not (os.path.isfile('train.csv') and os.path.isfile('test.csv'))) o...
[ [ "pandas.read_csv", "pandas.DataFrame", "numpy.concatenate", "numpy.zeros", "numpy.empty" ] ]
rodrigob/beam
[ "e2ce4037f85619f946b3d6a3a90955cdf1c19b4a" ]
[ "sdks/python/apache_beam/examples/complete/distribopt.py" ]
[ "#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); yo...
[ [ "numpy.square", "numpy.dot", "numpy.log", "numpy.meshgrid", "numpy.ones", "numpy.atleast_1d", "numpy.exp", "numpy.array", "numpy.zeros", "numpy.sum" ] ]
grohalex/Final-Project
[ "41ac4e56e1a688a5f03f81d40d99eb2f839f9a26" ]
[ "Two-Way/stuck_lattice0.py" ]
[ "# first version of two way lattice stuck position heatmap\nimport numpy as np\nimport numpy.random as rd\nimport random as random\nimport scipy\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nfrom os import path\nfrom datetime import datetime\nnow = datetime.now()\n\n#parameters\nN = 100 # number o...
[ [ "matplotlib.pyplot.imshow", "numpy.linspace", "matplotlib.pyplot.show", "matplotlib.pyplot.colorbar", "matplotlib.pyplot.ylabel", "numpy.random.randint", "numpy.random.rand", "numpy.savetxt", "matplotlib.pyplot.xlabel", "numpy.array", "numpy.flip", "numpy.zeros", ...
yiruiliu110/eegnn
[ "253773c301681bb00b4789c34f48c82468ad16da" ]
[ "estimation/add_k.py" ]
[ "\"\"\"\nThis script is used to add a new cluster.\n\"\"\"\nimport torch\n\nfrom estimation.stirling_number import stirling_number\n\n\ndef build_injection(count, active_k, max_k, gamma):\n #print('count', count)\n with_sample_indices = count > 0\n\n remaining_indices = torch.squeeze(torch.cat([torch.tenso...
[ [ "torch.randint", "torch.cat", "torch.sum", "torch.sparse_coo_tensor", "torch.tensor", "torch.arange", "torch.nn.functional.one_hot", "torch.index_select" ] ]
Lemswasabi/transformers
[ "1762ded30a49649bdd5f8f5ee38b46dea051026a" ]
[ "src/transformers/models/wavlm/modeling_wavlm.py" ]
[ "# coding=utf-8\n# Copyright 2021 The Fairseq Authors, Microsoft Research, and The HuggingFace Inc. team. 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# ...
[ [ "torch.abs", "torch.nn.init.uniform_", "torch.nn.functional.softmax", "torch.nn.functional.glu", "torch.zeros", "torch.cat", "torch.nn.Embedding", "torch.FloatTensor", "torch.where", "torch.full_like", "torch.nn.Dropout", "torch.nn.CrossEntropyLoss", "torch.mm",...
fac2003/perceiver-pytorch
[ "b07d5154c5dee63684c59f57d02a1b405701845f" ]
[ "tests/test_multimodality_with_text_perceiver.py" ]
[ "from torch.nn import Embedding\nimport pytest\n\nfrom fixtures import *\nfrom perceiver_pytorch.modalities import InputModalityWithEmbedding\nfrom perceiver_pytorch.multi_modality_with_text_perceiver import MultiModalityWithTextPerceiver\n\n\ndef test_embedding_for_layer(text_inputs):\n text_modality = InputMod...
[ [ "torch.nn.Embedding" ] ]
nicoroulet/thesis
[ "7b47a67b986a96633e9ee775ae96199a85995e01" ]
[ "src/Tools.py" ]
[ "\"\"\"Collection of Tools.\"\"\"\n\nimport numpy as np\nimport random\nimport os\n\ndef get_label_index(Y, bbox):\n x1, x2, y1, y2, z1, z2 = bbox\n Y_cropped = Y[x1:x2, y1:y2, z1:z2]\n labels = range(int(np.max(Y_cropped)) + 1)\n label_index = {}\n for label in labels:\n label_index[label] = np.argwhere(Y_...
[ [ "numpy.random.choice", "numpy.squeeze", "numpy.argwhere", "numpy.max", "numpy.any", "numpy.array", "numpy.where" ] ]
ACTCollaboration/tilec
[ "11ed8d027ad6ffac09b3e291a047f33e97673f14", "11ed8d027ad6ffac09b3e291a047f33e97673f14", "11ed8d027ad6ffac09b3e291a047f33e97673f14", "11ed8d027ad6ffac09b3e291a047f33e97673f14" ]
[ "bin/planck/verify_projection.py", "bin/test_simple_coadd.py", "bin/archived/GRFVerify.py", "tests/test_mix.py" ]
[ "from __future__ import print_function\nfrom orphics import maps,io,cosmology\nfrom pixell import enmap\nimport numpy as np\nimport os,sys\nfrom soapack import interfaces as sints\n\ndef get_coadd(imaps,wts,axis):\n # sum(w*m)/sum(w)\n twt = np.sum(wts,axis=axis)\n retmap = np.sum(wts*imaps,axis=axis)/twt\...
[ [ "numpy.arange", "numpy.sum", "numpy.isfinite" ], [ "numpy.random.seed", "numpy.einsum", "numpy.linalg.inv", "numpy.arange", "numpy.stack", "numpy.ones", "numpy.random.normal", "numpy.zeros" ], [ "numpy.cosh", "numpy.asarray", "matplotlib.use", "n...
yuxuibbs/MCC-Competition-Docs
[ "384726c41434c5a07becb6438c3d2409c6ca6eb4" ]
[ "website/test.py" ]
[ "import pandas as pd\nimport numpy as np\nimport jellyfish\n\ndef create_heats(df, event, num_heats):\n counter = 0\n for row_num, registration_status in enumerate(df[event]):\n if registration_status != '0':\n df.loc[row_num, event] = counter % num_heats + 1\n counter += 1\n\n\na...
[ [ "pandas.read_csv" ] ]
hfurkanbozkurt/ludwig
[ "bfcbd52237c73702764e733ede4351e0146394bd" ]
[ "ludwig/features/category_feature.py" ]
[ "#! /usr/bin/env python\n# Copyright (c) 2019 Uber Technologies, 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# Unle...
[ [ "torch.Size", "torch.softmax", "torch.tensor", "numpy.array", "torch.argmax" ] ]
ZongSingHuang/Elite-Opposition-Based-Golden-Sine-Whale-Optimization-Algorithm
[ "468b89aaa9cae46b87ce9595cd76b5f97f6c8553" ]
[ "EGolden_SWOA.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Aug 27 15:45:56 2020\n\n@author: ZongSing_NB\n\nMain reference:\nhttp://www.ejournal.org.cn/EN/10.3969/j.issn.0372-2112.2019.10.020\n\"\"\"\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nclass EGolden_SWOA():\n def __init__(self, fitness, D=30, P=20, G=...
[ [ "numpy.diag", "matplotlib.pyplot.legend", "numpy.sqrt", "numpy.abs", "numpy.clip", "numpy.min", "numpy.sin", "matplotlib.pyplot.plot", "numpy.logical_or", "numpy.random.randint", "matplotlib.pyplot.grid", "numpy.random.uniform", "matplotlib.pyplot.show", "nu...
qAp/kgl_deepfake
[ "d3ee36d704d82d5d72068ea16276a88b5746c8de", "d3ee36d704d82d5d72068ea16276a88b5746c8de" ]
[ "face_detection/lightDSFD/data/widerface.py", "face_detection/video_utils.py" ]
[ "from __future__ import division , print_function\n\"\"\"WIDER Face Dataset Classes\nauthor: swordli\n\"\"\"\n#from .config import HOME\nimport os.path as osp\nimport sys\nimport torch\nimport torch.utils.data as data\nimport cv2\nimport numpy as np\nsys.path.append(\"/f/home/jianli/code/s3fd.180716/\")\n#from util...
[ [ "matplotlib.pyplot.Rectangle", "matplotlib.pyplot.tight_layout", "numpy.expand_dims", "matplotlib.pyplot.subplots", "torch.from_numpy", "matplotlib.pyplot.axis", "numpy.array" ], [ "pandas.concat", "numpy.maximum", "numpy.minimum", "matplotlib.patches.Rectangle", ...
ccjoechou/tvm
[ "779dc51e1332f417fa4c304b595ce76891dfc33a", "779dc51e1332f417fa4c304b595ce76891dfc33a" ]
[ "python/tvm/meta_schedule/cost_model/cost_model.py", "tests/python/contrib/test_ethosn/test_concatenate.py" ]
[ "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y...
[ [ "numpy.ctypeslib.as_array", "numpy.zeros" ], [ "numpy.random.randint" ] ]
JeroenDM/acrobotics
[ "d734ca25f40015e5c5ff019402a83504783c13cd" ]
[ "tests/test_link.py" ]
[ "from acrobotics.link import Link, LinkKinematics, DHLink, JointType\n\nimport numpy as np\nimport casadi as ca\nimport matplotlib.pyplot as plt\n\nfrom mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import\nfrom acrobotics.geometry import Scene\nfrom acrobotics.shapes import Box\nfrom numpy.testing import...
[ [ "numpy.eye", "numpy.cos", "numpy.sin", "numpy.testing.assert_almost_equal", "numpy.array", "matplotlib.pyplot.figure" ] ]
jeikabu/lumberyard
[ "07228c605ce16cbf5aaa209a94a3cb9d6c1a4115", "07228c605ce16cbf5aaa209a94a3cb9d6c1a4115", "07228c605ce16cbf5aaa209a94a3cb9d6c1a4115", "07228c605ce16cbf5aaa209a94a3cb9d6c1a4115", "07228c605ce16cbf5aaa209a94a3cb9d6c1a4115", "07228c605ce16cbf5aaa209a94a3cb9d6c1a4115", "07228c605ce16cbf5aaa209a94a3cb9d6c1a411...
[ "dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/cuda/tests/cudadrv/test_deallocations.py", "dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/hsa/tests/hsadrv/test_hlc.py", "dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numpy/distutils/tests/test_misc_util.py", "dev/Gems/CloudGemMetric/v1/AWS/common...
[ "from __future__ import division\n\nfrom contextlib import contextmanager\n\nimport numpy as np\n\nfrom numba import cuda, config\nfrom numba.cuda.testing import unittest, skip_on_cudasim\nfrom numba.tests.support import captured_stderr\n\n\n@skip_on_cudasim('not supported on CUDASIM')\nclass TestDeallocation(unitt...
[ [ "numpy.arange", "numpy.ones" ], [ "numpy.testing.assert_equal", "numpy.random.random", "numpy.zeros_like" ], [ "numpy.testing.assert_equal", "numpy.distutils.misc_util.gpaths", "numpy.testing.run_module_suite", "numpy.distutils.misc_util.minrelpath", "numpy.distutil...
basaks/uncover-ml
[ "167af7666845e2f0936aa4fc0e60abf8b1984219" ]
[ "scripts/intersect_rasters.py" ]
[ "from pathlib import Path\n\nimport numpy as np\nimport rasterio\nimport geopandas as gpd\nfrom joblib import Parallel, delayed\n\ndata_location = \\\n Path(\"/g/data/ge3/covariates/national_albers_filled_new/albers_cropped/\")\n# Read points from shapefile\n\nshapefile_location = Path(\"/g/data/ge3/aem_sections...
[ [ "numpy.array" ] ]
wnov/vega
[ "19256aca4d047bfad3b461f0a927e1c2abb9eb03", "19256aca4d047bfad3b461f0a927e1c2abb9eb03" ]
[ "vega/core/pipeline/fully_train_pipe_step.py", "zeus/datasets/common/cifar100.py" ]
[ "# -*- coding:utf-8 -*-\n\n# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the MIT License.\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; withou...
[ [ "torch.cuda.device_count" ], [ "numpy.vstack" ] ]
expoli/Learn-tensorflow
[ "cc6b30c233678cf8a6f5da97fdf02ff49e810e61", "cc6b30c233678cf8a6f5da97fdf02ff49e810e61" ]
[ "BEGINNER/ML_basics_with_Keras/Regression/Predict_fuel_efficiency.py", "BEGINNER/ML_basics_with_Keras/Overfit_and_underfit/Overfit_and_underfit.py" ]
[ "from __future__ import absolute_import, division, print_function, unicode_literals\n\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport seaborn as sns\nimport tensorflow as tf\nfrom tensorflow import keras\nfrom tensorflow.keras import layers\n\nprint(tf.__version__)\n\ndataset_path = keras.utils.get_fi...
[ [ "matplotlib.pyplot.legend", "pandas.read_csv", "matplotlib.pyplot.scatter", "matplotlib.pyplot.figure", "matplotlib.pyplot.ylim", "tensorflow.keras.optimizers.RMSprop", "tensorflow.keras.layers.Dense", "pandas.DataFrame", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlim", ...
M00mo/neuralpredictors
[ "0dd46f0bf03ec3fe53f6a796cbcbea09c4972932" ]
[ "neuralpredictors/data/datasets.py" ]
[ "import json\nfrom collections import namedtuple\nfrom datetime import datetime\nfrom pathlib import Path\nfrom zipfile import ZipFile\n\nimport h5py\nimport numpy as np\nfrom scipy.signal import convolve2d\nfrom torch.utils.data import Dataset\n\nfrom .exceptions import InconsistentDataException, DoesNotExistExcep...
[ [ "numpy.ones", "numpy.atleast_1d", "numpy.diff", "numpy.float64", "numpy.random.randn", "numpy.array", "numpy.where", "numpy.sum" ] ]
iserh/data-augmentation
[ "1e1e99177ff4256c68cafe043bd7e50d52bf669d" ]
[ "src/vae/models/architectures/model_v3.py" ]
[ "\"\"\"Variational autoencoder module class.\"\"\"\nfrom typing import Tuple\n\nimport torch.nn as nn\nfrom torch import Tensor\n\nfrom utils import init_weights\nfrom vae.models.base import Decoder, Encoder, VAEConfig, VAEModel\n\n\nclass _Encoder(Encoder):\n def __init__(self, z_dim: int, num_features: int) ->...
[ [ "torch.nn.Linear", "torch.nn.ReLU", "torch.nn.LeakyReLU", "torch.nn.Sigmoid" ] ]
joshp112358/Cirq
[ "c4fac27a9849e589ee05b4f702f2d7c9049aaeea", "c4fac27a9849e589ee05b4f702f2d7c9049aaeea", "c4fac27a9849e589ee05b4f702f2d7c9049aaeea" ]
[ "cirq/ops/controlled_operation.py", "cirq/protocols/commutes_protocol.py", "cirq/ops/eigen_gate_test.py" ]
[ "# Copyright 2019 The Cirq Developers\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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law o...
[ [ "numpy.linalg.eigvals", "numpy.prod" ], [ "numpy.array", "numpy.allclose" ], [ "numpy.diag", "numpy.random.random", "numpy.sqrt", "numpy.eye", "numpy.array" ] ]
anonymouslorem/library_identification_vulnerability_report
[ "3eb1916b25bcf885640ed19954377edf45f7498a", "3eb1916b25bcf885640ed19954377edf45f7498a" ]
[ "FastXML/fastxml/fastxml/fastxml.py", "LightXML/src/model.py" ]
[ "from builtins import range\r\nfrom builtins import object\r\nimport os\r\nimport json\r\nfrom collections import OrderedDict\r\n\r\nimport scipy.sparse as sp\r\n\r\nfrom .inferencer import IForest, LeafComputer, Blender, IForestBlender\r\n\r\nclass Inferencer(object):\r\n \"\"\"\r\n Loads up a model for infe...
[ [ "scipy.sparse.vstack" ], [ "torch.cat", "torch.nn.Embedding", "numpy.concatenate", "torch.nn.BCEWithLogitsLoss", "torch.set_grad_enabled", "torch.no_grad", "torch.topk", "torch.nn.Dropout", "numpy.pad", "numpy.full", "torch.tensor", "torch.bmm", "torch.m...
mahesh131998/voice-based-visual-acuity-test
[ "67bf5d2141ee6725c4c37fa3ae67d3cac9cf01bf" ]
[ "eye1.py" ]
[ "# from flask import Flask, render_template, Response, request, redirect, url_for\r\n# import tkinter as tk\r\n# import time\r\n# import random\r\n# import speech_recognition as sr\r\nimport pyttsx3 as engine\r\n# import threading\r\n# from bs4 import BeautifulSoup \r\n# import requests \r\n\r\nfrom flask import Fl...
[ [ "numpy.expand_dims", "numpy.argmax", "tensorflow.keras.preprocessing.image.img_to_array", "tensorflow.keras.preprocessing.image.load_img" ] ]
qilei123/AdelaiDet
[ "36f31670c2cc15b11b0367edee2b09d39e764c59" ]
[ "adet/modeling/postprocessing.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\nimport torch\nfrom torch.nn import functional as F\n\nfrom detectron2.layers import paste_masks_in_image\nfrom adet.structures.instances import Instances\nfrom detectron2.utils.memory import retry_if_cuda_oom\n\n\ndef detector_postprocess(resu...
[ [ "torch.nn.functional.interpolate" ] ]
wangyidong3/detectron2
[ "286e6877494353161a99fb26954ef0886ff2d219" ]
[ "tools/plain_train_net.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n\"\"\"\nDetectron2 training script with a plain training loop.\n\nThis scripts reads a given config file and runs the training or evaluation.\nIt is an entry point that is able to train standard models in detectron2.\n\nIn order to let one scr...
[ [ "torch.cuda.device_count", "torch.isfinite" ] ]
potassco/xorro
[ "6ed499ac1608cf1d1d1b82b632d5961ee1bd8439", "6ed499ac1608cf1d1d1b82b632d5961ee1bd8439" ]
[ "xorro/tests/gje_test.py", "xorro/gje_prop_n.py" ]
[ "\"\"\"\nGauss-Jordan Tests Suite\n\"\"\"\nimport xorro\nfrom xorro import gje\nfrom xorro import gje_simplex as simplex\nimport numpy as np\n\ndef cols_state_to_matrix(state):\n ## Parse columns state to matrix\n return gje.columns_state_to_matrix(state)\n\ndef get_clause(m,lits):\n ## Deduce clause after...
[ [ "numpy.array" ], [ "numpy.array" ] ]
sIncerass/nums
[ "57c4d8f67c31c6215dea1ede07e8c0f063c68a6b" ]
[ "nums/core/array/blockarray.py" ]
[ "# coding=utf-8\n# Copyright (C) 2020 NumS Development Team.\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 requir...
[ [ "numpy.product", "numpy.core.numeric.normalize_axis_tuple", "numpy.empty_like", "numpy.ndarray", "numpy.all", "numpy.copy", "numpy.array", "numpy.sum", "numpy.empty" ] ]
WenqiJiang/FPGA-Accelerator-for-Recommender-Systems
[ "6c3031487cd1447b7f5362483c14b108177387bb", "6c3031487cd1447b7f5362483c14b108177387bb", "6c3031487cd1447b7f5362483c14b108177387bb" ]
[ "tf_wide_deep_377_table_2048/python/train.py", "unused/tf2_wide_deep/python/lib/build_estimator.py", "unused/py3_tf2_wide_deep/python_v2/lib/utils/image_preprocessing.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# @Author: lapis-hong\n# @Date : 2018/1/15\n\"\"\"Training Wide and Deep Model.\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport argparse\nimport ...
[ [ "tensorflow.train.Server", "tensorflow.train.ClusterSpec", "tensorflow.logging.set_verbosity", "tensorflow.estimator.train_and_evaluate", "tensorflow.app.run" ], [ "numpy.log", "tensorflow.compat.v1.ConfigProto", "tensorflow.compat.v1.train.ProximalAdagradOptimizer", "tenso...
molokhovdmitry/placeholder
[ "cc0a983af91fcbea3dcd7b9a16db471b000b5ff5" ]
[ "model/create.py" ]
[ "\"\"\"\nMIT License\n\nCopyright (c) 2021 molokhovdmitry\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modi...
[ [ "matplotlib.pyplot.legend", "tensorflow.compat.v1.ConfigProto", "matplotlib.pyplot.title", "tensorflow.keras.losses.SparseCategoricalCrossentropy", "tensorflow.keras.layers.Dense", "tensorflow.keras.preprocessing.image_dataset_from_directory", "tensorflow.keras.layers.Conv2D", "ten...
kalosisz/tensorflow
[ "b7ecd75b24f577b73500024fe91d2ea0c806d05a", "b7ecd75b24f577b73500024fe91d2ea0c806d05a", "b7ecd75b24f577b73500024fe91d2ea0c806d05a", "b7ecd75b24f577b73500024fe91d2ea0c806d05a", "b7ecd75b24f577b73500024fe91d2ea0c806d05a", "b7ecd75b24f577b73500024fe91d2ea0c806d05a" ]
[ "tensorflow/python/framework/extension_type_test.py", "tensorflow/lite/python/lite_v2_test_util.py", "tensorflow/python/distribute/input_ops.py", "tensorflow/python/saved_model/signature_serialization.py", "tensorflow/python/util/function_utils_test.py", "tensorflow/python/saved_model/save_context_test.py...
[ "# Copyright 2021 The TensorFlow Authors. 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 requ...
[ [ "tensorflow.python.ops.math_ops.reduce_max", "tensorflow.python.util.tf_inspect.Parameter", "tensorflow.python.ops.array_ops.where_v2", "tensorflow.python.framework.extension_type.is_packed", "tensorflow.python.framework.type_spec.lookup", "tensorflow.python.framework.extension_type.Anonym...
mavroudisv/acme
[ "3eb4d55a67ea460710ba9e2b2ecf1aa339ba7d2d", "3eb4d55a67ea460710ba9e2b2ecf1aa339ba7d2d" ]
[ "acme/agents/tf/d4pg/agent_test.py", "acme/adders/reverb/episode.py" ]
[ "# python3\n# Copyright 2018 DeepMind Technologies Limited. 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...
[ [ "numpy.prod" ], [ "tensorflow.TensorSpec" ] ]
acgtcoder/lcdblib
[ "a3e5c81b841f0a06e63641f1cbcc24fc207f40f0" ]
[ "lcdblib/parse/rseqc.py" ]
[ "import pandas as pd\nimport re\nfrom collections import OrderedDict\n\ndef parse_inferExperiment(sample, file):\n \"\"\"Parse rseqc infer expeirment.\n Parameters\n ----------\n sample: str\n Sample name which will be added as row index.\n file: str\n Path to the fastqc zip file.\n\n ...
[ [ "pandas.DataFrame" ] ]
msarahan/ml_smoketest
[ "b7dbebb99b571b4af04bdaa7513817b14c10f63f" ]
[ "net_surgery.py" ]
[ "\n# coding: utf-8\n\nimport os\nimport subprocess\nimport numpy as np\nimport caffe\n\n\ndef main():\n if os.path.isfile('../models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel'):\n print('CaffeNet found.')\n else:\n print('Downloading pre-trained CaffeNet model...')\n subp...
[ [ "numpy.load", "numpy.array", "numpy.exp" ] ]
asamadiya/onnxruntime
[ "6b3645d97ab222d28bd515f4990af8868194eb52" ]
[ "onnxruntime/test/python/quantization/test_op_concat.py" ]
[ "# -------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See License.txt in the project root for\n# license information.\n# --------------------------------------------------------------------------\n...
[ [ "numpy.random.seed", "numpy.random.randint" ] ]
HarmanDotpy/GeNeVA
[ "26042826d37206cc9ccd9fbeee5bfcae95dda5a6" ]
[ "geneva/models/image_encoder.py" ]
[ "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\"\"\"Image encoder using ResBlocks\"\"\"\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom geneva.definitions.res_blocks import ResDownBlock\n\n\nclass ImageEncoder(nn.Module):\n def __in...
[ [ "torch.nn.Conv2d", "torch.sum", "torch.nn.Linear", "torch.nn.BatchNorm2d", "torch.nn.ReLU" ] ]
evenlwanvik/TTK-4900-Master
[ "172b444c44f65941ea162c64bc917924fc8e996b" ]
[ "src/training_data.py" ]
[ "from training_data.eddies import eddy_detection,dataframe_eddies,plot_eddies,julianh2gregorian\nfrom tools.machine_learning import sliding_window\nfrom matplotlib.patches import Rectangle\nfrom tools.load_nc import load_netcdf4\nfrom numpy import savez_compressed\nimport matplotlib.pyplot as plt\nfrom tools.bfs im...
[ [ "matplotlib.colors.BoundaryNorm", "numpy.expand_dims", "numpy.sqrt", "matplotlib.pyplot.get_cmap", "numpy.max", "numpy.ma.masked_where", "numpy.ma.is_masked", "numpy.where", "sklearn.preprocessing.MinMaxScaler", "numpy.arange", "numpy.argmax", "matplotlib.pyplot.clo...
Nivolves2000/hospital-crm
[ "16ed4448e7aa720c102f6fcd56815df4e491aad1" ]
[ "backend/SystemBack1/FindLiverClass.py" ]
[ "import os\r\nimport json\r\nimport numpy as np\r\nimport pandas as pd\r\nimport FeaturesStack as FS\r\n\r\n\r\ndef calculate_gmdh_model(img_f):\r\n if task_type == \"1\":\r\n if sensor_type == \"convex\":\r\n prob = (\r\n -0.946477\r\n + img_f[\"std_vert\"] * np.c...
[ [ "numpy.amax", "numpy.sqrt", "numpy.arctan", "numpy.power", "numpy.asarray", "numpy.amin", "numpy.cos", "pandas.DataFrame", "numpy.sin", "numpy.cbrt", "numpy.where", "numpy.sum" ] ]
RayshineRen/Introduction_to_Data_Science_in_Python
[ "b19aa781a8f8d0e25853c4e86dadd4c9bebbcd71" ]
[ "week2/week2.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Mon Sep 14 19:28:11 2020\r\n\r\n@author: Ray\r\n@email: 1324789704@qq.com\r\n@wechat: RayTing0305\r\n\"\"\"\r\n\r\n###chapter5\r\n\r\nimport pandas as pd\r\nfrom pandas import Series, DataFrame\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\n\r\nnp.random...
[ [ "pandas.Series", "numpy.random.seed", "numpy.arange", "numpy.set_printoptions", "matplotlib.pyplot.rc", "pandas.Index", "pandas.DataFrame", "numpy.exp" ] ]
joeranbosma/nnDetection
[ "2ebbf1cdc8a8794c73e325f06fea50632c78ae8c", "2ebbf1cdc8a8794c73e325f06fea50632c78ae8c", "2ebbf1cdc8a8794c73e325f06fea50632c78ae8c", "2ebbf1cdc8a8794c73e325f06fea50632c78ae8c" ]
[ "nndet/ptmodule/retinaunet/base.py", "nndet/io/itk.py", "nndet/losses/classification.py", "nndet/evaluator/detection/hist.py" ]
[ "\"\"\"\nCopyright 2020 Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apac...
[ [ "torch.no_grad", "numpy.mean", "torch.optim.SGD" ], [ "numpy.array", "numpy.zeros_like" ], [ "torch.sigmoid", "torch.nn.functional.binary_cross_entropy_with_logits", "torch.empty" ], [ "matplotlib.pyplot.legend", "numpy.logical_not", "matplotlib.pyplot.title...
isabella232/nnabla
[ "82a3c6fed382f889d1a4a429c696bb8cedf6ce79", "82a3c6fed382f889d1a4a429c696bb8cedf6ce79", "62a21db4afc15c52ce43f3f5b87e5fa4181b2deb", "82a3c6fed382f889d1a4a429c696bb8cedf6ce79", "82a3c6fed382f889d1a4a429c696bb8cedf6ce79", "82a3c6fed382f889d1a4a429c696bb8cedf6ce79" ]
[ "python/test/function/test_affine.py", "python/test/solver/test_adam.py", "python/benchmark/function/test_cumprod.py", "python/src/nnabla/experimental/graph_converters/channel_last.py", "python/test/function/test_mul_n.py", "python/test/function/test_categorical_cross_entropy.py" ]
[ "# Copyright 2017,2018,2019,2020,2021 Sony Corporation.\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.RandomState" ], [ "numpy.random.RandomState", "numpy.zeros_like", "numpy.sqrt", "numpy.iinfo" ], [ "numpy.random.RandomState" ], [ "numpy.reshape", "numpy.transpose" ], [ "numpy.random.permutation", "numpy.random.RandomState" ], [ "nump...
cTatu/fracdiff
[ "0ee3967b98ab2e5d67dc72cc21a2543f4dc5b113" ]
[ "tests/test_fracdiffstat.py" ]
[ "import numpy as np\nimport pytest\nfrom numpy.testing import assert_allclose\n\nfrom fracdiff import Fracdiff\nfrom fracdiff import FracdiffStat\nfrom fracdiff.stat import StatTester\n\n\nclass TestFracdiffStat:\n \"\"\"\n Test `FracdiffStat`.\n \"\"\"\n\n @staticmethod\n def _is_stat(x):\n r...
[ [ "numpy.random.seed", "numpy.isnan", "numpy.empty_like", "numpy.random.randn", "numpy.testing.assert_allclose" ] ]
function2-llx/MONAI
[ "4cddaa830b61b88ec78e089bb5f21e05bb1a78f4", "2fef7ff5c064a9ff6b6d6b4f2323180afed99934", "e0db5a564225a7cb62e7a23df97267019006302f", "4cddaa830b61b88ec78e089bb5f21e05bb1a78f4", "e0db5a564225a7cb62e7a23df97267019006302f", "4cddaa830b61b88ec78e089bb5f21e05bb1a78f4", "4cddaa830b61b88ec78e089bb5f21e05bb1a78f...
[ "tests/test_hilbert_transform.py", "tests/test_fill_holesd.py", "tests/test_dataloader.py", "tests/test_image_rw.py", "tests/test_vote_ensemble.py", "monai/engines/evaluator.py", "monai/networks/nets/swin_unetr.py", "tests/test_prepare_batch_extra_input.py", "tests/test_handler_garbage_collector.py"...
[ "# Copyright (c) MONAI Consortium\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# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by applicable law or agreed to in...
[ [ "numpy.heaviside", "numpy.expand_dims", "numpy.linspace", "torch.randn", "numpy.stack", "numpy.fft.ifft", "torch.cuda.is_available", "numpy.fft.fftfreq", "torch.device", "numpy.hanning", "torch.as_tensor" ], [ "torch.cuda.is_available", "torch.tensor" ], ...
HoliestCow/ece692_deeplearning
[ "638c27e0d9c01ec9b0a8be8a85e54937645a897e" ]
[ "project1/multiprocess.py" ]
[ "import os\nimport sys\nimport multiprocessing\nimport copyreg\nimport types\nimport time\nfrom six import string_types\nfrom progressbar import ProgressBar, FormatLabel, Percentage, Bar, ETA\nimport numpy as np\nimport pandas as pd\nfrom subprocess import Popen\nfrom collections import OrderedDict\nfrom basic_clas...
[ [ "numpy.concatenate", "pandas.concat" ] ]
Minys233/GCN-BMP
[ "21b64a3c8cc9bc33718ae09c65aa917e575132eb" ]
[ "train_binary.py" ]
[ "#!/usr/bin/env python\r\n# -*- coding: utf-8 -*-\r\n# @Time : 12/8/2018 6:54 PM\r\n# @Author : chinshin\r\n# @FileName: train_ddi.py\r\n\r\nfrom __future__ import print_function\r\nfrom __future__ import unicode_literals\r\n\r\nimport os\r\nimport sys\r\nimport random\r\nimport chainer\r\nimport logging\r\nimp...
[ [ "numpy.expand_dims", "numpy.random.seed", "numpy.asarray", "matplotlib.use", "numpy.squeeze", "numpy.arange", "numpy.random.shuffle", "numpy.concatenate" ] ]
mhannani/ZinVert
[ "d54e1ab1980ed70945c34d2ceb294d559126f623" ]
[ "src/utils/create_seq2seq.py" ]
[ "import torch.nn as nn\nfrom torch.optim import Adam\nfrom src.models.Seq2seq import Seq2Seq\nfrom src.models.Decoder import Decoder, OneStepDecoder, OneStepDecoderWithAttention, DecoderWithAttention\nfrom src.models.Encoder import Encoder, EncoderAttention\nfrom src.models.Attention import Attention\nfrom src.data...
[ [ "torch.nn.CrossEntropyLoss" ] ]
bhlarson/EmbeddedClassification
[ "68ede2d08c9e110c37ebb5c31a5e4c5d1abc52f2", "68ede2d08c9e110c37ebb5c31a5e4c5d1abc52f2" ]
[ "infer_imdb_tfl.py", "infer_imdb.py" ]
[ "\n\n\"\"\"Train a Resnet model for age classification and gender regression from the imdb dataset.\"\"\"\n#from __future__ import absolute_import\n#from __future__ import division\n#from __future__ import print_function\n\nimport argparse\nimport os\nimport sys\nimport shutil\nimport glob\nimport cv2\nimport numpy...
[ [ "tensorflow.lite.Interpreter", "numpy.array" ], [ "tensorflow.constant", "tensorflow.saved_model.load" ] ]
b-fontana/law
[ "8fca50fc1aa54647e4abd6dec4ff5d8ac2622865" ]
[ "law/contrib/keras/formatter.py" ]
[ "# coding: utf-8\n\n\"\"\"\nKeras target formatters.\n\"\"\"\n\n\n__all__ = [\"KerasModelFormatter\", \"TFKerasModelFormatter\"]\n\n\nfrom law.target.formatter import Formatter\nfrom law.target.file import get_path\n\n\nclass ModelFormatter(Formatter):\n\n @classmethod\n def accepts(cls, path):\n retur...
[ [ "tensorflow.keras.models.load_model" ] ]
ir5/chainer-compiler
[ "c6d9b9ba3175931321c1e512c17642a613c03bfc", "c6d9b9ba3175931321c1e512c17642a613c03bfc", "c6d9b9ba3175931321c1e512c17642a613c03bfc" ]
[ "testcases/elichika_tests/model/EspNet_BLSTM.py", "utils/run_onnx_ngraph.py", "scripts/large_models/chainer_chain.py" ]
[ "#!/usr/bin/env python\n#\n# BLSTM from EspNet's e2e_asr.py.\n#\n\nimport argparse\nimport datetime\nimport logging\n\nimport numpy as np\n\nimport chainer\nfrom chainer.backends import cuda\nimport chainer.functions as F\nimport chainer.links as L\nfrom chainer import training\nfrom chainer.training import extensi...
[ [ "numpy.random.rand", "numpy.cumsum", "numpy.allclose", "numpy.random.seed" ], [ "numpy.testing.assert_allclose" ], [ "numpy.random.uniform", "numpy.random.randint" ] ]
gowthambalusamy/pytorch_text2speech
[ "7637a3542799b9f6503a203ed1e4990245402cc0" ]
[ "deepvoice3_pytorch/modules.py" ]
[ "# coding: utf-8\n\nimport torch\nfrom torch import nn\nimport math\nimport numpy as np\nfrom torch.nn import functional as F\nfrom fairseq.models.fconv import Linear, LinearizedConvolution\n\n\ndef position_encoding_init(n_position, d_pos_vec, position_rate=1.0):\n ''' Init the sinusoid position encoding table ...
[ [ "torch.nn.functional.glu", "torch.nn.functional.dropout", "numpy.power", "torch.nn.utils.weight_norm", "numpy.cos", "torch.nn.Embedding", "numpy.sin", "torch.from_numpy", "torch.nn.functional.sigmoid", "torch.nn.ConvTranspose1d", "numpy.zeros" ] ]
jdmoorman/clapsolver
[ "d3d2fa2bbb0722c78531ff8f0dc983a50e4b357f" ]
[ "benchmarks/utils.py" ]
[ "import random\n\nimport numpy as np\n\n\ndef uniform_matrix(shape, low=0.0, high=1.0):\n \"\"\"Generate a uniformly random matrix of the given shape.\"\"\"\n return np.random.uniform(low=low, high=high, size=shape)\n\n\ndef randint_matrix(shape, low=0, high=100):\n \"\"\"Generate a matrix of random intege...
[ [ "numpy.random.uniform", "numpy.sqrt", "numpy.random.randint" ] ]
ccj5351/DAFStereoNets
[ "66b720a4abbac9097a794eacef034bab641771d9", "66b720a4abbac9097a794eacef034bab641771d9", "66b720a4abbac9097a794eacef034bab641771d9" ]
[ "src/loaddata/cityscapes_loader.py", "src/baselines/DispNet/main_DispNet_v0.py", "src/loaddata/pascal_voc_loader.py" ]
[ "# !/usr/bin/env python3\n# -*-coding:utf-8-*-\n# @file: cityscapes_loader.py\n# @brief:\n# @author: Changjiang Cai, ccai1@stevens.edu, caicj5351@gmail.com\n# @version: 0.0.1\n# @creation date: 25-01-2020\n# @last modified: Sun 26 Jan 2020 01:59:45 AM EST\n\nimport json\nimport os\nfrom collections import namedtupl...
[ [ "matplotlib.pyplot.imshow", "numpy.take", "numpy.squeeze", "matplotlib.pyplot.subplots", "torch.unsqueeze", "numpy.all", "matplotlib.pyplot.close", "numpy.transpose", "numpy.array", "matplotlib.pyplot.show", "numpy.zeros" ], [ "torch.abs", "torch.autograd.se...
escofresco/picint
[ "ee94d72cf25bf87472f6f60ad4c80821143eec28" ]
[ "mnist.py" ]
[ "# Train, Evaluate and Save the DL Model\n\n\nfrom __future__ import print_function\nimport keras\nfrom keras.datasets import mnist\nfrom keras.models import Sequential\nfrom keras.layers import Dense, Dropout, Flatten\nfrom keras.layers import Conv2D, MaxPooling2D\nfrom keras import backend as K\nimport numpy as n...
[ [ "numpy.argmax" ] ]
Ondrados/bachelor-thesis
[ "1ce6f40dfdeadbdcc31a1cce785962f9cf3145fd", "1ce6f40dfdeadbdcc31a1cce785962f9cf3145fd" ]
[ "yolo_v3/predict2.py", "faster_rcnn/eval.py" ]
[ "import os\nimport time\nimport torch\nimport numpy as np\nfrom PIL import Image, ImageDraw\nfrom matplotlib import pyplot as plt\nfrom torch.utils.data import DataLoader, random_split\n\nfrom data_utils import MyTestDataset, get_test_transforms\nfrom models import Darknet\nfrom utils import non_max_suppression\n\n...
[ [ "torch.utils.data.DataLoader", "torch.no_grad", "torch.cuda.is_available", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ], [ "numpy.amin", "torch.utils.data.DataLoader", "torch.utils.data.random_split", "torch.no_grad", "torch.cuda.is_available" ] ]
Chillee/benchmark
[ "91e1b2871327e44b9b7d24d173ca93720fb6565b", "91e1b2871327e44b9b7d24d173ca93720fb6565b", "91e1b2871327e44b9b7d24d173ca93720fb6565b", "a8a458230489710ab945b37ec22e93315230f2de", "a8a458230489710ab945b37ec22e93315230f2de", "a8a458230489710ab945b37ec22e93315230f2de" ]
[ "torchbenchmark/models/demucs/demucs/separate.py", "legacy/rnns/benchmarks/torchqrnn/forget_mult.py", "legacy/rnns/benchmarks/cudnn_lstm.py", "torchbenchmark/models/fastNLP/fastNLP/core/field.py", "torchbenchmark/models/fastNLP/test/modules/encoder/test_seq2seq_encoder.py", "torchbenchmark/models/fastNLP/...
[ "# Copyright (c) Facebook, Inc. and its affiliates.\n# All rights reserved.\n#\n# This source code is licensed under the license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport argparse\nimport hashlib\nimport sys\nfrom pathlib import Path\n\nimport requests\nimport torch as th\nim...
[ [ "scipy.io.wavfile.write", "torch.cuda.is_available" ], [ "torch.jit.trace", "torch.cuda.current_device", "torch.cuda.current_stream", "torch.rand", "torch.cuda.is_available", "torch.stack" ], [ "torch.randn", "torch.nn.LSTM", "torch.autograd.Variable" ], [ ...
flyingwjw/Documentation
[ "567608f388ca369b864c2d75a94647801b5dfa1e", "567608f388ca369b864c2d75a94647801b5dfa1e", "567608f388ca369b864c2d75a94647801b5dfa1e" ]
[ "python/learn/PythonDataVisualizationCookbookSE_Code/Chapter 03/ch03-rec12-errorbar.py", "python/learn/PythonDataVisualizationCookbookSE_Code/Chapter 04/ch04_rec08_fill_under.py", "python/learn/PythonDataVisualizationCookbookSE_Code/Chapter 03/ch03-rec15-stacked-plot.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\n\n# generate measures from gaussian distribution \nx = np.arange(0, 10, 1)\n\n# values computed from \"measured\"\ny = np.log(x)\n\n# add some error samples from standard normal distribution \nxe = 0.1 * np.abs(np.random.randn(len(y)))\n\n# draw and show errorba...
[ [ "matplotlib.pyplot.legend", "numpy.log", "matplotlib.pyplot.title", "numpy.arange", "matplotlib.pyplot.bar", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ], [ "numpy.arange", "numpy.ma.masked_greater", "numpy.sin", "matplotlib...
flysky2008/autogluon
[ "7ad9e5601cf17e616950ae7ef2e84d77b04832e4" ]
[ "autogluon/utils/tabular/ml/trainer/abstract_trainer.py" ]
[ "import copy, time, traceback, logging\nimport os\nfrom typing import List\nimport numpy as np\nimport pandas as pd\nfrom pandas import DataFrame, Series\nfrom collections import defaultdict\n\nfrom ..constants import BINARY, MULTICLASS, REGRESSION\nfrom ...utils.loaders import load_pkl\nfrom ...utils.savers import...
[ [ "numpy.isnan", "pandas.concat", "pandas.Series", "pandas.DataFrame" ] ]
zangjinxia/remote-sensing
[ "942fe914e93ab25e0074e061677e0f5294afdc24" ]
[ "resizeData_final_github.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\n@author zangjinx\r\n@date 2020-12-3\r\n@brief 利用shp裁剪影像,影像需具有坐标信息\r\n\"\"\"\r\n\r\nimport gdal\r\nfrom osgeo import gdal_array,ogr\r\nimport gdalnumeric\r\nfrom PIL import Image, ImageDraw\r\nimport os\r\nimport sys\r\nimport numpy as np\r\n\r\ngdal.UseExceptions()\r\n\r\nclass...
[ [ "numpy.array", "numpy.empty" ] ]
olivertren/check-worthy
[ "77ecc3cc92c800b3dd9839a7a7d6ccd79eba1214" ]
[ "src/models/keras_bi_lstm.py" ]
[ "import sys\nsys.path.append('/usr/users/oliverren/meng/check-worthy')\n\nfrom keras.preprocessing.text import Tokenizer\nfrom keras.preprocessing.sequence import pad_sequences\nfrom keras.layers import Embedding, LSTM, Bidirectional, Dropout, Dense\nfrom keras import Sequential\nfrom src.data import debates\nimpor...
[ [ "numpy.asarray", "sklearn.metrics.precision_score", "sklearn.metrics.recall_score" ] ]
ChadFulton/scipy
[ "6a7327e8bb8248b2ea165180bc602edf1ab33dda" ]
[ "scipy/spatial/tests/test_qhull.py" ]
[ "from __future__ import division, print_function, absolute_import\n\nimport os\nimport copy\n\nimport numpy as np\nfrom numpy.testing import (assert_equal, assert_almost_equal, run_module_suite,\n assert_, dec, assert_allclose, assert_array_equal,\n assert_raises)...
[ [ "numpy.dot", "numpy.sqrt", "numpy.einsum", "numpy.linspace", "numpy.asarray", "numpy.all", "numpy.seterr", "numpy.concatenate", "scipy.spatial.qhull.ConvexHull", "scipy.lib.six.xrange", "numpy.cross", "numpy.where", "scipy.spatial.cKDTree", "numpy.testing.as...
zentralwerkstatt/CLIP
[ "d8dac58224e648cf9aa5bd06c4e3a88152ce15f3" ]
[ "clip/model.py" ]
[ "from collections import OrderedDict\nfrom typing import Tuple, Union\n\nimport numpy as np\nimport torch\nimport torch.nn.functional as F\nfrom torch import nn\n\n\nclass Bottleneck(nn.Module):\n expansion = 4\n\n def __init__(self, inplanes, planes, stride=1):\n super().__init__()\n\n # all co...
[ [ "torch.cat", "torch.zeros", "torch.nn.Embedding", "torch.ones", "torch.nn.MultiheadAttention", "torch.randn", "torch.arange", "torch.nn.Sequential", "torch.sigmoid", "numpy.log", "torch.empty", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.AvgPool2d", ...
allanchua101/ipynta
[ "861c36b1c2d675611fcd5ed478d658f8180d03af" ]
[ "src/ipynta/transform/vflip.py" ]
[ "from .base import BaseTransform\r\nfrom PIL import Image\r\nimport numpy as np\r\n\r\nclass VFlipTransform(BaseTransform):\r\n \"\"\"Class used for creating a vertical flipped copies of images.\"\"\"\r\n \r\n def __init__(self):\r\n \"\"\"Constructs an instance of VFlipTransform.\"\"\"\r\n BaseTransform._...
[ [ "numpy.flipud", "numpy.array" ] ]
m---w/pya
[ "5f3290842db95b722f6c41a97f153352da25353f" ]
[ "tests/test_ugen.py" ]
[ "from unittest import TestCase\nfrom pya import *\nimport numpy as np\nimport logging\nlogging.basicConfig(level=logging.DEBUG)\n\n\nclass TestUgen(TestCase):\n\n def setUp(self):\n pass\n\n def tearDown(self):\n pass\n\n def test_sine(self):\n sine = Ugen().sine(freq=200, amp=0.5, dur...
[ [ "numpy.max" ] ]
Jasmine216/Project_vmaf
[ "60b31d208600806939103dfbe41216f98c56628e" ]
[ "python/vmaf/core/feature_extractor.py" ]
[ "from abc import ABCMeta, abstractmethod\nfrom xml.etree import ElementTree\n\nfrom vmaf.tools.decorator import override\n\n__copyright__ = \"Copyright 2016-2020, Netflix, Inc.\"\n__license__ = \"BSD+Patent\"\n\nimport re\nimport numpy as np\nimport ast\n\nfrom vmaf import ExternalProgramCaller\nfrom vmaf.core.exec...
[ [ "numpy.hstack", "numpy.isnan", "numpy.array", "numpy.isinf", "numpy.vstack" ] ]
HOUYONGKUO/D3Feat
[ "d005f3811c12764c16d4f5e9a01c6720e7e72392" ]
[ "geometric_registration/utils.py" ]
[ "import os\nimport open3d\nimport numpy as np\n\n\ndef get_pcd(pcdpath, filename):\n return open3d.read_point_cloud(os.path.join(pcdpath, filename + '.ply'))\n\n\ndef get_keypts(keyptspath, filename):\n keypts = np.load(os.path.join(keyptspath, filename + f'.npy'))\n return keypts\n\n\ndef get_desc(descpat...
[ [ "numpy.zeros" ] ]
ludaavics/numba
[ "d630c1cc7f261365aa92f6e3437abaaa185d8482", "d630c1cc7f261365aa92f6e3437abaaa185d8482" ]
[ "numba/tests/test_tuples.py", "numba/cuda/tests/cudapy/test_sm_creation.py" ]
[ "import collections\nimport itertools\n\nimport numpy as np\n\nfrom numba.core.compiler import compile_isolated\nfrom numba import njit, jit, typeof\nfrom numba.core import types, errors, utils\nfrom numba.tests.support import TestCase, MemoryLeakMixin, tag\nimport unittest\n\n\nRect = collections.namedtuple('Rect'...
[ [ "numpy.arange", "numpy.zeros", "numpy.testing.assert_equal" ], [ "numpy.array" ] ]
fintzd/rasa
[ "6359be5509c7d87cd29c2ab5149bc45e843fea85", "6359be5509c7d87cd29c2ab5149bc45e843fea85" ]
[ "rasa/nlu/featurizers/dense_featurizer/lm_featurizer.py", "rasa/core/featurizers/single_state_featurizer.py" ]
[ "from __future__ import annotations\nimport numpy as np\nimport logging\n\nfrom typing import Any, Text, List, Dict, Tuple, Type\n\nfrom rasa.engine.graph import ExecutionContext, GraphComponent\nfrom rasa.engine.recipes.default_recipe import DefaultV1Recipe\nfrom rasa.engine.storage.resource import Resource\nfrom ...
[ [ "numpy.reshape", "numpy.array", "numpy.zeros" ], [ "numpy.expand_dims" ] ]
slohani-ai/data-centric-in-qis
[ "bbc545454f7d98a28a4fc83f2f6b14de253fcb6c" ]
[ "Toy-model/CP_werner_with_MA/utils/Purity_Measure.py" ]
[ "import tensorflow as tf\n\ndef purity(dm):\n mul = tf.math.real(tf.linalg.trace(tf.linalg.matmul(dm, dm, adjoint_b=True)))\n return mul.numpy()\n" ]
[ [ "tensorflow.linalg.matmul" ] ]
qmkakaxi/DIG_FL
[ "9a03ae17b0210166409baf00c2aa87e4809fff1c" ]
[ "standaloneBeta/DIGFL_hfl/models/noisylabel.py" ]
[ "import numpy as np\r\nimport torch\r\n\r\n\r\n\r\n\r\n\r\ndef noisy_label_change_client(dataName, dict_users, dataset, noisy_client, noisy_rate):\r\n \"\"\"\r\n change correct label into noisy label\r\n dataName:'MNIST' or 'cifar'\r\n \"\"\"\r\n if dataName == 'MNIST':\r\n originTargets = dat...
[ [ "torch.tensor" ] ]
fairseq-FT/fairseq
[ "18725499144c1bba7c151b796ba774e59d36eaa9", "18725499144c1bba7c151b796ba774e59d36eaa9", "18725499144c1bba7c151b796ba774e59d36eaa9", "18725499144c1bba7c151b796ba774e59d36eaa9", "18725499144c1bba7c151b796ba774e59d36eaa9", "18725499144c1bba7c151b796ba774e59d36eaa9" ]
[ "examples/simultaneous_translation/utils/functions.py", "fairseq/models/wav2vec/wav2vec2_asr.py", "fairseq/modules/quantization/pq/utils.py", "fairseq/benchmark/dummy_model.py", "examples/speech_to_text/data_utils.py", "tests/test_constraints.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport torch\n\n\ndef exclusive_cumprod(tensor, dim: int, eps: float = 1e-10):\n \"\"\"\n Implementing exclusive cumprod.\n ...
[ [ "torch.ones", "torch.nn.functional.conv1d", "torch.exp", "torch.log", "torch.arange", "torch.cumsum" ], [ "torch.nn.Dropout", "numpy.random.random", "torch.nn.functional.dropout", "torch.nn.init.constant_", "torch.nn.ModuleList", "torch.nn.Embedding", "torch...
rflieshman/BOLSTM
[ "c33a8b2a7722acb5e3ff55c3735591aea4f76f49" ]
[ "src/train_rnn.py" ]
[ "import random\nimport sys\nimport logging\nimport os\n\nimport collections\nimport numpy as np\n\nnp.random.seed(1)\nfrom tensorflow import set_random_seed\n\nset_random_seed(1)\nfrom gensim.models.keyedvectors import KeyedVectors\nfrom keras.utils.np_utils import to_categorical\nfrom keras.models import model_fro...
[ [ "matplotlib.pyplot.legend", "numpy.asarray", "matplotlib.pyplot.plot", "numpy.concatenate", "sklearn.metrics.f1_score", "numpy.save", "tensorflow.ConfigProto", "numpy.argmax", "tensorflow.Session", "numpy.load", "numpy.zeros", "matplotlib.pyplot.figure", "matplo...
voxilady/tensorflow
[ "ba730a4f6de09ab8635091517933462dc70e4443" ]
[ "tensorflow/python/ops/parallel_for/control_flow_ops_test.py" ]
[ "# Copyright 2018 The TensorFlow Authors. 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 requ...
[ [ "tensorflow.python.ops.data_flow_ops.stack_push_v2", "tensorflow.python.ops.nn.softmax", "tensorflow.python.ops.array_ops.shape", "tensorflow.python.ops.control_flow_ops.while_loop", "tensorflow.python.ops.parsing_ops.parse_single_example", "tensorflow.python.ops.array_ops.placeholder", ...
w-sugar/slowfast
[ "7d5d759ddfd759298e10e7f49ba343c9d4229437" ]
[ "slowfast/datasets/utils.py" ]
[ "#!/usr/bin/env python3\n\nimport logging\nimport numpy as np\nimport os\nimport random\nimport time\nfrom collections import defaultdict\nimport cv2\nimport torch\nfrom iopath.common.file_io import g_pathmgr\nfrom torch.utils.data.distributed import DistributedSampler\n\nfrom . import transform as transform\n\nlog...
[ [ "torch.linspace", "torch.utils.data.distributed.DistributedSampler", "numpy.stack", "torch.tensor", "numpy.zeros" ] ]
cclauss/kornia
[ "bf2f45873f0204fcb0f8bfab51fd4ed1316935c5", "bf2f45873f0204fcb0f8bfab51fd4ed1316935c5" ]
[ "kornia/geometry/epipolar/numeric.py", "test/augmentation/test_container.py" ]
[ "\"\"\"Module containing numerical functionalities for SfM\"\"\"\n\nimport torch\n\n# TODO: this should go to `kornia.geometry.linalg`\n\n\ndef cross_product_matrix(x: torch.Tensor) -> torch.Tensor:\n r\"\"\"Returns the cross_product_matrix symmetric matrix of a vector.\n\n Args:\n x: The input vector ...
[ [ "torch.stack", "torch.eye", "torch.zeros_like", "torch.zeros" ], [ "torch.jit.script", "torch.nn.Sequential", "torch.ones", "torch.randint", "torch.manual_seed", "torch.randn", "torch.tensor", "torch.as_tensor" ] ]