repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
Dog0320/BERT-NLU | [
"c760a09faee141526dbb241040d73d0870118f6d"
] | [
"evaluate.py"
] | [
"import argparse\nimport os\n\nimport numpy as np\nimport torch\nfrom seqeval.metrics import accuracy_score, f1_score, precision_score, recall_score\nfrom torch.utils.data import DataLoader\nfrom tqdm import tqdm\nfrom transformers import BertTokenizer, BertConfig\n\nfrom model import Model\nfrom utils.data_utils i... | [
[
"torch.cuda.manual_seed_all",
"numpy.random.seed",
"torch.no_grad",
"torch.manual_seed",
"torch.cuda.is_available",
"torch.utils.data.DataLoader",
"torch.load"
]
] |
ejhigson/bsr | [
"6ec321a76c80106ca4bf8d6821c822c056247d23"
] | [
"bsr/priors.py"
] | [
"#!/usr/bin/env python\n\"\"\"Python priors for use with PolyChord. Includes prior settings for\nthe results used in the paper. Most of the functions here build on\ndyPolyChord's priors functionality.\n\"\"\"\nimport copy\nimport numpy as np\nimport bsr.basis_functions as bf\nimport bsr.neural_networks as nn\nimpor... | [
[
"numpy.round",
"numpy.full",
"numpy.zeros"
]
] |
shiquanyang/NS-Dial | [
"0c654b58272475495da568879cf3f175624a9b26"
] | [
"models/Test.py"
] | [
"from models.ReasonEngine import ReasonEngine\nimport torch\n\n\nif __name__ == \"__main__\":\n reason_engine = ReasonEngine(4, 8, 8, 100, 10, 50)\n # batch_size = 2\n query = [[[1,1,1,1,1,1,1,1],[2,2,2,2,2,2,2,2],[3,3,3,3,3,3,3,3]],\n [[4,4,4,4,4,4,4,4],[5,5,5,5,5,5,5,5],[6,6,6,6,6,6,6,6]]] #... | [
[
"torch.Tensor"
]
] |
lokalmatador123/BOLDigger | [
"49888c4e01b32cbdfeff9dcaefe2734933100391"
] | [
"boldigger/jamp_hit.py"
] | [
"import openpyxl, datetime\r\nimport pandas as pd\r\nimport PySimpleGUI as sg\r\nimport numpy as np\r\n\r\n## function to return the threshold for an OTU dataframe, returns No Match for No Matches\r\n## also returns a level to group by for later use\r\ndef get_threshold(df):\r\n threshold = df['Similarity'][0]\r... | [
[
"pandas.concat",
"pandas.read_excel",
"pandas.ExcelWriter"
]
] |
chromium/chromium | [
"df46e572c3449a4b108d6e02fbe4f6d24cf98381"
] | [
"tools/memory/partition_allocator/compute_internal_fragmentation.py"
] | [
"#!/usr/bin/env python3\n# Copyright 2021 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\"\"\"Parses allocation profiles from a trace and computes the internal\nfragmentation from PartitionAlloc, given a list of bu... | [
[
"numpy.array"
]
] |
Marathon-race/JSRGAN | [
"5723802d923d05231e6c185324e4239dfbabb888"
] | [
"RSBU.py"
] | [
"import torch\nimport torch.nn as nn\n\nclass RSBU_CW(nn.Module):\n\n expansion = 1\n \n def __init__(self, in_channels, out_channels, stride=1):\n super().__init__()\n self.shrinkage = Shrinkage(out_channels, gap_size=(1, 1))\n #residual function\n self.residual_function = nn.S... | [
[
"torch.nn.Linear",
"torch.mul",
"torch.flatten",
"torch.max",
"torch.nn.Sequential",
"torch.nn.Sigmoid",
"torch.nn.BatchNorm2d",
"torch.sign",
"torch.abs",
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.nn.BatchNorm1d",
"torch.nn.AdaptiveAvgPool2d"
]
] |
Samrat2803/self-critical.pytorch | [
"b540cb508b63881e451ad436660cf656aa4abeac"
] | [
"scripts/prepro_feats.py"
] | [
"\"\"\"\nPreprocess a raw json dataset into hdf5/json files for use in data_loader.lua\n\nInput: json file that has the form\n[{ file_path: 'path/img.jpg', captions: ['a caption', ...] }, ...]\nexample element in this list would look like\n{'captions': [u'A man with a red helmet on a small moped on a dirt road. ', ... | [
[
"numpy.concatenate",
"torch.no_grad"
]
] |
Saduf2019/decision-forests | [
"62dd6e9de9a577df115c2c7553ca4ed42dd074de"
] | [
"tensorflow_decision_forests/tensorflow/ops/inference/tf2_test.py"
] | [
"# Copyright 2021 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... | [
[
"tensorflow.print",
"tensorflow.test.main"
]
] |
kashik0i/keras-text-to-image-illustrations | [
"6f37f818511bb12bc950b9e6c5703f05bb8e155f"
] | [
"keras_text_to_image/library/dcgan_v3.py"
] | [
"from keras.models import Model, Sequential\nfrom keras.layers import Input, Dense, Reshape, concatenate\nfrom keras.layers.core import Activation, Flatten\nfrom keras.layers.normalization import BatchNormalization\nfrom keras.layers.convolutional import UpSampling2D, Conv2D, MaxPooling2D\nfrom keras.optimizers imp... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.zeros",
"numpy.load",
"numpy.save",
"numpy.random.uniform"
]
] |
Intron7/rapids_singlecell | [
"1904a7709b599d60cc9a4424edc70fc160f032ff"
] | [
"code/scanpy_gpu_funcs.py"
] | [
"#\n# created by Severin Dicks (IBSM, Freiburg)\n#\n#\n\nimport cupy as cp\nimport cudf\nimport cugraph\nimport anndata\nimport os\n\nimport numpy as np\nimport pandas as pd\nimport scipy\nimport math\nfrom scipy import sparse\nimport seaborn as sns\nimport matplotlib.pyplot as plt\n\n\nfrom cuml.manifold import TS... | [
[
"scipy.sparse.issparse",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.close",
"matplotlib.pyplot.subplots",
"numpy.rec.fromarrays"
]
] |
zhut19/strax | [
"a9ec08003a9193113c65910602d8b1b0ed4eb4e6"
] | [
"strax/processing/peak_merging.py"
] | [
"import strax\nimport numba\nimport numpy as np\n\nexport, __all__ = strax.exporter()\n\n\n@export\ndef merge_peaks(peaks, start_merge_at, end_merge_at,\n max_buffer=int(1e5)):\n \"\"\"Merge specified peaks with their neighbors, return merged peaks\n\n :param peaks: Record array of strax peak d... | [
[
"numpy.gcd.reduce",
"numpy.repeat",
"numpy.zeros",
"numpy.diff"
]
] |
patricks-lab/ultimate-utils | [
"e32922d79eddba8cbe9f954a96ef2205491d8a4a",
"e32922d79eddba8cbe9f954a96ef2205491d8a4a"
] | [
"ultimate-utils-proj-src/uutils/torch_uu/models/l2l_models.py",
"ultimate-utils-proj-src/uutils/torch_uu/models/learner_from_opt_as_few_shot_paper.py"
] | [
"\"\"\"\nlearn2learn examples: https://github.com/learnables/learn2learn/tree/master/examples/vision\n\n4CNN l2l hack:\n- since SL needs to have 64 output units, I unfortuantely, hardcoded mdl.cls = nn.Linear(...,64).\ndoing the setter does change the .classifier to point to the right thing (see the setter decorato... | [
[
"torch.nn.Linear",
"torch.randn"
],
[
"torch.nn.Linear",
"torch.nn.MaxPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.randn"
]
] |
amirdy/dogbreed | [
"42fe73bcfb9a54a0bf9f72399334b6f315062eb7"
] | [
"Web_App/files/mlp.py"
] | [
"\nimport torch\nimport os\nclass mlp(torch.nn.Module):\n def __init__(self,input_size, output_num):\n super(mlp,self).__init__()\n self.fc1=torch.nn.Linear(input_size,output_num)\n\n self.relu=torch.nn.ReLU()\n self.drop4= torch.nn.Dropout(p=0.8)\n \n \n def forward(self,x):\n #out=self.rel... | [
[
"torch.nn.Linear",
"torch.nn.Dropout",
"torch.nn.ReLU"
]
] |
DrSleep/DenseTorch | [
"f90bef075429d763fc08338dea8222d28b0a4516"
] | [
"densetorch/nn/mobilenetv2.py"
] | [
"import numpy as np\nimport torch.nn as nn\n\nfrom .inventory import model_urls\nfrom .layer_factory import convbnrelu, InvertedResidualBlock, conv1x1\nfrom .model_zoo import load_url\nfrom ..misc.utils import make_list\n\n__all__ = [\"mobilenetv2\"]\n\n\nclass MobileNetv2(nn.Module):\n \"\"\"MobileNet-v2 defini... | [
[
"torch.nn.ReLU6",
"torch.nn.Sequential"
]
] |
pgagarinov/pytorch-hyperlight | [
"dd0e291b4ebe0cb1538ac39d7f2046f9ec0fd3a1"
] | [
"products/pytorch-hyperlight/pytorch_hyperlight/tasks/classification.py"
] | [
"# Copyright Peter Gagarinov.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ... | [
[
"torch.nn.Linear",
"torch.sigmoid",
"torch.nn.Dropout",
"torch.optim.AdamW",
"torch.optim.lr_scheduler.StepLR",
"torch.nn.ModuleDict",
"torch.softmax",
"torch.nn.functional.relu"
]
] |
awe2/astro_ghost | [
"c3ec86594a621633ec5f0fb1b364458cc98aefcf"
] | [
"build/lib/astro_ghost/NEDQueryFunctions.py"
] | [
"import matplotlib\nfrom astropy import units as u\nfrom astropy.coordinates import SkyCoord\nfrom astroquery.ned import Ned\nimport re\nimport os\nimport pandas as pd\nimport numpy as np\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nfrom astro_ghost.PS1QueryFunctions import find_all\n\ndef getNEDSpectra... | [
[
"numpy.array",
"numpy.nanmax",
"numpy.min",
"numpy.argmin"
]
] |
sihwa-park/DCNv2 | [
"51d18873ed1b5ee8cc71f316a63ec1ca7bd67aea"
] | [
"testcuda.py"
] | [
"#!/usr/bin/env python3\nfrom __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import division\n\nimport time\nimport torch\nimport torch.nn as nn\nfrom torch.autograd import gradcheck\n\nfrom dcn_v2 import dcn_v2_conv, DCNv2, DCN\nfrom dcn_v2 import dcn_v2_pooling, DCNv2Poo... | [
[
"torch.sigmoid",
"torch.cat",
"torch.rand",
"torch.autograd.gradcheck",
"torch.nn.Conv2d",
"torch.randint",
"torch.tensor",
"torch.randn"
]
] |
siju-samuel/tensorflow | [
"0ac663d9a78ab2c630173fd7b0cc63fedf1526e2",
"4f2a9acaff04bb81684c2b49c955f296315473ac"
] | [
"tensorflow/python/keras/_impl/keras/callbacks.py",
"tensorflow/python/saved_model/export.py"
] | [
"# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"numpy.median",
"tensorflow.python.summary.summary.histogram",
"tensorflow.python.keras._impl.keras.backend.image_data_format",
"tensorflow.python.keras._impl.keras.backend.get_value",
"tensorflow.python.keras._impl.keras.backend.get_session",
"numpy.less",
"tensorflow.python.summary.s... |
ogorodnikov/m1 | [
"06aee1963471897d8c05986e2782e3ca3a107c93"
] | [
"a_other/algorithms/shor_reference.py"
] | [
"import math\nimport numpy as np\nfrom qiskit import Aer\nfrom qiskit.utils import QuantumInstance\n# from qiskit.algorithms import Shor\n\n\n\"\"\" https://github.com/Qiskit/qiskit-tutorials/blob/0994a317891cf688f55ebed5a06f8a227c8440ac/tutorials/algorithms/08_factorizers.ipynb \"\"\"\n\"\"\" https://github.... | [
[
"numpy.diag",
"numpy.zeros"
]
] |
MarconiS/DeepForest | [
"d6c937f29863edba8b447df9e6bfdab702298815",
"d6c937f29863edba8b447df9e6bfdab702298815"
] | [
"tests/test_utilities.py",
"tests/test_tfrecords.py"
] | [
"# test_utilities\nfrom deepforest import utilities\nfrom deepforest import get_data\nimport pytest\nimport os\nimport pandas as pd\nimport numpy as np\nfrom deepforest import deepforest\n\n@pytest.fixture()\ndef annotations():\n annotations = utilities.xml_to_annotations(get_data(\"OSBS_029.xml\"))\n annotat... | [
[
"numpy.where"
],
[
"tensorflow.Session"
]
] |
5enxia/parallel-krylov | [
"2d75e220b9b0cc6df924111cfb57f917f2100925"
] | [
"v1/processes/adaptivekskipmrr.py"
] | [
"import numpy as np\n\nfrom .common import start, end as finish, init, init_mpi, krylov_base_start, krylov_base_finish\n\nfrom .pyx.scalar_iteration import scalar_iteration\n\n\ndef _adaptivekskipmrr_cpu(A, b, epsilon, k, T, pu):\n from numpy.linalg import norm\n\n # 共通初期化\n comm, rank, num_of_process = in... | [
[
"numpy.empty",
"numpy.zeros"
]
] |
PavanKishore21/probability | [
"4bad1b796b0e6ed2959205915d42788817620c4c",
"4bad1b796b0e6ed2959205915d42788817620c4c",
"4bad1b796b0e6ed2959205915d42788817620c4c",
"4bad1b796b0e6ed2959205915d42788817620c4c"
] | [
"tensorflow_probability/python/math/psd_kernels/pointwise_exponential_test.py",
"tensorflow_probability/python/bijectors/sigmoid.py",
"tensorflow_probability/python/bijectors/matrix_inverse_tril.py",
"tensorflow_probability/python/distributions/batch_concat_test.py"
] | [
"# Copyright 2021 The TensorFlow Probability Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a... | [
[
"tensorflow.compat.v2.math.exp",
"numpy.random.uniform",
"tensorflow.compat.v2.test.main"
],
[
"tensorflow.compat.v2.math.sigmoid",
"tensorflow.compat.v2.where",
"tensorflow.compat.v2.nn.sigmoid",
"tensorflow.compat.v2.exp",
"tensorflow.compat.v2.nn.softplus",
"tensorflow.c... |
yuanyuansjtu/chaospy | [
"0b10d5eaa6abb77198e8eb025fea759c4629bca6",
"0b10d5eaa6abb77198e8eb025fea759c4629bca6",
"0b10d5eaa6abb77198e8eb025fea759c4629bca6"
] | [
"tests/distributions/copulas/test_nataf.py",
"chaospy/distributions/operators/truncation.py",
"chaospy/quadrature/clenshaw_curtis.py"
] | [
"\"\"\"Test for Nataf transformations.\"\"\"\nimport numpy\nimport pytest\nimport chaospy\nfrom chaospy.distributions.copulas.nataf import nataf\n\n\ndef test_sampling_statistics():\n dists = chaospy.Iid(chaospy.Normal(2, 2), 4)\n corr = numpy.array([[ 1.0, -0.2, 0.3, -0.1],\n [-0.2, ... | [
[
"numpy.array",
"numpy.cov",
"numpy.mean",
"numpy.allclose",
"numpy.all",
"numpy.corrcoef",
"numpy.var"
],
[
"numpy.array",
"numpy.ones",
"numpy.atleast_1d"
],
[
"numpy.array",
"numpy.asarray",
"numpy.sum",
"numpy.ones",
"numpy.where",
"numpy.... |
jcjs/FPN-Pytorch | [
"423a4499c4e826d17367762e821b51b9b1b0f2f3"
] | [
"lib/setup.py"
] | [
"# --------------------------------------------------------\r\n# Fast R-CNN\r\n# Copyright (c) 2015 Microsoft\r\n# Licensed under The MIT License [see LICENSE for details]\r\n# Written by Ross Girshick\r\n# --------------------------------------------------------\r\n\r\nfrom __future__ import print_function\r\n\r\n... | [
[
"numpy.get_numpy_include",
"numpy.get_include"
]
] |
afiaka87/Diff-DALLE | [
"649d8a7093b67a23befc79ee4bbdbcc43d373b1a"
] | [
"scripts/train_classifier.py"
] | [
"\"\"\"\nTrain a noised image classifier on ImageNet.\n\"\"\"\n\nimport argparse\nimport os\nfrom time import time \nimport numpy as np\n\nimport blobfile as bf\nimport torch as th\nimport torch.distributed as dist\nimport torch.nn.functional as F\nfrom torch.nn.parallel.distributed import DistributedDataParallel a... | [
[
"torch.distributed.get_world_size",
"torch.optim.AdamW",
"torch.no_grad",
"numpy.cos",
"torch.distributed.get_rank",
"torch.distributed.barrier"
]
] |
design-cal/preference-learning | [
"e4ae9f1512fbc838b320bde692793f702e84addf"
] | [
"dataset.py"
] | [
"\"\"\"\n@author: Luisa M Zintgraf (2017, Vrije Universiteit Brussel)\n\"\"\"\nimport numpy as np\nimport sys\nsys.path.insert(0, '..')\nfrom gp_utilities import utils_data as utl_data\n\n\nclass DatasetPairwise:\n def __init__(self, num_objectives):\n \"\"\"\n Initialise an empty dataset for data ... | [
[
"numpy.empty",
"numpy.array_equal",
"numpy.zeros",
"numpy.sum",
"numpy.copy",
"numpy.ones",
"numpy.min",
"numpy.linspace",
"numpy.vstack"
]
] |
gatoniel/spatial-biofilm-sorting-package | [
"29804b1023f30c675950d6cb80b27c72b7ec554c"
] | [
"spatial_biofilm_sorting_package/extract_foreground.py"
] | [
"import numpy as np\nfrom skimage.filters import threshold_multiotsu\nfrom skimage.measure import label, regionprops\nfrom skimage.morphology import binary_dilation, binary_erosion, disk\nfrom scipy.ndimage.morphology import binary_fill_holes\n\n\ndef get_edge_mask(true_fg, dil_radius, ero_radius):\n selem_dilat... | [
[
"numpy.logical_not",
"numpy.zeros_like",
"numpy.asarray",
"numpy.zeros",
"numpy.digitize",
"scipy.ndimage.morphology.binary_fill_holes"
]
] |
k-suler/NLP-IMapBook | [
"36c6af13716a8e790554bc949ae54a371a5c82b2"
] | [
"run_bert.py"
] | [
"import pandas as pd\nfrom sklearn import preprocessing\nfrom sklearn.model_selection import train_test_split\nimport tensorflow as tf\nimport os\nfrom tensorflow import keras\nfrom sklearn.preprocessing import LabelEncoder\nfrom tensorflow.keras import layers\nfrom evaluation import Evaluator\n\nprint(f\"Tensorflo... | [
[
"tensorflow.keras.layers.Conv1D",
"sklearn.preprocessing.LabelEncoder",
"tensorflow.concat",
"tensorflow.keras.layers.Embedding",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Dropout",
"tensorflow.constant",
"tensorflow.keras.layers.GlobalMaxPool1D",
"numpy.argmax"... |
jeffreykuang/mmocr-1 | [
"b17304edeb493b0a4d7224c23d23b952350d0db5",
"b17304edeb493b0a4d7224c23d23b952350d0db5"
] | [
"mmocr/datasets/kie_dataset.py",
"mmocr/models/textrecog/decoders/robust_scanner_decoder.py"
] | [
"import copy\nfrom os import path as osp\n\nimport numpy as np\nimport torch\n\nimport mmocr.utils as utils\nfrom mmdet.datasets.builder import DATASETS\nfrom mmocr.core import compute_f1_score\nfrom mmocr.datasets.base_dataset import BaseDataset\nfrom mmocr.datasets.pipelines.crop import sort_vertex\n\n\n@DATASETS... | [
[
"numpy.concatenate",
"numpy.zeros_like",
"numpy.array",
"torch.cat",
"numpy.fill_diagonal",
"numpy.stack",
"torch.Tensor",
"numpy.maximum"
],
[
"torch.nn.Linear",
"torch.max",
"torch.stack",
"torch.nn.functional.softmax"
]
] |
jiangwei221/kornia | [
"a211d4952355e440b944b1bda8eed4c2a7457c2d"
] | [
"test/geometry/test_pinhole.py"
] | [
"import pytest\n\nimport torch\nimport kornia as kornia\nfrom torch.autograd import gradcheck\nfrom torch.testing import assert_allclose\n\nimport utils # test utilities\nfrom common import device_type\n\n\nclass TestPinholeCamera:\n def _create_intrinsics(self, batch_size, fx, fy, cx, cy):\n intrinsics ... | [
[
"torch.eye",
"torch.testing.assert_allclose",
"torch.tensor",
"torch.ones"
]
] |
HensoldtOptronicsCV/ImageQualityAssessment | [
"7bb3af2cd20a32415966304c8fa3acb77c54f85d",
"7bb3af2cd20a32415966304c8fa3acb77c54f85d"
] | [
"plots/plot_temporalincoherence_local_flickering.py",
"measures/calculate_noise_visibility_measure.py"
] | [
"# MIT License\n#\n# Copyright (c) 2020 HENSOLDT\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 without limitation the rights\n# to use, copy, modi... | [
[
"numpy.array",
"matplotlib.pyplot.errorbar",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.title",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.show"
],
[
"numpy.append",
"numpy.array",
"numpy.clip"
]
] |
chapter09/open_lth | [
"53403fdb3fb82b833e336cf36b0292bfed61820a"
] | [
"training/standard_callbacks.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 time\nimport torch\n\nfrom ..datasets.base import DataLoader\nfrom ..foundations import hparams\nfrom ..foundations.step impor... | [
[
"torch.no_grad",
"torch.tensor",
"torch.distributed.reduce"
]
] |
zxpatric/Sandbox | [
"af8b7b633a097de747243a119882fed4779b7c81"
] | [
"Python/QTPlot/mplWidget.py"
] | [
"# Imports\nfrom PyQt5 import QtWidgets\nfrom matplotlib.figure import Figure\nfrom matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as Canvas\n\nimport matplotlib\n\n# Ensure using PyQt5 backend\nmatplotlib.use('QT5Agg')\n\n# Matplotlib canvas class to create figure\nclass MplCanvas(Canvas):\n def __... | [
[
"matplotlib.use",
"matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg.__init__",
"matplotlib.figure.Figure",
"matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg.updateGeometry",
"matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg.setSizePolicy"
]
] |
csiro-hydroinformatics/AI4Water | [
"cdb18bd4bf298f77b381f1829045a1e790146985"
] | [
"ai4water/preprocessing/transformations/_main.py"
] | [
"import warnings\nfrom typing import Union\n\nimport numpy as np\nimport pandas as pd\nfrom sklearn.decomposition import PCA, KernelPCA, IncrementalPCA, FastICA, SparsePCA\n\ntry:\n from PyEMD import EMD, EEMD\nexcept ModuleNotFoundError:\n EMD, EEMD = None, None\n\nfrom ai4water.utils.utils import dateandtim... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.isnan",
"pandas.DataFrame",
"pandas.concat"
]
] |
rynemcarbone/power_ranker | [
"7956c660022c5e5c149f7c5e2b55d9cd0356291b"
] | [
"power_ranker/web/power_plot.py"
] | [
"import matplotlib.pyplot as plt\nimport numpy as np\n\n#_____________________________________\ndef make_power_plot(teams, year, week):\n '''Make plot of power ranking versus\n average score'''\n scores = []\n owners = []\n powers = []\n colors = []\n # Tier colors\n c = [(133/255.,205/255.,242/255.),\n ... | [
[
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.boxplot",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.figure"
]
] |
go-bears/quantumflow | [
"4e02de5c575d113599aaa787153afd73382228db"
] | [
"tests/test_stdgates.py"
] | [
"\n# Copyright 2016-2018, Rigetti Computing\n#\n# This source code is licensed under the Apache License, Version 2.0 found in\n# the LICENSE.txt file in the root directory of this source tree.\n\n\"\"\"\nUnit tests for quantumflow.stdgates\n\"\"\"\n\nimport random\nfrom math import pi\nimport numpy as np\n\nimport ... | [
[
"numpy.array",
"numpy.sqrt",
"numpy.eye"
]
] |
Aamer98/LibFewShot | [
"c53b4ee3772c5c8033fd54aa73586091eee2d0b0"
] | [
"core/model/metric/adm.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\n@inproceedings{DBLP:conf/ijcai/LiWHSGL20,\n author = {Wenbin Li and\n Lei Wang and\n Jing Huo and\n Yinghuan Shi and\n Yang Gao and\n Jiebo Luo},\n title = {Asymmetric Distribution Measure for Few-shot L... | [
[
"torch.nn.functional.normalize",
"torch.cat",
"torch.diagonal",
"torch.nn.Conv1d",
"torch.nn.CrossEntropyLoss",
"torch.inverse",
"torch.topk",
"torch.slogdet",
"torch.nn.BatchNorm1d",
"torch.eye",
"torch.div",
"torch.mean",
"torch.sum"
]
] |
scaralbi/dnaplotlib | [
"a1fdd12ac3f3df1b16a0351402b8fe4f29b388d9"
] | [
"reporter.py"
] | [
"import math\nimport dnaplotlib as dpl\nimport matplotlib.pyplot as plt\nfrom matplotlib import gridspec\nfrom matplotlib.patches import Polygon, Ellipse, Wedge, Circle, PathPatch\nfrom matplotlib.path import Path\nfrom matplotlib.lines import Line2D\nfrom matplotlib.patheffects import Stroke\nimport matplotlib.pat... | [
[
"matplotlib.cm.get_cmap",
"matplotlib.pyplot.close",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.subplots_adjust",
"matplotlib.gridspec.GridSpec",
"matplotlib.pyplot.subplot"
]
] |
aabeliuk/Algorithmic-Matching-Exp | [
"8b394f09a74de5ccdd3ecaa469b8ec747bee6f21"
] | [
"Code/dating_competition.py"
] | [
"import numpy as np\nimport time\nfrom math import pow\nfrom math import ceil\nfrom math import sqrt\nimport copy\nimport matplotlib.pyplot as plt\nfrom scipy.spatial.distance import euclidean\nfrom pulp import *\n#from pyOpt import *\nfrom pyOpt import Optimization\n\n# from pyOpt import PSQP\n# from pyOpt import ... | [
[
"numpy.array",
"scipy.spatial.distance.euclidean",
"numpy.random.seed",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.legend",
"numpy.mean",
"matplotlib.pyplot.hist",
"numpy.random.beta",
"numpy.random.uniform",
... |
LinghengMeng/spinningup | [
"f52615a0081ac6c20aade7efd55c2a4a7047c968"
] | [
"spinup/algos_original/ddpg_dev/ddpg.py"
] | [
"import os\nimport numpy as np\nimport tensorflow as tf\nimport gym\nimport pybulletgym\nimport time\nfrom spinup.algos_original.ddpg_dev import core\nfrom spinup.algos_original.ddpg_dev.core import get_vars, MLP\nfrom spinup.utils.logx import EpochLogger\n\n\nclass ReplayBuffer:\n \"\"\"\n A simple FIFO expe... | [
[
"tensorflow.set_random_seed",
"tensorflow.train.AdamOptimizer",
"tensorflow.assign",
"numpy.zeros",
"tensorflow.concat",
"numpy.random.seed",
"numpy.random.randn",
"tensorflow.global_variables_initializer",
"tensorflow.keras.backend.get_session",
"tensorflow.variable_scope"... |
techthiyanes/scenic | [
"05585b1189364e29d82413b9d4a50ffa8c246f0c"
] | [
"scenic/model_lib/layers/tests/test_nn_layers.py"
] | [
"# Copyright 2022 The Scenic Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or... | [
[
"numpy.random.normal",
"numpy.testing.assert_allclose",
"numpy.asarray"
]
] |
twiecki/edward | [
"1ac2eeb7f5163915848afd3b027c714255459de3",
"85f833d307512a585b85ebc2979445e17191ed81"
] | [
"tests/test_pythonmodel.py",
"tests/test_get_dims.py"
] | [
"import numpy as np\nimport tensorflow as tf\nimport pystan\n\nmodel_code = \"\"\"\n data {\n int<lower=0> N;\n int<lower=0,upper=1> y[N];\n }\n parameters {\n real<lower=0,upper=1> theta;\n }\n model {\n theta ~ beta(0.5, 0.5); // Jeffreys' prior\n for (n in 1:N)\n y... | [
[
"tensorflow.py_func",
"numpy.array",
"tensorflow.placeholder",
"tensorflow.InteractiveSession"
],
[
"tensorflow.constant",
"tensorflow.zeros"
]
] |
talcron/frame-prediction-pytorch | [
"1a2fcc56c89ff031c2eba0547c5c898c6f8c3eab"
] | [
"utils/matrix_sqrt.py"
] | [
"\"\"\"\nMatrix square root and its gradient on the GPU\nAuthor: Subhransu Maji (smaji@cs.umass.edu)\nDate: Dec 19, 2017\n\nPort to python 3.8, pytorch 1.7\nAuthor: Ian Pegg\nDate: Mar 5, 2021\n\"\"\"\nimport torch\n\n__all__ = ['sqrt_svd_lyap', 'sqrt_denman_beavers', 'sqrt_newton_schulz', 'sqrt_newton_schulz_autog... | [
[
"torch.zeros",
"torch.sqrt",
"torch.eye",
"torch.ones"
]
] |
hctpbl/pytrends-httpx | [
"59fe1f333d2456943d703761233f3d587a361ada"
] | [
"tests/test_trendReq.py"
] | [
"import json\nfrom unittest.mock import patch\n\nimport pandas.api.types as ptypes\nimport proxy\nfrom aiounittest import futurized, AsyncTestCase\nfrom httpx import Response, Headers, ProxyError, AsyncClient\nfrom tenacity import RetryError\n\nfrom pytrends_httpx.request import TrendReq\n\nTIMEOUT = 30\n\n\nclass ... | [
[
"pandas.api.types.is_bool_dtype"
]
] |
cybersplines/HThumb | [
"803b96b9103cf6f437c6f784284f26f45d69ee0f"
] | [
"src/HThumb.py"
] | [
"from tkinter import *\nfrom tkinter import filedialog, messagebox, ttk\nimport os\nimport cv2\nimport numpy as np\nimport shlex\nimport subprocess\nimport time\n\nroot = Tk()\n\nroot.attributes('-toolwindow', True)\nroot.resizable(False, False)\nroot.title(\"HThumb by @vladlearns\")\nroot.geometry(\"500x300\")\n\n... | [
[
"numpy.uint16"
]
] |
gertsfert/au_weather | [
"4fc7272ef5d76e81edaef4a16a596d210e217ca7",
"4fc7272ef5d76e81edaef4a16a596d210e217ca7"
] | [
"notebooks/stations_and_measurements.py",
"notebooks/clean_stations.py"
] | [
"# %% [markdown]\n# # Stations and Measurements\n# Aim is to see if the `stations` dataset can be combined with the `weatherAus`\n# dataset\n# Will allow for location analysis among other lovely things\n\nimport pandas as pd\n\nfrom fuzzywuzzy import fuzz\nfrom fuzzywuzzy import process\n\nstations = pd.read_csv(r'... | [
[
"pandas.DataFrame",
"pandas.read_csv"
],
[
"pandas.DataFrame"
]
] |
pulkit-30/Face-Recognition | [
"7919f3de956d35f4af9f9893f462237ae3f1e87d"
] | [
"Live-Recognizer/Face_Recognize.py"
] | [
"\nimport cv2 as cv\nimport numpy as np\nimport os\n\nhaar = cv.CascadeClassifier('../haarcascade_frontalface_default.xml')\n\nface_recognizer = cv.face.LBPHFaceRecognizer_create()\nface_recognizer.read('./face_trained.yml')\n\npeoples = np.load('./peoples.npy')\n\ncapture = cv.VideoCapture(0)\n\nwhile True:\n i... | [
[
"numpy.load"
]
] |
Koziev/word_embedders | [
"bcc1539739873421a9103c6e030a72395614ee9d"
] | [
"py/experiments_with_wordchar_vae.py"
] | [
"\"\"\"\nЭксперименты с моделью вариационного автоэнкодера для символьного представления слов.\nПредполагается, что модель уже обучена с помощью wordchar_vae.py и ее файлы лежат в ../tmp/wordchar_vae\n\"\"\"\n\nimport os\nimport io\nimport pickle\nimport re\nimport random\nimport collections\n\nimport matplotlib.py... | [
[
"matplotlib.pyplot.annotate",
"numpy.zeros",
"numpy.copy",
"sklearn.manifold.TSNE",
"matplotlib.pyplot.figure",
"numpy.argmax",
"sklearn.metrics.pairwise.cosine_similarity",
"numpy.expand_dims",
"numpy.linspace",
"numpy.vstack"
]
] |
shabnamsadegh/ContrastiveLosses4VRD | [
"087155be67f37bd541b63c7ed0ad59e5dadb1596"
] | [
"lib/datasets_rel/json_dataset_rel.py"
] | [
"# Adapted from Detectron.pytorch/lib/datasets/json_dataset.py\n# for this project by Ji Zhang, 2019\n#-----------------------------------------------------------------------------\n# Copyright (c) 2017-present, Facebook, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.empty",
"numpy.zeros",
"numpy.minimum",
"numpy.sum",
"numpy.ones",
"numpy.tile",
"numpy.where",
"numpy.arange",
"numpy.argsort",
"numpy.append",
"numpy.repeat",
"numpy.unique"
]
] |
danielgordon10/habitat-api-public | [
"f9efb9e2af4a2b5b2a0af765aea192b2275c4164"
] | [
"habitat/sims/habitat_simulator.py"
] | [
"#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom typing import List, Any, Optional\nfrom enum import Enum\n\nimport habitat\nimport habitat_sim\nimport n... | [
[
"numpy.array",
"numpy.iinfo",
"numpy.expand_dims",
"numpy.clip"
]
] |
blalterman/SolarWindPy | [
"c906f1ea1b833fedc717d906d14d2531e6c03d66"
] | [
"solarwindpy/core/vector.py"
] | [
"#!/usr/bin/env python\n\"\"\"A Vector class and subclasses.\n\n:py:class:`Vector` inherets :py:class:`~solarwindpy.core.Base`. The subclass\n:py:class:`BField:` inheretes :py:class:`Vector`.\n\"\"\"\nimport pdb # noqa: F401\nimport numpy as np\nimport pandas as pd\n\n\n# We rely on views via DataFrame.xs to reduc... | [
[
"pandas.Index",
"numpy.arctan2",
"pandas.set_option",
"pandas.concat"
]
] |
shidilrzf/Anti-exploration-RL | [
"1013a85b4b84656a06f86abee01c55a5e08272ee"
] | [
"scripts/run_policy.py"
] | [
"from rlkit.samplers.rollout_functions import rollout\nimport rlkit.torch.pytorch_util as ptu\nimport argparse\nimport torch\nimport uuid\nfrom rlkit.core import logger\nfrom rlkit.core.eval_util import get_generic_path_information\nimport pathlib\n\nfilename = str(uuid.uuid4())\n\n\ndef simulate_policy(args):\n ... | [
[
"torch.manual_seed",
"torch.cuda.is_available",
"torch.load"
]
] |
zgb0537/Multimodal-Fake-News-Detection-with-Textual-Visual-and-Semantic-Information | [
"032a727e18712ea5bff33d703649c0341d974b50"
] | [
"main.py"
] | [
"from numpy.random import seed\r\nseed(100)\r\nimport keras.callbacks as callbacks\r\nimport os, cv2\r\nimport tensorflow as tf\r\nimport numpy as np\r\nfrom keras.models import Model\r\nfrom keras.layers import Dense, Input, BatchNormalization, Dropout\r\nimport pickle\r\nfrom skimage import feature\r\nfrom scipy.... | [
[
"numpy.array",
"numpy.nan_to_num",
"numpy.random.seed",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.title",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.legend",
"numpy.save",
"numpy.load",
"scipy.spatial.distance.cosine",
"matplotlib.pyplot.ylabel",
"sklearn.mod... |
halilagin/d3studies | [
"fbcf50a845cd17bcb469a428afce9854b1b63971",
"fbcf50a845cd17bcb469a428afce9854b1b63971"
] | [
"backend/prog-hist/backend/src/code/test/playground/chapter04_10.py",
"backend/prog-hist/backend/src/code/test/playground/chapter02_27.py"
] | [
"import code.book_plots as bp\nimport code.gh_internal as gh\nimport matplotlib.pyplot as plt\nimport numpy as np;\nimport time \nfrom pylab import *\nfrom drawnow import drawnow, figure\nfrom filterpy.discrete_bayes import normalize\nfrom filterpy.discrete_bayes import predict\nfrom filterpy.discrete_bayes import ... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.plot",
"numpy.arange",
"matplotlib.pyplot.figure"
],
[
"numpy.array"
]
] |
danyal-s/seaborn | [
"102cf08f9e40ef7037daf4b3b60b94ee144dc5cb",
"e07c1f17a4a8c3cd1483616e68185f81f27dbc96"
] | [
"examples/structured_heatmap.py",
"examples/scatterplot_categorical.py"
] | [
"\"\"\"\nDiscovering structure in heatmap data\n=====================================\n\n_thumb: .4, .25\n\"\"\"\nimport pandas as pd\nimport seaborn as sns\nsns.set()\n\n# Load the brain networks example dataset\ndf = sns.load_dataset(\"brain_networks\", header=[0, 1, 2], index_col=0)\n\n# Select a subset of the n... | [
[
"pandas.Series"
],
[
"pandas.melt"
]
] |
pointe77/ai | [
"273b9235f3513e16c15e67312fef9b16f4e18982"
] | [
"src/rnn_long_char.py"
] | [
"from __future__ import print_function\n\nimport tensorflow as tf\nimport numpy as np\nfrom tensorflow.contrib import rnn\n\ntf.set_random_seed(777) # reproducibility\n\nsentence = (\"if you want to build a ship, don't drum up people together to \"\n \"collect wood and don't assign them tasks and work, ... | [
[
"tensorflow.set_random_seed",
"tensorflow.train.AdamOptimizer",
"tensorflow.contrib.layers.fully_connected",
"tensorflow.ones",
"tensorflow.Session",
"tensorflow.contrib.rnn.BasicLSTMCell",
"tensorflow.reshape",
"tensorflow.placeholder",
"numpy.argmax",
"tensorflow.nn.dynam... |
cceyda/kornia | [
"810e5189408cf97e81449e4a11454d803038a3f6"
] | [
"kornia/utils/image.py"
] | [
"from typing import Optional\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nfrom functools import wraps\n\n\ndef image_to_tensor(image: np.ndarray, keepdim: bool = True) -> torch.Tensor:\n \"\"\"Converts a numpy image to a PyTorch 4d tensor image.\n\n Args:\n image (numpy.ndarray): image o... | [
[
"torch.from_numpy"
]
] |
zxmeng/baselines_mod | [
"45bebeece3e5480fe1b5b339d5b645cdeae0432d"
] | [
"baselines/ddpg/training.py"
] | [
"import os\nimport time\nfrom collections import deque\nimport pickle\n\nfrom baselines.ddpg.ddpg import DDPG\nimport baselines.common.tf_util as U\n\nfrom baselines import logger\nimport numpy as np\nimport tensorflow as tf\nfrom mpi4py import MPI\n\n\ndef train(env, nb_epochs, nb_epoch_cycles, render_eval, reward... | [
[
"numpy.mean",
"tensorflow.train.Saver",
"numpy.abs",
"numpy.isscalar"
]
] |
TianhaoFu/MultiBench | [
"b174a3187124d6f92be1ff3b487eef292f7883bb",
"b174a3187124d6f92be1ff3b487eef292f7883bb",
"b174a3187124d6f92be1ff3b487eef292f7883bb"
] | [
"deprecated_examples_robust/multimedia/avmnist_gradient_blend_robust.py",
"deprecated_examples/multimedia/mmimdb_contrast.py",
"datasets/affect/get_raw_data.py"
] | [
"import sys\nimport os\nsys.path.append(os.path.dirname(os.path.dirname(os.getcwd())))\nfrom training_structures.gradient_blend import train, test\nfrom fusions.common_fusions import Concat\nfrom datasets.avmnist.get_data_robust import get_dataloader\nfrom unimodals.common_models import LeNet,MLP,Constant\nfrom tor... | [
[
"torch.load"
],
[
"torch.nn.BCEWithLogitsLoss",
"torch.load"
],
[
"numpy.array",
"numpy.stack",
"numpy.asarray",
"numpy.zeros"
]
] |
nicomon24/tensortrade | [
"870ae06a4440045edde4f5306e64264bd33d5b67"
] | [
"tensortrade/stochastic/processes/fbm.py"
] | [
"# Copyright 2020 The TensorTrade Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable l... | [
[
"pandas.to_datetime",
"pandas.DataFrame",
"pandas.date_range"
]
] |
monte-flora/scikit-explain | [
"23f9a952726dc0e69dfcdda2f8c7c27858aa9a11",
"d93ca4c77d1d47e613479ae36cc055ffaafea88c"
] | [
"skexplain/main/PermutationImportance/data_verification.py",
"skexplain/plot/base_plotting.py"
] | [
"\"\"\"These utilities are designed to check whether the given data and variable\nnames match the expected format. For the training or scoring data, we accept \neither a pandas dataframe with the target column indicated, two different \ndataframes, or two numpy arrays\"\"\"\n\nimport numpy as np\nimport pandas as p... | [
[
"numpy.array",
"numpy.arange"
],
[
"matplotlib.cm.ScalarMappable",
"matplotlib.colors.BoundaryNorm",
"matplotlib.pyplot.colorbar",
"matplotlib.ticker.MaxNLocator",
"matplotlib.ticker.AutoMinorLocator",
"numpy.nanpercentile",
"matplotlib.pyplot.savefig",
"matplotlib.pypl... |
BoData-Bot/openrec | [
"3d655d21b762b40d50e53cea96d7802fd49c74ad",
"3d655d21b762b40d50e53cea96d7802fd49c74ad"
] | [
"openrec/modules/extractions/sdae.py",
"openrec/utils/samplers/pointwise_sampler.py"
] | [
"from __future__ import print_function\nimport tensorflow as tf\nfrom termcolor import colored\nfrom openrec.modules.extractions import Extraction\nfrom openrec.modules.extractions import MultiLayerFC\n\nclass SDAE(Extraction):\n\n \"\"\"\n The SDAE module implements Stacked Denoising Autoencoders [bn]_. It o... | [
[
"tensorflow.variable_scope"
],
[
"numpy.zeros"
]
] |
vidalmaxime/automl | [
"c4fb2f91d82b29c1116908f86a65a74c8836b2e2",
"c4fb2f91d82b29c1116908f86a65a74c8836b2e2"
] | [
"efficientdet/keras/eval.py",
"efficientdet/keras/util_keras.py"
] | [
"# Copyright 2020 Google Research. 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... | [
[
"tensorflow.distribute.MirroredStrategy",
"tensorflow.train.latest_checkpoint",
"tensorflow.config.experimental_connect_to_cluster",
"tensorflow.config.list_logical_devices",
"tensorflow.distribute.cluster_resolver.TPUClusterResolver",
"tensorflow.config.list_physical_devices",
"tensor... |
jingxiang-li/kaggle-yelp | [
"aa13aceef9745e4c0030a1e6eafe7f43cc582211",
"aa13aceef9745e4c0030a1e6eafe7f43cc582211"
] | [
"model/pic_level_ftr.py",
"feature_selection.py"
] | [
"from __future__ import division\nfrom __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport numpy as np\nimport argparse\nimport os\nfrom os import path\n\nfrom predict import get_level4_features\n\n\ndef parse_args():\n parser = argparse.Arg... | [
[
"numpy.zeros",
"numpy.sum",
"numpy.load",
"numpy.mean",
"numpy.std",
"numpy.argsort",
"numpy.hstack"
],
[
"sklearn.preprocessing.StandardScaler",
"numpy.random.seed",
"sklearn.cluster.KMeans",
"numpy.load",
"sklearn.pipeline.make_union",
"numpy.argsort",
... |
BIGWangYuDong/mmfewshot | [
"dac097afc92df176bc2de76b7c90968584865197"
] | [
"mmfewshot/detection/models/dense_heads/two_branch_rpn_head.py"
] | [
"# Copyright (c) OpenMMLab. All rights reserved.\nimport copy\nfrom typing import Dict, List, Optional, Tuple\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom mmcv.ops import batched_nms\nfrom mmcv.runner import force_fp32\nfrom mmcv.utils import ConfigDict\nfrom mmd... | [
[
"torch.cat",
"torch.nn.Conv2d",
"torch.ones_like",
"torch.zeros_like",
"torch.nn.functional.relu"
]
] |
SunHaozhe/modular-metalearning | [
"c94dd18c6d105f18667d4de7bb4c81fa538a541c"
] | [
"sum_composer.py"
] | [
"'''\nSubclass for the composition 'sum'\n'''\nfrom __future__ import print_function\nimport torch\nfrom composition import Composer\nfrom structure import Structure\nif torch.cuda.is_available():\n torch.set_default_tensor_type('torch.cuda.FloatTensor')\n nn_device='cuda:0'\nelse:\n torch.set_default_tensor_typ... | [
[
"torch.device",
"torch.set_default_tensor_type",
"torch.cuda.is_available",
"torch.stack"
]
] |
AbdelrhmanBassiouny/dl_utils | [
"7977a4c92c3430fcd581f8d0ac7aa8dc291cee23"
] | [
"common_utils/ml_analytics.py"
] | [
"import copy\nimport numpy as np\nimport matplotlib.pyplot as plt\n\ndef get_common_idxs(a, b, a_not_in_b=False):\n common_idxs = []\n if a_not_in_b:\n idxs_of_a_not_in_b = np.ones_like(a, dtype=bool)\n for i, a_val in enumerate(a):\n for j, b_val in enumerate(b):\n if a_val == b_v... | [
[
"matplotlib.pyplot.subplot",
"numpy.ones_like",
"numpy.random.choice",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.imshow",
"numpy.unique",
"numpy.flatnonzero"
]
] |
mondeja/waves | [
"87b830fdb963c28dd055cc55ee09826c9df2302b"
] | [
"tests/test_io/test_from_dataframes.py"
] | [
"\"\"\"Tests for ``from_dataframes`` generator class method.\"\"\"\n\nimport numpy as np\nimport pytest\n\nfrom waves import Sound\n\n\n@pytest.mark.parametrize(\n \"explicit_n_frames\",\n (True, False),\n ids=(\"explicit `n_frames` kwarg\", \"implicit `n_frames` kwarg\"),\n)\ndef test_from_dataframes_mono... | [
[
"numpy.array_equal"
]
] |
mwatts/polars | [
"2f26a0b80abdc159a3f408de00065fceedce2eb5"
] | [
"py-polars/tests/test_datelike.py"
] | [
"from datetime import date, datetime, timedelta\n\nimport numpy as np\nimport pyarrow as pa\nimport pytest\n\nimport polars as pl\n\n\ndef test_fill_null() -> None:\n dt = datetime.strptime(\"2021-01-01\", \"%Y-%m-%d\")\n s = pl.Series(\"A\", [dt, None])\n\n for fill_val in (dt, pl.lit(dt)):\n out =... | [
[
"numpy.array"
]
] |
SarahMorgan/NLP_psychosis | [
"671c2750b41d66a8fa521b522d8590a1c9f9d25e"
] | [
"code/get_measures.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCode to calculate NLP measures from a speech excerpt, as in Morgan et al 2021:\nhttps://doi.org/10.1101/2021.01.04.20248717\nCalculates NLP measures from basic_meas, coh_meas and tangent_meas and also plots the results as a spider plot.\nPlease cite the paper above if you use this ... | [
[
"numpy.array"
]
] |
rokity/nlpaug | [
"ac86a91696908b3e5ca13364a97d2802f954aea9"
] | [
"nlpaug/model/lang_models/roberta.py"
] | [
"import logging\n\ntry:\n import torch\n from transformers import AutoModelForMaskedLM, AutoTokenizer\nexcept ImportError:\n # No installation required if not using this function\n pass\n\nfrom nlpaug.model.lang_models import LanguageModels\nfrom nlpaug.util.selection.filtering import *\n\n\nclass Rober... | [
[
"torch.no_grad",
"torch.tensor"
]
] |
minister19/RL_pytorch_get_started | [
"e444f524a14d329f9a25c53f102bc96c4ea36ad8"
] | [
"5_rl_framework/rl_m19/network/nematode.py"
] | [
"import torch\nimport torch.nn as nn\nfrom rl_m19.network import core\n\n\nclass Nematode(nn.Module):\n def __init__(self, state_dim, action_dim, device=None):\n super().__init__()\n self.net = core.mlp((state_dim, state_dim // 2, action_dim), bias=False)\n self.to(device)\n\n def forward... | [
[
"torch.rand",
"torch.cuda.is_available"
]
] |
kosyachniy/dev | [
"39bb5c5ee10780bfcd8a59cf59cfb1a348ac52a4"
] | [
"ml/tensorflow/-/my5.py"
] | [
"import numpy as np\nimport tensorflow as tf\n\n#Данные\nwith open('data.csv', 'r') as f:\n\txxx=np.loadtxt(f, delimiter=',', skiprows=1)\nwith open('data.csv', 'r') as f:\n\tyyy=np.loadtxt(f, delimiter=',', skiprows=1).T[0].T\n\nxx=xxx.T\nfor i in range(len(xx[0])):\n\txx[0][i]=1\nxx=xx.T\n\nqw=[]\nfor i in yyy:\n... | [
[
"numpy.array",
"tensorflow.multiply",
"numpy.savetxt",
"tensorflow.Session",
"numpy.loadtxt",
"tensorflow.placeholder",
"tensorflow.global_variables_initializer",
"tensorflow.square",
"tensorflow.train.GradientDescentOptimizer"
]
] |
zhouhuanxiang/mmsr | [
"4d3f0d2cbfc4f259a2998655413330b4448c1056",
"4d3f0d2cbfc4f259a2998655413330b4448c1056"
] | [
"codes/repo/MGANet/MGANet.py",
"codes/utils/util.py"
] | [
"import torch\nimport torch.nn as nn\nfrom torch.nn.init import kaiming_normal\nimport repo.MGANet.BiConvLSTM as BiConvLSTM\nfrom models.base_model import BaseModel\n\n\ndef conv(batchNorm, in_planes, out_planes, kernel_size=3, stride=1):\n if batchNorm:\n return nn.Sequential(\n nn.Conv2d(in_p... | [
[
"torch.cat",
"torch.stack",
"torch.nn.LeakyReLU",
"torch.nn.ConvTranspose2d",
"torch.nn.BatchNorm2d",
"torch.nn.init.kaiming_normal",
"torch.clamp",
"torch.nn.Conv2d"
],
[
"numpy.array",
"torch.cuda.manual_seed_all",
"numpy.zeros",
"numpy.squeeze",
"numpy.ra... |
L-sky/Master_Thesis | [
"609e3b1c81dfb2e13d86df106d81e2e56d32488d"
] | [
"e3_layer/persistent_point/periodic_convolution.py"
] | [
"import torch\nimport torch.nn as nn\n\nif torch.cuda.is_available():\n from se3cnn import pconv_with_kernel\n\n\nclass PeriodicConvolutionWithKernel(nn.Module):\n def __init__(self, data_hub, number_of_the_layer):\n super().__init__()\n self.data_hub = data_hub\n self.n = number_of_the_l... | [
[
"torch.cuda.is_available"
]
] |
space-physics/apexpy | [
"a27b085d596f90e5cda78a39f4e6c6a5f7f68baa"
] | [
"src/apexpy/helpers.py"
] | [
"# -*- coding: utf-8 -*-\n\n\"\"\"This module contains helper functions used by :class:`~apexpy.Apex`.\"\"\"\n\nfrom __future__ import division, print_function, absolute_import\n\nimport time\nimport datetime as dt\nimport numpy as np\n\n\ndef checklat(lat, name='lat'):\n \"\"\"Makes sure the latitude is inside ... | [
[
"numpy.deg2rad",
"numpy.sin",
"numpy.isclose",
"numpy.float64",
"numpy.radians",
"numpy.isscalar",
"numpy.cos",
"numpy.all",
"numpy.floor"
]
] |
vatch123/metrics | [
"1841cad3839f5d1907a1bb8bb6a266de5c5333f9"
] | [
"tests/image/test_fid.py"
] | [
"# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law... | [
[
"torch.cat",
"torch.manual_seed",
"torch.randint",
"torch.cuda.is_available",
"torch.tensor",
"torch.zeros_like",
"torch.randn"
]
] |
bvorapoom/DSCI510_FinalProject | [
"babdf25ec28589c76ac3485836756af848e61a0f"
] | [
"src/cnn_web_scraper.py"
] | [
"from bs4 import BeautifulSoup\nimport requests\nimport re\nimport pandas as pd\nimport argparse\n\n\n\ndef get_html_from_url(url):\n ''' get soup from input url\n params:\n url : str, url of the web that will get soup from\n returns: \n BeautifulSoup object\n '''\n try:\n conten... | [
[
"pandas.DataFrame",
"pandas.read_csv"
]
] |
Robert-JunWang/pytorch-image-models | [
"7c67d6aca992f039eece0af5f7c29a43d48c00e4"
] | [
"timm/models/layers/classifier.py"
] | [
"\"\"\" Classifier head and layer factory\n\nHacked together by / Copyright 2020 Ross Wightman\n\"\"\"\nfrom torch import nn as nn\nfrom torch.nn import functional as F\n\nfrom .adaptive_avgmax_pool import SelectAdaptivePool2d\n\n\ndef _create_pool(num_features, num_classes, pool_type='avg', use_conv=False):\n f... | [
[
"torch.nn.Linear",
"torch.nn.Identity",
"torch.nn.Conv2d",
"torch.nn.Flatten"
]
] |
google/qkeras | [
"a714b04a7a8e574fc07335dc0baace3c66110435"
] | [
"qkeras/qnormalization.py"
] | [
"# Copyright 2019 Google LLC\n#\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agree... | [
[
"tensorflow.python.ops.math_ops.cast",
"tensorflow.python.framework.smart_cond.smart_constant_value",
"tensorflow.python.framework.smart_cond.smart_cond",
"tensorflow.keras.regularizers.serialize",
"tensorflow.python.framework.ops.convert_to_tensor",
"tensorflow.python.ops.array_ops.size",... |
bptripp/grasp-conv | [
"738b5fed1145e223b50eef45d30948aa21f64d7f"
] | [
"py/plots.py"
] | [
"__author__ = 'bptripp'\n\nimport cPickle\nimport csv\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom mpl_toolkits.mplot3d import axes3d, Axes3D\nfrom data import get_prob_label, get_points\nfrom depthmap import rot_matrix, loadOBJ\n\ndef export_overlap_results():\n with open('o-predict.pkl', 'rb') as... | [
[
"numpy.array",
"numpy.dot",
"numpy.random.rand",
"numpy.minimum",
"numpy.min",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.show"
]
] |
abhinavmuta/compyle | [
"42a78685bdb5f1ee95c23b48503e6954c5d6efff"
] | [
"compyle/tests/test_parallel.py"
] | [
"from math import sin\nimport unittest\nimport numpy as np\n\nfrom pytest import importorskip\n\nfrom ..config import get_config, use_config\nfrom ..array import wrap\nfrom ..types import annotate\nfrom ..parallel import Elementwise, Reduction, Scan\nfrom .test_jit import g\n\nMY_CONST = 42\n\n\n@annotate(x='int', ... | [
[
"numpy.zeros_like",
"numpy.sin",
"numpy.zeros",
"numpy.testing.assert_equal",
"numpy.testing.assert_almost_equal",
"numpy.arange",
"numpy.random.randint",
"numpy.sort",
"numpy.cumsum",
"numpy.linspace",
"numpy.unique"
]
] |
yeatmanlab/BrainTools | [
"890db4256b0290918045e53cd3c6fd6197fcbb4e",
"890db4256b0290918045e53cd3c6fd6197fcbb4e"
] | [
"projects/NLR_MEG/connectivity_areas_session1_ROI_3.py",
"experiments/wordsMEG/ShowImages_dotwithimage_words_revised.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Nov 15 12:05:40 2016\n\n@author: sjjoo\n\"\"\"\n#%%\nimport sys\nimport mne\nimport matplotlib.pyplot as plt\nimport imageio\nfrom mne.utils import run_subprocess, logger\nimport os\nfrom os import path as op\nimport copy\nimport shutil\nimport numpy as np\nfrom nump... | [
[
"numpy.divide",
"numpy.logical_not",
"numpy.array",
"numpy.empty",
"matplotlib.pyplot.figure",
"numpy.flipud",
"numpy.where",
"numpy.transpose",
"numpy.arange",
"matplotlib.pyplot.show",
"numpy.append",
"matplotlib.pyplot.clf",
"matplotlib.pyplot.subplot"
],
... |
kungfumas/American-Sign-Language | [
"393ba1ba066a3e3e4a60076415fba902649121b3"
] | [
"yolov5/train.py"
] | [
"import argparse\nimport glob\nimport logging\nimport math\nimport os\nimport random\nimport shutil\nimport time\nfrom pathlib import Path\n\nimport numpy as np\nimport torch.distributed as dist\nimport torch.nn.functional as F\nimport torch.optim as optim\nimport torch.optim.lr_scheduler as lr_scheduler\nimport to... | [
[
"numpy.concatenate",
"numpy.array",
"torch.cuda.amp.autocast",
"numpy.zeros",
"torch.distributed.destroy_process_group",
"torch.distributed.init_process_group",
"torch.nn.functional.interpolate",
"torch.optim.SGD",
"torch.optim.Adam",
"torch.nn.parallel.DistributedDataParal... |
gdicker1/poet | [
"388a239d957e719eff1e774f5a8587496ca15474"
] | [
"poet_distributed/reproduce_ops.py"
] | [
"# Copyright (c) 2020 Uber Technologies, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | [
[
"numpy.round",
"numpy.random.RandomState"
]
] |
Cognixion-inc/brainflow | [
"7a1ce71e59aa88fca18225ac10b5602ccc46c87c"
] | [
"tests/python/eeg_metrics_ci.py"
] | [
"import argparse\nimport time\nimport brainflow\nimport numpy as np\n\nfrom brainflow.board_shim import BoardShim, BrainFlowInputParams, LogLevels, BoardIds,BrainFlowError\nfrom brainflow.data_filter import DataFilter, FilterTypes, AggOperations, WindowFunctions, DetrendOperations\nfrom brainflow.ml_model import ML... | [
[
"numpy.concatenate"
]
] |
angelicagardner/ensemble-cnn-deepfakes-detection | [
"8740d2317848250249c741e0af5c4cbbe2d8af46"
] | [
"models/Ictu_Oculi.py"
] | [
"\"\"\"\nIn Ictu Oculi: Exposing AI Created Fake Videos by Detecting Eye Blinking\nIEEE International Workshop on Information Forensics and Security (WIFS), 2018\nYuezun Li, Ming-ching Chang and Siwei Lyu\n\"\"\"\nfrom deep_base import ops as net_ops\nfrom deep_base import vgg16 as base\nimport tensorflow as tf\nim... | [
[
"tensorflow.reshape",
"tensorflow.nn.softmax",
"tensorflow.cast",
"tensorflow.trainable_variables",
"tensorflow.losses.get_total_loss",
"tensorflow.constant",
"tensorflow.variable_scope",
"tensorflow.nn.dynamic_rnn",
"tensorflow.nn.dropout",
"tensorflow.range",
"tensorf... |
PanosIs/hero-graph | [
"a3bb77dc96df67ae9511e64efda3ce59638ee5a1"
] | [
"src/network/graph.py"
] | [
"import numpy\nfrom src.utils.data_utils import get_match_dataset\nfrom sklearn.preprocessing import normalize\n\nnumpy.set_printoptions(threshold=numpy.nan, precision=2, suppress = True)\n\nclass Draft_Graph_Network:\n def __init__(self, hero_pool_size : int, learning_rate : float):\n self.connections = ... | [
[
"numpy.outer",
"numpy.set_printoptions",
"numpy.full",
"numpy.fill_diagonal"
]
] |
ajabri/gym-minigrid | [
"fdb30c8da6faca4e8a5aac4a9d69384e2d3edbee"
] | [
"gym_minigrid/wrappers.py"
] | [
"import math\nimport operator\nfrom functools import reduce\n\nimport numpy as np\nimport gym\nfrom gym import error, spaces, utils\nfrom .minigrid import OBJECT_TO_IDX, COLOR_TO_IDX, STATE_TO_IDX\n\nclass ReseedWrapper(gym.core.Wrapper):\n \"\"\"\n Wrapper to always regenerate an environment with the same se... | [
[
"numpy.divide",
"numpy.array",
"numpy.zeros",
"numpy.split",
"numpy.arctan"
]
] |
sladesha/models | [
"9264e8cebb0219a9cd765511b8a7c9236f0b1da8"
] | [
"fluid/neural_machine_translation/transformer/train.py"
] | [
"import os\nimport numpy as np\n\nimport paddle\nimport paddle.fluid as fluid\n\nfrom model import transformer, position_encoding_init\nfrom optim import LearningRateScheduler\nfrom config import TrainTaskConfig, ModelHyperParams, pos_enc_param_names, \\\n encoder_input_data_names, decoder_input_data_names, ... | [
[
"numpy.array",
"numpy.ones",
"numpy.tile",
"numpy.triu",
"numpy.mean"
]
] |
f-koehler/mlxtk | [
"373aed06ab23ab9b70cd99e160228c50b87e939a",
"373aed06ab23ab9b70cd99e160228c50b87e939a"
] | [
"mlxtk/systems/sqr/bosonic.py",
"mlxtk/scripts/plot/natpop.py"
] | [
"from abc import ABC, abstractmethod\nfrom typing import List\n\nimport numpy\nfrom QDTK.SQR.Primitive import SQRDvrBosonic\n\nfrom mlxtk import dvr\nfrom mlxtk.log import get_logger\nfrom mlxtk.parameters import Parameters\nfrom mlxtk.tasks import OperatorSpecification\n\n\nclass BosonicSQR(ABC):\n def __init__... | [
[
"numpy.exp"
],
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots"
]
] |
bryanwweber/OpenPNM | [
"0547b5724ffedc0a593aae48639d36fe10e0baed"
] | [
"openpnm/topotools/topotools.py"
] | [
"import scipy as sp\nimport scipy.ndimage as spim\nimport scipy.sparse as sprs\nimport warnings\nimport porespy as ps\nfrom scipy.sparse import csgraph\nfrom openpnm.utils import PrintableDict, logging, Workspace\nws = Workspace()\nlogger = logging.getLogger(__name__)\n\n\ndef find_neighbor_sites(sites, am, flatten... | [
[
"scipy.cross",
"scipy.hstack",
"scipy.sparse.csgraph.connected_components",
"scipy.where",
"scipy.ones_like",
"scipy.sin",
"scipy.split",
"scipy.copy",
"scipy.in1d",
"scipy.sparse.triu",
"scipy.concatenate",
"scipy.arctan",
"scipy.sparse.csgraph.dijkstra",
"... |
stephenllh/bcs-unet | [
"be534a25e28cbe3501278d0ee6e2417b2cd737d3",
"be534a25e28cbe3501278d0ee6e2417b2cd737d3"
] | [
"src/model/upsamplenet.py",
"src/benchmark/reconnet/inference_spi.py"
] | [
"from torch import nn\nfrom torch.nn import functional as F\nfrom model.layers import SNConv2d\n\n\nclass ReshapeNet(nn.Module):\n \"\"\"The \"initial reconstruction network\" of SCSNet\"\"\"\n\n def __init__(self, in_channels, block_size=4):\n super().__init__()\n self.block_size = block_size\n... | [
[
"torch.nn.BatchNorm2d",
"torch.nn.ConvTranspose2d",
"torch.nn.functional.interpolate",
"torch.nn.ReLU",
"torch.nn.Conv2d"
],
[
"torch.FloatTensor",
"numpy.load"
]
] |
uk-gov-mirror/ONSdigital.companies-house-big-data-project | [
"be74293b4398976696d07c6b2329d6121c9e5c6a"
] | [
"experimental_scripts/table_reader/doc_ai_parser.py"
] | [
"from google.cloud import documentai_v1beta3 as documentai\nfrom google.oauth2 import service_account\nimport gcsfs\nimport pandas as pd\nimport math\n\n\nclass DocParser:\n\n def __init__(self, fs):\n self.document = None\n self.token_df = None\n self.fs = fs\n\n @staticmethod\n def g... | [
[
"pandas.DataFrame.from_dict"
]
] |
d4rk-lucif3r/Machine-Learning-Models | [
"403c7a2a37420f1ce99985422fb44e2c330742f5"
] | [
"Regression/SupportVector Regression/support_vector_regression.py"
] | [
"# Support Vector Regression (SVR)\n# Importing the libraries\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport pandas as pd\n# Importing the dataset\ndataset = pd.read_csv('Position_Salaries.csv')\nX = dataset.iloc[:, 1:-1].values\ny = dataset.iloc[:, -1].values\nprint(X)\nprint(y)\ny = y.reshape(len(y)... | [
[
"sklearn.preprocessing.StandardScaler",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.title",
"sklearn.svm.SVR",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.show",
"pandas.read_csv"
]
] |
msaddler/pitchnet | [
"8e26034be177deff7447ade7f782a4a9581c2188",
"8e26034be177deff7447ade7f782a4a9581c2188"
] | [
"assets_datasets/dataset_util.py",
"assets_datasets/stimuli_generate_BernsteinOxenhamEqualAmpHarmonicsInTENoise.py"
] | [
"import os\nimport sys\nimport glob\nimport h5py\nimport warnings\nimport numpy as np\n\n\ndef get_dataset_paths_from_hdf5(f):\n '''\n Helper function to get list of paths to all h5py.Dataset objects in an open h5py.File object.\n '''\n hdf5_dataset_key_list = []\n def get_dataset_paths(name, node):\... | [
[
"numpy.array",
"numpy.isnan",
"numpy.log",
"numpy.min",
"numpy.digitize",
"numpy.arange",
"numpy.power",
"numpy.argwhere",
"numpy.all",
"numpy.issubdtype",
"numpy.log2"
],
[
"numpy.max",
"numpy.zeros_like",
"numpy.array",
"numpy.ones_like",
"nump... |
nikihowe/torchdiffeq | [
"6d717af9d4e836294be314a9610e3baee764e31b"
] | [
"examples/ode_demo.py"
] | [
"import os\nimport argparse\nimport time\nimport numpy as np\n\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\n\nimport pickle as pkl\n\nparser = argparse.ArgumentParser('ODE demo')\nparser.add_argument('--method', type=str, choices=['dopri5', 'adams'], default='dopri5')\nparser.add_argument('--d... | [
[
"torch.nn.Linear",
"torch.cuda.is_available",
"matplotlib.pyplot.draw",
"torch.vstack",
"torch.nn.init.constant_",
"torch.normal",
"torch.abs",
"torch.nn.init.normal_",
"torch.tensor",
"numpy.arange",
"numpy.sqrt",
"torch.nn.Tanh",
"torch.linspace",
"matplot... |
ESA-PhiLab/AI4EO | [
"0c8a821c5465517f8481c15b954c83895ba1b1ab"
] | [
"ai4eo/utils.py"
] | [
"import gzip\nimport random\n\nimport numpy as np\nimport pandas as pd\nfrom keras.utils import Sequence\nfrom skimage.filters import gaussian\nfrom skimage.io import imread\nfrom skimage.transform import resize, rotate\nfrom sklearn.preprocessing import label_binarize\n\n\n__all__ = ['InputTargetSequence']\n\n\ncl... | [
[
"numpy.array",
"sklearn.preprocessing.label_binarize",
"numpy.load",
"numpy.clip",
"numpy.unique",
"numpy.fliplr"
]
] |
spyysalo/bert-wordvecs | [
"d0ee957242fcea5bdc07924f34db39463a5c1edf"
] | [
"getwv.py"
] | [
"#!/usr/bin/env python\n\nimport sys\nimport json\nimport numpy as np\n\nfrom logging import warning\n\n\nIGNORE = set(['[CLS]', '[SEP]'])\n\n\ndef argparser():\n from argparse import ArgumentParser\n ap = ArgumentParser()\n ap.add_argument('file', nargs='+', metavar='JSONL',\n help='BER... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.linalg.norm",
"numpy.mean"
]
] |
Fangyh09/s_t | [
"72bc9f7abfe937f46b7175c39d23acb914f6293d"
] | [
"model/base_model.py"
] | [
"import os\n\nimport tensorflow as tf\nfrom tensorflow.python import debug as tf_debug\n\nTF_DEBUG = False\n\nclass BaseModel(object):\n \"\"\"Generic class for general methods that are not specific to NER\"\"\"\n\n def __init__(self, config):\n \"\"\"Defines self.config and self.logger\n\n Args... | [
[
"tensorflow.train.latest_checkpoint",
"tensorflow.train.AdamOptimizer",
"tensorflow.contrib.framework.get_variables",
"tensorflow.clip_by_global_norm",
"tensorflow.Session",
"tensorflow.train.Saver",
"tensorflow.train.AdagradOptimizer",
"tensorflow.train.RMSPropOptimizer",
"ten... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.