repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
flofriday/youtube-data | [
"24ac3e32c19e74bcc336183f309237e3e69662ca"
] | [
"bot.py"
] | [
"import logging\nimport os\nimport io\nimport matplotlib\n\nimport matplotlib.pyplot as plt\nimport pytz\nimport telegram\nfrom telegram.ext import Updater, CommandHandler, MessageHandler, Filters\nfrom telegram.ext.dispatcher import run_async\n\nimport youtube_data as ytd\nimport user\nfrom user import User, UserS... | [
[
"matplotlib.use"
]
] |
DanielAndreasen/Thesis | [
"da18d41e48de5d34c8281ffd9e850dfd4fe37824"
] | [
"figures/phoenix/create_arcturus_synthetic.py"
] | [
"from __future__ import division\nimport os\nimport numpy as np\nfrom astropy.io import fits\nfrom plot_fits import nrefrac\nfrom scipy.interpolate import interp1d\n\n\ndef read_phoenix(fname):\n path = os.path.expanduser('~/.plotfits/')\n pathwave = os.path.join(path, 'WAVE_PHOENIX-ACES-AGSS-COND-2011.fits')... | [
[
"scipy.interpolate.interp1d",
"numpy.arange"
]
] |
arkiv2/pandas | [
"257ac884d61a74990d1cb4d72c48b1c9003298d5",
"506520bd35331aa82db50686c07d96594cac0c10"
] | [
"pandas/core/algorithms.py",
"pandas/tests/frame/test_misc_api.py"
] | [
"\"\"\"\nGeneric data algorithms. This module is experimental at the moment and not\nintended for public consumption\n\"\"\"\nfrom __future__ import division\nfrom warnings import warn\nimport numpy as np\n\nfrom pandas import compat, lib, tslib, _np_version_under1p8\nfrom pandas.types.cast import _maybe_promote\nf... | [
[
"pandas.types.common.is_datetime_or_timedelta_dtype",
"pandas.hashtable.duplicated_float64",
"pandas.types.common._ensure_platform_int",
"pandas.types.common.is_period_arraylike",
"pandas.hashtable.value_count_int64",
"pandas.algos.arrmap_float64",
"numpy.sort",
"pandas.types.commo... |
SherylHYX/pytorch_geometric | [
"5f8e99d033a596426ef502c2ea4b9be89ec58f38"
] | [
"test/nn/conv/test_gatv2_conv.py"
] | [
"import torch\nfrom torch_sparse import SparseTensor\nfrom torch_geometric.nn import GATv2Conv\n\n\ndef test_gatv2_conv():\n x1 = torch.randn(4, 8)\n x2 = torch.randn(2, 8)\n edge_index = torch.tensor([[0, 1, 2, 3], [0, 0, 1, 1]])\n row, col = edge_index\n value = torch.randn(row.size(0))\n adj = ... | [
[
"torch.allclose",
"torch.tensor",
"torch.randn"
]
] |
partylikeits1984/financial-forecast-telegram-bot | [
"521e50977efefa212df3fd993e6197548b6bed7f"
] | [
"prophet/prophetSP500.py"
] | [
"from yahoo_fin import stock_info as si\nimport pandas as pd\nfrom fbprophet import Prophet\nfrom fbprophet.plot import add_changepoints_to_plot\n\nend = date.today()\nd = datetime.timedelta(days=730)\nstart = end - d\n\nticker = \"ES=F\"\ns = si.get_data(ticker, start, end)\ns['Date'] = s.index\ns.rename({'close':... | [
[
"pandas.DataFrame"
]
] |
HoangQuangVu/DSN-Video-Summariztion | [
"234a728a805166bab390b5262ee0f18e520dca5f"
] | [
"parse_json.py"
] | [
"import os\nimport argparse\nimport re\nimport os.path as osp\nimport matplotlib\nmatplotlib.use('Agg')\nfrom matplotlib import pyplot as plt\nfrom utils import read_json\nimport numpy as np\n\n\"\"\"\nParse json file (.json) to extract rewards for specific videos.\nHow to use:\n# image will be saved in path: blah_... | [
[
"matplotlib.use",
"numpy.array",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.close",
"matplotlib.pyplot.ylabel",
"numpy.repeat",
"numpy.convolve"
]
] |
IdkwhatImD0ing/AlgorithmPractice | [
"2d8d68a6d0168e873d61d1e3873e882bcdaf003f"
] | [
"Python/MachineLearning/ProfitPrediction/LinearRegression.py"
] | [
"import os\nimport numpy as np\nfrom matplotlib import pyplot\nfrom mpl_toolkits.mplot3d import Axes3D\n\nimport io\nimport pandas as pd\n\n\ndef plotData(x, y):\n \"\"\"\n Plots the data points x and y into a new figure. Plots the data \n points and gives the figure axes labels of population and profit.\n... | [
[
"numpy.array",
"numpy.dot",
"numpy.zeros",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.title",
"pandas.read_csv",
"matplotlib.pyplot.figure",
"numpy.ones",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.show",... |
aaavinash85/100-Days-of-ML- | [
"d055d718f7972e3a4469279b9112867a42cf652f"
] | [
"Tensorflow/fashionMni1.py"
] | [
"# TensorFlow and tf.keras\nimport tensorflow as tf\nfrom tensorflow import keras\n\n# Helper libraries\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nprint(tf.__version__)\n\nfashion_mnist = keras.datasets.fashion_mnist\n\n(train_images, train_labels), (test_images, test_labels) = fashion_mnist.load_data(... | [
[
"numpy.max",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.colorbar",
"tensorflow.keras.layers.Flatten",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.yticks",
"matplotlib.pyplot.figure",
"tensorflow.keras.layers.Dense"... |
julesy89/pyallocation | [
"af80a8e2367a006121dd0702b55efa7b954bb039"
] | [
"pyallocation/problem.py"
] | [
"import numpy as np\n\nfrom pyallocation.function_loader import FunctionLoader\nfrom pyallocation.util import calc_obj, calc_constr\nfrom pymoo.core.problem import ElementwiseProblem\n\n\nclass AllocationProblem(ElementwiseProblem):\n\n def __init__(self, R, T, alloc=None, anti_alloc=None, w=None, **kwargs):\n ... | [
[
"numpy.full",
"numpy.array"
]
] |
SeaPea1/PyPortfolioOpt | [
"28ef2254153e7d0a3fb9e24a2c03e80dc8b1a0d1"
] | [
"tests/test_risk_models.py"
] | [
"import pandas as pd\nimport numpy as np\nimport pytest\nfrom pypfopt import risk_models, expected_returns\nfrom tests.utilities_for_tests import get_data\n\n\ndef test_sample_cov_dummy():\n data = pd.DataFrame(\n [\n [4.0, 2.0, 0.6],\n [4.2, 2.1, 0.59],\n [3.9, 2.0, 0.58]... | [
[
"numpy.testing.assert_allclose",
"pandas.testing.assert_frame_equal",
"numpy.array",
"numpy.trace",
"numpy.isnan",
"numpy.zeros",
"pandas.DataFrame",
"numpy.testing.assert_array_almost_equal",
"numpy.allclose",
"numpy.identity",
"numpy.abs"
]
] |
Strikeskids/pyquil | [
"369c944f22d00d987b0099012a9292243781906a"
] | [
"pyquil/tests/test_parameters.py"
] | [
"from math import pi\n\nimport numpy as np\n\nfrom pyquil.parameters import (Parameter, quil_sin, quil_cos, quil_sqrt, quil_exp, quil_cis,\n _contained_parameters, format_parameter, quil_cis, substitute, substitute_array)\n\n\ndef test_format_parameter():\n test_cases = [\n (... | [
[
"numpy.sin",
"numpy.exp",
"numpy.sqrt",
"numpy.cos"
]
] |
GoekeLab/m6anet | [
"be3148a6404bdd2a4e5e9544b3e618e836c6483c",
"be3148a6404bdd2a4e5e9544b3e618e836c6483c"
] | [
"m6anet/utils/data_utils.py",
"m6anet/model/model_blocks/blocks.py"
] | [
"import os\nimport pandas as pd\nimport numpy as np\nimport torch\nimport json\nimport joblib\nfrom ..scripts.compute_normalization_factors import annotate_kmer_information, create_kmer_mapping_df, create_norm_dict\nfrom torch.utils.data import DataLoader, Dataset\nfrom torch.utils.data._utils.collate import defaul... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.argmin",
"torch.utils.data._utils.collate.default_collate",
"numpy.random.shuffle",
"torch.LongTensor",
"numpy.argmax",
"numpy.argwhere",
"torch.Tensor",
"numpy.unique"
],
[
"torch.nn.Linear",
"torch.nn.Dropout",
"t... |
zkbfdzp/hhatefi | [
"53e400c9fa217d099ceba7ce767ca40a1975addd"
] | [
"tests/buy_and_hold.py"
] | [
"# imports\nfrom zipline.api import (symbol, set_benchmark, order_target_percent,\n schedule_function, time_rules)\nfrom zipline.finance import commission\n#import numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\ndef initialize(context):\n context.set_commission(commis... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
J-A-St/heat_exchanger_calculation | [
"a57def1b2ccf74af6629a4cbc49fe6beea3a7194"
] | [
"test_heat_exchanger_reverse.py"
] | [
"import numpy as np\nfrom scipy.special import lambertw\n\nfrom heat_exchanger import HeatExchanger\nfrom heat_exchanger_reverse import HeatExchangerReverse\n\ninlet_temperatures = [80.0, 20.0]\nfilm_heat_transfer_coefficients = [1, 1]\nheat_capacity_flows = [5, 4]\nheat_load = 100\nmixer_type_hot = 'none'\nmixer_t... | [
[
"numpy.log"
]
] |
wayneisaacuy/perform | [
"333198b538eded5c498b236cf9d598b948dbb1e3"
] | [
"perform/input_funcs.py"
] | [
"\"\"\"Functions for handling ingestion of input files\"\"\"\n\nimport os\nimport re\n\nimport numpy as np\n\nfrom perform.constants import REAL_TYPE\n\n\ndef catch_input(in_dict, in_key, default_val):\n \"\"\"Handle non-list dictionary entries from parameter input files.\n\n Casts input value as same type as... | [
[
"numpy.asarray",
"numpy.zeros",
"numpy.sum",
"numpy.load",
"numpy.absolute"
]
] |
MarcAntoineAlex/SCINet | [
"4ac582cd717ba1c0c6c6d31a9a824235d35563ed"
] | [
"experiments/exp_basic.py"
] | [
"import os\nimport torch\nimport numpy as np\n\nclass Exp_Basic(object):\n def __init__(self, args):\n self.args = args\n self.device = self._acquire_device()\n self.model = self._build_model().cuda()\n\n def _build_model(self):\n raise NotImplementedError\n\n def _acquire_devic... | [
[
"torch.device"
]
] |
RubenPants/BlenderCNN | [
"89988ee6692e818cbfc295cc0b2b5f334eb58fb3"
] | [
"model.py"
] | [
"import json\nimport os\nfrom typing import Any, List, Tuple\nfrom warnings import warn\n\nimport numpy as np\nfrom keras.activations import sigmoid\nfrom keras.layers import Activation, BatchNormalization, Conv2DTranspose, Dense, ReLU, Reshape\nfrom keras.models import load_model as lm, Sequential\nfrom matplotlib... | [
[
"tensorflow.python.keras.callbacks.TensorBoard",
"tensorflow.python.keras.callbacks.ReduceLROnPlateau",
"numpy.asarray",
"tensorflow.python.keras.callbacks.EarlyStopping"
]
] |
tombroz/berkeley-cs294_homework | [
"5419b772c734093c750362d2e09b46ce59d79da6"
] | [
"hw3/dqn.py"
] | [
"import os\nimport sys\nimport time\n\nimport gym.spaces\nimport itertools\nimport numpy as np\nimport random\nimport tensorflow as tf\nimport tensorflow.contrib.layers as layers\nfrom collections import namedtuple\nfrom dqn_utils import *\n\nOptimizerSpec = namedtuple(\"OptimizerSpec\", [\"construct... | [
[
"tensorflow.shape",
"numpy.random.choice",
"tensorflow.group",
"tensorflow.argmax",
"tensorflow.global_variables",
"numpy.mean",
"tensorflow.reduce_max",
"tensorflow.placeholder",
"tensorflow.Summary.Value",
"tensorflow.summary.FileWriter",
"tensorflow.get_collection",
... |
Tilps/keras | [
"71ec611117d1bcbe8f49bc432200aa041bffefcb"
] | [
"keras/engine/input_spec.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.util.tf_export.keras_export",
"tensorflow.compat.v2.TensorShape",
"tensorflow.compat.v2.TensorSpec",
"tensorflow.compat.v2.as_dtype",
"tensorflow.compat.v2.nest.flatten",
"tensorflow.python.util.tf_export.tf_export"
]
] |
Minipeps/betapose | [
"e29162c82c867d4a8177322d7d49a55c5fd90639"
] | [
"3_6Dpose_estimator/utils/utils.py"
] | [
"import math\nimport numpy as np\nimport cv2\nfrom tqdm import tqdm\nfrom scipy.linalg import expm, norm\nfrom matplotlib import pyplot as plt\nfrom IPython import embed #debugging\nimport sys\nimport os\nthis_dir = os.path.dirname(__file__)\ncurrent_path = os.path.join(this_dir)\nsys.path.append(current_path)\nimp... | [
[
"numpy.copy",
"numpy.where",
"numpy.nonzero",
"numpy.eye",
"numpy.sqrt",
"numpy.cross",
"numpy.array",
"numpy.matmul",
"numpy.zeros",
"numpy.reshape",
"numpy.argsort",
"numpy.dstack",
"matplotlib.pyplot.show",
"scipy.linalg.norm",
"numpy.asarray",
"n... |
Muflhi01/Chatistics | [
"c091db38099f9edf9b39c2ed5fe99ace6a864d87"
] | [
"export.py"
] | [
"import argparse\nimport sys\nimport logging\nfrom utils import ArgParseDefault, add_load_data_args, load_data\nimport pandas as pd\nimport os\nfrom datetime import datetime\nimport pickle\n\nlog = logging.getLogger(__name__)\n\n\ndef main():\n \"\"\"Simple method to export message logs to either stdout or to a ... | [
[
"pandas.to_datetime",
"pandas.option_context",
"pandas.set_option"
]
] |
HongzhouTang/Pros-GNN | [
"b374166bb4789464e9c3c65b45432ebac1acf28d"
] | [
"train/layers.py"
] | [
"import torch\nimport torch.nn.functional as F\nimport torch.nn as nn\nfrom utils import *\nimport time\nimport torch.nn as nn\nclass Gate(torch.nn.Module):\n def __init__(self, n_in_feature, n_out_feature):\n super(Gate, self).__init__()\n self.W = nn.Linear(n_in_feature, n_out_feature)\n s... | [
[
"torch.nn.Linear",
"torch.cat",
"torch.einsum",
"torch.zeros"
]
] |
svenruf/trackintel | [
"8b3482f0a4f44cf5f5de366198a39ca54ac04e75"
] | [
"trackintel/preprocessing/positionfixes.py"
] | [
"from math import radians\n\nimport geopandas as gpd\nimport numpy as np\nimport pandas as pd\nfrom shapely.geometry import LineString, Point\nfrom sklearn.cluster import DBSCAN\n\nfrom trackintel.geogr.distances import haversine_dist\n\n\ndef generate_staypoints(positionfixes,\n method='slid... | [
[
"pandas.DataFrame",
"sklearn.cluster.DBSCAN",
"pandas.isna",
"pandas.Series"
]
] |
isabella232/snippet-ranger | [
"06247e0492d59b859fe48dea0428171b252770ef"
] | [
"snippet_ranger/models/snippet.py"
] | [
"from ast2vec import Source\nimport numpy as np\n\n\nclass Snippet(Source):\n \"\"\"\n This model can store code snippets. In general, code snippet is any part of source code file.\n For example, function declaration is a code snippet. So, this class is the same as source model\n but have start and end ... | [
[
"numpy.array"
]
] |
mmessalti/GmdhPy | [
"1dbd59de80c7d0b075c938864f7f76afe26ba12f"
] | [
"examples/boston_houses.py"
] | [
"# -*- coding: utf-8 -*-\nfrom __future__ import print_function\nfrom sklearn.datasets import load_boston\nfrom sklearn import metrics\nfrom gmdhpy.gmdh import Regressor\nfrom gmdhpy.plot_model import PlotModel\n\n\nif __name__ == '__main__':\n\n boston = load_boston()\n\n n_samples = boston.data.shape[0]\n\n... | [
[
"sklearn.metrics.r2_score",
"sklearn.metrics.mean_absolute_error",
"sklearn.metrics.mean_squared_error",
"sklearn.datasets.load_boston"
]
] |
tgautam03/CS6190-ProbabilisticML | [
"f000f571d1068ab640a360b490a40f0f15d8502b"
] | [
"assignments/a5/Q2.py"
] | [
"import numpy as np\nfrom scipy.special import expit\nimport matplotlib.pyplot as plt\nfrom scipy.stats import norm\nfrom scipy.stats import multivariate_normal\n\n##################################################################################################################################\n####################... | [
[
"numpy.copy",
"numpy.min",
"numpy.exp",
"numpy.eye",
"numpy.sqrt",
"numpy.linalg.inv",
"numpy.vstack",
"numpy.array",
"numpy.zeros",
"matplotlib.pyplot.title",
"numpy.hstack",
"matplotlib.pyplot.show",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.plot",
... |
nim65s/multicontact-api | [
"036b902deb2472bb22496a567e93a25a236a3e1e"
] | [
"unittest/python/scenario.py"
] | [
"# Copyright (c) 2019, CNRS\n# Authors: Pierre Fernbach <pfernbac@laas.fr>\nimport unittest\nfrom math import cos, sin, sqrt\nfrom random import uniform\n\nimport numpy as np\nfrom ndcurves import SE3Curve, bezier, piecewise, piecewise_SE3, polynomial\nfrom numpy import array, array_equal, isclose, random\n\nimport... | [
[
"numpy.array",
"numpy.isclose",
"numpy.random.rand",
"numpy.array_equal",
"numpy.zeros",
"numpy.linspace"
]
] |
Zac-HD/MyGrad | [
"fbc375d28842e1af1ebaf62ca6da479609a6baf6",
"fbc375d28842e1af1ebaf62ca6da479609a6baf6",
"fbc375d28842e1af1ebaf62ca6da479609a6baf6"
] | [
"tests/nnet/activations/test_leaky_relu.py",
"src/mygrad/nnet/activations/selu.py",
"tests/nnet/layers/test_batchnorm.py"
] | [
"import hypothesis.strategies as st\nimport numpy as np\nimport pytest\n\nfrom mygrad import Tensor, asarray\nfrom mygrad.nnet.activations import leaky_relu\nfrom tests.wrappers.uber import backprop_test_factory, fwdprop_test_factory\n\n\n@pytest.mark.parametrize(\"slope\", (None, 1j))\ndef test_input_validation(sl... | [
[
"numpy.minimum",
"numpy.abs",
"numpy.maximum"
],
[
"numpy.where",
"numpy.exp"
],
[
"numpy.shares_memory",
"numpy.testing.assert_allclose",
"numpy.copy",
"numpy.prod"
]
] |
tommylees112/crop_yield_prediction | [
"43299b6d6a1f22e4431e23bf92f9cff87c6f5073",
"43299b6d6a1f22e4431e23bf92f9cff87c6f5073"
] | [
"test_scripts/tommy_test.py",
"1_download_data/pull_MODIS_landcover_entire_county_clip.py"
] | [
"# tommy_test.py\nimport numpy as np\nimport os\n\ndef set_base_dir():\n \"\"\" SET path directory to the repo base \"\"\"\n os.chdir(os.path.abspath(\n os.path.join(\n os.path.dirname( __file__ ),'..'\n )\n )\n )\n print((\"Working from dir:\", os.getcwd()))\n\n return\n\nres... | [
[
"numpy.load"
],
[
"pandas.read_csv"
]
] |
ingeniamc/pyqtgraph | [
"be98ca4ffcb983050f250d827a62652d9cd7b824"
] | [
"pyqtgraph/graphicsItems/PlotDataItem.py"
] | [
"import numpy as np\nfrom .. import metaarray as metaarray\nfrom ..Qt import QtCore\nfrom .GraphicsObject import GraphicsObject\nfrom .PlotCurveItem import PlotCurveItem\nfrom .ScatterPlotItem import ScatterPlotItem\nfrom .. import functions as fn\nfrom .. import debug as debug\nfrom .. import getConfigOption\n\n\n... | [
[
"numpy.fft.rfft",
"numpy.array",
"numpy.empty",
"numpy.errstate",
"numpy.fft.rfftfreq",
"numpy.interp",
"numpy.diff",
"numpy.abs",
"numpy.log10"
]
] |
Robert-xiaoqiang/Model-Capability-Assessment | [
"3cb8673ea66bfeded9d6421e15b288b485ccc53b",
"3cb8673ea66bfeded9d6421e15b288b485ccc53b"
] | [
"cbbc/qapackage/RACEProcessor.py",
"cbbc/qapackage/TestHelper.py"
] | [
"import json\nimport os\nimport logging\nlogger = logging.getLogger(__name__)\nfrom functools import partial\nfrom multiprocessing import Pool, cpu_count\nfrom enum import Enum\nimport glob\n\nimport torch\nfrom torch import nn\nfrom torch.nn import init\nfrom torch.nn import functional as F\nfrom torch.utils.data ... | [
[
"torch.tensor",
"torch.utils.data.TensorDataset"
],
[
"numpy.asarray"
]
] |
Madrugaur/wiki-gender-and-stem | [
"d9ee8600651b91b6225bcb0fa824f8830711fba1"
] | [
"code/python/scripts/keyword_identifier.py"
] | [
"import math\n\nfrom scipy.stats.distributions import chi2\nimport os\nimport json\n\nfrom google_ngram_api import NGramRequest\n\n\ndef find_all_keys(data):\n keys = set()\n for data_dict in data:\n for key in data_dict[\"counts\"].keys():\n if data_dict[\"counts\"][key] > 10:\n ... | [
[
"scipy.stats.distributions.chi2.sf"
]
] |
aicroe/mlscratch | [
"59100ea2a83fc8cd8ae617b686f6981d62073528"
] | [
"src/mlscratch/measurer/pairwise_measurer.py"
] | [
"\"\"\"PairwiseMeasurer's module.\"\"\"\nimport numpy as np\n\nfrom mlscratch.tensor import Tensor\nfrom .measurer import Measurer\n\nclass PairwiseMeasurer(Measurer[float]):\n \"\"\"Compares the actual result against the expected element by element.\"\"\"\n\n def measure(self, result: Tensor, expected: Tenso... | [
[
"numpy.average"
]
] |
ColinAE/Computer-Vision-Classifier | [
"188200e13fdff8c805afd913d92a052034588a6d"
] | [
"evaluation.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Apr 6 12:58:03 2016\n\n@author: haiming\n\"\"\"\n\nimport sys\nimport numpy as np\nimport copy\nthreashold = 0.5\nframe_c_r = 0\nframe_c_w = 0\n# gt.txt the text file that contain ground truth\n# dt.txt the text file that contain the region of interest created by ou... | [
[
"numpy.zeros",
"numpy.minimum",
"numpy.sum",
"numpy.loadtxt",
"numpy.maximum"
]
] |
mfomicheva/OpenNMT-tf | [
"a367676a16f9e77f76bc58e138e78614eb4add1e"
] | [
"opennmt/inputters/inputter.py"
] | [
"\"\"\"Define generic inputters.\"\"\"\n\nimport abc\nimport six\n\nimport tensorflow as tf\n\nfrom opennmt.layers.reducer import ConcatReducer, JoinReducer\nfrom opennmt.utils import compat\nfrom opennmt.utils.data import inference_pipeline, training_pipeline\nfrom opennmt.utils.misc import extract_prefixed_keys, ... | [
[
"tensorflow.layers.dropout",
"tensorflow.estimator.export.ServingInputReceiver"
]
] |
gun8474/face-recognition-by-OAGAN | [
"54c67a29a22e25b14a24fb8aa3badba5444653ac",
"54c67a29a22e25b14a24fb8aa3badba5444653ac"
] | [
"implementations/sgan/sgan_main.py",
"implementations/sgan/sgan_main_cuda.py"
] | [
"# μλ‘μ΄ μ°Έκ³ λ§ν¬: https://github.com/eriklindernoren/PyTorch-GAN/tree/master/implementations/context_encoder\n# μ°λ¦¬λ κ°μ 3μ±λμ νκ³ μνλ λ°λ λΉμ·ν¨. shape μ°Έκ³ νκΈ° μ’μλ―νμ¬ μ²¨λΆν¨\n\n# λ(μν)λ μ¬μ§ 11κ° -> batch_size=11, num_classes=11μ΄λ μ£Όμλ°λ!\n\nimport argparse\nimport os\nimport numpy as np\nfrom dataloader import OAGandataset\nimport math\ni... | [
[
"torch.nn.BatchNorm2d",
"torch.nn.LeakyReLU",
"torch.ones",
"torch.cuda.is_available",
"torch.nn.functional.pad",
"torch.nn.Softmax",
"torch.nn.MaxPool2d",
"torch.nn.init.constant_",
"torch.nn.ConvTranspose2d",
"torch.nn.init.normal_",
"numpy.argmax",
"torch.utils.d... |
zhou3968322/dl-code-read | [
"aca204a986dabe2755becff0f42de1082299d791",
"aca204a986dabe2755becff0f42de1082299d791",
"aca204a986dabe2755becff0f42de1082299d791",
"aca204a986dabe2755becff0f42de1082299d791"
] | [
"pytorch/test/jit/test_save_load.py",
"pytorch/test/test_jit_py3.py",
"pytorch/torch/testing/_internal/common_device_type.py",
"pytorch/test/test_distributions.py"
] | [
"import os\nimport io\nimport sys\nimport random\nimport torch\nfrom itertools import product as product\nfrom torch import Tensor\nfrom typing import NamedTuple\n\n# Make the helper files in test/ importable\npytorch_test_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))\nsys.path.append(pytorch_t... | [
[
"torch.Size",
"torch.nn.Linear",
"torch.true_divide",
"torch.testing._internal.jit_utils.clear_class_registry",
"torch.floor_divide",
"torch.jit.load",
"torch.jit.save",
"torch.tensor",
"torch.empty",
"torch.full",
"torch.div",
"torch._test_serialization_subcmul",
... |
Eravalord/OpenPNM | [
"1546fa1ac2204443bde916f2037fac383c5069ae",
"031894a53650c3193d767b0460c8ea2e66799825",
"8298608a38f6aae4a96b0f3b9dd9b9e4460e8692"
] | [
"openpnm/phases/GenericPhase.py",
"openpnm/io/CSV.py",
"scripts/example_Nernst_Planck_multiphysics_2d.py"
] | [
"from openpnm.core import Base, ModelsMixin\nfrom openpnm.utils import Workspace, logging, Docorator\nfrom numpy import ones\nimport openpnm.models as mods\ndocstr = Docorator()\nlogger = logging.getLogger(__name__)\nws = Workspace()\n\n\n@docstr.get_sectionsf('GenericPhase', sections=['Parameters'])\n@docstr.deden... | [
[
"numpy.ones"
],
[
"pandas.read_table",
"numpy.vstack"
],
[
"numpy.random.seed"
]
] |
ffangsong/Retrieval_Based_Chatbot | [
"4e804a4a733f37e15a3e4c8f42f8334e9a32173c"
] | [
"src/word2vec_LSTM.py"
] | [
"import itertools\nimport re\nimport nltk\nimport numpy as np\nimport pandas as pd\nfrom gensim.models import KeyedVectors\nfrom nltk import word_tokenize\nfrom nltk.corpus import stopwords\nfrom nltk.stem import WordNetLemmatizer\nfrom string import punctuation\n\nnltk.download('stopwords')\nnltk.download('wordnet... | [
[
"sklearn.model_selection.train_test_split",
"pandas.read_csv"
]
] |
syfung/laminate | [
"72b728f223817aac7a9608beb70f7518b8261fc9"
] | [
"deform.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Oct 27 17:22:11 2021\n\n@author: Joshua Fung\n\"\"\"\nimport numpy as np\n\ndef deformation(abd_inv, load):\n return abd_inv.dot(load)\n\ndef strain_mid_ply(laminate, mid_plane_deformation):\n ply_deformation = []\n for z in laminate.mid_ply_zs:\n str... | [
[
"numpy.matrix",
"numpy.array",
"numpy.set_printoptions",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.gca",
"matplotlib.pyplot.subplot"
]
] |
amalolan/vehicle-counter | [
"c48c3f897107e4b7c8442529d38a141f127fd778"
] | [
"deep_sort/tracker.py"
] | [
"# vim: expandtab:ts=4:sw=4\r\nfrom __future__ import absolute_import\r\nimport numpy as np\r\nfrom . import kalman_filter\r\nfrom . import linear_assignment\r\nfrom . import iou_matching\r\nfrom .track import Track\r\n\r\n\r\nclass Tracker:\r\n \"\"\"\r\n This is the multi-target tracker.\r\n\r\n Paramete... | [
[
"numpy.array",
"numpy.asarray"
]
] |
lavanyashukla/ray | [
"fece8db70d703da1aad192178bd50923e83cc99a"
] | [
"python/ray/util/sgd/torch/torch_trainer.py"
] | [
"import inspect\nimport time\n\nimport numpy as np\nimport logging\nimport os\nimport numbers\nimport tempfile\nimport torch\nimport torch.distributed as dist\n\nimport ray\nfrom ray.tune import Trainable\nfrom ray.tune.resources import Resources\nfrom ray.tune.utils.util import merge_dicts\nfrom ray.util import lo... | [
[
"torch.distributed.is_available",
"torch.cuda.is_available",
"torch.load"
]
] |
HanSeokhyeon/Speech_recogniton_for_English_and_Korean | [
"e0eaf1da1e1ac15f34402fea8cb330d008140d61",
"e0eaf1da1e1ac15f34402fea8cb330d008140d61"
] | [
"util/timit/old/timit_preprocess_mfcc40_spikegram32.py",
"figure/figure5.py"
] | [
"# reference : https://github.com/Faur/TIMIT\n# \t\t\t https://github.com/jameslyons/python_speech_features/issues/53\nimport os\nimport sys\nimport timeit; program_start_time = timeit.default_timer()\nimport random; random.seed(int(timeit.default_timer()))\nfrom six.moves import cPickle\nimport numpy as np\nimpor... | [
[
"numpy.concatenate",
"numpy.divide",
"numpy.pad",
"numpy.reshape",
"numpy.zeros",
"numpy.round",
"numpy.sum",
"numpy.shape",
"numpy.mean",
"numpy.std",
"numpy.loadtxt",
"numpy.fromfile",
"numpy.abs"
],
[
"numpy.concatenate",
"numpy.reshape",
"mat... |
JakeNeyer/MLServer | [
"a283d3c0008c944b28cdd39c2ffec73f59296603"
] | [
"runtimes/alibi-explain/tests/test_black_box.py"
] | [
"import json\nimport os\nfrom pathlib import Path\nfrom unittest.mock import patch, MagicMock\n\nimport numpy as np\nimport pytest\nimport tensorflow as tf\nfrom alibi.saving import load_explainer\nfrom numpy.testing import assert_array_equal\n\nfrom helpers.tf_model import get_tf_mnist_model_uri\nfrom mlserver imp... | [
[
"numpy.array",
"numpy.testing.assert_array_equal",
"numpy.random.randn",
"numpy.zeros"
]
] |
rjdirisio/pyvibdmc | [
"9eaf05f42e95c3f98b51399e1453073b53169b4d"
] | [
"pyvibdmc/simulation_utilities/imp_samp_manager.py"
] | [
"import numpy as np\nimport os, sys\nimport importlib\nimport itertools as itt\nfrom itertools import repeat\n\nfrom .potential_manager import Potential, Potential_NoMP, NN_Potential\nfrom .imp_samp import *\n\n\nclass ImpSampManager:\n \"\"\"Imports and Wraps around the user-provided trial wfn and (optionally) ... | [
[
"numpy.concatenate",
"numpy.array_split"
]
] |
linxdcn/tsi-microservice | [
"23d4f034e4afe32bacbbf611c02416eb5ec87e19"
] | [
"hello-ms/src/main/resources/py/test.py"
] | [
"import numpy as np\n\na = np.array([[1., 7., 0.], [-2., 1., 2.]])\nprint(a)"
] | [
[
"numpy.array"
]
] |
jyuno426/KCSS | [
"0d23130e9e79f6089d2f942ff96cb414e17448f8"
] | [
"utils/lstm_model.py"
] | [
"import unidecode\nimport functools\nimport numpy as np\nimport tensorflow as tf\nfrom tensorflow.keras import backend as K\nfrom tensorflow.keras.models import load_model\n\nalphabet = \"abcdefghijklmnopqrstuvwxyz\"\n\n\ndef is_alpha(name):\n \"\"\"\n nameμ΄ μνλ²³μΌλ‘λ§ μ΄λ£¨μ΄μ§ λ¬Έμμ΄μΈμ§ νλ³\n \"\"\"\n for c in name... | [
[
"numpy.array",
"numpy.reshape",
"numpy.zeros",
"numpy.random.seed",
"numpy.random.permutation",
"tensorflow.keras.models.load_model",
"tensorflow.keras.backend.get_session",
"numpy.argmax",
"tensorflow.control_dependencies",
"tensorflow.local_variables_initializer",
"te... |
jetbrains-academy/Python-Libraries-NumPy | [
"7ce0f2d08f87502d5d97bbc6921f0566184d4ebb",
"7ce0f2d08f87502d5d97bbc6921f0566184d4ebb",
"7ce0f2d08f87502d5d97bbc6921f0566184d4ebb"
] | [
"NumPy/Array Basics/Create an Array from Range/task.py",
"NumPy/Arrays of String and Unicode Values/Translate/tests/test_task.py",
"Projects/SVD/SVD on One Matrix/tests/test_task.py"
] | [
"import numpy as np\n\n\ndef array_from_range(start, stop, step=1):\n return np.arange(start, stop, step)\n\n\nif __name__ == '__main__':\n up = array_from_range(100, 110)\n down = array_from_range(100, 0, -10)\n print(up) # Should print '[100 101 102 103 104 105 106 107 108 109]'\n print(down) # S... | [
[
"numpy.arange"
],
[
"numpy.array"
],
[
"numpy.testing.assert_array_equal",
"numpy.linalg.svd"
]
] |
jesussantana/Machine-Learning-Stanford-University | [
"7ee8527d8a2df43c674757e060d1c7ccad2926a4"
] | [
"notebooks/Ex2-Logistic-Regression/ex2-py/ex2.py"
] | [
"import numpy as np\r\nfrom scipy.optimize import fmin_bfgs\r\n\r\nfrom sigmoid import sigmoid\r\nfrom plotData import plotData\r\nfrom costFunction import costFunction\r\nfrom plotDecisionBoundary import plotDecisionBoundary\r\nfrom predict import predict\r\n\r\n\r\ndata = np.loadtxt('ex2data1.txt', delimiter=',')... | [
[
"numpy.array",
"numpy.zeros",
"numpy.ones",
"scipy.optimize.fmin_bfgs",
"numpy.mean",
"numpy.loadtxt"
]
] |
visym/keynet | [
"7e3aeb0fd35955ef7ca7499170a337f261655f6e",
"7e3aeb0fd35955ef7ca7499170a337f261655f6e"
] | [
"keynet/vgg.py",
"test/test_keynet.py"
] | [
"import os\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torchvision.transforms as transforms\nimport torch.nn.functional as F\n\n\ndef prepare_vgg16_image(img):\n \"\"\"\n Convert an RGB byte image to a FloatTensor suitable for processing with the network.\n This function assumes the im... | [
[
"torch.nn.Linear",
"numpy.array",
"torch.nn.Dropout",
"torch.nn.MaxPool2d",
"torch.nn.AvgPool2d",
"numpy.rollaxis",
"torch.from_numpy",
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.load"
],
[
"numpy.allclose",
"torch.randn",
"torch.load"
]
] |
herrmannlab/highdicom | [
"95f39dd722ae6d357af3f942e2130d0ff4d68bfc"
] | [
"src/highdicom/pr/content.py"
] | [
"\"\"\"Data Elements that are specific to the Presentation State IODs.\"\"\"\nimport datetime\nimport logging\nfrom collections import defaultdict\nfrom io import BytesIO\n\nimport numpy as np\nfrom PIL.ImageCms import ImageCmsProfile\nfrom pydicom.dataset import Dataset\nfrom pydicom.sr.coding import Code\nfrom py... | [
[
"numpy.array",
"numpy.array_equal",
"numpy.frombuffer"
]
] |
XiaoguangHu01/models | [
"a95d49323ed504e5a9164586f171f408954fd43a",
"a95d49323ed504e5a9164586f171f408954fd43a",
"a95d49323ed504e5a9164586f171f408954fd43a",
"a95d49323ed504e5a9164586f171f408954fd43a"
] | [
"PaddleNLP/Research/MRQA2019-D-NET/server/xlnet_server/model/xlnet.py",
"PaddleNLP/Research/ACL2019-KTNET/reading_comprehension/src/run_record.py",
"PaddleNLP/Research/ACL2019-JEMT/train.py",
"PaddleNLP/Research/ACL2019-KTNET/reading_comprehension/src/model/layers.py"
] | [
"# Copyright (c) 2019 PaddlePaddle 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 ... | [
[
"numpy.concatenate",
"numpy.zeros",
"numpy.ones",
"numpy.triu",
"numpy.diag",
"numpy.tril"
],
[
"numpy.random.seed",
"numpy.sum",
"numpy.array",
"numpy.isnan"
],
[
"numpy.array",
"numpy.asarray",
"numpy.reshape",
"numpy.zeros",
"numpy.log",
"... |
PulkitSinghDev/Black-Hole-Classifier | [
"41808776f9852e6ef1a6646e6b40e4cb858c0944"
] | [
"TF_(source_code)/Keras/main.py"
] | [
"from keras.models import load_model\nfrom PIL import Image, ImageOps\nimport numpy as np\n\n# Load the model\nmodel = load_model('keras_model.h5')\n\n# Create the array of the right shape to feed into the keras model\n# The 'length' or number of images you can put into the array is\n# determined by the first posit... | [
[
"numpy.ndarray",
"numpy.asarray"
]
] |
jlinkemeyer/MLinPractice | [
"ef96888ef0565b84fece4283fe8dd8dc809c5e99"
] | [
"code/feature_extraction/cap_words_count.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nFeature that counts the number of capitalized words within a tweet.\n\nCreated on Fri Oct 8 12:51:27 2021\n\n@author: jlinkemeyer\n\"\"\"\n\nimport numpy as np\nfrom code.feature_extraction.feature_extractor import FeatureExtractor\nfrom code.util import TO... | [
[
"numpy.array"
]
] |
vishalbelsare/jina | [
"ae72cc5ce1f7e7f4c662e72e96ea21dddc28bf43",
"ae72cc5ce1f7e7f4c662e72e96ea21dddc28bf43"
] | [
"tests/unit/types/arrays/mixins/test_content.py",
"jina/math/distance/numpy.py"
] | [
"import numpy as np\nimport pytest\n\nfrom jina import DocumentArray, DocumentArrayMemmap\n\n\n@pytest.mark.parametrize('cls', [DocumentArray, DocumentArrayMemmap])\n@pytest.mark.parametrize(\n 'content_attr', ['texts', 'embeddings', 'blobs', 'buffers', 'contents']\n)\ndef test_content_empty_getter_return_none(c... | [
[
"numpy.random.random",
"numpy.array",
"numpy.testing.assert_equal"
],
[
"numpy.sum",
"scipy.sparse.linalg.norm",
"numpy.dot",
"numpy.linalg.norm"
]
] |
SJTU-IPADS/fgnn-artifacts | [
"5c73564e4a9bd5deeff7eed0b923c115ccba34d7"
] | [
"example/samgraph/train_pinsage.py"
] | [
"import argparse\nimport time\nimport torch\nimport sys\nimport torch as th\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport dgl.function as fn\nimport torch.optim as optim\nimport numpy as np\n\nimport samgraph.torch as sam\nfrom common_config import *\n\n\"\"\"\n We have made the following modific... | [
[
"torch.nn.Linear",
"torch.device",
"torch.nn.Dropout",
"torch.cat",
"torch.nn.ModuleList",
"torch.nn.init.constant_",
"torch.nn.init.xavier_uniform_",
"numpy.mean",
"torch.tensor",
"torch.nn.init.calculate_gain",
"torch.nn.CrossEntropyLoss"
]
] |
mrazizi/TextGAIL | [
"18ba72c6d63c3c3db1f195d118267c6e8243b4ff"
] | [
"TorchFly/torchfly/text/rl/textrl_replay_buffer.py"
] | [
"from typing import Callable, Iterator\nfrom omegaconf import DictConfig\nimport numpy as np\nfrom operator import itemgetter\nfrom collections import namedtuple\n\nTextRLSample = namedtuple('TextRLSample', ['state', 'action', 'action_log_prob', 'reward', 'normalized_reward'])\n\n\nclass TextRLReplayBuffer:\n \"... | [
[
"numpy.abs",
"numpy.mean",
"numpy.random.shuffle",
"numpy.clip"
]
] |
garudlab/mother_infant | [
"98a27c83bf5ece9497d5a030c6c9396a8c514781",
"98a27c83bf5ece9497d5a030c6c9396a8c514781"
] | [
"pickle_pnps.py",
"utils/substitution_rates_utils.py"
] | [
"import matplotlib\r\nmatplotlib.use('Agg')\r\nfrom utils import parse_midas_data, sample_utils, config, sfs_utils, diversity_utils, stats_utils\r\nimport sys, os.path, numpy\r\nfrom math import log10,ceil\r\nimport matplotlib.pyplot as plt\r\nfrom collections import defaultdict\r\nfrom utils.classes import Interv... | [
[
"matplotlib.use",
"numpy.array"
],
[
"numpy.zeros_like"
]
] |
ardhani31/SIR-Feb | [
"f60d76f73ee8ecd2aa2a319fb0cd20b5fdbffa15"
] | [
"covsirphy/loading/db_cs_japan.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport pandas as pd\nfrom covsirphy.util.term import Term\nfrom covsirphy.loading.db_base import _RemoteDatabase\n\n\nclass _CSJapan(_RemoteDatabase):\n \"\"\"\n Access \"COVID-19 Dataset in Japan.\n https://github.com/lisphilar/covid19-sir/tree/master/dat... | [
[
"pandas.read_csv",
"pandas.concat"
]
] |
anuragdw710/jina | [
"520fc0794fb43d96e1fc85534e9df3cf9c89c42e"
] | [
"jina/types/arrays/neural_ops.py"
] | [
"from typing import Optional, Union, Callable, Tuple\n\nimport numpy as np\n\nfrom ... import Document\nfrom ...importer import ImportExtensions\nfrom ...math.helper import top_k, minmax_normalize, update_rows_x_mat_best\n\nif False:\n from .document import DocumentArray\n from .memmap import DocumentArrayMem... | [
[
"numpy.max",
"scipy.sparse.issparse",
"numpy.array",
"numpy.zeros",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.get_cmap",
"numpy.ones",
"numpy.min",
"sklearn.manifold.TSNE",
"matplotlib.pyplot.figure",
"numpy.take_along_axis",
"matplotlib.pyplot.show",
"num... |
walshb/numpy | [
"073bc39c58a6788ffda6aaa7549955cc3d4fdc93"
] | [
"numpy/lib/_iotools.py"
] | [
"\"\"\"A collection of functions designed to help I/O with ascii files.\"\"\"\n__docformat__ = \"restructuredtext en\"\n\nimport sys\nimport numpy as np\nimport numpy.core.numeric as nx\nfrom __builtin__ import bool, int, long, float, complex, object, unicode, str\n\nfrom numpy.compat import asbytes, bytes, asbytes... | [
[
"numpy.array",
"numpy.prod",
"numpy.compat.asbytes_nested",
"numpy.issubdtype",
"numpy.dtype",
"numpy.compat.asbytes"
]
] |
jialeiY/pytorch-ssd | [
"3372664b14540a53b941404a20efe8e6b4aaf9ad",
"3372664b14540a53b941404a20efe8e6b4aaf9ad"
] | [
"vision/transforms/transforms.py",
"vision/utils/box_utils.py"
] | [
"# from https://github.com/amdegroot/ssd.pytorch\n\n\nimport torch\nfrom torchvision import transforms\nimport cv2\nimport numpy as np\nimport types\nfrom numpy import random\n\n\ndef intersect(box_a, box_b):\n max_xy = np.minimum(box_a[:, 2:], box_b[2:])\n min_xy = np.maximum(box_a[:, :2], box_b[:2])\n in... | [
[
"numpy.array",
"numpy.minimum",
"numpy.random.uniform",
"numpy.random.randint",
"numpy.clip",
"numpy.maximum"
],
[
"torch.stack",
"torch.min",
"numpy.zeros",
"torch.max",
"torch.clamp",
"torch.tensor",
"torch.log",
"torch.exp",
"torch.argmax"
]
] |
ptrebert/reference-data | [
"7bca069b8995660252d4f601976f9f7abaaf063b"
] | [
"scripts/process_mapping.py"
] | [
"#!/usr/bin/env python3\n# coding=utf-8\n\nimport os as os\nimport sys as sys\nimport traceback as trb\nimport argparse as argp\nimport collections as col\nimport multiprocessing as mp\nimport functools as fnt\nimport gzip as gz\n\nimport pandas as pd\n\n\nCrossBlock = col.namedtuple('CrossBlock', ['chrom', 'start'... | [
[
"pandas.HDFStore"
]
] |
MatthijsBrem/wheelchair-design-platform | [
"7d1d574bec793a1737669e134b650c0f16eefd5e"
] | [
"Archive/aupyom-master/aupyom/sampler.py"
] | [
"from queue import Empty, Queue\nfrom threading import Condition, Event, Thread\n\nimport numpy\n\n\nclass Sampler(object):\n \"\"\" Sampler used to play, stop and mix multiple sounds.\n\n .. warning:: A single sampler instance should be used at a time.\n\n \"\"\"\n\n def __init__(self, sr=22050, ba... | [
[
"numpy.mean"
]
] |
gistvision/DIPsureWithSTE | [
"853faac97a451e6430b47f4d4da54c6d08a7ee50",
"853faac97a451e6430b47f4d4da54c6d08a7ee50"
] | [
"main.py",
"models/downsampler.py"
] | [
"import os\nimport argparse\nimport glob\nimport json\n\nimport cv2\nimport torch\nimport numpy as np\nimport pandas as pd\n\nimport loss\nimport models\nimport config_parser\n\n\nfrom utils.common_utils import *\nfrom utils.denoising_utils import *\nfrom torch.utils.tensorboard import SummaryWriter\n\n# beta versi... | [
[
"torch.optim.lr_scheduler.StepLR",
"numpy.random.seed",
"torch.no_grad",
"torch.optim.lr_scheduler.MultiStepLR",
"torch.manual_seed",
"torch.nn.functional.mse_loss",
"torch.cuda.empty_cache",
"torch.cuda.is_available",
"numpy.clip",
"torch.utils.tensorboard.SummaryWriter"
... |
makarandtapaswi/SlowFast | [
"39ef35c9a086443209b458cceaec86a02e27b369",
"39ef35c9a086443209b458cceaec86a02e27b369"
] | [
"slowfast/utils/ava_evaluation/np_box_list_ops.py",
"slowfast/models/common.py"
] | [
"# Copyright 2017 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... | [
[
"numpy.max",
"numpy.full",
"numpy.array",
"numpy.less",
"numpy.reshape",
"numpy.logical_and",
"numpy.nonzero",
"numpy.where",
"numpy.amin",
"numpy.amax",
"numpy.arange",
"numpy.argsort",
"numpy.greater",
"numpy.hstack",
"numpy.squeeze",
"numpy.fmin",... |
dwhitena/vachan-graph | [
"63aafc03c6077b805ef3f90fbef094493791c656"
] | [
"dgraph/dGraph_readOnly_server.py"
] | [
"from fastapi import FastAPI, Query, Path, Body\nfrom fastapi.responses import FileResponse, JSONResponse\nfrom fastapi.staticfiles import StaticFiles\nfrom fastapi.exceptions import RequestValidationError\nfrom starlette.exceptions import HTTPException as StarletteHTTPException\n\nfrom dGraph_conn import dGraph_co... | [
[
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.figure"
]
] |
shun60s/Wave-DNN | [
"d7d74676ffa540c6159bd16b36ccea3b5b381109"
] | [
"get_fbank.py"
] | [
"#coding: utf-8\r\n\r\n#######################################################\r\n#Description:\r\n# This is a python implement to get FBANK_D_A from a wave file as input.\r\n# warning: this is not complete compatible with julius.\r\n#\r\n# This is based on HTKFeat.py in PyHTK and C program in julius-4.4.2.zip.\r\n... | [
[
"numpy.concatenate",
"numpy.fft.rfft",
"numpy.dot",
"numpy.zeros",
"numpy.log",
"numpy.hamming",
"numpy.arange",
"numpy.power",
"numpy.abs",
"numpy.frombuffer",
"numpy.hstack",
"numpy.log2"
]
] |
Divjyot/kohonen-network | [
"5fda5d7b2541589398f53ba58f008b5dde18edf9"
] | [
"app/utils/utils.py"
] | [
"from settings import NPY_EXT, MODELS_DIR\n\nimport os\nimport math\nimport numpy as np\nfrom datetime import datetime\n\ndef euc(vec:np.array, pC:np.array):\n pC_vec = np.full((pC.shape[0], pC.shape[1]), vec)\n step1 = np.subtract(pC, pC_vec)\n step2 = np.square(step1)\n step3 = np.sum(step2, axis=1,... | [
[
"numpy.square",
"numpy.full",
"numpy.concatenate",
"numpy.sum",
"numpy.subtract",
"numpy.apply_along_axis",
"numpy.sqrt"
]
] |
Alina-Mingchi/TOPO_final | [
"a8983006929b60bda0ed1d2e9a9130427b628431"
] | [
"MSG_TOPO/src/depth_utils/reprojections.py"
] | [
"import torch\n\n\ndef depth_to_absolute_coordinates(depth, depth_type, K=None, calibration=None):\n \"\"\"Convert depth map to absolute coordinates.\n\n Parameters\n ----------\n depth : array_like\n Depth map of shape (h, w) or tensor of depth maps of shape (**, 1, h, w).\n depth_type : str\... | [
[
"torch.zeros",
"torch.nn.functional.normalize",
"torch.stack",
"torch.arange",
"torch.ones_like",
"torch.as_tensor"
]
] |
roholazandie/ParlAI | [
"32352cab81ecb666aefd596232c5ed9f33cbaeb9"
] | [
"parlai/agents/programr/nlp/semantic/sentiment_analysis.py"
] | [
"import numpy as np\nimport torch\nfrom transformers import DistilBertTokenizer, DistilBertForSequenceClassification\n\nfrom parlai.agents.programr.config.brain.nlp import BrainNLPConfiguration\nfrom parlai.agents.programr.config.brain.sentiment_analysis import BrainSentimentAnalysisConfiguration\n\n\nclass Sentime... | [
[
"numpy.exp"
]
] |
auderson/numba | [
"3d67c9850ab56457f418cf40af6245fd9c337705",
"3d67c9850ab56457f418cf40af6245fd9c337705"
] | [
"numba/cuda/tests/cudapy/test_datetime.py",
"numba/cuda/tests/cudapy/test_array.py"
] | [
"import numpy as np\n\nfrom numba import cuda, vectorize, guvectorize\nfrom numba.np.numpy_support import from_dtype\nfrom numba.cuda.testing import CUDATestCase, skip_on_cudasim\nimport unittest\n\n\nclass TestCudaDateTime(CUDATestCase):\n def test_basic_datetime_kernel(self):\n @cuda.jit\n def fo... | [
[
"numpy.zeros_like",
"numpy.random.randint",
"numpy.arange",
"numpy.dtype"
],
[
"numpy.zeros_like",
"numpy.array",
"numpy.zeros",
"numpy.ones",
"numpy.ndarray",
"numpy.arange"
]
] |
declare-lab/BBFN | [
"1a251bd2a82193902591a15ae2f28b902c295310"
] | [
"src/main.py"
] | [
"import torch\nimport argparse\nimport numpy as np\n\nfrom utils import *\nfrom torch.utils.data import DataLoader\nfrom solver import Solver\nfrom config import get_config\nfrom data_loader import get_loader\n\nparser = argparse.ArgumentParser(description='MOSEI Sentiment Analysis')\nparser.add_argument('-f', defa... | [
[
"torch.cuda.manual_seed_all",
"torch.set_default_tensor_type",
"torch.autograd.set_detect_anomaly",
"torch.manual_seed",
"torch.cuda.is_available"
]
] |
Master-cai/C2 | [
"cb6dbfdd9a1928139bcea9e926256b29f4fc6e8e"
] | [
"C2Server/yolo/yolo.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nClass definition of YOLO_v3 style detection model on image and video\n\"\"\"\n\nimport colorsys\nimport os\nfrom timeit import default_timer as timer\n\nimport random\nimport numpy as np\nfrom keras import backend as K\nfrom keras.models import load_model\nfrom keras.layers import ... | [
[
"numpy.array",
"numpy.asarray",
"numpy.random.seed",
"numpy.random.shuffle",
"numpy.expand_dims",
"numpy.floor"
]
] |
airium/pysot | [
"c34158ba7b4a9b73938320e0019b61e6460537fc",
"c34158ba7b4a9b73938320e0019b61e6460537fc"
] | [
"pysot/tracker/siammask_tracker.py",
"pysot/models/head/rpn.py"
] | [
"# Copyright (c) SenseTime. All Rights Reserved.\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport cv2\nimport numpy as np\n\nfrom pysot.core.config import cfg\nfrom pysot.utils.bbox import cxy_wh_2_re... | [
[
"numpy.max",
"numpy.array",
"numpy.sum",
"numpy.exp",
"numpy.unravel_index",
"numpy.argmax",
"numpy.sqrt",
"numpy.maximum"
],
[
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.nn.BatchNorm2d",
"torch.nn.functional.softmax"
]
] |
BA-HanseML/NF_Prj_MIMII_Dataset | [
"c9dd130a48c5ee28491a3f9369ace8f7217753d6"
] | [
"utility/feature_extractor/feature_extractor_ICA2.py"
] | [
"print('load feature_extractor_ICA2')\r\n\r\nfrom sklearn.decomposition import FastICA\r\n\r\n# Feature extractor for blind source separation from eight channels \r\n# to two and selecting the main channel based on the estimated mixing matrix\r\n\r\nclass feature_extractor_ICA2(feature_extractor):\r\n def __init... | [
[
"sklearn.decomposition.FastICA"
]
] |
gasdaf/graph-learn | [
"4a77b39be37bb7507f0e9fb5d4ed40ca623b2ceb"
] | [
"graphlearn/python/nn/tf/test/test_trainer.py"
] | [
"# Copyright 2020 Alibaba Group Holding 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\n#\n# Unle... | [
[
"numpy.array",
"tensorflow.convert_to_tensor",
"tensorflow.reshape"
]
] |
Saro00/graphtransformer | [
"3fbbefc9927dac277156485bedc842657214f25d"
] | [
"data/molecules.py"
] | [
"import torch\nimport pickle\nimport torch.utils.data\nimport time\nimport os\nimport numpy as np\n\nimport csv\n\nimport dgl\n\nfrom scipy import sparse as sp\nimport numpy as np\nimport networkx as nx\nimport hashlib\n\n# *NOTE\n# The dataset pickle and index files are in ./zinc_molecules/ dir\n# [<split>.pickle ... | [
[
"numpy.array",
"numpy.real",
"torch.from_numpy"
]
] |
NREL/K_Road | [
"ec8049cf1b81c58dd3b95f8298a362d863cd4a68"
] | [
"scenario/road/road_observer.py"
] | [
"import math\nfrom typing import Optional\n\nimport numpy as np\nimport pymunk\nfrom gym import spaces\nfrom pymunk import Vec2d\n\nfrom factored_gym import Observer\nfrom k_road.constants import Constants\nfrom k_road.entity.entity_type import EntityType\nfrom k_road.k_road_view import KRoadView\nfrom k_road.scan ... | [
[
"numpy.multiply",
"numpy.empty"
]
] |
miterion/self-paced-rl | [
"352c92e0b7b74c807af343211ebf833213626e87"
] | [
"sprl/util/gym_envs/reach_avoid.py"
] | [
"import os\nfrom gym import utils as gym_utils\nfrom gym.envs.robotics import fetch_env, utils\nimport numpy as np\nfrom gym import spaces\nfrom gym.envs.robotics.fetch_env import goal_distance\n\n# Ensure we get the path separator correct on windows\nMODEL_XML_PATH = os.path.join(os.path.dirname(os.path.abspath(__... | [
[
"numpy.concatenate",
"numpy.square",
"numpy.array",
"numpy.sin",
"numpy.copy",
"numpy.exp",
"numpy.random.uniform",
"numpy.cos",
"numpy.clip"
]
] |
canggihpw/mlshow | [
"86a7368a3acffc4d3f944b57cc0fa241731aa4db"
] | [
"lib/svm.py"
] | [
"import streamlit as st\n\nfrom lib._plot import plot_decision_regions\nfrom sklearn.svm import SVC\n\ndef svm(X_train, X_test, y_train, y_test,label):\n pil = st.sidebar.radio(\"\",(\"Result\",\"Documentation\"))\n if pil == \"Result\":\n # Controller\n gammaval = st.sidebar.slider('gamma', 0.1... | [
[
"sklearn.svm.SVC"
]
] |
zfit/benchmarks | [
"9d76ecce9514438113ebb7a8e487f225e905c0a8"
] | [
"src/wofz.py"
] | [
"# /////////////////////////////////////////////////////////////////////////////\n# //\n# // DATE\n# // 06/22/2015\n# //\n# // AUTHORS\n# // Hannes Bartosik, Adrian Oeftiger\n# //\n# // DESCRIPTION\n# // FADDEEVA error function for GPU in CUDA.\n# // This file is intended to be used as a\n# // preamble to... | [
[
"tensorflow.experimental.numpy.experimental_enable_numpy_behavior",
"tensorflow.shape",
"tensorflow.experimental.numpy.where",
"tensorflow.range",
"tensorflow.experimental.numpy.sign",
"tensorflow.experimental.numpy.std",
"tensorflow.unstack",
"tensorflow.experimental.numpy.logical... |
i7p9h9/swishnet | [
"5f2bd9920e980ceaaaca1ae302da5b57d3eb67ff"
] | [
"swishnet.py"
] | [
"from keras import models\nfrom keras import layers\n\n\n# causal conv\ndef __causal_gated_conv1D(x=None, filters=16, length=6, strides=1):\n def causal_gated_conv1D(x, filters, length, strides):\n x_in_1 = layers.Conv1D(filters=filters // 2,\n kernel_size=length,\n ... | [
[
"numpy.random.randn"
]
] |
ChayanBansal/tapas | [
"32f90d608f59a203fa4e0a8470c89b2cd8305ba6"
] | [
"tapas/models/tapas_pretraining_model.py"
] | [
"# coding=utf-8\n# Copyright 2019 The Google AI Language Team 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# Unl... | [
[
"tensorflow.compat.v1.reshape",
"tensorflow.compat.v1.train.Scaffold",
"tensorflow.compat.v1.one_hot",
"tensorflow.compat.v1.logging.info",
"tensorflow.compat.v1.metrics.mean",
"tensorflow.compat.v1.variable_scope",
"tensorflow.compat.v1.zeros_initializer",
"tensorflow.compat.v1.ma... |
richmanbtc/bot_snippets | [
"a498cdb97f8568c1e05c117462a85b877d7dcf7d"
] | [
"fear_greedy.py"
] | [
"import pandas as pd\nimport requests\nimport json\n\ndef fetch_fear_greedy():\n url = 'https://api.alternative.me/fng/?limit=3000'\n df = pd.DataFrame(json.loads(requests.get(url).text)['data'])\n df = df[df['time_until_update'].isna()]\n df = df.drop(columns=['time_until_update', 'value_classification... | [
[
"pandas.to_datetime"
]
] |
Omodaka9375/Custom-Mask-Detection-Model | [
"864ba58c50b4baeddbd5bbc6e1c6c22c2a409b98"
] | [
"detect_mask_on_image.py"
] | [
"# python detect_mask_image.py --image examples/example_01.png\n\n# import the necessary packages\nfrom tensorflow.keras.applications.mobilenet_v2 import preprocess_input\nfrom tensorflow.keras.preprocessing.image import img_to_array\nfrom tensorflow.keras.models import load_model\nimport numpy as np\nimport argpar... | [
[
"numpy.array",
"tensorflow.keras.applications.mobilenet_v2.preprocess_input",
"tensorflow.keras.models.load_model",
"tensorflow.keras.preprocessing.image.img_to_array",
"numpy.expand_dims"
]
] |
anandharaju/Echelon_TF2 | [
"4349b8bcc46ca90b277900b2c6f85521c2f4e5df"
] | [
"src/trend/activation_trend_identification.py"
] | [
"import numpy as np\nfrom keras.models import Model\nfrom keras.models import load_model, model_from_json\nfrom os.path import join\nimport config.settings as cnst\nimport plots.plots as plots\nfrom predict.predict import predict_byte, predict_byte_by_section\nfrom predict.predict_args import DefaultPredictArgument... | [
[
"numpy.concatenate",
"numpy.percentile",
"pandas.DataFrame",
"numpy.shape",
"numpy.where",
"numpy.argmax",
"numpy.amax",
"numpy.argsort",
"pandas.read_csv"
]
] |
mispchallenge/MISP2021-AVSR | [
"e26ab87bd3134d08d9571632bbffb0b5e731a830",
"e26ab87bd3134d08d9571632bbffb0b5e731a830"
] | [
"NN-HMM/optimizer/optimizer_AdaBound.py",
"NN-HMM/network/network_mixup.py"
] | [
"# coding:utf-8\nimport torch\nimport math\nimport torch.optim as optim\n\n\nclass AdaBound(optim.Optimizer):\n \"\"\"Implements AdaBound algorithm.\n It has been proposed in `Adaptive Gradient Methods with Dynamic Bound of Learning Rate`_.\n Arguments:\n params (iterable): iterable of parameters to... | [
[
"torch.zeros_like",
"torch.max",
"torch.mul",
"torch.full_like"
],
[
"numpy.random.beta",
"torch.cat",
"torch.stack"
]
] |
silastittes/parv_local | [
"67d0a804af320bc50024fd1e6e2190b0c55fb388"
] | [
"src/subset_beagle.py"
] | [
"import argparse\nimport gzip\nimport numpy as np\n\n#from parse_read import parse_read\n\nprog = 'Simple helper script to subset a beagle file based on the Ind[0-9][0-9]* labels in the header',\n\nparser = argparse.ArgumentParser(description=\"Given a list of Ind IDs in a beagle file, subsets the beagle file for t... | [
[
"numpy.in1d",
"numpy.array",
"numpy.asarray"
]
] |
AndrewKirby2/data_synthesis | [
"656858137a348fd5dcb57bcd04bdfece2b9eac1b"
] | [
"venv/lib/python3.8/site-packages/mogp_emulator/MCMC.py"
] | [
"import numpy as np\nfrom numpy.linalg import LinAlgError\nfrom inspect import signature\nimport warnings\n\ndef MH_proposal(current_params, step_sizes):\n \"\"\"\n Propose an MCMC step using a Metropolis-Hastings method\n \n Proposes the next point in an MCMC sampler using the Metropolis-Hastings metho... | [
[
"numpy.max",
"numpy.array",
"numpy.zeros",
"numpy.copy",
"numpy.mean",
"numpy.random.multivariate_normal",
"numpy.argmax",
"numpy.isfinite",
"numpy.abs",
"numpy.random.random",
"numpy.diag"
]
] |
yzhangswingman/ranking | [
"6c55d0bc87c761448f1937f46998039c8dbfe280"
] | [
"tensorflow_ranking/examples/keras/keras_m2e_tfrecord.py"
] | [
"# Copyright 2020 The TensorFlow Ranking 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 appli... | [
[
"tensorflow.compat.v1.data.make_one_shot_iterator",
"tensorflow.estimator.TrainSpec",
"tensorflow.feature_column.numeric_column",
"tensorflow.estimator.EvalSpec",
"tensorflow.feature_column.categorical_column_with_hash_bucket",
"tensorflow.estimator.RunConfig",
"tensorflow.compat.v1.lo... |
zhangjiulong/calamari | [
"ecd29d46f807a3ad406f0a65bdc3283e358c3585"
] | [
"calamari_ocr/scripts/dataset_viewer.py"
] | [
"import matplotlib.pyplot as plt\nimport argparse\n\nfrom calamari_ocr.ocr.augmentation.dataaugmentationparams import DataAugmentationAmount\nfrom tfaip.base.data.pipeline.datapipeline import SamplePipelineParams\nfrom tfaip.base.data.pipeline.definitions import DataProcessorFactoryParams, INPUT_PROCESSOR, \\\n ... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots"
]
] |
lidiaxp/newPyLayer | [
"65dd798c30370ae64edfceaf37bf6c47a92330d2",
"65dd798c30370ae64edfceaf37bf6c47a92330d2"
] | [
"pylayers/antprop/diffRT.py",
"pylayers/antprop/tests/test_diffraction.py"
] | [
"#!/usr/bin/python\n# -*- coding: latin1 -*-\nimport numpy as np\nimport scipy.special as sps\nimport matplotlib.pyplot as plt\nimport pdb\ndef diff(fGHz,phi0,phi,si,sd,N,mat0,matN,beta=np.pi/2,mode='tab',debug=False):\n \"\"\" Luebbers Diffration coefficient\n for Ray tracing\n\n\n\n Parameters\n -----... | [
[
"numpy.max",
"numpy.sin",
"numpy.array",
"numpy.empty",
"numpy.isnan",
"numpy.tan",
"numpy.ones",
"numpy.real",
"numpy.exp",
"numpy.shape",
"numpy.where",
"numpy.cos",
"numpy.abs",
"numpy.sqrt",
"numpy.imag",
"numpy.log10",
"numpy.mod",
"nump... |
HARSHAL-IITB/spa-design-tool | [
"84d250a02cc3f4af56770550c9f559feb524cb07"
] | [
"models/ogden9.py"
] | [
"#! /usr/bin/env python\r\n# The MIT License (MIT)\r\n#\r\n# Copyright (c) 2015, EPFL Reconfigurable Robotics Laboratory,\r\n# Philip Moseley, philip.moseley@gmail.com\r\n#\r\n# Permission is hereby granted, free of charge, to any person obtaining a copy\r\n# of this software and associated docu... | [
[
"numpy.power"
]
] |
minjeekim00/stylegan2 | [
"8b64fc348a99a1e517ee6dd5b80731b1c893d47f"
] | [
"custom/utils.py"
] | [
"# Copyright (c) 2019, NVIDIA Corporation. All rights reserved.\n#\n# This work is made available under the Nvidia Source Code License-NC.\n# To view a copy of this license, visit\n# https://nvlabs.github.io/stylegan2/license.html\n\n\"\"\"utility functions.\"\"\"\n\nimport os\nimport cv2\nimport numpy as np\nimpor... | [
[
"numpy.array",
"numpy.random.rand",
"numpy.zeros",
"numpy.rint",
"matplotlib.pyplot.title",
"numpy.ones",
"matplotlib.pyplot.figure",
"numpy.float32",
"matplotlib.pyplot.tight_layout",
"matplotlib.colors.Normalize",
"numpy.clip",
"numpy.flip",
"numpy.ma.masked_w... |
Huuush/learn_fashionai | [
"f5e63f37f69edfc8a681289208240fa05c8d4dc0"
] | [
"datasets/multi_length.py"
] | [
"import os\nimport numpy as np\nimport cv2\nfrom PIL import Image\nimport pandas as pd\nimport torch.nn.functional as F\nfrom torch.utils.data import DataLoader, Dataset\n\n\nclass FashionAIDataset(Dataset):\n AttrKey = {\n 'coat_length_labels': 8,\n 'pant_length_labels': 6,\n 'skirt_length_... | [
[
"pandas.read_csv",
"torch.utils.data.DataLoader",
"numpy.zeros"
]
] |
EmilRyberg/bin_picking | [
"7616d066307c064c00a8de9ca6ec5d79d1620657"
] | [
"bin_picking_lib/move_robot/move_robot_moveit.py"
] | [
"import rospy\nfrom moveit_msgs.msg import ExecuteTrajectoryGoal\nimport numpy as np\nnp.set_printoptions(precision=3, suppress=True)\nimport math\nimport actionlib\nfrom scipy.spatial.transform.rotation import Rotation\nfrom bin_picking.msg import MoveRobotAction, MoveRobotGoal\nfrom bin_picking_lib.move_robot.ur_... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.set_printoptions",
"scipy.spatial.transform.rotation.Rotation.from_rotvec",
"numpy.repeat",
"scipy.spatial.transform.rotation.Rotation.from_euler"
]
] |
awesome-archive/gobbli | [
"71aacbdc1184871b164185dc0c9f615f07b83173"
] | [
"gobbli/augment/bert/src/augment_text.py"
] | [
"import argparse\n\nimport torch\nimport torch.nn.functional as F\nfrom pytorch_transformers import BertConfig, BertForMaskedLM, BertTokenizer\n\n\ndef batch_list(l, batch_size):\n for i in range(0, len(l), batch_size):\n yield l[i : i + batch_size]\n\n\ndef encode_batch(batch, tokenizer, config):\n # ... | [
[
"torch.rand_like",
"torch.nn.utils.rnn.pad_sequence",
"torch.no_grad",
"torch.argsort",
"torch.multinomial",
"torch.ones_like",
"torch.nn.functional.softmax",
"torch.zeros_like",
"torch.where"
]
] |
kkleidal/kens_tf_utils | [
"b650475bceec4221044dabc9a2c219bf281672d0"
] | [
"torchapi.py"
] | [
"import tensorflow as tf\nimport tflearn as tfl\nfrom kentf.scoping import adapt_name\n\ndef pad(tensor, padW, padH, name=None):\n name = adapt_name(name, \"pad\")\n return tf.pad(tensor, [[0, 0], [padW, padW], [padH, padH], [0, 0]], name=name)\n\ndef SpatialConvolution(inp, _, nfilters, kW, kH, dW, dH, padW,... | [
[
"tensorflow.pad",
"tensorflow.variable_scope",
"tensorflow.name_scope"
]
] |
Hubblesphere/openpilot | [
"210da470fc78cce48f38691c2e355727f24e5bc2"
] | [
"selfdrive/controls/lib/lateral_planner.py"
] | [
"import math\nimport numpy as np\nfrom common.realtime import sec_since_boot, DT_MDL\nfrom common.numpy_fast import interp\nfrom selfdrive.swaglog import cloudlog\nfrom selfdrive.controls.lib.lateral_mpc_lib.lat_mpc import LateralMpc\nfrom selfdrive.controls.lib.drive_helpers import CONTROL_N, MPC_COST_LAT, LAT_MPC... | [
[
"numpy.array",
"numpy.linalg.norm",
"numpy.zeros",
"numpy.ones",
"numpy.arange",
"numpy.column_stack"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.