repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
obs145628/dcgan-cuda | [
"215d724c7e4d3561c2f2349a196c86db58ad6a8e",
"215d724c7e4d3561c2f2349a196c86db58ad6a8e",
"215d724c7e4d3561c2f2349a196c86db58ad6a8e",
"215d724c7e4d3561c2f2349a196c86db58ad6a8e",
"215d724c7e4d3561c2f2349a196c86db58ad6a8e"
] | [
"tests/pyts/big_mat_generator.py",
"tests/ref_conv2d_bias_add.py",
"tests/cnn_mnist.py",
"tests/ref_argmax.py",
"tests/tensors_saver.py"
] | [
"import sys\nimport numpy as np\n\noutput = open(sys.argv[1], \"w\")\n\ndef gen_mat(name, m, n=None):\n output.write(\"dbl_t \" + name + \" [] = {\\n\")\n\n np.random.seed(3531354)\n if n:\n mat = np.random.rand(m, n)\n for row in mat:\n output.write(\"\\t\" + \", \".join([str(x) f... | [
[
"numpy.random.rand",
"numpy.random.seed"
],
[
"tensorflow.nn.bias_add",
"tensorflow.Variable",
"tensorflow.global_variables_initializer",
"tensorflow.Session",
"numpy.array"
],
[
"tensorflow.layers.conv2d",
"tensorflow.nn.softmax_cross_entropy_with_logits",
"tensorf... |
MuttData/soam | [
"65612a02552668c6721dc20e675654883391c3e9",
"65612a02552668c6721dc20e675654883391c3e9"
] | [
"soam/workflow/merge_concat.py",
"soam/workflow/time_series_extractor.py"
] | [
"\"\"\"\nMergeConcat\n-----------\nA class to merge or concat dataframes\n\"\"\"\n\nfrom typing import List, Union\n\nimport pandas as pd\nfrom pandas.core.common import maybe_make_list\n\nfrom soam.core import Step\n\n\nclass MergeConcat(Step):\n def __init__(\n self, keys: Union[str, List[str], None] = ... | [
[
"pandas.concat",
"pandas.core.common.maybe_make_list",
"pandas.DataFrame"
],
[
"pandas.to_datetime",
"pandas.DataFrame"
]
] |
geoffreyvd/deer | [
"e24861e4fbfe9c47c4bd2d86be302147665db314"
] | [
"examples/test_CRAR/testing low dim simple maze on desktop cpu/testing_inverse_env_resetting_encoder_bigger_lr_decay/run_simple_maze_transferlearning_encoder.py"
] | [
"\"\"\"Simple maze launcher\n\n\"\"\"\n\nimport sys\nimport logging\nimport numpy as np\nfrom joblib import hash, dump, load\nimport os\n\nfrom deer.default_parser import process_args\nfrom deer.agent import NeuralAgent\nfrom deer.learning_algos.CRAR_keras import CRAR\nfrom simple_maze_env_diff_obs import MyEnv as ... | [
[
"numpy.random.RandomState"
]
] |
simo955/RecSys_2018 | [
"63c0163976457fd23ebcf6b43b09ff8baa9daf68",
"63c0163976457fd23ebcf6b43b09ff8baa9daf68"
] | [
"Approaches/KNN/ItemKNNSimilarityHybridRecommender.py",
"Approaches/KNN/ItemKNNSimilarityHybridRecommender4.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on 15/04/18\n\n\n\"\"\"\n\nfrom Base.Recommender import Recommender\nfrom Base.Recommender_utils import check_matrix, similarityMatrixTopK\nfrom Base.SimilarityMatrixRecommender import SimilarityMatrixRecommender\nfrom sklearn.preprocessing import no... | [
[
"sklearn.preprocessing.normalize"
],
[
"sklearn.preprocessing.normalize"
]
] |
frankibem/cntk-issue | [
"6acd0a3cdd439074ba71186722d06b252d74fc5b"
] | [
"resnet.py"
] | [
"import numpy as np\nfrom cntk.ops import relu, plus\nfrom cntk.initializer import he_normal\nfrom cntk.layers import BatchNormalization, Convolution, MaxPooling, Dropout\n\n\ndef conv_bn(layer_input, filter_size, num_filters, strides, init=he_normal(), name=''):\n \"\"\"\n Returns a convolutional layer follo... | [
[
"numpy.ones_like"
]
] |
JunW15/AdvMT | [
"4ec727199a810cd0b153c2d465b9660641e0f3f1"
] | [
"defences/dp/classification/bert-keras.py"
] | [
"from absl import app\nfrom absl import flags\nimport os\nimport re\nimport numpy as np\nimport string\nimport tensorflow as tf\nimport tensorflow_text\nimport tensorflow_hub as hub\nfrom tensorflow import keras\nfrom pprint import pprint\n\nfrom read_dbpedia import load_dbpedia\nfrom read_imdb import load_imdb\nfr... | [
[
"tensorflow.train.latest_checkpoint",
"tensorflow.config.experimental.set_memory_growth",
"tensorflow.keras.losses.SparseCategoricalCrossentropy",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.Model",
"tensorflow.GradientTape",
"tensorflow.keras.optimizers.Adam",
"tensorflow.c... |
aringlis/afino_release_version | [
"95d7f65827030be53d6fcaf311a8c996c508e3cf"
] | [
"afino/afino_model_fitting.py"
] | [
"#\n# Fit an arbitrary function with a model using maximum likelihood,\n# assuming exponential distributions.\n#\nimport numpy as np\nimport scipy.optimize as op\nfrom scipy.stats import gamma\nfrom scipy.special import gammaincc, gammainccinv\n\n\n#\n# Log likelihood function. In this case we want the product of ... | [
[
"scipy.special.gammaincc",
"scipy.stats.gamma",
"numpy.log",
"scipy.optimize.minimize",
"numpy.float64",
"scipy.special.gammainccinv",
"numpy.sum"
]
] |
grandintegrator/cs285-deeprlcourse-fa19-hw | [
"4abd57eb9da8978b576300b69865e52862e4eaab"
] | [
"homework_fall2019/hw3/cs285/infrastructure/dqn_utils.py"
] | [
"\"\"\"This file includes a collection of utility functions that are useful for\nimplementing DQN.\"\"\"\nimport random\nfrom collections import namedtuple\n\nimport gym\nimport numpy as np\nimport tensorflow as tf\nimport tensorflow.contrib.layers as layers\n\nfrom cs285.infrastructure.atari_wrappers import wrap_d... | [
[
"tensorflow.contrib.layers.convolution2d",
"tensorflow.cast",
"tensorflow.variables_initializer",
"numpy.empty",
"tensorflow.contrib.layers.fully_connected",
"numpy.concatenate",
"tensorflow.clip_by_norm",
"tensorflow.train.ExponentialMovingAverage",
"tensorflow.contrib.layers.... |
zsweet/bert-multitask-learning | [
"7e6bd301904285614549871cff13a67e9c794532"
] | [
"bert_multitask_learning/transformer_decoder.py"
] | [
"import tensorflow as tf\nimport math\nfrom tensor2tensor.utils import beam_search\n\nfrom .bert import modeling\n\n\nclass TransformerDecoder(object):\n def __init__(self, params):\n self.params = params\n\n def get_decoder_self_attention_mask(self, length):\n \"\"\"Calculate bias for decoder t... | [
[
"tensorflow.matmul",
"tensorflow.nn.softmax",
"tensorflow.transpose",
"tensorflow.concat",
"tensorflow.broadcast_to",
"tensorflow.reshape",
"tensorflow.cast",
"tensorflow.expand_dims",
"tensorflow.ones",
"tensorflow.orthogonal_initializer",
"tensorflow.name_scope",
... |
DongjaeJang/Deep-Knowledge-Tracing | [
"aab72939a6cbdfc8b7f11bf074040b48771cbf3f",
"aab72939a6cbdfc8b7f11bf074040b48771cbf3f"
] | [
"keonwoo/scheduler.py",
"myeongsoo/pseudo/dkt/scheduler.py"
] | [
"from torch.optim.lr_scheduler import ReduceLROnPlateau\n\nfrom transformers import get_linear_schedule_with_warmup\n\n\ndef get_scheduler(optimizer, args):\n if args.scheduler == \"plateau\":\n scheduler = ReduceLROnPlateau(\n optimizer, patience=0, factor=0.9, mode=\"max\", verbose=True\n ... | [
[
"torch.optim.lr_scheduler.ReduceLROnPlateau"
],
[
"torch.optim.lr_scheduler.ReduceLROnPlateau"
]
] |
sunlin7/GIMP-ML | [
"c8845ba485123d20e62b033fbec2c759bc65f9c4"
] | [
"gimp-plugins/pytorch-deep-image-matting/tools/loss_draw.py"
] | [
"import re\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom pylab import *\n\n# args: log_name, match_rule, self_log_interval, smooth_log_interation\nloss_file_name = \"simple_loss\"\ntitle = \"{}_Loss\".format(loss_file_name)\nf = open(\"../log/{}.log\".format(loss_file_name))\npattern = re.compile(r'Los... | [
[
"matplotlib.pyplot.title",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlabel",
"numpy.array",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] |
shristov1/DistasterResponse_training | [
"f1dbe1a501072adff58ec667bbe0f5920c48898e"
] | [
"models/train_classifier.py"
] | [
"import sys\nfrom sqlalchemy import create_engine\nimport nltk\nnltk.download(['punkt', 'wordnet', 'averaged_perceptron_tagger'])\n\nimport pandas as pd\nfrom nltk.tokenize import word_tokenize\nfrom nltk.stem import WordNetLemmatizer\n\nfrom sklearn.metrics import classification_report\nfrom sklearn.multioutput im... | [
[
"sklearn.ensemble.RandomForestClassifier",
"pandas.read_sql_table",
"sklearn.model_selection.train_test_split",
"pandas.DataFrame",
"sklearn.feature_extraction.text.CountVectorizer",
"sklearn.feature_extraction.text.TfidfTransformer"
]
] |
adrzystek/TicTacToeAI | [
"dbd76454a3b2ca07dd50b1080fb50e9d9ba3cd51"
] | [
"tests/test_utils.py"
] | [
"import numpy as np\nimport pytest\n\nfrom scripts.utils import check_if_board_is_full, get_winner, negamax, negamax_alpha_beta_pruned\n\nboard0 = np.zeros(shape=(3, 3))\nboard1 = np.array([[-1, 0, 1], [1, 0, 0], [1, -1, -1]])\nboard2 = np.array([[1, 0, 1], [0, 0, 0], [0, -1, -1]])\nboard3 = np.array([[1, -1, -1], ... | [
[
"numpy.array",
"numpy.zeros"
]
] |
SachinKonan/FRC2018Simulator | [
"74ee69f23721ff945fd0c6399b222d47ebd2d516",
"74ee69f23721ff945fd0c6399b222d47ebd2d516"
] | [
"simulator_game.py",
"astar.py"
] | [
"import numpy as np\nimport pygame\nimport sys\nimport os\nfrom collisionutils import *\nfrom colors import *\nfrom utilutils import *\nfrom chassis import AutoPathFollower, RobotDrive\nimport initObstacles\n\nos.chdir(os.path.dirname(os.path.realpath(__file__)))\n\nsize = (1340, 684)\n\ndef allDisplay(obstacles, s... | [
[
"numpy.random.rand",
"numpy.sqrt"
],
[
"numpy.array",
"numpy.zeros",
"numpy.sqrt",
"numpy.ones"
]
] |
xiaoye-hua/recommendation_system | [
"860fcbe221f69030a26e4eee291270922e48e9ee"
] | [
"src/DataPreprocess/XGBoostLRDataProcess.py"
] | [
"# -*- coding: utf-8 -*-\n# @File : XGBoostLRDataProcess.py\n# @Author : Hua Guo\n# @Disc :\nfrom sklearn.preprocessing import OneHotEncoder\nfrom sklearn.base import TransformerMixin, BaseEstimator\nfrom xgboost.sklearn import XGBModel\nfrom copy import deepcopy\nfrom xgboost.sklearn import XGBClassifier\ni... | [
[
"sklearn.preprocessing.OneHotEncoder"
]
] |
orhunguley/unsupervised_object_learning | [
"bae764a7ff3fb77f0050617f19c37fa2d44ed3e2"
] | [
"visualize_results.py"
] | [
"import argparse\nimport os\nimport time\nimport torch\nimport numpy as np\nfrom torch.utils.data import DataLoader\nimport torch.optim\nfrom torch.nn.utils import clip_grad_norm_\nfrom data import TrainStation\nfrom motsynth import MOTSynth, MOTSynthBlackBG\nfrom log_utils import log_summary\nfrom utils import sav... | [
[
"numpy.asarray",
"torch.sigmoid"
]
] |
iwbn/age-joint-loss-tensorflow | [
"0968acd48ae8e87577e7b64e56a25b960589a759"
] | [
"test_joint_morph_id.py"
] | [
"from model.joint import AgeModelMorph\nimport tensorflow as tf\nimport sys, os\nimport numpy as np\n\nflags = tf.app.flags\nFLAGS = flags.FLAGS\n\nflags.DEFINE_string('log_dir', \"path-to-log\", 'Log is saved to this directory.')\nflags.DEFINE_integer('gpu', 4, 'GPU to use.')\n\n\nos.environ[\"CUDA_DEVICE_ORDER\"]... | [
[
"tensorflow.train.get_checkpoint_state",
"tensorflow.ConfigProto",
"tensorflow.global_variables_initializer",
"tensorflow.Session",
"tensorflow.train.Saver"
]
] |
akhalymon-cv/spark | [
"76191b9151b6a7804f8894e53eef74106f98b787",
"76191b9151b6a7804f8894e53eef74106f98b787"
] | [
"python/pyspark/pandas/tests/data_type_ops/test_string_ops.py",
"python/pyspark/mllib/tests/test_feature.py"
] | [
"#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); yo... | [
[
"pandas.concat",
"pandas.api.types.CategoricalDtype",
"pandas.Series",
"pandas.StringDtype",
"pandas.DataFrame"
],
[
"numpy.abs",
"numpy.tile"
]
] |
davegutz/myStateOfCharge | [
"d03dc5e92a9561d4b28be271d4eabe40b48b32ce"
] | [
"SOC_Photon/Battery State/EKF/sandbox/example2.py"
] | [
"# Play with Kalman filters from Kalman-and-Bayesian-Filters-in-Python\n# Press the green button in the gutter to run the script.\n# install packages using 'python -m pip install numpy, matplotlib, scipy, pyfilter\n# References:\n# [2] Roger Labbe. \"Kalman and Bayesian Filters in Python\" -->kf_book\n# https:... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.title",
"matplotlib.pyplot.plot",
"numpy.random.randn",
"numpy.isscalar",
"numpy.array",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
eric-czech/dask-ml | [
"b94c587abae3f5667eff131b0616ad8f91966e7f"
] | [
"dask_ml/_compat.py"
] | [
"import contextlib\nimport os\nfrom collections.abc import Mapping # noqa\nfrom typing import Any, List, Optional, Union\n\nimport dask\nimport dask.array as da\nimport distributed\nimport packaging.version\nimport pandas\nimport sklearn\nimport sklearn.utils.validation\n\nSK_VERSION = packaging.version.parse(skle... | [
[
"sklearn.metrics.check_scoring",
"sklearn.metrics._scorer._check_multimetric_scoring",
"sklearn.utils.validation.check_is_fitted"
]
] |
osamhack2021/WEB_AI_POOL_YD | [
"76022ccd90a5e16f45dd315579a1836c9f2e5f16"
] | [
"ai-backend/cv_summarizer.py"
] | [
"# 텍스트 요약 API\n# KoBART 기반\nimport torch\nfrom kobart import get_kobart_tokenizer\nfrom transformers.models.bart import BartForConditionalGeneration\n\n\ndef load_model():\n model = BartForConditionalGeneration.from_pretrained(\"./kobart_summary\")\n return model\n\n\n# 텍스트 요약\ndef summarize(text_origin):\n ... | [
[
"pandas.read_csv",
"torch.tensor"
]
] |
omidrk/computervisionPanopticToSMPLAuto | [
"b84b60f0ec4ffdb4ae61348919a95f7bb2eab926",
"b84b60f0ec4ffdb4ae61348919a95f7bb2eab926"
] | [
"step3.py",
"lib/smplify/prior.py"
] | [
"from collections import defaultdict\nimport pandas as pd\nimport os\nimport argparse\nimport numpy as np\nimport joblib\n\n\n\n\ndef clean_data(pkl_folder_path, output_path, list_keys = ['pose', 'betas'], pikl_protocol = 4):\n \n df = pd.DataFrame()\n pkl_files = os.listdir(pkl_folder_path)\n data = []... | [
[
"numpy.array",
"numpy.where",
"pandas.DataFrame"
],
[
"numpy.linalg.inv",
"torch.einsum",
"torch.min",
"torch.det",
"torch.argmin",
"numpy.stack",
"torch.tensor",
"torch.exp",
"torch.matmul",
"numpy.linalg.det",
"torch.log",
"torch.stack",
"numpy... |
mgkulik/antibody-pairing | [
"f6f3c73b5a77b8b67d6f82799b6d5843eb214d66"
] | [
"benchmark.py"
] | [
"import pandas as pd\nimport numpy as np\nimport argparse\nfrom sklearn.metrics import accuracy_score, roc_auc_score\n\n\ndef benchmark(predictions_csv, targets_csv):\n \n predictions = pd.read_csv(predictions_csv)['prediction']\n targets = pd.read_csv(targets_csv)['target']\n \n \n acc = accuracy... | [
[
"sklearn.metrics.roc_auc_score",
"pandas.read_csv",
"numpy.where"
]
] |
CareBENT/MinkowskiEngine | [
"25736cce2509d2ede5b47ab4b758cb0e846b828d"
] | [
"examples/modelnet40.py"
] | [
"# Copyright (c) Chris Choy (chrischoy@ai.stanford.edu).\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy of\n# this software and associated documentation files (the \"Software\"), to deal in\n# the Software without restriction, including without limitation the rights to\n# use, co... | [
[
"numpy.sqrt",
"torch.load",
"torch.randperm",
"numpy.asarray",
"torch.utils.data.DataLoader",
"numpy.random.randn",
"torch.cuda.is_available",
"numpy.cross",
"numpy.where",
"torch.nn.CrossEntropyLoss",
"numpy.eye",
"numpy.ceil",
"scipy.linalg.norm",
"numpy.z... |
yamad07/pytorch.sngan_projection | [
"de8da69de19e3ac85b06b675416b06ee2416eeff"
] | [
"links/conditional_batchnorm.py"
] | [
"import torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.nn import init\n\n\nclass ConditionalBatchNorm2d(nn.BatchNorm2d):\n\n \"\"\"Conditional Batch Normalization\"\"\"\n\n def __init__(self, num_features, eps=1e-05, momentum=0.1,\n affine=False, track_running_stats=True):\n ... | [
[
"torch.nn.functional.batch_norm",
"torch.nn.Embedding",
"torch.tensor",
"torch.nn.init.ones_",
"torch.no_grad",
"torch.rand",
"torch.nn.BatchNorm2d",
"torch.nn.init.zeros_"
]
] |
JetBrains-Research/codetracker-data | [
"6fb3900bd3cfe44d900d7fa8e89c7c35818424ed"
] | [
"src/main/plots/util/plots_helper.py"
] | [
"# Copyright (c) 2020 Anastasiia Birillo, Elena Lyulina\n\nimport pandas as pd\n\nfrom src.main.util.consts import ISO_ENCODING\nfrom src.main.util.file_util import tt_file_condition, get_all_file_system_items\n\n\ndef print_all_unique_values_in_file(file: str, column: str) -> None:\n data = pd.read_csv(file, en... | [
[
"pandas.read_csv"
]
] |
MorrowLiam/stock_analysis | [
"47436136efa34944e8906f4c45539fbf630f73cc"
] | [
"Python_Core/risk_models.py"
] | [
"# %% markdown\n# Portfolio Optimization - Risk\n# %% add path\nif __name__ == '__main__' and __package__ is None:\n import sys, os.path\n sys.path\n # append parent of the directory the current file is in\n inputfilename1 = r\"C:\\Users\\Liam Morrow\\Documents\\Onedrive\\Python scripts\\_01 Liam Stock ... | [
[
"numpy.diag",
"numpy.dot",
"pandas.to_datetime",
"numpy.sqrt",
"numpy.nan_to_num",
"pandas.DataFrame",
"numpy.trace",
"matplotlib.pyplot.tight_layout",
"numpy.eye",
"numpy.zeros",
"matplotlib.pyplot.figure",
"numpy.append",
"numpy.identity",
"pandas.date_ran... |
MarisaAlves/class6-notebook | [
"8880dd98b5a973febdeebc6a12fa7ab32f4f6e7b"
] | [
"class6file.py"
] | [
"import os\nimport matplotlib.pyplot as plt\nimport pandas as pd\n\ndiabetes = pd.read_csv(filepath_or_buffer='diabetes.data', sep ='\\t', header=0)\n\nos.makedirs('plots', exist_ok=True)\n\nfig, axes = plt.subplots(2, 1, figsize=(5,5))\n\naxes[0].plot(diabetes['BP'])\naxes[1].plot(diabetes['BP'], diabetes['AGE'])\... | [
[
"matplotlib.pyplot.tight_layout",
"pandas.read_csv",
"matplotlib.pyplot.scatter",
"matplotlib.pyplot.title",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.clf",
"matplotlib.pyplot.close",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
... |
chenwuperth/smworkshop | [
"13738a04d6cdcaf75a4c97b3ca3ed31349a9385f"
] | [
"examples/02/train/train_job.py"
] | [
"\"\"\"\nTrain job interacts with SageMaker using XGB\n\n\"\"\"\n\nimport os\nimport datetime\n\nimport boto3\nimport pandas as pd\nimport numpy as np\nimport sagemaker\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.datasets import load_boston\nfrom sagemaker.amazon.amazon_estimator import get_... | [
[
"sklearn.model_selection.train_test_split",
"pandas.DataFrame",
"sklearn.datasets.load_boston"
]
] |
francescomalandrino/TorchLRP | [
"35b3fa1c98dde0601e72dea3370a9fe191edbd00"
] | [
"examples/utils.py"
] | [
"import sys\nimport pathlib\n# Append parent directory of this file to sys.path, \n# no matter where it is run from\nbase_path = pathlib.Path(__file__).parent.parent.absolute()\nsys.path.insert(0, base_path.as_posix())\n\nimport pickle\nimport os\nimport torch\nimport torch.nn.functional as F\nimport torch.nn as nn... | [
[
"torch.nn.CrossEntropyLoss",
"torch.load",
"torch.utils.data.DataLoader",
"torch.nn.Flatten",
"torch.nn.ReLU"
]
] |
Deech08/dk_manga_tools | [
"98fe33346b4e135f4a0b765737e1e8ddba61d601"
] | [
"dk_manga_tools/DKMaps.py"
] | [
"import logging\nimport warnings\n\nfrom marvin.tools.maps import Maps\n\nimport astropy.units as u\nimport astropy.wcs as wcs\nimport astropy.constants as constants\nfrom astropy.cosmology import WMAP9\n\nimport numpy as np\n\nimport seaborn as sns\nimport matplotlib.pyplot as plt\n\nfrom matplotlib.colors import ... | [
[
"numpy.nanmax",
"numpy.dot",
"numpy.sqrt",
"numpy.nanmin",
"numpy.arctan2",
"numpy.concatenate",
"numpy.all",
"numpy.max",
"numpy.argmin",
"numpy.zeros_like",
"numpy.any",
"numpy.unique",
"numpy.full",
"numpy.std",
"numpy.zeros",
"matplotlib.pyplot.f... |
BrettMontague/LightGBM | [
"3ad9cba0321a8ac2e5f625da6dcc6f7c1516a750"
] | [
"python-package/lightgbm/sklearn.py"
] | [
"# coding: utf-8\n# pylint: disable = invalid-name, W0105, C0111, C0301\n\"\"\"Scikit-learn wrapper interface for LightGBM.\"\"\"\nfrom __future__ import absolute_import\n\nimport numpy as np\nimport warnings\n\nfrom .basic import Dataset, LightGBMError\nfrom .compat import (SKLEARN_INSTALLED, _LGBMClassifierBase,\... | [
[
"numpy.vstack",
"numpy.argmax",
"numpy.multiply"
]
] |
mjacqu/FlatCreekProject | [
"3615501f51279389ef2fc6a97a2859e47a027a8c",
"3615501f51279389ef2fc6a97a2859e47a027a8c"
] | [
"FC_GeologyFigure4.py",
"FC_BulgeSize.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport matplotlib as mpl\nimport VariousFunctions_FC\n\nfc_all = pd.read_csv('/Users/mistral/Documents/CUBoulder/Science/Sulzer/data/meteo/FC_Water_all_Elevations.csv')\n\n#fc_all.plot(x='time', y=[\"2100\",'2200','2300','2400', \"2500\", '2... | [
[
"matplotlib.pyplot.legend",
"pandas.read_csv",
"matplotlib.pyplot.title",
"matplotlib.pyplot.hlines",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.tick_params",
"matplotlib.pyplot.style.use",
"matplotlib.pyplot.ylabel"
... |
realblack0/eft | [
"60d9757c5d7f22c9928c511d76549f086d420e42"
] | [
"demo/demo_bbox_detector.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\n\nimport os\nimport sys\nimport numpy as np\nimport cv2\n\n\nimport torch\nimport torchvision.transforms as transforms\nfrom PIL import Image\n\n##Yolo related\nyolo_path = './PyTorch-YOLOv3'\nsys.path.append(yolo_path)\ntry:\n from models import Darknet\n ... | [
[
"torch.load",
"torch.from_numpy",
"numpy.ones",
"torch.no_grad",
"torch.cuda.is_available",
"torch.device",
"numpy.array"
]
] |
happykbs/udacity-drl-bongsang | [
"4a5f9c0698543cf80e83020d333cb8589a179243"
] | [
"p2_continuous-control/ddpg/ddpg_agent.py"
] | [
"import numpy as np\nimport random\nimport copy\nfrom collections import namedtuple, deque\n\nfrom .model import Actor, Critic\n\nimport torch\nimport torch.nn.functional as F\nimport torch.optim as optim\n\nBUFFER_SIZE = 100000 #int(1e5) # replay buffer size\nBATCH_SIZE = 256 #128 # minibatch size\nGAMMA =... | [
[
"numpy.clip",
"torch.from_numpy",
"numpy.ones",
"torch.nn.functional.mse_loss",
"torch.no_grad",
"torch.cuda.is_available",
"numpy.vstack"
]
] |
zawlin/multi-modal-regression | [
"61aa6c066834ab1373275decc38e361db5c2cf04",
"61aa6c066834ab1373275decc38e361db5c2cf04",
"61aa6c066834ab1373275decc38e361db5c2cf04",
"61aa6c066834ab1373275decc38e361db5c2cf04"
] | [
"learnCategorizationModel.py",
"zl_simplebd.py",
"learnRiemannianBDModel.py",
"learnElhoseinyRegressionModel.py"
] | [
"import torch\nfrom torch import nn, optim\nfrom torch.autograd import Variable\nfrom torch.utils.data import DataLoader\n\nfrom helperFunctions import classes, get_accuracy\nfrom dataGenerators import ImagesAll, TestImages, my_collate\nfrom featureModels import resnet_model\n\nimport numpy as np\nimport scipy.io a... | [
[
"torch.nn.CrossEntropyLoss",
"torch.optim.lr_scheduler.LambdaLR",
"torch.utils.data.DataLoader",
"numpy.concatenate",
"torch.nn.Linear",
"scipy.io.savemat",
"torch.argmax"
],
[
"torch.nn.MSELoss",
"torch.nn.CrossEntropyLoss",
"torch.max",
"torch.cat",
"torch.uti... |
vikaskurapati/pysph | [
"3e14c7d25d7d4726b6e5b69d4ba4db4fcc38ab6f"
] | [
"pysph/base/tests/test_nnps.py"
] | [
"\"\"\"unittests for the serial NNPS\n\nYou can run the tests like so:\n\n $ pytest -v test_nnps.py\n\"\"\"\nimport numpy\nfrom numpy import random\n\n# PySPH imports\nfrom pysph.base.point import IntPoint, Point\nfrom pysph.base.utils import get_particle_array\nfrom pysph.base import nnps\nfrom compyle.config i... | [
[
"numpy.random.random",
"numpy.ones_like",
"numpy.random.seed",
"numpy.linspace",
"numpy.meshgrid",
"numpy.arange",
"numpy.min",
"numpy.cumsum",
"numpy.all",
"numpy.max",
"numpy.random.uniform",
"numpy.zeros_like",
"numpy.ravel",
"numpy.array"
]
] |
macrosynergy/macrosynergy | [
"6806573c21fb8035cbbdf2a3c591fe4de80fb18f",
"6806573c21fb8035cbbdf2a3c591fe4de80fb18f"
] | [
"macrosynergy/panel/view_correlations.py",
"macrosynergy/management/shape_dfs.py"
] | [
"import numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nfrom typing import List, Union, Tuple\n\nfrom macrosynergy.management.simulate_quantamental_data import make_qdf\nfrom macrosynergy.management.check_availability import reduce_df\n\n\ndef correl_matrix(df: pd.DataFrame... | [
[
"matplotlib.pyplot.show",
"numpy.ones_like",
"matplotlib.pyplot.subplots",
"pandas.DataFrame"
],
[
"pandas.to_datetime",
"pandas.DataFrame"
]
] |
BrefCool/SimpleImgClassifier | [
"f8839aa9d52bf0a4dcfe61e824955ed1e2d6de9f"
] | [
"model.py"
] | [
"import tensorflow as tf\r\nimport tensorflow as tf\r\nimport tensorflow.contrib as tfcontrib\r\nfrom tensorflow.python import keras\r\nfrom tensorflow.python.keras import layers\r\nfrom tensorflow.python.keras import losses\r\nfrom tensorflow.python.keras import models\r\nfrom tensorflow.python.keras import backen... | [
[
"tensorflow.python.keras.layers.BatchNormalization",
"tensorflow.python.keras.layers.Activation",
"tensorflow.python.keras.layers.Flatten",
"tensorflow.python.keras.layers.MaxPooling2D",
"tensorflow.python.keras.layers.concatenate",
"tensorflow.python.keras.layers.Dense",
"tensorflow.r... |
CognitiveDave/e2eSensorNetwork | [
"81fc5405563809def7b7fdd6fbf8b6276185b634"
] | [
"Sensors_MongoAgg.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\n# In[1]:\n\n\nfrom pymongo import MongoClient\nimport os\nimport json\nfrom bson.json_util import dumps\nimport datetime\n\n\ndbuser = \"\"\n_id = \"\"\ndbpassword = \"\"\n\nuri = f\"mongodb://{dbuser}:{dbpassword}@ds043972.mlab.com:43972/{_id}\"\n \nstable = {\n 'Ox... | [
[
"pandas.DatetimeIndex",
"pandas.to_datetime",
"pandas.DataFrame"
]
] |
trentford/iem | [
"7264d24f2d79a3cd69251a09758e6531233a732f",
"7264d24f2d79a3cd69251a09758e6531233a732f",
"7264d24f2d79a3cd69251a09758e6531233a732f",
"7264d24f2d79a3cd69251a09758e6531233a732f",
"7264d24f2d79a3cd69251a09758e6531233a732f",
"7264d24f2d79a3cd69251a09758e6531233a732f"
] | [
"scripts/prism/ingest_prism.py",
"htdocs/frost/frost_ts.py",
"htdocs/plotting/auto/scripts/p13.py",
"htdocs/plotting/auto/scripts100/p193.py",
"scripts/iemre/stage4_12z_adjust.py",
"htdocs/plotting/auto/scripts/p74.py"
] | [
"\"\"\"Ingest the PRISM data into a local yearly netCDF file\n\n1. Download from their FTP site\n2. Unzip into /mesonet/tmp\n3. Open the actual BIL file with rasterio\n4. Copy data into netcdf file\n5. Cleanup\n\n\"\"\"\nfrom __future__ import print_function\nimport sys\nimport datetime\nimport os\nimport subproces... | [
[
"numpy.flipud"
],
[
"numpy.argmin"
],
[
"scipy.stats.linregress",
"numpy.array",
"pandas.Series",
"numpy.average"
],
[
"numpy.arange",
"numpy.max"
],
[
"scipy.interpolate.NearestNDInterpolator",
"numpy.ravel",
"numpy.meshgrid",
"numpy.where",
"nu... |
Swall0w/clib | [
"46f659783d5a0a6ec5994c3c707c1cc8a7934385"
] | [
"clib/converts/format_image_size.py"
] | [
"import numpy as np\nfrom skimage.transform import resize as imresize\n\n\ndef batch(batch):\n format_size = batch[0][0].shape[1]\n format_batch = []\n\n for index, item in enumerate(batch):\n original_image = item[0]\n transpose_image = np.transpose(original_image, (1, 2, 0))\n resize... | [
[
"numpy.maximum",
"numpy.minimum",
"numpy.transpose"
]
] |
alejandro-ariza/scikit-fda | [
"a3626eeaac81aac14660233ff7554ae9a1550434",
"a3626eeaac81aac14660233ff7554ae9a1550434"
] | [
"skfda/preprocessing/registration/_shift_registration.py",
"skfda/representation/basis/_bspline.py"
] | [
"\"\"\"Class to apply Shift Registration to functional data\"\"\"\n\n# Pablo Marcos Manchón\n# pablo.marcosm@protonmail.com\n\nfrom scipy.integrate import simps\nfrom sklearn.utils.validation import check_is_fitted\n\nimport numpy as np\n\nfrom ... import FData, FDataGrid\nfrom ..._utils import constants, check_is_... | [
[
"numpy.square",
"sklearn.utils.validation.check_is_fitted",
"numpy.abs",
"numpy.multiply",
"numpy.linspace",
"numpy.asarray",
"numpy.min",
"numpy.divide",
"numpy.subtract",
"numpy.dtype",
"numpy.ones",
"numpy.max",
"numpy.atleast_2d",
"numpy.outer",
"num... |
das-projects/deepOCR | [
"ffc6db691605b7b4837da9619ab6e918fa1c18de",
"ffc6db691605b7b4837da9619ab6e918fa1c18de",
"ffc6db691605b7b4837da9619ab6e918fa1c18de"
] | [
"deepocr/datasets/ic13.py",
"deepocr/utils/metrics.py",
"deepocr/io/image/base.py"
] | [
"# Copyright (C) 2022, Arijit Das.\n# Code adapted from doctr and huggingface\n# This program is licensed under the Apache License version 2.\n# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.\n\nimport csv\nimport os\nfrom pathlib import Path\nfrom typing import Any... | [
[
"numpy.array"
],
[
"numpy.split",
"numpy.maximum",
"numpy.minimum",
"numpy.clip",
"numpy.logical_or",
"scipy.optimize.linear_sum_assignment",
"numpy.logical_and",
"numpy.zeros",
"numpy.where"
],
[
"numpy.frombuffer"
]
] |
rajsemlawat02/NER-using-Deep-Learning | [
"56f9248e890b579eb1a93352fb7420fd2a137c83",
"56f9248e890b579eb1a93352fb7420fd2a137c83"
] | [
"Task 3: Hindi data/process_data.py",
"Task 3: Hindi data/get_word_vectors.py"
] | [
"import numpy as np\nfrom keras.preprocessing import sequence\n# For getting English word vectors\nfrom get_word_vectors import get_word_vector, get_sentence_vectors\nimport codecs\n\n\nclass DataHandler():\n\t\"\"\"\n\tClass for handling all data processing and preparing training/testing data\"\"\"\n\n\tdef __init... | [
[
"numpy.array",
"numpy.zeros",
"numpy.argmax"
],
[
"numpy.zeros"
]
] |
gtesei/fast-furious | [
"b974e6b71be92ad8892864794af57631291ebac1",
"b974e6b71be92ad8892864794af57631291ebac1",
"b974e6b71be92ad8892864794af57631291ebac1",
"b974e6b71be92ad8892864794af57631291ebac1",
"b974e6b71be92ad8892864794af57631291ebac1",
"b974e6b71be92ad8892864794af57631291ebac1"
] | [
"competitions/deloitte/base3_dev1_no_outlier.py",
"competitions/deloitte/base4.py",
"dataset/images2/simple_classification.py",
"dataset/images2/serializerDogsCatsSURF_Train.py",
"competitions/jigsaw-toxic-comment-classification-challenge/gru9___all_data.py",
"competitions/quora-question-pairs/pv.py"
] | [
"import numpy as np \nimport pandas as pd \nimport matplotlib.pyplot as plt\nfrom sklearn.preprocessing import LabelEncoder\nimport re \nfrom sklearn.feature_extraction import DictVectorizer\nfrom sklearn.model_selection import train_test_split\nimport xgboost as xgb\nfrom sklearn.cluster import MiniBatchKMeans\n\n... | [
[
"pandas.concat",
"pandas.read_csv",
"pandas.merge",
"pandas.to_datetime",
"sklearn.model_selection.train_test_split",
"pandas.DataFrame",
"sklearn.feature_extraction.DictVectorizer",
"sklearn.cluster.MiniBatchKMeans",
"sklearn.preprocessing.LabelEncoder"
],
[
"pandas.co... |
gmooers96/CBRAIN-CAM | [
"c5a26e415c031dea011d7cb0b8b4c1ca00751e2a",
"c5a26e415c031dea011d7cb0b8b4c1ca00751e2a"
] | [
"MAPS/Latant_Space_Constrained_VAEs/sample_stats_constrained_squared.py",
"MAPS/autoencoder/ae_metrics.py"
] | [
"import argparse \nimport json \n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.ticker as ticker\n\nimport keras\nfrom keras import layers\nfrom keras import backend as K\nimport tensorflow as tf \n\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.decomposition import PCA \n... | [
[
"matplotlib.pyplot.legend",
"numpy.expand_dims",
"numpy.linspace",
"numpy.asarray",
"numpy.squeeze",
"tensorflow.cast",
"numpy.concatenate",
"sklearn.manifold.TSNE",
"numpy.max",
"numpy.exp",
"numpy.where",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.gr... |
twicoder/BigDL | [
"ef4f4137965147e2bc59e41f40c4acbb50eeda97"
] | [
"spark/dl/src/test/resources/tf/models/alexnet.py"
] | [
"#\n# Copyright 2016 The BigDL Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law ... | [
[
"tensorflow.set_random_seed",
"tensorflow.random_uniform",
"tensorflow.get_default_graph",
"tensorflow.identity"
]
] |
trejsu/shaper | [
"03837d80f5818f807067dae51afd8b8180971d0e"
] | [
"experiments/classify.py"
] | [
"import argparse\nimport logging\nimport os\nfrom pathlib import Path\n\nimport pandas as pd\n\nARGS = None\n\nlogging.basicConfig(level=logging.INFO)\nlog = logging.getLogger(__name__)\n\nCURRENT_DIR = os.path.dirname(os.path.abspath(__file__))\n\nCLASSIFY_COMMANDS_PATH = os.path.join(str(Path.home()), 'classify-c... | [
[
"pandas.read_csv"
]
] |
stratosGithub/COCO-GAN | [
"727674a6ff20114cd432971f309a2d4115ef4b0d"
] | [
"trainer.py"
] | [
"import os\nimport time\nimport tensorflow as tf\nimport numpy as np\nfrom numpy import sin, cos\n\n\nNO_REDUCTION = tf.losses.Reduction.NONE\n\nclass Trainer():\n def __init__(self, sess, config, real_images, \n g_builder, d_builder, cp_builder, zp_builder, \n coord_handler, patc... | [
[
"numpy.expand_dims",
"tensorflow.concat",
"tensorflow.control_dependencies",
"numpy.concatenate",
"tensorflow.losses.absolute_difference",
"tensorflow.train.AdamOptimizer",
"tensorflow.greater",
"tensorflow.get_collection",
"tensorflow.gradients",
"tensorflow.stop_gradient"... |
lin-bo/RL_back2depot_VRP | [
"2a159d1df221ff314d98d79b8fde2b739a454ff7",
"2a159d1df221ff314d98d79b8fde2b739a454ff7"
] | [
"solver/am_vrp_solver.py",
"solver/absolver.py"
] | [
"import numpy as np\nfrom prob import VRPDGLDataset\nfrom dgl.dataloading import GraphDataLoader\nimport torch\nfrom attention_model.attention_utils.functions import load_routing_agent\nfrom solver.absolver import ABSolver\n\n\nclass amVRP:\n\n def __init__(self, size=20, method=\"greedy\"):\n \"\"\"\n ... | [
[
"torch.cuda.is_available"
],
[
"numpy.random.seed"
]
] |
briandersn/minigo | [
"a3e1df9cc9802b224db6092257245e38e10aa746",
"a3e1df9cc9802b224db6092257245e38e10aa746"
] | [
"tests/test_coords.py",
"tests/test_strategies.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# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ... | [
[
"numpy.ndindex"
],
[
"numpy.ones",
"numpy.all",
"numpy.max",
"numpy.argmax",
"numpy.array",
"numpy.sum"
]
] |
7CD/LambdaMART | [
"830f0d6824dbf538ff3eacd0c0d38381d6c73085",
"830f0d6824dbf538ff3eacd0c0d38381d6c73085"
] | [
"src/pipelines/train.py",
"src/pipelines/data_split.py"
] | [
"import argparse\nimport joblib\nimport os\nimport numpy as np\nfrom scipy.sparse import save_npz, load_npz\nimport yaml\n\nfrom src.ranking.model import LambdaMART\n\n\ndef train_model(config_path):\n config = yaml.safe_load(open(config_path))\n \n n_trees = config['train']['max_depth']\n max_depth = c... | [
[
"numpy.load",
"scipy.sparse.load_npz"
],
[
"numpy.load",
"scipy.sparse.save_npz",
"scipy.sparse.load_npz",
"numpy.save"
]
] |
dSandley20/KomputeParticles | [
"099073c6db4b5345e80eaaebe97d97e0f8256849"
] | [
"python/test/test_logistic_regression.py"
] | [
"import pyshader as ps\nimport numpy as np\nimport kp\n\ndef test_logistic_regression():\n\n @ps.python2shader\n def compute_shader(\n index = (\"input\", \"GlobalInvocationId\", ps.ivec3),\n x_i = (\"buffer\", 0, ps.Array(ps.f32)),\n x_j = (\"buffer\", 1, ps.Array(p... | [
[
"numpy.array"
]
] |
HalcyonBravado/Pydpm | [
"17829ac21ecba754fd36a2ab3cea7186b84fca60"
] | [
"pydpm/example/Sampler_Demo.py"
] | [
"from pydpm._sampler import Basic_Sampler\r\n\r\nimport numpy as np\r\n\r\n\r\ndef debug_sampler_and_plot():\r\n import numpy as np\r\n import matplotlib.pyplot as plt\r\n import seaborn as sns\r\n import scipy.stats as stats\r\n from collections import Counter\r\n\r\n sampler = Basic_Sampler('gpu... | [
[
"matplotlib.pyplot.title",
"matplotlib.pyplot.scatter",
"numpy.linspace",
"matplotlib.pyplot.figure",
"numpy.random.gumbel",
"numpy.arange",
"numpy.min",
"numpy.ones",
"numpy.max",
"scipy.stats.multinomial",
"scipy.stats.hypergeom",
"scipy.stats.zipf",
"scipy.st... |
mufeili/deep_gcns_torch | [
"54c88d7a8923b5210797a5bf1a0d749448ba9f9f",
"54c88d7a8923b5210797a5bf1a0d749448ba9f9f",
"54c88d7a8923b5210797a5bf1a0d749448ba9f9f",
"54c88d7a8923b5210797a5bf1a0d749448ba9f9f"
] | [
"examples/ogb/ogbn_proteins/main.py",
"examples/sem_seg_sparse/architecture.py",
"examples/ogb/ogbn_arxiv/model.py",
"eff_gcn_modules/rev/rev_layer.py"
] | [
"import __init__\nimport torch\nimport torch.optim as optim\nimport statistics\nfrom dataset import OGBNDataset\nfrom model import DeeperGCN\nfrom args import ArgsInit\nimport time\nimport numpy as np\nfrom ogb.nodeproppred import Evaluator\nfrom utils.ckpt_util import save_ckpt\nfrom utils.data_util import interse... | [
[
"torch.LongTensor",
"torch.Tensor",
"torch.cat",
"numpy.random.shuffle",
"torch.nn.BCEWithLogitsLoss",
"torch.no_grad",
"torch.cuda.is_available",
"torch.device"
],
[
"torch.cuda.synchronize",
"torch.cuda.manual_seed",
"torch.cat",
"torch.manual_seed",
"torc... |
ersilia-os/cidrz-e2e-linkage | [
"840581cdb90617f3ceb1be898992f0a8df71f9e3"
] | [
"e2elink/steps/score/score.py"
] | [
"import os\nimport json\nimport numpy as np\n\nfrom ... import logger\nfrom .train.train import ModelTrainer\nfrom .ensemble.ensemble import ModelEnsembler\nfrom ..setup.setup import Session\nfrom ..compare.compare import Comparison\n\n\nclass Score(object):\n def __init__(self, score=None, meta=None):\n ... | [
[
"numpy.load",
"numpy.array",
"numpy.average",
"numpy.save"
]
] |
bpaniagua/MFSDA_Python | [
"d7e439fe670d5e2731c9ec722919a74f67b01e30"
] | [
"MFSDA/MFSDA_run.py"
] | [
"#!/usr/bin/env python-real\n# -*- coding: utf-8 -*-\n\"\"\"\nRun script: multivariate functional shape data analysis (MFSDA).\n\nAuthor: Chao Huang (chaohuang.stat@gmail.com)\nLast update: 2017-08-14\n\"\"\"\n\nimport sys,os\nsys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)),os.path.join('Re... | [
[
"numpy.array"
]
] |
jthorn22/tensorflow | [
"bdd76e2f04b17512d5c64a294975e7feb1231fab"
] | [
"tensorflow/python/keras/engine/base_layer.py"
] | [
"# Copyright 2015 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.ops.array_ops.shape",
"tensorflow.python.util.tf_inspect.getfullargspec",
"tensorflow.python.keras.backend.batch_get_value",
"tensorflow.python.keras.utils.generic_utils.to_list",
"tensorflow.python.keras.backend.placeholder",
"tensorflow.python.keras.regularizers.get",
... |
dnabanita7/PySyft | [
"ce2510e65f5bad382e88806bcde30fa38c3c76c4",
"ce2510e65f5bad382e88806bcde30fa38c3c76c4",
"6477f64b63dc285059c3766deab3993653cead2e",
"6477f64b63dc285059c3766deab3993653cead2e"
] | [
"src/syft/lib/torch/module.py",
"src/syft/lib/pandas/__init__.py",
"tests/syft/core/store/storable_object_test.py",
"tests/syft/core/node/common/action/function_or_constructor_action_test.py"
] | [
"# stdlib\nimport ast\nfrom collections import OrderedDict\nimport copy\nimport os\nfrom pathlib import Path\nimport sys\nfrom typing import Any\nfrom typing import Dict\nfrom typing import List\nfrom typing import Optional\nfrom typing import Tuple\nfrom typing import Union\n\n# third party\nimport torch\n\n# syft... | [
[
"torch.load",
"torch.save"
],
[
"pandas.__version__.split"
],
[
"torch.Tensor"
],
[
"torch.tensor"
]
] |
pjkundert/wikienergy | [
"ac3a13780bccb001c81d6f8ee27d3f5706cfa77e",
"ac3a13780bccb001c81d6f8ee27d3f5706cfa77e",
"ac3a13780bccb001c81d6f8ee27d3f5706cfa77e"
] | [
"proto/pylearn2/make_fake_ac_dataset.py",
"disaggregator/build/pandas/pandas/tseries/converter.py",
"disaggregator/build/pandas/pandas/core/series.py"
] | [
"import pylearn2\nimport pylearn2.datasets as ds\nimport numpy as np\nfrom hmmlearn import hmm\nimport os\nimport pickle\n\ndef build_dataset(model,num_samples,sample_length,label_index,num_classes):\n all_data = []\n all_labels = []\n for i in range(num_samples):\n data,labels = model.sample(sample... | [
[
"numpy.array",
"numpy.zeros",
"numpy.random.shuffle"
],
[
"pandas.core.common.is_integer_dtype",
"matplotlib.dates.AutoDateFormatter.__init__",
"matplotlib.ticker.AutoLocator",
"pandas.tseries.frequencies.get_freq",
"matplotlib.transforms.nonsingular",
"matplotlib.dates.Dat... |
altair-viz/altair-transform | [
"b65bf854de1e80f931e063d8fb2ec938773826fb",
"b65bf854de1e80f931e063d8fb2ec938773826fb"
] | [
"altair_transform/transform/fold.py",
"altair_transform/transform/tests/test_quantile.py"
] | [
"import altair as alt\nimport pandas as pd\nfrom .visitor import visit\n\n\n@visit.register(alt.FoldTransform)\ndef visit_fold(transform: alt.FoldTransform, df: pd.DataFrame) -> pd.DataFrame:\n transform = transform.to_dict()\n fold = transform[\"fold\"]\n var_name, value_name = transform.get(\"as\", (\"ke... | [
[
"pandas.merge"
],
[
"numpy.arange",
"numpy.random.RandomState",
"numpy.quantile",
"pandas.testing.assert_frame_equal"
]
] |
PaulLerner/pyannote-audio | [
"06f76a2c5a37c79cf42710167c7b7404658879d3"
] | [
"pyannote/audio/labeling/tasks/base.py"
] | [
"#!/usr/bin/env python\n# encoding: utf-8\n\n# The MIT License (MIT)\n\n# Copyright (c) 2018-2020 CNRS\n\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, includin... | [
[
"numpy.random.random",
"torch.nn.functional.nll_loss",
"numpy.random.shuffle",
"torch.tensor",
"numpy.ceil",
"torch.nn.functional.mse_loss",
"torch.nn.functional.binary_cross_entropy",
"numpy.array",
"numpy.sum"
]
] |
Lijun-Yu/pytorch-lightning | [
"4dc4c8cfa5b1bcc8732036f889eb54455cc97e36",
"4dc4c8cfa5b1bcc8732036f889eb54455cc97e36"
] | [
"pytorch_lightning/trainer/data_loading.py",
"pytorch_lightning/accelerators/ddp_base_backend.py"
] | [
"# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law... | [
[
"torch.distributed.barrier",
"torch.utils.data.SequentialSampler",
"torch.utils.data.distributed.DistributedSampler"
],
[
"torch.distributed.all_reduce",
"torch.cuda.empty_cache",
"torch.distributed.barrier",
"torch.cuda.amp.autocast"
]
] |
jengvi/trimesh | [
"aeefe89a27ae17c3f4d6286b9a2ba1623329a286",
"aeefe89a27ae17c3f4d6286b9a2ba1623329a286",
"aeefe89a27ae17c3f4d6286b9a2ba1623329a286"
] | [
"tests/generic.py",
"trimesh/exchange/dae.py",
"trimesh/viewer/windowed.py"
] | [
"# flake8: noqa\n\"\"\"\nModule which contains most imports and data unit tests\nmight need, to reduce the amount of boilerplate.\n\"\"\"\nfrom trimesh.base import Trimesh\nfrom trimesh.constants import tol, tol_path\nfrom collections import deque\nfrom copy import deepcopy\nimport collections\nimport trimesh\nfrom... | [
[
"numpy.linspace",
"numpy.append",
"numpy.array",
"numpy.random.RandomState",
"numpy.isclose"
],
[
"numpy.dot",
"numpy.sqrt",
"numpy.arange",
"numpy.eye",
"numpy.ones",
"numpy.append",
"numpy.zeros"
],
[
"numpy.linalg.inv",
"numpy.dot",
"numpy.arr... |
AI-Companion/ds-gear | [
"66e029b786579eaed337f51302f0ee34e9551089"
] | [
"dsg/CNN_classifier.py"
] | [
"import os\nimport pickle\nimport re\nimport subprocess\nimport time\nfrom itertools import compress\nimport numpy as np\nfrom cv2 import cv2\nfrom keras.applications.vgg16 import VGG16\nfrom keras.models import Model, load_model\nfrom keras.layers import Dense, Flatten, Dropout, BatchNormalization\nfrom keras.util... | [
[
"numpy.asarray",
"sklearn.model_selection.train_test_split",
"pandas.DataFrame",
"numpy.argmax",
"sklearn.metrics.classification_report"
]
] |
aerdem4/lofo-importance | [
"c3648b0421cc304ed4f3f2ebcbe962d70b9708fe"
] | [
"lofo/utils.py"
] | [
"import multiprocessing\nimport pandas as pd\n\n\ndef lofo_to_df(lofo_scores, feature_list):\n importance_df = pd.DataFrame()\n importance_df[\"feature\"] = feature_list\n importance_df[\"importance_mean\"] = lofo_scores.mean(axis=1)\n importance_df[\"importance_std\"] = lofo_scores.std(axis=1)\n\n f... | [
[
"pandas.DataFrame"
]
] |
nikbaya/split | [
"fb65c01cb6807a8b161fc3b1f25e3ddd90e89f62"
] | [
"python/compare_sumstats.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Nov 27 13:15:22 2018\n\nUsed to generate QQ plots of rg split sumstats.\n\n@author: nbaya\n\"\"\"\n\nimport hail as hl\nimport pandas as pd\nimport numpy as np\nimport scipy.stats as stats\nimport matplotlib.pyplot as plt\n\nsplitA = hl.import... | [
[
"numpy.linspace",
"matplotlib.pyplot.gcf",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.subplot",
"numpy.mean"
]
] |
LauZyHou/sklearn-STS | [
"8dd90a8fcf37094ea03f06fa10ce74dcf2d57dd3"
] | [
"supervised_learning/generalized_linear_model/Ridge.py"
] | [
"from sklearn import linear_model\n\nif __name__ == '__main__':\n \"\"\"ridge regression\"\"\"\n reg = linear_model.Ridge(alpha=0.5)\n reg.fit([[0, 0], [0, 0], [1, 1]], [0, .1, 1])\n print(reg.coef_)\n \"\"\" Generalized Cross-Validation\"\"\"\n reg = linear_model.RidgeCV(alphas=[0.1, 1.0, 10.0])\... | [
[
"sklearn.linear_model.RidgeCV",
"sklearn.linear_model.Ridge"
]
] |
alexis-roche/nipy | [
"b765f258621c886538b77115128511cdfd4600fe"
] | [
"nipy/algorithms/diagnostics/tsdiffplot.py"
] | [
"# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n''' plot tsdiffana parameters '''\nfrom __future__ import absolute_import\n\nimport numpy as np\n\nimport nipy\nfrom .timediff import time_slice_diffs\n\nfrom nipy.externals.six import string_types\n... | [
[
"numpy.deprecate_with_doc",
"numpy.min",
"numpy.arange",
"numpy.max",
"matplotlib.pyplot.subplot",
"numpy.mean",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
Neovairis/tensorpack | [
"d7a13cb74c9066bc791d7aafc3b744b60ee79a9f",
"d7a13cb74c9066bc791d7aafc3b744b60ee79a9f",
"242dc71cafb9642e68a2bfb58bcf6ad45ccbb35c"
] | [
"tensorpack/graph_builder/training.py",
"examples/PennTreebank/PTB-LSTM.py",
"tensorpack/tfutils/symbolic_functions.py"
] | [
"# -*- coding: utf-8 -*-\n# File: training.py\n\nimport copy\nimport pprint\nimport re\nfrom abc import ABCMeta, abstractmethod\nfrom contextlib import contextmanager\nimport six\nimport tensorflow as tf\nfrom six.moves import range, zip\n\nfrom ..compat import tfv1\nfrom ..tfutils.common import get_tf_version_tupl... | [
[
"tensorflow.device",
"tensorflow.test.is_built_with_cuda",
"tensorflow.global_variables",
"tensorflow.local_variables",
"tensorflow.get_variable_scope",
"tensorflow.train.replica_device_setter",
"tensorflow.name_scope",
"tensorflow.trainable_variables",
"tensorflow.group"
],
... |
Achazwl/cpm_kernels | [
"926d06461ad460dc8e80a66239328739eed16618",
"926d06461ad460dc8e80a66239328739eed16618"
] | [
"tests/test_arith.py",
"cpm_kernels/torch/arith.py"
] | [
"import cpm_kernels.torch as ct\nimport cpm_kernels.kernels as ck\nimport torch\nimport unittest\nimport random\n\nclass TestArith(unittest.TestCase):\n def test_global_scale(self):\n with torch.cuda.device(3):\n for shape in [\n (3, 5, 6),\n (17, 32, 128),\n ... | [
[
"torch.randn_like",
"torch.empty",
"torch.cuda.current_stream",
"torch.randn",
"torch.cuda.device",
"torch.isclose"
],
[
"torch.cuda.current_stream",
"torch.empty"
]
] |
jreback/blaze | [
"85c39335cac4ef7f2921a7f621bc13525880fc44"
] | [
"blaze/compute/numpy.py"
] | [
"from __future__ import absolute_import, division, print_function\n\nimport datetime\n\nimport numpy as np\nfrom pandas import DataFrame, Series\nfrom datashape import to_numpy\n\nfrom ..expr import Reduction, Field, Projection, Broadcast, Selection, ndim\nfrom ..expr import Distinct, Sort, Head, Label, ReLabel, Ex... | [
[
"pandas.notnull",
"numpy.unique",
"numpy.issubdtype",
"numpy.sort",
"numpy.ones",
"numpy.prod",
"numpy.array",
"numpy.empty"
]
] |
MonitSharma/Computational-Methods-in-Physics | [
"e3b2db36c37dd5f64b9a37ba39e9bb267ba27d85",
"e3b2db36c37dd5f64b9a37ba39e9bb267ba27d85",
"e3b2db36c37dd5f64b9a37ba39e9bb267ba27d85"
] | [
"PSET2/P2/RK4.py",
"PSET1/Exercise/Lecture 2/runge_kutta_fehlberg.py",
"PSET3/P1 & P2/leap2.py"
] | [
"import math\r\nimport time # import time to use for performance analysis\r\nimport numpy as np # import numpy for array space\r\nimport matplotlib.pyplot as plt # import matplotlib for graphing functions\r\nfrom scipy.integrate import odeint # import scipy to use the o... | [
[
"matplotlib.pyplot.legend",
"numpy.abs",
"matplotlib.pyplot.title",
"numpy.linspace",
"matplotlib.pyplot.savefig",
"scipy.integrate.odeint",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.ylabel"
],
[
"matplotlib.pyplot.legend",
"matplotlib... |
danmalowany/trains-model-zoo | [
"2091100057afae9593b18ddcefd81b7d46724a96"
] | [
"models/detection/SSD/priorbox_optimization/priors_optimization_utils.py"
] | [
"from itertools import product\n\nimport numpy as np\nimport pandas as pd\nimport torch\nfrom trains import Task\n\nfrom models.detection.SSD.priorbox_optimization import PriorOptimizationInput, ImageSizeTuple\nfrom models.detection.SSD.priorbox_optimization.bbox_clustering import get_box_pairwise_iou\n\n\ndef coll... | [
[
"torch.Tensor",
"numpy.unique",
"numpy.around",
"pandas.DataFrame",
"numpy.array",
"numpy.where",
"numpy.vstack"
]
] |
JYLFamily/Kannada_MNIST | [
"5bc4989d581c050ba9b9363cb83829fa35921c4a"
] | [
"ResNet/ResNet.py"
] | [
"# coding:utf-8\n\nimport os\nimport gc\nimport numpy as np\nimport pandas as pd\nfrom keras.layers import *\nfrom keras.models import Model\nfrom keras.utils import Sequence\nfrom keras.optimizers import Adam\nfrom matplotlib import pyplot as plt\nfrom keras.initializers import he_normal\nfrom sklearn.model_select... | [
[
"numpy.random.seed",
"numpy.arange",
"numpy.random.shuffle",
"sklearn.model_selection.KFold",
"numpy.logical_or",
"numpy.copy",
"numpy.argmax",
"pandas.set_option",
"numpy.array",
"numpy.zeros",
"numpy.where",
"matplotlib.pyplot.show"
]
] |
cychu5/GenerativeLSTM | [
"33a945465bed5902aa9b101340a429c8a37c4415"
] | [
"model_training/samples_creator.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Mar 14 19:13:15 2020\n\n@author: Manuel Camargo\n\"\"\"\nimport itertools\nimport numpy as np\nimport random\n\nfrom nltk.util import ngrams\nimport keras.utils as ku\n\n\nclass SequencesCreator():\n\n def __init__(self, one_timestamp, ac_index, rl_index):\n ... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.zeros",
"numpy.random.shuffle"
]
] |
Marky0/pandas | [
"d0dd9820668ddd4a7648ff9fbd581e67298c77db"
] | [
"pandas/core/indexes/base.py"
] | [
"from datetime import datetime, timedelta\nimport operator\nfrom textwrap import dedent\nfrom typing import Union\nimport warnings\n\nimport numpy as np\n\nfrom pandas._libs import (\n algos as libalgos, index as libindex, join as libjoin, lib)\nfrom pandas._libs.lib import is_datetime_array\nfrom pandas._libs.t... | [
[
"pandas.core.dtypes.common.ensure_object",
"numpy.where",
"pandas.core.dtypes.common.is_interval_dtype",
"pandas.core.dtypes.concat._concat_index_asobject",
"pandas.core.common.cast_scalar_indexer",
"pandas.core.common._not_none",
"pandas.core.dtypes.common.is_iterator",
"pandas.co... |
Debanitrkl/MLAlgorithms | [
"f53a267897e4d0babdcbae7c271c5042e07549ca"
] | [
"mla/rbm.py"
] | [
"# coding:utf-8\nimport logging\n\nfrom mla.base import BaseEstimator\nfrom scipy.special import expit\nimport numpy as np\n\nfrom mla.utils import batch_iterator\n\nnp.random.seed(9999)\nsigmoid = expit\n\n\"\"\"\nReferences:\nA Practical Guide to Training Restricted Boltzmann Machines https://www.cs.toronto.edu/~... | [
[
"numpy.dot",
"numpy.random.seed",
"numpy.random.random_sample",
"numpy.random.randn",
"numpy.zeros",
"numpy.sum"
]
] |
dataflowr/Project-Neural-Bootstrapper | [
"36278a7f6884438553d90d9cdc12eaf0da1bc7bf"
] | [
"utils/metrics.py"
] | [
"import torch\nfrom torch.nn.functional import one_hot\n\nimport numpy as np\nfrom scipy.special import softmax\n\n\nclass NbsLoss(torch.nn.Module):\n def __init__(self, reduction='mean',\n base_loss=torch.nn.CrossEntropyLoss(reduction='none')):\n super().__init__()\n self.reduction... | [
[
"torch.abs",
"torch.linspace",
"torch.nn.LogSoftmax",
"torch.randint",
"torch.max",
"torch.nn.CrossEntropyLoss",
"torch.zeros",
"numpy.sum",
"torch.cat",
"numpy.eye",
"torch.zeros_like",
"torch.tensor",
"torch.rand",
"torch.nn.functional.one_hot",
"torch... |
mil-ad/prospr | [
"a92177989f4480f1f2b43a48b3e18a6597ebba6d"
] | [
"utils.py"
] | [
"import json\nimport os\nimport subprocess\nimport sys\nfrom contextlib import contextmanager\nfrom datetime import datetime\nfrom pathlib import Path\nfrom time import sleep\nfrom typing import List, Union\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\n\n\ndef create_logdir(root: Union[str, Path] = No... | [
[
"torch.manual_seed",
"torch.load",
"numpy.random.seed",
"torch.save"
]
] |
ethanjperez/semanticRetrievalMRS | [
"765e00d6e7693e0eaba20ef1407fad0be4a7a92b",
"765e00d6e7693e0eaba20ef1407fad0be4a7a92b"
] | [
"src/inspect_wikidump/stats_info.py",
"src/fever_models/nli/evidence_adjustment.py"
] | [
"import json\nimport config\nfrom collections import Counter\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\n\ndef flatten_counter_info(counter_dict, range_min=None, range_max=None):\n max_key = max(counter_dict.keys()) if range_max is None else range_max\n min_key = min(counter_dict.keys()) if ran... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.title",
"matplotlib.pyplot.figure"
],
[
"numpy.asarray",
"numpy.argmax",
"numpy.mean",
"numpy.stack"
]
] |
lzx1413/PytorchSSD | [
"320fe34f394f40aaa3b8a34d1ceed46e7ffecd46"
] | [
"models/SSD_HarDNet85.py"
] | [
"import os\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom layers import *\n\n\n\nclass Identity(nn.Module):\n def __init__(self):\n super(Identity, self).__init__()\n\n def forward(self, x):\n return x\n\nclass Flatten(nn.Module):\n def __init__(self):\n ... | [
[
"torch.nn.Softmax",
"torch.nn.Dropout2d",
"torch.cat",
"torch.load",
"torch.nn.ModuleList",
"torch.nn.Conv2d",
"torch.nn.MaxPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
]
] |
ewlumpkin/suzieq | [
"9d55a46a631f01535d5b8ab1c0b870f840bbc526",
"9d55a46a631f01535d5b8ab1c0b870f840bbc526",
"9d55a46a631f01535d5b8ab1c0b870f840bbc526"
] | [
"suzieq/engines/pandas/bgp.py",
"tests/integration/test_sqcmds.py",
"suzieq/poller/services/ospfIf.py"
] | [
"import pandas as pd\nimport numpy as np\n\nfrom .engineobj import SqPandasEngine\nfrom suzieq.utils import build_query_str, humanize_timestamp\n\n\nclass BgpObj(SqPandasEngine):\n\n @staticmethod\n def table_name():\n return 'bgp'\n\n def get(self, **kwargs):\n \"\"\"Replacing the original i... | [
[
"pandas.concat",
"numpy.where",
"pandas.DataFrame"
],
[
"pandas.read_json",
"pandas.DataFrame"
],
[
"numpy.delete"
]
] |
Chaztikov/probability | [
"9d64bfd0a7907f220f910dae134bc30258f25b5e"
] | [
"tensorflow_probability/python/distributions/distribution_properties_test.py"
] | [
"# Copyright 2018 The TensorFlow Probability Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a... | [
[
"tensorflow.compat.v2.math.tanh",
"tensorflow.compat.v2.math.reduce_max",
"tensorflow.compat.v2.executing_eagerly",
"tensorflow.compat.v2.clip_by_value",
"tensorflow.compat.v2.convert_to_tensor",
"tensorflow.compat.v2.range",
"tensorflow.compat.v2.identity",
"tensorflow.compat.v2.T... |
kessido/Neuroscience-seminar | [
"09c137638e49a12f9389fb37ed1a810be3cbb7be"
] | [
"neuralocalize/prediction.py"
] | [
"\"\"\"This code simulates the prediction code of the of the connectivity model.\n\"\"\"\nimport gzip\nimport pickle\nimport uuid\n\nimport numpy as np\nimport scipy.linalg as sl\nimport sklearn.preprocessing\n\nfrom .utils import constants\nfrom . import feature_extraction, utils\n\n\nclass FeatureExtractor:\n\t\"... | [
[
"scipy.linalg.lstsq",
"numpy.any",
"numpy.transpose",
"numpy.array",
"numpy.zeros"
]
] |
karthik20122001/docker-python | [
"bdf14ce8f0e848773480084a0e55b34a23be5abe",
"bdf14ce8f0e848773480084a0e55b34a23be5abe",
"bdf14ce8f0e848773480084a0e55b34a23be5abe"
] | [
"tests/test_lightgbm.py",
"tests/test_nnabla.py",
"tests/test_matplotlib.py"
] | [
"import unittest\n\nimport lightgbm as lgb\nimport pandas as pd\n\nfrom common import gpu_test\n\nclass TestLightgbm(unittest.TestCase):\n # Based on the \"simple_example\" from their documentation:\n # https://github.com/Microsoft/LightGBM/blob/master/examples/python-guide/simple_example.py\n def test_cpu... | [
[
"pandas.read_csv"
],
[
"numpy.random.random"
],
[
"numpy.random.rand",
"matplotlib.pyplot.savefig",
"numpy.linspace"
]
] |
andrewheusser/hddm | [
"ce335e7969e9ed1e56243acc1e7356730a27daf1"
] | [
"hddm/simulators/hddm_dataset_generators.py"
] | [
"import pandas as pd\nimport numpy as np\nfrom scipy.stats import truncnorm\nfrom patsy import dmatrix\nfrom collections import OrderedDict\nfrom hddm.simulators.basic_simulator import *\nfrom hddm.model_config import model_config\nfrom functools import partial\n\n# Helper\ndef hddm_preprocess(\n simulator_data=... | [
[
"pandas.concat",
"numpy.random.choice",
"numpy.arange",
"pandas.DataFrame",
"numpy.random.normal",
"numpy.random.binomial",
"numpy.random.uniform",
"numpy.array",
"numpy.meshgrid",
"numpy.zeros",
"numpy.sum"
]
] |
yaozengwei/icefall | [
"9c39d8b009917834f0f2abc57f8c26bc7bb637e6",
"9c39d8b009917834f0f2abc57f8c26bc7bb637e6",
"9c39d8b009917834f0f2abc57f8c26bc7bb637e6"
] | [
"egs/aishell/ASR/transducer_stateless_modified/pretrained.py",
"egs/librispeech/ASR/transducer_stateless2/decode.py",
"egs/tedlium3/ASR/pruned_transducer_stateless/pretrained.py"
] | [
"#!/usr/bin/env python3\n# Copyright 2021 Xiaomi Corp. (authors: Fangjun Kuang,\n# Wei Kang)\n#\n# See ../../../../LICENSE for clarification regarding multiple authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may n... | [
[
"torch.load",
"torch.tensor",
"torch.no_grad",
"torch.cuda.is_available",
"torch.device"
],
[
"torch.device",
"torch.no_grad",
"torch.cuda.is_available"
],
[
"torch.load",
"torch.tensor",
"torch.no_grad",
"torch.cuda.is_available",
"torch.device"
]
] |
Ancrilin/Chinese-Text-Classification-Pytorch | [
"ea37f6e209e0598ced872c26192730fc84f5b16c"
] | [
"utils_fasttext.py"
] | [
"# coding: UTF-8\nimport os\nimport torch\nimport numpy as np\nimport pickle as pkl\nfrom tqdm import tqdm\nimport time\nfrom datetime import timedelta\n\n\nMAX_VOCAB_SIZE = 10000\nUNK, PAD = '<UNK>', '<PAD>'\n\n\ndef build_vocab(file_path, tokenizer, max_size, min_freq):\n vocab_dic = {}\n with open(file_pat... | [
[
"numpy.asarray",
"torch.LongTensor",
"numpy.savez_compressed"
]
] |
ess-dmsc/hdf5ToRoot | [
"807400419044ea0526f7d1f50345464b19bb3dd1"
] | [
"analysis/tree-cutter.py"
] | [
"#!/usr/bin/python3\n\n# VMM Analysis\n# --------------------------------------------------------------------\n# This script is a simple example, showing how to read the data from a\n# ROOT tree, generated with vmm-sdat. In addition, some cuts are\n# applied to the data using pandas. In this specific example, this\... | [
[
"matplotlib.pyplot.scatter",
"matplotlib.pyplot.savefig",
"pandas.DataFrame",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show"
]
] |
j-wilson/Ax | [
"555489d0fd743e5422ab3a1994f8e4d44275ae21",
"555489d0fd743e5422ab3a1994f8e4d44275ae21",
"555489d0fd743e5422ab3a1994f8e4d44275ae21"
] | [
"ax/metrics/tests/test_tensorboard.py",
"ax/early_stopping/strategies.py",
"ax/models/tests/test_cbo_lcem.py"
] | [
"#!/usr/bin/env python3\n# 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\nfrom unittest import mock\n\nimport numpy as np\nimport pandas as pd\nfrom ax.metrics.tensorboard import T... | [
[
"numpy.array"
],
[
"numpy.percentile"
],
[
"torch.ones",
"torch.rand",
"torch.cos",
"torch.tensor"
]
] |
BIYTC/mobilenet_maskrcnn | [
"ee44ac18a5efa91da63ed88e479e645f2fb6d770"
] | [
"maskrcnn_benchmark/modeling/backbone/bottom2up.py"
] | [
"import torch\nimport torch.nn.functional as F\nfrom torch import nn\nfrom maskrcnn_benchmark.modeling.make_layers import group_norm\n\n\nclass Bottom2UP(nn.Module):\n \"\"\"\n Module that adds PANet on a list of feature maps from FPN.\n The feature maps are currently supposed to be in increasing depth\n ... | [
[
"torch.nn.ModuleList",
"torch.nn.Conv2d",
"torch.nn.functional.max_pool2d",
"torch.nn.ReLU"
]
] |
andrecianflone/wolf | [
"826bbedc58d4d29871110349356868066a3108e6",
"826bbedc58d4d29871110349356868066a3108e6"
] | [
"wolf/data/image.py",
"wolf/flows/couplings/transform.py"
] | [
"import os\nimport scipy.io\nimport numpy as np\n\nimport torch\nfrom torchvision import datasets, transforms\n\n\ndef load_datasets(dataset, image_size, data_path):\n if dataset == 'omniglot':\n return load_omniglot()\n elif dataset == 'mnist':\n return load_mnist()\n elif dataset.startswith... | [
[
"torch.LongTensor",
"torch.floor",
"torch.load",
"torch.from_numpy",
"numpy.random.shuffle",
"torch.stack"
],
[
"torch.abs",
"torch.sign",
"torch.cosh",
"torch.log",
"torch.sinh"
]
] |
varikakasandor/dissertation-balls-into-bins | [
"fba69dd5ffd0b4984795c9a5ec119bf8c6f47d9e",
"fba69dd5ffd0b4984795c9a5ec119bf8c6f47d9e"
] | [
"k_thinning/full_knowledge/RL/DQN/train.py",
"two_thinning/strategies/strategy_base.py"
] | [
"import copy\nimport random\nimport time\nfrom math import exp\nfrom os import mkdir\n\nimport torch.optim as optim\nimport wandb\nfrom matplotlib import pyplot as plt\n\nfrom helper.replay_memory import ReplayMemory, Transition\nfrom k_choice.simulation import sample_one_choice\nfrom k_thinning.full_knowledge.RL.D... | [
[
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.clf",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.ylabel"
],
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.title",
"numpy.arange",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.clf",
"... |
csaybar/raster-vision | [
"ec6c8309f89c404513862369bb93dd9e6a70b455"
] | [
"rastervision2/core/utils/zxy2geotiff.py"
] | [
"import tempfile\n\nfrom PIL import Image\nimport numpy as np\nimport click\nimport mercantile\nimport rasterio\nfrom rasterio.windows import Window\nimport pyproj\n\nfrom rastervision2.pipeline.filesystem import (download_if_needed,\n get_local_path, upload_or_copy)\nf... | [
[
"numpy.transpose"
]
] |
fbickfordsmith/finding-houses | [
"32b562ee93c8c8dd4d008194654e0c4480ae14f8"
] | [
"helper_functions.py"
] | [
"import numpy as np\n\ndef random_crop_flip(x_in, y_in, i0=None, j0=None, crop_shape=(256, 256)):\n # Sample frame from random location in image. Randomly flip frame.\n if i0 == None:\n i0 = np.random.randint(low=0, high=(x_in.shape[0]-crop_shape[0]))\n if j0 == None:\n j0 = np.random.randint... | [
[
"numpy.random.uniform",
"numpy.array",
"numpy.flip",
"numpy.logaddexp",
"numpy.random.randint"
]
] |
NUDTNASLab/NASLib | [
"451cdb4738a7c1501ac62f78727c6244039dc657",
"451cdb4738a7c1501ac62f78727c6244039dc657"
] | [
"naslib/search_spaces/hierarchical/primitives.py",
"naslib/defaults/trainer_multi.py"
] | [
"import torch.nn as nn\n\nfrom ..core.primitives import AbstractPrimitive\n\n\nclass ConvBNReLU(AbstractPrimitive):\n def __init__(self, C_in, C_out, kernel_size, stride=1, affine=False):\n super().__init__(locals())\n pad = 0 if stride == 1 and kernel_size == 1 else 1\n self.op = nn.Sequent... | [
[
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.nn.BatchNorm2d"
],
[
"torch.nn.CrossEntropyLoss",
"torch.distributed.init_process_group",
"torch.optim.lr_scheduler.CosineAnnealingLR",
"torch.multiprocessing.spawn",
"torch.cuda.set_device",
"torch.cuda.memory_summary",
"torch... |
ShashankBice/imview | [
"81236bf9149e677c15563470ee2cbe850f775b67"
] | [
"imview/hs_multi.py"
] | [
"#! /usr/bin/env python\n\n#Create weight rasters needed for multi-directional hillshade\n\nimport os, sys\n\nimport numpy as np\nimport gdal\n\nfrom pygeotools.lib import iolib\n\naz_list = (225, 270, 315, 360)\naspect_fn = sys.argv[1]\naspect_ds = gdal.Open(aspect_fn)\naspect = iolib.ds_getma(aspect_ds)\n\nfor az... | [
[
"numpy.radians"
]
] |
kalyc/keras-apache-mxnet | [
"5497ebd50a45ccc446b8944ebbe11fb7721a5533",
"5497ebd50a45ccc446b8944ebbe11fb7721a5533"
] | [
"examples/lstm_seq2seq.py",
"tests/integration_tests/test_eia_integration.py"
] | [
"'''Sequence to sequence example in Keras (character-level).\n\nThis script demonstrates how to implement a basic character-level\nsequence-to-sequence model. We apply it to translating\nshort English sentences into short French sentences,\ncharacter-by-character. Note that it is fairly unusual to\ndo character-lev... | [
[
"numpy.argmax",
"numpy.zeros"
],
[
"numpy.concatenate",
"numpy.expand_dims",
"numpy.random.randint"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.