repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
PlatterDataset/feature | [
"2ebdc1b28498b709a0c91e60c19bfc731006bc50"
] | [
"synchronization/SyncNetInstance.py"
] | [
"#!/usr/bin/python\n#-*- coding: utf-8 -*-\n# Video 25 FPS, Audio 16000HZ\n\nimport torch\nimport numpy\nimport time, pdb, argparse, subprocess, os, math, glob\nimport cv2\nimport python_speech_features\n\nfrom scipy import signal\nfrom scipy.io import wavfile\nfrom SyncNetModel import *\nfrom shutil import rmtree\... | [
[
"numpy.expand_dims",
"torch.cat",
"scipy.signal.medfilt",
"torch.load",
"torch.min",
"numpy.set_printoptions",
"torch.median",
"numpy.stack",
"numpy.transpose",
"torch.stack",
"numpy.array",
"torch.nn.functional.pad"
]
] |
googleinterns/deepspeech-reconstruction | [
"72f28d1e9064d221b3421c302a8725a8c71859ee"
] | [
"src/deepspeech_training/util/config.py"
] | [
"from __future__ import absolute_import, division, print_function\n\nimport os\nimport sys\nimport tensorflow.compat.v1 as tfv1\n\nfrom attrdict import AttrDict\nfrom xdg import BaseDirectory as xdg\n\nfrom src.flags import FLAGS\nfrom .gpu import get_available_gpus\nfrom .logging import log_error\nfrom .text impor... | [
[
"tensorflow.compat.v1.GPUOptions"
]
] |
Jasonkks/mlcnet | [
"8f89c860c709733c8baa663607004fc48d76291d",
"8f89c860c709733c8baa663607004fc48d76291d",
"8f89c860c709733c8baa663607004fc48d76291d"
] | [
"pcdet/datasets/augmentor/data_augmentor.py",
"pcdet/datasets/nuscenes/nuscenes_utils.py",
"pcdet/datasets/processor/data_processor.py"
] | [
"from functools import partial\nimport torch\nimport random\nimport numpy as np\nfrom ...ops.roiaware_pool3d import roiaware_pool3d_utils\nfrom ...utils import common_utils, box_utils\nfrom . import augmentor_utils, database_sampler\n\n\nclass DataAugmentor(object):\n def __init__(self, root_path, augmentor_conf... | [
[
"torch.from_numpy",
"numpy.concatenate",
"numpy.random.randn",
"numpy.random.uniform",
"numpy.array"
],
[
"numpy.arctan2",
"numpy.sqrt",
"numpy.array",
"numpy.concatenate"
],
[
"numpy.abs",
"numpy.random.choice",
"numpy.linalg.norm",
"numpy.random.shuffl... |
reetikaag/human-activity-recognition | [
"1e6760a88ca52fe9a8a8ca60d000cd3426851156"
] | [
"Efficient-3DCNNs/thop/count_hooks.py"
] | [
"import argparse\n\nimport torch\nimport torch.nn as nn\n\nmultiply_adds = 1\n\n\ndef count_conv2d(m, x, y):\n\t# TODO: add support for pad and dilation\n\tx = x[0]\n\n\tcin = m.in_channels\n\tcout = m.out_channels\n\tkh, kw = m.kernel_size\n\tbatch_size = x.size()[0]\n\n\tout_w = y.size(2)\n\tout_h = y.size(3)\n\n... | [
[
"torch.Tensor"
]
] |
haorang/285 | [
"3b7369b8eb4433952c9cdf27d4feaa015a6c40e4"
] | [
"stable_baselines3/dqn/dqn.py"
] | [
"from typing import Any, Dict, List, Optional, Tuple, Type, Union\n\nimport numpy as np\nimport torch as th\nfrom torch.nn import functional as F\n\nfrom stable_baselines3.common import logger\nfrom stable_baselines3.common.off_policy_algorithm import OffPolicyAlgorithm\nfrom stable_baselines3.common.type_aliases i... | [
[
"torch.no_grad",
"numpy.mean",
"numpy.random.rand",
"torch.nn.functional.smooth_l1_loss"
]
] |
b1quint/astropy | [
"a170a74739e4356c169429a42e554f9777b53f4d",
"a170a74739e4356c169429a42e554f9777b53f4d",
"a170a74739e4356c169429a42e554f9777b53f4d",
"a170a74739e4356c169429a42e554f9777b53f4d",
"a170a74739e4356c169429a42e554f9777b53f4d",
"a170a74739e4356c169429a42e554f9777b53f4d",
"a170a74739e4356c169429a42e554f9777b53f4... | [
"astropy/stats/lombscargle/implementations/tests/test_mle.py",
"astropy/stats/lombscargle/implementations/fast_impl.py",
"astropy/io/fits/hdu/table.py",
"astropy/visualization/wcsaxes/tests/test_frame.py",
"astropy/io/fits/scripts/fitsheader.py",
"astropy/visualization/wcsaxes/utils.py",
"astropy/modeli... | [
"import pytest\nimport numpy as np\nfrom numpy.testing import assert_allclose\n\nfrom astropy.stats.lombscargle.implementations.mle import design_matrix, periodic_fit\n\n\n@pytest.fixture\ndef t():\n rand = np.random.RandomState(42)\n return 10 * rand.rand(10)\n\n\n@pytest.mark.parametrize('freq', [1.0, 2])\n... | [
[
"numpy.cos",
"numpy.sin",
"numpy.ones",
"numpy.testing.assert_allclose",
"numpy.random.RandomState",
"numpy.zeros"
],
[
"numpy.dot",
"numpy.log",
"numpy.sqrt",
"numpy.sign",
"numpy.broadcast_arrays"
],
[
"numpy.rec.find_duplicate",
"numpy.char.encode",
... |
chaekit/pytorch | [
"132f5c1f36698361149ea99ca3504bd2acfdc19f",
"132f5c1f36698361149ea99ca3504bd2acfdc19f"
] | [
"torch/nn/parallel/distributed.py",
"test/backward_compatibility/check_backward_compatibility.py"
] | [
"import copy\nimport inspect\nimport itertools\nimport logging\nimport os\nimport warnings\nfrom contextlib import contextmanager\nfrom typing import NamedTuple\n\nimport torch\nimport torch.distributed as dist\n\nRPC_AVAILABLE = False\nif dist.is_available():\n from torch.distributed.distributed_c10d import Red... | [
[
"torch.distributed._register_comm_hook",
"torch.distributed._verify_model_across_ranks",
"torch.zeros",
"torch.distributed.Logger",
"torch.distributed.distributed_c10d._get_default_group",
"torch.no_grad",
"torch.cuda.stream",
"torch.distributed.get_rank",
"torch.is_grad_enable... |
fahmirevo/sign-language-recognition | [
"ff5e3f4ffb7ecba15667be8870db62717f1fab66"
] | [
"test.py"
] | [
"from keras.models import load_model\nimport numpy as np\n\nX = np.load(\"dataset/X_test.npy\")\nY = np.load(\"dataset/Y_test.npy\")\n\nmodel = load_model(\"model\")\n\nscore = model.evaluate(X, Y)\n\nprint(score[0], score[1])\n\n# print(np.argmax(model.predict(X[:200]), axis=1))\n# print(np.argmax(model.predict(X)... | [
[
"numpy.load"
]
] |
deloragaskins/deepchem | [
"234ab699cdb997e5963966a8b6926cb2cda7c064",
"234ab699cdb997e5963966a8b6926cb2cda7c064",
"234ab699cdb997e5963966a8b6926cb2cda7c064",
"234ab699cdb997e5963966a8b6926cb2cda7c064",
"234ab699cdb997e5963966a8b6926cb2cda7c064"
] | [
"deepchem/molnet/load_function/factors_datasets.py",
"deepchem/dock/tests/test_pose_generation.py",
"deepchem/utils/voxel_utils.py",
"deepchem/models/tests/test_weave_models.py",
"deepchem/rl/tests/test_rl_reload.py"
] | [
"\"\"\"\nFACTOR dataset loader\n\"\"\"\nimport os\nimport logging\nimport time\n\nimport numpy as np\nimport deepchem\nfrom deepchem.molnet.load_function.kaggle_features import merck_descriptors\n\nlogger = logging.getLogger(__name__)\n\nTRAIN_URL = \"https://deepchemdata.s3-us-west-1.amazonaws.com/datasets/FACTORS... | [
[
"numpy.count_nonzero"
],
[
"numpy.array"
],
[
"numpy.expand_dims",
"numpy.array",
"numpy.zeros",
"numpy.floor"
],
[
"numpy.array",
"numpy.random.seed",
"tensorflow.random.set_seed"
],
[
"tensorflow.Variable",
"tensorflow.reshape",
"numpy.ones",
"... |
msc5/junior-iw | [
"d356e015fcd3a3be638097a1acc02d5dea4751aa"
] | [
"src/data/datasets/BAIR/BAIR.py"
] | [
"import os\nimport io\nimport numpy as np\nfrom PIL import Image\nimport torch\n\nfrom torchvision.transforms import ToTensor\n\n\nclass BAIR (object):\n\n \"\"\"Data Handler that loads robot pushing data.\"\"\"\n\n def __init__(self, data_root, train=True, seq_len=20, image_size=64):\n self.root_dir =... | [
[
"torch.utils.data.DataLoader",
"numpy.random.seed",
"torch.cat"
]
] |
glaswasser/python-vision | [
"706c314a86b8f35c313bb3e907ae84317dca1a0b"
] | [
"samples/snippets/detect/label-products.py"
] | [
"\nfrom detect import (detect_logos, detect_text)\nimport pandas as pd\nimport re\nimport os\n#from __future__ import print_function\nfrom google.cloud import vision\n\n\nimages_path = \"C:\\\\Users\\\\heinz\\\\Yagora GmbH\\\\Ievgen Kyrda - Crawler\\\\images\\\\foodnewsgermany_images/\"\nfile_names = os.listdir(os.... | [
[
"pandas.set_option"
]
] |
mustafamerttunali/Tensorflow-Training-GUI | [
"1992185fd18e768f30c5bb5edd08ea709be97b09",
"1992185fd18e768f30c5bb5edd08ea709be97b09"
] | [
"tests/test_basic.py",
"tests/img2array.py"
] | [
"import os\nimport numpy as np\nfrom tensorflow.keras.models import Sequential\nfrom tensorflow.keras.layers import Dense\nfrom multiprocessing import Process\n\n\ndef startTensorboard(logdir):\n # Start tensorboard with system call\n os.system(\"tensorboard --logdir {}\".format(logdir))\n\n\ndef fitModel():\... | [
[
"tensorflow.keras.layers.Dense",
"numpy.random.random",
"tensorflow.keras.models.Sequential",
"numpy.random.randint"
],
[
"tensorflow.keras.models.load_model",
"numpy.expand_dims",
"tensorflow.keras.preprocessing.image.load_img",
"tensorflow.keras.applications.mobilenet_v2.prep... |
YonginKwon/glow | [
"7d316d028e1792534416755bf80af422adccdaa9",
"7d316d028e1792534416755bf80af422adccdaa9",
"7d316d028e1792534416755bf80af422adccdaa9",
"7d316d028e1792534416755bf80af422adccdaa9"
] | [
"torch_glow/tests/nodes/adaptive_avg_pool2d_test.py",
"torch_glow/tests/nodes/quantized_linear_test.py",
"torch_glow/tests/nodes/quantized_conv2d_relu_test.py",
"torch_glow/tests/nodes/rsub_test.py"
] | [
"from __future__ import absolute_import, division, print_function, unicode_literals\n\nimport torch\nimport torch.nn.functional as F\n\nfrom tests.utils import jitVsGlow\nimport unittest\n\n\nclass TestAdaptiveAvgPool2d(unittest.TestCase):\n def test_adaptive_avg_pool2d_basic(self):\n \"\"\"Basic test of ... | [
[
"torch.randn",
"torch.nn.functional.adaptive_avg_pool2d"
],
[
"torch.nn.Sequential",
"torch.nn.quantized.DeQuantize",
"torch.quantization.prepare",
"torch.cat",
"torch.nn.quantized.functional.linear",
"torch.randn",
"torch.reshape",
"torch.tensor",
"torch.quantizati... |
sdat2/seager19 | [
"9c3acbc5332da787de1eda2600a82490ff20fa11"
] | [
"src/visualisation/arrow.py"
] | [
"\"\"\"Arrow plots for mechanism.\"\"\"\nimport os\nfrom src.plot_utils import ps_defaults\nfrom src.constants import FIGURE_PATH\nfrom typing import Optional\nimport matplotlib.pyplot as plt\n\n\ndef plot_arrow_plot(save_path: Optional[str] = None, show_plots: bool = False) -> None:\n \"\"\"\n Plot the arrow... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.axes",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.clf",
"matplotlib.pyplot.fill_between",
"matplotlib.pyplot.xticks",
"matplotlib.pyplot... |
vespos/pcdsdevices | [
"7c4728df62ea58b6491d1cb36bb39d27d6dd9fca"
] | [
"pcdsdevices/tests/test_ccm.py"
] | [
"import logging\nimport time\n\nimport numpy as np\nimport pytest\nfrom ophyd.sim import fake_device_cache, make_fake_device\n\nfrom .. import ccm\nfrom ..sim import FastMotor\n\nlogger = logging.getLogger(__name__)\n\n\nSAMPLE_ALIO = 4.575 # Current value as of writing this file\nSAMPLE_THETA = 1.2 # Modest angl... | [
[
"numpy.isclose"
]
] |
ElliotCheung/simpeg | [
"ce5bde154179ca63798a62a12787a7ec3535472c",
"ce5bde154179ca63798a62a12787a7ec3535472c"
] | [
"SimPEG/electromagnetics/analytics/FDEM.py",
"SimPEG/electromagnetics/static/resistivity/simulation_1d.py"
] | [
"from __future__ import division\nimport numpy as np\nfrom scipy.constants import mu_0, pi, epsilon_0\nfrom scipy.special import erf\nfrom SimPEG import utils\nimport warnings\n\n\ndef hzAnalyticDipoleF(r, freq, sigma, secondary=True, mu=mu_0):\n \"\"\"\n The analytical expression is given in Equation 4.56 in... | [
[
"numpy.sqrt",
"numpy.exp",
"numpy.abs"
],
[
"numpy.dot",
"numpy.ones_like",
"numpy.tanh",
"numpy.zeros",
"numpy.empty"
]
] |
jiacheng1gujiaxin/poseface | [
"316924e224477f881240712a13a925bdd27adf4c",
"316924e224477f881240712a13a925bdd27adf4c"
] | [
"img2pose/utils/renderer.py",
"img2pose/losses.py"
] | [
"import cv2\nimport numpy as np\nfrom Sim3DR import RenderPipeline\n\nfrom .pose_operations import plot_3d_landmark\n\n\ndef _to_ctype(arr):\n if not arr.flags.c_contiguous:\n return arr.copy(order=\"C\")\n return arr\n\n\ndef get_colors(img, ver):\n h, w, _ = img.shape\n ver[0, :] = np.minimum(n... | [
[
"numpy.maximum",
"numpy.min",
"numpy.asarray",
"numpy.round",
"numpy.max",
"numpy.zeros_like",
"numpy.load",
"numpy.array"
],
[
"torch.nn.functional.l1_loss",
"torch.cat",
"torch.Tensor",
"torch.nn.functional.cross_entropy",
"torch.nn.functional.mse_loss",
... |
macarro/imputena | [
"3a94ae1419a2af0d9707b20546ee078929ce99e8"
] | [
"imputena/simple_imputation/linear_regression.py"
] | [
"import pandas as pd\nimport numpy as np\nfrom sklearn import linear_model\nimport logging\n\n\ndef linear_regression(\n data=None, dependent=None, predictors=None, regressions='available',\n noise=False, inplace=False):\n \"\"\"Performs simple or multiple linear regression imputation on the data.\... | [
[
"numpy.random.randn",
"sklearn.linear_model.LinearRegression",
"pandas.isnull"
]
] |
nmningmei/metacognition | [
"734082e247cc7fc9d277563e2676e10692617a3f",
"734082e247cc7fc9d277563e2676e10692617a3f",
"734082e247cc7fc9d277563e2676e10692617a3f",
"734082e247cc7fc9d277563e2676e10692617a3f",
"734082e247cc7fc9d277563e2676e10692617a3f"
] | [
"3 experiments_confidence/batch/e2 (experiment and chance scores) (cpj).py",
"scripts/classifcation_pos_n_trials_back (cv counts).py",
"3 experiments_confidence/analysis e2.py",
"3 experiments_correctness/batch/e2 (experiment and chance scores) (ack).py",
"3 experiments_confidence/batch/e2 (experiment and c... | [
"#!/usr/bin/env python2\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Nov 12 16:07:58 2018\n\n@author: nmei\n\nin exp2 (e2) there were 3 possible awareness ratings ( (e.g. 1- no experience, 2 brief glimpse 3 almost clear or clear perception)\nBUT if can make a binary classification by focussing on 1 and 2 which ... | [
[
"numpy.arange",
"pandas.read_csv",
"numpy.random.seed",
"pandas.DataFrame"
],
[
"numpy.arange",
"numpy.random.seed",
"pandas.DataFrame"
],
[
"numpy.arange",
"pandas.read_csv",
"numpy.random.seed",
"pandas.DataFrame"
],
[
"numpy.arange",
"pandas.read_... |
christianwbrock/algol-reduction | [
"5e85734d9e9e31985ead3ce40e67535418351010",
"5e85734d9e9e31985ead3ce40e67535418351010"
] | [
"reduction/test/plot_algol_h_alpha_line.py",
"reduction/scripts/generate_report.py"
] | [
"\nimport matplotlib.pyplot as plt\nfrom reduction.algol_h_alpha_line_model import AlgolHAlphaModel\n\n\nif __name__ == '__main__':\n\n AlgolHAlphaModel().plot(plt.axes())\n plt.show()\n",
"\"\"\"\\\nGenerate LaTeX report displaying spectra normalized around the H_alpha line.\n\"\"\"\n\nimport logging\nimpo... | [
[
"matplotlib.pyplot.axes",
"matplotlib.pyplot.show"
],
[
"numpy.nanmax",
"matplotlib.pyplot.title",
"numpy.min",
"numpy.asarray",
"numpy.nanmin",
"matplotlib.pyplot.savefig",
"numpy.ceil",
"numpy.max",
"numpy.argmax",
"numpy.argmin",
"matplotlib.pyplot.close"... |
lidongyv/Explicit-Context-Mapping-for-Stereo-Matching | [
"9b2e63982daf5629045de0bf0694d8ccb111b2f1",
"9b2e63982daf5629045de0bf0694d8ccb111b2f1",
"9b2e63982daf5629045de0bf0694d8ccb111b2f1",
"9b2e63982daf5629045de0bf0694d8ccb111b2f1"
] | [
"cmf/models/cmfsm.py",
"back of code/CMF/cmf/models/rstereo-20181014164030.py",
"back of code/CMF/cmf/models/rstereo-20181014164536.py",
"cmf/loader/KITTI.py"
] | [
"# -*- coding: utf-8 -*-\n# @Author: yulidong\n# @Date: 2018-07-17 10:44:43\n# @Last Modified by: yulidong\n# @Last Modified time: 2019-03-01 14:12:35\n# -*- coding: utf-8 -*-\n# @Author: lidong\n# @Date: 2018-03-20 18:01:52\n# @Last Modified by: yulidong\n# @Last Modified time: 2018-07-16 22:16:14\nimport ... | [
[
"torch.nn.Sequential",
"torch.cat",
"torch.nn.ConvTranspose3d",
"torch.nn.init.constant_",
"torch.nn.Conv2d",
"torch.sum",
"torch.nn.Sigmoid",
"torch.nn.Conv3d",
"torch.nn.AvgPool2d",
"torch.no_grad",
"torch.nn.LeakyReLU",
"torch.arange",
"torch.topk",
"torc... |
khirotaka/testbed | [
"e32384a3267d5282fb9f2df22597dfa7fb9aa17d"
] | [
"examples/sw.py"
] | [
"import time\nimport numpy as np\nfrom testbed._rust import sliding_window\n\n\nx = np.random.randn(5000, 5)\n\n\ns = time.time()\nrustout = sliding_window(x, 100, 1)\nprint(\"=\" * 50)\nprint(\"Rust Speed: \", time.time() - s)\nprint(rustout.shape)\n\n\ndef sw(array, ws, over):\n sl = len(array)\n return [... | [
[
"numpy.random.randn",
"numpy.stack"
]
] |
katianaz/GiftHelper | [
"1fbff4e7902c25950a5f50f04f0b2c834842ccbe"
] | [
"informacoes_emails.py"
] | [
"import pontuacao_categorias\r\nimport pandas as pd\r\n\r\nnomes = []\r\nnomes_presenteados = []\r\nenderecos_emails = []\r\n\r\nfor p in range(len(pontuacao_categorias.tabela.index)):\r\n nomes.append(pontuacao_categorias.tabela['3'][p])\r\n nomes_presenteados.append(pontuacao_categorias.tabela['4'][p])\r\n ... | [
[
"pandas.DataFrame"
]
] |
tfgraph/tfgraph | [
"19ae968b3060275c631dc601757646abaf1f58a1"
] | [
"examples/example_sparsifier_graph.py"
] | [
"#!/usr/bin/python3\n\nimport tensorflow as tf\nimport tfgraph\n\n\ndef main():\n with tf.Session() as sess:\n g: tfgraph.Graph = tfgraph.GraphConstructor.unweighted_random(sess, \"G\", 10, 85)\n g_sparse: tfgraph.Graph = tfgraph.GraphConstructor.as_sparsifier(sess, g, 0.75)\n\n print(g)\n print(g.m)\n... | [
[
"tensorflow.Session"
]
] |
HeyLifeHD/rp-bp | [
"9c59b1bc0267400747477467c45f96364d5528e1"
] | [
"rpbp/analysis/profile_construction/visualize_metagene_profile_bayes_factor.py"
] | [
"#! /usr/bin/env python3\n\nimport matplotlib\nmatplotlib.use('agg')\n\nimport argparse\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\nimport logging\n\ndefault_title = \"Metagene profile Bayes' factors\"\ndefault_xlabel = \"Offset, relative to translation \\ninitiation site\"\ndefault_y... | [
[
"pandas.read_csv",
"matplotlib.use",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.suptitle"
]
] |
B612-Asteroid-Institute/thor | [
"d3d1dcbe86f67a62c90b4cde3fc577e414825cf2"
] | [
"thor/orbit.py"
] | [
"import numpy as np\n\nfrom .utils import _checkTime\nfrom .vectors import calcNae\nfrom .vectors import calcDelta\nfrom .vectors import calcXae\nfrom .vectors import calcXa\nfrom .vectors import calcNhat\nfrom .vectors import calcR1\nfrom .vectors import calcR2\nfrom .projections import cartesianToGnomonic\nfrom .... | [
[
"numpy.degrees",
"numpy.array",
"numpy.zeros_like",
"numpy.linalg.norm"
]
] |
bullocke/yatsm_nrt | [
"b0ded56032bf9f9dcdf6b7b749f6554ade56de1e",
"b0ded56032bf9f9dcdf6b7b749f6554ade56de1e"
] | [
"yatsm/cache.py",
"tests/algorithms/test_postprocess.py"
] | [
"\"\"\" Functions related to writing to and retrieving from cache files\n\"\"\"\nimport os\n\nimport numpy as np\n\nfrom log_yatsm import logger\n\n_image_ID_str = 'image_IDs'\n\n\ndef get_line_cache_name(dataset_config, n_images, row, nbands):\n \"\"\" Returns cache filename for specified config and line number... | [
[
"numpy.testing.assert_equal",
"numpy.array_equal",
"numpy.asarray",
"numpy.in1d",
"numpy.savez_compressed",
"numpy.argsort",
"numpy.load",
"numpy.zeros"
],
[
"numpy.testing.assert_array_equal",
"numpy.zeros_like",
"sklearn.linear_model.LinearRegression",
"numpy.... |
mewbak/hypertools | [
"bc2947737be8bd5a6e2a3bdca84132f6fee8989c",
"bc2947737be8bd5a6e2a3bdca84132f6fee8989c"
] | [
"examples/plot_hue.py",
"hypertools/tools/df2mat.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\n=============================\nGrouping data by category\n=============================\n\nWhen plotting, its useful to have a way to color points by some category or\nvariable. Hypertools does this using the `hue` kwarg, which takes a list\nof string category labels or numerical ... | [
[
"numpy.random.randint"
],
[
"pandas.get_dummies"
]
] |
gewoonrik/pullreqs-dnn | [
"dbafd1866c1cd44424d238618e5ca54841c358c0"
] | [
"preprocess.py"
] | [
"#!/usr/bin/env python\n#\n# (c) 2016 -- onwards Georgios Gousios <gousiosg@gmail.com>, Rik Nijessen <riknijessen@gmail.com>\n#\n\n\nfrom __future__ import print_function\n\nimport pickle\nimport random\nimport urllib\nimport numpy as np\nimport argparse\n\nfrom config import *\nfrom code_tokenizer import CodeToken... | [
[
"numpy.asarray"
]
] |
andrewcistola/value-based-healthcare | [
"12583c33bff8dee83a7daf5aaaf1e7c39883a279"
] | [
"READMIT/alpha/fp_VBHC_READMIT_BEA_FIPS_alpha.py"
] | [
"# FractureProof\n## Value Based Healthcare Project\n### Outcome \n#### CMS Hospital Wiide Readmission Rate 2018 \n### Predictors\n#### BEA 2018 County wide Economic Measures\n### Table Key\n#### State County FIPS\n\n### Set working directory to project folder\nos.chdir(\"C:/Users/drewc/GitHub/allocativ\") # Set wd... | [
[
"sklearn.ensemble.RandomForestRegressor",
"pandas.merge",
"pandas.read_csv",
"sklearn.impute.SimpleImputer",
"pandas.DataFrame",
"sklearn.linear_model.LinearRegression",
"sklearn.feature_selection.RFECV",
"sklearn.preprocessing.StandardScaler",
"sklearn.decomposition.PCA"
]
] |
niallscc/Optimus | [
"35218401556e5acc4beb2859084128ebcd1ab4e5"
] | [
"optimus/engines/base/dataframe/columns.py"
] | [
"from functools import reduce\n\nfrom sklearn.preprocessing import MinMaxScaler, MaxAbsScaler, StandardScaler\n\nfrom optimus.engines.base.columns import BaseColumns\nfrom optimus.helpers.columns import parse_columns, name_col\nfrom optimus.helpers.constants import Actions\nfrom optimus.helpers.raiseit import Raise... | [
[
"sklearn.preprocessing.StandardScaler",
"sklearn.preprocessing.MaxAbsScaler",
"sklearn.preprocessing.MinMaxScaler"
]
] |
dspub99/betazero | [
"b1adf9885166e6fb4974952292653efeea1b19dc"
] | [
"mctsPlayer.py"
] | [
"#!/usr/bin/env python\n\nimport numpy as np\n\nfrom randomPlayer import RandomPlayer\nimport game\nimport play\n\n# Run MCTS with MC to estimate the rest of the game.\n# http://mcts.ai/about/index.html\n# http://ccg.doc.gold.ac.uk/wp-content/uploads/2016/10/browne_tciaig12_1.pdf\n\nclass UCT:\n def __init__(sel... | [
[
"numpy.log",
"numpy.array",
"numpy.sqrt",
"numpy.random.RandomState"
]
] |
Global19-atlassian-net/datasets | [
"db298928fe0e45907fcd61443d2319665a933afc"
] | [
"tensorflow_datasets/core/dataset_utils.py"
] | [
"# coding=utf-8\n# Copyright 2020 The TensorFlow Datasets 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 ... | [
[
"tensorflow.compat.v2.executing_eagerly",
"tensorflow.compat.v2.compat.v1.data.make_initializable_iterator",
"tensorflow.compat.v2.compat.v1.data.get_output_shapes",
"tensorflow.compat.v2.nest.pack_sequence_as",
"tensorflow.compat.v2.nest.flatten",
"tensorflow.compat.v2.TensorShape"
]
] |
JingyaHuang/transformers | [
"6589e510fa4e6c442059de2fab84752535de9b23",
"6589e510fa4e6c442059de2fab84752535de9b23"
] | [
"tests/models/bloom/test_modeling_bloom.py",
"src/transformers/models/transfo_xl/modeling_transfo_xl.py"
] | [
"# coding=utf-8\n# Copyright 2022 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\... | [
[
"torch.LongTensor",
"torch.ones",
"torch.cat",
"torch.no_grad",
"torch.cuda.is_available",
"torch.allclose",
"torch.ones_like"
],
[
"torch.nn.functional.softmax",
"torch.nn.init.uniform_",
"torch.zeros",
"torch.cat",
"torch.sum",
"torch.nn.Embedding",
"t... |
fjaragones/fastai | [
"be48d209a4526191f71dc7adaef090828897b9ec"
] | [
"old/fastai/structured.py"
] | [
"from .imports import *\n\nfrom sklearn_pandas import DataFrameMapper\nfrom sklearn.preprocessing import LabelEncoder, Imputer, StandardScaler\nfrom pandas.api.types import is_string_dtype, is_numeric_dtype\nfrom sklearn.ensemble import forest\nfrom sklearn.tree import export_graphviz\n\n\ndef set_plot_sizes(sml, m... | [
[
"sklearn.tree.export_graphviz",
"sklearn.ensemble.forest.check_random_state",
"pandas.api.types.is_numeric_dtype",
"sklearn.preprocessing.StandardScaler",
"sklearn.preprocessing.LabelEncoder",
"pandas.api.types.is_string_dtype"
]
] |
dizcza/pytorch-mighty | [
"942c53b529377c9100bffc2f7f20ec740763e6ae",
"942c53b529377c9100bffc2f7f20ec740763e6ae"
] | [
"mighty/trainer/autoencoder.py",
"mighty/monitor/mutual_info/neural_estimation.py"
] | [
"from typing import Union\n\nimport torch\nimport torch.nn as nn\nimport torch.utils.data\nfrom torch.optim.lr_scheduler import _LRScheduler, ReduceLROnPlateau\nfrom torch.optim.optimizer import Optimizer\n\nfrom mighty.loss import LossPenalty\nfrom mighty.models import AutoencoderLinear\nfrom mighty.monitor.monito... | [
[
"torch.isfinite",
"torch.no_grad"
],
[
"numpy.log2",
"torch.isnan",
"torch.cat",
"torch.zeros",
"torch.randperm",
"torch.optim.lr_scheduler.ExponentialLR",
"torch.nn.Linear",
"torch.cuda.is_available",
"torch.stack",
"torch.distributions.normal.Normal",
"tor... |
RussellM2020/RoboticTasks | [
"c7157c986cdbbf08cc0ea296205ef2dbcf6fc487"
] | [
"rllab/misc/instrument.py"
] | [
"import os\nimport re\nimport subprocess\nimport base64\nimport os.path as osp\nimport pickle as pickle\nimport inspect\nimport hashlib\nimport sys\nfrom contextlib import contextmanager\n\nimport errno\n\nfrom rllab.core.serializable import Serializable\nfrom rllab import config\nfrom rllab.misc.console import mkd... | [
[
"numpy.random.shuffle"
]
] |
jlo118/DLlab2 | [
"01978907f48cfeb5cc406564a64454dc6b4f8485"
] | [
"Q2.py"
] | [
"import pandas\r\nfrom keras.models import Sequential\r\nfrom keras.layers.core import Dense, Activation\r\nfrom keras.callbacks import TensorBoard\r\n# load dataset\r\nfrom sklearn.model_selection import train_test_split\r\nimport pandas as pd\r\n\r\ndataset = pd.read_csv(\"framingham.csv\", header=None).values\r\... | [
[
"pandas.read_csv",
"sklearn.model_selection.train_test_split",
"numpy.random.seed"
]
] |
raoyongming/CAL | [
"76475ff56e399b276630d8bf3a4f5594803609a6"
] | [
"reid/modeling/baseline.py"
] | [
"import torch\nfrom torch import nn\nimport torch.nn.functional as F\nimport sys\n\nfrom .backbones.resnet import ResNet\nsys.path.append('.')\n\n\nEPSILON = 1e-12\n\n\ndef weights_init_kaiming(m):\n classname = m.__class__.__name__\n if classname.find('Linear') != -1:\n nn.init.kaiming_normal_(m.weigh... | [
[
"torch.abs",
"torch.nn.functional.softmax",
"torch.cat",
"torch.sign",
"torch.split",
"torch.nn.AdaptiveMaxPool2d",
"torch.einsum",
"torch.nn.Sigmoid",
"torch.nn.functional.relu",
"torch.ones_like",
"torch.nn.BatchNorm1d",
"torch.nn.init.constant_",
"torch.nn.Co... |
cheewoei1997/sentiment-analysis | [
"e936824de57a8cd40586a1a19145c6205b6c0843"
] | [
"sample_application/__init__.py"
] | [
"from flask import Flask, render_template, flash, request\nfrom flask_bootstrap import Bootstrap\nfrom flask_appconfig import AppConfig\nfrom flask_wtf import Form, RecaptchaField\nfrom flask_wtf.file import FileField\nfrom wtforms import TextField, HiddenField, ValidationError, RadioField,\\\n BooleanField, Sub... | [
[
"sklearn.linear_model.LogisticRegression",
"sklearn.naive_bayes.MultinomialNB",
"sklearn.naive_bayes.BernoulliNB",
"sklearn.svm.SVC",
"sklearn.svm.LinearSVC"
]
] |
semitable/multiagent-particle-envs | [
"2cef12f72a9192a819ef289646526801c39fb909",
"2cef12f72a9192a819ef289646526801c39fb909"
] | [
"mpe/environment.py",
"mpe/scenarios/climbing_spread.py"
] | [
"import gym\nfrom gym import spaces\nfrom gym.envs.registration import EnvSpec\nimport numpy as np\nfrom mpe.multi_discrete import MultiDiscrete\nimport copy\n\n# environment for all agents in the multiagent world\n# currently code assumes that no agents will be created/destroyed at runtime!\nclass MultiAgentEnv(gy... | [
[
"numpy.linspace",
"numpy.cos",
"numpy.sin",
"numpy.all",
"numpy.argmax",
"numpy.array",
"numpy.zeros",
"numpy.sum"
],
[
"numpy.concatenate",
"numpy.square",
"numpy.array",
"numpy.zeros"
]
] |
pyjsdev/googlemap_flask | [
"9d0dd899a9cbf756b3d83c33e3d8a47e7db40cc5",
"9d0dd899a9cbf756b3d83c33e3d8a47e7db40cc5",
"9d0dd899a9cbf756b3d83c33e3d8a47e7db40cc5",
"9d0dd899a9cbf756b3d83c33e3d8a47e7db40cc5",
"47aa8f8420944c47e876c1c36be182d257c14b87",
"9d0dd899a9cbf756b3d83c33e3d8a47e7db40cc5"
] | [
"examples/charts/file/hover_span.py",
"examples/models/image_url.py",
"bokeh/core/json_encoder.py",
"examples/compat/pandas_dataframe.py",
"examples/models/dateaxis.py",
"bokeh/core/tests/test_properties.py"
] | [
"import pandas as pd\n\nfrom bokeh.charts import Line, Scatter, show, output_file, defaults\nfrom bokeh.layouts import gridplot\nfrom bokeh.models import HoverTool\nfrom bokeh.sampledata.degrees import data\n\ndefaults.width = 500\ndefaults.height = 300\n\nTOOLS='box_zoom,box_select,hover,crosshair,reset'\n\nTOOLTI... | [
[
"pandas.melt"
],
[
"numpy.linspace"
],
[
"numpy.timedelta64",
"numpy.datetime64"
],
[
"numpy.random.randn",
"pandas.date_range"
],
[
"numpy.arange",
"numpy.sin"
],
[
"numpy.complex128",
"numpy.uint32",
"numpy.uint8",
"numpy.float16",
"numpy.i... |
itamblyn/pytorch_geometric | [
"67ed16492863378b8434b03713a75924f0cc5df1",
"86308313d6f1af56e5931e2ca89bb1a867c10ff3",
"67ed16492863378b8434b03713a75924f0cc5df1",
"86308313d6f1af56e5931e2ca89bb1a867c10ff3",
"86308313d6f1af56e5931e2ca89bb1a867c10ff3",
"86308313d6f1af56e5931e2ca89bb1a867c10ff3",
"86308313d6f1af56e5931e2ca89bb1a867c10ff... | [
"torch_geometric/nn/conv/han_conv.py",
"torch_geometric/transforms/one_hot_degree.py",
"torch_geometric/nn/conv/cg_conv.py",
"torch_geometric/loader/neighbor_sampler.py",
"examples/proteins_diff_pool.py",
"benchmark/citation/appnp.py",
"benchmark/kernel/sag_pool.py",
"torch_geometric/nn/models/schnet.... | [
"from typing import Union, Dict, Optional, List\r\n\r\nimport torch\r\nfrom torch import Tensor, nn\r\nimport torch.nn.functional as F\r\n\r\nfrom torch_geometric.typing import NodeType, EdgeType, Metadata, Adj\r\nfrom torch_geometric.nn.dense import Linear\r\nfrom torch_geometric.utils import softmax\r\nfrom torch... | [
[
"torch.nn.functional.softmax",
"torch.Tensor",
"torch.nn.functional.dropout",
"torch.nn.ParameterDict",
"torch.nn.ModuleDict",
"torch.nn.Linear",
"torch.nn.functional.relu",
"torch.nn.functional.leaky_relu",
"torch.stack"
],
[
"torch.nn.functional.one_hot"
],
[
... |
anibalsolon/brainhack-donostia.github.io | [
"ad4f30f938923af7ff85fed542972f94f2032d13"
] | [
"populate_projects.py"
] | [
"import os\nimport pandas as pd\nfrom string import Template\nimport wget\n\ncsv_file_path = \"https://docs.google.com/spreadsheets/d/1AlflVlTg1KmajQrWBOUBT2XeoAUqfjB9SCQfDIPvSXo/export?format=csv&gid=565678921\"\nproject_card_path = \"assets/templates/project_card.html\"\nprojects_page_path = \"assets/templates/te... | [
[
"pandas.read_csv"
]
] |
kylepgr/heart-disease-pred | [
"d128cc815dde4839ba18e887113bb47387499ce1"
] | [
"heart_app/views.py"
] | [
"from typing_extensions import SupportsIndex\r\nfrom django.shortcuts import render\r\n\r\n# Create your views here.\r\nfrom django.http import HttpResponse\r\nfrom .forms import InputForm\r\nimport pandas as pd\r\nimport numpy as np\r\nimport pickle\r\nfrom pymongo import MongoClient\r\n\r\nclient = MongoClient('l... | [
[
"numpy.exp"
]
] |
JanaLasser/agent_based_COVID_SEIRX | [
"c4e28d472a0484fe1a125ba6974683973141c09e",
"c4e28d472a0484fe1a125ba6974683973141c09e"
] | [
"src/scseirx/model_SEIRX.py",
"src/scseirx/model_school.py"
] | [
"import numpy as np\nimport networkx as nx\nfrom math import gamma\nfrom scipy.optimize import root_scalar\n\nfrom mesa import Model\nfrom mesa.time import RandomActivation, SimultaneousActivation\nfrom mesa.datacollection import DataCollector\n\nfrom scseirx.testing_strategy import Testing\n\n## data collection fu... | [
[
"numpy.random.weibull",
"numpy.abs",
"numpy.random.seed",
"numpy.random.choice",
"numpy.asarray",
"scipy.optimize.root_scalar"
],
[
"numpy.asarray"
]
] |
sankar-mukherjee/DCASE-2018---Task-4- | [
"f8034641efef6e60ea721abc5569d9c1aa8ee56d"
] | [
"task4_crnn.py"
] | [
"# !/usr/bin/env python\n# -*- coding: utf-8 -*-\n#########################################################################\n# This code is an adaptation from Toni Heittola's code [task1 baseline dcase 2018](https://github.com/DCASE-REPO/dcase2018_baseline/tree/master/task1/)\n# Copyright Nicolas Turpault, Romain S... | [
[
"numpy.random.seed",
"numpy.arange",
"tensorflow.set_random_seed",
"tensorflow.get_default_graph",
"numpy.array"
]
] |
rockscie/async_blp | [
"acb8777ccf2499681bde87d76ca780b61219699c"
] | [
"tests/test_instruments_request.py"
] | [
"import pandas as pd\nimport pytest\n\nfrom async_blp.instruments_requests import InstrumentRequestBase\n\n\n@pytest.mark.asyncio\nclass TestInstrumentRequestBase:\n\n def test__weight(self):\n request = InstrumentRequestBase('query', max_results=5)\n request.response_fields = ['field_1', 'field_2'... | [
[
"pandas.testing.assert_frame_equal",
"pandas.DataFrame"
]
] |
olegs22/Quickquasar_QA | [
"df74994780216846501710b79b4dce7d025809c9"
] | [
"run_quickquasars.py"
] | [
"import numpy as np\nimport os\nimport shutil\nimport glob as glob\n\ndef get_slurm_script(script_name,command,outdir,idir,mail,log,part,nodes,threads,time,job_name):\n if os.path.isdir(outdir+'/run') == False:\n os.mkdir(outdir+'/run')\n file_name = outdir + '/run/' + script_name\n f = open(fi... | [
[
"numpy.random.seed",
"numpy.random.randint"
]
] |
marlon27/Light_FAMD | [
"fe4328f15f6145798869908fa126eabe75e85391"
] | [
"light_famd/mca.py"
] | [
"\"\"\"Multiple Correspondence Analysis (MCA)\"\"\"\n\nimport numpy as np\nfrom sklearn import utils\n\nfrom . import ca\nfrom . import one_hot\n\n\n\nclass MCA(ca.CA):\n\n def fit(self, X, y=None):\n if self.check_input:\n utils.check_array(X, dtype=[str, np.number])\n \n n_i... | [
[
"sklearn.utils.check_array",
"sklearn.utils.validation.check_is_fitted"
]
] |
shayxu-ai/A-Repository-for-Machine-Learning | [
"4b4cea15bb005d1c58f4395fde97cadf44fb0186",
"4b4cea15bb005d1c58f4395fde97cadf44fb0186"
] | [
"测试/tensorflow_hello/2.practices_on_nlp.py",
"contest/base_station_out_service_prediction/lgbm_main.py"
] | [
"# -*- coding: utf-8 -*-\n# @Time: 2020/2/5,005 22:02\n# @Last Update: 2020/2/5,005 22:02\n# @Author: 徐缘\n# @FileName: 2.practices_on_nlp.py\n# @Software: PyCharm\n\n\nfrom __future__ import absolute_import, division, print_function, unicode_literals # 导入一些熟悉的陌生人\n# 绝对引入,精确除法,print,unicode类型字符串。都是为了适配python2,不... | [
[
"matplotlib.pyplot.legend",
"tensorflow.executing_eagerly",
"matplotlib.pyplot.title",
"tensorflow.keras.layers.Embedding",
"tensorflow.keras.layers.Dense",
"tensorflow.config.experimental.list_physical_devices",
"tensorflow.keras.layers.GlobalAveragePooling1D",
"tensorflow.keras.S... |
friedenhe/OpenMDAO | [
"db1d7e22a8bf9f66afa82ec3544b7244d5545f6d",
"db1d7e22a8bf9f66afa82ec3544b7244d5545f6d",
"db1d7e22a8bf9f66afa82ec3544b7244d5545f6d",
"db1d7e22a8bf9f66afa82ec3544b7244d5545f6d",
"db1d7e22a8bf9f66afa82ec3544b7244d5545f6d",
"db1d7e22a8bf9f66afa82ec3544b7244d5545f6d",
"db1d7e22a8bf9f66afa82ec3544b7244d5545f6... | [
"openmdao/components/interp_util/interp.py",
"openmdao/core/tests/test_parallel_groups.py",
"openmdao/vectors/petsc_vector.py",
"openmdao/test_suite/components/matmultcomp.py",
"openmdao/test_suite/components/array_comp.py",
"openmdao/drivers/tests/test_scipy_optimizer.py",
"openmdao/core/tests/test_dyn... | [
"\"\"\"\nBase class for interpolation methods that calculate values for each dimension independently.\n\nBased on Tables in NPSS, and was added to bridge the gap between some of the slower scipy\nimplementations.\n\"\"\"\nimport numpy as np\n\nfrom openmdao.components.interp_util.interp_akima import InterpAkima, In... | [
[
"numpy.iscomplex",
"numpy.expand_dims",
"numpy.array_equal",
"numpy.linspace",
"numpy.asarray",
"numpy.isnan",
"numpy.issubdtype",
"numpy.atleast_2d",
"numpy.diff",
"numpy.broadcast_to",
"numpy.prod",
"numpy.iscomplexobj",
"numpy.any",
"numpy.outer",
"nu... |
mremilien/object-deformnet | [
"bb07fe05f1ee3983835ebe071252541cee5c42f8",
"bb07fe05f1ee3983835ebe071252541cee5c42f8",
"bb07fe05f1ee3983835ebe071252541cee5c42f8"
] | [
"data/shape_dataset.py",
"train_deform.py",
"lib/align.py"
] | [
"import h5py\nimport numpy as np\nimport torch.utils.data as data\n\n\nclass ShapeDataset(data.Dataset):\n def __init__(self, h5_file, mode, n_points=2048, augment=False):\n assert (mode == 'train' or mode == 'val'), 'Mode must be \"train\" or \"val\".'\n self.mode = mode\n self.n_points = n... | [
[
"numpy.random.uniform",
"numpy.random.randn",
"numpy.random.choice"
],
[
"torch.nn.functional.softmax",
"tensorflow.summary.FileWriter",
"torch.load",
"numpy.unique",
"torch.utils.data.DataLoader",
"torch.utils.data.sampler.SubsetRandomSampler",
"tensorflow.Summary.Valu... |
dileep-kishore/deeplearning-examples | [
"2b230ea17f366f602044d44cc8abcac419d4e521"
] | [
"deeplearning_examples/loaders/Churn.py"
] | [
"# @Author: dileep\n# @Last Modified by: dileep\n\nfrom collections import OrderedDict\nimport os\nfrom typing import Tuple, Iterable, Sequence, Dict, Union\nimport numpy as np\nimport pandas as pd\nfrom sklearn.preprocessing import LabelEncoder, OneHotEncoder\nfrom sklearn.model_selection import train_test_split... | [
[
"pandas.read_csv"
]
] |
Joshinn-io/augur | [
"e9410887f58af2b26c350edf08e3f70ff783bdc5"
] | [
"tests/test_metrics/test_issue_metrics.py"
] | [
"#SPDX-License-Identifier: MIT\n\nimport pytest\nimport pandas as pd\n\ndef test_issues_new(metrics):\n #repo_id\n assert metrics.issues_new(1, 1 , period='year').iloc[0]['issues'] > 0\n\n #repo_group_id\n assert metrics.issues_new(10, period='year').iloc[1]['issues'] > 0\n\n #begin_date & end_date\n... | [
[
"pandas.Timestamp"
]
] |
c-martinez/compactness | [
"679a1644e0cd3ded278e9917efe171b5e89fc780"
] | [
"pydescriptors/helpers.py"
] | [
"import numpy as _np\n\nfrom .moments import immoment3D as _immoment3D\n\ndef getSphere(side):\n \"\"\"Create a 3D volume of sideXsideXside, where voxels representing a\n sphere are ones and background is zeros.\n\n Keyword arguments:\n side -- the number of voxels the 3D volume should have on each side... | [
[
"numpy.dot",
"numpy.sqrt",
"numpy.arange",
"numpy.eye",
"numpy.cos",
"numpy.sin",
"numpy.zeros",
"numpy.vstack"
]
] |
yaront/MutSig | [
"456dc793ab2dbd955b5cef098fd14539d428de0b"
] | [
"scripts/Emdometrial/Statistics/mut_analysis.py"
] | [
"#!/usr/bin/env python2\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Jul 26 20:42:43 2018\n\n@author: tomer\n\"\"\"\n\n#%%\n# =================================================\n# # Mutation per gene\n# =================================================\n\nimport numpy as np\nimport pandas as pd\n\n#%%\n\n#tumor ... | [
[
"pandas.concat",
"numpy.unique",
"pandas.DataFrame",
"numpy.sort",
"pandas.read_table",
"pandas.ExcelWriter",
"numpy.array",
"pandas.to_numeric"
]
] |
polikutinevgeny/FrontsCNN | [
"a9f48d5afcdd7e0fe561840d94af36c0fedf1c15"
] | [
"dataset_results.py"
] | [
"import gc\nimport numpy as np\n\n\ndef dataset_results(dataset, model, binary=False):\n x = np.array([dataset[i][0][0] for i in range(len(dataset))])\n y_true = np.array([dataset[i][1][0] for i in range(len(dataset))])\n y_pred = model.predict(x, batch_size=1, verbose=0).flatten()\n if binary:\n ... | [
[
"numpy.argmax"
]
] |
MaxSobolMark/mbrl-lib | [
"bc8ccfe8a56b58d3ce5bae2c4ccdadd82ecdb594",
"bc8ccfe8a56b58d3ce5bae2c4ccdadd82ecdb594"
] | [
"mbrl/env/pets_reacher.py",
"mbrl/env/reward_functions/half_cheetah_jump_reward_function.py"
] | [
"import os\nfrom typing import Tuple\n\nimport numpy as np\nfrom numpy.random import MT19937, RandomState, SeedSequence\nimport torch\nfrom gym import utils\nfrom gym.envs.mujoco import mujoco_env\n\n\nclass Reacher3DEnv(mujoco_env.MujocoEnv, utils.EzPickle):\n def __init__(self, task_id=None, hide_goal=False):\... | [
[
"numpy.square",
"torch.sin",
"torch.zeros_like",
"numpy.linalg.norm",
"numpy.cos",
"torch.linalg.norm",
"numpy.concatenate",
"numpy.sin",
"numpy.copy",
"numpy.random.normal",
"numpy.random.SeedSequence",
"numpy.cross",
"numpy.zeros",
"torch.cos",
"torch.... |
mosesnah-shared/whip-project-targeting | [
"7f47598635f027e2cb05ad33b66ed67627d20329"
] | [
"MuJoCo/modules/utils.py"
] | [
"# [Built-in modules]\nimport os\nimport re\nimport sys\nimport shutil\nimport time, datetime\nimport math as myMath\nimport glob\n\n# [3rd party modules]\nimport cv2\nimport numpy as np\nimport xml.etree.ElementTree as ET\n\nimport sympy as sp\nfrom sympy.utilities.lambdify import lambdify, implem... | [
[
"numpy.array",
"numpy.flip",
"numpy.cos",
"numpy.sin"
]
] |
qpiel/gammapy | [
"cfb976909e63f4d5d578e1495245c0baad69482b",
"cfb976909e63f4d5d578e1495245c0baad69482b",
"cfb976909e63f4d5d578e1495245c0baad69482b"
] | [
"gammapy/stats/tests/test_significance.py",
"gammapy/irf/psf_3d.py",
"gammapy/spectrum/utils.py"
] | [
"# Licensed under a 3-clause BSD style license - see LICENSE.rst\nfrom __future__ import absolute_import, division, print_function, unicode_literals\nfrom numpy.testing import assert_allclose\nfrom ...stats import (\n significance_to_probability_normal,\n probability_to_significance_normal,\n probability_t... | [
[
"numpy.testing.assert_allclose"
],
[
"numpy.nanmax",
"matplotlib.pyplot.gca",
"matplotlib.pyplot.tight_layout",
"numpy.sqrt",
"numpy.nanmin",
"scipy.interpolate.RegularGridInterpolator",
"matplotlib.pyplot.subplots",
"numpy.column_stack",
"numpy.meshgrid",
"numpy.ze... |
tsfw/yolov3 | [
"bf6d03d9a84a0ac1e94bcc4f9a026f7d32dfbdab"
] | [
"dataReader.py"
] | [
"import os\nimport config\nimport json\nimport tensorflow as tf\nimport numpy as np\nfrom collections import defaultdict\n\nclass Reader:\n def __init__(self, mode, data_dir, anchors_path, num_classes, tfrecord_num = 12, input_shape = 416, max_boxes = 20):\n \"\"\"\n Introduction\n ---------... | [
[
"numpy.expand_dims",
"numpy.minimum",
"tensorflow.concat",
"tensorflow.FixedLenFeature",
"tensorflow.cast",
"tensorflow.minimum",
"tensorflow.py_func",
"tensorflow.data.TFRecordDataset",
"tensorflow.python_io.TFRecordWriter",
"tensorflow.subtract",
"numpy.argmax",
"... |
sebtac/MLxE | [
"93baa6b7c9fd14e54abd7199e868fb828e9a7c52"
] | [
"a3c_master_sewak.py"
] | [
"\"\"\" A3C in Code - Centralized/ Gobal Network Parameter Server/ Controller\n\nBased On:\n \nA3C Code as in the book Deep Reinforcement Learning, Chapter 12.\n\nRuntime: Python 3.6.5\nDependencies: numpy, matplotlib, tensorflow (/ tensorflow-gpu), gym\nDocStrings: GoogleStyle\n\nAuthor : Mohit Sewak (p20150023... | [
[
"tensorflow.convert_to_tensor",
"tensorflow.nn.softmax",
"numpy.random.random",
"matplotlib.pyplot.subplots",
"tensorflow.keras.optimizers.Adam",
"numpy.argmax",
"numpy.savetxt",
"matplotlib.pyplot.show"
]
] |
geflaspohler/deep-OTD | [
"0daec276669776952b5142149007175b8a3c4d87"
] | [
"examples/cdv/plttraj.py"
] | [
"import numpy as np\nimport matplotlib\nfrom matplotlib import pyplot as plt\n\nmatplotlib.rcParams['mathtext.fontset'] = 'stix'\nmatplotlib.rcParams['font.size'] = 9\n\nndim = 6\ndata = np.genfromtxt('dOTD_tst1.out')\n\nxticks = [900, 1100, 1300]\nyticks = [[0.7, 0.8, 0.9, 1],\n [-0.2, 0, 0.2, 0.4],\n ... | [
[
"matplotlib.pyplot.ylim",
"numpy.genfromtxt",
"matplotlib.pyplot.axes",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.figure"
]
] |
nate-russell/Jungle | [
"114d744ed66fec11b8d5e62444253892a7ffa5cd",
"114d744ed66fec11b8d5e62444253892a7ffa5cd"
] | [
"jungle/code/sorting.py",
"jungle/test_tree.py"
] | [
"'''\nSorting Examples for showcasing and developing Jungle features\n'''\nimport inspect\nfrom jungle import JungleExperiment, JungleProfiler\nimport numpy as np\n\nprint('Finished Loading Modules')\n\nclass Sorting_Prototype:\n\n print('\\n---Test Sort N---')\n @JungleExperiment(reps=1, n=[100, 500])\n d... | [
[
"numpy.sort",
"numpy.random.randn",
"numpy.random.seed"
],
[
"pandas.concat",
"matplotlib.pyplot.show",
"matplotlib.pyplot.title",
"numpy.unique"
]
] |
gmathez/Project_ADA_2018_Bruttin_Mathez_Petitpierre | [
"e237300b3d9fb966b0eb747dd66816cc6cfc11b3"
] | [
"main.py"
] | [
"# Import kivy tools\nfrom kivy.app import App\nfrom kivy.uix.boxlayout import BoxLayout\nfrom kivy.uix.gridlayout import GridLayout\nfrom kivy.uix.recycleboxlayout import RecycleBoxLayout\nfrom kivy.uix.label import Label\nfrom kivy.uix.button import Button\nfrom kivy.uix.checkbox import CheckBox\nfrom kivy.uix.sp... | [
[
"pandas.concat",
"pandas.read_csv",
"pandas.DataFrame.from_dict"
]
] |
edervishaj/spotify-recsys-challenge | [
"5e7844a77ce3c26658400f161d2d74d682f30e69",
"5e7844a77ce3c26658400f161d2d74d682f30e69",
"5e7844a77ce3c26658400f161d2d74d682f30e69",
"5e7844a77ce3c26658400f161d2d74d682f30e69",
"5e7844a77ce3c26658400f161d2d74d682f30e69",
"5e7844a77ce3c26658400f161d2d74d682f30e69"
] | [
"personal/Ervin/run_knn_collaborative_item.py",
"recommenders/script/creative/top_pop_album.py",
"recommenders/nlp_bm25.py",
"recommenders/nlp_strict.py",
"recommenders/model/cb_al_ar_bm25.py",
"recommenders/script/main/nlp_fusion.py"
] | [
"from utils.datareader import Datareader\nfrom utils.evaluator import Evaluator\nfrom utils.submitter import Submitter\nfrom utils.post_processing import eurm_to_recommendation_list_submission\nfrom utils.post_processing import eurm_to_recommendation_list\nfrom utils.pre_processing import norm_l1_row, norm_max_ro... | [
[
"scipy.sparse.save_npz"
],
[
"scipy.sparse.save_npz"
],
[
"scipy.sparse.load_npz",
"scipy.sparse.save_npz",
"scipy.sparse.csr_matrix",
"numpy.ones"
],
[
"scipy.sparse.save_npz",
"scipy.sparse.load_npz",
"pandas.concat"
],
[
"numpy.power",
"numpy.arange",... |
Valentinkvn/Udacity-Full-Autonomous-Vehicle-Project | [
"b1313345a09f84c122a91c1145230fe69da0d20f"
] | [
"ros/src/styx/bridge.py"
] | [
"\nimport rospy\n\nimport tf\nfrom geometry_msgs.msg import PoseStamped, Quaternion, TwistStamped\nfrom dbw_mkz_msgs.msg import SteeringReport, ThrottleCmd, BrakeCmd, SteeringCmd\nfrom std_msgs.msg import Float32 as Float\nfrom std_msgs.msg import Bool\nfrom sensor_msgs.msg import PointCloud2\nfrom sensor_msgs.msg ... | [
[
"numpy.asarray"
]
] |
HeegyuKim/face_recognition | [
"d96d2c94225e49d3dd8f2cae4444d35d5c88d13b"
] | [
"mfr2.py"
] | [
"import os\nimport shutil\n\nimport os\nfrom glob import glob\nimport pandas as pd\nimport random\nfrom collections import defaultdict\nfrom PIL import Image\nfrom torch.utils.data import Dataset, DataLoader\n\ndef get_all_images(dir):\n types = [\"jpeg\", \"jpg\", \"png\"]\n files = []\n for t in types:\n pa... | [
[
"pandas.DataFrame"
]
] |
cmarlin/agents | [
"1729e06f42237b34dab8bd9d8c01980c2d2b391c"
] | [
"tf_agents/experimental/examples/sac/haarnoja18/sac_train_eval.py"
] | [
"# coding=utf-8\n# Copyright 2020 The TF-Agents 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ... | [
[
"tensorflow.keras.layers.Concatenate",
"tensorflow.compat.v1.enable_v2_behavior",
"tensorflow.keras.layers.Lambda",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.optimizers.Adam",
"tensorflow.nest.map_structure"
]
] |
jdavidagudelo/tensorflow-models | [
"6f019beec73b01861363bf717706e27f4210b979",
"6f019beec73b01861363bf717706e27f4210b979",
"6f019beec73b01861363bf717706e27f4210b979",
"6f019beec73b01861363bf717706e27f4210b979",
"6f019beec73b01861363bf717706e27f4210b979",
"6f019beec73b01861363bf717706e27f4210b979",
"6f019beec73b01861363bf717706e27f4210b97... | [
"research/compression/entropy_coder/core/entropy_coder_train.py",
"research/object_detection/core/anchor_generator.py",
"research/morph_net/framework/concat_and_slice_regularizers_test.py",
"research/im2txt/im2txt/ops/inputs.py",
"research/maskgan/losses/losses.py",
"research/minigo/preprocessing_test.py"... | [
"# Copyright 2017 The TensorFlow Authors All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requi... | [
[
"tensorflow.Graph",
"tensorflow.summary.scalar",
"tensorflow.shape",
"tensorflow.app.flags.DEFINE_integer",
"tensorflow.train.exponential_decay",
"tensorflow.train.replica_device_setter",
"tensorflow.app.flags.DEFINE_string",
"tensorflow.summary.merge_all",
"tensorflow.train.Ad... |
gurukiran07/pandas | [
"3cce96f515917170ea9bce731ffcc913750464b8"
] | [
"pandas/tests/groupby/test_groupby.py"
] | [
"from datetime import datetime\nfrom decimal import Decimal\nfrom io import StringIO\n\nimport numpy as np\nimport pytest\n\nfrom pandas.compat import IS64\nfrom pandas.errors import PerformanceWarning\n\nimport pandas as pd\nfrom pandas import (\n Categorical,\n DataFrame,\n Grouper,\n Index,\n Mult... | [
[
"pandas._testing.assert_almost_equal",
"pandas.to_datetime",
"pandas.Series",
"pandas.MultiIndex.from_tuples",
"pandas.DataFrame",
"numpy.random.randn",
"pandas._testing.assert_frame_equal",
"numpy.random.randint",
"pandas._testing.assert_numpy_array_equal",
"numpy.arange",... |
kbrose/pytorch | [
"fc0b8e60337ae46b90ed5d2f6d1f623f0f8d6581"
] | [
"test/test_sort_and_select.py"
] | [
"import torch\nimport numpy as np\n\nimport random\nfrom torch._six import nan\nfrom itertools import permutations, product\n\nfrom torch.testing import all_types, all_types_and\nfrom torch.testing._internal.common_utils import \\\n (TEST_WITH_ROCM, TestCase, run_tests, make_tensor, slowTest)\nfrom torch.testing... | [
[
"torch.randint",
"torch.zeros",
"torch.testing.get_all_fp_dtypes",
"torch.testing.all_types_and",
"torch.testing.get_all_dtypes",
"torch.randperm",
"torch.testing._internal.common_device_type.largeTensorTest",
"torch.iinfo",
"torch.unique",
"torch.testing.get_all_int_dtypes... |
yssource/pandas-ta | [
"98478f8bf049a4c8748d6f3c795f4f335ced05ca",
"bf7e2b395596e8a75bed863e9ce0a0f34d14e829"
] | [
"pandas_ta/performance/log_return.py",
"pandas_ta/volatility/donchian.py"
] | [
"# -*- coding: utf-8 -*-\nfrom numpy import log as nplog\nfrom pandas_ta.utils import get_offset, verify_series\n\n\ndef log_return(close, length=None, cumulative=False, offset=None, **kwargs):\n \"\"\"Indicator: Log Return\"\"\"\n # Validate Arguments\n close = verify_series(close)\n length = int(lengt... | [
[
"numpy.log"
],
[
"pandas.DataFrame"
]
] |
Solara570/demo-solara | [
"3ce6df1fd68089c427bbd46fb0857e8b76428ca6",
"3ce6df1fd68089c427bbd46fb0857e8b76428ca6"
] | [
"articles/inversion.py",
"custom/custom_helpers.py"
] | [
"#coding=utf-8\n\n################################################################################################\n# A 3-part series on circle inversion, Descartes' theorem along with its variants, and more! #\n# #\n# ... | [
[
"numpy.dot",
"numpy.random.random",
"numpy.abs",
"numpy.sqrt",
"numpy.linalg.norm",
"numpy.ones",
"numpy.round",
"numpy.average",
"numpy.array",
"numpy.conjugate"
],
[
"numpy.clip"
]
] |
hannesb0/MSWH | [
"ce214f26369106c124052638e93cc38fbd58cc91"
] | [
"mswh/comm/tests/test_sql.py"
] | [
"import logging\r\nimport os\r\nimport unittest\r\n\r\nfrom mswh.comm.sql import Sql\r\n\r\nimport pandas as pd\r\n\r\nlogging.basicConfig(level=logging.DEBUG)\r\n\r\n\r\n# has setUpClass method, thus run the test on the entire class\r\nclass SqlTests(unittest.TestCase):\r\n \"\"\"Tests the db-python read-write ... | [
[
"pandas.DataFrame"
]
] |
chrhck/pyABC | [
"731cfdec26bef3898bf6e244daa5c8f83f3fe19d",
"731cfdec26bef3898bf6e244daa5c8f83f3fe19d",
"731cfdec26bef3898bf6e244daa5c8f83f3fe19d",
"731cfdec26bef3898bf6e244daa5c8f83f3fe19d"
] | [
"test/visualization/test_visualization.py",
"pyabc/epsilon/temperature.py",
"pyabc/visualization/epsilon.py",
"pyabc/visserver/server.py"
] | [
"import pyabc\nimport tempfile\nimport pytest\nimport os\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\n\n# create and run some model\n\n\ndef model(p):\n return {'ss0': p['p0'] + 0.1 * np.random.uniform(),\n 'ss1': p['p1'] + 0.1 * np.random.uniform()}\n\n\np_true = {'p0'... | [
[
"matplotlib.pyplot.subplots",
"pandas.DataFrame",
"matplotlib.pyplot.close",
"numpy.random.uniform",
"numpy.array"
],
[
"numpy.minimum",
"numpy.sqrt",
"numpy.isfinite",
"numpy.linspace",
"pandas.DataFrame",
"numpy.exp",
"scipy.optimize.bisect",
"numpy.array"... |
supernord/tools-iuc | [
"95f1ae4ed1cdd56114df76d215f9e1ed549aa4c5"
] | [
"tools/vsnp/vsnp_statistics.py"
] | [
"#!/usr/bin/env python\n\nimport argparse\nimport csv\nimport gzip\nimport os\nfrom functools import partial\n\nimport numpy\nimport pandas\nfrom Bio import SeqIO\n\n\ndef nice_size(size):\n # Returns a readably formatted string with the size\n words = ['bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB']\n prefix... | [
[
"pandas.concat",
"pandas.Series",
"pandas.DataFrame",
"numpy.mean",
"pandas.DataFrame.from_dict"
]
] |
Abhijeet8901/CS231n | [
"c8e715028b453899d5069cdb34faf3fc2959c270"
] | [
"assignment2/cs231n/optim.py"
] | [
"import numpy as np\n\n\"\"\"\nThis file implements various first-order update rules that are commonly used\nfor training neural networks. Each update rule accepts current weights and the\ngradient of the loss with respect to those weights and produces the next set of\nweights. Each update rule has the same interfa... | [
[
"numpy.zeros_like",
"numpy.sqrt"
]
] |
modichirag/21cmhod | [
"0807a7b0b880f4ba5bc7161b843d500ddcece5a7",
"0807a7b0b880f4ba5bc7161b843d500ddcece5a7"
] | [
"code/distributeHI.py",
"code/plotting/plot_xibr.py"
] | [
"import numpy as np\nimport re, os\nfrom pmesh.pm import ParticleMesh\nfrom nbodykit.lab import BigFileCatalog, BigFileMesh, MultipleSpeciesCatalog, FFTPower\nfrom nbodykit import setup_logging\nfrom mpi4py import MPI\n\nimport HImodels\n# enable logging, we have some clue what's going on.\nsetup_logg... | [
[
"numpy.logspace",
"numpy.arange",
"numpy.isnan"
],
[
"matplotlib.pyplot.tight_layout",
"scipy.interpolate.InterpolatedUnivariateSpline",
"numpy.arange",
"matplotlib.font_manager.FontProperties",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"numpy.trapz"
... |
jveverka/data-lab | [
"c2a43fd2c34520a9d490f29feff3035bdc70c0d6"
] | [
"ml-services/od-yolov3-tf2/yolov3_tf2/utils.py"
] | [
"from absl import logging\nimport numpy as np\nimport tensorflow as tf\nimport cv2\n\nYOLOV3_LAYER_LIST = [\n 'yolo_darknet',\n 'yolo_conv_0',\n 'yolo_output_0',\n 'yolo_conv_1',\n 'yolo_output_1',\n 'yolo_conv_2',\n 'yolo_output_2',\n]\n\nYOLOV3_TINY_LAYER_LIST = [\n 'yolo_darknet',\n 'y... | [
[
"numpy.fromfile",
"numpy.product",
"tensorflow.shape",
"tensorflow.broadcast_to",
"tensorflow.maximum",
"tensorflow.minimum",
"tensorflow.expand_dims",
"tensorflow.split",
"numpy.array",
"numpy.flip"
]
] |
instance01/qubo-nn | [
"6f8058565f4b6ab4a8300501fc2f67cdaeed482f",
"6f8058565f4b6ab4a8300501fc2f67cdaeed482f",
"6f8058565f4b6ab4a8300501fc2f67cdaeed482f",
"6f8058565f4b6ab4a8300501fc2f67cdaeed482f"
] | [
"qubo_nn/plots/gen_tsne_gen4.py",
"qubo_nn/problems/knapsack_integer_weights.py",
"qubo_nn/plots/plot_tot_mc.py",
"qubo_nn/filling_level_diag.py"
] | [
"import pickle\nimport numpy as np\nfrom MulticoreTSNE import MulticoreTSNE as TSNE\nfrom qubo_nn.data import LMDBDataLoader\nfrom qubo_nn.config import Config\n\n\ncfg_id = '27_gen4'\ncfg = Config('../').get_cfg(cfg_id)\ncfg[\"use_big\"] = False\nlmdb_loader = LMDBDataLoader(cfg, reverse=False, base_path='../')\n\... | [
[
"numpy.array"
],
[
"numpy.array",
"numpy.zeros",
"numpy.random.randint"
],
[
"matplotlib.font_manager._rebuild",
"matplotlib.pyplot.tight_layout",
"numpy.linspace",
"numpy.isnan",
"numpy.arange",
"matplotlib.pyplot.rc",
"matplotlib.pyplot.get_cmap",
"matplot... |
OSADP/TCA | [
"25bc1c1db00393cc6b8c6764610bf381494dfcb9",
"25bc1c1db00393cc6b8c6764610bf381494dfcb9"
] | [
"old_versions/TCA_2_2/TCA_V_2_2_1/code/TCASpacePartitioning.py",
"old_versions/TCA_2_2/TCA_V_2_2_1/code/TCAFileReader.py"
] | [
"#standard\nimport unittest\nimport math\n# from collections import OrderedDict\nfrom random import uniform\n\n#external\nimport pandas as pd\nfrom scipy.spatial import KDTree\n\n\n\ndef Find_RSE_range(df, RSEs, minrange):\n\n sub_df = df[['vehicle_ID', 'location_x', 'location_y']]\n\n\n tree = KDTree(sub_df[... | [
[
"scipy.spatial.KDTree"
],
[
"numpy.arange",
"pandas.concat",
"pandas.read_pickle",
"pandas.read_csv"
]
] |
muntazirabidi/boss-sbi | [
"fae016eb10b64153391499276d238ccdf660df88"
] | [
"bin/make_halo_cnf_data.py"
] | [
"import os\nimport numpy as np \nfrom simbig import halos as Halos\n\nnp.random.seed(918234) \n\ntheta_x_pairs = []\nfor i in range(1000): \n # read in halo catalog\n halos = Halos.Quijote_LHC_HR(i, z=0.5)\n\n # impose random halo mass limit as a proxy for baryonic effect \n Mlim = np.random.uniform(12.... | [
[
"numpy.concatenate",
"numpy.random.uniform",
"numpy.array",
"numpy.random.seed"
]
] |
ludovicdmt/python-meegkit | [
"4aa4ba49354b996be20eda41660a550d1bd31f9a"
] | [
"meegkit/utils/trca.py"
] | [
"\"\"\"TRCA utils.\"\"\"\nimport numpy as np\n\nfrom scipy.signal import filtfilt, cheb1ord, cheby1\nfrom scipy import stats\n\n\ndef round_half_up(num, decimals=0):\n \"\"\"Round half up round the last decimal of the number.\n\n The rules are:\n from 0 to 4 rounds down\n from 5 to 9 rounds up\n\n Pa... | [
[
"scipy.stats.chi2.ppf",
"numpy.log2",
"scipy.signal.cheby1",
"numpy.sqrt",
"scipy.stats.t.ppf",
"numpy.mean",
"numpy.floor",
"numpy.var",
"scipy.stats.sem",
"numpy.array",
"scipy.signal.cheb1ord"
]
] |
jraman/tensorflow | [
"9028828d3b8a2a622f7203a317002cc749531695",
"9028828d3b8a2a622f7203a317002cc749531695"
] | [
"tensorflow/python/framework/ops.py",
"tensorflow/python/keras/engine/network.py"
] | [
"# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.python.util.function_utils.get_func_code",
"tensorflow.python.client.pywrap_tf_session.TF_OperationGetAttrBool",
"tensorflow.python.eager.tape.stop_recording",
"tensorflow.python.eager.context.context",
"tensorflow.python.util.tf_export.kwarg_only",
"tensorflow.python.client.py... |
ragavvenkatesan/models | [
"420a88c7af20dae8d79dbc1b4351fef41be361c8"
] | [
"research/compression/distillation/resnet.py"
] | [
"# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.train.LoggingTensorHook",
"tensorflow.control_dependencies",
"tensorflow.test.is_built_with_cuda",
"tensorflow.cast",
"tensorflow.global_variables",
"tensorflow.nn.l2_loss",
"tensorflow.pad",
"tensorflow.train.AdamOptimizer",
"tensorflow.estimator.RunConfig",
"t... |
dumpmemory/google-research | [
"bc87d010ab9086b6e92c3f075410fa6e1f27251b",
"bc87d010ab9086b6e92c3f075410fa6e1f27251b",
"bc87d010ab9086b6e92c3f075410fa6e1f27251b",
"bc87d010ab9086b6e92c3f075410fa6e1f27251b",
"bc87d010ab9086b6e92c3f075410fa6e1f27251b"
] | [
"minigrid_basics/examples/rw_four_directions.py",
"aux_tasks/auxiliary_mc/discounted_dqn_agent.py",
"contrastive_rl/env_utils.py",
"hypertransformer/tf/utils/cache_miniimagenet.py",
"hypertransformer/tf/core/layerwise_test.py"
] | [
"# coding=utf-8\n# Copyright 2022 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.io.gfile.exists",
"tensorflow.io.gfile.makedirs",
"matplotlib.pylab.imshow",
"matplotlib.pylab.clf",
"matplotlib.pylab.savefig"
],
[
"tensorflow.summary.scalar",
"numpy.linspace"
],
[
"numpy.random.random",
"numpy.clip",
"numpy.asarray",
"numpy.rando... |
VladimirYugay/diw | [
"d1a760f1911e9d09fbe038abffc3aa76d384f86a"
] | [
"scripts/run_mots_depth_inference.py"
] | [
"\"\"\" Script for running depth inference assuming MOTS dataset structure \"\"\"\nimport logging\nimport os\nimport sys\nfrom pathlib import Path, PurePath\n\nimport click\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport tensorflow.compat.v1 as tf\nfrom IPython.core import ultratb\nfrom PIL import Imag... | [
[
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.cm.get_cmap",
"tensorflow.compat.v1.Session",
"matplotlib.pyplot.clf",
"numpy.array",
"tensorflow.compat.v1.train.latest_checkpoint",
"tensorflow.compat.v1.train.Saver",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
soft-matter/pimsviewer | [
"9263ece121a58a0504c6e4d319ec6e18d1bb460a"
] | [
"pimsviewer/dimension.py"
] | [
"import os\nimport numpy as np\nfrom PyQt5 import uic\nfrom PyQt5.QtCore import QDir, Qt, QTimer, pyqtSignal\nfrom PyQt5.QtGui import QImage, QPainter, QPalette, QPixmap\nfrom PyQt5.QtWidgets import (QHBoxLayout, QSlider, QWidget, QAction, QApplication, QFileDialog, QLabel, QMainWindow, QMenu, QMessageBox, QScrollA... | [
[
"numpy.sum"
]
] |
lone17/deform-conv | [
"126ebcc283a4325c474332fa170f57d52a59e34d"
] | [
"deform_conv/utils.py"
] | [
"from __future__ import absolute_import, division\n\nfrom tensorflow.python import debug as tf_debug\nimport keras.backend as K\n\n\ndef keras_set_tf_debug():\n sess = K.get_session()\n sess = tf_debug.LocalCLIDebugWrapperSession(sess)\n sess.add_tensor_filter(\"has_inf_or_nan\", tf_debug.has_inf_or_nan)\n... | [
[
"tensorflow.python.debug.LocalCLIDebugWrapperSession"
]
] |
katsugeneration/tf2-ndg-benchmarks | [
"ba2d07ef997fac87b3991a54c0a234f7c5425b0f"
] | [
"tf2_ndg_benckmarks/metrics/embedding.py"
] | [
"\"\"\"\nCopyright:\n Copyright 2019 by Katsuya SHIMABUKURO.\nLicense:\n MIT, see LICENSE for details.\n\"\"\"\nimport pathlib\nimport gzip\nimport requests\nimport tqdm\nimport numpy as np\nfrom gensim.models import KeyedVectors\n\n\nFILE_ID = '0B7XkCwpI5KDYNlNUTTlSS21pQmM'\nSOURCE_URL = 'https://drive.googl... | [
[
"numpy.dot",
"numpy.abs",
"numpy.min",
"numpy.linalg.norm",
"numpy.max"
]
] |
EconForge/dolo | [
"9bb75b8f6ea87578393fe748003092ffb745e8d6"
] | [
"dolo/algos/simulations.py"
] | [
"import numpy\nimport pandas\nimport xarray as xr\nimport numpy as np\n\nfrom dolo.compiler.model import Model\nfrom dolo.numeric.optimize.ncpsolve import ncpsolve\nfrom dolo.numeric.optimize.newton import newton as newton_solver\nfrom dolo.numeric.optimize.newton import SerialDifferentiableFunction\n\n## TODO: ext... | [
[
"matplotlib.pyplot.legend",
"numpy.sqrt",
"numpy.random.seed",
"numpy.linspace",
"pandas.DataFrame",
"numpy.concatenate",
"matplotlib.pyplot.plot",
"numpy.row_stack",
"numpy.array",
"numpy.zeros"
]
] |
TS-SE-GROUP/icme2019 | [
"fe9b31db7bf19b08d5e5d41a259f0a297eb21766"
] | [
"mdeepctr/models/xdeepfm.py"
] | [
"# -*- coding:utf-8 -*-\n\"\"\"\nAuthor:\n Weichen Shen,wcshen1994@163.com\n\nReference:\n [1] Lian J, Zhou X, Zhang F, et al. xDeepFM: Combining Explicit and Implicit Feature Interactions for Recommender Systems[J]. arXiv preprint arXiv:1803.05170, 2018.(https://arxiv.org/pdf/1803.05170.pdf)\n\"\"\"\nimport ... | [
[
"tensorflow.keras.layers.add",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Flatten",
"tensorflow.keras.models.Model"
]
] |
xysun/playground | [
"20f9a7e0eb3d24e7cd32d8afd94b767b8fcc00b4"
] | [
"pommerman/envs/v0.py"
] | [
"\"\"\"The baseline Pommerman environment.\n\nThis evironment acts as game manager for Pommerman. Further environments,\nsuch as in v1.py, will inherit from this.\n\"\"\"\nimport json\nimport os\n\nimport numpy as np\nimport time\nfrom gym import spaces\nfrom gym.utils import seeding\nimport gym\n\nfrom .. import c... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.ones"
]
] |
shubhamsingh987/PySyft | [
"ff967e3735bd7d47667d1d3e5038ba1493ca2e90",
"ff967e3735bd7d47667d1d3e5038ba1493ca2e90",
"ff967e3735bd7d47667d1d3e5038ba1493ca2e90"
] | [
"syft/frameworks/torch/fl/utils.py",
"test/workers/test_websocket_worker.py",
"test/workers/test_virtual.py"
] | [
"import syft as sy\nimport torch\nfrom typing import Dict\nfrom typing import Any\nimport logging\n\nlogger = logging.getLogger(__name__)\n\n\ndef extract_batches_per_worker(federated_train_loader: sy.FederatedDataLoader):\n \"\"\"Extracts the batches from the federated_train_loader and stores them\n in a ... | [
[
"torch.ones",
"torch.zeros",
"torch.cat",
"torch.randn",
"torch.tensor",
"torch.no_grad"
],
[
"torch.ones",
"torch.jit.trace",
"torch.nn.functional.cross_entropy",
"torch.nn.init.xavier_normal_",
"torch.tensor",
"torch.nn.Linear",
"torch.sort"
],
[
"... |
kartik-gatsby/optimized-ising-model | [
"1a9b0210deb26d73f93aec5b0804baaebf9c6ff9"
] | [
"ising_low.py"
] | [
"import numpy as np\nfrom random import random\nimport matplotlib.pyplot as plt\nimport time\nimport logging\n\nlogging.basicConfig(level=logging.INFO,filename='simulation.log', filemode='w',format='%(asctime)s - %(message)s',datefmt='%d-%b-%y %H:%M:%S')\nnp.seterr(all='warn')\n\n###################################... | [
[
"matplotlib.pyplot.legend",
"numpy.sqrt",
"numpy.linspace",
"numpy.concatenate",
"numpy.seterr",
"numpy.var",
"numpy.random.randint",
"numpy.hstack",
"numpy.arange",
"numpy.full",
"matplotlib.pyplot.errorbar",
"matplotlib.pyplot.axis",
"numpy.zeros",
"matplo... |
RangeKing/PaddleViT | [
"0e25958686e04ed8872cf67fba0dfd6918e9b4dd",
"0e25958686e04ed8872cf67fba0dfd6918e9b4dd",
"0e25958686e04ed8872cf67fba0dfd6918e9b4dd",
"0e25958686e04ed8872cf67fba0dfd6918e9b4dd"
] | [
"image_classification/MLP-Mixer/load_pytorch_weights.py",
"image_classification/PiT/main_multi_gpu_distill.py",
"image_classification/XCiT/load_pytorch_weights.py",
"facial_expression/datasets.py"
] | [
"# Copyright (c) 2021 PPViT 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 required ... | [
[
"torch.device",
"numpy.random.randn",
"numpy.allclose",
"torch.Tensor"
],
[
"numpy.random.seed"
],
[
"numpy.allclose",
"torch.Tensor",
"torch.load",
"numpy.random.randn",
"torch.device"
],
[
"numpy.random.uniform"
]
] |
Priyansh2/csnli | [
"de31f3f5ae0a956496b76a4643fa9ce7f3736d29"
] | [
"nmt/onmt/translate/Translator.py"
] | [
"import torch\nfrom torch.autograd import Variable\n\nimport onmt.translate.Beam\nimport onmt.io\n\n\nclass Translator(object):\n \"\"\"\n Uses a model to translate a batch of sentences.\n\n\n Args:\n model (:obj:`onmt.modules.NMTModel`):\n NMT model to use for translation\n fields (di... | [
[
"torch.Tensor",
"torch.autograd.Variable"
]
] |
Erotemic/vtool_ibeis | [
"b5dfd5bec43dacc8ea9fc3d6a7f17cd661b678c5",
"b5dfd5bec43dacc8ea9fc3d6a7f17cd661b678c5",
"b5dfd5bec43dacc8ea9fc3d6a7f17cd661b678c5",
"b5dfd5bec43dacc8ea9fc3d6a7f17cd661b678c5"
] | [
"tests/test_coverage_max_reduce.py",
"vtool_ibeis/other.py",
"vtool_ibeis/distance.py",
"vtool_ibeis/segmentation.py"
] | [
"#Is it possible to use numpy.ufunc.reduce over an iterator of ndarrays?\n\n#I have a generator function that yields ndarrays (all of the same shape and dtype) and I would like to find the maximum value at each index.\n\n#Currently I have code that looks like this:\n\n\ndef main():\n import numpy as np\n impo... | [
[
"matplotlib.pyplot.imshow",
"numpy.maximum",
"numpy.allclose",
"numpy.multiply",
"matplotlib.pyplot.subplot",
"numpy.maximum.reduce",
"numpy.array",
"numpy.zeros",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
],
[
"numpy.take",
"numpy.sqrt",
"numpy.a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.