repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
gbravoi/monte-carlo-tree-search | [
"578df8df925e5f569e7354daff6642e1781389b6"
] | [
"checkers/utils.py"
] | [
"\"\"\"\nMartin Kersner, m.kersner@gmail.com\nseoulai.com\n2018\n\nAdapted by Gabriela B. to work with python 2.7 and ROS\n\"\"\"\nimport random\n\n\nimport numpy as np\n\nfrom base import Constants\nfrom rules import Rules\n\n\nclass BoardEncoding(object):\n def __init__(self):\n self._constants = Consta... | [
[
"numpy.ones"
]
] |
darrenluc93/web-scraping-challenge | [
"50a9a21161ab0920038c8e0d6a9390bb8e35c5f5"
] | [
"scrape_mars.py"
] | [
"#Import Libraries\n#Web Scraping tools \nfrom bs4 import BeautifulSoup as bs\nfrom selenium import webdriver\n#from splinter import Browser\n\n#DataFrame tools\nimport pandas as pd\n\n#Misc tools for web scraping\nimport time\nimport requests\n\n#Function to initianilze browser.\ndef init_browser():\n\n #Settin... | [
[
"pandas.read_html"
]
] |
Sethan/deeplearning-graphics | [
"ce164847a323d3f07cfe241f4bbed6029777c58d"
] | [
"ssd/modeling/backbone/basic.py"
] | [
"import torch\n\n\nclass BasicModel(torch.nn.Module):\n \"\"\"\n This is a basic backbone for SSD.\n The feature extractor outputs a list of 6 feature maps, with the sizes:\n [shape(-1, output_channels[0], 38, 38),\n shape(-1, output_channels[1], 19, 19),\n shape(-1, output_channels[2], 10, 10),... | [
[
"torch.nn.Dropout2d",
"torch.nn.ELU",
"torch.nn.Conv2d",
"torch.nn.MaxPool2d",
"torch.nn.BatchNorm2d"
]
] |
lego0901/pytea | [
"8ede650def2e68f4610ba816451d8b9e28f09f76",
"8ede650def2e68f4610ba816451d8b9e28f09f76",
"8ede650def2e68f4610ba816451d8b9e28f09f76",
"8ede650def2e68f4610ba816451d8b9e28f09f76",
"8ede650def2e68f4610ba816451d8b9e28f09f76"
] | [
"packages/pytea/pytest/unit_tests/passes/pass_argmax_dim01.py",
"packages/pytea/pytest/benchmarks/transformers/examples/rag/test_distributed_retriever.py",
"packages/pytea/pytest/unit_tests/passes/pass_conv2d_full01.py",
"packages/pytea/pytest/unit_tests/fails/fail_flatten_start_dim01.py",
"packages/pytea/p... | [
"'''\npass_argmax_dim01.py\nCopyright (c) Seoul National University\nLicensed under the MIT license.\nAuthor: Woo Sung Song\n\ntorch.Tensor.argmax with dim parameter.\n! This is not available since maximum stack size exceeding error has been occured\n'''\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.funct... | [
[
"torch.rand"
],
[
"numpy.ones"
],
[
"torch.nn.functional.conv2d",
"torch.rand"
],
[
"torch.rand",
"torch.flatten"
],
[
"torch.zeros"
]
] |
jgharris7/DocClass | [
"9ef62e655272cca8374187040eb3dd73f3f82b72",
"9ef62e655272cca8374187040eb3dd73f3f82b72"
] | [
"model/app/LearnTfidfCNB.py",
"model/app/learnmodel2.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Mon Mar 22 22:43:22 2021\r\n\r\n@author: jgharris\r\n\"\"\"\r\n\r\n# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Mon Mar 22 21:09:34 2021\r\n\r\n@author: jgharris\r\n\"\"\"\r\n\r\nroot='C:/Users/jgharris/DocClass/'\r\n\r\ndataFile='/data/shuffled-full-set-hashed.cs... | [
[
"numpy.unique",
"numpy.random.permutation",
"sklearn.model_selection.train_test_split",
"sklearn.metrics.accuracy_score"
],
[
"numpy.unique",
"numpy.random.permutation",
"sklearn.model_selection.train_test_split",
"sklearn.metrics.accuracy_score"
]
] |
dampierch/herv | [
"9f1ce0e676977b6c8d25fdf446c0807826b80bea"
] | [
"scripts/gdc_req_legacy.py"
] | [
"'''\nthis script queries the gdc legacy archive via the search and retrieve api and\nreturns msi_status object (from files endpoint on legacy)\n-- get uuids of xml files with the msi annotations from legacy server\n-- download each xml file\n-- parse xml files to extract msi annotations for each subject\n\nscript ... | [
[
"pandas.read_table",
"pandas.DataFrame.from_dict"
]
] |
spacegoing/t2t_caps | [
"ded708b738fa8966eb7544708c4a785479da4c3c",
"ded708b738fa8966eb7544708c4a785479da4c3c",
"ded708b738fa8966eb7544708c4a785479da4c3c",
"ded708b738fa8966eb7544708c4a785479da4c3c",
"ded708b738fa8966eb7544708c4a785479da4c3c",
"ded708b738fa8966eb7544708c4a785479da4c3c"
] | [
"tensor2tensor/layers/discretization.py",
"tensor2tensor/data_generators/text_problems.py",
"tensor2tensor/data_generators/algorithmic_test.py",
"tensor2tensor/models/neural_gpu_test.py",
"tensor2tensor/data_generators/celeba.py",
"tensor2tensor/data_generators/translate_test.py"
] | [
"# coding=utf-8\n# Copyright 2018 The Tensor2Tensor 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 requir... | [
[
"tensorflow.concat",
"tensorflow.nn.log_softmax",
"tensorflow.control_dependencies",
"tensorflow.zeros",
"tensorflow.reduce_sum",
"tensorflow.stack",
"tensorflow.to_int32",
"tensorflow.python.training.moving_averages.assign_moving_average",
"tensorflow.layers.dense",
"tenso... |
amaarquadri/perfect-information-game | [
"6755f9633935be762d039ece9c0b646c64de6ab8"
] | [
"perfect_information_game/tablebases/symmetry_transform.py"
] | [
"import numpy as np\nfrom perfect_information_game.games import Chess\nfrom perfect_information_game.utils import iter_product\nfrom perfect_information_game.tablebases import get_verified_chess_subclass\n\n\nclass SymmetryTransform:\n # noinspection PyChainedComparisons\n PAWNLESS_UNIQUE_SQUARE_INDICES = [(i... | [
[
"numpy.random.random",
"numpy.concatenate",
"numpy.all",
"numpy.copy",
"numpy.flip",
"numpy.sum"
]
] |
tremblerz/enas | [
"329ee3f8beb5e715bf2dad1182cfb5120b3485f9"
] | [
"src/ptb/ptb_enas_controller.py"
] | [
"\n\n\n\nimport sys\nimport os\nimport time\n\nimport numpy as np\nimport tensorflow as tf\n\nfrom src.utils import get_train_ops\nfrom src.common_ops import stack_lstm\n\nfrom tensorflow.python.training import moving_averages\n\nclass PTBEnasController(object):\n def __init__(self,\n rhn_depth=5,\n ... | [
[
"tensorflow.get_variable",
"tensorflow.concat",
"tensorflow.control_dependencies",
"tensorflow.zeros",
"tensorflow.reduce_sum",
"tensorflow.tanh",
"tensorflow.to_int32",
"tensorflow.Variable",
"tensorflow.random_uniform_initializer",
"tensorflow.stop_gradient",
"tensorf... |
HuguesMoreau/Sensors_similariy | [
"4b8592049c83b03a11f5c57fab247290ee29b8f5",
"4b8592049c83b03a11f5c57fab247290ee29b8f5"
] | [
"models/SHL_2018/transforms.py",
"models/store_model_SHL.py"
] | [
"#!/usr/bin/env python\r\n# -*- coding: utf-8 -*-\r\n\"\"\"\r\nThis file contains diverse preprocessing functions (mostly norms ans spectrograms),\r\nand basic tests and visualizations.\r\nIf you are to work with any IPython console (ex: with Jupyter or spyder), is is advised\r\nto launch a '%matplotlib qt' ,to get... | [
[
"matplotlib.pyplot.legend",
"numpy.log",
"matplotlib.pyplot.imshow",
"numpy.sqrt",
"numpy.linspace",
"matplotlib.pyplot.title",
"numpy.arange",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.colorbar",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.subplot",
"torch.de... |
aditya2592/PoseCNN | [
"da9eaae850eed7521a2a48a4d27474d655caab42",
"da9eaae850eed7521a2a48a4d27474d655caab42"
] | [
"lib/rpn_layer/proposal_target_layer.py",
"lib/hard_label_layer/hard_label_op_grad.py"
] | [
"# --------------------------------------------------------\n# Faster R-CNN\n# Copyright (c) 2015 Microsoft\n# Licensed under The MIT License [see LICENSE for details]\n# Written by Ross Girshick, Sean Bell and Xinlei Chen\n# --------------------------------------------------------\nfrom __future__ import absolute_... | [
[
"numpy.hstack",
"numpy.ascontiguousarray",
"numpy.round",
"numpy.append",
"numpy.array",
"numpy.zeros",
"numpy.where",
"numpy.vstack"
],
[
"tensorflow.python.framework.ops.RegisterShape",
"tensorflow.python.framework.ops.RegisterGradient"
]
] |
dendisuhubdy/Vitis-AI | [
"524f65224c52314155dafc011d488ed30e458fcb",
"524f65224c52314155dafc011d488ed30e458fcb"
] | [
"alveo/apps/whole_app_acceleration/classification/test_classify_pp.py",
"alveo/apps/face_detect/detect_util.py"
] | [
"# Copyright 2019 Xilinx Inc.\n# Copyright 2019 Xilinx 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 require... | [
[
"numpy.copyto",
"numpy.empty"
],
[
"numpy.maximum",
"numpy.exp",
"numpy.zeros",
"numpy.sum"
]
] |
loveredcarrot/ssl_multi_seg | [
"5315dbcc2c44e8effab28699c1491dd67b7ce00b"
] | [
"code/networks/Unet.py"
] | [
"# -*- coding: utf-8 -*- \n# @Time : 2021/4/8 15:52\n# @Author : aurorazeng\n# @File : Unet.py \n# @license: (C) Copyright 2021-2026, aurorazeng; No reprobaiction without permission.\n\n\n\"\"\"\nThe implementation is borrowed from: https://github.com/HiLab-git/PyMIC\n\"\"\"\nfrom __future__ import division, print_... | [
[
"torch.nn.Dropout",
"torch.nn.ConvTranspose2d",
"torch.cat",
"torch.nn.Conv2d",
"torch.nn.MaxPool2d",
"torch.nn.Upsample",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
]
] |
Atica57/DALLE-pytorch | [
"4fa108271aeb1972fcb118390ec15b656f2c328a"
] | [
"train_dalle.py"
] | [
"import argparse\nfrom random import choice\nfrom pathlib import Path\n\n# torch\n\nimport torch\nfrom torch.optim import Adam\nfrom torch.nn.utils import clip_grad_norm_\n\n# vision imports\n\nfrom PIL import Image\nfrom torchvision import transforms as T\nfrom torch.utils.data import DataLoader, Dataset\nfrom tor... | [
[
"torch.utils.data.DataLoader",
"torch.save"
]
] |
jhuebotter/CartpoleSNNdemo | [
"d18a85cbc45bff48295c46c9cd8c9fc00192318c"
] | [
"CartPole/_CartPole_mathematical_helpers.py"
] | [
"\"\"\"\nSmall general mathematical functions.\nThis file was necessary to make CartPole module self-contained.\n\"\"\"\n\nfrom math import fmod\nimport numpy as np\n\n\n# Wraps the angle into range [-π, π]\ndef wrap_angle_rad(angle: float) -> float:\n Modulo = fmod(angle, 2 * np.pi) # positive modulo\n if M... | [
[
"numpy.fmod"
]
] |
augustehirth/Cirq | [
"e616710a0fa243524a9f6d7bc0d35e6b952fe3d0",
"e616710a0fa243524a9f6d7bc0d35e6b952fe3d0",
"e616710a0fa243524a9f6d7bc0d35e6b952fe3d0",
"e616710a0fa243524a9f6d7bc0d35e6b952fe3d0",
"e616710a0fa243524a9f6d7bc0d35e6b952fe3d0"
] | [
"cirq-google/cirq_google/serialization/op_serializer_test.py",
"cirq-core/cirq/testing/consistent_phase_by_test.py",
"cirq-core/cirq/ops/controlled_gate.py",
"cirq-core/cirq/transformers/analytical_decompositions/two_qubit_to_cz_test.py",
"cirq-core/cirq/testing/consistent_protocols.py"
] | [
"# Copyright 2019 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law o... | [
[
"numpy.array"
],
[
"numpy.array",
"numpy.kron"
],
[
"numpy.linalg.eigvals"
],
[
"numpy.eye",
"numpy.array",
"numpy.random.random",
"numpy.sqrt"
],
[
"numpy.isclose"
]
] |
LiyrAstroph/CDNest | [
"afb6b869ce1c4ebd76662b20310f1d9d3db4e26e"
] | [
"tests/rastrigin_accept_action.py"
] | [
"#\n# sample from a Rastrigin test function\n# this is to illustrate how to use accept_action in CDNest to avoid repeat calculations.\n#\n# A 2D Rastrigin function looks\n# \n# logL=-(10.0*2 + (coords[0]**2 - 10*np.cos(2.0*np.pi*coords[0])) + (coords[1]**2 - 10*np.cos(2.0*np.pi*coords[1])) ) \n#\n# Every perturb, o... | [
[
"numpy.log",
"numpy.abs",
"numpy.arange",
"numpy.cos",
"numpy.random.randn",
"numpy.random.randint",
"numpy.random.rand",
"numpy.exp",
"numpy.random.uniform",
"numpy.meshgrid",
"numpy.zeros",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
echo-ray/catalyst | [
"8b4274d17f0a42ee4d1d5e09d30fb0919aea2a51"
] | [
"catalyst/marketplace/marketplace.py"
] | [
"from __future__ import print_function\n\nimport glob\nimport json\nimport os\nimport re\nimport shutil\nimport sys\nimport time\nimport webbrowser\n\nimport bcolz\nimport logbook\nimport pandas as pd\nimport requests\nfrom requests_toolbelt import MultipartDecoder\nfrom requests_toolbelt.multipart.decoder import \... | [
[
"pandas.to_datetime",
"pandas.DataFrame"
]
] |
microsoft/Protein-Folding | [
"f534b2dd1e3f192fbcdadf234f25828c7f458a58"
] | [
"coevolution_transformer/model/msa_embeddings.py"
] | [
"# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT License.\nimport math\n\nimport torch\nfrom torch import nn\nimport torch.nn.functional as F\n\n\nclass PositionalEncoding(nn.Module):\n def __init__(self, d_model, max_len=1 << 13):\n super(PositionalEncoding, self).__init__()\n sel... | [
[
"torch.nn.Dropout",
"torch.sin",
"torch.zeros",
"torch.eye",
"torch.nn.Embedding",
"torch.nn.LayerNorm",
"torch.nn.Linear",
"torch.arange",
"torch.cos"
]
] |
sunhuaibo/HLA-HED | [
"bb0672e62a20baad80f5f154c9220bf8e5b8b28c"
] | [
"hla_hed.py"
] | [
"#!/usr/bin/env python\n# -*- coding=utf-8 -*-\n\n# =====================================\n# Author: Huaibo Sun\n# E-mail: huaibo_sun@foxmail.com\n# date: 2022-03-31\n# =====================================\n\nimport os\nimport pandas as pd\nfrom Bio import SeqIO\nfrom pathlib import Path\nfrom itertools import c... | [
[
"pandas.read_csv",
"pandas.melt"
]
] |
LeiShi/Synthetic-Diagnostics-Platform | [
"5f1cb5c29d182490acbd4f3c167f0e09ec211236"
] | [
"src/python3/sdp/math/interpolation.py"
] | [
"\"\"\"This module contains some useful interpolation methods\n\"\"\"\n\nimport numpy as np\nfrom scipy.interpolate import BarycentricInterpolator\n\nclass InterpolationError(Exception):\n def __init__(self,value):\n self.value = value\n def __str__(self):\n return repr(self.value)\n\nclass Outo... | [
[
"numpy.absolute",
"numpy.min",
"numpy.empty_like",
"numpy.logical_or",
"numpy.max",
"numpy.any",
"numpy.array",
"numpy.where"
]
] |
mayureeb/fakenews | [
"c47a72c8bbe4d413b309da0c662da784c002fe3f"
] | [
"Code/sentiment_analysis.py"
] | [
"import pandas as pd\nfrom textblob import TextBlob\n\npd.options.mode.chained_assignment = None # ignores the SettingWithCopy Warning\ndf = pd.read_csv('INPUT.csv', encoding = 'utf8')\ndf['polarity'] = 0.0\ndf['subjectivity'] = 0.0\nfor i in range(0, len(df.index)):\n print(i)\n blob = TextBlob(str(df['text... | [
[
"pandas.read_csv"
]
] |
LutzGross/fingal | [
"4b6fcc02871e7ba1a98f37ffd18f1a16a5fe6a48"
] | [
"bin/specsim3d/spectralsim.py"
] | [
"#-------------------------------------------------------------------------------\r\n# Name: Spectralsim\r\n# Purpose: Simulation of standard normal random fields\r\n#\r\n# Author: Dr.-Ing. S. Hoerning\r\n#\r\n# Created: 02.05.2018, Centre for Natural Gas, EAIT,\r\n# The... | [
[
"numpy.sqrt",
"numpy.random.standard_normal",
"numpy.fft.fftn",
"numpy.fft.ifftn",
"numpy.ceil",
"numpy.prod",
"numpy.array",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
echaussidon/redrock | [
"9a3d4f0aed8c0792f2cc731dbdf04a99018083bf"
] | [
"py/redrock/templates.py"
] | [
"\"\"\"\nClasses and functions for templates.\n\"\"\"\n\nfrom __future__ import absolute_import, division, print_function\n\nimport sys\nfrom glob import glob\nimport os\nimport traceback\n\nimport numpy as np\nfrom astropy.io import fits\n\nfrom .utils import native_endian, elapsed, transmission_Lyman\n\nfrom .reb... | [
[
"numpy.arange",
"numpy.log10",
"numpy.array_split"
]
] |
guissy/StockRecommendSystem | [
"2e8694d0bb2ceaa42585ee7414564d921cc5a854"
] | [
"Source/FetchData/Fetch_Data_Stock_CHN_Daily.py"
] | [
"import sys, os, time, datetime, warnings, configparser\nimport pandas as pd\nimport numpy as np\nimport tushare as ts\nimport concurrent.futures\nfrom tqdm import tqdm\n\ncur_path = os.path.dirname(os.path.abspath(__file__))\nfor _ in range(2):\n root_path = cur_path[0:cur_path.rfind('/', 0, len(cur_path))]\n ... | [
[
"pandas.concat",
"pandas.bdate_range",
"pandas.DataFrame",
"pandas.set_option",
"pandas.Timestamp"
]
] |
ambareeshravi/TrafficSignClassifier_API | [
"8628057439ee70f6d827abf931071e9b6539bd5b"
] | [
"utils.py"
] | [
"'''\nAuthor: Ambareesh Ravi\nDate: Jul 31, 2021\nTitle: utils.py\nDescription:\n Contains utility and helper functions for the project\n'''\n\n# Libraries imports\nimport numpy as np\nimport pandas as pd\nimport os\nfrom tqdm import tqdm\nfrom time import time\nfrom glob import glob\nfrom PIL import Image\nimpo... | [
[
"numpy.round",
"numpy.expand_dims",
"numpy.random.seed",
"numpy.ones"
]
] |
kadeng/tensorflow_project_workspace | [
"dee284fb2d1796329895130a075cd57a62ea873f"
] | [
"tensorflow/contrib/learn/python/learn/estimators/dnn.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.contrib.layers.parse_feature_columns_from_examples",
"tensorflow.contrib.learn.python.learn.estimators.head._multi_class_head",
"tensorflow.contrib.framework.python.ops.variables.get_global_step",
"tensorflow.contrib.learn.python.learn.estimators.dnn_linear_combined._extract_embedding_... |
EmbeddedML-EDAGroup/Q-PPG | [
"ed42829d0a456db4f0b31d63ba8b22ba483c7b08",
"ed42829d0a456db4f0b31d63ba8b22ba483c7b08"
] | [
"precision_search/model/TEMPONet_float.py",
"precision_search/base/base_trainer.py"
] | [
"#*----------------------------------------------------------------------------*\n#* Copyright (C) 2021 Politecnico di Torino, Italy *\n#* SPDX-License-Identifier: Apache-2.0 *\n#* ... | [
[
"torch.nn.BatchNorm1d",
"torch.nn.ReLU6",
"torch.nn.Linear",
"torch.nn.Conv1d",
"torch.nn.AvgPool1d"
],
[
"numpy.asarray",
"torch.load",
"torch.save"
]
] |
ai-systems/crossmodal_embedding | [
"5c61775531fd350c48a965450ab5e99b28deec5e"
] | [
"crossmodal_embedding/tasks/crossmodal/training_star_task.py"
] | [
"from prefect import Task\nfrom loguru import logger\nfrom tqdm import tqdm\nfrom crossmodal_embedding.models import CrossModalEmbedding, SiameseNet\nfrom crossmodal_embedding.models import InputData, InputDataTest\nfrom sklearn.metrics import precision_recall_fscore_support, f1_score\nimport torch.optim as optim\n... | [
[
"torch.nn.NLLLoss",
"torch.optim.lr_scheduler.ReduceLROnPlateau",
"torch.utils.data.DataLoader",
"torch.tensor",
"sklearn.metrics.precision_recall_fscore_support",
"torch.nn.DataParallel",
"torch.no_grad",
"torch.cuda.is_available",
"sklearn.metrics.f1_score",
"torch.cuda.d... |
YetheYe/Mask_RCNN | [
"6895c617af13ecbf0bb27790e29a6271725cb34f"
] | [
"config.py"
] | [
"\"\"\"\nMask R-CNN\nBase Configurations class.\n\nCopyright (c) 2017 Matterport, Inc.\nLicensed under the MIT License (see LICENSE for details)\nWritten by Waleed Abdulla\n\"\"\"\n\nimport math\nimport numpy as np\n\n\n# Base Configuration Class\n# Don't use this class directly. Instead, sub-class it and override\... | [
[
"numpy.array"
]
] |
ogrenenmakine/VCL-PL-Semi-Supervised-Learning-from-Noisy-Web-Data-with-Variational-Contrastive-Learning | [
"baef25837ce7e073d03f69a095d1992aa18dd2d5",
"baef25837ce7e073d03f69a095d1992aa18dd2d5"
] | [
"recognition/alexnet_PD_finetuning.py",
"data/custom_dataset.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\n# In[ ]:\n\nimport math\nfrom torch import nn\nfrom torch.autograd import Variable\nimport torch\nimport torch.nn.functional as F\nimport torchvision\nimport torch.utils.data as data\nimport torchvision.transforms as transforms\nimport torchvision.utils as vutils\nimport n... | [
[
"torch.load",
"torch.utils.data.DataLoader",
"torch.tensor",
"torch.nn.Linear",
"torch.nn.BCEWithLogitsLoss",
"torch.device",
"torch.nn.DataParallel",
"numpy.loadtxt"
],
[
"numpy.random.choice"
]
] |
banboooo044/optimization | [
"a15614b367712d6046311eac311214d27999fc7c"
] | [
"module/LP.py"
] | [
"# date : 2/11/2019\n# author : takeshi\nimport pandas as pd\nimport numpy as np\nfrom IPython.display import display\n\ndef linprog(c,A,comp,b,maximize=True):\n '''\n Maximize(or Minimize) a linear objective function subject to linear equality and inequality constraints.\n\n Linear Programming is intended... | [
[
"numpy.append",
"numpy.vectorize",
"numpy.array",
"numpy.zeros",
"numpy.where",
"numpy.empty"
]
] |
qftphys/Software-for-visualising-magnetic-layers | [
"7e4c5680b8e87aa677bdf4c912cbccdcb11b09a3",
"7e4c5680b8e87aa677bdf4c912cbccdcb11b09a3",
"7e4c5680b8e87aa677bdf4c912cbccdcb11b09a3"
] | [
"Widgets/openGL_widgets/VectorGLContext.py",
"multiprocessing_parse.py",
"Widgets/plot_widgets/CanvasLayer.py"
] | [
"from PyQt5.QtWidgets import QWidget\n\nfrom Widgets.openGL_widgets.AbstractGLContext import AbstractGLContext\n\nfrom ColorPolicy import ColorPolicy\n\nfrom ctypes import c_void_p\nfrom PyQt5.Qt import Qt\nfrom PyQt5.QtCore import QPoint, QThread\n\nfrom cython_modules.color_policy import multi_iteration_normalize... | [
[
"numpy.array",
"numpy.any"
],
[
"numpy.array"
],
[
"numpy.inner",
"numpy.linspace",
"numpy.meshgrid",
"numpy.isnan",
"numpy.arccos",
"numpy.array"
]
] |
BitJetKit/universe | [
"cc9ce6ec241821bfb0f3b85dd455bd36e4ee7a8c"
] | [
"universe/rewarder/rewarder_session.py"
] | [
"from autobahn.twisted import websocket\nimport logging\nimport numpy as np\nimport threading\nimport time\n\nfrom twisted.python import failure\nfrom twisted.internet import defer, endpoints\nimport twisted.internet.error\n\nfrom universe import utils\nfrom universe.twisty import reactor\nfrom universe.rewarder im... | [
[
"numpy.array",
"numpy.zeros"
]
] |
chrhenning/uncertainty_based_ood | [
"13c0b9910966544527497497f6ff0441d5334591"
] | [
"nngp/nngp.py"
] | [
"#!/usr/bin/env python3\n# Copyright 2021 Christian Henning\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... | [
[
"torch.any",
"torch.matmul",
"torch.eye",
"torch.triangular_solve"
]
] |
cheneyveron/PaddleX | [
"86f73fc6a66b12c638f642524bfd1cf730e26c4b",
"86f73fc6a66b12c638f642524bfd1cf730e26c4b",
"86f73fc6a66b12c638f642524bfd1cf730e26c4b",
"86f73fc6a66b12c638f642524bfd1cf730e26c4b",
"86f73fc6a66b12c638f642524bfd1cf730e26c4b"
] | [
"paddlex/ppdet/modeling/assigners/atss_assigner.py",
"static/paddlex/cv/models/utils/seg_eval.py",
"paddlex/ppcls/data/preprocess/__init__.py",
"paddlex/ppdet/modeling/post_process.py",
"static/paddlex/tools/x2seg.py"
] | [
"# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless re... | [
[
"numpy.cumsum"
],
[
"numpy.ones_like",
"numpy.asarray",
"scipy.sparse.csr_matrix",
"numpy.transpose",
"numpy.array",
"numpy.zeros"
],
[
"numpy.ascontiguousarray",
"numpy.asarray"
],
[
"numpy.array",
"numpy.zeros",
"numpy.where"
],
[
"numpy.array"... |
lucasmtz/ACAR-Net | [
"08a224625f04bbf595baaeb1c79ec491642e0059"
] | [
"models/heads/linear.py"
] | [
"import torch\nimport torch.nn as nn\nimport torchvision\n\n__all__ = [\"linear\"]\n\n\nclass LinearHead(nn.Module):\n def __init__(self, width, roi_spatial=7, num_classes=60, dropout=0.0, bias=False):\n super().__init__()\n\n self.roi_spatial = roi_spatial\n self.roi_maxpool = nn.MaxPool2d(... | [
[
"torch.nn.Dropout",
"torch.cat",
"torch.nn.AdaptiveAvgPool3d",
"torch.nn.Linear",
"torch.nn.MaxPool2d"
]
] |
873040/Abhishek | [
"2ddd716e66bc5cc6e6f0787508dd07da0e02e75a",
"2ddd716e66bc5cc6e6f0787508dd07da0e02e75a",
"2ddd716e66bc5cc6e6f0787508dd07da0e02e75a",
"2ddd716e66bc5cc6e6f0787508dd07da0e02e75a",
"2ddd716e66bc5cc6e6f0787508dd07da0e02e75a",
"2ddd716e66bc5cc6e6f0787508dd07da0e02e75a",
"2ddd716e66bc5cc6e6f0787508dd07da0e02e75... | [
"research/delf/delf/python/examples/detector.py",
"official/nlp/transformer/transformer_main.py",
"official/nlp/transformer/utils/metrics.py",
"research/struct2depth/util.py",
"research/slim/datasets/download_and_convert_flowers.py",
"research/object_detection/models/faster_rcnn_inception_resnet_v2_featur... | [
"# Copyright 2019 The TensorFlow Authors All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requi... | [
[
"tensorflow.saved_model.loader.load"
],
[
"tensorflow.convert_to_tensor",
"tensorflow.keras.callbacks.ModelCheckpoint",
"tensorflow.train.latest_checkpoint",
"tensorflow.range",
"tensorflow.io.gfile.exists",
"tensorflow.train.Checkpoint",
"tensorflow.compat.v2.summary.create_fi... |
tonyduan/ge-vae | [
"fe3325cb643900d09536b3e1d964443d25625781"
] | [
"src/models/ep.py"
] | [
"import torch\nimport torch.nn as nn\nfrom torch.distributions import Bernoulli\nfrom src.modules.attn import MAB, PMA, SAB, ISAB, ISABStack \nfrom src.utils import *\nfrom src.modules.mlp import *\n\n\nclass EdgePredictor(nn.Module):\n\n def __init__(self, embedding_dim, device):\n super().__init__()\n ... | [
[
"torch.exp",
"torch.triu",
"torch.zeros"
]
] |
kunalghosh/Multi_Fidelity_Prediction_GP | [
"c858554f5c1f0c4aafa12cf7c441bd2d56b115f5",
"c858554f5c1f0c4aafa12cf7c441bd2d56b115f5"
] | [
"mfgp/task2/init_train_idxs.py",
"mfgp/task2/train_gp.py"
] | [
"# Run `init_train_idxs.py <int: dataset size> <int: initial training set size>`:\n# Creates a `train_idxs.npz` file with the initial set of training indices. \n# e.g `python init_train_idxs.py 64000 1000`\n\nimport sys\nimport numpy as np\nfrom sklearn.model_selection import train_test_split\n\ndataset_size = int... | [
[
"numpy.savez",
"sklearn.model_selection.train_test_split",
"numpy.random.seed"
],
[
"numpy.random.seed"
]
] |
hhy-ee/PedestrianDetection-NohNMS | [
"482078a6bd0ff8cf03fbf7f6988e475f75c56e57",
"482078a6bd0ff8cf03fbf7f6988e475f75c56e57",
"482078a6bd0ff8cf03fbf7f6988e475f75c56e57"
] | [
"tools/visualize_json_results.py",
"detectron2/modeling/proposal_generator/rpn.py",
"dqrf/criterion.py"
] | [
"#!/usr/bin/env python\n# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n\nimport argparse\nimport json\nimport numpy as np\nimport os\nfrom collections import defaultdict\nimport cv2\nimport tqdm\nfrom fvcore.common.file_io import PathManager\n\nfrom detectron2.data import DatasetCatalog, Me... | [
[
"numpy.asarray",
"numpy.concatenate"
],
[
"torch.nn.init.constant_",
"torch.no_grad",
"torch.nn.Conv2d",
"torch.nn.init.normal_"
],
[
"torch.nn.functional.l1_loss",
"torch.full",
"torch.zeros",
"torch.cat",
"torch.nn.functional.binary_cross_entropy_with_logits",... |
joshchang1112/gcnn-survey-paper | [
"591af8d6c4374378831cab2cdec79575e2540d79"
] | [
"utils/data_utils.py"
] | [
"#Copyright 2018 Google LLC\n#\n#Licensed under the Apache License, Version 2.0 (the \"License\");\n#you may not use this file except in compliance with the License.\n#You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n#Unless required by applicable law or agreed to in ... | [
[
"scipy.sparse.load_npz",
"numpy.round",
"numpy.any",
"scipy.sparse.vstack",
"numpy.random.randint",
"numpy.hstack",
"scipy.sparse.coo_matrix",
"numpy.eye",
"numpy.load",
"numpy.zeros",
"numpy.multiply",
"tensorflow.gfile.Open",
"scipy.sparse.csr_matrix",
"sc... |
yexianyi/AI_Practice | [
"80499ab3a06ac055641aa069fe1e37864c9e41c4"
] | [
"MachineLearning/DecisionTree/loan_delinquency.py"
] | [
"'''\nDecision Tree\nPredict if it is possible to default on the loan\n'''\nimport numpy as np\nfrom sklearn import tree\n\ndata = np.genfromtxt(\"exercise.csv\", delimiter=\",\")\n# get train data set\nx_data = data[1:, 1:-1]\n# get test data set\ny_data = data[1:, -1]\n\nprint(x_data)\nprint(y_data)\n\n# Create d... | [
[
"sklearn.tree.DecisionTreeClassifier",
"numpy.genfromtxt"
]
] |
ffilotto/meshio | [
"4413be41e6a63e33273665986f42dab80d585d10"
] | [
"test/test_flac3d.py"
] | [
"import copy\nimport pathlib\nimport sys\n\nimport helpers\nimport numpy\nimport pytest\n\nimport meshio\n\n\n@pytest.mark.parametrize(\n \"mesh, binary, data\",\n [\n (helpers.tet_mesh, False, []),\n (helpers.hex_mesh, False, []),\n (helpers.tet_mesh, False, [1, 2]),\n (helpers.te... | [
[
"numpy.array"
]
] |
aha66/xarray | [
"3cbd21aa8fd3a57c0dd324f2a276d83829518331"
] | [
"xarray/core/dataset.py"
] | [
"import copy\nimport datetime\nimport functools\nimport inspect\nimport sys\nimport warnings\nfrom collections import defaultdict\nfrom distutils.version import LooseVersion\nfrom html import escape\nfrom numbers import Number\nfrom operator import methodcaller\nfrom pathlib import Path\nfrom typing import (\n T... | [
[
"numpy.dot",
"numpy.linalg.matrix_rank",
"numpy.asarray",
"numpy.squeeze",
"numpy.issubdtype",
"scipy.optimize.curve_fit",
"numpy.vander",
"numpy.linalg.svd",
"numpy.datetime_data",
"numpy.arange",
"pandas.Index",
"numpy.full",
"numpy.outer",
"numpy.zeros",
... |
mimikaTU/pandas | [
"4fb963b6a3261940de5891323a8d217087a2a9a1",
"d2ab4076512f5571b74e6ea2936910841b10dbe2"
] | [
"pandas/util/testing.py",
"pandas/tests/indexes/test_base.py"
] | [
"from __future__ import division\n# pylint: disable-msg=W0402\n\nimport re\nimport string\nimport sys\nimport tempfile\nimport warnings\nimport inspect\nimport os\nimport subprocess\nimport locale\nimport traceback\n\nfrom datetime import datetime\nfrom functools import wraps\nfrom contextlib import contextmanager\... | [
[
"pandas.core.computation.expressions.set_use_numexpr",
"pandas.core.common._all_not_none",
"pandas.PeriodIndex",
"numpy.linspace",
"pandas.Series",
"pandas.RangeIndex",
"pandas.compat.wraps",
"pandas.Panel.fromDict",
"numpy.random.random_sample",
"pandas.DataFrame",
"pa... |
ScottBrian/scottbrian_algo1 | [
"57cd8fc5674507db51b1c887d5f9a68462b0ca9d"
] | [
"tests/test_scottbrian_algo1/test_algo_api.py"
] | [
"\"\"\"test_algo_api.py module.\"\"\"\n\n# from datetime import datetime, timedelta\nimport pytest\n# import sys\n# from pathlib import Path\nimport numpy as np\nimport pandas as pd # type: ignore\nimport string\nimport math\n\nfrom typing import Any, List, NamedTuple\n# from typing_extensions import Final\n\nfrom... | [
[
"pandas.read_csv",
"pandas.DataFrame"
]
] |
bsierieb1/SCDCdm_public | [
"db610c1bda904f79a8142da767cf8e62d1cd8d32"
] | [
"paper_simulation_scripts/run_one_job.py"
] | [
"\"\"\"\nThis script is executed in each job on the server to run simulation studies on all the parameters that are passed to it\n\"\"\"\nimport sys\nimport ast\nimport numpy as np\n\nfrom scdcdm.util import multi_parameter_sampling as mult\n\n# Convert string parameters to lists\ncases = ast.literal_eval(sys.argv[... | [
[
"numpy.round"
]
] |
yupeijei1997/unif | [
"16685a89446e6ce14080439162a9bfd0c75f0521"
] | [
"uf/application/uda.py"
] | [
"# coding:=utf-8\n# Copyright 2021 Tencent. 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... | [
[
"numpy.array",
"numpy.mean",
"numpy.sum"
]
] |
ege-erdil/logistic-fit | [
"7c6cc9ed35877ed8d142dd75b7b98658e19cf7cb"
] | [
"logistic_fit.py"
] | [
"from autograd import grad\r\nimport autograd.numpy as np\r\nfrom scipy.stats import logistic, norm\r\nfrom scipy.optimize import minimize\r\n\r\ndef logistic_pdf(x, loc, scale):\r\n y = (x - loc)/scale\r\n return np.exp(-y)/(scale * (1 + np.exp(-y))**2)\r\n\r\ndef logistic_cdf(x, loc, scale):\r\n y = (x-l... | [
[
"scipy.optimize.minimize",
"scipy.stats.logistic.isf"
]
] |
Dangaran/home_station_project | [
"890b342e79e3dd493a8f418ed9283f0d444e5073"
] | [
"info_summary/get_summary_pdf.py"
] | [
"import requests\nimport pandas as pd\nfrom plotnine import *\nimport json\nimport time\nfrom fpdf import FPDF\nfrom datetime import datetime\n\n\n# change pandas display options\npd.options.display.max_columns = 101\npd.options.display.max_rows = 200\npd.options.display.precision = 7\n\n# get aemet and home inform... | [
[
"pandas.Categorical",
"pandas.merge",
"pandas.to_numeric",
"pandas.DataFrame"
]
] |
Tbarkin121/Tensegrity_IsaacGym | [
"0b6b5227e76b18396862c242a4e8e743248844b3",
"0b6b5227e76b18396862c242a4e8e743248844b3"
] | [
"training/utils/utils.py",
"training/tasks/tensebot.py"
] | [
"# Copyright (c) 2018-2021, NVIDIA Corporation\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# 1. Redistributions of source code must retain the above copyright notice, this\n# li... | [
[
"torch.cuda.manual_seed",
"numpy.random.seed",
"torch.manual_seed",
"numpy.set_printoptions",
"torch.use_deterministic_algorithms",
"torch.cuda.manual_seed_all",
"numpy.random.randint"
],
[
"torch.norm",
"torch.ones",
"numpy.sqrt",
"torch.cat",
"torch.zeros",
... |
monperrus/iFixR | [
"5548f3ba91341dc9e73057269f8c01a0b1b6fc68"
] | [
"code/common/preprocessing.py"
] | [
"from nltk.tokenize import RegexpTokenizer\n# from stop_words import get_stop_words\nfrom nltk.stem.porter import PorterStemmer\nfrom string import punctuation\nimport re\nfrom nltk.corpus import stopwords\nen_stop = stopwords.words('english')\nfrom nltk.corpus import wordnet\nimport html\n\nfrom common.commons imp... | [
[
"sklearn.feature_extraction.text.TfidfVectorizer"
]
] |
egilbertson-ucsf/algHW2 | [
"eec0f4e42e27d4c7633cc907d6f523285fadd79c"
] | [
"hw2skeleton/k_means.py"
] | [
"from hw2skeleton import cluster as cl\nfrom hw2skeleton import io\nimport sklearn.metrics as sk\nimport os\nimport pandas as pd\nimport numpy as np\nimport math\naa3 = \"ALA CYS ASP GLU PHE GLY HIS ILE LYS LEU MET ASN PRO GLN ARG SER THR VAL TRP TYR\".split()\naa_df = pd.DataFrame(0, index=list(aa3), columns=['Cou... | [
[
"sklearn.metrics.silhouette_score",
"pandas.DataFrame",
"numpy.random.randint"
]
] |
rhong3/CPTAC-UCEC | [
"ec83fbee234b5ad3df6524cdd960b5f0f3da9ea9",
"ec83fbee234b5ad3df6524cdd960b5f0f3da9ea9",
"ec83fbee234b5ad3df6524cdd960b5f0f3da9ea9",
"ec83fbee234b5ad3df6524cdd960b5f0f3da9ea9",
"ec83fbee234b5ad3df6524cdd960b5f0f3da9ea9"
] | [
"Scripts/Legacy/line1prep.py",
"Scripts/data_input3.py",
"Scripts/RGB_profiler.py",
"Scripts/X3.py",
"Scripts/Legacy/gather_split.py"
] | [
"import pandas as pd\n\nlabels = pd.read_csv('../Fusion_dummy_His_MUT_joined.csv', header=0)\n# line = pd.read_csv('../../Line1.csv', header=0)\nline = pd.read_csv('../EC_cyclin_expression.csv', header=0)\n\n# line['name'] = line['Proteomics_Participant_ID']\n# line = line.drop(['Proteomics_Participant_ID', 'Histol... | [
[
"pandas.read_csv"
],
[
"tensorflow.image.random_hue",
"tensorflow.image.random_brightness",
"tensorflow.image.random_flip_left_right",
"tensorflow.image.random_contrast",
"tensorflow.FixedLenFeature",
"tensorflow.data.TFRecordDataset",
"tensorflow.decode_raw",
"tensorflow.c... |
dd-dos/sentence-transformers | [
"8f9c36b788e15141f723d80fea67ed16785cd18e",
"8f9c36b788e15141f723d80fea67ed16785cd18e",
"6992f4c9b7e600ce89f69d6bc0b495ec177b0312"
] | [
"sentence_transformers/datasets/SentenceLabelDataset.py",
"sentence_transformers/datasets/SentencesDataset.py",
"examples/applications/clustering/agglomerative.py"
] | [
"from torch.utils.data import Dataset\nfrom typing import List\nimport bisect\nimport torch\nimport logging\nimport numpy as np\nfrom tqdm import tqdm\nfrom .. import SentenceTransformer\nfrom ..readers.InputExample import InputExample\nfrom multiprocessing import Pool, cpu_count\nimport multiprocessing\n\nclass Se... | [
[
"numpy.concatenate",
"torch.tensor"
],
[
"torch.tensor"
],
[
"sklearn.cluster.AgglomerativeClustering",
"numpy.linalg.norm"
]
] |
erfanMhi/Cooperative-Coevolution-Transfer-Optimization | [
"e75b7930bd8b55a160668b1039ac154a0d0270d7"
] | [
"main_multi.py"
] | [
"\nimport argparse\nimport os\nimport queue\n\nimport multiprocessing as mp\n# import SharedArray as sa\nimport numpy as np\n\n\nfrom copy import deepcopy\nfrom time import time\nfrom pprint import pprint\nfrom utils.data_manipulators import *\nfrom evolution.operators import *\nfrom to.probabilistic_model import P... | [
[
"numpy.concatenate",
"numpy.max",
"numpy.random.rand",
"numpy.array",
"numpy.zeros"
]
] |
Juan0001/yellowbrick-docs-zh | [
"36275d9704fc2a946c5bec5f802106bb5281efd1",
"36275d9704fc2a946c5bec5f802106bb5281efd1"
] | [
"tests/dataset.py",
"yellowbrick/utils/helpers.py"
] | [
"# tests.dataset\n# Helper functions for tests that utilize downloadable datasets.\n#\n# Author: Benjamin Bengfort <bbengfort@districtdatalabs.com>\n# Created: Thu Oct 13 19:55:53 2016 -0400\n#\n# Copyright (C) 2016 District Data Labs\n# For license information, see LICENSE.txt\n#\n# ID: dataset.py [8f4de77] ben... | [
[
"sklearn.datasets.base.Bunch",
"numpy.genfromtxt"
],
[
"numpy.true_divide",
"numpy.isfinite",
"numpy.arange",
"numpy.in1d",
"numpy.isscalar",
"numpy.errstate"
]
] |
takluyver/xray | [
"80c30ae343a2171c541da0387fed3926004030a7",
"80c30ae343a2171c541da0387fed3926004030a7"
] | [
"test/test_conventions.py",
"xray/variable.py"
] | [
"import numpy as np\nimport pandas as pd\nfrom datetime import datetime\nimport warnings\n\nfrom xray import conventions\nfrom . import TestCase, requires_netCDF4\n\n\nclass TestMaskedAndScaledArray(TestCase):\n def test(self):\n x = conventions.MaskedAndScaledArray(np.arange(3), fill_value=0)\n se... | [
[
"numpy.isnan",
"numpy.arange",
"numpy.issubdtype",
"numpy.around",
"pandas.Index",
"numpy.dtype",
"pandas.date_range",
"numpy.array"
],
[
"numpy.asarray",
"numpy.atleast_1d",
"numpy.empty"
]
] |
Gabvaztor/tensorflowCode | [
"e206ea4544552b87c2d43274cea3182f6b385a87"
] | [
"src/examples/animations/AnimationGif.py"
] | [
"#IMPORTAMOS LIBRERIAS.\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport animatplot as amp\n\n#INTRODUCIMOS DATOS.\nx = np.linspace(0, 1, 50)\nt = np.linspace(0, 1, 20)\n\n\nX, T = np.meshgrid(x, t)\nY = np.zeros(int(51*(X+T)))\n\n#CREAMOS OBJETO \"timeline\".\ntimeline = amp.Timeline(t, units='s', fps=... | [
[
"matplotlib.pyplot.title",
"numpy.linspace",
"matplotlib.pyplot.xlabel",
"numpy.meshgrid",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] |
edgargmartinez/OpenPNM | [
"c68745993b3e9895f53938164a9cf6305500748e",
"c68745993b3e9895f53938164a9cf6305500748e",
"b3873d35270b0acaad019264368d0055c677d159",
"b3873d35270b0acaad019264368d0055c677d159"
] | [
"tests/unit/models/physics/MeniscusTest.py",
"openpnm/algorithms/InvasionPercolation.py",
"tests/unit/utils/WorkspaceTest.py",
"tests/unit/phases/mixtures/GenericMixtureTest.py"
] | [
"import openpnm as op\nimport openpnm.models.physics as pm\nimport scipy as sp\n\n\nclass MeniscusTest:\n\n def setup_class(self):\n sp.random.seed(1)\n self.net = op.network.Cubic(shape=[5, 1, 5], spacing=5e-5)\n self.geo = op.geometry.StickAndBall(network=self.net,\n ... | [
[
"scipy.any",
"scipy.random.seed",
"scipy.allclose",
"scipy.around"
],
[
"scipy.vstack",
"scipy.sum",
"numpy.unique",
"numpy.arange",
"scipy.where",
"numpy.cumsum",
"scipy.argsort",
"numpy.all",
"numpy.max",
"numpy.ones",
"numpy.any",
"scipy.arang... |
naver/cog | [
"5b34ca90757116b9cfae11d8838927ba73e1ede8",
"5b34ca90757116b9cfae11d8838927ba73e1ede8"
] | [
"logreg.py",
"model_loaders_deit.py"
] | [
"# ImageNet-CoG Benchmark\n# Copyright 2021-present NAVER Corp.\n# 3-Clause BSD License\n\nimport argparse\nimport copy\nimport logging\nimport math\nimport os\nimport shutil\nimport time\n\nimport optuna\nimport torch as th\n\nimport feature_ops\nimport metrics\nimport utils\nfrom iterators import TorchIterator\n... | [
[
"torch.all",
"torch.nn.CrossEntropyLoss",
"torch.argmax",
"torch.cuda.empty_cache",
"torch.isfinite",
"torch.unique",
"torch.no_grad",
"torch.cuda.is_available",
"torch.save"
],
[
"torch.cat",
"torch.nn.functional.interpolate",
"torch.load"
]
] |
RomainClaret/msc.ml.labs | [
"4e6b8e1c1ab841ab8ebbaee13f6ae43e9a1c44a5"
] | [
"lab4/predict_income_romain_claret_and_sylvain_robert-nicoud_lab4.py"
] | [
"#!/usr/bin/env python3\n# 12.04.21\n# Assignment lab 04\n\n# Master Class: Machine Learning (5MI2018)\n# Faculty of Economic Science\n# University of Neuchatel (Switzerland)\n# Lab 4, see ML21_Exercise_4.pdf for more information\n\n# https://github.com/RomainClaret/msc.ml.labs\n\n# Authors: \n# - Romain Claret @Ro... | [
[
"pandas.read_table",
"sklearn.preprocessing.LabelEncoder",
"pandas.DataFrame",
"sklearn.metrics.accuracy_score"
]
] |
YunYang1994/CodeFun | [
"36fcdbfb4ed55fbb8f8dbc6f900842cc7bb9f068"
] | [
"detect_image.py"
] | [
"#! /usr/bin/env python\n# coding=utf-8\n#================================================================\n# Copyright (C) 2020 * Ltd. All rights reserved.\n#\n# Editor : VIM\n# File name : detect_image.py\n# Author : YunYang1994\n# Created date: 2020-03-19 14:05:53\n# Description :\n#\n#==... | [
[
"numpy.array"
]
] |
lRomul/argus-bengali-ai | [
"e64374230f5390a17305769126ff4bfc9a2a8644"
] | [
"src/draw.py"
] | [
"import time\nimport random\nimport numpy as np\nfrom pathlib import Path\nfrom PIL import Image, ImageDraw, ImageFont, ImageFilter\n\nimport torch\nfrom torch.utils.data import Dataset\n\nfrom src import config\n\n\ndef draw_grapheme(grapheme, font_path, size=(137, 236)):\n height, width = size\n image = Ima... | [
[
"numpy.random.seed",
"numpy.random.choice",
"torch.tensor",
"torch.no_grad",
"numpy.random.uniform",
"numpy.array",
"numpy.random.randint"
]
] |
dd-dos/Emotion-detection | [
"23eb94cbceb70890cf6b0f63e84d80eae7336c85"
] | [
"src/dataset_prepare.py"
] | [
"import numpy as np\nimport pandas as pd \nfrom PIL import Image\nfrom tqdm import tqdm\nimport os\n\n# convert string to integer\ndef atoi(s):\n n = 0\n for i in s:\n n = n*10 + ord(i) - ord(\"0\")\n return n\n\n# making folders\nouter_names = ['test','train']\ninner_names = ['angry', 'disgusted', ... | [
[
"pandas.read_csv",
"numpy.zeros"
]
] |
tzachar/addons | [
"e352207da32e4670a36a295ea477c476118cb0d9"
] | [
"tensorflow_addons/layers/normalizations.py"
] | [
"# Copyright 2019 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.nn.batch_normalization",
"tensorflow.keras.constraints.get",
"tensorflow.shape",
"tensorflow.keras.constraints.serialize",
"tensorflow.keras.backend.int_shape",
"tensorflow.stack",
"tensorflow.keras.regularizers.get",
"tensorflow.reshape",
"tensorflow.keras.utils.re... |
mutazag/mdsi | [
"efecc8f650ddf6866154389f98d4ce0a9803db18"
] | [
"misc/learnpy/k-means/loadiris.py"
] | [
"import pandas as pd\nfrom sklearn import datasets\n\n\n# load iris data set\niris = datasets.load_iris()\nprint(iris)\n\nspecies = [iris.target_names[x] for x in iris.target]\n\niris = pd.DataFrame(iris['data'], columns = ['Sepal_Length', 'Sepal_Width', 'Petal_Length', 'Petal_Width']) \niris['Species'] = species\n... | [
[
"numpy.random.seed",
"matplotlib.pyplot.title",
"matplotlib.pyplot.figure",
"sklearn.datasets.load_iris",
"pandas.DataFrame",
"sklearn.neighbors.KNeighborsClassifier",
"numpy.asmatrix",
"matplotlib.pyplot.xlabel",
"numpy.ravel",
"sklearn.preprocessing.scale",
"matplotli... |
urialon/bottleneck | [
"481fbb95edc6ae711da40b6305b40c12ce6a6d29"
] | [
"run-gat-2-8.py"
] | [
"import main\nfrom common import Task, STOP, GNN_TYPE\nfrom attrdict import AttrDict\nfrom experiment import Experiment\nimport torch\n\noverride_params = {\n 2: {'batch_size': 64, 'eval_every': 1000},\n 3: {'batch_size': 64},\n 4: {'batch_size': 1024},\n 5: {'batch_size': 1024},\n 6: {'batch_size': ... | [
[
"torch.cuda.empty_cache"
]
] |
savinshynu/turbo_seti | [
"7d756f130af5a323403affcdcb9f9bfa62325836"
] | [
"test/fb_cases_util.py"
] | [
"r'''\nUtility functions for test_fb_cases.py\n'''\n\nfrom os import mkdir, remove\nfrom os.path import dirname\nfrom shutil import rmtree\nimport logging\nimport pandas as pd\nimport numpy as np\nimport setigen as stg\nfrom turbo_seti.find_doppler.find_doppler import FindDoppler\nfrom fb_cases_def import HERE, DEB... | [
[
"pandas.read_csv",
"numpy.isclose"
]
] |
DebeshJha/tensorflow-1 | [
"2b5a225c49d25273532d11c424d37ce394d7579a",
"2b5a225c49d25273532d11c424d37ce394d7579a",
"2b5a225c49d25273532d11c424d37ce394d7579a",
"2b5a225c49d25273532d11c424d37ce394d7579a"
] | [
"tensorflow/python/ipu/utils.py",
"tensorflow/compiler/plugin/poplar/tests/bias_apply_graph_caching_test.py",
"tensorflow/python/ipu/horovod/ipu_horovod_strategy.py",
"tensorflow/compiler/plugin/poplar/tests/casts_elimination_test.py"
] | [
"# Copyright 2019 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.ipu.dataset_extractor.dataset_extractor",
"tensorflow.compat.v1.executing_eagerly",
"tensorflow.compiler.plugin.poplar.driver.config_pb2.IpuSelectionOrder.Value",
"tensorflow.python.framework.ops.device",
"tensorflow.python.ops.control_flow_ops.no_op",
"tensorflow.compil... |
Lakonik/EPro-PnP | [
"931df847190ce10eddd1dc3e3168ce1a2f295ffa",
"931df847190ce10eddd1dc3e3168ce1a2f295ffa",
"931df847190ce10eddd1dc3e3168ce1a2f295ffa",
"931df847190ce10eddd1dc3e3168ce1a2f295ffa"
] | [
"EPro-PnP-Det/epropnp_det/core/bbox_3d/misc.py",
"EPro-PnP-Det/epropnp_det/ops/pnp/cost_fun.py",
"EPro-PnP-6DoF/lib/models/resnet_rot_head.py",
"EPro-PnP-Det/epropnp_det/ops/deformable_attention_sampler.py"
] | [
"\"\"\"\nCopyright (C) 2010-2022 Alibaba Group Holding Limited.\nThis file is modified from\nhttps://github.com/tjiiv-cprg/MonoRUn\n\"\"\"\n\nimport math\nimport numpy as np\nimport torch\nfrom pytorch3d.structures.meshes import Meshes\n\nfrom epropnp_det.ops.iou3d.iou3d_utils import nms_gpu\n\n\ndef gen_unit_noc(n... | [
[
"torch.cat",
"torch.arccos",
"torch.sin",
"torch.zeros_like",
"torch.from_numpy",
"torch.tensor",
"torch.arange",
"numpy.array",
"torch.cos"
],
[
"torch.var",
"torch.sum",
"torch.mul",
"torch.square"
],
[
"torch.nn.ConvTranspose2d",
"torch.nn.ini... |
mengjian0502/GroupLasso_Quant | [
"1c54c940739babf86e362ffc57752c2aa4c8986d",
"1c54c940739babf86e362ffc57752c2aa4c8986d"
] | [
"models/resnet_cifar_quant.py",
"models/resnet_cifar_w2_quant.py"
] | [
"\"\"\"\nResNet on CIFAR10\n\"\"\"\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.nn import init\nfrom .quant import ClippedReLU, int_conv2d, int_linear\nfrom .mpdr_score import get_mpdr_score\nimport math\n\nclass DownsampleA(nn.Module):\n\n def __init__(self, nIn, nOut, stride)... | [
[
"torch.nn.Sequential",
"torch.Tensor",
"torch.nn.AvgPool2d",
"torch.cuda.is_available",
"torch.nn.BatchNorm2d",
"torch.nn.init.kaiming_normal_"
],
[
"torch.nn.Sequential",
"torch.nn.Conv2d",
"torch.nn.Linear",
"torch.nn.AvgPool2d",
"torch.nn.BatchNorm2d",
"torch... |
clabrugere/numpy-basics | [
"81efb4b8ac58fc17dc8f6c676004bbc3a99a92c3"
] | [
"models/utils.py"
] | [
"import numpy as np\n\n\ndef confusion_matrix(y_true, y_hat, threshold=.5):\n \n def _to_class(y):\n return np.array([1 if i >= threshold else 0 for i in y])\n \n n_classes = len(np.unique(y_true))\n cm = np.zeros((n_classes, n_classes))\n y_hat = _to_class(y_hat)\n \n for a, p in zip... | [
[
"numpy.array",
"numpy.zeros",
"numpy.unique"
]
] |
sergevkim/sonata | [
"2250b60174628ee76fb7d54bf50e4b8b07b505d5"
] | [
"sonata/datamodules/base_datamodule.py"
] | [
"from abc import ABC, abstractmethod\nfrom pathlib import Path\n\nimport torch\nfrom torch import Tensor\nfrom torch.utils.data import Dataset, DataLoader\n\n\nclass BaseDataModule(ABC):\n def __init__(\n self,\n data_path: Path,\n batch_size: int,\n num_workers: int,\... | [
[
"torch.utils.data.DataLoader"
]
] |
gpescia/MyNetKet | [
"958510966a5870d9d491de0628903cf1fc210921",
"958510966a5870d9d491de0628903cf1fc210921",
"958510966a5870d9d491de0628903cf1fc210921",
"958510966a5870d9d491de0628903cf1fc210921",
"958510966a5870d9d491de0628903cf1fc210921",
"958510966a5870d9d491de0628903cf1fc210921",
"958510966a5870d9d491de0628903cf1fc21092... | [
"netket/operator/boson.py",
"Examples/Ising2d/plot_ising.py",
"netket/operator/_der_local_values.py",
"netket/legacy/stats/mc_stats.py",
"netket/stats/mc_stats.py",
"netket/legacy/machine/density_matrix/rbm.py",
"Examples/Legacy/RealMachines/j1j2.py"
] | [
"# Copyright 2021 The NetKet 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... | [
[
"numpy.diag",
"numpy.arange",
"numpy.sqrt"
],
[
"matplotlib.pyplot.legend",
"numpy.polyfit",
"matplotlib.pyplot.axhline",
"numpy.poly1d",
"matplotlib.pyplot.gca",
"numpy.abs",
"matplotlib.pyplot.ioff",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.clf",
"nump... |
kingoflolz/DALL-E | [
"d3f3e9a57a31b1e1cc74a449a9e6e5a0442f0ac7"
] | [
"examples/pure_jax.py"
] | [
"import io\n\nimport jax\nimport requests\nimport PIL\nfrom PIL import ImageOps\n\nimport numpy as np\nimport jax.numpy as jnp\n\nfrom dall_e_jax import get_encoder, get_decoder, map_pixels, unmap_pixels\n\ntarget_image_size = 256\n\n\ndef download_image(url):\n resp = requests.get(url)\n resp.raise_for_statu... | [
[
"numpy.array"
]
] |
williamsashbee/Confident_classifier | [
"cba3ef862b310afc3af6c4a62b524f032f45549e",
"cba3ef862b310afc3af6c4a62b524f032f45549e"
] | [
"src/run_joint_confidence_cdcOriginalGan.py",
"src/run_joint_confidence_condgan.py"
] | [
"##############################################\n# This code is based on samples from pytorch #\n##############################################\n# Writer: Kimin Lee \n\nfrom __future__ import print_function\nimport argparse\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as... | [
[
"torch.nn.functional.kl_div",
"torch.ones",
"torch.cuda.manual_seed",
"torch.zeros",
"torch.nn.functional.nll_loss",
"torch.manual_seed",
"torch.randn",
"torch.cuda.LongTensor",
"torch.nn.BCELoss",
"torch.rand",
"torch.cuda.is_available",
"torch.squeeze",
"torch... |
7125messi/rencommend_system_learning | [
"4a8bcef241c4c0357cfbe4d1a9828b847974b69c"
] | [
"Chapter2/LFM.py"
] | [
"# 导入包\nimport random\nimport math\nimport numpy as np\nimport time\nfrom tqdm import tqdm\nfrom tqdm import trange\n\n# 1 通用函数定义\n## 定义装饰器,监控运行时间\ndef timmer(func):\n def wrapper(*args, **kwargs):\n start_time = time.time()\n res = func(*args, **kwargs)\n stop_time = time.time()\n pr... | [
[
"numpy.random.random"
]
] |
JCSDA/mpas-jedi | [
"e0780d1fd295912ee4cfb758854c52b6764d4ab9",
"e0780d1fd295912ee4cfb758854c52b6764d4ab9"
] | [
"graphics/basic_plot_functions.py",
"graphics/plot_modelspace_ts_1d_aggr.py"
] | [
"#!/usr/bin/env python3\n\nfrom copy import deepcopy\nimport cartopy.crs as ccrs\nimport datetime as dt\nimport logging\nfrom pandas.plotting import register_matplotlib_converters\nregister_matplotlib_converters()\nimport matplotlib\nmatplotlib.use('AGG')\nimport matplotlib.axes as maxes\nimport matplotlib.cm as cm... | [
[
"numpy.amax",
"numpy.polyfit",
"matplotlib.pyplot.contourf",
"matplotlib.colors.BoundaryNorm",
"numpy.linspace",
"matplotlib.colors.SymLogNorm",
"numpy.asarray",
"numpy.sqrt",
"matplotlib.pyplot.get_cmap",
"numpy.concatenate",
"numpy.all",
"numpy.max",
"numpy.an... |
Christoper-Harvey/1st-Capstone | [
"93630a4d5f4a2d939c8b5f74f11b5b33052e3f72"
] | [
"DeepReinforcementLearning/funcs.py"
] | [
"import numpy as np\nimport random\n\nimport loggers as lg\n\nfrom game import Game, GameState\nfrom model import Residual_CNN\n\nfrom agent import Agent, User\n\nimport config\n\ndef playMatchesBetweenVersions(env, run_version, player1version, player2version, EPISODES, logger, turns_until_tau0, goes_first = 0):\n ... | [
[
"numpy.round"
]
] |
sebasj13/topas-create-graphs | [
"5ccdbcbbe39461917cc015aa59805e518421431c"
] | [
"topasgraphsim/src/functions/dp.py"
] | [
"import numpy as np\nimport scipy.integrate as integrate\nimport scipy.interpolate as interpolate\n\n\ndef calculate_parameters(axis, dose, cax=False):\n\n \"\"\"\n A function to calculate the relevant\n descriptive parameters of dose profiles.\n \"\"\"\n\n interpolated_axis = np.linspace(axis[0], ax... | [
[
"scipy.integrate.simps",
"numpy.std",
"scipy.interpolate.Akima1DInterpolator",
"numpy.where"
]
] |
simondlevy/gym-copter | [
"7236769b7586b92026d4b47f12363258c84d9508"
] | [
"nengo/copter.py"
] | [
"'''\nQuadcopter class for Nengo adaptive controller\n\nCopyright (C) 2021 Xuan Choo, Simon D. Levy\n\nMIT License\n'''\n\nimport nengo\nimport gym\nimport numpy as np\n\nfrom adaptive import run\n\n\nclass Copter:\n\n def __init__(self, seed=None):\n\n self.env = gym.make('gym_copter:Hover1D-v0')\n ... | [
[
"numpy.clip"
]
] |
chasingegg/Data_Science | [
"a499866ff92aa1107057b20563564bdd89fc370f"
] | [
"Python/textrank/textrank.py"
] | [
"#!/usr/src/env python\n# -*- coding: utf-8 -*-\n# TextRank 博客 http://xiaosheng.me/2017/04/08/article49/\n# 从PageRank转变而来,可以用来做关键字的提取。TextRank的计算公式其实跟PageRank可以认为是一样的\n# 只不过就是要考虑权重的因素(算PageRank的时候就是均摊权值)\n# 在TextRank构建的图中,节点是句子,权值就是两个句子的相似程度 \n\n# 提取关键字的时候,单词作为图的节点,把权值都设成1,此时其实退化成PageRank\n# 把文本拆分成单词,将这一些单词设定一个简单的滑... | [
[
"pandas.read_csv",
"pandas.DataFrame"
]
] |
1in1/Python-Baseball | [
"4c76d65330ff7eb88c87057be02bbddb50dd325b"
] | [
"stats/data.py"
] | [
"import os\nimport glob\nimport pandas as pd\n\ngame_files = glob.glob(os.path.join(os.getcwd(), 'games', '*.EVE'))\ngame_files.sort()\n\ngame_frames = []\nfor game_file in game_files:\n game_frame = pd.read_csv(game_file, names=['type','multi2','multi3','multi4','multi5','multi6','event'])\n game_frames.appe... | [
[
"pandas.Categorical",
"pandas.concat",
"pandas.read_csv"
]
] |
RobertRosca/PyFstat | [
"1c9568bb3dc87c3d33aeb41b3f572e9990665372",
"1c9568bb3dc87c3d33aeb41b3f572e9990665372"
] | [
"examples/other_examples/PyFstat_example_twoF_cumulative.py",
"examples/other_examples/PyFstat_example_spectrogram.py"
] | [
"\"\"\"\nCumulative coherent 2F\n======================\n\nCompute the cumulative coherent F-statistic of a signal candidate.\n\"\"\"\n\n\nimport os\nimport numpy as np\nimport pyfstat\n\nfrom pyfstat.helper_functions import get_predict_fstat_parameters_from_dict\n\nlabel = \"PyFstat_example_twoF_cumulative\"\noutd... | [
[
"numpy.radians"
],
[
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.subplots"
]
] |
bugface/transformers | [
"ba286fe7d51db12ad663effac83bed8199dd7141",
"ba286fe7d51db12ad663effac83bed8199dd7141",
"ba286fe7d51db12ad663effac83bed8199dd7141",
"ba286fe7d51db12ad663effac83bed8199dd7141",
"ba286fe7d51db12ad663effac83bed8199dd7141",
"ba286fe7d51db12ad663effac83bed8199dd7141",
"ba286fe7d51db12ad663effac83bed8199dd714... | [
"src/transformers/models/unispeech/modeling_unispeech.py",
"src/transformers/models/luke/modeling_luke.py",
"tests/models/clip/test_modeling_tf_clip.py",
"examples/flax/token-classification/run_flax_ner.py",
"examples/research_projects/bertology/run_bertology.py",
"tests/models/t5/test_modeling_t5.py",
... | [
"# coding=utf-8\n# Copyright 2021 The Fairseq Authors and the HuggingFace Inc. team. 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... | [
[
"torch.nn.functional.softmax",
"torch.nn.init.uniform_",
"torch.nn.functional.dropout",
"torch.zeros",
"torch.cat",
"torch.FloatTensor",
"torch.nn.Dropout",
"torch.nn.CrossEntropyLoss",
"torch.ones",
"numpy.arange",
"torch.backends.cudnn.flags",
"torch.tensor",
... |
sashuIya/ssd.pytorch | [
"fe7d8722414fef4cce32f67422c896ef0c45d6bc"
] | [
"layers/box_utils.py"
] | [
"import torch\n\n\ndef point_form(boxes):\n \"\"\" Convert prior_boxes to (xmin, ymin, xmax, ymax)\n representation for comparison to point form ground truth data.\n Args:\n boxes: (tensor) center-size default boxes from priorbox layers.\n Return:\n boxes: (tensor) Converted xmin, ymin, xm... | [
[
"torch.cat",
"torch.exp",
"torch.mul",
"torch.log",
"torch.clamp",
"torch.index_select"
]
] |
meet-seth/Coursera-Deep-Learning | [
"195fad43e99de5efe6491817ad2b79e12665cc2a",
"6fbf9d406468c825ffa1ff2e177dbfd43084bace"
] | [
"Natural Language Processing with Attention Models/Week 4 - Chatbot/w4_unittest.py",
"Custom Models, Layers, and Loss Functions with TensorFlow/Week 4 - Custom Models/utils.py"
] | [
"import numpy as np\nimport trax\n#from trax import layers as tl\n#from trax.fastmath import numpy as fastnp\n#from trax.supervised import training\n\n# UNIT TEST for UNQ_C1\ndef test_get_conversation(target):\n\n data = {'file1.json': {'log':[{'text': 'hi'},\n {'text': 'hello'},... | [
[
"numpy.array",
"numpy.allclose"
],
[
"tensorflow.random.uniform"
]
] |
PeterDomanski/agents | [
"63c1c76f16f2068a637b26282c34a8825583e73e",
"1c4f2a0dd0abf3795a221dfc8a1771cff0e6ebb9",
"1c4f2a0dd0abf3795a221dfc8a1771cff0e6ebb9"
] | [
"tf_agents/bandits/agents/neural_linucb_agent_test.py",
"tf_agents/agents/sac/examples/v2/train_eval.py",
"tf_agents/policies/categorical_q_policy_test.py"
] | [
"# coding=utf-8\n# Copyright 2018 The TF-Agents 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 b... | [
[
"tensorflow.convert_to_tensor",
"tensorflow.zeros",
"tensorflow.cast",
"numpy.random.randint",
"tensorflow.compat.v1.train.AdamOptimizer",
"tensorflow.test.main",
"tensorflow.squeeze",
"numpy.zeros",
"tensorflow.matmul",
"tensorflow.executing_eagerly",
"tensorflow.shape... |
marcelkotze007/mk007---ML-Python-library | [
"307e51762fc821588206440daa2c18a6128f4aec",
"307e51762fc821588206440daa2c18a6128f4aec",
"307e51762fc821588206440daa2c18a6128f4aec"
] | [
"util.py",
"Basics Tools/Exercises/Exercise9.py",
"Neural Network/Softmax.py"
] | [
"# https://deeplearningcourses.com/c/data-science-supervised-machine-learning-in-python\n# https://www.udemy.com/data-science-supervised-machine-learning-in-python\nfrom __future__ import print_function, division\nfrom builtins import range, input\n# Note: you may need to update your version of future\n# sudo pip i... | [
[
"pandas.read_csv",
"numpy.random.random",
"numpy.cos",
"numpy.random.shuffle",
"numpy.sin",
"numpy.concatenate",
"numpy.random.randn",
"numpy.array",
"numpy.zeros"
],
[
"numpy.expand_dims",
"pandas.DataFrame"
],
[
"numpy.exp",
"numpy.random.randn"
]
] |
bem4solvation/pbj | [
"4fa9c111596359192539787ae241a79d4316b15b"
] | [
"pbj/electrostatics/pb_formulation/formulations/direct_external.py"
] | [
"import numpy as np\nimport bempp.api\nimport os\nfrom bempp.api.operators.boundary import sparse, laplace, modified_helmholtz\nfrom .common import calculate_potential_one_surface\n\ninvert_potential = True\n\n\ndef verify_parameters(self):\n return True\n\n\ndef lhs(self):\n dirichl_space = self.dirichl_spac... | [
[
"numpy.sum",
"numpy.sqrt"
]
] |
luxinglong/ViZDoom-SL | [
"fbc54c401b1ca320e9e804f2c97fdedc5d0c534d"
] | [
"doom/test.py"
] | [
"import sys\r\nimport argparse\r\nimport numpy as np\r\n\r\nfrom actions import ActionBuilder\r\nfrom game import Game\r\n\r\n# use_continuous speed action_combinations crouch freelook\r\n\r\nFALSY_STRINGS = {'off', 'false', '0'}\r\nTRUTHY_STRINGS = {'on', 'true', '1'}\r\n\r\ndef bool_flag(string):\r\n \"\"\"\r\... | [
[
"numpy.random.randint"
]
] |
Mohamed-Abdulaty/UDACITY-CarND-P2-Advanced-Lane-Lines | [
"e5d5fdff45c523a4f17635897b9de4b2e50d273d"
] | [
"src/Calibration.py"
] | [
"import os\nimport cv2\nimport numpy as np\n\n\nclass Calibration:\n def __init__(\n self,\n source_images_directory,\n destination_image_sub_directory,\n chessboard_shape,\n logger\n ):\n self.source_images_directory = source_images_directory\n self.des... | [
[
"numpy.zeros"
]
] |
barslmn/dove | [
"df6344286633422219c0e93e15d4327f9d082041"
] | [
"dove/utils/bed.py"
] | [
"# -*- coding: utf-8 -*-\n__author__ = 'bars'\n\nfrom io import StringIO\nimport pandas as pd\nfrom collections import defaultdict\n\n\nclass Bed:\n \"\"\"description\"\"\"\n\n def __init__(self, bed_file, mode='file'):\n self.bed_file = bed_file\n self.mode = mode\n\n def get_header(self):\n... | [
[
"pandas.read_csv"
]
] |
junzhezhang/cmr | [
"f0b2ded813535493f124852ce64b26efa761a35c"
] | [
"nnutils/dibr_kaolin.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\n\nimport numpy as np\nimport scipy.misc\nimport tqdm\nimport cv2\n\nimport torch\n\nfrom nnutils import geom_utils\n\n# from kaolin.graphics.dib_renderer.rasterizer import linear_rasterizer\n# from kao... | [
[
"torch.ones",
"torch.from_numpy",
"torch.unsqueeze",
"torch.unbind",
"torch.stack",
"numpy.array"
]
] |
horizon-blue/beanmachine-1 | [
"b13e4e3e28ffb860947eb8046863b0cabb581222",
"b13e4e3e28ffb860947eb8046863b0cabb581222",
"b13e4e3e28ffb860947eb8046863b0cabb581222",
"b13e4e3e28ffb860947eb8046863b0cabb581222"
] | [
"src/beanmachine/ppl/inference/proposer/nmc/single_site_half_space_nmc_proposer.py",
"src/beanmachine/ppl/compiler/tests/fix_vectorized_models_test.py",
"src/beanmachine/graph/tests/graph_test.py",
"src/beanmachine/ppl/world/variable.py"
] | [
"# Copyright (c) Meta Platforms, Inc. and affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport logging\nfrom typing import Tuple\n\nimport torch\nimport torch.distributions as dist\nfrom beanmachine.ppl.inference.propo... | [
[
"torch.distributions.Gamma",
"torch.ones_like",
"torch.where",
"torch.tensor"
],
[
"torch.tensor",
"torch.distributions.Normal",
"torch.distributions.Beta"
],
[
"numpy.array"
],
[
"torch.is_floating_point"
]
] |
dhimmel/pandas | [
"776fed3ab63d74ddef6e5af1a702b10c2a30bbb6",
"776fed3ab63d74ddef6e5af1a702b10c2a30bbb6",
"776fed3ab63d74ddef6e5af1a702b10c2a30bbb6"
] | [
"pandas/tests/frame/test_analytics.py",
"pandas/tests/extension/base/ops.py",
"pandas/core/ops.py"
] | [
"# -*- coding: utf-8 -*-\n\nfrom __future__ import print_function\n\nimport warnings\nfrom datetime import timedelta\nimport operator\nimport pytest\n\nfrom string import ascii_lowercase\nfrom numpy import nan\nfrom numpy.random import randn\nimport numpy as np\n\nfrom pandas.compat import lrange, PY35\nfrom pandas... | [
[
"numpy.dot",
"pandas.to_datetime",
"pandas.Series",
"numpy.linspace",
"numpy.asarray",
"pandas.util.testing.assert_produces_warning",
"pandas.MultiIndex.from_tuples",
"pandas.DataFrame",
"pandas.util.testing.assert_frame_equal",
"numpy.round",
"pandas.util.testing.asser... |
MehariBZ/pydca | [
"034e0707a13e6e43da1343630047d47caeca896e"
] | [
"pydca/meanfield_dca/meanfield_dca.py"
] | [
"from __future__ import absolute_import, division\nfrom . import msa_numerics\nfrom pydca.fasta_reader import fasta_reader\nimport logging\nimport numpy as np\n\n\"\"\"This module implements Direc Coupling Analysis (DCA) of residue coevolution\nfor protein and RNA sequences using the mean-field algorithm. The final... | [
[
"numpy.dot",
"numpy.log",
"numpy.min",
"numpy.reshape",
"numpy.ones",
"numpy.max",
"numpy.mean",
"numpy.array",
"numpy.zeros",
"numpy.sum"
]
] |
wakafengfan/CPM-1-Finetune | [
"b2c30bd94df31bcd6ee75ba90c347113563d4075"
] | [
"arguments.py"
] | [
"# coding=utf-8\n# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0... | [
[
"torch.cuda.is_available"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.