repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
ORG-MARS/zenml | [
"8ee9a9264397d4e24a34c906e34a443782b189d3"
] | [
"zenml/steps/trainer/pytorch_trainers/torch_ff_trainer.py"
] | [
"# Copyright (c) maiot GmbH 2020. 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... | [
[
"torch.nn.Linear",
"torch.round",
"torch.nn.Dropout",
"torch.sigmoid",
"torch.save",
"torch.nn.ReLU",
"torch.nn.BatchNorm1d",
"torch.utils.data.DataLoader",
"torch.nn.BCEWithLogitsLoss",
"torch.utils.tensorboard.SummaryWriter"
]
] |
egurapha/prot_domain_segmentor | [
"407ae9f5ff37ae20a32f07dd46b85ef8201659e1"
] | [
"classes/DomainSegmentor.py"
] | [
"import os, sys\nsys.path.insert(0, 'model')\nfrom segmentor_model_v2 import *\nfrom segmentor_utils import *\nimport torch\nfrom torch.autograd import Variable\nimport numpy as np\nimport torch.nn.functional as F\nimport scipy.stats\n\nidx_to_class = {0: 'Unassigned (Loop)',\n 1: 'Orthogonal Bundle'... | [
[
"numpy.array",
"torch.max",
"torch.autograd.Variable",
"torch.nn.functional.log_softmax",
"torch.cuda.device_count",
"torch.cuda.is_available",
"torch.load",
"torch.nn.functional.softmax",
"numpy.column_stack",
"numpy.expand_dims"
]
] |
IBM/covid19-india-data | [
"e2be04e74e753fbd1b1580f62856bf7335b95d33"
] | [
"serve_db/vizapi.py"
] | [
"import sqlite3\nimport pandas as pd\nimport json\n\n\ndef get_queries():\n CONFIGPATH = './configs/visualization.sql.json'\n with open(CONFIGPATH, 'r') as f:\n queries = json.load(f)\n return queries\n\n\ndef get_generic_query_result(db_uri, queryid, return_csv=True):\n\n queries = get_queries()... | [
[
"pandas.DataFrame",
"pandas.DataFrame.from_records"
]
] |
mcm7f/thesis | [
"412f35de9b1ce25ed4447d077a2a5292a57063f9"
] | [
"histogram.py"
] | [
"# Need to parse .csv log files, process them, and plot results\n# in an organize fashion.\n# Thesis work\n# Michael C. Murphy\n# Code started: March 1, 2016\n\nimport sys\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.image as mpimg\nimport matplotlib.mlab as mlab # what is this?\nfrom... | [
[
"matplotlib.pyplot.grid",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.subplots",
"numpy.mean",
"numpy.std",
"matplotlib.pyplot.hist",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.show",
"numpy.var"
]
] |
mexuaz/AccTrussDecomposition | [
"15a9e8fd2f123f5acace5f3b40b94f1a74eb17d4"
] | [
"python_experiments/data_analysis/figures_icde19/opt_gpu.py"
] | [
"import json\n\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nfrom data_analysis.figures_icde19.general_config import *\nfrom data_analysis.figures_icde19.parse_overall.parse_gpu_results import varying_gpu_tag, summary_tag, \\\n off_tc_tag, off_cpu_iep_tag, off_gpu_iep_tag, off_iep_to... | [
[
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.close",
"matplotlib.pyplot.yticks",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.rc",
"numpy.arange",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.yscale",
"matplotlib.pyplot.xticks"
]
] |
yrik/datasketch | [
"82d9639bc0011932a952bbae1d4b5bd5ac03c7c8"
] | [
"benchmark/lsh_benchmark_plot.py"
] | [
"import json, sys, argparse\nimport numpy as np\nimport matplotlib\nmatplotlib.use(\"Agg\")\nimport matplotlib.pyplot as plt\n\n\ndef get_precision_recall(found, reference):\n reference = set(reference)\n intersect = sum(1 for i in found if i in reference)\n if len(found) == 0:\n precision = 0.0\n ... | [
[
"matplotlib.use",
"numpy.percentile",
"matplotlib.pyplot.subplots"
]
] |
scheng1992/Data_Assimilation | [
"2965ccf78951df11f8686282cd6814bae18afde5",
"2965ccf78951df11f8686282cd6814bae18afde5"
] | [
"diagnostics/AE_time_loop_grad.py",
"src/VarDACAE/nn/CBAM.py"
] | [
"import torch\nimport sys, os\n\nsys.path.append(os.getcwd()) #to import pipeline\n\nfrom pipeline.utils import ML_utils as ML\nfrom pipeline.AutoEncoders import ToyAE\nfrom pipeline import utils\n\nimport time\nimport matplotlib.pyplot as plt\n\ndef plot_time_w_output(outputs, inn, hidden, batch_sz, loop=True, no_... | [
[
"torch.rand",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.show"
],
[
"torch.nn.Linear",
"torch.sigmoid",
"torch.nn.functional.avg_pool3d",
"torch.max",
"torch.nn.functional.lp_pool3d",
"torch.nn.Conv3d",
"torch.nn.BatchNorm3d",
"torch.mean",
"torch.nn.functiona... |
Omkar-Ranadive/Fine-Tuning-BERT | [
"b046092ec4007a4a59e1a478576cca7557c18d76"
] | [
"src/train.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\n\nimport torch\nfrom pytorch_pretrained_bert import BertConfig\n\nimport distributed\nfrom models import data_loader, model_build... | [
[
"torch.cuda.manual_seed",
"torch.manual_seed",
"torch.multiprocessing.get_context",
"torch.cuda.set_device",
"torch.load"
]
] |
Grant-Block/pylith | [
"f6338261b17551eba879da998a5aaf2d91f5f658"
] | [
"tests/libtests/feassemble/data/obsolete/feutils.py"
] | [
"#!/usr/bin/env python\n#\n# ----------------------------------------------------------------------\n#\n# Brad T. Aagaard, U.S. Geological Survey\n# Charles A. Williams, GNS Science\n# Matthew G. Knepley, University of Chicago\n#\n# This code was developed as part of the Computational Infrastructure\n# for Geodynam... | [
[
"numpy.array",
"numpy.dot",
"numpy.zeros",
"numpy.linalg.det",
"numpy.linalg.inv"
]
] |
truongnhat-ryo/fsgan | [
"6d074c553a4b2d4ea8c4bc586e25f13486e2301b"
] | [
"utils/video_renderer.py"
] | [
"import numpy as np\nimport cv2\nimport torch\nimport torch.multiprocessing as mp\nfrom fsgan.utils.img_utils import tensor2bgr\nfrom fsgan.utils.bbox_utils import crop2img, scale_bbox, crop2img_smooth_version\n\nfrom fsgan.face_enhance.retinaface.retinaface_detection import RetinaFaceDetection\nfrom fsgan.face_enh... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.reshape",
"numpy.zeros",
"numpy.where",
"torch.multiprocessing.Queue"
]
] |
haoxins/GraphScope | [
"e1e22a425b5c33bed0dea930f8722e6159484153"
] | [
"python/graphscope/nx/generators/random_graphs.py"
] | [
"# -*- coding: utf-8 -*-\n#\n# This file random_graphs.py is referred and derived from project NetworkX,\n#\n# https://github.com/networkx/networkx/blob/master/networkx/generators/random_graphs.py\n#\n# which has the following license:\n#\n# Copyright (C) 2004-2020, NetworkX Developers\n# Aric Hagberg <hagberg@lan... | [
[
"scipy.optimize.brentq"
]
] |
JacobARose/genetic_algorithm | [
"de4c52637f6b928b96c0306b7da59a054322b56c"
] | [
"genetic_algorithm/models/zoo/preprocess_c.py"
] | [
"# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ... | [
[
"numpy.std",
"tensorflow.image.convert_image_dtype",
"numpy.mean"
]
] |
martinhoang11/pytorch_mpiigaze_demo | [
"26f9cd0c4278041ceb905ebb1ccbe5825f822d6f"
] | [
"ptgaze/common/visualizer.py"
] | [
"from typing import Optional, Tuple\n\nimport cv2\nimport numpy as np\nfrom scipy.spatial.transform import Rotation\n\nfrom .camera import Camera\nfrom .face import Face\n\nAXIS_COLORS = [(0, 0, 255), (0, 255, 0), (255, 0, 0)]\n\n\nclass Visualizer:\n def __init__(self, camera: Camera, center_point_index: int):\... | [
[
"numpy.round",
"scipy.spatial.transform.Rotation.from_euler",
"numpy.vstack",
"numpy.eye"
]
] |
erip/data | [
"9c6e5ddfcdf1061e3968ed5cd9d55754cc713965"
] | [
"examples/vision/caltech101.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\nimport os.path\nimport re\n\nimport torch\nfrom torch.utils.data.datapipes.utils.decoder import imagehandler, mathandler\nfrom torchdata.datapipes.iter import (\n FileOpener,\n Filter,\n IterableWrapper,\n IterKeyZipper,\n Mapper,\n RoutedDecode... | [
[
"torch.as_tensor",
"torch.utils.data.datapipes.utils.decoder.mathandler",
"torch.utils.data.datapipes.utils.decoder.imagehandler"
]
] |
BookML/stylegan2-ada-pytorch | [
"d4b2afe9c27e3c305b721bc886d2cb5229458eba"
] | [
"generate.py"
] | [
"# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.\n#\n# NVIDIA CORPORATION and its licensors retain all intellectual property\n# and proprietary rights in and to this software, related documentation\n# and any modifications thereto. Any use, reproduction, disclosure or\n# distribution of this softwa... | [
[
"torch.zeros",
"torch.device",
"numpy.random.RandomState",
"numpy.load",
"torch.tensor"
]
] |
anndvision/causal-bald | [
"4e58ef0afa4ba7c4e12342e6052b39a93c95c680"
] | [
"causal_bald/application/workflows/active_learning.py"
] | [
"import json\nimport numpy as np\nimport scipy.stats\n\nfrom copy import deepcopy\n\nfrom causal_bald.library import models\nfrom causal_bald.library import datasets\nfrom causal_bald.library import acquisitions\n\nfrom causal_bald.application.workflows import utils\n\n\ndef active_learner(model_name, config, exper... | [
[
"numpy.argpartition",
"numpy.exp",
"numpy.argsort"
]
] |
khiemledev/Basic_CNNs_TensorFlow2 | [
"be2c90f2a63ae13b7586a1e4114c2bc42a825c83"
] | [
"models/resnext_block.py"
] | [
"import tensorflow as tf\n\nfrom models.group_convolution import get_group_conv\n\n\nclass ResNeXt_BottleNeck(tf.keras.layers.Layer):\n def __init__(self, filters, strides, groups):\n super(ResNeXt_BottleNeck, self).__init__()\n self.conv1 = tf.keras.layers.Conv2D(filters=filters,\n ... | [
[
"tensorflow.keras.layers.add",
"tensorflow.nn.relu",
"tensorflow.keras.Sequential",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.BatchNormalization"
]
] |
SEMCOG/SEMCOG_ActSim | [
"cc18cce84b2e4b5f380f58c7919953d2cd03ee73",
"cc18cce84b2e4b5f380f58c7919953d2cd03ee73",
"cc18cce84b2e4b5f380f58c7919953d2cd03ee73"
] | [
"activitysim/abm/models/util/trip.py",
"activitysim/core/input.py",
"activitysim/core/pipeline.py"
] | [
"# ActivitySim\n# See full license in LICENSE.txt.\nimport logging\n\nimport numpy as np\n\nfrom activitysim.core.util import assign_in_place\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef failed_trip_cohorts(trips, failed):\n\n # outbound trips in a tour with a failed outbound trip\n bad_outbound_trips =... | [
[
"numpy.concatenate",
"numpy.full",
"numpy.empty",
"numpy.nan_to_num",
"numpy.arange",
"numpy.repeat"
],
[
"pandas.read_csv",
"pandas.read_hdf"
],
[
"pandas.HDFStore",
"pandas.DataFrame",
"pandas.read_hdf",
"pandas.concat"
]
] |
nickhuang1996/HJL-re-id | [
"107b25f31c961f360f69560cfddd78dfc0da3291",
"107b25f31c961f360f69560cfddd78dfc0da3291"
] | [
"MDRSREID/Trainer/evaluation_creation/PGFA_Evaluation/extract_part_label.py",
"MDRSREID/DataLoaders/create_dataloader.py"
] | [
"from MDRSREID.utils.data_utils.evaluations.PGFA.part_label import part_label_generate\nimport torch\n\n\ndef extract_part_label(item, cfg):\n imgnames, imgheights = item['test_pose_path'], item['height']\n N = len(imgnames)\n # part_label_batch = torch.FloatTensor(N, 1, cfg.model.num_parts).zero_()\n p... | [
[
"torch.FloatTensor",
"torch.from_numpy"
],
[
"torch.utils.data.DataLoader"
]
] |
tanaydw/CenterNet | [
"91c2ccd2c8a063db8c8ec101adfd4c6830cd47eb"
] | [
"src/lib/detectors/ddd.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport cv2\nimport numpy as np\nfrom progress.bar import Bar\nimport time\nimport torch\n\n\nfrom models.decode import ddd_decode\nfrom models.utils import flip_tensor\nfrom utils.image import get_affi... | [
[
"numpy.array",
"torch.cuda.synchronize",
"torch.no_grad",
"torch.from_numpy"
]
] |
TomAugspurger/sunpy | [
"cad2d473f6aff05df5fe787c781cb7d004959b94"
] | [
"sunpy/map/tests/test_map_factory.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Fri Jun 21 15:05:09 2013\n\n@author: stuart\n\"\"\"\nimport os\nimport tempfile\nimport pathlib\n\nimport pytest\nimport numpy as np\nfrom astropy.io import fits\nfrom astropy.wcs import WCS\n\nimport sunpy\nimport sunpy.map\nimport sunpy.data.test\n\n\nfilepath = sunpy.... | [
[
"numpy.arange"
]
] |
gpu0/nnet | [
"0fd5c718c2d03cab91d4a4fd4963b12df241a9de"
] | [
"conv_serial.py"
] | [
"import multiprocessing\nimport numpy as np\n\nnumThreads = 8\nnumRows = 32000\nnumCols = 3\nnumOut = 2\n\nstride = numRows / numThreads\n\nX = np.ones((numRows, numCols))\nW = np.ones((numCols, numOut))\nB = np.ones((numRows, numOut))\n\ndef conv(idx):\n for i in range(100000):\n X[idx*stride:idx*stride+stride... | [
[
"numpy.ones"
]
] |
REAM-lab/switch | [
"00af4508e34bdc460925950808dc7f87a0a064ff"
] | [
"switch_model/wecc/get_inputs/post_process_steps/reserve_technologies.py"
] | [
"\"\"\" This post-process selects which technologies can provide reserves\"\"\"\n# Standard packages\nimport os\nimport shutil\n\n# Third-party packages\nimport pandas as pd\n\nfrom switch_model.wecc.get_inputs.register_post_process import post_process_step\n\n\n@post_process_step(\n msg=\"Removing fossil fuels ... | [
[
"pandas.read_csv"
]
] |
fokoa/byzantine_kmeans-msc_thesis | [
"b116cb2222cd0e1334db7df493ec453dd299b985"
] | [
"code/main_vehicule.py"
] | [
"#!usr/bin/python3\n# -*- coding : utf8 -*-\n\n\nimport sys;\nimport getopt;\nimport warnings;\nfrom mpi4py import MPI;\n\nimport numpy as np;\nimport pandas as pd;\nimport matplotlib.pyplot as plt;\nfrom mpl_toolkits.mplot3d import Axes3D;\n\nfrom sklearn import decomposition;\nfrom sklearn.cluster import KMeans;\... | [
[
"numpy.linalg.norm",
"numpy.zeros",
"pandas.set_option",
"matplotlib.pyplot.title",
"pandas.concat",
"matplotlib.pyplot.show",
"pandas.read_csv",
"sklearn.decomposition.PCA",
"matplotlib.pyplot.figaspect"
]
] |
liqile1/OCNet.pytorch | [
"5fb733adbf178ccc8040197057e3277896b3dc12"
] | [
"dataset/leadbang.py"
] | [
"##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n## Created by: speedinghzl02\n## Modified by: RainbowSecret\n## Microsoft Research\n## yuyua@microsoft.com\n## Copyright (c) 2018\n##\n## This source code is licensed under the MIT-style license found in the\n## LICENSE file in the root d... | [
[
"numpy.array",
"numpy.asarray",
"torch.utils.data.DataLoader",
"numpy.transpose"
]
] |
vstadnytskyi/sequence-server-wrapper | [
"1ee23638752a969f51b11a65a3b7652874efe8c5"
] | [
"sequence_server_wrapper/examples/example_device.py"
] | [
"#!/usr/bin/env python3\nfrom logging import debug, info, warning, error\nfrom time import sleep\n\nimport traceback\n\nclass DeviceExample():\n def __init__(self):\n self.io = None\n self.trajectory = None\n self.idle_value = 0.0\n\n def init(self):\n from time import sleep\n ... | [
[
"numpy.arange"
]
] |
100kimch/ros_galapagos | [
"8f92cb93246c263b61199aef113e43cefc5f3939"
] | [
"packages/galapagos_embedded/libs/lib_frontcam.py"
] | [
"import cv2\nimport numpy as np\nimport rospy\nimport matplotlib.pyplot as plt\nimport sys\nfrom scheduler import SCHEDULER\nfrom constants import *\nimport os\nimport sys\n\n\n# * Variables\n\n# variables for matching\n# Initiate SIFT description detector\nOrb = cv2.ORB_create()\n# create BFMatcher object\nBf = cv... | [
[
"numpy.fromstring",
"numpy.array",
"numpy.ones"
]
] |
zeevikal/modin | [
"2128f80280092902c61d738d9d2ef551bc4ffaf4",
"2128f80280092902c61d738d9d2ef551bc4ffaf4"
] | [
"modin/data_management/partitioning/remote_partition/pandas_on_python.py",
"modin/pandas/reshape.py"
] | [
"import pandas\r\n\r\nfrom .utils import length_fn_pandas, width_fn_pandas\r\n\r\n\r\nclass PandasOnPythonRemotePartition(object):\r\n \"\"\"This abstract class holds the data and metadata for a single partition.\r\n The methods required for implementing this abstract class are listed in\r\n the se... | [
[
"pandas.DataFrame"
],
[
"pandas.core.dtypes.common.is_list_like",
"pandas.get_dummies"
]
] |
frahlg/npbench | [
"1bc4d9e2e22f3ca67fa2bc7f40e2e751a9c8dd26",
"1bc4d9e2e22f3ca67fa2bc7f40e2e751a9c8dd26",
"1bc4d9e2e22f3ca67fa2bc7f40e2e751a9c8dd26",
"1bc4d9e2e22f3ca67fa2bc7f40e2e751a9c8dd26",
"1bc4d9e2e22f3ca67fa2bc7f40e2e751a9c8dd26",
"1bc4d9e2e22f3ca67fa2bc7f40e2e751a9c8dd26"
] | [
"npbench/benchmarks/polybench/covariance/covariance.py",
"npbench/benchmarks/polybench/gemver/gemver_numba_n.py",
"npbench/benchmarks/deep_learning/lenet/lenet_numba_opr.py",
"npbench/benchmarks/polybench/symm/symm_numba_npr.py",
"npbench/benchmarks/polybench/floyd_warshall/floyd_warshall_numba_n.py",
"np... | [
"# Copyright 2021 ETH Zurich and the NPBench authors. All rights reserved.\n\nimport numpy as np\n\n\ndef initialize(M, N, datatype=np.float64):\n float_n = datatype(N)\n data = np.fromfunction(lambda i, j: (i * j) / M, (N, M), dtype=datatype)\n\n return float_n, data\n",
"import numpy as np\nimport numb... | [
[
"numpy.fromfunction"
],
[
"numpy.outer"
],
[
"numpy.max",
"numpy.empty",
"numpy.reshape",
"numpy.sum",
"numpy.maximum"
],
[
"numpy.empty"
],
[
"numpy.minimum"
],
[
"numpy.max",
"numpy.empty",
"numpy.sum",
"numpy.exp",
"numpy.maximum"
]
... |
isabella232/dice_rl | [
"0e9e1a0963cb99ae3d995aa302fa19094c580d35"
] | [
"estimators/neural_dual_dice.py"
] | [
"# Copyright 2020 Google LLC.\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 or agreed ... | [
[
"tensorflow.compat.v2.transpose",
"tensorflow.compat.v2.eye",
"tensorflow.compat.v2.range",
"tensorflow.compat.v2.shape",
"tensorflow.compat.v2.ones",
"tensorflow.compat.v2.nest.map_structure",
"tensorflow.compat.v2.GradientTape",
"tensorflow.compat.v2.abs",
"tensorflow.compat.... |
Toroi0610/visualize_interactive | [
"8ddc8c248902ff59f1800d2418c697ffe1e5b472"
] | [
"visualize.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\n# In[5]:\n\n\nimport joblib\nimport numpy as np\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib.widgets import Slider, Button, RadioButtons\n\n\n# In[6]:\n\n\nwith open(\"model.pkl\", \"rb\") as f:\n model = jobli... | [
[
"matplotlib.widgets.Slider",
"matplotlib.widgets.Button",
"numpy.array",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.subplots_adjust",
"numpy.arange",
"matplotlib.pyplot.show",
"matplotlib.pyplot.axes",
"matplotlib.pyplot.imshow"
]
] |
bobeobibo/phigaro | [
"342a3454bb5324426b25feb4a4d1f640b58bf8f8"
] | [
"phigaro/misc/vis.py"
] | [
"import numpy as np\nfrom plotly import tools\nfrom plotly.graph_objs import Bar\nimport plotly.offline as py\n\nfrom phigaro.finder.v2 import calc_scores\n\n\ndef _make_coords_colors(data_len, real_phage_coords):\n colors = np.zeros(data_len)\n for begin, end in real_phage_coords:\n for i in range(beg... | [
[
"numpy.zeros"
]
] |
jiaruonan/transferlearning | [
"17583db86db19709ff483a24590f0d5b88e25fe5",
"0360ba0b09df6c1033d466ddc65f0c870187331e",
"0360ba0b09df6c1033d466ddc65f0c870187331e"
] | [
"code/deep/adarnn/base/loss/mutual_info.py",
"code/distance/coral_pytorch.py",
"code/deep/CSG/a-mnist/makedata.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nclass Mine_estimator(nn.Module):\n def __init__(self, input_dim=2048, hidden_dim=512):\n super(Mine_estimator, self).__init__()\n self.mine_model = Mine(input_dim, hidden_dim)\n\n def forward(self, X, Y):\n Y_shffle ... | [
[
"torch.nn.Linear",
"torch.exp",
"torch.mean"
],
[
"torch.mul",
"torch.mean",
"torch.sum"
],
[
"torch.save",
"torch.cat",
"torch.tensor"
]
] |
taimur1871/plotly_examples | [
"04cccbc1c60963c4a6b5405614d9136de93846f6"
] | [
"charts/random_coord.py"
] | [
"import numpy as np\nimport pandas as pd\n\n# set coordinate range\nmax_lat = 41.986046\nmin_lat = 41.056583\nmax_long = -89.766294\nmin_long = -92.238217\n\n# random data\nfake_data = []\n\nfor i in range(10):\n rand_lat = np.random.uniform(min_lat, max_lat)\n rand_long = np.random.uniform(min_long, max_long... | [
[
"pandas.DataFrame",
"numpy.random.uniform"
]
] |
annelhote/fonduer | [
"bd5b1feebfb2860286ae8b5a520b24baa023b445"
] | [
"tests/utils/test_utils_udf.py"
] | [
"\"\"\"Fonduer UDF utils' unit tests.\"\"\"\nimport logging\n\nimport numpy as np\n\nfrom fonduer.utils.utils_udf import shift_label_matrix, unshift_label_matrix\n\n\ndef test_shift_label_matrix(caplog):\n \"\"\"Test the label matrix shifter and unshifter.\"\"\"\n caplog.set_level(logging.INFO)\n\n \"\"\"\... | [
[
"numpy.array"
]
] |
franciszhangkk/Cloud_computing | [
"e53e91199119ea72a434d7b7b424f9029a11451c"
] | [
"Assignment2_spark_ML/CC_A2_code/cc_a2/matrix.py"
] | [
"import seaborn as sn\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport csv\nimport math\n\n\n# def show_confusion_matrix(confusion, xlabels, ylabels):\n# plt.figure(figsize=(14, 11))\n# df_cm = pd.DataFrame(confusion, range(10), range(10))\n# df_cm.astype(int)\n#\n# ... | [
[
"numpy.sum",
"numpy.arange"
]
] |
giorgiosavastano/casa | [
"8ecfdb121ec5b6814a5c15bc75d6879848c99ec9"
] | [
"tests/test_classification_pipeline.py"
] | [
"from pathlib import Path\nfrom unittest import TestCase\n\nimport numpy as np\nimport pytest\n\nfrom cassa.classification_pipeline import (\n eigen_decomposition,\n get_affinity_matrix,\n get_clusters_spectral,\n)\nfrom cassa.distance_matrix import DistanceMatrix\n\npath = Path(__file__)\n\n\nclass TestDi... | [
[
"numpy.random.random",
"numpy.argmin"
]
] |
mostafamahdieh/ClusteringFaultPronenessTCP | [
"567184740d24f464cde7d623f84ec3a6d989d401"
] | [
"results/aggregate_results.py"
] | [
"import pandas as pd\r\nfrom pandas import Categorical\r\nimport numpy as np\r\nfrom numpy import std, mean, sqrt\r\nimport os\r\nimport matplotlib\r\nimport matplotlib.pyplot as plt\r\nimport scipy.stats as stats\r\nimport itertools as it\r\n\r\n\r\ndef effect_size(lst1, lst2):\r\n return improvement(lst1, lst2... | [
[
"pandas.set_option",
"pandas.DataFrame",
"matplotlib.pyplot.close",
"matplotlib.rcParams.update",
"pandas.read_csv",
"scipy.stats.wilcoxon"
]
] |
cambel/rlpyt | [
"96e231d6c77ba5ff06dd09f6e9c8837f0abb1a89",
"96e231d6c77ba5ff06dd09f6e9c8837f0abb1a89"
] | [
"rlpyt/utils/tensor.py",
"rlpyt/algos/qpg/ddpg.py"
] | [
"\nimport torch\n\n\ndef select_at_indexes(indexes, tensor):\n \"\"\"Leading dimensions of tensor must match dimensions of indexes.\"\"\"\n dim = len(indexes.shape)\n assert indexes.shape == tensor.shape[:dim]\n num = indexes.numel()\n t_flat = tensor.view((num,) + tensor.shape[dim:])\n s_flat = t... | [
[
"torch.zeros",
"torch.argmax",
"torch.arange"
],
[
"torch.ones_like",
"torch.no_grad",
"torch.clamp"
]
] |
DanielMabadeje/Artificial-Intelligence-Deep-Learning-Machine-Learning-Tutorials | [
"6988f1f3ccfa4f6794ce269f056422da4ce9baf6",
"6017441f2d476f9c6c568dd886da43c6c0fd89bd",
"6017441f2d476f9c6c568dd886da43c6c0fd89bd",
"6988f1f3ccfa4f6794ce269f056422da4ce9baf6"
] | [
"deep-learning/GANs and Variational Autoencoders/BigGAN-PyTorch/train.py",
"sympy/register.py",
"quantum gravity/Getting Started/readligo.py",
"deep-learning/GANs and Variational Autoencoders/BigGAN-PyTorch/sample.py"
] | [
"\"\"\" BigGAN: The Authorized Unofficial PyTorch release\n Code by A. Brock and A. Andonian\n This code is an unofficial reimplementation of\n \"Large-Scale GAN Training for High Fidelity Natural Image Synthesis,\"\n by A. Brock, J. Donahue, and K. Simonyan (arXiv 1809.11096).\n\n Let's go.\n\"\"\"\... | [
[
"torch.nn.DataParallel"
],
[
"numpy.array",
"matplotlib.pyplot.xlim",
"numpy.zeros",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.title",
"matplotlib.pyplot.get_cmap",
"numpy.eye",
"matplotlib.pyplot.gcf",
"numpy.sqrt",
"numpy.absolu... |
Sanyambansal76/MLAlgorithms | [
"829c74cf7d79307fc6ca1d849e65b959fb10e5de"
] | [
"mla/base/base.py"
] | [
"import numpy as np\n\n\nclass BaseEstimator(object):\n X = None\n y = None\n y_required = True\n\n def _setup_input(self, X, y=None):\n \"\"\"Ensure inputs to an estimator are in the expected format.\n\n Ensures X and y are stored as numpy ndarrays by converting from an\n array-lik... | [
[
"numpy.array",
"numpy.prod"
]
] |
lywong92/garage | [
"96cb8887fcae90531a645d540653010e7fe10fcc"
] | [
"src/garage/experiment/local_tf_runner.py"
] | [
"\"\"\"\nThe local runner for tensorflow algorithms.\n\nA runner setup context for algorithms during initialization and\npipelines data between sampler and algorithm during training.\n\"\"\"\nimport copy\nimport time\nfrom types import SimpleNamespace\n\nfrom dowel import logger, tabular\nimport tensorflow as tf\n\... | [
[
"tensorflow.get_default_session",
"tensorflow.Session",
"tensorflow.global_variables",
"tensorflow.name_scope",
"tensorflow.report_uninitialized_variables"
]
] |
jacv050/hyperfuture | [
"54288230656c7a8cc0b825f9e397d690408d9e42"
] | [
"backbone/hyrnn_nets.py"
] | [
"\"\"\"\nNetwork definitions from https://github.com/ferrine/hyrnn\n\"\"\"\n\nimport geoopt\nimport geoopt.manifolds.stereographic.math as gmath\nimport numpy as np\nimport torch.nn\nimport torch.nn.functional\nfrom torch.cuda.amp import autocast\n\n\ndef mobius_linear(\n input,\n weight,\n bia... | [
[
"torch.cuda.amp.autocast",
"numpy.sqrt"
]
] |
tianhm/tensorflow | [
"ec8216568d8cd9810004067558041c11a8356685",
"ec8216568d8cd9810004067558041c11a8356685"
] | [
"tensorflow/contrib/eager/python/datasets.py",
"tensorflow/python/keras/_impl/keras/layers/wrappers.py"
] | [
"# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.contrib.data.python.util.nest.flatten",
"tensorflow.python.ops.gen_dataset_ops.make_iterator",
"tensorflow.contrib.data.python.util.nest.pack_sequence_as",
"tensorflow.python.ops.resource_variable_ops.destroy_resource_op",
"tensorflow.python.eager.context.in_eager_mode",
"tenso... |
Hourout/tensordata | [
"cbef6742ee0d3bfc4b886358fc01618bb5b63603"
] | [
"tensordata/report/p2peye/_p2peye.py"
] | [
"import io\nimport time\nimport datetime\n\nimport requests\nimport pandas as pd\n\n__all__ =['rating', 'problem_platform']\n\ndef rating(date=None):\n \"\"\"P2peye comprehensive rating and display results.\n \n from https://www.p2peye.com\n \n Args:\n date: if None, download latest data, if l... | [
[
"pandas.to_datetime",
"pandas.DateOffset"
]
] |
trisct/DeepSDF | [
"85e0cf413544244737fe2237f9549c0d4e946745"
] | [
"pyrender_render.py"
] | [
"import numpy as np\nimport trimesh\nimport pyrender\nimport matplotlib.pyplot as plt\nimport math\nfrom tqdm import tqdm\nimport os\nimport torch\nimport torchvision\nimport glob\n\ndef render_one(mesh_list, steps, save_name, save_path, resolution, need_video=False):\n \"\"\"\n mesh: pyrender.mesh.Mesh\n ... | [
[
"torch.zeros",
"numpy.array",
"torch.cat",
"numpy.eye",
"torch.zeros_like"
]
] |
tlambert-forks/pyclesperanto_prototype | [
"aea964a75e691f19b7753040daa8b276d57ccf36",
"65bc3035d3b2b61a2722c93b95bae310bfbd190e"
] | [
"pyclesperanto_prototype/_tier0/_pycl.py",
"tests/test_copy_slice.py"
] | [
"import os\nimport sys\n\nimport numpy as np\nimport pyopencl as cl\nfrom pyopencl import characterize\nfrom pyopencl import array\nfrom ._device import get_device\n\n\"\"\" Below here, vendored from GPUtools\nCopyright (c) 2016, Martin Weigert\nAll rights reserved.\n\nRedistribution and use in source and binary fo... | [
[
"numpy.require"
],
[
"numpy.max",
"numpy.min",
"numpy.asarray",
"numpy.mean"
]
] |
vlkit/vlk | [
"0fc79b39972356af1ca921eab5fce5d671366725"
] | [
"test/test_optimal_transport.py"
] | [
"import os.path as osp\nTEST_DIR = osp.dirname(__file__)\nimport sys, os\nsys.path.insert(0, osp.abspath(osp.join(TEST_DIR, \"../\")))\nfrom vlkit.optimal_transport import sinkhorn\n\nimport matplotlib\nmatplotlib.use(\"Agg\")\nimport matplotlib.pyplot as plt\nfrom matplotlib import gridspec\n\nimport torch\nimport... | [
[
"matplotlib.use",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.figure",
"torch.from_numpy",
"numpy.arange",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.gca",
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.subplots_adjust",
"matplotlib.... |
Conxz/nipype | [
"1281723ae56eacd103597ff4081a205583706e62",
"1281723ae56eacd103597ff4081a205583706e62"
] | [
"nipype/algorithms/tests/test_overlap.py",
"nipype/algorithms/tests/test_mesh_ops.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n\nimport os\nfrom shutil import rmtree\nfrom tempfile import mkdtemp\n\nfrom nipype.testing import (example_data)\n\nimport numpy as np\n\n\ndef test_o... | [
[
"numpy.testing.assert_almost_equal",
"numpy.array"
],
[
"numpy.array",
"numpy.linalg.norm"
]
] |
amrzv/federated | [
"d8ac0d5f8d52541860fba881e87ccdd44c5d5b9b",
"d8ac0d5f8d52541860fba881e87ccdd44c5d5b9b",
"d8ac0d5f8d52541860fba881e87ccdd44c5d5b9b"
] | [
"tensorflow_federated/python/core/impl/executors/eager_tf_executor_multi_gpu_test.py",
"tensorflow_federated/python/core/impl/intrinsic_factory_test.py",
"tensorflow_federated/python/core/impl/executors/federating_executor_test.py"
] | [
"# Copyright 2019, The TensorFlow Federated 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 a... | [
[
"tensorflow.data.Dataset.range",
"tensorflow.Graph",
"tensorflow.config.list_logical_devices",
"tensorflow.constant",
"tensorflow.test.main",
"tensorflow.device",
"numpy.int64"
],
[
"numpy.ndarray"
],
[
"tensorflow.data.Dataset.from_tensor_slices"
]
] |
GeNikolja/pandas | [
"7bb498083ce163f92822487dd4b15e9659dd45d7"
] | [
"pandas/tests/indexing/test_indexing.py"
] | [
"# -*- coding: utf-8 -*-\n# pylint: disable-msg=W0612,E1101\nimport sys\nimport nose\nimport itertools\nimport warnings\nfrom warnings import catch_warnings\nfrom datetime import datetime\n\nfrom pandas.types.common import (is_integer_dtype,\n is_float_dtype,\n ... | [
[
"pandas.util.testing.makeCustomDataframe",
"pandas.core.api.MultiIndex.from_arrays",
"pandas.compat.StringIO",
"numpy.random.rand",
"pandas.core.api.Index",
"pandas.DatetimeIndex",
"pandas.util.testing.assertIsInstance",
"pandas.core.indexing._non_reducing_slice",
"pandas.Times... |
oliviaweng/imgclsmob | [
"a1f1f52eecbb841fa878bff4d3c311b79864835d",
"80fffbb46f986614b162c725b21f3d208597ac77",
"a1f1f52eecbb841fa878bff4d3c311b79864835d",
"a1f1f52eecbb841fa878bff4d3c311b79864835d",
"a1f1f52eecbb841fa878bff4d3c311b79864835d",
"a1f1f52eecbb841fa878bff4d3c311b79864835d",
"a1f1f52eecbb841fa878bff4d3c311b79864835... | [
"keras_/kerascv/models/seresnext.py",
"other/eval_gl_mch.py",
"gluon/gluoncv2/models/darts.py",
"tensorflow2/tf2cv/models/drn.py",
"tensorflow2/tf2cv/models/ghostnet.py",
"pytorch/pytorchcv/models/sparsenet.py",
"tensorflow_/tensorflowcv/models/menet.py",
"tensorflow2/tf2cv/models/resnext_cifar.py"
] | [
"\"\"\"\n SE-ResNeXt for ImageNet-1K, implemented in Keras.\n Original paper: 'Squeeze-and-Excitation Networks,' https://arxiv.org/abs/1709.01507.\n\"\"\"\n\n__all__ = ['seresnext', 'seresnext50_32x4d', 'seresnext101_32x4d', 'seresnext101_64x4d']\n\nimport os\nfrom keras import layers as nn\nfrom keras.models... | [
[
"numpy.zeros"
],
[
"numpy.linalg.norm",
"numpy.sum",
"numpy.ones",
"numpy.min",
"numpy.mean",
"numpy.stack",
"numpy.transpose",
"numpy.linalg.inv",
"numpy.expand_dims"
],
[
"numpy.prod"
],
[
"tensorflow.keras.layers.AveragePooling2D",
"tensorflow.ker... |
gely/coseis | [
"8b608a5f7a5eab570bbd17a6d6caf278e787ada0"
] | [
"cst/waveform.py"
] | [
"\"\"\"\nWaveform data tools.\n\"\"\"\nimport numpy\n\n\ndef csmip_vol2(filename, max_year=2050):\n \"\"\"\n Read strong motion record in CSMIP Volume 2 format.\n\n California Strong Motion Instrumentation Program:\n http://www.strongmotioncenter.org\n \"\"\"\n\n # read file\n ss = open(filenam... | [
[
"numpy.array"
]
] |
acq4/acq4 | [
"c77636a76d68ffa1bc7dbd41edc522e523b909b8"
] | [
"acq4/devices/Sensapex.py"
] | [
"# -*- coding: utf-8 -*-\nfrom __future__ import print_function\n\nimport numpy as np\nimport pyqtgraph as pg\nfrom pyqtgraph import ptime, Transform3D, solve3DTransform\n\nfrom acq4.util import Qt\nfrom acq4.drivers.sensapex import UMP\nfrom .Stage import Stage, MoveFuture, ManipulatorAxesCalibrationWindow, StageA... | [
[
"numpy.array",
"numpy.sin",
"numpy.cos"
]
] |
jmorlana/pixloc | [
"90f7e968398252e8557b284803ee774cb8d80cd0"
] | [
"pixloc/utils/eval.py"
] | [
"import logging\n\nfrom pathlib import Path\nfrom typing import Union, Dict, Tuple, Optional\nimport numpy as np\nfrom .io import parse_image_list\nfrom .colmap import qvec2rotmat, read_images_binary, read_images_text\n\nlogger = logging.getLogger(__name__)\n\n\ndef evaluate(gt_sfm_model: Path, predictions: Union[D... | [
[
"numpy.array",
"numpy.linalg.norm",
"numpy.arccos",
"numpy.dot",
"numpy.median",
"numpy.mean",
"numpy.argsort"
]
] |
wang-yuhao/On-the-topological-propertyof-dynamic-transaction-graph | [
"8dc8c3870befb82581099e3a6edc9f9734c23f31"
] | [
"4-Informer/chainInformer/data/merge_2018_2020_data.py"
] | [
"# Merge 2018-2020 data for Informer\n# This process will generate merged base, betti, betti_deri, and fl files in PRICESSED_DIR.\n\nimport pandas as pd\nimport os\nfrom sklearn.decomposition import PCA\nimport datetime\nimport math \nimport pandas as pd\nimport numpy as np\nimport torch\n\nBETTI_NUMBER_DIR = \"/co... | [
[
"numpy.asarray",
"pandas.DataFrame",
"pandas.concat",
"pandas.read_csv",
"sklearn.decomposition.PCA"
]
] |
LouisTsiattalou/tfidf_matcher | [
"e95139f16329d149a2a3c1002d5b9bfe6da3b116"
] | [
"tfidf_matcher/matcher.py"
] | [
"# AUTHOR: Louis Tsiattalou\n# DESCRIPTION: Match list items to closest tf-idf match in second list.\n\nimport pandas as pd\nfrom tfidf_matcher.ngrams import ngrams\nfrom sklearn.feature_extraction.text import TfidfVectorizer\nfrom sklearn.neighbors import NearestNeighbors\n\ndef matcher(original = [], lookup = [],... | [
[
"pandas.DataFrame",
"sklearn.neighbors.NearestNeighbors",
"sklearn.feature_extraction.text.TfidfVectorizer",
"pandas.concat"
]
] |
Quentin-kt/efficientdet-pytorch | [
"6a013481f9264a065ff1e3c5affe3102ef6066ce"
] | [
"nets/efficientdet.py"
] | [
"import torch\nimport torch.nn as nn\nfrom utils.anchors import Anchors\n\nfrom nets.efficientnet import EfficientNet as EffNet\nfrom nets.layers import (Conv2dStaticSamePadding, MaxPool2dStaticSamePadding,\n MemoryEfficientSwish, Swish)\n\n\n#----------------------------------#\n# Xceptio... | [
[
"torch.cat",
"torch.nn.BatchNorm2d",
"torch.ones",
"torch.nn.Upsample",
"torch.nn.ReLU",
"torch.sum"
]
] |
isi-vista/adam-visual-perception | [
"8ad6ed883b184b5407a1bf793617b226c78b3a13"
] | [
"adam_visual_perception/head_gaze_estimator.py"
] | [
"from adam_visual_perception import LandmarkDetector\nfrom adam_visual_perception.utility import *\nimport numpy as np\nimport math\nimport cv2\nimport os\nimport sys\n\n\nclass HeadGazeEstimator:\n \"\"\" A class for estimating gaze ray from facial landmarks \"\"\"\n\n def __init__(self, write_video=False):\... | [
[
"numpy.array",
"numpy.zeros"
]
] |
bobcy2015/ml-agents | [
"5d02292ad889f1884fa98bd92f127f17cbfe0112"
] | [
"ml-agents/mlagents/trainers/tests/test_ghost.py"
] | [
"import pytest\n\nimport numpy as np\n\nfrom mlagents.trainers.ghost.trainer import GhostTrainer\nfrom mlagents.trainers.ghost.controller import GhostController\nfrom mlagents.trainers.behavior_id_utils import BehaviorIdentifiers\nfrom mlagents.trainers.ppo.trainer import PPOTrainer\nfrom mlagents.trainers.brain im... | [
[
"numpy.testing.assert_array_equal"
]
] |
lcx366/SphericalPolygon | [
"5594f54bcc2aef2c0ff2aca26a710f76548f050e"
] | [
"sphericalpolygon/inertia.py"
] | [
"import numpy as np\nfrom scipy.integrate import dblquad\nfrom .excess_area import polygon_excess\nfrom .functions import *\n\ndef polygon_inertia(vertices):\n '''\n Calculate the geometrical inertia tensor of a spherical polygon over a unit sphere.\n\n Usage:\n inertia = polygon_inertia(vertices)\n\n ... | [
[
"numpy.array",
"numpy.zeros",
"numpy.radians",
"numpy.abs",
"scipy.integrate.dblquad"
]
] |
liyupeng/Paddle-Lite | [
"e821d4d6f62f71534f594afc74560738bf02a879"
] | [
"lite/tests/unittest_py/op/test_generate_proposals_op.py"
] | [
"# Copyright (c) 2021 PaddlePaddle 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 re... | [
[
"numpy.array"
]
] |
shalarewicz/pandas | [
"070341cf4958652343f798c74c04a8c15de2fd04",
"070341cf4958652343f798c74c04a8c15de2fd04"
] | [
"pandas/core/strings/accessor.py",
"pandas/core/reshape/reshape.py"
] | [
"import codecs\nfrom functools import wraps\nimport re\nfrom typing import (\n Dict,\n List,\n Optional,\n)\nimport warnings\n\nimport numpy as np\n\nimport pandas._libs.lib as lib\nfrom pandas.util._decorators import Appender\n\nfrom pandas.core.dtypes.common import (\n ensure_object,\n is_bool_dtyp... | [
[
"numpy.where",
"pandas.core.dtypes.missing.isna",
"pandas._libs.lib.infer_dtype",
"pandas.core.dtypes.common.is_re",
"numpy.putmask",
"pandas.DataFrame",
"pandas.util._decorators.Appender",
"pandas.array",
"pandas.core.dtypes.common.is_integer",
"pandas.MultiIndex.from_tupl... |
mpeven/Pytorch_Datasets | [
"6a1709bfb59739b5e7ce299c70350b0080209c82"
] | [
"pytorch_datasets/datasets/object_net_3d.py"
] | [
"import os\nimport glob\nfrom tqdm import tqdm\nfrom PIL import Image\nimport scipy.io as sio\nimport h5py\nimport torch\nimport pytorch_datasets.utils.cache_manager as cache\n\n\nclass ObjectNet3D(torch.utils.data.Dataset):\n dset_location = '/hdd/Datasets/ObjectNet3D/'\n dset_cached_location = dset_location... | [
[
"scipy.io.loadmat"
]
] |
CAU-OSP-02/T03 | [
"bd5e32eb76aa651d959c86439f13c07d7781004a"
] | [
"handFiguration/hand_learning.py"
] | [
"#!/usr/bin/env python3\n# v.1.1\n\nimport cv2\nimport mediapipe as mp\nimport numpy as np\n\ngesture = {\n 0:'fist', 1:'one', 2:'two', 3:'three', 4:'four', 5:'five',\n 6:'six', 7:'rock', 8:'spiderman', 9:'yeah', 10:'ok'\n} #MediaPipe 제공 제스쳐\nhand_gesture = {\n 0:'fist', 1:'one', 2:'gun', 3:'three', 4:'f... | [
[
"numpy.array",
"numpy.linalg.norm",
"numpy.savetxt",
"numpy.zeros",
"numpy.genfromtxt",
"numpy.degrees",
"numpy.einsum",
"numpy.append",
"numpy.vstack"
]
] |
colin1alexander/zipline | [
"ba42e6d8b972dcce9271526562ceff0cddd3fa30",
"ba42e6d8b972dcce9271526562ceff0cddd3fa30"
] | [
"zipline/examples/pairtrade.py",
"tests/pipeline/test_numerical_expression.py"
] | [
"#!/usr/bin/env python\n#\n# Copyright 2013 Quantopian, 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 requir... | [
[
"matplotlib.pyplot.title",
"numpy.mean",
"numpy.std",
"matplotlib.pyplot.gcf",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplot"
],
[
"numpy.full",
"numpy.array",
"numpy.isnan",
"numpy.zeros",
"pandas.DataFrame",
"pandas.date_... |
jaehwlee/K-wav2vec | [
"6ba33f0ef7d2399e4c52a3c80d83a092dac4daa9"
] | [
"fairseq/options.py"
] | [
"# 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\nimport argparse\nfrom typing import Callable, List, Optional\n\nimport torch\nfrom fairseq import utils\nfrom fairseq.data.indexed_d... | [
[
"torch.cuda.device_count"
]
] |
gabglus/pandas_market_calendars | [
"dc1453a240a34f569cfd2b4e8ffd396f82c34b14"
] | [
"pandas_market_calendars/exchange_calendar_tase.py"
] | [
"from datetime import time\r\nfrom pandas import Timestamp\r\nfrom pytz import timezone\r\nfrom pandas_market_calendars import MarketCalendar\r\n\r\nTASEClosedDay = [\r\n # 2019\r\n Timestamp('2019-03-21', tz='Asia/Jerusalem'),\r\n Timestamp('2019-04-09', tz='Asia/Jerusalem'),\r\n Timestamp('2019-04-25'... | [
[
"pandas.Timestamp"
]
] |
geosmart/spark | [
"9c5bcac61ee56fbb271e890cc33f9a983612c5b0"
] | [
"python/pyspark/pandas/tests/test_ops_on_diff_frames.py"
] | [
"#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); yo... | [
[
"pandas.Index",
"numpy.random.rand",
"pandas.concat",
"pandas.DataFrame",
"pandas.MultiIndex.from_tuples",
"pandas.MultiIndex.from_arrays",
"pandas.MultiIndex",
"pandas.Series"
]
] |
GabyRumc/evalutils | [
"d77c80d6420980a886302237ca321d09478a3db2"
] | [
"evalutils/evalutils.py"
] | [
"import json\nimport logging\nfrom abc import ABC, abstractmethod\nfrom os import PathLike\nfrom pathlib import Path\nfrom typing import (\n Any,\n Callable,\n Dict,\n Iterable,\n List,\n Optional,\n Pattern,\n Set,\n Tuple,\n Union,\n)\nfrom warnings import warn\n\nimport SimpleITK\nf... | [
[
"pandas.DataFrame",
"pandas.merge",
"pandas.concat"
]
] |
BuildJet/mindmeld | [
"82b063b21d6012b36ba2a4321edfa56b8c4b8c90"
] | [
"mindmeld/models/text_models.py"
] | [
"# -*- coding: utf-8 -*-\n#\n# Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.\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# http://www.apache.org/lic... | [
[
"numpy.bincount",
"sklearn.preprocessing.MaxAbsScaler",
"numpy.array",
"sklearn.preprocessing.LabelEncoder",
"sklearn.preprocessing.StandardScaler",
"sklearn.linear_model.LogisticRegression",
"sklearn.feature_selection.SelectPercentile",
"sklearn.feature_extraction.DictVectorizer"
... |
khurrumsaleem/raven | [
"3a158f9ae3851d3eca51b4bd91ea6494e5c0ed89",
"3a158f9ae3851d3eca51b4bd91ea6494e5c0ed89"
] | [
"ravenframework/Metrics/metrics/SklMetric.py",
"scripts/TestHarness/testers/UnorderedCSVDiffer.py"
] | [
"# Copyright 2017 Battelle Energy Alliance, LLC\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 ... | [
[
"sklearn.__version__.split"
],
[
"numpy.searchsorted",
"numpy.sign",
"pandas.read_csv",
"numpy.isclose"
]
] |
mmlab-cv/ICIP-2021-2346 | [
"d208a5b89acfb0405475664bc83d289d5c3eae33",
"d208a5b89acfb0405475664bc83d289d5c3eae33"
] | [
"topview/results/make_latex_accuracies.py",
"topview/rgb_to_depth/FCRN_pytorch/dataloaders/dataloader.py"
] | [
"import sys\nsys.path.append('../../')\n\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport pathlib\n\nfrom accuracy import *\nfrom plot import *\n\ndef get_accuracy_for_joints(experiment, needed_acc = 0.1):\n current_file_path = pathlib.Path(__file__).parent.absolute()\n gt_fil... | [
[
"numpy.where",
"numpy.loadtxt",
"pandas.DataFrame"
],
[
"numpy.expand_dims",
"numpy.array",
"numpy.transpose",
"numpy.zeros"
]
] |
yejh90093/Py.finance | [
"e5c660970d4bb890cbf401d288d70829d3e6c966"
] | [
"Tw.finance.py"
] | [
"import os\n\nimport numpy\nimport requests\nimport datetime\nimport time\nimport math\nimport pandas as pd\nimport functions\nimport xlwt\nimport numpy as np\nfrom tqdm import tqdm\nimport gspread\nfrom gspread_dataframe import set_with_dataframe\nfrom oauth2client.service_account import ServiceAccountCredentials\... | [
[
"pandas.DataFrame",
"pandas.Series"
]
] |
ggzhang0071/Self-Supervised-Embedding-Fusion-Transformer | [
"91ad5276bf9a796b93a9f8f2200ce75747725fed"
] | [
"validate.py"
] | [
"#!/usr/bin/env python3 -u\n# Copyright (c) 2017-present, Facebook, Inc.\n# All rights reserved.\n#\n# This source code is licensed under the license found in the LICENSE file in\n# the root directory of this source tree. An additional grant of patent rights\n# can be found in the PATENTS file in the same directory... | [
[
"torch.cuda.is_available"
]
] |
dmorrill10/research2018 | [
"3604e3fb774f6d882e41cc217ceb85038d3775e5"
] | [
"research2018/test/tabular_cfr_test.py"
] | [
"import tensorflow as tf\ntf.compat.v1.enable_eager_execution()\nfrom research2018.tabular_cfr import TabularCfr, TabularCfrCurrent\n\n\nclass TabularCfrTest(tf.test.TestCase):\n def setUp(self):\n tf.random.set_seed(42)\n\n def test_zeros(self):\n num_info_sets = 2\n num_actions = 3\n ... | [
[
"tensorflow.zeros",
"tensorflow.random.set_seed",
"tensorflow.random.normal",
"tensorflow.fill",
"tensorflow.constant",
"tensorflow.test.main",
"tensorflow.compat.v1.enable_eager_execution"
]
] |
feynfan13/transtory | [
"4dd48033fdcd95b4a0dbc19f5b26d15b4b533979"
] | [
"transtory/shanghaimetro/publicdata.py"
] | [
"import os\nimport pandas as pd\n\nfrom transtory.common import singleton\nfrom .configs import get_configs, ShmSysConfigs\n\n\nclass ShmPublicData(object):\n \"\"\"Public data, including\n -- Lines\n -- Stations\n -- Trains\n \"\"\"\n train_json_name = 'trains.json'\n\n def __init_... | [
[
"pandas.DataFrame.from_dict"
]
] |
colincsl/pyKinectTools | [
"a84bb5b7ff9dd613576415932865c2ad435520b3"
] | [
"pyKinectTools/utils/AlignCameras.py"
] | [
"''' Use this file to hand register multiple depth cameras with the 3D visualizer\n\nProcedure:\n1) Modify the scrip below for your files\n2) After adding points, click the mayavi button in the window and add Transformation to the scene. Drag the second points to the transformation.\n3) Manually match the two scene... | [
[
"scipy.misc.imread"
]
] |
mhwasil/pointcloud_classification | [
"c4dd36db556087cc90dca16e31958adfd3641482"
] | [
"models/pointcnn.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport sys\nBASE_DIR = os.path.dirname(os.path.abspath(__file__))\nsys.path.append(BASE_DIR)\nsys.path.append(os.path.join(BASE_DIR, '../../utils/pointcnn'))\n\nimport math\nimport pointfly ... | [
[
"tensorflow.shape",
"tensorflow.range",
"tensorflow.concat",
"tensorflow.expand_dims",
"tensorflow.gather_nd",
"tensorflow.subtract",
"tensorflow.matmul",
"tensorflow.reshape",
"tensorflow.squeeze",
"tensorflow.slice"
]
] |
zhengxxn/adaptive-knn-mt | [
"338ec0ddf02ed80b5cd4cbae922ad0ebe93e8339"
] | [
"experimental_generate.py"
] | [
"#!/usr/bin/env python3 -u\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\"\"\"\nTranslate pre-processed data with a trained model.\n\"\"\"\n\nimport ast\nimport logging\nimport ma... | [
[
"numpy.random.seed",
"torch.cuda.is_available",
"torch.mean"
]
] |
ajsanjoaquin/pytorch-YOLOv4 | [
"dbc10cdc43668f29647ea2019ec13c4109d590c1"
] | [
"tool/darknet2pytorch.py"
] | [
"import torch.nn as nn\nimport torch.nn.functional as F\nimport numpy as np\nfrom tool.region_loss import RegionLoss\nfrom tool.yolo_layer import YoloLayer\nfrom tool.config import *\nfrom tool.torch_utils import *\n\n\nclass Mish(torch.nn.Module):\n def __init__(self):\n super().__init__()\n\n def for... | [
[
"torch.nn.Linear",
"torch.nn.functional.avg_pool2d",
"torch.nn.MSELoss",
"torch.nn.ModuleList",
"torch.nn.MaxPool2d",
"torch.nn.Sequential",
"torch.nn.Softmax",
"torch.nn.BatchNorm2d",
"torch.nn.LeakyReLU",
"torch.nn.Sigmoid",
"torch.nn.functional.relu",
"torch.nn.R... |
OstapFerensovych/ODrive | [
"918240fe3323d7040d5b1f71f899afb78da1fe6a"
] | [
"tools/odrive/utils.py"
] | [
"from __future__ import print_function\n\nimport sys\nimport time\nimport threading\nimport platform\nimport subprocess\nimport os\nimport numpy as np\nfrom fibre.utils import Event\nimport odrive.enums\nfrom odrive.enums import *\n\ntry:\n if platform.system() == 'Windows':\n import win32console\n ... | [
[
"matplotlib.pyplot.ion",
"numpy.array",
"matplotlib.pyplot.clf",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlabel",
"numpy.exp",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.figure",
"numpy.mean",
"numpy.st... |
delcacho/DataSciencePlatform | [
"c19ac4c1aba54bafc0fed05cc534bb447ab3b631"
] | [
"model/test.py"
] | [
"import warnings\nwarnings.filterwarnings(\"ignore\")\nfrom seldon_core.seldon_client import SeldonClient\nimport pandas as pd\n\ndata = pd.read_csv(\"wine-quality.csv\")\ndata.head()\n\nx_0 = data.drop([\"quality\"], axis=1).values[:1]\nbatch = x_0\n\nsc = SeldonClient( \\\n deployment_name=\"mlflow-ab-test\",\n... | [
[
"pandas.read_csv"
]
] |
jason9075/ithome_tensorflow_series | [
"e8f92de2a73a88e7b03a9ac58ece4c4a604f066e"
] | [
"14/record_dataset.py"
] | [
"import cv2\nimport tensorflow as tf\n\nTFRECORD_PATH = '../tfrecord/member.tfrecord'\n\n\ndef main():\n data_set = tf.data.TFRecordDataset(TFRECORD_PATH)\n data_set = data_set.map(parse_function)\n data_set = data_set.shuffle(buffer_size=9)\n data_set = data_set.batch(3)\n iterator = data_set.make_i... | [
[
"tensorflow.data.TFRecordDataset",
"tensorflow.image.random_flip_left_right",
"tensorflow.Session",
"tensorflow.io.FixedLenFeature",
"tensorflow.image.random_brightness",
"tensorflow.image.random_contrast",
"tensorflow.io.parse_single_example",
"tensorflow.image.decode_png",
"t... |
ogrenenmakine/censusEnumerators | [
"e63b5f888a0aaefa69dbc0413d567b1643c5c503"
] | [
"source/NACDVOCDetection.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nimport os\nimport logging\nimport numpy as np\ntry:\n import xml.etree.cElementTree as ET\nexcept ImportError:\n import xml.etree.ElementTree as ET\nimport mxnet as mx\nfrom source.base import VisionDataset\n\n\nclass NACDDetection(Visi... | [
[
"numpy.array"
]
] |
SeriousDim/gr09 | [
"db23a064c422c146ade39c81bb287ee958038731"
] | [
"old_filter.py"
] | [
"from PIL import Image\nimport numpy as np\nimg = Image.open(\"img2.jpg\")\narr = np.array(img)\na = len(arr)\na1 = len(arr[1])\ni = 0\nwhile i < a - 11:\n j = 0\n while j < a1 - 11:\n s = 0\n for n in range(i, i + 10):\n for n1 in range(j, j + 10):\n n1 = arr[n][n1][0]... | [
[
"numpy.array"
]
] |
LiYangCom1994/companylair | [
"e8d085e3357b08f178b089c4a52e5dc2f9eb103f"
] | [
"wd/wdapp/timeseries_analysis.py"
] | [
"import pandas as pd\nimport numpy as np\nimport statsmodels.api as sm\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\nfrom sklearn.tree import DecisionTreeRegressor\nfrom sklearn.ensemble import RandomForestRegressor\n\nfrom sklearn.model_selection import cross_val_score\nfrom sklearn.model_selection im... | [
[
"pandas.DataFrame",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.title",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.plot",
"numpy.mean",
"matplotlib.pyplot.figure",
"numpy.std",
"matplotlib.pyplot.fill_between",
"sklearn.ensemble.RandomForestRegressor",
"matplotli... |
Pangoraw/PaDiM | [
"76f757fd51c46abda1ced5a26c2865c6d91a8cca"
] | [
"padim/utils/utils.py"
] | [
"\"\"\"\nUtils module\n\nThe code from this file comes from:\n * https://github.com/taikiinoue45/PaDiM\n\"\"\"\nfrom typing import List\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\nfrom mpl_toolkits.axes_grid1 import ImageGrid\nfrom numpy import ndarray as NDArray\nfrom skimage im... | [
[
"torch.nn.functional.unfold",
"torch.cat",
"torch.ones",
"pandas.read_csv",
"numpy.zeros_like",
"matplotlib.pyplot.colorbar",
"pandas.DataFrame",
"matplotlib.pyplot.savefig",
"numpy.logical_and",
"numpy.arange",
"torch.nn.functional.conv2d",
"numpy.array",
"matp... |
zmlabe/predictGMSTrate | [
"2bde4a106de1988d772f15a52d283d23bb7128f4",
"2bde4a106de1988d772f15a52d283d23bb7128f4",
"2bde4a106de1988d772f15a52d283d23bb7128f4"
] | [
"Scripts/read_HadCRUT.py",
"Scripts/read_ERA5_monthlyBE.py",
"Scripts/LRP_v1.py"
] | [
"\"\"\"\nFunction reads in monthly data from HadCRUTv4\n \nNotes\n-----\n Author : Zachary Labe\n Date : 10 January 2022\n \nUsage\n-----\n [1] read_HadCRUT(directory,sliceperiod,sliceyear,\n sliceshape,addclimo,slicenan)\n\"\"\"\n\ndef read_HadCRUT(directory,sliceperiod,sliceyear,sli... | [
[
"numpy.nanmean",
"numpy.isnan",
"numpy.arange",
"numpy.reshape"
],
[
"numpy.isnan",
"numpy.reshape",
"numpy.where",
"numpy.nanmean",
"numpy.arange"
],
[
"matplotlib.pyplot.contourf",
"numpy.genfromtxt",
"numpy.load",
"numpy.shape",
"matplotlib.pyplot... |
lrast/gpytorch | [
"2e0bbc9f59e4b4b54780c3e55db784c3d2c9a5bf",
"2e0bbc9f59e4b4b54780c3e55db784c3d2c9a5bf",
"2e0bbc9f59e4b4b54780c3e55db784c3d2c9a5bf"
] | [
"test/lazy/test_chol_lazy_tensor.py",
"test/kernels/test_cosine_kernel.py",
"gpytorch/lazy/root_lazy_tensor.py"
] | [
"#!/usr/bin/env python3\n\nimport unittest\n\nimport torch\n\nfrom gpytorch.lazy import CholLazyTensor, TriangularLazyTensor\nfrom gpytorch.test.lazy_tensor_test_case import LazyTensorTestCase\n\n\nclass TestCholLazyTensor(LazyTensorTestCase, unittest.TestCase):\n seed = 0\n should_test_sample = True\n sho... | [
[
"torch.eye",
"torch.tensor"
],
[
"torch.zeros",
"torch.cos",
"torch.Size",
"torch.norm",
"torch.tensor"
],
[
"torch.is_tensor",
"torch.equal"
]
] |
Ottawa-Autonomous-Vehicle-Group/learning-to-drive-in-5-minutes | [
"fb82bc77593605711289e03f95dcfb6d3ea9e6c3"
] | [
"algos/custom_ppo2.py"
] | [
"import time\nfrom collections import deque\n\nimport gym\nimport numpy as np\nfrom stable_baselines import logger, PPO2\nfrom stable_baselines.a2c.utils import total_episode_reward_logger\nfrom stable_baselines.common import explained_variance, TensorboardWriter\nfrom stable_baselines.common.runners import Abstrac... | [
[
"numpy.zeros_like",
"numpy.asarray",
"numpy.zeros",
"numpy.sum",
"numpy.copy",
"numpy.mean",
"numpy.random.shuffle",
"numpy.arange",
"numpy.clip"
]
] |
ARSadri/RobustGaussianFittingLibrary | [
"e8f273f0fb363f3092628ff295758d45595b1f19"
] | [
"RobustGaussianFittingLibrary/cWrapper.py"
] | [
"\"\"\"\n------------------------------------------------------\nThis file is part of RobustGaussianFittingLibrary,\na free library WITHOUT ANY WARRANTY\nCopyright: 2017-2020 LaTrobe University Melbourne,\n 2019-2020 Deutsches Elektronen-Synchrotron\n------------------------------------------------------\... | [
[
"numpy.ctypeslib.ndpointer"
]
] |
whywhs/Detection_and_Recognition_in_Remote_Sensing_Image | [
"201c7450ad45d203b59d8345fb6fad903fad8748"
] | [
"faster_rcnn/core/loader.py"
] | [
"# --------------------------------------------------------\n# Deformable Convolutional Networks\n# Copyright (c) 2016 by Contributors\n# Copyright (c) 2017 Microsoft\n# Licensed under The Apache-2.0 License [see LICENSE for details]\n# Modified by Yuwen Xiong\n# ----------------------------------------------------... | [
[
"numpy.logical_not",
"numpy.array",
"numpy.reshape",
"numpy.zeros",
"numpy.random.permutation",
"numpy.random.shuffle",
"numpy.where",
"numpy.arange"
]
] |
dcherian/cf-xarray | [
"a5aa1d601f9c37ef47b4cd6026a65b57b727c043"
] | [
"cf_xarray/helpers.py"
] | [
"from typing import Optional, Sequence\n\nimport numpy as np\nimport xarray as xr\nfrom xarray import DataArray\n\n\ndef bounds_to_vertices(\n bounds: DataArray,\n bounds_dim: str,\n core_dims=None,\n order: Optional[str] = \"counterclockwise\",\n) -> DataArray:\n \"\"\"\n Convert bounds variable ... | [
[
"numpy.concatenate",
"numpy.block",
"numpy.stack",
"numpy.all"
]
] |
Cho0joy/botty | [
"ed9c22b78a527443b46fdc3070cb128f32501e2e"
] | [
"src/shop/drognan.py"
] | [
"import datetime\nimport os\nimport time\nimport math\nimport random\nfrom typing import Dict, Tuple, Union, List, Callable\n\nimport keyboard\nimport numpy as np\n\nfrom screen import Screen\nfrom config import Config\nfrom logger import Logger\nfrom npc_manager import NpcManager, Npc\nfrom template_finder import ... | [
[
"numpy.where"
]
] |
MatteoPerotto/pointconv | [
"204a0d534c4d75e80bde7722c075a78365a64929"
] | [
"utils/pointconv_util.py"
] | [
"\"\"\"\nHelper Function for PointConv\nAuthor: Wenxuan Wu\nDate: July 2018\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport math\nimport random\nimport numpy as np\nimport tensorflow as tf\nfrom transforms3d.euler import euler2mat\nim... | [
[
"tensorflow.sqrt",
"tensorflow.global_variables_initializer",
"tensorflow.cast",
"tensorflow.concat",
"tensorflow.subtract",
"tensorflow.variable_scope",
"tensorflow.split",
"tensorflow.range",
"numpy.zeros",
"tensorflow.expand_dims",
"tensorflow.py_func",
"tensorfl... |
Fackor/NeMo | [
"941ef1fd71bd2515a4ba7092d65146edfddc1229"
] | [
"nemo/core/classes/modelPT.py"
] | [
"# Copyright (c) 2020, NVIDIA CORPORATION. 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 re... | [
[
"torch.device",
"torch.save",
"torch.cuda.current_device",
"torch.cuda.is_available",
"torch.load"
]
] |
stevengt/whatwhy | [
"bf6f87fd20eebfc89240835c3121ec3079632133"
] | [
"whatwhy/data_analysis/whatwhy_predictor.py"
] | [
"import os\nimport pickle\nimport numpy as np\nfrom sklearn.model_selection import train_test_split\nfrom .seq2seq_model import Seq2SeqModel\nfrom .vectorizer import TokenVectorizer\n\nclass WhatWhyPredictor():\n \"\"\"\n Predicts a sequence of text which answers the question 'why?' given some input 'what'.\n... | [
[
"sklearn.model_selection.train_test_split"
]
] |
zhao-tong/DeepFD-pyTorch | [
"584c00d5814d6803be45433905a4140a6bd4fd18"
] | [
"src/models.py"
] | [
"__author__ = 'Tong Zhao'\n__email__ = 'tzhao2@nd.edu'\n\nimport os\nimport sys\nimport copy\nimport torch\nimport random\nimport numpy as np\nfrom scipy.sparse import csr_matrix\n\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nclass Classification(nn.Module):\n def __init__(self, emb_size):\n ... | [
[
"torch.nn.Linear",
"torch.cat",
"torch.log_softmax",
"torch.nn.init.constant_",
"torch.FloatTensor",
"torch.nn.init.xavier_uniform_"
]
] |
vinay-swamy/clustereval | [
"d199cf0f8f232c35602633d8821249e6578d080a"
] | [
"clustereval/stability.py"
] | [
"#%%\nimport pandas as pd\nimport numpy as np \nimport glob\nimport os \nimport re\nimport pickle\nfrom multiprocessing import Pool\n\ndef entropy(exp): # both are dfs with two columsn, Barcode,cluster\n # calc H_tot\n entropy = (exp\n .groupby(\"labels\")\n .count()\n .res... | [
[
"pandas.DataFrame.from_dict",
"numpy.log"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.