repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list | possible_versions list |
|---|---|---|---|---|---|
tpuig99/SS_20212C_TP5 | [
"6cb23fc764fbcb35d826bb97e3d69a37c98cac38"
] | [
"flowPlotterPlotEXTRA.py"
] | [
"import sys,time,json,math,random\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\nimport statistics\r\n\r\n# Example Run\r\n# python .\\Analysis\\plotChart1.py .\\GraphData\\chart_paper_1.json\r\n\r\ndata = -1\r\nfileName1 = -1\r\nfileName2 = -1\r\nfileName3 = -1\r\n\t\r\ndef plotFlow():\r\n\tgroup = ['... | [
[
"matplotlib.pyplot.errorbar",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
zyyang/fashion_compatibility_mcn | [
"33d64cc5e14f10cc4e25495a7fcc22a8fe9104bf",
"33d64cc5e14f10cc4e25495a7fcc22a8fe9104bf"
] | [
"baselines/ggnn/train.py",
"mcn/revision.py"
] | [
"import logging\nimport sys\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torchvision\nfrom sklearn import metrics\nfrom torch.optim import lr_scheduler\nfrom torchvision import models\n\nfrom model import CompatModel\nfrom utils import AverageMeter, BestSaver, ... | [
[
"sklearn.metrics.roc_auc_score",
"numpy.log",
"torch.cat",
"sklearn.metrics.accuracy_score",
"torch.nn.BCELoss",
"torch.no_grad",
"torch.device",
"numpy.where",
"torch.optim.lr_scheduler.StepLR"
],
[
"matplotlib.use",
"torch.no_grad",
"matplotlib.pyplot.rc",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
cvte-research-datamining/AIMeetsBeautyChallenge | [
"334afe644e504ab5c70451dfc391f195e9506618"
] | [
"losses.py"
] | [
"import torch.nn as nn\nimport torch\nimport torch.nn.functional as F\n\n\ndef deepinfo_loss(real, fake):\n logits_real = F.binary_cross_entropy_with_logits(real, torch.ones_like(real))\n logits_fake = F.binary_cross_entropy_with_logits(fake, torch.zeros_like(fake))\n\n # shape: [num_imgs, 1]\n loss = l... | [
[
"torch.ones",
"torch.Tensor",
"torch.zeros_like",
"torch.eye",
"torch.exp",
"torch.ones_like"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
aot-devs/K3D-jupyter | [
"d022a45291e9593535e28e94ab043aa026cf5458"
] | [
"k3d/factory.py"
] | [
"# optional dependency\ntry:\n # noinspection PyPackageRequirements\n import vtk\n\n # noinspection PyPackageRequirements\n from vtk.util import numpy_support as nps\nexcept ImportError:\n vtk = None\n nps = None\n\nimport numpy as np\nimport six\n\nfrom .colormaps import matplotlib_color_maps\nfr... | [
[
"numpy.min",
"numpy.max",
"numpy.shape",
"numpy.zeros_like",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
COMoER/AI2651-Project | [
"4714b770a12e328abcfce93046cd1c9d85a095df"
] | [
"model.py"
] | [
"import numpy as np\r\nfrom vad_utils import read_label_from_file,prediction_to_vad_label\r\nfrom evaluate import get_metrics\r\nimport os\r\nimport matplotlib.pyplot as plt\r\nimport librosa\r\nfrom tqdm import tqdm\r\n\r\n#过零率\r\ndef sgn(x:np.ndarray):\r\n y = np.ones(x.shape,np.int32)\r\n y[x < 0] = 0\r\n ... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.plot",
"numpy.round",
"numpy.exp",
"numpy.pad",
"numpy.fft.rfftfreq",
"numpy.arange",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.close",
"numpy.float32",
"matplotlib.pyplot.waitforbuttonpress",
"numpy.zeros",
"... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
scikit-quant/scikit-quant | [
"397ab0b6287f3815e9bcadbfadbe200edbee5a23"
] | [
"tutorials/hubbard.py"
] | [
"import logging_setup\nimport logging\nimport numpy as np\nimport openfermion as of\nimport os\nimport qiskit as qk\nimport qiskit.opflow as qk_opflow\nimport qiskit.quantum_info as qk_qi\nimport uccsd_evolution\nimport scipy.linalg as spla\nimport warnings\n\ntry:\n from hubbard_bqskit import BQSKit_Hubbard_Opt... | [
[
"numpy.subtract",
"numpy.round",
"scipy.linalg.eigh",
"numpy.add",
"numpy.array",
"numpy.random.default_rng"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"0.13",
"0.14",
"0.15",
"0.12",
"0.10"
],
"tensorflow": []
}
] |
rvkupper/8dm50-machine-learning | [
"3afdae876721ea09049dafbbd3ffad2a80e480b1"
] | [
"practicals/code/unet_utils.py"
] | [
"import numpy as np\nfrom PIL import Image\nfrom sklearn.feature_extraction.image import extract_patches_2d\nimport gryds\nimport time\nimport matplotlib.pyplot as plt\nimport tifffile as tif # ADDED TO WORK ON WINDOWS\nfrom random import randrange\nimport gryds\n\n\ndef load_data(impaths_all, test=False):\n \"\... | [
[
"numpy.concatenate",
"numpy.ceil",
"numpy.zeros_like",
"numpy.random.rand",
"numpy.floor",
"numpy.random.uniform",
"numpy.array",
"sklearn.feature_extraction.image.extract_patches_2d",
"numpy.zeros",
"numpy.random.randint"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Bharat123rox/tensorflow | [
"04f2870814d2773e09dcfa00cbe76a66a2c4de88",
"b818cbe0a53ed8470c0353f13f18141cf2c425a1"
] | [
"tensorflow/python/framework/device_spec.py",
"tensorflow/python/platform/resource_loader.py"
] | [
"# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.python.util.tf_export.tf_export"
],
[
"tensorflow.python.util.tf_export.tf_export"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.5",
"1.7",
"1.4"
]
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.5",
"1.7",
"1.4"
]
}
] |
Alchemist1024/TextClassificationBenchmark | [
"77cbf922e3abe1241961c2759170a4657a3a4672"
] | [
"models/CNN_Inception.py"
] | [
"# -*- coding: utf-8 -*-\n\n\nimport torch as t\nimport torch\nimport numpy as np\nfrom torch import nn\nfrom collections import OrderedDict\n\nclass Inception(nn.Module):\n def __init__(self,cin,co,relu=True,norm=True):\n super(Inception, self).__init__()\n assert(co%4==0)\n cos=[co/4]*4\n ... | [
[
"torch.nn.Sequential",
"torch.nn.BatchNorm1d",
"torch.cat",
"torch.from_numpy",
"torch.nn.Embedding",
"torch.arange",
"torch.nn.MaxPool1d",
"torch.nn.Conv1d",
"torch.nn.ReLU"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Sids2k-Shravan-3501/Dash-Recommender | [
"e4c135c6a9953740b19a7fba44d6973db0d6509e"
] | [
"predict.py"
] | [
"from tensorflow.keras.models import load_model\nfrom train.hashing import hashpredict\nimport numpy as np\n\n\n\ndef predict_bestDashes(user_name,x):\n\tmodel = load_model(\"model/model.tf\")\n\tuser_ratings = np.loadtxt(open(\"data/input.csv\"), delimiter=\",\", skiprows=1)\n\tusers,dashes = user_ratings[:,0],use... | [
[
"tensorflow.keras.models.load_model",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"2.7",
"2.2",
"2.3",
"2.4",
"2.5",
"2.6"
]
}
] |
subhayuroy/Advanced_ImageProcessing | [
"52ab4e52317ec022de42b8927554ba00b4b2a405"
] | [
"Image Processing/imageprocessing.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"ImageProcessing.ipynb\n\nAutomatically generated by Colaboratory.\n\nOriginal file is located at\n https://colab.research.google.com/drive/1p32u78fh3vzTuK3TgaF9Aj9NXw5ztAnC\n\"\"\"\n\nfrom scipy import ndimage\nimport numpy as np\n\n\"\"\"###Opening and writing to image files\"\"\... | [
[
"matplotlib.pyplot.imshow",
"numpy.flipud",
"numpy.random.randn",
"scipy.ndimage.binary_opening",
"numpy.histogram",
"numpy.random.randint",
"scipy.misc.face",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.axis",
"numpy.zeros",
"matplotlib.pyplot.figure",
"matplot... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"0.13",
"1.6",
"0.14",
"1.10",
"0.15",
"1.4",
"1.3",
"1.9",
"0.19",
"1.5",
"0.18",
"1.2",
"1.7",
"0.12",
"1.0",
"0.17",
"0.16",
"1.8"
... |
aoen/tfx | [
"b7e52a412af2a4f99c74d086433adbcb0af5b694"
] | [
"tfx/orchestration/portable/execution_publish_utils_test.py"
] | [
"# Copyright 2020 Google LLC. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appl... | [
[
"tensorflow.test.main"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
donghangliu06/data-mining-for-apps | [
"435c63437b13d2c7f80d01bcc995478f7fe7468d"
] | [
"code/AppVisualization.py"
] | [
"import pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns\ndf = pd.read_csv(r\"E:\\yanyi\\DataMining\\GooglePlayStore\\cleanedApp1113.csv\")\nprint(df.info())\ndf['main_category'] = df['main_category'].astype('category')\ndf['content_rating'] = df['content_rating'].astype('category')\n# df['len_t... | [
[
"pandas.read_csv",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.xticks",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
QU-XIAO/yambopy | [
"ff65a4f90c1bfefe642ebc61e490efe781709ff9"
] | [
"yambopy/dbs/latticedb.py"
] | [
"# Copyright (c) 2018, Henrique Miranda\n# All rights reserved.\n#\n# This file is part of the yambopy project\n#\nimport os\nimport numpy as np\nfrom itertools import product\nfrom netCDF4 import Dataset\nfrom yambopy.tools.jsonencoder import JsonDumper, JsonLoader\nfrom yambopy.lattice import vol_lat, rec_lat, ca... | [
[
"numpy.dot",
"numpy.linalg.inv",
"numpy.linalg.norm",
"numpy.array",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
marcozullich/cifar10-fast | [
"85696b45a43103626ae75cac3ae262f48cfdfd34"
] | [
"torch_backend.py"
] | [
"import numpy as np\nimport torch\nfrom torch import nn\nfrom core import *\nfrom collections import namedtuple \nfrom itertools import count\n\nimport sys\n\nsys.path.append(\"../prunedlayersim\")\nfrom layer_sim.utils.pytorch_utils import apply_mask\n\ntorch.backends.cudnn.benchmark = True\ndevice = torch.device(... | [
[
"torch.nn.functional.batch_norm",
"torch.nn.functional.nll_loss",
"torch.cat",
"torch.zeros",
"torch.utils.data.DataLoader",
"numpy.cumsum",
"numpy.mean",
"torch.cuda.is_available",
"torch.device",
"torch.cuda.synchronize",
"torch.nn.CrossEntropyLoss",
"torch.ones",... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"2.7",
"2.2",
"2.3",
"2.4",
"2.5",
"2.6"
]
}
] |
DaikiTanak/pytorch_image_classification | [
"e9c29fa29c42daa3cb6d98c9a8c13e19462d4047"
] | [
"test.py"
] | [
"import numpy as np\nimport pandas as pd\nimport os\nfrom PIL import Image\nimport copy\nfrom tqdm import tqdm\nimport shutil\n\nimport torch\nimport torch.nn as nn\nfrom torch.utils import data\nimport torch.nn.functional as F\nfrom torchvision import transforms, utils\n\nfrom collections import Counter\n\nfrom mo... | [
[
"sklearn.metrics.roc_auc_score",
"torch.load",
"torch.cat",
"torch.utils.data.DataLoader",
"sklearn.metrics.confusion_matrix",
"sklearn.metrics.roc_curve",
"torch.tensor",
"scipy.ndimage.interpolation.rotate",
"torch.no_grad",
"torch.cuda.is_available",
"numpy.exp",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [
"0.13",
"1.6",
"0.14",
"0.15",
"1... |
gemini3d/pygemini | [
"4fbc15f3aa17c85de44d6f86ad37dc930644c8d1",
"ef5be10eb6b25814e40698b05c684dbe65b9fbd9"
] | [
"src/gemini3d/msis.py",
"scripts/plot_slices.py"
] | [
"\"\"\"\nusing MSIS Fortran executable from Python\n\"\"\"\n\nfrom __future__ import annotations\nfrom pathlib import Path\nimport subprocess\nimport logging\nimport typing as T\nimport shutil\n\nimport numpy as np\nimport h5py\nimport xarray\n\nfrom . import cmake\n\n\ndef get_msis_exe() -> T.Optional[str]:\n \... | [
[
"numpy.exp"
],
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.close",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
TeamEpicProjects/Customer-Prioritization-for-Marketing | [
"88dfbca68759394200b2c4ec042d3293591a567a"
] | [
"members_ownership/Rishav/data_prep_5_resample.py"
] | [
"# This script takes the prepared data, removes outliers and resamples to create a new dataset\r\n# Inputs: base_data_dev_3m.csv\r\n# Output: base_data_resampled_tomek.csv\r\n\r\nimport pandas as pd\r\nimport os\r\nfrom collections import Counter\r\nimport datetime\r\nfrom imblearn.under_sampling import TomekLi... | [
[
"pandas.concat",
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"1.3",
"0.19",
"1.1",
"1.5",
"0.24",
"0.20",
"1.0",
"0.25",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
everdoubling/byt5-Korean-finetune | [
"8c24d6cfc577d58d79f95176f7af2c31b79906ee"
] | [
"dataset_nsmc.py"
] | [
"\n\nimport torch\nfrom torch.utils.data import Dataset, DataLoader\nimport pandas as pd\n\n# NSMC 데이터 처리\nfrom Korpora import Korpora\nKorpora.fetch(\"nsmc\")\n\ncorpus = Korpora.load(\"nsmc\")\n\ndf_train_text = pd.DataFrame(corpus.train.texts, columns=['text'])\ndf_train_labels = pd.DataFrame(corpus.train.labels... | [
[
"pandas.concat",
"torch.utils.data.DataLoader",
"pandas.DataFrame",
"torch.tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"1.3",
"0.19",
"1.1",
"1.5",
"0.24",
"0.20",
"1.0",
"0.25",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
BatiDyDx/maths-tools-python | [
"e9a58aa669b5f36d7ee01402fe1f16a1db7b0e50"
] | [
"mathipy/science/physics.py"
] | [
"import math\nfrom typing import Dict, Tuple, Union\nfrom numpy import linspace\nfrom mathipy import numeric_operations as ops\nfrom mathipy.math.linalg import Matrix\n\n## Physical constants #######################\n\nphysical_constants: Dict[str, float] = {\n 'alpha' : 7.297352568e-3, # adimensi... | [
[
"numpy.linspace"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mretolaza/hdt6-matrix | [
"42c836f9d0938275f70e5ccc29592b267d63e6f3"
] | [
"project.py"
] | [
"# Universidad del Valle de Guatemala\n# Matematica Discreta - seccion 10\n# María Mercedes Retolaza Reyna, 16339\n# Archivo: proyect.py\n# Fecha: 4/10/2019\n\n#IMPORTANTE: usted ingresa la matriz y le dice que propiedades tiene en conjunto. No evalua propiedad por propiedo\n\n# Para todas las operaciones de matric... | [
[
"numpy.dot",
"numpy.array_equal",
"numpy.logical_and",
"numpy.identity",
"numpy.array",
"numpy.where"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
radleap/dog-vision | [
"0862100b0d40592fdcc3430e498d40acc7014281"
] | [
"app_ml.py"
] | [
"import os\nfrom flask import Flask, flash, render_template, redirect, request, url_for, jsonify\nfrom werkzeug.utils import secure_filename\nimport pickle\nimport torch.nn as nn\nimport torch\nimport io\nimport torchvision.transforms as transforms\nfrom torchvision import models #getting pretrained models\nfrom PI... | [
[
"numpy.array",
"torch.max",
"torch.autograd.Variable"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
NLESC-JCER/QMCTorch | [
"c56472cd3e9cc59f2e01a880e674b7270d2cdc2b"
] | [
"tests/solver/test_h2_adf_jacobi.py"
] | [
"import unittest\n\nimport numpy as np\nimport torch\nimport torch.optim as optim\n\nfrom qmctorch.sampler import Metropolis\nfrom qmctorch.solver import SolverSlaterJastrow\nfrom qmctorch.scf import Molecule\nfrom qmctorch.wavefunction import SlaterJastrow\nfrom ..path_utils import PATH_TEST\n\n\nclass TestH2ADFJa... | [
[
"torch.manual_seed",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
bkimmig/fiery_llama | [
"64337cb63a30a56251c601c8684a127517440dcc"
] | [
"scripts/filter.py"
] | [
"import numpy as np\nimport pandas as pd\nimport argparse\nfrom astropy.io import fits\n\nfrom fiery_llama.matched_filters import PointFilter, cubeify\n\n\nparser = argparse.ArgumentParser()\nhelp_data = \"Must be .h5 or .fits file type.\"\nparser.add_argument(\"data\", help=help_data)\ntable_help = \"if .h5 file p... | [
[
"numpy.max",
"pandas.read_hdf",
"pandas.DataFrame",
"numpy.min"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"1.3",
"0.19",
"1.1",
"1.5",
"0.24",
"0.20",
"1.0",
"0.25",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
sunshine-2015/models | [
"9aa2637de149e6d6c70ce4d31e28eaa3a3361a90"
] | [
"fluid/neural_machine_translation/transformer/train.py"
] | [
"import os\nimport time\nimport numpy as np\n\nimport paddle\nimport paddle.fluid as fluid\n\nfrom model import transformer, position_encoding_init\nfrom optim import LearningRateScheduler\nfrom config import TrainTaskConfig, ModelHyperParams, pos_enc_param_names, \\\n encoder_input_data_names, decoder_input... | [
[
"numpy.triu",
"numpy.array",
"numpy.tile",
"numpy.ones"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
imstevenpmwork/Advanced_Vision_Geometry-Projects | [
"308ff9674eb9d53a1d42ee9caeda784632f2fcf7"
] | [
"Two-views geometry/Code/lab2_stereo.py"
] | [
"import numpy as np\nimport cv2\nimport open3d as o3d\n\n\nK = np.array([\n [7.215377e2, 0, 6.095593e2],\n [0, 7.215377e2, 1.728540e2],\n [0, 0, 1]\n]) # intrinsic matrix of camera\n\nBf = 3.875744e+02 # base line * focal length\n\n# lo... | [
[
"numpy.meshgrid",
"numpy.linalg.inv",
"numpy.arange",
"numpy.ones",
"numpy.zeros_like",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
audio-captioning/wavetransformer | [
"c78458ac0887851a743b7f47101b0fff97724b4f"
] | [
"modules/transformer_block.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom torch import Tensor\nfrom torch.nn import Module, GRU, Linear, Dropout, MultiheadAttention, LayerNorm\nfrom .sublayer_connection import SublayerConnection\nimport numpy as np\nimport torch\nimport math, copy\nimport torch.nn as nn\nimport torch.nn.functional a... | [
[
"torch.nn.Dropout",
"torch.nn.Linear",
"torch.nn.ReLU",
"torch.nn.MultiheadAttention"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
askintution/rikai | [
"53a72a19beafc4097a816efb9cddd063e107e67a"
] | [
"python/rikai/spark/types/__init__.py"
] | [
"# Copyright 2020 Rikai 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 or a... | [
[
"numpy.dtype"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mozjay0619/ml-evaluation-framework | [
"ab2ba55e8f4c94dd097b283aa0bce3c2854ed4e4"
] | [
"evaluation_framework/utils/memmap_utils.py"
] | [
"from evaluation_framework.utils.data_structure_utils import is_nested_list\n\nimport numpy as np\n\n\ndef write_memmap(filepath, dtype, shape, array):\n\n writable_memmap = np.memmap(filepath, dtype=dtype, mode=\"w+\", shape=shape)\n writable_memmap[:] = array[:]\n del writable_memmap\n\ndef read_memmap(f... | [
[
"numpy.memmap"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
gkiar/bigbrain-boss | [
"c2b8a96743a3452a2bf8af96d8945c758d2d0734"
] | [
"make_tiles.py"
] | [
"#!/usr/bin/env python\n\n# make_tiles.py\n# Created by Greg Kiar on 2017-06-14.\n# Email: gkiar07@gmail.com\n# Copyright (c) 2017. All rights reserved.\n\nfrom argparse import ArgumentParser\nfrom PIL import Image\nimport numpy as np\nimport os\n\n\ndef ims_to_tiles(indir, outdir, N=3584, M=3072):\n os.system('... | [
[
"numpy.arange"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
hitflame/x-deeplearning | [
"781545783a4e2bbbda48fc64318fb2c6d8bbb3cc"
] | [
"xdl-algorithm-solution/Rocket/script/sample_io.py"
] | [
"# Copyright (C) 2016-2018 Alibaba Group Holding Limited\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n# http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless require... | [
[
"numpy.reshape",
"numpy.ones",
"numpy.max",
"numpy.array",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ryskiod/plant-record | [
"758b19d7c239b4eab883eeccbf63cf376ed57eae"
] | [
"segmentation/train_unet.py"
] | [
"import os\nimport sys\nimport argparse\nfrom datetime import datetime\nfrom glob import glob\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nimport tensorflow as tf\nfrom tensorflow.keras.layers import *\nfrom tensorflow.keras.callbacks import EarlyStopping, ModelCheckpoint\nfrom tensorflow.keras.optimiz... | [
[
"matplotlib.pyplot.legend",
"tensorflow.keras.callbacks.ModelCheckpoint",
"tensorflow.device",
"matplotlib.pyplot.title",
"tensorflow.keras.losses.SparseCategoricalCrossentropy",
"matplotlib.pyplot.ylim",
"tensorflow.keras.preprocessing.image.array_to_img",
"tensorflow.expand_dims"... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
williamducfer/ie-brazilian-court-decisions | [
"b2972d7cd8421f09f368e9e524677b9a6b21bfb0"
] | [
"crf.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport nltk\nimport sklearn_crfsuite\nimport numpy as np\nimport os\nfrom sklearn.model_selection import KFold\nimport argparse\nimport conlleval\n\nrandom_state_seed = 444\nnum_folds = 5\n\n\n# Methods for features extraction\ndef generate_features(word, pos, feature_prefix):\n word_... | [
[
"numpy.array",
"numpy.zeros",
"numpy.mean",
"sklearn.model_selection.KFold"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
khanh93vn/CogAlg | [
"b984c12316e266dd8f012dee90ce26bd604fbdd1"
] | [
"frame_2D_alg/alternative versions/intra_blob_a.py"
] | [
"import operator as op\nfrom collections import deque, defaultdict\nfrom itertools import groupby, starmap\nimport numpy as np\nimport numpy.ma as ma\nfrom intra_comp_a import *\nfrom utils import pairwise, flatten\n\n'''\n 2D version of 1st-level algorithm is a combination of frame_blobs, intra_blob, and comp_P... | [
[
"numpy.ones"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mimilouie/nlp_sms_spam | [
"67ec8dd82985e155124b68587972722b3b4775b2"
] | [
"spamreader_main.py"
] | [
"import argparse\nimport spamreader as sr\nimport evaluator as eval\nimport sys\nfrom sklearn.naive_bayes import MultinomialNB\nimport numpy as np\nfrom sklearn.model_selection import cross_val_predict\n\ndef main(args):\n # use vocab when we filter the features blah blah blah\n bagOfWords = sr.BagOfWords(arg... | [
[
"sklearn.naive_bayes.MultinomialNB",
"sklearn.model_selection.cross_val_predict"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
rmporsch/pyksburden | [
"e9bdca6ffc472fca67b2c37acc940710d96cfd7b"
] | [
"pyksburden/genereader.py"
] | [
"import numpy as np\nimport os\nimport pandas as pd\nimport logging\nfrom typing import Tuple\nfrom pyplink import PyPlink\n\n\nlg = logging.getLogger(__name__)\n\n\nclass GeneReader(object):\n\n def __init__(self, plink_path: str, pheno_path: str, variant_path: str):\n lg.debug(\"\"\"\n Loading th... | [
[
"pandas.read_table",
"pandas.merge",
"numpy.zeros",
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
tprlab/detectppl | [
"d58de4b4ef797dd974d62bab5e7890f4ed6384df"
] | [
"detect_ssd.py"
] | [
"import cv2 as cv\nimport numpy as np\nimport time\nimport sys\nimport logging\n\n\nSSD_PATH = \"frozen_inference_graph.pb\"\n\ndef load_ssd():\n return cv.dnn.readNetFromTensorflow(SSD_PATH, \"ssd_mobilenet_v1_coco.pbtxt\")\n\n\ndef detect_ssd(ssd, img, min_area_k = 0.001, thr = 0.3):\n ssd.setInput(cv.dnn.blobF... | [
[
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
MJKirk/dynesty | [
"747a6eb9557b1a24b6164887a7d45c0b8fa3eb1f"
] | [
"py/dynesty/dynesty.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nThe top-level interface (defined natively upon initialization) that\nprovides access to the two main sampler \"super-classes\" via\n:meth:`NestedSampler` and :meth:`DynamicNestedSampler`.\n\n\"\"\"\n\nfrom __future__ import (print_function, division)\n\nimp... | [
[
"numpy.isfinite",
"numpy.finfo",
"numpy.ones",
"numpy.intersect1d",
"numpy.sign",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
shuwen-liu-ox/INDIGO | [
"ad1b20bb290d28cf8a19357ea059077248e25d45"
] | [
"utils/utils_test_e_hits.py"
] | [
"import numpy as np\nimport scipy.sparse as sp\nimport torch\nimport time\nimport random\nimport copy\n\nfrom utils.tool import read_data, write_dic, dictionary, normalize, sparse_mx_to_torch_sparse_tensor\n \n\ndef encoding_test(train_dataset, test_dataset):\n \n \"\"\"load test-graph and test-facts, and ... | [
[
"scipy.sparse.eye",
"numpy.array",
"numpy.ones"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.7",
"1.0",
"0.10",
"1.2",
"0.14",
"0.19",
"1.5",
"0.12",
"0.17",
"0.13",
"1.6",
"1.4",
"1.9",
"1.3",
"1.10",
"0.15",
"0.18",
"0.16"... |
sbakiu/ml-kf-pipeline | [
"01ca41d1dbc4578225198254ce57768638772df0"
] | [
"src/steps/tokenize/pipeline_step.py"
] | [
"import click\nimport logging\nimport pandas as pd\n\nfrom src.steps.tokenize.Tokenize import Tokenize\nfrom src.steps.util.Config import Config\nfrom src.steps.util.Constants import Constants\nfrom src.steps.util.ModelUtil import ModelUtil\n\nlogging.basicConfig(level=logging.INFO)\n\n\n@click.command()\ndef run_p... | [
[
"pandas.read_csv"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
linewalks/mimic-oodd | [
"92a1d0f2f6658c52af2bb4917fb6b5112c05a140"
] | [
"oodd/evaluation/prediction.py"
] | [
"import numpy as np\n\nfrom sklearn.metrics import (\n roc_auc_score,\n average_precision_score,\n f1_score\n)\n\n\nclass PredictionEvaluator:\n def evaluate(\n self,\n test_y,\n pred_y\n ):\n return {\n \"auroc\": roc_auc_score(test_y, pred_y),\n \"auprc\": average_precision_score(test_y... | [
[
"sklearn.metrics.roc_auc_score",
"sklearn.metrics.f1_score",
"sklearn.metrics.average_precision_score"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
vinid/OCTIS | [
"00a02c14a3bf9719395860d345c0e6170f32ff86"
] | [
"octis/optimization/optimizer_evaluation.py"
] | [
"import json\nimport numpy as np\nimport pandas as pd\nfrom octis.optimization.optimizer_tool import check_instance, save_search_space, convert_type\n\n\nclass OptimizerEvaluation:\n\n def __init__(self, optimizer, BO_results):\n \"\"\"\n Create an object with all the information about Bayesian Opt... | [
[
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
golfit/pcb-tools | [
"0c97715a06568d638ee8f969abe825638e79312b"
] | [
"my_test/eagle_brd_tools.py"
] | [
"'''\nThis Python script assembles a few tools useful for creating\nEagle .brd files with objects placed in an algorithmic way.\n\nT. Golfinopoulos, 26 September 2018\n\nSee also test_gen_instr_board.py\n'''\n\nfrom abc import ABC,abstractmethod\nfrom numpy import pi,floor,ceil\nimport numpy\nimport csv #For creati... | [
[
"numpy.cos",
"numpy.sin"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
sendera99/gym-copter | [
"08ac2bc4e7e43a58d93af14f7a618a9bdda78e79",
"08ac2bc4e7e43a58d93af14f7a618a9bdda78e79"
] | [
"attic/examples/leap.py",
"attic/mars/hover3d.py"
] | [
"#!/usr/bin/env python3\r\n'''\r\nClimb up and leap forward\r\n\r\nCopyright (C) 2020 Simon D. Levy\r\n\r\nMIT License\r\n'''\r\n\r\nimport gym\r\nimport numpy as np\r\nimport threading\r\nimport time\r\n\r\nALTITUDE_TARGET = 10 # meters\r\n\r\ndef update(env):\r\n\r\n # Create and initialize copter environment\... | [
[
"numpy.finfo",
"numpy.array",
"numpy.ones"
],
[
"numpy.radians"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mariohopfner/ElectrodeOptimizationTool | [
"57adaa60059e893b23699917f1c7025919c76a2e"
] | [
"main/ResolutionElectrodeUpdater.py"
] | [
"import logging\n\nimport numpy as np\nimport pybert as pb\nimport pygimli as pg\n\nfrom main.ElectrodeUpdater import ElectrodeUpdater\nimport util.schemeUtil as schemeUtil\n\nclass ResolutionElectrodeUpdater(ElectrodeUpdater):\n \"\"\" An ElectrodeUpdater-implementation providing the update based on subsurface ... | [
[
"numpy.abs",
"numpy.unique",
"numpy.matmul",
"numpy.linalg.norm",
"numpy.linalg.pinv",
"numpy.delete",
"numpy.ceil",
"numpy.floor",
"numpy.argsort",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
TGMclustering/TGMclustering | [
"572cdc9a6924ee14a9d5f52e083db0d0bdfb2cf0"
] | [
"ConfigurationAnalysis.py"
] | [
"# -*- coding: utf-8 -*-\r\n\r\n\"\"\"\r\nThis code allows us to run the configuration slices analysis for the TGM model\r\n\"\"\"\r\nimport pandas as pd\r\nimport numpy as np\r\nimport matplotlib\r\nimport matplotlib.pyplot as plt\r\nimport random\r\nplt.rcParams[\"font.family\"] = \"Times New Roman\"\r\nplt.rcPar... | [
[
"matplotlib.pyplot.Rectangle",
"matplotlib.pyplot.legend",
"pandas.concat",
"matplotlib.pyplot.tight_layout",
"pandas.read_csv",
"pandas.merge",
"numpy.amax",
"numpy.unique",
"numpy.asarray",
"matplotlib.pyplot.subplots",
"pandas.DataFrame",
"matplotlib.pyplot.savef... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
costagreg/mnist-handwritten-ml | [
"c3e26eb7ab653afa6f9e9dc91f5a438026b64329"
] | [
"models.py"
] | [
"import tensorflow as tf\n\n\ndef le_net_5(X, output_layer):\n\n # CONV1\n C1_w = tf.Variable(tf.truncated_normal(\n shape=[5, 5, 1, 6], mean=0, stddev=.1))\n C1_b = tf.Variable(tf.zeros(6))\n C1 = tf.nn.conv2d(X, C1_w, strides=[\n 1, 1, 1, 1], padding='VALID', name='C1') + C... | [
[
"tensorflow.nn.relu",
"tensorflow.matmul",
"tensorflow.truncated_normal",
"tensorflow.zeros",
"tensorflow.nn.max_pool",
"tensorflow.contrib.layers.flatten",
"tensorflow.nn.conv2d"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
nekoumei/dtreeplt | [
"36937fc188342476174432a547d8f3ec385d371a"
] | [
"dtreeplt/dtreeplt.py"
] | [
"import numpy as np\nimport pandas as pd\nfrom sklearn import tree\nfrom sklearn.preprocessing import MinMaxScaler\nimport matplotlib.patches as mpatch\nimport matplotlib.pyplot as plt\nimport matplotlib.cm as cm\n\n\nclass dtreeplt():\n '''\n Parameters\n ---------------\n model: sklearn.tree.DecisionT... | [
[
"matplotlib.patches.Rectangle",
"sklearn.datasets.load_iris",
"sklearn.tree.DecisionTreeClassifier",
"numpy.argmax",
"numpy.array",
"sklearn.preprocessing.MinMaxScaler"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
sirinath/zipline | [
"61ccce760ec23df32a7a8b77bb68a49a6982e11c"
] | [
"zipline/finance/risk/period.py"
] | [
"#\n# Copyright 2013 Quantopian, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or... | [
[
"numpy.linalg.eigvals",
"pandas.Series",
"numpy.std",
"numpy.cov",
"numpy.vstack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
ShawnLYU/A-Hybrid-Approach-of-Insincere-Questions-Detection | [
"0bc76c3fc186245f83e665732dac53a1af3f3fbf"
] | [
"model/hybrid_model/predicator.py"
] | [
"from typing import *\nimport torch\nimport torch.optim as optim\nimport numpy as np\nfrom allennlp.data import Instance\nfrom allennlp.data.fields import TextField, SequenceLabelField\nfrom allennlp.data.dataset_readers import DatasetReader\nfrom allennlp.common.file_utils import cached_path\nfrom allennlp.data.to... | [
[
"matplotlib.use",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.step",
"sklearn.metrics.precision_recall_curve",
"matplotlib.pyplot.savefig",
"numpy.concatenate",
"sklearn.utils.fixes.signature",
"matplotlib.pyplot.xlim",
"numpy.argmax",
"torch.no_grad",
"sklearn.metrics... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
NaviRice/HeadTracking | [
"8227cc247425ecacd3e789dbbac11d3e5103d3e2"
] | [
"src/headtracking_network/feedforward.py"
] | [
"import numpy as np\nimport tensorflow as tf\nimport os\nimport navirice_image_pb2\nimport cv2\nimport random\nimport sys\n\nfrom navirice_helpers import navirice_image_to_np\nfrom navirice_helpers import navirice_ir_to_np\nfrom navirice_helpers import map_depth_and_rgb\n\ntf.logging.set_verbosity(tf.logging.INFO)\... | [
[
"tensorflow.matmul",
"tensorflow.nn.sigmoid",
"tensorflow.truncated_normal",
"tensorflow.Variable",
"tensorflow.constant",
"tensorflow.nn.max_pool",
"tensorflow.reshape",
"tensorflow.placeholder",
"numpy.ones",
"tensorflow.global_variables_initializer",
"tensorflow.logg... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
PokhodenkoSA/sdc | [
"cb733a0f510f812ecf4ed336c2b4494dece3db4e"
] | [
"sdc/extensions/indexes/range_index_ext.py"
] | [
"# -*- coding: utf-8 -*-\n# *****************************************************************************\n# Copyright (c) 2019-2020, Intel Corporation All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions ... | [
[
"pandas.RangeIndex",
"numpy.arange"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
adgirish/ray | [
"ea172f025bddfc47f2fcaed3c014432ca4f8f21b"
] | [
"python/ray/rllib/dqn/dqn_evaluator.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom gym.spaces import Discrete\nimport numpy as np\nimport tensorflow as tf\n\nimport ray\nfrom ray.rllib.utils.error import UnsupportedSpaceException\nfrom ray.rllib.dqn import models\nfrom ray.rllib... | [
[
"numpy.ones_like",
"numpy.abs",
"tensorflow.ConfigProto",
"tensorflow.global_variables_initializer",
"numpy.mean",
"tensorflow.Session",
"numpy.array",
"tensorflow.group"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"1.12",
"1.4",
"1.13",
"1.5",
"1.7",
"0.12",
"1.0",
"1.2"
]
}
] |
samueltof/covid19_forecast_ml | [
"2f83a03a29e852bd711b3193ca7c23fa5a08d485"
] | [
"main/LSTNet_v2/Train_v2.py"
] | [
"import os\nimport sys\nimport joblib\n# sys.path.append('../')\nmain_path = os.path.split(os.getcwd())[0] + '/covid19_forecast_ml'\n\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nfrom datetime import datetime, timedelta\nfrom tqdm import tqdm\n\n# from main.LSTNe... | [
[
"pandas.concat",
"pandas.read_csv",
"pandas.to_datetime",
"torch.utils.data.DataLoader",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.ylabel",
"torch.cuda.is_available",
"matplotlib.pyplot.xlabel",
"torch.nn.MSELoss",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
jfnavarro/st_analysis | [
"27f46a6123b535421ef5be4f0f65fbc94613f6dc"
] | [
"stanalysis/preprocessing.py"
] | [
"\"\"\" \nPre-processing and normalization functions for the ST datasets.\n\"\"\"\n\nimport numpy as np\nimport pandas as pd\nimport math\nimport os\nfrom sklearn.preprocessing import StandardScaler\nimport re\n\n\ndef normalize(counts, normalization):\n \"\"\"\n Wrapper around the function normalize_data()\n... | [
[
"sklearn.preprocessing.StandardScaler",
"pandas.read_csv",
"numpy.mean",
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
remirobert/MNIST-machine-learning | [
"0bcd3e9d6e0da0da0cb2a96aa2d794f24f356762"
] | [
"neural-network.py"
] | [
"import pandas as pd\nimport numpy as np\nfrom nolearn.dbn import DBN\nimport timeit\n\ndef train_data():\n train = pd.read_csv(\"train.csv\")\n features = train.columns[1:]\n X = train[features]\n y = train['label']\n return model_selection.train_test_split(X / 255., y, test_size=0.25, random_state=... | [
[
"pandas.read_csv"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
WuXinyang2012/baselines | [
"6d3b3b1824760bf35b170ca0c93800d17280bb7a"
] | [
"baselines/her/her.py"
] | [
"import numpy as np\n\n\ndef make_sample_her_transitions(replay_strategy, replay_k, reward_fun):\n \"\"\"Creates a sample function that can be used for HER experience replay.\n\n Args:\n replay_strategy (in ['future', 'none']): the HER replay strategy; if set to 'none',\n regular DDPG experi... | [
[
"numpy.random.uniform",
"numpy.str",
"numpy.float32",
"numpy.random.randint"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
winnerineast/ludwig | [
"bd15f3b9ca3f3bfda255425dc2ff69d870a62c1b"
] | [
"ludwig/utils/data_utils.py"
] | [
"#! /usr/bin/env python\n# coding=utf-8\n# Copyright (c) 2019 Uber Technologies, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENS... | [
[
"pandas.read_csv",
"numpy.nditer",
"numpy.stack",
"numpy.random.uniform",
"numpy.random.permutation",
"numpy.load",
"numpy.array",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
scaine1/holoviews | [
"2b08fa169a058f0aa77b94bec69ee23414cf52d1",
"2b08fa169a058f0aa77b94bec69ee23414cf52d1"
] | [
"holoviews/core/data/interface.py",
"holoviews/core/spaces.py"
] | [
"import param\nimport numpy as np\n\nfrom ..element import Element\nfrom ..ndmapping import OrderedDict\nfrom .. import util\n\n\nclass DataError(ValueError):\n \"DataError is raised when the data cannot be interpreted\"\n\n def __init__(self, msg, interface=None):\n if interface is not None:\n ... | [
[
"numpy.nanmax",
"numpy.abs",
"numpy.nanmin",
"numpy.logical_or.reduce",
"numpy.isscalar",
"numpy.sum"
],
[
"numpy.abs",
"numpy.meshgrid",
"numpy.linspace",
"numpy.isscalar",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Psicowired87/TimeSeriesTools | [
"de42dbcc5371ee576df6c9521b1c79a47c147dd1"
] | [
"TimeSeriesTools/Transformation/value_discretization.py"
] | [
"\n\"\"\"\nThis module groups all the functions which carry out the process of value\ndiscretization of a time series.\n\"\"\"\n\nimport numpy as np\n\n\ndef value_discretization(Y, discret_info, method, kwargs={}):\n \"\"\"Function which acts as a switcher and wraps all the functions related\n with value dis... | [
[
"numpy.histogram",
"numpy.logical_and",
"numpy.unique",
"numpy.nonzero",
"numpy.ones",
"numpy.concatenate",
"numpy.all",
"numpy.any",
"numpy.array",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
birdflyi/query_clickhouse | [
"3418fd9616082f655c5a09b1a2efe43e345ec4e5"
] | [
"data/src/sqls/developers-timezone-predict-single/post-processor.py"
] | [
"import math\nimport os\nimport sys\n\nimport pandas as pd\nimport json\nimport webbrowser\n\nfrom etc import profile\n\nGMT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1]\n\n\ndef show_data_in_browser():\n py_post_processor_path, res_csv_save_path, svg_html_path = list... | [
[
"pandas.read_csv",
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
nortem/mipt-rl-hw-2022 | [
"e9efa3f7a9a4e135fa6902f31edf3e42ea44a1c1"
] | [
"hw1/cds_rl/infrastructure/utils.py"
] | [
"import numpy as np\nimport time\n\n\ndef sample_trajectory(env, policy, max_path_length, render=False, render_mode=('rgb_array')):\n\n # initialize env for the beginning of a new rollout\n ob = env.reset() # TODO HINT: should be the output of resetting the env #+\n\n # init vars\n obs, acs, rewards, ne... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.stack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
shiyuann/determined | [
"5c37bfe9cfcc69174ba29a3f1a115c3e9e3632e0"
] | [
"harness/determined/pytorch/_data.py"
] | [
"import logging\nfrom typing import (\n Any,\n Callable,\n Dict,\n Iterator,\n List,\n Optional,\n Sequence,\n Set,\n Type,\n TypeVar,\n Union,\n cast,\n)\n\nimport numpy as np\nimport torch\nfrom torch.utils.data import (\n BatchSampler,\n Dataset,\n RandomSampler,\n ... | [
[
"torch.utils.data.SequentialSampler",
"torch.utils.data.DataLoader",
"torch.from_numpy",
"torch.utils.data.RandomSampler",
"torch.utils.data.BatchSampler"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
FFTYYY/PRML-PJ | [
"152c5f5a64af6b6e9ac3cc74e90ce89b7e53b18e"
] | [
"try/test.py"
] | [
"import pysmiles\nimport dgl\nimport matplotlib.pyplot as plt\nimport networkx as nx\nimport numpy as np\nimport pdb\n\ng = pysmiles.read_smiles(\"CN1CC[C@@]23C=C[C@@H](C[C@@H]2OC4=C(C=CCC(=C34)C1)OC)O.Br\")\n#g = pysmiles.read_smiles(\"O=[N+]([O-])C(Br)(CO)CO\")\n\nfor i in range(30):\n\tfor j in range(30):\n\t\tt... | [
[
"matplotlib.pyplot.show"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
lakshaykarnwal/Football-metrics-analysis | [
"047b4d2c154457fe7a9756ee939aa523304a85da"
] | [
"analysis/LakshayKarnwal/Scripts/project_functions.py"
] | [
"import pandas as pd\nfrom multipledispatch import dispatch\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\n\ndef load_and_process(path):\n\n # Method Chain 1 (Load data and deal with missing data)\n df1 = (\n pd.read_csv(path\n )#reads data file from the given path\n .dropna(a... | [
[
"pandas.concat",
"matplotlib.pyplot.tight_layout",
"pandas.read_csv",
"pandas.Series",
"matplotlib.pyplot.title",
"matplotlib.pyplot.subplots",
"pandas.DataFrame",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.xticks",
"matplotlib.pyplot.ylabel"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
MobtgZhang/2021MathorCupBigDataCompetition | [
"6cfd93157cfc1bfeebbb5223104a6617bfa5d754"
] | [
"src/graph.py"
] | [
"import os\nimport logging\nimport numpy as np\nimport pandas as pd\nimport torch\nimport torch.nn.functional as F\nfrom torch_scatter import scatter_add\nfrom torch_geometric.data import Data\n\nlogging.basicConfig(level = logging.INFO,format = '%(asctime)s - %(name)s - %(levelname)s - %(message)s')\nlogger = logg... | [
[
"pandas.read_csv",
"torch.cat",
"torch.zeros",
"numpy.arange",
"torch.nn.functional.one_hot",
"torch.from_numpy",
"numpy.random.shuffle",
"torch.stack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
HanKunChai/faster-rcnn-keras | [
"6fd0638a313a33681e9dd2aefbdc22bb394ee09d"
] | [
"nets/if_rcnn.py"
] | [
"import unittest\n\nimport keras\nimport numpy as np\nfrom keras import Model, Input\nfrom keras.backend import random_normal\nfrom keras.layers import Conv2D, MaxPooling2D, Add, UpSampling2D, Lambda, Activation, Reshape, TimeDistributed, Flatten, \\\n Dense\nfrom tensorflow import Tensor\nfrom tensorflow.python... | [
[
"tensorflow.python.RandomNormal"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"1.12",
"1.4",
"1.13",
"1.5",
"1.7",
"1.0",
"2.2",
"1.2"
]
}
] |
HarryLan/CSNet | [
"e051d733dd72a3a2fbff2f064d47afe945ee0715"
] | [
"utils/model_eval.py"
] | [
"import numpy as np\nimport sklearn.metrics as metrics\nimport matplotlib.pyplot as plt\nimport os\nimport glob\nimport cv2\n\npath = '/home/leila/PycharmProjects/CSNet/assets/OCT-SAB_only/'\n\n\n# path = '../assets/STARE/'\n# path = '../assets/NERVE/'\n# path = '/home/imed/Documents/Experiments/RRM-Net/assets/DRIV... | [
[
"matplotlib.pyplot.legend",
"sklearn.metrics.auc",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.figure",
"sklearn.metrics.confusion_matrix",
"matplotlib.pyplot.savefig",
"sklearn.metrics.roc_curve",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.xlabel",
"sklearn.metrics.f1_s... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
jihan1218/shepherd_gym | [
"9020d226b02812ecc52f2487e26f530401e22909"
] | [
"examples/shepherd_imitation.py"
] | [
"#!/usr/bin/env python\n\n# import libraries\nimport os\nimport gym\nimport argparse\nimport numpy as np\n\nimport torch\nimport torch.optim as optim\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\nfrom torch.utils.data import DataLoader, Dataset\n\n# import utility classes\nfrom shepherd_gym... | [
[
"torch.nn.functional.softmax",
"torch.cuda.manual_seed",
"numpy.random.seed",
"torch.load",
"torch.manual_seed",
"torch.utils.data.DataLoader",
"numpy.load",
"torch.autograd.Variable"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
andhikasaja/automated-weibull-analysis | [
"bf1eee69aa9d0bebe3ed270eb05da0ccc854f779"
] | [
"weibull/weibull.py"
] | [
"import logging\nimport math\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib as mpl\nfrom matplotlib import rcParams\nimport scipy.stats\nfrom scipy.special import gamma\nimport datetime\nfrom pathlib import Path\n\nrcParams.update({'figure.autolayout': True})\n# Set a l... | [
[
"numpy.nanmax",
"matplotlib.pyplot.legend",
"numpy.minimum",
"pandas.Series",
"numpy.linspace",
"numpy.sqrt",
"numpy.asarray",
"numpy.nanmin",
"pandas.DataFrame",
"numpy.exp",
"matplotlib.pyplot.gca",
"numpy.arange",
"matplotlib.ticker.FuncFormatter",
"numpy... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"1.3",
"0.19",
"1.1",
"1.5",
"0.24",
"0.20",
"1.0",
"0.25",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
TijmenKort/blindinpainting_vcnet | [
"d1a5467a6beec16450a6ef304ab26c88f4293cb5"
] | [
"tensorflow_version/net/ops.py"
] | [
"import cv2\nimport numpy as np\nimport tensorflow as tf\nfrom logging import exception\nimport math\nimport scipy.stats as st\nimport os\nimport urllib\nimport scipy\nfrom scipy import io\nfrom functools import partial\nfrom tensorflow.contrib.framework.python.ops import add_arg_scope\n\nnp.random.seed(2018)\n\n# ... | [
[
"tensorflow.convert_to_tensor",
"tensorflow.device",
"tensorflow.concat",
"scipy.stats.norm.cdf",
"numpy.linspace",
"tensorflow.zeros",
"tensorflow.layers.fully_connected",
"tensorflow.reduce_sum",
"tensorflow.stack",
"tensorflow.minimum",
"tensorflow.cast",
"numpy.... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.4",
"1.5",
"1.7",
"0.12",
"1.0",
"1.2"
]
}
] |
luke-feng/atmt | [
"81b73a252e68b1409d7a229dbbb918588eda296a"
] | [
"train.py"
] | [
"import os\nimport logging\nimport argparse\nimport numpy as np\nfrom tqdm import tqdm\nfrom collections import OrderedDict\n\nimport torch\nimport torch.nn as nn\n\nfrom seq2seq import models, utils\nfrom seq2seq.data.dictionary import Dictionary\nfrom seq2seq.data.dataset import Seq2SeqDataset, BatchSampler\nfrom... | [
[
"torch.manual_seed",
"torch.nn.CrossEntropyLoss",
"numpy.exp",
"torch.no_grad"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
nikitadhawan/SimCLR | [
"7d87b384b1edb68e7ba86601b26f76e6da214718"
] | [
"run.py"
] | [
"import argparse\nimport torch\nimport torch.backends.cudnn as cudnn\nfrom torchvision import models\nfrom data_aug.contrastive_learning_dataset import ContrastiveLearningDataset, WatermarkDataset\nfrom models.resnet_simclr import ResNetSimCLR, MLP\nfrom simclr import SimCLR\n\nmodel_names = sorted(name for name in... | [
[
"torch.device",
"torch.cuda.device",
"torch.utils.data.DataLoader",
"torch.cuda.is_available"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
wangjing4research/multimodal-label-distribution-learning | [
"2a4f81c1ea77b73e8e2f5fe2b3ad05d2d12f2cd0"
] | [
"process_sentiment.py"
] | [
"import mmsdk\r\nimport os\r\nimport re\r\nimport numpy as np\r\nimport pandas as pd\r\nfrom mmsdk import mmdatasdk as md\r\nfrom subprocess import check_call, CalledProcessError\r\n\r\ndef avg_collapse(intervals: np.array, features: np.array) -> np.array:\r\n\ttry:\r\n\t\treturn np.average(features, axis=0)\r\n\te... | [
[
"numpy.nan_to_num",
"numpy.round",
"numpy.max",
"numpy.concatenate",
"numpy.std",
"numpy.average",
"numpy.array",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ievron/wltls | [
"5f1cca63176b825fca927300f4a0f6fe620c1834"
] | [
"WLTLS/learners/AROW.py"
] | [
"\"\"\"\nAuthor: Itay Evron\nSee https://github.com/ievron/wltls/ for more technical and license information.\n--------------------------------------------------------------------------------\nSee the paper for more details on the different losses.\n\"\"\"\n\nimport numpy as np\nfrom scipy.stats import norm\nfrom W... | [
[
"scipy.stats.norm.ppf",
"numpy.dot",
"numpy.multiply",
"numpy.power",
"numpy.ones",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
WiFisunset/qiskit-metal | [
"f8155e5a695b0daf3af951c545b268b363dff536"
] | [
"qiskit_metal/qlibrary/interconnects/pathfinder.py"
] | [
"# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017, 2021.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE... | [
[
"numpy.concatenate",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
aburnap/ms21_product_aesthetic_design | [
"ef14b8811f7a81a16e20ed3ef7fa0c028f1d11ef"
] | [
"models/layers.py"
] | [
"# -*- coding: utf-8 -*-\n'''\n Project: Product Aesthetic Design: A Machine Learning Augmentation\n Authors: Alex Burnap, Yale University\n Email: alex.burnap@yale.edu\n\n License: MIT License\n\n OSS Code Attribution (see Licensing Inheritance):\n Portions of Code From or... | [
[
"torch.nn.Softmax",
"torch.nn.functional.softmax",
"torch.cat",
"torch.zeros",
"torch.autograd.Variable",
"torch.randn",
"torch.nn.Sigmoid",
"torch.rand",
"torch.bmm",
"torch.nn.Sequential",
"torch.nn.Parameter",
"torch.nn.utils.spectral_norm",
"torch.nn.Conv2d"... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
KeyanAndrewLi/CNTK | [
"4b9f8739c72068d70279f91b4b59923b2ae1fc3a"
] | [
"bindings/python/setup.py"
] | [
"import sys\nimport os\nimport shutil\nfrom glob import glob\nimport platform\nfrom warnings import warn\nfrom setuptools import setup, Extension, find_packages\nimport numpy\n\nIS_WINDOWS = platform.system() == 'Windows'\n\nIS_PY2 = sys.version_info.major == 2\n\n# TODO should handle swig path specified via build_... | [
[
"numpy.get_include"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
francoismaze/guided-diffusion | [
"fff46f075c7d7e4a98b15fde034ffe893d98ec0c"
] | [
"scripts/super_res_train.py"
] | [
"\"\"\"\nTrain a super-resolution model.\n\"\"\"\n\nimport argparse\n\nimport torch.nn.functional as F\n\nfrom guided_diffusion import dist_util, logger\nfrom guided_diffusion.image_datasets import load_data\nfrom guided_diffusion.resample import create_named_schedule_sampler\nfrom guided_diffusion.script_util impo... | [
[
"torch.nn.functional.interpolate"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
OberstWB/FOTS.PyTorch | [
"4ad6764ecba8261d1af4f4d7eadac3356f5c27d1"
] | [
"data_loader/datautils.py"
] | [
"import os\nimport torch\nimport glob as gb\nimport numpy as np\nimport cv2\nimport csv\nimport pathlib\nfrom shapely.geometry import Polygon\n\n\ndef get_images(root):\n '''\n get images's path and name\n '''\n files = []\n for ext in ['jpg', 'png', 'jpeg', 'JPG']:\n files.extend(gb.glob(os.p... | [
[
"numpy.dot",
"numpy.polyfit",
"numpy.arctan",
"numpy.concatenate",
"numpy.max",
"numpy.arctan2",
"numpy.round",
"numpy.argmin",
"numpy.cross",
"numpy.where",
"numpy.clip",
"torch.from_numpy",
"numpy.sin",
"numpy.argmax",
"numpy.count_nonzero",
"numpy... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
RonJacobson/face2face-demo | [
"4f4158ebd2a4c346602a9596f1b6ddd53e6f4ee2"
] | [
"run_webcam.py"
] | [
"import argparse\nimport cv2\nimport dlib\nimport numpy as np\nimport tensorflow as tf\nfrom imutils import video\n\nCROP_SIZE = 1024\nDOWNSAMPLE_RATIO = 1\n\n\ndef reshape_for_polyline(array):\n \"\"\"Reshape image so that it works with polyline.\"\"\"\n return np.array(array, np.int32).reshape((-1, 1, 2))\n... | [
[
"tensorflow.Graph",
"tensorflow.import_graph_def",
"tensorflow.gfile.GFile",
"numpy.squeeze",
"tensorflow.Session",
"tensorflow.GraphDef",
"numpy.array",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
efkandurakli/Pattern-Recognition-Homewoks | [
"0d24a2c5d38fb70b02313ea6c1b8342bdcfa4495"
] | [
"HW3/SVM/Dataset.py"
] | [
"dataset_path = \"Dataset/\"\r\n\r\nimport cv2\r\nimport numpy as np\r\n\r\nclass Dataset:\r\n\r\n def __init__(self):\r\n arr = []\r\n arr.append(cv2.imread(dataset_path + \"0.png\", cv2.IMREAD_GRAYSCALE))\r\n arr.append(cv2.imread(dataset_path + \"1.png\", cv2.IMREAD_GRAYSCALE))\r\n ... | [
[
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
s-sima/Lake-Urmia-Range-of-Levels-Codes | [
"dc269525c481d8aee20f6bdef37614e0f3ee368b"
] | [
"RasterPlot_LakeRestorationObjectives/UL_metrics_rasterbar_Final.py"
] | [
"# This code reads dataset for a set of lake restoration objectives and plots vesrus water level\r\n# them as a raster plot (heat map)\r\n\r\n# This code has been written by Somayeh Sima in 12/1/2019\r\n#----------------------------------------------------\r\n# Import the Pandas and Matplotlib and other packages\r\... | [
[
"matplotlib.pyplot.plot",
"pandas.read_csv",
"matplotlib.pyplot.show",
"numpy.linspace"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
jiawenquan/py3dtiles | [
"3e5f464aa016a800e0164269e647564db28074ba"
] | [
"py3dtiles/convert.py"
] | [
"import os\nimport shutil\nimport sys\nimport time\nimport multiprocessing\nimport numpy as np\nimport json\nfrom collections import namedtuple\nimport pickle\nimport zmq\nimport pyproj\nimport psutil\nimport struct\nimport concurrent.futures\nimport argparse\nfrom py3dtiles.points.transformations import rotation_m... | [
[
"numpy.dot",
"numpy.minimum",
"numpy.maximum",
"numpy.linalg.norm",
"numpy.identity",
"numpy.array",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
jbae11/depletion_rom | [
"06d68465e81be13de5b6d6c8c8030a8ae9315b1b"
] | [
"script/inverse_model_gen.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nimport pandas as pd\nfrom keras.models import Sequential\nfrom keras.layers import Dense\nimport pickle\nfrom sklearn.model_selection import KFold\nfrom sklearn.model_selection import train_test_split\nfrom keras.layers import Dropout\nfrom sklearn.preprocessing... | [
[
"pandas.read_csv",
"sklearn.model_selection.train_test_split",
"sklearn.model_selection.KFold",
"numpy.std",
"numpy.shape",
"numpy.mean",
"sklearn.preprocessing.MinMaxScaler"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
dingmyu/GeoNet | [
"bc2f7fe2d0c0d1c74325e6541121df922f584628"
] | [
"kitti_eval/generate_multiview_extension.py"
] | [
"from __future__ import division\nimport numpy as np\nimport os\nimport cv2\nimport argparse\n\nparser = argparse.ArgumentParser()\nparser.add_argument(\"--dataset_dir\", type=str, help=\"path to kitti scene flow multiview dataset\")\nparser.add_argument(\"--calib_dir\", type=str, help=\"path to data_scene_flow_c... | [
[
"numpy.reshape",
"numpy.hstack",
"numpy.copy"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
clementkng/scipy | [
"8e40c067b64016dc344c537655f56454fd1788ba"
] | [
"scipy/fft/_realtransforms.py"
] | [
"import scipy.fftpack as _fftpack\nfrom ._basic import _dispatch\nfrom scipy._lib.uarray import Dispatchable\nimport numpy as np\n\n__all__ = ['dct', 'idct', 'dst', 'idst', 'dctn', 'idctn', 'dstn', 'idstn']\n\n\n@_dispatch\ndef dctn(x, type=2, shape=None, axes=None, norm=None, overwrite_x=False):\n \"\"\"\n R... | [
[
"scipy._lib.uarray.Dispatchable"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
bw4sz/NeonTreeEvaluation_python | [
"eaa5dfb3d2a17daf354c146ab158f69b94755535"
] | [
"src/get_data.py"
] | [
"\"\"\"Get data module. Given a plot name, recover the correct data\"\"\"\n\nimport os\nimport geopandas as gpd\nimport pandas_read_xml as pdx\nimport pandas as pd\nimport rasterio\n\nfrom src import get_data\nfrom src import utilities\n\ndef find_path(plot_name, data_type):\n \"\"\"Given a plot name recover the... | [
[
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
thesuperorange/face-faster-rcnn.pytorch | [
"cfc11e792f87fb132674680f34db193996ea6890"
] | [
"test_net.py"
] | [
"# --------------------------------------------------------\n# Tensorflow Faster R-CNN\n# Licensed under The MIT License [see LICENSE for details]\n# Written by Jiasen Lu, Jianwei Yang, based on code from Ross Girshick\n# --------------------------------------------------------\nfrom __future__ import absolute_impo... | [
[
"torch.LongTensor",
"numpy.random.seed",
"torch.load",
"torch.utils.data.DataLoader",
"numpy.tile",
"numpy.sort",
"numpy.copy",
"torch.FloatTensor",
"torch.sort",
"torch.cuda.is_available",
"torch.nonzero",
"numpy.array",
"numpy.where",
"torch.autograd.Varia... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mpimp-comas/npfc | [
"316156a8826759d767ef16833cd4f0670868693e"
] | [
"tests/test_09_draw.py"
] | [
"\"\"\"\nModule test_06_draw\n====================\nTests for drawing molecules.\n\"\"\"\n# standard\nfrom pathlib import Path\nimport warnings\nimport filecmp\n# data handling\nfrom collections import OrderedDict\nimport pandas as pd\n# chemoinformatics\nfrom rdkit import Chem\nfrom rdkit import RDLogger\n# tests\... | [
[
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
gasvn/Res2Net-detectron2 | [
"3677895d5d23635b67837e64a79370b9ee117c27"
] | [
"projects/DensePose/densepose/densepose_head.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\nimport math\nfrom dataclasses import dataclass\nfrom enum import Enum\nimport fvcore.nn.weight_init as weight_init\nimport torch\nfrom torch import nn\nfrom torch.nn import functional as F\n\nfrom detectron2.config import CfgNode\nfrom detectr... | [
[
"torch.nn.functional.softmax",
"torch.cat",
"torch.no_grad",
"torch.nn.functional.interpolate",
"torch.nn.functional.smooth_l1_loss",
"torch.nn.MaxPool1d",
"torch.nn.functional.relu",
"torch.arange",
"torch.nn.GroupNorm",
"torch.nn.functional.softplus",
"torch.nn.Sequen... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
brandontrabucco/h-baselines | [
"d61d4bd0286ea757deba04741f8da710c5a05c9e"
] | [
"hbaselines/envs/mixed_autonomy/envs/utils.py"
] | [
"\"\"\"Script containing utility methods shared amount the environments.\"\"\"\nimport numpy as np\n\n# These edges have an extra lane that RL vehicles do not traverse (since they\n# do not change lanes). We as a result ignore their first lane computing\n# per-lane states.\nEXTRA_LANE_EDGES = [\n \"119257908#1-A... | [
[
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
hyperfraise/tvl | [
"2c70282d92d9fe41953c2672fa4d81078481c4cc"
] | [
"tvl_backends/tvl-backends-nvdec/src/tvl_backends/nvdec/__init__.py"
] | [
"from functools import lru_cache\n\nimport torch\n\nimport tvlnv\nfrom tvl.backend import Backend, BackendFactory\n\n\nclass TorchMemManager(tvlnv.MemManager):\n \"\"\"MemManager implementation which allocates Torch tensors.\"\"\"\n\n def __init__(self, device):\n super().__init__()\n self.devic... | [
[
"torch.add",
"torch.empty",
"torch.tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
danhphan/aesara | [
"5a0fb0e731358d54648823170acd911cc1534d6a",
"5a0fb0e731358d54648823170acd911cc1534d6a"
] | [
"aesara/tensor/basic_opt.py",
"aesara/compile/debugmode.py"
] | [
"\"\"\" Tensor optimizations addressing the ops in basic.py.\"\"\"\n\nimport logging\nimport sys\nimport time\nimport traceback\nfrom collections import defaultdict\nfrom io import StringIO\nfrom typing import Optional\n\nimport numpy as np\n\nimport aesara\nimport aesara.scalar.basic as aes\nfrom aesara import com... | [
[
"numpy.all"
],
[
"numpy.absolute",
"numpy.isfinite",
"numpy.nonzero",
"numpy.asarray",
"numpy.isnan",
"numpy.median",
"numpy.max",
"numpy.std",
"numpy.mean",
"numpy.zeros",
"numpy.isinf"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
pauliacomi/pyGAPS | [
"c4d45b710e171c937471686437e382e05aec4ed5"
] | [
"src/pygaps/modelling/da.py"
] | [
"\"\"\"Dubinin-Astakov isotherm model.\"\"\"\n\nimport numpy\n\nfrom .. import scipy\nfrom .base_model import IsothermBaseModel\n\n\nclass DA(IsothermBaseModel):\n r\"\"\"\n Dubinin-Astakov (DA) adsorption isotherm.\n\n .. math::\n\n n(p) = n_t \\exp\\Big[-\\Big(\\frac{-RT\\ln(p/p_0)}{\\varepsilon}\... | [
[
"numpy.log"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
NoahRJohnson/AlphaReZero | [
"e21084ef3896dec47b22de96656144220c046402"
] | [
"miniShogi/tensorflow/NNet.py"
] | [
"import os\nimport shutil\nimport time\nimport random\nimport numpy as np\nimport math\nimport sys\nsys.path.append('../../')\nfrom utils import *\nfrom pytorch_classification.utils import Bar, AverageMeter\nfrom NeuralNet import NeuralNet\n\nimport tensorflow as tf\nfrom .miniShogiNNet import miniShogiNNet\n\nargs... | [
[
"tensorflow.train.Saver",
"tensorflow.global_variables_initializer",
"tensorflow.Session"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
JhooClan/QSimOv | [
"dc8eabd6a5f5302ad2939c47f215221333f44f5c"
] | [
"structures/qregistry.py"
] | [
"import cmath as cm\nimport numpy as np\nimport random as rnd\nfrom structures.qgate import _getMatrix\n\nclass QRegistry:\n\tdef __init__(self, nqbits, **kwargs):\n\t\t# nqbits -> number of QuBits in the registry.\n\t\t# Seed for the Pseudo Random Number Generation can be specified with seed = <seed> as an argumen... | [
[
"numpy.log",
"numpy.log2",
"numpy.sqrt",
"numpy.kron",
"numpy.delete",
"numpy.transpose",
"numpy.array",
"numpy.zeros",
"numpy.conjugate",
"numpy.matrix.getH"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
TristanGomez44/e3bm | [
"9da81d09c5ef381f3f7bb7c8372cff69a8de32f0"
] | [
"dataloader/mini_imagenet.py"
] | [
"# Copyright (c) 2020 Yaoyao Liu. 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# A copy of the License is located at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# or in the \... | [
[
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ericryan433/astr-119-session-5 | [
"37cff904522a785cca255379fdcca82c3987979a"
] | [
"demo_numpy_continued.py"
] | [
"import numpy as np\n\nx = 1.0\t\t#define a float\ny = 2.0\t\t#define another float\n\n#exponents and logarithms\nprint(np.exp(x))\t\t#e^x\nprint(np.log(x))\t\t#ln x\nprint(np.log10(x))\t\t#log_10 x\nprint(np.log2(x))\t\t#log_2 x\n\n#min/max/misc\nprint(np.fabs(x))\t\t#absolute val as a float\nprint(np.fmin(x,y))\t... | [
[
"numpy.log",
"numpy.log2",
"numpy.arange",
"numpy.sin",
"numpy.log10",
"numpy.fmax",
"numpy.interp",
"numpy.fmin",
"numpy.exp",
"numpy.fabs"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
michelle-aubin/DexiNed | [
"92908fe814d455013263d473871492cace6d49c6"
] | [
"DexiNed-Pytorch/losses.py"
] | [
"import torch\nimport torch.nn.functional as F\nfrom dexi_utils import *\n\n\ndef _weighted_cross_entropy_loss(preds, edges):\n \"\"\" Calculate sum of weighted cross entropy loss. \"\"\"\n # Reference:\n # hed/src/caffe/layers/sigmoid_cross_entropy_loss_layer.cpp\n # https://github.com/s9xie/hed/is... | [
[
"torch.mean",
"torch.sigmoid",
"torch.sum",
"torch.zeros_like",
"torch.nn.BCELoss",
"torch.ones_like"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.