repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
possible_versions
list
aeroc7/KittyClass
[ "4f463a398df8bf6dd4fb5aace414de46b9630c17" ]
[ "nn/train.py" ]
[ "import torch\nimport hparams\nimport torch.nn as nn\nimport torch.optim as optim\nimport torchvision.models as models\n\nfrom data import PetData\nfrom torch.utils.data.dataset import random_split\nfrom torch.utils.data.dataloader import DataLoader\nfrom torchvision import transforms\n\n\nclass TrainPetClass():\n ...
[ [ "torch.Generator", "torch.nn.Dropout", "torch.nn.CrossEntropyLoss", "torch.nn.Linear", "torch.no_grad", "torch.cuda.is_available", "torch.utils.data.dataloader.DataLoader" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
pwessels-uhh/sarkas
[ "78fb9f8106ed6b15fb67c22afea09593fed01730" ]
[ "sarkas/potentials/yukawa.py" ]
[ "\"\"\"\nModule for handling Yukawa interaction\n\"\"\"\nimport numpy as np\nfrom numba import njit\nimport math as mt\n\n\n@njit\ndef yukawa_force_pppm(r, pot_matrix):\n \"\"\"\n Calculates Potential and Force between two particles when the P3M algorithm is chosen.\n\n Parameters\n ----------\n r : ...
[ [ "numpy.exp", "numpy.zeros", "numpy.sqrt" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
smartin015/shop_robotics
[ "163cde9af8caf35b776e03a5612107cc327e5f63" ]
[ "sim/rvl/depth_segmentation.py" ]
[ "from numba import cuda\nfrom math import sqrt\nimport numpy as np\nimport cv2\nimport pyrealsense2 as rs\n\nimport jetson.inference\nimport jetson.utils\n\n# Note that column order is height-first\nPX_B = 2\ninput_dim_realsense_reg = (480, 848)\ndim = input_dim_realsense_reg\n\nfrom datetime import datetime\n\ntim...
[ [ "numpy.mean" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
liudaizong/IA-Net
[ "f19295d13d1468eb582521131cde3de83dfd18f6" ]
[ "code/modules_/cross_gate.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\nclass CrossGate(nn.Module):\n def __init__(self, d_model):\n super().__init__()\n self.fc_gate1 = nn.Linear(d_model, d_model, bias=False)\n self.fc_gate2 = nn.Linear(d_model, d_model, bias=False)\n\n def forward(se...
[ [ "torch.nn.Linear" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
viktorErasmusHogeschool/artificial-intelligence
[ "84d97bac83f074b2c16d531e4fc9d917a16cd0ce" ]
[ "cah/python-server/bert_api.py" ]
[ "# Model definition\nimport os\nimport pandas as pd\nimport requests\nimport json\nimport numpy as np\nfrom transformers import *\nfrom transformers import BertTokenizer\nfrom tqdm.notebook import tqdm\nimport nltk\n#nltk.download('punkt')\nfrom nltk.tokenize import sent_tokenize\n\n### Docker command\n# sudo docke...
[ [ "numpy.asarray", "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": [] } ]
Biancolinaa/tf-pose-estimation
[ "58988e0da69af9fe32ecc0c39152b49f0fbe4261" ]
[ "tf_pose/estimator.py" ]
[ "import logging\nimport math\n\nimport slidingwindow as sw\n\nimport cv2\nimport numpy as np\nimport tensorflow as tf\nimport time\n\nfrom tf_pose import common\nfrom tf_pose.common import CocoPart\nfrom tf_pose.tensblur.smoother import Smoother\n# import tensorflow.contrib.tensorrt as trt\n\ntry:\n from tf_pose...
[ [ "tensorflow.import_graph_def", "tensorflow.nn.pool", "tensorflow.gfile.GFile", "tensorflow.equal", "tensorflow.global_variables", "tensorflow.placeholder", "numpy.ndarray", "tensorflow.report_uninitialized_variables", "tensorflow.zeros_like", "numpy.copy", "tensorflow.S...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
wshien90/Federated-Learning-PyTorch
[ "0065c50408eddc82a6051199c1910eea420dadbd" ]
[ "src/federated_main.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Python version: 3.6\n\n\nimport os\nimport copy\nimport time\nimport pickle\nimport numpy as np\nfrom tqdm import tqdm\n\nimport torch\nfrom tensorboardX import SummaryWriter\n\nfrom options import args_parser\nfrom update import LocalUpdate, test_inference\nfrom m...
[ [ "numpy.array", "torch.cuda.set_device" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Baejian/openpilot
[ "5996befaa1493be4155ad03a5caab15ee503e2ef" ]
[ "selfdrive/controls/lib/lateral_planner.py" ]
[ "import math\nimport numpy as np\nfrom common.realtime import sec_since_boot, DT_MDL\nfrom common.numpy_fast import interp\nfrom selfdrive.swaglog import cloudlog\nfrom selfdrive.controls.lib.lateral_mpc_lib.lat_mpc import LateralMpc\nfrom selfdrive.controls.lib.drive_helpers import CONTROL_N, MPC_COST_LAT, LAT_MPC...
[ [ "numpy.abs", "numpy.gradient", "numpy.isnan", "numpy.arange", "numpy.linalg.norm", "numpy.ones", "numpy.mean", "numpy.column_stack", "numpy.array", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
marcpaterno/cluster_toolkit
[ "ee5352d799aa1048cc1d5a1b4e01890be429f94b" ]
[ "tests/test_deltasigma.py" ]
[ "import pytest\nfrom cluster_toolkit import deltasigma as ds\nfrom cluster_toolkit import xi\nfrom os.path import dirname, join\nimport numpy as np\nimport numpy.testing as npt\n\n#Need some test data to use first\nM = 1e14\nc = 5\nOm = 0.3\ntry:\n here = dirname(__file__)\n Rxi = np.loadtxt(here+\"/data_for_...
[ [ "numpy.ones_like", "numpy.logspace", "numpy.testing.assert_array_less", "numpy.copy", "numpy.where", "numpy.loadtxt", "numpy.testing.assert_array_almost_equal" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
isabella232/TensorNetwork
[ "44bbdb47dc7ec4b80b74641e736acc75335ffe2d" ]
[ "tensornetwork/backends/pytorch/pytorch_backend_test.py" ]
[ "import numpy as np\nfrom tensornetwork.backends.pytorch import pytorch_backend\nimport torch\nimport pytest\nfrom unittest.mock import Mock\n\ntorch_dtypes = [torch.float32, torch.float64, torch.int32]\ntorch_eye_dtypes = [torch.float32, torch.float64, torch.int32, torch.int64]\ntorch_randn_dtypes = [torch.float32...
[ [ "numpy.diag", "torch.abs", "torch.ge", "torch.sign", "torch.zeros", "torch.diag_embed", "torch.sum", "torch.le", "torch.allclose", "numpy.trace", "torch.ones", "numpy.reshape", "torch.reshape", "numpy.eye", "numpy.matmul", "torch.eye", "numpy.zer...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
AUT-Data-Group/GTS
[ "5d258643233cd810988b128a0ee7e4f876504641" ]
[ "model/pytorch/cell.py" ]
[ "import numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom lib import utils\ndevice = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n\n\nclass SpatialAttention(nn.Module):\n def __init__(self, num_of_timesteps, num_of_features, num_of_vertices):\n su...
[ [ "torch.max", "torch.cat", "torch.zeros", "torch.sum", "torch.sparse_coo_tensor", "torch.cuda.is_available", "torch.split", "torch.mm", "torch.randn", "torch.reshape", "numpy.lexsort", "torch.nn.functional.sigmoid", "numpy.column_stack", "torch.isinf", "t...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
diego1q2w/lregret
[ "823c7f609559d1012ed52f619b1aa1297d5f2517" ]
[ "datasets/linear/__init__.py" ]
[ "import os\n\nimport pandas as pd\n\n\nfrom regresion.linear.feature import PolFeatures\nfrom regresion.linear.linear import LinearRegression\n\nfrom matplotlib import pyplot as plt\n\n\nclass LinearProblem:\n def __init__(self,\n samples: pd.DataFrame,\n target: pd.Series,\n ...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.scatter", "matplotlib.pyplot.title", "pandas.DataFrame", "matplotlib.pyplot.plot", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
[ { "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": [] } ]
alexarnimueller/smiles-transformer
[ "4584a0bd043d6659a941589677951b2c6823cd2a" ]
[ "torch_transformer.py" ]
[ "import math\nimport time\nimport torch\nimport torch.nn as nn\n\ndevice = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n\n\nclass TransformerModel(nn.Module):\n def __init__(self, ntoken, ninp, nhead, nhid, nlayers, dropout=0.2):\n super(TransformerModel, self).__init__()\n fro...
[ [ "torch.nn.CrossEntropyLoss", "torch.nn.Dropout", "torch.ones", "torch.zeros", "torch.sin", "torch.arange", "torch.nn.Embedding", "torch.tensor", "torch.nn.TransformerEncoderLayer", "torch.nn.Linear", "torch.no_grad", "torch.nn.TransformerEncoder", "torch.cuda.is...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Spencerfar/djin-aging
[ "f6513226e879e6061996d819b4de0e2873860fbc" ]
[ "Plotting_code/plot_network.py" ]
[ "import torch\nimport numpy as np\nimport argparse\nfrom scipy.stats import laplace\n\nfrom pathlib import Path\nimport sys\nfile = Path(__file__). resolve() \npackage_root_directory = file.parents [1] \nsys.path.append(str(package_root_directory))\n\nfrom Model.model import Model\n\nfrom scipy.cluster.hierarchy ...
[ [ "scipy.stats.laplace", "matplotlib.pyplot.tight_layout", "numpy.abs", "torch.load", "numpy.min", "numpy.eye", "matplotlib.pyplot.subplots", "matplotlib.pyplot.get_cmap", "numpy.ones", "matplotlib.pyplot.savefig", "numpy.save", "numpy.max", "matplotlib.pyplot.sub...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
klieret/uproot4
[ "0cce6990b89db0ef7d47fc2857616ab2933c5d03" ]
[ "src/uproot/model.py" ]
[ "# BSD 3-Clause License; see https://github.com/scikit-hep/uproot4/blob/main/LICENSE\n\n\"\"\"\nThis module defines utilities for modeling C++ objects as Python objects and the\n:doc:`uproot.model.Model` class, which is the superclass of all objects that\nare read from ROOT files.\n\nThe :doc:`uproot.model.Versione...
[ [ "numpy.uint32", "numpy.dtype" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
AndresPenuela/SAFE-Notebooks
[ "aea3d07651e464d7cba8356f88387d808e01624b" ]
[ "util/flu/flu_model.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nA simple mathematical description of the spread of a flu in a company is the \nso-called the flu model, which divides the (fixed) population of N individuals \ninto three \"compartments\" which may vary as a function of time, t:\n\nV(t) are those vulnerable but not yet infected wit...
[ [ "numpy.min", "numpy.arange", "scipy.integrate.odeint", "numpy.max", "numpy.array", "numpy.zeros", "numpy.sum" ] ]
[ { "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" ...
zjiayao/ms-2dpnts
[ "986e674ae8945943e927fa61b343ec704f6bc4a6" ]
[ "cluster/plot.py" ]
[ "import matplotlib.pyplot as plt\nimport os\nimport glob\n\nFWD = os.path.dirname(os.path.realpath(__file__))\nOUTPUT = os.path.join(FWD, 'oup')\nMODES = os.path.join(FWD, 'ms_modes')\n\n\ndef plot_data(files, xlabel=r'$x_1$', ylabel=r'$x_2$', headers=None, seps=None, block=False):\n\tfig = plt.figure()\n\tfor i, d...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.scatter", "matplotlib.pyplot.figure", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Sharpiless/Face-recognition-for-classroom-sign-in
[ "fd5d98de07be6646527dfd5e50dddd92b547272e" ]
[ "func/facenet.py" ]
[ "import numpy as np\nimport sys\nimport cv2\nimport os\nimport FaceDetection.TestFace as face_recognition\nfrom FaceDetection.TestFace import face_encodings\n\nfrom PIL import ImageFont\nfrom PIL import Image\nfrom PIL import ImageDraw\nfrom time import localtime\nfontC = ImageFont.truetype('platech.ttf', 16, 0)\n\...
[ [ "numpy.max", "numpy.array", "numpy.argmin", "numpy.min" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
NodLabs/FBGEMM-MLIR
[ "bf13ee1d9b7e2ffd9431c54ed3ae6efd20c9ac8f" ]
[ "fbgemm_gpu/bench/histogram_binning_calibration_benchmark.py" ]
[ "# Copyright (c) Meta Platforms, Inc. and its affiliates.\n# All rights reserved.\n# This source code is licensed under the BSD-style license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport logging\nimport time\nfrom typing import Callable, Tuple\n\nimport click\nimport torch\nfrom...
[ [ "torch.cuda.synchronize", "torch.ops.load_library", "torch.randint", "torch.empty", "torch.ops.fbgemm.histogram_binning_calibration_by_feature", "torch.cuda.Event", "torch.sum", "torch.rand", "torch.cuda.is_available", "torch.arange", "torch.ops.fbgemm.generic_histogram...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
liaison/cs231n
[ "2d48724d94a06006f067ce72d4a2e7881f7194d8" ]
[ "spring1617_assignment1/cs231n/classifiers/linear_classifier.py" ]
[ "from __future__ import print_function\n\nimport numpy as np\nfrom cs231n.classifiers.linear_svm import *\nfrom cs231n.classifiers.softmax import *\nfrom past.builtins import xrange\n\n\nclass LinearClassifier(object):\n \"\"\"\n Reference: http://cs231n.github.io/neural-networks-3/\n \"\"\"\n\n def __init_...
[ [ "numpy.max", "numpy.dot", "numpy.zeros", "numpy.random.randn" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
kwinkunks/welleng
[ "d0669b9b5164671ff4861a4efd33666c3fc9758f" ]
[ "examples/connect_two_random_points.py" ]
[ "import welleng as we\nimport numpy as np\nfrom vedo import Arrows, Lines\nimport random\n\n# Some code for testing the connector module.\n\n# Generate some random pairs of points\npos1 = [0,0,0]\nmd1 = 0\n\npos2 = np.random.random(3) * 1000\n\nvec1 = np.random.random(3)\nvec1 /= np.linalg.norm(vec1)\ninc1, azi1 = ...
[ [ "numpy.concatenate", "numpy.array", "numpy.random.random", "numpy.linalg.norm" ] ]
[ { "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": [], ...
BastianZim/thewalrus
[ "28cba83b457fc068861c542f0e86d8c9d198b60b" ]
[ "thewalrus/tests/test_hermite_multidimensional.py" ]
[ "# Copyright 2019 Xanadu Quantum Technologies Inc.\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 applica...
[ [ "numpy.allclose", "numpy.sqrt", "numpy.arange", "scipy.special.eval_hermitenorm", "numpy.ones", "scipy.special.eval_hermite", "numpy.block", "numpy.random.rand", "numpy.array", "numpy.zeros", "numpy.random.randint" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
SilvioGiancola/SoccerNetv2-DevK
[ "fb078911573409f48b85ee854dc8f09f432ee3a6", "fb078911573409f48b85ee854dc8f09f432ee3a6", "fb078911573409f48b85ee854dc8f09f432ee3a6", "fb078911573409f48b85ee854dc8f09f432ee3a6" ]
[ "Task2-CameraShotSegmentation/CALF-detection/src/main.py", "Task1-ActionSpotting/CALF/src/dataset.py", "Task1-ActionSpotting/Pooling/src/train.py", "Task1-ActionSpotting/TemporallyAwarePooling/src/dataset.py" ]
[ "import os\nimport logging\nfrom datetime import datetime\nimport time\nimport numpy as np\nfrom argparse import ArgumentParser, ArgumentDefaultsHelpFormatter\n\nimport torch\n\nfrom dataset import SoccerNet, SoccerNetClips, SoccerNetClipsTesting\nfrom model import Model\nfrom train import trainer, test\nfrom loss ...
[ [ "torch.optim.lr_scheduler.ReduceLROnPlateau", "numpy.random.seed", "torch.load", "torch.manual_seed", "torch.utils.data.DataLoader" ], [ "numpy.arange", "torch.from_numpy", "numpy.ceil", "torch.arange", "torch.stack", "numpy.array", "numpy.zeros", "numpy.ran...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { ...
yiyin/neurodriver
[ "34e6874a1cf35633cda1191920cbaeac5d25dc9b", "34e6874a1cf35633cda1191920cbaeac5d25dc9b", "34e6874a1cf35633cda1191920cbaeac5d25dc9b" ]
[ "neurokernel/LPU/LPU.py", "neurokernel/LPU/NDComponents/SynapseModels/BaseSynapseModel.py", "neurokernel/LPU/utils/visualizer.py" ]
[ "#!/usr/bin/env python\n\n\"\"\"\nLocal Processing Unit (LPU) with plugin support for various neuron/synapse models.\n\"\"\"\nimport time\nimport collections\nimport numbers\nimport copy\nimport itertools\n\nfrom future.utils import iteritems\nfrom past.builtins import long\nfrom builtins import zip\n\n\nimport pyc...
[ [ "numpy.argsort", "numpy.array", "numpy.cumsum" ], [ "numpy.double", "numpy.dtype" ], [ "numpy.sqrt", "numpy.linspace", "numpy.asarray", "matplotlib.colors.hsv_to_rgb", "numpy.arctan2", "numpy.max", "scipy.interpolate.griddata", "matplotlib.pyplot.tight_l...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "1.7", "1.0", "0...
cyqian97/FlirCamBeamFitter
[ "5ff7c2e0ad42b72f358c69b052b649017b8d7e5b" ]
[ "fitgauss.py" ]
[ "import numpy as np\nimport time\nfrom scipy import optimize\n\n\nclass Parameter:\n def __init__(self, value):\n self.value = value\n\n def set(self, value):\n self.value = value\n\n def __call__(self):\n return self.value\n\n\ndef fit(function, parameters, y, x=None):\n def f(para...
[ [ "numpy.sqrt", "numpy.array_equal", "numpy.arange", "numpy.cos", "numpy.sin", "scipy.optimize.leastsq", "numpy.random.rand", "numpy.exp", "matplotlib.pyplot.show", "numpy.sum", "matplotlib.pyplot.figure" ] ]
[ { "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"...
datarobot-community/mlops-pipeline
[ "dbb717f9b805dda6933912daa80d427db350e1a5" ]
[ "model.py" ]
[ "import pickle\nfrom sklearn import datasets\niris=datasets.load_iris()\nx=iris.data\ny=iris.target\n\n#labels for iris dataset\nlabels ={\n 0: \"setosa\",\n 1: \"versicolor\",\n 2: \"virginica\"\n}\n\n#split the data set\nfrom sklearn.model_selection import train_test_split\nx_train,x_test,y_train,y_test=trai...
[ [ "sklearn.tree.DecisionTreeClassifier", "sklearn.datasets.load_iris", "sklearn.model_selection.train_test_split" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
xihuiwu/ProbabilisticRRT
[ "a8e9329a1669e94b0e6ac9990b765ad4ee249309" ]
[ "car.py" ]
[ "import numpy as np\r\nimport math\r\n\r\n# Number of circle centers are odd numbers, i.e., 1 or 3\r\n# state is 4x1 vector\r\n# centers is nx2 matrix\r\nclass Car():\r\n\tdef __init__(self,state,n,radius,dist,u_prev):\r\n\t\tif state.shape[0] == 1:\r\n\t\t\tself.state = np.squeeze(np.transpose(state))\r\n\t\telse:...
[ [ "numpy.squeeze", "numpy.array", "numpy.empty", "numpy.transpose" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
JiaXiu01/AlgoGraphs_Dev
[ "12c394119779baa84da432cfaffa900e96126d48" ]
[ "backend/bipartite.py" ]
[ "import networkx as nx\nimport matplotlib.pyplot as plt\nimport random\n\ndef bipartite(numNodes):\n\n odds=[]\n evens=[]\n colours=[]\n\n for i in range(1,numNodes+1,2):\n odds.append(i)\n colours.append('red')\n \n \n for i in range(2,numNodes+1,2):\n evens.ap...
[ [ "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ZijianDu/Neuromophic-classifier-design
[ "293933bfce397013c76e2e2d0ec1a9f6f9ebd752" ]
[ "ClaveClassification.py" ]
[ "from __future__ import print_function\r\n\r\nimport numpy as np\r\nimport csv\r\n\r\n# specifying the gpu to use\r\n# import theano.sandbox.cuda\r\n# theano.sandbox.cuda.use('gpu1')\r\n\r\nimport pickle\r\nimport lasagne\r\n\r\nimport theano\r\nimport theano.tensor as T\r\nimport binary_net, Q2b_net, Q3b_net, Q4b_...
[ [ "numpy.hstack", "numpy.random.seed", "numpy.eye", "numpy.savetxt", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
YJiangcm/Chinese-sentence-pair-modeling
[ "90adbc5c121832ce3e4a4057e30417a6ec5e7ebc" ]
[ "Models/BERTs/run_Roberta_model.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sun Oct 25 00:19:30 2020\n\n@author: 31906\n\"\"\"\nimport os\nimport math\nimport pandas as pd\nimport torch\nfrom torch.utils.data import DataLoader\nfrom transformers import get_linear_schedule_with_warmup\nfrom transformers.optimization import AdamW\nfrom sys import ...
[ [ "torch.device", "torch.utils.data.DataLoader", "pandas.DataFrame", "torch.load" ] ]
[ { "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": [] } ]
J-L-O/DTC
[ "6851a38f296ea1689689aa510f5b03106acacc51" ]
[ "modules/prototypical_loss.py" ]
[ "# coding=utf-8\nimport torch\nfrom torch.nn import functional as F\nfrom torch.nn.modules import Module\n\n\nclass PrototypicalLoss(Module):\n '''\n Loss class deriving from Module for the prototypical loss function defined below\n '''\n\n def __init__(self, n_support):\n super(PrototypicalLoss,...
[ [ "torch.nn.functional.normalize", "torch.Tensor", "torch.nn.functional.log_softmax", "torch.randn", "numpy.eye", "torch.from_numpy", "numpy.ones", "torch.unique", "numpy.argmin", "torch.arange", "torch.pow" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
vladiant/ObjectDetectSamples
[ "ac82d0d8284f6fdbcebf1ff429d2aec18cf03fb0", "ac82d0d8284f6fdbcebf1ff429d2aec18cf03fb0", "ac82d0d8284f6fdbcebf1ff429d2aec18cf03fb0" ]
[ "BagOfWords/Python/Detection/bag_of_words_evaluate.py", "HistogramOfGradients/Basic/Python/hog_evaluate.py", "CategoricalRCNN/predict_airplanes_categorical.py" ]
[ "# https://github.com/1297rohit/RCNN\n# https://github.com/bikz05/bag-of-words\n# https://docs.opencv.org/4.4.0/d1/d73/tutorial_introduction_to_svm.html\n# https://docs.opencv.org/4.4.0/d1/d5c/tutorial_py_kmeans_opencv.html\n\n\nimport os\nimport cv2\nimport joblib\n\nimport pandas as pd\n\nimport numpy as np\n\nan...
[ [ "numpy.vstack", "numpy.array", "numpy.zeros", "numpy.random.seed" ], [ "numpy.hstack", "numpy.random.seed", "numpy.int32", "numpy.float32", "numpy.array" ], [ "tensorflow.keras.models.load_model", "tensorflow.nn.softmax", "numpy.expand_dims", "numpy.maxi...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10"...
slacgismo/pge-baseline-study
[ "a521b091a23d25742a4e29c43fbfc8d2492e2b43" ]
[ "baseline/deliverable_create.py" ]
[ "import global_vars\nglobal_vars.init()\nif global_vars.GRAPHFLAG > 0:\n from graph_functions import *\n from error_graphs import *\n\nimport mysql.connector\nfrom deliverable_functions import *\nfrom data_get import *\nimport pandas as pd \nimport sqlalchemy\nimport numpy as np\nimport time\nfrom ran...
[ [ "numpy.add", "numpy.array", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
k-dominik/plant-seg
[ "2d77e067e0092e57527f279e83e9d4a7dbdbaf2a" ]
[ "plantseg/predictions/predict.py" ]
[ "import importlib\nimport os\nimport time\n\nimport h5py\nimport torch\nfrom pytorch3dunet.datasets.utils import get_test_loaders\nfrom pytorch3dunet.unet3d import utils\nfrom pytorch3dunet.unet3d.model import get_model\nfrom plantseg.pipeline import gui_logger\nfrom plantseg.predictions.utils import create_predict...
[ [ "torch.cuda.empty_cache", "torch.cuda.is_available" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
SteshinSS/serotonin-affinity
[ "accc2046b51259254513b0180c382ca431bb1c24" ]
[ "utils/utils.py" ]
[ "import os\nfrom pathlib import Path\n\nimport numpy as np\nimport pytorch_lightning as pl\n\n\ndef change_directory_to_repo():\n \"\"\"Changes working directory to the repository root folder.\"\"\"\n current_dir = Path.cwd()\n for parent in current_dir.parents:\n # Repository is the first folder wi...
[ [ "numpy.random.RandomState" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
camilo7100/cosas_de_github
[ "5c2bcc1b69569edb0117e6b4bb0a77f347d364a6" ]
[ "hw09/grafico.py" ]
[ "import matplotlib\nimport matplotlib.pyplot as plt\n\nlist_t = []\nlist_h = []\n\n#Se tiene que separar la coma.\nwith open(\"datos.txt\", \"rt\") as data:\n for i in data:\n value = i.split(',')\n \n list_t.append(float(value[0]))\n list_h.append(float(value[1].rstrip('\\n')))\n ...
[ [ "matplotlib.pyplot.plot", "matplotlib.pyplot.savefig", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
PraveenVenugopal/autokeras
[ "3ee8737fa400647b93f6203dce63eb2bb310d10b" ]
[ "autokeras/supervised.py" ]
[ "import os\nfrom abc import ABC, abstractmethod\nfrom sklearn.model_selection import train_test_split\nimport torch\nimport numpy as np\nfrom functools import reduce\n\nfrom autokeras.constant import Constant\nfrom autokeras.net_module import CnnModule\nfrom autokeras.search import BayesianSearcher, train\nfrom aut...
[ [ "numpy.concatenate", "torch.no_grad", "sklearn.model_selection.train_test_split" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
poodarchu/sscls
[ "8b1bd94b1ef4f0cef3ec6ecbb48be9dab129687b" ]
[ "sscls/datasets/imagenet.py" ]
[ "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\n\"\"\"ImageNet dataset.\"\"\"\n\nimport cv2\nimport numpy as np\nimport os\nimport re\nimport torch\nimpor...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sparks-baird/matbench
[ "4424609454286e32fff2bcc724379b2a316c5a76", "7d11a2d63766339ec00e610e2255be29b81544d3" ]
[ "scripts/mvb01_generate_validation.py", "matbench/tests/test_task.py" ]
[ "import pandas as pd\nfrom monty.serialization import dumpfn\nfrom sklearn.model_selection import KFold, StratifiedKFold\n\nfrom matbench.constants import (\n CLF_KEY,\n REG_KEY,\n TEST_KEY,\n TRAIN_KEY,\n VALIDATION_METADATA_KEY,\n VALIDATION_SPLIT_KEY,\n)\nfrom matbench.data_ops import load\nfro...
[ [ "sklearn.model_selection.StratifiedKFold", "pandas.set_option", "sklearn.model_selection.KFold" ], [ "numpy.floor", "pandas.concat", "pandas.DataFrame", "numpy.ceil" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "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", "...
ArturOle/TypingTrainerGUI
[ "8dcfc451ffe3aceae6760cafd4a1040f088c7c8a" ]
[ "HighscoresPanel.py" ]
[ "import wx\nimport pandas as pd\n\n\nclass HighscoresPanel(wx.Panel):\n def __init__(self, parent):\n super().__init__(parent=parent)\n self.parent = parent\n self.SetClientSize(self.parent.Size)\n self.v_box = wx.BoxSizer(wx.VERTICAL)\n self.grid_sizer = wx.GridSizer(6, 4, 3, ...
[ [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
Loquats/hyperopt
[ "6c5b33be93a71a4ae6a38f04a29b18020b78b702" ]
[ "hyperopt/tests/unit/test_tpe.py" ]
[ "from past.utils import old_div\nfrom functools import partial\nimport os\nimport unittest\n\nimport nose\n\nimport numpy as np\n\ntry:\n import matplotlib.pyplot as plt\nexcept ImportError:\n pass\n\nfrom hyperopt import pyll\nfrom hyperopt.pyll import scope\n\nfrom hyperopt import Trials\n\nfrom hyperopt.ba...
[ [ "matplotlib.pyplot.legend", "numpy.sqrt", "numpy.all", "numpy.seterr", "matplotlib.pyplot.plot", "numpy.max", "numpy.mean", "numpy.var", "numpy.exp", "numpy.random.default_rng", "numpy.arange", "numpy.std", "matplotlib.pyplot.subplot", "numpy.random.PCG64", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
lx10077/dqnpy
[ "2aee374bb5945ebd31b2e7792f41c6cf03e3ff42" ]
[ "config/median_dqn/util.py" ]
[ "import torch\nimport os\nimport numpy as np\n\n\nUSE_CUDA = torch.cuda.is_available()\nFLOAT = torch.cuda.FloatTensor if USE_CUDA else torch.FloatTensor\nDOUBLE = torch.cuda.DoubleTensor if USE_CUDA else torch.DoubleTensor\nLONG = torch.cuda.LongTensor if USE_CUDA else torch.LongTensor\n\nTYPE_LIST = {\"FLOAT\": (...
[ [ "torch.from_numpy", "torch.cuda.is_available" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Aliossandro/WDOntoHistory
[ "d9b9abd73a037abab25e36a990bf1d2be8e54ed5" ]
[ "userframes_last_b.py" ]
[ "import pandas as pd\nimport psycopg2\nimport pickle\nimport numpy as np\n# counterS = 0\n# global counterS\n# global valGlob\n# from sqlalchemy import create_engine\n\n# -*- coding: utf-8 -*-\nimport os\nimport sys\nimport copy\n\n# fileName = '/Users/alessandro/Documents/PhD/OntoHistory/WDTaxo_October2014.csv'\n\...
[ [ "pandas.read_sql", "numpy.load", "pandas.to_datetime", "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": [] } ]
upura/vivid
[ "6139697d60656d4774aceae880f5a07d929124a8" ]
[ "samples/ensumble.py" ]
[ "import pandas as pd\nfrom sklearn.datasets import load_boston\n\nfrom vivid.core import AbstractFeature\nfrom vivid.metrics import regression_metrics\nfrom vivid.out_of_fold.base import EnsembleFeature\nfrom vivid.out_of_fold.boosting import XGBoostRegressorOutOfFold, LGBMRegressorOutOfFold\nfrom vivid.out_of_fold...
[ [ "pandas.concat", "pandas.DataFrame", "sklearn.datasets.load_boston" ] ]
[ { "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": [] } ]
admdev8/probnum
[ "792b6299bac247cf8b1b5056756f0f078855d83a", "792b6299bac247cf8b1b5056756f0f078855d83a" ]
[ "src/probnum/utils/arrayutils.py", "src/probnum/filtsmooth/gaussfiltsmooth/kalman.py" ]
[ "\"\"\"Utility functions for arrays and the like.\"\"\"\n\nimport numpy as np\nimport scipy.sparse\n\nimport probnum\n\n__all__ = [\n \"atleast_1d\",\n \"atleast_2d\",\n \"as_colvec\",\n \"assert_is_1d_ndarray\",\n \"assert_is_2d_ndarray\",\n]\n\n\ndef atleast_1d(*rvs):\n \"\"\"\n Convert array...
[ [ "numpy.atleast_1d", "numpy.atleast_2d" ], [ "numpy.eye", "numpy.isscalar", "numpy.ones" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
filibp/thesis
[ "d970385bcb645b58e678cb3594a2e0cb461187e9" ]
[ "mnist/model.py" ]
[ "import numpy as np\nimport torch.nn as nn\n\n\n\"\"\"\nThe code is:\nCopyright (c) 2018 Erik Linder-Norén\nLicensed under MIT\n(https://github.com/eriklindernoren/PyTorch-GAN/blob/master/LICENSE)\n\"\"\"\n\n\nclass Generator(nn.Module):\n def __init__(self, opt):\n super().__init__()\n self.img_sh...
[ [ "torch.nn.BatchNorm1d", "torch.nn.Tanh", "torch.nn.Linear", "torch.nn.LeakyReLU", "numpy.prod" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Roboy/ss18_hand
[ "3a4b3524fe653478c8a31e62b593708fdeebef70" ]
[ "src/roboy_hand/gesture_recognition/old/real_dataset/data_utils.py" ]
[ "import numpy as np\nfrom skimage import io\nimport matplotlib.pyplot as plt\nfrom scipy.ndimage.interpolation import rotate\n\n'''Data normalization with substracting mean\n and dividing by standard deviation'''\ndef normalize(data):\n mean = np.mean(data)\n std = np.std(data)\n normalized_data = (data ...
[ [ "numpy.min", "numpy.fliplr", "numpy.flipud", "numpy.max", "numpy.std", "scipy.ndimage.interpolation.rotate", "numpy.mean" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "1.6", "0.14", "0.15", "1.4", "0.16", "1.0", "0.19", "1.5", "0.18", "1.2", "1.7", "0.12", "0.10", "0.17", "1.3" ], "tensorflow": [...
2362696606/pynvme
[ "5cc958bcda63e7468187f11413ba5f787565d628" ]
[ "scripts/test_examples.py" ]
[ "import time\nimport pytest\nimport logging\n\nimport nvme as d\n\n\n# intuitive, spec, qpair, vscode, debug, cmdlog, assert\ndef test_hello_world(nvme0, nvme0n1, qpair):\n # prepare data buffer and IO queue\n read_buf = d.Buffer(512)\n write_buf = d.Buffer(512)\n write_buf[10:21] = b'hello world'\n\n ...
[ [ "matplotlib.pyplot.plot", "matplotlib.pyplot.xscale", "matplotlib.pyplot.yscale" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
PacktPublishing/Practical-Machine-Learning
[ "7f33295766aa494a48e235db10af9897c7851fde" ]
[ "python-sckit-learn/Chapter09/naivebayesexample/feature-selection.py" ]
[ "# Practical Machine learning\n# Bayesian learning - Naive Bayes example \n# Chapter 9\n\nfrom datatypes import Dataset\n\nfrom sklearn.feature_selection import SelectKBest, f_classif\nfrom sklearn.lda import LDA\nfrom sklearn.qda import QDA\nfrom sklearn.decomposition import PCA\n\ndef univariate_feature_selection...
[ [ "sklearn.feature_selection.SelectKBest", "sklearn.lda.LDA", "sklearn.decomposition.PCA" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ololobus/DeepPavlov
[ "14615e65001b401354a43d780cb0b29e071515b6" ]
[ "deeppavlov/metrics/fmeasure.py" ]
[ "# Copyright 2017 Neural Networks and Deep Learning lab, MIPT\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requi...
[ [ "sklearn.metrics.f1_score" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
lxrobot/object_detection_task
[ "bc52c11a31b2691cebb61a0b98d9b884d0920b99" ]
[ "cv_examples/main.py" ]
[ "# -*- coding:utf-8 -*-\n\nimport cv2\nimport os\nfrom matplotlib import pyplot as plt\nimport numpy as np\n\nimg_name = os.path.join(\"imgs\",\"liu_1.png\")\nimg = cv2.imread(img_name, cv2.IMREAD_COLOR)\nimg_blue = img[:,:,0]\nimg_green = img[:,:,1]\nimg_red= img[:,:,2]\ncv2.imshow(\"img_blue\",img_blue)\ncv2.wait...
[ [ "matplotlib.pyplot.imshow", "matplotlib.pyplot.subplot", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
usnistgov/STVMResearch
[ "fd8cc147174c15ac85b3e25e911cda02bf7b8ac7" ]
[ "models/model_{3,4}/bert_helpers/bert_functions.py" ]
[ "import numpy as np\nimport pandas as pd\nimport tensorflow as tf\nimport tensorflow_hub as hub\nfrom tensorflow.keras.layers import Input, Dense, Dropout\nfrom tensorflow.keras.models import Model\nfrom tensorflow.keras.optimizers import Adam\nimport bert\nfrom tqdm import tqdm\nimport sys\n\nfrom sklearn.model_s...
[ [ "tensorflow.keras.models.load_model", "tensorflow.keras.models.Model", "numpy.asarray", "tensorflow.keras.layers.Dense", "sklearn.model_selection.KFold", "tensorflow.keras.optimizers.Adam", "tensorflow.keras.layers.Dropout", "tensorflow.keras.layers.Input" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "2.7", "2.6", "2.4", "2.3", "2.5", "2.2" ] } ]
BigHat-Biosciences/AbNumber
[ "86f2033b4e7d9a2e9ad0e3a7cff9d59d83259bcd" ]
[ "abnumber/chain.py" ]
[ "from collections import OrderedDict\nfrom typing import Union, List, Generator, Tuple\nfrom Bio import SeqIO\nfrom Bio.SeqRecord import SeqRecord\nimport pandas as pd\n\nfrom abnumber.alignment import Alignment\nfrom abnumber.common import (\n _anarci_align,\n _validate_chain_type,\n SUPPORTED_SCHEMES,\n ...
[ [ "pandas.isna", "pandas.read_csv", "pandas.Series", "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
ShengmiaoJ/uwo-pa-python-course
[ "7890701b63cbdd56deb2fbb7845724ad9809a220" ]
[ "Lecture 9/L9_lecture.py" ]
[ "from __future__ import print_function, division\n\n### Multiprocessing and parallelization\n# See file: PyDomanParallelizer.py\n\n###\n\n\n#########################################\n\n### Exceptions ###\n\n\n# Let's cause some errors just for fun, and see what happens:\n\n# # Zero division:\n# print(5/0)\n\n# # A...
[ [ "numpy.random.random", "numpy.sqrt", "numpy.hypot" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
taesung89/deeplab-pytorch
[ "25db353d10a256f1f9e89675a21f6e59af9407e6" ]
[ "eval.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n#\n# Author: Kazuto Nakashima\n# URL: http://kazuto1011.github.io\n# Created: 2017-11-03\n\n\n\nimport json\nimport os.path as osp\n\nimport click\nimport cv2\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport yaml\nfrom...
[ [ "torch.nn.functional.upsample", "torch.nn.functional.softmax", "torch.cuda.current_device", "torch.load", "torch.utils.data.DataLoader", "numpy.argmax", "torch.cuda.is_available", "torch.cuda.get_device_name", "torch.nn.DataParallel", "numpy.zeros", "torch.autograd.Vari...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
abhinav4192/sparce-subspace-clustering-python
[ "2c0c4b8bbc87e8b856fc993d0aefd63ada106840" ]
[ "BuildAdjacency.py" ]
[ "# This function takes a NxN coefficient matrix and returns a NxN adjacency\n# matrix by choosing only the K strongest connections in the similarity graph\n# CMat: NxN coefficient matrix\n# K: number of strongest edges to keep; if K=0 use all the coefficients\n# CKSym: NxN symmetric adjacency matrix\n\n\nimport num...
[ [ "numpy.argsort", "numpy.add", "numpy.absolute", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
nemodleo/HCFlow
[ "10deed6f8f719e72cf1c3cad486198b8a506c805" ]
[ "codes/data/GTLQ_dataset.py" ]
[ "import random\nimport numpy as np\nimport cv2\nimport lmdb\nimport torch\nimport torch.utils.data as data\nimport data.util as util\nimport sys\nimport os\n\ntry:\n sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))\n from data.util import imresize_np\n from utils import util as ...
[ [ "numpy.pad", "numpy.transpose" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sepehrsaryazdi/cpsvis
[ "fe57797091a9bf5c116da9827a19cf7e48b45e98" ]
[ "visualise/surface_vis.py" ]
[ "from mpl_toolkits.mplot3d import Axes3D\nimport numpy as np\nfrom mpl_toolkits.mplot3d.art3d import Poly3DCollection\nimport matplotlib.pyplot as plt\n\nclass SurfaceVisual:\n def __init__(self, surface):\n self.surface = surface\n self.fig = None\n self.ax = None\n def show_vis_3d(self)...
[ [ "numpy.array", "matplotlib.pyplot.show", "numpy.linalg.norm", "matplotlib.pyplot.figure" ] ]
[ { "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": [], ...
kylemin/wtalc-pytorch
[ "f54a0064962faaa54662347f9f0f312ebd12b863" ]
[ "main.py" ]
[ "from __future__ import print_function\nimport argparse\nimport os\nimport torch\nfrom model import Model\nfrom video_dataset import Dataset\nfrom test import test\nfrom train import train\n#from logger import Logger\nfrom torch.utils.tensorboard import SummaryWriter as Logger\nimport options\ntorch.set_default_ten...
[ [ "torch.set_default_tensor_type", "numpy.random.seed", "torch.load", "torch.manual_seed", "torch.utils.tensorboard.SummaryWriter", "torch.cuda.is_available", "torch.device" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
CisneirosRaphael/ross_c
[ "0c2176522d8cd4c36013c2bb02466a8139a3a513" ]
[ "ross/bearing_seal_element.py" ]
[ "\"\"\"Bearing Element module.\n\nThis module defines the BearingElement classes which will be used to represent the rotor\nbearings and seals. There are 7 different classes to represent bearings options,\nand 2 element options with 8 or 12 degrees of freedom.\n\"\"\"\n# fmt: off\nimport os\nimport warnings\n\nimpo...
[ [ "numpy.hstack", "scipy.interpolate.UnivariateSpline", "numpy.allclose", "numpy.linspace", "numpy.cos", "scipy.interpolate.interp1d", "numpy.insert", "numpy.isscalar", "numpy.array", "numpy.divide" ] ]
[ { "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" ...
ziatdinovmax/e2cnn
[ "e486a0d2cec71f2bde2d61f2f1315922f2883cee", "e486a0d2cec71f2bde2d61f2f1315922f2883cee" ]
[ "e2cnn/nn/modules/r2_conv/basisexpansion_blocks.py", "e2cnn/nn/modules/nonlinearities/norm.py" ]
[ "from e2cnn.kernels import KernelBasis, EmptyBasisException\nfrom e2cnn.gspaces import *\nfrom e2cnn.nn import FieldType\nfrom .. import utils\n\nfrom .basisexpansion import BasisExpansion\nfrom .basisexpansion_singleblock import block_basisexpansion\n\nfrom collections import defaultdict\n\nfrom typing import Call...
[ [ "torch.LongTensor", "torch.meshgrid", "torch.zeros" ], [ "torch.LongTensor", "torch.empty_like", "torch.max", "numpy.abs", "torch.randn", "torch.tensor", "torch.exp", "torch.allclose" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
DPaletti/dovado
[ "1627f78056ba6fd0b663581b2dea46f96d393418" ]
[ "src/dovado_rtl/genetic_algorithm.py" ]
[ "from typing import List, Tuple, Optional\nfrom collections import OrderedDict\n\nfrom pymoo.model.callback import Callback\nfrom pymoo.model.problem import Problem\nfrom pymoo.algorithms.nsga2 import NSGA2\nfrom pymoo.factory import (\n get_sampling,\n get_crossover,\n get_mutation,\n get_termination,\...
[ [ "numpy.savetxt", "numpy.random.random", "numpy.column_stack" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
opemipoVRB/MeterTracker
[ "3c52e704844628db31b72d008983b6c090266775" ]
[ "threemegawatt/monitor/bulk_insert.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\n←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←\n←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←\n↓↓...........................................................................↓↓\n↓↓...............
[ [ "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": [] } ]
aaronbjohnson/Project-Estimator
[ "95b4af6ed123beaeb36274e3e6b89a63557f2eeb" ]
[ "utilities.py" ]
[ "from sklearn.preprocessing import LabelEncoder\nimport os\n\ndef remove_column(dataset, column):\n \"\"\"\n This will delete a column from a dataset.\n Column needs to be a string\n \"\"\"\n del dataset[column]\n return\n\ndef label_encode(dataset, column):\n \"\"\"\n This will encode a bin...
[ [ "sklearn.preprocessing.LabelEncoder" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
daviguima/deep-learning
[ "28f772890edef1738045b0fb125c782e5c22cb8e" ]
[ "satellite/plots/visualize.py" ]
[ "import numpy as np\nimport logging\nimport matplotlib.pyplot as plt\n\nfrom sklearn.metrics import classification_report, confusion_matrix\n\n\nclass Visualize:\n def __init__(self):\n pass\n\n def plot_loss(self, model, epochs):\n \"\"\"\n Plot loss values regargin model and its epochs\...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "matplotlib.pyplot.ylim", "matplotlib.pyplot.subplots", "sklearn.metrics.confusion_matrix", "matplotlib.pyplot.plot", "numpy.argmax", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
felixdivo/tslearn
[ "e78ba4b0594acf3b3a901054e941d2dcea57975c" ]
[ "tslearn/tests/test_serialize_models.py" ]
[ "import os\nfrom glob import glob\nimport numpy\nimport pytest\nfrom sklearn.exceptions import NotFittedError\nfrom tslearn import hdftools\nfrom tslearn.preprocessing import TimeSeriesScalerMeanVariance\n\nfrom tslearn.neighbors import KNeighborsTimeSeries, \\\n KNeighborsTimeSeriesClassifier\nfrom tslearn.shap...
[ [ "numpy.testing.assert_equal", "numpy.random.seed", "numpy.dtype", "numpy.random.rand", "numpy.random.RandomState" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ratishsp/data2text-seq-plan-py
[ "16b5242903371280cae8d23ad5a2472d539ea744" ]
[ "onmt/inputters/dataset_base.py" ]
[ "# coding: utf-8\n\nfrom itertools import chain, starmap\nfrom collections import Counter\n\nimport torch\nfrom torchtext.data import Dataset as TorchtextDataset\nfrom torchtext.data import Example\nfrom torchtext.vocab import Vocab\n\n\ndef _join_dicts(*args):\n \"\"\"\n Args:\n dictionaries with disj...
[ [ "torch.LongTensor", "torch.save" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
SkyGraceHa/openpilot
[ "5f249d413918edda51b196d5bad1deb9a474b518" ]
[ "selfdrive/mapd/mapd.py" ]
[ "#!/usr/bin/env python3\nimport threading\nfrom traceback import print_exception\nimport numpy as np\nfrom time import strftime, gmtime\nimport cereal.messaging as messaging\nfrom common.realtime import Ratekeeper\nfrom selfdrive.mapd.lib.osm import OSM\nfrom selfdrive.mapd.lib.geo import distance_to_points\nfrom s...
[ [ "numpy.array", "numpy.radians" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
slapshin/TalkNet_ASD
[ "343fac5c8d2bef2b98244e3acf20ac322711a4c7" ]
[ "trainTalkNet.py" ]
[ "import time, os, torch, argparse, warnings, glob\r\n\r\nfrom dataLoader import train_loader, val_loader\r\nfrom utils.tools import *\r\nfrom talkNet import talkNet\r\n\r\ndef main():\r\n # The structure of this code is learnt from https://github.com/clovaai/voxceleb_trainer\r\n warnings.filterwarnings(\"igno...
[ [ "torch.utils.data.DataLoader" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
IMAGINE-Paris/dti-clustering
[ "e3b4d29bf745036eadb20b26f86cf1f0ffa09f67", "e3b4d29bf745036eadb20b26f86cf1f0ffa09f67" ]
[ "src/model/transformer.py", "src/model/mini_resnet.py" ]
[ "from abc import ABCMeta, abstractmethod\nfrom copy import deepcopy\n\nfrom kornia import homography_warp\nimport numpy as np\nimport torch\nfrom torch import nn\nfrom torch.nn import functional as F\nfrom torch.optim import Adam\n\nfrom .mini_resnet import get_resnet_model as get_mini_resnet_model\nfrom .resnet im...
[ [ "torch.cat", "torch.zeros", "numpy.asarray", "torch.no_grad", "torch.split", "torch.einsum", "torch.eye", "torch.inverse", "torch.nn.Sequential", "torch.linspace", "torch.sigmoid", "torch.full", "torch.nn.ModuleList", "torch.exp", "torch.nn.Linear", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
gregmacfarlane/populationsim
[ "347e22ea6e264175346029d91770b3d356fba332" ]
[ "populationsim/steps/integerize_final_seed_weights.py" ]
[ "from __future__ import absolute_import\n# PopulationSim\n# See full license in LICENSE.txt.\n\nimport logging\nimport os\n\nimport pandas as pd\n\nfrom activitysim.core import inject\n\nfrom ..integerizer import do_integerizing\nfrom .helper import get_control_table\nfrom .helper import weight_table_name\nfrom .he...
[ [ "pandas.concat" ] ]
[ { "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": [] } ]
cr21/Shopee-Product-Matching
[ "e835b456ef4e48b9cf3fc20c1f03ad94074c266c" ]
[ "dataset.py" ]
[ "import torch\nimport cv2\nfrom torch.utils.data import Dataset\nimport os\n\n\nclass ShopeeQueryDataset(Dataset):\n \"\"\"\n Custom Dataset for Pytorch Model for Inference time\n \"\"\"\n\n def __init__(self, imagePath, transform=None):\n self.imagePath = imagePath\n self.transform = tra...
[ [ "torch.tensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ianrowan/gpt-2-simple
[ "1583a0de42544543f302e448af867ba9fa5e5cdc" ]
[ "get_tweets.py" ]
[ "import twint\nimport os\nimport csv\nimport numpy as np\n\ncontinuous = False\nbase_path = os.path.dirname(os.path.realpath(__file__))\nname = input(\"Twitter User: @\")\nc = twint.Config()\n\nc.Username = name\nc.Store_csv = True\n# CSV Fieldnames\nc.Custom[\"tweet\"] = [\"tweet\"]\n# Name of the directory\nsave_...
[ [ "numpy.asarray", "numpy.savetxt" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
zhoudaxia233/SmarTrip
[ "79106fed4eddda6359be3f3919a1dbfea30d01d0" ]
[ "graphs.py" ]
[ "import pandas as pd\nimport matplotlib.pyplot as plt\n\ndf = pd.read_csv('speed_rpm_revised.csv', encoding='utf-8').drop('Unnamed: 0', axis=1).set_index('trip_id')\nx = [i for i in range(len(df.index))]\ny_dict = {'speed.mean': 'mean of speed', 'speed.median': 'median of speed', 'speed.mode': 'mode of speed'}\n\nf...
[ [ "pandas.read_csv", "matplotlib.pyplot.ylim", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlim", "matplotlib.pyplot.close", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
Anoopkr/impy
[ "3114b8ba269111da34ff6c325fdad7729277e652" ]
[ "GeometricAugmenters.py" ]
[ "\"\"\"\npackage: Images2Dataset\nclass: DataAugmentation\nEmail: lozuwaucb@gmail.com\nAuthor: Rodrigo Loza\nDescription: Common data augmentation operations \nfor an image.\nLog:\n\tNovemeber, 2017 -> Re-estructured class.\n\tDecember, 2017 -> Researched most used data augmentation techniques.\n\tMarch, 2018 -> Co...
[ [ "numpy.random.rand", "numpy.float32" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
totalgood/knowledgequest
[ "88dd23bcfc8f4deb3f8795b645312a2ee66302cc" ]
[ "src/knowledgequest/models.py" ]
[ "# This is an auto-generated Django model module.\n# You'll have to do the following manually to clean this up:\n# * Rearrange models' order\n# * Make sure each model has one field with primary_key=True\n# * Make sure each ForeignKey has `on_delete` set to the desired behavior.\n# * Remove `managed = False`...
[ [ "numpy.random.choice" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
microprediction/successor
[ "80f61a59c93d45cff2851f8048fda5378bd05c4c", "80f61a59c93d45cff2851f8048fda5378bd05c4c" ]
[ "tests/test_inventory.py", "successor/conventions.py" ]
[ "import numpy as np\n\n\ndef test_inventory():\n # Ensure we can load and run from JSON\n from successor.skaters.scalarskaters.remote import SKLEARNED_CHAMPIONS, get_remote_compiled_model\n\n for champ in SKLEARNED_CHAMPIONS:\n model = get_remote_compiled_model(**champ)\n x = np.random.randn(...
[ [ "numpy.shape", "numpy.random.randn" ], [ "tensorflow.keras.optimizers.Nadam", "tensorflow.keras.optimizers.Ftrl", "tensorflow.keras.optimizers.Adamax", "tensorflow.keras.optimizers.RMSprop", "tensorflow.keras.optimizers.Adam", "tensorflow.keras.optimizers.Adagrad", "tensorf...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "2.7", "2.2", "2.3", "2.4", "2.5", "2.6" ] } ]
zimonitrome/polandball_flag_mapping
[ "49fbbceaf807b6d74a5cb0664bde3216fccfed66" ]
[ "training/train_BSM.py" ]
[ "from pathlib import Path\nfrom datetime import datetime\nfrom itertools import count\nimport numpy as np\nfrom copy import deepcopy\nfrom tqdm import tqdm\n\nimport torch\nfrom torch import nn\nfrom torch.utils.data.dataloader import DataLoader\nfrom torch.utils.data.dataset import random_split\nfrom torch.utils.t...
[ [ "torch.nn.MSELoss", "torch.cat", "torch.manual_seed", "torch.cuda.amp.autocast", "torch.cuda.amp.GradScaler", "torch.utils.tensorboard.writer.SummaryWriter", "numpy.mean", "torch.cuda.is_available", "torch.utils.data.dataloader.DataLoader", "torch.nn.L1Loss", "torch.uti...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
WongTusnYan/bolt
[ "4d841aa34cb3be0a3bdc3ebf574a168ec5aa18ac" ]
[ "model-tools/tools/pytorch2caffe/lenet.py" ]
[ "import sys\r\nsys.path.insert(0, '.')\r\nimport torch\r\nfrom torch.autograd import Variable\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\n\r\nimport pytorch_to_caffe\r\n\r\n\r\nclass LeNet(nn.Module):\r\n def __init__(self):\r\n super(LeNet, self).__init__()\r\n\r\n self.conv1 = ...
[ [ "torch.nn.Linear", "torch.nn.Conv2d", "torch.ones", "torch.load" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Silmathoron/matplotlib-chord-diagram
[ "0e3d2fd15539bf2544b1bc368cd62e3c57df9dfe" ]
[ "chord_diagram.py" ]
[ "\"\"\"\nTools to draw a chord diagram in python\n\"\"\"\n\nfrom collections.abc import Sequence\n\nimport matplotlib.patches as patches\n\nfrom matplotlib.colors import ColorConverter\nfrom matplotlib.path import Path\n\nimport numpy as np\nimport scipy.sparse as ssp\n\nfrom .gradient import gradient\nfrom .utilit...
[ [ "matplotlib.colors.ColorConverter.to_rgb", "matplotlib.pyplot.tight_layout", "numpy.maximum", "scipy.sparse.issparse", "numpy.linspace", "numpy.clip", "matplotlib.patches.PathPatch", "numpy.meshgrid", "matplotlib.path.Path", "matplotlib.pyplot.subplots", "matplotlib.pyp...
[ { "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"...
naijoaix/ray
[ "d6096df7428e6b2f5f371b7bafa67d998dd81e13" ]
[ "rllib/agents/ddpg/tests/test_ddpg.py" ]
[ "import numpy as np\nimport re\nimport unittest\nfrom tempfile import TemporaryDirectory\n\nimport ray\nimport ray.rllib.agents.ddpg as ddpg\nfrom ray.rllib.agents.ddpg.ddpg_torch_policy import ddpg_actor_critic_loss as loss_torch\nfrom ray.rllib.agents.sac.tests.test_sac import SimpleEnv\nfrom ray.rllib.policy.sam...
[ [ "numpy.random.random", "numpy.minimum", "numpy.random.choice", "numpy.squeeze", "numpy.ones", "numpy.concatenate", "numpy.std", "numpy.mean", "numpy.transpose", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Ricardo0621/PytorchZeroToAll
[ "7b98eda196cb3c68e9d6ad9c9305f9e736c84f6e" ]
[ "9_Softmax_Classifier.py" ]
[ "from torch import nn, tensor, max\nimport numpy as np\n\n# Cross entropy example\n# One hot\n# 0: 1 0 0\n# 1: 0 1 0\n# 2: 0 0 1\nY = np.array([1, 0, 0])\nY_pred1 = np.array([0.7, 0.2, 0.1])\nY_pred2 = np.array([0.1, 0.3, 0.6])\nprint(f'Loss1: {np.sum(-Y * np.log(Y_pred1)):.4f}')\nprint(f'Loss2: {np.sum(-Y * np.log...
[ [ "torch.nn.CrossEntropyLoss", "numpy.log", "torch.max", "torch.tensor", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
228922025/botty
[ "a139850cfe06b1b533b8c26a3a767356450c26c3" ]
[ "src/ui/ui_manager.py" ]
[ "from typing import List\nimport keyboard\nimport time\nimport cv2\nimport itertools\nimport os\nimport numpy as np\n\nfrom utils.custom_mouse import mouse\nfrom utils.misc import wait, cut_roi, color_filter\n\nfrom logger import Logger\nfrom config import Config, ItemProps\nfrom screen import Screen\nfrom item imp...
[ [ "numpy.average" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ardiantutomo/robot
[ "41df81b6d5e977c6d72a90bbd364544fc6dc20fb" ]
[ "build/lib/python_imagesearch/imagesearch.py" ]
[ "import cv2\nimport numpy as np\nimport pyautogui\nimport random\nimport time\nimport platform\nimport subprocess\nimport os\n\nis_retina = False\nif platform.system() == \"Darwin\":\n is_retina = subprocess.call(\"system_profiler SPDisplaysDataType | grep 'retina'\", shell=True)\n\n'''\n\ngrabs a region (topx, ...
[ [ "numpy.array", "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
qq237942920/tianchi_detection
[ "92dc3d1aef596ebc9150734e120fdd896cf08bc3" ]
[ "maskrcnn_benchmark/modeling/rpn/retinanet/loss.py" ]
[ "\"\"\"\nThis file contains specific functions for computing losses on the RetinaNet\nfile\n\"\"\"\n\nimport torch\nfrom torch.nn import functional as F\n\nfrom ..utils import concat_box_prediction_layers\n\nfrom maskrcnn_benchmark.layers import smooth_l1_loss\nfrom maskrcnn_benchmark.layers import SigmoidFocalLoss...
[ [ "torch.nonzero", "torch.cat" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
pascalmi/noise-in-dpsgd-2020
[ "e20d364ecf987fb0c4d6f1d717ddca4c4b5b1cc5" ]
[ "generate.py" ]
[ "#!/usr/bin/env python\n\nfrom sys import path\npath.insert(0, '.')\nfrom os.path import splitext, basename\nfrom argparse import ArgumentParser\n\nparser = ArgumentParser(description=\"Generate sample images from parameter checkpoint\")\nparser.add_argument('params', type=str, help=\"model parameters\")\nparser.ad...
[ [ "matplotlib.pyplot.imshow", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.title", "torch.load", "matplotlib.pyplot.savefig", "matplotlib.pyplot.subplot", "torch.cuda.is_available", "matplotlib.pyplot.figtext", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jungikim/OpenNMT-tf
[ "a4c1da98f7918d019ee01181243e19691c9abdfe" ]
[ "opennmt/models/sequence_to_sequence.py" ]
[ "\"\"\"Standard sequence-to-sequence model.\"\"\"\n\nimport tensorflow as tf\nimport tensorflow_addons as tfa\n\nfrom opennmt import config as config_util\nfrom opennmt import constants, inputters\nfrom opennmt.data import noise, text, vocab\nfrom opennmt.decoders import decoder as decoder_util\nfrom opennmt.layers...
[ [ "tensorflow.fill", "tensorflow.transpose", "tensorflow.math.count_nonzero", "tensorflow.shape", "tensorflow.roll", "tensorflow.equal", "tensorflow.reshape", "tensorflow.expand_dims", "tensorflow.squeeze", "tensorflow.cast", "tensorflow.nest.flatten", "tensorflow.gat...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.13" ] } ]
fishduke/vision
[ "0f7914d09a293d14f5ed91fb75068d5dc521b9c9" ]
[ "classification-multi/whoisit/run.py" ]
[ "import os\nfrom keras.preprocessing.image import ImageDataGenerator\nfrom keras.models import load_model\nimport matplotlib.pyplot as plt\nimport cv2\nimport numpy as np\n\ndef display_multiple_img(images, rows = 5, cols=5):\n figure, ax = plt.subplots(nrows=rows,ncols=cols,figsize=(10,10))\n for ind,title i...
[ [ "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
nikodyulger/datathon-logic
[ "6bbed203064f765c5b8a28f2705cd14e70bcc053" ]
[ "dash/categories.py" ]
[ "import dash_bootstrap_components as dbc\nfrom dash import html, dcc, Input, Output, State, callback\nimport plotly.express as px\nimport pandas as pd\nimport datetime as dt\nimport locale\n\n# Importamos datos y los tranformamos\ndf_items = pd.read_csv(\"../Clean Data/clean_items.csv\", parse_dates=[\"date\"])\ndf...
[ [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
ShuhaoZhangTony/WalnutDB
[ "9ccc10b23351aa2e6793e0f5c7bd3dd511d7b050" ]
[ "hashing/scripts/latency_figure3.py" ]
[ "import itertools as it\nimport os\n\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport pylab\nfrom matplotlib.font_manager import FontProperties\nfrom matplotlib.ticker import MaxNLocator, LinearLocator, ScalarFormatter\n\nOPT_FONT_NAME = 'Helvetica'\nTICK_FONT_SIZE = 24\nLABEL_FONT_SIZE = 28\nLEGEND_FONT...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.ylim", "matplotlib.font_manager.FontProperties", "matplotlib.pyplot.savefig", "matplotlib.ticker.LinearLocator", "matplotlib.pyplot.xlim", "matplotlib.pyplot.ticklabel_format", "matplotlib.pyplot.ylabel", "matplotlib.ticker.ScalarF...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
huang-ju-git/fast-reid
[ "ef55d8e3ac2995a7969468ea165e3decb2b3f212" ]
[ "demo/demo.py" ]
[ "# encoding: utf-8\n\"\"\"\n@author: liaoxingyu\n@contact: sherlockliao01@gmail.com\n\"\"\"\n\nimport argparse\nimport glob\nimport os\nimport sys\n\nimport torch.nn.functional as F\nimport cv2\nimport numpy as np\nfrom tqdm import tqdm\nfrom torch.backends import cudnn\nimport pickle\nimport os.path as osp\n\nsys...
[ [ "torch.nn.functional.normalize" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
dsheldon/mechbayes
[ "dc1b857e5bee6429aa18233d4f4890b2892a2e4b" ]
[ "scripts/submit_util.py" ]
[ "import numpy as np\nimport pandas as pd\nimport mechbayes.util as util\nimport mechbayes.jhu as jhu\nfrom pathlib import Path\nimport warnings\n\n\n'''Submission'''\ndef create_submission_file(prefix, forecast_date, model, data, places, submit_args):\n \n print(f\"Creating submission file in {prefix}\")\n ...
[ [ "pandas.to_datetime", "pandas.read_csv", "pandas.Timedelta", "numpy.percentile", "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": [] } ]
voidism/Mockingjay-Speech-Representation
[ "e77df17a7f63a983c3757140c7a1e8c199cac614" ]
[ "utils/mam.py" ]
[ "# -*- coding: utf-8 -*- #\n\"\"\"*********************************************************************************************\"\"\"\n# FileName [ utils/mam.py ]\n# Synopsis [ Moasked Acoustic Model data processing for the mockingjay model ]\n# Author [ Andy T. Liu (Andi611) ]\n# Copyright ...
[ [ "torch.ByteTensor", "numpy.power", "torch.randperm", "numpy.cos", "numpy.sin", "numpy.ones", "numpy.zeros_like", "torch.no_grad", "torch.FloatTensor", "torch.rand", "numpy.repeat" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
fnaghetini/Mapa-Preditivo
[ "8302a4eaffa348717907011a44b4574fcce8a881" ]
[ "functions/Custom_Cleaning.py" ]
[ "# -----------------------------------------------------------------------------------------------------------\n# Função auxiliar para a etapa de limpeza dos dados\n# -----------------------------------------------------------------------------------------------------------\n\nimport pandas as pd\n\n\"\"\"\n tru...
[ [ "pandas.Series" ] ]
[ { "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": [] } ]
joshuafuller/openpilot
[ "9d9480832e8ecec0f52743eefb1a9c8981a21998", "9d9480832e8ecec0f52743eefb1a9c8981a21998" ]
[ "selfdrive/locationd/calibrationd.py", "panda/tests/safety/test_subaru.py" ]
[ "#!/usr/bin/env python3\n\nimport os\nimport copy\nimport json\nimport numpy as np\nimport cereal.messaging as messaging\nfrom selfdrive.locationd.calibration_helpers import Calibration\nfrom selfdrive.swaglog import cloudlog\nfrom common.params import Params, put_nonblocking\nfrom common.transformations.model impo...
[ [ "numpy.radians", "numpy.isfinite", "numpy.clip", "numpy.isnan", "numpy.tile", "numpy.arctan2", "numpy.mean", "numpy.array", "numpy.zeros" ], [ "numpy.arange" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
martin-fabbri/ml-continuous-integration
[ "299fa6ad432201421aec0174fb231c0e9111884f" ]
[ "train.py" ]
[ "import pandas as pd \nfrom sklearn.model_selection import train_test_split\nfrom sklearn.ensemble import RandomForestRegressor\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nimport numpy as np\n# Set random seed\nseed = 42\n\n################################\n########## DATA PREP ###########\n###########...
[ [ "sklearn.ensemble.RandomForestRegressor", "matplotlib.pyplot.tight_layout", "pandas.read_csv", "matplotlib.pyplot.ylim", "sklearn.model_selection.train_test_split", "matplotlib.pyplot.savefig", "matplotlib.pyplot.xlim", "matplotlib.pyplot.close" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
if3chi/if3chi-p2-image-classifier
[ "70a1aa417642c222e882ddbeb864ae7114aaca4d" ]
[ "train.py" ]
[ "import argparse\nimport torch\nfrom collections import OrderedDict\nfrom torch import nn, optim\nfrom torchvision import datasets, transforms, models\nfrom workspace_utils import active_session\nimport time\n\n\ndef get_arguments():\n \n parser = argparse.ArgumentParser(description=\"Train.py\")\n parser....
[ [ "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" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
dlmorenob/PINNs-TF2.0
[ "d07587cd63efd08ee826e759e5c5c0bb31edf610" ]
[ "datagen/1d-burgers/r8vec_print.py" ]
[ "#! /usr/bin/env python\n#\ndef r8vec_print ( n, a, title ):\n\n#*****************************************************************************80\n#\n## R8VEC_PRINT prints an R8VEC.\n#\n# Licensing:\n#\n# This code is distributed under the GNU LGPL license.\n#\n# Modified:\n#\n# 31 August 2014\n#\n# Author:...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
dennisfarmer/texas-hospital-hackathon
[ "dabf80a2c3d78d595280d4ff9475176da4848349" ]
[ "orders/vendors.py" ]
[ "from numpy.random import ranf\nfrom numpy import sqrt\n\nvendors = [\"H.E.B.\", \"Whole Foods\", \"Kroger\"]\n\ncity_locations = {'The Woodlands': (30.1658, -95.4613), 'Austin':(30.2672, -97.7431), 'Houston':(29.7604, -95.3698), 'Kingwood':(30.0500, -95.1845), 'Humble':(29.9988, -95.2622), 'Bellaire':(29.7058, -95...
[ [ "numpy.random.ranf", "numpy.sqrt" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
lonePatient/TorchBlocks
[ "4a65d746cc8a396cb7df73ed4644d97ddf843e29" ]
[ "torchblocks/models/nn/bert_with_mdp.py" ]
[ "import torch\r\nimport torch.nn as nn\r\nfrom torch.nn import CrossEntropyLoss\r\nfrom transformers import BertModel, BertPreTrainedModel\r\nfrom torchblocks.models.layers.dropouts import MultiSampleDropout\r\n\r\n\r\nclass BertWithMDP(BertPreTrainedModel):\r\n '''\r\n 对每一层的[CLS]向量进行weight求和,以及添加multi-sample...
[ [ "torch.nn.CrossEntropyLoss", "torch.nn.Dropout", "torch.nn.Parameter", "torch.softmax", "torch.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]