repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
lukasz-migas/napari-1d | [
"b0f081a8711ae941b3e4b5c58c3aea56bd0e3277",
"b0f081a8711ae941b3e4b5c58c3aea56bd0e3277",
"b0f081a8711ae941b3e4b5c58c3aea56bd0e3277",
"b0f081a8711ae941b3e4b5c58c3aea56bd0e3277",
"b0f081a8711ae941b3e4b5c58c3aea56bd0e3277"
] | [
"napari_plot/layers/multiline/_multiline_list.py",
"examples/plot-layer-types.py",
"examples/napari-and-1d-live-callback.py",
"napari_plot/_vispy/vendored/axis.py",
"napari_plot/_vispy/layers/scatter.py"
] | [
"\"\"\"Container class for MultiLine data.\"\"\"\nimport typing as ty\n\nimport numpy as np\n\nfrom ._multiline_utils import get_data_limits, make_multiline_color, make_multiline_line\n\n\nclass MultiLineList:\n \"\"\"Multi-line class.\"\"\"\n\n def __init__(self):\n self._data = {\"xs\": [], \"ys\": [... | [
[
"numpy.all",
"numpy.vstack",
"numpy.array",
"numpy.empty"
],
[
"numpy.arange",
"numpy.random.randint"
],
[
"numpy.array"
],
[
"numpy.array",
"numpy.sum",
"numpy.linspace"
],
[
"numpy.zeros"
]
] |
fandulu/IHDA | [
"a859729cbb639a3233f3c8c7fce894bac27b19ee"
] | [
"eval_metrics.py"
] | [
"from __future__ import print_function, absolute_import\nimport os\nimport glob\nimport re\nimport sys\nimport os.path as osp\nimport numpy as np\n\nimport random\nfrom time import time\n\n\"\"\"Cross-Modality ReID\"\"\"\n\ndef eval_sbir(distmat, q_pids, g_pids, max_rank = 20):\n num_q, num_g = distmat.shape\n ... | [
[
"numpy.invert",
"numpy.asarray",
"numpy.ones",
"numpy.mean",
"numpy.any",
"numpy.argsort"
]
] |
SeanMabli/aiinpy | [
"bd332fce454c489e236878c9da91bb86ec6dda14",
"bd332fce454c489e236878c9da91bb86ec6dda14",
"827e4f85861436c0332046fa8aa84e24153513d6",
"bd332fce454c489e236878c9da91bb86ec6dda14"
] | [
"example/src/nn.py",
"example/test-nnderivative.py",
"example/old/mish.py",
"example/src/tanh.py"
] | [
"import numpy as np\nfrom .binarystep import binarystep\nfrom .gaussian import gaussian\nfrom .identity import identity\nfrom .leakyrelu import leakyrelu\nfrom .mish import mish\nfrom .relu import relu\nfrom .selu import selu\nfrom .sigmoid import sigmoid\nfrom .silu import silu\nfrom .softmax import softmax\nfrom ... | [
[
"numpy.ndim",
"numpy.outer",
"numpy.prod"
],
[
"numpy.zeros",
"numpy.random.choice"
],
[
"numpy.exp"
],
[
"numpy.square",
"numpy.exp"
]
] |
spmallick/depthai_blazepose | [
"bd181e33e20d90857790529f516d814cc1efcf46"
] | [
"BlazeposeDepthaiEdge.py"
] | [
"import numpy as np\nimport cv2\nfrom numpy.core.fromnumeric import trace\nimport mediapipe_utils as mpu\nfrom pathlib import Path\nfrom FPS import FPS, now\nimport depthai as dai\nimport marshal\nimport sys\nfrom string import Template\nfrom math import sin, cos\n\nSCRIPT_DIR = Path(__file__).resolve().parent\nPOS... | [
[
"numpy.hstack",
"numpy.dot",
"numpy.expand_dims",
"numpy.exp",
"numpy.array",
"numpy.zeros"
]
] |
paulsok/chaos-analysis | [
"4124a349fdf10d1fa0b0e014dc4b4d84374b0b55"
] | [
"systems/noise_sine.py"
] | [
"import math\nimport random\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n\ndef noise_sine(length=10000, level=0.2, mu=2.4, discard=1000):\n \"\"\"Simulate the noise-driven sine map described in Freitas et al (2009),\n \"Failure in distinguishing colored noise from chaos using the 'noise\n ... | [
[
"matplotlib.pyplot.plot",
"numpy.std",
"numpy.random.rand",
"matplotlib.pyplot.show",
"numpy.zeros"
]
] |
mangonihao/gpt2-pytorch | [
"945cf98a3e7d9378d59866f9bdc977f4bcc96a6e"
] | [
"models/modules.py"
] | [
"# -*- coding: utf-8 -*-\n\n# @Author : xmh\n# @Time : 2021/1/22 9:01\n# @File : Module.py\n\n\"\"\"\nfile description::\n\n\"\"\"\nimport torch.nn as nn\nimport torch\nimport math\nimport copy\nimport torch.nn.functional as F\nfrom tqdm import trange\n\n\ndef gelu(x):\n return 0.5 * x * (1 + torch.tanh(m... | [
[
"torch.nn.Softmax",
"torch.nn.functional.softmax",
"torch.zeros",
"torch.cat",
"torch.nn.Embedding",
"torch.multinomial",
"torch.no_grad",
"torch.topk",
"torch.pow",
"torch.nn.Dropout",
"torch.nn.CrossEntropyLoss",
"torch.ones",
"torch.sqrt",
"torch.tensor",... |
ZeliangSu/LRCS-Xlearn | [
"50ff9c64f36c0d80417aa44aac2db68f392130f0"
] | [
"src/segmentpy/_taskManager/ActViewer_logic.py"
] | [
"from PySide2.QtWidgets import QApplication, QWidget, QMessageBox, QListWidget\nfrom PySide2.QtGui import QPixmap, QImage\nfrom PySide2.QtCore import Qt\n\nfrom segmentpy._taskManager.ActViewer_design import Ui_actViewer\nfrom segmentpy._taskManager.nodes_list_logic import node_list_logic\nfrom segmentpy._taskManag... | [
[
"numpy.sqrt",
"numpy.min",
"numpy.squeeze",
"tensorflow.train.import_meta_graph",
"numpy.max",
"tensorflow.reset_default_graph",
"tensorflow.get_default_graph",
"numpy.zeros",
"matplotlib.pyplot.figure"
]
] |
fmxFranky/decision-transformer | [
"475ee21429869731f3f4fbbd4220532de8b38d19",
"475ee21429869731f3f4fbbd4220532de8b38d19",
"475ee21429869731f3f4fbbd4220532de8b38d19"
] | [
"atari/create_dataset.py",
"gym/decision_transformer/training/act_trainer.py",
"gym/decision_transformer/models/trajectory_gpt2.py"
] | [
"import argparse\nimport csv\nimport logging\nimport math\nimport pickle\nimport random\nfrom collections import deque\n\nimport blosc\nimport numpy as np\nimport torch\nimport torch.nn as nn\nfrom fixed_replay_buffer import FixedReplayBuffer\nfrom mingpt.model_atari import GPT, GPTConfig\nfrom mingpt.trainer_atari... | [
[
"numpy.arange",
"numpy.array",
"numpy.zeros",
"numpy.zeros_like"
],
[
"torch.clone"
],
[
"torch.nn.Softmax",
"torch.nn.Dropout",
"torch.ones",
"torch.cuda.set_device",
"torch.cat",
"torch.from_numpy",
"torch.nn.Embedding",
"torch.nn.LayerNorm",
"tens... |
un-knight/models | [
"196f7f2eecf7938dfe4ac2372a51cebbd8a7c170",
"196f7f2eecf7938dfe4ac2372a51cebbd8a7c170"
] | [
"tutorials/image/cifar10/cifar10_input.py",
"tutorials/rnn/ptb/ptb_word_lm.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.image.resize_image_with_crop_or_pad",
"tensorflow.image.random_brightness",
"tensorflow.transpose",
"tensorflow.image.random_flip_left_right",
"tensorflow.image.random_contrast",
"tensorflow.contrib.deprecated.image_summary",
"tensorflow.slice",
"tensorflow.gfile.Exists... |
Anevar/mne-python | [
"15b19ed6b9364ae4787f0df2fd7e689b3c0a30bb",
"15b19ed6b9364ae4787f0df2fd7e689b3c0a30bb",
"15b19ed6b9364ae4787f0df2fd7e689b3c0a30bb"
] | [
"mne/simulation/evoked.py",
"mne/fiff/meas_info.py",
"examples/inverse/plot_gamma_map_inverse.py"
] | [
"# Authors: Alexandre Gramfort <gramfort@nmr.mgh.harvard.edu>\n# Daniel Strohmeier <daniel.strohmeier@tu-ilmenau.de>\n# Martin Luessi <mluessi@nmr.mgh.harvard.edu>\n#\n# License: BSD (3-clause)\nimport copy\n\nimport numpy as np\nfrom scipy import signal\n\nfrom ..fiff.pick import pick_channels_co... | [
[
"numpy.min",
"numpy.max",
"numpy.log10",
"scipy.signal.lfilter",
"numpy.zeros"
],
[
"scipy.linalg.inv",
"numpy.dot",
"numpy.iterable"
],
[
"numpy.max",
"numpy.abs"
]
] |
ferhah/pytorch-maml | [
"8fbf8b200c1c73aeb98787e4df43036955dca323"
] | [
"maml/metalearners/maml.py"
] | [
"import torch\nimport torch.nn.functional as F\nimport numpy as np\nfrom tqdm import tqdm\n\nfrom collections import OrderedDict\nfrom maml.utils import update_parameters, tensors_to_device, compute_accuracy\n\n__all__ = ['ModelAgnosticMetaLearning', 'MAML', 'FOMAML']\n\n\nclass ModelAgnosticMetaLearning(object):\n... | [
[
"torch.set_grad_enabled",
"numpy.zeros",
"numpy.mean",
"torch.tensor"
]
] |
Basvanstein/MIP-EGO | [
"e1ed0b0ea020850c72c4de5efd5dda0a99de571f",
"e1ed0b0ea020850c72c4de5efd5dda0a99de571f",
"e1ed0b0ea020850c72c4de5efd5dda0a99de571f"
] | [
"mipego/SearchSpace.py",
"benchmark/bbobbenchmarks.py",
"example/example_CMA_ES.py"
] | [
"from pdb import set_trace\n\nimport json\nfrom copy import copy, deepcopy\n\nimport numpy as np\nfrom numpy.random import randint, rand\n\nfrom abc import abstractmethod\nfrom pyDOE import lhs\nfrom scipy.special import logit\n\n# TODO: rename `sampling` --> `sample`\n# TODO: add conditional parameters\n\nTRANS = ... | [
[
"numpy.abs",
"numpy.random.seed",
"numpy.power",
"numpy.asarray",
"numpy.nonzero",
"numpy.tile",
"numpy.sign",
"numpy.atleast_2d",
"numpy.round",
"numpy.random.rand",
"numpy.exp",
"numpy.array",
"numpy.zeros",
"numpy.empty",
"numpy.random.randint"
],
... |
yxw027/LEOGPS | [
"8392f92567cd9a8ba1fb16ae071242d2cef90252"
] | [
"codes/gpsxtr.py"
] | [
"#!/usr/bin/env python3\n'''\n###############################################################################\n###############################################################################\n## ##\n## _ ___ ___ ___ ___ ___ ... | [
[
"numpy.polyfit",
"numpy.array",
"numpy.polyval"
]
] |
0oshowero0/COVID19-urban-mobility-model | [
"b3837deaa4dc32cf4f8627a86a05031378a96d88",
"b3837deaa4dc32cf4f8627a86a05031378a96d88"
] | [
"india/simulate_ode_fit_thane_BO.py",
"us/simulate_ode_fit_philadelphia_BO_1521_try.py"
] | [
"import numpy as np\nfrom multiprocessing import Pool\nfrom datetime import datetime\nfrom argparse import ArgumentParser\nfrom COVID_Model import City\nfrom pathlib import Path\nimport json\nfrom bayes_opt import BayesianOptimization\nimport pandas as pd\nimport setproctitle\nsetproctitle.setproctitle('Thane_SEIR@... | [
[
"numpy.load",
"pandas.read_csv",
"numpy.where",
"numpy.linspace"
],
[
"numpy.load",
"numpy.where"
]
] |
frk2/bullet3 | [
"225d823e4dc3f952c6c39920c3f87390383e0602",
"225d823e4dc3f952c6c39920c3f87390383e0602",
"225d823e4dc3f952c6c39920c3f87390383e0602",
"225d823e4dc3f952c6c39920c3f87390383e0602",
"225d823e4dc3f952c6c39920c3f87390383e0602",
"225d823e4dc3f952c6c39920c3f87390383e0602"
] | [
"examples/pybullet/examples/rendertest_sync.py",
"examples/pybullet/gym/pybullet_envs/minitaur/agents/ppo/utility.py",
"examples/pybullet/gym/pybullet_envs/bullet/minitaur_gym_env.py",
"examples/pybullet/gym/pybullet_envs/deep_mimic/env/pybullet_deep_mimic_env.py",
"examples/pybullet/gym/pybullet_envs/deep_... | [
"#!/usr/bin/env python\nimport os, logging, gym\nfrom baselines import logger\nfrom baselines.common import set_global_seeds\nfrom baselines.common.misc_util import boolean_flag\nfrom baselines import bench\nfrom baselines.a2c.a2c import learn\nfrom baselines.common.vec_env.subproc_vec_env import SubprocVecEnv\nfro... | [
[
"numpy.array"
],
[
"tensorflow.scatter_update",
"tensorflow.reverse",
"tensorflow.concat",
"tensorflow.range",
"tensorflow.Variable",
"tensorflow.python.client.device_lib.list_local_devices",
"tensorflow.stack",
"tensorflow.reduce_sum",
"tensorflow.cast",
"tensorflo... |
gry-kiu/Evolutionary-Algorithm | [
"58fc6928da9ed77d2fec454e4846b89fdf7b8c3f"
] | [
"tutorial-contents/Genetic Algorithm/Genetic Algorithm Basic.py"
] | [
"# Adding rank and tournament selections by Choi, T\n# Adding one- and two-point crossovers by Choi, T\n# Adding sharing method by Choi, T\n\n\"\"\"\nVisualize Genetic Algorithm to find a maximum point in a function.\nVisit my tutorial website for more: https://morvanzhou.github.io/tutorials/\n\"\"\"\n\nimport nump... | [
[
"numpy.linspace",
"numpy.min",
"numpy.arange",
"numpy.cos",
"numpy.sin",
"matplotlib.pyplot.ioff",
"numpy.argmax",
"numpy.random.rand",
"numpy.array",
"matplotlib.pyplot.ion",
"matplotlib.pyplot.pause",
"matplotlib.pyplot.show",
"numpy.random.randint"
]
] |
RandomForestGump/ProFitness | [
"ce75723b6f36bd41c955237e601b1333d8a74738"
] | [
"main.py"
] | [
"import asyncio\nimport logging\nimport logging.handlers\nimport queue\nimport threading\nimport urllib.request\nfrom pathlib import Path\nfrom typing import List, NamedTuple\n\ntry:\n from typing import Literal\nexcept ImportError:\n from typing_extensions import Literal # type: ignore\n\nimport cv2\nimport... | [
[
"numpy.arange",
"numpy.array"
]
] |
TransferRL/progressive_transfer | [
"04fc5fc400d65c278ffd0cff3773151ad01fc689"
] | [
"lib/qlearning.py"
] | [
"import gym\nimport matplotlib\nfrom matplotlib import pyplot as plt\nimport itertools\nimport numpy as np\nimport sys\nimport sklearn.pipeline\nimport sklearn.preprocessing\nfrom lib import plotting\nfrom sklearn.linear_model import SGDRegressor\nfrom sklearn.kernel_approximation import RBFSampler\n\nif \"./\" not... | [
[
"sklearn.linear_model.SGDRegressor",
"sklearn.kernel_approximation.RBFSampler",
"numpy.ones",
"numpy.max",
"numpy.argmax",
"numpy.zeros"
]
] |
modenaxe/BMC | [
"b6f6e473878ab7b0c19430d1b66b6dba09059c63"
] | [
"functions/muscles.py"
] | [
"\"\"\"Muscle modeling and simulation.\"\"\"\n\nfrom __future__ import division, print_function\nimport numpy as np\nfrom scipy.integrate import ode\nimport warnings\nimport configparser\n\n\n__author__ = 'Marcos Duarte, https://github.com/demotu/BMC'\n__version__ = 'muscles.py v.1 2015/03/01'\n\n\nclass Thelen2003... | [
[
"numpy.nanmax",
"numpy.sqrt",
"numpy.linspace",
"matplotlib.pyplot.MaxNLocator",
"numpy.nanmin",
"numpy.max",
"numpy.nanmean",
"numpy.exp",
"matplotlib.pyplot.tight_layout",
"numpy.sin",
"numpy.interp",
"numpy.zeros",
"matplotlib.pyplot.title",
"numpy.min",
... |
RubenvanHeusden/HFO-Robotkeeper | [
"03bbe1170d703b7f264ef245b99a0ced2759ed39"
] | [
"example/test_keepers/critic.py"
] | [
"import numpy as np\nimport tensorflow as tf\n\n\nclass Critic:\n def __init__(self, sess, state_size, action_size, param_size, num_outputs):\n \n #TODO : add batch normalization\n self.l1_size = 256\n self.l2_size = 128\n self.l3_size = 64\n self.l4_size = 32\n self.... | [
[
"tensorflow.concat",
"tensorflow.gradients",
"tensorflow.layers.dense",
"tensorflow.placeholder",
"tensorflow.truncated_normal_initializer",
"tensorflow.subtract",
"tensorflow.train.AdamOptimizer"
]
] |
fabian-paul/wepy | [
"3a470f364a5ffbefcdb5d17a12cd08d90f4944e4"
] | [
"examples/Lennard_Jones_Pair/we.py"
] | [
"\"\"\"Very simple example using a pair of Lennard-Jones particles.\n\nRequires the package `openmmtools` which can be installed from\nanaconda: `conda install -c omnia openmmtools`\n\nOpenmmtools just provides a ready-made system for the lennard jones\nparticles.\n\nThis script is broken up into several parts:\n\n... | [
[
"numpy.array",
"numpy.abs"
]
] |
ChristopherDavisUCI/NFL2021-Simulation | [
"5dd414285cebf781fe3a1f6756459f6075fbfab5"
] | [
"make_standings.py"
] | [
"import numpy as np\nimport pandas as pd\nfrom math import isclose\n\ndiv_series = pd.read_csv(\"data/divisions.csv\",index_col=0,squeeze=True)\ndiv_series.name = None\nteams = sorted(list(div_series.index))\ntol = .0001\n\n\n\nreverse_dict = {'Win':'Loss','Loss':'Win', 'Tie':'Tie'}\n\ndef get_outcome(row):\n s ... | [
[
"pandas.read_csv",
"numpy.random.choice"
]
] |
Sungyeop/Powerlaw_ML | [
"953061f848798409d6133f67679a2c55b8187bdf"
] | [
"Supervised/Supervised.py"
] | [
"import torch\nimport torchvision\nimport torch.nn.functional as F\nfrom torch import nn, optim\nfrom torchvision import transforms, datasets\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport copy\nfrom scipy.special import expit\n\n\n\n# Training Options\n#===============================================... | [
[
"matplotlib.pyplot.legend",
"numpy.log",
"matplotlib.pyplot.tight_layout",
"scipy.special.expit",
"matplotlib.pyplot.title",
"numpy.einsum",
"matplotlib.pyplot.figure",
"numpy.unique",
"torch.nn.functional.cross_entropy",
"torch.utils.data.DataLoader",
"torch.nn.Linear"... |
neutronpy/neutronpy | [
"44ca74a0bef25c03397a77aafb359bb257de1fe6",
"44ca74a0bef25c03397a77aafb359bb257de1fe6",
"44ca74a0bef25c03397a77aafb359bb257de1fe6"
] | [
"neutronpy/instrument/tools.py",
"tests/test_structure_factors.py",
"neutronpy/crystal/symmetry.py"
] | [
"# -*- coding: utf-8 -*-\nimport inspect\nfrom numbers import Number\n\nimport numpy as np\n\nfrom ..constants import neutron_mass, hbar\nfrom ..crystal import Sample\nfrom ..energy import Energy\nfrom .exceptions import AnalyzerError, MonochromatorError, ScatteringTriangleError\n\n\nclass _Dummy(object):\n r\"\... | [
[
"numpy.matrix",
"numpy.sqrt",
"numpy.linspace",
"numpy.arctan2",
"numpy.all",
"numpy.iscomplexobj",
"numpy.exp",
"numpy.where",
"numpy.sin",
"numpy.real",
"numpy.outer",
"numpy.zeros",
"numpy.log",
"numpy.linalg.inv",
"numpy.arccos",
"numpy.delete",
... |
kapousa/ProjXWebsiteProject_Jul2021 | [
"52c0565575b878175f150a1cb42b4f8b376e4e62"
] | [
"mylib/controllers/ModelController.py"
] | [
"import os\nimport pickle\nimport random\n\nfrom datetime import datetime\n\nfrom app import db\nimport numpy as np\nfrom random import randint\nfrom matplotlib import pyplot as plt\nfrom sklearn import metrics\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.multioutput import MultiOutputClassif... | [
[
"pandas.read_csv",
"matplotlib.pyplot.scatter",
"matplotlib.pyplot.title",
"numpy.reshape",
"numpy.min",
"sklearn.metrics.mean_absolute_error",
"sklearn.model_selection.train_test_split",
"matplotlib.pyplot.savefig",
"sklearn.metrics.mean_squared_error",
"matplotlib.pyplot.... |
oxquantum/CVAE | [
"0352ddc51fbfd8d57b155e6de66b4c34e010beac"
] | [
"_main_decision/_measurement_iteration/iteration.py"
] | [
"import time\n\nimport numpy as np\n\nfrom ._helper_functions import estimate_error, get_observation_mask, update_log_prob_mask\n\n\ndef iteration(con, obs_mask, obs_data_mask, obs_data, likelihood, resol_ctrl, acq,\n log_posterior, recon, log_weight_samples, num_obs, options):\n prob = np.exp(log_p... | [
[
"numpy.exp",
"numpy.where",
"numpy.argmax",
"numpy.stack"
]
] |
osanwe/Open-Vocabulary-Learning-on-Source-Code-with-a-Graph-Structured-Cache | [
"d0d6e2b2414e6774dd6c78b0c48c2a9db6c3e181",
"d0d6e2b2414e6774dd6c78b0c48c2a9db6c3e181"
] | [
"tests/data/test_Batch.py",
"models/FITB/CharCNN.py"
] | [
"# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\nimport logging\nimport unittest\nfrom collections import OrderedDict\nfrom copy import deepcopy\n\nimport mxnet as mx\nimport numpy as np\nfrom hypothesis import given, strategies as st\nfrom hypothesis.extra import numpy as hpnp\nfrom mxne... | [
[
"numpy.testing.assert_equal",
"numpy.dtype"
],
[
"scipy.sparse.block_diag",
"numpy.stack"
]
] |
oscarhiggott/Cirq | [
"60a8392e899484d81be55f89f6940c9ae5c5a053"
] | [
"cirq/ops/controlled_gate_test.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.eye",
"numpy.array",
"numpy.zeros",
"numpy.sqrt"
]
] |
kolk/qa_factoid2natural | [
"ccdd0096217c8e88b148f353f0c89628b85f9c4d"
] | [
"onmt/inputters/text_dataset.py"
] | [
"# -*- coding: utf-8 -*-\nfrom functools import partial\n\nimport torch\nfrom torchtext.data import Field, RawField\n\nfrom onmt.inputters.dataset_base import DatasetBase\n\n\nclass TextDataset(DatasetBase):\n \"\"\"\n Build `Example` objects, `Field` objects, and filter_pred function\n from text corpus.\n... | [
[
"torch.stack"
]
] |
landdafku11/CogAlg | [
"a95ea498af3104893f92028f466a56ef3a211f10",
"a95ea498af3104893f92028f466a56ef3a211f10"
] | [
"frame_2D_alg/alternative versions/frame_blobs_lists.py",
"frame_2D_alg/alternative versions/comp_slice_flip.py"
] | [
"import numpy as np\nfrom time import time\nfrom collections import deque, namedtuple\n\n''' \n frame_blobs() defines blobs: contiguous areas of positive or negative deviation of gradient. Gradient is estimated \n as |dx| + |dy|, then selectively and more precisely as hypot(dx, dy), from cross-comparison am... | [
[
"numpy.array",
"numpy.zeros",
"numpy.hypot",
"numpy.stack"
],
[
"numpy.rot90",
"numpy.zeros",
"numpy.hypot",
"numpy.ones"
]
] |
sararob/adanet | [
"26388aeb67ec30c9e98635497e6b5b3476378db7"
] | [
"adanet/core/tpu_estimator.py"
] | [
"\"\"\"An AdaNet estimator implementation which can run on TPU.\n\nCopyright 2018 The AdaNet Authors. All Rights Reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n https://ww... | [
[
"tensorflow.logging.warning",
"tensorflow.constant",
"tensorflow.logging.log_first_n",
"tensorflow.contrib.tpu.RunConfig",
"tensorflow.contrib.tpu.TPUEstimatorSpec",
"tensorflow.contrib.tpu.python.tpu.tpu_function.get_tpu_context",
"tensorflow.contrib.tpu.python.tpu.tpu_function.tpu_sh... |
mickare/Robust-Reconstruction-of-Watertight-3D-Models | [
"c3afd98a8732c0447c153d38bfcefb5c4441bc7b"
] | [
"reconstruction/filters/dilate.py"
] | [
"from typing import Optional, Union\n\nimport numpy as np\nfrom scipy import ndimage\n\nfrom reconstruction.data.chunks import ChunkGrid, Chunk\nfrom reconstruction.data.faces import ChunkFace\n\nbool_t = Union[bool, np.bool8]\n\n\ndef dilate(image: ChunkGrid[bool_t], steps=1, structure: Optional[np.ndarray] = None... | [
[
"numpy.any",
"scipy.ndimage.binary_dilation"
]
] |
JohanpG/tf-object-counting | [
"511c69385f9443b34ba7ea1a39417a90627c1ca2"
] | [
"utils/visualization_utils.py"
] | [
"#----------------------------------------------\n#--- Author : Ahmet Ozlu\n#--- Mail : ahmetozlu93@gmail.com\n#--- Date : 27th January 2018\n#----------------------------------------------\n\n\"\"\"A set of functions that are used for visualization.\n\nThese functions often receive an i... | [
[
"numpy.ones_like",
"numpy.logical_and",
"tensorflow.gfile.Open",
"tensorflow.summary.image",
"numpy.uint8",
"numpy.arange",
"numpy.cumsum",
"numpy.sort",
"numpy.ceil",
"tensorflow.map_fn",
"numpy.array",
"numpy.sum",
"tensorflow.py_func",
"matplotlib.pyplot.... |
granatb/dtu_mlops | [
"8e23bb1aac6b5850e9a7b1ddbe43cf64db619950"
] | [
"s7_scalable_applications/exercise_files/lfw_dataset.py"
] | [
"\"\"\"\nLFW dataloading\n\"\"\"\nimport argparse\nimport time\n\nimport numpy as np\nimport torch\nfrom PIL import Image\nfrom torch.utils.data import DataLoader, Dataset\nfrom torchvision import transforms\nimport glob\nimport os\nimport pandas as pd\nfrom torchvision.utils import make_grid\n\nimport matplotlib.p... | [
[
"numpy.asarray",
"numpy.array",
"torch.utils.data.DataLoader"
]
] |
msilvestro/dupin | [
"db06432cab6910c6965b9c35baaef96eb84f0d81"
] | [
"start_clustering.py"
] | [
"\"\"\"Start the clustering.\"\"\"\n# pylint: disable=C0103\nfrom time import time\nimport numpy as np\nfrom sklearn.cluster import KMeans\nfrom sklearn.metrics import silhouette_samples\nfrom clustering.kmedoids import pam_npass\nfrom clustering.metrics import (dissimilarity_matrix, _dissimilarity_matrix,\n ... | [
[
"sklearn.metrics.silhouette_samples",
"numpy.arange",
"numpy.loadtxt",
"numpy.zeros",
"numpy.empty"
]
] |
leoozy/cite-rewrite | [
"98dbc1fe8eb27c83c71e6dd5248c539a046b299f"
] | [
"torch_data_loader.py"
] | [
"import numpy as np\r\nimport h5py\r\nimport os\r\nimport torch\r\nimport pdb\r\nfrom torch.utils.data import Dataset\r\nclass TorchDataLoader(Dataset):\r\n \"\"\"Class minibatches from data on disk in HDF5 format\"\"\"\r\n def __init__(self, args, region_dim, phrase_dim, plh, split):\r\n \"\"\"Constru... | [
[
"numpy.argmax",
"numpy.array",
"numpy.where",
"numpy.sum",
"numpy.zeros"
]
] |
SiyangJ/COMP562 | [
"297422599d7de752f16d1ec231d15f866dc4d2ab"
] | [
"FinalProject/Model/Building/config.py"
] | [
"import os\nimport sys\nimport tensorflow as tf\nimport configparser\nFLAGS = tf.app.flags.FLAGS\n\n## Configuration File Parse\nCONFIG_DIR = './config.ini'\nif len(sys.argv)>1 and sys.argv[1][-4:]=='.ini':\n CONFIG_DIR = sys.argv[1]\nCFP = configparser.ConfigParser()\nCFP.read(CONFIG_DIR)\n\nARGS = CFP['Default... | [
[
"tensorflow.app.flags.DEFINE_string"
]
] |
METASPACE2020/METASPACE | [
"e1acd9a409f84a78eed7ca9713258c09b0e137ca",
"e1acd9a409f84a78eed7ca9713258c09b0e137ca",
"e1acd9a409f84a78eed7ca9713258c09b0e137ca",
"e1acd9a409f84a78eed7ca9713258c09b0e137ca",
"e1acd9a409f84a78eed7ca9713258c09b0e137ca"
] | [
"metaspace/python-client/metaspace/tests/test_sm_dataset.py",
"metaspace/engine/sm/engine/annotation/metrics.py",
"metaspace/engine/sm/engine/annotation/fdr.py",
"metaspace/engine/sm/engine/tests/annotation_spark/test_segmenter.py",
"metaspace/python-client/metaspace/image_processing.py"
] | [
"import json\nfrom pathlib import Path\nfrom tempfile import TemporaryDirectory\nfrom unittest.mock import patch\n\nimport pytest\nimport numpy as np\n\nfrom metaspace.sm_annotation_utils import (\n IsotopeImages,\n SMDataset,\n GraphQLClient,\n SMInstance,\n MolecularDB,\n)\nfrom metaspace.tests.uti... | [
[
"numpy.isnan",
"numpy.max",
"numpy.sum",
"numpy.stack"
],
[
"numpy.sqrt",
"numpy.linspace",
"numpy.asarray",
"scipy.ndimage.grey_closing",
"numpy.max",
"numpy.mean",
"numpy.any",
"numpy.greater",
"numpy.count_nonzero",
"numpy.isclose",
"numpy.isnan",... |
tedunderwood/measureperspective | [
"46ba16e6ef3d4e17626a6366bcb98ec554f7bc83",
"46ba16e6ef3d4e17626a6366bcb98ec554f7bc83"
] | [
"mungedata/simple_author_dedup.py",
"mungedata/dedup2earliest.py"
] | [
"# simple_author_dedup.py\n\n# the goal here is simply to go\n# through a list of author names\n# and find close matches\n# that ought to be treated\n# as the same person\n\nimport sys, csv\nimport pandas as pd\nfrom difflib import SequenceMatcher\n\nargs = sys.argv[1:]\n\nauthorset = set()\n\nfor path in args:\n ... | [
[
"pandas.read_csv"
],
[
"pandas.read_csv"
]
] |
Jennifer-Rigdon/fvcore | [
"7e800a86f2df93da017e07380543b4060ab88c94",
"7e800a86f2df93da017e07380543b4060ab88c94"
] | [
"fvcore/transforms/transform.py",
"fvcore/nn/jit_handles.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n\nimport inspect\nfrom abc import ABCMeta, abstractmethod\nfrom typing import Any, Callable, List, Optional, TypeVar\n\nimport numpy as np\nimport torch\n\nfrom .transform_util import to_float_tensor, to_numpy\n\n\n__all__ = [\n \"BlendTra... | [
[
"numpy.clip",
"numpy.ascontiguousarray",
"numpy.asarray",
"torch.from_numpy",
"numpy.concatenate",
"numpy.array",
"numpy.flip"
],
[
"torch.jit._get_trace_graph",
"torch.jit.get_trace_graph",
"numpy.prod"
]
] |
PaulPan00/donkey_wrapper | [
"a03cf0f42f65625fbce792b06c98acd153c5d6c8",
"a03cf0f42f65625fbce792b06c98acd153c5d6c8",
"a03cf0f42f65625fbce792b06c98acd153c5d6c8",
"a03cf0f42f65625fbce792b06c98acd153c5d6c8",
"a03cf0f42f65625fbce792b06c98acd153c5d6c8",
"a03cf0f42f65625fbce792b06c98acd153c5d6c8"
] | [
"Python Tutorial Reinforcement Learning/13_a3c_continuous/shared_optim.py",
"Python Tutorial Machine Learning/Regression & Classification Models/Regression/random_forest_regression.py",
"Python Tutorial Machine Learning/Regression & Classification Models/Regression/xg_boost_regression.py",
"Python Tutorial Re... | [
"# Create by Packetsss\n# Personal use is allowed\n# Commercial use is prohibited\n\nfrom __future__ import division\nimport math\nimport torch\nimport torch.optim as optim\nfrom collections import defaultdict\n\n\nclass SharedRMSprop(optim.Optimizer):\n \"\"\"Implements RMSprop algorithm with shared states.\n ... | [
[
"torch.max",
"torch.zeros"
],
[
"sklearn.ensemble.RandomForestRegressor",
"pandas.read_csv",
"sklearn.metrics.r2_score",
"numpy.set_printoptions",
"sklearn.model_selection.train_test_split"
],
[
"numpy.set_printoptions",
"pandas.read_csv",
"sklearn.metrics.r2_score"... |
gavin971/pyro2 | [
"55c6d98b9c5d9372badc703ad5deb4a9d2cb8b06"
] | [
"multigrid/MG.py"
] | [
"\"\"\"\nThe multigrid module provides a framework for solving elliptic\nproblems. A multigrid object is just a list of grids, from the finest\nmesh down (by factors of two) to a single interior zone (each grid has\nthe same number of guardcells).\n\nThe main multigrid class is setup to solve a constant-coefficien... | [
[
"numpy.linspace",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.axis",
"matplotlib.ticker.ScalarFormatter",
"matplotlib.pyplot.text",
"matplotlib.pyplot.title",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.getp",
"numpy.transpose",
"matplo... |
i-m-vivek/iGibson | [
"c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648",
"c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648",
"c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648",
"c9009a3da4bfe05e8a3c058d83e0a5d3be0cd648"
] | [
"gibson2/examples/demo/igsdf_obj_viz.py",
"gibson2/utils/map_utils.py",
"gibson2/robots/turtlebot_robot.py",
"gibson2/robots/fetch_robot.py"
] | [
"import cv2\nimport sys\nimport os\nimport numpy as np\nfrom gibson2.simulator import Simulator\nfrom gibson2.render.mesh_renderer.mesh_renderer_cpu import MeshRenderer\nfrom gibson2.render.mesh_renderer.mesh_renderer_settings import MeshRendererSettings\nfrom gibson2.render.profiler import Profiler\n# from gibson2... | [
[
"numpy.min",
"numpy.cos",
"numpy.sin",
"numpy.concatenate",
"numpy.max",
"numpy.mean",
"numpy.array",
"numpy.vstack"
],
[
"numpy.dot",
"numpy.abs",
"scipy.spatial.ConvexHull",
"numpy.linalg.norm",
"numpy.ones",
"numpy.ceil",
"numpy.float32",
"num... |
gmamaladze/robo-pi | [
"f9affc63760774073a3b1de4e4ea064bde2eb074"
] | [
"tfvoicepi/tools/play.py"
] | [
"import pyaudio\nimport numpy as np\n\nFORMAT = pyaudio.paInt16\nCHANNELS = 1\nRATE = 16000\nCHUNK_SIZE = 1000\nMAX_INT16 = np.iinfo(np.int16).max\n\np = pyaudio.PyAudio()\nstream = p.open(format=FORMAT,\n channels=CHANNELS,\n rate=RATE,\n output=True)\n\nfor i in range(... | [
[
"numpy.frombuffer",
"numpy.iinfo"
]
] |
RuthAngus/kinematics-and-rotation | [
"7cad283612bc70ca9d12c79978561b938f527198"
] | [
"code/test_dispersion.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nfrom dispersion import *\nimport scipy.stats as sps\nimport pandas as pd\n\n\ndef test_dispersion():\n np.random.seed(42)\n N = 10000\n x = np.random.uniform(0, 100, N)\n y = np.random.randn(N)*x\n inds = np.argsort(x)\n x, y = x[inds], y[inds]... | [
[
"numpy.dot",
"matplotlib.pyplot.legend",
"numpy.sqrt",
"numpy.linspace",
"matplotlib.pyplot.plot",
"numpy.concatenate",
"numpy.all",
"numpy.random.randn",
"numpy.ones_like",
"numpy.arange",
"numpy.diff",
"matplotlib.pyplot.errorbar",
"numpy.isclose",
"matplo... |
dreamer2368/mirgecom | [
"dc79645af040510a7e2b11d3f93db4c34ad39228"
] | [
"examples/wave-mpi.py"
] | [
"\"\"\"Demonstrate wave MPI example.\"\"\"\n\n__copyright__ = \"Copyright (C) 2020 University of Illinois Board of Trustees\"\n\n__license__ = \"\"\"\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the... | [
[
"numpy.abs",
"numpy.dot",
"numpy.array",
"numpy.cos"
]
] |
aligholamee/Patterns | [
"74ead5de22988b5e3c86464d192899453b13d26e"
] | [
"docs/assignment-4/src/5/knn_plot.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib.colors import ListedColormap\nfrom sklearn import neighbors\n\nn_neighbors = 1\n\n\nX = np.array([\n [2, 4],\n [4, 2],\n [4, 6],\n [6, 4],\n [4, 4],\n [6, 2]\n])\n\ny = np.array([\n [0],\n [0],\n [0],\n [0],\n [1]... | [
[
"matplotlib.pyplot.scatter",
"matplotlib.pyplot.title",
"numpy.arange",
"sklearn.neighbors.KNeighborsClassifier",
"matplotlib.colors.ListedColormap",
"matplotlib.pyplot.pcolormesh",
"numpy.array",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
sebzap/CarlaRL | [
"5283d15dee9e8dc5e728314d56875b4fbca3acb2"
] | [
"carla/agents/common.py"
] | [
"\n\nimport random\nimport time\n\nimport numpy as np\n\nfrom carla.agents.core import ActorCritic\nfrom carla.agents.utils.dummy_vec_env import DummyVecEnv\nfrom carla.agents.utils.pytorch_utils import dict_obs_to_tensor, merge_dict_obs_list, merge_list_of_dicts\nfrom carla.agents.utils.subproc_vec_env import Subp... | [
[
"numpy.mean",
"numpy.random.seed"
]
] |
stevemandala/Ax | [
"8e289a154e3a2ed237bf27ddb90e09963c0d6a97"
] | [
"ax/models/numpy/randomforest.py"
] | [
"#!/usr/bin/env python3\n# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom typing import List, Optional, Tuple\n\nimport numpy as np\nfrom ax.models.numpy_base import NumpyModel\... | [
[
"sklearn.ensemble.RandomForestRegressor",
"sklearn.tree.DecisionTreeRegressor",
"numpy.sqrt"
]
] |
zillow/datasets | [
"e017db64daab1eaccd564658d848263270f083c4"
] | [
"datasets/tutorials/3_foreach_dataset_flow.py"
] | [
"import os\n\nimport pandas as pd # type: ignore\nfrom metaflow import FlowSpec, step\n\nfrom datasets import Mode, dataset\nfrom datasets.plugins import BatchDataset, BatchOptions\n\n\nflow_dir = os.path.dirname(os.path.realpath(__file__))\nmy_dataset_foreach_path = os.path.join(flow_dir, \"data/my_dataset_foreac... | [
[
"pandas.DataFrame"
]
] |
XuMengyaAmy/ReportDALS | [
"057562b2703d49858f485148d5385d1c8544d55d"
] | [
"val_ours.py"
] | [
"import random\nfrom data import ImageDetectionsField, TextField, RawField\nfrom data import COCO, DataLoader\nimport evaluation\nfrom evaluation import PTBTokenizer, Cider\nfrom models.transformer import Transformer, MemoryAugmentedEncoder, MeshedDecoder, ScaledDotProductAttentionMemory\nimport torch\nfrom torch.o... | [
[
"numpy.random.seed",
"torch.load",
"torch.manual_seed",
"torch.no_grad",
"torch.cuda.manual_seed_all",
"torch.device"
]
] |
fhoguin/manim | [
"9017dc97b04094f99d77bb930df5bf3a3aead9c1"
] | [
"manim/_config/utils.py"
] | [
"\"\"\"Utilities to create and set the config.\n\nThe main class exported by this module is :class:`ManimConfig`. This class\ncontains all configuration options, including frame geometry (e.g. frame\nheight/width, frame rate), output (e.g. directories, logging), styling\n(e.g. background color, transparency), and ... | [
[
"numpy.array"
]
] |
ap439111/Sentiment-Analysis-Model-AmazonSageMaker | [
"8e804e8795d6dfcaf4ac7936cf95204ae94c7ad5"
] | [
"serve/predict.py"
] | [
"import argparse\nimport json\nimport os\nimport pickle\nimport sys\nimport sagemaker_containers\nimport pandas as pd\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.utils.data\n\nfrom model import LSTMClassifier\n\nfrom utils import review_to_words, convert_and_p... | [
[
"numpy.hstack",
"torch.load",
"torch.from_numpy",
"torch.no_grad",
"torch.cuda.is_available"
]
] |
yuhuihan/Reinforcement-Learning | [
"02bba66885bcd9cd9e13881c573ba5778cc3b93d",
"02bba66885bcd9cd9e13881c573ba5778cc3b93d"
] | [
"vvlab/utils/OUProcess.py",
"vvlab/models/actor_net.py"
] | [
"#!/usr/bin/env python\n# coding=utf-8\n\"\"\"\n@author: Jiawei Wu\n@create time: 2020-04-06 15:36\n@edit time: 2020-04-06 15:37\n@FilePath: /vvlab/utils/OUProcess.py\n@desc: \n\"\"\"\n\nimport numpy as np\n\nclass OUProcess(object):\n \"\"\"Ornstein-Uhlenbeck process\"\"\"\n\n def __init__(self, x_size, mu=0... | [
[
"numpy.random.randn",
"numpy.ones"
],
[
"torch.nn.Linear",
"torch.nn.functional.relu",
"torch.FloatTensor",
"torch.cuda.is_available",
"torch.nn.functional.tanh"
]
] |
Programmer-RD-AI/Tesla-Stock-Prediction-RNN-PyTorch | [
"bbbff92999776106debaf081cb383334e9e8fa32"
] | [
"wandb/run-20210820_110019-1sf9o95p/files/code/run.py"
] | [
"import torch\nimport numpy as np\nimport pandas as pd\nfrom torch.nn import *\nfrom torch.optim import *\nfrom help_funcs import *\nfrom model import *\nfrom sklearn.preprocessing import (\n StandardScaler,\n RobustScaler,\n MinMaxScaler,\n MaxAbsScaler,\n OneHotEncoder,\n LabelEncoder,\n Norm... | [
[
"numpy.array",
"pandas.read_csv",
"torch.from_numpy"
]
] |
ziliHarvey/smart-annotation-pointrcnn | [
"c615de59b0af58222c3d77e6b7e9fa1c81a30468"
] | [
"app/label_loader.py"
] | [
"import numpy as np\n\ndef get_label_anno(label_path):\n annotations = {}\n annotations.update({\n 'name': [],\n 'dimensions': [],\n 'location': [],\n 'rotation_y': []\n })\n with open(label_path, 'r') as f:\n lines = f.readlines()\n content = [line.strip().spli... | [
[
"numpy.array"
]
] |
intelligenttrafficforecasting/DCRNN | [
"128dc26e265491aad88bc4cb67d6ab2d2193532b"
] | [
"lib/metrics.py"
] | [
"import numpy as np\nimport tensorflow as tf\n\n\ndef masked_mse_tf(preds, labels, null_val=np.nan):\n \"\"\"\n Accuracy with masking.\n :param preds:\n :param labels:\n :param null_val:\n :return:\n \"\"\"\n if np.isnan(null_val):\n mask = ~tf.is_nan(labels)\n else:\n mask ... | [
[
"tensorflow.is_nan",
"tensorflow.not_equal",
"tensorflow.reduce_mean",
"numpy.isnan",
"tensorflow.cast",
"numpy.subtract",
"numpy.nan_to_num",
"tensorflow.subtract",
"tensorflow.zeros_like",
"numpy.mean",
"numpy.errstate",
"numpy.not_equal"
]
] |
CallMeMisterOwl/manim | [
"b22bdee1000f95c86df645545cf26c76b8d0ccab"
] | [
"manim/utils/space_ops.py"
] | [
"\"\"\"Utility functions for two- and three-dimensional vectors.\"\"\"\n\n__all__ = [\n \"get_norm\",\n \"quaternion_mult\",\n \"quaternion_from_angle_axis\",\n \"angle_axis_from_quaternion\",\n \"quaternion_conjugate\",\n \"rotate_vector\",\n \"thick_diagonal\",\n \"rotation_matrix\",\n ... | [
[
"numpy.cross",
"numpy.dot",
"numpy.abs",
"numpy.multiply",
"numpy.linalg.inv",
"numpy.arange",
"numpy.arccos",
"numpy.cos",
"numpy.sin",
"numpy.append",
"numpy.shape",
"numpy.identity",
"numpy.transpose",
"numpy.outer",
"numpy.repeat",
"numpy.array",... |
CitizenB/pandas | [
"ee1efb6d923a2c3e5a912efe20a336179614993d",
"ee1efb6d923a2c3e5a912efe20a336179614993d",
"ee1efb6d923a2c3e5a912efe20a336179614993d",
"ee1efb6d923a2c3e5a912efe20a336179614993d"
] | [
"pandas/io/formats/style.py",
"pandas/tests/indexing/multiindex/test_xs.py",
"pandas/tests/frame/methods/test_rename.py",
"pandas/tests/extension/arrow/arrays.py"
] | [
"\"\"\"\nModule for applying conditional formatting to DataFrames and Series.\n\"\"\"\n\nfrom collections import defaultdict\nfrom contextlib import contextmanager\nimport copy\nfrom functools import partial\nfrom itertools import product\nfrom typing import (\n Any,\n Callable,\n DefaultDict,\n Dict,\n... | [
[
"pandas.core.common.any_not_none",
"matplotlib.pyplot.cm.get_cmap",
"pandas.core.dtypes.common.is_float",
"pandas.compat._optional.import_optional_dependency",
"matplotlib.colors.Normalize",
"pandas.api.types.is_dict_like",
"pandas._config.get_option",
"pandas.io.formats.excel.Exce... |
jiwoncpark/magnify | [
"04421d43b9f5340989e8614d961ac9f5988bde0c"
] | [
"magnify/attentive_neural_process/modules/layers.py"
] | [
"\"\"\"Modified from the great implementation in\n\nhttps://github.com/3springs/attentive-neural-processes/blob/af431a267bad309b2d5698f25551986e2c4e7815/neural_processes/modules/modules.py\n\n\"\"\"\n\nfrom torch import nn\nfrom torch import Tensor\nimport torch.nn.functional as F\n\n\nclass MCDropout(nn.Dropout):\... | [
[
"torch.nn.functional.dropout2d",
"torch.nn.BatchNorm1d",
"torch.nn.LSTM",
"torch.nn.functional.dropout",
"torch.nn.Linear",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
]
] |
liamcli/nasbench-1shot1 | [
"e369bd77c69fd03070e8248f39e4f57cd901d1f3",
"e369bd77c69fd03070e8248f39e4f57cd901d1f3",
"e369bd77c69fd03070e8248f39e4f57cd901d1f3"
] | [
"nasbench_analysis/architecture_inductive_bias/train.py",
"bohb_default/plots/util.py",
"optimizers/edarts/architect.py"
] | [
"import argparse\nimport glob\nimport json\nimport logging\nimport os\nimport pickle\nimport sys\nimport time\n\nimport numpy as np\nimport torch\nimport torch.backends.cudnn as cudnn\nimport torch.nn as nn\nimport torch.utils\nimport torchvision.datasets as dset\nfrom torch.autograd import Variable\n\nfrom nasbenc... | [
[
"torch.nn.CrossEntropyLoss",
"torch.cuda.set_device",
"torch.cuda.manual_seed",
"numpy.random.seed",
"torch.manual_seed",
"torch.zeros",
"torch.utils.data.sampler.SubsetRandomSampler",
"torch.cuda.is_available",
"numpy.floor"
],
[
"numpy.median",
"pandas.DataFrame",... |
Cangonin/audiomentations | [
"fd1c0fd9bcfb9f62fa961938191e13d050752450",
"fd1c0fd9bcfb9f62fa961938191e13d050752450",
"fd1c0fd9bcfb9f62fa961938191e13d050752450",
"fd1c0fd9bcfb9f62fa961938191e13d050752450"
] | [
"audiomentations/spec_augmentations/spec_frequency_mask.py",
"audiomentations/augmentations/add_background_noise.py",
"audiomentations/augmentations/frequency_mask.py",
"audiomentations/augmentations/high_shelf_filter.py"
] | [
"import random\n\nimport numpy as np\n\nfrom audiomentations.core.transforms_interface import BaseSpectrogramTransform\n\n\nclass SpecFrequencyMask(BaseSpectrogramTransform):\n \"\"\"\n Mask a set of frequencies in a spectrogram, à la Google AI SpecAugment. This type of data\n augmentation has proved to ma... | [
[
"numpy.mean"
],
[
"numpy.concatenate"
],
[
"scipy.signal.butter",
"scipy.signal.sosfilt"
],
[
"scipy.signal.sosfilt",
"numpy.sqrt",
"numpy.cos",
"scipy.signal.sosfilt_zi",
"numpy.sin",
"numpy.zeros_like",
"numpy.array"
]
] |
jannster/heartandsole | [
"af5843ca82b3671002098c527a4437a858f2be1c"
] | [
"tests/test_fields.py"
] | [
"\"\"\"Based somewhat on pandas accessor testing.\n\nhttps://github.com/pandas-dev/pandas/blob/master/pandas/tests/strings/test_strings.py\nhttps://github.com/pandas-dev/pandas/blob/master/pandas/tests/strings/test_api.py\nhttps://github.com/pandas-dev/pandas/blob/master/pandas/tests/series/accessors/test_str_acces... | [
[
"pandas.testing.assert_series_equal",
"pandas.Series",
"pandas.api.types.is_float_dtype",
"pandas.Index",
"pandas.DataFrame",
"pandas.api.types.is_datetime64tz_dtype",
"pandas.testing.assert_frame_equal",
"pandas.DataFrame.from_dict",
"pandas.testing.assert_index_equal"
]
] |
NVIDIA-AI-IOT/a2j_handpose_3d | [
"653f1ed855699f774349523e9e4cbc9a36a95dbe"
] | [
"model/back_bone/resnet.py"
] | [
"'''\nCopyright (c) 2019 Boshen Zhang\nCopyright (c) 2021, NVIDIA CORPORATION. All rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without l... | [
[
"torch.nn.Sequential",
"torch.nn.init.constant_",
"torch.nn.Conv2d",
"torch.nn.MaxPool2d",
"torch.nn.Linear",
"torch.nn.AdaptiveAvgPool2d",
"torch.nn.LeakyReLU",
"torch.nn.BatchNorm2d",
"torch.utils.model_zoo.load_url",
"torch.nn.init.kaiming_normal_"
]
] |
chrsthur/mne-nirs | [
"6a05ff2e744fb362e2253dd7953657795c646207"
] | [
"mne_nirs/preprocessing/_scalp_coupling_segmented.py"
] | [
"# Authors: Robert Luke <mail@robertluke.net>\n#\n# License: BSD (3-clause)\n\nimport numpy as np\n\nfrom mne import pick_types\nfrom mne.io import BaseRaw\nfrom mne.utils import _validate_type, verbose\nfrom mne.preprocessing.nirs import (_channel_frequencies,\n _check_channels_o... | [
[
"numpy.corrcoef",
"numpy.ceil"
]
] |
MSeeker1340/num2-spring2018 | [
"61f87576736d146821d20107bed6f8480a0c2a6a"
] | [
"src/expint.py"
] | [
"# module expint\nimport numpy as np\nimport scipy.linalg as la\n\n##########################\n# Matrix functions using scipy.linalg.funm\n# Special care is given to small arguments for numerical stability (e.g. \n# expm1 instead of exp and using leading order Taylor expansion when x \n# is smaller than some thresh... | [
[
"scipy.linalg.funm",
"numpy.array",
"numpy.abs",
"numpy.expm1"
]
] |
liangkatherine/serdespy | [
"9aa0c20ce66dad60e6488d74364a130e6d71b6fb"
] | [
"examples/FEC_BERT_plotter.py"
] | [
"import matplotlib.pyplot as plt\nimport matplotlib.axes as ax\n \n\n\nclass BERT:\n def __init__(self):\n self.lines = []\n self.tap_weights = []\n self.FEC_codes = []\n \n def add_point(self, pre_FEC_BER, post_FEC_BER, tap_weights , FEC_code):\n \n ... | [
[
"matplotlib.pyplot.loglog",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] |
intelkevinputnam/lpot-docs | [
"1ff32b4d89074a6bd133ba531f7c0cea3b73152f",
"1ff32b4d89074a6bd133ba531f7c0cea3b73152f",
"1ff32b4d89074a6bd133ba531f7c0cea3b73152f",
"1ff32b4d89074a6bd133ba531f7c0cea3b73152f",
"1ff32b4d89074a6bd133ba531f7c0cea3b73152f",
"1ff32b4d89074a6bd133ba531f7c0cea3b73152f",
"1ff32b4d89074a6bd133ba531f7c0cea3b73152... | [
"examples/onnxrt/onnx_model_zoo/mobilebert/main.py",
"examples/pytorch/eager/huggingface_models/examples/text-classification/run_glue_no_trainer_gradient_prune.py",
"examples/pytorch/fx/object_detection/maskrcnn/pytorch/maskrcnn_benchmark/solver/build.py",
"test/test_tpe.py",
"test/ux/web/test_communication... | [
"import numpy as np\nimport onnxruntime\nimport onnx\nimport tokenization\nimport os\nfrom run_onnx_squad import *\nimport json\nfrom run_onnx_squad import read_squad_examples, convert_examples_to_features, write_predictions\nfrom torch.utils.data import Dataset\nfrom torch.utils.data import DataLoader\nimport tqdm... | [
[
"numpy.array",
"torch.utils.data.DataLoader"
],
[
"torch.onnx.export",
"torch.ones",
"torch.from_numpy",
"torch.no_grad",
"torch.utils.data.dataloader.DataLoader"
],
[
"torch.optim.SGD"
],
[
"tensorflow.Graph",
"tensorflow.graph_util.convert_variables_to_constan... |
josephdickson11/opencv | [
"20003c364dbefb37c1dae0125c37010f0f32fee0",
"20003c364dbefb37c1dae0125c37010f0f32fee0"
] | [
"chapter3.py",
"chapter2.py"
] | [
"import cv2\nimport numpy as np\n\nkernel = np.ones((5,5), np.uint8)\n\nimg = cv2.imread(\"resources/1591988497278.jpg\")\nprint(img.shape)\nedge_img = cv2.Canny(img, 30, 30)\nresize_img = cv2.resize(img,(300, 200))\ncropped_img = img[:200, :200]\n\ncv2.imshow(\"image box\", img)\ncv2.imshow(\"edge image\", edge_im... | [
[
"numpy.ones"
],
[
"numpy.ones"
]
] |
worc3131/audio | [
"05bff83fdec3e8f70f80bf7a1b89951bf7050114"
] | [
"torchaudio/functional/functional.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport math\nfrom typing import Optional, Tuple\nimport warnings\n\nimport torch\nfrom torch import Tensor\n\n__all__ = [\n \"spectrogram\",\n \"griffinlim\",\n \"amplitude_to_DB\",\n \"DB_to_amplitude\",\n \"compute_deltas\",\n \"compute_kaldi_pitch\",\n \"create_fb... | [
[
"torch.abs",
"torch.max",
"torch.zeros",
"torch.cat",
"torch.sin",
"torch.sign",
"torch.sum",
"torch.pow",
"torch.norm",
"torch.median",
"torch.round",
"torch.tensor",
"torch.rand",
"torch.arange",
"torch.nn.functional.pad",
"torch.cos",
"torch.l... |
abdullah-zaiter/Sign-Language-By-Glove | [
"48734b870cc797b817e2d8ac33d822d0c1cea000"
] | [
"Bluetooth/ble_comm/Scripts/dataAnalysis.py"
] | [
"\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport numpy as np\n\ndef loadFromFile(nameFile):\n d = np.load('../data/'+nameFile+name+'array.npy')\n print('Reading from' + '../data/'+nameFile+name+'array.npy')\n return d\n\ndef diff(x, y, y2, name):\n newY = abs(y - y2)\n fig = plt.figure()... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.xlabel",
"numpy.load",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] |
linklab/link_rl | [
"e3d3196dcd49fd71b45941e07fc0d8a27d1d8c99",
"e3d3196dcd49fd71b45941e07fc0d8a27d1d8c99",
"e3d3196dcd49fd71b45941e07fc0d8a27d1d8c99",
"e3d3196dcd49fd71b45941e07fc0d8a27d1d8c99",
"e3d3196dcd49fd71b45941e07fc0d8a27d1d8c99",
"e3d3196dcd49fd71b45941e07fc0d8a27d1d8c99",
"e3d3196dcd49fd71b45941e07fc0d8a27d1d8c9... | [
"codes/f_main/federation_main/federated_main/main_chief.py",
"codes/f_main/trade_main/upbit_trade_main.py",
"temp/cartpole_a2c.py",
"common/fast_rl/replay_buffer.py",
"codes/b_environments/or_gym/envs/classic_or/vmpacking.py",
"temp/ppo/minimal_ppo.py",
"codes/g_play/play_bfore_train.py",
"codes/c_mod... | [
"import sys, os\nfrom multiprocessing import Process\n\nimport torch\n\nfrom codes.a_config.parameters import PARAMETERS as params\nimport codes.f_main.federation_main.utils as utils\nfrom rl_main import rl_utils\n\ndevice = torch.device('cuda' if torch.cuda.is_available() else 'cpu')\n\n\nif __name__ == \"__main__... | [
[
"torch.cuda.is_available"
],
[
"numpy.std",
"numpy.mean",
"torch.cuda.is_available"
],
[
"torch.Tensor",
"torch.sum",
"torch.exp",
"torch.nn.Linear",
"numpy.zeros_like",
"torch.nn.MSELoss"
],
[
"numpy.array",
"numpy.zeros"
],
[
"numpy.random.choi... |
jsong0327/mmdetection | [
"bd65e7706a4c5f61554d24549ab2d1cdca5dec0d"
] | [
"mmdet/models/backbones/ssd_vgg.py"
] | [
"import logging\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom mmcv.cnn import (VGG, xavier_init, constant_init, kaiming_init,\n normal_init)\nfrom mmcv.runner import load_checkpoint\n\nfrom ..registry import BACKBONES\n\n\n@BACKBONES.register_module\nclass SSDVGG... | [
[
"torch.nn.Sequential",
"torch.Tensor",
"torch.nn.Conv2d",
"torch.nn.MaxPool2d",
"torch.nn.ReLU"
]
] |
nateGeorge/scrape_stocks | [
"7dd2498ec7a860dfa2c9d655c0b45c9712be1a1f"
] | [
"short_squeeze_plotting.py"
] | [
"\"\"\"\nThis is intended to be plug-and-play short squeeze analysis. Generates top picks and plots.\n\nNeed to add in earnings dates into the mix. Stocks with earnings coming up should be looked into more.\n\"\"\"\nimport sys\n\nimport talib\nimport pandas as pd\nimport numpy as np\nfrom tqdm import tqdm\nfrom s... | [
[
"pandas.concat",
"matplotlib.pyplot.show",
"matplotlib.pyplot.get_cmap"
]
] |
GeniusGaryant/PReMVOS | [
"53c5fac37fb57429d0046b77a491009d7b81607f"
] | [
"code/ReID_net/Trainer.py"
] | [
"import tensorflow as tf\nimport numpy as np\nimport Constants as Constants\nfrom Log import log\nfrom Util import average_gradients, clip_gradients\n\n\nclass Trainer(object):\n\n def __init__(self, config, train_network, test_network, global_step, session):\n self.profile = config.bool(\"profile\", Fals... | [
[
"tensorflow.device",
"tensorflow.RunMetadata",
"tensorflow.global_variables",
"tensorflow.variables_initializer",
"tensorflow.gfile.MakeDirs",
"tensorflow.train.AdamOptimizer",
"tensorflow.summary.scalar",
"tensorflow.add_n",
"tensorflow.python.client.timeline.Timeline",
"t... |
BhanuPrasadKoppineedi/Heart_Disease_Prediction | [
"0e4abb3ef42d135344b39456e0d7fa4afafb53e6"
] | [
"heart_disease_prediction (1).py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"HEART_DISEASE_PREDICTION.ipynb\n\nAutomatically generated by Colaboratory.\n\nOriginal file is located at\n https://colab.research.google.com/drive/1yc00bQ4VnOoHkCp3NaMbUnL2qCZmz_Xk\n\n***HEART DISESE PREDICTION PROJECT***\n\n**IMPORTING LIBRARIES AND UPLOADING DATA SET**\n\"\"\"\... | [
[
"pandas.read_csv",
"sklearn.linear_model.LogisticRegression",
"matplotlib.pyplot.title",
"numpy.asarray",
"sklearn.model_selection.train_test_split",
"sklearn.metrics.confusion_matrix",
"sklearn.preprocessing.StandardScaler",
"matplotlib.pyplot.show",
"sklearn.metrics.classific... |
randompast/cusignal | [
"30f2fa9884b6dac39c20e1d06e100a7ee5c41e38"
] | [
"python/cusignal/test/utils.py"
] | [
"# Copyright (c) 2019-2020, NVIDIA CORPORATION.\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.testing.assert_allclose"
]
] |
ljmartin/molrec | [
"cff25d831710e589a4892b32545afd1ef1097442"
] | [
"3_time_split/unused/mean_median_figure.py"
] | [
"import matplotlib.pyplot as plt\nimport pymc3 as pm\nfrom scipy.special import logit, expit\nfrom scipy.stats import gaussian_kde, laplace, norm\nimport numpy as np \nplt.style.use('seaborn')\n\n\nfilenames = ['label_correlation', 'hpo_implicit_als', 'hpo_implicit_bpr',\n 'hpo_lightfm_warp', 'hpo_light... | [
[
"matplotlib.pyplot.tight_layout",
"scipy.special.expit",
"numpy.random.choice",
"matplotlib.pyplot.subplots",
"numpy.sort",
"scipy.special.logit",
"numpy.mean",
"numpy.load",
"numpy.array",
"matplotlib.pyplot.style.use"
]
] |
arch1baald/dlcourse_ai | [
"cb55a4de241c58dffa2331ba17326e4ef244694c"
] | [
"assignments/assignment3/layers.py"
] | [
"import numpy as np\n\n\ndef l2_regularization(W, reg_strength):\n '''\n Computes L2 regularization loss on weights and its gradient\n\n Arguments:\n W, np array - weights\n reg_strength - float value\n\n Returns:\n loss, single value - l2 regularization loss\n gradient, np.array sam... | [
[
"numpy.dot",
"numpy.arange",
"numpy.ones",
"numpy.zeros_like",
"numpy.random.randn",
"numpy.zeros",
"numpy.sum"
]
] |
windstamp/PaddleSeg | [
"828808ea306adf2e8b94c291b77e7b7cf558bc2a",
"828808ea306adf2e8b94c291b77e7b7cf558bc2a",
"828808ea306adf2e8b94c291b77e7b7cf558bc2a"
] | [
"pdseg/metrics.py",
"contrib/HumanSeg/bg_replace.py",
"slim/prune/eval_prune.py"
] | [
"# coding: utf8\n# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.\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... | [
[
"numpy.ones_like",
"numpy.asarray",
"scipy.sparse.csr_matrix",
"numpy.transpose",
"numpy.array",
"numpy.zeros"
],
[
"numpy.expand_dims",
"numpy.squeeze",
"numpy.transpose",
"numpy.repeat",
"numpy.zeros"
],
[
"numpy.set_printoptions",
"numpy.array"
]
] |
ikabanen/movement_recognition_and_record | [
"b2f31c40b8708509c15d3fed98f355835b887fa4"
] | [
"movement_recogn_and_record.py"
] | [
"import cv2\r\nimport time\r\nimport pandas\r\nfrom datetime import datetime\r\nimport numpy as np\r\n\r\nfirst_frame = None\r\nstatus_list = [None, None]\r\ntimes = []\r\ndf = pandas.DataFrame(columns=[\"Start\", \"End\"])\r\nvideo = cv2.VideoCapture(0)\r\n\r\n# Define the codec and create VideoWriter object\r\nfo... | [
[
"pandas.DataFrame"
]
] |
Gavin-G219/tensorflow | [
"9e0fa9578638f9147c0b180e6ea89d67d5c0bae3",
"5eb3d92fc5d7a0641ad5d1ad2b54870b6e5b5e58"
] | [
"tensorflow/python/kernel_tests/control_flow_ops_py_test.py",
"tensorflow/python/autograph/impl/conversion.py"
] | [
"# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.python.framework.tensor_shape.scalar",
"tensorflow.core.protobuf.config_pb2.RunMetadata",
"tensorflow.python.ops.math_ops.subtract",
"tensorflow.python.ops.gen_array_ops.ref_identity",
"tensorflow.python.ops.variables.Variable",
"tensorflow.python.ops.init_ops.constant_initiali... |
CORE-Robotics-Lab/Cross_Loss_Influence_Functions | [
"6f0fa45f8896cd6c238c143eca6ddebef97b642c",
"6f0fa45f8896cd6c238c143eca6ddebef97b642c",
"6f0fa45f8896cd6c238c143eca6ddebef97b642c"
] | [
"cross_loss_influence/models/skip_gram_word2vec.py",
"cross_loss_influence/helpers/test_set_alignments.py",
"cross_loss_influence/helpers/bolukbasi_prior_work/we.py"
] | [
"# Created by Andrew Silva\n\"\"\"\nAdapted from https://github.com/Adoni/word2vec_pytorch\n\n\"\"\"\nimport torch\nfrom torch import nn\nimport torch.nn.functional as F\nimport numpy as np\n\n\nclass SkipGramModel(nn.Module):\n \"\"\"Skip gram model of word2vec.\n Attributes:\n emb_size: Embedding siz... | [
[
"torch.mean",
"numpy.sqrt",
"torch.nn.functional.logsigmoid",
"torch.sum",
"torch.nn.Embedding",
"torch.nn.LogSigmoid",
"torch.mul"
],
[
"numpy.std",
"numpy.mean"
],
[
"numpy.median",
"numpy.linalg.norm",
"numpy.mean",
"numpy.array",
"sklearn.decompo... |
dahvida/FOCUS | [
"796f546bec536528afbb77cec02fb8238bcbec27"
] | [
"utils.py"
] | [
"from rdkit import Chem\nfrom rdkit.Chem import AllChem, Descriptors\nimport numpy as np\nfrom rdkit.ML.Descriptors import MoleculeDescriptors\nfrom sklearn import preprocessing\nimport random\nfrom hyperopt import tpe, fmin, Trials\nfrom sklearn.metrics import average_precision_score, roc_auc_score\nfrom sklearn.m... | [
[
"sklearn.metrics.roc_auc_score",
"numpy.nan_to_num",
"sklearn.model_selection.StratifiedKFold",
"numpy.mean",
"sklearn.metrics.average_precision_score",
"sklearn.preprocessing.StandardScaler",
"numpy.array"
]
] |
daisyden/lpot | [
"d8709bb73ce13cfc0fd760845e0be40af22f5a45",
"d8709bb73ce13cfc0fd760845e0be40af22f5a45",
"d8709bb73ce13cfc0fd760845e0be40af22f5a45",
"d8709bb73ce13cfc0fd760845e0be40af22f5a45"
] | [
"lpot/adaptor/tf_utils/util.py",
"examples/tensorflow/recommendation/wide_deep_large_ds/inference.py",
"lpot/policy/magnitude.py",
"test/test_bayesian.py"
] | [
"#\n# -*- coding: utf-8 -*-\n#\n# Copyright (c) 2019 Intel Corporation\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#... | [
[
"tensorflow.compat.v1.saved_model.signature_def_utils.predict_signature_def",
"tensorflow.keras.models.load_model",
"tensorflow.Graph",
"tensorflow.compat.v1.train.import_meta_graph",
"tensorflow.import_graph_def",
"tensorflow.compat.v1.get_default_graph",
"tensorflow.python.platform.g... |
meawoppl/numba | [
"bb8df0aee99133c6d52465ae9f9df2a7996339f3",
"bb8df0aee99133c6d52465ae9f9df2a7996339f3",
"bb8df0aee99133c6d52465ae9f9df2a7996339f3"
] | [
"examples/example.py",
"oldnumba/tests/prange/test_prange.py",
"numba/tests/test_unpack_sequence.py"
] | [
"# -*- coding: utf-8 -*-\nfrom __future__ import print_function, division, absolute_import\n\nfrom scipy.misc import lena\nfrom numpy import ones\nimport numpy\n\nfrom numba.decorators import jit\nfrom numba import int32, int64\n\n# Original approach will be slower for now due to the object mode failback\n# for num... | [
[
"scipy.misc.lena",
"numpy.zeros_like",
"scipy.ndimage.convolve",
"numpy.ones"
],
[
"numpy.arange",
"numpy.sum",
"numpy.empty"
],
[
"numpy.zeros"
]
] |
hwang595/Draco | [
"8472912cce82e6d74087a402fd417e7a837517ab"
] | [
"src/setup.py"
] | [
"from distutils.core import setup\nfrom Cython.Build import cythonize\nimport numpy\n\nsetup(\n name = 'cyclic decoding',\n ext_modules = cythonize(\"decoding.pyx\"),\n include_dirs=[numpy.get_include()]\n)"
] | [
[
"numpy.get_include"
]
] |
wbm06/RfPy | [
"3ea75add7cab6d73d81ca87372defdab71dc7c42"
] | [
"rfpy/harmonics.py"
] | [
"# Copyright 2019 Pascal Audet\n#\n# This file is part of RfPy.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to ... | [
[
"numpy.square",
"numpy.dot",
"numpy.linalg.svd",
"numpy.arange",
"numpy.cos",
"matplotlib.pyplot.savefig",
"numpy.fft.fftshift",
"numpy.sin",
"matplotlib.pyplot.clf",
"numpy.argmin",
"matplotlib.pyplot.show",
"numpy.zeros",
"numpy.float",
"matplotlib.pyplot.... |
scaactk/daal4py | [
"08c5fa53b6eab0bc05aa2338727cb5d2c129171b"
] | [
"examples/sycl/svm_batch.py"
] | [
"#*******************************************************************************\r\n# Copyright 2020 Intel Corporation\r\n# All Rights Reserved.\r\n#\r\n# This software is licensed under the Apache License, Version 2.0 (the\r\n# \"License\"), the following terms apply:\r\n#\r\n# You may not use this file except in... | [
[
"pandas.read_csv",
"numpy.allclose",
"numpy.ascontiguousarray",
"numpy.set_printoptions",
"numpy.where",
"numpy.loadtxt"
]
] |
Mastour-mouhcine/rodProject | [
"3c4066ce78272752a286f57245fb5969c6340fda"
] | [
".history/serverSide/verificationVF_20211104125303.py"
] | [
"import xlsxwriter\nimport mysql.connector\nfrom selenium.webdriver.chrome.options import Options \nfrom selenium import webdriver\nimport time\nfrom bs4 import BeautifulSoup\nimport numpy as np\nimport pandas as pd\nimport xlrd\nfrom selenium import webdriver\nimport requests, time\nimport re\nimport os\nfrom webd... | [
[
"pandas.DataFrame",
"pandas.ExcelWriter"
]
] |
sadielbartholomew/cf-python | [
"98541d8e55c703eca9bfba4168fb3d42755267da"
] | [
"cf/cfdatetime.py"
] | [
"import datetime\nfrom functools import partial\n\nimport cftime\nimport numpy as np\n\nfrom .functions import _DEPRECATION_ERROR_CLASS\n\n_default_calendar = \"gregorian\"\n\n# --------------------------------------------------------------------\n# Mapping of CF calendars to cftime date-time objects\n# -----------... | [
[
"numpy.expand_dims",
"numpy.ndim",
"numpy.vectorize",
"numpy.asanyarray",
"numpy.ma.masked_all",
"numpy.array",
"numpy.ma.is_masked"
]
] |
dabi0614/GeoData | [
"1699e9d7eb2c23dfee1e14ac5857507834909914",
"1699e9d7eb2c23dfee1e14ac5857507834909914",
"1699e9d7eb2c23dfee1e14ac5857507834909914",
"1699e9d7eb2c23dfee1e14ac5857507834909914"
] | [
"geodata/sketchG1-1.py",
"geodata/sketch7.py",
"geodata/sketchE.py",
"geodata/sketchJ2.py"
] | [
"\nfrom dask.distributed import Client\n\nimport numpy as np\n\nimport matplotlib as mpl\nimport matplotlib.mlab as mlab\nimport matplotlib.pyplot as plt\nimport matplotlib.tri as tri\nimport cartopy.crs as ccrs\n\nimport geodata as gd\nimport pystare as ps\nimport h5py as h5\nfrom pyhdf.SD import SD, SDC\n\nimport... | [
[
"matplotlib.pyplot.figtext",
"matplotlib.tri.Triangulation",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.show"
],
[
"numpy.array"
],
[
"numpy.nanmax",
"numpy.amax",
"numpy.ones_like",
"numpy.amin",
"matplotlib.pyplot.subplots",
"numpy.max",
"numpy.array... |
MoonmanBye/TorchInference_RRAM | [
"4c7948299f608658dcc42602c43f05b008e0fef2"
] | [
"models/quant/quant_modules.py"
] | [
"\"\"\"\nQuantization modules\n\"\"\"\n\nimport torch \nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom .utee import wage_quantizer\n\ndef dorefa_quant(x, nbit, dequantize=True):\n x = torch.tanh(x)\n scale = 2**nbit - 1\n \n x = x / 2 / x.abs().max() + 1/2\n xq = torch.round(x * scale)\... | [
[
"torch.round",
"torch.nn.functional.conv2d",
"torch.tensor",
"torch.tanh",
"torch.no_grad",
"torch.where",
"torch.nn.functional.linear"
]
] |
guberti/tvm | [
"bd88ee28bb1844a15c507a516eb823c90e8fbd75"
] | [
"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.logical_xor",
"torch.randint",
"numpy.take",
"numpy.asarray",
"numpy.dtype",
"torch.set_grad_enabled",
"numpy.random.randn",
"numpy.exp",
"numpy.where",
"scipy.special.softmax",
"torch.nn.EmbeddingBag",
"numpy.random.randint",
"torch.onnx.export",
"nu... |
narendrameena/featuerSelectionAssignment | [
"d6f3be3953934b46eb59b23e3f66aee1273fa4e4"
] | [
"comparision.py"
] | [
"print(__doc__)\n\n\nimport warnings\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom scipy import linalg\n\nfrom sklearn.linear_model import (RandomizedLasso, lasso_stability_path,\n LassoLarsCV)\nfrom sklearn.feature_selection import f_regression\nfrom sklearn.preproce... | [
[
"numpy.dot",
"matplotlib.pyplot.legend",
"sklearn.feature_selection.f_regression",
"numpy.linspace",
"matplotlib.pyplot.plot",
"numpy.max",
"numpy.where",
"sklearn.linear_model.LassoLarsCV",
"sklearn.linear_model.RandomizedLasso",
"sklearn.metrics.precision_recall_curve",
... |
hadi-nayebi/SeqEN | [
"2885ab322f6b51821ce67a532265a0087668fe12"
] | [
"SeqEN2/utils/seq_tools.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\n# by nayebiga@msu.edu\n__version__ = \"0.0.1\"\n\nfrom numpy.random import choice\nfrom torch import (\n Tensor,\n argmax,\n cat,\n diagonal,\n empty,\n eye,\n fliplr,\n index_select,\n mode,\n randperm,\n)\nfrom torch import sum as torch_sum\... | [
[
"torch.empty",
"numpy.random.choice",
"torch.randperm",
"torch.cat",
"torch.eye",
"torch.index_select",
"torch.argmax"
]
] |
gauss314/juanpy | [
"5e3f1a747e660786f5f99ea140f238247923b9d5"
] | [
"juanpy/max_min.py"
] | [
"import matplotlib.pyplot as plt\nimport pandas as pd\nimport yfinance as yf\nimport datetime \n\ndef trends(ticker, start='2000-01-01', end=None, sensibilidad=None, escala='linear'):\n '''\n Encuentra maximos y mínimos locales dada una sensibilidad (cantidad de velas de la ventana local)\n Gráfico 1: Prec... | [
[
"pandas.concat",
"matplotlib.pyplot.subplots",
"pandas.DataFrame",
"pandas.plotting.register_matplotlib_converters",
"matplotlib.pyplot.subplots_adjust"
]
] |
fancompute/simphox | [
"917673cc3ef8fb54fcbbaaa93b8efdc09a8e3614",
"917673cc3ef8fb54fcbbaaa93b8efdc09a8e3614"
] | [
"simphox/viz.py",
"tests/circuit_test.py"
] | [
"import numpy as np\nfrom typing import Dict\n\nimport xarray\nfrom .typing import Tuple, Optional, List\n\ntry:\n HOLOVIEWS_IMPORTED = True\n import holoviews as hv\n from holoviews.streams import Pipe\n from holoviews import opts\n import panel as pn\n from bokeh.models import Range1d, LinearAxi... | [
[
"numpy.abs",
"numpy.asarray",
"numpy.arange",
"numpy.max",
"numpy.array"
],
[
"numpy.random.seed",
"numpy.eye",
"numpy.linalg.norm",
"numpy.testing.assert_allclose",
"scipy.stats.unitary_group.rvs"
]
] |
yinanl/rocs | [
"bf2483903e39f4c0ea254a9ef56720a1259955ad",
"bf2483903e39f4c0ea254a9ef56720a1259955ad"
] | [
"examples/Moore-Greitzer/sim_abst.py",
"examples/scara/animation.py"
] | [
"from os.path import dirname,realpath\nimport numpy as np\nfrom scipy.integrate import solve_ivp\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as patches\nimport sys\npypath = dirname(dirname(dirname(realpath(__file__)))) + '/python/'\nsys.path.insert(1, pypath)\nimport utils\nfrom odes import MG\n\n\... | [
[
"numpy.asarray",
"matplotlib.patches.Rectangle",
"scipy.integrate.solve_ivp",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.show",
"numpy.argwhere",
"numpy.array",
"numpy.random.default_rng"
],
[
"matplotlib.patches.Rectangle",
"matplotlib.lines.Line2D",
"matplot... |
cbenitez81/probreg | [
"1769af92e06e5e1e7441d9abf9982e94736b4685"
] | [
"probreg/filterreg.py"
] | [
"from __future__ import print_function\nfrom __future__ import division\nimport abc\nfrom collections import namedtuple\nimport six\nimport numpy as np\nimport open3d as o3\nfrom . import transformation as tf\nfrom . import gaussian_filtering as gf\nfrom . import gauss_transform as gt\nfrom . import se3_op as so\nf... | [
[
"numpy.square",
"numpy.dot",
"numpy.sqrt",
"numpy.multiply",
"numpy.power",
"numpy.finfo",
"numpy.ones",
"numpy.zeros_like",
"numpy.zeros",
"numpy.divide"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.