repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
possible_versions
list
Randl/MNASNet-pytorch
[ "b949c36753b66979158c44ed0dc1368794b5c63d" ]
[ "MnasNet.py" ]
[ "import torch\nimport torch.nn as nn\nfrom torch.autograd import Variable\n\n# from https://github.com/billhhh/MnasNet-pytorch-pretrained\nfrom dropblock import DropBlockScheduled, DropBlock2D\n\n\ndef Conv_3x3(inp, oup, stride, activation=nn.ReLU6, act_params={\"inplace\": True}):\n return nn.Sequential(\n ...
[ [ "torch.nn.Sequential", "torch.nn.Dropout", "torch.randn", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.AdaptiveAvgPool2d", "torch.nn.BatchNorm2d" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
chelseajohn/isle
[ "f610b55a1e8b6d2584896eb649092b0524cc1f8c" ]
[ "src/isle/checks.py" ]
[ "\"\"\"!\nVarious basic checks.\n\"\"\"\n\n## \\defgroup check Consistency checks\n# Perform consistency checks on HMC trajectories.\n#\n# All callables in this module satisfy the requirements of hmc.hmc, i.e.\n# they have arguments\n# - `startPhi`/`endPhi`: Configuration before and after the evolver.\n# - `start...
[ [ "numpy.real", "numpy.imag" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jpool-nv/apex
[ "d36397d2b8ce5c8854997e4ec2828e056e8fda89" ]
[ "apex/contrib/test/layer_norm/test_fast_layer_norm.py" ]
[ "import unittest\nimport sys\nimport os\n\nimport numpy as np\nimport torch\n\nimport fast_layer_norm as fln\nfrom apex.contrib.layer_norm.layer_norm import FastLayerNorm\n\n\nclass GPUTimer:\n def __init__(self, stream):\n self.start_ = torch.cuda.Event(enable_timing=True)\n self.stop_ = torch.cud...
[ [ "torch.randn_like", "torch.cuda.manual_seed", "torch.cuda.is_bf16_supported", "torch.randn", "torch.manual_seed", "torch.cuda.Event", "torch.cuda.amp.autocast", "torch.numel", "torch.rsqrt", "torch.square", "torch.cuda.stream", "torch.device", "torch.cuda.Stream...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
uzair789/ssd.pytorch
[ "e57779bff3b740e9d8a5fca1f4751169b54900a6" ]
[ "data/coco.py" ]
[ "from .config import HOME\nimport os\nimport os.path as osp\nimport sys\nimport torch\nimport torch.utils.data as data\nimport torchvision.transforms as transforms\nimport cv2\nimport numpy as np\n\n#COCO_ROOT = osp.join(HOME, 'data/coco/')\nCOCO_ROOT = osp.join('/media/apple/ssd.pytorch', 'data/')\nIMAGES = 'image...
[ [ "numpy.array", "numpy.expand_dims", "torch.from_numpy" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
rmathsphys/python-mathsphys
[ "ce0b3968e6e68dbeb76b1096b7536ec16fa5aef4" ]
[ "Code/trochoidal-waves.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.animation as anim\n\nxmax = 18 # maximum x-axis value to display (xmin = 0)\nymax = 2.5 # maximum x-axis value to display (ymin = -ymax)\ncolour = '#f0f8ff'\n\nr = 1 # radius of the generating circle\nk = 60 # resolution of the surface\nturbule...
[ [ "numpy.linspace", "numpy.arange", "matplotlib.pyplot.subplots", "numpy.cos", "numpy.sin", "matplotlib.animation.FuncAnimation", "numpy.column_stack", "numpy.array", "matplotlib.pyplot.show", "matplotlib.animation.FFMpegWriter" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
804173948/nslt
[ "0faae60e19b7df425fb0635e8705e3a791fb2fd3" ]
[ "nslt/utils/iterator_utils_old.py" ]
[ "# Copyright 2017 Google Inc. 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.constant", "tensorflow.concat", "tensorflow.reshape", "tensorflow.expand_dims", "tensorflow.data.Dataset.zip", "tensorflow.string_split", "numpy.load", "numpy.flip", "tensorflow.size", "tensorflow.py_func", "tensorflow.logical_and" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
sihaanssr/semVI
[ "3d7a773eb533e2f05249839d3730c8b4cbefca15", "3d7a773eb533e2f05249839d3730c8b4cbefca15" ]
[ "ML/Simple-Naive-Bayes-Weather-Prediction-master/bayes.py", "DWH/Expt10/info_gain_decision_tree.py" ]
[ "from functools import reduce\n\nimport pandas as pd\nimport pprint\n\nclass Classifier():\n data = None\n class_attr = None\n priori = {}\n cp = {}\n hypothesis = None\n\n\n def __init__(self,filename=None, class_attr=None ):\n self.data = pd.read_csv(filename, sep=',', header =(0))\n ...
[ [ "pandas.read_csv" ], [ "numpy.log2", "numpy.unique", "pandas.DataFrame", "numpy.finfo", "numpy.argmax" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", ...
UU-tracktech/fast-reid
[ "8e367315fc3b95d326fc37a9bde7b83f90eaf825" ]
[ "fastreid/layers/splat.py" ]
[ "# encoding: utf-8\n\"\"\"\n@author: xingyu liao\n@contact: sherlockliao01@gmail.com\n\"\"\"\n\nimport torch\nimport torch.nn.functional as F\nfrom torch import nn\nfrom torch.nn import Conv2d, ReLU\nfrom torch.nn.modules.utils import _pair\ntry:\n from processor.pipeline.reidentification.fastreid.fastreid.laye...
[ [ "torch.nn.functional.softmax", "torch.sigmoid", "torch.split", "torch.nn.Conv2d", "torch.nn.functional.adaptive_avg_pool2d", "torch.nn.modules.utils._pair", "torch.nn.ReLU" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
LinWeizheDragon/AutoFidgetDetection
[ "8a0d0fcc8938c2c9e97655e999e226c61f414cfe" ]
[ "src/utility/interpolation.py" ]
[ "import numpy as np\nfrom scipy.interpolate import interp1d\n\ndef cubic_interpolate(collection, confidence):\n '''\n Cubic Interpolation\n :param collection: np.array shape(n_frames,)\n :param confidence: np.array shpae(n_frames,)\n :return: interpolated_collection: np.array shape(n_frames,)\n ...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
njimenezd/Pandora
[ "9e3c2054415301edac6da7510056af0136790277" ]
[ "pandora/matching_cost/zncc.py" ]
[ "#!/usr/bin/env python\n# coding: utf8\n#\n# Copyright (c) 2020 Centre National d'Etudes Spatiales (CNES).\n#\n# This file is part of PANDORA\n#\n# https://github.com/CNES/Pandora\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the L...
[ [ "numpy.swapaxes", "numpy.multiply", "numpy.arange", "numpy.append", "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
etri/dtsim
[ "927c8e05c08c74ed376ec233ff677cd35b29e6f0" ]
[ "util/Visualizer/animateSingle.py" ]
[ "#!/usr/bin/python3.6\n\nimport shapefile\nimport matplotlib.pyplot as plt\nimport matplotlib.animation\nimport numpy as np\nimport configparser\nimport random\nimport time \n\n######################################\n# STEP1 : load config parameter\n######################################\nconfig = configparser.Conf...
[ [ "matplotlib.pyplot.gca", "matplotlib.pyplot.scatter", "matplotlib.pyplot.ylim", "matplotlib.pyplot.annotate", "matplotlib.pyplot.Polygon", "matplotlib.pyplot.xlim", "matplotlib.pyplot.subplots_adjust", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mbaak/Eskapade
[ "00c8f6ca52eb5b738b4268257e277dab71b804cb" ]
[ "python/eskapade/analysis/links/df_concatenator.py" ]
[ "\"\"\"Project: Eskapade - A python-based package for data analysis.\n\nClass: DataFrameColumnRenamer\n\nCreated: 2016/11/08\n\nDescription:\n Algorithm to concatenate multiple pandas datadrames\n\nAuthors:\n KPMG Advanced Analytics & Big Data team, Amstelveen, The Netherlands\n\nRedistribution and use in sou...
[ [ "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": [] } ]
CIFASIS/splitting_gan
[ "292fac0ea587e67c095a5ffa8f6ca7575afb1ce1" ]
[ "tflib/save_images.py" ]
[ "\"\"\"\nImage grid saver, based on color_grid_vis from github.com/Newmu\n\"\"\"\n\nimport numpy as np\nimport scipy.misc\nfrom scipy.misc import imsave\n\ndef save_images(X, save_path, mod=None):\n # [0, 1] -> [0,255]\n if isinstance(X.flatten()[0], np.floating):\n X = (255.99*X).astype('uint8')\n\n ...
[ [ "scipy.misc.imsave", "numpy.zeros", "numpy.sqrt" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "0.14", "0.15", "1.0", "0.19", "0.18", "1.2", "0.12", "0.10", "0.17", "0.16" ], "tensorflow": [] } ]
TimHuynh0905/final_project
[ "50cde6b425b54b5a2a9cd63123af220c2240bb8d" ]
[ "exp/knn_dist_diff.py" ]
[ "\"\"\"\nExperiment summary\n------------------\nTreat each province/state in a country cases over time\nas a vector, do a simple K-Nearest Neighbor between \ncountries. Take the difference between cases. Get\nthe distribution of this data (to make it time-invariant).\nUse the distribution as the feature vector.\n\...
[ [ "numpy.unique", "sklearn.neighbors.KNeighborsClassifier", "numpy.concatenate", "numpy.diff", "numpy.histogram" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
nntrongnghia/thanos_project
[ "6db56bc232541d2c857ace0cd0d4681d53290422" ]
[ "thanos/dataset/target_transform.py" ]
[ "import torch\nimport torch.nn.functional as F\n\ndef binary_label_transform(target_dict, **kwargs):\n label = target_dict[\"label\"]\n if label != 0:\n label = 1\n return label\n\ndef read_label_from_target_dict(target_dict, **kwargs):\n return target_dict[\"label\"]\n\ndef one_hot_label_transfo...
[ [ "torch.tensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
drjod/tespy
[ "b90508178ff3527665781b99d20d3dddd8cb23a2", "b90508178ff3527665781b99d20d3dddd8cb23a2" ]
[ "src/tespy/components/heat_exchangers/condenser.py", "src/tespy/components/basics/cycle_closer.py" ]
[ "# -*- coding: utf-8\n\n\"\"\"Module of class Condenser.\n\n\nThis file is part of project TESPy (github.com/oemof/tespy). It's copyrighted\nby the contributors recorded in the version control history of the file,\navailable from its original location\ntespy/components/heat_exchangers/condenser.py\n\nSPDX-License-I...
[ [ "numpy.log" ], [ "numpy.linalg.norm", "numpy.abs" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
bgorr/instrupy
[ "e3dca871ce2dcd2ef279898fcc36bf9d18f0c243" ]
[ "tests/test_util.py" ]
[ "\"\"\"Unit tests for instrupy.util module.\n\"\"\"\n\nimport json\nimport unittest\n\nimport numpy as np\nfrom instrupy.util import *\n\nclass TestEntity(unittest.TestCase):\n \n class ChildClass(Entity): \n def __init__(self):\n self._id = 123\n self.name = \"Ramesh\"\n...
[ [ "numpy.arange", "numpy.linalg.norm", "numpy.sin", "numpy.arctan2", "numpy.testing.assert_almost_equal", "numpy.deg2rad", "numpy.cross", "numpy.meshgrid" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Psirus/Nimfem
[ "6cd97997e92a62ff720d8a0073e072247320d251" ]
[ "benchmark/comparison.py" ]
[ "import os\nimport subprocess\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.ticker as ticker\n\nelements = np.logspace(2, 7, 6)\n\ntime_nim = []\ntime_fenics = []\n\nfenics_env = os.environ.copy()\nfenics_env[\"OMP_NUM_THREADS\"] = \"1\"\n\nos.makedirs(\"timings\", exist_ok=True)\nrun = ...
[ [ "matplotlib.pyplot.legend", "numpy.sqrt", "numpy.logspace", "matplotlib.pyplot.loglog", "matplotlib.pyplot.savefig", "matplotlib.pyplot.xlabel", "numpy.array", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
usnistgov/chebby
[ "75dbccfd9a029e91cbfdfd263befc51b893822ea" ]
[ "scripts/test_Basu.py" ]
[ "\"\"\"\nA driver script to test the implementation in cheb2d_Basu for correctness and speed (in Python at least)\n\"\"\"\nimport timeit\nfrom cheb2d_Basu import *\nimport matplotlib.pyplot as plt\nimport pandas\n\nx_ = 0.7\ny_ = 0.7\n\n# f = lambda x, y: np.sin(x)*np.cos(-0.01*y**2)\nf = lambda x, y: x**3*np.sin(-...
[ [ "matplotlib.pyplot.gca", "matplotlib.pyplot.yscale", "pandas.DataFrame", "matplotlib.pyplot.plot", "matplotlib.pyplot.show" ] ]
[ { "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": [] } ]
Jitesh17/ortools_projects
[ "475ec8fd24bd5826d968b1165c8cafa0553ca290" ]
[ "test/yanagi1.py" ]
[ "from __future__ import annotations\n\nimport os\nimport sys\n\nimport numpy as np\nimport openpyxl\nimport pandas as pd\nimport printj\nfrom ortools.sat.python import cp_model\nfrom printj import ColorText as ct\n\n# from typing import Union\n\n\nclass TimeVar:\n def __init__(self, hours: int, minutes: int):\n ...
[ [ "pandas.notna", "pandas.concat", "numpy.matmul", "pandas.DataFrame", "pandas.ExcelWriter" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.3", "1.1", "1.5", "0.24", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] } ]
smithis7/tardis
[ "02a816b66ba0e9cd778ce598a7d0afa4a25370c0" ]
[ "tardis/montecarlo/montecarlo_numba/formal_integral.py" ]
[ "import sys\nimport warnings\nimport numpy as np\nimport pandas as pd\nimport scipy.sparse as sp\nfrom scipy.interpolate import interp1d\nfrom astropy import units as u\nfrom tardis import constants as const\nfrom numba import njit, char, float64, int64, typeof, byte, prange\nfrom numba.experimental import jitclass...
[ [ "scipy.sparse.coo_matrix", "numpy.sqrt", "numpy.linspace", "scipy.sparse.linalg.spsolve", "numpy.arange", "numpy.arccos", "pandas.DataFrame", "scipy.interpolate.interp1d", "scipy.sparse.identity", "numpy.diff", "numpy.searchsorted", "numpy.exp", "numpy.array", ...
[ { "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", "1.10", "0...
meracan/netcdf-swan
[ "f7548129331d34323ac960f315ca592d9511086a" ]
[ "test/test_netcdfswan.py" ]
[ "import os\nimport json\nfrom netcdfswan import NetCDFSWAN\nimport numpy as np\nimport logging\nfrom dataTest import elem,time,lat,lon,bed,slat,slon,freq,dir,spcgroup,variables, stations\n\n\ndef test_NetCDFSWAN_write():\n swanFolder=\"../s3/swandata\"\n jsonFile='./test/json/demo.json'\n input=NetCDFSWAN.prepar...
[ [ "numpy.testing.assert_array_equal" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
hlibe/FinTech-of-Networks
[ "64c00951ea192adc69166ecdc0a08668a4a40858" ]
[ "LR.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Nov 27 15:19:34 2021\n\n@author: HaoLI\n\"\"\"\n# evaluate gradient boosting algorithm for classification\nimport pandas as pd\nimport numpy as np\nimport os\nimport matplotlib.pyplot as plt\nfrom numpy import mean\nfrom numpy import std\nfrom...
[ [ "matplotlib.pyplot.legend", "pandas.read_csv", "sklearn.linear_model.LogisticRegression", "matplotlib.pyplot.title", "sklearn.metrics.auc", "sklearn.model_selection.train_test_split", "numpy.percentile", "pandas.DataFrame", "sklearn.metrics.roc_curve", "matplotlib.pyplot.pl...
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
Shahzaib1999/Python
[ "25d163fb2db3001814e373814781d6ff6a4675d3" ]
[ "start.py" ]
[ "import numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport random \r\nx=np.linspace(-4,4,9)\r\ny=np.linspace(-5,5,11)\r\n#print(x)\r\n#print(y)\r\nxx,yy=np.meshgrid(x,y)\r\n#print(yy)\r\n#ellipse=xx**2.0+4.0*yy**2.0\r\nrand=np.random.random_sample((11, 9))\r\nplt.contourf(xx,yy,rand,cmap=\"jet\")\r\nplt.colo...
[ [ "matplotlib.pyplot.contourf", "numpy.linspace", "numpy.random.random_sample", "matplotlib.pyplot.colorbar", "numpy.meshgrid", "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
YBZh/MetaFGNet
[ "a9c2128f5d2a6cdffa25d49291b037270f3de166", "a9c2128f5d2a6cdffa25d49291b037270f3de166" ]
[ "Sample_Selection/models/resnet0.py", "MetaFGNet_with_Sample_Selection/main.py" ]
[ "import torch.nn as nn\nfrom torch.legacy import nn as torchnn\nimport copy\nimport math\nimport torch.utils.model_zoo as model_zoo\n\n\n__all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101',\n 'resnet152']\n\n\nmodel_urls = {\n 'resnet18': 'https://download.pytorch.org/models/resnet18-5...
[ [ "torch.nn.Sequential", "torch.nn.Softmax", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.MaxPool2d", "torch.nn.AvgPool2d", "torch.nn.BatchNorm2d", "torch.nn.ReLU", "torch.utils.model_zoo.load_url" ], [ "torch.nn.CrossEntropyLoss", "numpy.random.seed" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
cjauvin/RavenPy
[ "d9671b5a71004bb0501ab64e0e6efbd06d2fa465" ]
[ "ravenpy/models/base.py" ]
[ "\"\"\"\nBase classes\n------------\n\nThe `Raven` class is the base class that implements model setup, execution and output retrieval, while the `Ostrich`\nclass is the base class adapting `Raven` to work with the Ostrich calibration tool.\n\n\"\"\"\nimport csv\nimport datetime as dt\nimport operator\nimport os\ni...
[ [ "numpy.atleast_1d", "numpy.atleast_2d", "numpy.loadtxt" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mdnls/tramp
[ "5b8be12df2003ba1364e8a5a83fe597558c848c3" ]
[ "examples/glm/data/compressed_sensing_ep_vs_se.py" ]
[ "import logging\nimport numpy as np\nfrom tramp.models import glm_generative\nfrom tramp.experiments import save_experiments, BayesOptimalScenario\nfrom tramp.algos import EarlyStopping, EarlyStoppingEP\n\ndef run_cs(N, alpha, ensemble_type, prior_rho):\n model = glm_generative(\n N=N, alpha=alpha, ensemb...
[ [ "numpy.linspace" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
AndrewRook/polling_simulator
[ "df390b26bb7f2f6fd019813de1ab188489a68d61" ]
[ "tests/test_core.py" ]
[ "import numpy as np\nimport pandas as pd\n\nfrom polling_simulator import core\n\n\nclass TestVariable:\n\n def test_instantiates_ok(self):\n var = core.Variable(\"woo\", lambda x: np.ones(x))\n assert var.name == \"woo\"\n\n\nclass TestSegmentationVariable:\n def test_general_working(self):\n ...
[ [ "pandas.Series", "pandas.DataFrame", "numpy.ones" ] ]
[ { "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": [] } ]
bmahlbrand/DeepSDF
[ "a55416a995ae1c918f18e32681d262853b496788" ]
[ "deep_sdf/mesh.py" ]
[ "#!/usr/bin/env python3\n# Copyright 2004-present Facebook. All Rights Reserved.\n\nimport logging\nimport numpy as np\nimport plyfile\nimport skimage.measure\nimport time\nimport torch\n\nimport deep_sdf.utils\n\n\ndef create_mesh(decoder, latent_vec, filename, N=256, max_batch=32 ** 3):\n start = time.time()\n...
[ [ "torch.LongTensor", "torch.zeros", "numpy.zeros_like", "numpy.array", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
raoulbia/Python-for-Data-Science
[ "5a25b1c734f48e77c652a1bfd68513fbd2e45891" ]
[ "Tutorials/Exercise Solution.py" ]
[ "# Import numpy\nimport numpy as np\n\n# store the variables in arrays\nprob = np.array([0.25, 0.5, 0.25])\nrate_1 = np.array([0.05, 0.075, 0.10])\nrate_2 = np.array([0.2, 0.15, 0.1])\n\n# expected return of each investment\nexpected_return1 = np.sum(prob * rate_1)\nexpected_return2 = np.sum(prob * rate_2)\n\n# ...
[ [ "numpy.dot", "numpy.sqrt", "numpy.cov", "numpy.array", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
zhuyuanxiang/deep-learning-with-python-notebooks
[ "6b6b5670193f5a26321c36de3b547203e30dc8c7" ]
[ "ch03/ch0306_regression.py" ]
[ "# -*- encoding: utf-8 -*- \n\"\"\"\n@Author : zYx.Tom\n@Contact : 526614962@qq.com\n@site : https://zhuyuanxiang.github.io\n---------------------------\n@Software : PyCharm\n@Project : deep-learning-with-python-notebooks\n@File : ch0306_regression.py\n@Version : v0.1\n@T...
[ [ "numpy.random.seed", "matplotlib.pyplot.figure", "numpy.set_printoptions", "numpy.concatenate", "numpy.mean", "matplotlib.pyplot.get_fignums", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
christofs/romstat
[ "6ef7260290aa93a86e651ab09f8ce262f92e1331" ]
[ "code/viz_alle_umfang.py" ]
[ "import re\nfrom os.path import join\nimport glob\nimport os\nimport pandas as pd\nfrom datetime import date\nimport pygal\nfrom pygal.style import BlueStyle\nfrom pygal.style import DarkGreenBlueStyle\nfrom pygal.style import TurquoiseStyle\nfrom pygal.style import CleanStyle\nfrom collections import Counter\nfrom...
[ [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
s3bc40/tutorials
[ "8ecc11a0a7c4278f6d0b0c7f9273e63da3fb7780" ]
[ "script/modeling_tree.py" ]
[ "from sklearn.datasets import load_iris\nfrom sklearn import tree\nimport graphviz \n\n#Preprocessing\niris = load_iris()\nclf = tree.DecisionTreeClassifier()\nclf = clf.fit(iris.data, iris.target)\n\n#Modeling \ndot_data = tree.export_graphviz(clf, out_file=None, \n feature_names=iris.featu...
[ [ "sklearn.tree.DecisionTreeClassifier", "sklearn.datasets.load_iris", "sklearn.tree.export_graphviz" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
zhengdd0422/VFNet
[ "b21e6635ffa318c0d8d81218ef47a92eac11bb4d" ]
[ "baseline_classify_VFG-564.py" ]
[ "import os\nimport numpy as np\nfrom sklearn import svm\nfrom sklearn.svm import SVC, LinearSVC\nfrom sklearn.metrics import classification_report\nfrom sklearn.model_selection import train_test_split\nfrom sklearn import preprocessing\nfrom sklearn import metrics\nfrom sklearn.ensemble import RandomForestClassifie...
[ [ "sklearn.linear_model.LogisticRegression", "numpy.random.seed", "numpy.unique", "sklearn.ensemble.RandomForestClassifier", "sklearn.metrics.precision_score", "sklearn.model_selection.train_test_split", "numpy.concatenate", "sklearn.tree.DecisionTreeClassifier", "sklearn.svm.SVC...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
talhaadnan100/SklearncomPYre
[ "aa1c36c4d555be34eccd803546ec253cfdd0fd2c" ]
[ "SklearncomPYre/comparison_viz.py" ]
[ "import numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\n# coding: utf-8\n\n\n\ndef comparison_viz(comparison, choice = \"accuracy\"):\n '''\n The purpose of the function is to help User visualize the comparison of accuracies or time given in the comparison\n dataframe. It takes in a da...
[ [ "numpy.arange", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
reazulhoque/dpbench
[ "f1000a151814c656baa90d9c4d81b51bb5eb1fa9" ]
[ "native_dpcpp/blackscholes/GPU/base_bs_erf.py" ]
[ "# Copyright (C) 2017-2018 Intel Corporation\n#\n# SPDX-License-Identifier: MIT\n\nimport os, utils\nimport numpy as np\nfrom dpbench_datagen.blackscholes import gen_data_to_file, gen_rand_data\nfrom dpbench_python.blackscholes.bs_python import black_scholes_python\n\n# make xrange available in python 3\ntry:\n ...
[ [ "numpy.fromfile", "numpy.zeros", "numpy.allclose", "numpy.ones" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
aleju/LossAccPlotter
[ "3c66a1be11117297d75275c3b099b2f108860ecb" ]
[ "laplotter.py" ]
[ "\"\"\"A class to generate plots for the results of applied loss functions and/or\naccuracy of models trained with machine learning methods.\n\nExample:\n plotter = LossAccPlotter()\n for epoch in range(100):\n loss_train, acc_train = your_model.train()\n loss_val, acc_val = your_model.validate(...
[ [ "numpy.polyfit", "numpy.poly1d", "matplotlib.pyplot.subplots", "matplotlib.pyplot.draw", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
OneToolsCollection/4paradigm-AutoX
[ "f8e838021354de17f5bb9bc44e9d68d12dda6427" ]
[ "autox/autox_recommend/recall_and_rank/recalls/binary_recall.py" ]
[ "import gc\nimport math\nimport warnings\nimport pandas as pd\nfrom tqdm import tqdm\n\nwarnings.filterwarnings('ignore')\nimport datetime\n\n\ndef BinaryNet_Recommend(sim_item, user_item_dict, user_time_dict, user_id, top_k, item_num, time_max,\n rt_dict=False):\n rank = {}\n interacte...
[ [ "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": [] } ]
derwind/dmfont
[ "17a91a9cc1917d2485eaa8e92b68245578920c76" ]
[ "datasets/data_utils.py" ]
[ "\"\"\"\nDMFont\nCopyright (c) 2020-present NAVER Corp.\nMIT license\n\"\"\"\nimport numpy as np\n\n\ndef cyclize(loader):\n \"\"\" Cyclize loader \"\"\"\n while True:\n for x in loader:\n yield x\n\n\ndef rev_dict(l):\n \"\"\" Reverse dict or list \"\"\"\n return {k: i for i, k in enu...
[ [ "numpy.empty", "numpy.linspace" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
hannahmfan/covid-prediction
[ "96482cfb6fff8959772ccd48c10ce0588b191f18" ]
[ "processing/raw_data_processing/get_JH_daily.py" ]
[ "#%%\nimport pandas as pd\nimport numpy as np\nimport requests\nfrom datetime import datetime as dt\nfrom io import StringIO\nimport os\nimport us\nimport git\nfrom functools import reduce\nfrom datetime import datetime, timedelta, date\n\n#%%\ndef clean_df(df, date):\n \"\"\"Cleans up dataframe to get only US c...
[ [ "pandas.concat", "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
Crispy13/crispy
[ "835f487e099d26243153454fdc81086716114a85" ]
[ "core/ehk.py" ]
[ "import cv2\nimport json\nimport os\nimport csv\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom PIL import Image, ImageDraw\nfrom pathlib import Path\nfrom PIL import Image\nfrom matplotlib import cm, colors\nimport crispy as csp\nimport tensorflow as tf\nfrom tensorflow import keras\nimport tifffile\nim...
[ [ "tensorflow.io.TFRecordOptions", "numpy.expand_dims", "numpy.squeeze", "tensorflow.cast", "tensorflow.equal", "pandas.DataFrame", "numpy.concatenate", "numpy.histogram", "numpy.where", "tensorflow.train.Int64List", "pandas.read_csv", "tensorflow.data.TFRecordDataset...
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
ankitshah009/R2Plus1D
[ "45b04d6b7cd51baf81c144df56369b7521334cc6" ]
[ "c2/tools/train_net.py" ]
[ "# Copyright 2018-present, Facebook, 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 la...
[ [ "numpy.concatenate", "numpy.asscalar", "numpy.mean", "numpy.empty" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
hiryou/MLPractice
[ "72de4e54b7775b3e51415deef25dfba13f0df2bd" ]
[ "ludus/neural_net/hello_world/by_numpy.py" ]
[ "import os\nfrom datetime import datetime as dt\n\nimport numpy as np\n\n\"\"\"\nInspired by https://repl.it/repls/OrganicVainDoom#main.py\n\"\"\"\n\n\nclass NeuralNet(object):\n r\"\"\"\n This is the bare NN impl to help remind you of how forward/back propagation work in terms of code data structure\n\n E...
[ [ "numpy.square", "numpy.dot", "numpy.random.randn", "numpy.exp", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
SemiUnsupervisedLearning/DGMs_for_semi-unsupervised_learning
[ "a89c7be92403c3582f3bce534f982382f9733055" ]
[ "src/models/m2.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom models.model import model\n\nimport numpy as np\nnp.random.seed(1)\nimport utils.dgm as dgm\n\nimport tensorflow as tf\ntf.set_random_seed(1)\n\nfrom keras.layers import Dense, Activation\nfrom ke...
[ [ "tensorflow.concat", "tensorflow.constant", "numpy.random.seed", "tensorflow.reduce_mean", "tensorflow.shape", "tensorflow.reduce_sum", "tensorflow.reshape", "tensorflow.placeholder", "tensorflow.expand_dims", "tensorflow.eye", "tensorflow.log", "tensorflow.set_rand...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
Leinadh/PeruvianImageGenerator
[ "9bf11125f4ea3090e217cf15866ec19ce944f9c6" ]
[ "evaluation/tsne_analysis_baseline/tsne_evaluation_utils/grid.py" ]
[ "import logging\nimport os\nfrom glob import glob\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\nimport seaborn as sns\nfrom MulticoreTSNE import MulticoreTSNE as TSNE\nfrom PIL import Image\nfrom sklearn.decomposition import PCA\nfrom sklearn.preprocessing import StandardScaler\n\nlog...
[ [ "numpy.sum", "numpy.clip", "numpy.min", "numpy.ptp", "pandas.DataFrame", "numpy.prod", "numpy.transpose", "numpy.load", "sklearn.preprocessing.StandardScaler", "numpy.array", "numpy.zeros", "sklearn.decomposition.PCA", "matplotlib.pyplot.figure" ] ]
[ { "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": [] } ]
JohnHBrock/NMAP-Cluster
[ "ee3eb57ebe9a70b0509a9763d1ae5f9c5461cb19" ]
[ "clusteringnmap/validation.py" ]
[ "from sklearn.metrics import silhouette_samples, silhouette_score\nfrom scipy.spatial.distance import pdist\nimport numpy as np\n\ndef validate_clusters(vectors, labels, ignore_single_point_clusters=False):\n \"\"\"\n\n :param vectors:\n :param labels:\n :return: (adjusted silhouette score average (remo...
[ [ "numpy.vstack", "scipy.spatial.distance.pdist", "sklearn.metrics.silhouette_samples" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "1.6", "0.14", "1.10", "0.15", "1.4", "0.16", "1.9", "0.19", "1.5", "0.18", "1.2", "1.7", "0.12", "1.0", "0.17", "1.3", "1.8" ...
Padfoot-ted/toad
[ "0b6973e910c337b779b6c95087f6d24b89a20eed" ]
[ "toad/preprocessing/partition_test.py" ]
[ "import pytest\nimport numpy as np\nimport pandas as pd\n\n\nfrom .partition import TimePartition, ValuePartition\n\n\nnp.random.seed(1)\n\nab = np.array(list('ABCDEFG'))\n\nhistory = np.full(500, np.datetime64('2020-03-01')) - np.random.randint(30, 400, size = 500)\nopen_time = np.full(500, np.datetime64('2020-03-...
[ [ "numpy.random.seed", "numpy.random.choice", "pandas.DataFrame", "numpy.datetime64", "numpy.random.randint" ] ]
[ { "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": [] } ]
lazidoca/DeOldify
[ "047799721d190b2555a3e22834a25c88cff6d52f" ]
[ "app_utils.py" ]
[ "import os\nimport random\nimport shutil\nfrom uuid import uuid4\n\nimport requests\n\nimport _thread as thread\nimport numpy as np\nimport skimage\nfrom PIL import Image\nfrom skimage.filters import gaussian\n\n\ndef compress_image(image, path_original):\n size = 1920, 1080\n width = 1920\n height = 1080\...
[ [ "numpy.round" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jordanhoare/pybot-lostark
[ "88a1f25255fbde9ccf55fd0e84a3dfe908cb4fb8" ]
[ "draft/core/vision.py" ]
[ "import cv2 as cv\nimport numpy as np\n\n\nclass Vision:\n # constants\n TRACKBAR_WINDOW = \"Trackbars\"\n\n # properties\n needle_img = None\n needle_w = 0\n needle_h = 0\n method = None\n\n # constructor\n def __init__(self, needle_img_path, method=cv.TM_CCOEFF_NORMED):\n # load ...
[ [ "numpy.array", "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
whatbeg/Data-Analysis
[ "b1f878564448527ca730f6d869dc3cb0d9b678d7" ]
[ "CNN_for_Mnist/SK_0.2Sigmoid.py" ]
[ "from __future__ import print_function\nimport numpy as np\nimport preprocessing as proc\nimport argparse\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\nfrom torch.autograd import Variable\n\n# Training settings\nparser = argparse.ArgumentParser(description='BASE...
[ [ "torch.nn.BatchNorm1d", "torch.nn.Dropout", "torch.cuda.manual_seed", "torch.nn.functional.log_softmax", "torch.nn.functional.nll_loss", "torch.manual_seed", "torch.from_numpy", "torch.nn.Linear", "numpy.random.permutation", "torch.cuda.is_available", "torch.nn.function...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
maziarraissi/BSNNs
[ "f0a14d1b03cc17e89642106cf3ebba76ddf6bb0c" ]
[ "BlackScholesBarenblatt100D.py" ]
[ "\"\"\"\n@author: Maziar Raissi\n\"\"\"\n\nimport numpy as np\nimport tensorflow as tf\nfrom FBSNNs import FBSNN\nimport matplotlib.pyplot as plt\nfrom plotting import newfig, savefig\n\nclass BlackScholesBarenblatt(FBSNN):\n def __init__(self, Xi, T,\n M, N, D,\n laye...
[ [ "matplotlib.pyplot.legend", "numpy.sqrt", "matplotlib.pyplot.title", "numpy.reshape", "matplotlib.pyplot.figure", "tensorflow.reduce_sum", "matplotlib.pyplot.plot", "numpy.std", "numpy.mean", "numpy.exp", "matplotlib.pyplot.xlabel", "tensorflow.matrix_diag", "nu...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
devanshjani/codechallenges
[ "d5383916611b82e2490c2f1097fb9e32bdfec0d0" ]
[ "quantum_black_challange3.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"Challenge 3: .\"\"\"\n# Created: 2019-04-10 Devansh Jani <devanshjani@gmail.com>\nimport numpy as np\nfrom numpy import genfromtxt\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.multiclass import OneVsRestClassifier\n\n\ndef train_classifier(train_data: np.array, ...
[ [ "numpy.savetxt", "sklearn.multiclass.OneVsRestClassifier", "sklearn.ensemble.RandomForestClassifier", "numpy.genfromtxt" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
cbsilver/glaciationBCs
[ "36e26a59681243c90af57f5ff43e56d4ab9ce82d" ]
[ "src/glaciationBCs/pythonBCsOGS.py" ]
[ "# Collection of python boundary condition (BC) classes for OpenGeoSys\n# BCs reflect the external geosphere: cryo-, litho- and atmosphere\n# Physical units: depending on parameter set, see below!\n\nimport OpenGeoSys\nimport glaciationBCs\nfrom glaciationBCs import glacierclass as glc\t#glacial objects\nfrom glaci...
[ [ "numpy.linspace" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sionab/simmate
[ "6dedea7310829aae425bf3393e7923e454a0129f" ]
[ "src/simmate/toolkit/symmetry/webscraper/aflow.py" ]
[ "# -*- coding: utf-8 -*-\n\nfrom selenium import webdriver\nimport pandas as pd\nfrom tqdm import tqdm\n\n# launch the webbrowser\ndriver = webdriver.Chrome(\n executable_path=\"/snap/bin/chromium.chromedriver\"\n) # /snap/bin/chromium gives errors\n\n# load the webpage\ndriver.get(\"http://aflowlib.org/Crystal...
[ [ "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": [] } ]
jeremymanning/hypertools
[ "1b39b41aaa634e816d73635e0b9b773f1ed6e709" ]
[ "hypertools/cluster/cluster.py" ]
[ "# noinspection PyPackageRequirements\nimport datawrangler as dw\nimport pandas as pd\n\nfrom ..core import apply_model, get_default_options, eval_dict\n\n\n@dw.decorate.apply_stacked\ndef cluster(data, model='KMeans', **kwargs):\n \"\"\"\n Cluster the data and return a list of cluster labels\n\n Parameter...
[ [ "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": [] } ]
Atomu2014/Describing_a_Knowledge_Base
[ "4a79d00e0620ebe01facfbb0ccf8f35b7c2c9c0f" ]
[ "structure_generator/DecoderRNN.py" ]
[ "import torch.nn as nn\nimport numpy as np\nimport torch\nimport sys\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom .baseRNN import BaseRNN\n# self.word2idx['<UNK>'] = 1\n\n\nclass DecoderRNN(BaseRNN):\n\n def __init__(self, vocab_size, embedding, embed_size, pemsize, sos_id, eos_id,\n ...
[ [ "torch.nn.functional.softmax", "torch.LongTensor", "torch.cat", "torch.zeros", "torch.tanh", "torch.nn.Linear", "torch.bmm", "torch.cuda.is_available", "torch.stack", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mrkem598/moviepy
[ "a90d4ab4825cd368963e05ad01fd526d51edd9a5" ]
[ "moviepy/audio/AudioClip.py" ]
[ "import os\nimport numpy as np\nfrom moviepy.audio.io.ffmpeg_audiowriter import ffmpeg_audiowrite\nfrom moviepy.decorators import requires_duration\nfrom moviepy.tools import (deprecated_version_of,\n extensions_dict)\n\nfrom moviepy.Clip import Clip\nfrom tqdm import tqdm\n\nclass AudioCl...
[ [ "numpy.minimum", "numpy.linspace", "numpy.arange", "numpy.cumsum", "numpy.array", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
KitchenSong/effective_mass_tensor
[ "de958571f414feda6af7d6802d14badd776ee13e" ]
[ "effective_mass.py" ]
[ "from __future__ import division\nimport numpy as np\nimport re\nfrom scipy import interpolate\nfrom scipy.interpolate import griddata\n\n# Constant\n\nhbar = 6.62607004e-34 # J S\npi = np.pi\nRy2J = 2.1798741e-18 # J/Ry\nBohr2m = 5.29177249e-11 # m/Bohr\nme = 9.10938356e-31 # kg\nlatt = 11.8873 * Bohr2m\n\n\n# The...
[ [ "numpy.matrix", "numpy.dot", "numpy.linalg.inv", "numpy.linalg.eigh", "scipy.interpolate.griddata", "numpy.zeros" ] ]
[ { "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"...
HiddeLekanne/Robocup-SPL-Simulated2Real
[ "eb905bc256df838ff6963347a8c2dff6277ef1ec", "eb905bc256df838ff6963347a8c2dff6277ef1ec" ]
[ "PyTorch-GAN/implementations/munit/munit_input.py", "PyTorch-GAN/implementations/cyclegan/cyclegan.py" ]
[ "import argparse\nimport os\nimport numpy as np\nimport math\nimport itertools\nimport datetime\nimport time\nimport sys\n\nimport torchvision.transforms as transforms\nfrom torchvision.utils import save_image\n\nfrom torch.utils.data import DataLoader\nfrom torchvision import datasets\nfrom torch.autograd import V...
[ [ "numpy.random.uniform", "torch.nn.L1Loss", "torch.cuda.is_available", "torch.load" ], [ "torch.load", "torch.cat", "torch.cuda.is_available", "torch.nn.L1Loss", "torch.nn.MSELoss" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
daiki98/finn
[ "af783db8dc2a1d2e95bd569d39464b935520b6d2" ]
[ "src/finn/transformation/streamline/reorder.py" ]
[ "# Copyright (c) 2020, Xilinx\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice, this\n# list of conditions an...
[ [ "numpy.array_equal", "numpy.matmul", "numpy.sort", "numpy.ones", "numpy.prod", "numpy.random.uniform", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
hlang8160/cnn-text-tf-hl
[ "dc5eb2d111e08e76e752a15ec98b3d8cb2c99e7c" ]
[ "train.py" ]
[ "#! /usr/bin/env python\n\nimport tensorflow as tf\nimport numpy as np\nimport os\nimport time\nimport datetime\nimport data_helpers\nfrom text_cnn import TextCNN\nfrom tensorflow.contrib import learn\n\n# Parameters\n# ==================================================\n\n# Data loading params\ntf.flags.DEFINE_flo...
[ [ "tensorflow.flags.DEFINE_boolean", "tensorflow.Graph", "tensorflow.train.global_step", "tensorflow.summary.FileWriter", "tensorflow.summary.scalar", "numpy.random.seed", "tensorflow.Variable", "tensorflow.flags.DEFINE_string", "tensorflow.global_variables", "tensorflow.Conf...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Kundjanasith/EMSE-DeepCom
[ "bc29e119f35a03860303c272700d437b699a8e7f" ]
[ "source code/translation_model.py" ]
[ "import tensorflow as tf\nimport os\nimport pickle\nimport re\nimport sys\nimport math\nimport shutil\nimport itertools\nimport utils, evaluation\nfrom seq2seq_model import Seq2SeqModel\nfrom subprocess import Popen, PIPE\nimport time\n\n\nclass TranslationModel:\n def __init__(self, encoders, decoders, checkpoi...
[ [ "tensorflow.train.get_checkpoint_state", "tensorflow.get_default_session", "tensorflow.device", "tensorflow.Variable", "tensorflow.global_variables", "tensorflow.global_variables_initializer", "tensorflow.train.Saver" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
mkomaiha/NERS570-Sudoku
[ "2448de19dd8ae97292b74937d397846d10176a8b" ]
[ "tests/test_hsolver.py" ]
[ "from context import HS\nimport numpy as np\nfrom time import time\nimport unittest\nfrom parameterized import parameterized\nfrom random import randint\nimport logging\n\nLOGGER = logging.getLogger(__name__)\n\n\nclass SolveTestSuite(unittest.TestCase):\n \"\"\"Solve test cases.\"\"\"\n @parameterized.expand...
[ [ "numpy.all" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mickolka/pytorch-0.4-yolov3
[ "19072e7ca9c1add6ffbe2aebae075a3b46712664" ]
[ "region_layer.py" ]
[ "import math\nimport numpy as np\nimport sys\nimport time\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom utils import bbox_iou, multi_bbox_ious, convert2cpu\n\nclass RegionLayer(nn.Module):\n def __init__(self, num_classes=0, anchors=[], num_anchors=1, use_cuda=None):\n super(...
[ [ "torch.nn.CrossEntropyLoss", "torch.linspace", "torch.ones", "torch.max", "torch.zeros", "torch.min", "torch.FloatTensor", "torch.cuda.is_available", "torch.IntTensor", "torch.device", "torch.nn.MSELoss" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
dquail/GVFMinecraft
[ "5eae9ea9974ec604194b32cdb235765ea3fe7fb3" ]
[ "python/display.py" ]
[ "from constants import *\nimport sys\nimport cv2\nif sys.version_info[0] == 2:\n # Workaround for https://github.com/PythonCharmers/python-future/issues/262\n from Tkinter import *\nelse:\n from tkinter import *\n\nfrom PIL import ImageTk\nfrom PIL import Image\n\n\nimport matplotlib, sys\nimport matplotlib.pypl...
[ [ "matplotlib.figure.Figure", "numpy.arange", "matplotlib.use", "matplotlib.pyplot.ion", "matplotlib.backends.backend_tkagg.FigureCanvasTkAgg" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jdkent/brainiak
[ "04719aaa651e9cdab4d77e008495edac60b035b6" ]
[ "tests/funcalign/test_srm.py" ]
[ "# Copyright 2016 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable l...
[ [ "numpy.random.random", "numpy.allclose", "numpy.random.seed", "numpy.linspace", "numpy.eye", "numpy.cos", "numpy.linalg.norm", "numpy.sin", "numpy.vstack" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ryanfadholi/kmeans-py
[ "c81cbdf1bd27f99ee2b037dd057e5b9f87fe74d4" ]
[ "main.py" ]
[ "import numpy as np \n\nfrom simplekmeans import kmeans\n\nk_value = 5\ndatapoints = np.loadtxt(\"example.txt\")\nkmeans(k_value, datapoints)" ]
[ [ "numpy.loadtxt" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
gabrielclow/pandas
[ "6ef4be3f8f269f147b5abedecf7da6f19af305d3" ]
[ "pandas/tests/plotting/test_datetimelike.py" ]
[ "\"\"\" Test cases for time series specific (freq conversion, etc) \"\"\"\n\nfrom datetime import datetime, timedelta, date, time\nimport pickle\n\nimport pytest\nfrom pandas.compat import lrange, zip\n\nimport numpy as np\nfrom pandas import Index, Series, DataFrame, NaT\nfrom pandas.compat import is_platform_mac,...
[ [ "pandas.util.testing.ensure_clean", "pandas.Series", "numpy.asarray", "pandas.DataFrame", "pandas.tests.plotting.common.TestPlotBase.setup_method", "pandas.core.indexes.period.Period", "pandas.core.indexes.datetimes.date_range", "numpy.random.randn", "pandas.core.indexes.timede...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
GillianGrayson/ipAGE
[ "7049cc37da98acf47ebf56876e8b49ae69996ecc" ]
[ "statistics.py" ]
[ "import pandas as pd\nfrom scipy import stats\n\n\ndef perform_statistical_analysis():\n path = f'data/' # Path to the directory with data table\n table_name = f'all_features' # Name of xlsx table with all features\n features_file = 'biomarkers' # Name of file with features, which will use to build the ...
[ [ "scipy.stats.mannwhitneyu", "pandas.read_excel", "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": [ "0.13", "1.6", "0.14", "1.10", "0...
avagreeen/KittiBox
[ "1dfa30352801277dc67d22953cdf87e40c1893e0" ]
[ "inputs/daimler_input.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport itertools\nimport json\nimport logging\nimport os\nimport sys\nimport random\nfrom random import shuffle\n\nimport numpy as np\n\nimport scipy as scp\nimport scipy.misc\n\nfrom scipy.misc import...
[ [ "tensorflow.image.random_brightness", "tensorflow.image.random_contrast", "tensorflow.FIFOQueue", "tensorflow.image.random_hue", "tensorflow.maximum", "tensorflow.minimum", "tensorflow.placeholder", "tensorflow.expand_dims", "numpy.ones", "tensorflow.image.random_saturation...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
g0lemXIV/harmfulness_app
[ "bd73c8bcac2b0da941590c5632900ea98dc52d3e" ]
[ "backend/models/predict.py" ]
[ "import numpy as np\nfrom langdetect import detect\nfrom backend.models import model_lib\nfrom backend.schemas import TextPredict, TextCreate\nfrom backend.core.messages import NO_VALID_PAYLOAD, NO_VALID_LANGUAGE, NO_VALID_SENTENCE\nfrom backend.data import parse_text\n\n\nclass Predictor:\n \"\"\"Base class for...
[ [ "numpy.around", "numpy.argmax" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Jopplk/trumpRallies
[ "a4ad985354192a9880c5e55068fb7d7eca3738ee" ]
[ "geopandasMap.py" ]
[ "# Creates US state choropleth map with geopandas\nimport geopandas as gpd\nimport pandas as pd\nimport numpy as np\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nfrom mpl_toolkits.axes_grid1 import make_axes_locatable\n\n\n# Getting rally data\ndef agg(dfFile):\n data = pd.read_csv(dfFile)\n agg...
[ [ "pandas.read_csv", "matplotlib.pyplot.cm.get_cmap", "numpy.linspace", "matplotlib.pyplot.subplots", "matplotlib.cm.ScalarMappable", "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
YagoGG/pandas
[ "fc813e76e7d8863410aa4b1a581dfa777281271c" ]
[ "pandas/core/indexes/timedeltas.py" ]
[ "\"\"\" implement the TimedeltaIndex \"\"\"\n\nimport numpy as np\n\nfrom pandas._libs import NaT, Timedelta, index as libindex\nfrom pandas.util._decorators import Appender\n\nfrom pandas.core.dtypes.common import (\n _TD_DTYPE,\n is_float,\n is_integer,\n is_scalar,\n is_timedelta64_dtype,\n is_...
[ [ "pandas.tseries.frequencies.to_offset", "numpy.asarray", "pandas.core.indexes.datetimelike.DatetimeIndexOpsMixin.astype", "pandas.core.indexes.base.Index", "pandas.core.arrays.timedeltas.TimedeltaArray._simple_new", "pandas.core.dtypes.common.is_timedelta64_ns_dtype", "pandas.core.inde...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jackalhan/trax
[ "bbabf6cc8a0682218927080bce33a4f90591aa0b" ]
[ "trax/rl/envs/async_trajectory_collector.py" ]
[ "# coding=utf-8\n# Copyright 2020 The Trax 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 app...
[ [ "tensorflow.enable_eager_execution" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.13", "1.7", "1.10", "1.12" ] } ]
djones1040/PyPhot
[ "9b0d2c71b28f83abb73d021693f2c75309c9d710" ]
[ "PythonPhot/iterstat.py" ]
[ "#!/usr/bin/env python\n# D. Jones - 2/13/14\n\nimport numpy as np\n\ndef iterstat(d,startMedian=False,sigmaclip=3.0,\n iter=6):\n \"\"\"Get the sigma-clipped mean of \n a distribution, d.\n\n Usage: mean,stdev = iterstat.iterstat\n\n Input:\n d: the data\n Optional Inpu...
[ [ "numpy.sum", "numpy.median", "numpy.mean", "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
CoraJung/end-to-end-spoken-language-understanding
[ "d1b15dad1a8f01336bcb0adcbf95d8c6ea279d09" ]
[ "training_finetune.py" ]
[ "import numpy as np\nimport torch\nfrom tqdm import tqdm # for displaying progress bar\nimport os\nfrom data import SLUDataset, ASRDataset\nfrom models import PretrainedModel, Model\nimport pandas as pd\n\nclass Trainer:\n\tdef __init__(self, model, config, lr):\n\t\tself.model = model\n\t\tself.config = config\n\t...
[ [ "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": [] } ]
nataliyah123/addons
[ "13e40e613df3ead8f190258b273aeccaff05dedc" ]
[ "tensorflow_addons/optimizers/tests/discriminative_layer_training_test.py" ]
[ "# Copyright 2020 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.keras.models.load_model", "tensorflow.keras.optimizers.deserialize", "tensorflow.keras.Input", "tensorflow.keras.layers.Dense", "numpy.ones", "tensorflow.keras.optimizers.Adam", "tensorflow.keras.backend.clear_session", "numpy.testing.assert_raises", "tensorflow.ker...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "2.7", "2.6", "2.4", "2.3", "2.5", "2.2" ] } ]
lilleswing/deepchem
[ "355954b37d333fc3e2c3b3e28d103297eb642769" ]
[ "deepchem/feat/complex_featurizers/splif_fingerprints.py" ]
[ "\"\"\"\nSPLIF Fingerprints for molecular complexes.\n\"\"\"\nimport logging\nimport itertools\nimport numpy as np\nfrom deepchem.utils.hash_utils import hash_ecfp_pair\nfrom deepchem.utils.rdkit_utils import load_complex\nfrom deepchem.utils.rdkit_utils import compute_all_ecfp\nfrom deepchem.utils.rdkit_utils impo...
[ [ "numpy.concatenate", "numpy.nonzero" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
NUDTUGVexplorer/acados
[ "430fdb19896368ef48e76cda954d1d698ac57c7b" ]
[ "examples/acados_python/getting_started/ocp/example_gnsf_ocp.py" ]
[ "#\n# Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren,\n# Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor,\n# Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan,\n# Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Diehl\n#\n# This file is pa...
[ [ "numpy.diag", "numpy.eye", "numpy.ndarray", "numpy.array", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
haesleinhuepf/napari-tabu
[ "710b99dfbc5490b70c56651e646f43b26e6e2e11" ]
[ "napari_tabu/_tests/test_dock_widget.py" ]
[ "import numpy as np\n\nimport napari_tabu\nimport pytest\n\n\ndef test_something_with_viewer(make_napari_viewer):\n\n viewer = make_napari_viewer()\n num_dw = len(viewer.window._dock_widgets)\n from napari_tabu._dock_widget import SendBackWidget\n\n viewer.window.add_dock_widget(\n SendBackWidget...
[ [ "numpy.random.random" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mrterry/scipy
[ "f47d2f16e6debbb7753e9ee0fa0ff78d4b4a0c2b", "112d9a25fe3b898eff862e4d4596409372a9b237" ]
[ "scipy/sparse/construct.py", "scipy/linalg/tests/test_blas.py" ]
[ "\"\"\"Functions to construct sparse matrices\n\"\"\"\n\n__docformat__ = \"restructuredtext en\"\n\n__all__ = [ 'spdiags', 'eye', 'identity', 'kron', 'kronsum',\n 'hstack', 'vstack', 'bmat', 'rand']\n\n\nfrom warnings import warn\n\nimport numpy as np\n\nfrom sputils import upcast\n\nfrom csr import csr_...
[ [ "numpy.rank", "numpy.asarray", "numpy.arange", "numpy.cumsum", "numpy.ones", "numpy.random.rand", "numpy.iinfo", "numpy.floor", "numpy.zeros", "numpy.sum", "numpy.empty" ], [ "numpy.testing.assert_equal", "scipy.linalg.get_blas_funcs", "numpy.testing.run...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "0.14", "0.15", "0.12", "0.10" ], "tensorflow": [] } ]
aforren1/moderngl
[ "32fe79927e02b0fa893b3603d677bdae39771e14" ]
[ "tests/test_context.py" ]
[ "from unittest import TestCase\nimport moderngl\nimport numpy\nimport platform\n\n\nclass ContextTests(TestCase):\n\n def test_create_destroy(self):\n \"\"\"Create and destroy a context\"\"\"\n for _ in range(25):\n ctx = moderngl.create_context(standalone=True)\n ctx.release(...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Pistachio504/openpilot
[ "2bb5df8ff722918ccc6361a8f588f8447a9cce36" ]
[ "tools/sim/bridge.py" ]
[ "#!/usr/bin/env python3\nimport argparse\nimport math\nimport os\nimport signal\nimport threading\nimport time\nfrom multiprocessing import Process, Queue\nfrom typing import Any\n\nimport carla # pylint: disable=import-error\nimport numpy as np\nimport pyopencl as cl\nimport pyopencl.array as cl_array\n\nimport c...
[ [ "numpy.reshape", "numpy.int32", "numpy.dtype", "numpy.clip" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Linxxx/text-classification-cnn-rnn
[ "2e5d50dd44488068716066b97f5795f85b02e204" ]
[ "run_cnn.py" ]
[ "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import print_function\n\nimport os\nimport sys\nimport time\nfrom datetime import timedelta\n\nimport numpy as np\nimport tensorflow as tf\nfrom sklearn import metrics\n\nfrom cnn_model import TCNNConfig, TextCNN\nfrom data.cnews_loader import read_voca...
[ [ "tensorflow.summary.FileWriter", "sklearn.metrics.confusion_matrix", "sklearn.metrics.classification_report", "tensorflow.global_variables_initializer", "numpy.argmax", "tensorflow.summary.merge_all", "tensorflow.Session", "tensorflow.train.Saver", "tensorflow.summary.scalar" ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
mohyunho/ENAS_CWRU
[ "1bf3bd76a5d80eea39305ce67f8f8ac85eb85a26" ]
[ "fd_network.py" ]
[ "import time\nimport json\nimport logging as log\nimport sys\n\nimport os\nimport math\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nimport random\nimport importlib\nfrom scipy.stats import randint, expon, uniform\n\nimport sklearn as sk\nfrom sklearn import svm\n...
[ [ "tensorflow.keras.models.load_model", "tensorflow.keras.callbacks.ModelCheckpoint", "numpy.random.seed", "tensorflow.keras.layers.Dense", "tensorflow.keras.optimizers.RMSprop", "tensorflow.keras.callbacks.LearningRateScheduler", "sklearn.metrics.accuracy_score", "pandas.DataFrame",...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "2.7", "2.2", "2.3", "2.4", "2.5", "2.6" ] } ]
dhaw92/playground
[ "07c8f52eace37f13b6e411cb2301e6de5a5ba47b" ]
[ "pommerman/forward_model.py" ]
[ "from collections import defaultdict\n\nimport numpy as np\n\nfrom . import constants\nfrom . import characters\nfrom . import utility\n\n\nclass ForwardModel(object):\n \"\"\"Class for helping with the [forward] modeling of the game state.\"\"\"\n\n def run(self, num_times, board, agents, bombs, items, flame...
[ [ "numpy.array", "numpy.zeros_like", "numpy.where", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
thanh125643/LitterMask
[ "2545173bc5b046331a38da513780292a09f6a566" ]
[ "module/mask.py" ]
[ "import os\n\n# os.environ[\"CUDA_DEVICE_ORDER\"] = \"PCI_BUS_ID\"\n# os.environ[\"CUDA_VISIBLE_DEVICES\"] = \"-1\"\nimport time\nimport numpy as np\nimport json\nimport csv\nimport random\nimport colorsys\nfrom imgaug import augmenters as iaa\nfrom tqdm import tqdm\n\nfrom module.detector.dataset import Taco\nfrom...
[ [ "numpy.reshape", "numpy.asfortranarray", "numpy.array", "numpy.divide" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
autolordz/docx-content-modify
[ "88efb96e450b835f00ca8ac78dcc266cd5eec0fc" ]
[ "dcm_df_transform.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Sep 11 17:26:56 2019\n\n@author: autol\n\"\"\"\nimport re\nimport pandas as pd\n#%%\nimport dcm_util as ut\nfrom dcm_globalvar import *\nlocals().update(var.to_dict()) # 设置读取的全局变量\n\n#%%\n\ndef df_transform_stream(df):\n\n df_x=pd.DataFrame();\n\n df = ut.title...
[ [ "pandas.concat", "pandas.merge", "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": [] } ]
JM-IP/HNC
[ "d3a2e77d1e922d2c712dd0ae82cebc0dea525f6a" ]
[ "HNC_github/model/mobilenetv2.py" ]
[ "'''MobileNetV2 in PyTorch.\n\nSee the paper \"Inverted Residuals and Linear Bottlenecks:\nMobile Networks for Classification, Detection and Segmentation\" for more details.\n'''\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom model import common\nfrom IPython import embed\n# from torchv...
[ [ "torch.nn.Sequential", "torch.nn.Dropout", "torch.nn.ReLU6", "torch.randn", "torch.nn.Conv2d", "torch.nn.BatchNorm2d" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
borellim/aiida_core
[ "934b4ccdc73a993f2a6656caf516500470e3da08" ]
[ "aiida/orm/nodes/data/array/trajectory.py" ]
[ "# -*- coding: utf-8 -*-\n###########################################################################\n# Copyright (c), The AiiDA team. All rights reserved. #\n# This file is part of the AiiDA code. #\n# ...
[ [ "numpy.array", "numpy.matrix", "numpy.dot", "numpy.linspace", "numpy.arange", "matplotlib.pyplot.xlim", "numpy.argmax", "numpy.argmin", "matplotlib.gridspec.GridSpec", "scipy.stats.gaussian_kde", "matplotlib.pyplot.xticks", "matplotlib.pyplot.show", "numpy.zeros...
[ { "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"...
clovaai/embedding-expansion
[ "1aa68cbf4ca8f020084ea9784300093d5c381878" ]
[ "runner/evaluator.py" ]
[ "'''\nCopyright (c) 2020-present NAVER Corp.\nMIT license\n'''\n# encoding: utf-8\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nfrom tqdm import tqdm\n\nimport mxnet as mx\nimport numpy as np\n\n\nclass Eva...
[ [ "numpy.asarray", "numpy.concatenate", "numpy.max", "numpy.fill_diagonal", "numpy.argpartition", "numpy.argsort", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
brunodferrari/bdp
[ "d320add1e451c85b6777ae34901bbd6fd3797114" ]
[ "dbdp_instances/GraficosTG/GeraModelos_lastCopia.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Aug 7 13:38:07 2021\n\n@author: bferrari\n\"\"\"\n\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom sklearn.svm import SVC\nfrom itertools import combinations\n\nfrom xgboost import XGBClassifier\nfrom sklearn.pipeline import Pipeline\...
[ [ "pandas.concat", "pandas.read_excel", "sklearn.model_selection.cross_val_score", "sklearn.model_selection.GridSearchCV", "sklearn.model_selection.cross_val_predict", "sklearn.ensemble.RandomForestClassifier", "sklearn.model_selection.train_test_split", "sklearn.neighbors.KNeighbors...
[ { "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": [] } ]
loveher147/zvt
[ "e16d8e20daa5d0c069294f063d8f5a021bb8e8bf" ]
[ "zvt/recorders/em/em_stock_actor_summary_recorder.py" ]
[ "# -*- coding: utf-8 -*-\nfrom typing import List\n\nimport pandas as pd\n\nfrom zvt.api.utils import to_report_period_type, value_to_pct\nfrom zvt.contract import ActorType\nfrom zvt.contract.api import df_to_db\nfrom zvt.contract.recorder import TimestampsDataRecorder\nfrom zvt.domain import Stock\nfrom zvt.domai...
[ [ "pandas.DataFrame.from_records" ] ]
[ { "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": [] } ]
arturohernandez10/pose-interpreter-networks
[ "b8cfa19bed62bdd9179f8c4a01675cd6644e8f99" ]
[ "segmentation/utils.py" ]
[ "import matplotlib.pyplot as plt\nimport numpy as np\nfrom matplotlib import colors\n\n\ndef accuracy(output, target):\n _, pred = output.max(1)\n pred = pred.view(-1)\n target = target.view(-1)\n correct = pred.eq(target)\n score = correct.float().sum(0).mul(100.0 / correct.size(0))\n return scor...
[ [ "numpy.diag", "matplotlib.pyplot.subplots", "matplotlib.colors.ListedColormap", "matplotlib.pyplot.close", "matplotlib.pyplot.subplots_adjust" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
HaoZeke/aiida-core
[ "84c2098318bf234641219e55795726f99dc25a16", "84c2098318bf234641219e55795726f99dc25a16" ]
[ "tests/tools/importexport/test_complex.py", "aiida/orm/nodes/data/array/bands.py" ]
[ "# -*- coding: utf-8 -*-\n###########################################################################\n# Copyright (c), The AiiDA team. All rights reserved. #\n# This file is part of the AiiDA code. #\n# ...
[ [ "numpy.random.random", "numpy.random.randint" ], [ "numpy.linalg.norm", "numpy.sort", "numpy.concatenate", "numpy.transpose", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
continual-ml/forgetful-networks
[ "8a3c9afdd489137cc11bd68c46d243ec52ec1670" ]
[ "utils.py" ]
[ "import numpy as np\nimport torch\nfrom matplotlib.patches import Ellipse\nimport matplotlib.transforms as transforms\nimport matplotlib.pyplot as plt\n\n\ndef entropy(x: torch.Tensor) -> torch.Tensor:\n x = x / x.sum(dim=1, keepdim=True)\n return -(x.clamp(min=0.001).log()*x).sum(dim=1)\n\n\ndef prediction_p...
[ [ "matplotlib.pyplot.legend", "matplotlib.patches.Ellipse", "numpy.sqrt", "matplotlib.pyplot.title", "matplotlib.transforms.Affine2D", "numpy.cov", "numpy.mean", "matplotlib.pyplot.clf", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.yticks", "matplotlib.pyplot.hist" ] ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
vansin/table_detection
[ "4e3626b47bb4ce8d50a89a410f82b7c4e3c5f658" ]
[ "tools/visualization/vis_iou_f1.py" ]
[ "import json\nimport os\n\nimport matplotlib.pyplot as plt\nimport mmcv\nimport pandas as pd\nimport seaborn as sns\nimport time\nimport numpy as np\n\ntmp_pkl_name = '/home/tml/Nutstore Files/ubuntu/paper/data/csv/tmp.pkl'\n\nprefix = '/home/tml/Nutstore Files/ubuntu/paper/data/iou'\n\n\nif __name__ == '__main__':...
[ [ "numpy.isnan", "numpy.array", "numpy.argmax", "pandas.DataFrame.from_dict" ] ]
[ { "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": [] } ]
CHUSRadOncPhys/FluoMV
[ "6fc226ee0ca1427495f0ab483c63a2ca5195954e" ]
[ "ServiceApplication_SourceFiles/Mod_FlexmapImage.py" ]
[ "# -*- coding: utf-8 -*-\nimport numpy as np\nimport sys\nimport os\n#===============================================================================================================\nclass FlexmapImage:\n\t\n\tdef __init__(self, thisSettingsObj):\n\t\t\n\t\tself.Status = True\n\t\tself.SettingsObj = thisSettingsObj...
[ [ "numpy.around", "numpy.median", "numpy.histogram", "numpy.mean" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
RealPolitiX/animo
[ "cb9e3af5ae11e2c316a665004f715a5c0ef756fb" ]
[ "animo/animo.py" ]
[ "#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\n@author: R. Patrick Xian\n\"\"\"\n\nfrom __future__ import print_function, division\nfrom abc import ABCMeta, abstractmethod\nfrom JSAnimation.IPython_display import display_animation\nfrom matplotlib import animation\nimport numpy as np\nimport matplotlib.p...
[ [ "numpy.rollaxis", "matplotlib.colors.LogNorm", "matplotlib.colors.Normalize.__init__", "numpy.min", "matplotlib.pyplot.subplots", "matplotlib.colors.Normalize", "numpy.ndim", "numpy.max", "numpy.interp", "matplotlib.animation.FuncAnimation", "numpy.meshgrid" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jingxiufenghua/rec-model
[ "cfc7b3fbd4ba2d9157a78938e6bdaeba7df82822" ]
[ "xDeepFM/train.py" ]
[ "\"\"\"\nCreated on August 21, 2020\nUpdated on May 19, 2021\n\ntrain xDeepFM model\n\n@author: Ziyao Geng(zggzy1996@163.com)\n\"\"\"\n\nimport tensorflow as tf\nfrom tensorflow.keras.losses import binary_crossentropy\nfrom tensorflow.keras.callbacks import EarlyStopping\nfrom tensorflow.keras.optimizers import Ada...
[ [ "tensorflow.keras.metrics.AUC", "tensorflow.keras.optimizers.Adam", "tensorflow.keras.callbacks.EarlyStopping", "tensorflow.distribute.MirroredStrategy" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]