repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
DMALab/TSplit | [
"8f86f987163aa06521bfeeb174616eb4a0a81b47"
] | [
"python/athena/gpu_ops/StreamExecutor.py"
] | [
"\"\"\" library to take autodiff and execute a computation graph \"\"\"\nfrom __future__ import absolute_import\nimport numpy as np\nfrom .Node import Op\nfrom .. import ndarray\nfrom ..stream import *\n\nimport ctypes\nimport os\nfrom pynvml import *\nFLAG_SHOW_GRAPH = False\nG_NODE_ID = 0\nNAME_RULE = 1\n\n\ndef ... | [
[
"numpy.empty"
]
] |
unnir/tensorflow | [
"656b2fe018a7940595121ea08d4a1ddf29fa65d0",
"656b2fe018a7940595121ea08d4a1ddf29fa65d0"
] | [
"tensorflow/contrib/distribute/python/keras_test.py",
"tensorflow/contrib/distribute/python/one_device_strategy_test.py"
] | [
"# Copyright 2016 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.random.rand",
"tensorflow.python.summary.writer.writer_cache.FileWriterCache.clear",
"tensorflow.python.keras.testing_utils.get_test_data",
"tensorflow.python.keras.layers.Dense",
"tensorflow.python.keras.layers.Masking",
"numpy.random.random",
"tensorflow.python.platform.test.m... |
topsun888/tensorflow | [
"bad7c50b9dc9789ad7dd0a62daca40b7269841ed",
"bad7c50b9dc9789ad7dd0a62daca40b7269841ed"
] | [
"tensorflow/contrib/learn/python/learn/monitors.py",
"tensorflow/contrib/learn/python/learn/basic_session_run_hooks.py"
] | [
"# Copyright 2016 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.training.saver.latest_checkpoint",
"tensorflow.core.util.event_pb2.SessionLog",
"tensorflow.python.platform.tf_logging.info",
"tensorflow.contrib.learn.python.learn.session_run_hook.SessionRunArgs",
"tensorflow.contrib.framework.deprecated_arg_values",
"tensorflow.python... |
marmus12/CornerView | [
"f76cd1cb4c402c59bafbf66b5e038c2d1ab9610b"
] | [
"epinet_fun/util.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Fri Dec 23 15:54:01 2018\n\n@author: shinyonsei2\n\"\"\"\n\nimport numpy as np\nimport imageio\n\n\n\ndef read_pfm(fpath, expected_identifier=\"Pf\"):\n # PFM format definition: http://netpbm.sourceforge.net/doc/pfm.html\n \n def _get_next_line(f):\n next... | [
[
"numpy.flipud",
"numpy.errstate",
"numpy.reshape",
"numpy.fromfile"
]
] |
sgbaird/automatminer | [
"9a3996e37672b547f10645b53b816ee670940d56"
] | [
"automatminer/utils/tests/test_pkg.py"
] | [
"\"\"\"\nAssorted package utils.\n\"\"\"\nimport os\nimport unittest\n\nimport pandas as pd\nfrom automatminer import __version__\nfrom automatminer.base import DFTransformer\nfrom automatminer.utils.pkg import (\n AMM_SUPPORTED_EXTS,\n check_fitted,\n compare_columns,\n get_version,\n save_dict_to_f... | [
[
"pandas.DataFrame"
]
] |
zysite/parser | [
"8ed9ccb8e542655fd6fd1b6f7faaf084d13a866e"
] | [
"supar/structs/fn.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport torch\nfrom supar.utils.common import MIN\nfrom supar.utils.fn import pad\nfrom torch.autograd import Function\n\n\ndef tarjan(sequence):\n r\"\"\"\n Tarjan algorithm for finding Strongly Connected Components (SCCs) of a graph.\n\n Args:\n sequence (list):\n ... | [
[
"torch.tensor",
"torch.clamp"
]
] |
Voda88/mlops | [
"412e95b6580e9820d4e57f93bd4c52ec877162eb"
] | [
"scripts/train_model.py"
] | [
"\"\"\"\nCopyright (C) Microsoft Corporation. All rights reserved.\n \nMicrosoft Corporation (“Microsoft”) grants you a nonexclusive, perpetual,\nroyalty-free right to use, copy, and modify the software code provided by us\n(\"Software Code\"). You may not sublicense the Software Code or any use of it\n(except to... | [
[
"sklearn.model_selection.train_test_split",
"sklearn.metrics.mean_squared_error",
"sklearn.linear_model.Ridge"
]
] |
jp2011/spatial-poisson-mixtures | [
"9e535a636e710a9fa146cbbd4613ece70ec90791"
] | [
"src/models/block_mixture_gp_softmax.py"
] | [
"import logging\nimport os\nimport pickle\nimport sys\nfrom pathlib import Path\n\nimport click\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\nimport zsampler\nfrom dotenv import load_dotenv, find_dotenv\nfrom scipy.special import logsumexp, softmax\n\nfrom src.inference.context_geo impo... | [
[
"numpy.dot",
"numpy.random.choice",
"numpy.load",
"numpy.exp",
"numpy.mean",
"numpy.min",
"numpy.multiply",
"numpy.where",
"pandas.read_csv",
"numpy.max",
"numpy.random.normal",
"scipy.special.softmax",
"scipy.special.logsumexp",
"numpy.save",
"numpy.ara... |
LiBinNLP/HOSDP | [
"f0806d1c27c9d5233002836e1825a1567891d928"
] | [
"supar/parsers/dep.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport os\n\nimport torch\nimport torch.nn as nn\nfrom supar.models import (BiaffineDependencyModel, CRF2oDependencyModel,\n CRFDependencyModel, VIDependencyModel)\nfrom supar.parsers.parser import Parser\nfrom supar.utils import Config, Dataset, Embedding\nfrom ... | [
[
"torch.no_grad",
"torch.cuda.is_available"
]
] |
chrwm/otoole | [
"f527eb1fdf75cc6872457a6e5145f678f5d34693"
] | [
"src/otoole/preprocess/narrow_to_datafile.py"
] | [
"import logging\nimport sys\nfrom abc import abstractmethod\nfrom typing import TextIO\n\nimport pandas as pd\nfrom datapackage import Package\nfrom pandas_datapackage_reader import read_datapackage\nfrom sqlalchemy import create_engine\n\nfrom otoole import read_packaged_file\n\nlogger = logging.getLogger(__name__... | [
[
"pandas.DataFrame",
"pandas.pivot_table",
"pandas.ExcelWriter"
]
] |
andrewellis55/OpenMDAO | [
"d01fd526e71add4a203b7d32c534e1eab07dafaf"
] | [
"openmdao/utils/general_utils.py"
] | [
"\"\"\"Some miscellaneous utility functions.\"\"\"\nfrom contextlib import contextmanager\nimport os\nimport re\nimport sys\nimport warnings\nimport unittest\nfrom fnmatch import fnmatchcase\nfrom io import StringIO\nfrom numbers import Number\n\n# note: this is a Python 3.3 change, clean this up for OpenMDAO 3.x\n... | [
[
"numpy.product",
"numpy.asarray",
"numpy.set_printoptions",
"numpy.sum",
"numpy.ones",
"numpy.get_printoptions",
"numpy.atleast_1d",
"numpy.isscalar",
"numpy.arange"
]
] |
Payal197bhadra/ComputerVision | [
"d66b5037ece99b6189dd4306b2c9be67cffd14af"
] | [
"OpenCV-Computer-Vision-Examples-with-Python-A-Complete-Guide-for-Dummies-master/Source Code/opencv/Affine Transformation/shearing.py"
] | [
"import cv2\nimport matplotlib.pyplot as plt\nimport numpy as np\nimg= cv2.imread(\"img.png\")\nimg=cv2.cvtColor(img, cv2.COLOR_BGR2RGB)\nplt.axis('off')\n# show the image\nplt.imshow(img)\nplt.show()\n\n# get the image shape\nrows, cols, dim = img.shape\nrows, cols, dim = img.shape\n# transformation matrix for She... | [
[
"numpy.float32",
"matplotlib.pyplot.show",
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.subplot"
]
] |
Droliven/MSRGCN | [
"5d8d8e3365d3b23ca2ac734ace7e84135a6e3a9e"
] | [
"run/cmu_runner.py"
] | [
"#!/usr/bin/env python\n# encoding: utf-8\n'''\n@project : MSRGCN\n@file : cmu_runner.py\n@author : Droliven\n@contact : droliven@163.com\n@ide : PyCharm\n@time : 2021-07-28 13:29\n'''\n\n\nfrom datas import CMUMotionDataset, get_dct_matrix, reverse_dct_torch, define_actions_cmu, draw_pic_gt_pred\nfrom n... | [
[
"torch.norm",
"torch.save",
"torch.no_grad",
"numpy.mean",
"torch.from_numpy",
"torch.utils.data.DataLoader",
"torch.load"
]
] |
SVJayanthi/DroneSimulation | [
"8fe52609cb367360729f16f4f6402faeadaf6b06"
] | [
"drone_2.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sun Mar 10 22:59:51 2019\n\n@author: Sravan\n\"\"\"\n\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Feb 14 22:36:21 2019\n\n@author: Sravan\n\"\"\"\nimport csv\nimport numpy as np\nfrom scipy.spatial.distance import pdist, squareform, euclidean, cdist\n\nimport matplo... | [
[
"numpy.linalg.norm",
"scipy.spatial.distance.pdist",
"numpy.asarray",
"numpy.random.standard_normal",
"numpy.random.seed",
"numpy.ones",
"numpy.where",
"numpy.clip",
"numpy.random.random",
"scipy.spatial.distance.cdist",
"numpy.cross"
]
] |
goktug97/DACBench | [
"953bc8efacdb993889b223110e25f7e453c86b2d"
] | [
"dacbench/envs/sgd.py"
] | [
"import math\nimport warnings\nfrom functools import reduce\n\nimport numpy as np\nimport torch\nfrom backpack import backpack, extend\nfrom backpack.extensions import BatchGrad\nfrom gym.utils import seeding\nfrom torchvision import datasets, transforms\n\nfrom dacbench import AbstractEnv\n\nwarnings.filterwarning... | [
[
"torch.nn.NLLLoss",
"torch.device",
"torch.cat",
"torch.zeros",
"torch.var",
"torch.sqrt",
"numpy.random.seed",
"torch.square",
"torch.no_grad",
"torch.ones",
"torch.manual_seed",
"torch.cuda.is_available",
"torch.matmul",
"torch.utils.data.DataLoader",
... |
jomavera/DRL_HFV | [
"043e32805ec79fd35281b864659c194d7b89f5bc"
] | [
"infer.py"
] | [
"import numpy as np\nfrom env import Env\nfrom models import PolicyNet, Critic\nfrom utils import one_hot\nimport torch\nfrom torch.optim import Adam\nimport time\nimport os\nfrom datetime import datetime\nimport math\n\ndevice = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')\n\n\n#-----------------... | [
[
"numpy.array",
"torch.stack",
"numpy.save",
"torch.cuda.is_available",
"torch.load",
"torch.argmax"
]
] |
TUM-LMF/fieldRNN | [
"5e9e17b170fe000ae15a73a276742aea84e6410b"
] | [
"evaluate.py"
] | [
"import tensorflow as tf\nimport cPickle as pickle\nimport rnn_model\nimport cnn_model\nfrom dataloader import Dataloader\nimport os\nimport datetime\nimport numpy as np\nimport argparse\nfrom cnn_model import unroll\n\ndef main():\n parser = argparse.ArgumentParser(description='Evaluate .')\n\n parser.add_ar... | [
[
"numpy.array",
"numpy.zeros",
"tensorflow.Session",
"tensorflow.train.Saver",
"numpy.ones",
"tensorflow.train.get_checkpoint_state",
"tensorflow.ConfigProto",
"numpy.arange",
"numpy.append"
]
] |
ohtaman/pynm | [
"b003962201e4270d0dab681ede37f2d8edd560f2"
] | [
"pynm/commands/metric.py"
] | [
"# -*- coding:utf-8 -*-\n\nimport csv\nimport fileinput\nimport sys\n\nimport numpy\n\nfrom pynm.feature.metric.itml import learn_metric, convert_data\n\n\nclass ItmlCommand:\n name = 'itml'\n help = 'Information Theoretic Metric Learning'\n\n @classmethod\n def build_arg_parser(cls, parser):\n p... | [
[
"numpy.diag"
]
] |
michaeldeistler/sbibm-1 | [
"b9781c610a1a80d2de014ee46a29cf061fb6074a"
] | [
"sbibm/third_party/kgof/test/test_goftest.py"
] | [
"\"\"\"\nModule for testing goftest module.\n\"\"\"\n\n__author__ = \"wittawat\"\n\nimport unittest\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport numpy.testing as testing\nimport scipy.stats as stats\n\nimport sbibm.third_party.kgof.data as data\nimport sbibm.third_party.kgof.density as density\nim... | [
[
"numpy.sqrt",
"numpy.random.randn",
"numpy.zeros",
"numpy.testing.assert_equal"
]
] |
deepmind/brave | [
"0ae20d9afcf6b1fa4d31d70c906d711901b56e9c"
] | [
"brave/evaluate_video_embeddings.py"
] | [
"# Copyright 2021 DeepMind Technologies Limited\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
[
"numpy.load",
"tensorflow.config.set_visible_devices"
]
] |
helkebir/Reachable-Set-Inner-Approximation | [
"4e05780b692214c26c76692f65f61d2f7f506e79"
] | [
"geometry_tools.py"
] | [
"import numpy as np\nfrom shapely import geometry\n\ndef shrink(coords: np.ndarray, dist: np.ndarray) -> tuple[np.ndarray]:\n \"\"\"Shrinks a 2D polygon by a given distance.\n\n The coordinates of the polygon are expected as an N x 2-matrix,\n and a positive distance results in inward shrinking.\n \n ... | [
[
"matplotlib.pyplot.show",
"numpy.genfromtxt",
"numpy.vstack",
"matplotlib.pyplot.subplot"
]
] |
miroozyx/Magin-Based-loss | [
"fedb43af495d60079fe87ecee8b4ad1c59e17cdc"
] | [
"loss.py"
] | [
"import tensorflow as tf\nfrom tensorflow.contrib.losses.python.metric_learning.metric_loss_ops import pairwise_distance\n\n\ndef dist_weighted_sampling(labels, embeddings, high_var_threshold=0.5, nonzero_loss_threshold=1.4, neg_multiplier=1):\n \"\"\"\n Distance weighted sampling.\n # References\n ... | [
[
"tensorflow.reduce_min",
"tensorflow.ones",
"tensorflow.logical_not",
"tensorflow.reshape",
"tensorflow.tile",
"tensorflow.cast",
"tensorflow.shape",
"tensorflow.transpose",
"tensorflow.range",
"tensorflow.expand_dims",
"tensorflow.log",
"tensorflow.reduce_sum",
... |
shirlevy007/IML.HUJI | [
"07e9db86f83925719242d20de52e65d2fe3786ce"
] | [
"IMLearn/learners/regressors/polynomial_fitting.py"
] | [
"from __future__ import annotations\nfrom typing import NoReturn\nfrom . import LinearRegression\nfrom ...base import BaseEstimator\nimport numpy as np\n# import linear_regression\n\n\nclass PolynomialFitting(BaseEstimator):\n \"\"\"\n Polynomial Fitting using Least Squares estimation\n \"\"\"\n def __i... | [
[
"numpy.vander"
]
] |
cscyuge/pointer-generator | [
"74b3b974e72209dc7a4045cabb758465998c920a"
] | [
"util_common/nlp/Sumy/summarizers/lsa.py"
] | [
"# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division, print_function, unicode_literals\n\nimport math\n\nfrom warnings import warn\n\ntry:\n import numpy\nexcept ImportError:\n numpy = None\n\ntry:\n from numpy.linalg import svd as singular_value_decomposition... | [
[
"numpy.max",
"numpy.zeros",
"numpy.linalg.svd"
]
] |
guillaumedavidphd/efit2d-pyopencl | [
"bf571f8de86aec710e92896e901322edc4ba31c1"
] | [
"EFIT2D_Classes.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\n@package EFIT2D_Classes\n\nSupport Library: efit2d-pyopencl\n\nManuscript Title: Optimized OpenCL implementation of the Elastodynamic Finite Integration Technique for viscoelastic media\n\nAuthors: M Molero, U Iturraran-Viveros, S Aparicio, M.G. Hernández \... | [
[
"numpy.max",
"numpy.array",
"numpy.zeros",
"numpy.copy",
"numpy.ones",
"numpy.hstack",
"numpy.exp",
"numpy.shape",
"numpy.roll",
"numpy.mean",
"numpy.min",
"numpy.arange",
"numpy.size",
"numpy.cos",
"numpy.int32",
"numpy.linspace",
"numpy.around"... |
xianruizhong/SpHAM | [
"c85a5fe023bd0d760eb42c896cd57ecc07014087"
] | [
"generate_exampleA.py"
] | [
"import numpy as np\ndef generate_A(filename1, filename2, noise = 'gau'):\n exp_T = 4000\n big_y_true_gau = []\n big_y_noise_gau = []\n big_y_true_t2 = []\n big_y_noise_t2 = []\n for times in range(100):\n y_true_gau = np.zeros((exp_T, 1, 1))\n y_true_gau[0] = np.random.rand()\n ... | [
[
"numpy.random.normal",
"numpy.sin",
"numpy.array",
"numpy.random.rand",
"numpy.zeros",
"numpy.random.standard_t"
]
] |
akashsengupta1997/GraphCMR | [
"0b8b05be4f711995ba50e414effbde98b6b11c5b"
] | [
"evaluate_3dpw_mine.py"
] | [
"import os\nimport numpy as np\nimport matplotlib\nmatplotlib.use('agg')\nimport matplotlib.pyplot as plt\nimport torch\nfrom torch.utils.data import DataLoader\nfrom tqdm import tqdm\nimport argparse\nimport cv2\n\nimport config\nfrom utils import Mesh\nfrom models import CMR\nfrom models.smpl_from_lib import SMPL... | [
[
"matplotlib.use",
"numpy.concatenate",
"torch.device",
"numpy.linalg.norm",
"numpy.sum",
"matplotlib.pyplot.savefig",
"numpy.load",
"matplotlib.pyplot.close",
"numpy.mean",
"matplotlib.pyplot.figure",
"torch.cuda.is_available",
"numpy.transpose",
"torch.utils.da... |
jamt9000/vision | [
"b6f28ec1a8c5fdb8d01cc61946e8f87dddcfa830",
"b6f28ec1a8c5fdb8d01cc61946e8f87dddcfa830",
"598b61d93357139cec558af6eff38a77ac60cabc"
] | [
"torchvision/extension.py",
"torchvision/models/quantization/googlenet.py",
"test/test_onnx.py"
] | [
"_HAS_OPS = False\n\n\ndef _register_extensions():\n import os\n import imp\n import torch\n\n # load the custom_op_library and register the custom ops\n lib_dir = os.path.dirname(__file__)\n _, path, _ = imp.find_module(\"_C\", [lib_dir])\n torch.ops.load_library(path)\n\n\ntry:\n _register... | [
[
"torch.ops.load_library",
"torch.ops.torchvision._cuda_version"
],
[
"torch.nn.Dropout",
"torch.quantization.QuantStub",
"torch.quantization.DeQuantStub",
"torch.nn.functional.adaptive_avg_pool2d",
"torch.nn.ReLU",
"torch.jit.is_scripting",
"torch.flatten",
"torch.nn.qu... |
iblamedom/kuenstliche-intelligenz | [
"733ecdcfcb561aa1b39854b1b3632c0fda07f841"
] | [
"tests/test_set_random_seed.py"
] | [
"import random\nimport unittest\nfrom typing import Tuple\n\nimport torch\nimport numpy as np\n\nfrom src.utilities import set_random_seed\n\n\n_RANDOM_SEED: int = random.randint(0, 100)\n_TEST_ARRAY_SIZE: Tuple[int, int] = (2, 2)\n_TEST_TENSOR_SIZE: Tuple[int, int] = (2, 2)\n\n\ndef _set_random_seed():\n set_ra... | [
[
"numpy.random.random",
"torch.rand"
]
] |
non778/examples | [
"d1eed1a6a987b0ebbb0341925a480dc3e60489ee"
] | [
"lite/examples/model_personalization/converter/tfltransfer/model_correctness_test.py"
] | [
"# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.keras.preprocessing.image.ImageDataGenerator",
"tensorflow.keras.utils.get_file",
"numpy.zeros",
"tensorflow.lite.Interpreter",
"tensorflow.keras.applications.MobileNetV2",
"numpy.float32",
"numpy.argmax",
"tensorflow.compat.v1.keras.experimental.export_saved_model"
]... |
marleneDebatin/flair | [
"4d17509f358158f66d43e85db1b6990523b0b095"
] | [
"flair/models/tars_model.py"
] | [
"import logging\nfrom collections import OrderedDict\nfrom pathlib import Path\nfrom typing import List, Optional, Set, Tuple, Union\n\nimport numpy as np\nimport torch\nfrom sklearn.metrics.pairwise import cosine_similarity\nfrom sklearn.preprocessing import minmax_scale\nfrom tqdm import tqdm\n\nimport flair\nfro... | [
[
"numpy.array",
"numpy.random.choice",
"numpy.sum",
"torch.no_grad",
"sklearn.metrics.pairwise.cosine_similarity",
"sklearn.preprocessing.minmax_scale",
"torch.argmax"
]
] |
Shivams9/pythoncodecamp | [
"3dcec5c529a0847df07c9dcc1424675754ce6376"
] | [
"ml/Graph/pieChart2.py"
] | [
"import pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\ndef f(x):\n return 1-x\ndata=pd.read_csv(\"test.csv\")\nprint(data)\nroll=data[\"Rollno\"]\nt1 =data[\"t1\"]\nt2 = data[\"t2\"]\nprint(roll,t1,t2)\nplt.pie(t1,labels=roll,autopct=\"%1.2f%%\")\n\nplt.title(\"Marks in test1\")\nplt.show()\n... | [
[
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.pie",
"matplotlib.pyplot.title",
"matplotlib.pyplot.ylim",
"numpy.linspace",
"matplotlib.pyplot.show",
"pandas.read_csv"
]
] |
flyingleafe/magenta | [
"2eb641e8f48c52e78d6b44fcbe9a7d168f787616"
] | [
"magenta/models/score2perf/score2perf.py"
] | [
"# Copyright 2020 The Magenta 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 o... | [
[
"tensorflow.compat.v1.reshape",
"tensorflow.compat.v1.VarLenFeature",
"tensorflow.compat.v1.data.Dataset.from_tensor_slices",
"tensorflow.compat.v1.stack",
"tensorflow.compat.v1.shape",
"tensorflow.compat.v1.expand_dims",
"tensorflow.compat.v1.mod",
"tensorflow.compat.v1.random_uni... |
sreecodeslayer/udemy-machine-learning | [
"11fb166358a29993ed352fb204ab79e04bd9c05e"
] | [
"00_DataPreprocessing/data_preprocessing_template.py"
] | [
"# Data Preprocessing Template\n\n# Importing the libraries\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport pandas as pd\n\n# Importing the dataset\ndataset = pd.read_csv('Data.csv')\nX = dataset.iloc[:, :-1].values\ny = dataset.iloc[:, 3].values\n\n# Splitting the dataset into the Training set and Tes... | [
[
"sklearn.model_selection.train_test_split",
"pandas.read_csv"
]
] |
KarlRong/Safe-RL-for-Driving | [
"67484911ca8ad9f1476e96043c379c01cd5ced8c"
] | [
"traci_pedestrian_crossing/movexy_ped.py"
] | [
"# the TestEnv environment is used to simply simulate the network\nfrom flow.envs import TestEnv\n\n# the Experiment class is used for running simulations\nfrom flow.core.experiment import Experiment\n\n# the base network class\nfrom flow.networks import Network\nfrom flow.envs.base import Env\n\n# all other import... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.linalg.norm",
"numpy.nditer",
"numpy.asarray",
"numpy.copy",
"numpy.finfo",
"numpy.clip"
]
] |
schreiber-lab/mlreflect | [
"88a80ccac48461cc8934a46041726b70e469c6b8"
] | [
"mlreflect/curve_fitter/minimizer.py"
] | [
"import numpy as np\nfrom scipy.optimize import curve_fit\n\nfrom ..data_generation import interp_reflectivity, ReflectivityGenerator\n\n\ndef q_shift_variants(q_values_prediction, q_values_input, corrected_reflectivity, n_variants, scale=0.001):\n \"\"\"Create ``n_variants`` interpolated reflectivity curve vari... | [
[
"numpy.random.normal",
"numpy.array",
"numpy.asarray",
"numpy.tile",
"numpy.mean",
"numpy.log10",
"numpy.atleast_2d"
]
] |
garethnisbet/T-BOTS | [
"70e211191cc6c713084836bff89241e811667378"
] | [
"Python/Development/T-Bot_Tracking/getHSVThresh.py"
] | [
"#!/usr/bin/env python\n\nimport cv2\nimport numpy as np\n# from scipy import ndimage\nmaskgridL = np.meshgrid(np.r_[0:359],np.r_[0:130])\nmaskgridR = np.meshgrid(np.r_[0:359],np.r_[639-130:639])\n\n# key value\n# cam.set(3 , 640) # width \n# cam.set(4 , 480) # height \n# cam.set(10, 120) # br... | [
[
"numpy.meshgrid"
]
] |
AleksiNummelin/coupled_channel | [
"0e96e54400bb853b8c42cfc55b968a476114dcef"
] | [
"coupled_channel/cutils.py"
] | [
"#from numba import jit\nimport numpy as np\n#from joblib import Parallel, delayed, parallel_backend\n#from joblib import load, dump\n#import tempfile\n#import shutil\n#import os\n#\n#import sys\n#sys.path.append('pyunicorn_timeseries')\n#from pyunicorn_timeseries.surrogates import Surrogates\n\ndef set_model_const... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.random.rand",
"numpy.zeros",
"numpy.sum",
"numpy.ones",
"numpy.tile",
"numpy.min",
"numpy.where",
"numpy.arange",
"numpy.cos",
"numpy.all"
]
] |
CactusJackFX/PyImageSearch_Guru | [
"01f5bce644b58848db029f72656002e21545bb10",
"01f5bce644b58848db029f72656002e21545bb10"
] | [
"Module_02_Building_Your_Own_Custom_Object_Detector/2.10_Re-Training_and_Running_your_Classifier/hard_negative_mine.py",
"Module_02_Building_Your_Own_Custom_Object_Detector/2.8_Non-Maxima_Suppression/test_model.py"
] | [
"# USAGE\n# python hard_negative_mine.py --conf conf/cars.json\n\n# import the necessary packages\nfrom __future__ import print_function\nfrom pyimagesearch.object_detection import ObjectDetector\nfrom pyimagesearch.descriptors import HOG\nfrom pyimagesearch.utils import dataset\nfrom pyimagesearch.utils import Con... | [
[
"numpy.hstack",
"numpy.array"
],
[
"numpy.array"
]
] |
qinchangping/tensorflow | [
"f7f7036d1cdc5716aff976fae0ea4d1b9a931b56"
] | [
"tensorflow/python/keras/_impl/keras/applications/mobilenet.py"
] | [
"# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.python.keras._impl.keras.layers.BatchNormalization",
"tensorflow.python.keras._impl.keras.layers.Reshape",
"tensorflow.python.keras._impl.keras.backend.relu",
"tensorflow.python.keras._impl.keras.utils.conv_utils.conv_output_length",
"tensorflow.python.keras._impl.keras.constraints... |
shism2/seqio | [
"63f96f1d29f7721af67d79c0265d7f937170ee20"
] | [
"seqio/dataset_providers_test.py"
] | [
"# Copyright 2022 The SeqIO 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 ... | [
[
"tensorflow.compat.v2.compat.v1.enable_eager_execution",
"tensorflow.compat.v2.data.Dataset.from_generator",
"tensorflow.compat.v2.data.Dataset.from_tensor_slices",
"tensorflow.compat.v2.cast",
"tensorflow.compat.v2.data.Dataset.from_tensors",
"tensorflow.compat.v2.constant"
]
] |
motokimura/solaris | [
"6a9c3962d987d985384d0d41a187f5fbfadac82c"
] | [
"solaris/tile/vector_tile.py"
] | [
"import os\nimport numpy as np\nfrom shapely.geometry import box, Polygon\nimport geopandas as gpd\nfrom ..utils.core import _check_gdf_load, _check_crs\nfrom ..utils.tile import save_empty_geojson\nfrom ..utils.geo import gdf_get_projection_unit, split_multi_geometries\nfrom ..utils.geo import reproject_geometry\n... | [
[
"numpy.round"
]
] |
MMV-Lab/cell_movie_analysis | [
"26ac844a79ee4978db26aea8fc1fc9bd6a19a2c0"
] | [
"run_tracking.py"
] | [
"import os\nimport numpy as np\nfrom glob import glob\nfrom scipy import optimize, spatial, ndimage\nfrom tifffile import imread, imsave\nfrom skimage.segmentation import find_boundaries\nfrom skimage.morphology import remove_small_objects\nfrom skimage.draw import line\nfrom utils import random_colormap\nimport pd... | [
[
"numpy.zeros",
"scipy.ndimage.label",
"numpy.ones",
"numpy.save",
"scipy.optimize.linear_sum_assignment",
"numpy.where",
"numpy.arange",
"scipy.spatial.distance.cdist"
]
] |
RadiotherapyAI/platipy | [
"53294789a3805ea088c9953027f4ab09a614f052",
"53294789a3805ea088c9953027f4ab09a614f052"
] | [
"platipy/dicom/io/crawl.py",
"platipy/imaging/projects/cardiac/run.py"
] | [
"# Copyright 2020 University of New South Wales, University of Sydney\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 ... | [
[
"numpy.array",
"numpy.any",
"numpy.where",
"numpy.alen",
"numpy.cross"
],
[
"numpy.product"
]
] |
zouning68/nlp_transfer_learning | [
"e5010c5022c6cb0944cdbaaee402fd6d918fad3f"
] | [
"xlnet-master/train_gpu.py"
] | [
"\"\"\"Pretraining on GPUs.\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os, sys\nimport math\nimport json\nimport time\nimport numpy as np\n\nfrom absl import flags\nimport absl.logging as _logging # pylint: disable=unused-import\n... | [
[
"tensorflow.trainable_variables",
"tensorflow.logging.set_verbosity",
"numpy.zeros",
"tensorflow.gfile.Exists",
"tensorflow.train.Saver",
"tensorflow.gradients",
"tensorflow.add_n",
"tensorflow.ConfigProto",
"tensorflow.gfile.MakeDirs",
"numpy.prod",
"tensorflow.placeho... |
onurerkin/prohack | [
"51665841de04de4a7d44a3aeacec8e9142110cea"
] | [
"src/models/dnn_regressor.py"
] | [
"from typing import Tuple, Union\n\nimport numpy as np\nimport pandas as pd\nimport tensorflow as tf\n\nfrom src.models.dnn_regressor_funcs import (\n _compile_model,\n _create_keras_model,\n _fit_model,\n _to_input_list,\n)\n\n\ndef predict(model: tf.keras.Model, X_test: pd.DataFrame, cate_cols: list) ... | [
[
"numpy.array"
]
] |
Vantoine2019/PCBS_experience_subitizing | [
"55bdbfdce4d53f71572ad4afc3942f0e8f84dd66"
] | [
"create_pictures.py"
] | [
"\n\"\"\"\n\nCréation des images pour la tâche de détermination numérique\n(pour évaluer l'impact de la configuration sur le subitizing)\nVictor ANTOINE - victor.antoine@ens.fr \n\n\"\"\"\n\nimport pygame\nfrom random import sample\nfrom numpy import random, sort\nfrom os import path\nfrom itertools import product\... | [
[
"numpy.random.randint",
"numpy.sort"
]
] |
MayurJ20/bigmart | [
"be0aab9908f9f4f3701b57936bfc2fe91c10eaca"
] | [
"bigmart.py"
] | [
"import pickle\r\nimport pandas as pd\r\nimport numpy as np\r\nimport seaborn as sns\r\nimport matplotlib.pyplot as plt\r\nimport warnings\r\nwarnings.filterwarnings('ignore')\r\n\r\ndf = pd.read_csv('Train.csv')\r\n\r\n# check for categorical attributes\r\ncat_col = []\r\nfor x in df.dtypes.index:\r\n if df.dty... | [
[
"sklearn.preprocessing.LabelEncoder",
"numpy.mean",
"sklearn.ensemble.RandomForestRegressor",
"pandas.Series",
"pandas.read_csv",
"sklearn.model_selection.cross_val_score"
]
] |
vutriancode/mfea_autoscaling | [
"9672ce16c8a4353e8234d536e35e0eb8d1b72673"
] | [
"lib/includes/utility.py"
] | [
"\"\"\"\n Author: thangbk2209\n Project: Autoscaling\n Created: 3/15/19 16:48\n Purpose:\n\"\"\"\n\nimport random\nimport os\n\nimport matplotlib\nimport matplotlib.pyplot as plt\nfrom sklearn.preprocessing import MinMaxScaler, StandardScaler\nimport tensorflow as tf\n\nfrom config import *\n\n\ndef draw_time_... | [
[
"tensorflow.train.AdamOptimizer",
"sklearn.preprocessing.StandardScaler",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.title",
"matplotlib.pyplot.close",
"matplotlib.pyplot.legend",
"tensorflow.train.MomentumOptimizer",
... |
gmberton/CosPlace | [
"0f03cc9fe25919c87627e92535f3693747617eae"
] | [
"commons.py"
] | [
"\nimport torch\nimport random\nimport numpy as np\n\n\nclass InfiniteDataLoader(torch.utils.data.DataLoader):\n def __init__(self, *args, **kwargs):\n super().__init__(*args, **kwargs)\n self.dataset_iterator = super().__iter__()\n \n def __iter__(self):\n return self\n \n def _... | [
[
"numpy.random.seed",
"torch.manual_seed",
"torch.cuda.manual_seed_all"
]
] |
12564985/DeFMO | [
"8ed9c2963678e2c59c7431ec8786302eea841572"
] | [
"renderer/render_fmo.py"
] | [
"\"\"\" render_fmo.py renders obj file to rgb image with fmo model\n\nAviable function:\n- clear_mash: delete all the mesh in the secene\n- scene_setting_init: set scene configurations\n- node_setting_init: set node configurations\n- render: render rgb image for one obj file and one viewpoint\n- render_obj: wrapper... | [
[
"numpy.max",
"numpy.array",
"scipy.signal.fftconvolve",
"numpy.zeros",
"numpy.median",
"numpy.sum",
"numpy.round",
"numpy.mean",
"numpy.logical_and",
"numpy.abs",
"numpy.linspace"
]
] |
hikjik/chainer | [
"20d4d70f5cdacc1f24f243443f5bebc2055c8f8e"
] | [
"chainer/training/updaters/multiprocess_parallel_updater.py"
] | [
"import multiprocessing\nimport warnings\n\nimport six\n\nfrom chainer.backends import cuda\nfrom chainer.dataset import convert\nfrom chainer import reporter\nfrom chainer.training.updaters import standard_updater\n\n\ntry:\n from cupy.cuda import nccl\n _available = True\nexcept Exception:\n _available =... | [
[
"numpy.empty",
"numpy.zeros"
]
] |
n-Holmes/deutscheflash | [
"1f974a3fffe771c0e552fa40123b27fa3f24674f"
] | [
"deutscheflash.py"
] | [
"\"\"\"A simple CLI app to practice grammatical genders of German nouns.\"\"\"\n\nimport argparse\nimport json\nimport pathlib\n\nimport pandas as pd\n\n\nclass WordList:\n \"\"\"Data structure to store a pandas dataframe and some structural details.\n \n Args:\n path (pathlib.Path or None): The pat... | [
[
"pandas.DataFrame",
"pandas.read_csv"
]
] |
thisisshi/sdk | [
"99c52caffeebbfd41f43931fea2b5b1323841892"
] | [
"python/avi/migrationtools/netscaler_converter/ns_util.py"
] | [
"import csv\nimport logging\nimport os\nimport copy\nimport re\nimport random\nfrom functools import reduce\n\nimport ast\nimport pandas\nimport pexpect\nimport avi.migrationtools.netscaler_converter.ns_constants as ns_constants\nfrom pkg_resources import parse_version\nfrom xlsxwriter import Workbook\nfrom openpyx... | [
[
"pandas.DataFrame",
"pandas.pivot_table",
"pandas.ExcelWriter"
]
] |
Exhorder6/tvm | [
"7e3f068373937c0ae08d58f67b84030a027db1c9",
"7e3f068373937c0ae08d58f67b84030a027db1c9"
] | [
"tutorials/autotvm/tune_relay_mobile_gpu.py",
"tests/python/relay/dyn/test_dynamic_op_level6.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.std",
"numpy.random.uniform",
"numpy.mean"
],
[
"numpy.array",
"numpy.zeros",
"numpy.random.seed",
"numpy.random.uniform",
"numpy.argsort"
]
] |
kanpurin/dctimagetransform | [
"b5950945922e4eafc17bb88fd28dfe5167ca3529"
] | [
"dct_image_transform/reflection.py"
] | [
"import numpy as np\nfrom dct_image_transform.dct import dct2\n\ndef reflection(image,axis=0):\n '''\n 8x8のブロックごとに離散コサイン変換された画像(以下DCT画像)を鏡像変換する.\n\n Parameters\n ----------\n image:幅と高さが8の倍数である画像を表す2次元配列. 8の倍数でない場合の動作は未定義.\n \n axis:変換する軸. defalutは`axis=0`\n\n Returns\n -------\n `imag... | [
[
"numpy.dot",
"numpy.zeros"
]
] |
donghwijung/LoRCoN-LO | [
"37d4f97d2ae01a2dca1d086579ca3efaab77553b"
] | [
"utils/plot.py"
] | [
"import os\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n# import sys, os\n# sys.path.append(os.path.join(os.path.dirname(__file__), 'utils'))\n\nimport process_data\nimport common\n\ndef plot_gt(Y_origin_data, pose_folder, preprocessed_folder, data_seqs, seq_sizes, dim=\"2d\", save_graph=True, dataset=... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.dot",
"numpy.zeros",
"matplotlib.pyplot.figure",
"numpy.identity",
"matplotlib.pyplot.scatter"
]
] |
scpyork/GladAlert | [
"6b8622ee9ff5d53186e2d7225b856a8855fe1da8"
] | [
"GLADalertTRASE/update_data/functions.py"
] | [
"\nfrom new_alerts import *\nfrom PIL import Image # $ pip install pillow\nfrom scipy import sparse\nimport numpy as np\nimport re\n\nImage.MAX_IMAGE_PIXELS = None\n\ndef download(keep,tempdir):\n #print keep\n #class rt:pass\n name = keep.split('/')[-1]\n area = re.findall(r'_(\\d+[NESW\\b])',name)\n ... | [
[
"scipy.sparse.coo_matrix"
]
] |
rockyplum/vampy-host | [
"a410d680be2c15d76e31488db789ed30e6f34910"
] | [
"test/test_process.py"
] | [
"\nimport vamp\nimport numpy as np\nimport vamp.frames as fr\n\nplugin_key = \"vamp-test-plugin:vamp-test-plugin\"\nplugin_key_freq = \"vamp-test-plugin:vamp-test-plugin-freq\"\n\nrate = 44100\n\n# Throughout this file we have the assumption that the plugin gets run with a\n# blocksize of 1024, and with a step of 1... | [
[
"numpy.arange"
]
] |
ACL2020-Submission/ACL2020 | [
"2a3d6e26d22c650cad823c68b65ee315aa1fe22c"
] | [
"onmt/utils/parse.py"
] | [
"import configargparse as cfargparse\r\nimport os\r\n\r\nimport torch\r\n\r\nimport onmt.opts as opts\r\nfrom onmt.utils.logging import logger\r\n\r\n\r\nclass ArgumentParser(cfargparse.ArgumentParser):\r\n def __init__(\r\n self,\r\n config_file_parser_class=cfargparse.YAMLConfigFileParser... | [
[
"torch.cuda.is_available"
]
] |
jona-sassenhagen/URIAL | [
"ed4e9cc99bac0a7ec8772ad72c3d85581be71de0"
] | [
"plot_mds_cond.py"
] | [
"def plot_mds_cond(rdm):\n '''function to visualize RDM via multidimensional scaling'''\n\n # big kudos to Jona Sassenhagen for doing an amazing job\n # adding condition names and colors to the mds plot\n\n # import modules and functions\n import numpy as np\n import pandas as pd\n import seabo... | [
[
"numpy.isinf",
"pandas.DataFrame",
"sklearn.decomposition.PCA",
"matplotlib.pyplot.tight_layout",
"numpy.abs",
"matplotlib.pyplot.show",
"pandas.read_csv",
"sklearn.manifold.MDS"
]
] |
mirtorande/grpf-tool | [
"5c20365366503f28d63f861f1b0326cf1dcdcd7e"
] | [
"visualize.py"
] | [
"#!/usr/bin/env python3\nfrom matplotlib.patches import Circle, Rectangle, ConnectionPatch\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom matplotlib import animation\nfrom math import floor\n\nColors = ['green', 'purple', 'orange', 'red', 'blue', 'yellow']\n\n\nclass Animation:\n def __init__(self, m... | [
[
"numpy.array",
"numpy.linalg.norm",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.figure",
"numpy.transpose",
"numpy.arange",
"matplotlib.pyplot.show",
"matplotlib.patches.Rectangle"
]
] |
msakai/chainer-differentiable-mpc | [
"dba5712f42a684748515d9ad5e2ff2823516c88e"
] | [
"examples/Boyd_lqr.py"
] | [
"# -*- coding: utf-8 -*-\n# ---\n# jupyter:\n# jupytext:\n# text_representation:\n# extension: .py\n# format_name: light\n# format_version: '1.4'\n# jupytext_version: 1.2.1\n# kernelspec:\n# display_name: Python 3\n# language: python\n# name: python3\n# ---\n\nimport sys\... | [
[
"matplotlib.pyplot.show",
"numpy.array",
"numpy.arange",
"matplotlib.pyplot.subplots"
]
] |
aivaras-ciurlionis/meteo | [
"434759d16f7cca505d280475611d1fef5176827b"
] | [
"src/predictionAlgorithms/machineLearning/helpers/callbacks.py"
] | [
"import keras\nfrom sklearn.metrics import roc_auc_score\nfrom src.predictionAlgorithms.machineLearning.helpers.validation import Validation\nimport matplotlib\nmatplotlib.use('agg')\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport os\nimport glob\n\nclass Callbacks(keras.callbacks.Callback):\n valid... | [
[
"matplotlib.use",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.close",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.ylabel"
]
] |
BuddenD/jax | [
"269da0ae584cfe840f34e9f871f13c28e2772de5"
] | [
"jax/experimental/jax2tf/tests/tf_test_util.py"
] | [
"# Copyright 2020 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.function"
]
] |
Raphael-C-Almeida/Wireless-Sensor-Network | [
"8d12b06ddec1b5f3da28fd9b94b43bc4ac4518cf",
"8d12b06ddec1b5f3da28fd9b94b43bc4ac4518cf"
] | [
"Data Fusion Test/Minimos Quadrados Puro.py",
"Data Fusion Test/Kalman Filter Com Memorizacao.py"
] | [
"import matplotlib.pyplot as plt\r\nimport numpy as np\r\n\r\ndef gen_data(n, start=0, end=10):\r\n x = np.linspace(start, end, n)\r\n y = np.sin(10*x) - x*x\r\n return y\r\n\r\ndef gen_data_osc(n):\r\n return np.array([1024 + (-2)**(-i/100) for i in range(n)])\r\n\r\ndef gen_data_rand(n):\r\n return... | [
[
"numpy.sin",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.title",
"matplotlib.pyplot.legend",
"numpy.random.randn",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel",
"numpy.average",
"matplotlib.pyplot.scatter",
"numpy.linspace"
],
[
... |
hummat/convolutional_occupancy_networks | [
"bb351edff59c196e01aa687943e19fee4ac11077"
] | [
"src/eval.py"
] | [
"import logging\n\nimport numpy as np\nimport trimesh\n\nfrom src.common import compute_iou\n# from scipy.spatial import cKDTree\nfrom src.utils.libkdtree import KDTree\nfrom src.utils.libmesh import check_mesh_contains\n\n# Maximum values for bounding box [-0.5, 0.5]^3\nEMPTY_PCL_DICT = {\n 'completeness': np.s... | [
[
"numpy.array",
"numpy.linalg.norm",
"numpy.empty",
"numpy.asarray",
"numpy.random.randint",
"numpy.abs",
"numpy.sqrt",
"numpy.linspace"
]
] |
simeoncarstens/probability | [
"054a720ff9f221dd9660acd7ce7fb38a1dbb1290",
"054a720ff9f221dd9660acd7ce7fb38a1dbb1290"
] | [
"tensorflow_probability/python/internal/backend/numpy/numpy_array.py",
"tensorflow_probability/python/optimizer/lbfgs.py"
] | [
"# Copyright 2018 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... | [
[
"numpy.where",
"numpy.conjugate",
"numpy.issubdtype",
"numpy.concatenate",
"numpy.full",
"numpy.ndindex",
"numpy.take",
"numpy.transpose",
"numpy.arange",
"numpy.expand_dims",
"numpy.array",
"numpy.reshape",
"numpy.roll",
"numpy.stack",
"numpy.squeeze",
... |
vihank/gym-donkeycar | [
"2e3cd780d92f3d5da5a0f9c67272a0cd3f08befe"
] | [
"examples/test_cam_config.py"
] | [
"\"\"\" Test the gym's code for configuring the DonkeyCar's camera settings.\n\"\"\"\n\nimport os\nimport argparse\nimport gym\nimport gym_donkeycar\nimport numpy as np\nimport uuid\n\nif __name__ == \"__main__\":\n\n # Initialize the donkey environment\n # where env_name one of:\n env_list = [\n \"... | [
[
"numpy.array"
]
] |
Cristian-Malinescu/qiskit-aqua | [
"b29596800447c3130a20ec72a18b7fd8ed9fdb2f"
] | [
"qiskit/optimization/algorithms/recursive_minimum_eigen_optimizer.py"
] | [
"# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2020.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\... | [
[
"numpy.abs"
]
] |
Renovamen/Image-Captioning | [
"de8d4f553a22e967fa56a01d5b4a2206b9431771"
] | [
"trainer/trainer.py"
] | [
"import time\nfrom typing import Optional, Dict\nimport torch\nfrom torch import nn, optim\nfrom torch.utils.data import DataLoader\nfrom torch.nn.utils.rnn import pack_padded_sequence\n\nfrom utils import TensorboardWriter, AverageMeter, save_checkpoint, accuracy, \\\n clip_gradient, adjust_learning_rate\nfrom ... | [
[
"torch.no_grad",
"torch.nn.utils.rnn.pack_padded_sequence",
"torch.max"
]
] |
eungbean/knowledge-distillation-cifar10 | [
"683379804c8724d097a845cee85f130b6767dbd7"
] | [
"model/studentB.py"
] | [
"\"\"\"\n Baseline CNN, losss function and metrics\n Also customizes knowledge distillation (KD) loss function here\n\"\"\"\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nclass Flatten(nn.Module):\n def forward(self, input):\n return input.view(input.size(... | [
[
"torch.nn.Linear",
"numpy.sum",
"torch.nn.BatchNorm2d",
"torch.nn.functional.log_softmax",
"torch.nn.Conv2d",
"torch.nn.BatchNorm1d",
"numpy.argmax",
"torch.nn.functional.cross_entropy",
"torch.nn.KLDivLoss",
"torch.nn.functional.softmax",
"torch.nn.functional.max_pool2... |
saroudant/sobolev_alignment_manuscript | [
"2b4d7ce4bbdac3a32ad8c02b950b4d1c91cda193"
] | [
"figure_3/model_III/sobolev_alignment/train_VAE.py"
] | [
"\"\"\"\nThis script:\n- Train Sobolev Alignment.\n- Save the two networks.\n\"\"\"\n\nimport os, sys, getopt\nimport pandas as pd\nimport numpy as np\nimport re\nfrom anndata import AnnData\nimport torch\nfrom pickle import dump, load\nfrom copy import deepcopy\nimport gc\n\nfrom sobolev_alignment import SobolevAl... | [
[
"torch.cuda.empty_cache"
]
] |
finite-infinity/tensorflow-serving-yolov3 | [
"d9244b2b12c2c6370638f48109f7a8f2ffeaa4c4"
] | [
"train.py"
] | [
"#! /usr/bin/env python\n# coding=utf-8\n\nimport os\nimport time\nimport shutil\nimport numpy as np\nimport tensorflow as tf\nimport core.utils as utils\nfrom tqdm import tqdm\nfrom core.dataset import Dataset\nfrom core.yolov3 import YOLOV3\nfrom core.config import cfg\n\nclass YoloTrain(object):\n def __init_... | [
[
"numpy.mean",
"tensorflow.assign_add",
"tensorflow.control_dependencies",
"tensorflow.global_variables_initializer",
"tensorflow.no_op",
"tensorflow.trainable_variables",
"tensorflow.Variable",
"tensorflow.global_variables",
"tensorflow.train.Saver",
"tensorflow.constant",
... |
mister-bailey/e3nn | [
"43d4b12f5ba5947583feb35f4e0662b73aae5618"
] | [
"tests/readme_example_test.py"
] | [
"\n# pylint: disable=missing-docstring, line-too-long, invalid-name, arguments-differ, no-member, pointless-statement\nfrom functools import partial\n\nimport torch\n\nfrom e3nn import Kernel, rs\nfrom e3nn.non_linearities.norm import Norm\nfrom e3nn.non_linearities.rescaled_act import swish\nfrom e3nn.point.operat... | [
[
"torch.zeros",
"torch.randn"
]
] |
milesgray/CALAE | [
"911378b855f567e942336ae609cb8edb52e55228",
"a2ab2f7d9ee17cc6c24ff6ac370b0373537079ac",
"a2ab2f7d9ee17cc6c24ff6ac370b0373537079ac"
] | [
"loss/robust_loss_pytorch/robust_loss_pytorch/cubic_spline.py",
"metrics/niqe.py",
"loss/truncated.py"
] | [
"# coding=utf-8\n# Copyright 2019 The Google Research 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 requ... | [
[
"torch.is_tensor",
"torch.as_tensor",
"torch.where"
],
[
"scipy.special.gamma",
"numpy.dot",
"numpy.argmin",
"numpy.mean",
"scipy.linalg.pinv",
"numpy.arange",
"numpy.sqrt",
"numpy.array",
"numpy.int",
"numpy.zeros",
"numpy.shape",
"numpy.float32",
... |
carlosb1/jina-hub | [
"f298d0f136c8627dd720d7a4e3eb9031655f5ccb",
"f298d0f136c8627dd720d7a4e3eb9031655f5ccb"
] | [
"crafters/numeric/ArrayStringReader/tests/test_arraystringreader.py",
"rankers/MinRanker/tests/test_minranker.py"
] | [
"import numpy as np\n\nfrom .. import ArrayStringReader\n\n\ndef test_arraystringreader():\n \"\"\"here is my test code\n\n https://docs.pytest.org/en/stable/getting-started.html#create-your-first-test\n \"\"\"\n size = 8\n sample_array = np.random.rand(size).astype('float32')\n text = ','.join([s... | [
[
"numpy.testing.assert_array_equal",
"numpy.random.rand"
],
[
"numpy.array"
]
] |
matiasleize/tesis_licenciatura | [
"5df6e341314583702b466b8ed7977d410f0ee457",
"5df6e341314583702b466b8ed7977d410f0ee457",
"5df6e341314583702b466b8ed7977d410f0ee457",
"5df6e341314583702b466b8ed7977d410f0ee457"
] | [
"Software/Funcionales/funciones_LambdaCDM_AGN.py",
"Software/Estadística/MCMC/HS/Cosas_viejas/MCMC_cronometros_cosmicos_2params_valores_medios.py",
"Software/Estadística/MCMC/Paper/EXP/CC+SN+AGN/derivar_params.py",
"Software/Estadística/MCMC/Paper/HS/CC+SN/4params/derivar_params.py"
] | [
"\"\"\"\nCreated on Sun Feb 2 13:28:48 2020\n\n@author: matias\n\"\"\"\nimport numpy as np\nfrom numpy.linalg import inv\nfrom matplotlib import pyplot as plt\nimport time\nimport camb\nfrom scipy.integrate import cumtrapz as cumtrapz\nfrom scipy.integrate import simps as simps\nfrom scipy.interpolate import inter... | [
[
"numpy.log",
"matplotlib.pyplot.xlabel",
"numpy.sum",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.figure",
"numpy.loadtxt",
"matplotlib.pyplot.ylabel",
"numpy.sqrt",
"numpy.log10",
"numpy.linspace"
],
[
"numpy.array",
"numpy.random.seed",
"numpy.random.rand... |
garrettkatz/poppy-simulations | [
"cd4d132ab6f8b4e69f2edd89662980d252a27966"
] | [
"ambulation/envs/poppy_humanoid_keep_standing/poppy_humanoid_keep_standing.py"
] | [
"import numpy as np\nfrom gym.envs.mujoco import mujoco_env\nfrom gym import utils\n\ndef mass_center(model, sim):\n mass = np.expand_dims(model.body_mass, 1)\n xpos = sim.data.xipos\n return (np.sum(mass * xpos, 0) / np.sum(mass))[0]\n\nclass PoppyHumanoidKeepStandingEnv(mujoco_env.MujocoEnv, utils.EzPick... | [
[
"numpy.concatenate",
"numpy.sum",
"numpy.expand_dims",
"numpy.square"
]
] |
pattonw/mouselight | [
"296e6df7d4e79776ed9f8533d17d937bb6866082"
] | [
"synthetic/blobs/train.py"
] | [
"from mahotas import cwatershed\nfrom mala.losses import ultrametric_loss_op\nfrom scipy.ndimage.filters import gaussian_filter\nfrom scipy.ndimage.filters import maximum_filter\nfrom scipy.ndimage.morphology import distance_transform_edt\nimport gunpowder as gp\nimport json\nimport numpy as np\nimport skelerator\n... | [
[
"numpy.zeros_like",
"numpy.array",
"tensorflow.train.AdamOptimizer",
"numpy.zeros",
"tensorflow.equal",
"scipy.ndimage.filters.gaussian_filter",
"numpy.random.randn",
"tensorflow.transpose",
"tensorflow.reshape",
"scipy.ndimage.filters.maximum_filter",
"numpy.random.ran... |
marioliu/AutonomousQuadblade | [
"08fe54fe37df89ffc7e6378125bb14ad5bead421"
] | [
"Camera/camera.py"
] | [
"'''\nAdapted from https://github.com/IntelligentQuadruped, with permission\nDescription: Module to connect to camera and retrieve RGB and depth data. Currently supports the Intel RealSense R200 Camera.\n'''\n\nimport numpy as np\nimport logging\nimport time\nimport cv2\nimport matplotlib.pyplot as plt\nfrom skimag... | [
[
"matplotlib.pyplot.colorbar",
"numpy.warnings.filterwarnings",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.title",
"matplotlib.pyplot.figure",
"numpy.nanmean",
"numpy.dstack",
"matplotlib.pyplot.show",
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.subplots_adjust",
"m... |
joebartusek/graf | [
"80e1014a1def2660a44188c69021f0c498b6cef9"
] | [
"submodules/GAN_stability/gan_training/checkpoints.py"
] | [
"\nimport os\nimport urllib\nimport torch\nfrom torch.utils import model_zoo\n\n\nclass CheckpointIO(object):\n ''' CheckpointIO class.\n\n It handles saving and loading checkpoints.\n\n Args:\n checkpoint_dir (str): path where checkpoints are saved\n '''\n def __init__(self, checkpoint_dir='.... | [
[
"torch.save",
"torch.utils.model_zoo.load_url",
"torch.load"
]
] |
VV123/NLIDB_gradient | [
"f42a6f383d2d4ac41c354cf55df2a21507577b02"
] | [
"main.py"
] | [
"# coding=utf-8\nimport sys\nimport argparse\n\nimport os\nfrom tensorflow.python.platform import gfile\nimport numpy as np\nimport tensorflow as tf\nfrom tensorflow.python.layers.core import Dense\nfrom utils.data_manager import load_data, load_data_one\nfrom collections import defaultdict\nfrom argparse import Ar... | [
[
"tensorflow.Graph",
"tensorflow.reset_default_graph",
"tensorflow.train.Saver",
"tensorflow.placeholder",
"tensorflow.local_variables_initializer",
"tensorflow.global_variables_initializer",
"tensorflow.placeholder_with_default",
"tensorflow.InteractiveSession"
]
] |
JasonKeirstead/kestrel-analytics | [
"4b8ab9b43ff3f73616e5a1a902f8c46bb00b83c0"
] | [
"template/analytics.py"
] | [
"#!/usr/bin/env python3\n\nimport pandas as pd\n\n# Kestrel analytics default paths (single input variable)\nINPUT_DATA_PATH = \"/data/input/0.parquet.gz\"\nOUTPUT_DATA_PATH = \"/data/output/0.parquet.gz\"\nOUTPUT_DISPLAY = \"/data/display/ret.html\"\n\ndef analytics(dataframe):\n # analyze data in dataframe\n\n... | [
[
"pandas.read_parquet"
]
] |
InferLO/inferlo | [
"a65efce721d7f99d2f274dd94a1aaf7ca159e944"
] | [
"inferlo/generic/libdai_bp.py"
] | [
"# Copyright (c) 2020, The InferLO authors. All rights reserved.\n# Licensed under the Apache License, Version 2.0 - see LICENSE file.\nfrom __future__ import annotations\n\nimport random\nimport time\nfrom dataclasses import dataclass\nfrom typing import TYPE_CHECKING, List, Callable, Dict\n\nimport numpy as np\n\... | [
[
"numpy.max",
"numpy.array",
"numpy.ones_like",
"numpy.zeros",
"numpy.log",
"numpy.sum",
"numpy.ones",
"numpy.abs"
]
] |
jaimeenahn/COVID-sentence-bert | [
"2f47d116f7d9b774946fbf3c0724b721d1b88225"
] | [
"sentence_transformers/losses/TripleSoftmaxLoss.py"
] | [
"import torch\nfrom torch import nn, Tensor\nfrom typing import Union, Tuple, List, Iterable, Dict\nfrom ..SentenceTransformer import SentenceTransformer\nimport logging\n\nclass TripleSoftmaxLoss(nn.Module):\n def __init__(self,\n model: SentenceTransformer,\n sentence_embedding_... | [
[
"torch.nn.Linear",
"torch.cosine_similarity",
"torch.cat",
"torch.nn.ReLU",
"torch.abs",
"torch.nn.CrossEntropyLoss"
]
] |
cisaacstern/hrpyzon | [
"10050b5286045f8a9a9d1338b5f4d418b19df39d",
"10050b5286045f8a9a9d1338b5f4d418b19df39d",
"10050b5286045f8a9a9d1338b5f4d418b19df39d"
] | [
"datashader_nb.py",
"_plot.py",
"tcorrect_std/tc_funcs.py"
] | [
"# +\nimport numpy as np\nimport holoviews as hv\nfrom holoviews import opts\nimport matplotlib.pyplot as plt\n\nfrom plotsun import plot_sun\n\nhv.extension('bokeh', 'matplotlib')\n# -\n\n# # Load data\n\ndata = np.load('npz_timeseries/subset.npz')\narr = data['arr']\nstack = data['stack']\nsun = data['sun']\nprin... | [
[
"numpy.arange",
"numpy.load",
"matplotlib.pyplot.imshow"
],
[
"numpy.array",
"matplotlib.pyplot.close",
"matplotlib.pyplot.figure",
"numpy.deg2rad",
"numpy.linspace",
"matplotlib.pyplot.subplots_adjust"
],
[
"numpy.deg2rad",
"numpy.sin",
"numpy.cos"
]
] |
yijingru/ObjGuided-Instance-Segmentation | [
"71e39f84aada581743a5d65f103e63ba0fcc8a9a"
] | [
"models/layers.py"
] | [
"import torch.nn as nn\nimport torch\nimport torch.nn.functional as F\n\nclass CombinationModule(nn.Module):\n def __init__(self, c_low, c_up, batch_norm=False, group_norm=False, instance_norm=False):\n super(CombinationModule, self).__init__()\n if batch_norm:\n self.up = nn.Sequential... | [
[
"torch.cat",
"torch.nn.functional.interpolate",
"torch.nn.BatchNorm2d",
"torch.nn.GroupNorm",
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.nn.InstanceNorm2d"
]
] |
hadleyhzy34/mpc_python_traj | [
"48451533c7ecd473e949c3a680a166fb046447bf"
] | [
"cubic_spline_planner.py"
] | [
"\"\"\"\nCubic spline planner\nAuthor: Atsushi Sakai(@Atsushi_twi)\n\"\"\"\nimport math\nimport numpy as np\nimport bisect\n\n\nclass Spline:\n \"\"\"\n Cubic Spline class\n \"\"\"\n\n def __init__(self, x, y):\n self.b, self.c, self.d, self.w = [], [], [], []\n\n self.x = x\n self.... | [
[
"numpy.zeros",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.close",
"matplotlib.pyplot.subplots",
"numpy.diff",
"numpy.rad2deg",
"numpy.arange",
"numpy.hypot",
"matplotlib.pyplot.ylabe... |
pietroepis/PyCTBN | [
"235c85c8fad8a85f1243dac8162dda60bf45291b"
] | [
"PyCTBN/tests/structure_graph/test_networkgraph.py"
] | [
"\n# License: MIT License\n\n\nimport unittest\nimport glob\nimport os\nimport networkx as nx\nimport numpy as np\nimport itertools\n\nfrom ...PyCTBN.structure_graph.sample_path import SamplePath\nfrom ...PyCTBN.structure_graph.network_graph import NetworkGraph\nfrom ...PyCTBN.utility.json_importer import JsonImpor... | [
[
"numpy.array",
"numpy.array_equal"
]
] |
mtaillefumier/SIRIUS | [
"f4b5c4810af2a3ea1e67992d65750535227da84b",
"f4b5c4810af2a3ea1e67992d65750535227da84b"
] | [
"python_module/sirius/ot/ot_precondition.py",
"python_module/sirius/edft/free_energy.py"
] | [
"from ..coefficient_array import PwCoeffs\nfrom scipy.sparse import dia_matrix\nimport numpy as np\n\n\ndef make_kinetic_precond(kpointset, c0, eps=0.1, asPwCoeffs=True):\n \"\"\"\n Preconditioner\n P = 1 / (||k|| + ε)\n\n Keyword Arguments:\n kpointset --\n \"\"\"\n\n nk = len(kpointset)\n ... | [
[
"numpy.isscalar",
"scipy.sparse.dia_matrix"
],
[
"numpy.zeros_like",
"numpy.array",
"numpy.isclose",
"numpy.log"
]
] |
rcorona/R2R-EnvDrop | [
"e91c21283ffc309bedfe49596b4066afa338fde6"
] | [
"r2r_src/agent.py"
] | [
"\nimport json\nimport os\nimport sys\nimport numpy as np\nimport random\nimport math\nimport time\nfrom tqdm import tqdm\n\nimport torch\nimport torch.nn as nn\nfrom torch.autograd import Variable\nfrom torch import optim\nimport torch.nn.functional as F\n\nfrom env import R2RBatch\nfrom utils import padding_idx, ... | [
[
"torch.distributions.Categorical",
"torch.stack",
"torch.ones",
"torch.load",
"torch.nn.CrossEntropyLoss",
"numpy.concatenate",
"numpy.zeros_like",
"torch.autograd.Variable",
"numpy.argmax",
"torch.zeros",
"numpy.logical_or",
"numpy.array",
"numpy.zeros",
"t... |
seanschneeweiss/RoSeMotion | [
"4ef7997c8976a8489798a427c768af5114f6b31e"
] | [
"app/resources/pymo/pymo/parsers.py"
] | [
"'''\nBVH Parser Class\n\nBy Omid Alemi\nCreated: June 12, 2017\n\nBased on: https://gist.github.com/johnfredcee/2007503\n\n'''\nimport re\nimport numpy as np\nfrom data import Joint, MocapData\n\n\nclass BVHScanner:\n '''\n A wrapper class for re.Scanner\n '''\n def __init__(self):\n\n def ident... | [
[
"pandas.DataFrame",
"pandas.to_timedelta",
"numpy.asarray"
]
] |
li012589/NeuralWavelet | [
"6e593ded5cb4ae80579cbf56eb9c346d808669cb"
] | [
"test/test_cdf.py"
] | [
"\nimport os\nimport sys\nsys.path.append(os.getcwd())\n\nimport numpy as np\nimport torch\nimport flow\nfrom utils import cdfDiscreteLogitstic, cdfMixDiscreteLogistic\nfrom utils import logDiscreteLogistic, logMixDiscreteLogistic\n\nnbins = 4096\n_bins = torch.arange(-nbins // 2, nbins // 2).reshape(-1, 1, 1, 1, 1... | [
[
"numpy.array",
"torch.arange",
"numpy.exp",
"numpy.allclose",
"torch.tensor",
"numpy.cumsum"
]
] |
nickcanz/chime | [
"cb03218ee5cc71b92704c8be379924ac459259d7"
] | [
"src/penn_chime/charts.py"
] | [
"\nfrom math import ceil\nimport datetime\n\nfrom altair import Chart # type: ignore\nimport pandas as pd # type: ignore\nimport numpy as np\n\nfrom .parameters import Parameters\nfrom .utils import add_date_column\nfrom .presentation import DATE_FORMAT\n\n\ndef new_admissions_chart(\n alt, projection_admits: ... | [
[
"pandas.DataFrame",
"numpy.ceil"
]
] |
ahijevyc/NSC_objects | [
"322728a71ec011b681b0038e9dcd86df1f73b2fd"
] | [
"neural_network_lrp.py"
] | [
"#!/usr/bin/env python\n\nimport numpy as np\nimport datetime as dt\nimport sys, os, pickle, time\nfrom keras.models import Model, save_model, load_model\nfrom keras.regularizers import l2\nfrom keras.optimizers import SGD, Adam\nimport keras.backend as K\nimport tensorflow as tf\nimport pandas as pd\nimport innves... | [
[
"tensorflow.local_variables_initializer",
"numpy.abs",
"tensorflow.metrics.auc",
"numpy.mean"
]
] |
MahendraSondagar/STMicroelectronics | [
"1b3cab9da8e9a23b2372573b08f6a55ea4424668"
] | [
"SensorTile/STM32CubeFunctionPack_SENSING1_V4.0.2/Middlewares/ST/STM32_AI_AudioPreprocessing_Library/Python/MFCC.py"
] | [
"#!/usr/bin/env python\r\n# coding: utf-8\r\n\r\n# This software component is licensed by ST under BSD 3-Clause license,\r\n# the \"License\"; You may not use this file except in compliance with the\r\n# License. You may obtain a copy of the License at:\r\n# https://opensource.org/licen... | [
[
"scipy.io.wavfile.read",
"numpy.dot",
"scipy.signal.hann",
"numpy.fft.fft",
"numpy.abs",
"numpy.log10",
"scipy.fftpack.dct"
]
] |
sourcery-ai-bot/datasets | [
"b623ab0abf3f03bacf6a7ba22c8d37bf76a4db28",
"b623ab0abf3f03bacf6a7ba22c8d37bf76a4db28"
] | [
"tensorflow_datasets/image_classification/imagenet2012_real.py",
"tensorflow_datasets/summarization/samsum.py"
] | [
"# coding=utf-8\n# Copyright 2021 The TensorFlow Datasets 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 ... | [
[
"tensorflow.compat.v2.io.gfile.GFile",
"tensorflow.compat.v2.io.gfile.exists"
],
[
"tensorflow.compat.v2.io.gfile.GFile"
]
] |
enkaranfiles/predict-future-sales | [
"528d004b78b5c0d41720fc46daa487e3928c045e"
] | [
"preprocessing.py"
] | [
"import numpy as np\r\nimport pandas as pd\r\nimport seaborn as sns\r\nimport matplotlib.pyplot as plt\r\nfrom itertools import product\r\nfrom sklearn.preprocessing import LabelEncoder\r\n\r\n\r\n\r\n# =============================================================================\r\n# The lines where we processed o... | [
[
"numpy.zeros_like",
"sklearn.preprocessing.LabelEncoder",
"pandas.merge",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.subplots",
"pandas.concat",
"pandas.read_csv",
"numpy.vstack"
]
] |
docc-lab/train-ticket | [
"350f62000e6658e0e543730580c599d8558253e7"
] | [
"ts-avatar-service/base64toimage.py"
] | [
"import base64\nimport numpy as np\nimport cv2\n\npath_save = \"./images/\"\n\n\ndef base64_cv2(base64_str):\n imgString = base64.b64decode(base64_str)\n nparr = np.fromstring(imgString,np.uint8)\n image = cv2.imdecode(nparr,cv2.IMREAD_COLOR)\n\n a = cv2.imwrite(path_save + \"img_face_1\" + \".jpg\", im... | [
[
"numpy.fromstring"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.