repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
AMARTELKE/Pangenome-with-Panaroo
[ "b720debf8616882668d53600038c334393080d9b" ]
[ "scripts/reference_based_layout.py" ]
[ "import networkx as nxvisited\nimport re\nimport networkx.classes.function as function\nimport networkx.algorithms.connectivity.cuts as cuts\nimport networkx as nx\nimport pandas as pd\n\n\ndef get_dist(ref_s, ref_t, max_dist):\n s = ref_s.split(\"_\")[-1]\n t = ref_t.split(\"_\")[-1]\n return min(abs(int(...
[ [ "pandas.DataFrame.from_dict" ] ]
Programmer-RD-AI/kickstarter-NLP-V7
[ "d751a0eae257b544a15cae3e18ba4ce9fdd7055c" ]
[ "wandb/run-20211031_160136-30z8d5k3/files/code/00.py" ]
[ "from sklearn.model_selection import *\nimport wandb\nimport nltk\nfrom nltk.stem.porter import *\nfrom torch.nn import *\nfrom torch.optim import *\nimport numpy as np\nimport pandas as pd\nimport torch\nimport torchvision\nimport random\nfrom tqdm import *\nfrom torch.utils.data import Dataset, DataLoader\nstemme...
[ [ "pandas.read_csv", "torch.cuda.empty_cache", "numpy.random.shuffle", "torch.save", "numpy.array", "torch.argmax" ] ]
zhenv5/fedlearner
[ "a8ff0eaef48e174d432a40d23d12c1f57e842ebd", "a8ff0eaef48e174d432a40d23d12c1f57e842ebd" ]
[ "fedlearner/trainer/embedding.py", "fedlearner/trainer/data/data_block_loader.py" ]
[ "# Copyright 2020 The FedLearner 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.compat.v1.device", "tensorflow.compat.v1.add_n", "tensorflow.compat.v1.control_dependencies", "tensorflow.compat.v1.variable_scope", "tensorflow.compat.v1.constant", "tensorflow.compat.v1.identity" ], [ "tensorflow.compat.v1.data.TFRecordDataset", "tensorflow.compat...
Shawn-Guo-CN/EGG
[ "0a5b258108e2cd1c873d7f67e8c92551bb3d809c" ]
[ "egg/zoo/objects_game/features.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 torch\nfrom torch.utils import data\nimport numpy as np\nfrom functools import reduce\nfrom egg.zoo.objects_game.util import c...
[ [ "numpy.reshape", "numpy.arange", "torch.from_numpy", "numpy.savez_compressed", "numpy.load", "numpy.array", "numpy.random.RandomState", "numpy.random.randint" ] ]
wangxieric/Meta-Aug
[ "2d0a3c0535be8a6c6d9bf7fd45188f7f97b86ec6" ]
[ "models/IMDB_sentiment_cls/run_BERT.py" ]
[ "import os\nimport pandas as pd\nimport torch\nimport sys\nsys.path.insert(0, \"/nfs/Meta-Aug/\")\nfrom torch.utils.data import DataLoader\nfrom torch.utils.data import Dataset\nfrom transformers import get_linear_schedule_with_warmup\nfrom transformers.optimization import AdamW\nfrom transformers import BertModel\...
[ [ "torch.optim.lr_scheduler.ReduceLROnPlateau", "torch.Tensor", "torch.load", "torch.utils.data.DataLoader", "pandas.DataFrame", "numpy.concatenate", "torch.device" ] ]
haiyangxue/fairseq
[ "b142ceec20d69130aea823054b193a0d04a780e3", "b142ceec20d69130aea823054b193a0d04a780e3" ]
[ "interactive.py", "demo/utils/print_pt.py" ]
[ "#!/usr/bin/env python3 -u\n# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\"\"\"\nTranslate raw text with a trained model. Batches data on-the-fly.\n\"\"\"\n\nfrom collections impor...
[ [ "torch.cuda.is_available" ], [ "torch.load" ] ]
endrjuskr/u8timeseries
[ "edf167815e7c7931fe491207f831e88203589883" ]
[ "u8timeseries/tests/test_timeseries.py" ]
[ "import unittest\nimport pandas as pd\nimport numpy as np\n\nfrom ..timeseries import TimeSeries\n\n\nclass TimeSeriesTestCase(unittest.TestCase):\n\n times = pd.date_range('20130101', '20130110')\n pd_series1 = pd.Series(range(10), index=times)\n pd_series2 = pd.Series(range(5, 15), index=times)\n pd_s...
[ [ "pandas.to_datetime", "numpy.arange", "pandas.Timedelta", "pandas.DatetimeIndex", "pandas.date_range", "pandas.Timestamp", "numpy.empty" ] ]
NunoEdgarGFlowHub/pandas
[ "b09b84e8e0baf89e78b618cdda30af11087d2e4a" ]
[ "pandas/tests/test_index.py" ]
[ "# -*- coding: utf-8 -*-\n# pylint: disable=E1101,E1103,W0232\n\nfrom datetime import datetime, timedelta, time\nfrom pandas.compat import range, lrange, lzip, u, zip, PY3\nimport operator\nimport re\nimport nose\nimport warnings\nimport os\n\nimport numpy as np\n\nfrom pandas import (period_range, date_range, Cate...
[ [ "numpy.sqrt", "pandas.PeriodIndex", "pandas.util.testing.assert_contains_all", "pandas.util.testing.assert_produces_warning", "pandas.MultiIndex.from_tuples", "pandas.util.testing.assert_index_equal", "pandas.util.testing.makeUnicodeIndex", "pandas.compat.lzip", "pandas.compat....
tblxio/sinfo
[ "57e4b38fc4a643a4218c472526b7fdc03b61415e", "57e4b38fc4a643a4218c472526b7fdc03b61415e" ]
[ "ds/model_utils.py", "ds/features.py" ]
[ "import numpy as np\nimport pandas as pd\n\nfrom sklearn.metrics import (make_scorer, f1_score, precision_score, \n recall_score, confusion_matrix)\nfrom sklearn.model_selection import RandomizedSearchCV\n\n\ndef randomized_hyperparameter_search(X_train, y_train, X_val, y_val, \n ...
[ [ "numpy.arange", "sklearn.metrics.precision_score", "sklearn.metrics.confusion_matrix", "pandas.DataFrame", "numpy.append", "sklearn.metrics.make_scorer", "sklearn.metrics.f1_score", "sklearn.metrics.recall_score" ], [ "numpy.pad", "numpy.min", "numpy.quantile", ...
rubysown/equities
[ "aa113e2001be7c338fcd069490e252144b25c9b5" ]
[ "equities/api.py" ]
[ "import concurrent.futures\nimport pandas as pd \nfrom equities import static as STATIC \nfrom solaris.api import Client as SolarisClient\nfrom pytrends.request import TrendReq as GoogleTrendClient\nimport yfinance as YahooFinanceClient\n\n__version__ = STATIC.__version__\n__author__ = STATIC.__author__\n\nclass C...
[ [ "pandas.DataFrame" ] ]
OshanIvantha/tf-encrypted
[ "538e4857fa7adaa024a03c532ba3b5d78d89d1b9" ]
[ "tensorflow_encrypted/layers/convolution.py" ]
[ "import numpy as np\nfrom . import core\n\n\nclass Conv2D(core.Layer):\n def __init__(self, filter_shape, strides=1, padding=\"SAME\",\n filter_init=lambda shp: np.random.normal(scale = 0.1, size = shp),\n l2reg_lambda=0.0, channels_first=True):\n \"\"\" 2 Dimensional convo...
[ [ "numpy.random.normal", "numpy.zeros" ] ]
sarvex/privacy
[ "7c4f5bab0964bd32b7ceafa009d9488920856440", "7c4f5bab0964bd32b7ceafa009d9488920856440", "7c4f5bab0964bd32b7ceafa009d9488920856440" ]
[ "tensorflow_privacy/privacy/privacy_tests/membership_inference_attack/membership_inference_attack_test.py", "tensorflow_privacy/privacy/privacy_tests/membership_inference_attack/models.py", "tensorflow_privacy/privacy/privacy_tests/membership_inference_attack/tf_estimator_evaluation.py" ]
[ "# Copyright 2020, The TensorFlow 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 ...
[ [ "numpy.testing.assert_almost_equal", "numpy.array", "numpy.random.RandomState" ], [ "sklearn.neural_network.MLPClassifier", "sklearn.model_selection.GridSearchCV", "numpy.expand_dims", "sklearn.linear_model.LogisticRegression", "sklearn.ensemble.RandomForestClassifier", "nu...
LegionChang/CoTNet
[ "fc0dcf5c4ef088e2e535206dc82f09bbfd01f280", "fc0dcf5c4ef088e2e535206dc82f09bbfd01f280" ]
[ "models/tnt.py", "datasets/mixup.py" ]
[ "\"\"\" Transformer in Transformer (TNT) in PyTorch\n\nA PyTorch implement of TNT as described in\n'Transformer in Transformer' - https://arxiv.org/abs/2103.00112\n\nThe official mindspore code is released and available at\nhttps://gitee.com/mindspore/mindspore/tree/master/model_zoo/research/cv/TNT\n\"\"\"\nimport ...
[ [ "torch.nn.Dropout", "torch.linspace", "torch.zeros", "torch.nn.init.constant_", "torch.nn.ModuleList", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.Unfold", "torch.nn.Identity" ], [ "numpy.random.beta", "numpy.sqrt", "numpy.clip", "torch.zeros", "nump...
RC-Dynamics/de_pid_angle
[ "04302a2b19fe2a5caf2ba3b4c2c63be99f949b14" ]
[ "main.py" ]
[ "import socket\nimport json\nimport time\nfrom matplotlib import pyplot as plt\nfrom robot import Robot\nfrom path import Path\nfrom pid import PIDAngle\nfrom datetime import datetime\n\n\ndef restartRobot():\n\tdata = conn.recv(1024)\n\trecData = json.loads(data.decode('utf-8'))\n\trobot.setCoord(recData['robot0']...
[ [ "numpy.array", "numpy.hstack", "numpy.random.random", "numpy.min", "numpy.arange", "numpy.max", "numpy.argmin", "numpy.random.rand", "numpy.mean", "numpy.random.randint", "numpy.array2string", "matplotlib.pyplot.show", "numpy.zeros", "matplotlib.pyplot.figur...
Digusil/eventsearch
[ "3a8767d236ad8f84ac54a6db9c860623eb5036e1", "3a8767d236ad8f84ac54a6db9c860623eb5036e1" ]
[ "tests/test_signals.py", "eventsearch/signals.py" ]
[ "import unittest\n\nimport numpy as np\n\nfrom eventsearch.signals import SingleSignal, SmoothedSignal\nfrom eventsearch.utils import Smoother\nfrom .utils import TemporaryFolder\n\n\nclass TestSingleSingal(unittest.TestCase):\n def test_create_object(self):\n t = np.linspace(0, 5, 10)\n y = t ** 2...
[ [ "numpy.testing.assert_array_equal", "numpy.linspace" ], [ "pandas.Series" ] ]
ethanwhite/EvergladesTools
[ "8ee39bad52752db8086206a39b982eb1bbb359cd" ]
[ "Zooniverse/aggregate.py" ]
[ "#aggregation script\nfrom distributed import wait\nimport pandas as pd\nimport geopandas as gpd\nfrom panoptes_client import Panoptes\nfrom shapely.geometry import box, Point\nimport json\nimport numpy as np\nimport os\nfrom datetime import datetime\nimport utils\nimport extract\nimport start_cluster\n\ndef downlo...
[ [ "pandas.concat", "pandas.read_csv", "pandas.Series", "pandas.DataFrame", "numpy.mean" ] ]
sha256feng/LanczosNetwork
[ "c16910b32efecb24a6897343d88fd302229bb44d" ]
[ "model/gcn.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n__all__ = ['GCN']\n\n\nclass GCN(nn.Module):\n \"\"\" Graph Convolutional Networks,\n see reference below for more information\n\n Kipf, T.N. and Welling, M., 2016.\n Semi-supervised classification with graph convolutional netw...
[ [ "torch.mean", "torch.nn.CrossEntropyLoss", "torch.nn.functional.dropout", "torch.cat", "torch.nn.Embedding", "torch.nn.Sigmoid", "torch.nn.Linear", "torch.bmm", "torch.nn.L1Loss", "torch.nn.init.xavier_uniform_", "torch.stack", "torch.nn.MSELoss" ] ]
yamamoto-kazuki-fixer/decode2019-Azure-MLOps
[ "bae4db710b889b529332c27f68bbbfda13ae1689" ]
[ "train.py" ]
[ "import os\nimport torch\nimport argparse\nimport torch.nn as nn\nfrom pathlib import Path\nimport torch.onnx as onnx\nimport torch.optim as optim\nimport torch.nn.functional as F\nfrom torch.utils.data import DataLoader\nfrom torchvision import datasets, transforms\n\nfrom azureml.core.run import Run\n\n##########...
[ [ "torch.onnx.export", "torch.nn.functional.softmax", "torch.nn.Dropout2d", "torch.randint", "torch.nn.functional.dropout", "torch.zeros", "torch.nn.Conv2d", "torch.utils.data.DataLoader", "torch.nn.BCELoss", "torch.nn.Linear", "torch.no_grad", "torch.cuda.is_availabl...
fkubota/kaggle-Rainforest-Connection-Species-Audio-Detection
[ "7134edff0ba1c60f597b64a0efd953b7707b98e1", "7134edff0ba1c60f597b64a0efd953b7707b98e1" ]
[ "exp/exp002/utils.py", "exp/exp002/trainner.py" ]
[ "from ipdb import set_trace as st\nimport os\nimport time\nimport random\nimport numpy as np\nfrom loguru import logger\nimport torch\n\n\ndef set_seed(seed):\n random.seed(seed)\n np.random.seed(seed)\n os.environ[\"PYTHONHASHSEED\"] = str(seed)\n torch.manual_seed(seed)\n torch.cuda.manual_seed(see...
[ [ "numpy.random.beta", "torch.cuda.manual_seed", "numpy.random.seed", "torch.randperm", "torch.manual_seed", "torch.zeros_like", "torch.sort", "torch.cuda.is_available", "torch.argsort" ], [ "pandas.read_csv", "torch.cuda.empty_cache", "torch.tensor", "numpy.c...
Raashil/EasyProgrammingPython
[ "8d64ae8f10e1bb207cd1b314096375573c7c9cb6" ]
[ "Covid_project/app.py" ]
[ "import pandas as pd\r\nimport folium\r\nfrom flask import Flask,render_template\r\n\r\ndef find_top_confirmed(n = 15):\r\n \r\n corona_df=pd.read_csv(\"covid-19-dataset-2.csv\")\r\n by_country = corona_df.groupby('Country').sum()[['Confirmed', 'Deaths', 'Recovered', 'Active']]\r\n cdf = by_country.nlar...
[ [ "pandas.read_csv" ] ]
immortal-autumn/Siamese-pytorch
[ "f8f10cb74860a808f3230b3caa6ca53a216c73be" ]
[ "analyse.py" ]
[ "import json\n\nimport matplotlib.pyplot as plt\n\nwith open('output.json', 'r') as f:\n result = json.load(f)\n\n# plotting = {}\nindexs = []\nlosses = []\nval_losses = []\naccuracies = []\n\nfor k, v in result.items():\n name = k.replace(\".pth\", \"\").split('-')\n index = int(name[0][2:])\n loss = f...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
Echo-CBT/ActivitySuggestion
[ "e4ac68aa3f1d4a45d2f65145d5c424067fba1394" ]
[ "corelate.py" ]
[ "import pandas as pd\nimport json\nfrom sklearn import preprocessing\nimport numpy as np\n\ndummy_data = json.dumps({\n \"indexKeys\": [\"feeling\", \"jogging\", \"exercise\", \"meditate\", \"paint\", \"read\", \"code\", \"games\", \"socialize\", \"socialMedia\", \"goodSleep\", \"badSleep\", \"moderateSleep\", \...
[ [ "numpy.array", "sklearn.preprocessing.MinMaxScaler", "pandas.DataFrame" ] ]
mhelabd/ai-ethicist
[ "ac3efad32c2ec34df949c8facf139e33d250db87", "ac3efad32c2ec34df949c8facf139e33d250db87", "ac3efad32c2ec34df949c8facf139e33d250db87" ]
[ "ai_economist/foundation/base/world.py", "ai_economist/foundation/scenarios/covid19/covid19_env.py", "ai_economist/foundation/scenarios/simple_wood_and_stone/layout_from_file.py" ]
[ "# Copyright (c) 2020, salesforce.com, inc.\n# All rights reserved.\n# SPDX-License-Identifier: BSD-3-Clause\n# For full license text, see the LICENSE file in the repo root\n# or https://opensource.org/licenses/BSD-3-Clause\n\nimport numpy as np\n\nfrom ai_economist.foundation.agents import agent_registry\nfrom ai_...
[ [ "numpy.maximum", "numpy.ones_like", "numpy.abs", "numpy.min", "numpy.arange", "numpy.ones", "numpy.logical_or", "numpy.random.permutation", "numpy.repeat", "numpy.array", "numpy.zeros" ], [ "numpy.maximum", "numpy.minimum", "numpy.pad", "numpy.clip",...
itsalexis962/pycroscopy
[ "8a6557408ffdc332cef102616be16e26a396532f" ]
[ "tests/learn/dl/test_trainer.py" ]
[ "import sys\nimport pytest\nimport numpy as np\nimport torch\nfrom numpy.testing import assert_\n\nsys.path.append(\"../../../\")\n\nfrom pycroscopy.learn import Trainer, models\n\n\ndef assert_weights_equal(m1, m2):\n eq_w = []\n for p1, p2 in zip(m1.values(), m2.values()):\n eq_w.append(np.array_equa...
[ [ "torch.randn", "torch.manual_seed" ] ]
anntzer/mplcairo-asv
[ "7d03686411600e808e95875cb78deda9b8e8d4a7" ]
[ "benchmarks/benchmarks.py" ]
[ "import matplotlib as mpl\nfrom matplotlib.figure import Figure\nimport numpy as np\n\nfrom mplcairo import antialias_t\nfrom mplcairo.base import FigureCanvasCairo\n\n\nmpl.rcdefaults()\n\n\ndef get_axes():\n axes = Figure().subplots()\n axes.set(xticks=[], yticks=[])\n for spine in axes.spines.values():\...
[ [ "matplotlib.rcdefaults", "numpy.random.RandomState", "matplotlib.figure.Figure" ] ]
noashin/Ising_model_gibbs_sampler
[ "f285bf24aa4157c3f2d7d6c0ce3d93d058953c42" ]
[ "sampler.py" ]
[ "import time\nimport random\n\nimport numpy as np\nimport pypolyagamma as pypolyagamma\n\n\ndef calculate_C_w(S, w_i):\n w_mat = np.diag(w_i)\n\n return np.dot(S.T, np.dot(w_mat, S))\n\n\ndef sample_w_i(S, J_i):\n \"\"\"\n\n :param S: observation matrix\n :param J_i: neuron i's couplings\n :return...
[ [ "numpy.diag", "numpy.dot", "numpy.log", "numpy.sqrt", "numpy.linalg.inv", "numpy.random.multivariate_normal", "numpy.ones", "numpy.linalg.det", "numpy.delete", "numpy.random.normal", "numpy.identity", "numpy.random.binomial", "numpy.zeros", "numpy.where", ...
amohant4/RSA_TF
[ "5b6705e167ca4f7039e900f9921b90087c9542fd" ]
[ "lib/networks/leNet_sram.py" ]
[ "# file: leNet_sram.py\n# Author\t: Abinash Mohanty\n# Date\t\t: 06/22/2017\n# Project\t: RRAM training NN\n\n# This class implements leNet. \n# It is a convolution neural network with 2 conv and 3 fc layers. \n# For more details:\n\nimport tensorflow as tf\nfrom rram_NN.config import cfg\nfrom networks.network imp...
[ [ "tensorflow.nn.softmax_cross_entropy_with_logits", "tensorflow.Variable", "tensorflow.cast", "tensorflow.gradients", "tensorflow.placeholder", "tensorflow.train.exponential_decay", "tensorflow.train.GradientDescentOptimizer", "tensorflow.trainable_variables", "tensorflow.argmax...
ypix/fight-churn-nb
[ "fcaaf17a30d69851be42a54c0e68ca4444fb97e1" ]
[ "churnmodels/helpers.py" ]
[ "import os\nimport sys\nimport pandas as pd\n\n# alternative to the interval functionality in postgres is to create a tempory table that can be joined to\nfrom datetime import timedelta, datetime\n\nimport sqlparse\n\n\ndef make_day_interval(d_start_date, d_end_date, periods, freq_str):\n # we let pandas do find...
[ [ "pandas.DataFrame", "pandas.date_range" ] ]
heraclex12/CLMR
[ "9616022ea9a6e0ccfec97dccb4c76e76d2e7d92a" ]
[ "clmr/models/sample_cnn_xl.py" ]
[ "import torch\nimport torch.nn as nn\nfrom .model import Model\n\n\nclass SampleCNNXL(Model):\n def __init__(self, strides, supervised, out_dim):\n super(SampleCNN, self).__init__()\n\n self.strides = strides\n self.supervised = supervised\n self.sequential = [\n nn.Sequent...
[ [ "torch.nn.Sequential", "torch.nn.Dropout", "torch.nn.BatchNorm1d", "torch.nn.Linear", "torch.nn.MaxPool1d", "torch.nn.Conv1d", "torch.nn.ReLU" ] ]
knutss/PyWake
[ "6576bd8079d033cc4a1e7162cf8a803f3312fb57", "10812cd962a8bcfa0d80d516fbc000f5a20d9863", "6576bd8079d033cc4a1e7162cf8a803f3312fb57" ]
[ "py_wake/tests/check_speed.py", "py_wake/tests/test_ground_models/test_mirror.py", "py_wake/tests/test_sites/test_distances.py" ]
[ "from datetime import datetime\nimport functools\nimport os\nimport time\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom py_wake import NOJ\nfrom py_wake.deficit_models import fuga\nfrom py_wake.deficit_models.gaussian import IEA37SimpleBastankhahGaussian\nfrom py_wake.examples.data.hornsrev1 import wt...
[ [ "matplotlib.pyplot.subplots", "numpy.std", "numpy.mean", "pandas.plotting.register_matplotlib_converters", "matplotlib.pyplot.show" ], [ "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "numpy.arange", "matplotlib.pyplot.plot", "matplotlib.pyplot.close", "matp...
abdalazizrashid/Theano-PyMC
[ "90fa750461e91fb6281d494ae86404e2153fd7eb", "90fa750461e91fb6281d494ae86404e2153fd7eb", "90fa750461e91fb6281d494ae86404e2153fd7eb", "90fa750461e91fb6281d494ae86404e2153fd7eb", "90fa750461e91fb6281d494ae86404e2153fd7eb", "90fa750461e91fb6281d494ae86404e2153fd7eb", "90fa750461e91fb6281d494ae86404e2153fd7e...
[ "aesara/tensor/opt.py", "tests/tensor/test_inplace.py", "tests/gof/test_compute_test_value.py", "aesara/misc/burn_gpu.py", "tests/compile/test_pfunc.py", "tests/gpuarray/test_blas.py", "tests/gpuarray/test_opt.py" ]
[ "\"\"\" Tensor optimizations addressing the ops in basic.py.\"\"\"\n# TODO: intelligent merge for mul/add\n# TODO: 0*x -> 0\n\nimport itertools\nimport logging\nimport operator\nimport sys\nimport time\nimport traceback\nimport warnings\nfrom collections import defaultdict\nfrom functools import reduce\nfrom io imp...
[ [ "numpy.log2", "numpy.asarray", "numpy.arange", "numpy.int8", "numpy.dtype", "numpy.all", "numpy.any", "numpy.array", "numpy.zeros", "numpy.sum" ], [ "numpy.asarray", "numpy.int8", "numpy.abs" ], [ "numpy.zeros", "numpy.random.rand", "numpy.em...
dllahr/summer2020
[ "4c8204f72ecdd8c44d2abb1e3e2669d1e6a478e8" ]
[ "summer2020py/make_genebody_coverage_graphs/test/test_make_genebody_coverage_graphs.py" ]
[ "import unittest\nimport logging\nimport summer2020py.setup_logger as setup_logger\nimport summer2020py.make_genebody_coverage_graphs.make_genebody_coverage_graphs as mgcg\n\nimport pandas\nimport tempfile\nimport os\ntemp_wkdir_prefix = \"TestMakeGeneBodyCoverageGraphs\"\n\n\nlogger = logging.getLogger(setup_logge...
[ [ "pandas.DataFrame" ] ]
eslickj/idaes-pse
[ "328ed07ffb0b4d98c03e972675ea32c41dd2531a" ]
[ "idaes/power_generation/carbon_capture/mea_solvent_system/unit_models/column.py" ]
[ "#################################################################################\n# The Institute for the Design of Advanced Energy Systems Integrated Platform\n# Framework (IDAES IP) was produced under the DOE Institute for the\n# Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021\n# by th...
[ [ "matplotlib.pyplot.show", "numpy.linspace", "matplotlib.pyplot.figure" ] ]
MaekTec/calvin_env
[ "37c8abe860b6cfbbd94dd9ad64b4245b1d402d60" ]
[ "calvin_env/robot/robot.py" ]
[ "import logging\nimport math\nimport os\n\nimport cv2\nimport numpy as np\nimport pybullet as p\nimport quaternion\n\nfrom calvin_env.robot.mixed_ik import MixedIK\nfrom calvin_env.utils.utils import timeit\n\n# A logger for this file\nlog = logging.getLogger(__name__)\n\n\nclass Robot:\n def __init__(\n ...
[ [ "numpy.split", "numpy.array", "numpy.cos", "numpy.sin" ] ]
eristoddle/catalyst
[ "b16366e828991e39f0604dacc2527e522bb3f9c8" ]
[ "catalyst/examples/Sure_Fire_Hedge_Catalyst.py" ]
[ "import numpy as np\nimport pandas as pd\nimport talib as ta\nimport matplotlib.pyplot as plt\nfrom catalyst import run_algorithm\nfrom catalyst.exchange.utils.stats_utils import extract_transactions\nfrom catalyst.api import (\n record,\n order,\n order_target,\n symbol,\n get_order\n)\nfrom logbook...
[ [ "pandas.to_datetime", "numpy.arange", "pandas.DataFrame", "matplotlib.pyplot.subplot", "matplotlib.pyplot.show", "numpy.where" ] ]
IrTrez/msp-examples
[ "463ed5e4fe703bf770f0e710266b0e0e112136f3" ]
[ "Examples/Aerobraking.py" ]
[ "from msp import msp, simtools\nimport time\nimport math\nimport numpy as np\n\nDATAFILE = \"runs/Aerobraking.csv\"\nATMOSPHEREDATA = \"densityModels/MarsDensity.csv\"\nSPEED = 2000 # __ times speed\nRUNTIME = 300000\nprint(\"Total runtime will be:\", RUNTIME, \"s or:\", RUNTIME/3600, \"hours or:\", RUNTIME/86400,...
[ [ "numpy.array" ] ]
tpltnt/SimpleCV
[ "9fd75457cce5fd111c4d251b1076b9447fa4f1a2" ]
[ "scripts/install/win/OpenKinect/freenect-examples/demo_cv_threshold.py" ]
[ "#!/usr/bin/env python\nfrom __future__ import print_function\nimport freenect\nimport cv\nimport frame_convert\nimport numpy as np\n\n\nthreshold = 100\ncurrent_depth = 0\n\n\ndef change_threshold(value):\n global threshold\n threshold = value\n\n\ndef change_depth(value):\n global current_depth\n curr...
[ [ "numpy.logical_and" ] ]
avrech/learning2cut
[ "c0febe84db5097413823821510a4ae3c996dec93", "c0febe84db5097413823821510a4ae3c996dec93" ]
[ "utils/functions.py", "utils/sweet-spot-er.py" ]
[ "from heapq import heappop, heappush\nfrom collections import defaultdict\nimport networkx as nx\nimport numpy as np\n\n\ndef dijkstra(edges, s, t):\n \"\"\"\n Find the shortest path from node s to t in graph G.\n :param edges: a list of tuples (i, j, w), where (i,j) is an undirected edge, and w is its wei...
[ [ "numpy.array", "numpy.ones_like", "numpy.abs" ], [ "matplotlib.pyplot.tight_layout", "numpy.random.random", "numpy.arange", "matplotlib.pyplot.savefig", "numpy.mean", "matplotlib.pyplot.suptitle", "matplotlib.pyplot.figure" ] ]
Alejandro-sin/Learning_Notebooks
[ "161d6bed4c7b1d171b45f61c0cc6fa91e9894aad" ]
[ "NoteBooks/Curso de Python/Python/Paradigmas/Programacion Estocastica/regresion.py" ]
[ "# Regresión lineal, que peudo correr en collab.\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n\n\n\n# Esto son la variabel independiente\nx = np.array([0,1,2,4 ])\n\n# Esta es mi dependiente, resutlado de experimentos\ny = np.array([1,3,4,5])\n\n# Me permite tomar ecnontrar los cefiioentes lienales para ...
[ [ "numpy.polyfit", "matplotlib.pyplot.scatter", "matplotlib.pyplot.plot", "numpy.array", "matplotlib.pyplot.show" ] ]
kubajir/msticpy
[ "7b319b71b191b5f75dcf9afd87492523a74b5ad7" ]
[ "tests/datamodel/test_pivot_data_queries_run.py" ]
[ "# -------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See License.txt in the project root for\n# license information.\n# --------------------------------------------------------------------------\n...
[ [ "pandas.Series", "pandas.DataFrame" ] ]
jiayuanlu/XJTU_course
[ "dc1a24e0230d8d5eff6441d088e01a2376fac893" ]
[ "DSP/pinyu_mfcc/visualize.py" ]
[ "import utils\nimport config\nimport os\nimport feature\nimport numpy as np\nimport matplotlib.pyplot as plt\n\ninfo, wave_data = utils.wavDecode(os.path.join(config.datasetPath, \"1_34_1/0/0_0.wav\"))\nwave_data = wave_data[:, 0]\nwave_data = wave_data * 1.0 / (max(abs(wave_data)))\n\nframe_lens = 512\nmove = 128\...
[ [ "matplotlib.pyplot.title", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "numpy.mean", "matplotlib.pyplot.xticks", "matplotlib.pyplot.figure" ] ]
quanted/poptox
[ "5579f9571ff7e3bddf5ed79c3641337e3df7f8f2" ]
[ "poptox/loons/loons_output.py" ]
[ "# -*- coding: utf-8 -*-\n\n\nimport os\nos.environ['DJANGO_SETTINGS_MODULE']='settings'\nimport webapp2 as webapp\nfrom google.appengine.ext.webapp.util import run_wsgi_app\nfrom google.appengine.ext.webapp import template\nimport numpy as np\nimport cgi\nimport cgitb\nimport copy\ncgitb.enable()\nfrom loons impor...
[ [ "numpy.asarray" ] ]
glyg/napari
[ "be196dc979aed663a484f3a424dacc3227f7c958" ]
[ "napari/layers/shapes/shapes.py" ]
[ "import numpy as np\nfrom copy import copy, deepcopy\n\nfrom ...util.event import Event\nfrom ...util.misc import ensure_iterable\nfrom ...util.status_messages import format_float\nfrom ..base import Layer\nfrom vispy.color import get_color_names\nfrom ._constants import Mode, Box, BACKSPACE, shape_classes, ShapeTy...
[ [ "numpy.radians", "numpy.all", "numpy.max", "numpy.arctan2", "numpy.concatenate", "numpy.round", "numpy.divide", "numpy.unique", "numpy.sin", "numpy.ceil", "numpy.insert", "numpy.isin", "numpy.min", "numpy.append", "numpy.delete", "numpy.array", "...
iriproff/AuditoryCoding
[ "cbd474e18514bdccd651ed639f6d5dd05170814b" ]
[ "gammatone_utils.py" ]
[ "#!/usr/bin/env python2\n# -*- coding: utf-8 -*-\n\"\"\"\n@author: Rachid and Kimia\n\"\"\"\n\n\nimport numpy as np\n\n\ndef gammatone_function(resolution, fc, center, fs=16000, n=4, b=1.019):\n \"\"\"Define a single gammatone function\"\"\"\n t = np.linspace(0, resolution-(center+1), resolution-center)/fs\n ...
[ [ "numpy.log", "numpy.linspace", "numpy.asarray", "numpy.arange", "numpy.cos", "numpy.ones", "numpy.zeros", "numpy.sum" ] ]
proloyd/Eelbrain
[ "5606b9dffaa3aec2d58c1f14e6c3403a0fed4537", "5606b9dffaa3aec2d58c1f14e6c3403a0fed4537", "5606b9dffaa3aec2d58c1f14e6c3403a0fed4537" ]
[ "eelbrain/_stats/tests/test_testnd.py", "eelbrain/tests/test_design.py", "eelbrain/_experiment/mne_experiment.py" ]
[ "# Author: Christian Brodbeck <christianbrodbeck@nyu.edu>\nfrom itertools import product\nimport pickle\nimport logging\nimport pytest\nimport sys\n\nimport numpy as np\nfrom numpy.testing import assert_array_equal, assert_allclose\n\nimport eelbrain\nfrom eelbrain import Dataset, NDVar, Categorial, Scalar, UTS, Se...
[ [ "numpy.abs", "numpy.clip", "numpy.min", "numpy.arange", "numpy.sort", "numpy.testing.assert_array_equal", "numpy.random.normal", "numpy.equal", "numpy.array", "numpy.random.RandomState", "numpy.zeros", "numpy.empty" ], [ "numpy.all" ], [ "numpy.abs",...
pratishtha-abrol/tfx-addons
[ "ca9936442d60104e80dd04914e2a6ee6047d0d5c" ]
[ "tfrecord-to-numpy.py" ]
[ "# Reading a TFRecord file\n# Serialized tensors can be easily parsed using `tf.train.Example.ParseFromString`\n\nimport tensorflow as tf\nimport numpy as np\n\nfilename = \"something\"\nfilenames = [filename]\nraw_dataset = tf.data.TFRecordDataset(filenames)\nprint(raw_dataset)\n\nfor raw_record in raw_dataset.tak...
[ [ "tensorflow.data.TFRecordDataset", "tensorflow.train.Example" ] ]
kstennettlull/dagster
[ "dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6" ]
[ "examples/docs_snippets/docs_snippets/guides/dagster/dagster_type_factories/schema.py" ]
[ "import numpy as np\nimport pandas as pd\nimport pandera as pa\n\nMIN_DATE = pd.Timestamp(\"2021-10-01\")\n\ndf = pd.read_csv(\n \"./ebike_trips.csv\",\n parse_dates=[\"start_time\", \"end_time\"],\n)\n\ntrips_schema = pa.DataFrameSchema(\n columns={\n \"bike_id\": pa.Column(\n int, check...
[ [ "pandas.Timestamp", "pandas.read_csv" ] ]
minhncedutw/prac-keras-yolo3
[ "61b0d90a92875272eeeb27ee860d915475a9aecc" ]
[ "train_re.py" ]
[ "'''\n File name: keras-yolo3\n Author: minhnc-lab\n Date created(MM/DD/YYYY): 2019-05-03\n Last modified(MM/DD/YYYY HH:MM): 2019-05-03 10:28\n Python Version: 3.6\n Other modules: [None]\n\n Copyright = Copyright (C) 2017 of CONG-MINH NGUYEN\n Credits = [None] # people who reported bug fixe...
[ [ "numpy.random.shuffle", "numpy.random.seed", "tensorflow.device" ] ]
smokinmirror/raocp-toolbox
[ "56c45c1a720897c6cb241b6db74ca956adff7aa5" ]
[ "raocp/core/risks.py" ]
[ "import numpy as np\nimport raocp.core.cones as core_cones\n\n\nclass AVaR:\n \"\"\"\n Risk item: Average Value at Risk class\n \"\"\"\n\n def __init__(self, alpha, probabilities):\n \"\"\"\n :param alpha: AVaR risk parameter\n :param probabilities: list of probabilities of future e...
[ [ "numpy.asarray", "numpy.eye", "numpy.zeros", "numpy.ones" ] ]
cmeng94/dog-breed-classifier
[ "7178d82f9d654e2e95e8f5611c89353554094412" ]
[ "app/dog_classifier.py" ]
[ "import sys\nimport cv2\nimport numpy as np\nfrom tqdm import tqdm\n\nfrom keras.models import Sequential\nfrom keras.layers import Dropout, Flatten, Dense\nfrom keras.layers import Conv2D, MaxPooling2D, GlobalAveragePooling2D, GlobalMaxPooling2D\nfrom keras.callbacks import ModelCheckpoint \nfrom keras.preprocess...
[ [ "numpy.expand_dims", "numpy.argmax" ] ]
mattkjames7/Arase
[ "996167be35a13bbb1fdddfbe75e3a06d124b1d25", "996167be35a13bbb1fdddfbe75e3a06d124b1d25", "996167be35a13bbb1fdddfbe75e3a06d124b1d25" ]
[ "Arase/MGF/InterpObj.py", "Arase/MEPi/SavePADs.py", "Arase/XEP/DataAvailability.py" ]
[ "import numpy as np\nfrom .ReadMGF import ReadMGF\nfrom scipy.interpolate import interp1d\nfrom scipy.ndimage import uniform_filter\nimport DateTimeTools as TT\n\ndef InterpObj(Date,Coords='GSE',Smooth=None):\n\t'''\n\tReturn interpolation objects for MGF data.\n\t\n\t'''\n\t\n\t#read the data in\n\tmag = ReadMGF(D...
[ [ "scipy.interpolate.interp1d", "numpy.isfinite", "scipy.ndimage.uniform_filter" ], [ "numpy.size", "numpy.array" ], [ "numpy.unique" ] ]
ErosMLima/keras
[ "70d7d07bd186b929d81f7a8ceafff5d78d8bd701", "70d7d07bd186b929d81f7a8ceafff5d78d8bd701", "70d7d07bd186b929d81f7a8ceafff5d78d8bd701" ]
[ "keras/layers/preprocessing/string_lookup_test.py", "keras/utils/io_utils_test.py", "keras/callbacks_test.py" ]
[ "# Copyright 2020 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.compat.v2.data.Dataset.from_tensor_slices", "tensorflow.compat.v2.test.main", "tensorflow.compat.v2.io.gfile.GFile", "tensorflow.compat.v2.ragged.constant", "numpy.array" ], [ "tensorflow.compat.v2.test.main", "tensorflow.compat.v2.compat.v1.test.mock.patch.object" ],...
ribes96/TFG
[ "b38ac01da641e40551c1b3fefc1dc3ebd1b8b0a9", "b38ac01da641e40551c1b3fefc1dc3ebd1b8b0a9", "b38ac01da641e40551c1b3fefc1dc3ebd1b8b0a9", "b38ac01da641e40551c1b3fefc1dc3ebd1b8b0a9", "b38ac01da641e40551c1b3fefc1dc3ebd1b8b0a9", "b38ac01da641e40551c1b3fefc1dc3ebd1b8b0a9", "b38ac01da641e40551c1b3fefc1dc3ebd1b8b0a...
[ "code/bib/utils/fixes.py", "code/bib/neighbors/lof.py", "code/notebooks/python/demo_utils/demo_utils/demo2.py", "code/bib/feature_extraction/tests/test_text.py", "code/bib/mixture/tests/test_gaussian_mixture.py", "code/bib/cluster/tests/test_k_means.py", "code/bib/decomposition/pca.py" ]
[ "\"\"\"Compatibility fixes for older version of python, numpy and scipy\n\nIf you add content to this file, please give the version of the package\nat which the fixe is no longer needed.\n\"\"\"\n# Authors: Emmanuelle Gouillart <emmanuelle.gouillart@normalesup.org>\n# Gael Varoquaux <gael.varoquaux@normale...
[ [ "numpy.product", "numpy.asscalar", "scipy.sparse.issparse", "numpy.ma.getmaskarray", "numpy.asarray", "numpy.isnan", "numpy.compress", "numpy.percentile", "scipy.sparse.csr_matrix", "numpy.asmatrix", "numpy.diff", "numpy.isscalar", "numpy.array", "numpy.zero...
MichelDeudon/neural-combinatorial-rl-tensorflow
[ "b736384c31d4ea642f0b890c1c5df31d235b6938" ]
[ "Self_Net_TSP/actor.py" ]
[ "import tensorflow as tf\r\nimport numpy as np\r\nfrom tqdm import tqdm\r\nimport matplotlib.pyplot as plt\r\n\r\nfrom dataset import DataGenerator\r\nfrom encoder import Attentive_encoder\r\nfrom decoder import Pointer_decoder\r\nfrom critic import Critic\r\nfrom config import get_config, print_config\r\n\r\n\r\n\...
[ [ "tensorflow.control_dependencies", "tensorflow.reduce_sum", "tensorflow.stack", "tensorflow.cast", "tensorflow.global_variables", "tensorflow.train.AdamOptimizer", "tensorflow.summary.scalar", "tensorflow.Variable", "tensorflow.get_collection", "tensorflow.nn.moments", ...
fkluger/torchgeometry
[ "5f1a4dc8ff3647a60901b79aa90a4e799829a7a2", "5f1a4dc8ff3647a60901b79aa90a4e799829a7a2" ]
[ "test/integration/test_focal.py", "torchgeometry/losses/tversky.py" ]
[ "import logging\nimport pytest\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\nimport torchgeometry as tgm\n\nlogger = logging.getLogger(__name__)\n\n\nclass TestIntegrationFocalLoss:\n # optimization\n thresh = 1e-1\n lr = 1e-3\n num_iterations = 10...
[ [ "torch.LongTensor", "torch.nn.Conv2d", "torch.rand", "torch.nn.init.xavier_uniform_", "torch.nn.ReLU" ], [ "torch.mean", "torch.nn.functional.softmax", "torch.sum", "torch.is_tensor" ] ]
rish-16/pytorch-lightning-bolts
[ "dfbef7acbaf8992b1921dfa3b7846e77fb38fa22" ]
[ "pl_bolts/models/rl/vanilla_policy_gradient_model.py" ]
[ "import argparse\nfrom collections import OrderedDict\nfrom typing import Tuple, List\nfrom warnings import warn\n\nimport numpy as np\nimport pytorch_lightning as pl\nimport torch\nimport torch.optim as optim\nfrom pytorch_lightning import seed_everything\nfrom pytorch_lightning.callbacks import ModelCheckpoint\nf...
[ [ "torch.nn.functional.softmax", "torch.nn.functional.log_softmax", "torch.utils.data.DataLoader", "numpy.finfo", "torch.tensor", "numpy.mean" ] ]
robcalon/EMAworkbench
[ "c9e81d330c0f3b1f8ed5d0184500bd9b367a7326", "c9e81d330c0f3b1f8ed5d0184500bd9b367a7326" ]
[ "ema_workbench/connectors/vensimDLLwrapper.py", "ema_workbench/examples/feature_scoring_flu_overtime.py" ]
[ "\"\"\"\n\nthis is a first draft for wrapping the vensim dll in a pythonic way\n\nby default it is assumed the dll is readily available. If this generates an\nVensimError, you have to find the location of the dll and either copy it to\nC:\\Windows\\System32 and/or C:\\Windows\\SysWOW64, or use::\n\n vensim = cty...
[ [ "numpy.ctypeslib.as_array" ], [ "pandas.concat", "matplotlib.pyplot.show", "matplotlib.pyplot.subplots" ] ]
moyix/pytorch-cifar
[ "21a7c34104b95194bb9fedbefb640cb3f0fc2a0f" ]
[ "main.py" ]
[ "'''Train CIFAR10 with PyTorch.'''\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.nn.functional as F\nimport torch.backends.cudnn as cudnn\nimport numpy as np\n\nimport torchvision\nimport torchvision.transforms as transforms\n\nimport os\nimport argparse\n\nfrom models import *\nfr...
[ [ "torch.nn.CrossEntropyLoss", "numpy.random.choice", "torch.load", "torch.utils.data.DataLoader", "torch.no_grad", "torch.cuda.is_available", "torch.nn.DataParallel", "torch.save" ] ]
gxbjtu/stock
[ "2279fa1f3ab029123066f4c4d74db47d4c23e6a4", "2279fa1f3ab029123066f4c4d74db47d4c23e6a4" ]
[ "tf/minst_serving/mnist_input_data.py", "libs/common.py" ]
[ "# Copyright 2016 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appl...
[ [ "numpy.multiply", "numpy.arange", "numpy.dtype", "numpy.random.shuffle", "numpy.frombuffer", "numpy.zeros" ], [ "pandas.read_pickle" ] ]
Srijanb97/gcn_assignment
[ "a1df8a180eebb53b66c04c00eb3f88fa357fe382" ]
[ "src/modeling/tasks/graph_classification.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nclass GraphClassifier(nn.Module):\n def __init__(self, hidden_dim: int, num_classes: int, pooling_op: str):\n super(GraphClassifier, self).__init__()\n # TODO: Define the graph classifier\n # graph classifier can be an ...
[ [ "torch.nn.Linear" ] ]
TanguyUrvoy/normalizing-flows
[ "e485fe0875c117517353a9ab40e19ff951561cfc", "e485fe0875c117517353a9ab40e19ff951561cfc" ]
[ "normalizing_flows/flows/glow/glow_flow.py", "normalizing_flows/flows/glow/gaussianize.py" ]
[ "import tensorflow as tf\nimport tensorflow_probability as tfp\nimport numpy as np\nfrom normalizing_flows.flows import Flow, Transform\nfrom normalizing_flows.flows.affine import BatchNorm\nfrom . import (\n InvertibleConv,\n ActNorm,\n Squeeze,\n Split,\n AffineCoupling,\n Parameterize,\n Gau...
[ [ "tensorflow.keras.layers.Concatenate", "tensorflow.concat", "tensorflow.shape", "tensorflow.reshape", "tensorflow.keras.layers.Conv2D", "tensorflow.keras.Model", "tensorflow.zeros_like", "numpy.prod", "tensorflow.keras.layers.Reshape", "tensorflow.keras.layers.Flatten", ...
atztogo/phono3py
[ "37ac5b19e0cfa462d32d31cadd5fcb4f2ff6b477" ]
[ "setup.py" ]
[ "\"\"\"Phono3py setup.py.\"\"\"\nimport os\n\nimport numpy\nimport setuptools\n\n# Ensure that 'site.cfg' exists.\nif not os.path.exists(\"site.cfg\"):\n msg_list = [\n '\"site.cfg\" file is needed to run setup.py.',\n \"See about installation at https://phonopy.github.io/phono3py/install.html.\",\...
[ [ "numpy.distutils.system_info.dict_append", "numpy.distutils.system_info.get_info", "numpy.get_include" ] ]
zhixuanli/SLN-Amodal
[ "266c648f6838e37f3ada7223f212b21f730ffb64" ]
[ "data/amodalImage.py" ]
[ "import numpy as np\nimport random\nimport cv2,os,pickle\nfrom skimage import morphology\n\nclass amodalImage:\n def __init__(self, image_file=None):\n with open(image_file, 'rb') as fp:\n self.Image_anns = pickle.load(fp)\n\n # use number to label areas, 2**i = visual areas index for amodal...
[ [ "numpy.delete", "numpy.uint64", "numpy.zeros", "numpy.unique" ] ]
jorgepadilla19/gdsfactory
[ "68e1c18257a75d4418279851baea417c8899a165", "68e1c18257a75d4418279851baea417c8899a165", "68e1c18257a75d4418279851baea417c8899a165", "68e1c18257a75d4418279851baea417c8899a165", "68e1c18257a75d4418279851baea417c8899a165", "68e1c18257a75d4418279851baea417c8899a165", "68e1c18257a75d4418279851baea417c8899a16...
[ "gdsfactory/simulation/simphony/components/gc.py", "gdsfactory/functions.py", "gdsfactory/autoplacer/yaml_placer.py", "gdsfactory/simulation/plot.py", "fixme/p4/omegaconf_error.py", "gdsfactory/components/awg.py", "gdsfactory/tests/test_min_exclusion.py" ]
[ "from gdsfactory.config import sparameters_path\nfrom gdsfactory.simulation.simphony.model_from_sparameters import model_from_filepath\n\n\ndef gc1550te(filepath=sparameters_path / \"gc2dte\" / \"gc1550.dat\", numports=2):\n \"\"\"Returns Sparameter model for 1550nm TE grating_coupler.\n\n .. plot::\n ...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.show", "numpy.abs", "numpy.linspace" ], [ "numpy.array" ], [ "numpy.array" ], [ "matplotlib.pyplot.legend", "matplotlib.pyplot.plot", "numpy.log10", "matplotlib.pyplot.grid", "matplotlib.pyplot.xlabel", "mat...
msc5/attitudes
[ "89a3ab7aaf98e4985f1e0e6ac7e353a0798d677f" ]
[ "python/quaternion.py" ]
[ "\nimport numpy as np\n\n\nclass vector:\n\n def cross(v):\n v1, v2, v3 = v.squeeze()\n return np.array([\n [0, -v3, v2],\n [v3, 0, -v1],\n [-v2, v1, 0]\n ])\n\n\nclass quaternion:\n\n def from_theta(e, theta):\n n = 1 if not hasattr(theta, '__len__...
[ [ "numpy.eye", "numpy.cos", "numpy.sin", "numpy.concatenate", "numpy.array" ] ]
matthewli125/SRCFD
[ "77d117c7a98996c3b64c001c79eae04aa6a545f8" ]
[ "neural_net/fsrcnn_predict.py" ]
[ "from keras.models import load_model\r\nimport h5py\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport cv2\r\nfrom keras.optimizers import Adam\r\nimport os\r\nfrom keras import backend as K\r\nimport tensorflow as tf\r\n\r\ndef PSNR(y_true, y_pred):\r\n\tmax_pixel = 1.0\r\n\treturn 10.0 * tf_log10(...
[ [ "matplotlib.pyplot.imshow", "tensorflow.constant", "tensorflow.log" ] ]
PUTvision/sequentations
[ "1ecfa80918f87aa6d9d43a18e7a26bec27f9686f" ]
[ "tests/test_augmentations_transform.py" ]
[ "import pytest\nimport numpy as np\n\nimport context\nfrom sequentations.augmentations.transforms import RandomGamma, ColorJitter, Normalize\n\n\ndef test_random_gamma():\n arr = np.full((2, 100, 100, 3), fill_value=127, dtype=np.uint8)\n aug = RandomGamma()\n data = aug(image=arr, force_apply=True)['image...
[ [ "numpy.full", "numpy.all", "numpy.ones", "numpy.shape", "numpy.count_nonzero", "numpy.zeros" ] ]
Stanford-BIS/pystorm
[ "4acaaee78a04b69ad17554126018016800e5a140", "4acaaee78a04b69ad17554126018016800e5a140" ]
[ "pystorm/hal/net_builder.py", "pystorm/examples/measure_power_interleaved.py" ]
[ "import numpy as np\nimport pandas as pd\nfrom pystorm.hal.run_control import RunControl\nfrom pystorm.hal import data_utils\n\nclass NetBuilder(object):\n\n def __init__(self, HAL, net=None):\n \"\"\"Initialize NetBuilder:\n\n Inputs:\n =======\n HAL (HAL object) : \n net (hal...
[ [ "numpy.dot", "numpy.linalg.svd", "numpy.abs", "numpy.nonzero", "numpy.linalg.norm", "numpy.argmax", "numpy.random.randn", "numpy.array", "numpy.zeros", "numpy.sum", "numpy.vstack" ], [ "numpy.random.seed", "numpy.linspace", "numpy.min", "numpy.tile",...
MahdadJafarzadeh/ssccoorriinngg
[ "63c726e9e7d0f6d13032415c76b8c3bb1ff2bee3", "63c726e9e7d0f6d13032415c76b8c3bb1ff2bee3" ]
[ "Quality analysis/Sync_data.py", "Zmax_autoscoring_controlled_train_test_split.py" ]
[ "# -*- codiEEG_dsddsdsng: utf-8 -*-\n\"\"\"\nCreated on Mon Jun 29 20:08:11 2020\n\n@author: mahjaf\n\"\"\"\n\n#%% Import libs\n#####===================== Importiung libraries =========================#####\nimport mne\nimport numpy as np\nfrom scipy.integrate import simps\nfrom numpy import loadtxt\nimport h5py\...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.psd", "scipy.signal.correlate", "matplotlib.pyplot.rc", "matplotlib.pyplot.axes", "numpy.max", "numpy.arange", "matplotlib.pyplot.gcf", "scipy.signal.butter", "numpy.ravel", "matplotlib.pyplot.text", "matplotlib.pyplot....
SX-Aurora/nlcpy
[ "0a53eec8778073bc48b12687b7ce37ab2bf2b7e0", "0a53eec8778073bc48b12687b7ce37ab2bf2b7e0" ]
[ "tests/pytest/manipulation_tests/test_copy.py", "bench/stencil_bench/gen_graph.py" ]
[ "#\n# * The source code in this file is based on the soure code of CuPy.\n#\n# # NLCPy License #\n#\n# Copyright (c) 2020-2021 NEC Corporation\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following c...
[ [ "numpy.can_cast", "numpy.arange", "numpy.ones", "numpy.asanyarray", "numpy.empty" ], [ "matplotlib.pyplot.barh", "matplotlib.pyplot.subplots", "matplotlib.ticker.ScalarFormatter", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.yticks", "matplotlib.pyplot.tick_params...
jeffdaily/horovod
[ "49fd2ce76dec43cc2c3cafb983956beb298c8ef4" ]
[ "horovod/spark/common/util.py" ]
[ "# Copyright 2019 Uber Technologies, Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "numpy.array", "numpy.zeros", "numpy.prod" ] ]
Ezhil-Language-Foundation/mannangatti
[ "2146274c730f00749b76123a7c839c6fb3111e81", "2146274c730f00749b76123a7c839c6fb3111e81" ]
[ "tfdemo.py", "sample_image_dataset.py" ]
[ "# Freely adapted from Aymeric Damien's code\n# This code is attributed to original author with modifications to load Tamil MNIST like data.\n\"\"\" Neural Network.\nA 2-Hidden Layers Fully Connected Neural Network (a.k.a Multilayer Perceptron)\nimplementation with TensorFlow. This example is using the MNIST databa...
[ [ "tensorflow.nn.softmax_cross_entropy_with_logits", "tensorflow.nn.softmax", "tensorflow.matmul", "tensorflow.cast", "tensorflow.placeholder", "tensorflow.global_variables_initializer", "tensorflow.train.AdamOptimizer", "tensorflow.Session", "tensorflow.train.Saver", "numpy....
RussJH/udacity
[ "d8d08544927cc03ae1782700e172e0fc34b4cd85" ]
[ "Navigation/Model.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nclass QNetwork(nn.Module):\n \"\"\" QNetwork model\"\"\"\n\n def __init__(self, state_size, action_size, seed=0):\n \"\"\"Constructor for QNetwork model to initialize states, actions and random seed\n Args:\n sta...
[ [ "torch.nn.Linear", "torch.manual_seed" ] ]
YHRen/NGFP
[ "b1d7912846557f53d4492f8adebec7778c989a74", "b1d7912846557f53d4492f8adebec7778c989a74", "b1d7912846557f53d4492f8adebec7778c989a74" ]
[ "examples/evaluate_nfp_regression.py", "generate_nfp.py", "reproduce_main_results.py" ]
[ "import torch\nimport argparse\nimport hashlib\nimport pandas as pd\nimport numpy as np\nimport itertools as its\nfrom tabulate import tabulate\nfrom torch.utils.data import DataLoader\nfrom functools import partial\nfrom tqdm import tqdm\nfrom pathlib import Path, PurePath\nfrom warnings import warn\nfrom rdkit im...
[ [ "pandas.read_csv", "numpy.expand_dims", "sklearn.metrics.r2_score", "numpy.random.seed", "torch.load", "numpy.arange", "sklearn.metrics.mean_absolute_error", "scipy.stats.pearsonr", "torch.utils.data.DataLoader", "numpy.random.shuffle", "sklearn.metrics.mean_squared_err...
Kaminyou/110-1-NTU-DBME5028
[ "5aaef62cb5a3be4cbba28c2d252964a614183132", "5aaef62cb5a3be4cbba28c2d252964a614183132" ]
[ "week5-machine_learning/scripts/run_tune_example.py", "week5-machine_learning/src/utils.py" ]
[ "\"\"\"\npython ./scripts/run_tune_example.py\n\n# To see results\nfrom ray.tune import Analysis\nanalysis = Analysis(PATH_TO_EXP_DIR)\ndf = analysis.trial_dataframes\n\n\"\"\"\nimport sys\nimport os\nimport numpy as np\nfrom random import shuffle\nfrom collections import deque\nfrom dataclasses import dataclass, a...
[ [ "torch.abs", "torch.nn.CrossEntropyLoss", "torch.norm", "numpy.take", "numpy.arange", "torch.from_numpy", "torch.tensor", "numpy.mean", "torch.no_grad" ], [ "numpy.array", "matplotlib.pyplot.imshow", "matplotlib.pyplot.tight_layout", "sklearn.metrics.precisi...
nidhidamodaran/katib
[ "57a20ecfe679c661264cd9e28583c671512ab054" ]
[ "pkg/manager/v1alpha1/file-metricscollector/tf-event/tfevent_loader.py" ]
[ "import tensorflow as tf\nimport os\nfrom datetime import datetime\nimport rfc3339\nimport grpc\nimport api_pb2\nimport api_pb2_grpc\nimport sys\nfrom logging import getLogger, StreamHandler, INFO\nclass TFEventFileParser:\n def find_all_files(self, directory):\n for root, dirs, files in tf.gfile.Walk(dir...
[ [ "tensorflow.gfile.Walk", "tensorflow.gfile.IsDirectory", "tensorflow.train.summary_iterator" ] ]
Krishna00111/Stock-Price-Prediction
[ "4db6af067013ba1980c4664536cb5108f945f4c8" ]
[ "scripts/Algorithms/svm.py" ]
[ "#! /usr/bin/python\r\n'''\r\n Running Support Vector Regression Model.\r\n'''\r\nfrom __future__ import print_function\r\n\r\nimport os\r\nimport sys\r\nimport pandas as pd\r\nfrom sklearn.svm import SVR\r\nfrom sklearn import cross_validation\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nfrom dat...
[ [ "sklearn.svm.SVR", "sklearn.cross_validation.cross_val_score", "sklearn.cross_validation.train_test_split", "pandas.to_datetime" ] ]
cjshearer/project-athena
[ "3394da6cd6dbe1c1c2b84f0a2f58c5168c4c6775", "3394da6cd6dbe1c1c2b84f0a2f58c5168c4c6775" ]
[ "src/scripts/zhymir_scripts/task2_load_from_data.py", "src/scripts/zhymir_scripts/train_model.py" ]
[ "\"\"\" Loads raw prediction data from npy files\n to train model \"\"\"\nimport os\nimport keras\nimport numpy as np\n\nfrom sklearn.model_selection import train_test_split\nfrom scripts.zhymir_scripts.task2 import make_ensemble, add_checkpoint, train_model\nfrom utils.file import load_from_json\n\nmodel_config...
[ [ "numpy.concatenate", "numpy.savez_compressed", "sklearn.model_selection.train_test_split", "numpy.transpose" ], [ "numpy.load" ] ]
ItaloDias-stack/paintApplication
[ "9a6e2ce522352e304a05617bc1c504ca2fb1dfe8" ]
[ "main.py" ]
[ "from cv2 import cv2 as cv\nimport numpy as np\nfrom Pincel import Pincel\nfrom Cor import Cor\n\ndesenhando = False\ncor = Cor(0, 0, 0)\npincel = Pincel(0, 0, cor, 0)\n\ndef nada(x):\n pass\n\n\ndef desenho(event, x, y, flags, param):\n global pincel,cor,desenhando\n pincel.x = x\n pincel.y = y\n if...
[ [ "numpy.zeros" ] ]
DenDen047/d3rlpy
[ "6184518d52f961ba6ca9f045761f810706110aa7", "6184518d52f961ba6ca9f045761f810706110aa7" ]
[ "d3rlpy/algos/torch/awr_impl.py", "examples/atari/train_dqn.py" ]
[ "import torch\n\nfrom torch.optim import SGD\nfrom d3rlpy.models.torch.v_functions import create_value_function\nfrom d3rlpy.models.torch.policies import squash_action, create_normal_policy\nfrom d3rlpy.models.torch.policies import create_categorical_policy\nfrom .utility import torch_api, train_api, eval_api\nfrom...
[ [ "torch.no_grad" ], [ "sklearn.model_selection.train_test_split" ] ]
hpi-sam/GNN-TiborMaxTiago
[ "986b3cf1e15328f6a03aa1e7f979b3435fc98910" ]
[ "hypertune.py" ]
[ "from gnn.argparser import parse_arguments\nfrom utils import load_adjacency_matrix, get_device\nfrom gnn.dataset import TrafficDataset\nfrom torch.utils.data import DataLoader\nfrom gnn import models\nimport torch.optim as optim\nfrom run import run_epoch\nimport optuna\nimport logging\nimport inspect\nimport re\n...
[ [ "torch.utils.data.DataLoader" ] ]
Philyzh8/scTAG
[ "4c4a5b66787e8ef144049c881a4c6087c14eb131" ]
[ "train.py" ]
[ "import os\nimport numpy as np\nimport pandas as pd\nimport tensorflow as tf\nfrom numpy.random import seed\nfrom preprocess import *\nfrom utils import *\nimport argparse\n\nfrom sklearn.metrics import adjusted_rand_score, normalized_mutual_info_score\nfrom sklearn import metrics\nimport scipy.io as scio\nseed(1)\...
[ [ "numpy.random.seed", "numpy.unique", "sklearn.metrics.normalized_mutual_info_score", "tensorflow.compat.v1.logging.set_verbosity", "sklearn.cluster.SpectralClustering", "numpy.ceil", "sklearn.metrics.adjusted_rand_score", "numpy.array", "numpy.zeros", "tensorflow.random.set...
OP2/PyOP2
[ "be8adeab3f3a3dfee979843c9444249220cc0ae7", "be8adeab3f3a3dfee979843c9444249220cc0ae7" ]
[ "pyop2/types/mat.py", "pyop2/parloop.py" ]
[ "import abc\nimport ctypes\nimport itertools\n\nimport numpy as np\nfrom petsc4py import PETSc\n\nfrom pyop2 import (\n caching,\n configuration as conf,\n datatypes as dtypes,\n exceptions as ex,\n mpi,\n profiling,\n sparsity,\n utils\n)\nfrom pyop2.types.access import Access\nfrom pyop2.t...
[ [ "numpy.asarray", "numpy.dtype", "numpy.full", "numpy.prod", "numpy.zeros" ], [ "numpy.mean", "numpy.zeros_like", "numpy.zeros" ] ]
laochonlam/dali_backend
[ "461fe528d42a6ba48baa95c4b817cc757c351f55" ]
[ "qa/L0_DALI_GPU_ensemble/client.py" ]
[ "# The MIT License (MIT)\n#\n# Copyright (c) 2021 NVIDIA CORPORATION\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy of\n# this software and associated documentation files (the \"Software\"), to deal in\n# the Software without restriction, including without limitation the rights t...
[ [ "numpy.random.random", "numpy.random.randint" ] ]
sjvrijn/ConfiguringCMAES
[ "ff48885cbe15b86b90edd0279f6bdf8a43dfd85d" ]
[ "bbob/bbob_pproc/ppconverrorbars.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"Process data and generates some comparison results.\n\n Synopsis:\n python path_to_folder/bbob_pproc/runcompall.py [OPTIONS] FOLDER_NAME...\n\n Help:\n python path_to_folder/bbob_pproc/runcompall.py -h\n\n\"\"\"\n\nfrom __future__ import absolut...
[ [ "matplotlib.pyplot.gca", "matplotlib.pyplot.legend", "matplotlib.use", "numpy.median", "numpy.append", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.errorbar", "matplotlib.pyplot.grid", "matplotlib.pyplot.close", "matplotlib.pyplot.xlabel", "numpy.empty", "matplotl...
842974287/glow
[ "7d77eb9a1c00dbba77321f62ad9c9078beb2b725" ]
[ "torch_glow/tests/nodes/add_test.py" ]
[ "from __future__ import absolute_import, division, print_function, unicode_literals\n\nimport unittest\n\nimport torch\nfrom tests.utils import jitVsGlow\n\n\nclass TestAdd(unittest.TestCase):\n def test_add_basic(self):\n \"\"\"Basic test of the PyTorch add Node on Glow.\"\"\"\n\n def test_f(a, b)...
[ [ "torch.randn" ] ]
loic-beheshti/pytorch-lightning
[ "6ac16ff34822cef9b3c16e54f872655b585a066a" ]
[ "pytorch_lightning/trainer/training_loop.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.isfinite", "numpy.argmax", "numpy.cumsum" ] ]
dawn1206/X2Paddle
[ "3ad9b82230f2a30fd709fdfb49147678bf0ed4e2" ]
[ "x2paddle/project_convertor/pytorch/torch2paddle/vision_transforms.py" ]
[ "# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless r...
[ [ "numpy.array", "numpy.expand_dims" ] ]
VinAIResearch/mDSDI
[ "8ec49085d8389ab490ec633c3ae4bf66be085366" ]
[ "DomainBed/domainbed/lib/fast_data_loader.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n\nimport torch\n\n\nclass _InfiniteSampler(torch.utils.data.Sampler):\n \"\"\"Wraps another Sampler to yield an infinite stream.\"\"\"\n\n def __init__(self, sampler):\n self.sampler = sampler\n\n def __iter__(self):\n w...
[ [ "torch.utils.data.RandomSampler", "torch.utils.data.WeightedRandomSampler", "torch.utils.data.BatchSampler" ] ]
taklpw/Link-Cruiser
[ "ec82b3f94dbfbbcda01b1ab156ee24fb01f27eaf" ]
[ "map_from_bag.py" ]
[ "import numpy as np\r\nimport cv2\r\nimport pyrealsense2 as rs\r\nimport pyqtgraph.colormap\r\nfrom pyqtgraph.Qt import QtCore, QtGui\r\nimport pyqtgraph.opengl as gl\r\nimport sys\r\n\r\n\r\n# Initialise OpenGL app\r\napp = QtGui.QApplication(sys.argv)\r\n\r\n\r\ndef get_pointcloud(depth_image, color_frame, img, i...
[ [ "numpy.hstack", "numpy.dot", "numpy.ones_like", "numpy.logical_and", "numpy.clip", "numpy.ones", "numpy.copy", "numpy.asanyarray", "numpy.array", "numpy.vstack" ] ]
ivan-bilan/tac-self-attention
[ "8dd583ac960716bbf0c645c23f2c50bd36ca042a" ]
[ "ensemble.py" ]
[ "\"\"\"\nEnsemble the predictions from different model outputs.\n\"\"\"\nimport argparse\nimport json\nimport pickle\nimport numpy as np\nfrom collections import Counter\n\nfrom data.loader import DataLoader\nfrom utils import scorer, constant\n\n\ndef parse_args():\n parser = argparse.ArgumentParser()\n pars...
[ [ "numpy.array" ] ]
Amonsoft/catalyst
[ "d9762e8646d46fa1dcda29151388ebcd0734337f", "28060bf11fc34966438c24c688caf335bf15f1d7" ]
[ "catalyst/gens/tradesimulation.py", "catalyst/finance/risk/period.py" ]
[ "#\n# Copyright 2015 Quantopian, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or...
[ [ "pandas.tslib.normalize_date" ], [ "numpy.arange", "pandas.Series", "pandas.isnull" ] ]
ryanjmccall/feets
[ "56c0887ffc3f9d19b00606263b645b9f518d1574", "56c0887ffc3f9d19b00606263b645b9f518d1574" ]
[ "feets/tests/test_FATS_to_feets.py", "experiments/data_syn.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# The MIT License (MIT)\n\n# Copyright (c) 2017 Juan Cabral\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, ...
[ [ "numpy.arange", "numpy.random.RandomState", "pandas.DataFrame", "numpy.load" ], [ "numpy.arange", "numpy.sin", "numpy.random.normal", "numpy.random.uniform", "numpy.random.RandomState" ] ]
kushbanga/phylib
[ "a4c7262b4ebcd6edb29409e2c08c5870fc9444eb" ]
[ "phylib/io/tests/test_datasets.py" ]
[ "# -*- coding: utf-8 -*-\n\n\"\"\"Tests of dataset utility functions.\"\"\"\n\n#------------------------------------------------------------------------------\n# Imports\n#------------------------------------------------------------------------------\n\nimport logging\nfrom pathlib import Path\nfrom itertools impor...
[ [ "numpy.frombuffer", "numpy.linspace" ] ]
hieunq95/federated
[ "15402997ce7fb35d782d715758acf82767206916", "15402997ce7fb35d782d715758acf82767206916" ]
[ "tensorflow_federated/python/core/impl/transformations_test.py", "tensorflow_federated/python/tensorflow_libs/tensor_utils_test.py" ]
[ "# Lint as: python3\n# Copyright 2018, The TensorFlow Federated 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# ...
[ [ "tensorflow.constant" ], [ "tensorflow.TensorShape", "tensorflow.Graph", "tensorflow.constant", "tensorflow.nest.assert_same_structure", "tensorflow.Variable", "tensorflow.local_variables_initializer", "tensorflow.Dimension", "tensorflow.placeholder", "tensorflow.nest.m...
Fork-for-Modify/CSENDistance
[ "6f6d1b87ea776389d543c7873422e44b35a3f0af" ]
[ "cl_csen_regressor/model.py" ]
[ "import os\nimport tensorflow as tf\ntf.random.set_seed(10)\nimport numpy as np\n\nfrom cl_csen_regressor.utils import *\n\nclass model:\n def __init__(self):\n self.imageSizeM = 80\n self.imageSizeN = 15\n self.model = None\n self.history = None\n self.x_train = None\n ...
[ [ "tensorflow.keras.callbacks.ModelCheckpoint", "tensorflow.keras.Input", "tensorflow.keras.models.Model", "tensorflow.keras.layers.Dense", "tensorflow.keras.layers.Conv2D", "tensorflow.keras.optimizers.Adam", "numpy.zeros", "tensorflow.keras.layers.Reshape", "tensorflow.keras.la...
roychen97/detect_and_track
[ "aaff2178bbe75aad9019cc0193a85c9c60cdda87", "aaff2178bbe75aad9019cc0193a85c9c60cdda87" ]
[ "ssdface_freeze/import numpy as np.py", "preprocessing/preprocessing_unittest.py" ]
[ "import numpy as np\n\n\nnum = [3,5,6,9]\nsplit_param = []\nsplit_param.append(len(num[0]))\nfor layer_num in num[1:-2]:\n split_param.append(layer_num + split_param[-1])\nprint(split_param)\n\n\nto_split = np.range(23)\nsplit = np.split(to_split, split_param)\nprint(split)", "# Copyright 2018 Changan Wang\n\n...
[ [ "numpy.split", "numpy.range" ], [ "tensorflow.clip_by_value", "tensorflow.transpose", "tensorflow.FixedLenFeature", "tensorflow.local_variables_initializer", "tensorflow.train.start_queue_runners", "tensorflow.train.Coordinator", "tensorflow.ones_like", "numpy.copy", ...
AmanPriyanshu/entity-embeddings-from-scratch
[ "6a8a1f1f0da97d711cf1c71f13ff17f756a052a8" ]
[ "embedding_layer.py" ]
[ "import torch\nimport numpy as np\n\nclass EntityEmbedding(torch.nn.Module):\n\tdef __init__(self, vocab_size, hidden_size, input_size):\n\t\tsuper(EntityEmbedding, self).__init__()\n\t\tself.input_size = input_size\n\t\tself.hidden_size = hidden_size\n\t\tself.vocab_size = vocab_size\n\t\tself.softmax = torch.nn.S...
[ [ "torch.nn.Softmax", "torch.mean", "torch.nn.Parameter", "torch.mm", "numpy.sqrt", "torch.Tensor", "torch.zeros", "torch.tensor", "torch.FloatTensor" ] ]
threewisemonkeys-as/PyTorch-VAE
[ "4ed0fc7581d4792b435134aa9e06d5e35a5db118", "4ed0fc7581d4792b435134aa9e06d5e35a5db118", "4ed0fc7581d4792b435134aa9e06d5e35a5db118", "4ed0fc7581d4792b435134aa9e06d5e35a5db118" ]
[ "tests/test_vae.py", "models/dfcvae.py", "models/miwae.py", "models/swae.py" ]
[ "import unittest\n\nimport torch\nfrom models import VanillaVAE\nfrom torchsummary import summary\n\n\nclass TestVAE(unittest.TestCase):\n def setUp(self) -> None:\n # self.model2 = VAE(3, 10)\n self.model = VanillaVAE(3, 10)\n\n def test_summary(self):\n print(summary(self.model, (3, 64,...
[ [ "torch.randn" ], [ "torch.randn_like", "torch.nn.Sequential", "torch.nn.ConvTranspose2d", "torch.randn", "torch.nn.Conv2d", "torch.nn.Tanh", "torch.exp", "torch.nn.Linear", "torch.nn.functional.mse_loss", "torch.nn.LeakyReLU", "torch.nn.BatchNorm2d", "torch....
gnoses/TensorFlow
[ "4ac9c09d5ca57a03b8daa5fb9e295947b1619854", "63a21e054007d86269ed1ad0145ebce04ee57a81", "63a21e054007d86269ed1ad0145ebce04ee57a81", "63a21e054007d86269ed1ad0145ebce04ee57a81" ]
[ "tensorflow/contrib/learn/python/learn/utils/input_fn_utils.py", "tensorflow/python/debug/session_debug_testlib.py", "tensorflow/contrib/learn/python/learn/estimators/kmeans_test.py", "tensorflow/contrib/distributions/python/ops/mixture.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.ops.array_ops.placeholder", "tensorflow.python.ops.parsing_ops.parse_example", "tensorflow.python.framework.tensor_shape.TensorShape" ], [ "tensorflow.core.protobuf.config_pb2.RunMetadata", "tensorflow.python.ops.math_ops.subtract", "tensorflow.python.ops.state_ops.a...