repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list | possible_versions list |
|---|---|---|---|---|---|
solo-Madcoder/Mandelbrot-matplotlib | [
"49e2107ad1d0428aa47dcd0d1b1f5ccb144d8ee8"
] | [
"Mandelbrot.py"
] | [
"\"\"\"\n\nThe term Mandelbrot set is used to refer both to a general class of fractal sets and to a particular instance of such a set. In general, a Mandelbrot set marks the set of points in the complex plane such that the corresponding Julia set is connected and not computable.\n\nThe Mandelbrot set is the set ob... | [
[
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.yticks",
"matplotlib.pyplot.box",
"numpy.linspace",
"matplotlib.pyplot.title",
"matplotlib.pyplot.show",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.figtext",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.xticks",
"matpl... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
SimiPro/tweet2vec_lasagne | [
"2b6fe4ea8ed2c4f50680e296395d7a89def0550d"
] | [
"tweet2vec/t2v.py"
] | [
"import numpy as np\nimport lasagne\nimport theano\nimport theano.tensor as T\nimport random\nimport pdb\n\nfrom collections import OrderedDict\nfrom settings_char import N_BATCH, MAX_LENGTH, CHAR_DIM, SCALE, C2W_HDIM, WDIM, GRAD_CLIP, BIAS\n\ndef init_params(n_chars):\n '''\n Initialize all params\n '''\n... | [
[
"numpy.load",
"numpy.random.normal",
"numpy.zeros",
"numpy.random.seed"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
rishabh-16/segmentation_models.pytorch | [
"d48923de949bd09d5ada0ecc7c0893c3eab474f4"
] | [
"segmentation_models_pytorch/encoders/resnet.py"
] | [
"\"\"\" Each encoder should have following attributes and methods and be inherited from `_base.EncoderMixin`\n\nAttributes:\n\n _out_channels (list of int): specify number of channels for each encoder feature tensor\n _depth (int): specify number of stages in decoder (in other words number of downsampling ope... | [
[
"torch.nn.Sequential",
"torch.nn.Identity"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
veedata/album-manager | [
"e42980889ae18ec5eb0634fe071c5dc5350313cb"
] | [
"memories/divider.py"
] | [
"import cv2\nimport numpy as np\nimport copy\n\n\ndef rotate_image(mat: np.ndarray, angle: int):\n \"\"\"Rotates the image without cropping the edges\n\n Args:\n mat (np.ndarray): Your input Image array\n angle (int): Rotation angle\n\n Returns:\n np.ndarray: Rotated image as output\n ... | [
[
"numpy.int0",
"numpy.uint8",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
karaage0703/deepjanken | [
"5c612631d4034089456e8bf713887691df2d5e25"
] | [
"retrain.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.nn.softmax_cross_entropy_with_logits",
"tensorflow.logging.warning",
"tensorflow.gfile.DeleteRecursively",
"tensorflow.zeros",
"tensorflow.gfile.Exists",
"tensorflow.stack",
"numpy.squeeze",
"tensorflow.cast",
"... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
AshitakaLax/WeatherNN | [
"de7a03b1a6f313d2a0a43d0c4c063eca8a50d904"
] | [
"tfexamples/tfhistogramexample.py"
] | [
"import tensorflow as tf\n\nk = tf.placeholder(tf.float32)\n\n# Make a normal distribution, with a shifting mean\nmean_moving_normal = tf.random_normal(shape=[1000], mean=(5*k), stddev=1)\n# Record that distribution into a histogram summary\ntf.summary.histogram(\"normal/moving_mean\", mean_moving_normal)\n\n# Setu... | [
[
"tensorflow.summary.FileWriter",
"tensorflow.placeholder",
"tensorflow.random_normal",
"tensorflow.summary.merge_all",
"tensorflow.Session",
"tensorflow.summary.histogram"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
lulindev/unet-pytorch | [
"af0629e522f968c8c26dc7b8f1430d1caa192d54"
] | [
"datasets/transforms.py"
] | [
"from typing import Sequence, Union\n\nimport numpy as np\nimport torch\nimport torchvision\nimport torchvision.transforms.functional as F\n\n\nclass Transforms:\n def __init__(self, cfg: dict, augmentation=False):\n if not augmentation:\n self.augmentation = None\n else:\n cf... | [
[
"numpy.array",
"torch.rand"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
lrscy/Unsupervised-Dual-Learning-Neural-Machine-Translation-Model | [
"29fda037422822081ad2ff218cc5c3e3280e83a5"
] | [
"pytorch-dual-learning/nmt/nmt.py"
] | [
"from __future__ import print_function\n\nimport os\nimport sys\nimport time\nimport argparse\nfrom itertools import tee\n\nimport numpy as np\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.utils\nfrom torch.autograd import Variable\nfrom torch import optim\nfrom torch.nn import Parameter\nimport torch.nn.... | [
[
"torch.nn.functional.softmax",
"torch.load",
"torch.zeros",
"torch.cat",
"torch.multinomial",
"torch.tanh",
"torch.nn.utils.rnn.pad_packed_sequence",
"torch.FloatTensor",
"torch.topk",
"numpy.exp",
"torch.save",
"torch.nn.CrossEntropyLoss",
"torch.nn.Dropout",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
arunj18/PSO-QPSO | [
"00b7296a294d53c7676db4424f7787aa287cf45a"
] | [
"jmetal/algorithm/multiobjective/smpso.py"
] | [
"from typing import TypeVar, List\nfrom copy import copy\nfrom math import sqrt\nimport random\n\nimport numpy\n\nfrom jmetal.component.archive import BoundedArchive\nfrom jmetal.component.evaluator import Evaluator, SequentialEvaluator\nfrom jmetal.core.algorithm import ParticleSwarmOptimization\nfrom jmetal.core.... | [
[
"numpy.zeros",
"numpy.empty"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
liuyangdh/multimodal-vae-public | [
"2a358eb3593e9942e0846eb0095519acef462fa6"
] | [
"celeba/datasets.py"
] | [
"from __future__ import division\nfrom __future__ import print_function\nfrom __future__ import absolute_import\n\nimport os\nimport sys\nimport copy\nimport random\nimport numpy as np\nimport numpy.random as npr\nfrom PIL import Image\nfrom random import shuffle\nfrom scipy.misc import imresize\n\nimport torch\nfr... | [
[
"torch.round",
"numpy.array",
"torch.from_numpy",
"numpy.vstack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
jjog22/interpret-community | [
"17f5a3fd28e6377f51e9532c5648e91e2037b9e5"
] | [
"test/raw_explain/test_raw_explanation.py"
] | [
"# ---------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# ---------------------------------------------------------\n\nimport pytest\n\nimport numpy as np\n\nfrom common_utils import create_sklearn_svm_classifier, create_sklearn_random_forest_regres... | [
[
"numpy.eye",
"numpy.array",
"sklearn.model_selection.train_test_split"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mlotz/timeSeries | [
"cd8b7915bb3206cfc2b6e48dc820d6f89074b7d5"
] | [
"t.py"
] | [
"import numpy as np\nimport scipy\nimport matplotlib\nimport pandas as pd\nimport sklearn\nfrom sklearn.preprocessing import MinMaxScaler\nimport tensorflow as tf\nimport keras\nimport matplotlib.pyplot as plt\nfrom datetime import datetime\nfrom loss_mse import loss_mse_warmup\nfrom custom_generator import batch_g... | [
[
"matplotlib.pyplot.legend",
"numpy.expand_dims",
"pandas.to_datetime",
"tensorflow.python.keras.callbacks.TensorBoard",
"tensorflow.python.keras.layers.Dense",
"pandas.DataFrame",
"matplotlib.pyplot.plot",
"numpy.max",
"sklearn.preprocessing.MinMaxScaler",
"tensorflow.pytho... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": [
"1.5",
"1.4"
]
}
] |
KKowalewski24/PADZD | [
"b5dbcb374caef490fdb79bfe81cf2dbebafba2f7"
] | [
"Program/scripts/dataset_stats.py"
] | [
"from argparse import ArgumentParser, Namespace\n\nimport pandas as pd\n\n\"\"\"\nHow to run:\n python dataset_stats.py -f ../data/NYPD_Complaint_Data_Historic.csv -o ../data/NYPD_stats.csv \n\"\"\"\n\n\ndef main() -> None:\n args = prepare_args()\n filepath = args.filepath\n output = args.output\n\n ... | [
[
"pandas.read_csv"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
chstan/autodiDAQt | [
"a2f7aba78004e273ddca8efc5588e1b338b45a30"
] | [
"autodidaqt/examples/uninverted_control.py"
] | [
"from dataclasses import dataclass\n\nimport numpy as np\n\nfrom autodidaqt import AutodiDAQt\nfrom autodidaqt.experiment import Experiment\nfrom autodidaqt.mock import MockMotionController, MockScalarDetector\n\n\n@dataclass\nclass SimpleScan:\n n_steps: int = 100\n start: float = 0\n stop: float = 20\n\n... | [
[
"numpy.linspace"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
KruskalLin/Autocalibration | [
"e53a0ae7513e1bad24a83a6103fe58ff172a9581"
] | [
"calib_utils.py"
] | [
"import numpy as np\r\n\r\ndef euler2rot(theta):\r\n R_x = np.array([[1, 0, 0],\r\n [0, np.cos(theta[0]), -np.sin(theta[0])],\r\n [0, np.sin(theta[0]), np.cos(theta[0])]\r\n ])\r\n\r\n R_y = np.array([[np.cos(theta[1]), 0, np.sin(theta[1])],\r\n ... | [
[
"numpy.dot",
"numpy.array",
"numpy.cos",
"numpy.sin"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
DeMasterboys/dialogue-understanding | [
"bedb8ddde050a2ef46d55d3d0ec14c89dfbdbd4c"
] | [
"glove-end-to-end/utils.py"
] | [
"import numpy as np\n\ndef load_pretrained_glove(path):\n f = open(path, encoding='utf-8')\n print(\"Loading GloVe model, this can take some time...\")\n glv_vector = {}\n for line in f:\n values = line.split()\n word = values[0]\n try:\n coefs = np.asarray(values[1:], dt... | [
[
"numpy.asarray"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
LittleSheepy/warp-ctc-windows-pytorch-LS | [
"9dddb62f9acd9b533e0de500d2be145d5aa92ec0"
] | [
"pytorch_binding/tests/test_cpu.py"
] | [
"import torch\nimport warpctc_pytorch as warp_ctc\nimport pytest\n\n\ndef test_simple():\n probs = torch.FloatTensor([[[0.1, 0.6, 0.1, 0.1, 0.1], [0.1, 0.1, 0.6, 0.1, 0.1]]]).transpose(0, 1).contiguous()\n grads = torch.zeros(probs.size())\n labels = torch.IntTensor([1, 2])\n label_sizes = torch.IntTens... | [
[
"torch.FloatTensor",
"torch.zeros",
"torch.IntTensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
getzlab/mudi | [
"eda170119708e59920c23a03834af915ecca24ce"
] | [
"mudi/markers.py"
] | [
"import gc\nimport pandas as pd\nfrom tqdm import tqdm\nimport os\nimport scanpy as sc\nimport scanpy.external as sce\nfrom anndata import AnnData\nimport sys\nfrom collections import defaultdict\nimport numpy as np\nfrom typing import Union\n\nfrom .utils import aggr_markers\n\n# ---------------------------------\... | [
[
"pandas.concat",
"numpy.unique",
"pandas.DataFrame",
"pandas.ExcelWriter",
"pandas.DataFrame.from_dict"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"1.3",
"0.19",
"1.1",
"1.5",
"0.24",
"0.20",
"1.0",
"0.25",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
JesusDBS/RackioAI | [
"01bcb0c06e73ae6f3ed0bdcf25ce3328456d6786"
] | [
"rackio_AI/models/models_core.py"
] | [
"\"The Factory Concept\"\n\nfrom abc import ABCMeta, abstractmethod\nimport tensorflow as tf\nfrom .lstm import RackioLSTM\nimport numpy as np\nimport pandas as pd\nimport os\nimport matplotlib.pyplot as plt\nfrom .classification import RackioClassification\nfrom .observer import RackioObserver\n\n\nclass FactoryRa... | [
[
"numpy.concatenate",
"tensorflow.keras.models.load_model",
"matplotlib.pyplot.show",
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": [
"1.10",
"2.7",
"2.2",
... |
mohitktanwr/toolkits | [
"f3acfca5da05cd7ccdd85e8d343d75fa40fb44d9",
"f3acfca5da05cd7ccdd85e8d343d75fa40fb44d9"
] | [
"pytorch_toolbelt/utils/catalyst/criterions.py",
"tests/test_models_zoo.py"
] | [
"import math\n\nimport torch\nfrom catalyst.dl import IRunner, CriterionCallback\nfrom torch import nn\nfrom torch.nn import functional as F\n\n__all__ = [\"LPRegularizationCallback\", \"TSACriterionCallback\", \"get_multiplier\"]\n\n\ndef get_multiplier(training_progress, schedule, start, end):\n if schedule is... | [
[
"torch.nn.functional.one_hot",
"torch.sum",
"torch.no_grad",
"torch.tensor"
],
[
"torch.randn",
"torch.no_grad",
"torch.cuda.is_available",
"torch.cuda.amp.autocast"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
sahitono/geosardine | [
"10bb24e55314c78d57e5731741bbc68cb3bfa60a"
] | [
"tests/test_geosardine_raster.py"
] | [
"import numpy as np\nfrom geosardine import Raster\n\n\ndef test_raster() -> None:\n raster = Raster(np.arange(32).reshape(4, 4, 2), 0.3, 120, 20)\n\n assert (raster.array == np.arange(32).reshape(4, 4, 2)).all()\n assert raster.resolution == (0.3, 0.3)\n assert raster.x_max == 120 + (0.3 * 4)\n asse... | [
[
"numpy.arange",
"numpy.ones"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Wells-Group/TEAM30 | [
"fcd33b0b16002a069d7ba7059e46a050c4bc4998"
] | [
"utils.py"
] | [
"# Copyright (C) 2021 Jørgen S. Dokken and Igor A. Baratta\n#\n# SPDX-License-Identifier: MIT\n\nfrom typing import Dict\n\nimport dolfinx.mesh as dmesh\nimport numpy as np\nimport ufl\nfrom dolfinx import fem\nfrom mpi4py import MPI\nfrom petsc4py import PETSc\n\nfrom generate_team30_meshes import (mesh_paramet... | [
[
"numpy.cos"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ishine/CVC | [
"3fb04749367a2f9ef1451af37863b1122f92f59c",
"3fb04749367a2f9ef1451af37863b1122f92f59c"
] | [
"data/wav_dataset.py",
"models/patchnce.py"
] | [
"from data.base_dataset import BaseDataset\nfrom data.wav_folder import make_dataset, read_wav, process_utterance\n# from data.preprocess import world_encode_data, transpose_in_list, logf0_statistics, coded_sps_normalization_fit_transform\nimport librosa\nimport torch\nimport numpy as np\nimport os\nimport random\n... | [
[
"torch.from_numpy"
],
[
"torch.nn.CrossEntropyLoss",
"torch.eye",
"torch.cat"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
SarielMa/nnUNet | [
"f9975139c7d8010bdf0415f7fd32a53022d30a69"
] | [
"nnunet/training/network_training/nnUNetTrainerV2.py"
] | [
"# Copyright 2020 Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# ... | [
[
"numpy.array",
"sklearn.model_selection.KFold",
"torch.cuda.amp.autocast",
"numpy.round",
"torch.tensor",
"torch.cuda.is_available",
"torch.clamp",
"numpy.random.RandomState",
"numpy.vstack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
yf225/alpa | [
"a7b5f061537e260875c621a82e14265b1df64c5f",
"a7b5f061537e260875c621a82e14265b1df64c5f"
] | [
"alpa/testing.py",
"alpa/pipeline_parallel/computation.py"
] | [
"\"\"\"Utilities for testing.\"\"\"\nimport time\nimport unittest\nfrom collections.abc import Iterable\n\nimport jax\nimport jax.numpy as jnp\nfrom jax.experimental.maps import FrozenDict as FrozenDictJax\nimport numpy as np\nimport optax\nimport ray\nfrom flax import linen as nn\nfrom flax.core.frozen_dict import... | [
[
"numpy.asarray",
"numpy.ones",
"numpy.isscalar",
"numpy.testing.assert_allclose"
],
[
"numpy.prod",
"numpy.dtype",
"numpy.count_nonzero"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
jingmouren/OpenHGNN | [
"d27ecdc95a4a291669f546cd39fadf469550bfd2"
] | [
"openhgnn/layers/HeteroLinear.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\nclass GeneralLinear(nn.Module):\n r\"\"\"\n Description\n ------------\n General Linear, combined with activation, normalization(batch and L2), dropout and so on.\n\n Parameters\n ------------\n in_features : int\n ... | [
[
"torch.nn.functional.normalize",
"torch.nn.Sequential",
"torch.nn.BatchNorm1d",
"torch.nn.Dropout",
"torch.nn.init.calculate_gain",
"torch.nn.ParameterDict",
"torch.nn.ModuleDict",
"torch.nn.Linear",
"torch.FloatTensor",
"torch.nn.init.xavier_uniform_"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Shade5/Recycle-GAN | [
"dd7b62e605cbe64edf091a94c903c7adefee27be"
] | [
"options/base_options.py"
] | [
"import argparse\n\nimport os\nimport torch\n\nfrom util import util\n\n\nclass BaseOptions():\n\tdef __init__(self):\n\t\tself.parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)\n\t\tself.initialized = False\n\n\tdef initialize(self):\n\t\tself.parser.add_argument('--dataroot'... | [
[
"torch.cuda.set_device"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
louism33/SnakeNet | [
"91c84e10f211529c39a7c3899bcd6c303bc24c56"
] | [
"fashionRecogniser/mnistModelBuilder.py"
] | [
"import tensorflow as tf\nfrom keras.layers import Conv2D, MaxPooling2D\nfrom keras.layers import Dense, Dropout, Flatten\nfrom keras.models import Sequential\n\n(x_train, y_train), (x_test, y_test) = tf.keras.datasets.mnist.load_data()\n\nmodel = Sequential()\nmodel.add(Conv2D(32, kernel_size=(3, 3),\n ... | [
[
"tensorflow.keras.datasets.mnist.load_data"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"2.7",
"2.2",
"2.3",
"2.4",
"2.5",
"2.6"
]
}
] |
ChristofSchwarz/qs-python-samples | [
"5707587fa5439d5a2891abe251926bee804ce4b2"
] | [
"Basket/__main__.py"
] | [
" \n#! /usr/bin/env python3\nimport argparse\nimport json\nimport logging\nimport logging.config\nimport os\nimport sys\nimport time\nimport re\nfrom concurrent import futures\nfrom datetime import datetime\nimport pandas as pd\nimport numpy as np\nimport json\nfrom mlxtend.frequent_patterns import apriori\nfrom ... | [
[
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
rsintheta/distgen | [
"5ee7c48a6261f65b3d1658bb66511b9ef1cd02cd"
] | [
"distgen/generator.py"
] | [
"from .physical_constants import *\nfrom .beam import Beam\nfrom .transforms import set_avg_and_std, transform, set_avg\nfrom .tools import *\nfrom .dist import *\nfrom pmd_beamphysics import ParticleGroup, pmd_init\nfrom . import archive\n\nimport warnings\n\nimport numpy as np\nimport h5py\nimport yaml\nimport co... | [
[
"numpy.string_",
"numpy.abs",
"numpy.sqrt",
"numpy.array_equal",
"numpy.cos",
"numpy.sin",
"numpy.full"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Cal-Fang/Schelling-Model | [
"1963d8ab03af21d5c4666183060167c85c895b2c"
] | [
"Shelling_ABM.py"
] | [
"from numpy import random, mean, where\n\nparams = {'world_size':(20,20),\n 'num_agents':380,\n 'same_pref_r': 0.4, #red agent's pref for same color neighbours\n 'same_pref_b': 0.3, #blue agent's pref for same color neighbours\n 'proportion_r': 0.6,\n 'max_iter' :100,\n... | [
[
"numpy.mean",
"numpy.random.shuffle"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
wuminghui100/bridge-maintenance-optimizer | [
"1f4b7a5e74a56a508f33acb8ea0c7a7cbc870e9d"
] | [
"scenarios/scenarios.py"
] | [
"import numpy as np\r\nimport os\r\n\r\ndef save_trans(tran_real, name):\r\n dirpath = os.path.dirname(os.path.abspath(__file__))\r\n path = dirpath\r\n if not os.path.exists(path):\r\n os.makedirs(path)\r\n print(path)\r\n np.save(path+'\\\\'+name+'.npy', trans_real)\r\n\r\n\r\ntrans_real = n... | [
[
"numpy.zeros",
"numpy.save"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
cgevans/seaborn | [
"88c49ef6c14ca69def8195f03d467915b3b0597c"
] | [
"seaborn/axisgrid.py"
] | [
"from __future__ import division\nfrom itertools import product\nfrom distutils.version import LooseVersion\nimport warnings\nfrom textwrap import dedent\n\nimport numpy as np\nimport pandas as pd\nfrom scipy import stats\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\n\nfrom . import utils\nfrom .palet... | [
[
"numpy.diag",
"matplotlib.patches.Patch",
"pandas.notnull",
"numpy.linspace",
"numpy.tril_indices_from",
"numpy.asarray",
"numpy.triu_indices_from",
"matplotlib.font_manager.FontProperties",
"matplotlib.pyplot.sca",
"matplotlib.colors.colorConverter.to_rgb",
"matplotlib... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"1.3",
"0.19",
"1.1",
"1.5",
"0.24",
"0.20",
"1.0",
"0.25",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
Le-group/PF-Net-Point-Fractal-Network | [
"cf3fb83dfce2f8f9592fe992ce9296e7fba4db0e"
] | [
"model_FPNet.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.utils.data\n\n\nclass Convlayer(nn.Module):\n def __init__(self,point_scales):\n super(Convlayer,self).__init__()\n self.point_scales = point_scales\n self... | [
[
"torch.nn.BatchNorm1d",
"torch.nn.Dropout",
"torch.nn.functional.log_softmax",
"torch.cat",
"torch.randn",
"torch.nn.Conv2d",
"torch.unsqueeze",
"torch.nn.MaxPool2d",
"torch.nn.Conv1d",
"torch.nn.Linear",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU",
"torch.squeeze"
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ray-project/ray_lightning | [
"63ab0c015c81be7246da644a7193d2d51768f45b"
] | [
"ray_lightning/ray_ddp.py"
] | [
"import socket\nfrom contextlib import closing\nfrom typing import Callable, Dict, List, Union, Any\n\nimport os\nfrom collections import defaultdict\n\nimport torch\n\nfrom pytorch_lightning.accelerators import CPUAccelerator\nfrom pytorch_lightning.plugins import DDPSpawnPlugin\nfrom pytorch_lightning import _log... | [
[
"torch.distributed.init_process_group",
"torch.distributed.is_initialized",
"torch.cuda.empty_cache",
"torch.cuda.is_available",
"torch.distributed.destroy_process_group",
"torch.device"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
baowenlei/tvm | [
"6b2e18ed96fad26b4a5e5f8a6dcbedf9206c9a65"
] | [
"topi/tests/python/test_topi_upsampling.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.random.uniform",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
rdguerrerom/RMG-Py | [
"a649393b65287404bc6312909bad083a966d5c17"
] | [
"rmgpy/species.py"
] | [
"#!/usr/bin/env python3\n\n###############################################################################\n# #\n# RMG - Reaction Mechanism Generator #\n# ... | [
[
"numpy.ones_like"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
DLPerf/nematus | [
"2d20182cd02a384a00798707117730d42adca74f"
] | [
"nematus/tf_utils.py"
] | [
"\"\"\"TensorFlow-specific utility functions.\"\"\"\n\nimport tensorflow as tf\n\ndef assert_shapes(shapes):\n \"\"\"Wrapper for tf.debugging.assert_shapes.\"\"\"\n\n # tf.debugging.assert_shapes is only supported in 1.14 and later, so\n # the call is wrapped in a try-except to allow Nematus to run on earl... | [
[
"tensorflow.convert_to_tensor",
"tensorflow.control_dependencies",
"tensorflow.python.client.device_lib.list_local_devices",
"tensorflow.shape",
"tensorflow.debugging.assert_shapes"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
sethjuarez/fibberio | [
"6e7880b6be1537df6c12d3c2855bfedddf1f74bc"
] | [
"fibberio/distribution.py"
] | [
"import sys\nimport abc\nimport numpy as np\nfrom time import time\nfrom .range import Range, RangeParser\nfrom typing import Any, Tuple\nfrom .source import PandasSource\n\nparser = RangeParser()\n\n\nclass Distribution(metaclass=abc.ABCMeta):\n def __init__(self):\n self.id = \"\"\n self.discrete... | [
[
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
rizwan09/LISA | [
"3354cb9b2a95a16c8b8950667d44fa2881400048"
] | [
"src/train_utils.py"
] | [
"import tensorflow as tf\nimport json\nimport re\nimport sys, pdb\n# import dataset_ori as dataset\nimport dataset\nimport constants\nfrom pathlib import Path\n\n\ndef load_hparams(args, model_config):\n # Create a HParams object specifying the names and values of the model hyperparameters\n hparams = tf.contrib.... | [
[
"tensorflow.multiply",
"tensorflow.estimator.export.TensorServingInputReceiver",
"tensorflow.cast",
"tensorflow.placeholder",
"tensorflow.logging.log",
"tensorflow.estimator.export.ServingInputReceiver",
"tensorflow.trainable_variables",
"tensorflow.rsqrt",
"tensorflow.contrib.... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"1.12",
"1.4",
"1.13",
"1.5",
"1.7",
"1.2"
]
}
] |
yao-zl/python-deltasigma | [
"639168178286f076e2d9273e4c81128ef1afdae6"
] | [
"deltasigma/_synthesizeNTF.py"
] | [
"# -*- coding: utf-8 -*-\n# _synthesizeNTF.py\n# Module providing the synthesizeNTF function\n# Copyright 2013 Giuseppe Venturini\n# This file is distributed with python-deltasigma.\n#\n# python-deltasigma is a 1:1 Python replacement of Richard Schreier's\n# MATLAB delta sigma toolbox (aka \"delsigma\"), upon which... | [
[
"numpy.asarray"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
paulverising/cbc-api | [
"75e9247746803b7e5978b9fe1082dbeab493dce2"
] | [
"cbc-api.py"
] | [
"import requests\nimport pandas as pd\nimport time\nimport argparse\nimport sys\nfrom os.path import expanduser\n\nstart_time = time.time()\n\n# Handle the parameters that are passed into the program\ndef getArgs(argv=None):\n parser = argparse.ArgumentParser(\n description=\"Use cbr-api.py to see all pro... | [
[
"pandas.DataFrame",
"pandas.DataFrame.from_dict"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"1.3",
"0.19",
"1.1",
"1.5",
"0.24",
"0.20",
"1.0",
"0.25",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
zankner/VQ-ViT-Bert | [
"22d0a49ce94fc3c003ccaf58b31e88d7d5b461e0"
] | [
"vit/model_utils.py"
] | [
"import torch\nimport time\nfrom utils import AverageMeter, ProgressMeter\nfrom utils import accuracy\n\n\ndef train_step(train_loader, model, optimizer, epoch, device, writer, args):\n batch_time = AverageMeter('Time', ':6.3f')\n data_time = AverageMeter('Data', ':6.3f')\n losses = AverageMeter('Loss', ':... | [
[
"torch.no_grad"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
cutz-j/Paper2Code | [
"2fb18b3d4ed66b68cab86139c4d9a0dcbf1eba39"
] | [
"CNN/WideResNet/test.py"
] | [
"import math\nimport torch\nfrom torch import nn, optim\nfrom torch.nn import functional as F\nfrom torch.backends import cudnn\nfrom torch.autograd import Variable\nfrom torch.utils.data import DataLoader\nimport torchvision\nfrom torchvision import transforms\nfrom torchvision.datasets import CIFAR10\nimport os\n... | [
[
"torch.nn.CrossEntropyLoss",
"torch.utils.data.DataLoader",
"torch.max",
"torch.autograd.Variable"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Superskyyy/deep-log-unstructured | [
"99bcbec9b474c1c0b4cd3b1a96d770d3a1c010fc"
] | [
"baselines/PCA/code/utils.py"
] | [
"from sklearn.metrics import precision_recall_fscore_support, roc_curve, accuracy_score\nimport numpy as np\nimport time\n# import matplotlib.pyplot as plt\n\n\ndef metrics(y_pred, y_true):\n precision, recall, f1, _ = precision_recall_fscore_support(y_true, y_pred, average='binary',zero_division=1)\n acc = a... | [
[
"numpy.asarray",
"sklearn.metrics.precision_recall_fscore_support"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
csinva/local-vae | [
"a28a3e58369cb18053c27a994a60d66b9467829d"
] | [
"notebooks/ex_gaussian_mixture/ex_hyperparam/08_varying_lamPT_beta_warmstart.py"
] | [
"import numpy as np\nimport torch\nimport random\ndevice = 'cuda' if torch.cuda.is_available() else 'cpu'\nimport os,sys\nopj = os.path.join\nfrom tqdm import tqdm\nimport acd\nfrom copy import deepcopy\nimport itertools\n\n\nif __name__ == '__main__':\n \n params_to_vary = {\n 'num_epochs': [50],\n ... | [
[
"numpy.geomspace",
"torch.cuda.is_available"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Lornatang/pytorch-project | [
"b21717c1f18f30354e9da98b7f3357dda33d205a"
] | [
"CALTECH/102/train.py"
] | [
"\"\"\"\n# author: shiyipaisizuo\n# contact: shiyipaisizuo@gmail.com\n# file: train.py\n# time: 2019/1/23\n# license: MIT\n\"\"\"\n\nimport os\n\nimport torch\nimport torchvision\nfrom net import Net\nfrom torch import nn, optim\nfrom torch.utils import data\nfrom torchvision import transforms\n\n# Device configura... | [
[
"torch.nn.CrossEntropyLoss",
"torch.utils.data.DataLoader",
"torch.cuda.is_available",
"torch.save"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ricbl/gradient-direction-of-robust-models | [
"bfdafc1940450b8e68fe25e54484b7f341105363"
] | [
"src/cgan/train.py"
] | [
"\"\"\" BigGAN: The Authorized Unofficial PyTorch release\n Code by A. Brock and A. Andonian\n This code is an unofficial reimplementation of\n \"Large-Scale GAN Training for High Fidelity Natural Image Synthesis,\"\n by A. Brock, J. Donahue, and K. Simonyan (arXiv 1809.11096).\n\n Let's go.\n\"\"\"\... | [
[
"torch.nn.DataParallel"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Janniku9/MLSandbox | [
"02c8fc1d53114a187cad7d13c57f72139b1994ee"
] | [
"DeepQNetworkV2.py"
] | [
"from keras.models import Sequential\nfrom keras.layers import Dense, Dropout, Conv2D, MaxPooling2D, Activation, Flatten\nfrom keras.optimizers import Adam\nimport ModifiedTensorBoard\nfrom collections import deque\nimport numpy as np\nimport random as random\nimport time\n\nREPLAY_MEM_SIZE = 50_000\nMIN_REPLAY_MEM... | [
[
"numpy.max",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ml-uem/data-sci-lab | [
"ddc1d2aed28538a7fbf53ff1d26356fd8b8f0a9e"
] | [
"mluem/MultipleLinearRegression.py"
] | [
"from .ModelInterface import ModelInterface\nimport numpy as np\n\nclass MultipleLinearRegression(ModelInterface):\n def __init__(self):\n self._w = 0\n\n def fit(self, X, y):\n self._w = np.linalg.solve(np.dot(X.T, X), np.dot(X.T, y))\n return self\n\n def predict(self, X):\n r... | [
[
"numpy.dot",
"numpy.mean"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
dicksiano/packnet-sfm | [
"f41342d716a72e195a0e72cf12c6b563d182bb91"
] | [
"packnet_sfm/utils/config.py"
] | [
"\nimport os\nimport torch\nfrom datetime import datetime\nfrom yacs.config import CfgNode\n\nfrom packnet_sfm.utils.logging import s3_url, prepare_dataset_prefix\nfrom packnet_sfm.utils.horovod import on_rank_0\nfrom packnet_sfm.utils.types import is_cfg\nfrom packnet_sfm.utils.misc import make_list\nfrom packnet_... | [
[
"torch.load"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
utiasSTARS/lfgp | [
"157ec76ce49e41db2c598548b31c6bb167babdf5"
] | [
"rl_sandbox/rl_sandbox/train/train_lfgp_sac.py"
] | [
"import gzip\nimport _pickle as pickle\nimport torch\n\nimport rl_sandbox.constants as c\n\nfrom rl_sandbox.agents.hrl_agents import SACXAgent\nfrom rl_sandbox.auxiliary_tasks.utils import make_auxiliary_tasks\nfrom rl_sandbox.algorithms.sac_x.intentions_update.dac_intentions import UpdateDACIntentions\nfrom rl_san... | [
[
"torch.load"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
dylanljones/dqmc | [
"d4969b6624c1b596d8b2fd0dcaefb16064958eee"
] | [
"dqmc/tests/test_model.py"
] | [
"# coding: utf-8\n#\n# This code is part of dqmc.\n#\n# Copyright (c) 2022, Dylan Jones\n#\n# This code is licensed under the MIT License. The copyright notice in the\n# LICENSE file in the root directory and this permission notice shall\n# be included in all copies or substantial portions of the Software.\n\nimpor... | [
[
"numpy.testing.assert_equal",
"numpy.eye",
"numpy.kron",
"numpy.fill_diagonal",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Moon-sung-woo/MIST_Tacotron | [
"cfd81a62c15271627fc81d3d2673e10549beb650"
] | [
"inference.py"
] | [
"# *****************************************************************************\n# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n# * Redis... | [
[
"torch.jit.script",
"torch.abs",
"torch.cuda.synchronize",
"torch.LongTensor",
"torch.randint",
"numpy.unique",
"torch.load",
"matplotlib.pyplot.savefig",
"torch.no_grad",
"torch.device",
"torch.squeeze",
"torch.autograd.Variable"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
insertinterestingnamehere/cupy | [
"9188895216af5a713aa62fa2018364e42285097a",
"9188895216af5a713aa62fa2018364e42285097a",
"9188895216af5a713aa62fa2018364e42285097a"
] | [
"cupy/_functional/vectorize.py",
"cupy/linalg/_product.py",
"cupyx/scipy/sparse/csr.py"
] | [
"import numpy\n\nfrom cupy import _core\nfrom cupyx.jit import _interface\nfrom cupyx.jit import _cuda_types\n\n\ndef _get_input_type(arg):\n if isinstance(arg, int):\n return 'l'\n if isinstance(arg, float):\n return 'd'\n if isinstance(arg, complex):\n return 'D'\n return arg.dtyp... | [
[
"numpy.dtype"
],
[
"numpy.isscalar"
],
[
"numpy.isnan",
"numpy.promote_types"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
misantam/GAparsimony | [
"0241092dc5d7741b5546151ff829167588e4f703"
] | [
"examples/exampleRegression.py"
] | [
"from sklearn.linear_model import Lasso\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.metrics import mean_squared_error\n\nfrom sklearn.datasets import load_boston\n\nfrom GAparsimony import GAparsimony, Population, getFitness\nfrom GAparsimony.util import linearModels_complexity\n\nboston = load_... | [
[
"sklearn.preprocessing.StandardScaler",
"sklearn.datasets.load_boston"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ramp-kits/rl_simulator | [
"c651904b890c7e97cbb29ffae82e00a76788c88c"
] | [
"benchmark/acrobot_sincos/submissions/real_nvp/generative_regressor.py"
] | [
"import math\n\nfrom sklearn.preprocessing import StandardScaler\n\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.utils.data\nfrom torch.autograd import Variable\n\nfrom rampwf.utils import BaseGenerativeRegressor\n\nfrom mbrltools.pytorch_utils import train\n\nn_epochs = 200\nLR = ... | [
[
"torch.optim.lr_scheduler.ReduceLROnPlateau",
"torch.ones",
"torch.Tensor",
"torch.cat",
"torch.zeros",
"torch.exp",
"torch.nn.Linear",
"torch.no_grad",
"torch.nn.init.orthogonal_",
"torch.log",
"torch.arange",
"sklearn.preprocessing.StandardScaler"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
nipy/nilabels | [
"b065febc611eef638785651b4642d53bb61f1321"
] | [
"nilabels/tools/aux_methods/morpological_operations.py"
] | [
"import numpy as np\nfrom scipy import ndimage\n\n\ndef get_morphological_patch(dimension, shape):\n \"\"\"\n :param dimension: dimension of the image (NOT the shape).\n :param shape: circle or square.\n :return: morphological patch as ndimage\n \"\"\"\n if shape == 'circle':\n morpho_patch... | [
[
"scipy.ndimage.generate_binary_structure",
"numpy.zeros",
"scipy.ndimage.binary_dilation"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.7",
"1.0",
"0.10",
"1.2",
"0.14",
"0.19",
"1.5",
"0.12",
"0.17",
"0.13",
"1.6",
"1.4",
"1.9",
"1.3",
"1.10",
"0.15",
"0.18",
"0.16"... |
svenlr/acados | [
"94eb7173f9a6481c8a5480c70e61aa888bbf3c6c"
] | [
"examples/acados_python/crane/time_optimal_example.py"
] | [
"#\n# Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren,\n# Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor,\n# Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan,\n# Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Diehl\n#\n# This file is pa... | [
[
"numpy.hstack",
"matplotlib.pyplot.legend",
"numpy.linspace",
"numpy.ones",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.xlabel",
"numpy.array",
"numpy.zeros",
"numpy.sum",
"matpl... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
MythraV/PyRep | [
"ea8f2bb66730190a197e8d691a9d03d5db180a9a"
] | [
"pyrep/backend/vrep.py"
] | [
"from .vrepConst import *\nfrom ._v_rep_cffi import ffi, lib\nimport numpy as np\n\n\ndef _check_return(ret):\n if ret < 0:\n raise RuntimeError(\n 'The call failed on the V-REP side. Return value: %d' % ret)\n\n\ndef _check_null_return(val):\n if val == ffi.NULL:\n raise RuntimeError... | [
[
"numpy.flip"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
alongstar518/cs224u2019spring | [
"891899dfe4829cb2c9869f4bc301b0166a8e35c0"
] | [
"torch_subtree_nn.py"
] | [
"from nltk.tree import Tree\nimport torch\nfrom torch_tree_nn import TorchTreeNNModel, TorchTreeNN\n\n__author__ = \"Christopher Potts\"\n__version__ = \"CS224u, Stanford, Spring 2019\"\n\n\nclass TorchSubtreeNNModel(TorchTreeNNModel):\n\n def forward(self, tree):\n \"\"\"The key changes: (i) we apply the... | [
[
"torch.LongTensor",
"torch.softmax",
"torch.cat",
"torch.tensor",
"torch.no_grad",
"torch.stack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
bigdatamatta/ChaLearn_Automatic_Machine_Learning_Challenge_2015 | [
"a9acb6906ff141e7c24cff80f92efef7d7c3ff09"
] | [
"DeepFeedNet.py"
] | [
"import numpy as np\nimport scipy.sparse as sp\n\nfrom ConfigSpace.configuration_space import ConfigurationSpace\nfrom ConfigSpace.conditions import EqualsCondition, InCondition\nfrom ConfigSpace.hyperparameters import UniformFloatHyperparameter, \\\n UniformIntegerHyperparameter, CategoricalHyperparameter, Cons... | [
[
"scipy.sparse.issparse"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.7",
"1.0",
"0.10",
"1.2",
"0.14",
"0.19",
"1.5",
"0.12",
"0.17",
"0.13",
"1.6",
"1.4",
"1.9",
"1.3",
"1.10",
"0.15",
"0.18",
"0.16"... |
Mopolino8/thetis | [
"41cda8a77464fab283f777d4b13de0ccc7b180f6"
] | [
"thetis/interpolation.py"
] | [
"\"\"\"\nMethods for interpolating data from structured data sets on Thetis fields.\n\n\nSimple example of an atmospheric pressure interpolator:\n\n.. code-block:: python\n\n def to_latlon(x, y, positive_lon=False):\n # Converts mesh (x,y) points to coordinates used in the atm data\n lon, lat = coo... | [
[
"scipy.spatial.qhull.Delaunay",
"numpy.take",
"numpy.einsum",
"numpy.any",
"numpy.searchsorted",
"numpy.argsort",
"numpy.array",
"numpy.unravel_index",
"scipy.spatial.cKDTree"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
volcacius/trainableProcessing | [
"58c88a7313cc81d2698e6fdedecb30ce1384089b"
] | [
"trainablePreprocessing/preprocessing.py"
] | [
"# Copyright (c) 2020, Xilinx, Inc.\n# All rights reserved.\n# \n# Redistribution and use in source and binary forms, with or without \n# modification, are permitted provided that the following conditions are met:\n#\n# 1. Redistributions of source code must retain the above copyright notice, \n# t... | [
[
"torch.full",
"torch.zeros",
"torch.zeros_like",
"torch.eye",
"torch.tensor",
"torch.where",
"torch.clamp"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ronaldbrito/PDS | [
"58c8f9737e4cc5872a27e7b778a43def5e3e11f4"
] | [
"parte3/parte3.py"
] | [
"from scipy.misc import imread, imsave\n\nimg101 = imread('frames/saida_101.bmp')\nimg103 = imread('frames/saida_103.bmp')\n\nimg109 = imread('frames/saida_109.bmp')\nimg111 = imread('frames/saida_111.bmp')\n\nimg117 = imread('frames/saida_117.bmp')\nimg119 = imread('frames/saida_119.bmp')\n\nimsave('inter_102.bmp'... | [
[
"scipy.misc.imsave",
"scipy.misc.imread"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"0.13",
"0.14",
"0.15",
"0.10",
"0.16",
"0.19",
"0.18",
"0.12",
"1.0",
"0.17",
"1.2"
],
"tensorflow": []
}
] |
JoGro-code/cryptotrade | [
"7a4e50c1898ab1ceb520d07b4faf86741795eb7d"
] | [
"pycryptobot.py"
] | [
"\"\"\"Python Crypto Bot consuming Coinbase Pro API\n\nDISCLAIMER -- PLEASE READ!\n\nI developed this crypto trading bot for myself. I'm happy to share the project and code with others\nbut I don't take responsibility for how it performs for you or any potential losses incurred due to\nmarket conditions or even bug... | [
[
"numpy.subtract",
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
xnhp/GraphGym | [
"f6129ced19b6eb5e22ff4667da719c536a47c2e2"
] | [
"graphgym/loss.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom graphgym.contrib.loss import *\nimport graphgym.register as register\nfrom graphgym.config import cfg\n\n\ndef compute_loss(pred, true, batch=None):\n '''\n\n :param pred: unnormalized prediction\n :param true: label\n :return... | [
[
"torch.sigmoid",
"torch.nn.functional.nll_loss",
"torch.nn.functional.log_softmax",
"torch.nn.BCEWithLogitsLoss",
"torch.nn.MSELoss"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
damonwy/taichi | [
"160f73b610b0ef54751d7063e9303c9943fd794d"
] | [
"tests/python/test_ndarray.py"
] | [
"import numpy as np\nimport pytest\n\nimport taichi as ti\n\n# properties\n\ndata_types = [ti.i32, ti.f32, ti.i64, ti.f64]\nndarray_shapes = [(), 8, (6, 12)]\nvector_dims = [3]\nmatrix_dims = [(1, 2), (2, 3)]\n\n\n@pytest.mark.parametrize('dtype', data_types)\n@pytest.mark.parametrize('shape', ndarray_shapes)\n@pyt... | [
[
"torch.zeros",
"numpy.zeros",
"numpy.ones"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
rosalindfranklininstitute/Opt-ID | [
"f7d5d6c0e63bfa20858e195de8909cc9fd16e387"
] | [
"IDSort/src/lookup_generator.py"
] | [
"# Copyright 2017 Diamond Light Source\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\"); \n# you may not use this file except in compliance with the License. \n# You may obtain a copy of the License at\n# \n# http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law ... | [
[
"numpy.log",
"pandas.read_csv",
"numpy.sqrt",
"numpy.arctan",
"numpy.min",
"numpy.reshape",
"pandas.DataFrame",
"numpy.all",
"numpy.max",
"numpy.array",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
greenelab/Pseudomonas_latent_spaces | [
"0d78dc927a246c49f631abeddc0b952add4c6d0c",
"0d78dc927a246c49f631abeddc0b952add4c6d0c"
] | [
"exploration/scripts/nbconverted/latent_offset_bool.py",
"exploration/scripts/scripts/nbconverted/1_main_Pa_sim_enhance_AtoB_simplified_input_distribution.py"
] | [
"\n# coding: utf-8\n\n# In[1]:\n\n\n#-------------------------------------------------------------------------------------------------------------------------------\n# By Alexandra Lee (July 2018) \n#\n# Take the average of the encoded gene expression for the two experimental conditions\n# Take the difference of th... | [
[
"pandas.read_table",
"pandas.Series.to_frame",
"numpy.random.seed"
],
[
"pandas.Series",
"numpy.random.seed",
"pandas.DataFrame",
"pandas.read_table",
"numpy.random.normal"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1... |
dnlcrl/PyFun | [
"6ff3ed386b78df8411a1ccd41c038e0e05551def"
] | [
"pyfunt/im2col.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport numpy as np\n\n\ndef get_im2col_indices(x_shape, field_height, field_width, padding=1, stride=1):\n # First figure out what the size of the output should be\n N, C, H, W = x_shape\n assert (H + 2 * padding - field_height) % stride == 0\n assert (W ... | [
[
"numpy.arange",
"numpy.zeros",
"numpy.tile",
"numpy.pad"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
eugene-yang/TAR-Content-Moderation | [
"33a06a5beae98be6bea882caf82d0cee66948321"
] | [
"relevance_feedback_query.py"
] | [
"import numpy as np \n\nfrom libact.base.interfaces import QueryStrategy, ContinuousModel\n\n\nclass RelevanceFeedbackSampling(QueryStrategy):\n def __init__(self, *args, **kwargs):\n super(RelevanceFeedbackSampling, self).__init__( *args, **kwargs )\n\n if self.dataset.get_num_of_labels() > 2:\n ... | [
[
"numpy.argsort"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
DLWoodruff/aircond | [
"08ecb9c6a8b5b35b87bc8f0c4a2c19bff37dd67a"
] | [
"archives/27March2022/examples.aircond.aircond_cylinders.py"
] | [
"import sys\nimport os\nimport copy\nimport numpy as np\nimport itertools\nfrom mpisppy.spin_the_wheel import WheelSpinner\nfrom mpisppy.utils.sputils import first_stage_nonant_npy_serializer\nfrom mpisppy.utils import baseparsers\nfrom mpisppy.utils import vanilla\nimport mpisppy.tests.examples.aircond as aircond\... | [
[
"numpy.prod"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
LightingSystemLab/DL-PupilModel | [
"303d8ef15e33ca2e59bf00c8267d302e94ace73f"
] | [
"Python/CalcParam.py"
] | [
"# Description:\n# Demo code from the article:\n# Deep learning based pupil model predicts time and wavelength dependent light responses\n# Technical University of Darmstadt, Laboratory of Lighting Technology\n# Published in Scientific Reports\n# Link: www.nature.com/articles/s41598-020-79908-5\n# GitHub Link: http... | [
[
"numpy.array",
"torch.from_numpy",
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
siddharthverma-1607/GSOC | [
"58945851b258e572212cf28ff803f21c38452761"
] | [
"engine/detect_faces_video.py"
] | [
"#-------------------------------------------------------------\n# FACE DETECTION FROM VIDEO\n#-------------------------------------------------------------\n\n# import the necessary packages\nfrom imutils.video import VideoStream\nimport numpy as np\nimport argparse\nimport imutils\nimport time\nimport cv2\n... | [
[
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
liuyanyi/mmrotate | [
"d80310aa2c4a67c877c62432cddee246d2a4dbcd",
"d80310aa2c4a67c877c62432cddee246d2a4dbcd"
] | [
"mmrotate/apis/train.py",
"mmrotate/models/backbones/re_resnet.py"
] | [
"# Copyright (c) OpenMMLab. All rights reserved.\n# Copied from mmdet, only modified `get_root_logger`.\nimport torch\nfrom mmcv.parallel import MMDataParallel, MMDistributedDataParallel\nfrom mmcv.runner import (DistSamplerSeedHook, EpochBasedRunner,\n Fp16OptimizerHook, OptimizerHook, buil... | [
[
"torch.cuda.current_device"
],
[
"torch.utils.checkpoint.checkpoint"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ljq2278/models | [
"cdb509af2de4d5f7d0cc9bd3c562bb660c17163a",
"cdb509af2de4d5f7d0cc9bd3c562bb660c17163a"
] | [
"research/my_shell/detect_mobilenet/tf1_predict_useSavedModel.py",
"my_test/tf12_get_pb_graph.py"
] | [
"import cv2\nimport numpy as np\nimport tensorflow as tf\nfrom object_detection.utils import label_map_util\nfrom object_detection.utils import visualization_utils as vis_util\nimport skimage\nfrom skimage import data,exposure\nimport matplotlib.pyplot as plt\n\nclass TOD(object):\n def __init__(self):\n ... | [
[
"tensorflow.Graph",
"numpy.expand_dims",
"tensorflow.saved_model.load",
"numpy.squeeze",
"tensorflow.get_default_graph"
],
[
"tensorflow.python.tools.import_pb_to_tensorboard.import_to_tensorboard"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"1.12",
"1.4",
"1.13",
"1.5",
"1.7",
"0.12",
"1.0",
"1.2"
]
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensor... |
dilinwang820/Graphical-SVGD | [
"8d0e19098b3eb1a559f2bfd7b947b4e539678a64"
] | [
"ops.py"
] | [
"import sys\nimport numpy as np\n\nimport theano\nimport theano.tensor as T\nfrom updates import Adagrad\nfrom tqdm import tqdm\nfrom rng import t_rng, np_rng\nfrom theano_utils import floatX, sharedX\n\n\ndef sqr_dist(x, y, e=1e-8):\n if x.ndim == 2:\n xx = T.sqr(T.sqrt((x*x).sum(axis=1) + e))\n y... | [
[
"numpy.asarray",
"numpy.arange",
"numpy.copy"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
chenwade/CarND-Advanced-Lane-Lines | [
"73dfbefa0611d65378f7a2711bac07116cd27291"
] | [
"debug_manager.py"
] | [
"import cv2\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n\nclass DebugManager():\n def __init__(self):\n\n self.frame_num = 0\n # input image\n self.original_image = None\n # edged image\n self.edged_image = None\n # warped image(bird_view)\n self.warpe... | [
[
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.show",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
altosaar/hierarchical-variational-models-physics | [
"611d91e0281664d7d5ba1679bec7adfb3aac41e2"
] | [
"tests/test_toy_grid.py"
] | [
"\"\"\"Fit hierarchical variational model to a correlated toy posterior.\n\nConvention: \n - first dimension is z sample dimension, then is the nu\n sample dimension, then is the latent dimension.\n\"\"\"\nimport numpy as np\nimport torch\nimport pandas as pd\nimport yaml\nimport matplotlib as mpl\nmpl.use(\"Ag... | [
[
"torch.mean",
"numpy.log",
"numpy.linspace",
"matplotlib.use",
"torch.manual_seed",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"torch.from_numpy",
"numpy.exp",
"torch.exp",
"torch.no_grad",
"numpy.mean",
"matplotlib.pyplot.close",
"torch.devi... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ferreirafabio/videofeatures | [
"b219c9106337b1e91a094381d1f9b7636fd29669"
] | [
"tests.py"
] | [
"import configparser\nimport unittest\nimport numpy as np\n\nfrom videofeatures.TwentyBNDatasetProvider import TwentyBNDataset\nfrom videofeatures.CNNFeatures import ResNetFeatures\nfrom videofeatures.VideoFeatures import Pipeline\n\n\nclass PipelineTwentyBNTest(unittest.TestCase):\n def setUp(self):\n self.con... | [
[
"numpy.random.normal",
"numpy.random.randint"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
dmylzenova/ForwardTacotron | [
"065e4ba3d11ac24d52dfa3c0ae0e4e027f3dc665"
] | [
"gen_tacotron.py"
] | [
"import torch\nfrom models.fatchord_version import WaveRNN\nfrom utils import hparams as hp\nfrom utils.text.symbols import phonemes\nfrom utils.paths import Paths\nfrom models.tacotron import Tacotron\nimport argparse\nfrom utils.text import text_to_sequence, clean_text\nfrom utils.display import save_attention, s... | [
[
"torch.device",
"torch.cuda.is_available",
"torch.tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
xjtuygao/EPT | [
"1fb39f0f8508dd5531a97671c3b7294c7d20c286",
"1fb39f0f8508dd5531a97671c3b7294c7d20c286"
] | [
"network_nobn_nosn.py",
"2D_lsdr.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.nn.utils.spectral_norm as sn\n\n#------------------------- ResNet ----------------------------\nclass ResBlock_G(nn.Module):\n def __init__(self, nf, up=False):\n super(ResBlock_G, self).__init__()\n\n self.nf = nf\... | [
[
"torch.nn.functional.avg_pool2d",
"torch.nn.Conv2d",
"torch.nn.Tanh",
"torch.nn.Linear",
"torch.nn.functional.interpolate",
"torch.nn.ReLU"
],
[
"matplotlib.pyplot.legend",
"torch.cat",
"pandas.DataFrame",
"matplotlib.pyplot.axes",
"matplotlib.pyplot.plot",
"tor... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"... |
XD7479/mmsegmentation | [
"8d0111b7d89fb1173b3fad378deac3e6b7e47f5e"
] | [
"convert_PartImageNet_to_coco_stuff.py"
] | [
"import numpy as np\nfrom PIL import Image, ImagePalette # For indexed images\nimport matplotlib # For Matlab's color maps\nfrom pycocotools.coco import COCO\nimport os\nimport shutil\n\nCONFLICT_PIXEL_NUM = 0\n\n\ndef getCMap(stuffStartId=92, stuffEndId=182, cmapName='jet', addThings=True, addUnlabeled=True, addOt... | [
[
"numpy.random.get_state",
"numpy.random.seed",
"matplotlib.colors.hsv_to_rgb",
"numpy.arange",
"numpy.ones",
"matplotlib.colors.rgb_to_hsv",
"numpy.random.permutation",
"numpy.random.set_state",
"matplotlib.cm.get_cmap",
"numpy.zeros",
"numpy.vstack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
kant/pycondor | [
"ee87854504e8f4023feda860d8a9ddbecc7a70da"
] | [
"pycondor/read_ftr.py"
] | [
"#!/usr/bin/env python\n#-*- coding:utf-8 -*-\n\nimport click\n\nimport os\nimport traceback\n\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\nfrom construct import Struct, Bytes, UBInt8, ULInt32, LFloat32, Array, CString, String, PascalString\n\nfrom condor_dll import NaviConDLL\nfrom ... | [
[
"matplotlib.pyplot.tight_layout",
"pandas.to_datetime",
"matplotlib.pyplot.subplots",
"pandas.DataFrame",
"numpy.timedelta64",
"pandas.ExcelWriter",
"numpy.maximum.accumulate",
"matplotlib.pyplot.show"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"1.3",
"0.19",
"1.1",
"1.5",
"0.24",
"0.20",
"1.0",
"0.25",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
zbarge/listwise | [
"671021b56f54887430a3958e2833e2d99a887e2c"
] | [
"listwise/db.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Thu Oct 27 11:17:23 2016\r\n\r\n@author: zbarge\r\n\"\"\"\r\nimport sqlite3 \r\nimport pandas as pd\r\n\r\nclass SimpleSQLite3:\r\n \"\"\" \r\n A simplified sqlite3 class with a connection & cursor.\r\n Interacts with Pandas.\r\n \"\"\"\r\n def __init_... | [
[
"pandas.read_sql"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
lfd/pennylane | [
"c0d269e5f1eba2f9d033bd9b6a79c10a11f4228a"
] | [
"tests/proc/test_tensorbox.py"
] | [
"# Copyright 2018-2020 Xanadu Quantum Technologies Inc.\r\n\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n\r\n# http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n# Unles... | [
[
"numpy.add.at",
"numpy.expand_dims",
"numpy.ones_like",
"numpy.dtype",
"numpy.sin",
"numpy.all",
"numpy.stack",
"numpy.array",
"numpy.empty"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
joaomonteirof/dcase | [
"018bd225c45397bba616e3c70e4a7b50bb1010af",
"018bd225c45397bba616e3c70e4a7b50bb1010af"
] | [
"mod_spec/models/TDNN.py",
"kaldi_features/eval.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nclass StatisticalPooling(nn.Module):\n\n\tdef forward(self, x):\n\t\t# x is 3-D with axis [B, feats, T]\n\t\tmu = x.mean(dim=2, keepdim=False)\n\t\tstd = (x+torch.randn_like(x)*1e-6).std(dim=2, keepdim=False)\n\t\treturn torch.cat((mu, std), d... | [
[
"torch.randn_like",
"torch.nn.BatchNorm1d",
"torch.cat",
"torch.nn.Linear",
"torch.nn.Conv1d",
"torch.nn.ReLU"
],
[
"torch.load",
"torch.cat",
"torch.utils.data.DataLoader",
"sklearn.metrics.confusion_matrix",
"torch.from_numpy",
"torch.no_grad",
"torch.cuda... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Kshitij09/pytorch-lightning | [
"63bd0582e35ad865c1f07f61975456f65de0f41f",
"63bd0582e35ad865c1f07f61975456f65de0f41f"
] | [
"tests/loggers/test_base.py",
"tests/base/model_valid_epoch_ends.py"
] | [
"import pickle\nfrom unittest.mock import MagicMock\n\nimport numpy as np\n\nfrom pytorch_lightning import Trainer\nfrom pytorch_lightning.loggers import LightningLoggerBase, LoggerCollection\nfrom pytorch_lightning.utilities import rank_zero_only\nfrom tests.base import EvalModelTemplate\n\n\ndef test_logger_colle... | [
[
"numpy.random.random",
"numpy.random.seed"
],
[
"torch.stack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
aeloyq/models | [
"a47c0e7fea2e25ca6c2c54d3d49ca3ec29372457"
] | [
"research/object_detection/trainer.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.concat",
"tensorflow.control_dependencies",
"tensorflow.cast",
"tensorflow.group",
"tensorflow.summary.scalar",
"tensorflow.Graph",
"tensorflow.losses.get_total_loss",
"tensorflow.get_collection",
"tensorflow.losses.get_losses",
"tensorflow.check_numerics",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
pyigm/pyigm | [
"8b4bc7f7f1c9f1c280720a4cc0693cd7cb79e9cb",
"8b4bc7f7f1c9f1c280720a4cc0693cd7cb79e9cb"
] | [
"pyigm/clustering/tests/utils.py",
"pyigm/guis/fitdla.py"
] | [
"from __future__ import print_function, absolute_import, division, unicode_literals\n\nimport numpy as np\nfrom astropy.table import Table\n\n\ndef make_rand_gal(nrand=1000):\n # Make a set of random, uniformly distributed galaxies\n RA = 200. + 1.0 * np.random.uniform(size=nrand) # About 20Mpc at z~0.3\n ... | [
[
"numpy.arange",
"numpy.random.uniform"
],
[
"numpy.abs",
"numpy.arange",
"numpy.median",
"numpy.argmin",
"numpy.interp",
"numpy.diff",
"numpy.exp",
"numpy.array",
"numpy.where"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
alexrichardson21/PacmanDQNAgent | [
"7a7aff6f8fa80c0e00e107adb07380194e2fc2d3"
] | [
"DQN.py"
] | [
"\nimport random\nimport numpy as np \nfrom collections import deque\nfrom keras.models import Sequential\nfrom keras.layers import Dense\nfrom keras.optimizers import Adam\nfrom util import nearestPoint\n\nEPISODES = 1000\n\n\nclass DQNAgent():\n def __init__(self):\n self.state_size = 2\n self.ac... | [
[
"numpy.argmax",
"numpy.random.rand"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
IMTMarburg/mbf_genomics | [
"b83e318dbcd487ade846a6bf6f17724833f85797"
] | [
"tests/test_genes_anno_tag_counts.py"
] | [
"import pytest\nfrom pathlib import Path\nimport numpy as np\nimport pandas as pd\nfrom mbf_genomics.genes.anno_tag_counts import IntervalStrategyIntron\n\nfrom mbf_genomics.genes import Genes, anno_tag_counts\nfrom mbf_qualitycontrol import prune_qc, get_qc_jobs, qc_disabled\nfrom mbf_qualitycontrol.testing import... | [
[
"numpy.isnan",
"numpy.array",
"pandas.Series",
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"1.3",
"0.19",
"1.1",
"1.5",
"0.24",
"0.20",
"1.0",
"0.25",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
StanfordASL/ccscp | [
"a727dfc10d4acc43248c9a525a37279a70cecd80"
] | [
"exps/astrobee_mc.py"
] | [
"import numpy as np\nimport sympy as sp\n\nfrom numpy import concatenate\n\nimport sys\nfrom stats import p_th_quantile_chi_squared, p_th_quantile_cdf_normal\n\nsys.path.append('../exps/Models/')\nsys.path.append('../src/utils/')\n\nfrom polygonal_obstacles import *\nfrom polygonal_obstacles import PolygonalObstacl... | [
[
"numpy.random.multivariate_normal",
"numpy.swapaxes",
"numpy.array",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
SotirisAnagnostidis/onlineAnomalyDetection | [
"cd1c3773107b755de69ee45ea0b3f0ec3e140b2a"
] | [
"diploma/kplusplus.py"
] | [
"\"\"\"\n implementation inspired from https://datasciencelab.wordpress.com/2014/01/15/improved-seeding-for-clustering-with-k-means/\n\"\"\"\n\nimport numpy as np\nimport random\nimport scipy.stats.distributions\nimport sys\n\n\ndef poisson(x, l):\n return_value = 1\n for x_i, l_i in zip(x, l):\n re... | [
[
"numpy.where",
"numpy.finfo"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
fangtiancheng/NSRR | [
"6722f192319f6837687a932005a96dcb1be6bcf8"
] | [
"utils/util.py"
] | [
"import json\nimport pandas as pd\nfrom pathlib import Path\nfrom itertools import repeat\nfrom collections import OrderedDict\n\nimport time\nimport torch\nimport torch.nn.functional as F\nimport numpy as np\n\nfrom threading import Lock, Thread\nfrom typing import Union, Tuple, List\n\nfrom pytorch_colors import ... | [
[
"torch.cat",
"torch.sin",
"numpy.asarray",
"pandas.DataFrame",
"torch.tensor",
"torch.nn.functional.grid_sample",
"torch.arange",
"torch.device",
"torch.cuda.device_count",
"torch.cos"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
RedisAI/benchmarks | [
"65b8509b81795da73f25f51941c61fbd9765914c"
] | [
"experiments/_tensorflow/_tf_serving/client.py"
] | [
"import grpc\nimport tensorflow as tf\nimport numpy as np\nfrom tensorflow_serving.apis import predict_pb2\nfrom tensorflow_serving.apis import prediction_service_pb2_grpc\n\nfrom experiments.utils import get_one_image\n\n\ndef init(config):\n channel = grpc.insecure_channel('localhost:8500')\n init.stub = pr... | [
[
"numpy.array",
"tensorflow.contrib.util.make_tensor_proto"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"1.12",
"1.4",
"1.13",
"1.5",
"1.7",
"0.12",
"1.0",
"1.2"
]
}
] |
liuxiaotong15/megnet | [
"25893c6b2b5d842d7662e6baf0c4f87bee94c22f"
] | [
"megnet/layers/featurizer/tests/test_gaussian.py"
] | [
"import tensorflow as tf\nimport unittest\n\nimport numpy as np\n\nfrom megnet.layers.featurizer import GaussianExpansion\n\n\nclass TestGaussian(unittest.TestCase):\n def test_gaussian(self):\n x = np.random.normal(size=(1, 10))\n centers = np.linspace(0, 6, 100)\n width = 0.5\n\n ge... | [
[
"numpy.random.normal",
"numpy.linspace"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
joemarch010/NILBS | [
"c6568818ec8acdb0fe4bd8d197278f0abb361d0b"
] | [
"NiLBS/mesh/voxel_matrix.py"
] | [
"\nimport numpy as np\n\n\nclass VoxelMatrix:\n \"\"\"\n\n Utility class for representing a voxel matrix which can be sub-divided ad scaled\n\n\n \"\"\"\n def __init__(self, resolution, voxel_size):\n \"\"\"\n :param resolution: [Int], (n, m, p) size of the voxel grid\n \"\"\"\n\n ... | [
[
"numpy.full"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
CrtomirJuren/py-ni-daqmx | [
"ef6c06191b0ea6c2f26a2d596ca69fcc67d41fb7"
] | [
"code/example-5-RT-graph-not-working.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nLow speed DAQ example\nCreated on Mon Jun 7 10:54:38 2021\n\nhttps://github.com/ni/nidaqmx-python\n\n@author: crtjur\n\"\"\"\nimport nidaqmx\nimport time\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.animation as animation\n\ndef readdaq(channel):\n # ... | [
[
"matplotlib.pyplot.title",
"matplotlib.pyplot.figure",
"matplotlib.animation.FuncAnimation",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.