repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
tkrons/SPFlow_topdownrules | [
"32233bf29d107c62f0f727b0e64aaa74b37cfe1e",
"32233bf29d107c62f0f727b0e64aaa74b37cfe1e"
] | [
"src/spn/experiments/AQP/leaves/static/InferenceRange.py",
"src/spn/experiments/AQP/tests/test_static_numeric.py"
] | [
"\"\"\"\nCreated on June 21, 2018\n\n@author: Moritz\n\"\"\"\n\nimport numpy as np\n\nfrom spn.algorithms.Inference import add_node_likelihood\nfrom spn.experiments.AQP.leaves.static.StaticNumeric import StaticNumeric\n\n\ndef static_likelihood_range(node, ranges, dtype=np.float64, **kwargs):\n assert len(node.s... | [
[
"numpy.ones"
],
[
"numpy.isnan",
"numpy.array",
"numpy.average"
]
] |
kk2487/3dresnet | [
"d7161a70ed6c2f8dcbe89f9b6bad2ef6cc5b5d94",
"d7161a70ed6c2f8dcbe89f9b6bad2ef6cc5b5d94",
"d7161a70ed6c2f8dcbe89f9b6bad2ef6cc5b5d94"
] | [
"models/resnet_lgdv2.py",
"apex/contrib/sparsity/asp.py",
"models/resnet_2p1d.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\nimport math\nfrom functools import partial\nimport numpy as np\n\n__all__ = [\n 'ResNet', 'resnet10', 'resnet18', 'resnet34', 'resnet50', 'resnet101',\n 'resnet152', 'resnet200'\n]\n\ndef look_bottlenec... | [
[
"torch.nn.AvgPool3d",
"torch.nn.Sequential",
"torch.nn.init.kaiming_normal",
"torch.nn.Sigmoid",
"torch.nn.AdaptiveAvgPool3d",
"torch.nn.MaxPool3d",
"torch.nn.Conv3d",
"torch.nn.Linear",
"numpy.shape",
"torch.nn.LeakyReLU",
"torch.nn.BatchNorm3d"
],
[
"torch.zer... |
yarikoptic/statsmodels | [
"844381797a475a01c05a4e162592a5a6e3a48032",
"844381797a475a01c05a4e162592a5a6e3a48032",
"844381797a475a01c05a4e162592a5a6e3a48032",
"f990cb1a1ef0c9883c9394444e6f9d027efabec6"
] | [
"statsmodels/tsa/tests/results/arima111nc_css_results.py",
"statsmodels/tsa/vector_ar/tests/results/results_var.py",
"statsmodels/stats/libqsturng/qsturng_.py",
"statsmodels/emplike/tests/test_origin.py"
] | [
"import numpy as np\n\nllf = np.array([-242.89663276735])\n\nnobs = np.array([ 202])\n\nk = np.array([ 3])\n\nk_exog = np.array([ 1])\n\nsigma = np.array([ .8053519404535])\n\nchi2 = np.array([ 15723.381396967])\n\ndf_model = np.array([ 2])\n\nk_ar = np.array([... | [
[
"numpy.array"
],
[
"numpy.asarray",
"numpy.hstack"
],
[
"numpy.vectorize",
"scipy.optimize.fminbound",
"numpy.isinf"
],
[
"numpy.testing.assert_almost_equal"
]
] |
LingxiaoShawn/pytorch_geometric | [
"50b7bfc4a59b5b6f7ec547ff862985f3b2e22798",
"50b7bfc4a59b5b6f7ec547ff862985f3b2e22798",
"50b7bfc4a59b5b6f7ec547ff862985f3b2e22798",
"50b7bfc4a59b5b6f7ec547ff862985f3b2e22798",
"50b7bfc4a59b5b6f7ec547ff862985f3b2e22798",
"50b7bfc4a59b5b6f7ec547ff862985f3b2e22798"
] | [
"test/nn/conv/test_film_conv.py",
"torch_geometric/transforms/remove_isolated_nodes.py",
"test/utils/test_subgraph.py",
"test/data/test_hetero_data.py",
"test/nn/conv/test_hgt_conv.py",
"test/nn/conv/test_edge_conv.py"
] | [
"import torch\nfrom torch_sparse import SparseTensor\n\nfrom torch_geometric.nn import FiLMConv\n\n\ndef test_film_conv():\n x1 = torch.randn(4, 4)\n x2 = torch.randn(2, 16)\n edge_index = torch.tensor([[0, 1, 1, 2, 2, 3], [0, 0, 1, 0, 1, 1]])\n edge_type = torch.tensor([0, 1, 1, 0, 0, 1])\n row, col... | [
[
"torch.randn",
"torch.tensor"
],
[
"torch.is_tensor"
],
[
"torch.Tensor",
"torch.tensor"
],
[
"torch.stack",
"torch.randn",
"torch.allclose",
"torch.randint"
],
[
"torch.stack",
"torch.randn",
"torch.allclose",
"torch.randint"
],
[
"torch... |
LucilleN/MH-Stigma-in-Masked-LMs | [
"9e30817cb32358a8e6004faf7ef88ad69d6148f6"
] | [
"main/pronouns.py"
] | [
"# Comparing He vs She\nfrom transformers import pipeline\nimport pandas as pd\nfrom utils import diagnoses, get_target_probability, get_top_k, print_stats, plot_male_and_female\nimport matplotlib.pylab as plt\nimport seaborn as sns\nimport argparse\n\ntemplates = [\n \"<mask> has [diagnosis]\",\n \"<mask> is... | [
[
"pandas.concat",
"pandas.DataFrame",
"matplotlib.pylab.title",
"matplotlib.pylab.xticks",
"matplotlib.pylab.savefig"
]
] |
cww97/visual-language-grasping | [
"f96404c9997ef55ede07293ce319ca19a39ae5ec"
] | [
"envs/simulation/robot.py"
] | [
"import os\nimport time\n\nimport numpy as np\nimport yaml\n\nimport utils\nfrom . import vrep\nfrom ..robot import Robot as BaseRobot\nfrom ..robot import Reward\nfrom ..data import Data as TextData\nimport random\nfrom bisect import bisect_right\nimport cv2\nimport os\n\n\nclass SimRobot(BaseRobot):\n\tdef __init... | [
[
"numpy.dot",
"numpy.random.choice",
"numpy.asarray",
"numpy.fliplr",
"numpy.eye",
"numpy.power",
"numpy.arange",
"numpy.tile",
"numpy.linalg.norm",
"numpy.random.random_sample",
"numpy.cos",
"numpy.sin",
"numpy.deg2rad",
"numpy.argmax",
"numpy.argmin",
... |
wesh92/nwnodetool | [
"1c79418d9ad0f1f22dfbc6aab390ca9603fb1596"
] | [
"nwnodedetector/nwocrsounds.py"
] | [
"\"\"\"\nNew World OCR Node Detector\nCreated: 2021-10-07\nDev: Wes H.\n\nUses OCR to get coordinates from top right of the NW game window\nand imposes that against a list of possible nodes.\nWhen you're close to one it will play a bell noise!\n\"\"\"\nimport winsound\nfrom PIL import ImageGrab, ImageOps, Image\nim... | [
[
"numpy.array"
]
] |
ljocha/DeepEI | [
"96aee49192ac805dda7971041c01e16c62cd3cbc"
] | [
"Scripts/read_msp.py"
] | [
"from DeepEI.utils import ms2vec, get_cdk_fingerprints, get_cdk_descriptors\nfrom matchms.importing import load_from_msp\nimport json\nimport numpy as np\nfrom scipy.sparse import csr_matrix, save_npz\nfrom rdkit import Chem\nfrom rdkit.Chem import AllChem\nfrom rdkit.Chem.rdMolDescriptors import CalcExactMolWt\n\n... | [
[
"scipy.sparse.csr_matrix",
"scipy.sparse.save_npz",
"numpy.save"
]
] |
wikimedia/research-reader-survey-analysis | [
"fbf4d71eebaf5ac5205713b0271f4ea51ab388f8",
"fbf4d71eebaf5ac5205713b0271f4ea51ab388f8"
] | [
"src/preprocessing/02_extractlogtraces/03_join_responses_with_ip.py",
"src/preprocessing/02_extractlogtraces/08_join_responses_with_requests.py"
] | [
"\"\"\"\nThis script joins:\n * the EventLogging (EL) data based on webrequest beacons (in my experience, most complete / simplest)\n * Google Forms survey responses\n * EditAttemptStep data based on hive tables\n\nThere are two outputs for each language:\n * CSV w/ survey responses + EL details (e.g., datetime, pa... | [
[
"pandas.merge",
"pandas.read_csv",
"pandas.Series"
],
[
"pandas.isnull",
"pandas.merge",
"pandas.DataFrame"
]
] |
gcba/IATos | [
"d42cffea313170bb249edcadb0776f7a6d368654"
] | [
"algos/prediction/transformers.py"
] | [
"import librosa\nimport numpy as np\n\nfrom PIL import Image\nfrom typing import Optional\nfrom sklearn.base import BaseEstimator, TransformerMixin\nfrom matplotlib.cm import ScalarMappable\n\n__all__ = [\n \"Denoising\",\n \"MelSpectogram\",\n \"ColoredSpectogram\",\n]\n\n\nclass BaseTransformer(BaseEstim... | [
[
"matplotlib.cm.ScalarMappable"
]
] |
jacopok/notes | [
"805ebe1be49bbd14c6b46b24055f9fc7d1cd2586",
"805ebe1be49bbd14c6b46b24055f9fc7d1cd2586",
"805ebe1be49bbd14c6b46b24055f9fc7d1cd2586"
] | [
"ap_third_semester/compact_objects/figures/roche-lobe-radius.py",
"phd_courses/theoretical_low_energy_astroparticle/figures/make_all_figures.py",
"ap_second_semester/gravitational_physics/figures/binary_angular_GW_spectrum.py"
] | [
"#%%\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom astropy.visualization import astropy_mpl_style\nplt.style.use(astropy_mpl_style)\nfrom matplotlib import rc\nrc('font',**{'family':'serif','serif':['Palatino']})\nrc('text', usetex=True)\nrc('text.latex', preamble=r'''\\usepackage{amsmath}\n ... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.axvline",
"numpy.linspace",
"numpy.gradient",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.yscale",
"matplotlib.pyplot.savefig",
"numpy.vectorize",
"numpy.log10",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"m... |
deepbluesea/transformers | [
"11a2317986aad6e9a72f542e31344cfb7c94cbab",
"11a2317986aad6e9a72f542e31344cfb7c94cbab"
] | [
"examples/distillation/distiller.py",
"transformers/tests/modeling_transfo_xl_test.py"
] | [
"# coding=utf-8\n# Copyright 2019-present, the HuggingFace Inc. team and 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/LICE... | [
[
"torch.nn.functional.softmax",
"torch.zeros",
"torch.cat",
"torch.randperm",
"torch.utils.data.DataLoader",
"torch.FloatTensor",
"torch.no_grad",
"torch.nn.CrossEntropyLoss",
"torch.utils.data.distributed.DistributedSampler",
"torch.distributed.barrier",
"torch.nonzero"... |
uibcdf/openpharmacophore | [
"4f563fa206f6e7c081502acab97bb795d27bdeb9"
] | [
"openpharmacophore/pharmacophore/dynophore.py"
] | [
"# OpenPharmacophore\nfrom openpharmacophore._private_tools.exceptions import InvalidFileFormat, NoLigandsError, OpenPharmacophoreTypeError\nfrom openpharmacophore.pharmacophore.pharmacophoric_point import UniquePharmacophoricPoint\nfrom openpharmacophore import StructuredBasedPharmacophore\nfrom openpharmacophore ... | [
[
"numpy.arange",
"matplotlib.pyplot.subplots",
"pandas.DataFrame",
"numpy.all",
"numpy.zeros_like",
"numpy.count_nonzero",
"numpy.digitize",
"numpy.array",
"numpy.zeros",
"matplotlib.pyplot.show"
]
] |
scott-mao/EOD | [
"f10e64de86c0f356ebf5c7e923f4042eec4207b1",
"f10e64de86c0f356ebf5c7e923f4042eec4207b1",
"f10e64de86c0f356ebf5c7e923f4042eec4207b1"
] | [
"eod/utils/general/saver_helper.py",
"eod/data/samplers/sampler.py",
"eod/tasks/det/data/datasets/coco_dataset.py"
] | [
"# Standard Library\nimport json\nimport os\nimport shutil\n\n# Import from third library\nimport torch\n\n# Import from local\nfrom .log_helper import default_logger as logger\nfrom .registry_factory import SAVER_REGISTRY\n\n\n__all__ = ['Saver']\n\n\n@SAVER_REGISTRY.register('base')\nclass Saver(object):\n def... | [
[
"torch.save",
"torch.cuda.current_device"
],
[
"torch.Generator",
"torch.randperm",
"numpy.argmax",
"numpy.random.rand",
"numpy.array",
"numpy.random.RandomState"
],
[
"torch.zeros",
"numpy.clip",
"numpy.asfortranarray",
"numpy.concatenate",
"torch.nn.mo... |
dynamicguy/imgaug | [
"f58c06323eb04416c76de1f18952ca5875caf883"
] | [
"imgaug/augmenters/weather.py"
] | [
"\"\"\"\nAugmenters that create wheather effects.\n\nDo not import directly from this file, as the categorization is not final.\nUse instead::\n\n from imgaug import augmenters as iaa\n\nand then e.g.::\n\n seq = iaa.Sequential([iaa.Snowflakes()])\n\nList of augmenters:\n\n * FastSnowyLandscape\n * Clou... | [
[
"numpy.maximum",
"numpy.tile",
"numpy.zeros",
"numpy.clip"
]
] |
computational-imaging/DeepOpticsHDR | [
"1180749b028dd21f6b7140c0538fe332bd29bb46"
] | [
"src/optics_numpy.py"
] | [
"#Julie Chang and Chris Metzler 2020\nimport abc\n\n# import tensorflow as tf\nimport numpy as np\n# import matplotlib as mpl\n# mpl.use('TKAgg')\nimport matplotlib.pyplot as plt\nfrom PIL import Image\n\nfrom numpy.fft import ifftshift\nimport fractions\n# import layers.optics_no_transpose as optics\n#import optic... | [
[
"numpy.amax",
"numpy.expand_dims",
"numpy.sqrt",
"numpy.squeeze",
"numpy.concatenate",
"numpy.exp",
"numpy.pad",
"numpy.reshape",
"numpy.arange",
"scipy.interpolate.RegularGridInterpolator",
"numpy.ceil",
"numpy.fft.ifftshift",
"numpy.fft.fft2",
"scipy.inter... |
qrsforever/workspace | [
"53c7ce7ca7da62c9fbb3d991ae9e4e34d07ece5f",
"53c7ce7ca7da62c9fbb3d991ae9e4e34d07ece5f",
"53c7ce7ca7da62c9fbb3d991ae9e4e34d07ece5f",
"53c7ce7ca7da62c9fbb3d991ae9e4e34d07ece5f",
"53c7ce7ca7da62c9fbb3d991ae9e4e34d07ece5f"
] | [
"ML/learn/intro_convolution.py",
"ML/learn/tensorflow/tf_print.py",
"python/learn/numpy/cut.py",
"python/learn/matplot/base.py",
"python/learn/thinkbayes/thinkplot.py"
] | [
"#!/usr/bin/python3\n# -*- coding: utf-8 -*-\n\n# @file intro_convolution.py\n# @brief\n# @author QRS\n# @blog qrsforever.github.io\n# @version 1.0\n# @date 2019-06-03 20:52:26\n\n################################ jupyter-vim #######################################\n# https://github.com/qrsforever/vim/blob/master/b... | [
[
"numpy.array",
"numpy.multiply"
],
[
"tensorflow.print",
"tensorflow.range",
"tensorflow.Session",
"tensorflow.control_dependencies"
],
[
"numpy.shape",
"numpy.array",
"numpy.random.randn",
"numpy.random.shuffle"
],
[
"matplotlib.matplotlib_fname",
"matp... |
wmkai/quantization | [
"351d184527e9867e0394878cf91b64ffd5c6b109"
] | [
"micronet/compression/quantization/wbwtab/bn_fuse/bn_fuse.py"
] | [
"import copy\nimport sys\nsys.path.append(\"..\")\nsys.path.append(\"../../../..\")\nimport os\nimport argparse\nimport numpy as np\nimport torch\nimport torch.nn as nn\nfrom models import nin_gc, nin\n\nimport quantize\n\n\n# ******************** 是否保存模型完整参数 ********************\n#torch.set_printoptions(precision=8... | [
[
"torch.load",
"torch.sqrt",
"torch.nn.Conv2d",
"torch.nn.Identity",
"numpy.savetxt",
"numpy.array",
"torch.save"
]
] |
havi121/poliastro-AU | [
"98889b36892622b43cb284f64e6ecf72e3f01c6f"
] | [
"src/poliastro/plotting/tisserand.py"
] | [
"\"\"\" Generates Tisserand plots \"\"\"\nfrom enum import Enum\n\nimport numpy as np\nfrom astropy import units as u\nfrom matplotlib import pyplot as plt\n\nfrom poliastro.plotting._base import BODY_COLORS\nfrom poliastro.twobody.mean_elements import get_mean_elements\nfrom poliastro.util import norm\n\n\nclass T... | [
[
"numpy.sqrt",
"numpy.linspace",
"matplotlib.pyplot.subplots",
"numpy.cos",
"numpy.meshgrid"
]
] |
romanstrazanec/ChaosEquations | [
"cff505832b3ef8db2e3dc05e299a30f52b8e6473"
] | [
"python/readme_prog_change_sub.py"
] | [
"import matplotlib.pyplot as plt\n\nn = 5\nT = [-1, -.5, 0., .5, 1]\nx = [1] * len(T)\ny = [1] * len(T)\n\nplt.subplot(122)\nfor i in range(1, n+1):\n for j in range(len(T)):\n x[j], y[j] = (x[j] + y[j]*T[j], x[j] - y[j]*T[j])\n for j in range(len(T)-1):\n plt.arrow(x[j], y[j], x[j+1]-x[j], y[j+... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.show",
"matplotlib.pyplot.arrow"
]
] |
amorehead/Equivariant-GNNs | [
"4e81136242a4c8905b0e5fc39be5f704a42cc5e1"
] | [
"project/utils/modules.py"
] | [
"from typing import Dict\n\nimport dgl\nimport dgl.function as fn # for graphs\nimport numpy as np\nimport torch\nimport torch.nn as nn\nfrom dgl.nn.pytorch.glob import AvgPooling, MaxPooling\nfrom dgl.nn.pytorch.softmax import edge_softmax\nfrom einops import rearrange\nfrom packaging import version\nfrom torch i... | [
[
"numpy.sqrt",
"torch.cat",
"torch.zeros",
"torch.nn.ParameterDict",
"torch.sum",
"torch.no_grad",
"torch.FloatTensor",
"torch.pow",
"torch.nn.init.calculate_gain",
"torch.nn.Dropout",
"torch.ones",
"torch.einsum",
"torch.nn.ModuleDict",
"torch.randn",
"t... |
SauravMaheshkar/rtdl | [
"c3f8051210d1cd7fdffc5a63221e3c4e84415ed8"
] | [
"bin/node.py"
] | [
"# %%\nimport gc\nimport itertools\nimport math\nimport typing as ty\nfrom copy import deepcopy\nfrom pathlib import Path\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim.swa_utils as swa_utils\nimport zero\nfrom torch import Tensor\nimport wandb\n\nimp... | [
[
"torch.cat",
"torch.randperm",
"torch.cuda.device_count",
"numpy.save",
"torch.tensor",
"torch.nn.DataParallel",
"torch.no_grad",
"torch.stack",
"torch.optim.swa_utils.AveragedModel"
]
] |
ColdFrenzy/Adaptive_Learning | [
"02cdd519a7e224fe5f2a49b0c21baa3dac5ce0e1"
] | [
"models/custom_models.py"
] | [
"import tensorflow as tf\n\n\ndef dense_model(in_shape, hidden_layer_shapes, num_outputs, name):\n x = None\n inputs = tf.keras.layers.Input(shape=(in_shape,), name=\"observations\")\n for i,layer_shape in enumerate(hidden_layer_shapes):\n x = tf.keras.layers.Dense(\n layer_shape, name=\"... | [
[
"tensorflow.keras.layers.ReLU",
"tensorflow.keras.Input",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.utils.plot_model",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.Model",
"tensorflow.keras.layers.BatchNormalization",
"tensorflow.keras.layers.Add",
"tensorflow.k... |
kcyu2014/nas-landmarkreg | [
"a00c3619bf4042e446e1919087f0b09fe9fa3a65",
"a00c3619bf4042e446e1919087f0b09fe9fa3a65",
"a00c3619bf4042e446e1919087f0b09fe9fa3a65"
] | [
"utils_nvidia.py",
"nasws/cnn/search_space/nasbench101/lib/cifar.py",
"nasws/cnn/search_space/monodepth/models/backbone/drn.py"
] | [
"import argparse\nimport os\nimport shutil\nimport time\nimport math\nimport logging\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.parallel\nimport torch.backends.cudnn as cudnn\nimport torch.distributed as dist\nimport torch.optim\nimport torch.utils.data\nimport torch.utils.data.distributed\nimport torc... | [
[
"torch.cuda.synchronize",
"numpy.expand_dims",
"torch.cuda.nvtx.range_pop",
"numpy.asarray",
"torch.cuda.current_stream",
"torch.from_numpy",
"torch.tensor",
"torch.no_grad",
"torch.cuda.nvtx.range_push",
"torch.cuda.stream",
"torch.distributed.all_reduce",
"torch.c... |
pygongnlp/gramcorrector | [
"1b5b7f46f7185675b46341e40b2a866fd6d1d7ad",
"1b5b7f46f7185675b46341e40b2a866fd6d1d7ad"
] | [
"sec/test.py",
"sged/train.py"
] | [
"import argparse\nimport torch\nimport os\n\nfrom transformers import AutoTokenizer, AutoModelForMaskedLM\nfrom utils import load_data, write_to_file\nfrom metric import compute_metrics\n\n\nif __name__ == \"__main__\":\n parser = argparse.ArgumentParser()\n parser.add_argument(\"--model_name_or_path\", defau... | [
[
"torch.cuda.is_available"
],
[
"torch.no_grad",
"torch.optim.AdamW",
"torch.utils.data.DataLoader",
"torch.cuda.is_available"
]
] |
NKPmedia/rising | [
"2a580e9c74c8fb690e27e8bacf09ab97184ab1ee",
"2a580e9c74c8fb690e27e8bacf09ab97184ab1ee",
"2a580e9c74c8fb690e27e8bacf09ab97184ab1ee"
] | [
"rising/transforms/spatial.py",
"tests/transforms/test_crop.py",
"tests/transforms/functional/test_intensity.py"
] | [
"# from __future__ import annotations\nimport torch\n\nfrom itertools import combinations\nfrom typing import Union, Sequence, Callable, Optional\nfrom torch.multiprocessing import Value\n\nfrom rising.random import AbstractParameter, DiscreteParameter\nfrom rising.transforms.abstract import AbstractTransform, Base... | [
[
"torch.multiprocessing.Value",
"torch.rand"
],
[
"torch.manual_seed",
"torch.zeros"
],
[
"torch.mul",
"torch.add",
"torch.rand",
"torch.zeros"
]
] |
sai6kiran/TwitterBotFarms | [
"cf6bfddda9fac1e27477186fd4f4b086ac711781"
] | [
"kCoreBots/CoreBotEN/MachineLearning/NaiveBayes/PythonScripts/NaiveBayesClassifier.py"
] | [
"from contractionsDict import contractionsDict\nimport pandas as pd\nimport time\nimport numpy as np\nimport re\nfrom pattern.en import pluralize, singularize\nimport sys\nimport csv\nfrom LemmitizationandStemConverter import ObtainStemAndLemmatizationWord\n\ndef priorProb(scv):\n\tpct = 0\t#positive count total\n\... | [
[
"numpy.exp",
"pandas.set_option",
"pandas.read_csv",
"pandas.DataFrame"
]
] |
JonathanLehner/cassini_2021_nature_discoverer | [
"41e1e7ec01400d16bd34baf0763adce0383f3841"
] | [
"sentinel2_processing/georasteR_converter.py"
] | [
"\"\"\"\nnow using\nhttps://towardsdatascience.com/reading-and-visualizing-geotiff-images-with-python-8dcca7a74510\nhttps://github.com/GeoUtils/georaster/blob/master/georaster/georaster.py\nhttps://rasterio.readthedocs.io/en/latest/topics/color.html\n\"\"\"\n\nimport os\nimport pprint as pp\nimport time\nfrom datet... | [
[
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.savefig"
]
] |
imcwx/models | [
"523ff5d0d50c3181329e62509270d4d778734000"
] | [
"research/object_detection/core/preprocessor.py"
] | [
"# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.convert_to_tensor",
"tensorflow.cond",
"tensorflow.is_nan",
"tensorflow.concat",
"tensorflow.image.random_contrast",
"tensorflow.stack",
"tensorflow.minimum",
"tensorflow.image.pad_to_bounding_box",
"numpy.random.random_sample",
"tensorflow.equal",
"tensorfl... |
metee1996/ds-example-project | [
"8d43b8786711a69779adb7fd6a830fe63fe30909"
] | [
"src/python/project/model.py"
] | [
"import numpy as np\n\ndef power(x):\n return np.power(x, 2)\n"
] | [
[
"numpy.power"
]
] |
ohtu-projekti-dataproblemsemulator/dataproblemsemulator | [
"b24eac686fae4147264c1ccc8169fd96b1875577"
] | [
"examples/run_time_series_prediction_example.py"
] | [
"# MIT License\n#\n# Copyright (c) 2019 Tuomas Halvari, Juha Harviainen, Juha Mylläri, Antti Röyskö, Juuso Silvennoinen\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without res... | [
[
"pandas.read_csv",
"numpy.random.seed",
"numpy.linspace",
"numpy.reshape",
"numpy.isnan",
"sklearn.metrics.mean_squared_error",
"tensorflow.ConfigProto",
"numpy.concatenate",
"tensorflow.set_random_seed",
"tensorflow.get_default_graph",
"matplotlib.pyplot.show",
"sk... |
DipeshAggarwal/wgan-gp-keras | [
"7a70192cdd26726ee981107299a7fa6e21cbe84b"
] | [
"train.py"
] | [
"from core.loss import d_wasserstein_loss\nfrom core.loss import g_wasserstein_loss\nfrom core.nn.conv.wgan import generator\nfrom core.nn.conv.wgan import critic\nfrom core.callbacks import GANMonitor\nfrom core.model import WGAN_GP\n\nimport tensorflow as tf\nimport numpy as np\nimport config\n\ntrain_images = tf... | [
[
"tensorflow.keras.utils.image_dataset_from_directory",
"tensorflow.keras.initializers.RandomNormal",
"tensorflow.keras.optimizers.Adam"
]
] |
dylanbuchi/MONAI | [
"1651f1b003b0ffae8b615d191952ad65ad091277",
"1651f1b003b0ffae8b615d191952ad65ad091277",
"1651f1b003b0ffae8b615d191952ad65ad091277",
"1651f1b003b0ffae8b615d191952ad65ad091277",
"1651f1b003b0ffae8b615d191952ad65ad091277",
"1651f1b003b0ffae8b615d191952ad65ad091277",
"1651f1b003b0ffae8b615d191952ad65ad09127... | [
"tests/test_write_metrics_reports.py",
"tests/test_rand_scale_cropd.py",
"tests/test_save_image.py",
"tests/test_bilateral_approx_cpu.py",
"tests/test_map_label_value.py",
"tests/test_nifti_rw.py",
"monai/optimizers/lr_finder.py",
"tests/test_rand_k_space_spike_noise.py",
"monai/losses/tversky.py"
] | [
"# Copyright 2020 - 2021 MONAI Consortium\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# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by applicable law or agre... | [
[
"torch.tensor"
],
[
"numpy.array",
"numpy.random.randint"
],
[
"torch.randint"
],
[
"torch.device",
"numpy.array",
"torch.autograd.gradcheck",
"numpy.testing.assert_allclose"
],
[
"numpy.testing.assert_equal",
"numpy.array"
],
[
"numpy.diag",
"nu... |
SR42-dev/line-following-robot-with-aruco-markers-obstacle-detection-and-turtlesim-publisher | [
"d7dae86a4f1fdc56ab80193c218e25243e44e487"
] | [
"lineFollowerArucoROS-checkpoint3.py"
] | [
"import sys\r\nimport cv2\r\nimport math\r\nimport time\r\nimport rospy\r\nimport serial\r\nimport argparse\r\nimport numpy as np\r\nfrom std_srvs.srv import Empty\r\nfrom turtlesim.msg import Pose\r\nfrom geometry_msgs.msg import Twist\r\n\r\n# ROS movement global variables and function definitions\r\nx = 0\r\ny =... | [
[
"numpy.array",
"numpy.ones"
]
] |
bkornpob/axehelper | [
"d89407f73f92e140a5cc9a76c643b9a8656e8b0f",
"d89407f73f92e140a5cc9a76c643b9a8656e8b0f",
"d89407f73f92e140a5cc9a76c643b9a8656e8b0f"
] | [
"build/lib/axehelper/axehelper_bkg.py",
"build/lib/axehelper/make_sip.py",
"build/lib/axehelper/photapcorr.py"
] | [
"# Kornpob Bhirombhakdi\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport copy,glob,os\nfrom astropy.io import fits\nfrom math import pi\n\nclass AXEhelper_BKG:\n def __init__(self,axeflist=None,fltflist=None,\n padxleft=5,padxright=5,\n padylow=10,halfdy=3,padyup=10,... | [
[
"numpy.isfinite",
"numpy.arange",
"matplotlib.pyplot.subplots",
"numpy.percentile",
"numpy.full_like",
"numpy.tan",
"numpy.meshgrid",
"numpy.where"
],
[
"numpy.array",
"numpy.sum"
],
[
"numpy.isfinite",
"numpy.copy",
"scipy.interpolate.interp2d",
"nu... |
markytools/eeedeeplearning-finalProj | [
"6a06d73091262fb996c990302692cff7d9eed3b1"
] | [
"train.py"
] | [
"import sys\nfrom optparse import OptionParser\n\nimport torch\nimport torch.backends.cudnn as cudnn\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch import optim\nfrom torch.autograd import Variable\n\nfrom eval import eval_net\nfrom models.unet import UNet\nfrom utils import *\n\ndef train_net(... | [
[
"torch.ByteTensor",
"torch.load",
"torch.nn.BCELoss",
"torch.nn.functional.sigmoid",
"torch.FloatTensor",
"torch.autograd.Variable"
]
] |
kacunningham413/PlasmoCount | [
"0213c63add92c8df1a53526af394bc9692ca4a62"
] | [
"api/programs/model.py"
] | [
"from pathlib import Path\nimport pandas as pd\nfrom PIL import Image as PILImage\nimport torch\nfrom torchvision import transforms, ops\nfrom fastai.basic_train import load_learner\nfrom fastai.vision import Image\nfrom fastai.core import FloatItem\nimport matplotlib.pyplot as plt\nfrom scipy import stats\n\n\ncla... | [
[
"pandas.Series",
"scipy.stats.zscore",
"torch.no_grad",
"torch.cuda.is_available",
"pandas.DataFrame.from_dict",
"torch.device"
]
] |
milinddeore/pytorch-vsumm-reinforce | [
"c3ca731c9a7f00282c8460deb47f34658cfc0522"
] | [
"utils/generate_dataset.py"
] | [
"\"\"\"\n Generate Dataset\n\n 1. Converting video to frames\n 2. Extracting features\n 3. Getting change points\n 4. User Summary ( for evaluation )\n\n\"\"\"\nimport os, sys\nsys.path.append('../')\nfrom networks.CNN import ResNet\nfrom utils.KTS.cpd_auto import cpd_auto\nfrom tqdm import tqdm\nimp... | [
[
"numpy.concatenate",
"numpy.dot",
"numpy.vstack"
]
] |
jhabikal21/tensorflow | [
"98d20962172301385aae694141801a375debd2bc",
"98d20962172301385aae694141801a375debd2bc",
"98d20962172301385aae694141801a375debd2bc",
"98d20962172301385aae694141801a375debd2bc",
"98d20962172301385aae694141801a375debd2bc",
"98d20962172301385aae694141801a375debd2bc"
] | [
"tensorflow/python/kernel_tests/slice_op_test.py",
"tensorflow/contrib/tpu/python/tpu/training_loop.py",
"tensorflow/contrib/boosted_trees/python/training/functions/gbdt_batch.py",
"tensorflow/contrib/learn/python/learn/estimators/head.py",
"tensorflow/contrib/data/python/ops/batching.py",
"tensorflow/con... | [
"# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.python.ops.array_ops.slice",
"tensorflow.python.ops.gradients_impl.gradients",
"numpy.asarray",
"tensorflow.python.ops.array_ops.placeholder",
"tensorflow.python.ops.array_ops.zeros",
"tensorflow.python.platform.test.main",
"numpy.random.rand",
"numpy.prod",
"tensor... |
EloyRD/ThesisExp | [
"dfb890708e95d23cc68ff79b0858630c12aa940d"
] | [
"scripts/EA_A_03_2LFact_Data.py"
] | [
"# -*- coding: utf-8 -*-\n# ---\n# jupyter:\n# jupytext:\n# formats: ipynb,scripts//py:percent\n# text_representation:\n# extension: .py\n# format_name: percent\n# format_version: '1.2'\n# jupytext_version: 1.1.6\n# kernelspec:\n# display_name: Python [conda env:thesis] *\n# ... | [
[
"numpy.abs",
"numpy.random.seed",
"pandas.DataFrame",
"pandas.set_option",
"pandas.read_pickle",
"matplotlib.pyplot.style.use"
]
] |
monofo/fairseq | [
"335a4cbd403543ece43e24b41abbe53fc54b5f36"
] | [
"fairseq_cli/train.py"
] | [
"#!/usr/bin/env python3 -u\n# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\"\"\"\nTrain a new model on one or across multiple GPUs.\n\"\"\"\n\nimport argparse\nimport logging\nimpor... | [
[
"torch.autograd.profiler.record_function",
"torch.autograd.profiler.emit_nvtx",
"torch.cuda.profiler.profile",
"numpy.random.seed"
]
] |
Joshuaalbert/neural_deprojection | [
"5f7859bfd514efe1707a61e2a5e7fc6d949f85ce",
"5f7859bfd514efe1707a61e2a5e7fc6d949f85ce"
] | [
"neural_deprojection/models/TwoD_to_2d_dVAE_GCD/graph_networks.py",
"neural_deprojection/models/graph_vae_GCD/mayavi_vis.py"
] | [
"import sys\n\nsys.path.insert(1, '/data/s2675544/git/neural_deprojection/')\nsys.path.insert(1, '/home/matthijs/git/neural_deprojection/')\n\nfrom graph_nets import blocks\nfrom graph_nets.utils_tf import concat\n\nimport tensorflow as tf\nimport sonnet as snt\nfrom graph_nets.graphs import GraphsTuple\nfrom graph... | [
[
"tensorflow.math.abs",
"tensorflow.reduce_sum",
"tensorflow.cast",
"tensorflow.summary.scalar",
"tensorflow.summary.image",
"tensorflow.math.reduce_sum",
"tensorflow.tile",
"tensorflow.matmul",
"tensorflow.vectorized_map",
"tensorflow.random.truncated_normal",
"tensorfl... |
bfxavier/GamestonkTerminal | [
"b0a685cacaca1f06fc41d8041bcae5492216dc52"
] | [
"gamestonk_terminal/prediction_techniques/neural_networks.py"
] | [
"import argparse\nimport os\nfrom warnings import simplefilter\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport pandas as pd\nfrom pandas.plotting import register_matplotlib_converters\nfrom TimeSeriesCrossValidation import splitTrain\nfrom sklearn.preprocessing import MinMaxScaler, StandardScaler\nfrom... | [
[
"matplotlib.pyplot.minorticks_on",
"matplotlib.pyplot.plot",
"sklearn.preprocessing.MinMaxScaler",
"tensorflow.keras.layers.Dropout",
"tensorflow.keras.layers.SimpleRNN",
"numpy.reshape",
"pandas.plotting.register_matplotlib_converters",
"matplotlib.pyplot.axis",
"matplotlib.py... |
markson14/RRPN_pytorch | [
"f30c6180c44c2d6cc65ce4521a3cf839b5215089",
"f30c6180c44c2d6cc65ce4521a3cf839b5215089"
] | [
"maskrcnn_benchmark/modeling/rrpn/inference.py",
"maskrcnn_benchmark/modeling/rbox_coder.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\nimport torch\n\nfrom maskrcnn_benchmark.modeling.box_coder import BoxCoder\nfrom maskrcnn_benchmark.modeling.rbox_coder import RBoxCoder\nfrom maskrcnn_benchmark.structures.bounding_box import BoxList, RBoxList\nfrom maskrcnn_benchmark.struct... | [
[
"torch.topk",
"torch.zeros_like",
"torch.arange",
"torch.cat"
],
[
"torch.stack",
"torch.exp",
"torch.zeros_like",
"torch.log"
]
] |
iwan933/mlmi-federated-learning | [
"e148664304dd7fbbc2cc2a6a34567533748c1720"
] | [
"mlmi/participant.py"
] | [
"import copy\nfrom pathlib import Path\nfrom typing import Dict, List, Optional, Union\n\nimport torch\nfrom pytorch_lightning.metrics import Accuracy\nfrom torch import Tensor, optim\nfrom torch.utils import data\n\nimport pytorch_lightning as pl\nfrom pytorch_lightning.loggers import LightningLoggerBase\nfrom pyt... | [
[
"torch.is_tensor",
"torch.cuda.is_available"
]
] |
Flsahkong/transferlearning | [
"0fe84de59dcb2871e2dca24130dc24e1ccce8506"
] | [
"code/distance/mmd_pytorch.py"
] | [
"# Compute MMD distance using pytorch\n\nimport torch\nimport torch.nn as nn\n\n\nclass MMD_loss(nn.Module):\n def __init__(self, kernel_type='rbf', kernel_mul=2.0, kernel_num=5):\n super(MMD_loss, self).__init__()\n self.kernel_num = kernel_num\n self.kernel_mul = kernel_mul\n self.f... | [
[
"torch.mean",
"torch.cat",
"torch.sum",
"torch.cuda.empty_cache",
"torch.exp",
"torch.no_grad"
]
] |
goudfroo/pysiaf | [
"ca8350ce814950344789a9674079b8d0168ac05e"
] | [
"pysiaf/iando/write.py"
] | [
"\"\"\"Functions to write Science Instrument Aperture Files (SIAF).\n\nSIAF content in an aperture_collection object can be written to an xml file that can be ingested in\nthe PRD. Format and order of the xml fields are defined in SIAF reference files.\nWriting to Microsoft Excel .xlsx format is supported.\nWriting... | [
[
"numpy.isnan"
]
] |
vnarayan13/featuretools | [
"a86b6d8df246a13558d19915b15230c418ad27ab"
] | [
"featuretools/primitives/standard/aggregation_primitives.py"
] | [
"from __future__ import division\n\nfrom datetime import datetime, timedelta\n\nimport numpy as np\nimport pandas as pd\n\nfrom ..base.aggregation_primitive_base import (\n AggregationPrimitive,\n make_agg_primitive\n)\n\nfrom featuretools.variable_types import (\n Boolean,\n DatetimeTimeIndex,\n Dis... | [
[
"numpy.polyfit",
"pandas.Series",
"pandas.TimedeltaIndex",
"numpy.unique",
"pandas.DataFrame",
"numpy.append",
"numpy.mean",
"pandas.to_numeric"
]
] |
yardenas/meta-learning-tutorial | [
"c5154eae85f6255f58fe6028ab630e3499238b3a"
] | [
"omniglot_dataset.py"
] | [
"from typing import Iterator, List, Tuple\n\nimport os\nimport random\n\nimport numpy as np\n\nfrom tensorflow import data as tfd\nfrom tensorflow import image as tfi\nfrom tensorflow import io as tfio\nfrom tensorflow import dtypes\nimport tensorflow as tf\n\nfrom google_drive_downloader import GoogleDriveDownload... | [
[
"tensorflow.transpose",
"tensorflow.range",
"tensorflow.shape",
"tensorflow.io.decode_png",
"tensorflow.data.Dataset.from_tensor_slices",
"tensorflow.cast",
"tensorflow.eye",
"tensorflow.gather",
"tensorflow.random.shuffle",
"tensorflow.io.matching_files",
"tensorflow.i... |
zyxwvu321/Classifer_SSL_Longtail | [
"e6c09414c49e695b0f4221a3c6245ae3929a1788",
"e6c09414c49e695b0f4221a3c6245ae3929a1788",
"e6c09414c49e695b0f4221a3c6245ae3929a1788"
] | [
"modeling/backbones/senet.py",
"utils/parse_meta.py",
"preproc_segloc.py"
] | [
"\"\"\"\nResNet code gently borrowed from\nhttps://github.com/pytorch/vision/blob/master/torchvision/models/resnet.py\n\"\"\"\nfrom __future__ import print_function, division, absolute_import\nfrom collections import OrderedDict\nimport math\nimport torch\nimport torch.nn as nn\nfrom torch.utils import model_zoo\n\... | [
[
"torch.nn.Sequential",
"torch.nn.Dropout",
"torch.load",
"torch.nn.Conv2d",
"torch.nn.Sigmoid",
"torch.nn.MaxPool2d",
"torch.nn.AvgPool2d",
"torch.nn.AdaptiveAvgPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
],
[
"numpy.arange",
"numpy.array",
"numpy.zeros... |
emirhanai/Machine-Learning-Prediction-Software-Based-on-Classification-and-Regression-Based-on-Processor-CPU- | [
"051be998eb9195dccf28c2e7607ead0812c79cf1"
] | [
"Machine Learning Prediction Software Based on Classification and Regression Based on Processor [CPU] Specifications.py"
] | [
"import pandas as pd\r\nimport numpy as np\r\nfrom sklearn.tree import *\r\nfrom sklearn.ensemble import *\r\nfrom sklearn.preprocessing import *\r\nfrom sklearn.model_selection import *\r\nfrom sklearn.metrics import *\r\n\r\n\r\ndata = pd.read_csv('data.csv')\r\n\r\nX = data.drop(['Company','Processor Name'],axis... | [
[
"pandas.read_csv",
"numpy.float64"
]
] |
ytorzuk-altran/openvino | [
"031e998a15ec738c64cc2379d7f30fb73087c272",
"68d460a3bb578a738ba0e4d0e1f2e321afa73ab0",
"031e998a15ec738c64cc2379d7f30fb73087c272",
"68d460a3bb578a738ba0e4d0e1f2e321afa73ab0",
"031e998a15ec738c64cc2379d7f30fb73087c272",
"68d460a3bb578a738ba0e4d0e1f2e321afa73ab0",
"68d460a3bb578a738ba0e4d0e1f2e321afa73ab... | [
"src/core/tests/frontend/paddlepaddle/test_models/gen_scripts/generate_yolo_box.py",
"tools/mo/openvino/tools/mo/front/onnx/lstm_ext.py",
"src/core/tests/frontend/paddlepaddle/test_models/gen_scripts/generate_softmax.py",
"tools/mo/openvino/tools/mo/back/PackBinaryWeights.py",
"tools/pot/openvino/tools/pot/... | [
"#\n# pool2d paddle model generator\n#\nimport numpy as np\nfrom save_model import saveModel\nimport sys\n\ndef yolo_box(name : str, x, img_size, attrs : dict):\n import paddle as pdpd\n pdpd.enable_static()\n \n with pdpd.static.program_guard(pdpd.static.Program(), pdpd.static.Program()):\n node... | [
[
"numpy.random.random",
"numpy.random.randint"
],
[
"numpy.array"
],
[
"numpy.array"
],
[
"numpy.round",
"numpy.packbits",
"numpy.array",
"numpy.flip",
"numpy.zeros",
"numpy.isclose"
],
[
"numpy.expand_dims",
"numpy.logical_and",
"numpy.min",
... |
guidefloripa/kerasify | [
"cbb2ea6cae61ccd551b0f5327433d23e8e8050ee"
] | [
"make_tests.py"
] | [
"import numpy as np\nimport pprint\n\nfrom keras.models import Sequential\nfrom keras.layers import Convolution2D, Dense, Flatten, Activation, MaxPooling2D, Dropout\nfrom keras.layers.recurrent import LSTM\nfrom keras.layers.advanced_activations import ELU\nfrom keras.layers.embeddings import Embedding\n\nfrom kera... | [
[
"numpy.random.seed",
"numpy.arange",
"numpy.set_printoptions",
"numpy.random.rand",
"numpy.random.randint"
]
] |
gjkennedy/OpenMDAO | [
"06897b584403cce34bc106dd2840aa07eea69e96",
"06897b584403cce34bc106dd2840aa07eea69e96",
"06897b584403cce34bc106dd2840aa07eea69e96",
"06897b584403cce34bc106dd2840aa07eea69e96"
] | [
"openmdao/surrogate_models/tests/test_map.py",
"openmdao/approximation_schemes/approximation_scheme.py",
"openmdao/drivers/tests/test_genetic_algorithm_driver.py",
"openmdao/solvers/nonlinear/tests/test_newton.py"
] | [
"from openmdao.api import Group, Problem, MetaModelUnStructuredComp, NearestNeighbor\nfrom openmdao.utils.assert_utils import assert_near_equal\n\nimport numpy as np\nimport unittest\n\n\nclass CompressorMap(MetaModelUnStructuredComp):\n\n def __init__(self):\n super(CompressorMap, self).__init__()\n\n ... | [
[
"numpy.array",
"numpy.meshgrid"
],
[
"numpy.hstack",
"scipy.sparse.coo_matrix",
"numpy.nonzero",
"numpy.arange",
"numpy.cumsum",
"numpy.array",
"numpy.zeros"
],
[
"numpy.random.seed",
"numpy.arange",
"numpy.ones",
"numpy.array",
"numpy.zeros",
"n... |
pyensemble/wildwood | [
"b261cbd7d0b425b50647f719ab99c1d89f477d5c"
] | [
"plot_signals_weighted_depth.py"
] | [
"\nimport logging\nfrom matplotlib.cm import get_cmap\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nimport pandas as pd\n\nfrom wildwood.datasets import get_signal, make_regression\nfrom wildwood.forest import ForestRegressor\n\nfrom wildwood._binning import Binner\n\npd.set_option(\"display.max_columns\"... | [
[
"numpy.linspace",
"matplotlib.pyplot.subplots",
"matplotlib.cm.get_cmap",
"pandas.set_option",
"matplotlib.pyplot.show"
]
] |
obkyrush/jax | [
"8662c5f660678b6320a1a8fc46e917e97c399b57"
] | [
"jax/_src/random.py"
] | [
"# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ... | [
[
"numpy.log",
"numpy.sqrt",
"numpy.uint32",
"numpy.issubdtype",
"numpy.ndim",
"numpy.ceil",
"numpy.delete",
"numpy.int64",
"numpy.shape",
"numpy.iinfo",
"numpy.float32",
"numpy.binary_repr",
"numpy.array"
]
] |
omarsou/kernel_method_kaggle_challenge | [
"0f2e85166112b231699d9c9f7e3ae894e5ff7766"
] | [
"kernel/base_kernel.py"
] | [
"import numpy as np\nimport pickle\n\n\nclass Kernel:\n def __init__(self):\n self.train_phi = None\n self.K_matrix = None\n self.test_phi = None\n self.X_train = None\n pass\n\n def build_gram_matrix(self, X):\n raise NotImplementedError(\"Method build_gram_matrix no... | [
[
"numpy.zeros"
]
] |
Nebula4869/real-time-object-detection-YOLOv4 | [
"a7b692999210747fd49cec2c35f2b7d8d5b7eecc"
] | [
"data_voc.py"
] | [
"import numpy as np\nimport random\nimport xml\nimport cv2\nimport os\n\n\ndef read_file(file_name):\n \"\"\"\n 读取 file_name 文件全部内容\n return:文件内容list\n \"\"\"\n if not os.path.isfile(file_name):\n return None\n result = []\n with open(file_name, 'r') as f:\n for line in f.readline... | [
[
"numpy.maximum",
"numpy.minimum",
"numpy.asarray",
"numpy.floor",
"numpy.zeros"
]
] |
carlos-alcan/network_app_classification | [
"faa19842ed17b277259dd64e14c7133ce6a61e56"
] | [
"engineered_features.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Apr 16 12:14:37 2019\n\n@author: carlosalcantara\n\"\"\"\n\n'''\nExpand data with engineered features using the feature_engineering_function.py\nSaves new csv file with specified name, overwriting input file if no save file\nname is given.\n\n... | [
[
"pandas.read_csv"
]
] |
CAMeL-Lab/CAMeLBERT_morphosyntactic_tagger | [
"5bea542c2e731d263281d0ab16ba9c065f602f94"
] | [
"scripts/run_token_classification.py"
] | [
"# -*- coding: utf-8 -*-\n\n# MIT License\n#\n# Copyright 2018-2021 New York University Abu Dhabi\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including wi... | [
[
"torch.nn.CrossEntropyLoss",
"sklearn.metrics.precision_score",
"numpy.argmax",
"sklearn.metrics.f1_score",
"sklearn.metrics.recall_score",
"sklearn.metrics.accuracy_score"
]
] |
chunfuchen/qiskit-acqua-tutorials | [
"74b0bcaac1678fc6c0de5be13e99d7ecd11b3075"
] | [
"artificial_intelligence/qsvm_kernel_multiclass.py"
] | [
"# -*- coding: utf-8 -*-\n\n# Copyright 2018 IBM.\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 appli... | [
[
"numpy.concatenate"
]
] |
danielbee/PracticalIntroDataSci | [
"feecd7d1b18ba44fb3ea59d7709c2ff493c0c79f"
] | [
"scripts/parse_weather.py"
] | [
"# The purpose of this script is to collect all the station data into a single data structure. \n# This will require regular expressions to find things like station changes. \n\n#the hope is that we can simply export this single data structure to a single file is whatever format we want. \n\n# Need to figure out ho... | [
[
"pandas.concat",
"pandas.DataFrame.from_dict"
]
] |
51N84D/Virtual-Try-On | [
"3b3d4f6066885446e2a6eadb6c2668237e62e03b"
] | [
"data/dataloader.py"
] | [
"# coding=utf-8\nimport torch\nimport torch.utils.data as data\nimport torchvision.transforms as transforms\nfrom torch.utils.data import DataLoader, Dataset\nfrom PIL import Image\nfrom PIL import ImageDraw\nfrom addict import Dict\nimport os.path as osp\nimport numpy as np\nimport argparse\nimport matplotlib.pypl... | [
[
"torch.zeros",
"numpy.uint8",
"torch.utils.data.DataLoader",
"torch.from_numpy",
"numpy.array",
"torch.utils.data.sampler.RandomSampler"
]
] |
pmohtat/PyBaMM | [
"8f0a6d82e26c19f5735ed81b55671574af29eb16"
] | [
"tests/unit/test_expression_tree/test_operations/test_jac.py"
] | [
"#\n# Tests for the jacobian methods\n#\nimport pybamm\n\nimport numpy as np\nimport unittest\nfrom scipy.sparse import eye\nfrom tests import get_mesh_for_testing\n\n\ndef test_multi_var_function(arg1, arg2):\n return arg1 + arg2\n\n\nclass TestJacobian(unittest.TestCase):\n def test_variable_is_statevector(... | [
[
"numpy.log",
"numpy.linspace",
"scipy.sparse.eye",
"numpy.eye",
"numpy.cos",
"numpy.ones",
"numpy.testing.assert_array_equal",
"numpy.sign",
"numpy.sin",
"numpy.exp",
"numpy.array",
"numpy.zeros"
]
] |
KhelmholtzR/ProgLearn | [
"f5177c720e53d2f5936272998b94e0746135a3b9"
] | [
"proglearn/transformers.py"
] | [
"\"\"\"\nMain Author: Will LeVine\nCorresponding Email: levinewill@icloud.com\n\"\"\"\nfrom tensorflow import keras\nimport numpy as np\nfrom sklearn.tree import DecisionTreeClassifier\nfrom sklearn.utils.validation import check_array, check_is_fitted, check_X_y\n\nfrom .base import BaseTransformer\n\n\nclass Neura... | [
[
"sklearn.utils.validation.check_is_fitted",
"tensorflow.keras.models.clone_model",
"sklearn.utils.validation.check_array",
"numpy.unique",
"tensorflow.keras.models.Model",
"sklearn.tree.DecisionTreeClassifier",
"sklearn.utils.validation.check_X_y",
"tensorflow.keras.callbacks.Early... |
AndreyBuyanov/ImageProcessing.Lb5.TextureSegmentation | [
"1509817ee2719573b04eba6f49154d7b38af853d"
] | [
"App.py"
] | [
"from PyQt5 import QtWidgets, uic\nfrom PyQt5.QtGui import QImage, QPixmap, QPalette, qRgb, qGray\nimport sys\nimport numpy as np\nfrom typing import Callable\nfrom numbers import Number\n\n\ndef process_image(\n input_image: np.array,\n kernel_size: int,\n kernel_fn: Callable[[np.array], float... | [
[
"numpy.pad",
"numpy.unique",
"numpy.copy",
"numpy.std",
"numpy.mean",
"numpy.ndenumerate",
"numpy.where",
"numpy.zeros"
]
] |
BUTSpeechFIT/ASR_Transformer | [
"814f720aa8265e9a377869f93dc65b251338e985",
"814f720aa8265e9a377869f93dc65b251338e985",
"814f720aa8265e9a377869f93dc65b251338e985"
] | [
"Transformer_training_V2.py",
"ASR_TransV1/Dataloader_for_AM_v3_dev.py",
"ASR_TransV1/TRANSFORMER_ASR_V1_CTC.py"
] | [
"#!/usr/bin/python\nimport sys\nimport os\nimport subprocess\nfrom os.path import join, isdir\nimport torch\n\n\n#*************************************************************************************************************************\n####### Loading the Parser and default arguments\n#import pdb;pdb.set_trace()\n... | [
[
"matplotlib.pyplot.switch_backend",
"numpy.zeros",
"numpy.argmin",
"matplotlib.pyplot.viridis"
],
[
"numpy.zeros"
],
[
"torch.no_grad",
"torch.from_numpy"
]
] |
petabricks/petabricks | [
"b498b93880b0c4ac3924ddb82cff2e6541e60bd1"
] | [
"scripts/misc/csvavg.py"
] | [
"#!/usr/bin/python\n\nimport csv, sys\nimport numpy\n\ndialect = csv.excel_tab\nmulti_file=len(sys.argv[1:])>1\n\ninputs = map(lambda x: csv.DictReader(x, dialect=dialect), map(open, sys.argv[1:]))\nrows = map(csv.DictReader.next, inputs)\nheaders = inputs[0].fieldnames\noutput = csv.writer(sys.stdout, dialect=dial... | [
[
"numpy.std",
"numpy.mean"
]
] |
MaxCodeXTC/panel | [
"1d34e8ce4734eec10f8e64af11c5a3fecaab5bac"
] | [
"panel/widgets/indicators.py"
] | [
"import os\nimport sys\n\nfrom math import pi\n\nimport numpy as np\nimport param\n\nfrom bokeh.plotting import figure\nfrom bokeh.models import ColumnDataSource\nfrom tqdm.asyncio import tqdm as _tqdm\n\nfrom ..layout import Column, Row\nfrom ..models import (\n HTML, Progress as _BkProgress, TrendIndicator as ... | [
[
"numpy.radians",
"numpy.isnan",
"numpy.cos",
"numpy.sin",
"numpy.array"
]
] |
rubenlozanoaht3m/DataDogm | [
"cd605e8072cca31e8418830c3300657ae2fa5b16",
"cd605e8072cca31e8418830c3300657ae2fa5b16",
"cd605e8072cca31e8418830c3300657ae2fa5b16",
"cd605e8072cca31e8418830c3300657ae2fa5b16"
] | [
"examples/pipeline/hetero_ftl/pipeline-hetero-ftl-with-predict.py",
"examples/benchmark_quality/hetero_sbt/gbdt-binary.py",
"python/federatedml/util/test/early_stop_test.py",
"python/federatedml/feature/feature_selection/correlation_filter.py"
] | [
"#\n# Copyright 2019 The FATE 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 r... | [
[
"tensorflow.keras.initializers.Zeros",
"tensorflow.keras.initializers.RandomNormal",
"tensorflow.keras.optimizers.Adam"
],
[
"sklearn.metrics.roc_auc_score",
"sklearn.ensemble.GradientBoostingClassifier"
],
[
"numpy.random.randint"
],
[
"numpy.argsort",
"numpy.abs"
]
... |
Surya97/MWDB-project | [
"508562913624416415cd143cef9b7689066037ef"
] | [
"Phase3/Feedback.py"
] | [
"import os\nimport sys\nfrom pathlib import Path\nsys.path.insert(1, '../Phase1')\nsys.path.insert(2, '../Phase2')\nimport misc\nimport numpy as np\n\nclass Feedback:\n def __init__(self):\n self.task5_result = None\n self.reduced_pickle_file_folder = os.path.join(Path(os.path.dirname(__file__)).pa... | [
[
"numpy.array"
]
] |
XiaoshengLin/shadow3 | [
"d007ae59a2038db4f9275f7bb026bd1b11549e5f"
] | [
"tests/test_lens.py"
] | [
"import Shadow\nimport numpy\n\n# using mac oasys, for plots\n# from srxraylib.plot.gol import set_qt\n# set_qt()\n\n#\n# runs an absorber of 10 um thickness for a source at 10 keV\n#\n#\n\ndef run_example_lens(user_units_to_cm=1.0,npoint=5000,use_prerefl=0):\n #\n # Python script to run shadow3. Created auto... | [
[
"numpy.array"
]
] |
dibyajyotidash/https-github.com-kylejusticemagnuson-pyti | [
"08532970f9d2b163f1223599e3ac80f6c51533e4"
] | [
"tests/test_average_true_range_percent.py"
] | [
"from __future__ import absolute_import\nimport unittest\nimport numpy as np\n\nfrom tests.sample_data import SampleData\nfrom pyti import average_true_range_percent\n\n\nclass TestAverageTrueRangePercent(unittest.TestCase):\n def setUp(self):\n \"\"\"Create data to use for testing.\"\"\"\n self.cl... | [
[
"numpy.testing.assert_array_equal"
]
] |
JaakkoAhola/LES-scripting | [
"1ebe99ce4292e58581bf50615cb8e0aa3d0c0af2"
] | [
"iceScripts/isdacProfileModifications_dry_above.py"
] | [
"#!/usr/bin/env python2\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Aug 28 13:38:05 2018\n\n@author: aholaj\n\"\"\"\n\nimport numpy as np\n\nimport sound_in_profiles as sp\n\nimport PythonMethods as pm\n\nimport ModDataPros as mdp\n\nfrom copy import deepcopy\n\nfrom FindCloudBase import calc_rh_profile\nfrom ... | [
[
"numpy.abs",
"numpy.multiply",
"numpy.sign",
"numpy.max",
"numpy.shape"
]
] |
steerapi/webdnn | [
"1df51cc094e5a528cfd3452c264905708eadb491",
"1df51cc094e5a528cfd3452c264905708eadb491",
"1df51cc094e5a528cfd3452c264905708eadb491",
"1df51cc094e5a528cfd3452c264905708eadb491"
] | [
"test/runtime/frontend_test/chainer_test/functions_test/connection_test/convolution_2d_function_test.py",
"test/runtime/operators_test/sigmoid_test.py",
"src/graph_transpiler/webdnn/graph/operators/tile.py",
"test/runtime/frontend_test/onnx_test/defs_test/reduction_test/reduce_mean_test.py"
] | [
"import chainer\nimport numpy as np\n\nfrom test.util import generate_kernel_test_case, wrap_template\nfrom webdnn.graph.placeholder import Placeholder\nfrom webdnn.frontend.chainer.converter import ChainerConverter\nfrom webdnn.frontend.chainer.placeholder_variable import PlaceholderVariable\n\n\n@wrap_template\nd... | [
[
"numpy.random.rand"
],
[
"numpy.exp",
"numpy.random.rand",
"numpy.transpose"
],
[
"numpy.tile"
],
[
"numpy.random.rand"
]
] |
YurongYou/MODEST | [
"cfc0465ed737f6c3166e6b5d08231880073b4552"
] | [
"downstream/OpenPCDet/pcdet/utils/calibration_kitti.py"
] | [
"import numpy as np\n\n\ndef get_calib_from_file(calib_file):\n with open(calib_file) as f:\n lines = f.readlines()\n\n obj = lines[2].strip().split(' ')[1:]\n P2 = np.array(obj, dtype=np.float32)\n obj = lines[3].strip().split(' ')[1:]\n P3 = np.array(obj, dtype=np.float32)\n obj = lines[4... | [
[
"numpy.dot",
"numpy.min",
"numpy.matmul",
"numpy.ones",
"numpy.max",
"numpy.array",
"numpy.zeros"
]
] |
roman-baldaev/course-project | [
"b65ba018c16697224f15916b08ce7f09634d1f8c"
] | [
"model/src/DataModel.py"
] | [
"import numpy as np\nimport pandas as pd\n\nclass DataModel:\n \"\"\"\n This class implements a data model - values at time points and provides methods for working with these data.\n \"\"\"\n\n def __init__(self, n=0, values=None, times=None):\n \"\"\"\n A constructor that takes values and... | [
[
"numpy.array",
"numpy.zeros"
]
] |
icecube-pixel/grok-auto-complete | [
"747aab90f846410f444914713d238034fcf767a2"
] | [
"get_grok_repos.py"
] | [
"import logging\r\nfrom github import Github\r\nfrom typing import Dict, Tuple, List\r\nimport os\r\nimport argparse\r\nimport traceback\r\nfrom collections import Counter\r\nfrom tenacity import retry, stop_after_attempt, wait_exponential\r\nfrom time import sleep\r\nimport pandas as pd\r\n\r\nlogging.basicConfig(... | [
[
"pandas.DataFrame"
]
] |
PierreExeter/gym-reacher | [
"d58edeb93b4b703101dc0505232c883fd012dbad"
] | [
"scripts/test_DDPG.py"
] | [
"import gym\nimport numpy as np\nimport gym_reacher\n\nfrom stable_baselines.ddpg.policies import MlpPolicy\nfrom stable_baselines.common.noise import NormalActionNoise, OrnsteinUhlenbeckActionNoise, AdaptiveParamNoiseSpec\nfrom stable_baselines import DDPG\n\n# env = gym.make('MountainCarContinuous-v0')\nenv = gym... | [
[
"numpy.zeros",
"numpy.ones"
]
] |
gonzalo-munillag/Exponential_Randomised_Response | [
"1ae2c867d77c6e92f1df0bb7120862e4f9aa15e4",
"1ae2c867d77c6e92f1df0bb7120862e4f9aa15e4"
] | [
"differential-privacy-library-main/tests/tools/test_histogramdd.py",
"Experiments/permute_and_flip_main/mechanisms.py"
] | [
"import numpy as np\nfrom unittest import TestCase\n\nfrom diffprivlib.accountant import BudgetAccountant\nfrom diffprivlib.tools.histograms import histogramdd\nfrom diffprivlib.utils import global_seed, PrivacyLeakWarning, BudgetError\n\n\nclass TestHistogramdd(TestCase):\n def test_no_params(self):\n a ... | [
[
"numpy.array",
"numpy.histogramdd"
],
[
"numpy.log",
"numpy.arange",
"scipy.optimize.minimize_scalar",
"numpy.cumsum",
"numpy.copy",
"scipy.optimize.bracket",
"scipy.optimize.root_scalar",
"numpy.exp",
"numpy.zeros",
"scipy.special.logsumexp"
]
] |
PengningChao/emdb-sphere | [
"d20ac81ab4fd744f87788bda46d3aa19598658ee"
] | [
"dualbound/Lagrangian/spatialProjopt_Zops_numpy.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon May 4 21:39:12 2020\n\n@author: pengning\n\nThis is part of the grad/Hess engine for spatial projection versions of the \noriginal global constraint <S|T>-<T|U|T>. The Lagrangian multipliers are distributed in \nthe order alphaP0_1, alphaP0_2... | [
[
"numpy.linalg.eigh",
"numpy.zeros_like",
"numpy.linalg.eigvalsh",
"numpy.zeros",
"numpy.vdot"
]
] |
juniorcl/virtual-lockin-prototype | [
"5f75897a65620f6180f37bcaa3b4291d605aaf9f"
] | [
"auxiliary.py"
] | [
"############################# Helper #################################\n## This file was created to support the lock-in program ##\n######################################################################\n## These functions can be imported using: import lockin-auxiliary as aux\n## and put aux.<name of t... | [
[
"scipy.signal.bessel",
"scipy.signal.filtfilt",
"numpy.sqrt",
"numpy.multiply",
"numpy.fft.rfftfreq",
"numpy.fft.rfft",
"scipy.signal.butter",
"numpy.roll"
]
] |
yuyunliuhen/automatic-text-categorization | [
"6f8ca4f26d2ac684439cc265a4ec468ad9d30d20"
] | [
"cosine_categorize.py"
] | [
"# encoding=utf-8\nimport os\nimport sys\nimport math\nfrom util_tool import *\nimport numpy\n\ndef categorization_files(path):\n\tfiles = search_directory(path,'vec')\n\tfor input_name in files:\n\t\tcategorization_file(input_name)\n\t\t# compute only once, the same to them if using topic model for sample feather\... | [
[
"numpy.square",
"numpy.array",
"numpy.sum"
]
] |
LucasHaug/MAP3121 | [
"90b69c5db20e6d56c0c3e3dd969d9e41d804e9be"
] | [
"EP2/tests.py"
] | [
"#!/usr/bin/env python3\n\nimport numpy as np\nfrom random import random\n\nimport crank_nicolson\n\n#################################################\n### Functions Definitions\n#################################################\n\ndef get_data(test_letter):\n if test_letter == \"a\":\n ut_array, uk_matri... | [
[
"numpy.delete",
"numpy.array",
"numpy.zeros"
]
] |
Crazychicken563/RhythmGameCharterAI | [
"d9647007010ecc9a7ecc93d998527e578d4b12c6"
] | [
"CloneHero/clone_hero_to_generic.py"
] | [
"import os\nimport re\nimport pickle as pkl\nimport soundfile as sf\nimport numpy as np\n\ndef safeAdd(src, key, val):\n if key in src:\n src[key].update(val)\n else:\n src[key] = val\n\nsource_dir = \"clone_hero_data/clonehero-win64/songs\"\ndef main():\n for (dirpath, dirnames, filenames) i... | [
[
"numpy.asarray",
"numpy.ceil",
"numpy.floor",
"numpy.round"
]
] |
DonghyunAhn/sadvirus | [
"cdcc98812d613962a7003ff0c6013d0805bde024"
] | [
"utils/siScore_utils.py"
] | [
"import glob\nimport torch\nimport numpy as np\nfrom skimage import io, transform\nfrom torchvision import transforms\nimport torchvision.transforms.functional as F \nfrom torch.utils.data import Dataset\nfrom PIL import Image\nimport random\n\nclass ClusterDataset(Dataset):\n def __init__(self, cluster_list, di... | [
[
"numpy.rot90",
"torch.from_numpy",
"numpy.stack",
"numpy.random.randint"
]
] |
kiuthed/qutip | [
"b6fb8e5bbd9ffeae117b54e56313e8617038deab",
"b6fb8e5bbd9ffeae117b54e56313e8617038deab"
] | [
"qutip/tests/test_tensor.py",
"qutip/bloch.py"
] | [
"# This file is part of QuTiP: Quantum Toolbox in Python.\n#\n# Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson.\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... | [
[
"numpy.testing.assert_equal",
"numpy.testing.run_module_suite"
],
[
"numpy.sqrt",
"numpy.linspace",
"matplotlib.pyplot.figure",
"numpy.arange",
"numpy.cos",
"numpy.sin",
"numpy.append",
"numpy.size",
"numpy.real",
"matplotlib.pyplot.close",
"matplotlib.patch... |
BastienArcelin/IPU-GPU | [
"dde946686478ce77a06821a1517b5b8206ab8de9"
] | [
"scripts/ipu/inference_gen_galaxy.py"
] | [
"## Load necessary librairies\nimport numpy as np\n\nimport tensorflow as tf\nimport tensorflow_probability as tfp\ntfk = tf.keras\ntfkl = tfk.layers\ntfd = tfp.distributions\ntfb = tfp.bijectors\n\nimport time\nimport sys\nsys.path.insert(0,'')\nfrom flow import *\nimport utils_vae\n\n# IPU \nfrom tensorflow.compi... | [
[
"tensorflow.train.latest_checkpoint",
"tensorflow.python.ipu.utils.configure_ipu_system",
"tensorflow.python.ipu.ipu_strategy.IPUStrategy",
"tensorflow.python.ipu.utils.create_ipu_config",
"tensorflow.python.ipu.utils.auto_select_ipus",
"tensorflow.optimizers.Adam"
]
] |
ibm-developer-skills-network/oroir-Build-a-Personal-Movie-Recommender-with-Django | [
"fbc681cdea067c0cee91c158c632f83cff9db936"
] | [
"recommender/movierecommender/management/commands/load_movies.py"
] | [
"import csv\nimport pandas as pd\nfrom django.core.management import BaseCommand\nfrom ...models import Movie\n\n\nclass Command(BaseCommand):\n help = 'Load a movie csv file into the database'\n\n def add_arguments(self, parser):\n parser.add_argument('--path', type=str)\n\n def handle(self, *args,... | [
[
"pandas.read_csv"
]
] |
ContactEngineering/Adhesion | [
"acc46ad9bfe49fec667cb9a116ebde426faa38c4"
] | [
"helpers/Testing_augmented_Lagrangian.py"
] | [
"#\n# Copyright 2020 Antoine Sanner\n# 2020 Lars Pastewka\n# 2015-2016 Till Junge\n#\n# ### MIT license\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without... | [
[
"numpy.array"
]
] |
ian-shepherd/bball_sim | [
"119696eda8d1c1c96da4113c3a41659e1472ebc2"
] | [
"bball_sim/app.py"
] | [
"# Packages\r\nimport streamlit as st\r\nimport pandas as pd\r\nimport seaborn as sns\r\nimport matplotlib.pyplot as plt\r\nimport matplotlib.patches as mpatches\r\nimport util\r\n\r\n# Configure page\r\nst.set_page_config(page_title='End of Game NBA Simulator',\r\n page_icon='https://raw.githubus... | [
[
"matplotlib.pyplot.legend",
"matplotlib.patches.Patch",
"pandas.read_csv",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.ylabel"
]
] |
poltextlab/nyt_hybrid_classification_workflow | [
"3f676938b08f4373be3a83e975ee51dfa5ce6bf5",
"3f676938b08f4373be3a83e975ee51dfa5ce6bf5",
"3f676938b08f4373be3a83e975ee51dfa5ce6bf5",
"3f676938b08f4373be3a83e975ee51dfa5ce6bf5",
"3f676938b08f4373be3a83e975ee51dfa5ce6bf5",
"3f676938b08f4373be3a83e975ee51dfa5ce6bf5"
] | [
"spark_cluster/04_5_HV_activeLearn/HV_v4_activeLearn_NYT_sim2_and_sim3_to_sim1/6100_ML2_HV_v4_activeLearn_NYT_sim2_and_sim3_to_sim1_round5.py",
"spark_cluster/04_2_HV_basic/HV_v1_NYT_sim2_and_sim3_to_sim1/6200_ML2_HV_v1_NYT_sim2_and_sim3_to_sim1_round1_human_validation.py",
"spark_cluster/04_2_HV_basic/HV_v1_NY... | [
"# import libraries\nfrom pyspark.sql import SparkSession\nfrom pyspark import SparkConf\nfrom pyspark.sql.types import *\n\nfrom pyspark.sql.functions import col, count, when\n\nfrom pyspark.ml.classification import LinearSVC\n\nimport pandas as pd\n\n#################################################\n# spark conf... | [
[
"pandas.concat",
"pandas.DataFrame"
],
[
"pandas.DataFrame"
],
[
"pandas.DataFrame"
],
[
"pandas.concat",
"pandas.DataFrame"
],
[
"pandas.DataFrame"
],
[
"pandas.concat",
"pandas.DataFrame"
]
] |
wolf-zchen/CarND-capstone | [
"b6b768bfd01f03a5256c2db4b84f9d7a42149de2"
] | [
"ros/src/waypoint_updater/waypoint_updater.py"
] | [
"#!/usr/bin/env python\nimport numpy as np\nimport rospy\nfrom std_msgs.msg import Int32\nfrom geometry_msgs.msg import PoseStamped\nfrom styx_msgs.msg import Lane, Waypoint\nfrom scipy.spatial import KDTree\n\nimport math\n\n'''\nThis node will publish waypoints from the car's current position to some `x` distance... | [
[
"numpy.dot",
"numpy.array",
"scipy.spatial.KDTree"
]
] |
undeadyequ/espnet | [
"8c3f85ce695153abcb9cf365180b1d7554ad565e",
"8c3f85ce695153abcb9cf365180b1d7554ad565e",
"8c3f85ce695153abcb9cf365180b1d7554ad565e",
"8c3f85ce695153abcb9cf365180b1d7554ad565e"
] | [
"espnet/nets/pytorch_backend/e2e_vc_transformer.py",
"test/test_e2e_mt_transformer.py",
"espnet2/main_funcs/calculate_all_attentions.py",
"test/espnet2/train/test_iterable_dataset.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# Copyright 2020 Nagoya University (Wen-Chin Huang)\n# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)\n\n\"\"\"Voice Transformer Network (Transformer-VC) related modules.\"\"\"\n\nimport logging\n\nimport torch\nimport torch.nn.functional as F\n\nfrom e... | [
[
"torch.nn.functional.normalize",
"torch.nn.Module.__init__",
"torch.cat",
"torch.tensor",
"torch.nn.Linear",
"torch.no_grad",
"torch.stack"
],
[
"numpy.random.randn",
"torch.no_grad",
"torch.randn",
"torch.tensor"
],
[
"torch.no_grad",
"torch.cat"
],
... |
mpsilfve/fairseq | [
"eb228ee74c6bc9803eb7dbd398d8cda16c55ccd2",
"eb228ee74c6bc9803eb7dbd398d8cda16c55ccd2"
] | [
"fairseq/optim/adam.py",
"fairseq/modules/linearized_convolution.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport logging\nimport math\nfrom collections.abc import Collection\nfrom dataclasses import dataclass, field\nfrom typing import Li... | [
[
"torch.max",
"torch.zeros_like",
"torch.cuda.is_available",
"torch.distributed.get_world_size",
"torch.distributed.all_reduce"
],
[
"torch.no_grad"
]
] |
sdjohnson-astro/redshifting | [
"6073123bf3ea6e48de410d99521e418abc980c99",
"6073123bf3ea6e48de410d99521e418abc980c99"
] | [
"cubs_compare_spec1D.py",
"redshift.py"
] | [
"#!/usr/bin/env python\nimport glob\nimport argparse\nfrom astropy.table import Table\nimport numpy as np\n\n# Set up the command line argument parser\nparser = argparse.ArgumentParser(description='Compare two versions of spec1D files from CUBS IMACS or LDSS3')\nparser.add_argument('-d1', metavar='directory 1', typ... | [
[
"numpy.max",
"numpy.abs"
],
[
"numpy.matrix",
"numpy.diag",
"numpy.unravel_index",
"numpy.square",
"numpy.isfinite",
"numpy.linalg.inv",
"numpy.arange",
"numpy.median",
"numpy.isnan",
"numpy.percentile",
"scipy.interpolate.interp1d",
"numpy.argmax",
... |
gelijergensen/PermutationImportance | [
"7a09a407e42745c223055e0597c5226ff64b2f3c"
] | [
"PermutationImportance/abstract_runner.py"
] | [
"\"\"\"The general algorithm for all of the data-based variable importance methods\nis the same, regardless of whether the method is Sequential Selection or \nPermutation Importance or something else. This is represented in the \n``abstract_variable_importance`` function. All of the different methods we \nprovide u... | [
[
"numpy.flatnonzero"
]
] |
ben15021999/fairseq_rl | [
"89f3c1123052927f67c008f01f3ffa4383f90150"
] | [
"fairseq/tasks/online_backtranslation.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport contextlib\nimport json\nimport logging\nimport math\nimport os\nfrom argparse import Namespace\nfrom collections import Orde... | [
[
"torch.autograd.profiler.record_function",
"torch.unique",
"torch.no_grad",
"torch.zeros"
]
] |
ZhaoChuyang/dgreid | [
"ee1d7af74b796f2f194307ab023e43ecc3d3d525",
"ee1d7af74b796f2f194307ab023e43ecc3d3d525",
"ee1d7af74b796f2f194307ab023e43ecc3d3d525"
] | [
"reid/models/resnet_mldg_smm.py",
"examples/rsc_baseline.py",
"reid/datasets/viper.py"
] | [
"from __future__ import absolute_import\n\nimport torch\nfrom torch import nn\nfrom torch.nn import functional as F\nfrom torch.nn import init\nimport torchvision\nfrom collections import OrderedDict\n\nfrom ..models.layers.adain import SMMBlock\n\n\n__all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet1... | [
[
"torch.nn.functional.normalize",
"torch.nn.BatchNorm1d",
"torch.nn.Dropout",
"torch.cat",
"torch.nn.init.constant_",
"torch.nn.Linear",
"torch.nn.functional.relu",
"torch.nn.AdaptiveAvgPool2d",
"torch.nn.init.normal_",
"torch.chunk",
"torch.nn.init.kaiming_normal_"
],... |
zhanghaohit/incubator-tvm | [
"ee0af843f3c5a3429e888079afb5f30789bd9bee",
"ee0af843f3c5a3429e888079afb5f30789bd9bee",
"ee0af843f3c5a3429e888079afb5f30789bd9bee",
"ee0af843f3c5a3429e888079afb5f30789bd9bee",
"ee0af843f3c5a3429e888079afb5f30789bd9bee"
] | [
"tests/python/relay/test_op_level1.py",
"tests/python/unittest/test_custom_datatypes_mybfloat16.py",
"tests/python/relay/test_op_qnn_add.py",
"tests/python/unittest/test_codegen_device.py",
"python/tvm/autotvm/graph_tuner/base_graph_tuner.py"
] | [
"# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y... | [
[
"numpy.dot",
"numpy.ones_like",
"numpy.maximum",
"numpy.sqrt",
"numpy.concatenate",
"numpy.copy",
"numpy.random.rand",
"numpy.random.uniform",
"numpy.exp"
],
[
"numpy.array"
],
[
"numpy.array"
],
[
"numpy.random.uniform",
"numpy.zeros"
],
[
"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.