repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
GuRongfei/BPG-DBS
[ "2cd2d1491a4119cf6016ef200868fe4c6d40e88a" ]
[ "exp/01_main.py" ]
[ "import warnings\nwarnings.filterwarnings(\"ignore\")\nimport os\nos.environ[\"TF_CPP_MIN_LOG_LEVEL\"] = \"3\"\n\nimport gym\nimport gym_oscillator\nimport oscillator_cpp\nfrom stable_baselines.common import set_global_seeds\n\nfrom BPG.policy_debug import MlpPolicy, FeedForwardPolicy\n#from BPG.policy import MlpPo...
[ [ "matplotlib.use", "matplotlib.pyplot.savefig", "numpy.array", "matplotlib.pyplot.figure" ] ]
aschonfeld/pandas
[ "65d9fe445da529a81502fd0692cb80de1494ac2c" ]
[ "pandas/tests/groupby/transform/test_transform.py" ]
[ "\"\"\" test with the .transform \"\"\"\nfrom io import StringIO\n\nimport numpy as np\nimport pytest\n\nfrom pandas._libs import groupby\n\nfrom pandas.core.dtypes.common import ensure_platform_int, is_timedelta64_dtype\n\nimport pandas as pd\nfrom pandas import (\n Categorical,\n DataFrame,\n MultiIndex,...
[ [ "numpy.repeat", "pandas.Grouper", "numpy.tile", "numpy.mean", "pandas.Timestamp", "pandas._libs.groupby.group_cumsum", "pandas.concat", "pandas._testing.assert_series_equal", "numpy.dtype", "numpy.zeros_like", "pandas.DataFrame", "pandas.timedelta_range", "panda...
witwitchayakarn/6DVNET
[ "f13b35162ad90fa49d777f3a41383e9d34eb4820", "f13b35162ad90fa49d777f3a41383e9d34eb4820", "f13b35162ad90fa49d777f3a41383e9d34eb4820" ]
[ "tools/ApolloScape_car_instance/utils/eval_utils.py", "tools/test_net.py", "demo/demo_kitti_instance.py" ]
[ "\"\"\"\n Brief: Compute similarity metrics for evaluation\n Author: wangpeng54@baidu.com\n Date: 2018/6/20\n\"\"\"\n\nimport numpy as np\nimport utils.utils as uts\n\n\ndef pose_similarity(dt, gt, shape_sim_mat):\n \"\"\"compute pose similarity in terms of shape, translation and rotation\n Input:\n ...
[ [ "numpy.logical_or", "numpy.uint32", "numpy.linalg.norm", "numpy.reshape", "numpy.arccos", "numpy.sum", "numpy.tile", "numpy.logical_and", "numpy.loadtxt" ], [ "torch.distributed.init_process_group", "torch.cuda.set_device" ], [ "numpy.array", "matplotlib...
kernelrich/h2o-3
[ "16bd6be6d0ac22b037cb55b4c647e63e2b112e1e" ]
[ "h2o-py/h2o/two_dim_table.py" ]
[ "# -*- encoding: utf-8 -*-\n\"\"\"\nA two dimensional table having row and column headers.\n\"\"\"\nfrom __future__ import absolute_import, division, print_function, unicode_literals\nfrom h2o.utils.compatibility import * # NOQA\n\nimport copy\n\nfrom h2o.display import H2ODisplay\nfrom h2o.exceptions import H2OVa...
[ [ "pandas.DataFrame" ] ]
victor-psiori/vit-explain
[ "53c93d1ab75b4d2d5e8242e11c51edd6a09111a0" ]
[ "vit_explain.py" ]
[ "import argparse\nimport sys\nimport torch\nfrom PIL import Image\nfrom torchvision import transforms\nimport numpy as np\nimport cv2\n\nfrom vit_rollout import VITAttentionRollout\nfrom vit_grad_rollout import VITAttentionGradRollout\n\n\ndef get_args():\n parser = argparse.ArgumentParser()\n parser.add_argu...
[ [ "numpy.max", "numpy.uint8", "numpy.array", "numpy.float32", "torch.cuda.is_available", "torch.hub.load" ] ]
awalter-bnl/pyOlog
[ "61d5e3db02ba3133b39187a85f774d6c80dd1ff9" ]
[ "pyOlog/ophyd_tools.py" ]
[ "\n\"\"\"Command Line Interface to opyd objects\"\"\"\n\n\nimport time\nimport functools\nimport sys\nimport warnings\nfrom contextlib import contextmanager, closing\nfrom operator import attrgetter\nfrom io import StringIO\nimport collections\n\nimport IPython\nfrom IPython.utils.coloransi import TermColors as tc\...
[ [ "numpy.round" ] ]
harrison6462/AdverserialMLGroup
[ "950b6a5c810678de38729be5fc3975fabde4b32e" ]
[ "illusions.py" ]
[ "import cv2\nimport numpy as np\nimport os\ndef is_safe_access(img, x : int, y : int):\n w, h = img.shape[1], img.shape[0]\n return not (x >= w or x < 0 or y < 0 or y >= h)\n\ndef get_pixel_safe(img, x, y):\n w, h = img.shape[1], img.shape[0]\n if not is_safe_access(img, x, y):\n return 0\n return img[y][x]...
[ [ "numpy.array", "numpy.zeros", "numpy.append" ] ]
gabrielsluz/vince
[ "f4e17a2cf70c080a7e01e46d15537e33224c869b" ]
[ "datasets/npz_dataset.py" ]
[ "import numpy as np\nimport torch\nfrom dg_util.python_utils import misc_util\nfrom dg_util.python_utils import pytorch_util as pt_util\n\nfrom dg_util.python_utils.tensor_dataset import TensorDataset\n\n\nclass NPZDataset(TensorDataset):\n \"\"\"\n Convenience class for fast reading of saved numpy image arra...
[ [ "numpy.random.seed", "torch.no_grad" ] ]
hina-shah/US-famli
[ "f927c89ec9cb51f9e511bbdfa2f59ce15e0e8730" ]
[ "src/py/dl/nn_v2/gru_ga_nn.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport numpy as np\nimport tensorflow as tf\nfrom tensorflow.keras import layers\nimport json\nimport os\nimport glob\nimport sys\n\nclass Attention(layers.Layer):\n def __init__(self, k=25, mask=No...
[ [ "tensorflow.exp", "tensorflow.reshape", "tensorflow.function", "tensorflow.keras.layers.Dense", "tensorflow.keras.layers.GaussianNoise", "tensorflow.keras.Model", "tensorflow.nn.softmax", "tensorflow.keras.layers.BatchNormalization", "tensorflow.cast", "tensorflow.shape", ...
kxzxvbk/DI-engine
[ "268d77db3cb54401b2cfc83e2bc3ec87c31e7b83", "268d77db3cb54401b2cfc83e2bc3ec87c31e7b83" ]
[ "ding/utils/data/dataset.py", "ding/policy/decision_transformer.py" ]
[ "from typing import List, Dict, Tuple\nimport pickle\nimport torch\nimport numpy as np\nfrom ditk import logging\nfrom copy import deepcopy\n\nfrom easydict import EasyDict\nfrom torch.utils.data import Dataset\n\nfrom ding.utils import DATASET_REGISTRY, import_module\nfrom ding.rl_utils import discount_cumsum\n\n\...
[ [ "numpy.concatenate", "torch.zeros", "numpy.array", "torch.arange", "numpy.mean", "torch.from_numpy", "torch.ones", "numpy.std", "numpy.random.randint", "torch.tensor" ], [ "torch.zeros", "torch.device", "torch.arange", "torch.no_grad", "torch.from_nu...
SanTelva/TAIGA
[ "f8956accf4535a2a54f4da66f2a66f41874db682" ]
[ "test.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Sun Jan 17 10:39:01 2021\r\n\r\n@author: Asus\r\n\"\"\"\r\nimport pandas as pd\r\nimport os\r\n \r\nfiles = [f for f in os.listdir('.') if f.startswith(\"pointing_data_2020\")]\r\nfile = files[0]\r\nfile2 = files[1]\r\ndf = pd.read_csv(file)\r\n\r\n\r\n#def se...
[ [ "pandas.read_csv" ] ]
riju-pal/QCoDeS_riju
[ "042c5e25ab9e40b20c316b4055c4842844834d1e" ]
[ "qcodes/tests/validators/test_bool.py" ]
[ "import math\n\nimport numpy as np\nimport pytest\nfrom qcodes.utils.validators import Bool\n\nfrom .conftest import AClass, a_func\n\nBOOLS = [True, False, np.bool8(True), np.bool8(False)]\nNOTBOOLS = [0, 1, 10, -1, 100, 1000000, int(-1e15), int(1e15),\n 0.1, -0.1, 1.0, 3.5, -2.3e6, 5.5e15, 1.34e-10, -2...
[ [ "numpy.bool8" ] ]
zhaotf16/cnpick
[ "6fb0a07f02e4d025ce0d45875a1cd291d96f8194" ]
[ "src/lib/datasets/sample/ctdet.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport torch.utils.data as data\nimport numpy as np\nimport torch\nimport json\nimport cv2\nimport os\nfrom utils.image import flip, color_aug\nfrom utils.image import get_affine_transform, affine_tran...
[ [ "numpy.concatenate", "numpy.array", "numpy.zeros", "numpy.random.randn", "numpy.random.randint", "numpy.arange", "numpy.clip", "numpy.random.random" ] ]
mengjian0502/eee511_team03_finalproject
[ "8003590412d0d4a614e56ab9515e386097d25040" ]
[ "utils_/Quan.py" ]
[ "import torch\nfrom torch.autograd.function import InplaceFunction, Function\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport math\n\n\ndef _mean(p, dim):\n \"\"\"Computes the mean over all dimensions except dim\"\"\"\n if dim is None:\n return p.mean()\n elif dim == 0:\n outpu...
[ [ "torch.zeros", "torch.nn.functional.linear", "torch.nn.functional.conv2d", "torch.Tensor" ] ]
JamieJQuinn/Melvin-python
[ "4094e2c21e302304d75a961f14887edbbfba2964" ]
[ "examples/kelvin_helmholtz_instability.py" ]
[ "#!/usr/bin/env python3\n\nfrom functools import partial\nimport numpy as np\nfrom numpy.random import default_rng\n\nimport cupy\nimport time\n\nfrom melvin import Parameters, Simulation, BasisFunctions\n\nfrom melvin.utility import (\n calc_kinetic_energy,\n calc_velocity_from_vorticity,\n init_var_with_...
[ [ "numpy.linspace", "numpy.meshgrid", "numpy.random.default_rng", "numpy.sqrt" ] ]
lucasmonterocordal/MLOpsPython
[ "c29c461d8d59c961c6673920cea898d90c2ca3f8" ]
[ "nemesis/training/train.py" ]
[ "\"\"\"\nCopyright (C) Microsoft Corporation. All rights reserved.​\n ​\nMicrosoft Corporation (“Microsoft”) grants you a nonexclusive, perpetual,\nroyalty-free right to use, copy, and modify the software code provided by us\n(\"Software Code\"). You may not sublicense the Software Code or any use of it\n(except to...
[ [ "numpy.array", "sklearn.metrics.accuracy_score", "sklearn.svm.SVC", "numpy.where", "numpy.unique", "sklearn.model_selection.train_test_split", "pandas.read_csv", "numpy.vstack" ] ]
binnisb/CONCOCT
[ "9246dc947b24256c4eab1f7b081c7a21aebdd95b" ]
[ "scripts/fasta_to_features.py" ]
[ "#!/usr/bin/env python\nimport numpy as np\nimport pandas as pd\nfrom itertools import product\nfrom Bio import SeqIO\n\n# optimized sliding window function from\n# http://stackoverflow.com/a/7636587\nfrom itertools import tee, izip\n\ndef window(seq,n):\n els = tee(seq,n)\n for i,el in enumerate(els):\n ...
[ [ "pandas.DataFrame" ] ]
HD-Explosion/Flask_GUI
[ "70ba0a99f4d22637db0c080d23339673fb5b56b7" ]
[ "app/reader.py" ]
[ "import csv as cs\nimport os\nfrom pathlib import Path\nfrom app import app\nimport pandas as pd\nfrom app.routes import app\n\ndef fileread(filename):\n Time_f = 's'\n # Open csv file\n File_name = str(filename)\n file_to_open = os.path.join(app.config['USER_FOLDER'],File_name)\n csvFile = open(file...
[ [ "pandas.DataFrame" ] ]
Honglin20/Thesis
[ "ec344f82d8200ce006082ad32d75a905314be77e" ]
[ "TCNN/datasets/mnist.py" ]
[ "\"\"\"CIFAR10 small images classification dataset.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport keras.backend as K\nimport numpy as np\nimport os\n\n\nimport sys\nfrom six.moves import cPickle\n\n\ndef load_batch(fpath, label_key=...
[ [ "numpy.load" ] ]
eth-sri/statdp
[ "3b9cb64ed6d3c71d97eb79ba35f68b1fab625f57" ]
[ "statdp/algorithms.py" ]
[ "# MIT License\n#\n# Copyright (c) 2018 Yuxin Wang\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, mo...
[ [ "numpy.asarray" ] ]
alexpenson/neural-style-docker
[ "d2669f648f4f04e064e8400c374d2999a82dd3e6" ]
[ "neuralstyle/algorithms.py" ]
[ "# Callers to neural style algorithms\nfrom subprocess import call\nfrom itertools import product\nfrom tempfile import TemporaryDirectory, NamedTemporaryFile\nfrom shutil import copyfile\nimport logging\nfrom math import ceil\nimport numpy as np\nimport json\nimport GPUtil\nfrom neuralstyle.utils import filename, ...
[ [ "numpy.linspace", "numpy.prod" ] ]
blind-author/weaklysup-freespace
[ "e48d5e7e59fb95de6d7a6a7d02d97197c7bb2c09", "e48d5e7e59fb95de6d7a6a7d02d97197c7bb2c09" ]
[ "src/train.py", "src/data/cityscapes/RawCityscapesDataset.py" ]
[ "#!/usr/bin/env python\n\nfrom argparse import ArgumentParser\nfrom models import UNet\nimport torch\nfrom ignite.contrib.handlers import ProgressBar\nfrom ignite.engine import Events\nfrom ignite.utils import manual_seed\nfrom pathlib import Path\nfrom models import SegNet\nimport json\nimport numpy as np\nfrom co...
[ [ "numpy.ceil", "torch.cuda.is_available" ], [ "numpy.isin" ] ]
Shicheng-Guo/TDC
[ "36e2863aca5abe3147e34f59d20fd77112945242", "36e2863aca5abe3147e34f59d20fd77112945242" ]
[ "examples/generation/docking_generation/guacamol_tdc/guacamol/guacamol/distribution_learning_benchmark.py", "examples/generation/docking_generation/moldqn/chemgraph/logp_similar_train.py" ]
[ "import logging\nimport time\nfrom abc import abstractmethod\nfrom typing import Dict, Any, Iterable, List\nimport numpy as np\n\nfrom guacamol.utils.chemistry import canonicalize_list, is_valid, calculate_pc_descriptors, continuous_kldiv, \\\n discrete_kldiv, calculate_internal_pairwise_similarities\nfrom guaca...
[ [ "numpy.exp" ], [ "tensorflow.compat.v1.gfile.Open", "scipy.stats.gmean" ] ]
arolet/ot-sparse-projection
[ "10952b9d0565a0a2b3476c28f2b8cef196fbc2c3" ]
[ "src/ot_sparse_projection/optim.py" ]
[ "import math\nimport time\nimport warnings\n\nimport numpy as np\n\nfrom ot_sparse_projection import log_utils\n\nMAX_ITER = 500\nBACKTRACKING = \"backtracking\"\nFEASIBLE = \"feasible\"\nNO_BACKTRACKING = \"none\"\nDECREASING = \"decreasing\"\n\n\nclass TimerInterface(object):\n \"\"\" An object used to track t...
[ [ "numpy.isinf", "numpy.isnan", "numpy.random.rand", "scipy.optimize.check_grad", "numpy.sqrt", "numpy.abs" ] ]
jobsfan/scikit-learn
[ "1d5ab5a17f1774edbb76b16c38dc62f8a6f2e11b" ]
[ "1_getting_started_1.py" ]
[ "# from https://scikit-learn.org/stable/getting_started.html\n# Fitting and predicting: estimator basics\n\nfrom sklearn.ensemble import RandomForestClassifier\n\nclf = RandomForestClassifier(random_state=0)\n\nX = [[1, 2, 3],\n [11, 12, 13]]\n\ny = [0, 1]\nclf.fit(X, y)\naa = clf.predict(X)\nprint(aa)\nxx = cl...
[ [ "sklearn.ensemble.RandomForestClassifier" ] ]
jfpanisset/flameTimewarpML
[ "14306f376845ff5250382cd8fd3eda2ecde327b1" ]
[ "bundle/inference_sequence.py" ]
[ "import os\nimport sys\nimport cv2\nimport torch\nimport argparse\nimport numpy as np\nfrom tqdm import tqdm\nfrom torch.nn import functional as F\nimport warnings\nimport _thread\nimport threading\nfrom queue import Queue, Empty\nwarnings.filterwarnings(\"ignore\")\n\nfrom pprint import pprint, pformat\nimport tim...
[ [ "torch.device", "torch.cuda.is_available", "numpy.transpose", "torch.nn.functional.pad", "torch.set_grad_enabled" ] ]
ksbrar/ludwig
[ "22897a1bdb52dfcec54446aed2011f9a40b1011e" ]
[ "ludwig/api.py" ]
[ "# !/usr/bin/env python\n# coding=utf-8\n# Copyright (c) 2019 Uber Technologies, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENS...
[ [ "numpy.std", "numpy.mean" ] ]
gcunhase/Scene2Wav
[ "99a3ad6c9f2cea1d58590a0bb834203bc525ced8" ]
[ "train.py" ]
[ "# CometML needs to be imported first.\ntry:\n import comet_ml\nexcept ImportError:\n pass\n\nfrom model import SampleRNN, Predictor\nfrom model import CNNSeq2SampleRNN\nfrom optim import gradient_clipping\nfrom nn import sequence_nll_loss_bits\nfrom trainer import Trainer\nfrom trainer.plugins import (\n ...
[ [ "torch.cuda.device_count", "torch.utils.trainer.plugins.Logger", "torch.load" ] ]
dizak/mothulity
[ "9eb7e290649a3226891d8210897084d2bfacdad6" ]
[ "mothulity/utilities.py" ]
[ "#! /usr/bin/env python\n\n#pylint: disable=invalid-name,too-many-arguments,too-many-locals; extension-pkg-whitelist=lxml\n\n\"\"\"\nFunctions used by the other parts of the package\n\"\"\"\n\n\nfrom __future__ import print_function\nfrom io import BytesIO\nimport base64\nimport os\nimport sys\nimport psutil\n\nimp...
[ [ "matplotlib.use", "numpy.array", "matplotlib.pyplot.cm.jet", "pandas.DataFrame", "matplotlib.pyplot.grid", "matplotlib.pyplot.title", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.savefig", "matplotlib.pyplot.subplots", "matplotlib.pyplot.ylabel", "pandas.read_csv" ]...
Abhishek-Rajendra/Actor_critic_methods
[ "336239d1e1472528b6150ac965a431dc2d2bb5a3", "336239d1e1472528b6150ac965a431dc2d2bb5a3" ]
[ "reward_plots.py", "Qac.py" ]
[ "import matplotlib.pyplot as plt\nimport os\nimport pandas as pd\nimport argparse\nimport numpy as np\n\ndef plotRewards(episode_rewards, label, alpha, gamma, plot_path):\n\n plt.figure()\n plt.suptitle(variant+\" - \"+environment)\n plt.title(r\"$\\alpha $ = \"+alpha+\", $\\gamma$ = \"+gamma)\n plt.plo...
[ [ "numpy.max", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.savefig", "matplotlib.pyplot.suptitle", "matplotlib.pyplot.title", "matplotlib.pyplot.legend", "matplotlib.pyplot.plot", "matplotlib.pyplot.figure", "numpy.load", "matplotlib.pyplot.ylabel", "pandas.Series", ...
kaai520/GATI-Rec
[ "1cc2efbbeeef2705add0256dfec2262da1df7119" ]
[ "transfer.py" ]
[ "import os\r\n# os.environ[\"CUDA_VISIBLE_DEVICES\"] = '1'\r\n\r\nimport torch\r\ntorch.multiprocessing.set_sharing_strategy('file_system')\r\nimport random\r\nimport numpy as np\r\nfrom tqdm import tqdm\r\nfrom torch_geometric.data import DataLoader, DataListLoader\r\nfrom torch_geometric.nn.data_parallel import D...
[ [ "torch.cat", "torch.nn.ModuleList", "torch.no_grad", "torch.cuda.empty_cache", "torch.cuda.is_available", "torch.load", "torch.multiprocessing.set_sharing_strategy" ] ]
Guominyingxiongququ/RAFT
[ "04c1bbf2cf404489c7b5fa082a8b883e4df231e7" ]
[ "core/pipelines/random_degradations.py" ]
[ "import io\nimport logging\nimport random\n\nimport cv2\nimport numpy as np\n\nfrom pipelines import blur_kernels as blur_kernels\nfrom registry import PIPELINES\n\ntry:\n import av\n has_av = True\nexcept ImportError:\n has_av = False\n\n\n@PIPELINES.register_module()\nclass RandomBlur:\n \"\"\"Apply r...
[ [ "numpy.random.choice", "numpy.random.poisson", "numpy.random.randn", "numpy.random.shuffle", "numpy.random.uniform", "numpy.random.randint", "numpy.clip", "numpy.unique" ] ]
wangguizhu27/tensorflow1
[ "3462966ac7d3884c2153b1655e8528a0f6bac0f4" ]
[ "tensorflow/contrib/distributions/python/ops/poisson.py" ]
[ "# 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#\n# Unless requ...
[ [ "tensorflow.python.framework.tensor_shape.scalar", "tensorflow.python.ops.array_ops.identity", "tensorflow.python.ops.math_ops.floor", "tensorflow.python.ops.check_ops.assert_non_negative", "tensorflow.contrib.distributions.python.ops.distribution_util.assert_integer_form", "tensorflow.pyt...
python-pitfalls/tvm
[ "d0646e973b5c142e1aa361d9706e558ed4f8d4a3" ]
[ "tests/python/relay/test_vm.py" ]
[ "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y...
[ [ "numpy.array", "numpy.random.rand", "numpy.reshape", "numpy.ones", "numpy.split", "numpy.float32", "numpy.random.uniform", "numpy.int32" ] ]
keyunj/VVForecast_covid19
[ "c6a80e7b9d71732b4355cbc35939dd70e1437189" ]
[ "RFCA/cell_automata.py" ]
[ "import numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\n__ALL__ = [\n \"CellAutomata\",\n \"markov_stop_criterion\",\n]\n\n\nclass CellAutomata(object):\n def __init__(\n self,\n num_classes,\n init_state=None,\n state_size=None,\n n...
[ [ "torch.zeros", "torch.nn.functional.unfold", "numpy.zeros", "torch.norm", "numpy.ones", "torch.from_numpy", "numpy.where", "torch.randint", "numpy.prod", "torch.ones_like", "numpy.all", "torch.argmax" ] ]
smiet/FOCUSADD
[ "6e0ceb6f6494a84f1a5278559956956033650348" ]
[ "plotting/paper/lhd/plot_lhd.py" ]
[ "import pandas as pd\nimport numpy as np\nfrom mayavi import mlab\nfrom functools import partial\nimport tables as tb\nimport sys\nsys.path.append(\"../../../\")\nfrom focusadd.coils.CoilSet import CoilSet\n\ndef read_lhd_data():\n\tr_surf = np.load(\"../../../focusadd/initFiles/lhd/lhd_r_surf.npy\")\n\tnn = np.loa...
[ [ "numpy.concatenate", "numpy.sin", "numpy.asarray", "numpy.zeros", "numpy.load", "numpy.cos", "numpy.linspace" ] ]
AnanthHari/PettingZoo
[ "c147c2992a067fd529570db0bea6a0324f01ee6e" ]
[ "pettingzoo/sisl/multiwalker/multiwalker.py" ]
[ "from .multiwalker_base import MultiWalkerEnv as _env\nfrom pettingzoo import AECEnv\nfrom pettingzoo.utils import agent_selector\nimport numpy as np\nfrom pettingzoo.utils import wrappers\n\n\ndef env(**kwargs):\n env = raw_env(**kwargs)\n env = wrappers.ClipOutOfBoundsWrapper(env)\n env = wrappers.NanZer...
[ [ "numpy.float64", "numpy.array" ] ]
shenyunhang/PPS
[ "306f2b44d929badc265477b435f49483727f8f09" ]
[ "tools/train_net.py" ]
[ "#!/usr/bin/env python\n\n# Copyright (c) 2017-present, Facebook, 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# Unl...
[ [ "numpy.random.seed" ] ]
utiasSTARS/GraphIK
[ "c2d05386bf9f9baf8ad146125bfebc3b73fccd14" ]
[ "experiments/simple_ik_examples/test_chain_2d_limits_new.py" ]
[ "#!/usr/bin/env python3\nimport numpy as np\nfrom numpy.testing import assert_array_less\nimport networkx as nx\nimport time\nfrom graphik.graphs.graph_base import RobotPlanarGraph\nfrom graphik.robots.robot_base import RobotPlanar\nfrom graphik.solvers.solver_rfr import RiemannianSolver\nfrom graphik.utils.dgp imp...
[ [ "numpy.array", "numpy.linalg.norm", "numpy.random.rand", "numpy.zeros", "numpy.random.seed", "numpy.mean", "numpy.std", "numpy.arange", "numpy.average" ] ]
nchos88/Visualizations
[ "69dd1f5335fbdb7bae750e71ace79c22a76b3ed4" ]
[ "Visualization/test.py" ]
[ "import numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nfrom matplotlib import cm\ncolor = cm.inferno_r(np.linspace(.4,.8, 6))\n\nfrequencies = [0.7780,0.9367,0.9973,0.9982,0.9993,0.9997] # bring some raw data\n\nfreq_series = pd.Series.from_array(frequencies) # in my original code I create a...
[ [ "matplotlib.pyplot.annotate", "matplotlib.pyplot.ylim", "matplotlib.pyplot.figure", "pandas.Series.from_array", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.show", "numpy.linspace", "matplotlib.pyplot.xticks" ] ]
JJWilliams27/Cricket_RainAffectedMatchAnalysis
[ "ec0dfd0ae5dacc3a0f97c40c75147238e3e791d0" ]
[ "percentage_rain_affected.py" ]
[ "# Calculate Percentage Rain Affected Matches for Each Player\n\n# Modules\nfrom espncricinfo.player import Player\nfrom espncricinfo.match import Match\nfrom espncricinfo.series import Series\nimport json\nimport pdb\nfrom collections import Counter\nfrom tqdm import tqdm\nimport pandas as pd\nimport os\nimport wa...
[ [ "pandas.read_csv" ] ]
msperber/misc
[ "ac33cd9d1672b59b25b11c1c9d3a46e97c057525" ]
[ "xnmt/norms.py" ]
[ "\"\"\"\nThis module holds normalizers for neural networks. Currently implemented are layer norm and batch norm.\n\"\"\"\nfrom typing import List, Optional, Tuple\nimport numbers\n\nimport dynet as dy\nimport numpy as np\n\nfrom xnmt import batchers, events, expression_seqs, param_collections\nfrom xnmt.modelparts ...
[ [ "numpy.count_nonzero", "numpy.ones", "numpy.zeros" ] ]
PatrikHed/FPL-Optimization-Tools
[ "2cea25501e211e1913773c630e12d4c8072d1d35" ]
[ "src/single_period.py" ]
[ "import pandas as pd\nimport sasoptpy as so\nimport requests\nimport os\nimport time\nfrom subprocess import Popen, DEVNULL\nfrom concurrent.futures import ProcessPoolExecutor\nfrom functools import lru_cache\n\n@lru_cache(maxsize=1)\ndef get_data():\n r = requests.get('https://fantasy.premierleague.com/api/boot...
[ [ "pandas.DataFrame", "pandas.read_csv", "pandas.merge" ] ]
ishine/pase
[ "2a41e63e54fa8673efd12c16cdcdd5ad4f0f125e", "2a41e63e54fa8673efd12c16cdcdd5ad4f0f125e" ]
[ "pase/test/dataset.py", "downstream_prep/prep_voxforge.py" ]
[ "from pase.dataset import LibriSpeechSegTupleWavDataset\nfrom pase.transforms import *\n\nfrom argparse import ArgumentParser\n\nfrom torch.utils.data import DataLoader\n\nif __name__ == \"__main__\":\n parser = ArgumentParser()\n parser.add_argument(\"--data_root\", type=str, required=True)\n parser.add_a...
[ [ "torch.utils.data.DataLoader" ], [ "numpy.dot", "numpy.zeros", "numpy.random.seed", "numpy.sum", "numpy.tile", "numpy.mean", "numpy.save", "numpy.where", "numpy.fft.fft", "numpy.sqrt", "numpy.abs", "pandas.read_csv", "numpy.squeeze", "numpy.var" ] ...
georgeslabreche/tensorflow-smartcamluvsu
[ "be084bd7a4dd241eb781fc704f57bcacc5c9b6dd" ]
[ "tensorflow/lite/python/keras/saving/saving_utils.py" ]
[ "# Copyright 2020 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.python.util.keras_deps.get_call_context_function", "tensorflow.python.util.nest.map_structure", "tensorflow.python.util.nest.yield_flat_paths", "tensorflow.python.eager.def_function.function", "tensorflow.python.util.nest.flatten" ] ]
christopher-hsu/ray
[ "abe84b596253411607a91b3a44c135f5e9ac6ac7", "7bda5edc16d40880b16ac04a5421dbfe79f4ccb2" ]
[ "python/ray/rllib/RL/BRL/ktdq_exe.py", "python/ray/tune/examples/mnist_pytorch.py" ]
[ "\nfrom ktd_q import *\nimport brl \nimport models\nimport matplotlib.pyplot as plt\nimport seeding\nimport numpy as np\nimport gym\nimport argparse\nparser = argparse.ArgumentParser()\nparser.add_argument('--kappa', type=int, default=10, help='kappa')\nparser.add_argument('--epsilon', type=float, default=0.0, help...
[ [ "numpy.array", "numpy.random.choice", "numpy.zeros", "numpy.random.seed", "matplotlib.pyplot.plot", "numpy.mean", "matplotlib.pyplot.show" ], [ "torch.nn.Linear", "torch.cuda.manual_seed", "torch.nn.functional.dropout", "torch.no_grad", "torch.nn.functional.log_...
CodeGuy-007/lightly
[ "64143fe8a477c04288009c65fa1265cef8aa48f8", "64143fe8a477c04288009c65fa1265cef8aa48f8" ]
[ "lightly/models/modules/nn_memory_bank.py", "tests/active_learning/test_active_learning_agent.py" ]
[ "\"\"\" Nearest Neighbour Memory Bank Module \"\"\"\n\n# Copyright (c) 2021. Lightly AG and its affiliates.\n# All Rights Reserved\n\nimport torch\nfrom lightly.loss.memory_bank import MemoryBankModule\n\n\nclass NNMemoryBankModule(MemoryBankModule):\n \"\"\"Nearest Neighbour Memory Bank implementation\n\n Th...
[ [ "torch.nn.functional.normalize", "torch.argmax", "torch.einsum", "torch.index_select" ], [ "numpy.sum", "numpy.random.rand" ] ]
paulosoaresua/mlbase
[ "8b60b80fd1745d6565fd38e9bc9d2e203033ae27", "8b60b80fd1745d6565fd38e9bc9d2e203033ae27" ]
[ "mlbase/callback/callback.py", "mlbase/runner/model_runner.py" ]
[ "from typing import Dict, Any\nimport random\nimport numpy as np\nimport torch\n\n\nclass Callback:\n def __init__(self, update_frequency_type: str = 'batch', update_frequency: int = 100):\n self.update_frequency_type = update_frequency_type\n self.update_frequency = update_frequency\n\n sel...
[ [ "torch.set_rng_state", "numpy.random.get_state", "numpy.random.set_state", "torch.get_rng_state" ], [ "torch.set_rng_state", "numpy.random.set_state", "torch.load", "torch.utils.data.DataLoader" ] ]
jordan-schneider/value-alignment-verification
[ "f2c877b16dfefa7cd8089b7aa3fe084ab907235e" ]
[ "active/active/algos.py" ]
[ "from typing import Callable\n\nimport numpy as np\nimport scipy.optimize as opt # type: ignore\nfrom driver.legacy.models import Driver\n\n\ndef volume_objective_psi(\n normals: np.ndarray, w_samples: np.ndarray, delta_samples: np.ndarray\n) -> float:\n delta_samples = delta_samples.reshape(-1, 1)\n valu...
[ [ "numpy.array", "numpy.random.choice", "numpy.zeros", "numpy.argmin", "numpy.load", "numpy.exp", "numpy.random.uniform", "numpy.abs" ] ]
FloHu/lincs-cell-painting
[ "6eff35078036467b0d716261843775110acd69f8" ]
[ "comparison/util.py" ]
[ "import pathlib\nimport numpy as np\nimport pandas as pd\n\nfrom pycytominer.cyto_utils import infer_cp_features\n\n\ndef build_file_dictionary(base_dir, tool=\"pycytominer\"):\n file_match = {}\n if tool == \"pycytominer\":\n file_match[\"level_3\"] = \"augmented.csv.gz\"\n file_match[\"level_4...
[ [ "pandas.read_csv", "pandas.testing.assert_series_equal" ] ]
bbrito/mapr2
[ "57f76875a4a6aed1850d3fb8604683bfe8a0e09b", "57f76875a4a6aed1850d3fb8604683bfe8a0e09b" ]
[ "maci/replay_buffers/simple_replay_buffer.py", "maci/plot.py" ]
[ "import numpy as np\n\nfrom maci.core.serializable import Serializable\n\nfrom maci.replay_buffers.replay_buffer import ReplayBuffer\nfrom maci.environments.env_spec import MAEnvSpec\n\n\nclass SimpleReplayBuffer(ReplayBuffer, Serializable):\n def __init__(self, env_spec, max_replay_buffer_size, joint=False, age...
[ [ "numpy.fromstring", "numpy.random.randint", "numpy.zeros" ], [ "matplotlib.pyplot.get_cmap", "matplotlib.pyplot.figure", "numpy.arange", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.show", "matplotlib.pyplot.gca", "matplotlib.ticker.StrMethodFormatter" ] ]
MingheCao/probreg
[ "c9d17493c982f7c3b543a5e2aa1d2d63e7cfe83b" ]
[ "probreg/se3_op.py" ]
[ "from __future__ import print_function\nfrom __future__ import division\nimport numpy as np\nimport transforms3d as t3d\n\n\ndef skew(x):\n \"\"\"\n skew-symmetric matrix, that represent\n cross products as matrix multiplications.\n\n Args:\n x (numpy.ndarray): 3D vector.\n Returns:\n 3...
[ [ "numpy.square", "numpy.array", "numpy.linalg.norm", "numpy.dot", "numpy.sin", "numpy.zeros", "numpy.sum", "numpy.identity", "numpy.cos", "numpy.outer" ] ]
ongetekend/ThinkingOutsideTheSuperbox
[ "93d7904d333a566a8b4667622a714de60fc1e87b" ]
[ "plots/trail_core_plots.py" ]
[ "#!/usr/bin/env python2\n\nimport math\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport csv\n\ntriples = [('../data/saturnin-trail-core-full.txt', 's-', 'b', 'Saturnin'),\n ('../data/spongent-trail-core-full.txt', 'X-', 'y', 'Spongent'), \n ('../data/aes-trail-core-full.txt', 'D-', ...
[ [ "matplotlib.pyplot.xlim", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.ylim", "matplotlib.pyplot.grid", "matplotlib.pyplot.legend", "matplotlib.pyplot.savefig", "numpy.arange", "matplotlib.pyplot.ylabel", "numpy.cumsum" ] ]
rbarghou/Keras-GAN
[ "cf14fa1650f0b3c9f53281e44215c41323d2ba02" ]
[ "keras_gan/pixelda.py" ]
[ "from __future__ import print_function, division\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom keras.layers import BatchNormalization, Activation, Add\nfrom keras.layers import Input, Dense, Flatten\nfrom keras.layers.advanced_activations import LeakyReLU\nfrom keras.layers.convolutional import Conv2...
[ [ "numpy.concatenate", "numpy.add", "numpy.zeros", "numpy.ones", "matplotlib.pyplot.close", "matplotlib.pyplot.subplots", "numpy.mean", "numpy.argmax" ] ]
audreyeternal/cyclegan
[ "8eb3ddb7fd0d9838862334766f1f7aaa5584c2da" ]
[ "mytest1.py" ]
[ "from matplotlib import cm\nimport numpy as np\nfrom PIL import Image\nimport matplotlib.pyplot as plt\nimport pydicom as pd\nimport scipy.io as sio\n#image = np.load(r'D:\\eternalaudrey\\周宇\\大学\\大四上\\实习\\项目代码\\python_projects\\cyclegan\\data\\nature_image\\train\\no_artifact\\1.2.3.20210317.153618_0072.npy')\n#ima...
[ [ "numpy.load", "scipy.io.savemat" ] ]
cat-astrophic/MDPI
[ "3f3bd8e771be2fa1987c5875414760b1e628e8bb" ]
[ "2018_Initial/MDPI_scimago.py" ]
[ "# This script converts the names of countries in the scimagojr data to what is used in the MDPI data\n\n# Scimago data was manually downloaded (invdividual file for each year plus one more for all years)\n\n# Importing required modules\n\nimport pandas as pd\n\n# Reference list for changing names\n\nchange = {'Vie...
[ [ "pandas.read_excel" ] ]
MHadavand/pygeostat
[ "020f1781e073ab7721d9181e04b9c63240b0121e", "020f1781e073ab7721d9181e04b9c63240b0121e" ]
[ "pygeostat/plotting/histogram_plot.py", "pygeostat/statistics/cdf.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"A basic histogram plotting routine using matplotlib\"\"\"\n\n#-----------------------------------------------------------------------------\n# Boilerplate\n#-----------------------------------------------------------------------------\nfrom __future__ import ab...
[ [ "numpy.max", "numpy.array", "numpy.isnan", "scipy.interpolate.interp1d", "numpy.count_nonzero", "numpy.sum", "numpy.percentile", "numpy.min", "numpy.mean", "numpy.std", "numpy.arange", "numpy.all", "numpy.log10", "numpy.logspace", "numpy.unique" ], [...
virdio/mediapipe
[ "4a20e9909d55838d5630366ce719844cf06ae85c" ]
[ "mediapipe/python/solutions/objectron_test.py" ]
[ "# Copyright 2020 The MediaPipe Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable la...
[ [ "numpy.asarray", "numpy.zeros", "numpy.testing.assert_array_less", "numpy.stack", "numpy.arange" ] ]
miachenberkeley/Bi2VC
[ "019112147a3e6c208c3846ef699fb6ec24a45c30", "019112147a3e6c208c3846ef699fb6ec24a45c30" ]
[ "py3env/lib/python3.5/site-packages/theano/sandbox/gpuarray/dnn.py", "py3env/lib/python3.5/site-packages/theano/sandbox/tests/test_multinomial.py" ]
[ "import os\nimport warnings\n\nimport numpy\nfrom six import integer_types\n\nimport theano\nfrom theano import Op, Apply, tensor, config, Variable\nfrom theano.scalar import as_scalar, constant, Log\nfrom theano.tensor import as_tensor_variable\nfrom theano.gradient import DisconnectedType, grad_not_implemented\nf...
[ [ "numpy.asarray" ], [ "numpy.ones_like", "numpy.random.rand", "numpy.asarray", "numpy.random.seed", "numpy.random.randn", "numpy.random.randint", "numpy.arange" ] ]
catunlock/sardana
[ "34bd40be3d316c5d6f0a88ac88ef9001c36a0143" ]
[ "src/sardana/macroserver/recorders/output.py" ]
[ "#!/usr/bin/env python\n\n##############################################################################\n##\n# This file is part of Sardana\n##\n# http://www.sardana-controls.org/\n##\n# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain\n##\n# Sardana is free software: you can redistribute it and/or modif...
[ [ "numpy.shape", "numpy.ndim" ] ]
kwasnydam/animal_disambiguation
[ "1dba0a2f40ca952a3adab925ff9ef54238cf7c1c" ]
[ "src/tests/test_TextLabelVectorizer.py" ]
[ "import unittest\n\nfrom src.data.dataset import TextLabelsVectorizer\nfrom sklearn.exceptions import NotFittedError\nimport numpy as np\nimport pandas as pd\n\n\nDEFAULT_VECTORIZER_SETTINGS = {\n 'ngram_range': (1, 3),\n 'min_df': 2,\n 'max_df': 1.0\n}\n\n\nclass TestTextLabelVectorizerBase(unittest.TestC...
[ [ "pandas.Series" ] ]
kingjin94/enhanced_simulation
[ "45021f9691e5f772ef4840d69b0d504a6ee79441" ]
[ "src/touchCan.py" ]
[ "#!/usr/bin/python\n\nfrom filter_octomap.msg import table, cans, can\nimport rospy\nimport numpy as np\nimport geometry_msgs\nimport random\nimport tf\nimport math\nfrom scipy import optimize\n\nimport touchTable2\n\nclass CanRefiner(touchTable2.TactileRefiner):\n\tdef __init__(self, group_name = \"panda_arm\"):\n...
[ [ "numpy.linalg.norm", "numpy.asarray", "numpy.zeros", "numpy.mean", "scipy.optimize.leastsq", "numpy.argmax", "numpy.sqrt", "numpy.inner" ] ]
penestia/muscimarker-python3
[ "a99c2e2dc0bf225473eca92f4671900fd9de46d8" ]
[ "MUSCIMarker/object_detection.py" ]
[ "\"\"\"This module implements a class that...\"\"\"\nfrom __future__ import print_function, unicode_literals\n\nfrom builtins import str\nfrom builtins import object\nimport logging\nimport os\nimport pickle\nimport socket\nimport uuid\n\nimport numpy\nimport time\nfrom kivy.properties import ObjectProperty, String...
[ [ "numpy.ndarray.dumps" ] ]
TimoRoth/salem
[ "3e8b7702947899ae86f3c2f8dca6baf02a7a1d69" ]
[ "salem/utils.py" ]
[ "\"\"\"\nSome useful functions\n\"\"\"\nfrom __future__ import division\n\nimport io\nimport os\nimport shutil\nimport zipfile\nfrom collections import OrderedDict\n\nimport numpy as np\nfrom joblib import Memory\nfrom salem import (cache_dir, sample_data_dir, sample_data_gh_commit,\n download_dir...
[ [ "numpy.max", "numpy.array", "numpy.asarray", "numpy.matmul", "numpy.round", "numpy.ones", "numpy.arange" ] ]
aurelienline/scikit-extremes
[ "90be86f8212b7cd293492d15cefdf4fd48121739" ]
[ "PosterPyConES2019/poster_PyConES2019_ESversion.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nEditor de Spyder\r\n\r\nEste es un archivo temporal.\r\n\"\"\"\r\n\r\n\r\nfrom reportlab.lib.colors import cyan, lightgrey\r\nfrom reportlab.lib.units import inch\r\nfrom reportlab.pdfgen.canvas import Canvas as RLCanvas\r\nfrom reportlab.lib.pagesizes import A0\r\nimport matpl...
[ [ "matplotlib.pyplot.Circle", "matplotlib.pyplot.xkcd", "matplotlib.pyplot.subplots", "matplotlib.pyplot.Line2D" ] ]
manavsah/catboost
[ "625e04d19d31ac88bc74b52a9fdf41577e0663a8" ]
[ "catboost/pytest/smoke_tests/classification_tutorial_cpu.py" ]
[ "import os\ntry:\n import catboost_dev as catboost\nexcept:\n import catboost\n## Solving classification problems with CatBoost\n\n\n#[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/catboost/tutorials/blob/master/classification/classificati...
[ [ "matplotlib.pyplot.xlim", "numpy.argmin", "numpy.set_printoptions", "numpy.min", "numpy.exp", "matplotlib.pyplot.xticks", "numpy.array", "matplotlib.pyplot.title", "matplotlib.pyplot.yticks", "matplotlib.pyplot.figure", "sklearn.model_selection.train_test_split", "m...
Ding515/CIA-PA4
[ "0926551c41fac55ca13b781a058566502a57b77d" ]
[ "program/PA3_solution.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Mon Nov 15 08:31:21 2021\r\n\r\n@author: Ding\r\n\"\"\"\r\n\r\nimport numpy as np\r\nimport PA1_functions as PAF1\r\nimport PA3_functions as PAF3\r\nfrom scipy import spatial\r\n\"\"\"\r\nstep_1_rigid_registration function returns the position of pointer tip with res...
[ [ "numpy.array", "numpy.linalg.norm", "numpy.zeros", "numpy.save", "scipy.spatial.KDTree", "numpy.squeeze" ] ]
mrunal512/pytorch
[ "e56d3b023818f54553f2dc5d30b6b7aaf6b6a325" ]
[ "test/quantization/test_quantize_fx.py" ]
[ "import torch\nimport torch.nn.functional as F\nimport torch.nn as nn\nimport torch.nn.quantized as nnq\nimport torch.nn.quantized.dynamic as nnqd\nimport torch.nn.intrinsic as nni\nimport torch.nn.intrinsic.quantized as nniq\nimport torch.multiprocessing as mp\n\n# graph mode quantization based on fx\nfrom torch.q...
[ [ "torch.cat", "torch.quantization.quantize_fx.prepare_fx", "torch.nn.MaxPool3d", "torch.testing._internal.common_quantization.NodeSpec.call_module", "torch.nn.AdaptiveAvgPool1d", "torch.squeeze", "torch.nn.functional.adaptive_avg_pool1d", "torch.load", "torch.nn.MaxPool1d", ...
namjiwon1023/Code_With_RL
[ "37beec975b1685e9f6cf991abed491b854b78173", "37beec975b1685e9f6cf991abed491b854b78173" ]
[ "tutorials/slac/utils.py", "tutorials/A2C/utils/runner.py" ]
[ "# Copyright (c) 2021: Zhiyuan Nan (namjw@hanyang.ac.kr).\n#\n# This work is licensed under the terms of the MIT license.\n# For a copy, see <https://opensource.org/licenses/MIT>.\n\nimport math\n\nimport torch as T\nfrom torch import nn\n\nimport dmc2gym\nimport gym\n\ngym.logger.set_level(40)\n\n\ndef make_dmc(do...
[ [ "torch.nn.Linear", "torch.cat", "torch.nn.init.constant_", "torch.nn.Sequential", "torch.nn.init.xavier_uniform_", "torch.nn.ReLU", "torch.randn_like", "torch.nn.init.orthogonal_" ], [ "numpy.savetxt", "numpy.mean" ] ]
lhc1224/OSAD_Net
[ "57180a0fd4dd7e62dbcd259087933c30e15c112c" ]
[ "OSAD/settings.py" ]
[ "import logging\nimport numpy as np\nfrom torch import Tensor\n\nMEAN = Tensor(np.array([0.485, 0.456, 0.406]))\nSTD = Tensor(np.array([0.229, 0.224, 0.225]))\nSCALES = (0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0)\nCROP_SIZE = 513\nIGNORE_LABEL = 255\n\n# Model definition\nN_CLASSES = 21\nN_LAYERS = 101\nSTRIDE = 8\nBN_M...
[ [ "numpy.array" ] ]
VisualComputingInstitute/CROWDBOT_perception
[ "df98f3f658c39fb3fa4ac0456f1214f7918009f6" ]
[ "reid/scripts/triplet_reid/writers/coco_utils.py" ]
[ "import numpy as np\n\n'''\nThe class is designed to generate unique IDs that have meaningful RGB encoding.\nGiven semantic category unique ID will be generated and its RGB encoding will\nhave color close to the predefined semantic category color.\nThe RGB encoding used is ID = R * 256 * G + 256 * 256 + B.\nClass c...
[ [ "numpy.random.randint", "numpy.zeros", "numpy.minimum" ] ]
fahadzia10/IntelliScraper-YOLOv3ImageScraping
[ "2498a882809496a635334a07c00efb2fa4244f5b" ]
[ "yolo_opencv.py" ]
[ "import os\nimport cv2\nimport argparse\nimport numpy as np\n\nap = argparse.ArgumentParser()\nap.add_argument('-i', '--query', required=True,\n help = 'path to input image')\nap.add_argument('-c', '--config', default='yolov3.cfg',\n help = 'path to yolo config file')\nap.add_argument(...
[ [ "numpy.argmax" ] ]
Exepp/SpeechLess
[ "6e7424e979f39132650db0d7426c1e9449dc43b8" ]
[ "src/speechless/edit_context/video.py" ]
[ "import av\nimport numpy as np\n\nfrom typing import Generator, List\nfrom av.video.stream import VideoStream\n\nfrom .common import EditCtx, TimelineChange\nfrom speechless.utils.math import Real\n\nDROP_FRAME_PTS = -1\n\n\nclass VideoEditContext(EditCtx):\n\n def __init__(self, src_stream: VideoStream, dst_strea...
[ [ "numpy.max", "numpy.array", "numpy.round", "numpy.sum", "numpy.cumsum" ] ]
dezeraecox-manuscripts/COX_Proteome-stability
[ "a5397baae7f0bc73980b88f8ccf7b83e3d05f590" ]
[ "src/lysate_urea_denaturation/plotting/plot_clustering.py" ]
[ "\nimport os, functools\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\nimport seaborn as sns\nimport skfuzzy as fuzz\nfrom GEN_Utils import FileHandling\nfrom loguru import logger\nfrom pykalman import KalmanFilter\nfrom sklearn.cluster import KMeans\nfrom sklearn.deco...
[ [ "matplotlib.pyplot.xlim", "pandas.merge", "matplotlib.pyplot.xlabel", "pandas.read_excel", "matplotlib.pyplot.savefig", "matplotlib.pyplot.ylim", "matplotlib.pyplot.subplots", "matplotlib.rc", "matplotlib.pyplot.yticks", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.sh...
taimurhassan/balanced_affinity
[ "6e83e031e9954a9a84fe7bd70b47afdd7e333316" ]
[ "Segmentation/codebase/data_utils/data_loader.py" ]
[ "import glob\nimport itertools\nimport os\nimport random\nimport six\nimport numpy as np\nimport cv2\nimport threading\n\ntry:\n from tqdm import tqdm\nexcept ImportError:\n print(\"tqdm not found, disabling progress bars\")\n def tqdm(iter):\n return iter\n\n\nfrom ..models.config import IMAGE_ORDE...
[ [ "numpy.max", "numpy.array", "numpy.reshape", "numpy.zeros", "numpy.rollaxis" ] ]
Leo-Simpson/q2-types
[ "2946fda4fe2817fde1646ddcdc8e8ebf41abe5a4" ]
[ "q2_types/feature_table/tests/test_transformer.py" ]
[ "# ----------------------------------------------------------------------------\n# Copyright (c) 2016-2020, QIIME 2 development team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the file LICENSE, distributed with this software.\n# -------------------------------------...
[ [ "pandas.DataFrame", "pandas.util.testing.assert_frame_equal" ] ]
filmor/pandas
[ "d83bbff4f00915a4f30d367bf8e98487ff3f4503" ]
[ "pandas/io/tests/test_parsers.py" ]
[ "# -*- coding: utf-8 -*-\n# pylint: disable=E1101\n\nfrom datetime import datetime\nimport csv\nimport os\nimport sys\nimport re\nimport nose\nimport platform\n\nfrom numpy import nan\nimport numpy as np\nfrom pandas.io.common import DtypeWarning\n\nfrom pandas import DataFrame, Series, Index, MultiIndex, DatetimeI...
[ [ "pandas.lib.Timestamp", "pandas.compat.StringIO", "pandas.util.testing.makeCustomDataframe", "pandas.io.parsers.read_table", "numpy.array_equal", "numpy.random.rand", "pandas.compat.u", "pandas.io.parsers.TextParser", "pandas.io.parsers.read_csv", "pandas.Timestamp", "p...
NIHOPA/pipline-word2vec
[ "61b8ae2ba42e9376c855202e86237d10b8a62853" ]
[ "pipeline_src/predictions/shallow_predict.py" ]
[ "import numpy as np\nimport pandas as pd\n\nfrom sklearn.preprocessing import LabelEncoder\nfrom sklearn.model_selection import StratifiedKFold\nfrom sklearn.metrics import f1_score\nimport sklearn.ensemble\n\nfrom utils.parallel_utils import jobmap\nfrom imblearn.over_sampling import SMOTE\n\nimport logging\n\nlog...
[ [ "numpy.array", "sklearn.preprocessing.LabelEncoder", "sklearn.model_selection.StratifiedKFold", "numpy.zeros", "sklearn.metrics.f1_score", "numpy.unique" ] ]
GoooIce/qlib
[ "1e2e02368c348677f5002a751e9467b707c5a263", "1e2e02368c348677f5002a751e9467b707c5a263" ]
[ "qlib/contrib/model/pytorch_lstm_ts.py", "qlib/utils/__init__.py" ]
[ "# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT License.\n\n\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport numpy as np\nimport pandas as pd\nimport copy\nfrom sklearn.metrics import roc_auc_score, mean_squared_error\nimport logging\nfrom ...utils impo...
[ [ "torch.nn.Linear", "numpy.concatenate", "torch.nn.LSTM", "torch.isnan", "numpy.random.seed", "torch.save", "torch.no_grad", "torch.isfinite", "numpy.mean", "torch.manual_seed", "torch.cuda.empty_cache", "torch.cuda.is_available", "torch.utils.data.DataLoader", ...
tenkeyless/imagemodel
[ "360c672117b5ccb1bfb3d6771b0720fa1a1f513c", "360c672117b5ccb1bfb3d6771b0720fa1a1f513c" ]
[ "imagemodel/experimental/reference_tracking/models/ref_local_tracking_model_031_mh3.py", "imagemodel/experimental/reference_tracking/models/testers/provider_predict.py" ]
[ "import warnings\nfrom typing import Dict, List, Optional, Tuple\n\nfrom tensorflow.keras.layers import Conv2D, Dropout, Input, Layer, MaxPooling2D, UpSampling2D, concatenate\nfrom tensorflow.keras.models import Model\nfrom typing_extensions import TypedDict\n\nfrom imagemodel.common.models.common_arguments import ...
[ [ "tensorflow.keras.layers.UpSampling2D", "tensorflow.keras.layers.Input", "tensorflow.keras.models.Model", "tensorflow.keras.layers.Conv2D", "tensorflow.keras.layers.Dropout", "tensorflow.keras.layers.MaxPooling2D", "tensorflow.keras.layers.concatenate" ], [ "tensorflow.argmax",...
takluyver/matplotlib
[ "5d7ed066a9b39a17d56c313b5b68127d179aba1a", "5d7ed066a9b39a17d56c313b5b68127d179aba1a", "5d7ed066a9b39a17d56c313b5b68127d179aba1a" ]
[ "lib/matplotlib/path.py", "lib/matplotlib/collections.py", "lib/matplotlib/sphinxext/ipython_directive.py" ]
[ "\"\"\"\nContains a class for managing paths (polylines).\n\"\"\"\n\nfrom __future__ import print_function\nimport math\nfrom weakref import WeakValueDictionary\n\nimport numpy as np\nfrom numpy import ma\n\nfrom matplotlib._path import point_in_path, get_path_extents, \\\n point_in_path_collection, get_path_col...
[ [ "numpy.tan", "matplotlib._path.convert_path_to_polygons", "numpy.cos", "numpy.sin", "numpy.empty", "matplotlib._path.path_intersects_path", "matplotlib._path.point_in_path", "numpy.arange", "numpy.sqrt", "numpy.isfinite", "matplotlib._path.path_in_path", "numpy.vsta...
JonathanLehner/pyrender
[ "ba0cbc260ff0e35a687f83ff280e2971073422ab" ]
[ "pyrender/scene.py" ]
[ "\"\"\"Scenes, conforming to the glTF 2.0 standards as specified in\nhttps://github.com/KhronosGroup/glTF/tree/master/specification/2.0#reference-scene\n\nAuthor: Matthew Matl\n\"\"\"\nimport numpy as np\nimport networkx as nx\nimport trimesh\n\nfrom .mesh import Mesh\nfrom .camera import Camera\nfrom .light import...
[ [ "numpy.max", "numpy.linalg.norm", "numpy.dot", "numpy.zeros", "numpy.ones", "numpy.min", "numpy.mean", "numpy.eye", "numpy.diff", "numpy.vstack" ] ]
manuel-delverme/online-alt-min
[ "83f2c7d8bf9d6c8de8a8812e4fee73f9b58e05ad" ]
[ "run_altmin_sgd.py" ]
[ "import argparse\n\nimport experiment_buddy\nimport torch\nimport torch.nn as nn\n\nfrom altmin import get_mods, get_codes, update_codes, update_last_layer_, update_hidden_weights_adam_\nfrom altmin import scheduler_step\nfrom models import LeNet\nfrom models import test\nfrom utils import get_devices, load_dataset...
[ [ "torch.no_grad", "torch.cuda.is_available", "torch.nn.CrossEntropyLoss" ] ]
Preffer/machine-learning-sutd
[ "d822a9b623f9bb989e71fb2b509b32008cbf063b" ]
[ "job2/q1/batch-plot.py" ]
[ "#!/bin/python\nfrom numpy import *\nimport matplotlib.pyplot as plt\n\ntrainFile = array([list(map(lambda i: float(i), line.split(','))) for line in open('train_warfarin.csv', 'r')])\nvalidationFile = array([list(map(lambda i: float(i), line.split(','))) for line in open('validation_warfarin.csv', 'r')])\ntestFile...
[ [ "matplotlib.pyplot.show" ] ]
FWNietzsche/Time-Series-Deconfounder2
[ "87e792400e81ebb96c0638f116495a91e523b063" ]
[ "rmsn/libs/model_rnn.py" ]
[ "\"\"\"\nCODE ADAPTED FROM: https://github.com/sjblim/rmsn_nips_2018\n\nImplementation of Recurrent Marginal Structural Networks (R-MSNs):\nBrian Lim, Ahmed M Alaa, Mihaela van der Schaar, \"Forecasting Treatment Responses Over Time Using Recurrent\nMarginal Structural Networks\", Advances in Neural Information Pro...
[ [ "tensorflow.contrib.layers.xavier_initializer", "tensorflow.contrib.rnn.BasicLSTMCell", "tensorflow.matmul", "tensorflow.reshape", "tensorflow.nn.softmax", "tensorflow.identity", "tensorflow.cast", "tensorflow.square", "tensorflow.compat.v1.data.make_one_shot_iterator", "te...
StuartCHAN/neural-qa
[ "42bbd997757bbea57f71398c4dd52d469a6916e9" ]
[ "transformer_atten/transformer/model/transformer.py" ]
[ "# Copyright 2018 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.zeros_initializer", "tensorflow.zeros", "tensorflow.shape", "tensorflow.ones_initializer", "tensorflow.rsqrt", "tensorflow.variable_scope", "tensorflow.squeeze", "tensorflow.name_scope", "tensorflow.pad", "tensorflow.reduce_mean", "tensorflow.square", "t...
1suancaiyu/AS-GCN
[ "66f1e46b5832189f4076f64ec8ad54de5b09d5e0" ]
[ "feeder/feeder.py" ]
[ "import os\nimport sys\nimport numpy as np\nimport random\nimport pickle\nimport time\nimport copy\n\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.nn.functional as F\nfrom torchvision import datasets, transforms\n\nfrom . import tools\n\nclass Feeder(torch.utils.data.Dataset):\n\n ...
[ [ "numpy.array", "numpy.ceil", "numpy.load", "numpy.transpose", "numpy.floor" ] ]
markisus/pytagmapper
[ "c6f38da8f129c7bba930c1f88ea27f81f9b9da37" ]
[ "pytagmapper/heuristics.py" ]
[ "import numpy as np\n\nFLIP_CAM = np.array([\n [-1, 0, 0, 0],\n [0, -1, 0, 0],\n [0, 0, -1, 0],\n [0, 0, 0, 1]\n])\n\nFLIP_WORLD = np.array([\n [1, 0, 0, 0],\n [0, 1, 0, 0],\n [0, 0, -1, 0],\n [0, 0, 0, 1]\n])\n\ndef flip_tx_world_cam(tx_world_cam):\n return FLIP_WORLD @ tx_world_cam @ FL...
[ [ "numpy.array" ] ]
anonymousxxxxxx/SMCL
[ "cfe88d6144f4207ba427246f1ec0affce9cb6c20" ]
[ "MOSEI/train/constrastive/Ttrain.py" ]
[ "import torch\r\nimport config as default_config\r\nfrom model.net.constrastive.text_encoder_finetune import TextPretrain\r\nfrom dataloader.MOSEI import MOSEIDataloader\r\nfrom tqdm import tqdm\r\nimport transformers as trans\r\nfrom util.metrics import Metrics\r\nfrom util.common import write_log, check_and_save\...
[ [ "torch.device", "torch.no_grad", "torch.cat" ] ]
george-j-zhu/timeseriesprocessing
[ "5d774a438c5e835a8d5c802009f4d5303388b69d", "5d774a438c5e835a8d5c802009f4d5303388b69d" ]
[ "cluster/cluster_utilities.py", "test/testSignificanceTest.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Author: Jiajun Zhu\n\n\"\"\"\ntime series clustering\n\"\"\"\n\nfrom sklearn import cluster, mixture\nfrom .gaussianMixture import GaussianMixture\nfrom .kMeans import KMeans\nimport numpy as np\nfrom matplotlib import pyplot as plt\n\ndef get_n_clusters(clusterer)...
[ [ "matplotlib.pyplot.xlabel", "matplotlib.pyplot.figure", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.show", "numpy.unique" ], [ "numpy.random.seed", "numpy.std", "numpy.random.randn", "numpy.mean" ] ]
kevinrue/cgat-flow
[ "02b5a1867253c2f6fd6b4f3763e0299115378913", "02b5a1867253c2f6fd6b4f3763e0299115378913" ]
[ "cgatpipelines/tasks/rnaseq.py", "cgatpipelines/tools/pipeline_docs/pipeline_motifs/trackers/Motifs.py" ]
[ "\"\"\"rnaseq.py - Tasks for RNAseq analysis\n==============================================\n\nThis module provides tasks related to RNAseq analysis.\n\nCufflinks/Cuffdiff\n------------------\n\nThe module contains wrappers for running and parsing the output\nof cufflinks and cuffdiff.\n\nUTR analysis\n-----------...
[ [ "pandas.read_table", "numpy.mean", "numpy.zeros", "pandas.merge" ], [ "numpy.histogram", "numpy.array", "numpy.arange", "numpy.argmax", "numpy.cumsum" ] ]
yonggyu94/SAGAN
[ "dc32a22b43a7f2e45d20f3030aac0bb02632a559" ]
[ "dataloader.py" ]
[ "# from .vision import VisionDataset\nfrom torchvision.datasets import VisionDataset\nfrom torch.utils.data import Dataset, DataLoader\nimport torchvision.transforms.functional as F\n\nfrom PIL import Image\nimport numpy as np\nimport os.path\nimport sys\nimport torch\nimport pickle\n\nimport os\nfrom torchvision.d...
[ [ "torch.utils.data.DataLoader" ] ]
BestSonny/open-vot-1
[ "3e00fbded601cf8c6a38d6f57d7b5a9df0be394b" ]
[ "lib/models/submodules.py" ]
[ "from __future__ import absolute_import, division\n\nimport torch.nn as nn\nimport torch\nimport torch.nn.functional as F\n\n\nclass XCorr(nn.Module):\n\n def __init__(self):\n super(XCorr, self).__init__()\n\n def forward(self, z, x):\n out = []\n for i in range(z.size(0)):\n ...
[ [ "torch.cat", "torch.nn.BatchNorm2d", "torch.nn.Conv2d", "torch.pow" ] ]
rejinjoy18/transformers
[ "71346c4a9099d84685c91fab626d0b8b1704ef08" ]
[ "src/transformers/trainer.py" ]
[ "# coding=utf-8\n# Copyright 2020-present the HuggingFace Inc. 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# Unles...
[ [ "torch.cat", "torch.cuda.amp.autocast", "torch.Generator", "torch.cuda.random.set_rng_state", "torch.random.get_rng_state", "torch.cuda.random.set_rng_state_all", "torch.cuda.is_available", "torch.load", "torch.cuda.random.get_rng_state_all", "torch.nn.DataParallel", "n...
keeeto/gp-net
[ "08a86d7822aca4936107dc72b06c2caf8cae7f22" ]
[ "test/al_new/run_05/simple-train.py" ]
[ "import sys\nsys.path.append('../../')\nfrom aux.get_info import megnet_input\nfrom train.MEGNetTrain import training \nfrom megnet.data.graph import GaussianDistance\nfrom megnet.data.graph import StructureGraph\nfrom megnet.data.crystal import CrystalGraph\nfrom aux.activations import latent\nfrom optimizers.adam...
[ [ "numpy.load" ] ]
jackblandin/ml-fairness-gym
[ "dce1feaacf2588e0a2d6187e896796241a25ed81" ]
[ "agents/recommenders/rnn_cvar_agent.py" ]
[ "# coding=utf-8\n# Copyright 2022 The ML Fairness Gym 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 requ...
[ [ "numpy.array", "numpy.mean", "numpy.clip" ] ]
CarlKCarlK/sgkit-plink
[ "4a46a448d1b25e009f4abc868353761fee47aa53" ]
[ "sgkit_plink/tests/test_open_bed.py" ]
[ "import numpy as np\nfrom pathlib import Path\nimport pytest\nfrom sgkit_plink._open_bed import open_bed\nimport logging #!!!cmk how does sgkit do logging messages?\n\n\ndef test_read1(shared_datadir):\n file = shared_datadir / \"plink_sim_10s_100v_10pmiss.bed\"\n with open_bed(file) as bed:\n assert ...
[ [ "numpy.array", "numpy.array_equal", "numpy.zeros", "numpy.random.RandomState", "numpy.random.seed", "numpy.load", "numpy.allclose", "numpy.random.randint", "numpy.all", "numpy.issubdtype", "numpy.dtype" ] ]
tylertian123/phys180_lab
[ "8dca975a27db1c488d3e34f7a921b2b7f967a957" ]
[ "lab1/fit.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\npython3 fit.py [filename] [angle_format=deg|rad] [time_format=sec|frames] [fps]\n\nAdapted from fitting.py posted on Quercus.\n\nThe data file is named \"data.txt\" by default, but can be specified as an argument.\nIf angle_format is \"deg\", the angles will be converted into radia...
[ [ "numpy.array", "scipy.optimize.curve_fit", "numpy.exp", "matplotlib.pyplot.subplots", "numpy.arange", "numpy.sqrt", "numpy.cos", "matplotlib.pyplot.show" ] ]
elenarose/scares-api
[ "d754ae9066cc77ce999e76ffe4aa2546e8714642" ]
[ "src/svm/SVM.py" ]
[ "# Title : TODO\n# Objective : TODO\n# Created by: satwikkamarthi\n# Created on: 10/4/20\n\nimport pandas as pd\n# from sklearn.cross_decomposition import CCA\n# from sklearn.datasets import make_multilabel_classification\n# from sklearn.metrics import confusion_matrix\n# from sklearn.svm import SVC\n# import n...
[ [ "sklearn.model_selection.train_test_split", "pandas.read_csv", "sklearn.svm.SVC" ] ]
mohammadul/tensorlayer
[ "e17e49f03477d524ef688474fe9ddde044ca5cf5" ]
[ "tests/test_initializers.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport unittest\n\nos.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'\n\nimport tensorflow as tf\nimport tensorlayer as tl\nimport numpy as np\n\nfrom tests.utils import CustomTestCase\n\n\nclass Test_Leaky_ReLUs(CustomTestCase):\n\n @classmethod\n def setUp...
[ [ "numpy.random.uniform", "numpy.zeros", "numpy.ones" ] ]