repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
kbaseapps/kb_SPAdes | [
"c3399313e9dfb2345f9057df0dabd6837a76a03f"
] | [
"lib/kb_SPAdes/kb_SPAdesImpl.py"
] | [
"# -*- coding: utf-8 -*-\n#BEGIN_HEADER\n# The header block is where all import statements should live\nfrom __future__ import print_function\nimport os\nimport re\nimport uuid\nimport requests\nimport json\nimport psutil\nimport subprocess\nimport numpy as np\nimport yaml\nimport time\nfrom pprint import pformat\n... | [
[
"numpy.histogram"
]
] |
zhengqun/SungemSDK-Python | [
"fcd9789721d96b7197543523b65a25a7351944f5"
] | [
"hsapi/core/graph.py"
] | [
"#! /usr/bin/env python3\n\n# Copyright(c) 2018 Senscape Corporation.\n# License: Apache 2.0\n\nfrom .base import *\nimport numpy\nimport cv2\nfrom ctypes import *\nfrom enum import Enum, unique\n\n\n@unique\nclass GraphOption(Enum):\n \"\"\"\n Graph选项\n \"\"\" \n ITERATIONS = 0\n NETWORK_THROTTLE =... | [
[
"numpy.frombuffer"
]
] |
Destify/naive-bayes-spam | [
"39029cbf6f17d0d019dc7351c39a76a40f06f697"
] | [
"venv/Lib/site-packages/sklearn/cluster/_spectral.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"Algorithms for spectral clustering\"\"\"\n\n# Author: Gael Varoquaux gael.varoquaux@normalesup.org\n# Brian Cheung\n# Wei LI <kuantkid@gmail.com>\n# License: BSD 3 clause\nimport warnings\n\nimport numpy as np\n\nfrom ..base import BaseEstimator, ClusterMixin\nfrom ..... | [
[
"scipy.linalg.LinAlgError",
"numpy.dot",
"numpy.linalg.norm",
"numpy.zeros",
"numpy.finfo",
"numpy.sign",
"numpy.arange",
"numpy.sqrt",
"numpy.linalg.svd"
]
] |
sathyanarayanrao/gimli | [
"96eda5a99ba642a75801bd359b6ae746c2955d0b"
] | [
"python/pygimli/physics/SIP/importexport.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"Import/Export for SIP data.\"\"\"\n\nimport codecs\n\nimport numpy as np\nimport re\n\n\ndef fstring(fri):\n \"\"\"Format frequency to human-readable (mHz or kHz).\"\"\"\n if fri > 1e3:\n fstr = '{:d} kHz'.format(int(np.round(fri/1e3)))\n elif f... | [
[
"numpy.round",
"numpy.array",
"numpy.asarray",
"numpy.isfinite"
]
] |
alpa-projects/alpa | [
"2c54de2a8fa8a48c77069f4bad802f4e8fa6d126"
] | [
"tests/test_auto_sharding_conv.py"
] | [
"\"\"\"Test auto sharding with convolution nets.\"\"\"\n\nimport unittest\nfrom typing import Any\n\nfrom flax import linen as nn, optim\nfrom flax.training import train_state\nimport jax\nimport jax.numpy as jnp\nimport numpy as np\nimport optax\n\nfrom alpa import parallelize, ShardParallel, LocalPhysicalDeviceMe... | [
[
"numpy.prod"
]
] |
advatar/pandas | [
"6b3618de9c5deae3bcb4c7d5dfbd35e1f9eeaf15",
"14b84b45d6c891fd8954ba9bb0c493cd9ec2a662"
] | [
"pandas/tests/indexing/multiindex/test_partial.py",
"pandas/tests/io/test_stata.py"
] | [
"import numpy as np\nimport pytest\n\nfrom pandas.compat import is_numpy_dev\n\nfrom pandas import (\n DataFrame,\n Float64Index,\n Int64Index,\n MultiIndex,\n date_range,\n to_datetime,\n)\nimport pandas._testing as tm\n\n\nclass TestMultiIndexPartial:\n def test_getitem_partial_int(self):\n ... | [
[
"pandas.to_datetime",
"numpy.random.rand",
"pandas._testing.assert_produces_warning",
"pandas.date_range",
"numpy.random.randn",
"pandas._testing.assert_frame_equal",
"pandas.MultiIndex",
"pandas.MultiIndex.from_product",
"pandas._testing.assert_series_equal"
],
[
"pand... |
beckermr/pizza-cutter-sims | [
"f1e95900ef6ae702d6f5d28877d282166dc14bb2"
] | [
"pizza_cutter_sims/tests/test_stars.py"
] | [
"import copy\nimport numpy as np\n\nimport pytest\n\nimport galsim\nfrom pizza_cutter.des_pizza_cutter import (\n BMASK_SPLINE_INTERP, BMASK_GAIA_STAR\n)\n\nfrom ..stars import (\n gen_gaia_mag_rad,\n mask_stars,\n)\nfrom ..mdet import make_mbobs_from_coadd_data\n\n\ndef test_gen_gaia_mag_rad():\n num =... | [
[
"numpy.array",
"numpy.array_equal",
"numpy.zeros",
"numpy.random.RandomState",
"numpy.ones",
"numpy.all"
]
] |
n-yU/shisho | [
"dc99a2d90dde3599af62a6a59a4aabf6b5a72011"
] | [
"backend/sbrs.py"
] | [
"from logging import getLogger, StreamHandler, DEBUG, Formatter\nimport sys\nfrom pathlib import Path\nfrom typing import Union\nimport numpy as np\nimport pandas as pd\nfrom sklearn.neighbors import NearestNeighbors\nfrom backend.doc2vecwrapper import Doc2VecWrapper\nfrom backend.db import get_history_df, History\... | [
[
"numpy.array",
"numpy.dot",
"numpy.linalg.norm",
"numpy.zeros",
"numpy.unique"
]
] |
louie-tsai/analytics-zoo | [
"29f58444e05afd102862b29357336c69e88caa89"
] | [
"pyzoo/zoo/tfpark/tfnet.py"
] | [
"#\n# Copyright 2018 Analytics Zoo 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 applicable ... | [
[
"numpy.concatenate",
"tensorflow.saved_model.simple_save",
"numpy.zeros",
"tensorflow.tables_initializer",
"tensorflow.identity"
]
] |
KnorpelSenf/bladestitching | [
"e628bcdf169857462e43c19bba48f87804800293"
] | [
"stitch/lineutils.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf8 -*-\n\nimport numpy as np\n\n# define selector functions for rho and theta\n# as well as the coordinates of the foot point\n\n\ndef r(line):\n \"\"\"\n Selects rho from a given line.\n \"\"\"\n r, _ = line\n return r\n\n\ndef t(line):\n \"\"\"\n Selec... | [
[
"numpy.sin",
"numpy.tan",
"numpy.arctan2",
"numpy.sqrt",
"numpy.cos"
]
] |
BossunWang/frvtTestbed | [
"d6ad9962f812b35854b7cf5260b6975fba9723aa"
] | [
"backbone/model_resnet.py"
] | [
"import torch.nn as nn\nfrom torch.nn import Linear, Conv2d, BatchNorm1d, BatchNorm2d, ReLU, Dropout, MaxPool2d, Sequential, Module\n\n\n# Support: ['ResNet_50', 'ResNet_101', 'ResNet_152']\n\n\ndef conv3x3(in_planes, out_planes, stride=1):\n \"\"\"3x3 convolution with padding\"\"\"\n\n return Conv2d(in_plane... | [
[
"torch.nn.Linear",
"torch.nn.Dropout",
"torch.nn.MaxPool2d",
"torch.nn.Sequential",
"torch.nn.init.constant_",
"torch.nn.BatchNorm2d",
"torch.nn.init.kaiming_normal_",
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.nn.BatchNorm1d"
]
] |
gundersena/audio-enhancer | [
"4c62f9201073c6051cca1856eeeb3557cc3ad8ad"
] | [
"main/util.py"
] | [
"from keras.callbacks import Callback\nimport keras.backend as K\nimport numpy as np\n\n\nclass SGDRScheduler(Callback):\n \"\"\"custom callback for implementing a SGDR learning rate\"\"\"\n def __init__(self, min_lr, max_lr, steps_per_epoch, lr_decay=0.9, cycle_length=10,\n mult_factor=1.5... | [
[
"matplotlib.pyplot.xlim",
"numpy.set_printoptions",
"numpy.cos",
"numpy.concatenate",
"numpy.angle",
"matplotlib.pyplot.savefig",
"numpy.arange",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.yscale",
"matplotlib.pyplot.subplot",
"numpy.array",
"matplotlib.py... |
jordanmaulana/YourOwnFaceRecognition | [
"979d31c7f2217cadaaed79ae8397b003398fd8cf"
] | [
"deploy2.py"
] | [
"'''Testing the data''' \r\nimport tflearn \r\nimport argparse\r\nimport imutils\r\nimport time\r\nimport cv2\r\nimport os\r\nfrom tflearn.layers.conv import conv_2d, max_pool_2d \r\nfrom tflearn.layers.core import input_data, dropout, fully_connected \r\nfrom tflearn.layers.estimator import regression \r\nimport... | [
[
"numpy.array",
"numpy.load",
"numpy.argmax",
"numpy.zeros"
]
] |
sourabhvarshney111/med_report_data | [
"750f6f19029718fe40fc3fe79256d2da33861584"
] | [
"med_easy/account/views.py"
] | [
"from django.http import HttpResponse\nfrom django.shortcuts import render, redirect\nfrom django.contrib.auth import login, authenticate\nfrom django.contrib.sites.shortcuts import get_current_site\nfrom django.template.loader import render_to_string\nfrom .models import *\nfrom django.http import JsonResponse\nfr... | [
[
"sklearn.naive_bayes.MultinomialNB",
"pandas.read_csv"
]
] |
ak110/pytoolk | [
"8eef7e0add7bbc0ced1f1f1d82ed245388cc6684",
"8eef7e0add7bbc0ced1f1f1d82ed245388cc6684"
] | [
"pytoolkit/evaluations/ss_test.py",
"pytoolkit/applications/efficientnet.py"
] | [
"import numpy as np\n\nimport pytoolkit as tk\n\n\ndef test_print_ss_binary():\n y_true = np.zeros((2, 32, 32))\n y_true[1, :, :] = 1\n y_pred = np.zeros((2, 32, 32))\n y_pred[:, :16, :16] = 1 # iou=0.25\n tk.evaluations.print_ss(y_true, y_pred)\n\n\ndef test_print_ss_multi():\n y_true = np.zeros... | [
[
"numpy.zeros"
],
[
"tensorflow.keras.applications.imagenet_utils.preprocess_input"
]
] |
farrokhkarimi/deepmedic_project | [
"b0c916171673ce3259d2458146f2db941f0bf270"
] | [
"deepmedic/deepmedic/dataManagement/io.py"
] | [
"# Copyright (c) 2016, Konstantinos Kamnitsas\r\n# All rights reserved.\r\n#\r\n# This program is free software; you can redistribute it and/or modify\r\n# it under the terms of the BSD license. See the accompanying LICENSE file\r\n# or read the terms at https://opensource.org/licenses/BSD-3-Clause.\r\n\r\nfrom __f... | [
[
"numpy.dtype",
"numpy.expand_dims"
]
] |
lilyling27/wobble | [
"56cabbfc5574509bcaff484509177b4f3f6d10cc",
"56cabbfc5574509bcaff484509177b4f3f6d10cc"
] | [
"wobble/history.py",
"wobble/model.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib import animation\n\nfrom .utils import get_session\n\nclass History(object):\n \"\"\"\n Information about optimization history of a single order stored in numpy arrays/lists.\n \"\"\" \n def __init__(self, model, niter):\n se... | [
[
"numpy.max",
"numpy.empty",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.title",
"matplotlib.pyplot.close",
"numpy.exp",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.subplots",
"numpy.linspace",
"numpy.shape",
"numpy.min",
"matplotlib.pyplot.ylabel",
"numpy.... |
TSLNIHAOGIT/VRP_DRL_MHA | [
"55f8a9a5bb226c335e94986f34cb3f06b62f89a7"
] | [
"makegif.py"
] | [
"# https://own-search-and-study.xyz/2017/05/18/python%E3%81%AEmatplotlib%E3%81%A7gif%E3%82%A2%E3%83%8B%E3%83%A1%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B/\nfrom glob import glob\nimport os\nfrom PIL import Image\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.animation as animation\n \nif... | [
[
"matplotlib.animation.ArtistAnimation",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.figure"
]
] |
TianyuDai/hic-grid-extrapolation | [
"9fb6dda5f59a9c150d59b2cb051aaaa9f0eafa7b"
] | [
"src/emulator.py"
] | [
"\"\"\" Gaussian process emulator \"\"\"\n\nimport logging\nimport pickle\n\nimport numpy as np\nfrom sklearn.decomposition import PCA\nfrom sklearn.externals import joblib\nfrom sklearn.gaussian_process import GaussianProcessRegressor as GPR\nfrom sklearn.gaussian_process import kernels\nfrom sklearn.pipeline impo... | [
[
"numpy.concatenate",
"sklearn.gaussian_process.kernels.WhiteKernel",
"sklearn.pipeline.make_pipeline",
"sklearn.preprocessing.StandardScaler",
"sklearn.externals.joblib.dump",
"sklearn.externals.joblib.load",
"numpy.einsum",
"numpy.arange",
"numpy.sqrt",
"sklearn.gaussian_p... |
soma0sd/autowinpy | [
"74673d424e40c26b6e1c7a4e920623c623a7cfb6"
] | [
"autowinpy/win32/_handle.py"
] | [
"\"\"\"\n\n\"\"\"\nfrom ctypes import windll\nfrom time import sleep\nfrom typing import List, Tuple\n\nimport numpy\nfrom PIL import Image as pil_Image\nfrom pythonwin import win32ui\nfrom win32 import win32api, win32gui\n\nimport cv2\n\nfrom ..type import Image, Rect\n\n\ndef handle_list() -> List[int]:\n \"\"... | [
[
"numpy.array",
"numpy.linspace"
]
] |
reinforcementdriving/nutonomy_pointpillars | [
"03f46f6de97c0c97d7bc98d7af3daee215d81a30"
] | [
"second/pytorch/tensorrt_onnx_infer.py"
] | [
"# -*- coding: utf-8 -*-\nimport fire\nimport onnx\nimport onnx_tensorrt.backend as backend\nimport numpy as np\nimport sys\nsys.path.append('../')\nimport time\n# from second.pytorch.models.pointpillars import PillarFeatureNet, PointPillarsScatter\n\ndef onnx_model_check():\n\n onnx_model = onnx.load(\"pfe.onnx... | [
[
"torch.device",
"numpy.array",
"numpy.ones",
"torch.from_numpy",
"numpy.loadtxt"
]
] |
varunsh-coder/koalas | [
"1cfc9ec76a1b023d89870688bf802cf58df537f1"
] | [
"databricks/koalas/tests/test_rolling.py"
] | [
"#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); yo... | [
[
"pandas.DataFrame",
"pandas.MultiIndex.from_tuples",
"numpy.random.rand"
]
] |
predsci/CHD | [
"35f29d1b62861f4ffed57b38d18689b282664bcf"
] | [
"chmap/data/corrections/lbcc/LBCC_generate_theoretic_plots.py"
] | [
"\"\"\"\nGenerate beta and y plots of lbcc theoretic method for each instrument\n- beta and y over time\n- beta and y v. mu\nQueries parameter values from database\n\"\"\"\n\nimport os\nimport time\nimport numpy as np\nimport datetime\nimport matplotlib.pyplot as plt\nfrom matplotlib import cm\nfrom matplotlib.line... | [
[
"matplotlib.lines.Line2D",
"numpy.isnan",
"matplotlib.cm.get_cmap",
"numpy.zeros",
"matplotlib.pyplot.gca",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.close",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.ylabe... |
WojciechMigda/TCO-CDC-OIICS | [
"f6f8da2c09d0c77b10fddeadb1d9b30e6764c895"
] | [
"src/benchmark/ReadData.py"
] | [
"# -*- coding: utf-8 -*-\n\n\ndef read_train():\n import pandas as pd\n\n df = pd.read_csv('../../data/train.csv')\n print('Full TRAIN shape: {}'.format(df.shape))\n\n return df\n"
] | [
[
"pandas.read_csv"
]
] |
willzhang4a58/tvm | [
"afc29e684f16f4112f96c722fffc0b610496dbba",
"be501d3e03630d828a8aa1f464d5cca58dc9e679"
] | [
"tests/python/contrib/test_ethosu/cascader/test_ethosu_conv2d_matcher.py",
"tests/python/frontend/onnx/test_forward.py"
] | [
"# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y... | [
[
"numpy.matmul"
],
[
"torch.nn.Linear",
"torch.nn.EmbeddingBag",
"numpy.random.choice",
"numpy.random.rand",
"numpy.tile",
"numpy.exp",
"torch.ones",
"numpy.where",
"numpy.sign",
"numpy.random.random",
"numpy.dtype",
"numpy.random.normal",
"scipy.special.... |
xiki-tempula/qforce | [
"3295c0c4977d79698dac27e7da7caa71b8a16f58"
] | [
"qforce/molecule/non_dihedral_terms.py"
] | [
"import numpy as np\n#\nfrom .baseterms import TermBase\n#\nfrom ..forces import get_dist, get_angle\nfrom ..forces import calc_bonds, calc_angles, calc_cross_bond_angle\n\n\nclass BondTerm(TermBase):\n name = 'BondTerm'\n\n def _calc_forces(self, crd, force, fconst):\n return calc_bonds(crd, self.atom... | [
[
"numpy.round",
"numpy.array"
]
] |
gary-butler/datathons | [
"af053739456dbae82399477c89f02347e1981f3f",
"af053739456dbae82399477c89f02347e1981f3f"
] | [
"submissions/crime_scatter.py",
"submissions/TH_crime_by_type_alt.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"dat 4 toynbee crime final.ipynb\n\nAutomatically generated by Colaboratory.\n\nOriginal file is located at\n https://colab.research.google.com/drive/1HJY4SUA0fI_Xo0-TZHz-STyJiOUmLxLQ\n\"\"\"\n\nimport matplotlib.pyplot as plt #to define plot parameters\nimport seaborn as sns #to g... | [
[
"pandas.to_datetime",
"pandas.read_csv"
],
[
"pandas.to_datetime",
"pandas.TimeGrouper",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.title",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.show",
"pandas.read_csv",
"matplotlib.pyplot.subplot"
]
] |
esteng/guiding-multi-step | [
"3f0db0ba70b5851cc83878f4ed48cf82342a2ddf",
"3f0db0ba70b5851cc83878f4ed48cf82342a2ddf",
"3f0db0ba70b5851cc83878f4ed48cf82342a2ddf"
] | [
"learning/modules/map_transformer_base.py",
"generate_sim_stacking_demo.py",
"learning/modules/unet/unet_5_contextual_bneck.py"
] | [
"import torch\nimport torch.nn as nn\nfrom learning.models.semantic_map.map_affine import MapAffine\nfrom visualization import Presenter\n\n\nclass MapTransformerBase(nn.Module):\n\n # TODO: Refactor this entire getting/setting idea\n def __init__(self, source_map_size, world_size_px, world_size_m, dest_map_s... | [
[
"torch.cat"
],
[
"numpy.array",
"numpy.sin",
"numpy.asarray",
"numpy.zeros",
"numpy.random.seed",
"numpy.random.permutation",
"numpy.random.uniform",
"numpy.cos"
],
[
"torch.nn.Linear",
"torch.nn.Dropout",
"torch.cat",
"torch.nn.init.kaiming_uniform",
... |
rothenha/interpretability | [
"37c664dc28f574b8f8d2eaf01a3ee4be3fecb1fd"
] | [
"text-dream/python/dream/reconstruct_changed_activation.py"
] | [
"# Copyright 2018 Google LLC. 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 required by appl... | [
[
"torch.cat",
"torch.no_grad",
"torch.optim.Adam",
"numpy.load",
"torch.clamp",
"torch.nn.functional.mse_loss",
"torch.tensor",
"torch.randn"
]
] |
kevinsung/Cirq | [
"5ee7ff62428d7242ff041d00305116fc78d9f784",
"5ee7ff62428d7242ff041d00305116fc78d9f784"
] | [
"cirq-core/cirq/ops/pauli_string_test.py",
"cirq-core/cirq/ops/identity.py"
] | [
"# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law o... | [
[
"numpy.testing.assert_allclose",
"numpy.array",
"numpy.random.choice",
"numpy.zeros",
"numpy.ones",
"numpy.exp",
"numpy.eye",
"numpy.arange",
"numpy.conj",
"numpy.sqrt",
"numpy.diag",
"numpy.kron"
],
[
"numpy.prod"
]
] |
peeley/qalgu | [
"71d8836f3435b90793704cd3789619b560397e03"
] | [
"src/seq2seq.py"
] | [
"import torch, pickle, math\nimport torch.nn as nn\nimport torch.nn.utils.rnn as rnn\n\nclass encoder(nn.Module):\n def __init__(self, inputSize, hiddenSize = 300, numLayers = 1):\n super(encoder, self).__init__()\n self.hiddenSize = hiddenSize\n self.inputSize = inputSize\n self.num... | [
[
"torch.nn.Linear",
"torch.rand",
"torch.nn.Dropout",
"torch.nn.LogSoftmax",
"torch.cat",
"torch.nn.GRU",
"torch.nn.Softmax",
"torch.bmm",
"torch.nn.utils.rnn.pad_packed_sequence",
"torch.cuda.is_available",
"torch.nn.utils.rnn.pack_padded_sequence",
"torch.nn.Embedd... |
holianh/seq2seq.pytorch | [
"bd99ba8642d84d6debe126ec89126155ce0b6338"
] | [
"seq2seq/datasets/concept_captions.py"
] | [
"import os\nimport json\nimport logging\nimport string\nfrom random import randrange\nfrom collections import OrderedDict\nimport torch\nimport torchvision.transforms as transforms\nfrom torchvision.datasets.folder import default_loader\nfrom PIL import ImageFile\nfrom seq2seq.tools.tokenizer import Tokenizer, BPET... | [
[
"torch.utils.data.DataLoader"
]
] |
justinwald99/can_decoder | [
"abfdd839856745f88b3fc3a58c8bedbdd05d5616"
] | [
"tests/test_dataframe_manual_j1939_with_multiplexer.py"
] | [
"from datetime import datetime, timezone\n\nimport can_decoder\nimport pytest\n\ntry:\n import pandas as pd\nexcept ModuleNotFoundError:\n # Should be filtered by pytest when run with tox.\n pass\n\n\n@pytest.mark.env(\"pandas\")\nclass TestDataFrameManualJ1939WithMultiplexer(object):\n \n @pytest.fi... | [
[
"pandas.DataFrame"
]
] |
ajgokhale/ray | [
"76e08c258e3b345d136373bc2fe1084fe5b711fe",
"214f09d969480279930994cabbcc2a75535cc6ca"
] | [
"python/ray/worker.py",
"python/ray/rllib/optimizers/aso_aggregator.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom contextlib import contextmanager\nimport colorama\nimport atexit\nimport faulthandler\nimport hashlib\nimport inspect\nimport json\nimport logging\nimport numpy as np\nimport os\nimport redis\nimp... | [
[
"numpy.random.seed",
"numpy.random.get_state",
"numpy.random.set_state"
],
[
"numpy.ceil"
]
] |
zhanghang1989/autogluon | [
"8bfe6b0da8915020eeb9895fd18d7688c0d604c1",
"8bfe6b0da8915020eeb9895fd18d7688c0d604c1"
] | [
"autogluon/task/tabular_prediction/tabular_prediction.py",
"autogluon/scheduler/fifo.py"
] | [
"import copy, logging, math\nimport numpy as np\n\nfrom .dataset import TabularDataset\nfrom .predictor import TabularPredictor\nfrom ..base import BaseTask\nfrom ..base.base_task import schedulers\nfrom ...utils.tabular.ml.learner.default_learner import DefaultLearner as Learner\nfrom ...utils.tabular.ml.trainer.a... | [
[
"numpy.any"
],
[
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.title",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.show"
]
] |
sjawhar/nilearn | [
"c327239cd673aaa6667953acf274439b479f5b74"
] | [
"nilearn/plotting/matrix_plotting.py"
] | [
"\"\"\"\nMiscellaneous matrix plotting utilities.\n\"\"\"\nimport warnings\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as mpatches\nfrom matplotlib.colorbar import make_axes\nfrom .._utils import fill_doc\nwith warnings.catch_warnings():\n warnings.simplef... | [
[
"matplotlib.colorbar.make_axes",
"numpy.min",
"pandas.concat",
"numpy.asmatrix",
"matplotlib.pyplot.colorbar",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.get_cmap",
"matplotlib.pyplot.subplots",
"numpy.arange",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.g... |
kellischeuble/DS-Unit-3-Sprint-2-SQL-and-Databases | [
"8bf5a8cf6b52713cbbb88482d6f34baedca957b4"
] | [
"module1-introduction-to-sql/assignment_part_two.py"
] | [
"import pandas as pd\nimport sqlite3\n\ndf = pd.read_csv('buddymove_holidayiq.csv')\nprint('shape:', df.shape)\n\nconn = sqlite3.connect('buddymove_holidayiq.sqlite3')\n\nbuddy = df.to_sql('buddymove_holidayiq', conn)\n\n"
] | [
[
"pandas.read_csv"
]
] |
GT-AcerZhang/tb-paddle | [
"a129520339f4d4e7a9bed05feb733f2565673960"
] | [
"API_demo/add_pr_curve-demo.py"
] | [
"# coding=utf-8\nimport numpy as np\nfrom tb_paddle import SummaryWriter\n\nwriter = SummaryWriter('./log')\n\n# 生成一个数组,包含 100 个 0/1 \nlabels_ = np.random.randint(2, size=100)\n\nfor step_ in range(10):\n predictions_ = np.random.rand(100)\n \n for num_thresholds_ in range(7, 197, 20):\n tag_ = 'pr... | [
[
"numpy.random.randint",
"numpy.random.rand"
]
] |
paulgb/transformers | [
"88737de08dea5d5b6c4b3195d8dd4efab678b8aa"
] | [
"proj_code/bert_qa_model.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Mar 2 20:46:32 2020\n\n@author: raghuramkowdeed\n\"\"\"\nimport logging\nimport math\nimport os\n\nimport torch\nfrom torch import nn\nfrom torch.nn import CrossEntropyLoss, MSELoss\n\nfrom transformers import BertPreTrainedModel, BertModel\n... | [
[
"torch.nn.Linear",
"torch.cat",
"torch.nn.Sigmoid",
"torch.nn.MultiheadAttention",
"torch.log",
"torch.Tensor"
]
] |
boyob/Faster-RCNN | [
"43625f6e9a19e7860ceb3478ba3c43fd430f3d8f"
] | [
"train.py"
] | [
"import numpy as np\nimport torch\nimport torch.backends.cudnn as cudnn\nimport torch.optim as optim\nfrom torch.utils.data import DataLoader\nfrom tqdm import tqdm\n\nfrom nets.frcnn import FasterRCNN\nfrom trainer import FasterRCNNTrainer\nfrom utils.dataloader import FRCNNDataset, frcnn_dataset_collate\nfrom uti... | [
[
"torch.optim.lr_scheduler.StepLR",
"numpy.random.seed",
"torch.no_grad",
"numpy.random.shuffle",
"torch.from_numpy",
"torch.utils.data.DataLoader",
"torch.nn.DataParallel"
]
] |
BradenMccoy/GEMSEC | [
"06d3cb4ba70cc1a21ad4bf8be87ef3c6504fc4d6"
] | [
"RECSYS/propertyFetch.py"
] | [
"import pandas as pd\nimport torch\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom torch.nn import functional as fs\nfrom torch.autograd import Variable as var\nimport torch.optim as opt\nimport pickle\n\n\n# Returns a pandas dataframe with the property values of the given sequence including repeats\ndef... | [
[
"numpy.array",
"torch.nn.MSELoss",
"pandas.DataFrame",
"torch.optim.SGD",
"numpy.linspace",
"numpy.mean",
"torch.mm",
"matplotlib.pyplot.show",
"pandas.read_csv",
"torch.randn",
"torch.reshape"
]
] |
tolgaijin/donkeycar | [
"6b19998250b2556765f229816191a5d7151eb76e"
] | [
"flipper.py"
] | [
"import cv2\r\nimport json\r\nfrom pprint import pprint\r\nimport fnmatch\r\n\r\nimport time\r\nimport traceback\r\nimport os\r\nimport sys\r\nimport pandas as pd\r\nimport glob\r\n\r\n\r\ndef get_path(list, file_name):\r\n\tpath = next((s for s in list if file_name in s), \"NA\")\r\n\tprint(path)\r\n\treturn path\... | [
[
"pandas.DataFrame"
]
] |
SauravMaheshkar/benchmarking-gnns | [
"4665316322527634c23307556b63291c69dac4b0",
"4665316322527634c23307556b63291c69dac4b0"
] | [
"layers/gat_layer.py",
"main_TUs_graph_classification.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom dgl.nn.pytorch import GATConv\n\n\"\"\"\n GAT: Graph Attention Network\n Graph Attention Networks (Veličković et al., ICLR 2018)\n https://arxiv.org/abs/1710.10903\n\"\"\"\n\n\nclass GATLayer(nn.Module):\n \"\"\"\n Parameters... | [
[
"torch.nn.Linear",
"torch.cat",
"torch.stack",
"torch.nn.ModuleList",
"torch.nn.functional.leaky_relu",
"torch.nn.functional.dropout",
"torch.nn.functional.elu",
"torch.nn.BatchNorm1d",
"torch.nn.functional.softmax",
"torch.sum"
],
[
"torch.device",
"numpy.array... |
coolgrasshopper/amodal_road_segmentation | [
"462209242973815055f085ada99772af32082f5c"
] | [
"experiments/segmentation/encoding/datasets/cityscapes.py"
] | [
"\nimport os\nimport sys\nimport numpy as np\nimport random\nfrom PIL import Image, ImageOps, ImageFilter\n\nimport torch\nimport re\nimport torch.utils.data as data\nimport torchvision.transforms as transform\nfrom tqdm import tqdm\nfrom .base import BaseDataset\n\nclass CitySegmentation(BaseDataset):\n NUM_CLA... | [
[
"numpy.array",
"torch.from_numpy"
]
] |
esleon97/MachineLearningECT | [
"97a218c9742b43a53e033a888f8a0b1074a2c48b"
] | [
"doc/src/Day1/panda.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nfrom IPython.display import display\nimport pandas as pd\n\ndata = pd.read_csv('src/Hudson_Bay.csv', delimiter=',', skiprows=1)\n\n\ndata_pandas = pd.DataFrame(data)\ndisplay(data_pandas)\n"
] | [
[
"pandas.DataFrame",
"pandas.read_csv"
]
] |
dllehr-amd/pytorch | [
"9cef2033f3d13c14c06fdebc6bdce7b7e05edcb3"
] | [
"test/distributed/fsdp/test_wrap.py"
] | [
"# Owner(s): [\"oncall: distributed\"]\n\nimport functools\nimport os\nimport unittest\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom torch.distributed._fsdp.fully_sharded_data_parallel import FullyShardedDataParallel as FSDP\nfrom torch.distributed._fsdp.wrap import auto_wrap, defa... | [
[
"torch.nn.Linear",
"torch.device",
"torch.rand",
"torch.distributed._fsdp.wrap.enable_wrap",
"torch.distributed.destroy_process_group",
"torch.distributed.init_process_group",
"torch.testing._internal.common_utils.find_free_port",
"torch.distributed._fsdp.wrap.default_auto_wrap_pol... |
minghchen/homework | [
"adf003d6ecdbbabc29801f4a6e96dc9f8a7d2045"
] | [
"hw4/main.py"
] | [
"import numpy as np\nimport tensorflow as tf\nimport gym\nimport logz\nimport scipy.signal\n\ndef normc_initializer(std=1.0):\n \"\"\"\n Initialize array with normalized columns\n \"\"\"\n def _initializer(shape, dtype=None, partition_info=None): #pylint: disable=W0613\n out = np.random.randn(*sh... | [
[
"tensorflow.exp",
"tensorflow.get_default_session",
"tensorflow.matmul",
"tensorflow.reshape",
"tensorflow.to_float",
"tensorflow.global_variables_initializer",
"tensorflow.cast",
"tensorflow.set_random_seed",
"numpy.concatenate",
"tensorflow.shape",
"tensorflow.ConfigP... |
yanghg-basefx/keras | [
"9ab160db77ce7118f0b8f2400171a0faa527d19d"
] | [
"keras/backend/tensorflow_backend.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport tensorflow as tf\nfrom tensorflow.python.framework import ops as tf_ops\nfrom tensorflow.python.training import moving_averages\nfrom tensorflow.python.ops import tensor_array_ops\nfrom tensorfl... | [
[
"tensorflow.group",
"tensorflow.ones",
"tensorflow.ones_like",
"tensorflow.zeros_like",
"tensorflow.nn.separable_conv2d",
"tensorflow.clip_by_value",
"tensorflow.python.framework.ops._as_graph_element",
"tensorflow.greater",
"tensorflow.stack",
"tensorflow.nn.avg_pool",
... |
vietnamican/Deep-Image-Matting-PyTorch | [
"3e5cbd5c1038e2bc864010b647522024a5ae4c8b"
] | [
"post_processing.py"
] | [
"import cv2\nimport numpy as np\n\nimage = cv2.imread(\"test_images/hinh-anh-nhung-chu-cho-de-thuong-nhat.jpg\")\ntrimap = cv2.imread(\"test_images/result_2.png\", cv2.IMREAD_GRAYSCALE)\n# mask_image = np.any(image, axis=2)\n# mask_trimap= np.any(trimap)\n# mask_image[not mask_trimap] = 0\n# print(mask_image.shape)... | [
[
"numpy.full",
"numpy.zeros"
]
] |
yupbank/probability | [
"b3d884dc119a2349a8e087d2deaed162f6ec945c",
"b3d884dc119a2349a8e087d2deaed162f6ec945c"
] | [
"tensorflow_probability/python/math/linalg_test.py",
"tensorflow_probability/python/internal/backend/numpy/raw_ops.py"
] | [
"# Copyright 2018 The TensorFlow Probability Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a... | [
[
"tensorflow.compat.v2.matmul",
"tensorflow.compat.v2.shape",
"numpy.finfo",
"tensorflow.compat.v2.GradientTape",
"numpy.random.random",
"tensorflow.compat.v2.math.count_nonzero",
"tensorflow.compat.v2.test.main",
"tensorflow.compat.v2.SparseTensor",
"numpy.concatenate",
"nu... |
Soooda/AFI | [
"4f58d15b0339647f3d2461ab987ba0c5f20eb395"
] | [
"models/RFR/rfr_new.py"
] | [
"import numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom .update import GMAUpdateBlock\nfrom .extractor import BasicEncoder\nfrom .corr import CorrBlock\nfrom .utils import bilinear_sampler, coords_grid, upflow8\nfrom .gma import Attention\n\ntry:\n autocast = torch.cuda.... | [
[
"torch.nn.functional.unfold",
"torch.cat",
"torch.stack",
"torch.relu",
"torch.nn.functional.interpolate",
"torch.split",
"torch.softmax",
"torch.abs",
"torch.nn.Conv2d",
"torch.nn.functional.grid_sample",
"numpy.arange",
"torch.nn.PReLU",
"torch.tensor",
"t... |
coltonlloyd/OptAux | [
"3ee1f8cdfa32f1a732ad41d5f854659159694160"
] | [
"optaux/submit_jobs/submit_batches_cori.py"
] | [
"import os\nimport numpy as np\nfrom itertools import combinations\nfrom optaux.resources import possible_uptake\n\nko1s = [['HISTD'], ['HISTD'], ['HISTD']]\n\nko2s = [['GLUDy', 'GLUSy'], ['DHORTS'], ['CS']]\n\nmodes = ['default']\n\nsubmit_template = \\\n \"sbatch cori_submit_job %s %s %s %s %s --Restrict_cross... | [
[
"numpy.linspace"
]
] |
halrenlee/yolo3 | [
"624288fc88338b0c01a2e8f4ac2d3a86d88a4ef2"
] | [
"yolo.py"
] | [
"#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nRun a YOLO_v3 style detection model on test images.\n\"\"\"\n\nimport colorsys\nimport os\nfrom timeit import default_timer as timer\n\nimport numpy as np\nfrom keras import backend as K\nfrom keras.models import load_model\nfrom keras.layers import Input\nf... | [
[
"numpy.array",
"numpy.asarray",
"numpy.random.seed",
"numpy.random.shuffle",
"numpy.expand_dims",
"numpy.floor"
]
] |
yashasvi-ranawat/viabel | [
"99245b7f3db8ea9dc55d6130bd5672e1adc62b63"
] | [
"notebooks/experiments.py"
] | [
"import numpy as np\n\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nall\nfrom viabel import all_bounds\nfrom viabel.vb import black_box_klvi, black_box_chivi, adagrad_optimize\nfrom utils import Timer\nfrom psis import psislw\n\n\n## Display bounds information ##\n\ndef print_bounds(results):\n print(... | [
[
"numpy.meshgrid",
"numpy.exp",
"numpy.max",
"numpy.linalg.norm",
"matplotlib.pyplot.savefig",
"numpy.sqrt",
"matplotlib.pyplot.yscale",
"numpy.convolve",
"matplotlib.pyplot.title",
"matplotlib.pyplot.show",
"matplotlib.pyplot.contour",
"numpy.cov",
"numpy.sum",
... |
henlein/upt | [
"0baa1fe7ebc16347f19bf18f10da4a6dc8fd3837"
] | [
"hicodet/utilities/navigator.py"
] | [
"\"\"\"\nHICODet dataset navigator\n\nFred Zhang <frederic.zhang@anu.edu.au>\n\nThe Australian National University\nAustralian Centre for Robotic Vision\n\"\"\"\n\nimport argparse\nimport numpy as np\nfrom math import ceil\nfrom PIL import Image, ImageDraw\n\nfrom pocket.data import HICODet, DatasetTree\n\nhelp_msg... | [
[
"numpy.asarray"
]
] |
aswinmurali-io/desdeo-tools | [
"86d4792ded3383f43658832d7f5dca69f236d61b",
"86d4792ded3383f43658832d7f5dca69f236d61b"
] | [
"desdeo_tools/utilities/distance_to_reference_point.py",
"desdeo_tools/interaction/validators.py"
] | [
"import numpy as np\n\nfrom typing import Tuple, Type\nfrom desdeo_tools.scalarization import SimpleASF\n\n\ndef distance_to_reference_point(obj: np.ndarray, reference_point: np.ndarray) -> Tuple:\n \"\"\"Computes the closest solution to a reference point using achievement scalarizing function.\n\n Args:\n ... | [
[
"numpy.ones_like",
"numpy.min",
"numpy.argmin"
],
[
"pandas.api.types.is_numeric_dtype"
]
] |
biprateep/provabgs | [
"6a62dcee6933dd7834d9c9871c24391e6c797105"
] | [
"src/provabgs/flux_calib.py"
] | [
"'''\n\nmodule for spectrophotometric flux calibration \n\n'''\nimport numpy as np \n\n\ndef no_flux_factor(tt, flux): \n ''' flux calibration is a constant factor across all wavelenghts. This is\n the simplest flux calibration model we have. \n\n Parameter\n ---------\n tt : None\n\n flux : array... | [
[
"numpy.concatenate"
]
] |
shtamura/maskrcnn | [
"bc4d599efe414f03dc4f73f979ac056487997c35"
] | [
"test/frcnn_test/util_test/test_anchor.py"
] | [
"import unittest\nimport math\n\nimport numpy as np\nimport xrcnn.util.anchor as anchor\n\nfrom xrcnn import config\n\n\nclass TestAnchor(unittest.TestCase):\n def test_generate_anchors(self):\n conf = config.Config()\n a = anchor.Anchor(conf)\n anchors = a._generate_anchors((2, 2))\n ... | [
[
"numpy.testing.assert_almost_equal",
"numpy.where",
"numpy.array"
]
] |
savadikarc/Semicolons-2019 | [
"435b7f5e7000d7f0e9a89f52ff7d5b67e0fcbf43"
] | [
"Imaging/image_utils.py"
] | [
"import os, warnings\r\n\r\nimport cv2\r\nfrom PIL import Image\r\n\r\n# import matplotlib\r\n# matplotlib.use('Agg')\r\nimport matplotlib.pyplot as plt\r\n# plt = matplotlib.pyplot\r\nimport numpy as np\r\n\r\ndef VisualizeImageGrayscale(image_3d, percentile=99, cmap=None):\r\n r\"\"\"Returns a 3D tensor as a g... | [
[
"numpy.concatenate",
"numpy.array",
"matplotlib.pyplot.text",
"numpy.vectorize",
"numpy.percentile",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.title",
"numpy.min",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.figure",
"numpy.mean",
"matplotlib.pyplot.barh"... |
uu-sml/birch-vector-borne-disease | [
"233c5a945af7810b2bade5df573b35f3b93ab506"
] | [
"paperdata.py"
] | [
"#!/usr/bin/python\n\"\"\"Processing of the simulation data\"\"\"\nimport json\nimport csv\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport scipy.stats\n\n\n# Parameters\nburnin = 500\ninput_folder = \"output/\"\nfile_pgibbs = input_folder + \"yap_dengue_pgibbs_2048.json\"\nfile_csmc = input_folder + \"... | [
[
"numpy.max",
"numpy.histogram",
"numpy.dot",
"numpy.zeros",
"numpy.sum",
"numpy.mean",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.show",
"numpy.linspace"
]
] |
Gutza/manim | [
"9b84ac41ad8062de1a8208757782b159c1e13460"
] | [
"manim/utils/simple_functions.py"
] | [
"\"\"\"A collection of simple functions.\"\"\"\n\n__all__ = [\n \"sigmoid\",\n \"choose_using_cache\",\n \"choose\",\n \"get_num_args\",\n \"get_parameters\",\n \"clip_in_place\",\n \"fdiv\",\n \"binary_search\",\n]\n\n\nfrom functools import reduce\nimport inspect\nimport numpy as np\nimpor... | [
[
"numpy.logical_or",
"numpy.true_divide",
"numpy.exp",
"numpy.mean",
"numpy.full_like"
]
] |
LoYungSum/gaze_correction_loyungsum | [
"91bb571b190284ed5eb35f7b4a1772e924d73bb6"
] | [
"gaze_correction_system/regz_socket_MP_FD.py"
] | [
"\n# coding: utf-8\n\n# # load package and settings\n\n# In[ ]:\n\n\nimport cv2\nimport sys\nimport dlib\nimport time\nimport socket\nimport struct\nimport numpy as np\nimport tensorflow as tf\n# from win32api import GetSystemMetrics\n# import win32gui\n\nfrom threading import Thread, Lock\nimport multiprocessing a... | [
[
"numpy.concatenate",
"tensorflow.Graph",
"numpy.tile",
"tensorflow.train.get_checkpoint_state",
"tensorflow.global_variables",
"tensorflow.ConfigProto",
"tensorflow.placeholder",
"tensorflow.name_scope",
"numpy.sqrt",
"numpy.abs",
"numpy.arange",
"numpy.expand_dims"... |
WindfallData/shap | [
"85ba65affb96ab4bd21cd4045e105d4c132f7d59"
] | [
"shap/plots/_waterfall.py"
] | [
"import numpy as np\nimport warnings\ntry:\n import matplotlib.pyplot as pl\n import matplotlib\nexcept ImportError:\n warnings.warn(\"matplotlib could not be loaded!\")\n pass\nfrom ._labels import labels\nfrom ..utils import safe_isinstance, format_value\nfrom . import colors\n\n\n# TODO: If we make a... | [
[
"numpy.max",
"numpy.array",
"matplotlib.transforms.ScaledTranslation",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.axhline",
"matplotlib.pyplot.plot",
"numpy.min",
"matplotlib.pyplot.show",
"matplotlib.pyplot.gcf",
"matplotlib.pyplot.ioff",
"numpy.abs",
"numpy.aran... |
antonykamp/GPflow | [
"1831a5d19a50ff525af0ce931c8b82f6306d8196"
] | [
"tests/gpflow/optimizers/test_scipy.py"
] | [
"# Copyright 2019 the GPflow 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 applicable law or agr... | [
[
"numpy.sin",
"numpy.tile",
"numpy.cos",
"numpy.random.RandomState"
]
] |
evitself/CenterNet | [
"db3714397c776f3f84c6ab9b61a47160f78462f5"
] | [
"src/lib/trains/multi_pose.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport torch\nimport numpy as np\n\nfrom models.losses import FocalLoss, RegL1Loss, RegLoss, RegWeightedL1Loss\nfrom models.decode import multi_pose_decode\nfrom models.utils import _sigmoid, flip_tens... | [
[
"numpy.clip",
"torch.nn.MSELoss",
"torch.nn.L1Loss"
]
] |
capitalone/global-attribution-mapping | [
"242ca01cab98b01c545c3339b759b4a1b9fb4b39"
] | [
"tests/test_banditPAM.py"
] | [
"#!/usr/bin/env python\nimport time\n\nimport numpy as np\nimport pandas as pd\n\nfrom gam.clustering import KMedoids\nfrom gam.spearman_distance import spearman_squared_distance\nimport dask.dataframe as dd\n\nnp.random.seed(42)\n\n\ndef test_banditPAM():\n # load the data\n df = pd.read_csv(\"tests/banditPA... | [
[
"numpy.random.seed",
"pandas.read_csv",
"numpy.isin"
]
] |
ayushbaid/AttendToSleep | [
"5563a29b028bdfa240a490670e53b10ad94efe28"
] | [
"code/helper/data_processing.py"
] | [
"'''\nThis code is for data processing\n\nAuthor: Yujia Xie\n'''\nimport findspark\nimport argparse\nimport pyspark\nfrom pyspark.sql import SQLContext, SparkSession\nfrom os import listdir\nfrom os.path import isfile, join\nimport numpy as np\nimport os\n\n\ndef load(data_dir):\n\tsc = pyspark.SparkContext(\"local... | [
[
"numpy.where",
"numpy.array",
"numpy.split"
]
] |
rishan92/DACBench | [
"bf4e0398110a50ac33c7bc57a13ecca3590e8247"
] | [
"dacbench/benchmarks/sigmoid_benchmark.py"
] | [
"from dacbench.abstract_benchmark import AbstractBenchmark, objdict\nfrom dacbench.envs import SigmoidEnv\nfrom dacbench.wrappers import InstanceSamplingWrapper\n\nimport numpy as np\nimport os\nimport csv\n\nACTION_VALUES = (5, 10)\n\nSIGMOID_DEFAULTS = objdict(\n {\n \"action_space_class\": \"Discrete\"... | [
[
"numpy.concatenate",
"numpy.prod",
"numpy.random.default_rng"
]
] |
glwagner/doublyPeriodicModels | [
"69f4e4bc338f9a60ee3b6d0760605d4ed3281fe8"
] | [
"tests/twoDimTurbulence/testModuleInput.py"
] | [
"import time, sys\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nsys.path.append('../../')\nfrom py2Periodic.physics import twoDimTurbulence\nfrom numpy import pi\nfrom exampleModuleInput import paramsInFile\n\n# Parameters can be defined in a dictionary variable to be passed\n# as input when the model is ... | [
[
"numpy.random.standard_normal",
"matplotlib.pyplot.pcolormesh",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.clf",
"matplotlib.pyplot.axis"
]
] |
albertfxwang/clear | [
"29b482ebeb02d8d7c75a586bf65edef15eaabfbe"
] | [
"survey_paper/flux_snr_exposuretime.py"
] | [
"import astropy\nfrom astropy.io import fits, ascii\nimport matplotlib.pyplot as plt\nfrom astropy.table import Table, join\nfrom mpl_toolkits.axes_grid1.inset_locator import inset_axes\nimport numpy as np\nimport matplotlib.colors as colors\n\ndef truncate_colormap(cmap, minval=0.0, maxval=1.0, n=100):\n new_cm... | [
[
"matplotlib.pyplot.colorbar",
"matplotlib.pyplot.close",
"matplotlib.pyplot.subplots",
"numpy.where",
"numpy.arange",
"matplotlib.pyplot.Normalize",
"numpy.linspace"
]
] |
georggenaishel/GNV | [
"c6f5f46140fcd99f4b481bdc974ff80dd7efa78b"
] | [
"Newcvzone/classificationmodule.py"
] | [
"import tensorflow.keras\r\nimport numpy as np\r\nimport cv2\r\n\r\n\r\nclass Classifier:\r\n\r\n def __init__(self, modelPath, labelsPath=None):\r\n self.model_path = modelPath\r\n # Disable scientific notation for clarity\r\n np.set_printoptions(suppress=True)\r\n # Load the model\r... | [
[
"numpy.ndarray",
"numpy.set_printoptions",
"numpy.argmax",
"numpy.asarray"
]
] |
tassioferenzini/PAA-2017-T1 | [
"fdb7cbb3b0d5e745f119b40191a1b80dc60367bb"
] | [
"question1a.py"
] | [
"import os\nimport sys\nfrom sys import argv, exit\nfrom scipy.sparse.csgraph import dijkstra\n\nimport CPUtimer\n\nfrom data1 import instance_iteratorL, print_solution\n\ndef solve(instance_path):\n timer = CPUtimer.CPUTimer()\n for instance in instance_iteratorL(instance_path):\n verticeInicial = 1\n... | [
[
"scipy.sparse.csgraph.dijkstra"
]
] |
ZongSingHuang/Grey-Wolf-Optimizer-algorithm-with-a-Two-phase-Mutation | [
"a29e1313de91b618549edb1e9f5b112517ad5297"
] | [
"main_9010.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Nov 23 21:29:10 2020\n\n@author: ZongSing_NB\n\"\"\"\n\nfrom BHPSOGWO import BHPSOGWO\nimport numpy as np\nimport pandas as pd\nfrom sklearn.neighbors import KNeighborsClassifier\nfrom sklearn.model_selection import StratifiedKFold\nfrom sklearn.model_selection impor... | [
[
"sklearn.model_selection.StratifiedKFold",
"numpy.zeros",
"numpy.random.seed",
"numpy.round",
"pandas.DataFrame",
"numpy.sum",
"sklearn.neighbors.KNeighborsClassifier",
"numpy.std",
"pandas.read_csv"
]
] |
luar123/scikit-rf | [
"e204ed99a0341a4b8aaddefc4a821009e678d4ee"
] | [
"skrf/tests/test_vectorfitting.py"
] | [
"import unittest\nimport skrf\nimport numpy as np\nimport tempfile\nimport os\n\n\nclass VectorFittingTestCase(unittest.TestCase):\n\n def test_ringslot_with_proportional(self):\n # perform the fit\n vf = skrf.vectorFitting.VectorFitting(skrf.data.ring_slot)\n vf.vector_fit(n_poles_real=2, n... | [
[
"numpy.allclose",
"numpy.array",
"numpy.abs"
]
] |
teemosauce/rpi-cube | [
"6fd8cff81da5efe87fe4c911ce4b067644ea266f"
] | [
"server/libs/effects/cube_effect_c.py"
] | [
"from numpy.core.numeric import roll\nfrom libs.effects.cube_effect import CubeEffect\n\nimport numpy as np\nimport random\nimport time\n\n\nclass CubeEffectC(CubeEffect):\n def run(self):\n effect_config = self.get_effect_config(\"effect_power\")\n led_count = self._device.device_config[\"led_coun... | [
[
"numpy.max",
"numpy.zeros"
]
] |
HY-Vision-Lab/metrabs | [
"23e41fbebfa6ae1081e37a0fa3a1de805965f1c9"
] | [
"src/data/mupots.py"
] | [
"import os\n\nimport numpy as np\nimport scipy.optimize\n\nimport boxlib\nimport cameralib\nimport data.datasets3d as p3ds\nimport matlabfile\nimport paths\nimport util\n\n\n@util.cache_result_on_disk(f'{paths.CACHE_DIR}/mupots-yolo.pkl', min_time=\"2021-09-16T20:39:52\")\ndef make_mupots():\n joint_names = (\n ... | [
[
"numpy.array",
"numpy.ones",
"numpy.zeros",
"numpy.eye"
]
] |
michelamapelli/PeTar | [
"395942c5a35f462075fe69027d95d78aeeef0180"
] | [
"tools/analysis/base.py"
] | [
"# base class \nimport numpy as np\nimport warnings\n\nclass DictNpArrayMix:\n \"\"\" The basic class of data structure\n The member functions are initialized by provided keys in initial function\n Member functions can be accessed by using the stype of either Dictonary or numpy.ndarray\n \"\"\"\... | [
[
"numpy.empty",
"numpy.savetxt",
"numpy.zeros",
"numpy.loadtxt",
"numpy.fromfile"
]
] |
GuohongLi/simclr-pytorch | [
"7e08b2433a623fdbc1c097402fded4cc69d1b54e"
] | [
"models/resnet_simclr.py"
] | [
"import torch.nn as nn\nimport torch.nn.functional as F\nimport torchvision.models as models\n\n\nclass ResNetSimCLR(nn.Module):\n\n def __init__(self, base_model, out_dim):\n super(ResNetSimCLR, self).__init__()\n self.resnet_dict = {\"resnet18\": models.resnet18(pretrained=False),\n ... | [
[
"torch.nn.Linear",
"torch.nn.functional.relu"
]
] |
burgerkingeater/estimator | [
"4c38177f1a842d2169f90e1095f85e49e794a564"
] | [
"tensorflow_estimator/python/estimator/estimator_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.compat.v1.executing_eagerly",
"tensorflow.compat.v1.initializers.zeros",
"tensorflow.compat.v1.debugging.assert_equal",
"tensorflow.compat.v1.zeros",
"tensorflow.compat.v1.assign",
"tensorflow.compat.v1.math.add",
"tensorflow.compat.v1.Graph",
"tensorflow.compat.v1.get_... |
andreyboytsov/DynamicTSNE | [
"9ccd18d80c7a0bae31defde2f2336f9ea3d1965a"
] | [
"Experiments/TransformationLightweight/digit_images_double_transform.py"
] | [
"# Author: Andrey Boytsov <andrey.boytsov@uni.lu> <andrey.m.boytsov@gmail.com>\n# License: BSD 3 clause (C) 2017\n\n# Visualizing 8x8 digits dataset (from sklearn).\n# Then transforming the same data. Goal - get the same Ys on transformation.\n# Transformation is done with lightweight LION-tSNE - transformer-only t... | [
[
"sklearn.datasets.load_digits",
"numpy.sum",
"matplotlib.pyplot.legend",
"sklearn.manifold.TSNE",
"matplotlib.pyplot.scatter",
"matplotlib.pyplot.gcf",
"matplotlib.pyplot.show"
]
] |
Ascend/tools | [
"d572d26275c5a72f1c7f32893b114a0b2b4a60ed",
"d572d26275c5a72f1c7f32893b114a0b2b4a60ed"
] | [
"pt2pb/onnx-tensorflow/onnx_tf/handlers/backend/sequence_at.py",
"pt2pb/onnx-tensorflow/onnx_tf/handlers/backend/scatter_elements.py"
] | [
"import tensorflow as tf\n\nfrom onnx_tf.handlers.backend_handler import BackendHandler\nfrom onnx_tf.handlers.handler import onnx_op\n\n\n@onnx_op(\"SequenceAt\")\nclass SequenceAt(BackendHandler):\n\n @classmethod\n def chk_pos_in_bounds(cls, input_seq, pos):\n \"\"\"\n Check the position is in-bounds wit... | [
[
"tensorflow.equal",
"tensorflow.cast",
"tensorflow.negative",
"tensorflow.control_dependencies",
"tensorflow.less_equal",
"tensorflow.logical_and"
],
[
"tensorflow.rank",
"tensorflow.range",
"tensorflow.concat",
"tensorflow.expand_dims",
"tensorflow.reshape",
"t... |
genepattern/docker-aws-python36 | [
"445fca376b87f7ca9dd8954027bd1a39508c1af1"
] | [
"tests/diffex/diffexSrc/src/ccalnoir/ccalnoir/mathematics/equation.py"
] | [
"\"\"\"\nComputational Cancer Analysis Library\n\nAuthors:\n Huwate (Kwat) Yeerna (Medetgul-Ernar)\n kwat.medetgul.ernar@gmail.com\n Computational Cancer Analysis Laboratory, UCSD Cancer Center\n\n Pablo Tamayo\n ptamayo@ucsd.edu\n Computational Cancer Analysis Laboratory, UCSD Can... | [
[
"numpy.argmax",
"numpy.exp",
"numpy.sqrt",
"scipy.stats.distributions.t._pdf"
]
] |
Supermaxman/epic_qa | [
"9698d356f79c14a58d383031816dc190b5115b77"
] | [
"expand_query/data_utils.py"
] | [
"\nimport os\nimport json\nimport torch\nfrom torch.utils.data import Dataset\nfrom collections import defaultdict\nfrom tqdm import tqdm\n\n\ndef parse_id(doc_pass_sent_id):\n\tstart_id, end_id = doc_pass_sent_id.split(':')\n\tid_list = start_id.split('-')\n\tdoc_id = '-'.join(id_list[:-2])\n\tpass_id = id_list[-2... | [
[
"torch.is_tensor"
]
] |
idsdlab/basicai_sp21 | [
"af9acba34c0417fed830de1b61753c50fd303169"
] | [
"deep-learning-from-scratch/ch02/nand_gate.py"
] | [
"# coding: utf-8\nimport numpy as np\n\n\ndef NAND(x1, x2):\n x = np.array([x1, x2])\n w = np.array([-0.5, -0.5])\n b = 0.7\n tmp = np.sum(w*x) + b\n if tmp <= 0:\n return 0\n else:\n return 1\n\nif __name__ == '__main__':\n for xs in [(0, 0), (1, 0), (0, 1), (1, 1)]:\n y =... | [
[
"numpy.sum",
"numpy.array"
]
] |
maorshutman/bipmat | [
"a4bc8fcb277714a23d35a6e4191059d1724751a4"
] | [
"tools/test_plots.py"
] | [
"import argparse\n\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport numpy as np\n\nplt.rcParams['axes.linewidth'] = 0.5\n\n\ndef parse_args():\n parser = argparse.ArgumentParser(description='')\n parser.add_argument('--data_file_path', type=str, required=True, default='', help='')\n return parser.pa... | [
[
"matplotlib.pyplot.xscale",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.show",
"pandas.read_csv",
"matplotlib.pyplot.yscale"
]
] |
EryiXie/PlaneRecNet | [
"534e23e6c5db2235ab1e5a9419fb4bfec3ffa943"
] | [
"data/datasets.py"
] | [
"import os\nimport os.path as osp\nimport sys\nimport torch\nimport torch.utils.data as data\nimport torch.nn.functional as F\nimport cv2\nimport numpy as np\nfrom data.config import cfg, set_dataset\nfrom pycocotools import mask as maskUtils\nimport random\nimport json\nimport abc\n\ndef get_label_map():\n if c... | [
[
"numpy.array",
"numpy.asarray",
"numpy.zeros",
"torch.set_default_tensor_type",
"torch.no_grad",
"torch.inverse",
"torch.from_numpy",
"torch.utils.data.DataLoader",
"torch.nn.functional.pad",
"numpy.vstack"
]
] |
WithLi/tensorflow-yolo-v3 | [
"e10d679d60d3c776e7580649bbd18b6e2da00219"
] | [
"demo.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport numpy as np\nimport tensorflow as tf\nfrom PIL import Image, ImageDraw\n\nimport yolo_v3\nimport yolo_v3_tiny\n\nfrom utils import load_coco_names, draw_boxes, convert_to_original_size, \\\n load_weights, detections_boxes, non_max_suppression\n\nFLAGS = tf.app.flags.FLAGS\n\ntf... | [
[
"numpy.array",
"tensorflow.app.flags.DEFINE_integer",
"tensorflow.app.flags.DEFINE_string",
"tensorflow.Session",
"tensorflow.global_variables",
"tensorflow.variable_scope",
"tensorflow.app.flags.DEFINE_float",
"tensorflow.placeholder",
"tensorflow.app.run",
"tensorflow.app... |
cmatii/BigData2019-MCC | [
"724783a115db7820e28ac446c78d6a5f0fbd952b"
] | [
"train.py"
] | [
"# -*- coding: utf-8 -*-\nimport sugartensor as tf\nimport numpy as np\nfrom sklearn.preprocessing import MinMaxScaler\n\n\n__author__ = 'njkim@jamonglab.com'\n\n\nclass TimeSeriesData(object):\n\n def __init__(self, batch_size=128):\n\n # load data\n # 1st column : time\n # 2nd column : tim... | [
[
"numpy.random.choice",
"numpy.genfromtxt",
"numpy.mean",
"numpy.any",
"sklearn.preprocessing.MinMaxScaler",
"numpy.expand_dims"
]
] |
tdudz/miniplaces | [
"b8a746c4bb274589e66205f31e4187bffa58e4d4"
] | [
"model/tensorflow/tf_models.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nimport tensorflow as tf\nfrom tensorflow.contrib.layers.python.layers import batch_norm\nimport numpy as np\n\n\ndef alexnet(x, keep_dropout):\n weights = {\n 'wc1': tf.Variable(tf.random_norma... | [
[
"tensorflow.nn.conv2d",
"tensorflow.contrib.layers.python.layers.batch_norm",
"tensorflow.matmul",
"tensorflow.ones",
"tensorflow.reshape",
"tensorflow.identity",
"tensorflow.layers.batch_normalization",
"tensorflow.transpose",
"numpy.sqrt",
"tensorflow.layers.dense",
"... |
datamol-org/datamol | [
"be3b09565143a2224ddfe569efdad84c81bbfc57"
] | [
"datamol/convert.py"
] | [
"from typing import Union\nfrom typing import List\nfrom typing import Optional\n\nimport re\n\nfrom loguru import logger\n\nimport pandas as pd\n\nfrom rdkit import Chem\nfrom rdkit.Chem import PandasTools\n\nimport selfies as sf\n\nimport datamol as dm\n\n\ndef to_smiles(\n mol: Chem.rdchem.Mol,\n canonical... | [
[
"pandas.DataFrame",
"pandas.concat"
]
] |
NarayanAdithya/pyinterpolate | [
"3a8166ad0ca884f29be1afe789eff4ccfc891f71"
] | [
"pyinterpolate/idw/idw.py"
] | [
"import numpy as np\nfrom pyinterpolate.distance.calculate_distances import calc_point_to_point_distance\n\n\ndef inverse_distance_weighting(known_points, unknown_location, number_of_neighbours=-1, power=2.):\n \"\"\"\n Function performs Inverse Distance Weighting with a given set of points and an unknown loc... | [
[
"numpy.all",
"numpy.where",
"numpy.sum",
"numpy.expand_dims"
]
] |
amoux/pytorch | [
"8535418a06d75025541370cc656a8b6a0330ca0d"
] | [
"test/test_torch.py"
] | [
"# -*- coding: utf-8 -*-\nimport torch\nimport torch.utils.data\nimport numpy as np\n\nimport contextlib\nimport gc\nimport io\nimport inspect\nimport itertools\nimport math\nimport random\nimport re\nimport copy\nimport os\nimport tempfile\nimport unittest\nimport warnings\nimport types\nimport pickle\nimport text... | [
[
"torch.cat",
"torch.nn.MaxPool3d",
"torch.Generator",
"torch.cuda.device",
"torch.bmm",
"torch.squeeze",
"torch.testing.assert_close",
"torch.load",
"torch.transpose",
"torch.exp",
"torch.testing._internal.common_utils.DeterministicGuard",
"torch.xcorr3",
"torch... |
multimedia-application-course/HeyConstitution | [
"dda8b8de6383466663a90d00dcd9e27b1686cdd1"
] | [
"futureWork/bertConstitution/pybert/callback/optimizater/ralamb.py"
] | [
"import math\nimport torch\nfrom torch.optim.optimizer import Optimizer\n\nclass Ralamb(Optimizer):\n '''\n RAdam + LARS\n Example:\n >>> model = ResNet()\n >>> optimizer = Ralamb(model.parameters(), lr=0.001)\n '''\n def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, wei... | [
[
"torch.zeros_like"
]
] |
musa-atlihan/jina | [
"9d9cbe1dad2703e2da10761a11c66abcc76dd8b8",
"9d9cbe1dad2703e2da10761a11c66abcc76dd8b8"
] | [
"tests/unit/executors/encoders/clients.py",
"jina/drivers/reduce.py"
] | [
"import os\nimport pytest\n\nimport numpy as np\nfrom jina.executors import BaseExecutor\nfrom jina.executors.encoders.tfserving import UnaryTFServingClientEncoder\nfrom tests import JinaTestCase\n\n\nclass MnistTFServingClientEncoder(UnaryTFServingClientEncoder):\n def __init__(self, *args, **kwargs):\n ... | [
[
"numpy.testing.assert_array_equal",
"numpy.random.rand"
],
[
"numpy.concatenate"
]
] |
RameshArvind/random-network-distillation-pytorch | [
"76e833f55b79271179956cc6846d9322b3c5ff63"
] | [
"train.py"
] | [
"from agents import *\nfrom envs import *\nfrom utils import *\nfrom config import *\nfrom torch.multiprocessing import Pipe\n\nfrom torch.utils.tensorboard import SummaryWriter\n\nimport numpy as np\n\n\ndef main():\n print({section: dict(config[section]) for section in config.sections()})\n train_method = d... | [
[
"numpy.zeros_like",
"numpy.zeros",
"numpy.sum",
"torch.multiprocessing.Pipe",
"numpy.mean",
"numpy.std",
"numpy.float32",
"numpy.stack",
"numpy.random.randint",
"numpy.sqrt",
"numpy.hstack",
"torch.utils.tensorboard.SummaryWriter",
"numpy.vstack"
]
] |
danielsjensen1/pymtensor | [
"e25bdafcf38ed9e1841798435606ce9eb3166807"
] | [
"pymtensor/symmetry.py"
] | [
"from numpy import (abs, array, eye, rint)\n# from scipy.linalg import lu, svd\nfrom sympy import acos, cos, pi, sin, sqrt, Rational\n\n\ndef round_if_safe(val, atol):\n ival = rint(val)\n if abs(ival - val) < atol:\n return int(ival)\n else:\n return val \n\n\ndef rotx(theta):\n c = cos(t... | [
[
"numpy.array",
"numpy.rint",
"numpy.abs",
"numpy.eye"
]
] |
vishalbelsare/FDApy | [
"50feb99e34f265b1c17a6f234a9d2f942ceb8f6d",
"50feb99e34f265b1c17a6f234a9d2f942ceb8f6d"
] | [
"FDApy/preprocessing/dim_reduction/fcp_tpa.py",
"tests/test_dense_functional_data.py"
] | [
"#!/usr/bin/env python\n# -*-coding:utf8 -*\n\n\"\"\"Mdoule for FCPTPA class.\n\nThis module is used to implement the Functional CP-TPA algorithm [1]. This\nmethod computes an eigendecomposition of image observations, which can be\ninterpreted as functions on a two-dimensional domain.\n\nReferences\n----------\n[1]... | [
[
"numpy.zeros_like",
"numpy.dot",
"numpy.linalg.norm",
"numpy.zeros",
"numpy.sum",
"numpy.linalg.eigh",
"numpy.identity",
"numpy.random.uniform",
"numpy.einsum",
"numpy.linalg.solve",
"numpy.outer"
],
[
"numpy.array"
]
] |
opimentel-github/fuzzy-torch | [
"4f1e06e6fc445cdec23e9762ca20408feeb296e3"
] | [
"fuzzytorch/models/attn/pytorch_multihead_clone.py"
] | [
"from __future__ import print_function\nfrom __future__ import division\n\nimport torch\nfrom torch import Tensor\nfrom torch.nn import Module, Parameter, Linear\nfrom torch.nn.init import xavier_uniform_, constant_, eye_\nfrom torch.nn import functional as F\nfrom torch.nn.functional import linear, softmax, dropou... | [
[
"torch.nn.Linear",
"torch.sqrt",
"torch.nn.init.constant_",
"torch.nn.functional.dropout",
"torch.nn.init.xavier_uniform_",
"torch.bmm",
"torch.nn.functional.linear",
"torch.empty",
"torch.nn.functional.softmax",
"torch.Tensor",
"torch.equal",
"torch.jit._unwrap_opt... |
dyershov/interactive-plotter | [
"e56e1fb520a2c93deeb41144c31cbd3e39b16ce6"
] | [
"src/interactive_plotter/scatter.py"
] | [
"from .interactive_artist import InteractiveArtist\n\nclass Scatter(InteractiveArtist):\n def __init__(self, artist):\n super().__init__(artist)\n\n def plot(self, x=None, y=None, **kwargs):\n import numpy as np\n if x is not None and y is not None:\n if len(x) is 0 or len(y) i... | [
[
"numpy.array"
]
] |
yuhonghong66/chainer | [
"15d475f54fc39587abd7264808c5e4b33782df9e"
] | [
"chainer/functions/connection/convolution_2d.py"
] | [
"import numpy\n\nimport chainer\nfrom chainer import backend\nfrom chainer.backends import cuda\nfrom chainer.backends import intel64\nfrom chainer import configuration\nfrom chainer import function_node\nimport chainer.functions\nfrom chainer.utils import argument\nfrom chainer.utils import conv\nfrom chainer.util... | [
[
"numpy.ascontiguousarray",
"numpy.tensordot",
"numpy.rollaxis"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.