repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
chunghyunhee/GoldMine | [
"d9cb6279588aff88d4b7a9225024c017e3de0333"
] | [
"experiment/hyper-params-search/hps/algorithms/ga/ParticleSwarmOptimization.py"
] | [
"## SA + PSO + GA + boundary(GA)\n\nimport numpy as np\nimport random\nimport time\n\nfrom hps.algorithms.HPOptimizationAbstract import HPOptimizationAbstract\nfrom hps.algorithms.ga.SimulatedAnnealing_3 import SimulatedAnnealing\nfrom hps.algorithms.ga.GeneticAlgorithm import GeneticAlgorithm\n\nclass ParticleSwa... | [
[
"numpy.random.rand",
"numpy.clip"
]
] |
zhuyuecai/spektral | [
"6ef68e265e5304e864c7daa1c250a62d2ef4aa78",
"a4ec792dcae2b978763588f93cc13319de6b3561"
] | [
"examples/other/graph_signal_classification_mnist.py",
"spektral/layers/convolutional/cheb_conv.py"
] | [
"import numpy as np\nimport tensorflow as tf\nfrom tensorflow.keras import Model\nfrom tensorflow.keras.layers import Dense\nfrom tensorflow.keras.losses import SparseCategoricalCrossentropy\nfrom tensorflow.keras.metrics import sparse_categorical_accuracy\nfrom tensorflow.keras.optimizers import Adam\nfrom tensorf... | [
[
"tensorflow.keras.metrics.sparse_categorical_accuracy",
"tensorflow.keras.losses.SparseCategoricalCrossentropy",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.regularizers.l2",
"numpy.random.shuffle",
"tensorflow.keras.optimizers.Adam",
"numpy.average",
"numpy.array",
"ten... |
simon-schaefer/mantrap | [
"9a2b3f32a0005cc0cb79bb78924f09da5a94587d",
"9a2b3f32a0005cc0cb79bb78924f09da5a94587d"
] | [
"mantrap/modules/base/optimization_module.py",
"mantrap_evaluation/scenarios/custom/surrounding.py"
] | [
"import abc\nimport logging\nimport typing\n\nimport numpy as np\nimport torch\n\nimport mantrap.environment\n\n\nclass OptimizationModule(abc.ABC):\n\n def __init__(self, t_horizon: int, weight: float = 0.0,\n env: mantrap.environment.base.GraphBasedEnvironment = None,\n has_sla... | [
[
"numpy.abs",
"numpy.nonzero",
"torch.zeros",
"torch.zeros_like",
"numpy.nan_to_num",
"numpy.linalg.norm",
"numpy.ones",
"torch.rand",
"numpy.array",
"numpy.zeros",
"torch.autograd.grad"
],
[
"torch.tensor"
]
] |
timgates42/bokeh | [
"fb8b07b838f4d07d520cfe899779a11bc89f3c77"
] | [
"bokeh/core/property/wrappers.py"
] | [
"#-----------------------------------------------------------------------------\n# Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors.\n# All rights reserved.\n#\n# The full license is in the file LICENSE.txt, distributed with this software.\n#---------------------------------------------------------... | [
[
"numpy.append",
"numpy.array"
]
] |
nikhil3198/stock_market_analysis | [
"c4861eca606d129b702353f1c36aaf9b44a81863"
] | [
"scripts/update_companies.py"
] | [
"import os\nimport csv\nimport pandas as pd\n\npath=\"../datasets/Companies/\"\ncompanies=[]\nfor file in os.listdir(path):\n if file[0]!='.':\n companies.append(file.split('.')[0].upper())\n\ncolumnTitleRow = ['Symbol','Name','LastSale','MarketCap','IPOyear','Sector','industry','Summary Quote']\nwith ope... | [
[
"pandas.read_csv"
]
] |
HirataYurina/yoloV3-keras-sibyl | [
"15f6c5f021dfc80d753df6bcdd579ae1139edfb9"
] | [
"gaussion_yolo3/yolo.py"
] | [
"import os\nimport numpy as np\nimport copy\nimport colorsys\nfrom timeit import default_timer as timer\nfrom keras import backend as K\nfrom keras.models import load_model\nfrom keras.layers import Input\nfrom PIL import Image, ImageFont, ImageDraw\nfrom gaussion_yolo3.gaussian_yolo3 import yolo_body, yolo_eval\nf... | [
[
"numpy.expand_dims",
"numpy.random.seed",
"numpy.random.shuffle",
"tensorflow.GPUOptions",
"tensorflow.Session",
"numpy.floor",
"numpy.array"
]
] |
earlsuke/sklearn-porter | [
"8658c6567e28c570d96ab2e858c510f84b1d94dc",
"8658c6567e28c570d96ab2e858c510f84b1d94dc"
] | [
"examples/estimator/classifier/DecisionTreeClassifier/java/basics_embedded.pct.py",
"examples/estimator/classifier/NuSVC/java/basics.pct.py"
] | [
"# %% [markdown]\n# # sklearn-porter\n#\n# Repository: [https://github.com/nok/sklearn-porter](https://github.com/nok/sklearn-porter)\n#\n# ## DecisionTreeClassifier\n#\n# Documentation: [sklearn.tree.DecisionTreeClassifier](http://scikit-learn.org/stable/modules/generated/sklearn.tree.DecisionTreeClassifier.html)\... | [
[
"sklearn.tree.tree.DecisionTreeClassifier",
"sklearn.datasets.load_iris"
],
[
"sklearn.svm.NuSVC",
"sklearn.datasets.load_iris"
]
] |
osljw/keras_tf | [
"400f7e8438216ff15e91509472dc028605ed97aa",
"400f7e8438216ff15e91509472dc028605ed97aa"
] | [
"deepctr/layers/utils.py",
"offline.py"
] | [
"# -*- coding:utf-8 -*-\n\"\"\"\n\nAuthor:\n Weichen Shen,wcshen1994@163.com\n\n\"\"\"\n\nfrom tensorflow.python.keras.layers import Layer, Concatenate\n\n\nclass NoMask(Layer):\n def __init__(self, **kwargs):\n super(NoMask, self).__init__(**kwargs)\n\n def build(self, input_shape):\n # Be ... | [
[
"tensorflow.python.keras.layers.Concatenate"
],
[
"sklearn.preprocessing.LabelEncoder",
"pandas.read_csv",
"sklearn.preprocessing.MinMaxScaler"
]
] |
benlevyx/opinion-vs-fact | [
"5063adc16e37b0b47cb6b55494866c31133281d4"
] | [
"src/0_test_corpus/01_match_media_ids.py"
] | [
"import pandas as pd\n\nfrom opinion import config, utils\n\n\ndef transform_url(df):\n df['media_source'] = df['media_source'].apply(\n lambda x: x.replace('https', 'http')\n )\n return df\n\n\ndef process_url(url):\n try:\n domain, path = utils.parse_url(url)\n return domain\n ... | [
[
"pandas.merge",
"pandas.read_csv"
]
] |
hunterhector/DDSemantics | [
"883ef1015bd21d9b8575d8000faf3b506a09f21c",
"883ef1015bd21d9b8575d8000faf3b506a09f21c",
"883ef1015bd21d9b8575d8000faf3b506a09f21c"
] | [
"event/util.py",
"event/arguments/debug/check_embeddings.py",
"event/mention/ZeroShotPredictor.py"
] | [
"import argparse\nimport gc\nimport hashlib\nimport logging\nimport os\nimport sys\nimport unicodedata\nfrom collections import Counter\nfrom time import strftime, localtime\nfrom datetime import datetime\nimport psutil\nfrom hurry.filesize import size\n\nimport numpy as np\nimport torch\n\nfrom traitlets.config.lo... | [
[
"torch.ones",
"torch.cat",
"numpy.asarray",
"torch.zeros",
"torch.is_tensor",
"torch.unsqueeze",
"torch.cuda.memory_allocated"
],
[
"numpy.load",
"scipy.spatial.distance.cosine"
],
[
"numpy.load",
"scipy.spatial.distance.cosine"
]
] |
abhinavsp0730/federated | [
"7c5821f85cb2d0379f33bf2b5e02f97d51a16427",
"7c5821f85cb2d0379f33bf2b5e02f97d51a16427"
] | [
"tensorflow_federated/python/core/impl/compiler/building_block_factory_test.py",
"tensorflow_federated/python/core/api/intrinsics_test.py"
] | [
"# Lint as: python3\n# Copyright 2019, The TensorFlow Federated 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# ... | [
[
"tensorflow.TensorShape",
"tensorflow.constant",
"numpy.ones",
"numpy.array",
"numpy.zeros"
],
[
"tensorflow.compat.v1.enable_v2_behavior",
"tensorflow.concat",
"tensorflow.Variable",
"tensorflow.zeros",
"tensorflow.greater",
"tensorflow.cast",
"tensorflow.expan... |
bharlow058/Imbalance-Library | [
"3e875838cb602865d8b9786fbe940d0704771fca",
"d85c17a3c07358de01101806f6ae38bf3ba0f394"
] | [
"imblearn/datasets/zenodo.py",
"imblearn/metrics/classification.py"
] | [
"\"\"\"Collection of imbalanced datasets.\n\nThis collection of datasets has been proposed in [1]_. The\ncharacteristics of the available datasets are presented in the table\nbelow.\n\n ID Name Repository & Target Ratio #S #F\n 1 ecoli UCI, target: imU 8.6:1 ... | [
[
"numpy.arange",
"sklearn.datasets.base.Bunch",
"sklearn.datasets.get_data_home",
"sklearn.utils.fixes.makedirs",
"numpy.load",
"sklearn.utils.check_random_state"
],
[
"scipy.stats.gmean",
"numpy.sqrt",
"numpy.power",
"numpy.asarray",
"sklearn.metrics.classification.... |
RicoFio/disentangle_mlp | [
"1fb3b6070b5846051b8b9e9333e8ee61418f4893"
] | [
"dataloader/dataset.py"
] | [
"import numpy as np\nfrom torchvision import datasets\nimport torchvision.transforms as transforms\nimport random\nfrom torch.utils.data.sampler import SubsetRandomSampler\nfrom torch.utils.data import DataLoader, Dataset\nimport torch\n\nnormalize_birds = transforms.Normalize(mean=[0.485, 0.456, 0.406],\n ... | [
[
"torch.utils.data.DataLoader"
]
] |
rainwangphy/AutoDL-Projects | [
"1a40948255ac3c16ee529d94144a39bf26e89bfa",
"1a40948255ac3c16ee529d94144a39bf26e89bfa",
"1a40948255ac3c16ee529d94144a39bf26e89bfa",
"1a40948255ac3c16ee529d94144a39bf26e89bfa",
"1a40948255ac3c16ee529d94144a39bf26e89bfa",
"1a40948255ac3c16ee529d94144a39bf26e89bfa",
"1a40948255ac3c16ee529d94144a39bf26e89bf... | [
"exps/NATS-Bench/draw-fig2_5.py",
"exps/algos/DARTS-V2.py",
"exps/NAS-Bench-201/statistics-v2.py",
"exps/NATS-Bench/sss-collect.py",
"exps/algos/SETN.py",
"lib/layers/mlp.py",
"lib/utils/weight_watcher.py"
] | [
"###############################################################\n# NATS-Bench (arxiv.org/pdf/2009.00437.pdf), IEEE TPAMI 2021 #\n# The code to draw Figure 2 / 3 / 4 / 5 in our paper. #\n###############################################################\n# Copyright (c) Xuanyi Dong [GitHub D-X-Y], 2020.06 ... | [
[
"matplotlib.pyplot.legend",
"torch.load",
"matplotlib.use",
"matplotlib.pyplot.subplots",
"torch.save",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.close",
"scipy.stats.kendalltau",
"matplotlib.ticker.FormatStrFormatter",
"numpy.array",
"matplotlib.pyplot.figure"
],
... |
cemac-tech/WCSSP-FORTIS | [
"f7f47112de085095d39b403dab6cbdc1db987801"
] | [
"FORTISApp.bak.py"
] | [
"from flask import Flask, render_template, flash, redirect, url_for, request, g, session, abort, send_from_directory\nfrom wtforms import Form, validators, StringField, TextAreaField, SelectField, PasswordField\nfrom werkzeug.utils import secure_filename\nfrom passlib.hash import sha256_crypt\nfrom functools import... | [
[
"pandas.read_sql"
]
] |
seovalue/VDSR-PyTorch | [
"99bf8457a13cda38870f6b1a72fda13fcd8b0efa"
] | [
"test.py"
] | [
"# Copyright 2020 Dakewe Biotech Corporation. All Rights Reserved.\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# Unle... | [
[
"numpy.uint8"
]
] |
HH-MWB/sable | [
"78ec3d1892af83992cdd6a719e16155706b0ea92"
] | [
"sable/exec.py"
] | [
"\"\"\"Sable Executor\"\"\"\n\nfrom contextlib import contextmanager\nfrom sqlite3 import Connection, connect\nfrom typing import Iterable, Iterator\n\nfrom pandas import read_sql_query\n\nfrom sable.data import Table, Tabulation, TestCase\n\n\n@contextmanager\ndef create_sqlite() -> Iterator[Connection]:\n \"\"... | [
[
"pandas.read_sql_query"
]
] |
DidierRLopes/GST-discordbot | [
"8ff7f7557f5db62ea33d63cfc11ee7ae5f9de56c",
"8ff7f7557f5db62ea33d63cfc11ee7ae5f9de56c",
"8ff7f7557f5db62ea33d63cfc11ee7ae5f9de56c"
] | [
"discordbot/stocks/technical_analysis/macd.py",
"tests/gamestonk_terminal/stocks/dark_pool_shorts/test_sec_view.py",
"discordbot/stocks/technical_analysis/adx.py"
] | [
"import os\nfrom datetime import datetime, timedelta\nimport discord\nfrom matplotlib import pyplot as plt\n\nfrom gamestonk_terminal.helper_funcs import plot_autoscale\nfrom gamestonk_terminal.common.technical_analysis import momentum_model\nfrom gamestonk_terminal.config_plot import PLOT_DPI\n\nimport discordbot.... | [
[
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.gcf"
],
[
"pandas.Timestamp"
],
[
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.gcf"
]
] |
nikkkkhil/DLOD | [
"1ee63477193dce77b3f8820fe02fa65be698bdb2"
] | [
"DLOD/models/knn.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"k-Nearest Neighbors Detector (kNN)\n\"\"\"\n# Author: Yue Zhao <zhaoy@cmu.edu>\n# License: BSD 2 clause\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom warnings import warn\n\nimport numpy as np\nfrom sklearn.neighbors import NearestNeighbors\nfrom skl... | [
[
"sklearn.neighbors.BallTree",
"sklearn.utils.validation.check_is_fitted",
"numpy.asarray",
"sklearn.utils.check_array",
"numpy.median",
"numpy.mean",
"sklearn.neighbors.NearestNeighbors",
"numpy.zeros"
]
] |
worldbank/SDG-big-data | [
"7349cffde3c32bb5a7abc99d910a40e1ba611916"
] | [
"twitter-analytics/code/3-model_evaluation/preliminary/check_presence_seedlist_keyword.py"
] | [
"import pandas as pd\nimport argparse\nimport logging\nfrom pathlib import Path\nimport os\nimport re\n\nlogging.basicConfig(format='%(asctime)s - %(levelname)s - %(name)s - %(message)s',\n datefmt='%m/%d/%Y %H:%M:%S',\n level=logging.INFO)\nlogger = logging.getLogger(__name_... | [
[
"pandas.read_parquet"
]
] |
qiuhaoling/indra | [
"fa1fb31c4333ea63d023181eaf6f759e3dd3b400"
] | [
"indra/assemblers/cyjs/assembler.py"
] | [
"from __future__ import absolute_import, print_function, unicode_literals\nfrom builtins import dict, str\nfrom copy import deepcopy\nimport json\nimport logging\nimport itertools\nimport collections\nimport numpy as np\nfrom indra.statements import *\nfrom indra.databases import hgnc_client\nfrom indra.databases i... | [
[
"numpy.log10"
]
] |
brianchung0803/MegaDepth | [
"2aa2bd9c6025938c40b5839989d37a647c82ff39"
] | [
"models/base_model.py"
] | [
"import os\nimport torch\n\nclass BaseModel():\n def name(self):\n return 'BaseModel'\n\n def initialize(self):\n # self.opt = opt\n # self.gpu_ids = opt.gpu_ids\n # self.isTrain = opt.isTrain\n # self.Tensor = torch.cuda.FloatTensor if self.gpu_ids else torch.Tensor\n ... | [
[
"torch.cuda.is_available",
"torch.load"
]
] |
Umang81/ga-dsmp | [
"3f44da82cf6eb199da0dbc2546509aad254dd630"
] | [
"Telecom-Churn-Prediction-with-Boosting/code.py"
] | [
"# --------------\nimport pandas as pd\nfrom sklearn.model_selection import train_test_split\n#path - Path of file \n\n# Code starts here\ndf = pd.read_csv(path)\nX = df.drop(['customerID','Churn'],1)\ny = df['Churn'].copy()\n\nX_train,X_test,y_train,y_test = train_test_split(X,y,test_size =0.3, random_state=0)\n\n... | [
[
"sklearn.model_selection.GridSearchCV",
"pandas.read_csv",
"sklearn.model_selection.train_test_split",
"sklearn.metrics.confusion_matrix",
"sklearn.ensemble.AdaBoostClassifier",
"sklearn.preprocessing.LabelEncoder",
"sklearn.metrics.classification_report",
"sklearn.metrics.accuracy... |
hsabiu/thesis-scripts | [
"54b7b2248f9a341be7579c96eb54dd43b7d7138f",
"54b7b2248f9a341be7579c96eb54dd43b7d7138f"
] | [
"plotEventsWithTimestampOriginal.py",
"set_1/jobs_set_1.py"
] | [
"# Author: Habib Sabiu\n# Date: March 31, 2017\n# Purpose: Script to process Spark log files generated when running Spark applications. This script\n# would loop through all the log files in the current directory and get the timestamp for\n# all events specified within 'events' list. Basically, th... | [
[
"matplotlib.dates.SecondLocator",
"matplotlib.dates.DateFormatter",
"matplotlib.pyplot.title",
"matplotlib.pyplot.ylim",
"matplotlib.font_manager.FontProperties",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
],... |
aldragan0/jax | [
"ca766caa02296023bd6714bb7fdba064a45e2258",
"3ddd3905a4c8f59480c43c24bb1f9374238bb2a0",
"3ddd3905a4c8f59480c43c24bb1f9374238bb2a0"
] | [
"jax/_src/scipy/special.py",
"jax/abstract_arrays.py",
"jax/lax/lax_parallel.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.log",
"numpy.sqrt",
"numpy.arange",
"numpy.expm1",
"numpy.dtype",
"numpy.array",
"numpy.exp"
],
[
"numpy.array",
"numpy.shape",
"numpy.zeros"
],
[
"numpy.arange",
"numpy.array",
"numpy.prod",
"numpy.full"
]
] |
YanzhaoWu/tensorflow-blue | [
"917ffe4d38e71421193ce08ba2ed2ff4ff50d55f"
] | [
"tensorflow/python/keras/_impl/keras/engine/network.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.framework.tensor_shape.TensorShape",
"tensorflow.python.keras._impl.keras.backend.batch_set_value",
"tensorflow.python.keras._impl.keras.backend.int_shape",
"tensorflow.python.eager.context.executing_eagerly",
"tensorflow.python.keras._impl.keras.utils.generic_utils.object_l... |
os-climate/witness-core | [
"3ef9a44d86804c5ad57deec3c9916348cb3bfbb8",
"3ef9a44d86804c5ad57deec3c9916348cb3bfbb8",
"3ef9a44d86804c5ad57deec3c9916348cb3bfbb8",
"3ef9a44d86804c5ad57deec3c9916348cb3bfbb8",
"3ef9a44d86804c5ad57deec3c9916348cb3bfbb8",
"3ef9a44d86804c5ad57deec3c9916348cb3bfbb8",
"3ef9a44d86804c5ad57deec3c9916348cb3bfbb... | [
"climateeconomics/tests/l1_test_gradient_agriculture_discipline.py",
"climateeconomics/tests/_l1_test_gradient_services_discipline.py",
"climateeconomics/sos_wrapping/sos_wrapping_dice/carboncycle/carboncycle_discipline.py",
"climateeconomics/core/core_emissions/ghg_emissions_model.py",
"climateeconomics/te... | [
"'''\nCopyright 2022 Airbus SAS\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writi... | [
[
"numpy.arange",
"pandas.DataFrame",
"numpy.linspace"
],
[
"numpy.arange",
"scipy.interpolate.interp1d",
"numpy.zeros",
"pandas.DataFrame"
],
[
"pandas.DataFrame"
],
[
"numpy.arange",
"pandas.DataFrame"
],
[
"numpy.arange",
"numpy.array",
"numpy.l... |
BYU-Hydroinformatics/pywaterml | [
"d4c88a0402dec61d466edb1fa5dbda4544f7a738"
] | [
"tests/test.py"
] | [
"# from pywaterml.waterML import WaterMLOperations\n\nimport sys\nsys.path.append(\"/Users/ElkiGio/pypack/pywaterml\")\nimport pywaterml\nfrom pywaterml.waterML import WaterMLOperations\nimport time\nimport pandas as pd\nurl_testing = [\n # # [\"http://gs-service-production.geodab.eu/gs-service/services/essi/vie... | [
[
"pandas.DataFrame.from_dict"
]
] |
jamartinh/d3rlpy | [
"87f478451674ef769eb8ce74e3663c4d3b1c325d",
"87f478451674ef769eb8ce74e3663c4d3b1c325d"
] | [
"tests/preprocessing/test_action_scalers.py",
"d3rlpy/algos/torch/crr_impl.py"
] | [
"import pytest\nimport torch\nimport numpy as np\nimport gym\n\nfrom d3rlpy.dataset import MDPDataset, Episode\nfrom d3rlpy.preprocessing import create_action_scaler\nfrom d3rlpy.preprocessing import MinMaxActionScaler\n\n\n@pytest.mark.parametrize(\"scaler_type\", [\"min_max\"])\ndef test_create_action_scaler(scal... | [
[
"numpy.random.random",
"torch.tensor",
"numpy.all",
"torch.rand",
"numpy.random.randint"
],
[
"torch.nn.functional.softmax",
"torch.no_grad",
"torch.multinomial",
"torch.arange"
]
] |
Ahsantw/cudf | [
"e099688d5ca7dd20104930485a829881a68c522a",
"e099688d5ca7dd20104930485a829881a68c522a",
"e099688d5ca7dd20104930485a829881a68c522a"
] | [
"python/cudf/cudf/tests/test_sparse_df.py",
"python/cudf/cudf/tests/test_replace.py",
"python/cudf/cudf/core/scalar.py"
] | [
"# Copyright (c) 2018, NVIDIA CORPORATION.\nimport os.path\n\nimport numpy as np\nimport pyarrow as pa\nimport pytest\nfrom numba import cuda\n\nfrom cudf import DataFrame, Series\nfrom cudf.comm.gpuarrow import GpuArrowReader\nfrom cudf.testing._utils import assert_eq\n\n\ndef read_data():\n import pandas as pd... | [
[
"numpy.asarray",
"pandas.read_pickle",
"numpy.random.random"
],
[
"pandas.Series",
"pandas.Timestamp",
"pandas.Categorical",
"pandas.MultiIndex.from_tuples",
"pandas.DataFrame",
"numpy.dtype",
"pandas.Timedelta",
"pandas.Int8Dtype",
"pandas.date_range",
"num... |
albimc/deep-reinforcement-learning | [
"e11a6c9d4c8991cf229e686b645ae22ec4cff4f5"
] | [
"p3_collab-compet/model.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport numpy as np\nimport pdb\n\n\ndef hidden_init(layer):\n fan_in = layer.weight.data.size()[0]\n lim = 1. / np.sqrt(fan_in)\n return (-lim, lim)\n\n\nclass ActorNetwork(nn.Module):\n def __init__(self, state_size, hidden_in_dim, ... | [
[
"torch.nn.BatchNorm1d",
"numpy.sqrt",
"torch.cat",
"torch.manual_seed",
"torch.nn.Linear",
"torch.nn.functional.tanh"
]
] |
ruchikachavhan/atari-dqn | [
"00369088e6af9ba3fd7961edf87834e51ec58be5"
] | [
"dqn.py"
] | [
"import math\nimport random\nimport numpy as np\nimport matplotlib\nimport matplotlib.pyplot as plt\nfrom collections import namedtuple\nfrom itertools import count\nfrom PIL import Image\nimport cv2\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.nn.functional as F\nimport torchvisi... | [
[
"torch.cat",
"torch.zeros",
"matplotlib.pyplot.plot",
"torch.no_grad",
"torch.cuda.is_available",
"torch.reshape",
"torch.tensor",
"matplotlib.pyplot.gcf",
"numpy.zeros",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.title",
"torch.nn.Conv2d",
"matplotlib.get_b... |
sean-frye/dask-cuda | [
"b24567d0cc3be7570f19b3bd5fe8d31d4591b623"
] | [
"dask_cuda/explicit_comms/dataframe_merge.py"
] | [
"import asyncio\n\nimport pandas\n\nfrom dask.dataframe.shuffle import partitioning_index, shuffle_group\nfrom distributed.protocol import to_serialize\n\nimport cudf\n\nfrom . import comms\n\n\nasync def send_df(ep, df):\n if df is None:\n return await ep.write(\"empty\")\n else:\n return await... | [
[
"pandas.concat"
]
] |
Blitzman/CarND-Behavioral-Cloning-P3 | [
"9ae7bd9ffe5b7db59c74132a30feff6c9412af2b"
] | [
"drive.py"
] | [
"import argparse\nimport base64\nfrom datetime import datetime\nimport os\nimport shutil\nimport cv2\n\nimport numpy as np\nimport socketio\nimport eventlet\nimport eventlet.wsgi\nfrom PIL import Image\nfrom flask import Flask\nfrom io import BytesIO\n\nfrom keras.models import load_model\nimport h5py\nfrom keras i... | [
[
"numpy.asarray"
]
] |
netomap/MNIST-WGAN-GP | [
"6b531536e1d844b25720a7895e2b1537fb889f1a"
] | [
"criar_gif.py"
] | [
"import pathlib, re\nfrom pickletools import optimize\nfrom PIL import Image, ImageDraw\nfrom numpy import dtype\nimport numpy as np\n\ndef listar_imagens(img_dir):\n lista = [str(l) for l in list(pathlib.Path(img_dir).glob('*.png'))]\n aux = []\n for img_path in lista:\n epoch = int(re.findall(r'[0... | [
[
"numpy.array"
]
] |
edwardoughton/itmlogic | [
"1e454e3b4b3c8e24c4bc74ec6c076a2f97d86d23"
] | [
"src/itmlogic/diffraction_attenuation/aknfe.py"
] | [
"import math\nimport numpy as np\n\ndef aknfe(v2):\n \"\"\"\n Returns the attenuation due to a single knife edge - the Fresnel integral (in decibels,\n Eqn 4.21 of \"The ITS Irregular Terrain Model, version 1.2.2: The Algorithm\" – see also\n Eqn 6.1) evaluated for nu equal to the square root of the inp... | [
[
"numpy.log"
]
] |
Ralphyan/VectorCapsNet | [
"ea6911c44821bdf473d25edcc1b58248dad31f79"
] | [
"main.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#ac\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless re... | [
[
"tensorflow.nn.softmax_cross_entropy_with_logits",
"tensorflow.nn.softmax",
"numpy.rank",
"numpy.expand_dims",
"tensorflow.all_variables",
"numpy.arange",
"numpy.ndarray",
"tensorflow.placeholder",
"tensorflow.train.exponential_decay",
"tensorflow.keras.datasets.mnist.load_... |
ijpulidos/pymdtools | [
"484160f57094bf701f5d1603baa5f40abee61d8c"
] | [
"scripts/preprocessing/complete_residues.py"
] | [
"#!/usr/bin/env python\n\n\"\"\"\nScript that completes a PDB structure with missing residues or atoms.\n\nIt uses MODELLER as backend, it automatically builds a MODELLER align file and\nthen performs the completion with a MODELLER model and its tools.\n\nRequires BioPython>=1.74 and Modeller>=9.21.\n\"\"\"\n\nimpo... | [
[
"numpy.array"
]
] |
pushkar-khetrapal/RealTimePanoptic-TensorRT | [
"c59d1eff81e75d06a0ecd288366f792e68ffe814",
"c59d1eff81e75d06a0ecd288366f792e68ffe814"
] | [
"realtime_panoptic/models/panoptic_from_dense_box.py",
"pytorch2onnx.py"
] | [
"# Copyright 2020 Toyota Research Institute. All rights reserved.\nimport torch\nimport torch.nn.functional as F\nfrom realtime_panoptic.utils.bounding_box import BoxList\nfrom realtime_panoptic.utils.boxlist_ops import (boxlist_nms, cat_boxlist, remove_small_boxes)\n\nclass PanopticFromDenseBox:\n \"\"\"Perfor... | [
[
"torch.Size",
"torch.nn.functional.softmax",
"torch.cuda.synchronize",
"torch.max",
"torch.full",
"torch.cat",
"torch.min",
"torch.nn.functional.interpolate",
"torch.nonzero",
"torch.stack"
],
[
"torch.randn",
"torch.onnx.export",
"numpy.array",
"torch.l... |
Mutanne/hiworld | [
"d4c536775ecdd948b6fa205cd43fb5f92c7496c5"
] | [
"python/Ta4_csv.py"
] | [
"import pandas as pd\n\ndf = pd.read_csv(\"hiworld\\\\python\\\\Arquivo.csv\", encoding = \"UTF-8\", sep = \",\")\n#dfj = pd.read_json(\"hiworld\\python\\Arquivo.json\") #deu pau\n\nprint(df)\n"
] | [
[
"pandas.read_csv"
]
] |
18F/10x-MLaaS | [
"3e1df3bbd88037c20e916fab2c07117a63e3c639"
] | [
"HSM/utils/qualtrics.py"
] | [
"import requests\nimport zipfile\nimport json\nimport os\nimport sys\nimport pandas as pd\nfrom time import sleep\nfrom utils.config import qualtrics_sitewide_creds\nfrom utils import db, db_utils\n\n\nclass QualtricsApi:\n \"\"\"Query Qualtrics API for new survey responses and then write to database.\n\n Att... | [
[
"pandas.notnull",
"pandas.DataFrame"
]
] |
namanshrimali/doepd.ai | [
"fc57af2e131965d9d6c89e39a3eeab41c8dff40b"
] | [
"models/doepd_net.py"
] | [
"import torch\r\nimport torch.nn as nn\r\nfrom .midas.midas_net import MidasNet\r\n\r\nclass DoepdNet(torch.nn.Module):\r\n \"\"\"\r\n There are 3 run modes available for this model.\r\n 1. Yolo : Trains/Inferences only yolo layer, while ignoring midas and planeRCNN\r\n 2. PlaneRCNN : Trains/... | [
[
"torch.nn.Parameter",
"torch.nn.Conv2d",
"torch.load"
]
] |
cjporteo/ml-NBA-asg-predictor | [
"2a0f8b9660def980a910b839152b0b2f9418844e"
] | [
"Data Collection/bballref_ASG_scrape.py"
] | [
"from bs4 import BeautifulSoup\nfrom collections import defaultdict\nimport pandas as pd\nimport pickle\nimport requests\nfrom unidecode import unidecode\n\n# this dictionary will map players to a set containing all the years in which they were selected for an all-star game, either initially or as a replacement\nal... | [
[
"pandas.notnull"
]
] |
RMeli/gnina-torch | [
"eb57e2a62628d39f2a66e7fa1748e80705366761"
] | [
"tests/conftest.py"
] | [
"import os\n\nimport molgrid\nimport pytest\nimport torch\n\n\ndef pytest_addoption(parser):\n # Allows user to force tests to run on the CPU (useful to get performance on CI)\n parser.addoption(\n \"--nogpu\",\n action=\"store_false\",\n help=\"Force tests to run on CPU\",\n )\n\n\n@p... | [
[
"torch.device",
"torch.cuda.is_available"
]
] |
SergiR1996/PELEAnalysis-Processing | [
"ad844f14487998eb963186d3b8f314cc9307df28",
"ad844f14487998eb963186d3b8f314cc9307df28"
] | [
"PELEAnalysis-Processing/Protein_Mutator/MutateScore.py",
"PELEAnalysis-Processing/PELE_scripts/PELEPlot3.py"
] | [
"# -*- coding: utf-8 -*-\n\n# Global imports\nimport sys,time\nimport numpy as np\nfrom scipy.optimize import linear_sum_assignment\nfrom scipy.spatial.distance import cdist\nimport itertools\nimport argparse as ap\nimport multiprocessing as mp\n\n# Script information\n__author__ = \"Sergi Rodà\"\n__license__ = \"M... | [
[
"numpy.dot",
"numpy.linalg.svd",
"numpy.sqrt",
"numpy.linalg.det",
"numpy.mean",
"numpy.transpose",
"numpy.array"
],
[
"matplotlib.pyplot.title",
"matplotlib.pyplot.scatter",
"matplotlib.use",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.subplots",
"matplo... |
h2oai/driverlessai-recipes | [
"508663ed6bd1961925fcb29fde268493fe40e9e8",
"508663ed6bd1961925fcb29fde268493fe40e9e8"
] | [
"transformers/image/image_url_transformer.py",
"models/nlp/text_tfidf_model.py"
] | [
"\"\"\"Convert a path to an image (JPG/JPEG/PNG) to a vector of class probabilities created by a pretrained ImageNet deeplearning model (Keras, TensorFlow).\"\"\"\nimport importlib\nfrom h2oaicore.transformer_utils import CustomTransformer\nfrom h2oaicore.models import TensorFlowModel\nimport datatable as dt\nimpor... | [
[
"numpy.expand_dims",
"numpy.vstack"
],
[
"sklearn.linear_model.LogisticRegression",
"numpy.random.choice",
"sklearn.linear_model.LinearRegression",
"scipy.sparse.hstack",
"sklearn.preprocessing.LabelEncoder",
"sklearn.feature_extraction.text.TfidfVectorizer"
]
] |
ArkhamWJZ/SummerProject | [
"bae2aa3e859766097d5ae6efd7063adf58a56ac8"
] | [
"back_end/imgProcess/end2end_model/model/my_dataset.py"
] | [
"# -*- coding: UTF-8 -*-\nimport sys\nimport os\nfrom torch.utils.data import DataLoader,Dataset\nimport torchvision.transforms as transforms\nfrom PIL import Image\n\nsys.path.append('../')\n# print(type(sys.path), '\\r\\n'.join(sys.path))\n\nimport torch.nn as nn\nfrom end2end_model.training_set_gen import gen_co... | [
[
"torch.utils.data.DataLoader"
]
] |
anirudhacharya/aesara | [
"cbf91122296b68ee2ad592b2312d56f6ff65ba53",
"cbf91122296b68ee2ad592b2312d56f6ff65ba53",
"cbf91122296b68ee2ad592b2312d56f6ff65ba53"
] | [
"aesara/tensor/elemwise.py",
"tests/link/test_jax.py",
"tests/scan/test_basic.py"
] | [
"from copy import copy\nfrom typing import Tuple, Union\n\nimport numpy as np\n\nimport aesara.tensor.basic\nfrom aesara.configdefaults import config\nfrom aesara.gradient import DisconnectedType\nfrom aesara.graph.basic import Apply\nfrom aesara.graph.null_type import NullType\nfrom aesara.graph.op import COp, Ext... | [
[
"numpy.asarray",
"numpy.__version__.split",
"numpy.isposinf",
"numpy.frompyfunc",
"numpy.dtype",
"numpy.isneginf",
"numpy.copy",
"numpy.sctype2char",
"numpy.array"
],
[
"numpy.product",
"numpy.array_equal",
"numpy.linspace",
"numpy.random.RandomState",
"... |
708yamaguchi/scikit-robot | [
"08fa91a79e637b0dcfafe5553921cb7bb409ef26",
"08fa91a79e637b0dcfafe5553921cb7bb409ef26",
"08fa91a79e637b0dcfafe5553921cb7bb409ef26"
] | [
"tests/skrobot_tests/model_tests/test_primitives.py",
"skrobot/interfaces/_pybullet.py",
"tests/skrobot_tests/planner_tests/test_sqp_based_planner.py"
] | [
"import os.path as osp\nimport shutil\nimport unittest\n\nimport numpy as np\n\nimport skrobot\nimport trimesh\n\n\nclass TestAxis(unittest.TestCase):\n\n def test_init(self):\n skrobot.model.Axis()\n\n def from_coords(self):\n coords = skrobot.coordinates.Coordinates()\n skrobot.model.Ax... | [
[
"numpy.all"
],
[
"numpy.array"
],
[
"numpy.all",
"numpy.testing.assert_almost_equal",
"numpy.array",
"numpy.hstack"
]
] |
PanAndy/PolarMask | [
"0421f03a66ad4cbf7bdfe7a17a2e47e9fcc53737",
"e224dc10eb62b4d771aafc1ffcb787eedb35ba7b",
"0421f03a66ad4cbf7bdfe7a17a2e47e9fcc53737"
] | [
"mmdet/models/anchor_heads/polarmask_head.py",
"mmdet/models/detectors/base.py",
"mmdet/models/anchor_heads/fcos_instance_head_miou_mskctness.py"
] | [
"import torch\nimport torch.nn as nn\nfrom mmcv.cnn import normal_init\n\nfrom mmdet.core import distance2bbox, force_fp32, multi_apply, multiclass_nms, multiclass_nms_with_mask\nfrom mmdet.ops import ModulatedDeformConvPack\n\nfrom ..builder import build_loss\nfrom ..registry import HEADS\nfrom ..utils import Conv... | [
[
"torch.range",
"torch.Tensor",
"torch.cat",
"torch.sin",
"torch.sqrt",
"torch.nn.ModuleList",
"torch.nn.Conv2d",
"torch.arange",
"torch.nn.ReLU",
"torch.meshgrid",
"torch.cos"
],
[
"numpy.full",
"numpy.concatenate",
"numpy.where",
"numpy.vstack",
... |
PhilippVerpoort/blue-green-H2 | [
"a9b9bd27d2459df0f14e719a466af5ed6318d7e0",
"a9b9bd27d2459df0f14e719a466af5ed6318d7e0"
] | [
"src/data/fuels/calc_fuels.py",
"src/plotting/plots/plotOverTime.py"
] | [
"import pandas as pd\n\nfrom src.data.fuels.calc_ghgi import calcGHGI\nfrom src.data.fuels.calc_cost import calcCost\nfrom src.timeit import timeit\n\n\n# calculate fuel data\n@timeit\ndef calcFuelData(times: list, full_params: pd.DataFrame, fuels: dict, gwp: str = 'gwp100', levelised: bool = False):\n fuelSpecs... | [
[
"pandas.DataFrame.from_records"
],
[
"pandas.concat",
"pandas.merge",
"pandas.DataFrame",
"numpy.linspace"
]
] |
TatsuyaHaga/reversereplaymodel_codes | [
"579009d260f32b259994d77c8a66877cf6304dee",
"579009d260f32b259994d77c8a66877cf6304dee"
] | [
"Fig5/10cells_wideSTDP/plot_bias_eachparam.py",
"Fig1/ADPmod/plot_slice.py"
] | [
"#!/usr/bin/env python3\n\nimport numpy\nimport scipy.stats\nimport matplotlib\nmatplotlib.use(\"Agg\")\nimport pylab\nimport seaborn\nseaborn.set(context=\"paper\", style=\"white\", palette=\"deep\")\n\ndata=numpy.loadtxt(\"bias_log.csv\", delimiter=\",\")\ndata[:,0]*=1000\n\nlinfit=numpy.zeros([4,4])\n\npylab.clo... | [
[
"numpy.min",
"matplotlib.use",
"numpy.max",
"numpy.savetxt",
"numpy.zeros",
"numpy.loadtxt"
],
[
"numpy.loadtxt"
]
] |
ma02954AteebAhmed/InstaWeight | [
"a1ef58d60cfecb867d78b87adc6df8929216dd10"
] | [
"instaweight/utils/rs.py"
] | [
"# First import the library\nimport pyrealsense2 as rs\nfrom PIL import Image \nimport numpy as np\nimport cv2\n\n\nimage_no = 100000\n\n# Create a context object. This object owns the handles to all connected realsense devices\npipeline = rs.pipeline()\nconfig = rs.config()\nprint(config)\nexit()\nconfig.enable_st... | [
[
"numpy.asanyarray"
]
] |
inpho/vsm | [
"d5fc930ccc95f275e10e151c8f05db2c05aba01f"
] | [
"unit_tests/tests_labeleddata.py"
] | [
"from builtins import str\nfrom builtins import zip\nfrom builtins import range\nfrom past.builtins import basestring\n\nimport unittest2 as unittest\nimport numpy as np\n\nfrom vsm.viewer.labeleddata import *\n\n\nclass TestLabeleddata(unittest.TestCase):\n\n def setUp(self):\n\n words = ['row', 'row', '... | [
[
"numpy.array",
"numpy.random.random"
]
] |
jorgecarleitao/schemaflow | [
"c489170bf720bbbc0a9dc032884d5df79a84094a"
] | [
"examples/end_to_end_kaggle.py"
] | [
"\"\"\"\nExample of solving a Kaggle problem using schemaflow's API.\n\nThis script performs an end-to-end analysis and prediction of the Kaggle exercise\nhttps://www.kaggle.com/c/house-prices-advanced-regression-techniques\n\nIt demonstrates the advantages of explicitly declaring the types in the Pipe (using Schem... | [
[
"matplotlib.pyplot.legend",
"numpy.log",
"pandas.read_csv",
"pandas.Series",
"sklearn.preprocessing.OneHotEncoder",
"sklearn.model_selection.train_test_split",
"matplotlib.pyplot.savefig",
"numpy.full",
"matplotlib.pyplot.plot",
"numpy.mean",
"matplotlib.pyplot.close",
... |
andreum/user-movie-embedding | [
"0766b4fa6d61ebaf9994e61ca611dc256cd38a24"
] | [
"t9b.py"
] | [
"#\n# andre@corp.insite.com.br\n# 2017-10-10\n# Codigo que faz regressao simples e encontra embeddings\n#\n# a ideia aqui e a seguinte:\n# - carregar dados do movielens\n# - inicializar o embedding de forma aleatoria\n# - encontrar os embeddings de filmes e de usuarios que gerem o menor erro possivel\n# t8: ret... | [
[
"numpy.amax",
"numpy.around",
"numpy.mean",
"tensorflow.summary.scalar",
"tensorflow.Graph",
"pandas.read_csv",
"tensorflow.subtract",
"tensorflow.gather",
"tensorflow.name_scope",
"tensorflow.Session",
"tensorflow.square",
"tensorflow.train.Saver",
"tensorflow.... |
xinshi-chen/l2stop | [
"f9b4f23269c2db110c48fb883287049849492341",
"f9b4f23269c2db110c48fb883287049849492341"
] | [
"dncnn_stop/train_stop_kl.py",
"maml_stop/metal/common/data_utils.py"
] | [
"import cv2\nimport torch\nimport torchvision.utils\nimport torch.optim as optim\nimport torch.nn.functional as F\nimport numpy as np\nimport glob\nimport pprint\nimport os\nimport time\nfrom shutil import copyfile\nimport pdb\nimport random\nfrom collections import Counter, namedtuple\n\nfrom models import DnCNN_D... | [
[
"torch.mean",
"numpy.random.seed",
"torch.cat",
"torch.load",
"torch.manual_seed",
"torch.utils.data.DataLoader",
"numpy.average",
"torch.utils.data.sampler.SubsetRandomSampler",
"torch.nn.DataParallel",
"torch.no_grad",
"torch.cuda.get_device_name",
"torch.cuda.dev... |
aidiary/PRML | [
"db2dfc10bd39dc5649528d3778aa5fffb283186b",
"db2dfc10bd39dc5649528d3778aa5fffb283186b"
] | [
"sklearn/plot_svm_iris.py",
"ch4/least_squares_multiclass.py"
] | [
"#coding:utf-8\nimport numpy as np\nimport pylab as pl\nfrom sklearn import svm, datasets\n\n\"\"\"\n線形SVMでirisデータを分類\n\"\"\"\n\n# データをロード\niris = datasets.load_iris()\nX = iris.data[:, :2]\nY = iris.target\n\n# 分類器を学習\nclf = svm.SVC(C=1.0, kernel='linear')\nclf.fit(X, Y)\n\npl.figure(1)\n\n# メッシュの各点の分類結果を描画\nh = 0... | [
[
"numpy.arange",
"sklearn.datasets.load_iris",
"sklearn.svm.SVC"
],
[
"numpy.dot",
"numpy.linspace",
"numpy.random.multivariate_normal",
"numpy.transpose",
"numpy.array"
]
] |
sbrugman/probfit | [
"0088576251a05b0af64f24cd89f44343b325e988"
] | [
"probfit/oneshot.py"
] | [
"# -*- coding: utf-8 -*-\nimport collections\nimport itertools as itt\n\nimport numpy as np\nfrom iminuit import Minuit\n\nfrom ._libstat import _vector_apply\nfrom .costfunc import BinnedChi2, BinnedLH, UnbinnedLH\nfrom .nputil import minmax\n\n\ndef fit_uml(f, data, quiet=False, print_level=0, *arg, **kwd):\n ... | [
[
"matplotlib.pyplot.legend",
"numpy.linspace",
"numpy.histogram",
"matplotlib.pyplot.hist",
"matplotlib.pyplot.figure"
]
] |
treese41528/LB-CNN | [
"8b3c99a9149d570096dc629f70a5a6ddba71cafa"
] | [
"SimpleNet/SimpleNet.py"
] | [
"# -*- coding: utf-8 -*-\r\n# SimpleNetV1(2016)\r\n# Implementation of https://arxiv.org/abs/1608.06037\r\n# Lets keep it simple, Using simple architectures to outperform deeper and more complex architectures\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nfrom collections import Orde... | [
[
"torch.nn.init.calculate_gain",
"torch.nn.Dropout",
"torch.nn.Dropout2d",
"torch.nn.ModuleDict",
"torch.nn.Conv2d",
"torch.nn.Linear",
"torch.nn.MaxPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
]
] |
Saharae/Final-Project-Group2 | [
"28d26f93b52eb06a1e195e9c7cfe10110f46faec"
] | [
"Code/GUI.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Fri Nov 5 17:04:12 2021\n\n@author: adamkritz\n\"\"\"\n\nimport matplotlib.gridspec as grd\nimport pandas as pd\nimport sys\nfrom PyQt5.QtWidgets import QMainWindow, QAction, QApplication\nimport webbrowser\nfrom PyQt5.QtWidgets import QSizePolicy\n\n \nfrom PyQt5.QtWid... | [
[
"pandas.read_csv",
"matplotlib.figure.Figure",
"matplotlib.backends.backend_qt5agg.NavigationToolbar2QT",
"matplotlib.gridspec.GridSpec",
"matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg"
]
] |
JoElfner/scikit-learn | [
"a538c37de8b7007250a296eddfb3bed6afabd500",
"a538c37de8b7007250a296eddfb3bed6afabd500"
] | [
"sklearn/preprocessing/_data.py",
"sklearn/covariance/_empirical_covariance.py"
] | [
"# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>\n# Mathieu Blondel <mathieu@mblondel.org>\n# Olivier Grisel <olivier.grisel@ensta.org>\n# Andreas Mueller <amueller@ais.uni-bonn.de>\n# Eric Martin <eric@ericmart.in>\n# Giorgio Patrini <giorgio.patrini@anu.edu... | [
[
"numpy.rollaxis",
"numpy.nanmax",
"scipy.stats.norm.ppf",
"numpy.nanmedian",
"numpy.minimum",
"numpy.sqrt",
"numpy.linspace",
"scipy.stats.norm.cdf",
"numpy.asarray",
"numpy.nanmin",
"numpy.zeros_like",
"numpy.nanmean",
"numpy.any",
"numpy.nanstd",
"nump... |
LangwenH/AlphaPose-for-Mice-Behavior | [
"357923f5993a521507fe7359fa763d2b5d2493f7"
] | [
"video_demo.py"
] | [
"import torch\r\nfrom torch.autograd import Variable\r\nimport torch.nn.functional as F\r\nimport torchvision.transforms as transforms\r\n\r\nimport torch.nn as nn\r\nimport torch.utils.data\r\nimport numpy as np\r\nfrom opt import opt\r\n\r\nfrom dataloader import VideoLoader, DetectionLoader, DetectionProcessor, ... | [
[
"torch.multiprocessing.set_start_method",
"torch.cat",
"torch.no_grad",
"numpy.mean",
"torch.multiprocessing.set_sharing_strategy"
]
] |
BhaveshJP25/RSNA | [
"48d85faf82651b1ae4fdcd829ce2d4978a858d3f"
] | [
"2DNet/src/dataset/dataset.py"
] | [
"import torch.utils.data as data\nimport torch\nimport albumentations\nimport cv2\nimport numpy as np\nimport random\nimport math\nfrom settings import train_png_dir\n\ndef generate_transforms(image_size):\n IMAGENET_SIZE = image_size\n\n train_transform = albumentations.Compose([\n albumentations.Resi... | [
[
"numpy.rot90",
"numpy.dot",
"numpy.random.random",
"numpy.math.cos",
"numpy.asarray",
"torch.utils.data.DataLoader",
"numpy.concatenate",
"numpy.max",
"torch.FloatTensor",
"numpy.math.sin",
"numpy.random.uniform",
"numpy.array"
]
] |
sebasmos/Spacenet7TRDP | [
"03b5819321108017f8f8c2d359264c8e18d9e38a"
] | [
"Segmentation/baseline/src/sn7_baseline_postproc_funcs.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Aug 25 14:11:02 2020\n\n@author: avanetten\n\"\"\"\n\nfrom shapely.ops import cascaded_union\nimport matplotlib.pyplot as plt\nimport geopandas as gpd\nimport multiprocessing\nimport pandas as pd\nimport numpy as np\nimport skimage.io\nimport ... | [
[
"numpy.max"
]
] |
jukedl/tensorflow | [
"57f08cbd1fe217a4befe8ab650598acf6458f965"
] | [
"tensorflow/python/compat/compat.py"
] | [
"# Copyright 2018 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.python.util.tf_export.tf_export"
]
] |
TriceHelix/ASMAGAN | [
"6e2b5b587f88f641fdcc05a81cf5f0b4d6a9f3e1",
"6e2b5b587f88f641fdcc05a81cf5f0b4d6a9f3e1"
] | [
"utilities/LossUtili.py",
"export_scripts/export_gen_onnx.py"
] | [
"#!/usr/bin/env python3\n# -*- coding:utf-8 -*-\n#############################################################\n# File: LossUtili.py\n# Created Date: Thursday October 10th 2019\n# Author: Chen Xuanhong\n# Email: chenxuanhongzju@outlook.com\n# Last Modified: Monday, 14th October 2019 5:19:31 pm\n# Modified By: Chen... | [
[
"torch.sum",
"torch.nn.functional.binary_cross_entropy_with_logits",
"torch.autograd.grad",
"torch.nn.ReLU"
],
[
"torch.randn",
"torch.onnx.export",
"torch.ones",
"torch.load"
]
] |
Azbesciak/RadonTransform | [
"5a3b722ae4515c31c74f38323fa183da60a3e701"
] | [
"dicom_reader.py"
] | [
"import pydicom\nfrom pydicom.data import get_testdata_files\nimport matplotlib.pyplot as plt\n# get some test data\n# filename = get_testdata_files(\"CT_small.dcm\")[0]\nfilename = \"my_dicom.dic\"\nds = pydicom.dcmread(filename)\npixel_bytes = ds.pixel_array\nprint(ds.PatientName)\n\nprint(ds[0x10,0x10].value)\n\... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots"
]
] |
TongheYing/ML-Au | [
"0790b0fb44612595c336e3cf2fda3287b7797a2a",
"0790b0fb44612595c336e3cf2fda3287b7797a2a"
] | [
"local/pso/pso_sp.py",
"dataset-ML/N20/vasp/read_static.py"
] | [
"#!/usr/bin/env python\n# -*- coding:utf-8 -*-\n\nimport os\nimport numpy as np\nimport copy\nfrom local.pso.pso_atoms import PsoAtoms\nfrom local.pso.Pre_Relax import PreRelax\nfrom scipy.optimize import linear_sum_assignment\n\n\nclass Pso(object):\n \"\"\"Pso object.\n\n The Pso object contains the main pr... | [
[
"numpy.abs",
"numpy.random.rand",
"numpy.argsort",
"scipy.optimize.linear_sum_assignment",
"numpy.array"
],
[
"numpy.zeros"
]
] |
loicdiridollou/pandas-loic | [
"ccb36cc8f1eeed53dea321ee7381602a6957de54",
"2f203d11ef1dba251b6cd3df89d073bf5b970e68",
"ccb36cc8f1eeed53dea321ee7381602a6957de54"
] | [
"pandas/tests/indexes/test_indexing.py",
"pandas/core/series.py",
"pandas/compat/_optional.py"
] | [
"\"\"\"\ntest_indexing tests the following Index methods:\n __getitem__\n get_loc\n get_value\n __contains__\n take\n where\n get_indexer\n get_indexer_for\n slice_locs\n asof_locs\n\nThe corresponding tests.indexes.[index_type].test_indexing files\ncontain tests for the corresponding ... | [
[
"pandas._testing.assert_almost_equal",
"pandas.core.api.UInt64Index",
"pandas._testing.assert_produces_warning",
"pandas._testing.assert_numpy_array_equal",
"pandas.Series",
"numpy.arange",
"pandas.Index",
"pandas.DatetimeIndex",
"pandas.core.api.Float64Index",
"numpy.rando... |
Octavian-ai/shortest-path | [
"7baef8d4cad13297fa2d08b5ac0f19f06bb708e3"
] | [
"macgraph/train.py"
] | [
"\nimport tensorflow as tf\nfrom tensorflow.python import debug as tf_debug\nfrom collections import namedtuple\n\nfrom .estimator import get_estimator\nfrom .input import gen_input_fn\nfrom .args import *\n\n# Make TF be quiet\nimport os\nos.environ[\"TF_CPP_MIN_LOG_LEVEL\"]=\"2\"\n\nimport logging\nlogger = loggi... | [
[
"tensorflow.python_io.tf_record_iterator",
"tensorflow.logging.info",
"tensorflow.estimator.train_and_evaluate",
"tensorflow.python.debug.LocalCLIDebugHook"
]
] |
Vibhu-Agarwal/pandas | [
"9c0f6a8d703b6bee48918f2c5d16418a7ff736e3",
"bb43726e1f52a0ddee45fcf485690719f262870d"
] | [
"asv_bench/benchmarks/series_methods.py",
"pandas/core/generic.py"
] | [
"from datetime import datetime\n\nimport numpy as np\nimport pandas.util.testing as tm\nfrom pandas import Series, date_range, NaT\n\n\nclass SeriesConstructor(object):\n\n params = [None, 'dict']\n param_names = ['data']\n\n def setup(self, data):\n self.idx = date_range(start=datetime(2015, 10, 26... | [
[
"pandas.Series",
"numpy.arange",
"pandas.util.testing.makeStringIndex",
"numpy.full",
"numpy.random.randn",
"pandas.date_range",
"numpy.zeros",
"numpy.random.randint"
],
[
"pandas.tseries.frequencies.to_offset",
"pandas.util._validators.validate_bool_kwarg",
"pandas... |
antsfamily/torchtool | [
"fd0d6e6fe6701206b15f95af145d6178a87233f9"
] | [
"torchlib/module/loss/contrast.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# @Date : 2019-07-24 18:29:48\n# @Author : Zhi Liu (zhiliu.mind@gmail.com)\n# @Link : http://iridescent.ink\n# @Version : $1.0$\n\nimport torch as th\nimport torchlib as tl\n\n\nclass ContrastReciprocalLoss(th.nn.Module):\n r\"\"\"ContrastReciprocalLoss\n\n... | [
[
"torch.mean",
"torch.manual_seed",
"torch.randn",
"torch.sum",
"torch.is_complex",
"torch.pow"
]
] |
hhy37/tensor2tensor | [
"b4094d065fa0ae8842cd667fb0e5a2c652407c9c",
"b4094d065fa0ae8842cd667fb0e5a2c652407c9c"
] | [
"tensor2tensor/layers/latent_layers_test.py",
"tensor2tensor/models/video/basic_recurrent.py"
] | [
"# coding=utf-8\n# Copyright 2018 The Tensor2Tensor Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requir... | [
[
"tensorflow.contrib.eager.run_test_in_graph_and_eager_modes",
"tensorflow.test.main",
"tensorflow.global_variables_initializer",
"tensorflow.uniform_unit_scaling_initializer",
"tensorflow.train.create_global_step",
"tensorflow.random_uniform"
],
[
"tensorflow.layers.conv2d",
"t... |
Monytccc/Script313 | [
"ecd1a28c964f721dc2c21824dde887b013893491"
] | [
"bruteforce.py"
] | [
"import string\r\nfrom itertools import product\r\nfrom time import time\r\nfrom numpy import loadtxt\r\n\r\n\r\ndef product_loop(password, generator):\r\n for p in generator:\r\n if ''.join(p) == password:\r\n print('\\nPassword:', ''.join(p))\r\n return ''.join(p)\r\n return Fal... | [
[
"numpy.loadtxt"
]
] |
gwli/supervised-reptile | [
"5b181577e139a7854729650bac9410b9bb5d29d9",
"5b181577e139a7854729650bac9410b9bb5d29d9"
] | [
"supervised_reptile/train.py",
"supervised_reptile/reptile.py"
] | [
"\"\"\"\nTraining helpers for supervised meta-learning.\n\"\"\"\n\nimport os\nimport time\n\nimport tensorflow as tf\n\nfrom .reptile import Reptile\nfrom .variables import weight_decay\n\n# pylint: disable=R0913,R0914\ndef train(sess,\n model,\n train_set,\n test_set,\n save_dir... | [
[
"tensorflow.placeholder",
"tensorflow.global_variables_initializer",
"tensorflow.summary.merge_all",
"tensorflow.train.Saver",
"tensorflow.summary.scalar"
],
[
"tensorflow.get_collection",
"tensorflow.trainable_variables"
]
] |
yogeshmj/clinica | [
"1588d708eb401731c62ca23c2db26c29e2ad92e6"
] | [
"clinica/iotools/converters/adni_to_bids/adni_modalities/adni_dwi.py"
] | [
"# coding: utf-8\n\n\"\"\"\n Module for converting DWI of ADNI\n\"\"\"\n\n__author__ = \"Jorge Samper-Gonzalez and Sabrina Fontanella\"\n__copyright__ = \"Copyright 2016-2019 The Aramis Lab Team\"\n__license__ = \"See LICENSE.txt file\"\n__version__ = \"0.1.0\"\n__maintainer__ = \"Jorge Samper-Gonzalez\"\n__email__... | [
[
"pandas.concat",
"pandas.read_csv",
"pandas.DataFrame"
]
] |
Komnomnomnom/pandas | [
"1b43f0fcfc882bcd499f6da114df104ee3813748"
] | [
"pandas/io/tests/test_pytables.py"
] | [
"import nose\nimport sys\nimport os\nimport warnings\nimport tempfile\nfrom contextlib import contextmanager\n\nimport datetime\nimport numpy as np\n\nimport pandas\nfrom pandas import (Series, DataFrame, Panel, MultiIndex, bdate_range,\n date_range, Index, DatetimeIndex, isnull)\nfrom pandas.io.... | [
[
"pandas.io.pytables.read_hdf",
"pandas.util.testing.skip_if_no_package",
"pandas.io.pytables.HDFStore",
"pandas.Series",
"numpy.asarray",
"pandas.util.testing.assert_produces_warning",
"pandas.MultiIndex.from_tuples",
"pandas.DataFrame",
"pandas.io.pytables.get_store",
"pan... |
sandiegodata-projects/downtown-partnership | [
"2ee6f01a8efd5ee7452939dcb3d273e890c69a92"
] | [
"src/dtcv/src/dtcv/pt_lib.py"
] | [
"import numpy as np\nfrom shapely.geometry import Polygon\n\n# Pad and unpack the transformation matrix to be 3x1 or 3x3,\n# necessary for it to handle both rotation and translation\npad = lambda x: np.hstack([x, np.ones((x.shape[0], 1))])\nunpad = lambda x: x[:, :-1]\n\ndef norm(pri):\n pri = pri.copy()\n pr... | [
[
"numpy.array",
"numpy.abs",
"numpy.ones"
]
] |
gluesolutions/glue-vispy-viewers | [
"7ce0c55989eee9dc4056e5ce1547591cbaab86b6"
] | [
"glue_vispy_viewers/common/axes.py"
] | [
"from vispy import scene\nfrom vispy.visuals.transforms import STTransform, ChainTransform\n\nfrom glue_vispy_viewers.compat.axis import Axis\n\nimport numpy as np\n\n\nclass AxesVisual3D(object):\n\n def __init__(self, view=None, transform=None, **kwargs):\n\n self.view = view\n\n # Add a 3D cube ... | [
[
"numpy.array"
]
] |
PMatthaei/pymarl | [
"eeec978e930c9e36d8102724c3b4d0459547cb36"
] | [
"src/components/action_selectors.py"
] | [
"import torch as th\nfrom torch.distributions import Categorical\nfrom .epsilon_schedules import DecayThenFlatSchedule\n\nREGISTRY = {}\n\n\nclass MultinomialActionSelector():\n\n def __init__(self, args):\n self.args = args\n\n self.schedule = DecayThenFlatSchedule(args.epsilon_start, args.epsilon... | [
[
"torch.distributions.Categorical",
"torch.rand_like"
]
] |
tommy-qichang/FedML | [
"55ebb00ab11a70ac074e613c6ab2c09f053db70c"
] | [
"fedml_api/model/cv/resnetLab.py"
] | [
"import os, sys, math\nimport torch.nn as nn\nimport torch.utils.model_zoo as model_zoo\n\n# add the FedML root directory to the python path\nsys.path.insert(0, os.path.abspath(os.path.join(os.getcwd(), \"../../../\")))\n\nfrom fedml_api.model.cv.batchnorm_utils import SynchronizedBatchNorm2d\n\nclass Bottleneck(nn... | [
[
"torch.nn.Sequential",
"torch.nn.Conv2d",
"torch.nn.MaxPool2d",
"torch.rand",
"torch.nn.ReLU",
"torch.utils.model_zoo.load_url"
]
] |
avinashsai/metrics | [
"e383af24085bf7c0bd4e08db2757c25ff4feccdc"
] | [
"tests/classification/test_accuracy.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.tensor",
"numpy.all",
"numpy.transpose",
"numpy.array",
"sklearn.metrics.accuracy_score"
]
] |
DeuroIO/Deuro-scikit-learn | [
"9dd09a19593d1224077fe0d1a754aed936269528",
"9dd09a19593d1224077fe0d1a754aed936269528",
"9dd09a19593d1224077fe0d1a754aed936269528",
"9dd09a19593d1224077fe0d1a754aed936269528",
"9dd09a19593d1224077fe0d1a754aed936269528",
"9dd09a19593d1224077fe0d1a754aed936269528",
"9dd09a19593d1224077fe0d1a754aed93626952... | [
"sklearn/linear_model/coordinate_descent.py",
"examples/cluster/plot_adjusted_for_chance_measures.py",
"sklearn/preprocessing/tests/test_encoders.py",
"examples/linear_model/plot_logistic_path.py",
"examples/cluster/plot_agglomerative_clustering.py",
"sklearn/utils/stats.py",
"examples/neighbors/plot_re... | [
"# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>\n# Fabian Pedregosa <fabian.pedregosa@inria.fr>\n# Olivier Grisel <olivier.grisel@ensta.org>\n# Gael Varoquaux <gael.varoquaux@inria.fr>\n#\n# License: BSD 3 clause\n\nimport sys\nimport warnings\nfrom abc import ABCMeta, abstractme... | [
[
"numpy.rollaxis",
"numpy.dot",
"numpy.asarray",
"numpy.mean",
"numpy.argmin",
"scipy.sparse.issparse",
"numpy.may_share_memory",
"numpy.reshape",
"numpy.flatnonzero",
"numpy.atleast_1d",
"numpy.finfo",
"numpy.zeros",
"numpy.asfortranarray",
"scipy.sparse.csr... |
vishalsingha/Colorme | [
"0bd72692444744b167ef82df4d885ca04ad746d3"
] | [
"utils.py"
] | [
"from flask import Flask, request, redirect, url_for, render_template, flash\r\nimport numpy as np\r\nimport tensorflow as tf\r\nimport keras\r\nimport os\r\nfrom werkzeug.utils import secure_filename\r\nfrom keras.models import Sequential\r\nfrom keras.layers import Dense, Conv2D, MaxPooling2D, UpSampling2D, Inpu... | [
[
"tensorflow.lite.Interpreter",
"tensorflow.keras.applications.VGG16",
"numpy.repeat",
"numpy.array",
"numpy.zeros"
]
] |
c0g/tensorflow_current | [
"f49aca4532c155597c669cf2189f211cafbebf96"
] | [
"tensorflow/python/framework/gen_docs_combined.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.flags.DEFINE_boolean",
"tensorflow.python.framework.docs.collect_members",
"tensorflow.flags.DEFINE_string",
"tensorflow.python.framework.docs.Library",
"tensorflow.python.framework.docs.write_libraries",
"tensorflow.logging.error",
"tensorflow.python.framework.docs.Index",... |
zwxu064/TransInit | [
"134ac0463684e695448c18486f200053d372cf66",
"134ac0463684e695448c18486f200053d372cf66"
] | [
"third_party/rloss/pytorch_deeplab_v3_plus/dataloaders/datasets/pascal.py",
"third_party/rloss/pytorch_deeplab_v3_plus/dataloaders/datasets/ade20k.py"
] | [
"from __future__ import print_function, division\nimport os\nfrom PIL import Image\nimport numpy as np\nfrom torch.utils.data import Dataset\nfrom ..custom_path import Path\nfrom torchvision import transforms\nfrom ..custom_transforms import FixScaleCrop, RandomHorizontalFlip\nfrom ..custom_transforms import Random... | [
[
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.title",
"torch.utils.data.DataLoader",
"numpy.ones",
"matplotlib.pyplot.subplot",
"numpy.transpose",
"numpy.array",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
],
[
"numpy.array",
"torch.from_numpy"
]
] |
yassirf/sequence-training | [
"a7cd7a9bb2f4f1d76c4f62a62704e396ad029540",
"a7cd7a9bb2f4f1d76c4f62a62704e396ad029540",
"a7cd7a9bb2f4f1d76c4f62a62704e396ad029540"
] | [
"examples/self_distribution_distillation/self_distribution_distillation_src/criterions/distributiondir.py",
"examples/self_distribution_distillation/self_distribution_distillation_src/uncertainty/categorical.py",
"examples/self_distribution_distillation/self_distribution_distillation_src/criterions/distillation... | [
"import math\nfrom dataclasses import dataclass, field\n\nimport torch\nfrom torch.distributions.dirichlet import Dirichlet\nfrom fairseq import metrics, utils\nfrom fairseq.criterions import register_criterion\nfrom fairseq.criterions.label_smoothed_cross_entropy import (\n LabelSmoothedCrossEntropyCriterion\n)... | [
[
"torch.exp",
"torch.distributions.dirichlet.Dirichlet",
"torch.distributions.kl.kl_divergence",
"torch.zeros_like"
],
[
"torch.stack",
"torch.logsumexp",
"torch.log_softmax"
],
[
"torch.zeros_like",
"torch.exp",
"torch.log_softmax",
"torch.no_grad",
"torch.g... |
itsjohnward/wilds | [
"aeafefd01456840c7bd5173d714b184ec86758af",
"aeafefd01456840c7bd5173d714b184ec86758af"
] | [
"wilds/examples/losses.py",
"wilds/examples/algorithms/groupDRO.py"
] | [
"import torch.nn as nn\r\nfrom wilds.common.metrics.loss import ElementwiseLoss, Loss, MultiTaskLoss\r\nfrom wilds.common.metrics.all_metrics import MSE\r\n\r\ndef initialize_loss(config, d_out):\r\n if config.get('loss_function') == 'cross_entropy':\r\n return ElementwiseLoss(loss_fn=nn.CrossEntropyLoss(... | [
[
"torch.nn.CrossEntropyLoss",
"torch.nn.BCEWithLogitsLoss"
],
[
"torch.exp",
"torch.zeros"
]
] |
BeautyOfWeb/VIN | [
"a0bd0a15fb26b00d76f5290de093f529b928b3a0"
] | [
"dl/models/factor_graph.py"
] | [
"import torch.nn as nn\nimport torch.nn.functional as F\n\n\nclass Factor1d(nn.Module):\n \"\"\"Similar to masked attention\n \n \"\"\"\n def __init__(self, in_features, in_dim, out_features, out_dim, adj_mat=None, bias=True):\n super(Factor1d, self).__init__()\n self.linear1 = nn.Linear(in_dim, out_dim, ... | [
[
"torch.nn.Linear"
]
] |
dorianhenning/SPIN | [
"6595195a1837ff22a3844c099199bda2f085a557"
] | [
"utils/imutils.py"
] | [
"\"\"\"\nThis file contains functions that are used to perform data augmentation.\n\"\"\"\nimport torch\nimport numpy as np\nimport scipy.misc\nimport cv2\nfrom PIL import Image\n\nimport SPIN.constants\n\ndef get_transform(center, scale, res, rot=0):\n \"\"\"Generate transformation matrix.\"\"\"\n h = 200 * ... | [
[
"numpy.dot",
"numpy.fliplr",
"numpy.linalg.inv",
"numpy.eye",
"numpy.cos",
"numpy.linalg.norm",
"numpy.sin",
"numpy.deg2rad",
"numpy.array",
"numpy.zeros"
]
] |
hchau630/nn-analysis | [
"0fbe7ad7b2b4566b9f88d8f21413a6d405f96bdc",
"0fbe7ad7b2b4566b9f88d8f21413a6d405f96bdc",
"0fbe7ad7b2b4566b9f88d8f21413a6d405f96bdc",
"0fbe7ad7b2b4566b9f88d8f21413a6d405f96bdc"
] | [
"nn_analysis/acts/utils.py",
"nn_analysis/acts/core.py",
"nn_analysis/models/archs/barlowtwins/base.py",
"nn_analysis/utils.py"
] | [
"import pathlib\nimport os\n\nimport numpy as np\n\nfrom nn_analysis import utils, exceptions\nfrom nn_analysis.constants import ENV_CONFIG_PATH, ACTS_CONFIGS_PATH\n\nenv_config = utils.load_config(ENV_CONFIG_PATH)\nacts_configs = utils.load_config(ACTS_CONFIGS_PATH)\n\nDEFAULT_SAVE_LOC = 'save_acts_path' # If you ... | [
[
"numpy.allclose"
],
[
"torch.no_grad",
"torch.utils.data.DataLoader",
"numpy.random.choice",
"torch.arange"
],
[
"torch.nn.Sequential",
"torch.nn.BatchNorm1d",
"torch.diagonal",
"torch.nn.Linear",
"torch.nn.Identity",
"torch.nn.ReLU",
"torch.distributed.all_... |
mgarbade/models | [
"6dc1dbe28556375403d0b4b91b561c07387df982"
] | [
"official/resnet/cifar10_main.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.image.resize_image_with_crop_or_pad",
"tensorflow.transpose",
"tensorflow.image.random_flip_left_right",
"tensorflow.decode_raw",
"tensorflow.reshape",
"tensorflow.cast",
"tensorflow.data.FixedLengthRecordDataset",
"tensorflow.random_crop",
"tensorflow.image.per_ima... |
jpwright/foobot-slack | [
"ffc1cf8490d08433d76bb62cbf7440c765089784"
] | [
"foobot_grapher.py"
] | [
"#!/usr/bin/env python\n\nfrom pyfoobot import Foobot\nimport requests\nimport matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.dates\nimport matplotlib.pyplot\nimport datetime\nfrom imgurpython import ImgurClient\nimport ConfigParser\n\ndef getSensorReadings(notify):\n\n\tconfig = ConfigParser.ConfigParser()\n... | [
[
"matplotlib.dates.DateFormatter",
"matplotlib.dates.MinuteLocator",
"matplotlib.use",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.xlabel",
"matplotlib.dates.HourLocator",
"matplotlib.pyplot.ylabel"
]
] |
MQSdk/optimal-ph | [
"23659b661d7c2a932886f9472ccb233ed132a73f"
] | [
"src/predict.py"
] | [
"import argparse\n\nimport os\nimport pickle\nimport zipfile\nimport pandas as pd\nimport numpy as np\nfrom sklearn.pipeline import make_pipeline\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.svm import SVR\n\nfrom utils import remove_linebreak,remove_mafft_train,fasta_to_numpy,read_embedding_matr... | [
[
"pandas.read_csv",
"numpy.sum"
]
] |
DeepLearnXMU/ABDNMT-Transformer | [
"9477fcf040b59e577a6eb071d173aab243ca0beb",
"9477fcf040b59e577a6eb071d173aab243ca0beb"
] | [
"thumt/models/abdtransformer.py",
"thumt/bin/abdtranslator.py"
] | [
"# coding=utf-8\n# Copyright 2017-2019 The THUMT Authors\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport copy\n\nimport tensorflow as tf\n\nimport thumt.interface as interface\nimport thumt.layers as layers\nimport thumt.utils.getter as get... | [
[
"tensorflow.nn.bias_add",
"tensorflow.nn.relu",
"tensorflow.get_variable",
"tensorflow.matmul",
"tensorflow.nn.log_softmax",
"tensorflow.shape",
"tensorflow.zeros",
"tensorflow.reduce_sum",
"tensorflow.reshape",
"tensorflow.cast",
"tensorflow.expand_dims",
"tensorfl... |
ZY-KK/panda | [
"48fcbd65d563ef74aab2554be8de7662560c43da"
] | [
"panda_goal_reaching/controllers/robot_supervisor_manager/agent/ppo.py"
] | [
"import os\nimport numpy as np\nimport torch as T\nimport torch.nn as nn\nimport torch.optim as optim\nfrom torch.distributions.categorical import Categorical\n\n\nclass PPOMemory:\n def __init__(self, batch_size):\n self.states = []\n self.probs = []\n self.vals = []\n self.actions =... | [
[
"torch.distributions.categorical.Categorical",
"torch.nn.Softmax",
"torch.clamp",
"torch.load",
"numpy.arange",
"torch.min",
"numpy.random.shuffle",
"torch.tensor",
"torch.nn.Linear",
"torch.cuda.is_available",
"torch.nn.ReLU",
"numpy.array",
"torch.squeeze"
]... |
jihoonl/ladder-densenet | [
"12626ce339625862d16f91bc692f64799da8bc31",
"12626ce339625862d16f91bc692f64799da8bc31"
] | [
"models/voc2012/dense_net.py",
"config/voc2012/resnet.py"
] | [
"import os, re\nimport pickle\nimport tensorflow as tf\nimport numpy as np\n#import cv2\nfrom os.path import join\n\nimport tensorflow.contrib.layers as layers\nfrom tensorflow.contrib.framework import arg_scope\n#import skimage as ski\n#import skimage.io\n\nimport libs.cylib as cylib\nimport train_helper\nimport l... | [
[
"tensorflow.device",
"tensorflow.concat",
"tensorflow.control_dependencies",
"tensorflow.stack",
"tensorflow.minimum",
"tensorflow.image.resize_bicubic",
"numpy.mean",
"tensorflow.train.AdamOptimizer",
"tensorflow.summary.scalar",
"tensorflow.contrib.layers.variance_scaling... |
qqsun8819/oneflow | [
"b61e07b3406cc5c2d71f3d5e8b0f4de9b3fb9e40",
"b61e07b3406cc5c2d71f3d5e8b0f4de9b3fb9e40",
"b61e07b3406cc5c2d71f3d5e8b0f4de9b3fb9e40"
] | [
"oneflow/python/test/ops/test_gpt_data_loader.py",
"oneflow/python/test/modules/test_sign.py",
"oneflow/python/test/ops/test_quantize_op.py"
] | [
"\"\"\"\nCopyright 2020 The OneFlow Authors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by ap... | [
[
"numpy.array_equal",
"numpy.array",
"numpy.stack"
],
[
"numpy.sign",
"numpy.random.randn",
"numpy.zeros_like"
],
[
"numpy.random.random",
"numpy.abs",
"numpy.allclose",
"numpy.min",
"numpy.rint",
"numpy.full",
"numpy.round",
"numpy.max",
"numpy.p... |
AmisiJospin/Covid-19-Visualization | [
"84fd6e830455785d3ae76fe4f4a8183f24575b1e"
] | [
"COVID-9 Visualization.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\"\"\"\nCreated on Wed Oct 27 09:44:29 2021\n\n@author: Jospin Amisi\n\"\"\"\n\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport matplotlib.dates as mdates\n\n#Gathering data and plotting Total World Cases\n\nget_ipython().run_line_magic('matplotlib', 'inline')\n... | [
[
"matplotlib.pyplot.legend",
"pandas.read_csv",
"matplotlib.pyplot.show",
"matplotlib.pyplot.style.use",
"matplotlib.pyplot.figure"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.