repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
miyosuda/rodent | [
"3d60a234eecd5e2476b186365eb121f0f3655c2e"
] | [
"examples/02_nav_maze_static/main.py"
] | [
"# -*- coding: utf-8 -*-\nimport numpy as np\nimport pygame, sys\nfrom pygame.locals import *\n\nfrom nav_maze_static_environment import NavMazeStaticEnvironment\n\nBLACK = (0, 0, 0)\n\n\nclass RandomAgent(object):\n def __init__(self, action_num):\n self.action_num = action_num\n\n def choose_action(s... | [
[
"numpy.random.randint"
]
] |
popura/deepy-pytorch | [
"71d87a82e937d82b9b149041280a392cc24b7299"
] | [
"deepy/data/audio/transform.py"
] | [
"import random\n\nimport torch\n\nfrom deepy.data.transform import Transform, SeparatedTransform\nfrom deepy.data.transform import PairedTransform, PairedCompose, ToPairedTransform\nfrom deepy.nn import functional as myF\n\n\nclass RandomCrop(Transform):\n def __init__(self, length: int, generator=None):\n ... | [
[
"torch.randint"
]
] |
ikamensh/machin | [
"af7b423c47bc1412530cf6c96c11bd3af9b3e239",
"af7b423c47bc1412530cf6c96c11bd3af9b3e239"
] | [
"machin/frame/buffers/buffer.py",
"test/frame/algorithms/test_maddpg.py"
] | [
"from typing import Union, Dict, List, Tuple, Any, Callable\nfrom ..transition import (\n Transition,\n Scalar,\n TransitionStorageSmart,\n TransitionStorageBasic,\n)\nimport torch as t\nimport random\n\n\nclass Buffer:\n def __init__(self, buffer_size, buffer_device=\"cpu\", *_, **__):\n \"\"... | [
[
"torch.tensor",
"torch.is_tensor",
"torch.cat"
],
[
"torch.zeros",
"torch.cat",
"torch.tensor",
"torch.nn.Linear",
"torch.no_grad",
"torch.nn.MSELoss"
]
] |
akshit-protonn/models | [
"38c8c6fe4144c93d6aadd19981c2b90570c29eba",
"38c8c6fe4144c93d6aadd19981c2b90570c29eba",
"38c8c6fe4144c93d6aadd19981c2b90570c29eba",
"38c8c6fe4144c93d6aadd19981c2b90570c29eba",
"38c8c6fe4144c93d6aadd19981c2b90570c29eba",
"38c8c6fe4144c93d6aadd19981c2b90570c29eba",
"38c8c6fe4144c93d6aadd19981c2b90570c29eb... | [
"official/nlp/modeling/networks/encoder_scaffold_test.py",
"research/delf/delf/python/detect_to_retrieve/cluster_delf_features.py",
"official/vision/beta/projects/yt8m/modeling/yt8m_model_test.py",
"official/vision/beta/modeling/factory_test.py",
"research/object_detection/utils/variables_helper.py",
"off... | [
"# Copyright 2021 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.layers.Input",
"tensorflow.keras.mixed_precision.set_global_policy",
"tensorflow.keras.Input",
"tensorflow.keras.utils.get_registered_name",
"tensorflow.test.main",
"tensorflow.keras.utils.register_keras_serializable",
"tensorflow.keras.Model",
"tensorflow.keras.i... |
emcoglab/sensorimotor-distance-paper-2021 | [
"94464bb391ea42ffad8bcef6b087c1343ecbe2c7"
] | [
"exclusivity_correlation.py"
] | [
"\"\"\"\n===========================\nComputes the correlation between pairwise distances and mean exclusivity ratings for randomly drawn pairs of norms.\n===========================\n\nDr. Cai Wingfield\n---------------------------\nEmbodied Cognition Lab\nDepartment of Psychology\nUniversity of Lancaster\nc.wingf... | [
[
"numpy.corrcoef",
"numpy.zeros",
"numpy.random.seed",
"numpy.random.default_rng"
]
] |
AnastasiaaSenina/openvino_training_extensions | [
"267425d64372dff5b9083dc0ca6abfc305a71449",
"7d606a22143db0af97087709d63a2ec2aa02036c",
"7d606a22143db0af97087709d63a2ec2aa02036c",
"7d606a22143db0af97087709d63a2ec2aa02036c",
"05cb9b30e8220445fcb27988926d88f330091c12",
"267425d64372dff5b9083dc0ca6abfc305a71449"
] | [
"pytorch_toolkit/action_recognition/action_recognition/models/multi_frame_baseline.py",
"pytorch_toolkit/face_recognition/model/backbones/se_resnext.py",
"pytorch_toolkit/nncf/tests/sparsity/magnitude/test_algo.py",
"pytorch_toolkit/face_recognition/train.py",
"pytorch_toolkit/face_recognition/tests/test_mo... | [
"from torch import nn as nn\nfrom torch.nn import functional as F\n\nfrom ..utils import get_fine_tuning_parameters\nfrom .backbone import make_encoder\nfrom .modules import squash_dims, unsquash_dim\n\n\nclass MultiFrameBaseline(nn.Module):\n \"\"\"Simple baseline that runs a classifier on each frame independen... | [
[
"torch.nn.Linear",
"torch.nn.functional.avg_pool2d",
"torch.nn.Dropout2d"
],
[
"torch.nn.Sequential",
"torch.nn.Conv2d",
"torch.nn.MaxPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
],
[
"torch.ones",
"torch.eq",
"torch.no_grad",
"torch.allclose",
"torc... |
KazukiOnodera/Microsoft-Malware-Prediction | [
"103cbf7c4fc98ae584e1aa9d1c220bb79ddbbd80",
"103cbf7c4fc98ae584e1aa9d1c220bb79ddbbd80",
"103cbf7c4fc98ae584e1aa9d1c220bb79ddbbd80",
"103cbf7c4fc98ae584e1aa9d1c220bb79ddbbd80"
] | [
"py/trash/005-2_agg_each_lgb_1.py",
"py/trash/010_share_in_OsVer.py",
"py/trash/016_share_in_AvSig_v.py",
"py/004_countEncoding_each.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Feb 5 22:33:48 2019\n\n@author: Kazuki\n\"\"\"\n\nimport numpy as np\nimport pandas as pd\nimport os, gc\nfrom glob import glob\nfrom tqdm import tqdm\n\nimport sys\nsys.path.append(f'/home/{os.environ.get(\"USER\")}/PythonLibrary')\nimport l... | [
[
"pandas.read_csv",
"pandas.read_feather",
"numpy.random.randint"
],
[
"pandas.merge",
"pandas.read_feather",
"pandas.DataFrame"
],
[
"pandas.merge",
"pandas.read_feather",
"pandas.DataFrame"
],
[
"pandas.concat",
"pandas.read_feather",
"pandas.DataFrame"... |
jdavidrcamacho/tedi | [
"f963e781e0a3c7be3df338a85a08ab974b6b8019",
"f963e781e0a3c7be3df338a85a08ab974b6b8019"
] | [
"tedi/kernels.py",
"tedi/utils.py"
] | [
"\"\"\"\nCovariance functions\n\"\"\"\nimport numpy as np\n#because it makes life easier down the line\npi, exp, sine, cosine, sqrt = np.pi, np.exp, np.sin, np.cos, np.sqrt\n__all__ = ['Constant', 'WhiteNoise', 'SquaredExponential' , 'Periodic', \n 'QuasiPeriodic', 'RationalQuadratic', 'Cosine', 'Exponen... | [
[
"numpy.ones_like",
"numpy.abs",
"numpy.sqrt",
"numpy.tan",
"numpy.sign",
"numpy.append",
"numpy.array"
],
[
"scipy.stats.invgamma",
"numpy.sqrt",
"numpy.linspace",
"numpy.power",
"matplotlib.pyplot.subplots",
"numpy.cos",
"numpy.sin",
"numpy.cbrt",
... |
aynetdia/flair | [
"7e0958423ceb9744a87b0c27fd66f7be4caf0d99"
] | [
"flair/embeddings/document.py"
] | [
"from abc import abstractmethod\nimport logging\nfrom typing import List, Union\n\nimport torch\nfrom torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence\nfrom transformers import AutoTokenizer, AutoConfig, AutoModel, CONFIG_MAPPING, PreTrainedTokenizer\n\nimport flair\nfrom flair.data import Senten... | [
[
"torch.mean",
"torch.max",
"torch.zeros",
"torch.cat",
"torch.nn.GRU",
"torch.nn.utils.rnn.pad_packed_sequence",
"torch.no_grad",
"torch.nn.Dropout",
"torch.ones",
"torch.eye",
"torch.nn.utils.rnn.pack_padded_sequence",
"torch.tensor",
"sklearn.feature_extractio... |
Penn-TopGuNN/TopGuNN | [
"e736e467f1991a33c5ee54407665cbd9fef1e521"
] | [
"code/embed_and_filter.py"
] | [
"import numpy as np\nimport torch\nfrom transformers import BertTokenizer, BertModel\nfrom torch.utils.data import DataLoader \nimport util\nfrom util import MaskableList\nfrom collections import defaultdict, Counter\nfrom sentence_transformers import SentenceTransformer\nimport spacy\nimport time\nimport itertools... | [
[
"numpy.in1d",
"torch.utils.data.DataLoader",
"torch.tensor",
"sklearn.preprocessing.normalize",
"torch.no_grad",
"torch.cuda.device",
"numpy.array",
"torch.stack"
]
] |
dantaslab/resfams_update | [
"982091818a299d316811fe98c7656762be7284fb"
] | [
"Analysis/Precision-Recall_Analysis/scripts/add_tp_seqs.py"
] | [
"import sys\nimport os\nimport pandas as pd\nimport csv\nimport argparse\nfrom collections import OrderedDict\nfrom io import StringIO\n\n\ndef main(argv):\n args = parse_arguments(argv)\n out = args.out_path\n file1 = args.file1\n file2 = args.file2\n file3 = args.file3\n\n\n ddf1 = addSeqs(file1... | [
[
"pandas.read_table",
"pandas.concat"
]
] |
mendezr/MetPy | [
"0c75c14ac4af360b06ed7c4735b17709caef2449"
] | [
"metpy/io/tests/test_io_tools.py"
] | [
"# Copyright (c) 2016 MetPy Developers.\n# Distributed under the terms of the BSD 3-Clause License.\n# SPDX-License-Identifier: BSD-3-Clause\n\"\"\"Test the `io.tools` module.\"\"\"\n\nimport numpy as np\nimport pytest\n\nfrom metpy.io._tools import hexdump, UnitLinker\nfrom metpy.io.cdm import Dataset\nfrom metpy.... | [
[
"numpy.arange"
]
] |
mcx/open_spiel | [
"062cbfc07621343e7d77209cb421ba690328142b",
"062cbfc07621343e7d77209cb421ba690328142b",
"062cbfc07621343e7d77209cb421ba690328142b",
"062cbfc07621343e7d77209cb421ba690328142b",
"062cbfc07621343e7d77209cb421ba690328142b",
"062cbfc07621343e7d77209cb421ba690328142b"
] | [
"open_spiel/python/algorithms/double_oracle_test.py",
"open_spiel/python/egt/dynamics_test.py",
"open_spiel/python/mfg/algorithms/mirror_descent.py",
"open_spiel/python/environments/catch.py",
"open_spiel/python/examples/bridge_supervised_learning.py",
"open_spiel/python/pytorch/rcfr.py"
] | [
"# Copyright 2019 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 applic... | [
[
"numpy.ones"
],
[
"numpy.asarray",
"numpy.arange",
"numpy.eye",
"numpy.ones",
"numpy.testing.assert_array_equal",
"numpy.zeros",
"numpy.divide"
],
[
"numpy.exp"
],
[
"numpy.random.RandomState",
"numpy.zeros"
],
[
"numpy.zeros",
"numpy.random.shuf... |
nan-wang/PaddleOCR | [
"09604c38e42591c240771edbbff43a6dd7ebf592",
"09604c38e42591c240771edbbff43a6dd7ebf592"
] | [
"tools/infer_table.py",
"ppocr/data/imaug/iaa_augment.py"
] | [
"# Copyright (c) 2020 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 re... | [
[
"numpy.expand_dims"
],
[
"numpy.array"
]
] |
allisonchen23/Pensieve-PPO2 | [
"c4add70d3e1e28a6d2e90f2571ca53d1d35647e1"
] | [
"src/a2c.py"
] | [
"import tflearn\nimport math\nimport numpy as np\nimport tensorflow as tf\nimport os\nimport time\nos.environ['CUDA_VISIBLE_DEVICES'] = '2'\n\nFEATURE_NUM = 128\nEPS = 1e-4\nGAMMA = 0.99\n\n\nclass Network():\n def CreateNetwork(self, inputs):\n with tf.variable_scope('actor'):\n split_0 = tfle... | [
[
"tensorflow.clip_by_value",
"tensorflow.multiply",
"tensorflow.reduce_mean",
"tensorflow.get_collection",
"tensorflow.placeholder",
"tensorflow.stop_gradient",
"tensorflow.log",
"tensorflow.train.AdamOptimizer",
"tensorflow.variable_scope"
]
] |
coryschwartz/nebula-crawler | [
"34ebe1109a5117949b4f285891a065adcc0bae08",
"34ebe1109a5117949b4f285891a065adcc0bae08",
"34ebe1109a5117949b4f285891a065adcc0bae08"
] | [
"analysis/mixed/plot_churn.py",
"analysis/report/plot_crawl.py",
"analysis/mixed/plot_geo_dangle.py"
] | [
"import psycopg2\nimport toml\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom lib import node_time, node_uptime\n\nconfig = toml.load(\"./db.toml\")['psql']\nconn = psycopg2.connect(\n host=config['host'],\n port=config['port'],\n database=config['database'],\n user=config['user'],\n passw... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.gca",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.rc",
"numpy.cumsum",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib... |
bendevera/DS-Unit-3-Sprint-2-SQL-and-Databases | [
"24290da3bdbfaaadfa87c23f6f4196e2220360ab"
] | [
"module2-sql-for-analysis/insert_titantic.py"
] | [
"import pandas as pd \nimport psycopg2\nimport os\nfrom dotenv import load_dotenv\nload_dotenv()\n\n# read in our data\ndf = pd.read_csv('./titanic.csv')\nprint(f\"DF shape: {df.shape}\")\n\n# create connection to db we want to move the data to\nconn = psycopg2.connect(\n host=os.getenv('DB_HOST'), \n dbname=... | [
[
"pandas.read_csv"
]
] |
cclauss/h2o4gpu | [
"9885416deb3285f5d0f33023d6c07373ac4fc0b7"
] | [
"src/interface_py/h2o4gpu/util/import_data.py"
] | [
"#- * - encoding : utf - 8 - * -\n\"\"\"\n:copyright: 2017-2018 H2O.ai, Inc.\n:license: Apache License Version 2.0 (see LICENSE for details)\n\"\"\"\n\n\ndef import_data(data_path,\n use_pandas=False,\n intercept=True,\n valid_fraction=0.2,\n classificat... | [
[
"numpy.array",
"pandas.read_csv",
"numpy.ones"
]
] |
geez0219/ARC | [
"f2176f0d442d4a2d6028f0770b1efc1a9ae982b8",
"f2176f0d442d4a2d6028f0770b1efc1a9ae982b8",
"f2176f0d442d4a2d6028f0770b1efc1a9ae982b8"
] | [
"source/meta_compare/language_modeling/sls_language_modeling.py",
"source/normal_compare/image_classification/base_lr.py",
"source/normal_compare/language_modeling/base_lr.py"
] | [
"import os\n\nimport fastestimator as fe\nimport numpy as np\nimport sls\nimport torch\nimport torch.nn as nn\nimport wget\nfrom fastestimator.op.numpyop import NumpyOp\nfrom fastestimator.op.tensorop import TensorOp\nfrom fastestimator.op.tensorop.loss import CrossEntropy\nfrom fastestimator.op.tensorop.model impo... | [
[
"torch.nn.Dropout",
"torch.nn.LSTM",
"torch.nn.Embedding",
"torch.nn.Linear",
"torch.nn.init.xavier_uniform_",
"numpy.array",
"numpy.exp"
],
[
"tensorflow.python.keras.layers.BatchNormalization",
"tensorflow.python.keras.layers.Add",
"tensorflow.python.keras.layers.Acti... |
longyearxuk/sokrg | [
"001fcf8275eb158765de4e99e0d442b1712aa061"
] | [
"visualize_normal_score_transfers.py"
] | [
"import pandas as pd\nimport matplotlib.pyplot as plt\nfrom numpy.random import randn\nfrom krg_utils import transform_normal_scores\n\nr = randn(10000)\nslip_sc = pd.read_csv('slip_nscore_transform_table.csv')\n\nslip = transform_normal_scores(r, slip_sc)\n\navg_slip = slip_sc['x'].sum() / len(slip_sc['x'])\navg_s... | [
[
"pandas.read_csv",
"numpy.random.randn",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.show"
]
] |
rajayalamanchili/image_caption_generator | [
"0d1b8a3262b3dcf9329c4685d9f4026bdf7274db"
] | [
"src/visualization/visualize.py"
] | [
"from src.data.datasets import FlickrDataset\nfrom src.config import config\n\nimport matplotlib.pyplot as plt\nimport torch\nfrom PIL import Image\n\ndef display_img_FlickrDataset(dataset, index=0, predicted_caption=None):\n \n image = Image.open(dataset.images_directory / dataset.image_ids[index])\n capt... | [
[
"matplotlib.pyplot.figure"
]
] |
fhmjones/ocgy-dv-fjversion | [
"176a47d28daabc93821f37decb38fff320491885"
] | [
"dashdir/parse-csv.py"
] | [
"# any work with the data file\n# make a nicer csv to pull from\nimport pandas as pd\nimport gsw\n\n\n# all of the parameters from the full data: 'Longitude [degrees_east]', 'Latitude [degrees_north]',\n# 'PRESSURE [dbar]', 'DEPTH [m]', 'CTDTMP [deg C]', 'CTDSAL', 'SALINITY_D_CONC_BOTTLE', 'SALINITY_D_CONC_PUMP',\n... | [
[
"pandas.concat",
"pandas.read_csv"
]
] |
agtoever/twixtbot-ui | [
"366d7bef33fdbaa260ea8b3330fa9ab29ad05f03"
] | [
"src/plot.py"
] | [
"\nfrom matplotlib.backends.backend_tkagg import FigureCanvasTkAgg\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport constants as ct\n\n\nclass ThreeBarPlot():\n\n def __init__(self, canvas, bar_color):\n self.bar_color = bar_color\n self.prepare(canvas)\n\n def update(self, values=No... | [
[
"numpy.arange",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.subplots_adjust",
"matplotlib.backends.backend_tkagg.FigureCanvasTkAgg"
]
] |
hanouticelina/reinforcement-learning | [
"c7c6765486ea9546bbd8ce75e6032a408a1410cf",
"c7c6765486ea9546bbd8ce75e6032a408a1410cf",
"c7c6765486ea9546bbd8ce75e6032a408a1410cf"
] | [
"TME 8. DDPG/utils.py",
"TME 1. Bandits/bandits.py",
"TME 11. MADDPG/utils.py"
] | [
"import time\nimport subprocess\nfrom collections import namedtuple,defaultdict\nimport logging\nimport json\nimport os\nimport yaml\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport sys\nimport threading\nimport numpy as np\nimport gym\nfrom collections import deque\... | [
[
"numpy.dot",
"torch.max",
"numpy.sqrt",
"torch.cat",
"torch.tanh",
"numpy.concatenate",
"torch.FloatTensor",
"numpy.random.randn",
"numpy.where",
"numpy.clip",
"torch.nn.BatchNorm1d",
"numpy.power",
"torch.nn.ModuleList",
"torch.nn.Conv2d",
"torch.nn.Lin... |
dhrubokarmaker/RoeBot | [
"fbd86c6c2e5930b0ec41be1b6001ad182cb8e49c"
] | [
"main.py"
] | [
"import nltk \nfrom nltk.stem.lancaster import LancasterStemmer\nfrom nltk.tokenize import word_tokenize\nfrom tensorflow.python.ops.gen_array_ops import expand_dims_eager_fallback\n\nstemmer = LancasterStemmer()\n\nimport numpy\nimport tflearn\nimport random\nimport json\nimport tensorflow as tf\nimport pickle\nim... | [
[
"numpy.array",
"tensorflow.compat.v1.reset_default_graph",
"numpy.argmax"
]
] |
joegle/hrv-biofeedback | [
"08152889798d41bd9246c4550174377bf3eaa8f1"
] | [
"python-heart/examples/record.py"
] | [
"#!/usr/bin/env python2\nfrom __future__ import print_function\nimport heart\nimport datetime\nimport time\nimport sys\nimport numpy as np\nimport argparse\nimport os\nimport stat\n\nclass recorder(heart.Heart_Monitor):\n \"\"\"Command line tool that records the Arduino heart beat data into timestamped file\"\"\... | [
[
"numpy.std",
"numpy.average",
"numpy.sum"
]
] |
jasonleeinf/nmtlab | [
"122b70cc226d9ce17ad106a3bd3a5318bd3b359f",
"122b70cc226d9ce17ad106a3bd3a5318bd3b359f"
] | [
"nmtlab/trainers/hvd_utils.py",
"nmtlab/modules/multihead_attention.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport collections\nimport torch\nimport horovod.torch as hvd\n\n\ndef broadcast_optimizer_state(optimizer, root_rank):\n \"\"\"\n This function ... | [
[
"torch.is_tensor",
"torch.Tensor"
],
[
"torch.nn.Embedding",
"torch.nn.Linear",
"torch.cuda.is_available",
"torch.arange",
"torch.clamp"
]
] |
YuehChuan/nnom | [
"68af27a0631244f2bb78cd4e4f2da916f122991a"
] | [
"examples/keyword_spotting/model/mfcc.py"
] | [
"\n\nfrom python_speech_features import mfcc\nimport scipy.io.wavfile as wav\nimport matplotlib.pyplot as plt\nfrom matplotlib import cm\nimport numpy as np\nimport os\nimport random\n\ndef load_noise(path='dat/_background_noise_/'):\n noise = []\n files = os.listdir(path)\n for f in files:\n filena... | [
[
"numpy.swapaxes",
"matplotlib.pyplot.subplots",
"numpy.save",
"numpy.array",
"scipy.io.wavfile.read",
"matplotlib.pyplot.show"
]
] |
brjdenis/qaserver | [
"93a4c3272cf38199e7ef67d1285a9ffacef46883"
] | [
"pyqaserver/picketfence_module.py"
] | [
"import sys\nimport os\nimport tempfile\nfrom multiprocessing import Pool\nimport datetime\nimport numpy as np\nimport matplotlib.style\nimport matplotlib\nmatplotlib.use('Agg')\nfrom matplotlib.figure import Figure\nfrom mpl_toolkits.axes_grid1 import make_axes_locatable\n\n# To revert back to matplotlib 1.0 style... | [
[
"numpy.abs",
"matplotlib.figure.Figure",
"matplotlib.style.use",
"matplotlib.use",
"numpy.sort",
"numpy.concatenate",
"numpy.argmax",
"numpy.mean",
"numpy.diff",
"numpy.argmin",
"numpy.array"
]
] |
lgeiger/tensorboard | [
"6b012202689ae3c55e27c3690455e47f8d18c54d",
"6b012202689ae3c55e27c3690455e47f8d18c54d"
] | [
"tensorboard/loader.py",
"tensorboard/plugins/scalar/summary_test.py"
] | [
"# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.gfile.Walk",
"tensorflow.logging.debug",
"tensorflow.gfile.Stat",
"tensorflow.compat.as_bytes",
"tensorflow.errors.raise_exception_on_not_ok_status",
"tensorflow.Event",
"tensorflow.compat.as_text"
],
[
"tensorflow.constant",
"tensorflow.test.main",
"tensorf... |
jw9730/clova-speech-hackathon | [
"72cc2e31b0ec18a6486ddc746835a472bf6577fe"
] | [
"test.py"
] | [
"import wavio\nimport torch\nimport numpy as np\nfrom specaugment import spec_augment_pytorch, melscale_pytorch\nimport matplotlib.pyplot as plt\n\nPAD = 0\nN_FFT = 512\nSAMPLE_RATE = 16000\n\ndef trim(data, threshold_attack=0.01, threshold_release=0.05, attack_margin=5000, release_margin=5000):\n data_size = le... | [
[
"numpy.convolve",
"numpy.square",
"matplotlib.pyplot.imshow",
"numpy.linspace",
"numpy.min",
"matplotlib.pyplot.plot",
"numpy.max",
"matplotlib.pyplot.subplot",
"torch.FloatTensor",
"numpy.random.uniform",
"matplotlib.pyplot.show"
]
] |
risteon/tf_quat2rot | [
"f308cab83e552300c274b733dd6cc5609269feb4"
] | [
"tf_quat2rot/check.py"
] | [
"# -*- coding: utf-8 -*-\n\n__author__ = \"\"\"Christoph Rist\"\"\"\n__email__ = \"c.rist@posteo.de\"\n\nimport tensorflow as tf\n\n\ndef assert_normalized_quaternion(quaternion: tf.Tensor):\n with tf.control_dependencies(\n [\n tf.debugging.assert_near(\n tf.ones_like(quaternion... | [
[
"tensorflow.shape",
"tensorflow.ones_like",
"tensorflow.identity",
"tensorflow.linalg.matmul",
"tensorflow.linalg.det",
"tensorflow.linalg.norm"
]
] |
MichaelXcc/seldon-core | [
"e304ba28b9ef14bbda4f357bb145db2732a9e0a5"
] | [
"testing/scripts/test_benchmark.py"
] | [
"import json\n\nimport numpy as np\nimport pytest\nimport tensorflow as tf\nfrom google.protobuf import json_format\n\nfrom seldon_e2e_utils import post_comment_in_pr, run_benchmark_and_capture_results\n\n\n@pytest.mark.benchmark\n@pytest.mark.usefixtures(\"argo_worfklows\")\ndef test_service_orchestrator():\n\n ... | [
[
"numpy.array",
"tensorflow.make_tensor_proto"
]
] |
MATHplus-Young-Academy/P2-Cardiac-Motion | [
"844995e8e5760f981c425d13c0bd7f2f3bb8baec"
] | [
"NN_segmentation/tst_dataset.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Nov 3 17:32:08 2020\n\n@author: apramanik\n\"\"\"\n\n\n\nimport numpy as np\nimport SimpleITK as sitk \nimport torch\nfrom torch.utils.data import Dataset, DataLoader\nimport matplotlib.pyplot as plt\n\n\n\n#%% Functions\ndef normalize_img(im... | [
[
"numpy.expand_dims",
"numpy.reshape",
"numpy.squeeze",
"torch.utils.data.DataLoader",
"matplotlib.pyplot.subplots",
"numpy.concatenate",
"numpy.std",
"numpy.mean",
"matplotlib.pyplot.show",
"numpy.zeros"
]
] |
AndreaCossu/ContinualLearning_RecurrentNetworks | [
"8cbc247f1f660f7acb94868696d128e538ad72f4",
"8cbc247f1f660f7acb94868696d128e538ad72f4"
] | [
"clutils/datasets/QuickDraw.py",
"clutils/models/utils.py"
] | [
"import torch\nimport numpy as np\nimport os\nfrom torch.utils.data import TensorDataset, DataLoader\nfrom .utils import collate_sequences\n\n\nNORMALIZER = { # (mu, std) per class computed on the concatenation of both features (discarding the binary feature)\n 'hot dog': (1.3554527691145501, 55.15028414343622),... | [
[
"torch.zeros",
"torch.utils.data.DataLoader",
"torch.from_numpy",
"torch.tensor"
],
[
"torch.nn.init.constant_",
"torch.nn.Linear",
"torch.no_grad",
"torch.nn.init.xavier_uniform_"
]
] |
zawecha1/arXiv2020-RIFE | [
"8eb622a150bd3bf0e773033cbba4728e64340ba1"
] | [
"dataset.py"
] | [
"import cv2\nimport ast\nimport torch\nimport numpy as np\nimport random\nfrom torch.utils.data import DataLoader, Dataset\n\ncv2.setNumThreads(1)\ndevice = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\nclass VimeoDataset(Dataset):\n def __init__(self, dataset_name, batch_size=32):\n s... | [
[
"torch.cat",
"torch.cuda.is_available",
"numpy.random.randint"
]
] |
vessemer/LungCancerDetection | [
"b1810c608896406abf8964298c0dd9ccf4816008"
] | [
"Scripts/extract_features.py"
] | [
"import sys\nsys.path.append('../')\nsys.path.append('../support/')\nfrom scipy.ndimage.measurements import label\nfrom scipy.ndimage import interpolation\nfrom time import time\nfrom glob import glob\nimport timeit\nfrom os.path import join, basename, isfile\nfrom tqdm import tqdm\nfrom paths import *\nfrom ct_rea... | [
[
"scipy.ndimage.interpolation.zoom",
"scipy.ndimage.measurements.label"
]
] |
takkii/Pylean | [
"d51595e2788e946d9a2492bbe7131e4ada19062f"
] | [
"analyze/ruby-dic3_ana.py"
] | [
"from os.path import expanduser\n\nimport dask.dataframe as dd\nimport os\nimport pandas as pd\nfrom pandas import DataFrame\n\n# ------------------------------- KEYWORD -------------------------------------------------------------------------\n\n\nhome = expanduser(\"~\")\n\nd1 = os.path.expanduser(\"~/.cache/dein... | [
[
"pandas.Series",
"pandas.DataFrame"
]
] |
zilbermanor/functions | [
"a1ef1411089314b8a264a70077a64ea77ccc0558"
] | [
"sklearn_classifier/sklearn_classifier.py"
] | [
"import json\nimport os\nfrom importlib import import_module\nfrom inspect import getfullargspec, FullArgSpec\nfrom cloudpickle import dump, load\nimport itertools\n\nimport sklearn\nimport pandas as pd\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport ... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.title",
"sklearn.metrics.auc",
"matplotlib.pyplot.cla",
"sklearn.model_selection.train_test_split",
"sklearn.utils.testing.all_estimators",
"sklearn.metrics.confusion_matrix",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.gcf",
... |
ByungKwanLee/AdversarialMemory | [
"d4cccfec4d370f975dffc826346b1a1a28916444"
] | [
"train/train_trade.py"
] | [
"#!/usr/bin/env python\n\n# numpy package\nimport numpy as np\n\n# torch package\nimport torch\nimport torchvision\nfrom torch.nn.functional import cross_entropy, softmax, log_softmax\n\n# basic package\nimport os\nimport sys\nsys.path.append('.')\nimport argparse\nfrom tqdm import tqdm\nfrom datetime import dateti... | [
[
"torch.max",
"torch.optim.lr_scheduler.StepLR"
]
] |
ShenDezhou/CAIL | [
"c4cfa98ab4ecedbce34a7a5a186830486047540c",
"c4cfa98ab4ecedbce34a7a5a186830486047540c",
"c4cfa98ab4ecedbce34a7a5a186830486047540c",
"c4cfa98ab4ecedbce34a7a5a186830486047540c",
"c4cfa98ab4ecedbce34a7a5a186830486047540c",
"c4cfa98ab4ecedbce34a7a5a186830486047540c",
"c4cfa98ab4ecedbce34a7a5a186830486047540... | [
"CAIL2021/slsb/selftest.py",
"CAIL2020/lawsplit/torch_server.py",
"CAIL2020/cocr/torchocr/networks/backbones/DetResNetvd.py",
"CAIL2020/cocr/torchocr/utils/vis.py",
"CAIL2020/sfzyza/model.py",
"CAIL2020/cocr/torchocr/utils/ckpt.py",
"CAIL2020/zwfc/torch_server.py"
] | [
"import json\n\nimport pandas\nimport urllib3\nfrom classmerge import match\nfrom dataclean import cleanall\n\ndf = pandas.read_csv(\"dataset/valid-phase1.csv\")\nhttp = urllib3.PoolManager()\ncorrect = 0\nfor index, row in df.iterrows():\n label = row[0]\n title = row[1].replace(\".doc\",\"\").replace(\".doc... | [
[
"pandas.read_csv"
],
[
"pandas.DataFrame"
],
[
"torch.nn.Sequential",
"torch.Tensor",
"torch.load",
"torch.nn.ModuleList",
"torch.nn.Conv2d",
"torch.nn.MaxPool2d",
"torch.nn.AvgPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
],
[
"matplotlib.pyplot.imsh... |
natetsang/open-rl | [
"426723d0d6759672ce77e02afeb55cbeb68fcfb0"
] | [
"openrl/algorithms/imitation/imitation_learning.py"
] | [
"import gym\nimport time\nimport pickle\nimport argparse\nimport numpy as np\nimport tensorflow as tf\nfrom typing import Callable, Union, Tuple, List\nfrom models.models import actor_fc_discrete_network, actor_critic_fc_discrete_network\nfrom algorithms.imitation.utils import plot_training_results\nfrom util.repla... | [
[
"tensorflow.keras.models.load_model",
"numpy.random.seed",
"numpy.min",
"tensorflow.keras.losses.SparseCategoricalCrossentropy",
"numpy.squeeze",
"tensorflow.reshape",
"tensorflow.expand_dims",
"numpy.max",
"numpy.std",
"tensorflow.keras.optimizers.Adam",
"numpy.mean",
... |
solazu/FinRL-Library | [
"6cfe00933c16fc8a74efc9fb3d9cfa1b3bf296ea"
] | [
"finrl/commands/data_commands.py"
] | [
"import logging\nimport sys\nimport yfinance\nimport pandas as pd\nimport yfinance as yf\nimport os\n\nfrom collections import defaultdict\nfrom datetime import datetime, timedelta\nfrom typing import Any, Dict, List\n\n\nfrom finrl.config import TimeRange, setup_utils_configuration\nfrom finrl.data.converter impor... | [
[
"pandas.DataFrame"
]
] |
megodoonch/birdsong | [
"582e7ddecf6c9c1b75f17418097f7bcbf6784d31",
"582e7ddecf6c9c1b75f17418097f7bcbf6784d31"
] | [
"surface/misc.py",
"markhov/bigrams.py"
] | [
"import numpy as np\n\n# Generate some n number of colours, hopefully maximally different\n\n\n# source: http://stackoverflow.com/questions/470690/how-to-automatically-generate-n-distinct-colors\nimport colorsys\n\ndef get_colors(num_colors):\n colors=[]\n for i in np.arange(0., 360., 360. / num_colors):\n ... | [
[
"numpy.sqrt",
"numpy.arange",
"numpy.mean",
"numpy.random.rand",
"numpy.var"
],
[
"numpy.log"
]
] |
saidineshpola/Knowledge-Distillation-Toolkit | [
"b05ebc28ae1385c9caa1c4c1c93db2d67356e85f",
"b05ebc28ae1385c9caa1c4c1c93db2d67356e85f",
"b05ebc28ae1385c9caa1c4c1c93db2d67356e85f",
"b05ebc28ae1385c9caa1c4c1c93db2d67356e85f",
"b05ebc28ae1385c9caa1c4c1c93db2d67356e85f",
"b05ebc28ae1385c9caa1c4c1c93db2d67356e85f",
"b05ebc28ae1385c9caa1c4c1c93db2d67356e85... | [
"utils/fairseq_mod/fairseq_mod/criterions/cross_entropy.py",
"examples/resnet_compression_demo/train_teacher_net.py",
"utils/fairseq_mod/tests/test_concat_dataset.py",
"utils/fairseq_mod/fairseq_mod/models/wav2vec/teacher_wav2vec2.py",
"utils/fairseq_mod/examples/byte_level_bpe/gru_transformer.py",
"utils... | [
"# 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 math\nfrom dataclasses import dataclass\n\nimport torch.nn.functional as F\nfrom fairseq_mod import metrics, utils\nfrom fair... | [
[
"torch.nn.functional.nll_loss"
],
[
"torch.device",
"torch.nn.CrossEntropyLoss",
"torch.nn.Conv2d",
"torch.utils.data.DataLoader"
],
[
"torch.LongTensor"
],
[
"torch.nn.Dropout",
"torch.nn.GELU",
"numpy.random.random",
"torch.nn.GLU",
"torch.randint",
"t... |
henryzxu/pytorch-hsml-rl | [
"3b36f29cf91f3ca68820ea124a2ee7a75327b94f",
"3b36f29cf91f3ca68820ea124a2ee7a75327b94f"
] | [
"maml_rl/sampler.py",
"maml_rl/envs/mdp.py"
] | [
"import gym\nimport torch\nimport multiprocessing as mp\nimport numpy as np\n\nfrom maml_rl.envs.subproc_vec_env import SubprocVecEnv\nfrom maml_rl.episode import BatchEpisodes\n\ndef make_env(env_name):\n def _make_env():\n return gym.make(env_name)\n return _make_env\n\nclass BatchSampler(object):\n ... | [
[
"numpy.array",
"torch.no_grad",
"torch.from_numpy"
],
[
"numpy.ones",
"numpy.zeros",
"numpy.full"
]
] |
moslemk/Theano | [
"8d3a67b73fda49350d9944c9a24fc9660131861c",
"8d3a67b73fda49350d9944c9a24fc9660131861c",
"8d3a67b73fda49350d9944c9a24fc9660131861c",
"8d3a67b73fda49350d9944c9a24fc9660131861c"
] | [
"theano/sandbox/gpuarray/type.py",
"theano/compile/function_module.py",
"theano/tensor/signal/tests/test_downsample.py",
"theano/sandbox/gpuarray/basic_ops.py"
] | [
"import numpy\n\nimport theano\nfrom theano.tensor.var import _tensor_py_operators\nfrom theano import Type, Variable, Constant, tensor, config, scalar\nfrom theano.compile import SharedVariable\n\n# Make sure this is importable even if pygpu is absent\n# (it will not work though)\ntry:\n import pygpu\n from ... | [
[
"numpy.asarray",
"numpy.isnan",
"numpy.dtype",
"numpy.all",
"numpy.prod",
"numpy.get_include"
],
[
"numpy.may_share_memory"
],
[
"numpy.all",
"numpy.prod",
"numpy.ndindex",
"numpy.array",
"numpy.zeros"
],
[
"numpy.asarray",
"numpy.dtype"
]
] |
futurewarning/pyro | [
"005032f10099188fea86f63b6baa46a27867983f",
"005032f10099188fea86f63b6baa46a27867983f",
"005032f10099188fea86f63b6baa46a27867983f",
"005032f10099188fea86f63b6baa46a27867983f",
"005032f10099188fea86f63b6baa46a27867983f",
"11a96cde05756def826c232d76f9cff66f6e6d4f"
] | [
"pyro/distributions/transforms/affine_coupling.py",
"pyro/infer/tracetmc_elbo.py",
"pyro/infer/reparam/projected_normal.py",
"pyro/contrib/bnn/utils.py",
"pyro/contrib/examples/bart.py",
"tests/infer/reparam/test_split.py"
] | [
"# Copyright (c) 2017-2019 Uber Technologies, Inc.\n# SPDX-License-Identifier: Apache-2.0\n\nimport operator\nfrom functools import partial, reduce\n\nimport torch\nfrom torch.distributions.utils import _sum_rightmost\n\nfrom pyro.nn import ConditionalDenseNN, DenseNN\n\nfrom .. import constraints\nfrom ..condition... | [
[
"torch.exp",
"torch.distributions.utils._sum_rightmost",
"torch.cat"
],
[
"torch.no_grad"
],
[
"torch.zeros_like"
],
[
"torch.ones",
"torch.rand",
"torch.zeros"
],
[
"torch.distributions.Poisson",
"torch.load",
"torch.empty",
"torch.save"
],
[
... |
BXuan694/SOLO-pytorch | [
"aef0ac47ce6989f6633fe4f71070bd6944c39abb"
] | [
"train.py"
] | [
"from data.config import cfg, process_funcs_dict\nfrom data.coco import CocoDataset\nfrom data.loader import build_dataloader\n#from modules.solov1 import SOLOV1 as solo\n# from modules.solov2 import SOLOV2 as solo\nfrom modules.solov1d import SOLOV1 as solo\nimport time\nimport torch\nimport numpy as np\n\n# 梯度均衡\... | [
[
"torch.isfinite",
"torch.nn.utils.clip_grad.clip_grad_norm_",
"numpy.full"
]
] |
Halo9Pan/dive-keras | [
"f1e9c76675981ee6683f54a3ce569212d551d12d",
"f1e9c76675981ee6683f54a3ce569212d551d12d",
"7d4c5572fa3a9fc2542a1314d06c555f67575cb0",
"f1e9c76675981ee6683f54a3ce569212d551d12d",
"7d4c5572fa3a9fc2542a1314d06c555f67575cb0",
"7d4c5572fa3a9fc2542a1314d06c555f67575cb0",
"7d4c5572fa3a9fc2542a1314d06c555f67575cb... | [
"keras/optimizer_v2/adamax.py",
"keras/distribute/custom_training_loop_models_test.py",
"keras/engine/base_preprocessing_layer_test.py",
"keras/mixed_precision/device_compatibility_check_test.py",
"keras/layers/preprocessing/benchmarks/category_vocab_list_indicator_varlen_benchmark.py",
"keras/layers/prep... | [
"# Copyright 2018 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.control_dependencies",
"tensorflow.compat.v2.abs",
"tensorflow.python.util.tf_export.keras_export",
"tensorflow.compat.v2.pow",
"tensorflow.compat.v2.cast",
"tensorflow.compat.v2.convert_to_tensor",
"tensorflow.compat.v2.zeros",
"tensorflow.compat.v2.gather",
... |
kartik4949/keras-cv | [
"4c300f564d8ec99cd1351c445e1803ee6664915a",
"4c300f564d8ec99cd1351c445e1803ee6664915a",
"4c300f564d8ec99cd1351c445e1803ee6664915a"
] | [
"keras_cv/layers/preprocessing/random_sharpness_test.py",
"keras_cv/layers/preprocessing/random_sharpness.py",
"examples/layers/preprocessing/random_hue_demo.py"
] | [
"# Copyright 2022 The KerasCV 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law o... | [
[
"tensorflow.constant",
"tensorflow.expand_dims",
"tensorflow.ones"
],
[
"tensorflow.clip_by_value",
"tensorflow.constant",
"tensorflow.shape",
"tensorflow.equal",
"tensorflow.ones_like",
"tensorflow.expand_dims",
"tensorflow.keras.utils.register_keras_serializable",
... |
ezvk7740/robotics-rl-srl | [
"aad209d6edd1bf28d886132fecd0e503d2a7af93"
] | [
"replay/compare_plots.py"
] | [
"import argparse\nimport os\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport seaborn as sns\nfrom matplotlib.ticker import FuncFormatter\n\nfrom replay.aggregate_plots import lightcolors, darkcolors, Y_LIM_SHAPED_REWARD, Y_LIM_SPARSE_REWARD, millions\nfrom srl_zoo.utils import printGreen, printRed\n\n... | [
[
"matplotlib.pyplot.legend",
"numpy.sqrt",
"matplotlib.pyplot.title",
"numpy.min",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.figure",
"numpy.max",
"numpy.std",
"numpy.mean",
"matplotlib.pyplot.xlabel",
"matplotlib.ticker.FuncFormatter",
"numpy.array",
"matplot... |
maobubu/stock-prediction | [
"b2442ccb027c25809a33a610f010cdec077bf61a",
"b2442ccb027c25809a33a610f010cdec077bf61a"
] | [
"stuff/preprocess_bilstm.py",
"scripts/ESIM/main.py"
] | [
"import json\nimport pandas as pd\nimport re, os, glob\nimport numpy as np\nfrom collections import defaultdict\nimport nltk\nimport string\nfrom gensim.models import Phrases\nfrom gensim.utils import SaveLoad\nfrom gensim.models.phrases import Phraser\nfrom nltk.corpus import stopwords # Import the stop word list... | [
[
"numpy.split",
"pandas.merge",
"pandas.DataFrame",
"pandas.read_table",
"pandas.read_pickle"
],
[
"tensorflow.cond",
"tensorflow.device",
"tensorflow.sign",
"tensorflow.concat",
"numpy.savez",
"tensorflow.reduce_sum",
"tensorflow.stack",
"tensorflow.cast",
... |
zye1996/3DSSD | [
"036983e282cd13e6a5bf0b51ff6ad31639a75b07",
"036983e282cd13e6a5bf0b51ff6ad31639a75b07"
] | [
"lib/builder/postprocessor.py",
"lib/utils/tf_ops/evaluation/tf_evaluate_op_test.py"
] | [
"import numpy as np\nimport tensorflow as tf\n\nfrom lib.core.config import cfg\nfrom lib.utils.anchors_util import project_to_bev\nfrom lib.utils.box_3d_utils import box_3d_to_anchor\n\nimport lib.dataset.maps_dict as maps_dict\n\nclass PostProcessor:\n def __init__(self, stage, cls_num):\n if stage == 0... | [
[
"tensorflow.reduce_max",
"tensorflow.concat",
"tensorflow.unstack",
"tensorflow.reduce_sum",
"tensorflow.stack",
"tensorflow.image.non_max_suppression",
"tensorflow.ones_like",
"tensorflow.expand_dims",
"tensorflow.gather",
"tensorflow.one_hot",
"tensorflow.argmax"
],... |
wix-playground/incubator-tvm | [
"99734d29b77ef88fe81b0fd0cb2b71db8dc2608e",
"99734d29b77ef88fe81b0fd0cb2b71db8dc2608e"
] | [
"tests/python/relay/test_op_level5.py",
"python/tvm/relay/testing/tf.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.clip",
"numpy.random.uniform",
"numpy.array",
"numpy.zeros",
"numpy.random.randint"
],
[
"tensorflow.core.framework.graph_pb2.GraphDef",
"tensorflow.compat.v1.io.gfile.exists",
"tensorflow.import_graph_def",
"tensorflow.logging.fatal",
"tensorflow.compat.v1.gfile... |
gauthamkrishna-g/Gest-Face | [
"f20def897d8ce2b10c6312b02cb57cb7241a9d93"
] | [
"other/9_morphological.py"
] | [
"import cv2\r\nimport numpy as np\r\n\r\ncap = cv2.VideoCapture(0)\r\n\r\nwhile True:\r\n ret, frame = cap.read()\r\n hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)\r\n \r\n lower_red = np.array([30, 150, 50])\r\n upper_red = np.array([255, 255, 180])\r\n \r\n mask = cv2.inRange(hsv, lower_red, u... | [
[
"numpy.array",
"numpy.ones"
]
] |
Nobuo-Namura/EPBII | [
"ad50b7c4e291ea53a9b3924f24cb84aed4d347b2"
] | [
"indicator.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nindicator.py\nCopyright (c) 2020 Nobuo Namura\nThis code is released under the MIT License.\n\"\"\"\n\nimport numpy as np\nfrom scipy.spatial import distance\n\n#======================================================================\ndef rmse_history(x_rmse, problem, func, nfg=0):\... | [
[
"scipy.spatial.distance.cdist",
"numpy.min"
]
] |
wchen459/hgan_jmd_2019 | [
"ca8e58b4525eb59f51ec699f1e874eca455a6bac"
] | [
"SC/feasibility.py"
] | [
"import numpy as np\nfrom SC.build_data import check_feasibility\n\n\nif __name__ == '__main__':\n \n X = np.load('../results/SC/SC.npy')\n X0 = X[:,:64]\n X1 = X[:,64:]\n for i in range(X.shape[0]):\n is_feasibe = check_feasibility(X0[i], X1[i])\n print('{}: {}'.format(i, is_feasibe))\... | [
[
"numpy.load"
]
] |
lengyuner/hyperpose4fly | [
"c9866bce1a0109e1b9c727ca550b5a380eb3ee17"
] | [
"hyperpose/Model/openpose/model/mbv2_th_openpose.py"
] | [
"import tensorflow as tf\nimport tensorlayer as tl\nfrom tensorlayer import layers\nfrom tensorlayer.models import Model\nfrom tensorlayer.layers import BatchNorm2d, Conv2d, DepthwiseConv2d, LayerList, MaxPool2d\nfrom ..utils import tf_repeat\nfrom ..define import CocoPart,CocoLimb\n\ninitial_w=tl.initializers.rand... | [
[
"tensorflow.nn.l2_loss",
"tensorflow.function",
"tensorflow.concat",
"tensorflow.reduce_mean"
]
] |
Basketkase/openpilot | [
"769e1cf7a8322ca83d1a86a2f547acf5e3a5a52e",
"769e1cf7a8322ca83d1a86a2f547acf5e3a5a52e"
] | [
"selfdrive/car/volkswagen/carstate.py",
"selfdrive/debug/cpu_usage_stat.py"
] | [
"import numpy as np\nfrom cereal import car\nfrom selfdrive.config import Conversions as CV\nfrom selfdrive.car.interfaces import CarStateBase\nfrom opendbc.can.parser import CANParser\nfrom opendbc.can.can_define import CANDefine\nfrom selfdrive.car.volkswagen.values import DBC_FILES, CANBUS, NetworkLocation, Tran... | [
[
"numpy.mean"
],
[
"numpy.amin",
"numpy.amax",
"numpy.array",
"numpy.subtract"
]
] |
christophershultz/spatial_ag | [
"1c56e2e5fbc15a4f56d6d7bb94fab6a796d07dbf"
] | [
"usda_data/joinUSDA.py"
] | [
"import pandas as pd\nimport numpy as np\nimport os, pdb, sys\n\ndef netIncome(): \n df = pd.read_csv('usda_data/net_income.csv')\n df = df[df['Year'] == 2017].reset_index().drop(['index'], axis = 1)\n df = df[['Year', 'State', 'State ANSI', 'County', 'County ANSI', 'Zip Code', 'Value']]\n df.columns = ... | [
[
"pandas.merge",
"pandas.read_csv"
]
] |
kmedian/potpourri | [
"54f7c517b6de5be82577e35849f67a0ead4410ae",
"54f7c517b6de5be82577e35849f67a0ead4410ae"
] | [
"potpourri/simi3.py",
"verto/rnd1.py"
] | [
"\nfrom sklearn.pipeline import Pipeline\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.linear_model import SGDRegressor\nimport scipy.stats as ss\n\nmodel = Pipeline(steps=[\n ('scl', StandardScaler()),\n ('lin', SGDRegressor(\n # Logistic Regression\n loss = 'squared_loss',\n ... | [
[
"sklearn.linear_model.SGDRegressor",
"sklearn.preprocessing.StandardScaler",
"scipy.stats.gamma"
],
[
"numpy.random.standard_normal"
]
] |
christianb93/MachineLearning | [
"30d3b182d33f19b210aa393208236e626eaf5f6a"
] | [
"RBM/Base.py"
] | [
"#####################################################\n#\n# Base class for restricted Boltzmann machines\n#\n#\n# Copyright (c) 2018 christianb93\n# Permission is hereby granted, free of charge, to \n# any person obtaining a copy of this software and \n# associated documentation files (the \"Software\"), \n# to de... | [
[
"numpy.min",
"numpy.random.random_sample",
"numpy.max",
"numpy.transpose",
"numpy.random.randint"
]
] |
arpanmangal/Regression | [
"06969286d7db65a537e89ac37905310592542ca9"
] | [
"Q4/read.py"
] | [
"\"\"\"\nModule for reading data from 'q4x.csv' and 'q4y.csv'\n\"\"\"\n\nimport numpy as np\n\ndef loadData (x_file=\"../ass1_data/q4x.dat\", y_file=\"../ass1_data/q4y.dat\"):\n \"\"\"\n Loads the X, Y matrices.\n \"\"\"\n\n X = np.genfromtxt(x_file, delimiter=' ', dtype=int)\n labels = np.genfromtx... | [
[
"numpy.genfromtxt"
]
] |
mfkoerner/icarus | [
"eb480596be127f760d10531d27569290df3e8ff9"
] | [
"photons.py"
] | [
"########################################\n# written for Python 3 #\n# by Doug Fabini (fabini@mrl.ucsb.edu) #\n########################################\n\n'''\n\n This script requires the following files to be located in 'baseDir':\n - IBZKPT (to extract number of k points) POSSIBLY NO LONGER NEEDED... | [
[
"scipy.integrate.cumtrapz"
]
] |
nirandaperera/pipedream | [
"bc05a4e8ce150f681ba6066805604873a3a7cf97",
"bc05a4e8ce150f681ba6066805604873a3a7cf97"
] | [
"runtime/runtime.py",
"runtime/image_classification/models/8/resnet101/gpus=4_straight/stage3.py"
] | [
"# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT license.\n\nimport collections\nimport itertools\nimport time\nimport torch\nimport torch.distributed as dist\n\nimport communication\nimport runtime_utilities\n\nIMAGE_CLASSIFICATION = \"image_classification\"\nTRANSLATION = \"translation\"\nSPEECH_... | [
[
"torch.LongTensor",
"torch.distributed.new_group",
"torch.nn.parallel.DistributedDataParallel",
"torch.zeros"
],
[
"torch.nn.Conv2d",
"torch.nn.Linear",
"torch.nn.AvgPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
]
] |
NajusAnaxi/UNet-based-for-Brain-Tumor-Segmentation | [
"24ca4432873f145ad33810f40c851ac10bf030fa"
] | [
"setup_scripts/extract_images.py"
] | [
"import h5py\r\nimport numpy as np\r\nimport matplotlib.image as mpimg\r\nfrom tqdm import tqdm\r\nimport os\r\n\r\n\r\ndef clear_screen():\r\n \"\"\"Clears the console screen irrespective of os used\"\"\"\r\n import platform\r\n if platform.system() == 'Windows':\r\n os.system('cls')\r\n ret... | [
[
"matplotlib.image.imsave"
]
] |
marcelovca90-inatel/EC017 | [
"61bbf3c93c13a6743b829c0098d5e33340703f1f",
"61bbf3c93c13a6743b829c0098d5e33340703f1f"
] | [
"NeuralNetworks-python/Perceptron.py",
"NeuralNetworks-python/_data/DataSets.py"
] | [
"import numpy as np\r\nfrom _data import DataSets\r\nfrom _math import ActivationFunctions\r\nfrom _plot import PlotUtils\r\n\r\nclass Perceptron:\r\n\r\n def __init__(self, n, g):\r\n self.n = n # learning rate\r\n self.g = g # activation function\r\n self.plot_data_x = [] # epochs for plot... | [
[
"numpy.multiply",
"numpy.set_printoptions",
"numpy.random.seed",
"numpy.transpose"
],
[
"numpy.append",
"numpy.ndarray",
"numpy.genfromtxt"
]
] |
waitong94/nn_physical_concepts | [
"f8cc03d46431641e7ef2ecbaeb1a1494a95f2550"
] | [
"scinet/data_loader.py"
] | [
"# Copyright 2018 SciNet (https://github.com/eth-nn-physics/nn_physical_concepts)\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/... | [
[
"numpy.array"
]
] |
ravikumarvc/incubator-tvm | [
"9826947ffce0ed40e9d47a0db2abb033e394279e"
] | [
"apps/howto_deploy/python_deploy.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.arange",
"numpy.zeros"
]
] |
manhcuogntin4/handwritting-ocr | [
"aa55c2d46156a10663ad55e2fa4590c3e1333130"
] | [
"ocr/charSeg.py"
] | [
"# -*- coding: utf-8 -*-\nimport numpy as np\nimport tensorflow as tf\nfrom .helpers import *\nfrom .tfhelpers import Graph\nimport cv2\nimport math\n\n# Preloading trained model with activation function\n# Loading is slow -> prevent multiple loads\nprint(\"Loading Segmantation model:\")\nsegCNNGraph = Graph('model... | [
[
"numpy.zeros"
]
] |
cmutel/SALib | [
"32e33c423bcc981d0cfd4339a3e2435d6b945de1"
] | [
"src/SALib/test_functions/Sobol_G.py"
] | [
"from __future__ import division\r\n\r\nimport numpy as np\r\n\r\n\r\n# Non-monotonic Sobol G Function (8 parameters)\r\n# First-order indices:\r\n# x1: 0.7165\r\n# x2: 0.1791\r\n# x3: 0.0237\r\n# x4: 0.0072\r\n# x5-x8: 0.0001\r\ndef evaluate(values, a=None):\r\n if type(values) != np.ndarray:\r\n raise T... | [
[
"numpy.square",
"numpy.abs",
"numpy.subtract",
"numpy.ones",
"numpy.array"
]
] |
fmobrj/doctr | [
"b149266ea57fd59047193a01c328c2b8ecb9330a"
] | [
"doctr/models/recognition/crnn/tensorflow.py"
] | [
"# Copyright (C) 2021, Mindee.\n\n# This program is licensed under the Apache License version 2.\n# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.\n\nfrom copy import deepcopy\nimport tensorflow as tf\nfrom tensorflow.keras import layers\nfrom tensorflow.keras.model... | [
[
"tensorflow.fill",
"tensorflow.transpose",
"tensorflow.constant",
"tensorflow.reshape",
"tensorflow.strings.split",
"tensorflow.squeeze",
"tensorflow.keras.layers.LSTM"
]
] |
emmahodcroft/treetime | [
"8926e49e17538c19ad0950e365f15035a76c8fc5"
] | [
"treetime/treeanc.py"
] | [
"from __future__ import print_function, division\nimport time\nimport config as ttconf\nfrom Bio import Phylo\nfrom Bio import AlignIO\nimport numpy as np\nfrom gtr import GTR\nimport seq_utils\nfrom version import tt_version as __version__\ntry:\n from itertools import izip\nexcept ImportError: #python3.x\n ... | [
[
"numpy.log",
"numpy.isinf",
"numpy.unique",
"numpy.isnan",
"numpy.stack",
"numpy.ones",
"numpy.concatenate",
"numpy.copy",
"numpy.fromstring",
"numpy.zeros_like",
"numpy.choose",
"numpy.where",
"numpy.argmax",
"numpy.array",
"numpy.exp",
"numpy.zeros... |
SimoneGasperini/rboost | [
"5e0108d821077da76964e1e797f0d775b3999f56"
] | [
"rboost/gui/listlabels.py"
] | [
"import pandas as pd\nfrom PySide2.QtWidgets import (\n QWidget,\n QHBoxLayout,\n QVBoxLayout,\n QFormLayout,\n QTableView,\n QPushButton,\n QComboBox,\n QHeaderView\n)\n\nfrom rboost.gui.utils.pandasmodel import PandasModel\n\n\nclass ListLabelsWindow(QWidget):\n\n def __init__(self, rbo... | [
[
"pandas.DataFrame"
]
] |
eladapplbaum/IML.HUJI | [
"6a08721e143b0d766f7085c70882f32f60088550"
] | [
"IMLearn/learners/gaussian_estimators.py"
] | [
"from __future__ import annotations\nimport numpy as np\nfrom numpy.linalg import inv, det, slogdet\n\n\nclass UnivariateGaussian:\n \"\"\"\n Class for univariate Gaussian Distribution Estimator\n \"\"\"\n\n def __init__(self, biased_var: bool = False) -> UnivariateGaussian:\n \"\"\"\n Est... | [
[
"numpy.log",
"numpy.sqrt",
"numpy.linalg.inv",
"numpy.ndarray",
"numpy.linalg.det",
"numpy.exp",
"numpy.sum"
]
] |
Julian-Theis/stat-kiste | [
"b436e881c5ad79781a60dc767c08aa1165e4fb8b"
] | [
"backend/stat/normality_tests.py"
] | [
"\"\"\"\nCode originates from: https://machinelearningmastery.com/a-gentle-introduction-to-normality-tests-in-python/\n\n\"\"\"\n\nfrom scipy.stats import shapiro, normaltest, anderson\n\n\"\"\"\nShapiro-Wilk Test of Normality\nThe Shapiro-Wilk Test is more appropriate for small sample sizes (< 50 samples), but can... | [
[
"scipy.stats.anderson",
"scipy.stats.shapiro",
"scipy.stats.normaltest"
]
] |
JamalRahman/hybridtfidf | [
"0409aae0083b1eae32c1a049f87f484740289be1"
] | [
"hybridtfidf/utils.py"
] | [
"from numpy.linalg import norm\r\nfrom numpy import dot\r\n\r\n\r\ndef cosine_sim(vec1, vec2):\r\n \"\"\"Calculates the cosine similarity between two vectors\r\n\r\n Args:\r\n vec1 (list of float): A vector\r\n vec2 (list of float): A vector\r\n\r\n Returns:\r\n The cosine similarity b... | [
[
"numpy.dot",
"numpy.linalg.norm"
]
] |
jb2020-super/nunif | [
"eab6952d93e85951ed4e4cff30cd26c09e1dbb63"
] | [
"nunif/cli/waifu2x.py"
] | [
"# waifu2x\nimport os\nfrom os import path\nimport torch\nimport argparse\nimport csv\nfrom tqdm import tqdm\nfrom concurrent.futures import ThreadPoolExecutor as PoolExecutor\nfrom .. logger import logger\nfrom .. utils import load_image, save_image, ImageLoader\nfrom .. tasks.waifu2x import Waifu2x\n\nif os.geten... | [
[
"torch.no_grad"
]
] |
fordanic/cmiv-ai-course | [
"c51e51485d18c38bece67d6bcb3bd7422b56da97"
] | [
"notebooks/figures/plot_interactive_tree.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\n\nfrom sklearn.datasets import make_blobs\nfrom sklearn.tree import DecisionTreeClassifier\n\nfrom sklearn.externals.six import StringIO # doctest: +SKIP\nfrom sklearn.tree import export_graphviz\nfrom scipy.misc import imread\nfrom scipy import ndimage\n\nimpo... | [
[
"sklearn.tree.export_graphviz",
"scipy.ndimage.laplace",
"numpy.arange",
"matplotlib.pyplot.subplots",
"numpy.ones",
"sklearn.externals.six.StringIO",
"sklearn.tree.DecisionTreeClassifier",
"scipy.misc.imread",
"numpy.array",
"sklearn.datasets.make_blobs"
]
] |
erelsgl/fair-diminishing-differences | [
"ae64ff4a4c6cfde5a1261e67484c905414607d36"
] | [
"simulations.py"
] | [
"#!python3\n\n\"\"\"\nUtilities for conducting simulations on random utility profiles.\n\nAuthor: Erel Segai-Halevi\nDate: 2019-07\n\"\"\"\n\nimport pandas, numpy as np\nfrom pandas import DataFrame\nimport matplotlib.pyplot as plt\nfrom partitions import equalPartitions\nimport operator\nfrom timeit import defau... | [
[
"matplotlib.pyplot.yticks",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.show",
"pandas.DataFrame"
]
] |
remifan/commplax | [
"e8ee5bc86ab0dfd90773202579237ecf42488cd0"
] | [
"tests/xop_test.py"
] | [
"from commplax import xop\nimport numpy as np\nfrom jax import random, numpy as jnp\n\n\ndef conv_input_complex(n, m):\n key1 = random.PRNGKey(0)\n key2 = random.PRNGKey(1)\n k1, k2 = random.split(key1)\n k3, k4 = random.split(key2)\n x = random.normal(k1, (n,)) + 1j * random.normal(k2, (n,))\n h ... | [
[
"numpy.convolve",
"numpy.allclose"
]
] |
max-stack/MWP-SS-Metrics | [
"01268f2d6da716596216b04de4197e345b96c219"
] | [
"mwp_solver/module/Graph/gcn.py"
] | [
"# Code Taken from https://github.com/LYH-YF/MWPToolkit\n# -*- encoding: utf-8 -*-\n# @Author: Yihuai Lan\n# @Time: 2021/08/29 21:49:49\n# @File: gcn.py\n\n\nimport torch\nfrom torch import nn\nfrom torch.nn import functional as F\n\nfrom module.Layer.graph_layers import GraphConvolution\n\n\nclass GCN(nn.Module):\... | [
[
"torch.nn.functional.dropout"
]
] |
SubstraFoundation/distributed-learning-contributivity | [
"170ed8a660f7d7b4972c140f27782e085c4d63db"
] | [
"mplc/multi_partner_learning/basic_mpl.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nFunctions for model training and evaluation (single-partner and multi-partner cases)\n\"\"\"\n\nimport operator\nimport os\nfrom abc import ABC, abstractmethod\nfrom copy import deepcopy\nfrom timeit import default_timer as timer\n\nimport numpy as np\nimport random\nimport tensorf... | [
[
"numpy.log",
"tensorflow.keras.Input",
"tensorflow.data.Dataset.from_tensor_slices",
"tensorflow.keras.callbacks.EarlyStopping",
"tensorflow.keras.Model",
"numpy.round",
"tensorflow.GradientTape",
"numpy.random.permutation",
"tensorflow.keras.backend.clear_session",
"numpy.... |
aws-samples/amazon-sagemaker-predict-training-resource-usage | [
"a2926c7b5727197e2123679ddc8a6993425df2ec"
] | [
"Canary_Training/quick_start_example_notebooks/3_bert_fine_tuning_canary_train_example/code/.ipynb_checkpoints/train_deploy-checkpoint.py"
] | [
"import argparse\nimport json\nimport logging\nimport os\nimport sys\n\nimport numpy as np\nimport pandas as pd\nimport torch\nimport torch.distributed as dist\nimport torch.utils.data\nimport torch.utils.data.distributed\nfrom torch.utils.data import DataLoader, RandomSampler, TensorDataset\nfrom transformers impo... | [
[
"torch.distributed.init_process_group",
"torch.utils.data.distributed.DistributedSampler",
"torch.cuda.manual_seed",
"torch.manual_seed",
"torch.utils.data.TensorDataset",
"torch.utils.data.RandomSampler",
"torch.utils.data.DataLoader",
"torch.tensor",
"numpy.argmax",
"torc... |
dabreegster/RAMP-UA | [
"04b7473aed441080ee10b6f68eb8b9135dac6879"
] | [
"tests/opencl/test_summary.py"
] | [
"import numpy as np\r\n\r\nfrom microsim.opencl.ramp.summary import Summary\r\nfrom microsim.opencl.ramp.snapshot import Snapshot\r\n\r\n\r\ndef test_summary_update():\r\n npeople = 50 + 34 + 101 + 551\r\n summary = Summary(snapshot=Snapshot.random(nplaces=10, npeople=npeople, nslots=10), max_time=20)\r\n\r\n... | [
[
"numpy.random.shuffle",
"numpy.full"
]
] |
vcfgv/mars | [
"ef9e2282208798a5a82e9f9a19538ac92bafee8d"
] | [
"mars/dataframe/datasource/tests/test_datasource_execution.py"
] | [
"# Copyright 1999-2021 Alibaba Group Holding Ltd.\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... | [
[
"pandas.testing.assert_series_equal",
"pandas.Series",
"pandas.RangeIndex",
"pandas.DataFrame",
"numpy.dtype",
"pandas.testing.assert_frame_equal",
"numpy.random.randint",
"pandas.read_csv",
"numpy.arange",
"pandas.Index",
"pandas.testing.assert_index_equal",
"numpy... |
less-lab-uva/CS4501-Website | [
"7583e2d800c4450192ea5c22e8e815f6d2ab7edb"
] | [
"labs/images/lab5/train_model.py"
] | [
"# Thanks: https://machinelearningmastery.com/how-to-develop-a-cnn-from-scratch-for-fashion-mnist-clothing-classification/\n\n# model with double the filters for the fashion mnist dataset\nimport cv2\nimport glob\nimport argparse\nimport numpy as np\n\nfrom numpy import mean\nfrom numpy import std\nfrom numpy impor... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.boxplot",
"matplotlib.pyplot.title",
"matplotlib.pyplot.plot",
"numpy.std",
"matplotlib.pyplot.subplot",
"numpy.argmax",
"numpy.mean",
"numpy.array",
"matplotlib.pyplot.show"
]
] |
TescaF/point_cloud_io | [
"a5848d48f341b88b43f6b28b88d8b048eeefcf8a"
] | [
"src/pub_pose.py"
] | [
"#!/usr/bin/env python\nimport rospy\nfrom std_msgs.msg import String\nfrom geometry_msgs.msg import PoseStamped, Pose, Point, Quaternion\nimport numpy as np\nimport math\n\ndef publish():\n pub = rospy.Publisher('pose_truth', PoseStamped, queue_size=10)\n rospy.init_node('talker', anonymous=True)\n rate =... | [
[
"numpy.dot",
"numpy.array_equal",
"numpy.cross",
"numpy.negative",
"numpy.array"
]
] |
d3netxer/peartree | [
"577b077c169c7f102d5947b5f9f273fc965eb41f"
] | [
"peartree/paths.py"
] | [
"from typing import Any, Dict, List\n\nimport networkx as nx\nimport numpy as np\nimport partridge as ptg\n\nfrom .graph import (generate_empty_md_graph, generate_summary_graph_elements,\n make_synthetic_system_network, populate_graph)\nfrom .synthetic import SyntheticTransitNetwork\nfrom .toolki... | [
[
"numpy.array"
]
] |
plertvilai/birdCam_jetson | [
"8e74bbc81c289b3e0158edbd471fda0f3ed2b9fb"
] | [
"python/birdVid_ML/JetsonYolo.py"
] | [
"import cv2\nimport numpy as np\nfrom elements.yolo import OBJ_DETECTION\n\nObject_classes = ['person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat', 'traffic light',\n 'fire hydrant', 'stop sign', 'parking meter', 'bench', 'bird', 'cat', 'dog', 'horse', 'sheep', 'cow',... | [
[
"numpy.random.rand"
]
] |
andyljones/ray | [
"52dfde1cbb7131fd62ebcb00f5a2b22ced7321ad"
] | [
"test/runtest.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport json\nimport logging\nimport os\nimport random\nimport re\nimport setproctitle\nimport shutil\nimport socket\nimport string\nimport subprocess\nimport sys\nimport tempfile\nimport threading\nimp... | [
[
"numpy.testing.assert_equal",
"numpy.uint32",
"numpy.arange",
"numpy.uint8",
"numpy.int32",
"numpy.int8",
"pandas.DataFrame",
"numpy.ones",
"numpy.int64",
"numpy.random.normal",
"numpy.random.permutation",
"numpy.uint64",
"numpy.float64",
"numpy.float32",
... |
SimonMcLain/Project_Repository_Programming_and_Scripting_2018 | [
"c10769973461d4c30b2c0a9d3a1f0e812049ca44"
] | [
"RoughWork/stddev.py"
] | [
"#Simon McLain 2018-04-25\n# Experimenting with numpy\n# https://docs.scipy.org/doc/numpy/reference/generated/numpy.std.html reference to standard deviation \n# calculate the standard deviation of each column\n\nimport numpy\n#imports numpy library providing math functions to operate on them \ndata = numpy.genfromt... | [
[
"numpy.around",
"numpy.std",
"numpy.genfromtxt"
]
] |
paulowiz/AiesecBot | [
"ac77cc5426ed6382772603afa8015208020c0fba",
"ac77cc5426ed6382772603afa8015208020c0fba"
] | [
"Get Retroativo/2017_09.py",
"Get Retroativo/2018_08_1.py"
] | [
"import psycopg2.extras\nfrom controller import RobotRotine as rr\nfrom api import graphqlconsume, querygraphql\nimport time\nimport datetime\nimport numpy as np\n\"\"\"\ncurrent = np.datetime64(datetime.datetime.now())\ncurrentab = np.datetime64(current) + np.timedelta64(5, 'h')\nlastdate = np.datetime64(currentab... | [
[
"numpy.timedelta64",
"numpy.datetime64"
],
[
"numpy.timedelta64",
"numpy.datetime64"
]
] |
GuilhermeToso/masters-project | [
"01d5acfddaedb3cbf7fa9247a88108530547e155",
"01d5acfddaedb3cbf7fa9247a88108530547e155",
"01d5acfddaedb3cbf7fa9247a88108530547e155"
] | [
"tests/5 - Models segmentation by sync/5.1 - Hodgkin-Huxley/shh_Nneurons_sync_test.py",
"tests/3 - Stochastic Models Synchronization/3.3 - Integrate-and-Fire/sif_couple_var.py",
"tests/11 - NSC Data Tests/11.1 - Parameters combination/par_combination.py"
] | [
"\"\"\" \nStochastic Hodgkin-Huxley Neurons\n=================================\n\nAnalysis of 12 Neurons coupled in 3 different groups\n----------------------------------------------------\n\n**Author**: Guilherme M. Toso\n**Tittle**: shh_Nneurons_sunc_test.py\n**Project**: Semi-Supervised Learning Using Competitio... | [
[
"numpy.random.seed",
"matplotlib.pyplot.title",
"matplotlib.pyplot.show",
"numpy.ones",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.grid",
"numpy.transpose",
"numpy.random.uniform",
"matplotlib.pyplot.yticks",
"numpy.array",
"numpy.zeros... |
InkToYou/TreeWasserstein | [
"b3f26dd50cc5f06a40e076b2e68f6e5c83786e7b"
] | [
"tests/test_treewasserstein.py"
] | [
"import numpy as np\nimport pytest\n\nimport networkx as nx\nimport ot\nimport tw\n\n\nclass TestBuildValidTreeMetric(object):\n @pytest.mark.parametrize(\n \"num_node, edges\",\n [\n (5, [(i % 5, (i + 1) % 5, i + 1) for i in range(5)]),\n (3, [(i % 3, (i + 1) % 3, i + 1) for ... | [
[
"numpy.allclose",
"numpy.zeros",
"numpy.random.rand",
"numpy.random.randint"
]
] |
reveriel/depconv | [
"4f50d8651655c3a275f15422559eac82879704da"
] | [
"second/pytorch/models/voxelnet.py"
] | [
"import time\nfrom enum import Enum\nfrom functools import reduce\nimport contextlib\nimport numpy as np\nimport torch\nfrom torch import nn\nfrom torch.nn import functional as F\n\nimport torchplus\nfrom second.pytorch.core import box_torch_ops\nfrom second.pytorch.core.losses import (WeightedSigmoidClassification... | [
[
"torch.cuda.synchronize",
"torch.sigmoid",
"torch.LongTensor",
"torch.floor",
"torch.max",
"torch.sin",
"torch.zeros",
"torch.cat",
"torch.nn.functional.softmax",
"torch.full",
"torch.tensor",
"torch.no_grad",
"torch.stack",
"torch.clamp",
"torch.cos"
... |
admariner/NeMo | [
"e542d7f9063a40afa4119a3b94de4c2c636a37bb",
"e542d7f9063a40afa4119a3b94de4c2c636a37bb"
] | [
"nemo/collections/asr/parts/utils/vad_utils.py",
"tests/collections/asr/test_asr_ctc_encoder_model_bpe.py"
] | [
"# Copyright (c) 2020, NVIDIA CORPORATION. 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 re... | [
[
"torch.zeros",
"torch.cat",
"torch.cuda.amp.autocast",
"numpy.where",
"torch.save",
"torch.Size",
"pandas.read_csv",
"torch.softmax",
"numpy.arange",
"torch.tensor",
"matplotlib.pyplot.subplot",
"torch.sort",
"numpy.zeros",
"torch.nn.functional.pad",
"ma... |
qwang70/PreSumm | [
"b2c3aee0ada7f5fa8754dffd44355b956fe0d45b"
] | [
"src/train_extractive.py"
] | [
"#!/usr/bin/env python\n\"\"\"\n Main training workflow\n\"\"\"\nfrom __future__ import division\n\nimport argparse\nimport glob\nimport os\nimport random\nimport signal\nimport time\n\nimport torch\n\nimport distributed\nfrom models import data_loader, model_builder\nfrom models.data_loader import load_dataset\... | [
[
"torch.cuda.manual_seed",
"torch.cuda.set_device",
"torch.load",
"torch.manual_seed",
"torch.multiprocessing.get_context"
]
] |
Melimet/DAP2020 | [
"0854fe4ce8ace6abf6dc0bbcf71984595ff6d42a"
] | [
"hy-data-analysis-with-python-spring-2020/part05-e08_bicycle_timeseries/test/test_bicycle_timeseries.py"
] | [
"#!/usr/bin/env python3\n\nimport unittest\nfrom unittest.mock import patch, MagicMock\nimport pandas as pd\nimport numpy as np\n\n\nfrom tmc import points\n\nfrom tmc.utils import load, get_out, patch_helper\n\nmodule_name=\"src.bicycle_timeseries\"\nbicycle_timeseries = load(module_name, \"bicycle_timeseries\")\n... | [
[
"numpy.testing.assert_array_equal",
"pandas.to_datetime"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.