repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
tirkarthi/estimator | [
"5d962124f1c2ad5b2886ada53d5c604257b660b6"
] | [
"tensorflow_estimator/python/estimator/canned/timeseries/model_utils.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... | [
[
"numpy.arange",
"tensorflow.compat.v1.initializers.zeros",
"numpy.array",
"tensorflow.compat.v1.nn.xw_plus_b"
]
] |
BGerwe/impedance.py | [
"f727318327bf96280691c51ac5ad00c552fa49d8"
] | [
"impedance/tests/test_fitting.py"
] | [
"from impedance.models.circuits.fitting import buildCircuit, rmse, \\\n extract_circuit_elements\nimport numpy as np\n\n# def test_residuals():\n# pass\n#\n#\n# def test_valid():\n# pass\n#\n#\n\n\ndef test_buildCircuit():\n\n # Test simple Randles circuit wit... | [
[
"numpy.array",
"numpy.sqrt"
]
] |
mattn/xgboost | [
"e526871f0acb124a1b5701653a48662da63fd0be"
] | [
"tests/python/test_with_dask.py"
] | [
"import testing as tm\nimport pytest\nimport xgboost as xgb\nimport sys\nimport numpy as np\n\nif sys.platform.startswith(\"win\"):\n pytest.skip(\"Skipping dask tests on Windows\", allow_module_level=True)\n\npytestmark = pytest.mark.skipif(**tm.no_dask())\n\ntry:\n from distributed.utils_test import client,... | [
[
"numpy.random.randn",
"numpy.random.rand"
]
] |
frostburn/image-source-reverb | [
"84c467249fb5fb1e978009510889a0447a625cda"
] | [
"demos/triangular_drum.py"
] | [
"from pylab import *\nfrom matplotlib.animation import FuncAnimation\nimport matplotlib.pyplot as plt\nfrom image_source_reverb.shapes import equilateral_triangle\n\n\n# TODO: Improve\ndef gaussian_point_source_2D(t, r, tightness=50):\n \"\"\"\n A somewhat close approximation to the 2D Wave Equation with gaus... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots"
]
] |
SohSalari/Stone-Soup | [
"39c7f02ce11e10c9b3c612ad359f6d8bca495266",
"e073d4145df18facad43e4ab7b0a34e8d65f67ee"
] | [
"stonesoup/sensor/tests/test_passive.py",
"stonesoup/platform/tests/test_platform_simple.py"
] | [
"# -*- coding: utf-8 -*-\nimport datetime\n\nimport numpy as np\n\nfrom ...functions import cart2angles, rotx, roty, rotz\nfrom ...types.array import StateVector, CovarianceMatrix\nfrom ...types.state import State\nfrom ..passive import PassiveElevationBearing\n\n\ndef test_passive_sensor():\n # Input arguments\... | [
[
"numpy.deg2rad",
"numpy.array",
"numpy.equal"
],
[
"numpy.sqrt",
"numpy.allclose",
"numpy.array_equal",
"numpy.concatenate",
"numpy.array"
]
] |
DhananjayAshok/KagglePipeline | [
"aaf3eaa7793fdb2e1b1639b0be316327e10b546a"
] | [
"KagglePipeline/rapid_deployment/MultipleModels.py"
] | [
"class MultipleModels(object):\n \"\"\"\n Abstract Classes that create multiple models and store them in a list\n\n \n \"\"\"\n def __init__(self, classification, extras=[]):\n \"\"\"\n Extras is a list of additional models that can be called to fit on all in format (model, string name ... | [
[
"sklearn.model_selection.cross_val_score",
"matplotlib.pyplot.scatter",
"matplotlib.pyplot.title",
"sklearn.model_selection.KFold",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] |
VireshDhawan/Data-Science-Templates | [
"bb248045e66c6d6230f6aee80fa53e030085c4fe"
] | [
"Algorithms/GradientBoosting/GradientBoosting.py"
] | [
"from sklearn.ensemble import GradientBoostingClassifier, GradientBoostingRegressor\nfrom sklearn.model_selection import cross_val_score\nimport numpy as np\n\nclass GradientBoosting:\n\n def __init__(self, x_train, y_train, problemtype = 'regression', cv = 5):\n self.x_train = x_train\n self.y_tra... | [
[
"sklearn.ensemble.GradientBoostingClassifier",
"sklearn.model_selection.cross_val_score",
"numpy.mean",
"sklearn.ensemble.GradientBoostingRegressor"
]
] |
krmurtha/xcp_abcd | [
"2b745d980fbd41aabe4ebaff5342c7151ee7308d"
] | [
"xcp_abcd/utils/write_save.py"
] | [
"# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n\"\"\"Utilities to read and write nifiti and cifti data.\"\"\"\nimport nibabel as nb\nimport numpy as np\nimport os \nimport subprocess\nfrom templateflow.api import get as get_template\nimport tempf... | [
[
"numpy.array",
"numpy.zeros"
]
] |
terry00123/cgp-cnn-PyTorch | [
"784c2ea39d7849e000d158d4e320ef2f0b133671"
] | [
"cgp_config.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport multiprocessing as mp\nimport multiprocessing.pool\nimport numpy as np\nimport cnn_train as cnn\n\n\n# wrapper function for multiprocessing\ndef arg_wrapper_mp(args):\n return args[0](*args[1:])\n\nclass NoDaemonProcess(mp.Process):\n # make 'daemon' a... | [
[
"numpy.max"
]
] |
pjpetersik/ninolearn | [
"2a6912bbaaf3c5737f6dcda89e4d7d1fd885a35e",
"2a6912bbaaf3c5737f6dcda89e4d7d1fd885a35e",
"2a6912bbaaf3c5737f6dcda89e4d7d1fd885a35e"
] | [
"research/Master_Thesis/4.2deep_ensmble_full.py",
"ninolearn/learn/models/ipnn.py",
"research/StandardizedResearchIPNN/cross_training.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\n\nimport keras.backend as K\n\nfrom ninolearn.learn.models.dem import DEM\nfrom ninolearn.utils import print_header, small_print_header\nfrom ninolearn.pathes import modeldir\n\nfrom data_pipeline import pipeline\n\nimport os\nimport time\nplt.close(\"all\")\nK.... | [
[
"numpy.invert",
"matplotlib.pyplot.close"
],
[
"numpy.arange",
"numpy.round",
"numpy.delete",
"numpy.mean",
"numpy.zeros"
],
[
"sklearn.preprocessing.StandardScaler",
"numpy.nan_to_num",
"numpy.stack"
]
] |
beasteers/pescador | [
"dff2c75e5cbfaa5b03c7fd94ccfc546658bed600",
"dff2c75e5cbfaa5b03c7fd94ccfc546658bed600"
] | [
"docs/conf.py",
"examples/mux/chain_example.py"
] | [
"# -*- coding: utf-8 -*-\n#\n# pescador documentation build configuration file, created by\n# sphinx-quickstart on Fri Apr 3 10:03:34 2015.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenera... | [
[
"matplotlib.use"
],
[
"numpy.load"
]
] |
faizanahemad/facebook-hateful-memes | [
"1f7febf65f5fc4ed4aeb476d5383437f677fbc19",
"1f7febf65f5fc4ed4aeb476d5383437f677fbc19"
] | [
"facebook_hateful_memes_detector/models/text_models/Albert.py",
"facebook_hateful_memes_detector/models/text_models/BERTClassifier.py"
] | [
"import abc\nfrom typing import List, Tuple, Dict, Set, Union\nimport numpy as np\nimport torch.nn as nn\nimport torch\nimport torch.nn.functional as F\nfrom ..classifiers import CNN1DFeaturizer, GRUFeaturizer, BasicFeaturizer, TransformerFeaturizer\nfrom .Fasttext1DCNN import Fasttext1DCNNModel\nfrom transformers ... | [
[
"torch.tensor"
],
[
"torch.softmax",
"torch.bernoulli",
"torch.full",
"torch.tensor"
]
] |
MuhammadSYahyaS/FUnIE-GAN | [
"8f934c834c94e007b00866186b9ee624dc2b7b69"
] | [
"TF-Keras/test_funieGAN.py"
] | [
"\"\"\"\n# > Script for testing FUnIE-GAN \n# > Notes and Usage:\n# - set data_dir and model paths\n# - python test_funieGAN.py\n\"\"\"\nimport os\nimport time\nimport ntpath\nimport numpy as np\nfrom PIL import Image\nfrom os.path import join, exists\nfrom keras.models import model_from_json\n## local libs\n... | [
[
"numpy.hstack",
"numpy.expand_dims",
"numpy.mean",
"numpy.sum"
]
] |
iwangyuezhang/naturalcc | [
"9c3329dd8387c8242deb52bf590ebe3ac795f8de",
"9c3329dd8387c8242deb52bf590ebe3ac795f8de"
] | [
"ncc/modules/encoders/base/contracode_encoder_lstm.py",
"ncc/modules/encoders/retrieval/deepcs_encoder.py"
] | [
"import torch\nimport torch.nn.functional as F\nfrom torch import nn\n\nfrom ncc.data.constants import DEFAULT_MAX_SOURCE_POSITIONS\nfrom ncc.utils import utils\nfrom .lstm_encoder import LSTMEncoder\n\n\nclass CodeEncoderLSTMEncoder(LSTMEncoder):\n def __init__(\n self, dictionary, embed_dim=512, hidden_... | [
[
"torch.nn.Linear",
"torch.nn.utils.rnn.pad_packed_sequence",
"torch.nn.ReLU",
"torch.nn.functional.dropout"
],
[
"torch.tanh"
]
] |
AndMu/Market-Wisdom | [
"64889634566172ccfed372bba452f717862ba956"
] | [
"src/PortfolioBasic/Technical/Indicators.py"
] | [
"import abc\nimport logging\n\nimport pandas as pd\nfrom PortfolioBasic.stockstats import StockDataFrame\n\nfrom PortfolioBasic.Definitions import HeaderFactory\nfrom PortfolioBasic.Technical.Analysis import TechnicalPerformance\nlogger = logging.getLogger(__name__)\n\n\nclass Indicator(object):\n __metaclass__ ... | [
[
"pandas.Series",
"pandas.DataFrame"
]
] |
PJunhyuk/2021AICompetition-03 | [
"dbeea7dec3f009f1f1485984dcdfa54eb6b4f75e"
] | [
"train.py"
] | [
"import argparse\nimport logging\nimport math\nimport os\nimport random\nimport time\nfrom copy import deepcopy\nfrom pathlib import Path\nfrom threading import Thread\n\nimport numpy as np\nimport torch.distributed as dist\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\nimport... | [
[
"torch.distributed.broadcast",
"torch.optim.lr_scheduler.LambdaLR",
"torch.load",
"torch.zeros",
"torch.nn.SyncBatchNorm.convert_sync_batchnorm",
"numpy.concatenate",
"torch.cuda.amp.autocast",
"torch.utils.tensorboard.SummaryWriter",
"torch.cuda.manual_seed_all",
"torch.nn... |
dongchao0612/MyClassicNet | [
"b4363effd3cc930a0f797e49470c20124886b2ba",
"b4363effd3cc930a0f797e49470c20124886b2ba"
] | [
"DenseNet/DenseNet.py",
"GoogLeNet/test.py"
] | [
"import torch.nn as nn\nimport torch.nn.functional as F\nimport torch\nfrom torchsummary import summary\n\n\nclass BN_Conv2d(nn.Module):\n \"\"\"\n BN_CONV_RELU\n \"\"\"\n\n def __init__(self,\n in_channels: object,\n out_channels: object,\n kernel_size: o... | [
[
"torch.nn.Sequential",
"torch.cat",
"torch.nn.functional.avg_pool2d",
"torch.nn.Conv2d",
"torch.nn.Linear",
"torch.nn.AvgPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.functional.max_pool2d"
],
[
"numpy.array",
"torch.utils.data.DataLoader",
"torch.max",
"torch.load... |
Voyz/transformers-interpret | [
"8884e0a969be33d2664fb413dd9430d64ecd5ceb"
] | [
"transformers_interpret/attributions.py"
] | [
"from typing import Callable, Dict, List, Tuple\n\nimport torch\nimport torch.nn as nn\nfrom captum.attr import (\n IntegratedGradients,\n LayerConductance,\n LayerIntegratedGradients,\n configure_interpretable_embedding_layer,\n remove_interpretable_embedding_layer,\n)\nfrom captum.attr import visua... | [
[
"torch.norm"
]
] |
georgetown-cset/ai-definitions-for-policymaking | [
"667e928c8bb30f6e02696ac71081c6bae4096f50"
] | [
"analysis/prediction_counts.py"
] | [
"import pandas as pd\nfrom settings import PROJECT_ID\n\ncounts = pd.read_gbq(\"\"\"\\\n SELECT \n countif(arxiv_scibert_hit is true) arxiv_scibert,\n countif(arxiv_scibert_cl_hit is true) arxiv_scibert_cl,\n countif(arxiv_scibert_cv_hit is true) arxiv_scibert_cv,\n countif(arxiv_scibert_ro_h... | [
[
"pandas.read_gbq"
]
] |
lilisako/pandas | [
"0eceea496746769e4781f081b8c7159b1ce9f8f0",
"0eceea496746769e4781f081b8c7159b1ce9f8f0"
] | [
"pandas/tests/indexes/test_any_index.py",
"pandas/tests/indexes/categorical/test_reindex.py"
] | [
"\"\"\"\nTests that can be parametrized over _any_ Index object.\n\nTODO: consider using hypothesis for these.\n\"\"\"\nimport re\n\nimport pytest\n\nimport pandas._testing as tm\n\n\ndef test_boolean_context_compat(index):\n # GH#7897\n with pytest.raises(ValueError, match=\"The truth value of a\"):\n ... | [
[
"pandas._testing.assert_produces_warning",
"pandas._testing.round_trip_pickle",
"pandas._testing.assert_index_equal"
],
[
"pandas.CategoricalIndex",
"pandas.Series",
"pandas.Categorical",
"pandas.Index",
"pandas.DataFrame",
"numpy.array",
"pandas._testing.assert_frame_e... |
Hadrien-Montanelli/chebpy | [
"c22f1f13b42b3c80f2e34be6e7136ef2d0277971"
] | [
"chebpy/nla/sphankel.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Dec 10 14:49:44 2020\n\nCopyright 2020 by Hadrien Montanelli.\n\"\"\"\n# Standard library imports:\nimport numpy as np\nfrom scipy.sparse import triu\n\n# Chebpy imports:\nfrom .sptoeplitz import sptoeplitz\n\ndef sphankel(col):\n \"\"\"Ret... | [
[
"numpy.flipud",
"numpy.flip"
]
] |
Shujun-He/Nucleic-Transformer | [
"c6527132cd4c04489b28617beb0694605f320ed9"
] | [
"src/Eukaryotic_Promoters_Classification/mouse_tata_deepromoter/Metrics.py"
] | [
"import numpy as np\n\n\ndef accuracy(predictions,ground_truths):\n return np.sum(predictions==ground_truths)/len(ground_truths)\n \n \ndef sensitivity(predictions,ground_truths):\n '''\n Here it is assumed:\n 0=negative\n 1=positive\n '''\n return 1-len(predictions[(predictions==0)*(grou... | [
[
"numpy.sum",
"numpy.sqrt"
]
] |
stefaniespeichert/l5kit | [
"e7ef272b80d71c5080891b27f478c6d3e001774e"
] | [
"l5kit/l5kit/tests/geometry/image_test.py"
] | [
"import unittest\n\nimport numpy as np\n\nfrom l5kit.geometry import crop_rectangle_from_image\n\n\nclass TestImageGeometry(unittest.TestCase):\n def test_crop_rectangle_from_image(self) -> None:\n # . X X X X 0 X X X\n # . X X X X X X X X\n # . X X X X X X X X\n # . 3 . . . . . . 1\n... | [
[
"numpy.array",
"numpy.zeros"
]
] |
jwcalder/peikonal | [
"3091eb547b1a7458a054be2383cd38602a00f31b"
] | [
"depth_images.py"
] | [
"import numpy as np\nimport graphlearning as gl\nimport matplotlib.pyplot as plt\nimport sklearn.datasets as datasets\nfrom utils import peikonal_depth\nimport sys\n\nk = 20\nfrac=0.05\nalpha=2\n\n#Plotting\nnumw = 16\nnumh = 10\n\n\nfor dataset in ['mnist','fashionmnist']:\n\n f_bdy, axarr_bdy = plt.subplots(nu... | [
[
"numpy.sqrt",
"numpy.nonzero",
"numpy.reshape",
"matplotlib.pyplot.subplots",
"numpy.ones",
"numpy.max",
"numpy.argmax",
"numpy.transpose",
"numpy.argsort",
"matplotlib.pyplot.show",
"numpy.zeros"
]
] |
albert-yue/objectnav | [
"95ce9bc2c1d953887275e8d9809a506aeb5682fb"
] | [
"habitat_baselines/rl/ppo/encoder_dict.py"
] | [
"#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\nimport abc\nimport math\nfrom collections import defaultdict\nfrom typing import Dict, Tuple, List, Optional\ni... | [
[
"numpy.prod",
"torch.nn.ModuleDict",
"torch.nn.ReLU"
]
] |
zlichen/GoMoKu-Game-MCTS | [
"2a559d19ad7712e72c46108d622c8e15074b413c"
] | [
"main_GUI.py"
] | [
"import numpy as np\nfrom MCTSearch import *\nfrom nodes import *\nimport random\nimport pygame\nfrom GUI import *\n\"\"\"\ndef printboard(mat):\n m,n=mat.shape\n print(\" \",end='')\n for i in range(1,n+1):\n print(\"{:4d}\".format(i),end='')\n print()\n print(' '*4+'-'*22)\n for i in ran... | [
[
"numpy.zeros"
]
] |
seignovert/pyvims | [
"a70b5b9b8bc5c37fa43b7db4d15407f312a31849",
"a70b5b9b8bc5c37fa43b7db4d15407f312a31849",
"a70b5b9b8bc5c37fa43b7db4d15407f312a31849"
] | [
"pyvims/projections/path3d.py",
"tests/test_vectors.py",
"pyvims/isis/isis.py"
] | [
"\"\"\"Path 3D module.\"\"\"\n\nimport numpy as np\n\nfrom matplotlib.path import Path\n\n\nclass Path3D(Path):\n \"\"\"Extend matplotlib 2D Path object with altitude attribute.\n\n Parameters\n ----------\n vertices: Nx2 array\n Path vertices.\n codes: N array\n Path codes.\n alt: N... | [
[
"numpy.ndim",
"numpy.shape"
],
[
"numpy.sqrt",
"numpy.transpose"
],
[
"numpy.abs",
"numpy.reshape",
"numpy.dtype",
"numpy.finfo",
"numpy.frombuffer",
"numpy.size",
"numpy.iinfo",
"numpy.prod",
"numpy.moveaxis",
"numpy.array"
]
] |
seamount-knight/perf-tests | [
"0e406f34924f26756f3742eba3f3224d52c4f9e6"
] | [
"dns/py/data.py"
] | [
"#!/usr/bin/env python\n\n# Copyright 2016 The Kubernetes 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 ... | [
[
"numpy.percentile"
]
] |
imatge-upc/pixelcoordEDL | [
"353632feed6ac8c93758c1a2a1b7a477e7ff053c",
"353632feed6ac8c93758c1a2a1b7a477e7ff053c",
"353632feed6ac8c93758c1a2a1b7a477e7ff053c"
] | [
"src/minerl/herobraine/data/pipeline_with_reward.py",
"src/minerl/herobraine/hero/handlers/observables.py",
"src/main/vqvae.py"
] | [
"import json\r\nimport logging\r\nimport multiprocessing\r\nimport os\r\nfrom collections import OrderedDict\r\nfrom queue import Queue, PriorityQueue\r\nfrom typing import List, Tuple, Any\r\n\r\nimport cv2\r\nimport numpy as np\r\nfrom multiprocess.pool import Pool\r\n\r\nfrom minerl.herobraine.hero.agent_handler... | [
[
"numpy.clip",
"numpy.asarray",
"numpy.random.shuffle",
"numpy.random.rand",
"numpy.array"
],
[
"numpy.array",
"numpy.sum"
],
[
"torch.nn.Parameter",
"sklearn.cluster.KMeans",
"torch.utils.data.DataLoader",
"torch.from_numpy",
"numpy.array"
]
] |
CN-TU/remy | [
"0c0887322b0cbf6e3497e3aeb95c979907f03623"
] | [
"async_deep_reinforce/a3c_visualize.py"
] | [
"# -*- coding: utf-8 -*-\nimport tensorflow as tf\nimport numpy as np\nimport cv2\nimport sys\nimport matplotlib.pyplot as plt\nimport random\n\nfrom game_state import GameState\nfrom game_ac_network import GameACFFNetwork, GameACLSTMNetwork\nfrom a3c_training_thread import A3CTrainingThread\nfrom rmsprop_applier i... | [
[
"tensorflow.train.get_checkpoint_state",
"tensorflow.placeholder",
"matplotlib.pyplot.subplots",
"tensorflow.global_variables_initializer",
"tensorflow.Session",
"tensorflow.train.Saver",
"matplotlib.pyplot.show"
]
] |
00sapo/MMSP2021-Audio2ScoreAlignment | [
"192919efd1d4f8fe8c435d09b0063b5b3406123a"
] | [
"alignment/alignment_tafe.py"
] | [
"import numpy as np\n# from dtw import dtw\nimport fastdtw\n\nfrom . import utils, cdist\n\n# from scipy.spatial.distance import cosine\n\nSTART_NOTE = 21\nEPS = np.finfo(np.float64).eps\n#: how many realignment do\nNUM_REALIGNMENT = 3\n#: how many seconds for each hop size in fine alignment\nFINE_HOP = [5, 2.5, 0.... | [
[
"numpy.array",
"numpy.interp",
"numpy.finfo"
]
] |
ompugao/cosypose | [
"4e471c16f19d5ee632668cd52eaa57b562f287d6",
"4e471c16f19d5ee632668cd52eaa57b562f287d6",
"4e471c16f19d5ee632668cd52eaa57b562f287d6",
"4e471c16f19d5ee632668cd52eaa57b562f287d6"
] | [
"cosypose/integrated/detector.py",
"cosypose/utils/distributed.py",
"cosypose/lib3d/symmetries.py",
"cosypose/scripts/make_ycbv_compat_models.py"
] | [
"import torch\nimport numpy as np\nimport pandas as pd\n\nimport cosypose.utils.tensor_collection as tc\n\n\nclass Detector:\n def __init__(self, model):\n model.eval()\n self.model = model\n self.config = model.config\n self.category_id_to_label = {v: k for k, v in self.config.label_... | [
[
"torch.empty",
"pandas.DataFrame",
"torch.no_grad",
"torch.stack",
"numpy.where",
"torch.as_tensor"
],
[
"torch.load",
"torch.cuda.device_count",
"torch.distributed.is_initialized",
"torch.distributed.barrier",
"torch.tensor",
"torch.no_grad",
"torch.distrib... |
nmarticorena/CenterNet | [
"f08477224fa14bae3fe3e4e8db26fb6ca638db2a"
] | [
"src/latency_test_images.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom PIL import Image\nimport torchvision.transforms.functional as TF\nimport _init_paths\n\nimport os\n\nimport torch\nimport torch.utils.data\nfrom opts import opts\nfrom models.model import create_mod... | [
[
"torch.cuda.synchronize",
"torch.randn",
"torch.manual_seed",
"torch.no_grad",
"numpy.mean",
"torch.device"
]
] |
rizalgowandy/petastorm | [
"f7aad8cf5ef6878231b335911e3e95541b388d40",
"f7aad8cf5ef6878231b335911e3e95541b388d40",
"f7aad8cf5ef6878231b335911e3e95541b388d40"
] | [
"petastorm/tests/test_unischema.py",
"petastorm/tests/test_ngram_end_to_end.py",
"examples/hello_world/petastorm_dataset/tensorflow_hello_world.py"
] | [
"# Copyright (c) 2017-2018 Uber Technologies, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by app... | [
[
"numpy.int32",
"numpy.zeros"
],
[
"tensorflow.compat.v1.Session",
"numpy.testing.assert_equal"
],
[
"tensorflow.compat.v1.Session"
]
] |
parkjh80/studio | [
"48852c4f097f773ce3d408b59f79fda2e2d60470",
"48852c4f097f773ce3d408b59f79fda2e2d60470",
"6d8d8384272e5e1b2838b12e5557272a19408e89",
"48852c4f097f773ce3d408b59f79fda2e2d60470",
"48852c4f097f773ce3d408b59f79fda2e2d60470",
"48852c4f097f773ce3d408b59f79fda2e2d60470"
] | [
"function/python/brightics/function/manipulation/test/timeseries_distance_test.py",
"function/python/brightics/function/statistics/cross_table.py",
"function/python/brightics/function/classification/ada_boost_classification.py",
"function/python/brightics/function/statistics/test/duncan_test.py",
"function/... | [
"\"\"\"\n Copyright 2019 Samsung SDS\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 applicab... | [
[
"numpy.array",
"pandas.DataFrame",
"numpy.testing.assert_array_almost_equal"
],
[
"pandas.crosstab",
"numpy.append"
],
[
"pandas.concat",
"matplotlib.pyplot.tight_layout",
"numpy.arange",
"pandas.DataFrame",
"sklearn.tree.DecisionTreeClassifier",
"sklearn.ensemb... |
sujeet-ap/keras-idiomatic-programmer | [
"4db490afea8acf9381cbf3d607583451a2f40a3a",
"4db490afea8acf9381cbf3d607583451a2f40a3a"
] | [
"zoo/models_c.py",
"zoo/senet/se_resnet.py"
] | [
"# Copyright 2019 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.asarray",
"tensorflow.keras.datasets.cifar100.load_data",
"tensorflow.keras.callbacks.LearningRateScheduler",
"tensorflow.keras.datasets.cifar10.load_data",
"sklearn.model_selection.train_test_split",
"numpy.cos",
"tensorflow.keras.optimizers.Adam",
"tensorflow.keras.utils.t... |
Forest75/Open3D | [
"61b90a6e06a2c209ad2b9f1c57fbd5f21e879dae",
"61b90a6e06a2c209ad2b9f1c57fbd5f21e879dae"
] | [
"examples/Python/Basic/working_with_numpy.py",
"examples/Python/Basic/icp_registration.py"
] | [
"# Open3D: www.open3d.org\n# The MIT License (MIT)\n# See license file or visit www.open3d.org for details\n\n# examples/Python/Basic/working_with_numpy.py\n\nimport copy\nimport numpy as np\nimport open3d as o3d\n\nif __name__ == \"__main__\":\n\n # generate some neat n times 3 matrix using a variant of sync fu... | [
[
"numpy.linspace",
"numpy.power",
"numpy.reshape",
"numpy.asarray",
"numpy.size",
"numpy.meshgrid"
],
[
"numpy.asarray"
]
] |
hellpoethero/FootballPython | [
"afb67446f01348f723c29bc753fb0366e341bfb7"
] | [
"ReadFBRefData.py"
] | [
"import pandas as pd\n\n\ndef read_csv(filename):\n df = pd.read_csv(filename, header=[0, 1])\n df.columns = rename_columns(df)\n return df\n\n\ndef rename_columns(df):\n new_cols = []\n for col in df.columns:\n if \"Unnamed:\" in col[0]:\n new_cols.append(col[1])\n else:\n ... | [
[
"pandas.read_csv"
]
] |
Shreyaansh-darkside/arviz | [
"b2c4687ddd4fdfe21c259b7d6c64269050596d41",
"b2c4687ddd4fdfe21c259b7d6c64269050596d41",
"b2c4687ddd4fdfe21c259b7d6c64269050596d41",
"b2c4687ddd4fdfe21c259b7d6c64269050596d41"
] | [
"arviz/stats/stats.py",
"arviz/plots/backends/matplotlib/jointplot.py",
"arviz/plots/backends/matplotlib/ppcplot.py",
"arviz/data/inference_data.py"
] | [
"# pylint: disable=too-many-lines\n\"\"\"Statistical functions in ArviZ.\"\"\"\nimport warnings\nimport logging\nfrom collections import OrderedDict\nfrom copy import deepcopy\nfrom typing import Optional, List, Union\n\nimport numpy as np\nimport pandas as pd\nimport scipy.stats as st\nfrom scipy.optimize import m... | [
[
"numpy.dot",
"numpy.product",
"numpy.expand_dims",
"pandas.Series",
"numpy.asarray",
"pandas.DataFrame",
"numpy.all",
"numpy.max",
"numpy.argmin",
"numpy.any",
"numpy.zeros_like",
"numpy.mean",
"numpy.var",
"numpy.exp",
"numpy.where",
"numpy.empty_li... |
NewKnowledge/gecko | [
"0d48807608a680a8debe92a7c784444a8d350494"
] | [
"Gecko/scripts/seed/GraphReconstructionKarateClub.py"
] | [
"import matplotlib\n#matplotlib.use('GTKAgg')\n\nimport os\nos.environ[\"THEANO_FLAGS\"]=\"mode=FAST_RUN,device=gpu,floatX=float32\"\n\nimport matplotlib.pyplot as plt\n\nfrom gem.utils import graph_util, plot_util\nfrom gem.evaluation import visualize_embedding as viz\nfrom gem.evaluation import evaluate_graph_rec... | [
[
"matplotlib.pyplot.show"
]
] |
kilsenp/jina | [
"ba476532f41c6d0b3ec2ff2e8636811169e99f16"
] | [
"jina/drivers/multimodal.py"
] | [
"__copyright__ = \"Copyright (c) 2020 Jina AI Limited. All rights reserved.\"\n__license__ = \"Apache-2.0\"\n\nfrom collections import defaultdict\nfrom typing import Iterable, Tuple, Dict, List\n\nimport numpy as np\n\nfrom .encode import BaseEncodeDriver\nfrom ..proto import jina_pb2\nfrom ..proto.ndarray.generic... | [
[
"numpy.stack"
]
] |
fiath/test | [
"b50898dafa90e93da48f573e0b3feb1bb6acd8de",
"b50898dafa90e93da48f573e0b3feb1bb6acd8de",
"b50898dafa90e93da48f573e0b3feb1bb6acd8de"
] | [
"klustaviewa/views/similaritymatrixview.py",
"kwiklib/dataio/spikecache.py",
"galry/managers/mesh_manager.py"
] | [
"\"\"\"Correlation matrix View: show correlation matrix.\"\"\"\n\n# -----------------------------------------------------------------------------\n# Imports\n# -----------------------------------------------------------------------------\nimport numpy as np\nimport numpy.random as rdn\nfrom galry import (Manager, D... | [
[
"numpy.swapaxes",
"numpy.clip",
"numpy.isnan",
"numpy.tile",
"numpy.ones",
"numpy.sign",
"numpy.digitize",
"numpy.array",
"numpy.zeros"
],
[
"numpy.hstack",
"numpy.nonzero",
"numpy.unique",
"numpy.arange",
"numpy.in1d",
"numpy.array"
],
[
"nu... |
Niki92More/ga-learner-dsmp-repo | [
"5fb9c6a68e4ef8e04eb42249602cb6b2b92740d6"
] | [
"Carter/code.py"
] | [
"# --------------\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.preprocessing import MinMaxScaler\nimport pandas as pd\n\n# Code starts here\ndf = pd.read_csv(path)\nprint(df.head(5))\nX=df.loc[:,df.columns!='attr1089']\ny=df['attr1089']\nX_train,X_test,y_train,y_test=train_test_split(X,y,test... | [
[
"sklearn.metrics.roc_auc_score",
"pandas.read_csv",
"sklearn.linear_model.LogisticRegression",
"sklearn.ensemble.RandomForestClassifier",
"sklearn.model_selection.train_test_split",
"sklearn.ensemble.VotingClassifier",
"sklearn.tree.DecisionTreeClassifier",
"sklearn.preprocessing.M... |
motapaolla/AIF360 | [
"fc018d007a507ee5ff10f7e2787e9d831d84e3ae"
] | [
"tests/sklearn/test_adversarial_debiasing.py"
] | [
"import numpy as np\nfrom sklearn.model_selection import GridSearchCV\nfrom sklearn.metrics import accuracy_score\nimport tensorflow as tf\n\nfrom aif360.datasets import AdultDataset\nfrom aif360.sklearn.datasets import fetch_adult\nfrom aif360.algorithms.inprocessing import AdversarialDebiasing as OldAdversarialDe... | [
[
"sklearn.model_selection.GridSearchCV",
"numpy.allclose",
"tensorflow.reset_default_graph",
"tensorflow.Session",
"sklearn.metrics.accuracy_score"
]
] |
nail1021734/sequence-to-sequence | [
"e591d225a108556de3eb2e4021ea024352b6ec17"
] | [
"s2s/util/_model.py"
] | [
"import os\nimport re\n\nimport torch\n\nfrom s2s.model import Model\nfrom s2s.path import EXP_PATH\n\n\ndef load_model_from_ckpt(ckpt: int, exp_name: str, model: Model) -> Model:\n exp_path = os.path.join(EXP_PATH, exp_name)\n prog = re.compile(r'model-(\\d+).pt')\n all_ckpt = list(filter(\n lambda... | [
[
"torch.load"
]
] |
lsscecilia/GraphVisualisation | [
"7490062ac0596835620e2026a756b6be8f0667e7"
] | [
"misc/PlotInteractiveGraph.py"
] | [
"# Copyright (c) 2021 Cecilia Lee\n\nfrom bokeh.io import output_notebook, show, save\nfrom bokeh.models import Range1d, Circle, ColumnDataSource, MultiLine\nfrom bokeh.plotting import figure\nfrom bokeh.plotting import from_networkx\nimport networkx\nfrom bokeh.models import (BoxSelectTool, Circle, EdgesAndLinkedN... | [
[
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.figure"
]
] |
ljchang/neurosynth | [
"470bae38911d8d31015016f098530a4a2e59f217"
] | [
"neurosynth/base/lexparser.py"
] | [
"\"\"\" Parsing expression grammar for feature-based study selection. \"\"\"\n\nfrom ply import lex\nfrom ply import yacc\nimport pandas as pd\nimport logging\n\nlogger = logging.getLogger('neurosynth.lexparser')\n\n\nclass Lexer(object):\n\n tokens = (\n 'WORD', 'FLOAT', 'ANDNOT', 'OR', 'AND', 'LPAR', 'R... | [
[
"pandas.concat"
]
] |
jturne19/legus-alma | [
"e6d8c512c57cf2447dd9bc2977d27c8d31b9abed"
] | [
"science/science.py"
] | [
"#!/d/users/turner/tools/anaconda3/bin/python\n\"\"\"\nbig 'ole python script that (hopefully) goes through the entire science procedure for give band 4 and band 7 fits files\n\nnotes are given in science.md\n\n**python3**\nto run:\nipython\nexec(open('science.py').read())\n\n\"\"\"\nimport numpy as np\nimport matp... | [
[
"numpy.sqrt",
"matplotlib.pyplot.loglog",
"numpy.mean",
"numpy.exp",
"numpy.where",
"numpy.arange",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.semilogx",
"matplotlib.pyplot.title",
"numpy.min",
"matplotlib.pyplot.savefig",
"numpy.log10",
"numpy.transpose",
... |
1ucky40nc3/models | [
"1933222e454f0d2ab8582e48fcc46f26c36ace87",
"192ae544169c1230c21141c033800aa1bd94e9b6",
"192ae544169c1230c21141c033800aa1bd94e9b6"
] | [
"official/nlp/keras_nlp/layers/fast_attention_util.py",
"official/vision/beta/projects/simclr/heads/simclr_head.py",
"research/object_detection/meta_architectures/deepmac_meta_arch_test.py"
] | [
"# coding=utf-8\n# Copyright 2021 The Google Research 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 requ... | [
[
"tensorflow.TensorShape",
"tensorflow.keras.constraints.get",
"tensorflow.keras.activations.serialize",
"tensorflow.keras.constraints.serialize",
"tensorflow.keras.regularizers.get",
"tensorflow.keras.initializers.serialize",
"tensorflow.keras.utils.register_keras_serializable",
"t... |
DIAGNijmegen/nnUNet | [
"40093c30e0115a1d77736a6dfd302ffa2ff08a68"
] | [
"nnunet/evaluation/model_selection/ensemble.py"
] | [
"# Copyright 2020 Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany\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# ... | [
[
"numpy.load",
"numpy.mean"
]
] |
TuKJet/EAST | [
"82979147ae44bd8a97a49357c94674590b13648b"
] | [
"pyicdartools/TL_iou.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport sys\nsys.path.append('.')\nfrom collections import namedtuple\nfrom pyicdartools import rrc_evaluation_funcs\nimport importlib\nfrom shapely.geometry import Polygon as plg\nimport numpy as np\n\ndef evaluation_imports():\n \"\"\"\n evaluation_imports: Di... | [
[
"numpy.argsort",
"numpy.array",
"numpy.empty"
]
] |
morgannewellsun/Reverse-Conway | [
"1750bf6ab96b8d6ccc1d8905264097e091adb82c"
] | [
"src/data/tests/verify_kaggle_training.py"
] | [
"# Run this script from the dir Reverse-Conway/src.\nimport sys\nsys.path.append('.')\n\nimport pandas as pd\nimport numpy as np\nimport time\nfrom components.binary_conway_forward_prop_fn import BinaryConwayForwardPropFn\n\ndef timing(msg):\n global prev_t\n t = time.time()\n t_sec = round(t - prev_t)\n ... | [
[
"numpy.array",
"pandas.read_csv"
]
] |
qzhu2017/PyXtal | [
"c9c9b109f0a258ca992f59455eb57c9577ef80bc"
] | [
"pyxtal/representation.py"
] | [
"import os\nimport numpy as np\nfrom pyxtal.symmetry import Group\nfrom pyxtal.lattice import Lattice\nfrom pyxtal.wyckoff_site import mol_site\nfrom pyxtal.molecule import find_id_from_smile\n \nclass representation():\n \"\"\"\n A class to handle the 1D representation of molecular crystal \n Works for ... | [
[
"numpy.array"
]
] |
ryuikaneko/tight_binding_shell_condition | [
"37ed5f1497b6e757873831ea515a29e4a9f2e50e"
] | [
"2d_triangular/filling_1over2_BC_P_P/2d_triangular.py"
] | [
"#!/usr/bin/env python\n\n# coding:utf-8\nfrom __future__ import print_function\nimport numpy as np\n\nimport matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt\n\ndef ene(kx,ky):\n return -2.0*(np.cos(kx)+np.cos(ky)+np.cos(kx+ky))\n\ndef calc_k_ene(Lx,Ly,BCx,BCy):\n if BCx == 'AP' or BCx == '... | [
[
"matplotlib.pyplot.gca",
"matplotlib.pyplot.yticks",
"numpy.abs",
"matplotlib.use",
"matplotlib.pyplot.cla",
"matplotlib.pyplot.ylim",
"numpy.cos",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.clf",
"matplotlib.... |
njzr/DadmaTools | [
"b26ad8aa834f642d49bd120bd7cf1fdf40741be1",
"b26ad8aa834f642d49bd120bd7cf1fdf40741be1",
"b26ad8aa834f642d49bd120bd7cf1fdf40741be1",
"b26ad8aa834f642d49bd120bd7cf1fdf40741be1",
"b26ad8aa834f642d49bd120bd7cf1fdf40741be1",
"b26ad8aa834f642d49bd120bd7cf1fdf40741be1"
] | [
"dadmatools/models/flair/parser/modules/scalar_mix.py",
"dadmatools/models/tokenization/utils.py",
"dadmatools/models/flair/algorithms/.ipynb_checkpoints/maximum_spanning_tree-checkpoint.py",
"dadmatools/models/flair/visual/training_curves.py",
"dadmatools/models/flair/models/.ipynb_checkpoints/ensemble_mod... | [
"# -*- coding: utf-8 -*-\n\nimport torch\nimport torch.nn as nn\n\n\nclass ScalarMix(nn.Module):\n\n def __init__(self, n_layers, dropout=0):\n super(ScalarMix, self).__init__()\n\n self.n_layers = n_layers\n self.dropout = dropout\n\n self.weights = nn.Parameter(torch.zeros(n_layers)... | [
[
"torch.tensor",
"torch.nn.Dropout",
"torch.zeros"
],
[
"numpy.concatenate",
"numpy.max",
"numpy.where"
],
[
"numpy.argsort",
"numpy.array",
"numpy.zeros",
"numpy.ones"
],
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.tight_layout",
"matplotlib.use... |
uesleisutil/model2roms | [
"813f889ca3dc0c5b71a7daf171b4a4bd72f85507"
] | [
"grd.py"
] | [
"from datetime import datetime\nfrom netCDF4 import Dataset\nimport numpy as np\n\nimport IOverticalGrid\n\ntry:\n import ESMF\nexcept ImportError:\n print(\"Could not find module ESMF\")\n pass\n\n\"\"\"\nTrond Kristiansen\nhttps://github.com/trondkr/model2roms\n\"\"\"\n\nclass Grd:\n\n def __init__(se... | [
[
"numpy.asarray",
"numpy.meshgrid",
"numpy.zeros"
]
] |
mghcdac/SAH_DCI_Prediction_EEG | [
"a8851bab67d6d3bd5ded39a9d5fb9c3ec1d99607"
] | [
"step1_process_each_file_bipolar.py"
] | [
"#!/usr/bin/env python\r\n# -*- coding: utf-8 -*-\r\n\"\"\"\r\nThis program is free software: you can redistribute it and/or modify\r\nit under the terms of the GNU General Public License as published by\r\nthe Free Software Foundation, either version 3 of the License, or\r\n(at your option) any later version.\r\nT... | [
[
"numpy.array",
"numpy.zeros",
"scipy.signal.resample_poly",
"scipy.io.savemat"
]
] |
drcut/QPyTorch | [
"63c293178e8ce9e6e5b218dee96536e9c4ad1e5c"
] | [
"test/test_device.py"
] | [
"import torch\nimport unittest\nimport qtorch\nfrom qtorch.quant import block_quantize, fixed_point_quantize, float_quantize\nfrom qtorch import FixedPoint, BlockFloatingPoint, FloatingPoint\n\nclass TestDevice(unittest.TestCase):\n \"\"\"\n invariant: cuda and cpp implementation should behave the same\n ... | [
[
"torch.linspace",
"torch.rand"
]
] |
karllark/beast_metal | [
"35b87f4f168e86f262612ee86537ab822382b656"
] | [
"setup_batch_beast_refit.py"
] | [
"#!/usr/bin/env python\n\n\"\"\"\nCode to setup the xsede slurm inputs for results that are incomplete\n incomplete means 1D pPDF results done with the old linear mass spacing\n or missing full 1D pPDF or lnp files\n\n.. history::\n Written 4jul15 by KDG.\n\n\"\"\"\n\nfrom __future__ import print_function\ni... | [
[
"numpy.where",
"numpy.sum"
]
] |
billreus/HuaWei_CodeCraft2019 | [
"68f6d464d7950e65385decf31d478bc945ec6c4f"
] | [
"B/CodeCraft-2019/src/map.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\nfrom reader import read_txt\nimport numpy as np\nimport pandas as pd\nfrom model import *\ndef Graph(Cross_count, Road_count, Road_isDuplex, Road_roadFrom, Road_roadTo, Road_length, Road_id):\n #对角矩阵,对角取0,设置每两个点间的距离,等于路径上的权值\n plan_roadLength = np.zero... | [
[
"numpy.eye",
"numpy.zeros"
]
] |
Madhav1812/selective-inference | [
"7b8f232fdf19b43489d4f434c493cdd80ab8fc96"
] | [
"selection/randomized/randomization.py"
] | [
"\"\"\"\nDifferent randomization options for selective sampler.\nMain method used in selective sampler is the gradient method which\nshould be a gradient of the negative of the log-density. For a\nGaussian density, this will be a convex function, not a concave function.\n\"\"\"\nfrom __future__ import division, pri... | [
[
"scipy.stats.laplace",
"numpy.product",
"numpy.sqrt",
"numpy.exp",
"numpy.random.logistic",
"numpy.linalg.svd",
"numpy.linalg.det",
"scipy.stats.laplace.pdf",
"scipy.stats.laplace.cdf",
"scipy.stats.logistic.pdf",
"numpy.zeros",
"numpy.log",
"numpy.linalg.inv",
... |
kai-xl8/fairseq | [
"fd080b308e1e3361d6c498b235496080fa6599e5",
"fd080b308e1e3361d6c498b235496080fa6599e5",
"fd080b308e1e3361d6c498b235496080fa6599e5"
] | [
"fairseq_cli/train.py",
"fairseq/benchmark/dummy_mt.py",
"fairseq/data/resampling_dataset.py"
] | [
"#!/usr/bin/env python3 -u\n# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\"\"\"\nTrain a new model on one or across multiple GPUs.\n\"\"\"\n\nimport argparse\nimport logging\nimpor... | [
[
"torch.autograd.profiler.record_function",
"torch.autograd.profiler.emit_nvtx",
"torch.cuda.profiler.profile",
"numpy.random.seed"
],
[
"numpy.arange",
"numpy.array",
"torch.full",
"torch.arange"
],
[
"numpy.array",
"numpy.random.RandomState",
"numpy.lexsort"
... |
jwpleow/aanet | [
"b83e7b11dfee117114ae7b35645b85e886d3d436"
] | [
"nets/deform_conv/test/testcuda.py"
] | [
"#!/usr/bin/env python\r\nfrom __future__ import absolute_import, division, print_function\r\n\r\nimport torch\r\nimport torch.nn as nn\r\nfrom torch.autograd import gradcheck\r\n\r\nfrom dcn_v2 import DCN, DCNPooling, DCNv2, DCNv2Pooling, dcn_v2_conv, dcn_v2_pooling\r\n\r\ndeformable_groups = 1\r\nN, inC, inH, inW... | [
[
"torch.sigmoid",
"torch.randint",
"torch.cat",
"torch.randn",
"torch.nn.Conv2d",
"torch.tensor",
"torch.rand",
"torch.autograd.gradcheck"
]
] |
flatironinstitute/athena_3dviz | [
"7c933264ca36f953043b92e522ca42eb36cfb9c7"
] | [
"test/test_utils.py"
] | [
"\nimport unittest\nfrom athena_3dviz import utils\nimport numpy as np\n\nclass TestUtils(unittest.TestCase):\n\n def test_switch_phi_r(self):\n v_in = np.arange(2*3*4*5).reshape((2,3,4,5))\n v_in[0,1,2,3] = 9\n v_out = utils.switch_phi_r(v_in)\n for ib in range(2):\n for i... | [
[
"numpy.arange"
]
] |
APJansen/TDUr | [
"4f0cc09141ac7b28dd16704ed63e901aaf9ebdec"
] | [
"td_ur/game.py"
] | [
"import numpy as np\nfrom matplotlib import pyplot as plt\nfrom matplotlib import colors\nfrom jax import jit, vmap\nimport jax.numpy as jnp\nfrom jax.ops import index, index_update\nfrom functools import partial\n\n\nclass Ur:\n \"\"\"Class representing the Royal game of Ur.\n\n The Ur board looks like this:... | [
[
"matplotlib.pyplot.gca",
"matplotlib.pyplot.imshow",
"numpy.arange",
"matplotlib.colors.ListedColormap",
"numpy.flip",
"matplotlib.pyplot.text",
"numpy.array",
"numpy.zeros",
"numpy.where",
"numpy.random.randint"
]
] |
PanosAntoniadis/pps-ntua | [
"cb428232ff0986519b364434daffcbf520dd8381"
] | [
"Lab1/ex1/plots/plot_cores.py"
] | [
"# A simple script that plots the time and the speedup\n# of the parallel OpenMP program as the number of available\n# cores increases.\n\nimport matplotlib.pyplot as plt\nimport sys\nimport numpy as np\nimport matplotlib\nmatplotlib.use('Agg')\n\nt_64 = []\nt_1024 = []\nt_4096 = []\n\ns_64 = []\ns_1024 = []\ns_409... | [
[
"matplotlib.pyplot.title",
"matplotlib.use",
"numpy.arange",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot"
]
] |
fetus-hina/IkaLog | [
"bd476da541fcc296f792d4db76a6b9174c4777ad",
"bd476da541fcc296f792d4db76a6b9174c4777ad",
"bd476da541fcc296f792d4db76a6b9174c4777ad",
"bd476da541fcc296f792d4db76a6b9174c4777ad"
] | [
"ikalog/inputs/osx/avfoundation_capture.py",
"ikalog/utils/ikamatcher2/decode_1bit.py",
"ikalog/utils/character_recoginizer/deadly_weapon.py",
"ikalog/scenes/game/special_gauge.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# IkaLog\n# ======\n# Copyright (C) 2015 Takeshi HASEGAWA\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:... | [
[
"numpy.ctypeslib.ndpointer",
"numpy.zeros"
],
[
"numpy.reshape",
"numpy.unpackbits"
],
[
"numpy.amin",
"numpy.amax",
"numpy.zeros",
"numpy.sum"
],
[
"numpy.zeros",
"numpy.sum"
]
] |
LiahNikol/line-segment-intersections | [
"0a2eb14b54619568d2b79839319c079b27a53d77"
] | [
"linesegmentintersections/helper.py"
] | [
"# Class contains auxiliary methods\nfrom numpy import array\nfrom numpy.linalg import det\nfrom .Intersection import Intersection\n\n\ndef isValidPos(oPos, sl):\n if oPos < 0 or oPos >= len(sl):\n return False\n return True\n\n# credit to Dr. Sheehy for provinding orientation class code\ndef orientation(*poin... | [
[
"numpy.linalg.det"
]
] |
jgonzal3/devml | [
"77902de0af041e1e272ed1356068fc101498b144"
] | [
"devml/stats.py"
] | [
"\"\"\"Generate statistics about repos\n\n#TO DO LIST:\n\nhttp://stackoverflow.com/questions/26489134/whats-the-inverse-of-the-quantile-function-on-a-pandas-series\n* Look into T-Score as ranking or Z-Score\n* Create large columnar structure something like:\n ** active days, inactivate days, commits total, inser... | [
[
"scipy.stats.percentileofscore",
"pandas.DataFrame",
"pandas.DataFrame.from_dict"
]
] |
topnotches/yolov3-tf2 | [
"6e7d00c72ba06715985f4944721f8463f37be034"
] | [
"tools/export_tfserving.py"
] | [
"import time\nfrom absl import app, flags, logging\nfrom absl.flags import FLAGS\nimport cv2\nimport numpy as np\nimport tensorflow as tf\nfrom yolov3_tf2.models import (\n YoloV3, YoloV3Tiny\n)\nfrom yolov3_tf2.dataset import transform_images\n\nfrom tensorflow.python.eager import def_function\nfrom tensorflow.... | [
[
"tensorflow.saved_model.save",
"tensorflow.expand_dims",
"tensorflow.saved_model.load"
]
] |
msharp1/docker-mozillatts | [
"e59fbf114d7999d8d1ce75eb9e86c0f56f755f89"
] | [
"tts_web/synthesize.py"
] | [
"#!/usr/bin/env python3\nimport io\nimport json\nimport logging\nimport os\nimport sys\nimport time\nimport typing\nimport unittest.mock\n\nimport torch\n\nfrom TTS.tts.utils.generic_utils import setup_model\nfrom TTS.tts.utils.synthesis import synthesis\nfrom TTS.tts.utils.text.symbols import make_symbols\nfrom TT... | [
[
"torch.device",
"torch.load",
"torch.nn.functional.interpolate",
"torch.tensor"
]
] |
uwds3/uwds3 | [
"3ec70111d63db0c8d97d9f1e0110b7fe9ad56179"
] | [
"src/pyuwds3/reasoning/detection/foreground_detector.py"
] | [
"import cv2\nimport math\nimport numpy as np\nimport rospy\nfrom pyuwds3.types.detection import Detection\nfrom sensor_msgs.msg import Image\nfrom cv_bridge import CvBridge\n\n\nclass DetectorState(object):\n INIT = 0\n WAITING = 1\n READY = 2\n RUNNING = 3\n\n state = {0: \"INIT\", 1: \"WAITING\", 2... | [
[
"numpy.maximum",
"numpy.minimum",
"numpy.full",
"numpy.argsort",
"numpy.array",
"numpy.zeros",
"numpy.where"
]
] |
queirozfcom/recommendation_systems | [
"e96b34f71fdc3a490b39d448d47e48485ce4f7fa"
] | [
"code/python/src/lib/array.py"
] | [
"import numpy as np\n\ndef subtract_nonzero_elements(arr,minuend):\n newarr = arr\n np.putmask(newarr,newarr != 0, minuend-newarr)\n return(newarr)\n\ndef replace_zero_elements(arr,replacement):\n newarr = np.copy(arr)\n newarr[newarr == 0] = replacement\n\n return(newarr)\n\ndef num_nonzero_eleme... | [
[
"numpy.copy",
"numpy.putmask"
]
] |
neduchal/ecs | [
"ea33416697ccc6ca19fdb22245896ecb5fc4e345"
] | [
"ecs/src/ecs/classification_classic_node.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nimport os\nimport cv2\nimport rospy\nimport rospkg\nimport numpy as np\nfrom joblib import load\nfrom sklearn import svm\nfrom std_msgs.msg import Empty, String\nfrom sensor_msgs.msg import CompressedImage\nfrom cv_bridge import CvBridge\nfrom ecs.srv import Descr... | [
[
"numpy.frombuffer"
]
] |
lfabris-mhpc/emukit | [
"ccb07f6bed0e9ae41dbeefdb3ad2ab247d3991e2"
] | [
"emukit/test_functions/multi_fidelity/currin.py"
] | [
"from typing import Tuple\n\nimport numpy as np\n\nfrom ...core import ContinuousParameter, InformationSourceParameter, ParameterSpace\nfrom ...core.loop.user_function import MultiSourceFunctionWrapper\n\n\ndef multi_fidelity_currin_function() -> Tuple[MultiSourceFunctionWrapper, ParameterSpace]:\n r\"\"\"\n\n ... | [
[
"numpy.exp",
"numpy.maximum",
"numpy.stack"
]
] |
goujou/CompartmentalSystems | [
"4724555c33f11395ddc32738e8dfed7349ee155f",
"4724555c33f11395ddc32738e8dfed7349ee155f"
] | [
"prototypes/newOdeInterface/SolverComparison.py",
"src/CompartmentalSystems/bins/TsTpField.py"
] | [
"\n# coding: utf-8\n\n# # The directional field\n\n# In[1]:\n\n\nget_ipython().run_line_magic('matplotlib', 'notebook')\nimport matplotlib\nimport matplotlib.pylab as plt\nimport numpy as np\n\n\n\ndef directional_field(ts,xs,func):\n v_ts=np.zeros((len(xs),len(ts)))\n v_xs=np.zeros((len(xs),len(ts)))\n fo... | [
[
"numpy.sqrt",
"numpy.meshgrid",
"numpy.arange",
"scipy.integrate.solve_ivp",
"scipy.integrate.odeint",
"matplotlib.pylab.figure",
"numpy.zeros_like",
"matplotlib.pylab.plot",
"numpy.exp",
"matplotlib.pylab.quiver",
"numpy.array",
"numpy.float"
],
[
"numpy.ar... |
H0merJayS1mpson/deepobscustom | [
"e85816ce42466326dac18841c58b79f87a4a1a7c",
"e85816ce42466326dac18841c58b79f87a4a1a7c"
] | [
"deepobs/pytorch/testproblems/testproblem.py",
"deepobs/tensorflow/testproblems/_quadratic.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"Base class for DeepOBS test problems.\"\"\"\nimport torch\nimport abc\nfrom .testproblems_utils import flatten\nfrom .. import config\n\n\nclass TestProblem(abc.ABC):\n \"\"\"Base class for DeepOBS test problems.\n\n Args:\n batch_size (int): Batch size to use.\n weight_dec... | [
[
"torch.device",
"torch.no_grad",
"torch.max"
],
[
"tensorflow.convert_to_tensor",
"tensorflow.losses.get_regularization_loss",
"numpy.eye",
"tensorflow.subtract",
"tensorflow.constant_initializer"
]
] |
sj1104/Het | [
"81b7e9f0f593108db969fc46a1af3df74b825230",
"81b7e9f0f593108db969fc46a1af3df74b825230",
"81b7e9f0f593108db969fc46a1af3df74b825230",
"81b7e9f0f593108db969fc46a1af3df74b825230",
"81b7e9f0f593108db969fc46a1af3df74b825230"
] | [
"geometric/autodist/run_autodist.py",
"python/athena/gpu_ops/LayerNorm.py",
"python/athena/initializers.py",
"het_examples/utils/prepare_amazon_data.py",
"python/athena/onnx/onnx_opset/Pad.py"
] | [
"from GNN.graph import *\nfrom GNN import distributed\nfrom GNN.distributed.sampler import DistributedGraphSageSampler\n\nfrom athena import gpu_ops as ad\nfrom athena.launcher import launch\n\nimport numpy as np\nimport time, os, sys\nimport argparse\nimport yaml\nfrom tqdm import tqdm\n\nimport tensorflow as tf\n... | [
[
"tensorflow.device",
"tensorflow.nn.softmax_cross_entropy_with_logits",
"tensorflow.compat.v1.sparse.placeholder",
"numpy.mean",
"tensorflow.Graph",
"tensorflow.Variable",
"numpy.argmax",
"tensorflow.sparse.matmul",
"numpy.repeat",
"tensorflow.random_normal_initializer",
... |
dezounet/datadez | [
"fa14fc8bc7e1a50cc9cdaa90d11da0e57bf80b73"
] | [
"datadez/vectorize.py"
] | [
"from __future__ import unicode_literals, print_function\n\nimport operator\n\nimport numpy as np\nimport pandas as pd\n\nfrom sklearn.feature_extraction.text import CountVectorizer\nfrom sklearn.preprocessing import LabelBinarizer\nfrom sklearn.preprocessing import MultiLabelBinarizer\n\n\ndef _vectorize(vectorize... | [
[
"pandas.Series",
"numpy.squeeze",
"sklearn.preprocessing.MultiLabelBinarizer",
"pandas.DataFrame",
"sklearn.feature_extraction.text.CountVectorizer",
"sklearn.preprocessing.LabelBinarizer",
"numpy.array"
]
] |
codesutras/pandas-ta | [
"78598df9cfd2f165553262e85ae4c0392598d48c",
"78598df9cfd2f165553262e85ae4c0392598d48c"
] | [
"pandas_ta/utils/_time.py",
"tests/test_indicator_candle.py"
] | [
"# -*- coding: utf-8 -*-\nfrom datetime import datetime\nfrom time import localtime, perf_counter\nfrom typing import Tuple\n\nfrom pandas import DataFrame, Timestamp\n\nfrom pandas_ta import EXCHANGE_TZ, RATE\nfrom pandas_ta.utils import verify_series\n\n\ndef df_dates(df: DataFrame, dates: Tuple[str, list] = None... | [
[
"pandas.Timestamp.now"
],
[
"pandas.testing.assert_series_equal"
]
] |
gabrielelanaro/scrapegoat | [
"6dd95d12c241943ca26bcfb261168a2dd84c9a48"
] | [
"scratchpad/pulearning.py"
] | [
"# Basically we have found the following facts:\n# Making edge prediction only doesn't work, there are just too many possibilities, therefore we need to\n# first do node classification, and then we need to tdo edge classification.\n#\n# And how do we do node classification?\n# Two approaches: one of them would invo... | [
[
"sklearn.ensemble.RandomForestClassifier"
]
] |
sciapp/pyMolDyn | [
"fba6ea91cb185f916b930cd25b4b1d28a22fb4c5"
] | [
"src/core/calculation/gyrationtensor.py"
] | [
"# coding: utf-8\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport math\nimport numpy as np\nimport numpy.linalg as la\n\n\ndef calculate_gyration_tensor_parameters(points):\n \"\"\"\n Calculates... | [
[
"numpy.dot",
"numpy.linspace",
"numpy.linalg.norm",
"numpy.mean",
"numpy.linalg.eigvalsh",
"numpy.array",
"numpy.zeros"
]
] |
rdues/traccovid | [
"41e63b21e20071bdae9ca06a52ee54acb2001ae3"
] | [
"tracdash/app/elasticsearch.py"
] | [
"\"\"\"\nConnects to the ElasticSearch database.\nGenerates aggregations to be returned to the dashboard.\n\"\"\"\n\nfrom scipy.stats.distributions import chi2\n\nimport os, math, re, itertools, json\nfrom copy import deepcopy\nfrom elasticsearch import Elasticsearch\nfrom pandas import json_normalize\nfrom pprint ... | [
[
"pandas.json_normalize",
"pandas.melt",
"pandas.date_range"
]
] |
marwash25/subpruning | [
"5361dfd186f061aa155a03d263537cc356529c96",
"5361dfd186f061aa155a03d263537cc356529c96"
] | [
"SubmodularStreamingMaximization/tests/main.py",
"SubmodularStreamingMaximization/experiments/creditfraud/run.py"
] | [
"#!/usr/bin/env python3\n\nimport numpy as np\nfrom numpy.linalg import slogdet\n\nfrom PySSM import SubmodularFunctionlist\nfrom PySSM import IVM, FastIVM\nfrom PySSM import RBFKernel\n\nfrom PySSM import Greedylist\nfrom PySSM import Randomlist\nfrom PySSM import SieveStreaminglist\nfrom PySSM import SieveStreami... | [
[
"numpy.linalg.slogdet",
"numpy.array",
"numpy.zeros",
"numpy.sum"
],
[
"numpy.array",
"numpy.sqrt",
"sklearn.preprocessing.MinMaxScaler"
]
] |
StanfordVLSI/dragonphy2 | [
"996cc14f800b01c5ec0534e79dd2340f4de5e704",
"996cc14f800b01c5ec0534e79dd2340f4de5e704"
] | [
"experiments/channel_characteristics/energy_concentration.py",
"tests/cpu_block_tests/reorder/test_reorder.py"
] | [
"from pathlib import Path\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom dragonphy import *\n\n\nTHIS_DIR = Path(__file__).resolve().parent\nsparam_file_list = [\"Case4_FM_13SI_20_T_D13_L6.s4p\",\n\"peters_01_0605_B1_thru.s4p\", \n \"peters_01_0605_B12_thru.s4p\", \n ... | [
[
"matplotlib.pyplot.legend",
"numpy.dot",
"matplotlib.pyplot.stem",
"matplotlib.pyplot.title",
"numpy.multiply",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlim",
"numpy.argmax",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"numpy.zeros"
],
[
"numpy.ar... |
CyberZHG/keras-gcn | [
"5186f856b6d392a3b82d0c062a21bc0420b89ec0"
] | [
"tests/test_graph_pool.py"
] | [
"import unittest\nimport os\nimport tempfile\n\nimport numpy as np\n\nfrom keras_gcn.backend import keras\nfrom keras_gcn.backend import backend as K\nfrom keras_gcn import GraphMaxPool, GraphAveragePool\nfrom keras_gcn.layers import GraphPool\n\n\nclass TestGraphPool(unittest.TestCase):\n\n input_data = np.arra... | [
[
"numpy.asarray",
"numpy.array",
"numpy.random.random",
"numpy.allclose"
]
] |
salonirk11/tensorflow | [
"7fda1bb1177c69fa7bf80d20d5c5e7aaa25816e7",
"7fda1bb1177c69fa7bf80d20d5c5e7aaa25816e7",
"7fda1bb1177c69fa7bf80d20d5c5e7aaa25816e7",
"7fda1bb1177c69fa7bf80d20d5c5e7aaa25816e7",
"7fda1bb1177c69fa7bf80d20d5c5e7aaa25816e7"
] | [
"tensorflow/contrib/slim/python/slim/learning.py",
"tensorflow/tensorboard/backend/event_processing/event_accumulator.py",
"tensorflow/python/framework/importer.py",
"tensorflow/python/training/momentum.py",
"tensorflow/tensorboard/backend/event_processing/event_file_inspector_test.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... | [
[
"tensorflow.core.protobuf.config_pb2.RunMetadata",
"tensorflow.python.ops.math_ops.greater_equal",
"tensorflow.core.protobuf.config_pb2.RunOptions",
"tensorflow.python.summary.summary.histogram",
"tensorflow.python.training.training_util.global_step",
"tensorflow.python.client.timeline.Tim... |
scotthavens/smrf | [
"a492d01a5eef994e00728c1cbed9f693879bbade",
"a492d01a5eef994e00728c1cbed9f693879bbade"
] | [
"smrf/utils/wind/model.py",
"smrf/envphys/phys.py"
] | [
"from __future__ import print_function\n\nimport os\n# import matplotlib.pyplot as plt\n# import progressbar\nfrom datetime import datetime\n\nimport netCDF4 as nc\nimport numpy as np\n\nfrom . import wind_c\n\n\nclass wind_model():\n \"\"\"\n\n Estimating wind speed and direction is complex terrain can be di... | [
[
"numpy.abs",
"numpy.arctan",
"numpy.power",
"numpy.arange",
"numpy.cos",
"numpy.sin",
"numpy.diff",
"numpy.mean",
"numpy.floor",
"numpy.array",
"numpy.unravel_index",
"numpy.where",
"numpy.zeros"
],
[
"numpy.array"
]
] |
saeedashrraf/ivy | [
"ad57c359a11459d68965d9044a76ea30e175bf16"
] | [
"ivy/functional/backends/tensorflow/creation.py"
] | [
"# global\nimport tensorflow as tf\nfrom tensorflow import Tensor\nfrom typing import Union, Tuple, List, Optional\nfrom tensorflow.python.framework.dtypes import DType\n\n# local\nimport ivy\nfrom ivy.functional.backends.tensorflow import Dtype\nfrom ivy import (\n dev_from_str,\n default_device,\n dtype_... | [
[
"tensorflow.convert_to_tensor",
"tensorflow.device",
"tensorflow.zeros",
"tensorflow.cast",
"tensorflow.DType",
"tensorflow.linspace",
"tensorflow.experimental.numpy.empty_like",
"tensorflow.experimental.numpy.full_like",
"tensorflow.experimental.numpy.triu",
"tensorflow.id... |
mengfanShi/Pose-Estimate | [
"82de2ec53b2de83ccc47fbbadc97bed8924f6d60"
] | [
"Eval/eval.py"
] | [
"# -*- coding:utf-8 -*-\r\n# @TIME :2019/3/11 16:02\r\n# @Author :Fan\r\n# @File :eval.py\r\n\r\nimport torch\r\nimport os\r\nimport sys\r\nsys.path.insert(0, '..')\r\nimport argparse\r\nfrom Eval.COCO_eval import run_eval\r\nfrom Train.Network.Hourglass import Get_Hourglass\r\nfrom Train.Network.rtpose_v... | [
[
"torch.no_grad",
"torch.load"
]
] |
fsoubelet/PyHEADTAIL | [
"51cae8845cceb61cc3f140db4ab0eeb68469110f",
"51cae8845cceb61cc3f140db4ab0eeb68469110f",
"51cae8845cceb61cc3f140db4ab0eeb68469110f"
] | [
"tests/simulation_tests/test_bb_resonator.py",
"examples/impedances/002_wake_table.py",
"tests/test_particles.py"
] | [
"import numpy as np\nfrom scipy.constants import c as c_light, e as qe, m_p\nfrom scipy.signal import hilbert\nfrom scipy.stats import linregress\n\nfrom PyHEADTAIL.impedances import wakes\nfrom PyHEADTAIL.machines.synchrotron import Synchrotron\nfrom PyHEADTAIL.particles.slicing import UniformBinSlicer\n\n\ndef te... | [
[
"numpy.log",
"numpy.arange",
"numpy.isclose",
"numpy.zeros",
"scipy.signal.hilbert"
],
[
"matplotlib.pyplot.legend",
"numpy.log",
"numpy.sqrt",
"matplotlib.pyplot.title",
"numpy.arange",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.ylabel",
"scipy.signal.hil... |
toddytharmonkey/EXOSIMS | [
"526345356e537fd201676b7cc998380fb22229bb"
] | [
"tests/OpticalSystem/test_Nemati_2019.py"
] | [
"import unittest \nfrom EXOSIMS.OpticalSystem.Nemati_2019 import Nemati_2019\nimport numpy as np\n\nclass TestNemati2019(unittest.TestCase): \n\n \"\"\"\n Sonny Rappaport, August 2021, Cornell\n\n This class tests particular methods Nemanti_2019.\n \n \"\"\"\n\n def test_get_csv_values(self):\n\n ... | [
[
"numpy.testing.assert_array_equal"
]
] |
Darrenonly/ocr_pre_process | [
"e5aa96a8eb516ab1bcea1f2c99009c8329b2aee7"
] | [
"model/STNNET.py"
] | [
"#!/usr/bin/env python\r\n# -*- coding: utf-8 -*-\r\n# @Time : 2021/4/26 14:29\r\n# @Author : Darren\r\n# @Site : \r\n# @File : STNNET.py\r\n# @Software: PyCharm\r\nimport torch.nn as nn\r\nimport torch\r\nimport torch.nn.functional as F\r\n\r\n\r\nclass STN_Net(nn.Module):\r\n def __init__(self, use_s... | [
[
"torch.nn.Dropout2d",
"torch.nn.functional.log_softmax",
"torch.nn.functional.dropout",
"torch.nn.Conv2d",
"torch.tensor",
"torch.nn.Linear",
"torch.nn.MaxPool2d",
"torch.nn.functional.grid_sample",
"torch.nn.ReLU"
]
] |
Darkhunter9/pix2pix_for_image_segmentation | [
"927a8bf4e38d805eb3530a94393eb327c05799b9"
] | [
"trash/train_GAN_with_src_image.py"
] | [
"import numpy as np\nfrom tqdm import tqdm\nimport os, sys\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport segmentation_models_pytorch as smp\n\nfrom dataset import get_dataloaders\nfrom utils import AverageMeter, ConfusionMeter, Metric, Recorder, get_bool\nfrom config import get_con... | [
[
"torch.optim.lr_scheduler.CosineAnnealingWarmRestarts",
"torch.nn.CrossEntropyLoss",
"torch.ones",
"numpy.random.seed",
"torch.cat",
"torch.zeros",
"torch.manual_seed",
"torch.nn.Conv2d",
"torch.nn.Sigmoid",
"torch.nn.BCELoss",
"torch.swapaxes",
"torch.no_grad",
... |
vincenttlzs/DualArmsRobot | [
"f8701c8d85bad63a9eca87e6f8734a6e10784a97"
] | [
"gazebo_simulation/shuang_moveit_config/scripts/s_a_tracker.py"
] | [
"#!/usr/bin/env python\n\n\"\"\"\n \n \n Move the arm to point to a target on the /target_pose topic\n \n Created for the Pi Robot Project: http://www.pirobot.org\n Copyright (c) 2014 Patrick Goebel. All rights reserved.\n\n This program is free software; you can redistribute it and/or modify\n ... | [
[
"scipy.spatial.distance.euclidean"
]
] |
CofeCup/xyolo | [
"827ab6f592325cecbe1ee24c0a8e80cb33e899d1",
"827ab6f592325cecbe1ee24c0a8e80cb33e899d1"
] | [
"xyolo/convert.py",
"xyolo/yolo3/utils.py"
] | [
"#! /usr/bin/env python\n\"\"\"\nReads Darknet config and weights and creates Keras model with TF backend.\n\n\"\"\"\n\nimport argparse\nimport configparser\nimport io\nimport os\nfrom collections import defaultdict\n\nimport numpy as np\nimport tensorflow.keras.backend as K\nfrom loguru import logger\nfrom tensorf... | [
[
"tensorflow.keras.layers.Concatenate",
"numpy.product",
"tensorflow.keras.layers.LeakyReLU",
"tensorflow.keras.models.Model",
"tensorflow.keras.backend.int_shape",
"tensorflow.keras.regularizers.l2",
"tensorflow.keras.layers.UpSampling2D",
"tensorflow.keras.layers.BatchNormalizatio... |
JohanComparat/pyEmerge | [
"9b5bfa01959d48ea41221609b8f375f27e3e39ff",
"9b5bfa01959d48ea41221609b8f375f27e3e39ff",
"9b5bfa01959d48ea41221609b8f375f27e3e39ff"
] | [
"bin/remap_lc.py",
"bin/plot_ricci2017.py",
"bin/lc_lognlogs_agns.py"
] | [
"\"\"\"\nScript to remap coordinates into a 3 and 6 Gpc cuboid\n\nhere is how to get the transofrmation coefficients :\nimport numpy as n\nfrom astropy.cosmology import FlatLambdaCDM\nimport astropy.units as u\ncosmoMD = FlatLambdaCDM(H0=67.77*u.km/u.s/u.Mpc, Om0=0.307115)#, Ob0=0.048206)\n\ndata = n.loadtxt(\"/dat... | [
[
"numpy.transpose"
],
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.axhline",
"matplotlib.use",
"numpy.arange",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.clf",
"matplotlib.pyplot.xlabel",
"matplotlib.pypl... |
zzbjpc/deepnlp | [
"9a5717e1c7dca3247af1c9e5ca221f374cf95220"
] | [
"deepnlp/ner/ner_model.py"
] | [
"#!/usr/bin/python\n# -*- coding:utf-8 -*-\n\"\"\"\nNER tagger for building a LSTM based NER tagging model.\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals # compatible with python3 unicode coding\n\ni... | [
[
"tensorflow.device",
"tensorflow.concat",
"tensorflow.reduce_sum",
"tensorflow.global_variables",
"numpy.exp",
"tensorflow.Graph",
"tensorflow.Variable",
"tensorflow.random_uniform_initializer",
"tensorflow.gradients",
"tensorflow.contrib.rnn.MultiRNNCell",
"tensorflow.... |
krasserm/edward2 | [
"311d3ad6946b543e70af1495eab9a0a9b4f69854"
] | [
"experimental/marginalization_mixup/augment.py"
] | [
"# coding=utf-8\n# Copyright 2020 The Edward2 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 ... | [
[
"tensorflow.convert_to_tensor",
"tensorflow.cond",
"tensorflow.concat",
"tensorflow.zeros",
"tensorflow.stack",
"tensorflow.reduce_sum",
"tensorflow.cast",
"tensorflow.equal",
"tensorflow.where",
"tensorflow.rank",
"tensorflow.cumsum",
"tensorflow.bitwise.right_shif... |
lumicks/pylake | [
"b5875d156d6416793a371198f3f2590fca2be4cd",
"b5875d156d6416793a371198f3f2590fca2be4cd",
"b5875d156d6416793a371198f3f2590fca2be4cd"
] | [
"lumicks/pylake/tests/data/mock_widefield.py",
"lumicks/pylake/force_calibration/tests/test_active_calibration.py",
"lumicks/pylake/kymotracker/tests/test_io.py"
] | [
"import numpy as np\nimport json\nimport tifffile\n\n\nclass MockTag():\n def __init__(self, value):\n self._value = value\n\n @property\n def value(self):\n return self._value\n\n\nclass MockTiffPage:\n def __init__(self, data, start_time, end_time, description=\"\", bit_depth=8):\n ... | [
[
"numpy.array",
"numpy.dot",
"numpy.radians",
"numpy.linalg.inv",
"numpy.arange",
"numpy.eye",
"numpy.cos",
"numpy.stack",
"numpy.ones",
"numpy.sin",
"numpy.repeat",
"numpy.exp",
"numpy.zeros"
],
[
"numpy.fft.rfftfreq",
"numpy.round",
"numpy.rando... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.