repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
changgyhub/semantic-tsdf | [
"4767d92a768af577f75ab05229c9fc87dda9681e"
] | [
"tsdf/tsdf.py"
] | [
"'''\nTSDF fusion.\n'''\n\nimport numpy as np\nfrom skimage import measure\ntry:\n import pycuda.driver as cuda\n import pycuda.autoinit\n from pycuda.compiler import SourceModule\n TSDF_GPU_MODE = 1\nexcept Exception as err:\n print('Warning: %s'%(str(err)))\n print('Failed to import PyCUDA. Runn... | [
[
"numpy.dot",
"numpy.sqrt",
"numpy.multiply",
"numpy.linalg.inv",
"numpy.asarray",
"numpy.ones",
"numpy.round",
"numpy.ceil",
"numpy.cbrt",
"numpy.floor",
"numpy.prod",
"numpy.array",
"numpy.logical_and",
"numpy.zeros",
"numpy.divide"
]
] |
bostankhan6/Object-Detection-YoloV3-RetinaNet-FasterRCNN | [
"81b79063f6ec5a76960018bdc1c37b17ce12dc67"
] | [
"YoloV3 SIMS/utils/bbox.py"
] | [
"import numpy as np\r\nimport os\r\nimport cv2\r\nfrom .colors import get_color\r\n\r\nclass BoundBox:\r\n def __init__(self, xmin, ymin, xmax, ymax, c = None, classes = None):\r\n self.xmin = xmin\r\n self.ymin = ymin\r\n self.xmax = xmax\r\n self.ymax = ymax\r\n \r\n s... | [
[
"numpy.array",
"numpy.argmax"
]
] |
tcapelle/tf-metal-experiments | [
"d296ba2656dd352947ed8f6f80bdb349c1ab9617"
] | [
"unified_mem_benchmark.py"
] | [
"import argparse\nparser = argparse.ArgumentParser()\nparser.add_argument(\"--iterations\", default=30, type=int,\n help=\"Number of iterations to run within each benchmark\")\nparser.add_argument(\"--device1\", default=\"/CPU:0\", type=str)\nparser.add_argument(\"--device2\", default=\"/GPU:0\",... | [
[
"tensorflow.device",
"tensorflow.function",
"tensorflow.random.normal",
"tensorflow.linalg.matmul"
]
] |
richardrl/rlkit | [
"088dae169a8d5ba1430094eee66f27b2cb7c4998"
] | [
"scripts/run_experiment_from_doodad.py"
] | [
"import doodad as dd\nfrom rlkit.launchers.launcher_util import run_experiment_here\nimport torch.multiprocessing as mp\nimport faulthandler\n\nif __name__ == \"__main__\":\n faulthandler.enable()\n import matplotlib\n matplotlib.use('agg')\n\n print(\"set fork\")\n mp.set_start_method('forkserver')\... | [
[
"matplotlib.use",
"torch.multiprocessing.set_start_method"
]
] |
chiro2001/cumcm-a | [
"6e8c11166c98b6683433423a595f346198cc4790"
] | [
"main.py"
] | [
"import os\nimport argparse\nimport pandas as pd\nimport time\nimport matplotlib.pyplot as plt\nimport traceback\nimport torch.optim as optim\nfrom tqdm import trange\nimport threading\nfrom utils import *\nimport cv2\nfrom base_logger import logger\nfrom fast import FAST\n\n# 是否使用多线程显示图像\ndraw_threaded: bool = Fal... | [
[
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.sca",
"pandas.DataFrame",
"matplotlib.pyplot.draw",
"matplotlib.pyplot.axes",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.clf",
"matplotlib.pyplot.close",
"pandas.ExcelWriter",
"matplotlib.pyplot.show",
"matplotlib.pyplot.pa... |
certik/pydy | [
"d201b75d3e8fd8295b375e52eb4ce4c1f35adfb4"
] | [
"examples/rigidbody/plot_rigidbody.py"
] | [
"#!/usr/bin/env python\nimport rigidbody_lib as rb\nfrom scipy.integrate import odeint\nfrom numpy import array, arange, zeros\n\n# Dimensions of rigid body in the three body fixed directions\n# Following are the dimensions of an iPhone 3G taken from apple.com\nh = 0.1155 # meters in the 1 direction\nw = 0.06... | [
[
"numpy.arange",
"numpy.zeros",
"scipy.integrate.odeint"
]
] |
NullP0interExcepti0n/TierbyPlaytime | [
"ebdfa404aa9e0e85942b6e50c10243606948832a"
] | [
"rankAndTier.py"
] | [
"import tensorflow as tf\nimport numpy as np\n\ndata = np.loadtxt('./data.csv', delimiter=',', unpack=True, dtype='float32')\n\nplayTime = np.transpose(data[0])\nrank = np.transpose(data[1])\n\nW = tf.Variable(tf.random_uniform([1], 0, 20000))\nb = tf.Variable(tf.random_uniform([1], 1, 2000000))\n\nX = tf.placehold... | [
[
"tensorflow.placeholder",
"tensorflow.global_variables_initializer",
"tensorflow.train.GradientDescentOptimizer",
"tensorflow.square",
"numpy.transpose",
"tensorflow.Session",
"tensorflow.random_uniform",
"numpy.loadtxt"
]
] |
xrcui/Pix2Vox | [
"30ba9518dcfc06add38bf5e8491a6a05fc08eaee"
] | [
"core/test.py"
] | [
"# -*- coding: utf-8 -*-\n#\n# Developed by Haozhe Xie <cshzxie@gmail.com>\n\nimport json\nimport numpy as np\nimport os\nimport torch\nimport torch.backends.cudnn\nimport torch.utils.data\n\nimport utils.binvox_visualization\nimport utils.data_loaders\nimport utils.data_transforms\nimport utils.network_utils\n\nfr... | [
[
"torch.mean",
"torch.ge",
"torch.load",
"torch.nn.BCELoss",
"numpy.max",
"numpy.mean",
"torch.no_grad",
"torch.cuda.is_available",
"torch.nn.DataParallel",
"numpy.sum"
]
] |
gingkg/pymarl | [
"b5a72b3ab6c89b4a492f5853c02c1ce3f9189ea4"
] | [
"runners/episode_runner.py"
] | [
"from envs import REGISTRY as env_REGISTRY\nfrom functools import partial\nfrom components.episode_buffer import EpisodeBatch\nimport numpy as np\n\n\nclass EpisodeRunner:\n\n def __init__(self, args, logger):\n self.args = args\n self.logger = logger\n self.batch_size = self.args.batch_size... | [
[
"numpy.std",
"numpy.mean"
]
] |
philip-krantz/Drivers | [
"31d05e852f4e30d40d41949f3f76e9322f0be9e8"
] | [
"MultiQubit_PulseGenerator/gates.py"
] | [
"#!/usr/bin/env python3\nfrom copy import copy\nimport numpy as np\nimport logging\nfrom sequence import Step\nlog = logging.getLogger('LabberDriver')\n\n# TODO remove Step dep from CompositeGate\n\n\nclass BaseGate:\n \"\"\"Base class for a qubit gate.\n\n \"\"\"\n\n def get_adjusted_pulse(self, pulse):\n... | [
[
"numpy.abs"
]
] |
andim/projgrad | [
"3854c704b6c413f8d79aa324ef4758676cdb8c68"
] | [
"projgrad/tests/basic.py"
] | [
"import numpy as np\nimport numpy.testing as npt\nimport projgrad\n\ndef test_basic():\n\n def objective(x):\n f = np.sum(x**2)\n grad = 2 * x\n return f, grad\n res = projgrad.minimize(objective, [0.1, 0.7, 0.2], reltol=1e-8)\n npt.assert_allclose(res.x, np.ones(3)/3.0)\n \nif __na... | [
[
"numpy.testing.run_module_suite",
"numpy.sum",
"numpy.ones"
]
] |
tstls/TSB_AI_Vision | [
"f11a2f6c6ee6f275d950c95f8c2fbf519aadcce6"
] | [
"yolov5/utils/augmentations.py"
] | [
"# YOLOv5 🚀 by Ultralytics, GPL-3.0 license\n\"\"\"\nImage augmentation functions\n\"\"\"\n\nimport logging\nimport math\nimport random\n\nimport cv2\nimport numpy as np\n\nfrom utils.general import check_version, colorstr, resample_segments, segment2box\nfrom utils.metrics import bbox_ioa\n\n\nclass Albumentation... | [
[
"numpy.random.beta",
"numpy.maximum",
"numpy.clip",
"numpy.arange",
"numpy.eye",
"numpy.ones",
"numpy.concatenate",
"numpy.append",
"numpy.mod",
"numpy.random.uniform",
"numpy.array",
"numpy.zeros"
]
] |
SebBlin/p4 | [
"342753a1e9bf018751cf0f4eff69e8f240df53e7"
] | [
"board.py"
] | [
"import numpy as np\nimport hashlib\n\nnbcol = 7\nnbligne = 6\n\npion = [' ', 'X', 'O']\n\ndef print_top_line():\n print(u'\\u250c', end = '')\n for _ in range(nbcol-1):\n print(u'\\u2500\\u252c', sep = '', end = '')\n print(u'\\u2500\\u2510')\n\ndef print_mid_line_empty(tab_line):\n for i in ran... | [
[
"numpy.array",
"numpy.count_nonzero"
]
] |
cahya-wirawan/phase-detection | [
"ca65442c4f2a30004a17cf79cbe54cf9c2f6925d",
"ca65442c4f2a30004a17cf79cbe54cf9c2f6925d"
] | [
"phase_classification_features.py",
"phase_model.py"
] | [
"import argparse\nimport numpy as np\nfrom keras.wrappers.scikit_learn import KerasClassifier\nfrom keras.callbacks import ModelCheckpoint, TensorBoard\nfrom keras.models import load_model\nfrom sklearn.model_selection import cross_val_score\nfrom sklearn.model_selection import KFold\nfrom sklearn.metrics import co... | [
[
"sklearn.model_selection.cross_val_score",
"numpy.random.seed",
"sklearn.model_selection.KFold"
],
[
"sklearn.externals.joblib.dump",
"sklearn.model_selection.cross_val_score",
"numpy.linspace",
"sklearn.model_selection.StratifiedKFold",
"sklearn.model_selection.KFold",
"nu... |
AndrewMDelgado/UTA_ChessBot | [
"e57218526102a95db8e9b4892c1c1b63b1322c98"
] | [
"templateMatching.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Apr 7 14:48:33 2018\n\n@author: lenangungu\n\"\"\"\nimport numpy as np\nimport time\nfrom aruco_detect import detectCode\nfrom aruco_detect import detectCode2\nimport matplotlib.image as mpimg\nimport matplotlib.pyplot as plt\nimport skimage.... | [
[
"numpy.where"
]
] |
SSITB/cortex | [
"cb9b64d466fedaceb1cb9171914ffb31409927fe"
] | [
"examples/pytorch/answer-generator/predictor.py"
] | [
"import wget\nimport torch\nfrom transformers import GPT2Tokenizer, GPT2LMHeadModel, GPT2Config\nimport generator\n\n\nmedium_config = GPT2Config(n_embd=1024, n_layer=24, n_head=16)\nmodel = GPT2LMHeadModel(medium_config)\ntokenizer = GPT2Tokenizer.from_pretrained(\"gpt2\")\n\n\ndef init(model_path, metadata):\n ... | [
[
"torch.load"
]
] |
Chezacar/CollaborationWithLatency | [
"da06abea16f1ffcafc35d27cb69ae3116a345965"
] | [
"pair_fast_forecast_distributed/pairwise_fusion_kd/train_faf_com_kd.py"
] | [
"# Copyright 2021 MediaBrain Group of CMIC, Shanghai Jiao Tong University. All right reserved.\n# The software, documentation and/or data in this file is provided on an \"as is\" basis, \n# and MediaBrain Group has no obligations to provide maintenance, support, updates, enhancements or modifications. \n# MediaBr... | [
[
"torch.distributed.init_process_group",
"torch.cuda.set_device",
"torch.load",
"torch.utils.data.distributed.DistributedSampler",
"torch.cuda.device_count",
"torch.utils.data.DataLoader",
"torch.unsqueeze",
"torch.nn.parallel.DistributedDataParallel",
"torch.nn.DataParallel",
... |
hikmatkhan/Higher | [
"b47c758dbe194abd98847a0f935b51f09ab772b0"
] | [
"learn2learn-master/JSrc/jutils.py"
] | [
"import random\nimport learn2learn\nimport numpy as np\nimport torch\nimport torchvision\nfrom learn2learn.data import TaskDataset\nfrom learn2learn.data.transforms import NWays, KShots, LoadData\nimport wandb\nfrom torch import nn\nfrom torchvision.models import resnet18\nfrom torchvision.transforms import transfo... | [
[
"torch.cuda.manual_seed",
"numpy.random.seed",
"torch.manual_seed",
"torch.device",
"torch.cuda.device_count"
]
] |
markvilar/focal | [
"53b048bc6592b7ad7421ae96c399755570820db6"
] | [
"Python/create_example_images.py"
] | [
"import matplotlib\nmatplotlib.use(\"TkAgg\")\nimport matplotlib.pyplot as plt\nplt.style.use(\"./Styles/Scientific.mplstyle\")\n\nimport cv2\nimport numpy as np\n\nfrom PIL import Image\nfrom skimage.metrics import structural_similarity as ssim\n\nfrom histogram import plot_histogram, plot_histogram_rgb\n\ndef nor... | [
[
"numpy.min",
"matplotlib.use",
"matplotlib.pyplot.subplots",
"numpy.max",
"matplotlib.pyplot.style.use"
]
] |
kshramt/ssd.pytorch | [
"91214ba98c282663c117a4f3c691464460b8fa16"
] | [
"ssd.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\nfrom layers import *\nfrom data import voc, coco\nimport os\n\n\nclass SSD(nn.Module):\n \"\"\"Single Shot Multibox Architecture\n The network is composed of a base VGG network followed by the\n adde... | [
[
"torch.nn.Softmax",
"torch.load",
"torch.nn.ModuleList",
"torch.nn.Conv2d",
"torch.nn.MaxPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
]
] |
WilliamJudge94/tomopy | [
"301ee367d18ca6d18f2b9b18e2c531c33d4739e4"
] | [
"source/tomopy/misc/corr.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# #########################################################################\n# Copyright (c) 2015-2019, UChicago Argonne, LLC. All rights reserved. #\n# #\n# Copyright 2015-2019. UChicago Ar... | [
[
"numpy.lib.pad",
"numpy.swapaxes",
"numpy.isfinite",
"numpy.min",
"numpy.empty_like",
"scipy.signal.medfilt2d",
"numpy.max",
"numpy.argmax",
"numpy.float32",
"numpy.prod",
"numpy.zeros"
]
] |
OAID/Halide | [
"769b8554ec36b70ea53c73605ad021cf431476fc"
] | [
"python_bindings/tutorial/lesson_10_aot_compilation_run.py"
] | [
"# Before reading this file, see lesson_10_aot_compilation_generate.py\n\n# This is the code that actually uses the Halide pipeline we've\n# compiled. It does not depend on libHalide, so we won't do\n# \"import halide\".\n#\n# Instead, it depends on the header file that lesson_10_generate\n# produced when we ran it... | [
[
"numpy.empty"
]
] |
Baileyswu/espnet | [
"7ce470058f8fdb28db00ec2d0bd51d290b109d3b",
"7ce470058f8fdb28db00ec2d0bd51d290b109d3b"
] | [
"espnet/asr/pytorch_backend/asr_rnn_t.py",
"espnet/bin/asr_train_vggblstmp.py"
] | [
"#!/usr/bin/env python3\n# encoding: utf-8\n\n# Copyright 2017 Johns Hopkins University (Shinji Watanabe)\n# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)\n\n\"\"\"Training/decoding definition for the speech recognition task.\"\"\"\n\nimport copy\nimport json\nimport logging\nimport math\nimport os\nimp... | [
[
"torch.optim.Adam",
"numpy.pad",
"matplotlib.pyplot.title",
"matplotlib.use",
"torch.is_tensor",
"torch.from_numpy",
"torch.as_tensor",
"matplotlib.pyplot.subplot",
"torch.no_grad",
"matplotlib.pyplot.clf",
"torch.cuda.is_available",
"numpy.prod",
"torch.device"... |
chris0711/curl_rainbow | [
"2badc1302ef55b8512e6c5a0616045a1a0fd4273"
] | [
"test.py"
] | [
"# -*- coding: utf-8 -*-\n# MIT License\n#\n# Copyright (c) 2017 Kai Arulkumaran\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the ri... | [
[
"torch.tensor"
]
] |
bsafdi/galacticB | [
"cf90459799b0917340f7b6faceab6134dc3c35b0"
] | [
"python/galB_models.py"
] | [
"import numpy as np \nimport numpy.linalg as LA\n\n\n#B-field model from https://arxiv.org/pdf/1204.3662.pdf\n\niopen=11.5 #degrees\nrmx_array = np.array([5.1,6.3,7.1,8.3,9.8,11.4,12.7,15.5]) #kpc\n\ndef return_B(x,y):\n '''\n x,y in Galactic coords in kpc\n Earth at (x,y) = (-8.5,0)\n '''\n r = np.s... | [
[
"numpy.minimum",
"numpy.sqrt",
"numpy.cosh",
"numpy.arange",
"numpy.cos",
"numpy.linalg.norm",
"numpy.sin",
"numpy.arctan2",
"numpy.tan",
"numpy.deg2rad",
"numpy.arctanM",
"numpy.zeros_like",
"numpy.searchsorted",
"numpy.exp",
"numpy.array",
"numpy.s... |
aribornstein/pytorch-lightning | [
"ca68cac57ad8eefc9b477ee126eb42a483f27a39",
"0b7f5a88a0f4691ec228c4708295a10d403fd592"
] | [
"pytorch_lightning/accelerators/tpu_accelerator.py",
"tests/core/test_lightning_optimizer.py"
] | [
"# Copyright The PyTorch Lightning team.\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... | [
[
"torch.norm",
"torch.load",
"torch.tensor",
"torch.multiprocessing.get_context",
"torch.device",
"torch.ones_like",
"torch.save"
],
[
"torch.stack",
"torch.nn.Linear",
"torch.optim.lr_scheduler.StepLR"
]
] |
CNES/decloud | [
"6b06ae98bfe68821b4ebd0e7ba06723809cb9b42",
"6b06ae98bfe68821b4ebd0e7ba06723809cb9b42"
] | [
"decloud/models/monthly_synthesis_6_s2s1_images_david.py",
"decloud/models/train_from_tfrecords.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCopyright (c) 2020-2022 INRAE\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy... | [
[
"tensorflow.keras.layers.Conv2DTranspose",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.concatenate"
],
[
"tensorflow.keras.callbacks.ModelCheckpoint",
"tensorflow.distribute.experimental.CommunicationOptions",
"tensorflow.keras.callbacks.experimental.BackupAndRestore",
... |
JonathanDZiegler/CTGAN | [
"7b1c110455bf776cf89a661e5ff8425d6519daf5"
] | [
"ctgan/data.py"
] | [
"\"\"\"Data loading.\"\"\"\n\nimport json\n\nimport numpy as np\nimport pandas as pd\n\n\ndef read_csv(csv_filename, meta_filename=None, header=True, discrete=None):\n \"\"\"Read a csv file.\"\"\"\n data = pd.read_csv(csv_filename, header='infer' if header else None)\n\n if meta_filename:\n with ope... | [
[
"numpy.asarray",
"pandas.read_csv"
]
] |
sudodoki/trunklucator | [
"7d5a96d650a50e62b3ad479f72de8d60790e93a8"
] | [
"examples/active_learning/plot_perf.py"
] | [
"import matplotlib as mpl\nimport matplotlib.pyplot as plt\nfrom io import BytesIO\nimport base64\nmpl.use('Agg')\n\ndef plot_performance(performance_history):\n fig, ax = plt.subplots(figsize=(8.5, 6), dpi=130)\n\n ax.plot(performance_history)\n ax.scatter(range(len(performance_history)), performance_hist... | [
[
"matplotlib.use",
"matplotlib.pyplot.cla",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"matplotlib.ticker.MaxNLocator",
"matplotlib.pyplot.close",
"matplotlib.ticker.PercentFormatter"
]
] |
zaxcie/flower_workshop | [
"c879b9e1687e786a1510a640e1b1680375dff172"
] | [
"notebooks/kf-1.0-workshop.py"
] | [
"# -*- coding: utf-8 -*-\n# ---\n# jupyter:\n# jupytext:\n# formats: ipynb,py:light\n# text_representation:\n# extension: .py\n# format_name: light\n# format_version: '1.3'\n# jupytext_version: 0.8.1\n# kernelspec:\n# display_name: Python (dl)\n# language: python\n# n... | [
[
"matplotlib.image.imread",
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.figure"
]
] |
smitkiri/nypd-misconduct-dashboard | [
"2b16d24f33bab7f3b09e8a068a2bb7233d978928"
] | [
"utils.py"
] | [
"import pandas as pd\nimport pickle\n\nimport plotly.graph_objs as go\n\ndef get_command(x, command_key):\n try:\n command = command_key[x]\n except:\n command = float('nan')\n return command\n\ndef get_command_key():\n #Get command abbreviations\n command_df = pd.read_excel('NYPD-Misco... | [
[
"pandas.read_excel",
"pandas.Grouper"
]
] |
eagleanurag/End-to-End-Learning-for-Self-Driving-Cars | [
"0a32d90a6714515b6f0f0366b298b9c6d06119ab"
] | [
"drive.py"
] | [
"import argparse\nimport base64\nfrom io import BytesIO\n\nimport cv2\nimport eventlet.wsgi\nimport numpy as np\nimport socketio\nfrom PIL import Image\nfrom flask import Flask\nfrom keras.models import model_from_json\n\n# Fix error with Keras and TensorFlow\n# tf.python.control_flow_ops = tf\n\n\nsio = socketio.S... | [
[
"numpy.asarray"
]
] |
ramanuzan/JORLDY | [
"be371ad0607e5dba5d5082101c38c6a9f2c96767"
] | [
"jorldy/core/agent/rnd_ppo.py"
] | [
"import torch\n\ntorch.backends.cudnn.benchmark = True\nimport torch.nn.functional as F\nfrom torch.distributions import Normal, Categorical\nimport os\nimport numpy as np\n\nfrom .ppo import PPO\nfrom core.network import Network\n\n\nclass RND_PPO(PPO):\n \"\"\"Random Network Distillation (RND) with PPO agent.\... | [
[
"torch.normal",
"torch.min",
"numpy.random.shuffle",
"torch.multinomial",
"torch.tanh",
"torch.nn.functional.mse_loss",
"torch.distributions.Categorical",
"torch.no_grad",
"numpy.mean",
"torch.distributions.Normal",
"torch.clamp",
"torch.argmax"
]
] |
yukw777/GATA-public | [
"e8c424093377874b395abaf9662f6fb2c553e0f5"
] | [
"action_prediction_dataset.py"
] | [
"import os\nimport json\nfrom os.path import join as pjoin\n\nfrom tqdm import tqdm\n\nimport numpy as np\nimport gym\n\nfrom graph_dataset import GraphDataset\n\n\nclass APData(gym.Env):\n\n FILENAMES_MAP = {\n \"full\": {\n \"train\": \"train.full.json\",\n \"valid\": \"valid.full.... | [
[
"numpy.arange",
"numpy.random.RandomState"
]
] |
s-gv/pymotoplus | [
"873b967747d98d9c9e066496547aa09ce164c8a1"
] | [
"plot.py"
] | [
"# Copyright (c) 2019 Sagar Gubbi. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nimport numpy as np\nimport matplotlib\nimport json\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt\n\ndef main():\n rows = []\n with open('... | [
[
"matplotlib.use",
"numpy.array"
]
] |
kandluis/cs231n | [
"88afdbc37189f54803f361b9812f48843357349e"
] | [
"assignment3/cs231n/classifiers/rnn.py"
] | [
"from builtins import range\nfrom builtins import object\nimport numpy as np\n\nfrom cs231n.layers import *\nfrom cs231n.rnn_layers import *\n\n\nclass CaptioningRNN(object):\n \"\"\"\n A CaptioningRNN produces captions from image features using a recurrent\n neural network.\n\n The RNN receives input v... | [
[
"numpy.dot",
"numpy.sqrt",
"numpy.ones",
"numpy.argmax",
"numpy.random.randn",
"numpy.zeros",
"numpy.sum"
]
] |
hamediramin/ObjectDetectionAPI | [
"984fbc754943c849c55a57923f4223099a1ff88c"
] | [
"research/delf/delf/python/feature_io.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 requi... | [
[
"numpy.array",
"numpy.zeros",
"tensorflow.gfile.FastGFile"
]
] |
JayD1912/image_outpaint | [
"0b47d94c6cbd10f749ed717d7d5f76bba03c0d9d"
] | [
"dataloader.py"
] | [
"import numpy as np\r\nimport os\r\nfrom random import shuffle\r\n\r\nDATA_PATH = \"train\"\r\nTEST_PATH = \"test\"\r\n\r\n\r\nclass Data():\r\n\r\n\tdef __init__(self):\r\n\t\tself.X_counter = 0\r\n\t\tself.file_counter = 0\r\n\t\tself.files = os.listdir(DATA_PATH)\r\n\t\tself.files = [file for file in self.files ... | [
[
"numpy.asarray"
]
] |
xingdi-eric-yuan/gata | [
"059cd2e486adfdb5edc3e2df628d573ee9a3796b"
] | [
"graph_updater.py"
] | [
"import torch\nimport torch.nn as nn\n\nfrom typing import Optional, Dict\n\nfrom layers import GraphEncoder, TextEncoder, ReprAggregator, EncoderMixin\nfrom utils import masked_mean\n\n\nclass GraphUpdater(EncoderMixin, nn.Module):\n def __init__(\n self,\n hidden_dim: int,\n word_emb_dim: ... | [
[
"torch.ones",
"torch.cat",
"torch.zeros",
"torch.nn.Embedding",
"torch.nn.Tanh",
"torch.nn.Linear",
"torch.nn.GRUCell",
"torch.nn.ReLU"
]
] |
EvieQ01/Learning-Feasibility-Different-Dynamics | [
"73786b11137b8ba9840d00ec4d258c1296b0a595"
] | [
"mujoco/setup4/main_gailfo.py"
] | [
"import argparse\nfrom itertools import count\n\nimport gym\nimport gym.spaces\nimport scipy.optimize\nimport numpy as np\nimport math\n\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.nn.functional as F\nfrom models.old_models import *\nfrom replay_memory import Memory\nfrom running... | [
[
"torch.set_default_tensor_type",
"torch.load",
"torch.cat",
"numpy.concatenate",
"numpy.max",
"torch.nn.BCEWithLogitsLoss",
"torch.no_grad",
"numpy.mean",
"torch.cuda.is_available",
"torch.device",
"numpy.exp",
"torch.autograd.Variable",
"numpy.arange",
"tor... |
rafaOrtega14/tennisStats | [
"4f4f92532f6437a24e6c51b8aa5ac106b5d25102"
] | [
"elo_system/elo_recolection_scripts/getTemporalelo.py"
] | [
"import pandas as pd\nimport numpy as np\nimport multiprocessing\n\npd.options.mode.chained_assignment = None\n\ngames=pd.read_csv(\"TrainsetGrass.csv\",low_memory=False)\nplayers=pd.read_csv(\"eloCourt.csv\",low_memory=False)\n\ndef find_eloplayer(ID):\n hard=[]\n clay=[]\n grass=[]\n pos=934959345\n ... | [
[
"pandas.read_csv"
]
] |
giandrea77/RExercises | [
"d435e303775b154d4cbbc25f990eb4b23272039d"
] | [
"Python/standardDeviation.py"
] | [
"#\n# Exerciese from book Data Science - Sinan Ozdemir\n#\n# @since : Fri Apr 9 14:41:38 CEST 2021\n#\n\n### Calculate standard deviance \n#\n# Distanza di un punto dei dati rispetto alla media\n#\nimport numpy\n\ntemps = [32, 32, 31, 28, 29, 31, 39, 32, 32, 35, 26, 29]\n\n# Calculate mean of values \nmean = numpy... | [
[
"numpy.mean",
"numpy.sqrt"
]
] |
adrianc-a/tf-slim | [
"4d4496e5ad26747f0d9f7b8af754ed73d56cede5"
] | [
"tf_slim/nets/overfeat.py"
] | [
"# coding=utf-8\n# Copyright 2016 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... | [
[
"tensorflow.contrib.layers.python.layers.layers.max_pool2d",
"tensorflow.contrib.layers.python.layers.regularizers.l2_regularizer",
"tensorflow.python.ops.init_ops.zeros_initializer",
"tensorflow.contrib.layers.python.layers.layers.dropout",
"tensorflow.python.ops.array_ops.squeeze",
"tens... |
Test-Organization-6/pygmt | [
"0aa04d79dfd5d1aeaec9e4b2e4b43850bd6c0299"
] | [
"pygmt/src/project.py"
] | [
"\"\"\"\nproject - Project data onto lines or great circles, or generate tracks.\n\"\"\"\nimport pandas as pd\nfrom pygmt.clib import Session\nfrom pygmt.exceptions import GMTInvalidInput\nfrom pygmt.helpers import (\n GMTTempFile,\n build_arg_string,\n fmt_docstring,\n kwargs_to_strings,\n use_alias... | [
[
"pandas.read_csv"
]
] |
gnsantos/solidus | [
"ea4ffcf391ee0e9cf775b984a1aa6776c55ae67e"
] | [
"src/girard/series_convergence.py"
] | [
"import numpy as np\n\ndef convergence_matrix(spanning_matrix):\n grammian_matrix = spanning_matrix.T * spanning_matrix\n cm = (-1) * grammian_matrix\n np.fill_diagonal(cm, 1)\n return cm\n\ndef check_convergence(spanning_matrix):\n matrix_for_convergence = convergence_matrix(spanning_matrix)\n co... | [
[
"numpy.linalg.eigvals",
"numpy.fill_diagonal"
]
] |
Vengadore/Segmentation_OPTOS | [
"d15b6480a567c987b10f7bf680672356e68b7e5b"
] | [
"OPTOSTools/Visualization_CNN/Print_Features.py"
] | [
"import cv2\nfrom tensorflow.keras.models import Model\n\n\nclass Model_CNN:\n \"\"\" Model_CNN(model)\n\n - Reads a CNN model and looks in the name of the layers for \"conv\", if found it is saved as an index for extracting feature maps.\n\n model: CNN model to extract feature maps from.\n\n \... | [
[
"tensorflow.keras.models.Model"
]
] |
aimakerspace/synergos_director | [
"c4b10502d7ffa6da4fc29fe675a5042590657996"
] | [
"config.py"
] | [
"#!/usr/bin/env python\n\n####################\n# Required Modules #\n####################\n\n# Generic\nimport json\nimport logging\nimport os\nimport random\nimport subprocess\nfrom collections import defaultdict, OrderedDict\nfrom glob import glob\nfrom pathlib import Path\nfrom string import Template\n\n# Libs\... | [
[
"numpy.random.seed",
"torch.manual_seed",
"torch.cuda.is_available",
"torch.cuda.manual_seed_all",
"torch.device"
]
] |
Riroaki/ERNIE | [
"5d5c68832aa37cefb1d01723c35fc3d74482c8c2"
] | [
"code/run_fewrel.py"
] | [
"# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors and The HugginFace Inc. team.\n# Copyright (c) 2018, 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 ... | [
[
"torch.utils.data.DataLoader",
"torch.FloatTensor",
"torch.nn.Embedding.from_pretrained",
"torch.cuda.manual_seed_all",
"torch.cuda.is_available",
"torch.device",
"torch.distributed.init_process_group",
"torch.utils.data.distributed.DistributedSampler",
"torch.utils.data.Tensor... |
glucklichste/mindspore | [
"9df63697af663836fc18d03fef40715f093a3fa1"
] | [
"mindspore/python/mindspore/train/serialization.py"
] | [
"# Copyright 2020-2021 Huawei Technologies Co., Ltd\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.split",
"numpy.concatenate",
"numpy.frombuffer",
"numpy.fromstring",
"numpy.array_split",
"numpy.random.uniform",
"numpy.array"
]
] |
vossjo/gplearn | [
"105181fd020da11bc36b7e31c95f115dd7f05c21"
] | [
"gplearn/_programparser.py"
] | [
"\"\"\"Genetic Programming in Python, with a scikit-learn inspired API\n\nThe :mod:`gplearn._programparser` module implements symbolic simplification\nof programs via sympy and optimization of numerical parameters via scipy.\n\"\"\"\n\n# Author: Johannes Voss <https://stanford.edu/~vossj/main/>\n#\n# Additions to a... | [
[
"scipy.optimize.fmin",
"numpy.ones_like"
]
] |
alffore/tileimagen | [
"baf7321d9e9c002ef8ec10d4c52883ef8e4f18ed"
] | [
"generaImagenTile/test/ph1.py"
] | [
"\"\"\"\nPrueba para obtencion de histograma\n\n\"\"\"\nimport sys\nimport numpy as np\nimport skimage.color\nimport skimage.io\nimport skimage.viewer\nfrom matplotlib import pyplot as plt\n\n\n# read image, based on command line filename argument;\n# read the image as grayscale from the outset\nimage = skimage.io.... | [
[
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"numpy.histogram",
"matplotlib.pyplot.ylabel"
]
] |
hoppfull/Legacy-Python | [
"43f465bfdb76c91f2ac16aabb0783fdf5f459adb",
"43f465bfdb76c91f2ac16aabb0783fdf5f459adb"
] | [
"PyOpenGL/GLUT/ex10 - ProjectionMatrix - A MESS/main.py",
"PyOpenGL/GLUT/ex06 - hello textures/main.py"
] | [
"import utils_engine, utils_math, utils_resource\nimport OpenGL.GL as GL\nimport OpenGL.GL.shaders as GL_shaders\nimport numpy as np\nimport ctypes as c\n\nclass MyApp(utils_engine.GameEngine):\n def __init__(self, name, width, height):\n utils_engine.GameEngine.__init__(self, name, width, height)\n ... | [
[
"numpy.array"
],
[
"numpy.array"
]
] |
ShansanChu/filter_pruning_fpgm | [
"ea24a5a8aaa2642937a7655eddb5b0c8c8328d3f"
] | [
"dist_filter_torch.py"
] | [
"'''\nfilter pruners with FPGM\n'''\n\nimport argparse\nimport os\nimport json\nimport torch\nimport sys\nimport numpy as np\nimport torch.nn.parallel\nimport torch.utils.data.distributed\nfrom torch.optim.lr_scheduler import StepLR, MultiStepLR\nfrom torchvision import datasets, transforms\nimport time\nfrom model... | [
[
"torch.nn.CrossEntropyLoss",
"torch.ones",
"torch.manual_seed",
"torch.randn",
"torch.utils.data.DataLoader",
"numpy.all",
"torch.no_grad",
"torch.cuda.is_available"
]
] |
robertkarklinsh/faster-more-furious | [
"c7bb659a7937ee62aef8049aeb055a457fcd8fa7"
] | [
"second/pytorch/models/middle.py"
] | [
"import time\n\nimport numpy as np\nimport spconv\nimport torch\nfrom torch import nn\nfrom torch.nn import functional as F\n\nfrom second.pytorch.models.resnet import SparseBasicBlock\nfrom torchplus.nn import Empty, GroupNorm, Sequential\nfrom torchplus.ops.array_ops import gather_nd, scatter_nd\nfrom torchplus.t... | [
[
"torch.nn.ReLU",
"numpy.array",
"torch.full"
]
] |
jnqqq/augur | [
"aef5edca1c8cea2698b6800ced68fa64acae4d76"
] | [
"workers/pull_request_worker/pull_request_worker.py"
] | [
"#SPDX-License-Identifier: MIT\nimport ast\nimport json\nimport logging\nimport os\nimport sys\nimport time\nimport traceback\nfrom workers.worker_git_integration import WorkerGitInterfaceable\nfrom numpy.lib.utils import source\nimport requests\nimport copy\nfrom datetime import datetime\nfrom multiprocessing impo... | [
[
"pandas.read_sql",
"pandas.DataFrame"
]
] |
ChanceDurr/DS-Unit-3-Sprint-1-Software-Engineering | [
"842b0fd9364964b9efa0ca06dfae37f07c1e8947"
] | [
"module4-software-testing-documentation-and-licensing/lambdata/lambdata_chancedurr/mod.py"
] | [
"import pandas as pd\nimport unittest\n\ndef checkNulls(dataframe):\n df = dataframe\n nulls = df.isnull().sum()\n for col, null in nulls.items():\n \tprint(f\"'{col}' has {null} null value(s).\")\n\n\ndef addListToDataframe(alist, dataframe, colName='new_column'):\n newCol = pd.DataFrame(alist, colu... | [
[
"pandas.DataFrame"
]
] |
Ronan-Hix/yt | [
"023680e3a7bd1000d601727e02a55e72b4cbdc75",
"5ca4ab65e7486ee392577b0f24dbf2b56b892679"
] | [
"yt/frontends/nc4_cm1/data_structures.py",
"yt/frontends/amrvac/data_structures.py"
] | [
"import os\nimport stat\nimport weakref\nfrom collections import OrderedDict\n\nimport numpy as np\n\nfrom yt.data_objects.index_subobjects.grid_patch import AMRGridPatch\nfrom yt.data_objects.static_output import Dataset\nfrom yt.geometry.grid_geometry_handler import GridIndex\nfrom yt.utilities.file_handler impor... | [
[
"numpy.array",
"numpy.empty"
],
[
"numpy.sqrt",
"numpy.min",
"numpy.rint",
"numpy.ones",
"numpy.max",
"numpy.array",
"numpy.zeros",
"numpy.empty"
]
] |
viper7882/binance-public-data | [
"94c77de455338b9a6b9bd03aeacbfd637e36c38a"
] | [
"python/example_from_ray_website.py"
] | [
"import ray\nimport pandas as pd\nimport dask.dataframe as dd\n\n# Create a Dataset from a list of Pandas DataFrame objects.\npdf = pd.DataFrame({\"one\": [1, 2, 3], \"two\": [\"a\", \"b\", \"c\"]})\nds = ray.data.from_pandas([ray.put(pdf)])\n\n# Create a Dataset from a Dask-on-Ray DataFrame.\ndask_df = dd.from_pan... | [
[
"pandas.DataFrame"
]
] |
kdaily/Genie | [
"e2ff86938a9cdc9fc0415d4447d68762333b0cea"
] | [
"genie/mafSP.py"
] | [
"from __future__ import absolute_import\nfrom genie import maf, process_functions\nimport os\nimport logging\nimport pandas as pd\nlogger = logging.getLogger(__name__)\n\n\nclass mafSP(maf):\n '''\n MAF SP file format validation / processing\n '''\n\n _fileType = \"mafSP\"\n\n def _validateFilename(s... | [
[
"pandas.read_csv"
]
] |
deptofdefense/pyserializer | [
"2f52664ed96b2640f24d4312b2a93db6c75d0b53"
] | [
"pyserializer/serialize.py"
] | [
"# =================================================================\n#\n# Work of the U.S. Department of Defense, Defense Digital Service.\n# Released as open source under the MIT License. See LICENSE file.\n#\n# =================================================================\n\nimport csv\nimport json\n\nimpor... | [
[
"pandas.DataFrame"
]
] |
ShannonAI/dice_loss_for_NLP | [
"d437bb999185535df46fdb74d1f2f57161331b44"
] | [
"metrics/functional/cls_acc_f1.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# file: cls_acc_f1.py\n# description:\n# compute acc and f1 scores for text classification task.\n\nimport torch\nimport torch.nn.functional as F\n\n\ndef collect_confusion_matrix(y_pred_labels, y_gold_labels, num_classes=2):\n \"\"\"\n compute accuracy and ... | [
[
"torch.nn.functional.one_hot",
"torch.sum",
"torch.tensor",
"torch.stack",
"torch.index_select"
]
] |
janelia-cosem/neuroglancer | [
"add6885da32498a1cfd1075a4c19aae8ffb5a6f2"
] | [
"python/neuroglancer/tool/screenshot.py"
] | [
"#!/usr/bin/env python\n# @license\n# Copyright 2020 Google Inc.\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"numpy.logical_or",
"numpy.load",
"numpy.savez_compressed",
"numpy.zeros"
]
] |
hircumg/keras-text-to-image | [
"365cf61075b04e9a98f69d471f0efd8b7e0adb6f"
] | [
"demo/dcgan_v3_generate.py"
] | [
"import os\nimport sys\nimport numpy as np\nfrom random import shuffle\n\n\ndef main():\n seed = 42\n np.random.seed(seed)\n\n current_dir = os.path.dirname(__file__)\n sys.path.append(os.path.join(current_dir, '..'))\n current_dir = current_dir if current_dir is not '' else '.'\n\n img_dir_path =... | [
[
"numpy.random.seed"
]
] |
hunsooni/sumo-rl | [
"92fb5716c22bf71e6fcf976c5e65c9e47f44a2fc"
] | [
"z.mine/test/ExpTestTrainedModel.py"
] | [
"\n# from https://github.com/ray-project/ray/blob/master/rllib/examples/custom_keras_model.py\nimport argparse\nimport os\n\nimport ray\nfrom ray import tune\nfrom ray.rllib.agents.dqn.distributional_q_tf_model import DistributionalQTFModel\nfrom ray.rllib.models import ModelCatalog\nfrom ray.rllib.models.tf.misc i... | [
[
"tensorflow.reshape",
"tensorflow.constant",
"tensorflow.keras.Model",
"tensorflow.keras.layers.Input"
]
] |
HKUST-KnowComp/MLMET | [
"ae1188a929a5ca6a8e087bb091853b328ea2c7e7"
] | [
"trainweak.py"
] | [
"import datetime\nimport torch\nimport os\nimport logging\nfrom utils import utils\nfrom exp import bertufexp\nimport config\n\n\ndef __setup_logging(to_file):\n log_file = os.path.join(config.DATA_DIR, 'ultrafine/log/{}-{}-{}-{}.log'.format(os.path.splitext(\n os.path.basename(__file__))[0], args.idx, st... | [
[
"torch.device",
"torch.cuda.device_count"
]
] |
Lyken17/taichi | [
"888a1792bd8566c31afc960c64b3c5fe838d444d"
] | [
"python/taichi/lang/kernel_impl.py"
] | [
"import ast\nimport functools\nimport inspect\nimport re\nimport sys\nimport textwrap\nimport traceback\n\nimport numpy as np\nimport taichi.lang\nfrom taichi.core.util import ti_core as _ti_core\nfrom taichi.lang import impl, util\nfrom taichi.lang.ast.checkers import KernelSimplicityASTChecker\nfrom taichi.lang.a... | [
[
"numpy.ascontiguousarray"
]
] |
an1018/PaddleOCR | [
"0a8ca67a0c4a4ed468e82a575cc64ce73f21e068"
] | [
"tests/compare_results.py"
] | [
"import numpy as np\nimport os\nimport subprocess\nimport json\nimport argparse\nimport glob\n\n\ndef init_args():\n parser = argparse.ArgumentParser()\n # params for testing assert allclose\n parser.add_argument(\"--atol\", type=float, default=1e-3)\n parser.add_argument(\"--rtol\", type=float, default... | [
[
"numpy.array"
]
] |
Tsinghua-OpenICV/carla_icv_bridge | [
"4d5f8c26b1847dbb16a81fe43f146bf4a9a8da5e"
] | [
"thirdparty/cv_bridge/core.py"
] | [
"# Software License Agreement (BSD License)\n#\n# Copyright (c) 2011, Willow Garage, Inc.\n# Copyright (c) 2016, Tal Regev.\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# * Redi... | [
[
"numpy.ndarray",
"numpy.dtype"
]
] |
jiafulow/emtf-nnet | [
"70a6c747c221178f9db940197ea886bdb60bf3ba"
] | [
"emtf_nnet/keras/layers/mutated_dense.py"
] | [
"# The following source code was originally obtained from:\n# https://github.com/keras-team/keras/blob/r2.6/keras/layers/core.py#L1066-L1270\n# ==============================================================================\n\n# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apa... | [
[
"tensorflow.compat.v2.math.reduce_mean",
"tensorflow.compat.v2.raw_ops.MatMul",
"tensorflow.compat.v2.nn.bias_add",
"tensorflow.compat.v2.cast",
"tensorflow.compat.v2.math.reciprocal_no_nan",
"tensorflow.compat.v2.raw_ops.Mul",
"tensorflow.compat.v2.math.is_finite",
"tensorflow.com... |
cracraft/jwql | [
"030c1663bc433465e01ad803e1578a2bc53035f4"
] | [
"jwql/tests/test_calculations.py"
] | [
"#! /usr/bin/env python\n\n\"\"\"Tests for the ``calculations`` module.\n\nAuthors\n-------\n\n - Bryan Hilbert\n\nUse\n---\n\n These tests can be run via the command line (omit the ``-s`` to\n suppress verbose output to stdout):\n ::\n\n pytest -s test_calculations.py\n\"\"\"\n\nimport numpy as ... | [
[
"numpy.arange",
"numpy.all",
"numpy.max",
"numpy.random.normal",
"numpy.array",
"numpy.histogram",
"numpy.zeros",
"numpy.isclose"
]
] |
530824679/side_camera_perception | [
"b83fb67b3128a048477def1330bac56f703766e6"
] | [
"network/detecthead.py"
] | [
"#! /usr/bin/env python3\n# coding=utf-8\n#================================================================\n# Copyright (C) 2020 * Ltd. All rights reserved.\n#\n# Editor : pycharm\n# File name : train.py\n# Author : oscar chen\n# Created date: 2020-10-13 9:50:26\n# Description :\n#\n#======... | [
[
"tensorflow.variable_scope",
"numpy.array",
"tensorflow.concat",
"tensorflow.shape"
]
] |
lheinke/pysynphot | [
"b4a5eda2a6227b2f5782da22140f00fc087439cb"
] | [
"pysynphot/test/test_spectral_element.py"
] | [
"from __future__ import absolute_import, division, print_function\n\nimport numpy as np\nimport pytest\nfrom numpy.testing import assert_allclose\n\nfrom ..obsbandpass import ObsBandpass\nfrom ..spectrum import ArraySpectralElement\n\n\ndef test_sample_units():\n \"\"\"Test that SpectralElement.sample respects i... | [
[
"numpy.linspace"
]
] |
MannyGrewal/Manny.CIFAR | [
"03aefd7d89728a31e9bf6d0e44f083315816d289"
] | [
"Manny.CIFAR/CIFAR/CIFARPlotter.py"
] | [
"import math\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.gridspec as gridspec\nimport pylab\n\n\n########################################################################\n# 2017 - Manny Grewal\n# Purpose of this class is to visualise a list of images from the CIFAR dataset\n\n# How many... | [
[
"numpy.reshape",
"matplotlib.pyplot.subplot",
"matplotlib.gridspec.GridSpec",
"matplotlib.pyplot.figure"
]
] |
YLTsai0609/python-topic-modeling | [
"13f6e22d31ebc581cc1bd68e1b05ec560020248d"
] | [
"ptm/lda_gibbs.py"
] | [
"from __future__ import print_function\n\nimport time\n\nimport numpy as np\nfrom scipy.special import gammaln\nfrom six.moves import xrange\n\nfrom .base import BaseGibbsParamTopicModel\nfrom .formatted_logger import formatted_logger\nfrom .utils import sampling_from_dist\n\nlogger = formatted_logger(\"GibbsLDA\")... | [
[
"scipy.special.gammaln"
]
] |
RKorzeniowski/Cutout | [
"932a612d80071dd378c568a1633c711690de8608"
] | [
"model/resnet.py"
] | [
"'''ResNet18/34/50/101/152 in Pytorch.'''\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom torch.autograd import Variable\n\n\ndef conv3x3(in_planes, out_planes, stride=1):\n return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias=False)\n\n\nclass Basic... | [
[
"torch.nn.Sequential",
"torch.randn",
"torch.nn.functional.avg_pool2d",
"torch.nn.Conv2d",
"torch.nn.Linear",
"torch.nn.functional.relu",
"torch.nn.BatchNorm2d"
]
] |
MarkintoshZ/FontTransformer | [
"5051db0d38a4b8ae7602fb22c75c008f9f59d2d1"
] | [
"vae.py"
] | [
"from keras.layers import Dense, Conv2D, Deconvolution2D, \\\n MaxPool2D, UpSampling2D, Flatten, Dropout, Reshape,\\\n Concatenate, Lambda\nfrom keras.models import Sequential, Model, load_model, Input\nfrom keras.losses import mse, categorical_crossentropy\nfrom keras.utils import to_categorical\nfrom keras ... | [
[
"numpy.array",
"sklearn.preprocessing.LabelEncoder",
"numpy.clip"
]
] |
Venkat-77/Dr-VVR-Greyatom_olympic-hero | [
"695f93628fa1c69022cf55b7fe9b4bd1b86dfd28"
] | [
"code.py"
] | [
"# --------------\n#Importing header files\r\nimport pandas as pd\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\n#Path of the file\r\npath\r\ndata = pd.read_csv(path)\r\ndata = pd.DataFrame(data)\r\ndata.rename(columns = {'Total':'Total_Medals'}, inplace = True) \r\ndata.head(10)\r\n\r\n\r\n#Code start... | [
[
"pandas.read_csv",
"pandas.DataFrame",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.bar",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.xticks",
"matplotlib.pyplot.show",
"numpy.where",
"matplotlib.pyplot.figure"
]
] |
Kerilk/ytopt | [
"05cc166d76dbf2a9ec77f3c9ed435ea3ebcb104c"
] | [
"ytopt/search/async_search.py"
] | [
"#!/usr/bin/env python\nfrom __future__ import print_function\n#from NeuralNetworksDropoutRegressor import NeuralNetworksDropoutRegressor\nfrom mpi4py import MPI\nimport re\nimport os\nimport sys\nimport time\nimport json\nimport math\nfrom skopt import Optimizer\nimport os\nimport argparse\n\nfrom skopt.acquisitio... | [
[
"numpy.where",
"numpy.min"
]
] |
enricogandini/paper_similarity_prediction | [
"ef7762edc8c55ccfcb5c791685eac8ef93f0d554"
] | [
"webapp/survey_molecular_similarity/retrieve_user_data.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Created on Fri Mar 26 16:35:26 2021\n# Copyright © Enrico Gandini <enricogandini93@gmail.com>\n#\n# Distributed under terms of the MIT License.\n\n\"\"\"Retrieve data from database, and save it as CSV files\nthat can be further analyzed.\n\nFiles will be saved ... | [
[
"pandas.merge",
"pandas.read_csv",
"pandas.read_sql"
]
] |
eliavw/residual-anomaly-detector | [
"8840a56aa226120456d0af8e6cca927a7e0e712b"
] | [
"src/residual_anomaly_detector/exps/StarAiFlow.py"
] | [
"import time\nimport warnings\nfrom pathlib import Path\n\nimport mercs\nimport numpy as np\n\n\nfrom mercs import Mercs\nimport pandas as pd\nfrom mercs.utils.encoding import code_to_query, query_to_code\nfrom sklearn.metrics import (\n accuracy_score,\n average_precision_score,\n f1_score,\n roc_auc_s... | [
[
"numpy.isnan",
"sklearn.metrics.f1_score",
"pandas.read_csv",
"sklearn.metrics.accuracy_score"
]
] |
JDKdevStudio/GraficadorFunciones | [
"e8505b47f80fbd189b1825537cdd115859b980d4"
] | [
"main.py"
] | [
"# Importar librerías\r\nimport tkinter\r\nfrom matplotlib.figure import Figure\r\nfrom matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk\r\nfrom matplotlib import style\r\nimport matplotlib.animation as animation\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\nfrom tkinte... | [
[
"matplotlib.figure.Figure",
"matplotlib.style.use",
"numpy.arange",
"matplotlib.animation.FuncAnimation",
"matplotlib.backends.backend_tkagg.NavigationToolbar2Tk",
"matplotlib.pyplot.show",
"matplotlib.backends.backend_tkagg.FigureCanvasTkAgg"
]
] |
rohitbhio/neon | [
"4fb5ff6a4b622facfb07b28da94b992159aac8cc"
] | [
"examples/faster-rcnn/generate_anchors.py"
] | [
"# --------------------------------------------------------\n# Faster R-CNN\n# Copyright (c) 2015 Microsoft\n# Licensed under The MIT License [see LICENSE for details]\n# Written by Ross Girshick and Sean Bell\n# --------------------------------------------------------\nfrom __future__ import division\nfrom __futur... | [
[
"numpy.hstack",
"numpy.sqrt",
"numpy.meshgrid",
"numpy.arange",
"numpy.round",
"numpy.array"
]
] |
yangkevin2/count-sketch | [
"74f180ff1cecd54f6810d139d9b816aa97abd84a"
] | [
"examples/lm1b/unit_test/sampled_softmax_utest.py"
] | [
"import unittest\nimport numpy as np\n\nimport torch\nfrom torch.autograd import Variable\nimport torch.nn as nn\n\nimport model\nfrom log_uniform import LogUniformSampler\n\ndef EXPECT_NEAR(x, y, epsilon):\n return np.all(abs(x - y) <= epsilon)\n\nclass ComputeSampledLogitsTest(unittest.TestCase):\n def _Generat... | [
[
"numpy.dot",
"torch.nn.CrossEntropyLoss",
"torch.LongTensor",
"numpy.log",
"numpy.ones_like",
"numpy.random.seed",
"numpy.amax",
"numpy.squeeze",
"torch.from_numpy",
"numpy.full",
"numpy.concatenate",
"numpy.random.randn",
"numpy.zeros_like",
"numpy.exp",
... |
lubo93/vaccination | [
"4ddaf44455e72e9fc80cee03a6021f3ee754adfe"
] | [
"model/vaccination_preference_diagrams/model_phasediagram_numax_I0_1.py"
] | [
"import matplotlib\nmatplotlib.use('Agg')\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom lib.simulation import epidemic_model\nfrom matplotlib import rcParams, colors\nfrom matplotlib.colors import LinearSegmentedColormap\n\n# customized settings\nparams = { # 'backend': 'ps',\n 'font.family': 's... | [
[
"matplotlib.pyplot.legend",
"numpy.sqrt",
"numpy.linspace",
"numpy.asarray",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.tight_layout",
"numpy.ravel",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.margins",
"matplotlib.pyplot.savefig",
"matplotlib.rcParams.update",
... |
Sn0wfir3/cogmods | [
"b7a5867e2daa160148872f97a855baab1f645d39"
] | [
"actrneuro/iccm2012_preofficial_ACT-R_7/evaluate.py"
] | [
"import numpy as np\nimport os\nfrom scipy import stats\nimport matplotlib.pyplot as plt\nimport matplotlib\n\n\ndef evaluate( output_path=\"./plots\", filename=\"actr7\"):\n bold_table = np.zeros([13, 60])\n bold_table_divider = np.zeros([13, 60])\n boldfiles = [x[0] for x in os.walk(\"./log/bolds\... | [
[
"matplotlib.pyplot.gca",
"matplotlib.pyplot.tight_layout",
"matplotlib.use",
"matplotlib.pyplot.savefig",
"numpy.max",
"matplotlib.pyplot.clf",
"numpy.argsort",
"matplotlib.pyplot.xlabel",
"numpy.array",
"numpy.zeros",
"matplotlib.pyplot.ylabel"
]
] |
Ling-fengZhang/lab_gui | [
"5d79298a9099bfa5f879568d40bcf68ef4604f3d"
] | [
"MainWindow.py"
] | [
"from Model.Instruments.Camera.Chameleon import Chameleon\nfrom Utilities.Helper import settings, Helper\nfrom Utilities.IO import IOHelper\nfrom PyQt5.QtCore import *\nfrom PyQt5.QtWidgets import *\nfrom PyQt5.QtGui import *\n\nfrom Widget.CoreWidget.PlotMainWindowWidget import PlotMainWindow\nfrom Widget.CoreWidg... | [
[
"numpy.array"
]
] |
SuperH-0630/HGSSystem | [
"4bd0b18cec810df4915fea9473adbea6faea4fe2"
] | [
"tk_ui/admin_program.py"
] | [
"import abc\nimport datetime\nimport tkinter as tk\nimport tkinter.ttk as ttk\nfrom tkinter.filedialog import askdirectory, askopenfilename, asksaveasfilename\nfrom math import ceil\n\nfrom matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk\nfrom matplotlib.axes import Axes\nimport num... | [
[
"matplotlib.figure.Figure",
"matplotlib.backends.backend_tkagg.NavigationToolbar2Tk",
"numpy.array",
"numpy.zeros",
"matplotlib.backends.backend_tkagg.FigureCanvasTkAgg"
]
] |
imdeepmind/AgeGenderNetwork | [
"845a8b8f15aa9ce1ae6ff55f8f3ca9213d490323"
] | [
"model/process_selfie_data.py"
] | [
"## IMPORTING THE DEPENDENCIES\nimport pandas as pd\nimport numpy as np\n\nselfie_data = './dataset/unprocessed/Selfie-dataset/selfie_dataset.txt'\nfile = open(selfie_data, 'r')\nselfie_file = file.read()\n\nselfie_file_lines = selfie_file.split('\\n')\n\nun_selfie_data = []\nfor selfie in selfie_file_lines:\n t... | [
[
"pandas.DataFrame"
]
] |
fan84sunny/2021-training-courses | [
"b1327d572563b3928e740d92d2cf202315096093"
] | [
"libs/functional.py"
] | [
"from typing import List, Union, Tuple\n\nimport numpy as np\n\n\nclass Variable:\n\n def __init__(self, value=None):\n self.value = value\n self.grad = None\n\n\nclass Polynomial:\n\n def __init__(self, a: List = None):\n self.a = np.array(a)\n\n def __call__(self, x: Union[float, int... | [
[
"numpy.random.shuffle",
"numpy.random.randn",
"numpy.array",
"numpy.zeros",
"numpy.sum",
"numpy.vstack"
]
] |
shaysw/anyway | [
"35dec531fd4ac79c99d09e684027df017e989ddc"
] | [
"anyway/widgets/suburban_widgets/motorcycle_accidents_vs_all_accidents_widget.py"
] | [
"import datetime\r\nfrom typing import List\r\n\r\nimport pandas as pd\r\nfrom sqlalchemy import case, literal_column, func, distinct, desc\r\n\r\nfrom anyway.request_params import RequestParams\r\nfrom anyway.backend_constants import BE_CONST, AccidentSeverity\r\nfrom anyway.widgets.widget_utils import get_query\r... | [
[
"pandas.read_sql_query"
]
] |
qinxuye/mars | [
"3b10fd4b40fbaf1526c179709fdbcc3a1f899ab7"
] | [
"mars/services/task/tests/test_service.py"
] | [
"# Copyright 1999-2021 Alibaba Group Holding Ltd.\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 appl... | [
[
"numpy.concatenate",
"numpy.arange"
]
] |
simonkamronn/deepstate | [
"74878840c609dd92fd5410e1db111c834b68f357"
] | [
"deepstate.py"
] | [
"import tensorflow as tf\nfrom tensorflow.contrib.eager.python import tfe\nimport tensorflow_probability as tfp\nfrom tensorflow.keras import layers\nimport numpy as np\nimport argparse\nimport sys\nfrom collections import namedtuple\n\n\nparameter_class = namedtuple('parameters', ['A', 'C', 'Q', 'R', 'mu', 'sigma'... | [
[
"tensorflow.enable_eager_execution",
"tensorflow.concat",
"tensorflow.zeros",
"tensorflow.reduce_sum",
"tensorflow.stack",
"tensorflow.linspace",
"tensorflow.cholesky",
"tensorflow.Variable",
"tensorflow.contrib.eager.python.tfe.implicit_gradients",
"tensorflow.app.run",
... |
akirato0223/test | [
"d530ee17ca839fcf863f9e08f9615e3856e02e3d"
] | [
"edge/server.py"
] | [
"# Copyright 2020 Adap GmbH. 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 required by appli... | [
[
"numpy.atleast_1d",
"torch.utils.data.DataLoader",
"torch.cuda.is_available"
]
] |
icecube/voka | [
"29a5d4439cf13d35e29b9308dcbf54c799be3b83"
] | [
"examples/two_sample_vs_voka.py"
] | [
"#!/usr/bin/env python3\n\n'''\nThis example exercises the two sample statistical tests\navailable from scipy:\n* scipy.stats.ttest_ind\n* scipy.stats.ks_2samp\n* scipy.stats.anderson_ksamp\n* scipy.stats.epps_singleton_2samp\n* scipy.stats.mannwhitneyu\n* scipy.stats.ranksums\n* scipy.stats.wilcoxon\n* scipy.stats... | [
[
"numpy.arange",
"numpy.random.normal",
"numpy.histogram"
]
] |
kprohith/waymo-open-dataset | [
"9c519584cb95c6e2d3c909722298978668075542"
] | [
"waymo_open_dataset/utils/range_image_utils.py"
] | [
"# Copyright 2019 The Waymo Open Dataset 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# Unl... | [
[
"tensorflow.stack",
"tensorflow.cast",
"tensorflow.equal",
"tensorflow.map_fn",
"tensorflow.where",
"tensorflow.argmin",
"tensorflow.logical_or",
"tensorflow.assert_less",
"tensorflow.name_scope",
"tensorflow.tile",
"tensorflow.norm",
"tensorflow.gather_nd",
"te... |
adithyasunil26/LID-Excitation-Features | [
"ae15e3f24016723ddbb832421746d2c0ef64fd03"
] | [
"classifier.py"
] | [
"import numpy as np\nimport pandas as pd\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.tree import DecisionTreeClassifier\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn import preprocessing\nfrom sklearn.metrics import classification_report\n\nprint(\"Loading data...\")\ndf... | [
[
"pandas.read_csv",
"sklearn.ensemble.RandomForestClassifier",
"sklearn.model_selection.train_test_split",
"sklearn.preprocessing.normalize",
"sklearn.tree.DecisionTreeClassifier"
]
] |
mjevans26/Satellite_ComputerVision | [
"013c69c5cf6f86126e6ad2d715f8b13b300e29a8"
] | [
"azure/train_landcover.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Sep 21 12:13:11 2021\n\n@author: MEvans\n\"\"\"\n\nfrom utils import model_tools, processing\nfrom utils.prediction_tools import makePredDataset, callback_predictions, plot_to_image\nfrom matplotlib import pyplot as plt\nimport argparse\nimport os\nimport glob\nimpor... | [
[
"tensorflow.keras.callbacks.LambdaCallback",
"matplotlib.pyplot.imshow",
"tensorflow.distribute.MirroredStrategy",
"tensorflow.keras.metrics.MeanSquaredError",
"matplotlib.pyplot.figure",
"tensorflow.summary.image",
"tensorflow.io.FixedLenFeature",
"tensorflow.keras.optimizers.Adam... |
ZGChung/P2E_FreqPred | [
"79544e9547a94b0d492d14af43ccf271cb175c47"
] | [
"Time_Series/mainTestOfTSModels.py"
] | [
"from warnings import simplefilter\nimport warnings\nfrom statsmodels.tools.sm_exceptions import ConvergenceWarning\nimport pandas as pd\nimport numpy as np\nfrom datetime import datetime\nimport matplotlib.pyplot as plt\nimport matplotlib.image as mpimg\nimport time\nimport sklearn as sk\nimport sklearn.metrics as... | [
[
"pandas.read_csv",
"pandas.Series",
"matplotlib.pyplot.title",
"sklearn.neighbors.KNeighborsRegressor",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
ivukotic/rl_examples | [
"b6ca1a01429934cc936baa94753b3e08677e0fae"
] | [
"gym-link/gym_link/envs/link_env.py"
] | [
"\"\"\"\nOne network link environment.\nLink has changing base load.\nActions: start 0 to 4 more transfers\nReward: percentage of free rate used. Gets negative if link fully saturated\nFiles sizes are normally distributed (absolute values).\n\"\"\"\n\nimport math\nfrom collections import deque\n\nimport gym\nfrom g... | [
[
"numpy.max",
"numpy.random.ranf",
"numpy.array",
"numpy.random.standard_normal"
]
] |
anton-muravev/ased | [
"16ddb70ac3e46556cf49569915df0165a6fb7d16"
] | [
"scripts/ased_search_inversion1_cifar100.py"
] | [
"# -*- coding: utf-8 -*-\n## INVERSION1 EXPERIMENT ON CIFAR100\n\nimport utorch\nimport ased\nimport ased_util\nimport sys\nimport time\nimport numpy as np\nfrom astore import Astore\nfrom sklearn.model_selection import StratifiedShuffleSplit\nimport argparse\n\nimport torch\nimport torch.multiprocessing as mp\nimp... | [
[
"torch.nn.CrossEntropyLoss",
"torch.cuda.set_device",
"numpy.random.seed",
"numpy.arange",
"torch.manual_seed",
"torch.utils.data.sampler.SubsetRandomSampler",
"numpy.linalg.norm",
"numpy.stack",
"numpy.argsort",
"sklearn.model_selection.StratifiedShuffleSplit",
"numpy.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.