repo_name stringlengths 8 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
brunompacheco/part-counting | [
"dbf71e7465c8e384e3c60694f65819a65742193b"
] | [
"src/features/base.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... | [
[
"numpy.array",
"torch.cuda.is_available",
"torch.device"
]
] |
carefree0910/carefree-flow | [
"7035015a072cf8142074d01683889f90950d2939"
] | [
"cflow/misc/internal_/data.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.shuffle",
"numpy.random.multinomial"
]
] |
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.full_like",
"numpy.roll",
"numpy.dtype",
"numpy.argmax",
"numpy.maximum"
]
] |
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.savefig",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel"
]
] |
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.zeros",
"torch.sigmoid",
"torch.tanh"
]
] |
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"
] | [
"src/network/hiarBayesGoogLenet_gap_v4.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"
]
] |
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.ones",
"numpy.transpose",
"numpy.zeros",
"numpy.cos",
"numpy.exp",
"numpy.angle",
"numpy.array",
"numpy.sin",
"numpy.tanh",
"numpy.mean"
]
] |
jsandersen/CMT | [
"1be6e36b9a6042386395bc654c9dd4b579e6ce6d"
] | [
"training/Toxic_CNN2_MCD.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.compat.v1.disable_v2_behavior",
"pandas.concat",
"tensorflow.keras.models.load_model"
]
] |
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.style.use",
"matplotlib.pyplot.legend",
"pandas.read_csv",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.title",
"matplotlib.pyplot.show"
]
] |
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.period_range",
"numpy.ones",
"pandas.PeriodIndex",
"pandas.DatetimeIndex",
"pandas.Period",
"numpy.testing.assert_array_equal",
"numpy.dstack",
"numpy.all",
"numpy.array",
"numpy.full"
]
] |
shenghh2015/segmentation_models | [
"473c528c724f62ff38ac127747dd8babb7de6b85"
] | [
"translate/train_model.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... | [
[
"numpy.load",
"tensorflow.keras.optimizers.Adam",
"tensorflow.keras.losses.Huber",
"tensorflow.keras.backend.mean",
"numpy.random.permutation",
"tensorflow.multiply",
"tensorflow.keras.backend.square",
"numpy.stack",
"numpy.concatenate",
"tensorflow.keras.callbacks.ModelChe... |
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"
] | [
"tensorflow_probability/python/vi/optimization_test.py"
] | [
"# 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.optimizers.Adam",
"tensorflow.compat.v2.exp",
"tensorflow.compat.v2.nn.softplus",
"tensorflow.compat.v2.control_dependencies",
"tensorflow.compat.v2.convert_to_tensor",
"tensorflow.compat.v2.eye",
"tensorflow.compat.v2.zeros",
"numpy.log",
"tensorflow.comp... |
phgupta/XBOS | [
"1fea0b024d97ae142d97b3a94510403928ed44b7"
] | [
"services/occupancy/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... | [
[
"numpy.array",
"pandas.Series",
"pandas.concat"
]
] |
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.stack",
"tensorflow.get_collection",
"tensorflow.get_default_session",
"tensorflow.Graph",
"tensorflow.train.latest_checkpoint",
"tensorflow.train.Saver",
"tensorflow.core.framework.summary_pb2.Summary",
"numpy.mean"
]
] |
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_... | [
[
"tensorflow.saved_model.load",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.subplot",
"matplotlib.animation.FuncAnimation"
]
] |
periakiva/finding_berries | [
"1dfc7cf00c384321e39872921051dc9535355e53"
] | [
"models/fpn/fpn_decoder.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.GroupNorm",
"torch.nn.Dropout2d",
"torch.nn.Conv2d",
"torch.nn.Sequential",
"torch.nn.ReLU",
"torch.cat",
"torch.nn.functional.interpolate"
]
] |
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... | [
[
"tensorflow.python._pywrap_util_port.IsMklEnabled",
"tensorflow.pywrap_tensorflow.IsMklEnabled",
"numpy.sum",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.title",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.imshow",
"matplotlib.use",
"nump... |
willfrey/ray | [
"288a81b42ef0186ab4db33b30191614a7bdb69f6"
] | [
"python/ray/workflow/tests/test_checkpoint_2.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"
]
] |
jaayeon/emotion_classification | [
"5514360803b80f1b3dc607c077a14785d9a01669"
] | [
"Resnet_GRU/data_loader.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.utils.data.DataLoader",
"numpy.zeros",
"numpy.resize",
"numpy.expand_dims",
"torch.from_numpy",
"torch.LongTensor",
"numpy.random.randint"
]
] |
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.allclose",
"pandas.DataFrame",
"numpy.isnan"
]
] |
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"
] | [
"confidnet/models/segnet_selfconfid.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.MaxUnpool2d",
"torch.nn.Conv2d",
"torch.nn.Dropout",
"torch.nn.functional.dropout"
]
] |
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... | [
[
"numpy.empty",
"numpy.zeros",
"pandas.read_csv",
"pandas.DataFrame",
"numpy.concatenate"
]
] |
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.sum",
"numpy.ones",
"numpy.meshgrid",
"numpy.zeros",
"numpy.exp",
"numpy.atleast_1d",
"numpy.log",
"numpy.array",
"numpy.dot",
"numpy.square"
]
] |
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... | [
[
"numpy.zeros",
"numpy.savetxt",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel",
"numpy.random.rand",
"numpy.flip",
"numpy.array",
"matplotlib.pyplot.colorbar",
"numpy.random.randint",
"numpy.linspace",
... |
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.sum",
"torch.randint",
"torch.sparse_coo_tensor",
"torch.tensor",
"torch.nn.functional.one_hot",
"torch.arange",
"torch.index_select",
"torch.cat"
]
] |
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.empty",
"numpy.ones",
"torch.stack",
"torch.nn.functional.softmax",
"torch.mm",
"torch.nn.functional.one_hot",
"torch.log",
"torch.nn.ModuleList",
"torch.cat",
"torch.nn.Dropout",
"torch.nn.init.kaiming_normal_",
"torch.nn.GroupNorm",
"torch.backends.cudn... |
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.squeeze",
"numpy.argwhere",
"numpy.any",
"numpy.random.choice",
"numpy.max",
"numpy.array",
"numpy.where"
]
] |
ACTCollaboration/tilec | [
"11ed8d027ad6ffac09b3e291a047f33e97673f14"
] | [
"bin/planck/verify_projection.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"
]
] |
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.argmax",
"torch.tensor",
"numpy.array",
"torch.softmax"
]
] |
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.random.uniform",
"numpy.logical_or",
"numpy.vstack",
"matplotlib.pyplot.legend",
"numpy.sin",
"numpy.zeros",
"numpy.diag",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.grid",
"numpy.abs",
"matplotlib.pyplot.show",
"numpy.clip",
"numpy.min",
"numpy.s... |
qAp/kgl_deepfake | [
"d3ee36d704d82d5d72068ea16276a88b5746c8de"
] | [
"face_detection/lightDSFD/data/widerface.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.axis",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.subplots",
"numpy.expand_dims",
"torch.from_numpy",
"numpy.array",
"matplotlib.pyplot.Rectangle"
]
] |
ccjoechou/tvm | [
"779dc51e1332f417fa4c304b595ce76891dfc33a"
] | [
"python/tvm/meta_schedule/cost_model/cost_model.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"
]
] |
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.testing.assert_almost_equal",
"numpy.eye",
"matplotlib.pyplot.figure",
"numpy.cos",
"numpy.array",
"numpy.sin"
]
] |
jeikabu/lumberyard | [
"07228c605ce16cbf5aaa209a94a3cb9d6c1a4115"
] | [
"dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/cuda/tests/cudadrv/test_deallocations.py"
] | [
"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"
]
] |
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"
] | [
"vega/core/pipeline/fully_train_pipe_step.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"
]
] |
expoli/Learn-tensorflow | [
"cc6b30c233678cf8a6f5da97fdf02ff49e810e61"
] | [
"BEGINNER/ML_basics_with_Keras/Regression/Predict_fuel_efficiency.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",
"tensorflow.keras.utils.get_file",
"matplotlib.pyplot.axis",
"pandas.DataFrame",
"tensorflow.keras.optimizers.RMSprop",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.show",
"tensorflow.keras.callbacks... |
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.sum",
"numpy.diff",
"numpy.random.randn",
"numpy.atleast_1d",
"numpy.array",
"numpy.where",
"numpy.float64"
]
] |
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.ReLU",
"torch.nn.Sigmoid",
"torch.nn.Linear",
"torch.nn.LeakyReLU"
]
] |
joshp112358/Cirq | [
"c4fac27a9849e589ee05b4f702f2d7c9049aaeea"
] | [
"cirq/ops/controlled_operation.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"
]
] |
anonymouslorem/library_identification_vulnerability_report | [
"3eb1916b25bcf885640ed19954377edf45f7498a"
] | [
"FastXML/fastxml/fastxml/fastxml.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"
]
] |
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... | [
[
"tensorflow.keras.preprocessing.image.img_to_array",
"tensorflow.keras.preprocessing.image.load_img",
"numpy.expand_dims",
"numpy.argmax"
]
] |
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.isfinite",
"torch.cuda.device_count"
]
] |
potassco/xorro | [
"6ed499ac1608cf1d1d1b82b632d5961ee1bd8439"
] | [
"xorro/tests/gje_test.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"
]
] |
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.sum",
"numpy.empty",
"numpy.core.numeric.normalize_axis_tuple",
"numpy.copy",
"numpy.ndarray",
"numpy.empty_like",
"numpy.all",
"numpy.product",
"numpy.array"
]
] |
WenqiJiang/FPGA-Accelerator-for-Recommender-Systems | [
"6c3031487cd1447b7f5362483c14b108177387bb"
] | [
"tf_wide_deep_377_table_2048/python/train.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.app.run",
"tensorflow.logging.set_verbosity",
"tensorflow.train.ClusterSpec",
"tensorflow.estimator.train_and_evaluate"
]
] |
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... | [
[
"tensorflow.keras.layers.Flatten",
"tensorflow.compat.v1.Session",
"matplotlib.pyplot.legend",
"tensorflow.keras.layers.Dropout",
"tensorflow.compat.v1.ConfigProto",
"tensorflow.keras.losses.SparseCategoricalCrossentropy",
"matplotlib.pyplot.figure",
"tensorflow.keras.layers.MaxPoo... |
kalosisz/tensorflow | [
"b7ecd75b24f577b73500024fe91d2ea0c806d05a"
] | [
"tensorflow/python/framework/extension_type_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.framework.type_spec.lookup",
"tensorflow.python.framework.tensor_spec.TensorSpec",
"tensorflow.python.module.module.Module",
"tensorflow.python.ops.array_ops.placeholder_with_default",
"tensorflow.python.util.nest.flatten",
"tensorflow.python.saved_model.save.save",
... |
mavroudisv/acme | [
"3eb4d55a67ea460710ba9e2b2ecf1aa339ba7d2d"
] | [
"acme/agents/tf/d4pg/agent_test.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"
]
] |
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.array",
"numpy.load",
"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.randint",
"numpy.random.seed"
]
] |
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.sum",
"torch.nn.BatchNorm2d",
"torch.nn.Linear",
"torch.nn.Conv2d",
"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.append",
"numpy.ma.masked_where",
"numpy.expand_dims",
"matplotlib.pyplot.get_cmap",
"numpy.where",
"numpy.load",
"numpy.ma.is_masked",
"numpy.zeros",
"sklearn.preprocessing.MinMaxScaler",
"matplotlib.pyplot.subplots",
"numpy... |
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.sqrt",
"numpy.sum",
"numpy.cbrt",
"numpy.arctan",
"pandas.DataFrame",
"numpy.asarray",
"numpy.cos",
"numpy.amin",
"numpy.power",
"numpy.amax",
"numpy.sin",
"numpy.where"
]
] |
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",
"matplotlib.pyplot.rc",
"pandas.DataFrame",
"numpy.set_printoptions",
"numpy.random.seed",
"numpy.exp",
"numpy.arange",
"pandas.Index"
]
] |
joeranbosma/nnDetection | [
"2ebbf1cdc8a8794c73e325f06fea50632c78ae8c"
] | [
"nndet/ptmodule/retinaunet/base.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",
"torch.optim.SGD",
"numpy.mean"
]
] |
isabella232/nnabla | [
"82a3c6fed382f889d1a4a429c696bb8cedf6ce79"
] | [
"python/test/function/test_affine.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"
]
] |
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.random.randn",
"numpy.empty_like",
"numpy.testing.assert_allclose",
"numpy.isnan"
]
] |
function2-llx/MONAI | [
"4cddaa830b61b88ec78e089bb5f21e05bb1a78f4"
] | [
"tests/test_hilbert_transform.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",
"torch.randn",
"torch.as_tensor",
"numpy.fft.ifft",
"torch.cuda.is_available",
"numpy.expand_dims",
"numpy.stack",
"numpy.linspace",
"torch.device",
"numpy.fft.fftfreq",
"numpy.hanning"
]
] |
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.random.shuffle",
"numpy.squeeze",
"numpy.random.seed",
"numpy.asarray",
"numpy.arange",
"numpy.expand_dims",
"matplotlib.use",
"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"
] | [
"infer_imdb_tfl.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... | [
[
"numpy.array",
"tensorflow.lite.Interpreter"
]
] |
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"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.