repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
possible_versions
list
jkulhanek/robot-visual-navigation
[ "ddc63df38d326e9225981bf89608043c77d950e8" ]
[ "python/environment/image_collection_environment.py" ]
[ "import os\nimport h5py\nimport gym\nfrom gym.wrappers import TimeLimit\nimport numpy as np\nimport random\n\nACTION_LIST = []\n\n\ndef move_position(position, mult=1):\n rotation = position[2]\n if rotation == 0:\n return (position[0] + 1 * mult, position[1], rotation)\n elif rotation == 1:\n ...
[ [ "numpy.expand_dims", "matplotlib.use", "numpy.copy", "numpy.array", "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
am1tyadav/teal
[ "6599b937c03934f3ef362cb16550fbe31336f57b" ]
[ "teal/mel_to.py" ]
[ "import tensorflow as tf\nfrom tensorflow.keras import layers\nfrom teal.utils import get_mel_filter_bank\n\n\nclass MelSpecToSpectrogram(layers.Layer):\n def __init__(self, sample_rate: int, n_fft: int, n_mels: int, *args, **kwargs):\n super().__init__(*args, **kwargs)\n\n self._sample_rate = samp...
[ [ "tensorflow.transpose" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
Zhi-ChaoZhao/NRSurMemory_7qd4
[ "0f49530e7602f136f99879fbb4c9bb6e2f48cdc0" ]
[ "surfinBH/_fit_evaluators/fit_Mem_7qd4.py" ]
[ "import numpy as np\nimport sys\nfrom scipy.interpolate import InterpolatedUnivariateSpline as spline\nfrom surfinBH import surfinBH\nfrom surfinBH._lal_spin_evolution import lal_spin_evloution_wrapper\nimport surfinBH._utils as utils\nimport warnings\n\n#============================================================...
[ [ "numpy.log", "numpy.abs", "numpy.gradient", "numpy.concatenate", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
benyoussefrihab/ProjectKeras-1
[ "9542e5adeb509b78123d684af8cf320395ee3bf9" ]
[ "feature_extractor.py" ]
[ "from tensorflow.keras.preprocessing import image\nfrom tensorflow.keras.applications.vgg16 import VGG16, preprocess_input\nfrom tensorflow.keras.models import Model\nimport numpy as np\n\n# See https://keras.io/api/applications/ for details\n\nclass FeatureExtractor:\n def __init__(self):\n base_model = ...
[ [ "numpy.expand_dims", "tensorflow.keras.applications.vgg16.VGG16", "numpy.linalg.norm", "tensorflow.keras.applications.vgg16.preprocess_input", "tensorflow.keras.preprocessing.image.img_to_array" ] ]
[ { "matplotlib": [], "numpy": [ "1.10", "1.12", "1.11", "1.19", "1.24", "1.13", "1.16", "1.9", "1.18", "1.23", "1.21", "1.22", "1.20", "1.7", "1.15", "1.14", "1.17", "1.8" ], "pandas": [], ...
GenieTim/mpltools
[ "9d7f5c5a704357f34a72802712b0261566b8dbc1" ]
[ "mpltools/special/hinton.py" ]
[ "from __future__ import division\nfrom future.builtins import zip\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib import collections\nfrom matplotlib import transforms\nfrom matplotlib import ticker\n\n__all__ = ['hinton']\n\n\n# TODO: Add yutils.mpl._coll to mpltools and use that for square c...
[ [ "matplotlib.pyplot.gca", "numpy.log", "numpy.abs", "numpy.clip", "numpy.asarray", "numpy.arange", "matplotlib.transforms.Affine2D", "numpy.ceil", "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ivy-dl/vision
[ "ab7f188bee028af5880b4b5aa76761ea61e7ea4f" ]
[ "ivy_vision_tests/test_voxel_grids.py" ]
[ "# global\nimport pytest\nimport ivy.numpy\nimport numpy as np\nimport ivy_tests.helpers as helpers\n\n# local\nimport ivy_vision.voxel_grids as ivy_vg\nfrom ivy_vision_tests.data import TestData\n\n\nclass VoxelGridsTestData(TestData):\n\n def __init__(self):\n super().__init__()\n\n # un-batched\...
[ [ "numpy.reshape", "numpy.array", "numpy.ones" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
DanielScottEaton/TrenchRipper
[ "e8bcadb3130b8215eeb9f32ec38ede1c031af47d" ]
[ "trenchripper/tplot.py" ]
[ "# fmt: off\nimport numpy as np\nfrom matplotlib import pyplot as plt\n\ndef plot_kymograph(kymograph):\n \"\"\"Helper function for plotting kymographs. Takes a kymograph array of\n shape (y_dim,x_dim,t_dim).\n\n Args:\n kymograph (array): kymograph array of shape (y_dim,x_dim,t_dim).\n \"\"\"\n ...
[ [ "numpy.concatenate", "matplotlib.pyplot.imshow" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
hf136/models
[ "5330c8763bf6b83907fac01ddc1d640e6e480c81" ]
[ "LogisticRegression/utils.py" ]
[ "# coding=utf-8\nfrom __future__ import print_function\nfrom __future__ import division\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport random\n\n\n__author__ = 'wuyueqiu'\n\n\ndef gen_data():\n # 生成数据\n X1 = [[1 + random.random(), 1 + random.random()] for i in range(50)]\n X2 = [[2 + random...
[ [ "matplotlib.pyplot.plot", "numpy.array", "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
rky0930/yolo_v2
[ "efe152edac12ee2d6b5347c73c2fbd9dea2b578c" ]
[ "research/object_detection/models/yolo_v2_darknet_19_feature_extractor_test.py" ]
[ "# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "numpy.random.rand", "numpy.abs", "tensorflow.test.main" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
tongni1975/TensorFlow-Machine-Learning-Cookbook-Second-Edition
[ "4f57ea4ad79c8111fb29bad3da5d151858c6a050" ]
[ "Chapter01/01_Introduction/07_Working_with_Data_Sources/07_data_gathering.py" ]
[ "# Data gathering\n#----------------------------------\n#\n# This function gives us the ways to access\n# the various data sets we will need\n\n# Data Gathering\nimport matplotlib.pyplot as plt\nimport tensorflow as tf\nfrom tensorflow.python.framework import ops\nops.reset_default_graph()\n\n\n# Iris Data\nfrom sk...
[ [ "matplotlib.pyplot.imshow", "sklearn.datasets.load_iris", "tensorflow.contrib.keras.datasets.cifar10.load_data", "tensorflow.examples.tutorials.mnist.input_data.read_data_sets", "tensorflow.python.framework.ops.reset_default_graph" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
libingzheren/UnarySim
[ "c02461454618e9ce0c86ce695fad9e95d1ca5e00" ]
[ "sw/kernel/relu.py" ]
[ "import torch\nfrom UnarySim.sw.kernel.shiftreg import ShiftReg\n\nclass UnaryReLU(torch.nn.Module):\n \"\"\"\n unary ReLU activation based on comparing with bipolar 0\n data is always in bipolar representation\n the input bit streams are categorized into rate-coded and temporal-coded\n \"\"\"\n d...
[ [ "torch.ge", "torch.zeros", "torch.lt", "torch.gt", "torch.ones_like" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
RowitZou/topic_dialog_summ
[ "0de31d97b07be4004e08f9755ee66bea47aa7b10", "0de31d97b07be4004e08f9755ee66bea47aa7b10" ]
[ "src/train_abstractive.py", "src/models/decoder_rnn.py" ]
[ "#!/usr/bin/env python\n\"\"\"\n Main training workflow\n\"\"\"\nfrom __future__ import division\n\nimport argparse\nimport glob\nimport os\nimport random\nimport signal\nimport time\nimport torch\nimport distributed\n\nfrom pytorch_transformers import BertTokenizer\nfrom models import data_loader\nfrom models.d...
[ [ "torch.cuda.set_device", "torch.load", "torch.cuda.manual_seed", "torch.manual_seed", "torch.multiprocessing.get_context", "torch.no_grad" ], [ "torch.nn.Dropout", "torch.cat", "torch.nn.ModuleList", "torch.nn.LSTMCell", "torch.stack", "torch.nn.GRUCell" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
piboauthors/PiBO-Spearmint
[ "5759a9f9ba3c0124af2b4750e37806ce32bc3d7f" ]
[ "spearmint/choosers/.ipynb_checkpoints/acquisition_functions-checkpoint.py" ]
[ "# -*- coding: utf-8 -*-\n# Spearmint\n#\n# Academic and Non-Commercial Research Use Software License and Terms\n# of Use\n#\n# Spearmint is a software package to perform Bayesian optimization\n# according to specific algorithms (the “Software”). The Software is\n# designed to automatically run experiments (thus t...
[ [ "scipy.stats.norm.cdf", "numpy.sqrt", "scipy.stats.norm.pdf", "numpy.tile", "numpy.mean", "numpy.array", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
AlbertMP/Use-LSTM-For-Sentiment-Analysis
[ "bab6228fa7bf61fa685e545361eb4601799cbffc" ]
[ "sentiment-analysis/model_lstm.py" ]
[ "# -*- coding: utf-8 -*-\n\nimport pickle\nimport numpy as np\nimport pandas as pd\nfrom keras.utils import np_utils\nfrom keras.models import Sequential\nfrom keras.preprocessing.sequence import pad_sequences\nfrom keras.layers import LSTM, Dense, Embedding, Dropout\nfrom sklearn.model_selection import train_test_...
[ [ "pandas.read_csv", "numpy.argmax", "sklearn.model_selection.train_test_split", "sklearn.metrics.accuracy_score" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
LaureenK/3D-BoNet_LK
[ "bc2f12777ae6323ca32881bfbb168cc05f29f3ef" ]
[ "tf_ops_python3/interpolation/tf_interpolate_op_test.py" ]
[ "import tensorflow as tf\nimport numpy as np\nfrom tf_interpolate import three_nn, three_interpolate\n\nclass GroupPointTest(tf.test.TestCase):\n def test(self):\n pass\n\n def test_grad(self):\n with self.test_session():\n points = tf.constant(np.random.random((1,8,16)).astype('float32'))\n print...
[ [ "tensorflow.test.compute_gradient_error", "numpy.random.random", "tensorflow.ones_like", "tensorflow.test.main" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
565353780/filter-socket
[ "4da4c1d6bf5065ffdf8e1d3e79faf97582c77d87" ]
[ "src/Python/ResNet/resnet_train.py" ]
[ "import os\r\nos.environ[\"TF_CPP_MIN_LOG_LEVEL\"] = \"2\"\r\nimport tensorflow as tf\r\nimport tensorflow.contrib.slim.nets as nets\r\n\r\nclass ResNetTrainer:\r\n def __init__(self, RootImageFolderPath, ModelSavePath, ModelSaveName, batchSize, learningRate, ImageWidth, ImageHeight, numThreads, labelNum):\r\n ...
[ [ "tensorflow.FixedLenFeature", "tensorflow.cast", "tensorflow.equal", "tensorflow.nn.sigmoid_cross_entropy_with_logits", "tensorflow.contrib.slim.nets.resnet_v2.resnet_v2_50", "tensorflow.train.AdamOptimizer", "tensorflow.TFRecordReader", "tensorflow.Variable", "tensorflow.decod...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
jie-mei/NLI
[ "eb9cac23e24c1a960a46fadb2aee4ad4db3ab327" ]
[ "src/nn/cafe.py" ]
[ "\"\"\" Prediction models.\n\"\"\"\n\nimport typing as t\n\nimport numpy as np\nimport tensorflow as tf\n\nimport embed\nimport data\nimport op\nimport nn\nfrom nn.base import Model, SoftmaxCrossEntropyMixin\nfrom util.log import exec_log as log\nfrom util.debug import *\n\n\nclass CAFE(SoftmaxCrossEntropyMixin, Mo...
[ [ "tensorflow.concat", "tensorflow.zeros", "tensorflow.reduce_sum", "tensorflow.stack", "tensorflow.nn.conv2d", "tensorflow.while_loop", "tensorflow.gather", "tensorflow.matrix_transpose", "tensorflow.nn.dropout", "tensorflow.shape", "tensorflow.less", "tensorflow.pla...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
sunjerry019/adventOfCode18
[ "6970ece25e54b9f90c4aadd1a5d8569bd32f403b" ]
[ "2018/day_03/3_2.py" ]
[ "#!/usr/bin/env python3\n\nimport numpy as np\n\ninput = open(\"3.in\",\"r\")\ninputContents = input.readlines()\n\nfabric = np.zeros((1000,1000), dtype=int)\nuninterruptedClaims = list(range(1, len(inputContents) + 1))\n# l = 998\n# w = 999\n\nfor claim in inputContents:\n a = claim.split(\" @ \")\n a1 = a[1...
[ [ "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
arnaou/MLOPS-GNN
[ "62a2482187688841ada75b69541e1de06df38c9d" ]
[ "src/models/model.py" ]
[ "import torch\nfrom torch_geometric.nn.models import AttentiveFP\n\n\nclass GNNModel:\n def __init__(self, in_channels=39, hidden_channels=150, out_channels=1, edge_dim=10,\n num_layers=2, num_timesteps=2, dropout=0.0):\n self.in_channels = in_channels\n self.hidden_channels = hidde...
[ [ "torch.cuda.is_available" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
agclark12/tumor_migration_analysis
[ "c63d43306f9f381ddec04a8301fcd268a5d71c38" ]
[ "tumor_migration_analysis/piv_plot_vectors.py" ]
[ "#!/opt/local/bin/python\n\n\"\"\"\n\nPlots PIV vector data (just vectors, no fame)\n\n\"\"\"\n\nimport os\n\nimport numpy as np\nfrom skimage.io._plugins import tifffile_plugin as tifffile\nfrom matplotlib import rcParams\nimport matplotlib.pyplot as plt\nfrom matplotlib.colors import LinearSegmentedColormap\n\nim...
[ [ "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig", "numpy.arctan2", "matplotlib.pyplot.close", "matplotlib.pyplot.quiver", "matplotlib.colors.LinearSegmentedColormap.from_list" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
FreeUKGen/ProbateParsing
[ "dc273ae7516a8a6fa3ad19dbc259cd22f01eb4e2" ]
[ "NER/test_ner.py" ]
[ "'''\nThis script tests the Named Entity Recognition model against the unannotated probate data. The model can be imported to test the remaining entries that are not annotated to extract the entities.\n\nThe input to the script is the folder containing the training model generated during the train_ner.py and a text...
[ [ "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": [] } ]
Deepayan137/Adapting-OCR
[ "0604fe573e58f3d2e918461bdccece3af8b28059" ]
[ "src/modules/trainer.py" ]
[ "import os\nimport logging\nimport numpy as np\nfrom collections import OrderedDict\nfrom argparse import ArgumentParser\nfrom tqdm import *\n\nimport pdb\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.optim.lr_scheduler import CosineAnnealingLR, StepLR\nfrom torch.nn.utils.clip_g...
[ [ "torch.LongTensor", "numpy.random.beta", "torch.nn.functional.log_softmax", "torch.randperm", "torch.utils.data.DataLoader" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
dadadidodi/m3ddpg
[ "48659721eb634d53c5c73b6b8e32e41b0f1f9a02" ]
[ "experiments/train.py" ]
[ "import argparse\nimport numpy as np\nimport tensorflow as tf\nimport time\nimport pickle\nimport sys\nimport os\n\nsys.path.append('../')\nsys.path.append('../../')\nsys.path.append('../../../')\n\nimport maddpg.common.tf_util as U\nfrom maddpg.trainer.maddpg import MADDPGAgentTrainer\nimport tensorflow.contrib.la...
[ [ "numpy.random.seed", "tensorflow.get_collection", "tensorflow.contrib.layers.fully_connected", "numpy.mean", "tensorflow.variable_scope", "tensorflow.train.Saver" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
DandelionLau/NetworkCollections
[ "29e5cd2091f7085b3241209ed9447f2baadbce41" ]
[ "CNN/GoogleNet.py" ]
[ "\"\"\"\n@FileName: GoogleNet.py\n@Description: Implement GoogleNet\n@Author : Ryuk\n@CreateDate: 2019/11/14 16:11\n@LastEditTime: 2019/11/14 16:11\n@LastEditors: Please set LastEditors\n@Version: v1.0\n\"\"\"\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\nclass Inception(nn.Module):\n...
[ [ "torch.cat", "torch.randn", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.AvgPool2d", "torch.nn.MaxPool2d", "torch.nn.BatchNorm2d", "torch.nn.ReLU" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
tskTNK/DualSatEarthNav
[ "f61069793e3a8b9991435dcc53d4fe09b6e843fa" ]
[ "gnsspy/position/position.py" ]
[ "\"\"\"\nPosition computation and related functions\n\"\"\"\n# ===========================================================\n# ========================= imports =========================\nimport time\nfrom datetime import timedelta as _timedelta\nimport numpy as _np\nimport pandas as _pd\nfrom operator import itemge...
[ [ "numpy.diag", "numpy.dot", "numpy.sqrt", "numpy.linalg.inv", "numpy.arange", "numpy.linalg.norm", "pandas.Timedelta", "matplotlib.pyplot.savefig", "numpy.arccos", "numpy.linalg.lstsq", "numpy.deg2rad", "matplotlib.pyplot.clf", "numpy.mean", "numpy.nanmean", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
rowles/numstore
[ "75e1e00431578042bfa29d92dde476665aec696d" ]
[ "setup.py" ]
[ "from distutils.core import setup\nfrom distutils.extension import Extension\nfrom Cython.Distutils import build_ext\n\nfrom distutils import sysconfig\nimport numpy\n\n\nsetup(\n ext_modules=[\n Extension(\n \"numstore\",\n [\n \"numstore.pyx\",\n ],\n ...
[ [ "numpy.get_include" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
fpdcc/fpcc_data_dashboard
[ "575e10a72a85617bd214906822271aa65ecced04" ]
[ "tests/tests.py" ]
[ "import pytest\nimport pandas as pd\nimport datatest as dt\nfrom numbers import Number\n\n@pytest.fixture(scope='module')\n@dt.working_directory(__file__)\ndef df():\n return pd.read_csv('data.csv')\n\n@pytest.mark.mandatory\ndef test_columns(df):\n dt.validate(\n df.columns,\n {'Id','Category',...
[ [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
ecarver1/Creation-of-Synthetic-MRI-for-use-in-GBM-tumor-segmentation
[ "147761a0371941742da982ae33404af854fd24ff" ]
[ "UNET/prepare_data.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Thu Jun 14 13:57:44 2018\r\n\r\n@author: ecarver1\r\n\"\"\"\r\n\r\nimport nibabel as nib\r\nimport os\r\nimport numpy\r\nimport gc\r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\ndef run3(rootdir,outputdir,post_fix,outputdir_nifti): \r\n img_data = []\r\n print(post_fix)...
[ [ "numpy.asarray", "numpy.max", "numpy.zeros", "numpy.mean" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
moeraza/ali-g
[ "342e24e139fc1e75f4bf576d0784ed886f305cf8" ]
[ "alig/tf/alig.py" ]
[ "try:\n import tensorflow as tf\nexcept ImportError:\n raise ImportError(\"Tensorflow is not installed, impossible to import `alig.tf.AliG`\")\n\n\ndef minimize(optimizer, loss, global_step=None, var_list=None,\n gate_gradients=tf.compat.v1.train.Optimizer.GATE_OP, aggregation_method=None,\n ...
[ [ "tensorflow.clip_by_value", "tensorflow.norm" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "1.0", "1.2" ] } ]
nabeel3133/combining3Dmorphablemodels
[ "76dc6fe290918ea2d14e32a736d3b0e7736f1fbb" ]
[ "Prediction/head_prediction_rand_bfm.py" ]
[ "from scipy.io import loadmat\nimport numpy as np\nimport random\n\ndef tensorToVertices(tensor):\n\tj = 0\n\tvertices = []\n\tfor i in range(0, int(len(tensor)/3)):\n\t\tvertices.append([tensor[j], tensor[j+1], tensor[j+2]])\n\t\tj=j+3\n\n\tvertices = np.reshape(np.array(vertices), (len(vertices),3))\n\treturn (np...
[ [ "scipy.io.loadmat", "numpy.matmul", "numpy.shape", "numpy.transpose", "numpy.array" ] ]
[ { "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"...
ChoiIseungil/korquad-open-cs492i
[ "ddb27f64479acbe8bd98f91744bf6105856297f1" ]
[ "open_squad.py" ]
[ "\"\"\"\nKorQuAD open 형 데이터 processor\n\n본 스크립트는 다음의 파일을 바탕으로 작성 됨\nhttps://github.com/huggingface/transformers/blob/master/src/transformers/data/processors/squad.py\n\n\"\"\"\nfrom soynlp.normalizer import repeat_normalize\nimport re\nimport gensim\nimport json\nimport logging\nimport os\nimport sys\nfrom functool...
[ [ "numpy.minimum", "torch.utils.data.TensorDataset", "torch.tensor", "numpy.max", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
lmmentel/chemtools
[ "3f8f870da52b5d8a76a4be4f99e18cd865adaa7c" ]
[ "tests/test_basisset/test_basisset_json_io.py" ]
[ "\nimport numpy as np\nfrom chemtools.basisset import BasisSet\n\n\nVTZGAUSSIAN = \"\"\"\n****\nBe 0\nS 11 1.00\n 6863.0000000000 0.00023600\n 1030.0000000000 0.00182600\n 234.7000000000 0.00945200\n 66.5600000000 0.03795700\n 21.6900000000 0.11996500\n 7.7...
[ [ "numpy.allclose" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mostofashakib/TechHundred
[ "e6b0205552e0f524ce2e2585cdf2032a32a2b4b3" ]
[ "vision.py" ]
[ "import face_recognition\nimport cv2\nimport numpy as np\nfrom PIL import Image, ImageDraw\n\nvideo_capture = cv2.VideoCapture(0)\n\nadib_image = face_recognition.load_image_file(\"adib.jpg\")\nadib_face_encoding = face_recognition.face_encodings(adib_image)[0]\n\njoe_image = face_recognition.load_image_file(\"joe....
[ [ "numpy.argmin" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
TuomoKareoja/product-type-sales-predictions
[ "1002589fd2b0aec86f93a65d6d5c22f9452bd94a" ]
[ "notebooks/reports/lm_tuning.py" ]
[ "#%%\n\nimport os\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\nimport seaborn as sns\nimport sklearn\nfrom dotenv import find_dotenv, load_dotenv\nfrom IPython.core.interactiveshell import InteractiveShell\nfrom sklearn import metrics, preprocessing\nfrom sklearn.feature_selection im...
[ [ "matplotlib.pyplot.legend", "numpy.log", "pandas.read_csv", "sklearn.model_selection.cross_val_predict", "sklearn.linear_model.ElasticNet", "sklearn.metrics.mean_absolute_error", "sklearn.linear_model.ElasticNetCV", "matplotlib.pyplot.subplots", "sklearn.model_selection.KFold",...
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
RobertTLange/code-and-blog
[ "a727390b8668dbf7352759220666548e2d1a0e2d" ]
[ "01_dual_number_ad/dual_ad_logistic_reg.py" ]
[ "import numpy as np\nfrom sklearn.linear_model import LogisticRegression\n\nclass DataLoader(object):\n # Small class object for generating synthetic data\n def __init__(self, n, d, batch_size, binary=False):\n self.total_dim = d + 1\n self.X, self.y = self.generate_regression_data(n, d, binary)...
[ [ "numpy.dot", "numpy.fill_diagonal", "numpy.exp", "numpy.where", "numpy.random.randint", "numpy.hstack", "numpy.clip", "numpy.matmul", "numpy.ceil", "numpy.repeat", "numpy.zeros", "numpy.log", "numpy.multiply", "numpy.array", "sklearn.linear_model.Logisti...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
SpontaneousDuck/finn
[ "7cdfd6271159c6cc4636bd33047a7f2e175a7390" ]
[ "tests/brevitas/test_brevitas_act_export.py" ]
[ "import numpy as np\nimport torch\nimport brevitas.onnx as bo\nfrom brevitas.nn import QuantHardTanh\nfrom brevitas.core.restrict_val import RestrictValueType\nfrom brevitas.core.scaling import ScalingImplType\nfrom models.common import get_quant_type\nimport pytest\nfrom finn.core.modelwrapper import ModelWrapper\...
[ [ "numpy.random.uniform", "torch.from_numpy", "numpy.isclose" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
markmuetz/cosmic
[ "f215c499bfc8f1d717dea6aa78a58632a4e89113" ]
[ "ctrl/experimental/HadGEM3_highresSST_JJA_ipython.py" ]
[ "# coding: utf-8\nfrom pathlib import Path\ndatapath = Path('/badc/cmip6/data/CMIP6/HighResMIP/MOHC/HadGEM3-GC31-HM/highresSST-present/r1i1p1f1/E1hr/pr/gn/v20170831')\nfns = sorted(datapath.glob('*.nc'))\nfn = fns[-1]\n[[int(v) for v in (d[:4], d[4:6], d[6:8], d[8:10], d[10:])] for d in fn.stem[-25:].split('-')]\nd...
[ [ "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": [] } ]
amitaifrey/learn-to-hash
[ "dc13fe715eb4ebfddf249d2a2c1c65cb3e4dbd78" ]
[ "kahip/kmkahip.py" ]
[ "\r\n'''\r\nPipeline to:\r\n-create knn graphs from dataset.\r\n-recursively partitions dataset using KaHIP in parallel.\r\n-learn tree of neural networks in tandem with partitions tree.\r\n'''\r\n\r\nimport _init_paths\r\nimport sys\r\nimport os\r\nimport os.path as osp\r\nimport pickle\r\nimport create_graph\r\n...
[ [ "torch.LongTensor", "torch.load", "torch.cat", "torch.no_grad", "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Rowing0914/Graph_Nets
[ "7f6ea41f6f7b96da783cf8387982d153dc7a408a" ]
[ "environments/multitask_env/walkers.py" ]
[ "#!/usr/bin/env python2\n# -----------------------------------------------------------------------------\n# @brief:\n# Several Walkers\n# @author:\n# Tingwu (Wilson) Wang, Nov. 22nd, 2017\n# -----------------------------------------------------------------------------\n\nimport numpy as np\nfrom gym...
[ [ "numpy.square", "numpy.abs", "numpy.isfinite", "numpy.clip" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
DavidZhangdw/pysot-toolkit
[ "8dd56e9ff8315104d4316542ca03b036a9e6b18e" ]
[ "bin/testTracker_got_vis_draw.py" ]
[ "# Copyright (c) SenseTime. All Rights Reserved.\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport argparse\nimport os\n\nimport cv2\nimport torch\nimport numpy as np\nimport math\nimport sys\n\nsys.pa...
[ [ "numpy.array", "torch.set_num_threads", "numpy.loadtxt" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Rogue05/Praktyki-FT
[ "e647b64b15b742a74903fa0749cf8143fb7ad45d", "e647b64b15b742a74903fa0749cf8143fb7ad45d" ]
[ "untitled1.py", "mymod.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Jul 7 22:24:15 2021\n\n@author: Wojtek\n\"\"\"\nimport os\nimport warnings\n\nfrom matplotlib.cbook.deprecation import MatplotlibDeprecationWarning\nwarnings.filterwarnings(\"ignore\", category=MatplotlibDeprecationWarning)\n\nimport numpy as np\nimport pandas as pd...
[ [ "numpy.diag", "matplotlib.pyplot.legend", "pandas.read_csv", "numpy.heaviside", "matplotlib.pyplot.subplot", "numpy.exp", "numpy.array", "scipy.optimize.curve_fit", "matplotlib.pyplot.figure" ], [ "numpy.diag", "pandas.read_csv", "matplotlib.pyplot.plot", "n...
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "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"...
IQTLabs/WITW
[ "36154fb9388dbdc5b2776fc9d49699b26a08f8ae" ]
[ "tools/heatmap/heatmap.py" ]
[ "#!/usr/bin/env python\n\nimport os\nimport sys\nimport tqdm\nimport argparse\nimport numpy as np\nimport pandas as pd\nfrom skimage import io\nimport torch\nimport torchvision\nfrom osgeo import osr\nfrom osgeo import gdal\n\nsys.path.append('../../model')\nimport cvig_fov as cvig\nGlobals = cvig.Globals\ndevice =...
[ [ "torch.cat", "numpy.arange", "torch.utils.data.DataLoader", "torch.unsqueeze", "torch.exp", "torch.set_grad_enabled", "torch.squeeze" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
rocabrera/audio-learning
[ "9c99effb44c05cb33a7fdc8dbce18955fa95f84e" ]
[ "wav2vec/project/data_processor/dataset.py" ]
[ "import re\nimport os\nimport json\nimport pandas as pd\nfrom glob import glob\n\nfrom abc import ABC, abstractmethod\n\nclass DataBase(ABC):\n \n @abstractmethod\n def make_tidy(self):\n pass\n \n @abstractmethod\n def parse_data(self) -> pd.DataFrame:\n pass\n \nclass MLS(DataBa...
[ [ "pandas.concat", "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
saileshpuranam/DSND----Image-Classifier-Deep-Learning
[ "ea472161670a1a2586f55be4f766be9b287ee761" ]
[ "train.py" ]
[ "import argparse\nimport data_utils\nimport network_utils\n\nimport matplotlib.pyplot as plt\nimport torch\nimport numpy as np\nfrom torch import nn\nfrom torch import optim\nimport torch.nn.functional as F\nfrom torchvision import datasets, transforms, models\nfrom PIL import Image\nimport seaborn as sns\nimport j...
[ [ "torch.nn.NLLLoss", "torch.nn.Dropout", "torch.nn.LogSoftmax", "torch.max", "torch.utils.data.DataLoader", "torch.exp", "torch.nn.Linear", "torch.no_grad", "torch.cuda.is_available", "torch.device", "torch.nn.ReLU", "torch.save" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
rinikerlab/reeds
[ "d5d13eaf844d8f78456634f68455ba6239a106de" ]
[ "reeds/function_libs/pipeline/worker_scripts/analysis_workers/RE_EDS_explore_lowerBound_analysis.py" ]
[ "#!/usr/bin/python env\nimport glob\nimport os\n\nimport numpy as np\n\nfrom pygromos.files import imd\nfrom pygromos.utils import bash\nfrom reeds.function_libs.analysis.sampling import undersampling_occurence_potential_threshold_distribution_based as find_undersampling_pot_tresh\n\n\nimport reeds.function_libs.an...
[ [ "numpy.set_printoptions" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
dominik-steenken/qiskit-aqua
[ "bba4c02040ccf45b066f67398407e3e6382458b4", "bba4c02040ccf45b066f67398407e3e6382458b4" ]
[ "qiskit/aqua/components/oracles/truth_table_oracle.py", "qiskit/aqua/algorithms/classical/exactlpsolver/exactlpsolver.py" ]
[ "# -*- coding: utf-8 -*-\n\n# Copyright 2018 IBM.\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 appli...
[ [ "numpy.binary_repr" ], [ "numpy.asarray", "numpy.linalg.eig", "numpy.linalg.solve" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [ "1.11", "1.10", "1.12", "1.19", "1.24", "1.13", "1.16", "1.9", "1.18", "1.23", "1.21", "1.22", ...
lim0606/pytorch-generative-multisensory-network
[ "646404db3f6fdad0c6663b861be747c1032ec291" ]
[ "utils/colors.py" ]
[ "'''\nmiscellaneous functions: colors\n'''\nimport torch\n\ndef rgb2gray(img):\n #R = img[:, 0:1, :, :]\n #G = img[:, 1:2, :, :]\n #B = img[:, 2:3, :, :]\n\n ##gray = 0.2989 * R + 0.5870 * G + 0.1140 * B\n #gray = 0.2125 * R + 0.7154 * G + 0.0721 * B\n #return gray\n\n h, s, v = rgb_to_hsv(img)...
[ [ "torch.min", "torch.max" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
calvynsiong/OpenCVPractise
[ "e71ee4b78896c7a3ce05d0d0f5eef89ca5125971" ]
[ "Personal/masking.py" ]
[ "import cv2 as cv\nimport numpy as np\n\n\nimg = cv.imread(\"./Photos/cats.jpg\")\nblank = np.zeros(img.shape[:2], dtype=\"uint8\")\ncv.imshow(\"Base\", img)\ncv.imshow(\"blank\", blank)\n\n\n# Mask\n# mask = cv.circle(blank, (img.shape[1]//2, img.shape[0]//2+45,), 100, 255, -1)\nmask = cv.rectangle(blank, (30, 30)...
[ [ "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
thomcom/dask-cudf
[ "1a7f538e88fabff35859489221cbd2d8e7026076", "1a7f538e88fabff35859489221cbd2d8e7026076" ]
[ "dask_cudf/tests/test_groupby.py", "dask_cudf/tests/test_core.py" ]
[ "import numpy as np\nimport pandas as pd\nimport pytest\nfrom numba import cuda\n\nimport cudf as gd\nimport dask_cudf as dgd\n\n\ndef _gen_skewed_keys(nelem):\n \"\"\"Skewed keys to check a key will not split across multiple\n partitions even if the makes it unbalanced.\n \"\"\"\n skewed_size = int(nel...
[ [ "numpy.random.seed", "numpy.arange", "pandas.util.testing.assert_series_equal", "pandas.DataFrame", "numpy.random.shuffle", "numpy.testing.assert_array_equal", "numpy.random.normal", "numpy.random.randint" ], [ "numpy.random.seed", "numpy.arange", "numpy.random.shuf...
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "1.4", "1.3", "0.19", "1.1", "1.5", "0.24", "0.20", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "...
Sandeep-777/Triangulation
[ "00ac74f997ff025bbb99f2d25fdd4cbcef8397d7" ]
[ "PCD_WRITE.py" ]
[ "from numpy import transpose\nfrom Read_files import read_vtk2arr\n\n\ndef pcd_write(data, length, filename):\n my_file = open(filename, 'w')\n ptx = data[0]\n pty = data[1]\n ptz = data[2]\n comment = '# .PCD v.5 - Point Cloud Data file format\\n'\n header = 'VERSION .5\\n' + 'FIELDS x y z\\n' + ...
[ [ "numpy.transpose" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
nicole-dwenger/DDB_Tagger
[ "190c7f4d378c319e0f7553a8f7dd775d394087fc" ]
[ "src/DDB_tagger.py" ]
[ "\"\"\"\nSemantic Tagger using Danske Begrebsordbog.\nThis script can be used in three ways:\n\n1 Import DDB_Tagger Class in a notebook to tag a text:\n - from DDB_Tagger import DDB_Tagger # import class\n - Tagger = DDB_Tagger(dict=\"dict/dict.pkl, da_model=\"spacy\") # initialise tagger\n - results = Tag...
[ [ "pandas.concat", "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": [] } ]
blankspeedster/module-hub
[ "9b28b2dda9009bc1800a0d6e0d8c1447e70fd48a" ]
[ "qr_decoder/dispense_scanner.py" ]
[ "import mysql.connector\nimport cv2\nimport numpy as np\nfrom pyzbar.pyzbar import decode\nfrom time import sleep\nimport json\nimport RPi.GPIO as GPIO\n\ncurrentID = 0 \n\nGPIO.setmode(GPIO.BCM)\nGPIO.setwarnings(False)\nGPIO.setup(23, GPIO.OUT)\nGPIO.output(23, GPIO.LOW)\n\nmydb = mysql.connector.connect(\n ...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jinfagang/torch2trt_dynamic
[ "fad7a7845f13cb59c05de25fcb83e7591acb492c" ]
[ "torch2trt_dynamic/converters/relu.py" ]
[ "import torch\nfrom torch2trt_dynamic.torch2trt_dynamic import tensorrt_converter\n\nfrom .ReLU import convert_ReLU\n\n\n@tensorrt_converter('torch.relu')\n@tensorrt_converter('torch.relu_')\n@tensorrt_converter('torch.nn.functional.relu')\n@tensorrt_converter('torch.nn.functional.relu_')\ndef convert_relu(ctx):\n ...
[ [ "torch.nn.ReLU" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
kanekosh/pygeo
[ "5bd69ee47d9483d851bd2bfdc2a6135c94ad0343" ]
[ "tests/reg_tests/commonUtils.py" ]
[ "import os\nimport numpy as np\nfrom pygeo import DVGeometry, DVGeometryAxi\nfrom pyspline import Curve\n\n\n##################\n# DVGeometry Tests\n##################\n\n\ndef setupDVGeo(base_path, rotType=None):\n # create the Parent FFD\n FFDFile = os.path.join(base_path, \"../inputFiles/outerBoxFFD.xyz\")...
[ [ "numpy.imag", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Javran/misc
[ "736d657fead5143c26f3e3b9b85039bf8185e824" ]
[ "auto-tents/py/solver.py" ]
[ "#!/usr/bin/env python3.7\n\nimport json\nimport os\nimport random\nimport subprocess\nimport tempfile\nimport time\n\nimport cv2\nimport numpy as np\n\nfrom experiment import preset_path, RE_RAW_SIZE, find_board_size, \\\n extract_digits, color_shade, load_samples, crop_digit_cell, \\\n find_tag, RECOG_THRESHOLD...
[ [ "numpy.concatenate", "numpy.full" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
oldChen3/Face-Bullets-Screen-System
[ "820ede8bc2ec6daf9539322fcff5b30ee7713bb5" ]
[ "face_recognize_positon.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sun Apr 12 13:28:18 2020\n\n@author: 老陈三\n\"\"\"\n\nimport cv2\nfrom dlib import get_frontal_face_detector\nfrom os import rename, remove\nfrom PIL import ImageFont, ImageDraw, Image\nfrom face_recognition import face_locations\nimport numpy as np\n\n\nclass face_recog_p...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
DagerD/RadeonProRenderBlenderAddon
[ "188756291a0662f85b91b61aec276794785d75bd" ]
[ "src/bindings/pyrpr/src/pyrpr.py" ]
[ "#**********************************************************************\n# Copyright 2020 Advanced Micro Devices, Inc\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n# http:/...
[ [ "numpy.nonzero", "numpy.ascontiguousarray", "numpy.full", "numpy.all", "numpy.finfo", "numpy.array", "numpy.zeros", "numpy.empty" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
moneypi/License-Plate-Detector
[ "59615d375ddd8e67b0c246d2b8997b0489760eef" ]
[ "models/yolo.py" ]
[ "import argparse\nimport logging\nimport math\nimport sys\nfrom copy import deepcopy\nfrom pathlib import Path\n\nimport torch\nimport torch.nn as nn\n\nsys.path.append('./') # to run '$ python *.py' files in subdirectories\nlogger = logging.getLogger(__name__)\n\nfrom models.common import Conv, Bottleneck, SPP, D...
[ [ "torch.nn.Sequential", "torch.Tensor", "torch.cat", "torch.zeros", "torch.nn.Conv2d", "torch.tensor", "torch.arange", "torch.full_like", "torch.stack" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
google-research/deadunits
[ "5f4c7d9dc0201cefeb3dc970bcaee66a78cfa423" ]
[ "deadunits/utils_test.py" ]
[ "# coding=utf-8\n# Copyright 2021 The Deadunits Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b...
[ [ "tensorflow.compat.v2.test.main", "tensorflow.compat.v2.enable_v2_behavior", "tensorflow.compat.v2.range", "tensorflow.compat.v2.ones", "tensorflow.compat.v2.constant" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
gritYCDA/boundaryOCDA
[ "d93f2d4ad1f41d7ec19ba2a2fc7e98ecce914ccb" ]
[ "advent/scripts/train.py" ]
[ "# --------------------------------------------------------\r\n# AdvEnt training\r\n# Copyright (c) 2019 valeo.ai\r\n#\r\n# Written by Tuan-Hung Vu\r\n# --------------------------------------------------------\r\nimport argparse\r\nimport os\r\nimport os.path as osp\r\nimport pprint\r\nimport random\r\nimport warni...
[ [ "numpy.random.seed", "torch.cuda.manual_seed", "torch.load", "torch.manual_seed", "torch.utils.data.DataLoader" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
menefotto/Kats
[ "3fc8a3f819502d45736734eabb3601f42a6b7759" ]
[ "kats/models/ensemble/weighted_avg_ensemble.py" ]
[ "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\n\"\"\"Ensemble models with weighted average individual models\n\nAssume we have k base models, after we make ...
[ [ "pandas.DataFrame", "pandas.date_range" ] ]
[ { "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": [] } ]
IS2AI/trimodal_person_verification
[ "f811d97717a552a7d6a474b1cc2d7ecc416a1e19" ]
[ "models/ResNetBlocks.py" ]
[ "#! /usr/bin/python\n# -*- encoding: utf-8 -*-\n\nimport torch\nimport torch.nn as nn\nclass BasicBlock(nn.Module):\n expansion = 1\n\n def __init__(self, inplanes, planes, stride=1, downsample=None):\n super().__init__()\n self.conv1 = nn.Conv2d(inplanes, planes, kernel_size=3, stride=stride,\n...
[ [ "torch.nn.Conv2d", "torch.nn.Sigmoid", "torch.nn.Linear", "torch.nn.AdaptiveAvgPool2d", "torch.nn.BatchNorm2d", "torch.nn.ReLU" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
benedictflorance/keras-retinanet
[ "0d4bfe0db4fad3b15e99afdc3be4badc90ee23f9" ]
[ "keras_retinanet/bin/train.py" ]
[ "#!/usr/bin/env python\n\n\"\"\"\nCopyright 2017-2018 Fizyr (https://fizyr.com)\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 http://www.apache.org/licenses/LICENSE-2.0\n\nUnless ...
[ [ "tensorflow.device" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
ikazos/project11737-reprise
[ "afa6d7682d1857c42a7a32726065fcb4652034c2" ]
[ "onmt/transforms/transform.py" ]
[ "\"\"\"Base Transform class and relate utils.\"\"\"\nimport torch\nfrom onmt.utils.logging import logger\nfrom onmt.utils.misc import check_path\nfrom onmt.inputters.fields import get_vocabs\nimport os\n\n\nclass Transform(object):\n \"\"\"A Base class that every transform method should derived from.\"\"\"\n\n ...
[ [ "torch.load", "torch.save" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
reedan88/ioos_qc
[ "447e78766926ef82b8081d269479193fe5361386" ]
[ "ioos_qc/qartod.py" ]
[ "#!/usr/bin/env python\n# coding=utf-8\nimport logging\nimport warnings\nfrom collections import namedtuple\nfrom numbers import Real\nfrom typing import Sequence, Tuple, Union, Dict\n\nimport numpy as np\nfrom pygc import great_distance\n\nfrom ioos_qc.utils import (\n isnan,\n isfixedlength\n)\n\nL = loggin...
[ [ "numpy.issubdtype", "numpy.lib.stride_tricks.as_strided", "numpy.max", "numpy.where", "numpy.full", "numpy.std", "numpy.diff", "numpy.ma.zeros", "numpy.ma.ones", "numpy.zeros", "numpy.min", "numpy.errstate", "numpy.array", "numpy.ma.filled", "numpy.abs",...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
rproepp/spykeutils
[ "0bdae5fc6493b01bc9744a84b0c288ae49a5614d" ]
[ "spykeutils/stationarity.py" ]
[ "import scipy as sp\nimport quantities as pq\n\nfrom progress_indicator import ProgressIndicator\nfrom . import SpykeException\n\n\ndef spike_amplitude_histogram(trains, num_bins, uniform_y_scale=True,\n unit=pq.uV, progress=None):\n \"\"\" Return a spike amplitude histogram.\n\n ...
[ [ "scipy.linspace", "scipy.stats.mstats.mquantiles", "scipy.histogram" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
tsutterley/pointCollection
[ "04e4359e463ff8a556e0d078373578bd96390151" ]
[ "scripts/make_mosaic.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nmake_mosaic.py\nWritten by Tyler Sutterley (10/2021)\n\nCreate a weighted mosaic from a series of tiles\n\nCOMMAND LINE OPTIONS:\n --help: list the command line options\n -d X, --directory X: directory to run\n -g X, --glob_string X: quoted string t...
[ [ "matplotlib.pyplot.imshow", "numpy.nonzero", "numpy.sort", "numpy.ones", "matplotlib.pyplot.colorbar", "numpy.any", "matplotlib.pyplot.show", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
AaronGlanville/Barry
[ "f181448b2ed10a8c08195e7e34819ceb8abfe532" ]
[ "tests/test_models.py" ]
[ "from barry.datasets.dummy import DummyCorrelationFunction_SDSS_DR12_Z061_NGC, DummyPowerSpectrum_SDSS_DR12_Z061_NGC\nfrom barry.models.model import Model\nfrom barry.models.bao_power import PowerSpectrumFit\nfrom barry.models.bao_correlation import CorrelationFunctionFit\n\nfrom tests.utils import get_concrete\nim...
[ [ "numpy.random.seed", "numpy.isfinite" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
irecsys/DeepCARSKit
[ "20b861728efa0b416075d2e26c102c509923848e", "20b861728efa0b416075d2e26c102c509923848e" ]
[ "deepcarskit/model/fms/fm.py", "deepcarskit/model/neucf/neucmfw0.py" ]
[ "# -*- coding: utf-8 -*-\n# @Time : 2020/7/8 10:09\n# @Author : Shanlei Mu\n# @Email : slmu@ruc.edu.cn\n# @File : fms.py\n\n# UPDATE:\n# @Time : 2020/8/13,\n# @Author : Zihan Lin\n# @Email : linzihan.super@foxmain.com\n\n# UPDATE:\n# @Time : 2021/12\n# @Author : Yong Zheng\n# @Notes : made changes to ada...
[ [ "torch.nn.init.xavier_normal_", "torch.nn.BCELoss", "torch.nn.Sigmoid", "torch.nn.LeakyReLU", "torch.nn.MSELoss" ], [ "torch.cat", "torch.nn.Embedding", "torch.nn.Linear", "torch.mul", "torch.nn.init.normal_", "torch.save" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sherry0219/ignite
[ "e96203f05a5d2da9226169fbab13d56ece675e41" ]
[ "ignite/contrib/metrics/average_precision.py" ]
[ "from ignite.metrics import EpochMetric\n\n\ndef average_precision_compute_fn(y_preds, y_targets):\n try:\n from sklearn.metrics import average_precision_score\n except ImportError:\n raise RuntimeError(\"This contrib module requires sklearn to be installed.\")\n\n y_true = y_targets.numpy()\...
[ [ "sklearn.metrics.average_precision_score" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mikigom/dual-hrnet
[ "123ee7bd8287ae16c944ff36d972f634dd652cc6" ]
[ "utils.py" ]
[ "import os\nimport math\nimport random\nimport errno\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torchvision.transforms as transforms\nfrom PIL import Image\n\n\nclass AverageMeter(object):\n def __init__(self):\n self.val = None\n self.sum = ...
[ [ "torch.nn.functional.upsample", "torch.nn.CrossEntropyLoss", "torch.nn.functional.softmax", "numpy.ascontiguousarray", "numpy.asarray", "torch.nn.ConstantPad2d", "numpy.argmax", "torch.nn.ZeroPad2d", "numpy.array", "numpy.histogram" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
arpitran/HackerRank_solutions
[ "a3a77c858edd3955ea38530916db9051b1aa93f9" ]
[ "Python/Eye and Identity/solution.py" ]
[ "#!/bin/python3\n\nimport numpy as np\n\nn,m = map(int,input(\"Enter shape of your array \").split())\n\nprint(str(np.eye(n,m,k=0)).replace('1',' 1').replace('0',' 0'))\n\n" ]
[ [ "numpy.eye" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
AndreuxMath/kymatio
[ "0073d325ee508ac2236a992d9c2e29190d40595c" ]
[ "kymatio/scattering1d/backend/backend_torch.py" ]
[ "# Authors: Edouard Oyallon, Joakim Anden, Mathieu Andreux\n\nimport numpy as np\nimport torch\nimport torch.nn.functional as F\nfrom torch.autograd import Function\n\nNAME = 'torch'\n\ndef is_complex(input):\n return input.size(-1) == 2\n\nclass ModulusStable(Function):\n \"\"\"Stable complex modulus\n\n ...
[ [ "torch.ifft", "torch.zeros_like", "torch.fft" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sh4dw/shapley
[ "fa6fd9320b2b854f9899824664ae480291e776d0" ]
[ "performance_test.py" ]
[ "\"\"\"\nPerformance testing of the Shapley module based on processing times\n\n\n\"\"\"\n\nfrom modules import shapley\nfrom pprint import pprint\nfrom pandas import pandas\nfrom time import time\n\nDATASET_SIMPLE = pandas.read_csv('./test_datasets/simple.csv', sep=',')\nDATASET_MEDIUM = pandas.read_csv('./test_da...
[ [ "pandas.pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
nickcafferry/Advanced_Materials_Engineer
[ "0edf63a57761c4b867f0fced543fecfaf0913440" ]
[ "doc/model/utils.py" ]
[ "import os\nimport logging\n\nfrom sklearn.model_selection import KFold\n\ndef set_logger(model_dir, log_name):\n '''Set logger to write info to terminal and save in a file.\n\n Args:\n model_dir: (string) path to store the log file\n\n Returns:\n None\n '''\n logger = logging.getLogger...
[ [ "sklearn.model_selection.KFold" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
CalebFenton/TensorflowTTS
[ "5b21d0459f2ca9d93713d7496d044a8728fc9d8a" ]
[ "tensorflow_tts/bin/preprocess.py" ]
[ "# -*- coding: utf-8 -*-\n# Copyright 2020 Minh Nguyen (@dathudeptrai)\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# Unl...
[ [ "numpy.dot", "numpy.sum", "numpy.abs", "numpy.pad" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
yaroslavsobolev/sonnenhase
[ "c0b3ed5cbea32944162e748c42c24359a6c58f9a" ]
[ "reflections_3d.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nfrom scipy import ndimage\nimport json\nimport pytz\nfrom datetime import datetime\n\ndef has_refl(target_filename):\n image = ndimage.imread(target_filename, mode='RGB')\n image[image < 50] = 0\n plt.imshow(image)\n maxes = np.amax(image, axis=(0,1)...
[ [ "matplotlib.pyplot.imshow", "numpy.amax", "scipy.ndimage.imread", "numpy.max", "numpy.copy", "matplotlib.pyplot.ylabel", "numpy.mean", "matplotlib.pyplot.xlabel", "numpy.any", "numpy.floor", "numpy.load", "matplotlib.pyplot.show", "numpy.sum", "matplotlib.py...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "0.14", "0.15", "1.0", "0.19", "0.18", "1.2", "0.12", "0.10", "0.17", "0.16" ], "tensorflow": [] } ]
liuzenan1217/High-Frequency-Predictor
[ "267e5abd4ca29c22344d145eb6d32c5442b37708" ]
[ "Model/model_regression.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Fri Jan 14 09:58:35 2022\r\n\r\n@author: liuzenan\r\n\"\"\"\r\n\r\nimport torch\r\nimport torch.nn.functional as F\r\nfrom torch.utils import data\r\nfrom torchinfo import summary\r\nimport torch.nn as nn\r\nimport torch.optim as optim\r\n\r\n\r\nclass LSTM_model(nn....
[ [ "torch.cat", "torch.nn.LSTM", "torch.reshape", "torch.nn.Conv2d", "torch.nn.Tanh", "torch.nn.Linear", "torch.nn.MaxPool2d", "torch.nn.LeakyReLU", "torch.nn.BatchNorm2d" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
JRFeldman/hymo
[ "d57c3ada8888b1dfa8060a23b361a0dfe43fa30e" ]
[ "hymo/tests/test_swmmreport.py" ]
[ "import os\nimport pytest\nfrom pkg_resources import resource_filename\n\nimport pytest\nimport pandas as pd\nimport pandas.util.testing as pdtest\n\nfrom hymo import SWMMReportFile\nfrom .utils import data_path\n\nclass base_ReportFileMixin(object):\n def teardown(self):\n None\n\n def test_attributes...
[ [ "pandas.util.testing.assert_frame_equal", "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
davidvhill/ccd
[ "2eaf9933d76b861fc243327b323b80fbcf301932" ]
[ "test/test_ccd_detect.py" ]
[ "\"\"\"\nTests for running ccd from the top level __init__.py/detect()\n\nSanity checks to make sure test data sets run to completion\n\"\"\"\nimport numpy as np\n\nfrom test.shared import read_data\n# from shared import two_change_data\n#\nimport ccd\n\nparams = ccd.app.get_default_params()\n\n\ndef test_sample_da...
[ [ "numpy.load", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
vsokolov00/speechbrain
[ "ff3bca4c05cbf01aff50139b0d61b5687482ad45" ]
[ "speechbrain/nnet/losses.py" ]
[ "\"\"\"\nLosses for training neural networks.\n\nAuthors\n * Mirco Ravanelli 2020\n * Samuele Cornell 2020\n * Hwidong Na 2020\n * Yan Gao 2020\n * Titouan Parcollet 2020\n\"\"\"\n\nimport math\nimport torch\nimport logging\nimport functools\nimport numpy as np\nimport torch.nn as nn\nimport torch.nn.functional as ...
[ [ "torch.nn.functional.kl_div", "torch.mean", "torch.max", "torch.sum", "torch.no_grad", "torch.where", "torch.log10", "torch.pow", "torch.round", "torch.tensor", "torch.ones_like", "torch.zeros_like", "torch.stack", "numpy.array", "torch.nn.functional.ctc...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ParsaHejabi/USC-CSCI561-FoundationsOfArtificialIntelligence
[ "b80564c7065f0a09e21ac40e3ced514ab3031384" ]
[ "HW2/resource/startercode/Board.py" ]
[ "import numpy as np\n\nBOARD_SIZE = 3\n\nONGOING = -1\nDRAW = 0\nX_WIN = 1\nO_WIN = 2\n\n\nclass Board:\n\n def __init__(self, state=None, show_board=False, show_result=False):\n \"\"\" board cell:\n Empty -> 0\n X -> 1\n O -> 2\n \"\"\"\n if stat...
[ [ "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
todnewman/pyclasses
[ "94126f92ce49e3b7d5c67656bd28e519fed11579" ]
[ "class_LR.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Tue Dec 15 13:23:53 2020\r\n\r\n@author: rat9289\r\n\"\"\"\r\n\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport statsmodels.api as sm\r\n\r\n\r\nclass Metrics:\r\n \"\"\"\r\n Methods for computing useful regression metrics\r\n \r\n sse: ...
[ [ "numpy.matrix", "matplotlib.pyplot.legend", "numpy.dot", "numpy.amax", "numpy.sqrt", "matplotlib.pyplot.plot", "numpy.mean", "matplotlib.pyplot.figure", "matplotlib.pyplot.title", "numpy.linalg.inv", "numpy.amin", "scipy.stats.probplot", "numpy.array", "matp...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "1.6", "0.14", "1.10", "0.15", "1.4", "1.3", "1.9", "0.19", "1.5", "0.18", "1.2", "1.7", "0.12", "1.0", "0.17", "0.16", "1.8" ...
JiaheZhang/HazDesNet
[ "1f3fed86f21c13e4ba264e728b70b86cf87df710" ]
[ "eval.py" ]
[ "import cv2\nimport numpy as np\nimport scipy.io as scio\nimport pandas as pd\n\nimport model \n\nif __name__ == \"__main__\":\n HazDesNet = model.load_HazDesNet()\n HazDesNet.summary()\n\n y_pred = np.zeros((100, 1))\n\n data = scio.loadmat('./dataset/LIVE_Defogging/gt.mat')\n y_true = data['subject...
[ [ "numpy.expand_dims", "scipy.io.loadmat", "pandas.DataFrame", "numpy.mean", "numpy.zeros" ] ]
[ { "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": [ "1.7", "1.0", "0.10", "1.2", "0.1...
kavenbc/MLExamples
[ "e6e0eb3bf6d8e416e6d13f90b4b9f670d4676e0d" ]
[ "cleandata.py" ]
[ "import os\nfrom os.path import isfile, join\nimport pandas as pd\n\ncol_names = ['id','member_id','loan_amnt','funded_amnt','funded_amnt_inv','term','int_rate','installment',\n 'grade','sub_grade','emp_title','emp_length','home_ownership','annual_inc','verification_status',\n 'issue_d','loa...
[ [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
gyyang/bio-kvm
[ "1db65ec3250879d16b7906edf4833670d170ec9c" ]
[ "models/hopfield.py" ]
[ "\"\"\"Classical and modern Hopfield networks.\"\"\"\nimport os\nimport sys\n\nimport torch\nimport torch.nn as nn\n\nrootpath = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nsys.path.append(rootpath)\n\nclass ClassicHopfieldLayer(nn.Module):\n def __init__( self, input_size, output_size, batch_si...
[ [ "torch.zeros", "torch.sign", "torch.zeros_like", "torch.tensor", "torch.matmul", "torch.nn.init.zeros_", "torch.stack", "torch.clamp" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
niliur/magenta
[ "8e5da380a1cd39d14c5bcbbae0691e7983f833fa" ]
[ "magenta/models/gansynth/lib/train_util.py" ]
[ "# Copyright 2020 The Magenta Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law o...
[ [ "numpy.sqrt", "tensorflow.compat.v1.concat", "tensorflow.compat.v1.random_normal", "numpy.max", "numpy.mean", "tensorflow.compat.v1.train.Saver", "tensorflow.compat.v1.constant", "tensorflow.compat.v1.train.AdamOptimizer", "tensorflow.compat.v1.gfile.ListDirectory", "tensor...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
asabyr/LensTools
[ "e155d6d39361e550906cec00dbbc57686a4bca5c" ]
[ "lenstools/statistics/constraints.py" ]
[ "\"\"\"\n\n.. module:: constraints\n\t:platform: Unix\n\t:synopsis: This module implements the usual statistical tools you need to calculate cosmological parameters confidence intervals\n\n\n.. moduleauthor:: Andrea Petri <apetri@phys.columbia.edu>\n\n\n\"\"\"\n\nfrom __future__ import division,print_function,with_...
[ [ "numpy.dot", "numpy.arctan", "numpy.squeeze", "numpy.zeros_like", "numpy.exp", "numpy.where", "numpy.hstack", "scipy.stats.chi2", "pandas.Index", "numpy.outer", "numpy.zeros", "numpy.isclose", "numpy.linalg.inv", "numpy.atleast_2d", "numpy.linalg.eigh", ...
[ { "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": [] } ]
frehage/AoC-2021
[ "4ab48763a72c24e2ab983ac2263647db03225297" ]
[ "14/solution.py" ]
[ "import pathlib\nimport numpy as np\n\ntest_data = 0\n\noriginal_pattern = \"\"\ninjections = dict()\n\npath = str(pathlib.Path(__file__).parent.resolve())\nwith open(path+\"/data{}.csv\".format(\"_test\" if test_data else \"\"), 'r') as file:\n lines = file.read().splitlines()\n original_pattern = lines[0]\n...
[ [ "numpy.unique" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sametz/secondorder
[ "ad07f003f2045a474312abfe1510a382ae20d3aa" ]
[ "secondorder/initialize.py" ]
[ "\"\"\"\nThis module uses the default WINDNMR spinsystem variables for 3-spin through\n8-spin second-order calculations, plus the default AB quartet variables for \n2-spin calculations, and creates a list of (frequency, J couplings) tuples. \nThe WINDNMR defaults were chosen because they allow secondorder's output ...
[ [ "numpy.array", "scipy.sparse.lil_matrix" ] ]
[ { "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"...
gittripley/incubator-tvm
[ "122a4930f2bf818501d67b755f0cf21c79b85a21" ]
[ "tests/python/relay/test_op_level2.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.ix_", "numpy.maximum", "numpy.pad", "numpy.reshape", "numpy.random.random_integers", "numpy.random.rand", "numpy.random.uniform", "numpy.zeros", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mhu-coder/AsSteroid
[ "56dd2b81bb16c1f081b0b91e3bbb8b29dd587dbd" ]
[ "asteroid/masknn/norms.py" ]
[ "import torch\nfrom torch import nn\nfrom torch.nn.modules.batchnorm import _BatchNorm\n\nEPS = 1e-8\n\n\nclass _LayerNorm(nn.Module):\n \"\"\"Layer Normalization base class.\"\"\"\n def __init__(self, channel_size):\n super(_LayerNorm, self).__init__()\n self.channel_size = channel_size\n ...
[ [ "torch.mean", "torch.ones", "torch.zeros", "torch.arange", "torch.var", "torch.pow" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
vid-nath/w210-capstone
[ "e857d371cc1f57cbf0fcf4a0a5a26b585b862707" ]
[ "recommender_bgguser.py" ]
[ "import json\nimport csv\nimport pandas as pd\nimport turicreate as tc\n'''\nrecommend based on games provided in questionnaire and filter recommended games by questionnaire answers,\ninput: json file get from webhook\noutput: json with game_id and confidence_score \n'''\n\n\ndef recommender_bgguser(dataset):\n ...
[ [ "pandas.merge", "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
almajo/allRank
[ "845c191ed00e112351437c8884cbe5573def9531" ]
[ "allrank/click_models/duplicate_aware.py" ]
[ "from typing import Tuple, Union\n\nimport numpy as np\nimport torch\nfrom scipy.spatial.distance import cdist\n\nfrom allrank.click_models.base import ClickModel\n\n\nclass EverythingButDuplicatesClickModel(ClickModel):\n \"\"\"\n This ClickModel clicks on every document, which was not previously clicked,\n ...
[ [ "numpy.tril_indices", "numpy.triu", "scipy.spatial.distance.cdist", "numpy.fill_diagonal" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "1.6", "0.14", "1.10", "0.15", "1.4", "0.16", "1.9", "0.19", "1.5", "0.18", "1.2", "1.7", "0.12", "1.0", "0.17", "1.3", "1.8" ...
AbhishekSalian/DCGAN
[ "0496b58adf59f79dffaa688b584223172748a4c3" ]
[ "generator.py" ]
[ "import torch\nfrom torch import nn\n\n\nclass Generator(nn.Module):\n\n def __init__(self,\n noise_dim=10,\n img_channels=1,\n hidden_dim=64):\n\n super(Generator, self).__init__()\n self.noise_dim = noise_dim\n\n self.gen = nn.Sequential(\n ...
[ [ "torch.nn.ReLU", "torch.nn.Tanh", "torch.nn.ConvTranspose2d", "torch.nn.BatchNorm2d" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
devangi2000/GAN-Colorizer
[ "79f335dd3d225825f2c2b2873a923797338194cf" ]
[ "dataset.py" ]
[ "# on colab :\r\n\r\n#!pip install fastai --upgrade \r\n# from fastai.data.external import untar_data, URLs\r\n# coco_path = untar_data(URLs.COCO_SAMPLE)\r\n# coco_path = str(coco_path) + \"/train_sample\"\r\n# use_colab = True\r\n\r\nimport os\r\nimport glob\r\nimport time\r\nimport numpy as np\r\nfrom PIL import ...
[ [ "numpy.random.seed", "numpy.random.choice", "torch.utils.data.DataLoader", "matplotlib.pyplot.subplots", "numpy.random.permutation", "torch.cuda.is_available", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
BearerPipelineTest/fairo
[ "a5691de7037a2a62832f986dc0e7369bcb8ad6bb" ]
[ "droidlet/memory/craftassist/mc_memory_nodes.py" ]
[ "\"\"\"\nCopyright (c) Facebook, Inc. and its affiliates.\n\"\"\"\nimport os\n\nimport numpy as np\nimport logging\nfrom collections import Counter\nfrom typing import cast, List, Sequence, Dict\nfrom droidlet.base_util import XYZ, POINT_AT_TARGET, IDM, Block, Look\nfrom droidlet.shared_data_struct.craftassist_shar...
[ [ "numpy.max", "numpy.mean", "numpy.min" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
frankdarkluo/SOLS
[ "cca756d48da5d34f03b09cd1e8e55f65adfaf134" ]
[ "DialogRE/SOLS/evaluate.py" ]
[ "import json\nimport numpy as np\nimport argparse\n\ndef softmax(x):\n return np.exp(x) / np.sum(np.exp(x), axis=0)\n\ndef getresult(fn):\n result = []\n with open(fn, \"r\") as f:\n l = f.readline()\n while l:\n l = l.strip().split()\n for i in range(len(l)):\n ...
[ [ "numpy.asarray", "numpy.exp" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
adverML/adversarial-detection
[ "0173b19a7352a2ec769f24a89d4e2cf8f4423514" ]
[ "expts/generate_samples_custom.py" ]
[ "\"\"\"\nMain script for generating adversarial data (from custom KNN attack) from the cross-validation folds and saving\nthem to numpy files.\n\nExample usage:\npython generate_samples_custom.py -m mnist max-num-adver 1000 --gpu 3 --defense-method proposed --dist-metric cosine --n-jobs 16\npython generate_samples_...
[ [ "numpy.unique", "torch.utils.data.DataLoader", "torch.from_numpy", "sklearn.model_selection.StratifiedKFold", "numpy.save", "numpy.concatenate", "numpy.ceil", "numpy.mean", "torch.cuda.is_available", "torch.device", "numpy.load", "sklearn.model_selection.StratifiedS...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sadimanna/project_euler
[ "fe7907917bb59d186f84f0942629d108fa2a13da" ]
[ "p007.py" ]
[ "import numpy as np\r\nimport time\r\n\r\nif __name__ == '__main__':\r\n\tprimelist = np.array([2])\r\n\tpcount = 1\r\n\tpnum = 1\r\n\tstime = time.time()\r\n\twhile pcount!=10001:\r\n\t\tprimefound = 0\r\n\t\tpnum+=2\r\n\t\tfor i in range(pcount):\r\n\t\t\tif pnum%primelist[i]==0:\r\n\t\t\t\tbreak\r\n\t\t\telif pr...
[ [ "numpy.append", "numpy.array", "numpy.sqrt" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]