repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
me714/Dwin_Transformer | [
"825a63869c46db4ef83ccc31d479bbd971ffd47c"
] | [
"configs/video_detect.py"
] | [
"import argparse\nimport math\nimport os\nimport shutil\nimport time\nimport numpy as np\nfrom pathlib import Path\nfrom ensemble_boxes import *\nimport copy\nimport cv2\nimport torch\nimport torch.backends.cudnn as cudnn\nfrom numpy import random\nimport matplotlib.pyplot as plt\nfrom itertools import combinations... | [
[
"torch.zeros",
"matplotlib.pyplot.text",
"torch.cat",
"numpy.array",
"matplotlib.pyplot.savefig",
"torch.no_grad",
"matplotlib.pyplot.xticks",
"matplotlib.pyplot.title",
"matplotlib.pyplot.yticks",
"matplotlib.pyplot.figure",
"torch.from_numpy",
"torch.tensor",
... |
greenjew/deeploma | [
"499de7ad844546acf0760aa00096d66216fd3ee9"
] | [
"api/vk_methods.py"
] | [
"import requests as r\nimport pandas as pd\nimport time\nfrom datetime import datetime\nimport re\n\n\n\nTOKEN_VK = '23acc95023acc95023acc9504023c092a1223ac23acc9507ef4dc240205bcafea27244d' # vk service token\nversion = 5.101\n\ndef get_members(group_id):\n\n try_count = 0\n while try_count < 2:\n try... | [
[
"pandas.DataFrame"
]
] |
NewCPM/MCPM | [
"9fb9b7725ccc4452701be47d103ab61f81b4595b",
"9fb9b7725ccc4452701be47d103ab61f81b4595b",
"9fb9b7725ccc4452701be47d103ab61f81b4595b"
] | [
"examples/OGLE-BLG-ECL-234840/plot_v8.py",
"examples/plot_tpf_pixel_curves.py",
"source/MCPM/prfdata.py"
] | [
"import matplotlib.pyplot as plt\nfrom matplotlib import gridspec\nimport numpy as np\n\n\nin_data = \"run_6/run_6_e2_phot_prf_limit.dat\"\nin_model = \"run_6/run_6_e2_phot.res\"\nout_file = \"run_6/plot_eb234840_v8.png\"\n\nkwargs = {'color': 'red', 'marker': '.', 'ls': 'none'}\nx_lim = [7500., 7528.]\ny_lim = [-4... | [
[
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.errorbar",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.savefig",
"numpy.loadtxt",
"numpy.arange",
"matplotlib.pyplot.ylabel"
],
[
"matplotlib.pyplot.savefig",
"matplo... |
astrophys/Python_Debugging_Examples | [
"510b4b6966166dddc14eda3f6813700386d2324f"
] | [
"code/txburstML.py"
] | [
"#!/usr/bin/python3\nimport argparse\nimport pandas as pd\nimport numpy as np\nimport warnings\nwarnings.filterwarnings('ignore')\nfrom joblib import delayed,Parallel\nimport os\n\ndef whichKeep(est_params):\n kon = np.array(est_params)[:,0]\n koff = np.array(est_params)[:,1]\n ksyn = np.array(est_params)[... | [
[
"pandas.notnull",
"numpy.array",
"numpy.isnan",
"scipy.special.beta",
"scipy.special.j_roots",
"numpy.copy",
"numpy.sum",
"scipy.stats.poisson.pmf",
"numpy.mean",
"numpy.repeat",
"pandas.read_csv",
"scipy.optimize.minimize"
]
] |
mmikolajczak/recommendation_system_hetrec2011_movielens | [
"3ae13e62605ffbf5517bc2079e086a400de48748"
] | [
"recommendations_system/ffm/ffm.py"
] | [
"import subprocess\nimport warnings\nimport os.path as osp\nimport os\nimport numpy as np\n\n\n# Note: libffm doesn't handle relative paths very well, hence abspath used.\nclass FFM:\n\n def __init__(self, train_binary_path, predict_binary_path, model_path=None):\n self.train_binary_path = osp.abspath(tra... | [
[
"numpy.array",
"numpy.loadtxt"
]
] |
caspase-like-homolog-identifier/c14_witcher | [
"e2c481607b85fed749daec0e9b3b29b65d6b448f"
] | [
"find_deathdomains.py"
] | [
"#!/usr/bin/env python\n\nfrom run_hmmer import RunHmmer\nfrom Bio import SearchIO\nimport pandas as pd\nimport collections\nimport random\nimport tempfile\nimport argparse\nimport pprint\nimport glob\nimport sys\n\nclass FindDeathDomains(RunHmmer):\n\n def __init__(self, seqfile, dd_hmm_path, *hmmersearch_args... | [
[
"pandas.DataFrame",
"pandas.Series"
]
] |
MehdiAbbanaBennani/statistical-optimisation | [
"0de96661ca7ab857639ad14127b97af39321762e"
] | [
"src/logistic_regression.py"
] | [
"import numpy as np\nfrom tqdm import tqdm\nfrom gradient import Gradient\n\n\nclass LogisticRegression:\n\n def __init__(self, type, mu, gradient_param, data, d=100, theta=None):\n if theta is None:\n self.theta = np.random.rand(d) * 2 - 1\n else:\n self.theta = theta\n\n ... | [
[
"numpy.dot",
"numpy.random.rand",
"numpy.exp"
]
] |
synapticarbors/npy-append-array | [
"bf33483e7c2c50e13c9e55940878ca8217f4d4ad"
] | [
"npy_append_array/npy_append_array.py"
] | [
"import numpy as np\nimport os.path\nfrom struct import pack, unpack\nfrom io import BytesIO\n\ndef header_tuple_dict(tuple_in):\n return {\n 'shape': tuple_in[0],\n 'fortran_order': tuple_in[1],\n 'descr': np.lib.format.dtype_to_descr(tuple_in[2])\n }\n\ndef has_fortran_order(arr):\n ... | [
[
"numpy.lib.format.dtype_to_descr",
"numpy.lib.format.write_array_header_2_0",
"numpy.lib.format.read_array_header_2_0",
"numpy.lib.format.read_array_header_1_0",
"numpy.lib.format.read_magic"
]
] |
Erebyel/Gilbert | [
"b7206278cae8c4686de9b87f042fbda42b5fe324"
] | [
"gilbert.py"
] | [
"\n##---------------------- Carga de bibliotecas\nfrom pandas import DataFrame\nimport streamlit as st\nimport numpy as np\n\n##---------------------- Base de datos\nfrase = DataFrame({'artículo': ['El', 'El', 'El', 'La', 'El', 'La', 'El', 'El', 'La', 'El', 'La', 'El', 'La', 'La', 'El', 'La', 'La', 'El', 'La', 'El'... | [
[
"pandas.DataFrame",
"numpy.random.randint"
]
] |
GanshengT/mne-python | [
"49253e74308137e14187561a204d784ea28f12a7"
] | [
"mne/viz/misc.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"Functions to make simple plots with M/EEG data.\"\"\"\n\n# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>\n# Denis Engemann <denis.engemann@gmail.com>\n# Martin Luessi <mluessi@nmr.mgh.harvard.edu>\n# Eric Larson <larson.eric.d@gmail.com>\n# ... | [
[
"numpy.dot",
"matplotlib.pyplot.xlim",
"scipy.linalg.svd",
"numpy.min",
"numpy.where",
"matplotlib.pyplot.gcf",
"numpy.sort",
"numpy.max",
"numpy.concatenate",
"matplotlib.pyplot.colorbar",
"numpy.full",
"matplotlib.pyplot.subplots",
"numpy.arange",
"numpy.s... |
bopopescu/smart_contracts7 | [
"40a487cb3843e86ab5e4cb50b1aafa2095f648cd"
] | [
"env/lib/python3.6/site-packages/torch/optim/asgd.py"
] | [
"import math\nimport torch\nfrom .optimizer import Optimizer\n\n\nclass ASGD(Optimizer):\n \"\"\"Implements Averaged Stochastic Gradient Descent.\n\n It has been proposed in `Acceleration of stochastic approximation by\n averaging`_.\n\n Arguments:\n params (iterable): iterable of parameters to o... | [
[
"torch.zeros_like"
]
] |
luftwurzel/pandas | [
"8980af7ce9d98713b0f8792e38f0fe43088e8780"
] | [
"pandas/tests/io/parser/test_python_parser_only.py"
] | [
"\"\"\"\nTests that apply specifically to the Python parser. Unless specifically\nstated as a Python-specific issue, the goal is to eventually move as many of\nthese tests out of this module as soon as the C parser can accept further\narguments when parsing.\n\"\"\"\nfrom __future__ import annotations\n\nimport csv... | [
[
"pandas.Index",
"pandas._testing.assert_produces_warning",
"pandas.DataFrame",
"pandas.MultiIndex.from_tuples",
"pandas._testing.ensure_clean",
"pandas._testing.assert_frame_equal"
]
] |
jkterry1/parameter-sharing-paper | [
"cb26ad195b580006f66fd8a60973408d5657b209"
] | [
"indicator_opt.py"
] | [
"import sys\nimport json\nimport numpy as np\nimport os\nimport pickle as pkl\nimport time\nfrom pprint import pprint\n\nfrom stable_baselines3 import PPO, DQN\nfrom stable_baselines3.common.utils import set_random_seed\n\nfrom pettingzoo.butterfly import cooperative_pong_v3, prospector_v4, knights_archers_zombies_... | [
[
"numpy.random.randint"
]
] |
sanket-kamthe/probability | [
"c22b6201155c2e58d08a4ad30641d1aff59fbe7c",
"c22b6201155c2e58d08a4ad30641d1aff59fbe7c",
"c22b6201155c2e58d08a4ad30641d1aff59fbe7c",
"c22b6201155c2e58d08a4ad30641d1aff59fbe7c"
] | [
"tensorflow_probability/python/distributions/beta.py",
"tensorflow_probability/python/distributions/beta_test.py",
"tensorflow_probability/python/distributions/categorical_test.py",
"tensorflow_probability/python/distributions/gamma_test.py"
] | [
"# Copyright 2018 The TensorFlow Probability Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a... | [
[
"tensorflow.compat.v2.math.xlogy",
"tensorflow.compat.v2.TensorShape",
"tensorflow.compat.v2.math.betainc",
"tensorflow.compat.v2.broadcast_to",
"tensorflow.compat.v2.ones",
"tensorflow.compat.v2.math.log1p",
"tensorflow.compat.v2.broadcast_static_shape",
"tensorflow.python.util.de... |
whiskie14142/spktype21 | [
"7ed22365fe92cdb74c416d27634df96a45712953"
] | [
"source/spktype21.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"A supporting module for jplephem to handle data type 21 (Version 0.1.0)\n\nThis module computes position and velocity of a celestial small body, from a \nNASA SPICE SPK ephemeris kernel file of data type 21 (Extended Modified \nDifference Arrays).\nhttp://naif.jpl.nasa.gov/pub/naif/t... | [
[
"numpy.array",
"numpy.reshape",
"numpy.zeros"
]
] |
nvogtvincent/parcels | [
"6f6dbadacaae54949ade9acd4e4a57dd8b5af398"
] | [
"parcels/kernel/basekernel.py"
] | [
"import re\nimport _ctypes\nimport inspect\nimport numpy.ctypeslib as npct\nfrom time import time as ostime\nfrom os import path\nfrom os import remove\nfrom sys import platform\nfrom sys import version_info\nfrom ast import FunctionDef\nfrom hashlib import md5\nfrom parcels.tools.loggers import logger\nimport nump... | [
[
"numpy.sign",
"numpy.ctypeslib.load_library",
"numpy.isclose",
"numpy.where"
]
] |
joaopdss/aXeleRate | [
"791c8b29056ed11bd0ed306e620664577ec9724c"
] | [
"axelerate/networks/common_utils/callbacks.py"
] | [
"import numpy as np\nfrom tensorflow import keras\nfrom tensorflow.keras import backend as K\n\ndef cosine_decay_with_warmup(global_step,\n learning_rate_base,\n total_steps,\n warmup_learning_rate=0.0,\n ... | [
[
"numpy.where",
"tensorflow.keras.backend.get_value",
"tensorflow.keras.backend.set_value"
]
] |
monroid/openvino | [
"031e998a15ec738c64cc2379d7f30fb73087c272",
"8272b3857ef5be0aaa8abbf7bd0d5d5615dc40b6",
"031e998a15ec738c64cc2379d7f30fb73087c272",
"031e998a15ec738c64cc2379d7f30fb73087c272",
"031e998a15ec738c64cc2379d7f30fb73087c272",
"031e998a15ec738c64cc2379d7f30fb73087c272",
"031e998a15ec738c64cc2379d7f30fb73087c27... | [
"model-optimizer/unit_tests/extensions/front/div_test.py",
"runtime/bindings/python/tests/test_frontend/test_frontend_onnx.py",
"tests/layer_tests/tensorflow_tests/test_tf_BatchToSpace.py",
"tests/layer_tests/common/utils/tf_utils.py",
"model-optimizer/unit_tests/extensions/front/mxnet/conv_ext_test.py",
... | [
"# Copyright (C) 2018-2021 Intel Corporation\n# SPDX-License-Identifier: Apache-2.0\n\nimport unittest\n\nimport numpy as np\n\nfrom extensions.front.div import Div\nfrom mo.utils.ir_engine.compare_graphs import compare_graphs\nfrom unit_tests.utils.graph import build_graph, result, regular_op_with_shaped_data, val... | [
[
"numpy.array"
],
[
"numpy.testing.assert_allclose",
"numpy.array"
],
[
"tensorflow.compat.v1.placeholder",
"tensorflow.compat.v1.global_variables_initializer",
"tensorflow.batch_to_space",
"tensorflow.compat.v1.Session",
"tensorflow.constant",
"tensorflow.compat.v1.rese... |
SyneRBI/SIRF-Contribs | [
"130223d9bc11991eadcd11f9b715aea34c4842fd"
] | [
"src/Python/sirf/contrib/kcl/Prior.py"
] | [
"\r\n\r\nimport numpy as np\r\n\r\n\r\nclass Prior(object):\r\n \r\n def __init__(self,imageSize, sWindowSize=3, imageCropFactor=[0]):\r\n \r\n self.imageSize = imageSize if len(imageSize)==3 else imageSize.append(1)\r\n self.imageCropFactor = imageCropFactor\r\n if np.mod(sWin... | [
[
"numpy.isinf",
"numpy.max",
"numpy.isnan",
"numpy.zeros",
"numpy.sum",
"numpy.any",
"numpy.arange",
"numpy.argsort",
"numpy.sqrt",
"numpy.mod",
"numpy.floor"
]
] |
jimmy-academia/Deeper-Learnings | [
"ac363efe5450dd2751c0c1bea0ee7af457f7ac24"
] | [
"codestosort/NaturalLanguage/module/bestmodel.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\n\nclass BestNet(torch.nn.Module):\n def __init__(self, embedding_dim):\n super(BestNet, self).__init__()\n\n self.embedding_dim = embedding_dim\n self.hidden_dim = 256\n self.em... | [
[
"torch.nn.Linear",
"torch.nn.Dropout",
"torch.cat",
"torch.stack",
"torch.nn.GRU",
"torch.FloatTensor",
"torch.mm",
"torch.nn.init.xavier_normal_"
]
] |
ameisner/legacypipe | [
"5ffe6fb2458618b68653580badc4a94e1ecb4f04"
] | [
"py/legacypipe/unwise.py"
] | [
"import os\nimport numpy as np\nimport fitsio\nfrom astrometry.util.fits import fits_table\nfrom astrometry.util.ttime import Time\n\nfrom wise.unwise import get_unwise_tractor_image\n\nimport logging\nlogger = logging.getLogger('legacypipe.unwise')\ndef info(*args):\n from legacypipe.utils import log_info\n ... | [
[
"numpy.array",
"numpy.clip",
"numpy.zeros",
"numpy.errstate",
"scipy.ndimage.morphology.binary_dilation",
"numpy.sum",
"numpy.round",
"numpy.nonzero",
"numpy.bitwise_and",
"numpy.arange",
"numpy.hypot",
"numpy.isfinite",
"numpy.abs",
"numpy.all",
"numpy.... |
GT-SALT/Disfluency-Generation-and-Detection | [
"72126172b466aa74277f3cf0f73b915e5dbeefbb"
] | [
"disf_gen_coarse2fine/table/Loss.py"
] | [
"\"\"\"\nThis file handles the details of the loss function during training.\n\nThis includes: LossComputeBase and the standard NMTLossCompute, and\n sharded loss compute stuff.\n\"\"\"\nfrom __future__ import division\nfrom itertools import count\nimport torch\nimport torch.nn as nn\nimport random as... | [
[
"torch.nn.NLLLoss",
"torch.cuda.is_available",
"torch.where"
]
] |
vrsub/openconcept | [
"459aa24269cf54122ee4cfb3edf173c79c880be9"
] | [
"openconcept/components/splitter.py"
] | [
"from __future__ import division\nimport numpy as np\nfrom openmdao.api import ExplicitComponent\nfrom openmdao.api import Group\n\n\nclass PowerSplit(ExplicitComponent):\n \"\"\"\n A power split mechanism for mechanical or electrical power.\n\n Inputs\n ------\n power_in : float\n Power fed t... | [
[
"numpy.zeros",
"numpy.ones",
"numpy.any",
"numpy.where",
"numpy.arange"
]
] |
amit-bohra/Interactive-Image-Segmentation-with-OpenCV-Watershed-Algorithm-in-Python3 | [
"9fd6e2551fe19af76f1c91c714ba029d2d8599ca"
] | [
"56_interactive_watershed.py"
] | [
"import cv2\r\nimport numpy as np\r\nfrom copy import deepcopy as dp\r\n\r\naqua=(255,255,0)\r\nmarine=(116,139,69)\r\nbanana=(87,207,277)\r\nblue=(255,0,0)\r\nalmond=(205,235,255)\r\nbrown=(64,64,255)\r\nblue1=(255,245,152)\r\ngreen=(0,100,0)\r\norange=(0,140,255)\r\norchid=(139,34,104)\r\npink=(147,20,255)\r\ngol... | [
[
"numpy.zeros"
]
] |
emailandxu/neurst | [
"235bddfc93b7784df01eddccec6791e1281651cf",
"235bddfc93b7784df01eddccec6791e1281651cf",
"235bddfc93b7784df01eddccec6791e1281651cf"
] | [
"neurst/data/datasets/parallel_text_dataset.py",
"neurst/data/datasets/audio/librispeech.py",
"neurst/utils/checkpoints.py"
] | [
"# Copyright 2020 ByteDance Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agre... | [
[
"tensorflow.io.gfile.GFile",
"tensorflow.io.VarLenFeature"
],
[
"tensorflow.io.gfile.exists",
"tensorflow.io.gfile.GFile"
],
[
"tensorflow.train.latest_checkpoint",
"tensorflow.io.gfile.glob",
"numpy.sum",
"tensorflow.Variable",
"tensorflow.train.list_variables",
"t... |
semio/ddf_utils | [
"e10c4cb6dc7722415a5863579a552cc7b7e3668d",
"e10c4cb6dc7722415a5863579a552cc7b7e3668d"
] | [
"ddf_utils/model/package.py",
"ddf_utils/factory/ilo.py"
] | [
"# -*- coding: utf-8 -*-\n\n\"\"\"datapackage model\"\"\"\n\nimport os.path as osp\nfrom typing import List, Tuple, Dict, Union, Callable\nimport attr\nimport json\nfrom itertools import product\nfrom collections import OrderedDict\nfrom tqdm import tqdm\n\nimport pandas as pd\n\nfrom .ddf import DDF, Concept, Enti... | [
[
"pandas.isnull",
"pandas.read_csv",
"pandas.api.types.CategoricalDtype"
],
[
"pandas.to_datetime",
"pandas.read_csv"
]
] |
837278709/Deep-Learning-Coursera-1 | [
"2498a90d3f61ec0876752205066ec95323f83161"
] | [
"Neural Networks and Deep Learning/Week 3/Planar data classification with one hidden layer/planar_utils.py"
] | [
"import matplotlib.pyplot as plt\nimport numpy as np\nimport sklearn\nimport sklearn.datasets\nimport sklearn.linear_model\n\ndef plot_decision_boundary(model, X, y):\n # Set min and max values and give it some padding\n x_min, x_max = X[0, :].min() - 1, X[0, :].max() + 1\n y_min, y_max = X[1, :].min() - 1... | [
[
"sklearn.datasets.make_gaussian_quantiles",
"numpy.sin",
"numpy.random.rand",
"matplotlib.pyplot.contourf",
"numpy.zeros",
"sklearn.datasets.make_blobs",
"numpy.random.seed",
"matplotlib.pyplot.xlabel",
"numpy.random.randn",
"numpy.exp",
"numpy.arange",
"sklearn.dat... |
NREL/PV-DEMICE | [
"6e2938950ff10c37f176f46aeb76c78de609f535"
] | [
"PV_ICE/main.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nMain.py contains the functions to calculate the different quantities of materials\nin each step of the process. Reffer to the diagram on Package-Overview for the \nsteps considered. \n\nSupport functions include Weibull functions for reliability and failure; also, \nfunctions to mo... | [
[
"numpy.sin",
"numpy.isnan",
"numpy.array",
"numpy.log",
"pandas.DataFrame",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.legend",
"pandas.RangeIndex",
"matplotlib.pyplot.title",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.ylabel",
... |
keshaviyengar/rl-baselines-zoo | [
"6e39f5c7c6c2d30873297308ed064551bffaa52d"
] | [
"trajectory_generator.py"
] | [
"import rospy\nfrom geometry_msgs.msg import Pose, Point\nfrom std_msgs.msg import Bool\n\nimport numpy as np\nimport os\n# This script creates a square trajectory for a robot to follow.\n# Will output errors as well.\n\n\nclass CircleTrajectory(object):\n def __init__(self, x_offset, y_offset, z_height, radius,... | [
[
"numpy.deg2rad",
"numpy.array",
"numpy.sin",
"numpy.cos"
]
] |
truatpasteurdotfr/napari | [
"48cdf4d1c4bcf6f76603e90b1c0c7498e2aba6c0"
] | [
"napari/layers/surface/surface.py"
] | [
"import warnings\n\nimport numpy as np\n\nfrom ...utils.colormaps import AVAILABLE_COLORMAPS\nfrom ...utils.events import Event\nfrom ...utils.translations import trans\nfrom ..base import Layer\nfrom ..intensity_mixin import IntensityVisualizationMixin\nfrom ..utils.layer_utils import calc_data_range\nfrom ._surfa... | [
[
"numpy.max",
"numpy.full",
"numpy.array",
"numpy.zeros",
"numpy.min",
"numpy.where",
"numpy.subtract",
"numpy.all",
"numpy.vstack"
]
] |
tomstark99/epic-kitchens-100-fyrp | [
"cbc9e59569fb6110b900a51def1947b8a3c93699"
] | [
"src/models/esvs.py"
] | [
"import torch as t\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\n\r\nclass MTRN(nn.Module):\r\n \r\n def __init__(self, frame_count: int):\r\n super().__init__()\r\n self.frame_count = frame_count\r\n self.fc1 = nn.Linear(256 * frame_count, 1024)\r\n self.fc2 = nn.... | [
[
"torch.nn.Linear",
"torch.nn.Dropout"
]
] |
JaimeCernuda/dlio_benchmark | [
"d9cfbf76b4c7fb0d48a0dd43b8d2f2ea6ba75949"
] | [
"src/data_generator/npz_generator.py"
] | [
"\"\"\"\n Copyright (C) 2020 Argonne, Hariharan Devarajan <hdevarajan@anl.gov>\n This file is part of DLProfile\n DLIO is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as\n published by the Free Software Foundation, either version 3 of the published by th... | [
[
"numpy.random.random",
"numpy.savez",
"numpy.savez_compressed"
]
] |
CogStack/CAT | [
"5ac04d2676aede13f8e8d0ab408472c3c6d46a86"
] | [
"medcat/cat.py"
] | [
"import os\nimport shutil\nimport pickle\nimport traceback\nimport json\nimport logging\nimport math\nimport time\nimport psutil\nfrom time import sleep\nfrom copy import deepcopy\nfrom multiprocess import Process, Manager, cpu_count\nfrom multiprocess.queues import Queue\nfrom multiprocess.synchronize import Lock\... | [
[
"torch.multiprocessing.set_start_method",
"torch.multiprocessing.get_start_method",
"torch.set_num_threads"
]
] |
akrouriad/rlberry | [
"dde4e2cbafca05fdef1df07646bb6368059eeadf"
] | [
"rlberry/utils/torch.py"
] | [
"import os\nimport re\nimport shutil\nfrom subprocess import check_output, run, PIPE\nimport numpy as np\nimport torch\nimport logging\n\nlogger = logging.getLogger(__name__)\n\n\ndef get_gpu_memory_map():\n result = check_output(\n [\"nvidia-smi\", \"--query-gpu=memory.used\", \"--format=csv,nounits,nohe... | [
[
"torch.zeros",
"torch.cuda.is_available",
"numpy.argmin"
]
] |
jtiscione/doodlecritic | [
"3af8245330523109b7452d3afc7d8d25d43d182c"
] | [
"train.py"
] | [
"import sys\nimport os\nfrom os.path import expanduser\nimport pickle\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.utils.data\nimport torch.onnx\nimport re\nimport json\nfrom PIL import Image, ImageDraw\nimport torch\nimport numpy as np\n\n# Training script- trains a Pytorch model... | [
[
"torch.utils.data.RandomSampler",
"torch.nn.BatchNorm2d",
"numpy.mean",
"torch.cuda.is_available",
"torch.load",
"torch.nn.CrossEntropyLoss",
"torch.nn.MaxPool2d",
"torch.utils.data.DataLoader",
"torch.zeros",
"numpy.array",
"numpy.zeros",
"torch.max",
"numpy.ro... |
r-graves/demo_lab | [
"729cdf61774bf32d2c07ca68bf70e65470700cc2"
] | [
"venv/lib/python3.10/site-packages/pandas/tests/series/methods/test_drop_duplicates.py"
] | [
"import numpy as np\nimport pytest\n\nfrom pandas import (\n NA,\n Categorical,\n Series,\n)\nimport pandas._testing as tm\n\n\n@pytest.mark.parametrize(\n \"keep, expected\",\n [\n (\"first\", Series([False, False, False, False, True, True, False])),\n (\"last\", Series([False, True, T... | [
[
"pandas._testing.assert_produces_warning",
"pandas.Categorical",
"pandas.Series",
"pandas._testing.assert_series_equal",
"numpy.dtype"
]
] |
Ivanfdezr/CentralSoftware | [
"8681fedd4814dc60deb527a370411350b40c994c",
"8681fedd4814dc60deb527a370411350b40c994c"
] | [
"OneSpanAnalysis_Mdl.py",
"MdlUtilities.py"
] | [
"import numpy as np\r\nimport numpy.linalg as la\r\nfrom MdlUtilities import Field, FieldList\r\nimport MdlUtilities as mdl\r\n\r\n\r\ndef get_osaCasing_fields():\r\n\r\n\t\r\n\tOD = Field(2030)\r\n\tID = Field(2031)\r\n\tWeight = Field(2032)\r\n\tDensity = Field(2039)\r\n\tE = Field(2040)\r\n\tosa... | [
[
"numpy.array",
"numpy.dot",
"numpy.sin",
"numpy.cosh",
"numpy.mean",
"numpy.tanh",
"numpy.arctan",
"numpy.sinh",
"numpy.sqrt",
"numpy.cos",
"numpy.linspace"
],
[
"numpy.array",
"numpy.set_string_function",
"numpy.linalg.norm",
"numpy.sin",
"numpy... |
HitkoDev/triplet-reid | [
"d80edf7bdcee2ebcab160f1a06224837ac624329"
] | [
"loss.py"
] | [
"import numbers\nimport tensorflow as tf\n\n\ndef all_diffs(a, b):\n \"\"\" Returns a tensor of all combinations of a - b.\n\n Args:\n a (2D tensor): A batch of vectors shaped (B1, F).\n b (2D tensor): A batch of vectors shaped (B2, F).\n\n Returns:\n The matrix of all pairwise differe... | [
[
"tensorflow.square",
"tensorflow.abs",
"tensorflow.shape",
"tensorflow.compat.v1.name_scope",
"tensorflow.expand_dims",
"tensorflow.gather_nd",
"tensorflow.logical_not",
"tensorflow.nn.softplus",
"tensorflow.stack",
"tensorflow.nn.top_k",
"tensorflow.maximum",
"tens... |
fg6/MachineLearning | [
"7c3f6e8f2f90b729dbcc345c5a8a5da712cfbb27"
] | [
"kaggle/mnist/bayes/naivebayes.py"
] | [
"\nimport numpy as np\nfrom sortedcontainers import SortedList\nfrom scipy.stats import multivariate_normal\n\nclass NaiveBayes:\n #def __init__(self):\n # pass\n\n def fit(self, X, Y):\n self.X = X\n self.Y = set(Y)\n\n self.Classes = set(Y) \n self.Prior = {}\n self.... | [
[
"numpy.cov",
"numpy.log",
"numpy.mean",
"numpy.eye",
"numpy.identity",
"numpy.argmax",
"scipy.stats.multivariate_normal.logpdf",
"numpy.var"
]
] |
gitlost-murali/awesome-align | [
"39fb45ca85a98e005447bddb52c48e65ce7d399b"
] | [
"run_align.py"
] | [
"# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.\n# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.\n# Modifications copyright (C) 2020 Zi-Yi Dou\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file exc... | [
[
"torch.cuda.manual_seed_all",
"numpy.random.seed",
"torch.nn.utils.rnn.pad_sequence",
"torch.no_grad",
"torch.utils.data.SequentialSampler",
"torch.manual_seed",
"torch.cuda.is_available",
"torch.utils.data.DataLoader"
]
] |
duoan/light-text-classification | [
"6c96c9fb6b52abd42e4b4358cb85c44473731668"
] | [
"src/lightextclassification/imdb.py"
] | [
"# _*_ coding: utf-8 _*_\nfrom argparse import ArgumentParser\n\nimport torch\nfrom torchtext import data, datasets\n\nfrom vocab import LocalVectors\n\nfrom models import *\n\nfrom torch.optim import SGD\nfrom torch.utils.data import DataLoader\nfrom ignite.engine import Events, create_supervised_trainer, create_s... | [
[
"torch.cuda.is_available"
]
] |
krishpop/CHER | [
"0633a45151b13f23acf20faabc65028c599a3551"
] | [
"baselines/cher/experiment/config.py"
] | [
"from copy import deepcopy\nimport numpy as np\nimport json\nimport os\nimport gym\n\nfrom baselines import logger\nfrom baselines.her.ddpg import DDPG\n\nfrom baselines.cher.her import make_sample_her_transitions\n\n\nDEFAULT_ENV_PARAMS = {\n 'FetchReach-v0': {\n 'n_cycles': 10,\n },\n}\n\n\nDEFAULT_P... | [
[
"numpy.array"
]
] |
tlambert03/image-demos | [
"a2974bcc7f040fd4d14e659c4cbfeabcf726c707",
"a2974bcc7f040fd4d14e659c4cbfeabcf726c707"
] | [
"test-examples/million_points.py",
"test-examples/shapely_annotation.py"
] | [
"\"\"\"Test converting an image to a pyramid.\n\"\"\"\n\nimport numpy as np\nimport napari\n\npoints = np.random.randint(100, size=(50_000, 2))\n\nwith napari.gui_qt():\n viewer = napari.view_points(points, face_color='red')\n",
"import napari\nimport numpy as np\nfrom shapely.ops import cascaded_union\nfrom s... | [
[
"numpy.random.randint"
],
[
"numpy.array",
"sklearn.datasets.make_blobs"
]
] |
BME-SmartLab/GraphConvWat | [
"6cdcb3cb1bd22eb274c19ad4a45a78e334462e44"
] | [
"evaluation/plot_WDS_topo_with_sensitivity.py"
] | [
"# -*- coding: utf-8 -*-\nimport argparse\nimport os\nimport sys\nimport numpy as np\nimport pandas as pd\nimport seaborn as sns\nfrom matplotlib import collections as mc\nimport matplotlib.pyplot as plt\n\nfrom epynet import Network\n\nsys.path.insert(0, os.path.join('..'))\nfrom utils.graph_utils import get_nx_g... | [
[
"numpy.max",
"numpy.random.rand",
"pandas.DataFrame",
"matplotlib.pyplot.get_cmap",
"matplotlib.pyplot.subplots",
"matplotlib.collections.LineCollection",
"numpy.arctan",
"matplotlib.pyplot.tight_layout",
"numpy.abs",
"pandas.Series",
"matplotlib.pyplot.show"
]
] |
OphirGenomica/proteinFolding | [
"b4b6ea19307e176e58aa9d39ae161003c340416d"
] | [
"srcOld/loss.py"
] | [
"import time\n\nimport matplotlib\nimport numpy as np\n\nmatplotlib.use('Agg')\n\nimport torch\nimport torch.nn as nn\n\nclass LossMultiTargets(nn.Module):\n def __init__(self,loss_fnc=torch.nn.CrossEntropyLoss()):\n super(LossMultiTargets, self).__init__()\n self.loss = loss_fnc\n\n def forward... | [
[
"matplotlib.use",
"torch.diag_embed",
"torch.norm",
"torch.bmm",
"torch.svd",
"torch.sum",
"torch.tensor",
"torch.mean",
"torch.nn.CrossEntropyLoss",
"torch.empty_like"
]
] |
johnwu0604/pytorch-tutorial | [
"bdbc283a0b79620d9b582f1c4d2c2220a853b856"
] | [
"tutorials/02-intermediate/recurrent_neural_network/main.py"
] | [
"import torch \nimport torch.nn as nn\nimport torchvision\nimport torchvision.transforms as transforms\n\n\n# Device configuration\ndevice = torch.device('cuda' if torch.cuda.is_available() else 'cpu')\n\n# Hyper-parameters\nsequence_length = 28\ninput_size = 28\nhidden_size = 128\nnum_layers = 2\nnum_classes = 10\... | [
[
"torch.nn.Linear",
"torch.nn.LSTM",
"torch.max",
"torch.no_grad",
"torch.cuda.is_available",
"torch.utils.data.DataLoader",
"torch.nn.CrossEntropyLoss"
]
] |
JoseHernandez9094/CohortLexicase | [
"5179a3c0db6dcf0c2cae79fcfd08b4b919c9269d"
] | [
"Summarize/solution_timeseries_EVAL.py"
] | [
"#python3\r\n#This script will make csv so that graph_timeseries.py can create plots with them!\r\n\r\nimport pandas as p\r\n\r\nMAX_EVAL = 512*512*1000\r\ndf = p.read_csv('../Data/Raw/min_programs__eval_262144000.csv')\r\ntreat = {}\r\nTREATMENT = 'treatment'\r\nFOUND = 'solution_found'\r\nUPDATE = 'update_found'\... | [
[
"pandas.DataFrame",
"pandas.read_csv"
]
] |
ybubnov/dnsthreat | [
"75a3298379c8b48aeea6bae6c5c31a7d5e9fe315",
"75a3298379c8b48aeea6bae6c5c31a7d5e9fe315"
] | [
"deeplookup/env.py",
"deeplookup/ts.py"
] | [
"from enum import Enum\n\nimport gym\nimport numpy as np\nfrom gym import spaces\nfrom gym.utils import seeding\n\n\nclass Action(Enum):\n decrease_attention = 0\n increase_attention = 1\n access_detector = 2\n isolate_node = 3\n forget_node = 4\n\n\nclass State(Enum):\n healthy = 0\n infected ... | [
[
"numpy.average",
"numpy.array",
"numpy.argmax"
],
[
"numpy.std",
"numpy.mean",
"numpy.zeros"
]
] |
RAJAGOPALAN-GANGADHARAN/PlasmaPy | [
"6df9583cc47375687a07300c0aa11ba31634d770"
] | [
"plasmapy/formulary/tests/test_parameters.py"
] | [
"\"\"\"Tests for functions that calculate plasma parameters.\"\"\"\n\nimport numpy as np\nimport pytest\n\nfrom astropy import units as u\nfrom astropy.constants import m_e, m_p\nfrom astropy.tests.helper import assert_quantity_allclose\n\nfrom plasmapy.formulary.parameters import (\n Alfven_speed,\n betaH_,\... | [
[
"numpy.logical_not",
"numpy.array",
"numpy.isclose",
"numpy.isnan",
"numpy.isscalar",
"numpy.abs",
"numpy.all"
]
] |
seo-95/elvis | [
"a89c759acdf6ce64c7e6863aeb68dc0ba3293fed"
] | [
"elvis/modeling/meta_arch/vl_pretrainer.py"
] | [
"import copy\nimport os\nimport pdb\nimport random\nfrom typing import Dict, List, Text, TypeVar\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom elvis.modeling.models import build_net\nfrom elvis.modeling.models.layers import FC, MLP\nfrom elvis.utils.vlp_objectives import optimal_tran... | [
[
"torch.nn.functional.cross_entropy",
"torch.save",
"torch.ones"
]
] |
keisuke-umezawa/backlight | [
"db49a966fdb38de693bb8157cec88d98620f9946"
] | [
"tests/portfolio/test_portfolio.py"
] | [
"import pytest\nimport pandas as pd\nimport numpy as np\n\nimport backlight\nfrom backlight.portfolio.portfolio import create_portfolio as module\nfrom backlight.portfolio.portfolio import _fusion_positions\nimport backlight.positions.positions\nfrom backlight.trades.trades import make_trades\nfrom backlight.asset.... | [
[
"pandas.to_datetime",
"pandas.date_range",
"numpy.arange",
"numpy.repeat"
]
] |
twice154/Spatial-Self-modulation-on-BigGAN | [
"6ca691231bf7e8fd388a08b5ce6b4e30a50dd57b"
] | [
"BigGAN-PyTorch/BigGAN_remove_condbn+++++.py"
] | [
"import numpy as np\nimport math\nimport functools\n\nimport torch\nimport torch.nn as nn\nfrom torch.nn import init\nimport torch.optim as optim\nimport torch.nn.functional as F\nfrom torch.nn import Parameter as P\n\nimport layers\nfrom sync_batchnorm import SynchronizedBatchNorm2d as SyncBatchNorm2d\n\n\n# Archi... | [
[
"torch.cat",
"torch.nn.ModuleList",
"torch.nn.AvgPool2d",
"torch.split",
"torch.std",
"torch.nn.init.xavier_uniform_",
"torch.nn.ReLU",
"torch.mean",
"torch.squeeze",
"torch.nn.init.normal_",
"torch.nn.init.orthogonal_",
"torch.set_grad_enabled"
]
] |
Ericonaldo/ILSwiss | [
"efd25d457fd1578005c6fbc45cae29e9ab64a99d",
"efd25d457fd1578005c6fbc45cae29e9ab64a99d"
] | [
"rlkit/core/eval_util.py",
"rlkit/torch/algorithms/sac/sac_alpha.py"
] | [
"\"\"\"\nCommon evaluation utilities.\n\"\"\"\n\nfrom collections import OrderedDict\nfrom numbers import Number\nimport os\nimport json\n\nimport numpy as np\n\nfrom rlkit.core.vistools import plot_returns_on_same_plot, save_plot\n\n\ndef get_generic_path_information(paths, stat_prefix=\"\"):\n \"\"\"\n Get ... | [
[
"numpy.concatenate",
"numpy.max",
"numpy.sum",
"numpy.genfromtxt",
"numpy.ones",
"numpy.min",
"numpy.mean",
"numpy.std",
"numpy.stack",
"numpy.arange"
],
[
"torch.mean",
"numpy.prod",
"torch.min",
"numpy.log"
]
] |
shelleyHLX/ai-server | [
"12c4a654a686462b8b725fa0641cc967d2f80e14"
] | [
"model/nlp/topic.py"
] | [
"# -*- coding: utf-8 -*-\n# Author: XuMing <xuming624@qq.com>\n# Brief: \nimport operator\nimport os\n\nimport tensorflow as tf\nfrom keras.models import load_model\n\nfrom model.nlp.keras_data_reader import load_dict\nfrom model.nlp.keras_data_reader import pad_sequence\nfrom model.nlp.keras_data_reader import vec... | [
[
"tensorflow.get_default_graph"
]
] |
skohtz1/web-scrapingHW | [
"11cf4686286a4fa51ef23a9e0afc5adca21f40c1"
] | [
"scrape_mars.py"
] | [
"from bs4 import BeautifulSoup\nimport requests\nfrom splinter import Browser\nimport pandas as pd\nimport time\n\ndef init_browser():\n # @NOTE: Replace the path with your actual path to the chromedriver\n executable_path = {\"executable_path\": \"./chromedriver\"}\n return Browser(\"chrome\", **executabl... | [
[
"pandas.read_html"
]
] |
Zosit/Useful-Reusable-Code | [
"e5eab12f1ebcc6f16e456a7515ff8cc068b5ab16"
] | [
"Class Projects/CS545(MachineLearning)/qLearning/qlearn.py"
] | [
"print(__doc__)\n\nimport matplotlib\n# Force matplotlib to not use any Xwindows backend.\nmatplotlib.use('Agg')\n\nimport math\nfrom decimal import *\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom itertools import cycle\n\nimport pandas as pd\nfrom matplotlib.backends.backend_pdf import PdfPages\nimp... | [
[
"matplotlib.use",
"numpy.savetxt",
"numpy.zeros",
"numpy.mean",
"numpy.std"
]
] |
xhades/rates_classify | [
"225627dad22c162023bc6b5e4d8f5881c5a6f354"
] | [
"rates_classify/rdf.py"
] | [
"# !/usr/bin/env python\n# -*-coding:utf-8-*-\n\n\"\"\"\n@author: xhades\n@Date: 2017/12/28\n\n\"\"\"\n\n# 随机森林分类器\n\nimport numpy as np\nfrom numpy import *\nfrom numpy import array, argmax\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.preprocessing import LabelEncoder\nimport pickle\nfrom sk... | [
[
"numpy.array",
"sklearn.preprocessing.LabelEncoder",
"sklearn.ensemble.RandomForestClassifier",
"numpy.set_printoptions",
"sklearn.model_selection.train_test_split"
]
] |
TomeRozen/IML.HUJI | [
"84b0d835a2a4dd4f52ea415e36382cb25a9eebdc"
] | [
"IMLearn/learners/regressors/linear_regression.py"
] | [
"from __future__ import annotations\nfrom typing import NoReturn\nfrom ...base import BaseEstimator\nimport numpy as np\nfrom numpy.linalg import pinv\n\nclass LinearRegression(BaseEstimator):\n \"\"\"\n Linear Regression Estimator\n\n Solving Ordinary Least Squares optimization problem\n \"\"\"\n\n ... | [
[
"numpy.linalg.pinv",
"numpy.ones"
]
] |
xizaoqu/mmdetection3d | [
"1809f9650de95d7bc80035787b09e3b69390b702"
] | [
"mmdet3d/datasets/pipelines/transforms_3d.py"
] | [
"# Copyright (c) OpenMMLab. All rights reserved.\nimport numpy as np\nimport warnings\nfrom mmcv import is_tuple_of\nfrom mmcv.utils import build_from_cfg\n\nfrom mmdet3d.core import VoxelGenerator\nfrom mmdet3d.core.bbox import (CameraInstance3DBoxes, DepthInstance3DBoxes,\n LiDARInst... | [
[
"numpy.random.choice",
"numpy.random.rand",
"numpy.where",
"numpy.concatenate",
"numpy.random.normal",
"numpy.linalg.norm",
"numpy.logical_and",
"numpy.arange",
"numpy.array",
"numpy.zeros",
"numpy.random.randn",
"numpy.linalg.det",
"numpy.random.shuffle",
"... |
AidenPearce7/python-tictactoe | [
"1f5aaaca87bfb8487a1366b4bc2bd567df8feb5e"
] | [
"src/opencv_backend/ui.py"
] | [
"\"\"\"UI class\"\"\"\nimport cv2 as cv\nimport numpy as np\n\n\nclass UI:\n \"\"\"Handles UI drawing and managing\"\"\"\n\n def __init__(self, frame):\n height, width, channels = frame.shape\n self.width = width\n self.height = height\n self.separators = {\n \"y\": (0, ... | [
[
"numpy.zeros"
]
] |
gabemery/gammapy | [
"99e5c5d38e4920dddd7bca41fb1539ccda8bea2d",
"99e5c5d38e4920dddd7bca41fb1539ccda8bea2d",
"99e5c5d38e4920dddd7bca41fb1539ccda8bea2d"
] | [
"gammapy/astro/population/tests/test_simulate.py",
"gammapy/astro/source/snr.py",
"gammapy/cube/sherpa_.py"
] | [
"# Licensed under a 3-clause BSD style license - see LICENSE.rst\nfrom __future__ import absolute_import, division, print_function, unicode_literals\nfrom numpy.testing import assert_allclose\nfrom astropy.table import Table\nimport astropy.units as u\nfrom ....utils.testing import requires_dependency\nfrom ...popu... | [
[
"numpy.testing.assert_allclose"
],
[
"numpy.select",
"numpy.empty",
"numpy.log"
],
[
"numpy.ones_like",
"numpy.isnan",
"numpy.zeros",
"numpy.log",
"numpy.sum",
"numpy.rollaxis",
"numpy.arange",
"numpy.sqrt"
]
] |
joelfrederico/mytools | [
"7bf57c49c7dde0a8b0aa337fbd2fbd527ce7a67f"
] | [
"scisalt/matplotlib/plot.py"
] | [
"import os as _os\n_on_rtd = _os.environ.get('READTHEDOCS', None) == 'True'\nif not _on_rtd:\n import matplotlib.pyplot as _plt\n import numpy as _np\n\nfrom .setup_axes import setup_axes as _setup_axes\n\n\ndef plot(*args, ax=None, **kwargs):\n \"\"\"\n Plots but automatically resizes x axis.\n\n ..... | [
[
"numpy.shape"
]
] |
purnendu91/allennlp | [
"7bdc142f3fba9b4b751be4de51299858613f134f"
] | [
"allennlp/data/fields/sequence_label_field.py"
] | [
"from typing import Dict, List, Union, Set\nimport logging\n\nfrom overrides import overrides\nimport torch\nfrom torch.autograd import Variable\n\nfrom allennlp.common.checks import ConfigurationError\nfrom allennlp.common.util import pad_sequence_to_length\nfrom allennlp.data.fields.field import Field\nfrom allen... | [
[
"torch.LongTensor"
]
] |
sssssch/jupyter-examples | [
"cf9e26e22dcfa263bcd26323527911cdbcc2cd61"
] | [
"Project_google_task_usage/task_uasge_500_preprocess/data_inverse.py"
] | [
"# -*-coding:utf-8-*-\nimport pandas as pd\nfrom numpy import *\n\ndataset = pd.read_csv(\n 'test_data.csv', header=None)\ndataset = round(dataset, 8)\nList_data = mat(dataset)\nInverse = List_data.T\nprint(Inverse)\nname = [\n 'cpu',\n 'cmui',\n 'amui',\n 'upcmui',\n 'tpcmui',\n 'mmui',\n '... | [
[
"pandas.DataFrame",
"pandas.read_csv"
]
] |
fredmontet/timeatlas | [
"9a439a913ef9a8a1ef9833b42e5fb4e988d7e35e",
"9a439a913ef9a8a1ef9833b42e5fb4e988d7e35e"
] | [
"src/timeatlas/time_series/component_handler.py",
"src/timeatlas/generators/anomaly_generator/anomaly_generator.py"
] | [
"from typing import List, Union, NoReturn\nfrom copy import deepcopy, copy\n\nfrom pandas import Index\n\nfrom .component import Component\n\n\nclass ComponentHandler:\n \"\"\" Helper class to manage many components\n\n The purpose of this class is to make the management of components in a\n time series as... | [
[
"pandas.Index"
],
[
"pandas.Series"
]
] |
cyente/OFA | [
"291a0abb76559a6379f1a7ebbdfdf1350c94a9f4"
] | [
"data/rec_data/rec_nextitem_dataset.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\nfrom io import BytesIO\n\nimport logging\nimport warnings\nimport string\n\nimport numpy as np\nimport torch\nimport base64\nfrom torc... | [
[
"numpy.array",
"torch.cat"
]
] |
Khumayun/FairDeepLearning | [
"e19947c17c282ce1e89ad105cc241ffc07190628"
] | [
"dataloaders/adult_loader.py"
] | [
"import os\nimport numpy as np\nimport pandas as pd\nimport torch\nfrom torch.utils.data import Dataset\nfrom dataloaders.adult_process import get_adult_data\n\n\nclass AdultDataset(Dataset):\n \"\"\"\n The UCI Adult dataset.\n \"\"\"\n\n def __init__(self, root_dir, phase, tar_attr, priv_attr, clr_rati... | [
[
"numpy.sum",
"numpy.logical_and",
"torch.from_numpy",
"numpy.argmax",
"torch.argmax"
]
] |
MarsBighead/mustang | [
"ffbaf109931557e40da2d97e4eb914bc1c0aba0d"
] | [
"Python/npr.py"
] | [
"#!/usr/local/bin/python3\nimport numpy as np \n\nimport numpy.random as npr \nimport ... | [
[
"numpy.random.normal",
"numpy.random.standard_normal",
"numpy.random.rand",
"numpy.random.choice",
"numpy.random.chisquare",
"numpy.random.poisson",
"matplotlib.pyplot.close",
"matplotlib.pyplot.subplots",
"numpy.random.randint",
"matplotlib.pyplot.show",
"numpy.random.... |
mkturkcan/FC.AntennalLobe | [
"6a0e124f68c249fcb067c571b5170002b3335efc"
] | [
"feedbackcircuits/NDComponents/AntennalLobe/AlphaSpike.py"
] | [
"# pylint:disable=no-member\nimport os\nfrom collections import OrderedDict\nimport numpy as np\nimport pycuda.gpuarray as garray\nfrom pycuda.tools import dtype_to_ctype\nimport pycuda.driver as drv\nfrom pycuda.compiler import SourceModule\nfrom neurokernel.LPU.NDComponents.NDComponent import NDComponent\n\nCUDA_... | [
[
"numpy.random.randint",
"numpy.dtype"
]
] |
lizhe960118/CenterNet | [
"d1a0d13974e2316c6d127ca7860866cdd93bcfa7",
"d1a0d13974e2316c6d127ca7860866cdd93bcfa7",
"d1a0d13974e2316c6d127ca7860866cdd93bcfa7",
"d1a0d13974e2316c6d127ca7860866cdd93bcfa7",
"d1a0d13974e2316c6d127ca7860866cdd93bcfa7",
"d1a0d13974e2316c6d127ca7860866cdd93bcfa7"
] | [
"tools/test_file_dir/voc_test.py",
"mmdet/models/losses/ctdet_loss.py",
"mmdet/models/anchor_heads/weight_center_head.py",
"mmdet/models/anchor_heads/fcos_head.py",
"mmdet/models/losses/center_focal_loss.py",
"mmdet/models/anchor_heads/center_head.py"
] | [
"import argparse\nimport os\nimport os.path as osp\nimport shutil\nimport tempfile\n\nimport mmcv\nimport torch\nimport torch.distributed as dist\nfrom mmcv.runner import load_checkpoint, get_dist_info\nfrom mmcv.parallel import MMDataParallel, MMDistributedDataParallel\n\nfrom mmdet.apis import init_dist\nfrom mmd... | [
[
"torch.no_grad",
"torch.distributed.barrier",
"torch.full",
"torch.distributed.broadcast"
],
[
"torch.nn.functional.l1_loss",
"torch.log",
"torch.pow"
],
[
"torch.cat",
"numpy.dot",
"torch.nn.ModuleList",
"numpy.exp",
"numpy.finfo",
"numpy.cos",
"tor... |
Livioni/Cloud-Workflow-Scheduling-base-on-Deep-Reinforcement-Learning | [
"eb246ebba160567277c9c1aa226e359f48629dac"
] | [
"AblationExperiment.py"
] | [
"import gym, torch, copy, os, xlwt, random\nimport torch.nn as nn\nfrom datetime import datetime\nimport numpy as np\n\nenv = gym.make(\"clusterEnv-v0\").unwrapped\nstate_dim, action_dim = env.return_dim_info()\n\n####### initialize environment hyperparameters ######\nmax_ep_len = 1000 # max timesteps in one episo... | [
[
"numpy.log",
"numpy.mean"
]
] |
OuyangChao/Paddle | [
"311b3b44fc7d51d4d66d90ab8a3fc0d42231afda",
"311b3b44fc7d51d4d66d90ab8a3fc0d42231afda",
"311b3b44fc7d51d4d66d90ab8a3fc0d42231afda",
"311b3b44fc7d51d4d66d90ab8a3fc0d42231afda",
"311b3b44fc7d51d4d66d90ab8a3fc0d42231afda",
"311b3b44fc7d51d4d66d90ab8a3fc0d42231afda"
] | [
"python/paddle/fluid/tests/unittests/test_transpose_op.py",
"python/paddle/fluid/tests/unittests/test_pixel_shuffle.py",
"python/paddle/fluid/tests/unittests/test_onnx_export.py",
"python/paddle/fluid/incubate/fleet/utils/utils.py",
"python/paddle/text/datasets/wmt16.py",
"python/paddle/fluid/tests/unitte... | [
"# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless ... | [
[
"numpy.random.random",
"numpy.testing.assert_array_equal",
"numpy.transpose"
],
[
"numpy.allclose",
"numpy.reshape",
"numpy.random.random"
],
[
"numpy.random.random",
"numpy.array"
],
[
"numpy.array"
],
[
"numpy.array"
],
[
"numpy.array",
"numpy.... |
BreastGAN/augmentation | [
"0e1bcb7175e2b2a45cd8084bb14521e26b68caea",
"0e1bcb7175e2b2a45cd8084bb14521e26b68caea"
] | [
"models/breast_cycle_gan/custom/conv/contrib.py",
"models/rcnn/eval.py"
] | [
"# Copyright 2019 Lukas Jendele and Ondrej Skopek.\n# Adapted from The TensorFlow Authors, under the ASL 2.0.\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.ap... | [
[
"tensorflow.python.ops.init_ops.zeros_initializer",
"tensorflow.contrib.layers.python.layers.utils.collect_named_outputs",
"tensorflow.constant_initializer",
"tensorflow.python.ops.variable_scope.variable_scope",
"tensorflow.contrib.layers.python.layers.initializers.xavier_initializer",
"t... |
csp-inc/fluvius | [
"8eb8c3caee2b98720ae17bef384302d6fa88c828"
] | [
"bin/02-preprocess-data.py"
] | [
"import os\nimport pandas as pd\nimport fsspec\nimport argparse\nfrom src.defaults import args_info\n\nenv_vars = open(\"/content/credentials\",\"r\").read().split('\\n')\n\nfor var in env_vars[:-1]:\n key, value = var.split(' = ')\n os.environ[key] = value\n\nstorage_options={'account_name':os.enviro... | [
[
"pandas.to_datetime",
"pandas.DataFrame",
"pandas.read_csv"
]
] |
tianyapiaozi/tensorflow | [
"7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae",
"7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae",
"7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae",
"fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a",
"7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae",
"7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae",
"7e8927e7af0c51ac20a63bd4eab6ff83df1a39a... | [
"tensorflow/contrib/training/python/training/training.py",
"tensorflow/contrib/autograph/utils/multiple_dispatch_test.py",
"tensorflow/contrib/eager/python/examples/revnet/cifar_tfrecords.py",
"tensorflow/compiler/tests/while_test.py",
"tensorflow/python/data/kernel_tests/list_files_dataset_op_test.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 required... | [
[
"tensorflow.python.framework.ops.control_dependencies",
"tensorflow.python.framework.ops.IndexedSlices",
"tensorflow.python.training.training_util.get_or_create_global_step",
"tensorflow.python.platform.tf_logging.info",
"tensorflow.python.ops.control_flow_ops.no_op",
"tensorflow.python.fr... |
MathijsMul/babyai-emergent-guidance | [
"9e37535134c89bd019affa51c7f199d1672811b6"
] | [
"babyai/arguments.py"
] | [
"\"\"\"\nCommon arguments for BabyAI training scripts\n\"\"\"\n\nimport os\nimport argparse\nimport numpy as np\n\n\nclass ArgumentParser(argparse.ArgumentParser):\n\n def __init__(self):\n super().__init__()\n\n # Base arguments\n self.add_argument(\"--env\", default=None,\n ... | [
[
"numpy.random.randint"
]
] |
jkxing/pytorch3d | [
"71dbebe8010a0dac3e56be464778aa48fbd3bcd3",
"71dbebe8010a0dac3e56be464778aa48fbd3bcd3"
] | [
"tests/test_laplacian_matrices.py",
"tests/test_rasterize_meshes.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\n# All rights reserved.\n#\n# This source code is licensed under the BSD-style license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport unittest\n\nimport torch\nfrom common_testing import TestCaseMixin, get_random_cuda_device\nfro... | [
[
"torch.zeros",
"torch.rand",
"torch.randperm",
"torch.manual_seed",
"torch.eye"
],
[
"torch.device",
"torch.cuda.synchronize",
"torch.arange",
"torch.ones",
"torch.manual_seed",
"torch.randint",
"torch.randn_like",
"torch.tensor",
"torch.full",
"torc... |
leimao/Logistic_Regression_Python | [
"a64ed85d0bea8010d85e9c1e056a3af09b2e43c4"
] | [
"utils.py"
] | [
"\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n\ndef train_test_splitter(X, y, ratio = 0.8, random_seed = 0):\n\n assert(len(X) == len(y)), \"The number of points in feature matrix and target vector should be the same.\"\n np.random.seed(random_seed)\n \n n = len(y)\n idx = np.arange(n)\n ... | [
[
"numpy.array",
"numpy.random.seed",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.close",
"numpy.random.shuffle",
"matplotlib.pyplot.figure",
"numpy.arange",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.show"
]
] |
prkhrv/Python_and_the_Web | [
"6846334c4151ee94107ef393cbb5e8bc8f6a2e4b"
] | [
"Scripts/Web_Scrappers/cricketmonthly_articles/main.py"
] | [
"import pandas as pd\nimport re\nimport requests as rq\nfrom bs4 import BeautifulSoup\n\nheader = {'User-Agent' : 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36'}\nr = rq.get(\"https://www.thecricketmonthly.com/\", headers=header)\nsoup = BeautifulSoup(r.co... | [
[
"pandas.DataFrame.from_dict"
]
] |
freshjang/MyKiwoom | [
"6342ec7ba8da55194bb473f9052d87f7fa1a640e",
"6342ec7ba8da55194bb473f9052d87f7fa1a640e"
] | [
"trader/strategy.py",
"trader/collector.py"
] | [
"import os\nimport sys\nimport psutil\nimport numpy as np\nimport pandas as pd\nsys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))\nfrom utility.setting import ui_num, DICT_SET, columns_gj\nfrom utility.static import now, timedelta_sec, thread_decorator, strf_time, float2str1p6\n\n\nclass ... | [
[
"pandas.DataFrame"
],
[
"pandas.DataFrame"
]
] |
Khan-Xu/Pyrod | [
"3ee62e3d6037328a010d9340bf1e8ff991f48414"
] | [
"tool/tools.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Wed Aug 15 21:50:58 2018\r\n\r\n@author: USER\r\n\"\"\"\r\n\r\n# Codes are free to use. Do whatever you want\r\n\r\nfrom __future__ import absolute_import\r\n\r\n\"\"\"Read raw data\"\"\"\r\n\r\n####################### LIBRARY #############################\r\n\r\n# e... | [
[
"numpy.concatenate",
"numpy.max",
"numpy.int",
"numpy.array",
"numpy.asarray",
"numpy.argmin",
"numpy.zeros",
"numpy.sum",
"numpy.linalg.pinv",
"numpy.min",
"numpy.abs",
"numpy.linspace",
"numpy.meshgrid",
"numpy.convolve"
]
] |
miguelusque/NVTabular | [
"76e63d9df7b90433d552606e9cf87bd61d7eee3b"
] | [
"nvtabular/io/csv.py"
] | [
"#\n# Copyright (c) 2021, NVIDIA CORPORATION.\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 applicabl... | [
[
"numpy.arange"
]
] |
raamana/cca_zoo | [
"7137918a6bac098ec20ba998d1774d5335c178dd"
] | [
"cca_zoo/data/simulated.py"
] | [
"import itertools\nfrom typing import List, Union\n\nimport numpy as np\nfrom scipy import linalg\nfrom scipy.linalg import block_diag\n\nfrom ..utils.check_values import _process_parameter\n\n\ndef generate_covariance_data(n: int, view_features: List[int], latent_dims: int = 1,\n view_s... | [
[
"scipy.linalg.toeplitz",
"numpy.random.rand",
"numpy.tile",
"numpy.cumsum",
"numpy.outer",
"numpy.concatenate",
"numpy.random.normal",
"scipy.linalg.block_diag",
"numpy.eye",
"numpy.transpose",
"numpy.arange",
"numpy.sqrt",
"numpy.linalg.cholesky",
"numpy.ze... |
Holldean/Recommender-System | [
"6a93e6ee970b32c76e2f71043383bf24a7e865d5"
] | [
"Recommender_System/algorithm/NeuMF/train.py"
] | [
"from Recommender_System.algorithm.NeuMF.model import NeuMF_model\r\nfrom Recommender_System.algorithm.train import train, test\r\nimport tensorflow as tf\r\n\r\n\r\ndef train_with_pretrain(n_user, n_item, train_data, test_data, topk_data, gmf_dim, mlp_dim, layers, l2):\r\n neumf_model, gmf_model, mlp_model = Ne... | [
[
"tensorflow.keras.optimizers.SGD"
]
] |
dingjr27/nerf | [
"b0e0554022f66d65705d3134c4cfdd71429eb574"
] | [
"test_nerf.py"
] | [
"import os, sys\n# os.environ['TF_FORCE_GPU_ALLOW_GROWTH'] = 'true'\nos.environ['CUDA_VISIBLE_DEVICES'] = '1'\nimport tensorflow as tf\ntf.compat.v1.enable_eager_execution()\n\nsys.path.append(r'/home/luca/Desktop/NERFPosit/Inference')\n\nimport numpy as np\nimport imageio\nimport json\nimport random\nimport time\n... | [
[
"tensorflow.reduce_min",
"numpy.eye",
"tensorflow.reduce_max",
"tensorflow.compat.v1.enable_eager_execution",
"numpy.clip",
"matplotlib.pyplot.show",
"tensorflow.cast",
"matplotlib.pyplot.imshow"
]
] |
kyeeh/holbertonschool-machine_learning | [
"8e4894c2b036ec7f4750de5bf99b95aee5b94449",
"8e4894c2b036ec7f4750de5bf99b95aee5b94449"
] | [
"math/0x06-multivariate_prob/3-main.py",
"supervised_learning/0x07-cnn/1-main.py"
] | [
"#!/usr/bin/env python3\n\nif __name__ == '__main__':\n import numpy as np\n from multinormal import MultiNormal\n\n np.random.seed(0)\n data = np.random.multivariate_normal([12, 30, 10], [[36, -30, 15], [-30, 100, -20], [15, -20, 25]], 10000).T\n mn = MultiNormal(data)\n x = np.random.multivariat... | [
[
"numpy.random.seed",
"numpy.random.multivariate_normal"
],
[
"numpy.concatenate",
"numpy.random.seed",
"numpy.load",
"matplotlib.pyplot.show",
"matplotlib.pyplot.imshow"
]
] |
mbonnema/SWAV | [
"d5dd4dd1a88de008f27b0232c536491c7dc84623"
] | [
"src/an_FilterS1.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Oct 28 11:35:01 2021\n\n@author: mbonnema\n\"\"\"\n\nimport numpy as np\ndef FilterS1(D,A,WE,LE):\n D_f = {}\n A_f = {}\n WE_f = {}\n LE_f = {}\n for key in D:\n dates = D[key]\n areas = A[key]\n werrors = W... | [
[
"numpy.array"
]
] |
jialuechen/augustus | [
"d4fbda427e3d9c60896b0e22c06cd593b484ef9d"
] | [
"augustus/custom/trade_log_analysis.py"
] | [
"import dash\nimport dash_core_components as dcc\nimport dash_html_components as html\nimport dash_table_experiments as dt\nimport pandas as pd\nimport plotly\nfrom dash.dependencies import Input, Output, State\nfrom plotly import graph_objs as go\n\nfrom augustus.systemabase_env import augustusEnvBase\n\nTRADE_LOG... | [
[
"pandas.DataFrame"
]
] |
tjulitianyi1997/mindspore | [
"c802a8c31fe2b51530d932fdd364824e45264b12"
] | [
"tests/ut/python/parallel/test_reshape.py"
] | [
"# Copyright 2019 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 applicable l... | [
[
"numpy.ones"
]
] |
angseung/torch_cifar10 | [
"3160f749f3bffd941d6c0fb98ddaad63d4e5641d"
] | [
"models/clnet.py"
] | [
"'''\nCrossLink Network\n'''\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\ndef swish(x):\n return x * x.sigmoid()\n\n\ndef mish(x):\n return x * torch.tanh(F.softplus(x))\n\n\nclass CrossLinkBlock(nn.Module):\n '''Cross-Link Block'''\n\n def __init__(self, in_channels, out... | [
[
"torch.nn.Linear",
"torch.nn.functional.softplus",
"torch.nn.MaxPool2d",
"torch.nn.Sequential",
"torch.nn.BatchNorm2d",
"torch.nn.functional.dropout",
"torch.nn.functional.adaptive_avg_pool2d",
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.randn"
]
] |
TheVikJ/SUAVE | [
"eff37d167a4318ba8ba77dff873422c89db489b2"
] | [
"JinaAI/utils/get_data.py"
] | [
"import json\nimport requests\nimport pandas as pd\nimport os\n\nbaseurl = \"http://exploreapiswith.tech/api/\"\n\n\ncategories = json.loads(requests.get(\n baseurl + \"category\").text)\n\n\ndef get_category_api(category_name=None):\n category_apis = json.loads(requests.get(\n baseurl + \"category/\" ... | [
[
"pandas.read_json"
]
] |
jdailey/EnergyPATHWAYS | [
"0fb0ead475b6395f6b07fc43fe6c85826ee47d0f"
] | [
"energyPATHWAYS/tests/test_time_series.py"
] | [
"# -*- coding: utf-8 -*-\n__author__ = 'Ben, Ryan, Michael'\n\nimport numpy as np\nfrom collections import defaultdict\nimport pandas as pd\nimport energyPATHWAYS\nfrom energyPATHWAYS.time_series import TimeSeries\nimport unittest\nfrom matplotlib import pyplot as plt\n\n\nclass TestTimeSeries(unittest.TestCase):\n... | [
[
"pandas.DataFrame",
"numpy.array",
"numpy.arange",
"pandas.concat"
]
] |
ikamensh/scipy | [
"d645404be21b7c0b1e7ba24bf8d525b624aeb848"
] | [
"scipy/io/matlab/mio5.py"
] | [
"''' Classes for read / write of matlab (TM) 5 files\n\nThe matfile specification last found here:\n\nhttps://www.mathworks.com/access/helpdesk/help/pdf_doc/matlab/matfile_format.pdf\n\n(as of December 5 2008)\n'''\n'''\n=================================\n Note on functions and mat files\n==========================... | [
[
"numpy.max",
"numpy.array",
"numpy.compat.asbytes",
"numpy.empty",
"numpy.asarray",
"numpy.zeros",
"numpy.uint16",
"numpy.prod",
"numpy.all",
"numpy.compat.asstr",
"numpy.asanyarray",
"numpy.atleast_2d"
]
] |
FJFranklin/BeesEtAl | [
"3fd21d044e77b4a1df56ac2f405e2084bebd54e1"
] | [
"BeesEtAl/Gholami.py"
] | [
"# *** References ***\n\n# Gholami & Mohammadi, A Novel Combination of Bees and Firefly Algorithm to Optimize Continuous Problems\n\n# Türker Tuncer, LDW-SCSA: Logistic Dynamic Weight based Sine Cosine Search Algorithm for Numerical Functions Optimization \n# https://arxiv.org/ftp/arxiv/papers/1809/1809.03055.pdf\n... | [
[
"numpy.sin",
"numpy.random.rand",
"numpy.ones",
"numpy.exp",
"numpy.power",
"numpy.abs",
"numpy.cos"
]
] |
VenkateshBH99/django_local_library | [
"db834cbe6ec475a2d3224b3ea9b56b1fa3519e9f"
] | [
"predict_risk_1/machine_learning_models/KNN.py"
] | [
"# Importing the libraries\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport random\n\n# Importing the dataset\ndataset = pd.read_csv('kidney_disease2.csv')\n\nX = dataset.iloc[:,:-1].values\ny = dataset.iloc[:,24].values\n\n\n#handling missing data\n\nfrom sklearn.preprocessing impo... | [
[
"sklearn.metrics.confusion_matrix",
"matplotlib.pyplot.xlim",
"sklearn.externals.joblib.dump",
"pandas.read_csv",
"matplotlib.pyplot.savefig",
"sklearn.metrics.accuracy_score",
"sklearn.neighbors.KNeighborsClassifier",
"matplotlib.pyplot.title",
"matplotlib.pyplot.figure",
... |
iamgreaser/fireball | [
"2c5afb3dc5756a3b26da9045278f7e4a2bc036d2"
] | [
"entity.py"
] | [
"\"\"\"\nCopyright 2011 Ben Russell & contributors. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are\npermitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice, this list of\n ... | [
[
"numpy.identity",
"numpy.asmatrix"
]
] |
baheytharwat/tinygrad | [
"acf652c3c524ee3214e9ce58d41113738cb833ae"
] | [
"test/test_ops.py"
] | [
"import os\nimport torch\nimport numpy as np\nimport unittest\nimport timeit\nimport functools\nfrom tinygrad.tensor import Tensor, DEFAULT_DEVICE, Device\n\ndef helper_test_op(shps, torch_fxn, tinygrad_fxn, atol=1e-6, rtol=1e-3, grad_atol=1e-6, grad_rtol=1e-3, forward_only=False, vals=None, a=-0.5, b=20):\n torch... | [
[
"torch.reshape",
"torch.nn.LogSoftmax",
"torch.nn.functional.relu6",
"torch.nn.functional.avg_pool2d",
"torch.nn.functional.softplus",
"torch.nn.functional.interpolate",
"torch.sign",
"numpy.random.random",
"torch.manual_seed",
"torch.abs",
"torch.tensor",
"torch.nn... |
onlyrico/contextualized-topic-models | [
"ac338eab6601cd34475d490ae8072fecb73bb0c2"
] | [
"contextualized_topic_models/evaluation/measures.py"
] | [
"from gensim.corpora.dictionary import Dictionary\nfrom gensim.models.coherencemodel import CoherenceModel\nfrom gensim.models import KeyedVectors\nimport gensim.downloader as api\nfrom scipy.spatial.distance import cosine\nimport abc\n\nfrom contextualized_topic_models.evaluation.rbo import rbo\nimport numpy as np... | [
[
"numpy.linalg.norm",
"numpy.asarray",
"numpy.log",
"numpy.mean",
"scipy.spatial.distance.cosine",
"numpy.argmax"
]
] |
drivergroup/beliefs | [
"7e0b2a02d719f5b1c889d72ac1e9421971cc120b"
] | [
"beliefs/factors/discrete_factor.py"
] | [
"\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2013-2017 pgmpy\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy... | [
[
"numpy.moveaxis",
"numpy.array"
]
] |
LinZichuan/AdMRL | [
"50a22d4d480e99125cc91cc65dfcc0df4a883ac6"
] | [
"main.py"
] | [
"import sys\nsys.path = ['./rllab/'] + sys.path\nprint (sys.path)\nimport pickle\nimport os,time\nfrom collections import deque\nimport tensorflow as tf\nimport numpy as np\nimport lunzi.nn as nn\nfrom lunzi.Logger import logger\nfrom slbo.utils.average_meter import AverageMeter\nfrom slbo.utils.flags import FLAGS\... | [
[
"numpy.concatenate",
"tensorflow.get_default_session",
"numpy.array",
"numpy.linalg.norm",
"tensorflow.assign",
"numpy.isnan",
"numpy.load",
"numpy.mean",
"numpy.std",
"numpy.allclose",
"numpy.prod",
"tensorflow.global_variables_initializer"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.