repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
SPAMLab/data_sharing
[ "a450e5cbd1e625866d6407b7fb8826fd4cdbaf1e" ]
[ "Landslide_Segmentation_with_Deep_Learning_Evaluating_Model_Generalization_in_Rainfall-Induced_Landslides_in_Brazil/preprocessing.py" ]
[ "import rasterio as rio\nimport geopandas as gpd\nfrom shapely.ops import cascaded_union\nfrom shapely.geometry import Polygon\nfrom rasterio.features import rasterize\nimport numpy as np\nimport os\nfrom glob import glob\nimport earthpy.spatial as es\nfrom rasterio.mask import mask\nfrom rasterio.plot import resh...
[ [ "pandas.concat", "numpy.expand_dims", "numpy.nditer", "numpy.linspace", "numpy.random.rand", "numpy.random.uniform", "numpy.array", "numpy.meshgrid", "numpy.vstack" ] ]
1uc/morinth
[ "634769dc0925932e2c7ab7ff6fe5f978862bb50b" ]
[ "test/time_integration_test.py" ]
[ "# SPDX-License-Identifier: MIT\n# Copyright (c) 2021 ETH Zurich, Luc Grosheintz-Laval\n\nimport time\nimport numpy as np\n\nfrom morinth.burgers import Burgers\nfrom morinth.rusanov import Rusanov\nfrom morinth.grid import Grid\nfrom morinth.boundary_conditions import Periodic\nfrom morinth.time_integration import...
[ [ "numpy.random.random", "numpy.abs", "numpy.all", "numpy.exp", "numpy.array" ] ]
changqi1/EasyRec
[ "f1e850491ad9eaed9b16543d99f57cc0bcb2923e" ]
[ "easy_rec/python/test/dh_local_run.py" ]
[ "import argparse\nimport logging\nimport os\nimport shutil\nimport sys\n\nimport tensorflow as tf\n\nfrom easy_rec.python.test.dh_test_util import datahub_test_util\nfrom easy_rec.python.test.odps_command import OdpsCommand\nfrom easy_rec.python.test.odps_test_prepare import prepare\nfrom easy_rec.python.test.odps_...
[ [ "tensorflow.test.main" ] ]
paulokuong/fourthbrain_capstone
[ "db4f76bfc5fd7b1ecc355282f37a87a06f62aa47" ]
[ "presentation/groupby_user_conversion.py" ]
[ "import pandas as pd\nimport numpy as np\nimport seaborn as sns\nfrom datetime import datetime\nimport os\nimport time\n\nfrom sklearn.inspection import permutation_importance\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.tree import Decisio...
[ [ "pandas.Series", "sklearn.ensemble.RandomForestClassifier", "numpy.abs", "sklearn.inspection.permutation_importance", "sklearn.model_selection.train_test_split", "pandas.DataFrame", "numpy.full", "tensorflow.keras.backend.clear_session", "pandas.unique", "pandas.read_json",...
esayyari/q2-feature-engineering
[ "d3419dabd4722818aafd7b13da957222ee4d3cf8" ]
[ "q2_feature_engineering/_smote/ML_combine.py" ]
[ "from imblearn import combine\nfrom qiime2.plugin import (Str, Int)\nimport biom\nfrom q2_feature_engineering._tada.logger import LOG\nfrom qiime2 import NumericMetadataColumn\nimport numpy as np\nimport pandas as pd\nimport qiime2\n\ndispatcher = {'SMOTEENN': combine.SMOTEENN, 'SMOTETomek': combine.SMOTETomek}\n\n...
[ [ "pandas.DataFrame" ] ]
snmatharu/Multi-Face-Deep-Learning
[ "f5b80f8f3462119139efe04b6995f54e650ac8e4" ]
[ "modelling.py" ]
[ "# train_data = np.load('train_data.npy') \r\n# test_data = np.load('test_data.npy') \r\n'''Creating the neural network using tensorflow'''\r\n# Importing the required libraries \r\n\r\n\r\nimport tflearn \r\nfrom tflearn.layers.conv import conv_2d, max_pool_2d \r\nfrom tflearn.layers.core import input_data, dropou...
[ [ "numpy.load", "numpy.array" ] ]
jennifereldiaz/fly-tnbc
[ "7ba08be9839c57e110a1b039b0b2c7393db16521" ]
[ "mutations_gh.py" ]
[ "#nov 9 2015\n\nimport pandas as pd\nimport numpy as np\n\n#get list of drivers\n#mutsigCV output (from the online tool)\nmutsig = pd.read_csv('MutSigCV2015.sig_genes.txt',sep='\\t')\nmutsig = mutsig[mutsig.q < 0.1]\ncosmic = pd.read_excel('COSMIC_cancer_gene_census.xls',sheetname = 'List')\npan = pd.read_excel('Pa...
[ [ "pandas.concat", "pandas.read_excel", "pandas.read_csv", "pandas.Series", "numpy.sum" ] ]
harupy/mlflow-example
[ "783d50b2a77293e602d5f7108f3bfe63af88e824" ]
[ "train.py" ]
[ "# The data set used in this example is from http://archive.ics.uci.edu/ml/datasets/Wine+Quality\n# P. Cortez, A. Cerdeira, F. Almeida, T. Matos and J. Reis.\n# Modeling wine preferences by data mining from physicochemical properties. In Decision Support Systems, Elsevier, 47(4):547-553, 2009.\n\nimport os\nimport ...
[ [ "pandas.read_csv", "sklearn.metrics.r2_score", "numpy.random.seed", "sklearn.linear_model.ElasticNet", "sklearn.metrics.mean_absolute_error", "sklearn.model_selection.train_test_split", "sklearn.metrics.mean_squared_error" ] ]
gavinmcclelland/sarcasm-detection
[ "492bde0e4d1eec112fb96b2a13851d8778c3ac42" ]
[ "cnn_model_hyperparameter_tuning.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"10_CNN_Master_Final.ipynb\n\nAutomatically generated by Colaboratory.\n\nOriginal file is located at\n https://colab.research.google.com/drive/1SMRhwB_Xaf9EC31gZh9HpVpE2iW5LfYJ\n\"\"\"\nimport logging\nlogging.getLogger().setLevel(logging.CRITICAL)\nimport warnings\nwarnings.filte...
[ [ "torch.nn.functional.max_pool1d", "torch.abs", "torch.nn.functional.softmax", "torch.max", "torch.zeros", "torch.cat", "torch.load", "torch.nn.Embedding", "torch.nn.BCEWithLogitsLoss", "torch.no_grad", "torch.FloatTensor", "torch.cuda.is_available", "torch.devic...
aba-ai-learning/DailyStudy
[ "b04d066582af930d0116e6b1a39b0a7fffb5dda9" ]
[ "dailynotes/2020-01/0114_fast_median_filter_with_hist.py" ]
[ "\nimport cv2\nimport numpy as np\nimport math\n\n\ndef calcMedian(histogram, threshholdvalue):\n tmpnum = 0\n for i in range(len(histogram)):\n tmpnum += histogram[i]\n if tmpnum > threshholdvalue:\n return i\n\n return None\n\n\ndef fast_median_filter(input, window_size):\n h,...
[ [ "numpy.zeros" ] ]
sontungtran/dopt
[ "2507fb5b5fc2a8cfb7dcc3bedaf86d27babf4aa0" ]
[ "dopt/utils/general_utils.py" ]
[ "r\"\"\"\nHelper functions\n\"\"\"\nimport sys\nimport time\nfrom datetime import datetime\nfrom contextlib import contextmanager\nimport torch\nimport random\nimport subprocess\n\n@contextmanager\ndef add_prefix_to_print(prefix): \n global is_new_line\n orig_write = sys.stdout.write\n is_new_line = True\n...
[ [ "torch.rand" ] ]
CEHENKLE/gitchues
[ "dff5adaf67c40edad9f2ff4cb0d8f6d6b0f85cad" ]
[ "setup.py" ]
[ "from datetime import date\nfrom github import Github\nimport os\nimport pandas as pd\nimport sys\n\n\n# used on first run to set up the pickle where we'll be storing stuff\ndef main(labels, my_org):\n token = os.getenv('GITHUB_TOKEN', '...')\n g = Github(token)\n org = g.get_organization(my_org)\n\n re...
[ [ "pandas.DataFrame" ] ]
iannjari/COVID-19-Cases-and-Mortality-Analysis-and-Prediction
[ "1cc4ce799664f897bb4c6c08ea83735dcfb09a3d" ]
[ "src/app.py" ]
[ "import dash\nfrom dash import dcc\nfrom dash import html\nfrom dash.dependencies import Input, Output, State\nimport plotly.express as px\nimport pandas as pd\nimport plotly.graph_objects as go \nimport os\nimport smtplib\nfrom smtplib import *\nfrom email.message import EmailMessage\nfrom email.mime.multipart imp...
[ [ "pandas.read_excel", "pandas.read_csv", "pandas.Series", "pandas.DataFrame" ] ]
xmodar/invtorch
[ "74b80be3b4126925e583282b6f78171b99788b37" ]
[ "invtorch/utils/parametrizations.py" ]
[ "\"\"\"Parametrization Modules\"\"\"\nimport torch\nfrom torch import nn\nfrom torch.nn.utils.parametrizations import _OrthMaps, _Orthogonal\n\n__all__ = ['NonZero', 'Orthogonal', 'ScaledOrthogonal']\n\n\nclass NonZero(nn.Module):\n \"\"\"Parameterization to force the values to be nonzero\"\"\"\n def __init__...
[ [ "torch.finfo", "torch.where", "torch.tensor" ] ]
wangzhe0912/missshi_deeplearning_ai
[ "b21ac9e2abb203486ee08fd47851617057010eaa" ]
[ "10 initialization_regularization_gradientCheck/init_utils.py" ]
[ "#-*- coding: UTF-8 -*-\n\"\"\"\n# WANGZHE12\n\"\"\"\nimport sklearn\nimport sklearn.datasets\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n\ndef sigmoid(x):\n \"\"\"\n Compute the sigmoid of x\n\n Arguments:\n x -- A scalar or numpy array of any size.\n\n Return:\n s -- sigmoid(x)\n ...
[ [ "numpy.dot", "numpy.log", "matplotlib.pyplot.contourf", "numpy.maximum", "numpy.random.seed", "matplotlib.pyplot.scatter", "numpy.arange", "numpy.int64", "numpy.nansum", "sklearn.datasets.make_circles", "numpy.mean", "numpy.exp", "matplotlib.pyplot.xlabel", ...
DSC-SPIDAL/twisterx
[ "773f11ff79648938dc5dd0678b786b97ed289b36" ]
[ "python/pycylon/setup.py" ]
[ "##\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distri...
[ [ "numpy.get_include" ] ]
gudgud96/AI-Music-Composition
[ "626f4713b0d60400ce2d588d6d96e9dd98f74625" ]
[ "note/chord_to_note_generator.py" ]
[ "'''\nAuthor: Tan Hao Hao\nProject: deeppop\nPurpose: Chord to note generator.\n'''\nimport pickle\nimport sys,os\nsys.path.append('..')\n\nfrom keras import backend as K\nfrom dataset.data_pipeline import DataPipeline\nfrom models.model_builder import ModelBuilder\nfrom tools.utils import piano_roll_to_p...
[ [ "numpy.expand_dims", "numpy.squeeze", "numpy.copy", "numpy.zeros_like", "numpy.count_nonzero", "numpy.transpose", "numpy.array", "numpy.zeros" ] ]
KumarLabJax/JABS-behavior-classifier
[ "8c038a7510ae08d90418403a723e396344bb671c" ]
[ "src/classifier/classifier.py" ]
[ "import random\nimport typing\nfrom enum import IntEnum\nfrom importlib import import_module\nfrom pathlib import Path\nimport joblib\n\nimport numpy as np\nfrom sklearn.ensemble import (\n RandomForestClassifier,\n GradientBoostingClassifier\n)\nfrom sklearn.metrics import (\n accuracy_score,\n precisi...
[ [ "sklearn.ensemble.RandomForestClassifier", "sklearn.metrics.confusion_matrix", "numpy.concatenate", "sklearn.metrics.precision_recall_fscore_support", "sklearn.ensemble.GradientBoostingClassifier", "numpy.count_nonzero", "sklearn.model_selection.LeaveOneGroupOut", "sklearn.metrics....
sumugit/DiCE
[ "247a7ba2d933e0bdde337421b660875a6ae0e194" ]
[ "dice_ml/explainer_interfaces/dice_KD.py" ]
[ "\"\"\"\nModule to generate counterfactual explanations from a KD-Tree\nThis code is similar to 'Interpretable Counterfactual Explanations Guided by Prototypes': https://arxiv.org/pdf/1907.02584.pdf\n\"\"\"\nfrom dice_ml.explainer_interfaces.explainer_base import ExplainerBase\nimport numpy as np\nimport timeit\nim...
[ [ "numpy.isclose", "pandas.DataFrame", "pandas.get_dummies" ] ]
ishine/TCAN
[ "4e0dab3a6b0e2b450e16ccf912e13e25093dfd87" ]
[ "utils/dataset.py" ]
[ "import os\nimport torch\nimport pickle\nimport unidecode\nimport observations\nimport numpy as np\nimport pandas as pd\nfrom tqdm import tqdm\nfrom collections import Counter\nfrom torch.utils import data\nfrom torch.autograd import Variable\nfrom torchvision import datasets, transforms\n\nimport logging\nfrom IPy...
[ [ "torch.manual_seed", "torch.LongTensor", "numpy.random.permutation", "torch.autograd.Variable" ] ]
qkirikigaku/Parallelized_LDA
[ "2256f4b583917bafb53d01759c8f47c2100b0c1e" ]
[ "Drawing/comparison_K.py" ]
[ "import sys\nimport numpy as np\nimport matplotlib.pyplot as plt\n\ndef main():\n args = sys.argv\n \"\"\"args[1]:data_type\"\"\"\n K = int(args[2])\n\n files = (K-1)*[0]\n i = 2\n while(i < K+1):\n string = 'result/data' + args[1] + '/result_k'\n if(i <= 9):\n string += '...
[ [ "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.title", "numpy.arange", "matplotlib.pyplot.figure", "matplotlib.pyplot.ylim", "matplotlib.pyplot.savefig", "matplotlib.pyplot.bar", "matplotlib.pyplot.close", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.xticks", "n...
bingrao/Bug-Transformer
[ "9e39dc553c281f6372b7a8cfc8205aa186645899", "9e39dc553c281f6372b7a8cfc8205aa186645899" ]
[ "onmt/encoders/rnn_encoder.py", "onmt/modules/global_attention.py" ]
[ "\"\"\"Define RNN-based encoders.\"\"\"\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom torch.nn.utils.rnn import pack_padded_sequence as pack\nfrom torch.nn.utils.rnn import pad_packed_sequence as unpack\n\nfrom onmt.encoders.encoder import EncoderBase\nfrom onmt.utils.rnn_factory import rnn_factor...
[ [ "torch.nn.Linear", "torch.nn.utils.rnn.pad_packed_sequence", "torch.nn.functional.relu", "torch.nn.utils.rnn.pack_padded_sequence" ], [ "torch.tanh", "torch.nn.Linear", "torch.bmm", "torch.cat" ] ]
DmytroSytnyk/hivemind
[ "595b831bcaac6b4d8da215de70b8138ac548c562" ]
[ "hivemind/moe/client/moe.py" ]
[ "from __future__ import annotations\n\nimport time\nfrom queue import Empty, Queue\nfrom typing import Any, Dict, List, Optional, Tuple\n\nimport grpc\nimport torch\nimport torch.nn as nn\nfrom torch.autograd.function import once_differentiable\n\nimport hivemind\nfrom hivemind.compression import deserialize_torch_...
[ [ "torch.softmax", "torch.zeros", "torch.cat", "torch.randn", "torch.nn.Linear", "torch.where", "torch.arange", "torch.stack", "torch.is_grad_enabled", "torch.as_tensor" ] ]
fabian57fabian/tempoGAN
[ "6ad6c289aac11ffff5e73a8d398f6cd7d848b9cc" ]
[ "tensorflow/datagen/gen_sim_2006.py" ]
[ "#\n# tempoGAN: A Temporally Coherent, Volumetric GAN for Super-resolution Fluid Flow\n# Copyright 2018 You Xie, Erik Franz, Mengyu Chu, Nils Thuerey\n#\n# Plume data generation, 2D\n# \nfrom manta import *\nimport os, shutil, math, sys\nimport numpy as np\nsys.path.append(\"../tools\")\nimport paramhelpers as ph\n...
[ [ "numpy.savez_compressed" ] ]
13952522076/RandLA-Net-pytorch
[ "2fc6cfa2c9376d98582678bccfebf51bd2f316e8" ]
[ "pytorch_utils.py" ]
[ "import torch.nn as nn\nfrom typing import List, Tuple\n\n\nclass SharedMLP(nn.Sequential):\n\n def __init__(\n self,\n args: List[int],\n *,\n bn: bool = False,\n activation=nn.ReLU(inplace=True),\n preact: bool = False,\n first: bool ...
[ [ "torch.nn.init.constant_", "torch.nn.Linear", "torch.nn.LeakyReLU", "torch.nn.ReLU", "torch.nn.init.constant" ] ]
s-santoro/lunch-crawler
[ "1e39b1d35d76067a55b2c034d0488a6ec53f8a45" ]
[ "classification/scripts/MLTuningAdaboost.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# Imports\nfrom luigi.contrib.spark import PySparkTask\nfrom luigi.parameter import IntParameter\nfrom luigi import LocalTarget, Task, WrapperTask\nfrom luigi.format import UTF8\nimport datetime\nimport pandas as pd\nimport numpy as np\nimport re\nimport os\nfrom configs.C...
[ [ "sklearn.decomposition.TruncatedSVD", "pandas.concat", "sklearn.metrics.precision_score", "sklearn.model_selection.train_test_split", "pandas.DataFrame", "sklearn.feature_extraction.text.CountVectorizer", "sklearn.ensemble.AdaBoostClassifier", "numpy.count_nonzero", "sklearn.me...
Chrisa142857/CompressAI
[ "75760096b9700a58d346351251d544050f3418fb" ]
[ "examples/codec.py" ]
[ "# Copyright 2020 InterDigital Communications, 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 app...
[ [ "matplotlib.pyplot.subplots", "torch.no_grad", "torch.set_num_threads", "matplotlib.pyplot.show", "torch.nn.functional.pad" ] ]
mindspore-ai/mindarmour
[ "a5db0825fa06e4da870c0a850a18b374e8cdd086" ]
[ "mindarmour/adv_robustness/detectors/ensemble_detector.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.zeros", "numpy.argwhere" ] ]
zachkeer/ReAgent
[ "3e5eb0391050c39b9d4707020f9ee15d860f28cb" ]
[ "reagent/test/workflow/test_query_data.py" ]
[ "#!/usr/bin/env python3\n# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n\nimport logging\nimport unittest\n\nimport numpy as np\n\n# pyre-fixme[21]: Could not find `pytest`.\nimport pytest\n\n# pyre-fixme[21]: Could not find `pyspark`.\nfrom pyspark.sql.functions import asc\n\n# pyre-fixme...
[ [ "numpy.array" ] ]
LianShuaiLong/deeplearning_tools
[ "5ce326c61efeb0b79c8afbb56a8256d3c38c9889" ]
[ "start_training_with_all_avaliable_gpus/start.py" ]
[ "#-*-coding:utf-8-*-\nimport sys\nimport os\nimport json\nimport numpy as np\nimport multiprocessing\nimport datetime\nimport pynvml\nfrom pynvml import *\n\nnvmlInit()\n\nMEMORY_THESHOLD = 15 # GB\ndef get_aviliable_gpus():\n print (\"Driver Version:\", nvmlSystemGetDriverVersion())\n deviceCount = nvmlDevic...
[ [ "numpy.random.uniform", "numpy.random.choice" ] ]
GEbb4/matlab2py
[ "0522fc75c30d52dd724259df0f29f51a2b7219fe" ]
[ "src/matlab2py/figure_process.py" ]
[ "\"\"\"\nPlotting machinery\n\"\"\"\nimport ast\nimport logging\nimport queue\nimport sys\nimport threading\nimport tkinter as tk\nimport time\nfrom argparse import ArgumentParser\n\nimport matplotlib.pyplot as plt\nimport numpy as np # Needed for dynamic code.\nfrom matplotlib.font_manager import FontProperties\n...
[ [ "matplotlib.pyplot.show", "matplotlib.font_manager.FontProperties", "matplotlib.pyplot.figure" ] ]
nluedema/kge
[ "0c7670692736af6d2073d32fab99c7361b66911f" ]
[ "kge/dataset.py" ]
[ "from __future__ import annotations\n\nimport os\nimport uuid\n\nimport torch\nfrom torch import Tensor\nimport numpy as np\nimport pandas as pd\nimport pickle\nimport inspect\n\nfrom kge import Config, Configurable\nimport kge.indexing\nfrom kge.indexing import create_default_index_functions\nfrom kge.misc import ...
[ [ "torch.from_numpy" ] ]
Ferch42/PyDSRL
[ "bd9ea3e739c837db0db5052f7db23476fa21c472" ]
[ "dqn_main.py" ]
[ "'''Main module for the paper's algorithm'''\r\n\r\nimport argparse\r\nimport os\r\n\r\nfrom collections import deque\r\nfrom datetime import datetime\r\n\r\n\r\nimport numpy as np\r\nimport tensorflow as tf\r\nimport tqdm\r\n\r\nfrom gym import logger\r\n\r\nimport cross_circle_gym\r\n\r\nfrom components.state_bui...
[ [ "numpy.reshape", "tensorflow.summary.scalar", "numpy.mean", "tensorflow.summary.create_file_writer" ] ]
idiap/sentence-planner
[ "bafdef50043b97e28ae550e44e595dff3f4eb6ad" ]
[ "src/models/predictor.py" ]
[ "#\n# Original version by Yang Liu.\n# Modifications by Andreas Marfurt <andreas.marfurt@idiap.ch>\n#\n\n#!/usr/bin/env python\n\"\"\" Translator Class and builder \"\"\"\nfrom __future__ import print_function\nimport codecs\nimport os\nimport math\n\nimport torch\n\nfrom tensorboardX import SummaryWriter\n\nfrom o...
[ [ "torch.no_grad", "torch.full", "torch.arange" ] ]
Jiayuan-Gu/habitat-lab
[ "5ce36a6c6502fe8e86d6732ba8bab9a5db471574" ]
[ "test/test_baseline_trainers.py" ]
[ "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\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 gc\nimport itertools\nimport math\nimport os\nimport random\nfrom copy import deepcopy\nfrom glob impo...
[ [ "torch.abs", "torch.randn", "torch.distributed.is_initialized", "torch.arange", "torch.nn.AvgPool2d", "torch.distributed.destroy_process_group", "torch.flatten", "torch.device", "torch.cuda.is_available", "torch.stack" ] ]
lastmeta/Satori
[ "cb321ee53a15fe8cba8fcdd483eeb6acc8dab3ea" ]
[ "satori/lib/spoof/streamr.py" ]
[ "# > python satori\\spoof\\streamr.py \n\nimport time \nimport json\nimport requests\nimport datetime as dt\nimport pandas as pd\nfrom satori import config \nfrom satori.lib.apis import disk\n\nclass Streamr():\n def __init__(self, sourceId:str=None, streamId:str=None):\n self.sourceId = sourceId or 'st...
[ [ "pandas.DataFrame" ] ]
yuehaixiao/models
[ "3a14ee7ded00162c416b1bc84de3f2a158ec3278" ]
[ "PaddleCV/image_classification/reader_cv2.py" ]
[ "#copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.\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.random.beta", "numpy.random.seed", "numpy.random.shuffle", "numpy.random.permutation", "numpy.random.uniform", "numpy.array", "numpy.random.randint" ] ]
egoolish/cuml
[ "fab74ca94fdbc5b49281660ce32a48cfd3d66f46" ]
[ "python/cuml/test/dask/utils.py" ]
[ "# Copyright (c) 2019, 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 applicable l...
[ [ "numpy.random.uniform", "sklearn.datasets.make_blobs", "pandas.DataFrame" ] ]
jkurdek/TensorFlowASR
[ "a1999ac7f1eb5112c9557ca8043152828b9e5815" ]
[ "examples/conformer/inference/run_saved_model.py" ]
[ "# Copyright 2020 Huy Le Nguyen (@usimarit)\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 ...
[ [ "tensorflow.keras.backend.clear_session", "tensorflow.saved_model.load" ] ]
Islanderrobotics/string_to_date_time
[ "d84bef720b586ce730c413b72d5f50b59a3d7960" ]
[ "code/stringtodatetime.py" ]
[ "import pandas as pd\nimport datetime\n\nclass StringToDateTime:\n ''' this class is designed to make converting strings to datetime more accessable\n this is done by creating an instance of the class StringToDateTime(df, column_names)\n df is where you will define the pandas dataframe that you will work w...
[ [ "pandas.read_csv", "pandas.to_datetime" ] ]
haikusw/jaqalpaq
[ "d507e894cb897756a1e51c99582b736254995b4e" ]
[ "jaqalpaq/emulator/_validator.py" ]
[ "# Copyright 2020 National Technology & Engineering Solutions of Sandia, LLC (NTESS).\n# Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government retains\n# certain rights in this software.\nfrom collections import OrderedDict\n\nimport numpy as np\n\nfrom jaqalpaq import JaqalError\nfrom jaqalpaq.p...
[ [ "numpy.isclose" ] ]
aboerzel/ANPR-keras
[ "c49fe4031752227d99d4acccccb35f6cb896db68" ]
[ "pyimagesearch/io/hdf5datasetloader.py" ]
[ "import h5py\nimport numpy as np\n\n\nclass Hdf5DatasetLoader:\n def __init__(self, preprocessors=None):\n self.preprocessors = preprocessors\n\n # if the preprocessors are None, initialize them as an empty list\n if self.preprocessors is None:\n self.preprocessors = []\n\n def...
[ [ "numpy.array", "numpy.random.shuffle" ] ]
ColfaxResearch/qarbo
[ "bc905ecba7aa1abf04d79db7ef3e2c9178ba7acf" ]
[ "qarpo/demoutils.py" ]
[ "from IPython.core.display import HTML\nimport threading\nfrom IPython.display import display, Image\nimport ipywidgets as widgets\nimport time\nimport queue\nimport subprocess\nimport datetime\nimport matplotlib\nimport matplotlib.pyplot as plt\nfrom IPython.display import set_matplotlib_formats\nimport os \nimpor...
[ [ "matplotlib.pyplot.text", "matplotlib.pyplot.yticks", "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "matplotlib.pyplot.bar", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.xticks", "matplotlib.pyplot.pause", "matplotlib.pyplot.ylabel" ] ]
sc420/pygame-rl
[ "f81da559385876616d99c74b43e4345f53d086d2" ]
[ "pygame_rl/scenario/soccer/envs/soccer_v0.py" ]
[ "# Third-party modules\nimport gym\nimport numpy as np\n\n# Project modules\nfrom pygame_rl.scenario.soccer.actions import Actions\nfrom pygame_rl.scenario.soccer.agent_modes import AgentModes\nfrom pygame_rl.scenario.soccer.ai_modes import AiModes\nfrom pygame_rl.scenario.soccer.map_data import MapData\nfrom pygam...
[ [ "numpy.random.RandomState", "numpy.argmax", "numpy.argmin", "numpy.prod", "numpy.array", "numpy.hypot" ] ]
cwdt-collective/eclipse
[ "922f8ea7781bbf5ffd9ac31f6af89826ae1970cd" ]
[ "eclipse/model.py" ]
[ "from collections import OrderedDict\nfrom typing import Tuple, Union\n\nimport numpy as np\nimport torch\nimport torch.nn.functional as F\nfrom torch import nn\n\n\nclass Bottleneck(nn.Module):\n\texpansion = 4\n\n\tdef __init__(self, inplanes, planes, stride=1):\n\t\tsuper().__init__()\n\n\t\t# all conv layers ha...
[ [ "torch.cat", "torch.zeros", "torch.nn.Embedding", "torch.ones", "torch.nn.MultiheadAttention", "torch.randn", "torch.arange", "torch.nn.Sequential", "torch.sigmoid", "numpy.log", "torch.empty", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.AvgPool2d", ...
uricohen/google-research
[ "dec85093d61be11c58d5862ddd8f814a1140ef29" ]
[ "demogen/total_variation_util.py" ]
[ "# coding=utf-8\n# Copyright 2019 The Google Research Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "numpy.reshape", "tensorflow.placeholder", "numpy.concatenate", "tensorflow.global_variables_initializer", "numpy.std", "tensorflow.Session", "numpy.sum" ] ]
alexlib/vampy
[ "b8639f13cbe9ab42d961a2b12f42a4cc37e410ca" ]
[ "vampy/lax_wendroff.py" ]
[ "# -*- coding: utf-8 -*-\n\nfrom __future__ import division\n\nimport sys\nimport numpy as np\nfrom scipy.interpolate import interp1d\n\nimport vampy.utils as utils\n\n\nclass LaxWendroff(object):\n \"\"\"\n Class implementing Richtmyer's 2 step Lax-Wendroff method.\n \"\"\"\n \n \n def __init__(s...
[ [ "numpy.zeros" ] ]
jarobyte91/post_ocr_correction
[ "bae2e601c838a23cc31a82e10ed5cd1b10ccdac6" ]
[ "train/launch_experiments_en.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\nimport torch\nimport torch.utils.data as tud\nimport torch.nn as nn\nimport pickle\nimport datetime\nimport argparse\nfrom random import randint as r\nfrom random import choice\nimport sys\nimport pandas as pd\nsys.path.append(\"/home/jarobyte/guemes/lib/\")\nfrom pytorch_...
[ [ "torch.device", "pandas.read_pickle", "torch.load" ] ]
flaviovdf/pyseries
[ "59c8a321790d2398d71305710b7d322ce2d8eaaf" ]
[ "pyseries/data/tests/test_tsio.py" ]
[ "# -*- coding: utf8\nfrom __future__ import division, print_function\n'''\nTests for the io module\n'''\n\nfrom numpy.testing import assert_equal\nfrom pyseries.testing import YOUTUBE_1K\n\nfrom pyseries.data import tsio\n\ndef test_from_mat():\n dataset = tsio.from_id_row_mat(YOUTUBE_1K)\n assert_equal(1000,...
[ [ "numpy.testing.assert_equal" ] ]
AnaZou/ssd_keras
[ "44c923e6e062eb522b92ed4c1421dc3082e493f2" ]
[ "ssd_training.py" ]
[ "\"\"\"SSD training utils.\"\"\"\n\nimport tensorflow as tf\n\n\nclass MultiboxLoss(object):\n \"\"\"Multibox loss with some helper functions.\n\n # Arguments\n num_classes: Number of classes including background.\n alpha: Weight of L1-smooth loss.\n neg_pos_ratio: Max ratio of negative t...
[ [ "tensorflow.not_equal", "tensorflow.reduce_max", "tensorflow.concat", "tensorflow.range", "tensorflow.greater", "tensorflow.less", "tensorflow.reduce_sum", "tensorflow.shape", "tensorflow.minimum", "tensorflow.reshape", "tensorflow.reduce_any", "tensorflow.ones_like...
researchmm/WSOD2
[ "fd6f99401013ed5a66e39cee71a6c2b35580008e" ]
[ "mmdet/models/roi_heads/bbox_heads/oicr_head.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom mmcv.runner import auto_fp16, force_fp32\nfrom torch.nn.modules.utils import _pair\n\nfrom mmdet.core import build_bbox_coder, multi_apply, WeaklyMulticlassNMS, multiclass_nms\nfrom mmdet.models.builder import HEADS, build_loss\nfrom mmdet....
[ [ "torch.nn.Dropout", "torch.nn.functional.softmax", "torch.cat", "torch.nn.init.constant_", "torch.zeros", "torch.nn.Linear", "torch.nn.init.normal_", "torch.nn.functional.smooth_l1_loss", "torch.nn.modules.utils._pair", "torch.nn.functional.one_hot", "torch.clamp" ] ]
Lornatang/PyTorch-WGANGP
[ "5fde831f7509dd9136b1eb6fa1b772a0ea08b67d" ]
[ "gan_mnist.py" ]
[ "import argparse\nimport os\nimport random\n\nimport torch\nimport torch.autograd as autograd\nimport torch.nn as nn\nimport torch.backends.cudnn as cudnn\nimport torch.optim as optim\nimport torch.utils.data\n\nimport torchvision.datasets as dset\nimport torchvision.transforms as transforms\nimport torchvision.uti...
[ [ "torch.mean", "torch.nn.ConvTranspose2d", "torch.load", "torch.manual_seed", "torch.randn", "torch.nn.Conv2d", "torch.nn.Tanh", "torch.nn.LeakyReLU", "torch.cuda.is_available", "torch.nn.BatchNorm2d", "torch.device", "torch.nn.ReLU", "torch.autograd.grad", "...
iTakeshi/dgl
[ "25c9221b835b775f40983c844e482a1242095756" ]
[ "python/dgl/dataloading/cluster_gcn.py" ]
[ "\"\"\"Cluster-GCN samplers.\"\"\"\nimport os\nimport pickle\nimport numpy as np\n\nfrom .. import backend as F\nfrom ..base import DGLError\nfrom ..partition import metis_partition_assignment\nfrom .base import set_node_lazy_features, set_edge_lazy_features\n\nclass ClusterGCNSampler(object):\n \"\"\"Cluster-GC...
[ [ "numpy.argsort", "numpy.cumsum", "numpy.bincount" ] ]
clbarnes/imageio
[ "73dadda9d93f9e2c4724095f91a2acd4ecd13c4a" ]
[ "tests/test_grab.py" ]
[ "import sys\n\nimport numpy as np\n\nfrom pytest import raises\nfrom imageio.testing import run_tests_if_main\n\nimport imageio\n\n\ndef test_grab_plugin_load():\n \n imageio.plugins.grab.BaseGrabFormat._ImageGrab = FakeImageGrab\n imageio.plugins.grab.BaseGrabFormat._pillow_imported = True\n _plat = sy...
[ [ "numpy.zeros" ] ]
FinchZHU/uai-sdk
[ "78e06bebba2d18233ce6dcb5be619e940f7a7ef3", "78e06bebba2d18233ce6dcb5be619e940f7a7ef3" ]
[ "examples/tensorflow/inference/im2txt/code/inference_utils/inference_wrapper_base.py", "examples/tensorflow/inference/tf-serving/mnist/inference.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.import_graph_def", "tensorflow.train.latest_checkpoint", "tensorflow.gfile.FastGFile", "tensorflow.train.SaverDef", "tensorflow.logging.info", "tensorflow.train.Saver", "tensorflow.gfile.IsDirectory", "tensorflow.logging.fatal", "tensorflow.GraphDef" ], [ "n...
pyvista/vista
[ "c49a6abae7cc62d242f12ec45a6b22b524db1ec8" ]
[ "pyvista/plotting/widgets.py" ]
[ "\"\"\"Module dedicated to widgets.\"\"\"\n\nimport numpy as np\n\nimport pyvista\nfrom pyvista import _vtk\nfrom pyvista.utilities import (\n NORMALS,\n generate_plane,\n get_array,\n get_array_association,\n try_callback,\n)\n\nfrom .colors import Color\n\n\nclass WidgetHelper:\n \"\"\"An intern...
[ [ "numpy.arange", "numpy.array", "numpy.unique" ] ]
mlomnitz/deep_avsr
[ "01fe2fe6b25a3968b25d8aca861a592ef62561b2" ]
[ "audio_visual/test.py" ]
[ "\"\"\"\nAuthor: Smeet Shah\nFile part of 'deep_avsr' GitHub repository available at -\nhttps://github.com/LordMartian/deep_avsr\n\"\"\"\n\nimport torch\nimport torch.nn as nn\nfrom torch.utils.data import DataLoader\nimport numpy as np\n\nfrom config import args\nfrom models.av_net import AVNet\nfrom models.lrs2_c...
[ [ "numpy.random.seed", "torch.load", "torch.manual_seed", "torch.utils.data.DataLoader", "torch.nn.CTCLoss", "torch.cuda.is_available", "torch.device" ] ]
zhang-rongchen/Logo-Retrieval-in-Commercial-Plaza
[ "863fd98ff926f2b5814fc4cbf3fb5d06c5ec3913" ]
[ "yolo3/utils.py" ]
[ "\"\"\"Miscellaneous utility functions.\"\"\"\n\nfrom functools import reduce\nimport cv2\nfrom PIL import Image\nimport numpy as np\nfrom matplotlib.colors import rgb_to_hsv, hsv_to_rgb\n\ndef compose(*funcs):\n \"\"\"Compose arbitrarily many functions, evaluated left to right.\n\n Reference: https://mathieu...
[ [ "numpy.logical_and", "matplotlib.colors.hsv_to_rgb", "numpy.asarray", "numpy.random.shuffle", "numpy.random.rand", "numpy.array", "numpy.zeros" ] ]
Artamus/label-propagation
[ "e4dbe1be99d94178415f086b0a3f87bb6ededfe1" ]
[ "src/get_label_frequency.py" ]
[ "import argparse\nimport pypcd\nimport os\nimport numpy as np\nfrom cityscapes_classes import id_to_name\n\n\ndef read_pointcloud_file(pointcloud_file_path):\n return pypcd.PointCloud.from_path(pointcloud_file_path)\n\n\ndef input_arguments():\n parser = argparse.ArgumentParser()\n\n parser.add_argument(\n...
[ [ "numpy.asarray", "numpy.array", "numpy.unique" ] ]
diazshejo/Friday_IA
[ "2d6cd2f54fda7b2935eaacc84df2cf4277eac762" ]
[ "tensorflow-conexion/tensorflow/Raspberry/label_image/label_image.py" ]
[ "# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.Graph", "tensorflow.image.resize_bilinear", "tensorflow.import_graph_def", "tensorflow.read_file", "tensorflow.gfile.GFile", "numpy.squeeze", "tensorflow.cast", "tensorflow.image.decode_png", "tensorflow.expand_dims", "tensorflow.image.decode_bmp", "tensorfl...
RajatRasal/coma_ukbiobank_mesh
[ "74f2aa809c2679be6947a85cd0b8e514e8293605" ]
[ "coma/models/autoencoder.py" ]
[ "import torch.nn as nn\n\nfrom torch import Tensor\n\n\nclass AE(nn.Module):\n \"\"\"\n def __init__(self, in_channels, out_channels, latent_channels, edge_index,\n down_transform, up_transform, K, n_blocks, Encoder, Decoder, **kwargs):\n super(AE, self).__init__()\n self.in_chan...
[ [ "torch.nn.init.constant_", "torch.nn.Linear", "torch.nn.init.xavier_uniform_" ] ]
liaopeiyuan/tenset
[ "2f7a4371989d32126fa3cd68ad8c3d244d78f790" ]
[ "python/tvm/testing.py" ]
[ "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y...
[ [ "numpy.abs", "numpy.isfinite", "numpy.argwhere", "numpy.all", "numpy.asanyarray", "numpy.zeros_like", "numpy.prod", "numpy.testing.assert_allclose", "numpy.unravel_index", "numpy.sum" ] ]
BotondA/PTAB_network_instability
[ "11bb01898aff51220cd91ad60f26c0c33f9a575a" ]
[ "code/compute_time_series.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nThis script takes partially preprocessed voxel-space data from fmriprep,\nthen performs the following procedures:\n -detrends\n -standardizes\n -bandpass filters\n -regresses out confounds\n -parcels into ROIs\n\nOutputs preprocessed ROI-space time-series data.\n\n\"...
[ [ "pandas.read_csv", "pandas.DataFrame" ] ]
dabuc/CoralQuant
[ "26ba2e0b39a897d8947166796c6a4e9f5ab202fa" ]
[ "coralquant/spider/bs_stock_industry.py" ]
[ "import baostock as bs\nimport pandas as pd\nfrom coralquant.database import engine\nfrom sqlalchemy import String\nfrom coralquant.settings import CQ_Config\n\ndef create_stock_industry():\n \"\"\"\n BS-创建行业分类\n \"\"\"\n # 登陆系统\n lg = bs.login()\n # 显示登陆返回信息\n print('login respond error_code:'...
[ [ "pandas.DataFrame" ] ]
jcreinhold/synthtorch
[ "bb6eb20641b2cae3cbb96421b12e03865b5c5095" ]
[ "synthtorch/util/helper.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nsynthtorch.util.helper\n\ndefine helper function for defining neural networks in pytorch\n\nAuthor: Jacob Reinhold (jacob.reinhold@jhu.edu)\n\nCreated on: Nov 2, 2018\n\"\"\"\n\n__all__ = ['get_act',\n 'get_loss',\n 'get_norm1d',\n ...
[ [ "torch.nn.Softmax", "torch.zeros", "torch.nn.ELU", "torch.nn.BCEWithLogitsLoss", "torch.nn.L1Loss", "torch.nn.InstanceNorm1d", "torch.tensor", "torch.nn.Sigmoid", "torch.nn.CELU", "torch.nn.SELU", "torch.nn.GroupNorm", "torch.nn.BatchNorm1d", "torch.nn.init.cons...
mdhaffar/speechbrain-1
[ "34bcf9d0783cf72a952674032834383194018b7b" ]
[ "recipes/WSJ0Mix/separation/dynamic_mixing.py" ]
[ "import speechbrain as sb\nimport numpy as np\nimport torch\nimport torchaudio\nimport glob\nimport os\nfrom pathlib import Path\nimport random\nfrom speechbrain.processing.signal_processing import rescale\nfrom speechbrain.dataio.batch import PaddedBatch\n\n\ndef build_spk_hashtable(hparams):\n\n wsj0_utterance...
[ [ "torch.abs", "numpy.random.choice", "torch.sum", "torch.stack", "numpy.random.randint" ] ]
chrispbradley/sundials
[ "8242ba0b361e285b0f826fc3e077e0d8e3e81ee2" ]
[ "examples/arkode/CXX_serial/plot_heat2D.py" ]
[ "#!/usr/bin/env python\n# ------------------------------------------------------------------------------\n# Programmer(s): Daniel R. Reynolds @ SMU\n# David J. Gardner @ LLNL\n# ------------------------------------------------------------------------------\n# SUNDIALS Copyright Start\n# Copyright (...
[ [ "numpy.linspace", "numpy.reshape", "matplotlib.pyplot.close", "numpy.meshgrid", "numpy.zeros", "numpy.loadtxt", "matplotlib.pyplot.figure" ] ]
Megvii-BaseDetection/GFSD
[ "78c0a938d794584f44d60afab66debd43773d4f7" ]
[ "playground/fsdet/coco/retentive_rcnn/10shot/seed4/modeling/rpn.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom cvpods.modeling.anchor_generator import DefaultAnchorGenerator\nfrom cvpods.modeling.box_regression import Box2BoxTransform\nfrom cvpods.modeling.matcher import Matcher\nfrom cvpods.modeling.proposal_generator.rpn import RPN, StandardRPNH...
[ [ "torch.nn.init.constant_", "torch.nn.Conv2d", "torch.nn.init.normal_" ] ]
Kaslanarian/PythonSVM
[ "715eeef2a245736167addf45a6aee8b40b54d0c7" ]
[ "tests/dataset_classify.py" ]
[ "import numpy as np\nfrom pysvm import LinearSVC, KernelSVC, NuSVC\nfrom sklearn.datasets import load_iris, load_breast_cancer, load_digits, load_wine\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.model_selection import train_test_split\n\nnp.random.seed(2022)\n\nscore = np.zeros((3, 4))\nfor i, l...
[ [ "sklearn.preprocessing.StandardScaler", "numpy.zeros", "sklearn.model_selection.train_test_split", "numpy.random.seed" ] ]
archonic/frankmocap
[ "eebb4591307fb46bfbc53afcf5663e758f686ab6" ]
[ "mocap_utils/geometry_utils.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates.\n\nimport os, sys, shutil\nimport os.path as osp\n# sys.path.append(\"/\")\nimport numpy as np\nimport torch\nfrom torch.nn import functional as F\nimport cv2\nimport numpy.matlib as npm\nimport mocap_utils.geometry_utils_torch as gut\n\n\ndef flip_hand_pose(pose)...
[ [ "numpy.diag", "torch.nn.functional.normalize", "torch.zeros", "torch.einsum", "numpy.matmul", "torch.from_numpy", "torch.stack", "torch.cross" ] ]
GaoZiqiang/Multiview-ObjectDetection
[ "41d28bc15622b4d3a863ba4c8b53b06f6b3b1568" ]
[ "cpp_test/line_chart.py" ]
[ "import matplotlib.pyplot as plt\n\n# 两个数组\nx_data1 = ['1','2','3','4','5']\ny_data1 = [0.2,0.38,0.6,0.801,1]\n\n# k-NN\nx_data2 = ['1','2','3','4','5']\ny_data2 = [0.11,0.25,0.52,0.63,0.87]\n\n# NN\nx_data3 = ['1','2','3','4','5']\ny_data3 = [0.13,0.31,0.57,0.69,0.95]\n\n# Cascade R-CNN\nx_data4 = ['1','2','3','4'...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
upura/commonlitreadabilityprize
[ "5af91d122d7038c5f107fd5d17e024c160a4698d", "5af91d122d7038c5f107fd5d17e024c160a4698d" ]
[ "pl/dataset.py", "working/roberta_large_finetune.py" ]
[ "import pandas as pd\nimport pytorch_lightning as pl\nimport torch\nfrom sklearn.model_selection import KFold\nfrom torch.utils.data import DataLoader, Dataset\nfrom transformers import AutoTokenizer\n\n\nclass TextDataset(Dataset):\n def __init__(\n self,\n df,\n text_col: str,\n tar...
[ [ "pandas.read_csv", "torch.utils.data.DataLoader", "sklearn.model_selection.KFold", "torch.tensor" ], [ "torch.nn.Softmax", "pandas.read_csv", "numpy.random.seed", "torch.cuda.manual_seed", "torch.load", "torch.manual_seed", "torch.utils.data.DataLoader", "torch....
StephenHogg/jax
[ "5c9438864e64c8b02b0e13fce9759d8a8ed3d488" ]
[ "tests/api_test.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 ...
[ [ "numpy.arange", "numpy.eye", "numpy.float16", "numpy.cos", "numpy.ones", "numpy.all", "numpy.sin", "numpy.random.randn", "numpy.shape", "numpy.float32", "numpy.tri", "numpy.exp", "numpy.array", "numpy.zeros", "numpy.random.RandomState" ] ]
liuchenxjtu/Lung_Cancer
[ "fcdaaab44b13dbd9c077470312922f1d640e86b3" ]
[ "convert0.py" ]
[ "#!/usr/bin/env python\n#\n# Copyright 2017 Anil Thomas\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...
[ [ "scipy.ndimage.interpolation.zoom", "pandas.concat", "numpy.random.seed", "numpy.rint", "numpy.random.shuffle", "pandas.DataFrame", "numpy.array", "numpy.zeros", "numpy.sum" ] ]
wuye999/DouZero_For_HLDDZ_FullAuto
[ "11cb3610392fdfcc81b062b73c565b5cb32c2fa3" ]
[ "main.py" ]
[ "# -*- coding: utf-8 -*-\n# Created by: Raf\n# Modify by: Vincentzyx\nimport collections\nimport random\n\nimport PIL\n\nimport GameHelper as gh\nfrom GameHelper import GameHelper\nimport os\nimport sys\nimport time\nfrom threading import Thread\nimport pyautogui\nimport win32gui\nfrom PIL import Image\nimport nump...
[ [ "numpy.asarray" ] ]
MaxInGaussian/VAFnet
[ "618a16abae08a193b94072d5d5ff176f02bb1288" ]
[ "vafnet/util/Optimizer.py" ]
[ "# Copyright 2017 Max W. Y. Lam\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to...
[ [ "numpy.asarray", "numpy.zeros" ] ]
loekgugten/fltk-testbed
[ "9af7b40c877d6f07a1ec24fe078ea379a0152745" ]
[ "fltk/nets/simple.py" ]
[ "import numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\nclass SimpleNet(nn.Module):\n def __init__(self, name=None, created_time=None):\n super(SimpleNet, self).__init__()\n self.created_time = created_time\n self.name = name\n\n def visualize(self, ...
[ [ "torch.nn.Dropout2d", "torch.nn.functional.log_softmax", "torch.nn.functional.dropout", "torch.nn.Conv2d", "torch.nn.Linear", "torch.FloatTensor", "numpy.array" ] ]
NeuronQ/nmlu
[ "f2f37320144a0d41cbdc4afafe1251f759c1841e" ]
[ "nmlu/eda.py" ]
[ "import matplotlib as mpl\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\nimport seaborn as sns\nimport scipy\n\n\ndef set_plot_sane_defaults(mode='classic'):\n set_plot_sizes(sml=12, med=14, big=16)\n # see https://matplotlib.org/gallery/style_sheets/style_sheets_reference.html\n ...
[ [ "scipy.cluster.hierarchy.distance.squareform", "matplotlib.style.use", "matplotlib.pyplot.figure", "numpy.triu_indices_from", "scipy.cluster.hierarchy.dendrogram", "matplotlib.pyplot.rc", "matplotlib.pyplot.subplots", "scipy.cluster.hierarchy.linkage", "scipy.stats.spearmanr", ...
ghelia/deel
[ "6ff67d7246daf12d1884357010dd82842fbc31d1" ]
[ "deel/model/librcnn/proposal_layer.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Mofidied by:\n# Copyright (c) 2016 Shunta Saito\n\n# Original work by:\n# -----------------------------------------------------------------------------\n# Fast R-CNN\n# Copyright (c) 2015 Microsoft\n# Licensed under The MIT License [see fast-rcnn/LICENSE for deta...
[ [ "numpy.hstack", "numpy.arange", "numpy.array", "numpy.meshgrid", "numpy.zeros", "numpy.where" ] ]
Chen-Wang-CUHK/fast_abs_rl
[ "1416fa9ed7b7c35581945c5b455442e3343ecbda" ]
[ "decode_full_model.py" ]
[ "\"\"\" run decoding of rnn-ext + abs + RL (+ rerank)\"\"\"\nimport argparse\nimport json\nimport os\nfrom os.path import join\nfrom datetime import timedelta\nfrom time import time\nfrom collections import Counter, defaultdict\nfrom itertools import product\nfrom functools import reduce\nimport operator as op\n\nf...
[ [ "torch.no_grad", "torch.utils.data.DataLoader", "torch.multiprocessing.Pool", "torch.cuda.is_available" ] ]
rosteen/glue
[ "ed71979f8e0e41f993a2363b3b5a8f8c3167a130" ]
[ "glue/utils/array.py" ]
[ "import warnings\n\nimport numpy as np\nfrom numpy.lib.stride_tricks import as_strided\n\nimport pandas as pd\nimport bottleneck as bt\n\n__all__ = ['unique', 'shape_to_string', 'view_shape', 'stack_view',\n 'coerce_numeric', 'check_sorted', 'broadcast_to', 'unbroadcast',\n 'iterate_chunks', 'co...
[ [ "pandas.merge", "pandas.Series", "numpy.asarray", "numpy.issubdtype", "numpy.cumsum", "numpy.lib.stride_tricks.as_strided", "numpy.moveaxis", "numpy.random.randint", "numpy.arange", "numpy.asanyarray", "numpy.diff", "numpy.zeros", "pandas.to_numeric", "numpy...
Rabrg/OpenNMT-py
[ "6b142fdce81edbb31cffebce89b7dbd93c35a1f8" ]
[ "tools/embeddings_to_torch.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nfrom __future__ import print_function\nfrom __future__ import division\nimport six\nimport sys\nimport numpy as np\nimport argparse\nimport torch\n\n\ndef get_vocabs(dict_file):\n vocabs = torch.load(dict_file)\n\n enc_vocab, dec_vocab = None, None\n\n # the...
[ [ "torch.save", "torch.Tensor", "torch.load" ] ]
RandolphVI/Music-Recommendation
[ "2e5d4e57675ff9a69a7445876bebc242d94b1314" ]
[ "NN/input/training/script/isrc_process.py" ]
[ "import numpy as np\nimport pandas as pd\n\nfrom sklearn.preprocessing import LabelEncoder\n\n## load the data\ntrain = pd.read_csv('../temporal_data/train_id.csv')\ntest = pd.read_csv('../temporal_data/test_id.csv')\nsong = pd.read_csv('../temporal_data/songs_id_cnt.csv')\n\ndata = train[['msno', 'song_id']].appen...
[ [ "sklearn.preprocessing.LabelEncoder", "numpy.log1p", "numpy.isnan", "pandas.read_csv" ] ]
ph09/fogernetes
[ "f766434388ef8cd76e9e909c6f4bef2eb112f642" ]
[ "fodeo/core/central/YOLO/test/test_images.py" ]
[ "# coding='utf-8'\nimport os\nimport sys\nimport numpy as np\nimport time\nimport datetime\nimport json\nimport importlib\nimport logging\nimport shutil\nimport cv2\nimport random\n\nimport matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as patches\nfrom matplotlib.tick...
[ [ "matplotlib.pyplot.gca", "numpy.linspace", "torch.load", "numpy.asarray", "matplotlib.use", "torch.cat", "matplotlib.patches.Rectangle", "matplotlib.pyplot.get_cmap", "torch.from_numpy", "matplotlib.pyplot.subplots", "torch.no_grad", "matplotlib.pyplot.axis", "m...
fethan/LabanotationSuite
[ "fcfbecd92d4eed0fd888e75677c92d669d58662d" ]
[ "GestureAuthoringTools/LabanEditor/src/graphLaban/graphLaban.py" ]
[ "# --------------------------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n# --------------------------------------------------------------------------------------------\n\nimport os\n\nimport matpl...
[ [ "matplotlib.patches.Rectangle", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.subplot2grid", "matplotlib.pyplot.figure" ] ]
luckystar9111/interpret-community
[ "3a4094d3aa516a39dc52d65183f8b1f9aa31a801" ]
[ "test/test_serialize_explanation.py" ]
[ "# ---------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# ---------------------------------------------------------\n\n\"\"\"Tests the Explanation JSON serializer\"\"\"\n\nimport collections.abc\nimport pytest\nimport logging\nimport numpy as np\nim...
[ [ "numpy.testing.assert_array_equal" ] ]
mikegrudic/CrunchSnaps
[ "0a6e3d15f7b682391094517b6b38e36d4173a5bf" ]
[ "src/CrunchSnaps/snapshot_tasks.py" ]
[ "import numpy as np\nfrom mpl_toolkits.axes_grid1 import make_axes_locatable\nfrom matplotlib.colors import LightSource\nfrom meshoid import GridSurfaceDensity as GridSurfaceDensity\nimport aggdraw\nfrom PIL import Image, ImageDraw, ImageFont, ImageChops\nimport matplotlib\nmatplotlib.use('Agg')\nfrom matplotlib im...
[ [ "numpy.sqrt", "numpy.linspace", "matplotlib.pyplot.imread", "numpy.flipud", "matplotlib.pyplot.get_cmap", "numpy.concatenate", "numpy.zeros_like", "numpy.cross", "numpy.clip", "numpy.sin", "numpy.copy", "matplotlib.pyplot.close", "numpy.load", "numpy.repeat"...
kschamplin/astro-classifier-neo
[ "44fcb8ba41ef549c16360df7fd470f56c42da9b3" ]
[ "src/pytorch_test/models/ncde.py" ]
[ "import pytorch_lightning as pl\nimport torch\nimport torchcde\nfrom torch import nn as nn\nfrom torch.nn import functional as F\n\nfrom pytorch_test.plasticc.constants import class_weights_target_list\n\n\nclass NCDEFunction(torch.nn.Module):\n def __init__(self, input_channels, hidden_channels):\n super...
[ [ "torch.nn.Linear", "torch.tensor" ] ]
GLOMICON/emp
[ "c1f752d1ae4c009328bbdcecf9666dbd4dac39b6" ]
[ "legacy/code/tests/test_most_wanted_otus.py" ]
[ "#!/usr/bin/env python\nfrom __future__ import division\n\n__author__ = \"Jai Ram Rideout\"\n__copyright__ = \"Copyright 2012, The QIIME project\"\n__credits__ = [\"Jai Ram Rideout\"]\n__license__ = \"GPL\"\n__version__ = \"1.5.0-dev\"\n__maintainer__ = \"Jai Ram Rideout\"\n__email__ = \"jai.rideout@gmail.com\"\n__...
[ [ "numpy.array" ] ]
cclauss/Pyto
[ "1c4ccc47e3a91e996bf6ec38c527d244de2cf7ed" ]
[ "Pyto/Samples/Pandas Plotting.py" ]
[ "\"\"\"\nAn example of plotting with Pandas.\n\"\"\"\n\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\ndf = pd.DataFrame({\n 'name':['john','mary','peter','jeff','bill','lisa','jose'],\n 'age':[23,78,22,19,45,33,20],\n 'gender':['M','F','M','M','M','F','M'],\n 'state':['california','dc','california','d...
[ [ "matplotlib.pyplot.show", "pandas.DataFrame" ] ]
rudolfwilliam/satellite_image_forecasting
[ "164ee7e533e1a8d730a0ee9c0062fd9b32e0bcdc" ]
[ "drought_impact_forecasting/models/model_parts/Conv_Transformer.py" ]
[ "import numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom einops import rearrange\nfrom .shared import Conv_Block\nfrom ..utils.utils import zeros, mean_cube, last_frame, ENS\n\nclass Residual(nn.Module):\n def __init__(self, fn):\n super().__init__()\n self.fn...
[ [ "torch.concat", "torch.nn.functional.softmax", "torch.sin", "torch.moveaxis", "numpy.power", "torch.nn.ModuleList", "torch.nn.Conv2d", "torch.nn.LayerNorm", "torch.mul", "torch.cuda.is_available", "torch.split", "torch.stack", "torch.cos" ] ]
GQCG-oss/libcint
[ "8bd670bc67ff3fc2d29a3ad6d061555082023661" ]
[ "testsuite/test_cint.py" ]
[ "#!/usr/bin/env python\n# $Id$\n# -*- coding: utf-8\nfrom __future__ import print_function\n\n'''\ntest libcint\n'''\n\n__author__ = \"Qiming Sun <osirpt.sun@gmail.com>\"\n\nimport sys\nimport os\nimport ctypes\nimport numpy\n\n_cint = numpy.ctypeslib.load_library('lib/libcint', '.')\n\n\nPTR_LIGHT_SPEED = 0\nPT...
[ [ "numpy.round", "numpy.array", "numpy.zeros", "numpy.empty", "numpy.ctypeslib.load_library" ] ]
entn-at/pyroomacoustics
[ "6572f6d0cde1a4de8d27caa43a7a67fc0ba91c9a" ]
[ "examples/hmm_training.py" ]
[ "'''\nThis is a simple example of training a Hidden Markov Model.\n\nWe create a random left-right model with a number of states K and emissions of\ndimension O. We sample from this model a number of examples.\n\nThen we train a second models on these examples.\n'''\n\nfrom __future__ import print_function, divisi...
[ [ "numpy.random.choice", "numpy.arange", "numpy.concatenate", "numpy.mean", "numpy.random.uniform", "numpy.sum" ] ]
akleinau/pgmpy
[ "24279929a28082ea994c52f3d165ca63fc56b02b" ]
[ "pgmpy/tests/test_sampling/test_continuous_sampling.py" ]
[ "import sys\nimport unittest\n\nimport numpy as np\n\nfrom pgmpy.factors.distributions import GaussianDistribution as JGD\nfrom pgmpy.sampling import (\n HamiltonianMC as HMC,\n HamiltonianMCDA as HMCda,\n GradLogPDFGaussian,\n NoUTurnSampler as NUTS,\n NoUTurnSamplerDA as NUTSda,\n)\n\n\nclass TestH...
[ [ "numpy.log", "numpy.random.seed", "numpy.linalg.norm", "numpy.testing.assert_almost_equal", "numpy.cov", "numpy.array" ] ]
ScottHoang/ml4c0
[ "e9b7a2a41d217bf0c08388d4d17c23f7c56930c3" ]
[ "baseline/config/agents/config.py" ]
[ "import ecole as ec\nimport numpy as np\n\n\nclass ObservationFunction():\n\n def __init__(self, problem):\n self.problem = problem # to devise problem-specific observations\n\n def before_reset(self, model):\n pass\n\n def extract(self, model, done):\n return None\n\nclass Policy():\...
[ [ "numpy.random.RandomState" ] ]
kalekundert/sgrna_sensor_designs
[ "5b1bbc823810c869d415fd4a428833c709765d54" ]
[ "sgrna_sensor/plate_reader.py" ]
[ "#!/usr/bin/env python3\n\nimport re, nonstdlib\nimport numpy as np\nimport pandas as pd\nfrom openpyxl import load_workbook\n\nclass BiotekExperiment:\n # This file format sucks.\n\n class Parser:\n\n def __init__(self, expt):\n self.expt = expt\n\n def parse_row(self, row):\n ...
[ [ "pandas.DataFrame" ] ]
lgsaber/recurrent-intensity-model-experiments
[ "d56febecbb64c73a912d36e623103657c045d4cc" ]
[ "src/rim_experiments/models/hawkes_poisson.py" ]
[ "import numpy as np, pandas as pd\nimport scipy.optimize\nimport functools\nfrom ..util import ExponentiatedLowRankDataFrame\n\nclass HawkesPoisson:\n \"\"\" intensity is additive function over non-negative states \"\"\"\n def __init__(self, hawkes_model):\n self.hawkes_model = hawkes_model\n\n def ...
[ [ "numpy.log", "numpy.exp", "numpy.zeros", "numpy.vstack" ] ]
akweury/improved_normal_inference
[ "a10ed16f43362c15f2220345275be5c029f31198" ]
[ "common/ResNormalGuided.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.nn.modules.conv import _ConvNd\n\nfrom common.ResNet import ResNet\nfrom common.ResNet import Bottleneck\n\n\n# Normalized Convolution Layer\nclass GConv(_ConvNd):\n def __init__(self, in_channels, out_channels, kernel_size, stride...
[ [ "torch.nn.Conv2d", "torch.cat", "torch.nn.LeakyReLU", "torch.nn.Sigmoid" ] ]
EinfachTuen/waveglow
[ "1a1131365233941db9079c63814afe9fb2f96d07" ]
[ "distributed.py" ]
[ "# *****************************************************************************\n# Copyright (c) 2018, NVIDIA CORPORATION. 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# * Redis...
[ [ "torch.distributed.broadcast", "torch.distributed.init_process_group", "torch.autograd.Variable._execution_engine.queue_callback", "torch.is_tensor", "torch.cuda.is_available", "torch.cuda.device_count", "torch.distributed.all_reduce", "torch.distributed.get_world_size" ] ]
CamilaAlvarez/tensorflow-demo
[ "57f576bafe97054046610ded7a9ce39caa7e84b4" ]
[ "create_database.py" ]
[ "import os\nimport random\nimport argparse\nimport tensorflow as tf\nfrom skimage import transform, io\nimport numpy as np\nimport yaml\nimport logging\n\nparser = argparse.ArgumentParser()\nparser.add_argument('--config', dest='config_file', required=True, help='YAML config file')\nparser.add_argument('--log', des...
[ [ "tensorflow.train.Int64List", "tensorflow.python_io.TFRecordWriter" ] ]