repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
MingtaoGuo/RetinaNet_TensorFlow | [
"e46a8db9aef3da77de5daa32663c6c5dbb661d11"
] | [
"test.py"
] | [
"from networks import backbone\r\nimport tensorflow as tf\r\nimport numpy as np\r\nfrom PIL import Image\r\nimport cv2\r\n\r\nfrom utils import generate_anchors, draw_bbox, recover_ImgAndBbox_scale\r\nfrom config import IMG_H, IMG_W, CLASSES, K\r\nfrom ops import top_k_score_bbox, sigmoid, offset2bbox\r\n\r\nanch... | [
[
"tensorflow.concat",
"tensorflow.image.non_max_suppression",
"numpy.uint8",
"tensorflow.reshape",
"tensorflow.placeholder",
"numpy.concatenate",
"tensorflow.global_variables_initializer",
"tensorflow.Session",
"tensorflow.train.Saver",
"numpy.array"
]
] |
jmark/turbubox | [
"17fd3214ad4cb0c360bdb628d7bd270e8b00aadc",
"17fd3214ad4cb0c360bdb628d7bd270e8b00aadc",
"17fd3214ad4cb0c360bdb628d7bd270e8b00aadc",
"17fd3214ad4cb0c360bdb628d7bd270e8b00aadc"
] | [
"tools/lib/hopr.py",
"tools/lib/flexi.py",
"sandbox/plot/dens-mach.py",
"tools/lib/gausslobatto.py"
] | [
"import h5\nimport numpy as np\n\nclass MeshFile:\n def __init__(self,fpath, mode='r'):\n self.h5file = h5.File(fpath,mode)\n self.elemInfo = self.get('ElemInfo')\n self.nodeCoords = self.get('NodeCoords')\n\n self.domain = np.array([\n [self.nodeCoords[:,i].min() fo... | [
[
"numpy.abs",
"numpy.unique"
],
[
"numpy.prod"
],
[
"numpy.sqrt",
"numpy.isinf",
"numpy.min",
"numpy.isnan",
"matplotlib.use",
"matplotlib.pyplot.get_cmap",
"matplotlib.pyplot.colorbar",
"numpy.max",
"matplotlib.rcParams.update",
"numpy.mean",
"matplo... |
5A5H/PyFEMP | [
"94ebf58a52230680fd87b699f295ccb3efa6c46a",
"94ebf58a52230680fd87b699f295ccb3efa6c46a"
] | [
"examples_1d/Example_3_Postprocessing.py",
"examples_1d/Example_1_dynamic_bamo_bench.py"
] | [
"# TEST for FiniteElement in coupled problems\n# postprocessing of a truss under gravity\n# seperately solving laplace -> temperature in the middle and on one side set\n\nimport matplotlib.pyplot as plt\n\nimport PyFEMP\nimport PyFEMP.elements.Elmt_BaMo_BaEn_Coupled_1D as ELEMENT\n\n\n# Create FEM Instance\nFEM = P... | [
[
"matplotlib.pyplot.figure",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
],
[
"matplotlib.pyplot.plot",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot... |
ryuwd/scikit-learn | [
"da562b4fa58bdce4a7f3470f733f33d728747a66",
"da562b4fa58bdce4a7f3470f733f33d728747a66",
"da562b4fa58bdce4a7f3470f733f33d728747a66",
"da562b4fa58bdce4a7f3470f733f33d728747a66",
"da562b4fa58bdce4a7f3470f733f33d728747a66"
] | [
"sklearn/ensemble/tests/test_weight_boosting.py",
"sklearn/metrics/_ranking.py",
"sklearn/cluster/tests/test_optics.py",
"examples/preprocessing/plot_map_data_to_normal.py",
"sklearn/decomposition/tests/test_nmf.py"
] | [
"\"\"\"Testing for the boost module (sklearn.ensemble.boost).\"\"\"\n\nimport numpy as np\nimport pytest\n\nfrom scipy.sparse import csc_matrix\nfrom scipy.sparse import csr_matrix\nfrom scipy.sparse import coo_matrix\nfrom scipy.sparse import dok_matrix\nfrom scipy.sparse import lil_matrix\n\nfrom sklearn.utils._t... | [
[
"sklearn.ensemble.RandomForestRegressor",
"sklearn.datasets.make_classification",
"numpy.linspace",
"numpy.asarray",
"sklearn.datasets.load_diabetes",
"sklearn.base.clone",
"sklearn.tree.DecisionTreeClassifier",
"numpy.argmin",
"numpy.ones_like",
"sklearn.ensemble.RandomFor... |
dzenanz/MONAI | [
"524c99d90891c061768766b787fe11dc9551d401",
"524c99d90891c061768766b787fe11dc9551d401"
] | [
"tests/test_crop_foregroundd.py",
"examples/segmentation_3d/unet_training_dict.py"
] | [
"# Copyright 2020 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 i... | [
[
"numpy.array",
"numpy.testing.assert_allclose"
],
[
"torch.load",
"numpy.eye",
"torch.utils.data.DataLoader",
"torch.no_grad",
"torch.utils.tensorboard.SummaryWriter",
"torch.cuda.is_available"
]
] |
lws803/Crime-detect | [
"e71e04032589229372124d9895131bdcdeb3fbb9"
] | [
"utils/common.py"
] | [
"import numpy as np\nimport cv2\n\n\ndef draw_flow(img, flow, step=8):\n h, w = img.shape[:2]\n y, x = np.mgrid[step/2:h:step, step/2:w:step].reshape(2,-1).astype(int)\n fx, fy = flow[y,x].T\n lines = np.vstack([x, y, x+fx, y+fy]).T.reshape(-1, 2, 2)\n lines = np.int32(lines + 0.5)\n # vis = cv2.c... | [
[
"numpy.int32",
"numpy.vstack"
]
] |
kidscash/Deep_Learning | [
"d25d98176270fc2e871c11d0baa567634e8a269b"
] | [
"ch03/mnist_show.py"
] | [
"import sys, os\nsys.path.append(os.pardir)\nfrom mnist import load_mnist\nimport numpy as np\nfrom PIL import Image\n\ndef img_show(img):\n pil_img = Image.fromarray(np.uint8(img))\n pil_img.show()\n\n\n(x_train, t_train), (x_test, t_test) = \\\n load_mnist(flatten=True, normalize=False)\n \n\nimg = x_... | [
[
"numpy.uint8"
]
] |
zack-vii/mdsplus | [
"7c631281d22e993599dbdf7bd31782035af92688"
] | [
"python/MDSplus/apd.py"
] | [
"#\n# Copyright (c) 2017, Massachusetts Institute of Technology All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# Redistributions of source code must retain the above copyright notice, th... | [
[
"numpy.array"
]
] |
c-voegele/PowerSimData | [
"5b1500e573f00a34571316796ff442bfa753871a"
] | [
"powersimdata/input/tests/test_transform_grid.py"
] | [
"import copy\n\nimport numpy as np\nimport pytest\n\nfrom powersimdata.input.change_table import ChangeTable\nfrom powersimdata.input.grid import Grid\nfrom powersimdata.input.transform_grid import TransformGrid\n\ngrid = Grid([\"USA\"])\n\n\n@pytest.fixture\ndef ct():\n return ChangeTable(grid)\n\n\ndef get_pla... | [
[
"numpy.array"
]
] |
codacy-badger/toughio | [
"8d4f3d8408d5507a83f65e7f393b13be08d42aca"
] | [
"toughio/mesh/avsucd/_avsucd.py"
] | [
"from __future__ import division, unicode_literals, with_statement\n\nimport logging\n\nimport numpy\n\nfrom ...__about__ import __version__ as version\nfrom .._common import meshio_data\nfrom .._mesh import Cells, Mesh\n\n__all__ = [\n \"read\",\n \"write\",\n]\n\n\nmeshio_to_avsucd_type = {\n \"vertex\":... | [
[
"numpy.split",
"numpy.arange",
"numpy.genfromtxt",
"numpy.concatenate",
"numpy.savetxt",
"numpy.array",
"numpy.zeros",
"numpy.empty"
]
] |
embedded-machine-learning/eml-tools | [
"9c9d12f9b970a42360bc6ca350f3b67ad822b141",
"9c9d12f9b970a42360bc6ca350f3b67ad822b141",
"9c9d12f9b970a42360bc6ca350f3b67ad822b141"
] | [
"hardwaremodules/nvidia/convert_tf2_to_trt.py",
"inference_evaluation/inference_utils/image_utils.py",
"training/tf2oda_evaluate_ckpt_performance.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nConvert and infer into Tensor-rt models\n\nLicense_info:\n# ==============================================================================\n# ISC License (ISC)\n# Copyright 2020 Christian Doppler Laboratory for Embedded Machine Learning\n#\n# Permission to ... | [
[
"tensorflow.keras.preprocessing.image.img_to_array",
"tensorflow.constant",
"tensorflow.saved_model.load",
"numpy.expand_dims",
"tensorflow.keras.preprocessing.image.load_img",
"tensorflow.keras.applications.inception_v3.preprocess_input",
"tensorflow.python.compiler.tensorrt.trt_conve... |
man-sean/pscgan | [
"be87e519cf789dc28b052afcea6c135a74cdbaaa"
] | [
"nets/inception.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torchvision\n\ntry:\n from torchvision.models.utils import load_state_dict_from_url\nexcept ImportError:\n from torch.utils.model_zoo import load_url as load_state_dict_from_url\n\n# Inception weights ported to Pytorch from\n# http:... | [
[
"torch.nn.Sequential",
"torch.cat",
"torch.utils.model_zoo.load_url",
"torch.nn.ModuleList",
"torch.nn.functional.avg_pool2d",
"torch.nn.MaxPool2d",
"torch.nn.AdaptiveAvgPool2d",
"torch.nn.functional.interpolate",
"torch.nn.functional.max_pool2d"
]
] |
thuydotm/xarray-spatial | [
"faa144bdfd6d9615c2e7a08ed30a56a6db16b11d"
] | [
"xrspatial/curvature.py"
] | [
"# std lib\r\nfrom functools import partial\r\nfrom typing import Union\r\n\r\n# 3rd-party\r\ntry:\r\n import cupy\r\nexcept ImportError:\r\n class cupy(object):\r\n ndarray = False\r\n\r\nimport dask.array as da\r\n\r\nfrom numba import cuda\r\n\r\nimport numpy as np\r\nimport xarray as xr\r\n\r\n# lo... | [
[
"numpy.array",
"numpy.empty"
]
] |
Chrisfsj2051/ssl_detection | [
"00d52272f61b56eade8d5ace18213cba6c74f6d8"
] | [
"third_party/FasterRCNN/FasterRCNN/eval.py"
] | [
"# -*- coding: utf-8 -*-\n# File: eval.py\n\nimport itertools\nimport json\nimport numpy as np\nimport os\nimport sys\nimport tensorflow as tf\nfrom collections import namedtuple\nfrom concurrent.futures import ThreadPoolExecutor\nfrom contextlib import ExitStack\nimport cv2\nimport pycocotools.mask as cocomask\nim... | [
[
"numpy.sqrt",
"numpy.pad",
"numpy.arange",
"numpy.zeros_like",
"scipy.interpolate.interp2d",
"numpy.array",
"numpy.zeros",
"tensorflow.random_normal"
]
] |
bupt-nlp/name-entity-recongnition-tensorflow2 | [
"98f7939a04ef9a45f4c53afe1c7b7721b7def85c"
] | [
"bert_ner/bert.py"
] | [
"from __future__ import annotations\nimport os\nimport json\nimport tensorflow as tf\nfrom nltk import word_tokenize\n\nfrom bert_ner.tokenization import FullTokenizer\nfrom bert_ner.model import BertNer\n\n\nclass NER:\n def __init__(self, model_dir: str):\n self.model, self.tokenizer, self.model_config ... | [
[
"tensorflow.argmax",
"tensorflow.ones",
"tensorflow.Variable"
]
] |
jmrf/active-qa | [
"c30af7be435ccbbec5a7c6b35659256473503e5d"
] | [
"third_party/bi_att_flow/my/tensorflow/nn.py"
] | [
"\n\n\n\nimport tensorflow as tf\n\nfrom third_party.bi_att_flow.my.tensorflow.general import add_wd\nfrom third_party.bi_att_flow.my.tensorflow.general import exp_mask\nfrom third_party.bi_att_flow.my.tensorflow.general import flatten\nfrom third_party.bi_att_flow.my.tensorflow.general import reconstruct\n\nfrom t... | [
[
"tensorflow.nn.relu",
"tensorflow.get_variable",
"tensorflow.nn.softmax",
"tensorflow.nn.sigmoid",
"tensorflow.concat",
"tensorflow.python.util.nest.is_sequence",
"tensorflow.cond",
"tensorflow.python.ops.array_ops.concat",
"tensorflow.reduce_sum",
"tensorflow.python.ops.va... |
teald/vplanet | [
"ab640af7d2bbf80c5ea647d5bf971e2ce2c40631"
] | [
"examples/TidalEarth/makeplot.py"
] | [
"import vplanet\nimport vplot\nimport matplotlib.pyplot as plt\nimport matplotlib as mpl\nimport numpy as np\nimport pathlib\nimport sys\n\n# Path hacks\npath = pathlib.Path(__file__).parents[0].absolute()\nsys.path.insert(1, str(path.parents[0]))\nfrom get_args import get_args\n\n# Tweaks\nplt.rcParams.update({\"f... | [
[
"matplotlib.pyplot.semilogy",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.xscale",
"matplotlib.pyplot.yscale",
"matplotlib.pyplot.loglog",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.subplot... |
morpheusthewhite/vae-vampprior | [
"6e16de09db8da4529124f8b84d650de0554fc764"
] | [
"vampprior/layers.py"
] | [
"import tensorflow as tf\nimport tensorflow_probability as tfp\nfrom tensorflow.keras import layers\nimport numpy as np\n\n\nclass GatedDense(tf.keras.layers.Layer):\n def __init__(self, units, hactivation='sigmoid', **kwargs):\n super(GatedDense, self).__init__(**kwargs)\n self.hactivation = hacti... | [
[
"tensorflow.clip_by_value",
"tensorflow.keras.layers.Concatenate",
"tensorflow.reduce_mean",
"tensorflow.zeros",
"tensorflow.keras.layers.Dense",
"tensorflow.reshape",
"tensorflow.ones",
"tensorflow.exp",
"tensorflow.math.multiply",
"numpy.prod",
"tensorflow.keras.layer... |
liuhd073/mmgeneration | [
"2e09a6b63c5f0ddee850d429c5b739ae1e0cc76d",
"2e09a6b63c5f0ddee850d429c5b739ae1e0cc76d"
] | [
"mmgen/ops/stylegan3/custom_ops.py",
"mmgen/models/diffusions/utils.py"
] | [
"# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n#\n# NVIDIA CORPORATION and its licensors retain all intellectual property\n# and proprietary rights in and to this software, related documentation\n# and any modifications thereto. Any use, reproduction, disclosure or\n# distribution o... | [
[
"torch.utils.cpp_extension.load",
"torch.utils.cpp_extension._get_build_directory",
"torch.cuda.get_device_name"
],
[
"torch.randn",
"torch.randint",
"torch.from_numpy"
]
] |
hfwittmann/kedro | [
"b0d4fcd8f19b49a7916d78fd09daeb6209a7b6c6"
] | [
"tests/extras/datasets/pandas/test_excel_dataset.py"
] | [
"from pathlib import Path, PurePosixPath\n\nimport pandas as pd\nimport pytest\nfrom fsspec.implementations.http import HTTPFileSystem\nfrom fsspec.implementations.local import LocalFileSystem\nfrom gcsfs import GCSFileSystem\nfrom pandas.testing import assert_frame_equal\nfrom s3fs.core import S3FileSystem\n\nfrom... | [
[
"pandas.testing.assert_frame_equal",
"pandas.DataFrame"
]
] |
dmopalmer/pds-tools | [
"a61916e039c4fc5149e4b7e0d797cf890370ac8c"
] | [
"pdstools/gravity.py"
] | [
"#!/usr/bin/python\n################################################################################\n# gravity.py\n#\n# Classes and methods to deal with gravity fields of oblate planets.\n#\n# Mark R. Showalter, SETI Institute, March 2010\n# Revised October 2011.\n# Revised December 2, 2011 (BSW) - add unit tests\... | [
[
"numpy.minimum",
"numpy.sqrt",
"numpy.arctan2",
"numpy.max",
"numpy.all",
"numpy.polyval",
"numpy.where",
"numpy.stack",
"numpy.sin",
"numpy.asfarray",
"numpy.zeros",
"numpy.arccos",
"numpy.random.rand",
"numpy.broadcast_arrays",
"numpy.array",
"nump... |
leoalfonso/dit | [
"e7d5f680b3f170091bb1e488303f4255eeb11ef4",
"e7d5f680b3f170091bb1e488303f4255eeb11ef4",
"e7d5f680b3f170091bb1e488303f4255eeb11ef4",
"e7d5f680b3f170091bb1e488303f4255eeb11ef4",
"e7d5f680b3f170091bb1e488303f4255eeb11ef4"
] | [
"dit/npdist.py",
"dit/inference/estimators.py",
"dit/pid/imin.py",
"dit/algorithms/maxentropy.py",
"dit/profiles/marginal_utility_of_information.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nModule defining NumPy array-based distribution classes.\n\nOne of the features of joint distributions is that we can marginalize them.\nThis requires that we are able to construct smaller outcomes from larger\noutcomes. For example, an outcome like '10101' ... | [
[
"numpy.asarray",
"numpy.equal",
"numpy.ndenumerate",
"numpy.array",
"numpy.random.RandomState"
],
[
"numpy.arange",
"numpy.log",
"numpy.log2",
"scipy.special.digamma"
],
[
"numpy.log2"
],
[
"numpy.diag",
"numpy.log",
"numpy.log2",
"numpy.nonzero"... |
RobbiNespu/scikit-image | [
"a65b8af4bf0f5f71624a91ea5ce7812e80cae4cb",
"a65b8af4bf0f5f71624a91ea5ce7812e80cae4cb",
"a65b8af4bf0f5f71624a91ea5ce7812e80cae4cb",
"a65b8af4bf0f5f71624a91ea5ce7812e80cae4cb"
] | [
"skimage/io/_plugins/pil_plugin.py",
"skimage/io/_plugins/freeimage_plugin.py",
"doc/examples/plot_peak_local_max.py",
"skimage/segmentation/slic_superpixels.py"
] | [
"__all__ = ['imread', 'imsave']\n\nimport numpy as np\nfrom six import string_types\nfrom PIL import Image\n\nfrom ...util import img_as_ubyte, img_as_uint\nfrom ...external.tifffile import imread as tif_imread, imsave as tif_imsave\n\n\ndef imread(fname, dtype=None, img_num=None, **kwargs):\n \"\"\"Load an imag... | [
[
"numpy.asanyarray",
"numpy.array",
"numpy.diff"
],
[
"numpy.asarray",
"numpy.arange",
"numpy.dstack",
"numpy.dtype",
"numpy.compat.asbytes",
"numpy.compat.asstr",
"numpy.fromstring"
],
[
"scipy.ndimage.maximum_filter",
"matplotlib.pyplot.show",
"matplotl... |
crcrpar/NeMo | [
"8e15ba43ba0a17b456d3bfa09444574ef1faa301"
] | [
"nemo/collections/nlp/models/language_modeling/megatron_lm_encoder_decoder_model.py"
] | [
"# Copyright (c) 2022, NVIDIA CORPORATION. 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 re... | [
[
"torch.LongTensor",
"torch._C._jit_set_profiling_executor",
"torch.nn.functional.log_softmax",
"torch._C._jit_set_profiling_mode",
"torch.sum",
"torch.utils.data.DataLoader",
"torch._C._debug_set_autodiff_subgraph_inlining",
"torch._C._jit_set_texpr_fuser_enabled",
"torch._C._j... |
PatelManush/bitsInAction-repo | [
"a780b2f4da205d006b74948935be48a0ab3d8f9d"
] | [
"MachineLearning/PerceptronExample/Perceptron.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\n# In[18]:\n\n\nimport numpy as np\n\nclass Perceptron(object) :\n def __init__(self, eta=0.01, n_iter=50,random_state=1):\n self.eta = eta\n self.n_iter = n_iter\n self.random_state = random_state\n \n def fit(self,x,y):\n rgen =np.... | [
[
"matplotlib.pyplot.legend",
"numpy.dot",
"pandas.read_csv",
"matplotlib.pyplot.contourf",
"matplotlib.pyplot.scatter",
"numpy.unique",
"numpy.arange",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"numpy.where",
"numpy.random.RandomState",
"matplotlib.pyplot... |
hyqskevin/RL_notes | [
"655e7af09267d69ed68bcfa5af9aaee945dbe14c"
] | [
"policy_network/util.py"
] | [
"# -*- coding: utf-8 -*-\n# @Time : 2021/8/2 5:12 PM\n# @Author : kevin_w\n# @Site : \n# @File : util.py\n# @Comment :\n\nimport numpy as np\nimport gym\nimport argparse\nimport torch\nimport torchvision.transforms as T\nfrom PIL import Image\n\n# define parameter\nparser = argparse.ArgumentParser(descrip... | [
[
"numpy.ascontiguousarray",
"torch.manual_seed",
"torch.from_numpy"
]
] |
nishprabhu/image_captioning | [
"4bf84c9f37b2d35a071cb28b62ad08081ebe0a29",
"4bf84c9f37b2d35a071cb28b62ad08081ebe0a29"
] | [
"cnn.py",
"seq2seq.py"
] | [
"\"\"\" The CNN Encoder Model \"\"\"\n\nimport torch.nn as nn\nfrom torchvision.models import resnet18\n\n\nclass CNN(nn.Module):\n \"\"\" The CNN Model \"\"\"\n\n def __init__(self, encoder_output_dim):\n super().__init__()\n self.cnn = resnet18(pretrained=True)\n self.cnn = nn.Sequentia... | [
[
"torch.nn.Linear"
],
[
"torch.stack",
"torch.nn.functional.softmax",
"torch.cat"
]
] |
amtorresn/AnaTorres_Ejercicio27 | [
"8b018f62b1874a1fb5a11b03f42b40d02f2b4692"
] | [
"plot.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nfrom mpl_toolkits.mplot3d import Axes3D\n\ndata = np.loadtxt(\"datos.dat\")\nx = np.arange(0,101,1)\ny = np.arange(0,101,1)\nfig = plt.figure()\nax = Axes3D(fig)\nax.plot_trisurf(x,y, data)\nplt.savefig(\"fig.png\")"
] | [
[
"numpy.arange",
"matplotlib.pyplot.savefig",
"numpy.loadtxt",
"matplotlib.pyplot.figure"
]
] |
cflynn3/resqpy | [
"d1d34972ee95526265bb7bde96ca232f98f69c77",
"d1d34972ee95526265bb7bde96ca232f98f69c77",
"d1d34972ee95526265bb7bde96ca232f98f69c77",
"d1d34972ee95526265bb7bde96ca232f98f69c77"
] | [
"resqpy/well.py",
"resqpy/rq_import.py",
"tests/test_surface.py",
"resqpy/olio/vector_utilities.py"
] | [
"\"\"\"well.py: resqpy well module providing trajectory, deviation survey, blocked well, wellbore frame and marker frame and md datum classes.\n\nExample::\n\n # Wellbore interpretations\n for well in model.iter_wellbore_interpretations():\n print(well.title)\n\n for trajectory in well.iter_trajectori... | [
[
"pandas.DataFrame",
"numpy.all",
"numpy.max",
"numpy.mean",
"pandas.isna",
"numpy.where",
"pandas.notna",
"pandas.read_csv",
"numpy.allclose",
"numpy.unique",
"numpy.arange",
"numpy.full",
"numpy.count_nonzero",
"numpy.zeros",
"numpy.min",
"numpy.isn... |
tkim135/scibert | [
"3da79bcfc0f6649a5adc8622aca7fa488f6eee26"
] | [
"scibert/models/gpt_text_classifier.py"
] | [
"from typing import Dict, Optional, List, Any\n\nimport torch\nimport torch.nn.functional as F\nfrom allennlp.data import Vocabulary\nfrom allennlp.models.model import Model\nfrom allennlp.modules import FeedForward, TextFieldEmbedder, Seq2SeqEncoder\nfrom allennlp.nn import InitializerApplicator, RegularizerApplic... | [
[
"torch.nn.CrossEntropyLoss",
"torch.nn.Dropout",
"torch.nn.functional.softmax"
]
] |
f1tenth/ESweek2021_educationclassA3 | [
"7a32bacdb7f3154a773d28b6b6abffdaa154a526"
] | [
"03_GraphBasedPlanner/graph_ltpl/offline_graph/src/main_offline_callback.py"
] | [
"import numpy as np\nimport configparser\nimport pickle\nimport os.path as osfuncs\nimport hashlib\nimport logging\n\n# custom modules\nimport graph_ltpl\n\n\ndef main_offline_callback(globtraj_param_path: str,\n graph_off_config_path: str,\n graph_store_path: str,\... | [
[
"numpy.vstack",
"numpy.cumsum",
"numpy.size",
"numpy.column_stack",
"numpy.sum",
"numpy.hypot"
]
] |
Top1Miami/ITMO_FS | [
"781b196219f54488fe17b9307694666221b5ddd0"
] | [
"ITMO_FS/filters/multivariate/mimaga.py"
] | [
"import numpy as np\nimport random\nfrom sklearn.metrics import f1_score\nfrom sklearn.pipeline import make_pipeline\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.svm import SVC\nfrom sklearn.model_selection import train_test_split\n\n\ndef marginal_entropy(x):\n x_counter = {xi: 0 for xi in x}... | [
[
"numpy.log",
"sklearn.model_selection.train_test_split",
"sklearn.preprocessing.StandardScaler",
"sklearn.svm.SVC",
"sklearn.metrics.f1_score",
"numpy.array",
"numpy.where",
"numpy.zeros"
]
] |
reasonsolo/MTCNN-Tensorflow | [
"a6c06439b0d42e72c05510631f99fad2a4067131"
] | [
"prepare_data/gen_landmark_helen.py"
] | [
"from load_dataset import load_helen_annotation, load_muct_annotation\nfrom BBox_utils import BBox, IoU\nfrom Landmark_utils import rotate\nimport sys\nsys.path.append('../')\nfrom train_models.MTCNN_config import config\nimport cv2\nimport os\nimport random\nimport numpy as np\n\n\nLANDMARK_LEN = config.LANDMARK_... | [
[
"numpy.expand_dims",
"numpy.asarray",
"numpy.prod",
"numpy.array",
"numpy.where",
"numpy.random.randint"
]
] |
Mehrad0711/HUBERT | [
"2f13fd2f7f5a2ec13544f4007158b582ae7408c3",
"2f13fd2f7f5a2ec13544f4007158b582ae7408c3"
] | [
"run_visual.py",
"utils/prediction.py"
] | [
"import os\nimport argparse\nimport json\nimport logging\nfrom collections import defaultdict, Counter, OrderedDict\nfrom matplotlib import pyplot as plt\nimport numpy as np\nimport seaborn as sns\nfrom utils.global_vars import POS_TAGS_MAP\n\nlogging.basicConfig(format='%(asctime)s - %(levelname)s - %(name)s - %(m... | [
[
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.figure",
"numpy.cumsum",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.subplots_adjust",
"numpy.array",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
],
[
"numpy.argmax",
"torch.no_grad"
]
] |
PanchoVarallo/Schafkopf-Application | [
"98e58f69cadfeb63c13068320df1e8ea96cd91fe"
] | [
"schafkopf/database/queries.py"
] | [
"import datetime\nimport logging\nfrom typing import Union, List, Optional, Tuple\n\nimport pandas as pd\nfrom sqlalchemy import literal\nfrom sqlalchemy.orm import sessionmaker\n\nfrom schafkopf.database.data_model import Teilnehmer, Runde, Punkteconfig, Einzelspiel, Resultat, Verdopplung, User\nfrom schafkopf.dat... | [
[
"pandas.merge",
"pandas.read_sql",
"pandas.DataFrame"
]
] |
tomzhang/mars-1 | [
"6f1d85e37eb1b383251314cb0ba13e06288af03d",
"6f1d85e37eb1b383251314cb0ba13e06288af03d",
"6f1d85e37eb1b383251314cb0ba13e06288af03d",
"6f1d85e37eb1b383251314cb0ba13e06288af03d",
"6f1d85e37eb1b383251314cb0ba13e06288af03d",
"6f1d85e37eb1b383251314cb0ba13e06288af03d",
"6f1d85e37eb1b383251314cb0ba13e06288af03... | [
"mars/tensor/random/pareto.py",
"mars/dataframe/base/fillna.py",
"mars/dataframe/align.py",
"mars/scheduler/tests/integrated/test_worker_failover.py",
"mars/worker/storage/tests/test_shared_io.py",
"mars/learn/utils/multiclass.py",
"mars/dataframe/window/ewm/aggregation.py",
"mars/dataframe/reduction/... | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright 1999-2020 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/li... | [
[
"numpy.random.RandomState",
"numpy.dtype"
],
[
"pandas.set_option",
"pandas.concat",
"pandas.reset_option",
"numpy.empty"
],
[
"pandas.concat"
],
[
"numpy.random.random",
"numpy.ones"
],
[
"numpy.random.random",
"numpy.random.randint"
],
[
"numpy... |
hcgcarry/usad | [
"4e99a6acd43ef109be4d89b80e96978b9ad61c2f"
] | [
"dataSetPreprocess/WADI.A1_9 Oct 2017/label_normal.py"
] | [
"import pandas as pd\n\nnormal = pd.read_csv(\"WADI_normal.csv\")\n \nnormal[\"Normal/Attack\"] = \"Normal\"\n\nnormal.to_csv(\"WADI_normal_2.csv\")"
] | [
[
"pandas.read_csv"
]
] |
Pichu123/FRC3636_2017 | [
"667ae111ea9d710157cffaba72cf7a676a2c5da3"
] | [
"vision.py"
] | [
"try:\n import cv2\n import numpy as np\nexcept:\n print(\"Couldn't load cv2\")\nimport math\nimport subprocess\n\njpeg = None\n\ndef cvThread(cX):\n subprocess.call(['v4l2-ctl', '-c', 'exposure_auto=1'])\n subprocess.call(['v4l2-ctl', '-c', 'exposure_absolute=5'])\n subprocess.call(['v4l2-ctl', '... | [
[
"numpy.array"
]
] |
orazve/daal4py | [
"8530377aac4c629102f9cad62a569f18d33e4458",
"8530377aac4c629102f9cad62a569f18d33e4458",
"8530377aac4c629102f9cad62a569f18d33e4458"
] | [
"examples/implicit_als_batch.py",
"examples/kmeans_batch.py",
"examples/math_softmax_batch.py"
] | [
"#*******************************************************************************\n# Copyright 2014-2019 Intel Corporation\n# All Rights Reserved.\n#\n# This software is licensed under the Apache License, Version 2.0 (the\n# \"License\"), the following terms apply:\n#\n# You may not use this file except in complian... | [
[
"pandas.read_csv",
"numpy.loadtxt"
],
[
"pandas.read_csv",
"numpy.loadtxt"
],
[
"numpy.allclose",
"numpy.loadtxt"
]
] |
peerdavid/capsule-network | [
"bb62fc90a2022a05dc7a4b206279f34f6f8316fd"
] | [
"mnist/capsnet.py"
] | [
"import os\nimport argparse\nimport numpy as np\nfrom PIL import Image\nimport matplotlib.pyplot as plt\n\nfrom keras import callbacks, layers, models, optimizers\nfrom keras import backend as K\nfrom keras.utils import to_categorical\nfrom keras.datasets import mnist\nfrom keras.preprocessing.image import ImageDat... | [
[
"sklearn.metrics.recall_score",
"numpy.expand_dims",
"matplotlib.pyplot.imread",
"sklearn.metrics.precision_score",
"sklearn.metrics.confusion_matrix",
"numpy.concatenate",
"numpy.copy",
"numpy.argmax",
"numpy.prod",
"sklearn.metrics.f1_score",
"matplotlib.pyplot.show",... |
ariasjose/nn4nlp-code | [
"7327ea3e93161afbc8c008e287b646daa802be4d"
] | [
"06-rnn/sentiment-rnn.py"
] | [
"from collections import defaultdict\r\nimport time\r\nimport random\r\nimport dynet as dy\r\nimport numpy as np\r\n\r\n# Functions to read in the corpus\r\nw2i = defaultdict(lambda: len(w2i))\r\nt2i = defaultdict(lambda: len(t2i))\r\nUNK = w2i[\"<unk>\"]\r\n\r\n\r\ndef read_dataset(filename):\r\n with open(file... | [
[
"numpy.argmax"
]
] |
qbarthelemy/geomstats | [
"efe8f0215df802f4dd2816fcac42bd81b7a900d7",
"efe8f0215df802f4dd2816fcac42bd81b7a900d7",
"efe8f0215df802f4dd2816fcac42bd81b7a900d7"
] | [
"tests/tests_geomstats/test_beta.py",
"tests/tests_geomstats/test_visualization.py",
"tests/tests_geomstats/test_examples.py"
] | [
"\"\"\"Unit tests for the beta manifold.\"\"\"\n\nimport warnings\n\nfrom scipy.stats import beta\n\nimport geomstats.backend as gs\nimport geomstats.tests\nfrom geomstats.information_geometry.beta import BetaDistributions, BetaMetric\n\n\nclass TestBetaDistributions(geomstats.tests.TestCase):\n \"\"\"Class defi... | [
[
"scipy.stats.beta.pdf"
],
[
"matplotlib.use",
"matplotlib.pyplot.figure"
],
[
"matplotlib.use",
"matplotlib.pyplot.rcParams.update",
"matplotlib.pyplot.figure"
]
] |
EmmaUnimelb/open_spiel | [
"680c712b4a2e4812348758407a54210a7110b747"
] | [
"open_spiel/python/algorithms/tabular_qlearner.py"
] | [
"# Copyright 2019 DeepMind Technologies Ltd. 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 r... | [
[
"numpy.zeros"
]
] |
jnyborg/timematch | [
"a652df95282de9a3fc12d2fd204f438ff4ccb122"
] | [
"timematch.py"
] | [
"from torch.utils.data.sampler import WeightedRandomSampler\nimport sklearn.metrics\nfrom collections import Counter\nfrom copy import deepcopy\n\nimport numpy as np\nimport torch\nimport torch.nn.functional as F\nfrom torch.utils import data\nfrom torchvision import transforms\nfrom tqdm import tqdm\n\nfrom datase... | [
[
"torch.nn.functional.softmax",
"torch.max",
"torch.optim.lr_scheduler.CosineAnnealingLR",
"torch.load",
"torch.cat",
"torch.utils.data.DataLoader",
"numpy.max",
"torch.no_grad",
"numpy.zeros_like",
"numpy.moveaxis",
"torch.nn.CrossEntropyLoss",
"numpy.arange",
"... |
verryshadow/ExpDesign_SetRank | [
"3e3d22e52bb551bb5d80cac499ba43751cd18d7e"
] | [
"code/SetRank/autoSetRank_ESR.py"
] | [
"import argparse\nimport sys\nfrom collections import Counter\nfrom collections import defaultdict\nimport itertools\nimport time\nimport numpy as np\nimport math\nimport pickle\nfrom scipy import stats\n\nimport setRank_ESR\n\ndef string2dict(s):\n d = {ele.split(\":\")[0]: float(ele.split(\":\")[1]) for ele in s... | [
[
"scipy.stats.entropy",
"numpy.zeros",
"numpy.argmax",
"numpy.ones"
]
] |
rutgerhartog/apocrypha | [
"29e475219a5e0d510899a512cfc7be030a32c758"
] | [
"modules/chisquare.py"
] | [
"from scipy.stats import chisquare as chi2\n\n\ndef calculate_chisquare(text: bytes) -> float:\n return chi2(text).statistics\n"
] | [
[
"scipy.stats.chisquare"
]
] |
billpsomas/ibot | [
"c6fbce7e2a59780f39ad7304ed9a8b1acf038d2d",
"c6fbce7e2a59780f39ad7304ed9a8b1acf038d2d"
] | [
"analysis/backgrounds_challenge/tools/model_utils.py",
"analysis/combine_ckpt.py"
] | [
"# Copyright (c) ByteDance, Inc. and its affiliates.\n# All rights reserved.\n#\n# This source code is licensed under the license found in the\n# LICENSE file in the root directory of this source tree.\n\n\"\"\"\nCopy-paste from backgrounds_challenge library:\nhttps://github.com/MadryLab/backgrounds_challenge\n\"\"... | [
[
"torch.clamp",
"torch.nn.DataParallel",
"torch.load"
],
[
"torch.save",
"torch.load"
]
] |
jjepsuomi/Bayesian-maximum-variance-inclusion | [
"d1e8bf1464a26ff4d313bb5c4ba2800e75609c22"
] | [
"bmvi_toolbox.py"
] | [
"#**************************************************************\n#**************************************************************\n#**************************************************************\n# \n# - This Python file contains the functions required for \n# demonstrating the functionality of Bayesian maximum var... | [
[
"numpy.argsort",
"numpy.sum",
"numpy.abs",
"numpy.power",
"numpy.min",
"numpy.arange",
"numpy.eye",
"numpy.max",
"numpy.delete",
"numpy.random.permutation",
"numpy.linalg.pinv",
"numpy.transpose",
"numpy.mod",
"numpy.random.uniform",
"numpy.zeros",
"... |
Corey-Zumar/clipper-db-queries | [
"e60f8d8b11c0ccc5f0287b63fe5cb86d128b72f0"
] | [
"bench/bench_init.py"
] | [
"import sys\nimport os\nimport errno\ncur_dir = os.path.dirname(os.path.abspath(__file__))\nsys.path.append(os.path.abspath(\"%s/../management\" % cur_dir))\nsys.path.append(os.path.abspath(\"%s/../examples\" % cur_dir))\n# sys.path.insert(0, os.path.abspath('%s/../containers/python/' % cur_dir))\n\nimport clipper_... | [
[
"sklearn.externals.joblib.dump",
"sklearn.externals.joblib.load",
"sklearn.linear_model.LogisticRegression"
]
] |
xiaoyuchai/scikit-learn | [
"246795f214ec31874aa1d1e89c90c7007ab60642"
] | [
"sklearn/compose/tests/test_column_transformer.py"
] | [
"\"\"\"\nTest the ColumnTransformer.\n\"\"\"\nimport re\nimport pickle\n\nimport warnings\nimport numpy as np\nfrom scipy import sparse\nimport pytest\n\nfrom numpy.testing import assert_allclose\nfrom sklearn.utils._testing import assert_raise_message\nfrom sklearn.utils._testing import assert_array_equal\nfrom sk... | [
[
"numpy.concatenate",
"sklearn.compose.make_column_transformer",
"numpy.random.randn",
"sklearn.compose.ColumnTransformer",
"scipy.sparse.issparse",
"numpy.arange",
"numpy.eye",
"sklearn.compose.make_column_selector",
"sklearn.utils._testing.assert_array_equal",
"sklearn.uti... |
josephjcontreras/vectormath | [
"a2259fb82cf5a665170f50d216b11a738400d878"
] | [
"vectormath/vector.py"
] | [
"\"\"\"vector.py contains definitions for Vector and VectorArray classes\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport numpy as np\n\n\nclass BaseVector(np.ndarray):\n \"\"\"Class to contain... | [
[
"numpy.dot",
"numpy.sqrt",
"numpy.asarray",
"numpy.squeeze",
"numpy.cos",
"numpy.ones",
"numpy.all",
"numpy.arctan2",
"numpy.atleast_2d",
"numpy.sin",
"numpy.isscalar",
"numpy.cross",
"numpy.array",
"numpy.sum"
]
] |
psi1104/pifuhd | [
"32be6642d8ee198f6186ec7ab82f329d95a9f275"
] | [
"lightweight_human_pose_estimation_pytorch/get_pose.py"
] | [
"import torch\nimport cv2\nimport numpy as np\nfrom .models.with_mobilenet import PoseEstimationWithMobileNet\nfrom .modules.keypoints import extract_keypoints, group_keypoints\nfrom .modules.load_state import load_state\nfrom .modules.pose import Pose\nfrom . import demo\n\ndef get_rect(net, images, height_size=51... | [
[
"numpy.ones",
"numpy.array",
"torch.cuda.is_available",
"torch.load"
]
] |
gjhartwell/cth-python | [
"558148a5755fd0bd3b12e1380d365f8bf51efa19",
"558148a5755fd0bd3b12e1380d365f8bf51efa19",
"558148a5755fd0bd3b12e1380d365f8bf51efa19"
] | [
"Neural_Network/doregression.py",
"gregsprograms/test_plot_rotatonal_transform.py",
"diagnostics/thomson/Raman/raman_theory.py"
] | [
"# --------------------------------------\n# doregression.py\n# \n# sample regression problem\n# Parameters:\n#\t\n# \n# Returns:\n#\n# Example:\n# \n#\n# Also defines:\n#\t\n# Greg Hartwell\n# 2017-11-1\n#----------------------------------------------------------------------------\n\n\n\nimport matplotlib.py... | [
[
"matplotlib.pyplot.yticks",
"sklearn.metrics.r2_score",
"matplotlib.pyplot.scatter",
"sklearn.datasets.load_diabetes",
"sklearn.metrics.mean_squared_error",
"matplotlib.pyplot.plot",
"sklearn.linear_model.LinearRegression",
"matplotlib.pyplot.xticks",
"matplotlib.pyplot.show"
... |
Koncopd/anndata | [
"c33bffbfb4a10f4bdeb26220579a2d33f4cd9b4d",
"c33bffbfb4a10f4bdeb26220579a2d33f4cd9b4d"
] | [
"anndata/_core/aligned_mapping.py",
"anndata/_io/read.py"
] | [
"from abc import ABC, abstractmethod\nfrom collections import abc as cabc\nfrom typing import Union, Optional, Type, ClassVar, TypeVar # Special types\nfrom typing import Iterator, Mapping, Sequence # ABCs\nfrom typing import Tuple, List, Dict # Generic base types\n\nimport numpy as np\nimport pandas as pd\nfrom... | [
[
"pandas.DataFrame"
],
[
"numpy.array",
"scipy.sparse.csr.csr_matrix",
"pandas.DataFrame.from_dict"
]
] |
robotics-upo/og-sgg | [
"106c56919428ce927a1cae494932c00a5f58c37d",
"106c56919428ce927a1cae494932c00a5f58c37d"
] | [
"train_telenet.py",
"convert_vg_images.py"
] | [
"import io\nimport zipfile\nimport os\nimport random\n\nfrom telenet.config import get as tn_config\n\nRND_SEED = tn_config('train.random_seed')\n\nos.environ['PYTHONHASHSEED'] = str(RND_SEED)\nrandom.seed(RND_SEED)\n\nimport numpy as np\nimport pandas as pd\n\nnp.random.seed(RND_SEED)\n\nimport tensorflow as tf\ni... | [
[
"tensorflow.nn.relu",
"numpy.minimum",
"numpy.random.seed",
"tensorflow.stack",
"tensorflow.python.training.tracking.data_structures.NoDependency",
"tensorflow.cast",
"tensorflow.keras.metrics.Mean",
"matplotlib.pyplot.savefig",
"pandas.DataFrame",
"tensorflow.GradientTape"... |
Jstark27249/RISC-V-Vector-Hardware | [
"d6f75227a09dd4c4719e1ec5547ea6447997e4fe"
] | [
"TestFiles/FloatMulTest.py"
] | [
"# Program to show various ways to read and\n# write data in a file.\nimport math\n\nimport numpy as np\nimport struct\n\nimport random\n\n\n# opcodes\n# Bit shift values must go to B Input on the execute\n# 000001 or = shift left\n# 000100 = shift right\n# 001000 = equivalence check\n# 000000 = branching ie < or ... | [
[
"numpy.random.uniform",
"numpy.float32"
]
] |
KayThangan/LiftSimulation | [
"507b8cfaba854bec0427351dbf0eb245fc54a39c"
] | [
"AdvanceCase/src/GraphPanel.py"
] | [
"import matplotlib.pyplot as plt\nfrom com.simulation.lift.api.CostDict import cost_dict\n\nfig = plt.figure()\nfig.canvas.set_window_title('Advance Case Graph')\nfig.suptitle(\"\"\"Cost\nin function of \nLift Capacity, Floor Number and Passenger Number\"\"\")\n\nax = fig.add_subplot(111, projection='3d')\n\nx = []... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.hot",
"matplotlib.pyplot.figure"
]
] |
vlomonaco/DeepLearningImplementations | [
"2aa73198b6293fadbd393e2d71e5d33a2307a709"
] | [
"pix2pix/src/utils/data_utils.py"
] | [
"from keras.datasets import mnist\nfrom keras.utils import np_utils\nimport numpy as np\nimport h5py\n\nimport matplotlib.pylab as plt\n\n\ndef normalization(X):\n\n return X / 127.5 - 1\n\n\ndef inverse_normalization(X):\n\n return (X + 1.) / 2.\n\n\ndef get_nb_patch(img_dim, patch_size, image_dim_ordering):... | [
[
"numpy.random.choice",
"numpy.concatenate",
"matplotlib.pylab.imshow",
"matplotlib.pylab.clf",
"numpy.random.binomial",
"numpy.random.uniform",
"matplotlib.pylab.savefig",
"numpy.zeros",
"matplotlib.pylab.close"
]
] |
jeffkinnison/shadho | [
"5da10d6e9916af224acfaa5150a0c151d4af42f9"
] | [
"shadho/shadho.py"
] | [
"\"\"\"Main driver for the SHADHO framework.\n\nClasses\n-------\nShadho\n Driver class for local and distributed hyperparameter optimization.\n\"\"\"\nfrom shadho.configuration import ShadhoConfig\nfrom shadho.hardware import ComputeClass\nfrom shadho.managers import create_manager\n\nfrom collections import Or... | [
[
"numpy.ceil"
]
] |
implus/PVT | [
"4f70d09f2c0390a9ca2dabf271d725f2d8f75d08"
] | [
"pvt.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom functools import partial\n\nfrom timm.models.layers import DropPath, to_2tuple, trunc_normal_\nfrom timm.models.registry import register_model\nfrom timm.models.vision_transformer import _cfg\n\n__all__ = [\n 'pvt_tiny', 'pvt_small', 'pv... | [
[
"torch.nn.BatchNorm1d",
"torch.nn.Dropout",
"torch.cat",
"torch.zeros",
"torch.nn.init.constant_",
"torch.nn.Conv2d",
"torch.nn.LayerNorm",
"torch.nn.Linear",
"torch.nn.Identity",
"torch.nn.ReLU"
]
] |
mackelab/IdentifyMechanisticModels_2020 | [
"b93c90ec6156ae5f8afee6aaac7317373e9caf5e"
] | [
"7_stg/model/dataset_proc/read_data.py"
] | [
"import numpy as np\nimport experimental_data_utils as edu\nimport pyabf\n\n\nclass reader:\n def __init__(self, filedir):\n \"\"\"\n Initialize reader\n\n :param filedir: string. Relative or absolute path to directory\n \"\"\"\n self.filedir = filedir\n self.PY_spike_ti... | [
[
"numpy.asarray",
"numpy.max",
"numpy.std",
"numpy.zeros_like",
"numpy.mean",
"numpy.digitize",
"numpy.where"
]
] |
Razorbill-Instruments/razorbill-lab-python | [
"f1a8ae3727b16ab82dd95a802975c44c7aa32328"
] | [
"instruments/rigol.py"
] | [
"#\n# Copyright 2016-2021 Razorbill Instruments Ltd.\n# This file is part of the Razorbill Lab Python library which is\n# available under the MIT licence - see the LICENCE file for more.\n#\n\"\"\"\nModule for interfacing with Rigol Instruments\n\"\"\"\n\nfrom . import ScpiInstrument, ChildInstrument, _scpi_propert... | [
[
"matplotlib.pyplot.figure"
]
] |
phorvicheka-python/BERTopic | [
"7813a4552c9abc3337726e0d37596900e30410db"
] | [
"bertopic/plotting/_heatmap.py"
] | [
"import numpy as np\nfrom typing import List\nfrom scipy.cluster.hierarchy import fcluster, linkage\nfrom sklearn.metrics.pairwise import cosine_similarity\n\nimport plotly.express as px\nimport plotly.graph_objects as go\n\n\ndef visualize_heatmap(topic_model,\n topics: List[int] = None,\n ... | [
[
"scipy.cluster.hierarchy.linkage",
"numpy.array",
"sklearn.metrics.pairwise.cosine_similarity",
"scipy.cluster.hierarchy.fcluster"
]
] |
dajuno/tikzplotlib | [
"bf62ddab7c30054616b17cced02eca46ac58412e",
"bf62ddab7c30054616b17cced02eca46ac58412e",
"bf62ddab7c30054616b17cced02eca46ac58412e",
"bf62ddab7c30054616b17cced02eca46ac58412e"
] | [
"test/test_subplots.py",
"tikzplotlib/_text.py",
"test/test_errorbar.py",
"test/test_axvline.py"
] | [
"from helpers import assert_equality\n\n\ndef plot():\n import numpy as np\n from matplotlib import pyplot as plt\n\n def f(t):\n s1 = np.cos(2 * np.pi * t)\n e1 = np.exp(-t)\n return np.multiply(s1, e1)\n\n fig = plt.figure()\n\n t1 = np.arange(0.0, 5.0, 0.4)\n t2 = np.arange... | [
[
"matplotlib.pyplot.title",
"numpy.multiply",
"numpy.arange",
"numpy.cos",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.xlabel",
"numpy.exp",
"matplotlib.pyplot.figure"
],
[
"matplotlib.colors.ColorConverter"
... |
edbons/faiky-tails | [
"8aeae9d1335eff2ca87dfd528191baa45f73e8d6"
] | [
"src/model/pipeline.py"
] | [
"import copy\nimport datetime\nimport random\nimport traceback\nimport logging\nimport os\n\nimport numpy as np\nimport torch\nfrom torch.utils.data import DataLoader\nfrom tqdm import tqdm\n\n\nlogger = logging.getLogger('pipeline')\nlogger.setLevel(logging.INFO)\n\n\ndef init_random_seed(value=0):\n random.see... | [
[
"torch.cuda.manual_seed",
"numpy.random.seed",
"torch.manual_seed",
"torch.is_tensor",
"torch.no_grad",
"torch.cuda.is_available",
"torch.device"
]
] |
Andy-Grigg/surveying_problem | [
"d8485d2294b3c6701e798aa8e12674b1cc268627"
] | [
"src/doe.py"
] | [
"\"\"\" Main module for surveying solution.\nCalls each separate solution and summarizes results and performance \"\"\"\n\nimport time\nimport sys\nimport pandas as pd\nimport pyjion\nfrom itertools import product\nfrom typing import Type, TYPE_CHECKING\n\nfrom orchestrator import GridOrchestrator\n\nif TYPE_CHECKI... | [
[
"pandas.DataFrame"
]
] |
zcyang/tensorflow | [
"b327647368117db19b42c6fd75d0aa67a66dbf26"
] | [
"tensorflow/python/ops/array_ops.py"
] | [
"# Copyright 2015 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.tensor_shape.scalar",
"tensorflow.python.ops.gen_math_ops._range",
"tensorflow.python.framework.tensor_shape.TensorShape",
"tensorflow.python.ops.gen_array_ops._mirror_pad",
"tensorflow.python.framework.ops.op_scope",
"tensorflow.python.framework.tensor_shape.m... |
LiuChaoXD/Remote-Sensing-Image-Retrieval-Models | [
"c135562263102080716e35260f111dcff7762264"
] | [
"Deep-Hash-learning-for-Remote-Sensing-Image-Retrieval/codes.py"
] | [
"import torch\nimport torch.nn as nn\nfrom models.Net import AlexNet, Uniform_D\nfrom dataset.customData import MyCustomDataset\nfrom loss.contrast import Contrast_Loss, Quantization_Loss\nimport numpy as np\nfrom torch.autograd import Variable\nfrom torchvision import transforms\nfrom torch.utils.data import DataL... | [
[
"numpy.array",
"torch.utils.data.DataLoader",
"numpy.save",
"torch.load"
]
] |
ropg/SARveillance | [
"94c0b348df4fc5b9ee532aadfe3514e105441a74",
"94c0b348df4fc5b9ee532aadfe3514e105441a74"
] | [
"sarveillance/webapp.py",
"sarveillance/utils.py"
] | [
"import streamlit as st\nimport os\nimport sys\nimport ee\nimport sys\nimport base64\nimport geemap as gee\nfrom geemap import cartoee\nimport pandas as pd\nfrom utils import new_get_image_collection_gif\n\nst.title(\"SARveillance\")\nst.subheader(\"Sentinel-1 SAR time series analysis for OSINT use\")\n\n\nclass SA... | [
[
"pandas.read_csv"
],
[
"matplotlib.pyplot.close",
"matplotlib.pyplot.clf",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.figure"
]
] |
fding253/nxviz | [
"e52fa46a751196af9b4c4833ff7529fdda2bcaf7"
] | [
"examples/matrix/barbell.py"
] | [
"\"\"\"\nDisplays a NetworkX barbell graph to screen using a CircosPlot.\n\nFeatures of this example:\n- MatrixPlot\n- Styling matrix plot with different colormap.\n\"\"\"\n\nimport matplotlib.pyplot as plt\nimport networkx as nx\n\nfrom nxviz.plots import MatrixPlot\n\nG = nx.barbell_graph(m1=10, m2=3)\n\n# Instan... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.cm.get_cmap"
]
] |
staketd/prom_prog_submodule_main | [
"f6dfa5984c1b79e989686d7db124eb529eac67ad"
] | [
"tensorflow/python/keras/engine/training.py"
] | [
"# Copyright 2015 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.keras.distribute.distributed_training_utils.global_batch_size_supported",
"tensorflow.python.framework.ops.executing_eagerly_outside_functions",
"tensorflow.python.keras.backend.function",
"tensorflow.python.keras.backend.symbolic_learning_phase",
"tensorflow.python.keras.en... |
hany606/PettingZoo | [
"ef958ff3dfb3759e980759b507448ea96ac8ba28"
] | [
"pettingzoo/test/parallel_test.py"
] | [
"import random\nimport warnings\n\nimport numpy as np\n\nfrom pettingzoo.utils.conversions import (aec_to_parallel_wrapper, parallel_to_aec_wrapper,\n turn_based_aec_to_parallel_wrapper)\nfrom pettingzoo.utils.wrappers import BaseWrapper\n\nfrom .api_test import missing_attr... | [
[
"numpy.flatnonzero"
]
] |
rjzamora/dask-sql | [
"c3ad6a9f6b01ce02127fde7501eaf322c8160f7e"
] | [
"tests/integration/test_select.py"
] | [
"import dask.dataframe as dd\nimport numpy as np\nimport pandas as pd\nimport pytest\nfrom pandas.testing import assert_frame_equal\n\nfrom dask_sql.utils import ParsingException\n\n\ndef test_select(c, df):\n result_df = c.sql(\"SELECT * FROM df\")\n result_df = result_df.compute()\n\n assert_frame_equal(... | [
[
"pandas.to_datetime",
"pandas.testing.assert_frame_equal",
"numpy.sqrt",
"pandas.DataFrame"
]
] |
dpetersonVT23/RA_Duty_Scheduler | [
"6fec38bbb96e878a78b9247c6a74e73132da519a"
] | [
"mplcal.py"
] | [
"# https://github.com/meta4/mplcal\n# Copyright (c) 2020, Peter Wilson\n#\n# All rights reserved.\n\n# import statements\nimport calendar\nimport matplotlib.pyplot as plt\n\ncalendar.setfirstweekday(6) # Sunday is 1st day in US\nw_days = 'Sun Mon Tue Wed Thu Fri Sat'.split()\nm_names = '''January February March Apr... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.savefig"
]
] |
rom1mouret/ml-essentials | [
"27220fd65bffa350d75aec76592ad5d786108d41"
] | [
"examples/linreg.py"
] | [
"#!/usr/bin/env python3\n\nfrom contextlib import contextmanager\nimport pandas as pd\nimport numpy as np\nimport random\nimport torch\nimport time\nimport os\nimport argparse\nfrom scipy import sparse\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.preprocessing import StandardScaler\nfrom skle... | [
[
"numpy.array",
"pandas.read_csv",
"numpy.abs",
"torch.Tensor",
"torch.cat",
"sklearn.preprocessing.OneHotEncoder",
"sklearn.impute.SimpleImputer",
"sklearn.model_selection.train_test_split",
"torch.nn.Linear",
"sklearn.preprocessing.StandardScaler",
"numpy.array_split",... |
Dimkarpenko/Minecraft | [
"c51e1faa20a4ab08b516bff1d3fcd62f20d3474d"
] | [
"minecraft.py"
] | [
"from ursina import *\nfrom ursina.prefabs.first_person_controller import FirstPersonController\nfrom ursina.prefabs.panel import Panel\nfrom ursina.shaders import *\nfrom perlin_noise import PerlinNoise\nfrom numpy import floor,abs\nfrom random import randint,randrange\nimport psutil\nimport os\nimport json\n\nver... | [
[
"numpy.floor"
]
] |
pymc-labs/plaster | [
"8535afd78d357c305aa522b30019b1039fa7caab"
] | [
"plaster/run/nn_v2/zests/zest_nn_v2_integration.py"
] | [
"import numpy as np\nimport pandas as pd\nfrom munch import Munch\nfrom plaster.run.nn_v2.nn_v2_params import NNV2Params\nfrom plaster.run.nn_v2.nn_v2_worker import nn_v2\nfrom plaster.run.prep import prep_fixtures\nfrom plaster.run.prep.prep_params import PrepParams\nfrom plaster.run.prep.prep_worker import prep\n... | [
[
"numpy.all",
"numpy.flip",
"pandas.DataFrame"
]
] |
saksham219/scvelo | [
"41fb2a90ae6a71577cf2c55b80e1ade4407891b7",
"41fb2a90ae6a71577cf2c55b80e1ade4407891b7"
] | [
"scvelo/preprocessing/neighbors.py",
"scvelo/plotting/velocity.py"
] | [
"from .. import settings\nfrom .. import logging as logg\n\nfrom scanpy.api import Neighbors\nfrom scanpy.api.pp import pca\nfrom scipy.sparse import issparse\nimport numpy as np\n\n\ndef neighbors(adata, n_neighbors=30, n_pcs=30, use_rep=None, knn=True, random_state=0, method='umap',\n metric='euclide... | [
[
"sklearn.neighbors.NearestNeighbors",
"numpy.where",
"scipy.sparse.issparse",
"numpy.clip"
],
[
"matplotlib.pyplot.legend",
"scipy.sparse.issparse",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.subplot",
"pandas.unique",
"matplotlib.pyplot.GridSpec",
"matplotlib.pyp... |
2005606/arcface-tf2-new | [
"6a34a66fb6ef8a873beb893f970a126e7bd4d526"
] | [
"modules/utils.py"
] | [
"import yaml\nimport numpy as np\nimport tensorflow as tf\nfrom absl import logging\n\n\ndef set_memory_growth():\n gpus = tf.config.experimental.list_physical_devices('GPU')\n if gpus:\n try:\n # Currently, memory growth needs to be the same across GPUs\n for gpu in gpus:\n ... | [
[
"tensorflow.config.experimental.list_physical_devices",
"tensorflow.config.experimental.list_logical_devices",
"numpy.linalg.norm",
"tensorflow.config.experimental.set_memory_growth"
]
] |
djalmabright/matplotlib | [
"35e769d6c1fa47996935cfd69024ed0c95018cce"
] | [
"mathtext_example.py"
] | [
"from __future__ import print_function\nimport matplotlib.pyplot as plt\nimport os\nimport sys\nimport re\nimport gc\n\n# Selection of features following \"Writing mathematical expressions\" tutorial\nmathtext_titles = {\n 0: \"Header demo\",\n 1: \"Subscripts and superscripts\",\n 2: \"Fractions, binomial... | [
[
"matplotlib.pyplot.gca",
"matplotlib.pyplot.annotate",
"matplotlib.pyplot.axes",
"matplotlib.pyplot.fill_between",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
Pawel-Kranzberg/pandas | [
"6f90cb3d7bd5891d15a427252fba00027ca6084d",
"6f90cb3d7bd5891d15a427252fba00027ca6084d",
"6f90cb3d7bd5891d15a427252fba00027ca6084d",
"6f90cb3d7bd5891d15a427252fba00027ca6084d",
"6f90cb3d7bd5891d15a427252fba00027ca6084d",
"6f90cb3d7bd5891d15a427252fba00027ca6084d",
"6f90cb3d7bd5891d15a427252fba00027ca6084... | [
"pandas/tests/indexing/common.py",
"asv_bench/benchmarks/tslibs/tz_convert.py",
"pandas/tests/indexes/period/test_period.py",
"pandas/tests/frame/test_repr_info.py",
"pandas/compat/numpy/__init__.py",
"pandas/util/_validators.py",
"pandas/tests/frame/methods/test_join.py",
"pandas/core/arrays/interval... | [
"\"\"\" common utilities \"\"\"\nimport itertools\n\nimport numpy as np\n\nfrom pandas import (\n DataFrame,\n Float64Index,\n MultiIndex,\n Series,\n UInt64Index,\n date_range,\n)\nimport pandas._testing as tm\n\n\ndef _mklbl(prefix, n):\n return [f\"{prefix}{i}\" for i in range(n)]\n\n\ndef _... | [
[
"pandas._testing.assert_almost_equal",
"pandas.Series",
"numpy.arange",
"pandas.DataFrame",
"numpy.random.randn",
"numpy.random.rand",
"pandas.MultiIndex.from_product",
"pandas.date_range"
],
[
"pandas._libs.tslibs.tzconversion.tz_convert",
"pandas._libs.tslibs.tzconver... |
district10/snippet-manager | [
"bebe45a601368947168e3ee6e6ab8c1fc2ee2055"
] | [
"snippets/point-direction.py"
] | [
"import matplotlib.pyplot as plt\nfrom mpl_toolkits.mplot3d import axes3d, Axes3D\n\ndef draw_points(points):\n fig = plt.figure()\n ax = Axes3D(fig)\n\n # 绘制虚拟的三维 bounding box,保证三轴成比例\n minpt = np.min(points[:, :3], axis=0)\n maxpt = np.max(points[:, :3], axis=0)\n max_range = np.array([maxpt[0] ... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
techieashish/PlasmaPy | [
"b1e4ea269e59011dcafd5bf3f658b43e683af645"
] | [
"plasmapy/formulary/braginskii.py"
] | [
"\"\"\"Functions to calculate classical transport coefficients.\n\n.. topic:: Examples:\n\n * :ref:`sphx_glr_auto_examples_plot_braginskii.py`\n\nIntroduction\n============\n\nClassical transport theory is derived by using kinetic theory to close the\nplasma two-fluid (electron and ion fluid) equations in the col... | [
[
"numpy.sqrt",
"numpy.abs",
"numpy.isnan",
"numpy.array",
"numpy.isclose"
]
] |
deviant-syndrome/spear2sc | [
"0dee0cc8c4b0b6c45e2f6af103e2c9bb8acf8d7c"
] | [
"spear2sc/analysis.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport numpy as np\nimport plotille\n\nfrom .spear_utils import index_time, index_amp\n\n\"\"\"spear2sc.analysis A set of methods to perform basic analysis of the partials\"\"\"\n\n\ndef get_durations_thresh(partials):\n \"\"\"Gets the 92th percentile of partial durations\n\n The c... | [
[
"numpy.percentile"
]
] |
OpenBanboo/AgileNet | [
"d75baa20b9f762cb56b249dca272150de9ae8def",
"d75baa20b9f762cb56b249dca272150de9ae8def"
] | [
"miniImagenet/data/omniglot.py",
"miniImagenet/FCDec.py"
] | [
"from __future__ import print_function\nimport torch.utils.data as data\nimport os\nimport os.path\nimport numpy as np\nfrom PIL import Image as pil_image\nimport pickle\nimport random\nfrom . import parser\n\n\nclass Omniglot(data.Dataset):\n def __init__(self, root, dataset='omniglot'):\n self.root = ro... | [
[
"numpy.rot90",
"numpy.expand_dims",
"numpy.uint8",
"numpy.array",
"numpy.zeros"
],
[
"torch.nn.Parameter"
]
] |
biplab37/qiskit-aakash | [
"e10b204887606f1f75bdfde182bb0c6d0a322c68",
"e10b204887606f1f75bdfde182bb0c6d0a322c68",
"e10b204887606f1f75bdfde182bb0c6d0a322c68",
"e10b204887606f1f75bdfde182bb0c6d0a322c68"
] | [
"test/python/pulse/test_commands.py",
"qiskit/transpiler/passes/mapping/stochastic_swap.py",
"qiskit/transpiler/passes/optimize_1q_gates.py",
"test/python/visualization/test_circuit_text_drawer.py"
] | [
"# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017, 2019.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE... | [
[
"numpy.exp",
"numpy.linspace"
],
[
"numpy.random.RandomState",
"numpy.zeros",
"numpy.cumsum",
"numpy.iinfo"
],
[
"numpy.mod",
"numpy.abs",
"numpy.allclose"
],
[
"numpy.diag",
"numpy.eye",
"numpy.array"
]
] |
alexhsamuel/fixfmt | [
"a392ca2863d55204e3ee8fc832b72ecba1387485"
] | [
"python/fixfmt/table.py"
] | [
"import copy\nimport numpy as np\n\nfrom . import string_length, palide, center, Bool, Number, String, is_fmt\nfrom . import _ext\nfrom . import npfmt\nfrom .lib import ansi\n\n#-------------------------------------------------------------------------------\n\n# FIXME: Elsewhere.\ndef update_cfg(old, update... | [
[
"numpy.array"
]
] |
vreshniak/ImplicitResNet | [
"62e3c2f047f2572a0d0a0ee7cd3c8dd6e340080e"
] | [
"implicitresnet/models/rhs.py"
] | [
"from abc import ABCMeta, abstractmethod\n\nimport math\n\nimport torch\nfrom .misc import ParabolicPerceptron, HamiltonianPerceptron, HollowMLP, MLP, PreActConv2d\n\n\n\n###############################################################################\n################################################################... | [
[
"torch.sigmoid",
"torch.ones",
"torch.nn.init.constant_",
"torch.is_tensor",
"torch.tensor",
"torch.nn.init.xavier_uniform_",
"torch.stack",
"torch.nn.init.zeros_"
]
] |
lompabo/aiiti-01-2021 | [
"d2596458da8382940f51cb8f388aaf5357bce881"
] | [
"util/nab.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport pandas as pd\nimport json\nfrom matplotlib import pyplot as plt\nimport numpy as np\nimport os\n\n# Configuration\nanomaly_color = 'sandybrown'\nprediction_color = 'yellowgreen'\ntraining_color = 'yellowgreen'\nvalidation_color = 'gold'\ntest_color = 'coral'... | [
[
"pandas.to_datetime",
"pandas.Series",
"matplotlib.pyplot.plot",
"numpy.argmin",
"pandas.read_csv",
"matplotlib.pyplot.tight_layout",
"numpy.repeat",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.hist2d",
"pandas.plotting.autocorrelation_plot",
"numpy.array",
"matp... |
lkl089/corona-discord-bot | [
"b946e7f41c19e1849ae7c63ebf5be0ba9331a0fc"
] | [
"chart/chart_spain.py"
] | [
"from data import recent_confirmed as week\nfrom matplotlib import pyplot as plt\nfrom matplotlib import rc\nimport matplotlib.font_manager as fm\nimport platform\nfrom datetime import datetime\n\nnow = datetime.now()\nmonth = now.strftime(\"%m\")\nday = now.strftime(\"%d\")\ntoday = month + day\n\nif platform.syst... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.title",
"matplotlib.pyplot.cla",
"matplotlib.font_manager.FontProperties",
"matplotlib.pyplot.draw",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.gcf",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.clf",
"matplotlib.pyplot.xt... |
avanwyk/cipy | [
"e5c8462eed8649abcb89c8a256d3868c89186b35"
] | [
"cipy/algorithms/pso/base.py"
] | [
"# Copyright 2016 Andrich van Wyk\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ... | [
[
"numpy.random.RandomState"
]
] |
MarcoMancha/BreastCancerDetector | [
"4e11da37bf94a0f496f236e9706205ac81683058",
"be0dfdcebd1ae66da6d0cf48e2525c24942ae877",
"be0dfdcebd1ae66da6d0cf48e2525c24942ae877",
"be0dfdcebd1ae66da6d0cf48e2525c24942ae877",
"be0dfdcebd1ae66da6d0cf48e2525c24942ae877",
"be0dfdcebd1ae66da6d0cf48e2525c24942ae877",
"be0dfdcebd1ae66da6d0cf48e2525c24942ae87... | [
"env/lib/python3.7/site-packages/numpy/random/__init__.py",
"env/lib/python3.7/site-packages/scipy/sparse/linalg/eigen/lobpcg/lobpcg.py",
"env/lib/python3.7/site-packages/matplotlib/testing/jpl_units/UnitDblFormatter.py",
"env/lib/python3.7/site-packages/sklearn/utils/tests/test_seq_dataset.py",
"env/lib/py... | [
"\"\"\"\n========================\nRandom Number Generation\n========================\n\nUse ``default_rng()`` to create a `Generator` and call its methods.\n\n=============== =========================================================\nGenerator\n--------------- ------------------------------------------------------... | [
[
"numpy._pytesttester.PytestTester"
],
[
"numpy.diag",
"numpy.dot",
"numpy.sqrt",
"scipy.linalg.cho_factor",
"numpy.asarray",
"numpy.eye",
"scipy.linalg.cho_solve",
"numpy.ones",
"scipy.linalg.eigh",
"scipy.linalg.cholesky",
"scipy.sparse.linalg.aslinearoperator"... |
thunter009/thought | [
"c6ae1af13af5079186694968b2105192a6e26f3d"
] | [
"src/thought/core.py"
] | [
"\"\"\"Main module. If include_dataclasses_scaffolding is enabled, you will see Data Class scaffolding here\"\"\"\nfrom dataclasses import dataclass\nfrom datetime import datetime\nfrom typing import List\n\nimport pandas as pd\nfrom recordlinkage import Index, Compare\nfrom notion.collection import Collection\nfro... | [
[
"pandas.DataFrame"
]
] |
phorne-uncharted/d3m-primitives | [
"77d900b9dd6ab4b2b330f4e969dabcdc419c73e1"
] | [
"tests/test_image_retrieval.py"
] | [
"import os\nfrom glob import glob\nimport time\nimport json\n\nfrom PIL import Image\nimport pandas as pd\nimport numpy as np\nimport torchvision as tv\nfrom rsp.data import bilinear_upsample, BANDS\nfrom tifffile import imread as tiffread\nfrom d3m.container import DataFrame as d3m_DataFrame\nfrom d3m.metadata imp... | [
[
"numpy.arange",
"pandas.DataFrame",
"numpy.concatenate",
"numpy.array",
"numpy.zeros"
]
] |
yaoMYZ/ROP | [
"08418e43deefeacfe32da86a2bcc8f94c0105c7c"
] | [
"DealData/__init__.py"
] | [
"from DealData.FileOperation import FileOperation\nimport numpy as np\ndef test():\n a=np.random.uniform(0,1,size=10)\n b = np.random.uniform(0, 1, size=10)\n print(a)\n print(b)\n print(np.corrcoef(a,b))\n print(cal_corrcoef(a,b))\n pass\n\ndef cal_corrcoef(X,Y):\n # 均值\n Xmean = np.mean... | [
[
"numpy.std",
"numpy.mean",
"numpy.corrcoef",
"numpy.random.uniform",
"numpy.sum"
]
] |
midas-research/calling-out-bluff | [
"4de3c56b64edeeef9968288679c4e5b261e9949c",
"4de3c56b64edeeef9968288679c4e5b261e9949c"
] | [
"Model5-MemoryNets/predict_adv-Copy1.py",
"Model5-MemoryNets/predict_adv-Copy5.py"
] | [
"import tensorflow as tf\nimport data_utils\nfrom qwk import quadratic_weighted_kappa\nimport time\nimport os\nimport sys\nimport pandas as pd\nimport numpy as np\n\ngraph = tf.get_default_graph()\n\nessay_set_id = 1\nnum_tokens = 42\nembedding_size = 300\nnum_samples = 1\nis_regression = False\n\nearly_stop_count ... | [
[
"tensorflow.train.import_meta_graph",
"pandas.DataFrame",
"numpy.round",
"numpy.append",
"numpy.mean",
"tensorflow.Session",
"tensorflow.get_default_graph"
],
[
"pandas.read_csv",
"tensorflow.train.import_meta_graph",
"pandas.DataFrame",
"numpy.round",
"numpy.ap... |
tallamjr/NeuralCompression | [
"21d05ec0d9f8c52d8742fde36f569b4dad2842a5"
] | [
"neuralcompression/functional/_dense_image_warp.py"
] | [
"# Copyright (c) Meta Platforms, Inc. and affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom typing import Optional\n\nimport torch\nimport torch.nn.functional as F\nfrom torch import Tensor\n\n\ndef _create_dense_warp... | [
[
"torch.linspace",
"torch.nn.functional.grid_sample",
"torch.stack",
"torch.device",
"torch.get_default_dtype"
]
] |
lizhaoliu-Lec/Conformer | [
"577cff26b78b338f035c075727c408fca3272208",
"577cff26b78b338f035c075727c408fca3272208",
"577cff26b78b338f035c075727c408fca3272208"
] | [
"mmdetection/mmdet/models/necks/hrfpn.py",
"mmdetection/mmdet/apis/test.py",
"mmdetection/tests/test_models/test_backbones.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom mmcv.cnn import ConvModule, caffe2_xavier_init\nfrom torch.utils.checkpoint import checkpoint\n\nfrom ..builder import NECKS\n\n\n@NECKS.register_module()\nclass HRFPN(nn.Module):\n \"\"\"HRFPN (High Resolution Feature Pyrmamids)\n\n ... | [
[
"torch.nn.ModuleList",
"torch.utils.checkpoint.checkpoint",
"torch.nn.functional.interpolate",
"torch.cat"
],
[
"torch.distributed.broadcast",
"torch.full",
"torch.zeros",
"torch.distributed.all_gather",
"torch.distributed.barrier",
"torch.tensor",
"torch.no_grad"
... |
tkloong/nn-sg | [
"6bf0609d10db0c6378e2dff386dcdbc294b390e8"
] | [
"src/dnn_data_engine.py"
] | [
"# Copyright 2016 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.random.seed",
"numpy.multiply",
"numpy.arange",
"tensorflow.contrib.learn.python.learn.datasets.base.Datasets",
"numpy.random.shuffle",
"numpy.concatenate",
"numpy.array",
"numpy.zeros",
"tensorflow.python.framework.random_seed.get_seed"
]
] |
prazek/jax | [
"a41d3e289299ce948f4fa1331ec9ae3ba9ab832d"
] | [
"tests/pjit_test.py"
] | [
"# Copyright 2021 Google LLC\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 or agreed ... | [
[
"numpy.split",
"numpy.arange",
"numpy.ones",
"numpy.prod",
"numpy.array"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.