repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
RickyMexx/ML-weather | [
"6d0a1b718b7b946ebb0c5df6ae990de9724ca5a0"
] | [
"weather_class.py"
] | [
"# *************** SETTINGS *************** #\nMODEL_NAME = 'VGG16-TL'\nBATCH_SIZE = 6\n\nEPOCHS = 100\nEXIF_FLAG = 0 # Set on 1 if the program is running for the first time with a dataset D, 0 otherwise.\n\nMODELS_DIR = 'models/'\ntrainingset = \"Train_New/\"\n\ntestset1 = \"Test_New/\"\ntestset2 = \"Weather_Tests... | [
[
"matplotlib.pyplot.legend",
"tensorflow.keras.models.load_model",
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.plot",
"sklearn.metrics.classification_report",
"tensorflow.keras.layers.Dropout",
"matplotlib.pyplot.tight_layout",
"tensorflow.keras.preprocessing.image.ImageDataGener... |
pkozakowski/trax | [
"31215c378017347e0b66ba51c37cd3cbedf60b17"
] | [
"trax/supervised/trainer_lib_test.py"
] | [
"# coding=utf-8\n# Copyright 2021 The Trax 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 app... | [
[
"tensorflow.compat.v2.distribute.cluster_resolver.TPUClusterResolver",
"tensorflow.compat.v2.compat.v1.enable_eager_execution",
"tensorflow.compat.v2.io.gfile.exists",
"tensorflow.compat.v2.tpu.experimental.initialize_tpu_system",
"tensorflow.compat.v2.io.gfile.listdir",
"tensorflow.compat... |
liyongsheng-tech/pkuseg | [
"e5bd8a4f7e2589a3c132c291433abd3be5c69dba"
] | [
"libs/networks/builder.py"
] | [
"import importlib\n\nimport torch\nfrom torch import nn\nfrom torch.nn import functional as F\n\nfrom heads import FCNHead\n\n\nclass ModelBuilder(nn.Module):\n def __init__(self, net_config, aux_config=None):\n super(ModelBuilder, self).__init__()\n\n num_classes = net_config['num_classes']\n ... | [
[
"torch.nn.Conv2d",
"torch.nn.Dropout2d",
"torch.Tensor",
"torch.nn.functional.interpolate"
]
] |
Eccsx/CVRP-Genetic-Tournament | [
"8b428ec8ef976489bd701e2d11253249fe46ff88"
] | [
"src/population.py"
] | [
"from math import floor\nfrom numpy import delete, fliplr\nfrom itertools import chain\nfrom random import random, sample\nfrom copy import deepcopy\nfrom chromosome import fitness, pmx, obx\nfrom utils import create_shuffle_array\nfrom genetic import POPULATION_SIZE, PROBABILITY_ELITISM, \\\n NUMBER_TOURNAMENT_... | [
[
"numpy.fliplr",
"numpy.delete"
]
] |
segasai/imf | [
"9a33b9e68b0af677dab86511e343d6099d9ea530",
"9a33b9e68b0af677dab86511e343d6099d9ea530"
] | [
"imf/tests/test_distributions.py",
"imf/imf.py"
] | [
"import numpy as np\nimport scipy.interpolate\nfrom .. import distributions as D\nnp.random.seed(1)\n\n\ndef sampltest(distr, left=None, right=None, bounds=None):\n\n # check that mean and stddev from the generated sample\n # match what we get from integrating the PDF\n\n def FF1(x):\n return distr.... | [
[
"numpy.log",
"numpy.sqrt",
"numpy.random.seed",
"numpy.abs",
"numpy.random.uniform"
],
[
"numpy.sqrt",
"numpy.linspace",
"numpy.asarray",
"numpy.concatenate",
"numpy.exp",
"numpy.ceil",
"numpy.argmax",
"numpy.diff",
"numpy.interp",
"numpy.zeros",
... |
Seanny123/ARS | [
"f445a870feac13286fe2d8b14ee508f789c9ef7d"
] | [
"arsrl/ars.py"
] | [
"'''\nParallel implementation of the Augmented Random Search method.\nHoria Mania --- hmania@berkeley.edu\nAurelia Guy\nBenjamin Recht\n'''\n\nimport os\nimport socket\nimport time\n\nimport gym\nimport numpy as np\nimport ray\n\nfrom arsrl import utils, logz, optimizers\nfrom arsrl.policies import LinearPolicy\nfr... | [
[
"numpy.savez",
"numpy.min",
"numpy.arange",
"numpy.linalg.norm",
"numpy.percentile",
"numpy.max",
"numpy.std",
"numpy.mean",
"numpy.array"
]
] |
vitek2577/Multi-Tacotron-Voice-Cloning-GST | [
"a47d7f8412add19f7a154d70cc55698e2bb0a6da"
] | [
"synthesizer/audio.py"
] | [
"import librosa\nimport librosa.filters\nimport numpy as np\nimport tensorflow as tf\nfrom scipy import signal\nfrom scipy.io import wavfile\n\n\ndef load_wav(path, sr):\n return librosa.core.load(path, sr=sr)[0]\n\ndef save_wav(wav, path, sr):\n wav *= 32767 / max(0.01, np.max(np.abs(wav)))\n #proposed by... | [
[
"numpy.dot",
"numpy.log",
"numpy.maximum",
"numpy.abs",
"numpy.power",
"numpy.clip",
"numpy.random.rand",
"scipy.signal.lfilter"
]
] |
tacaswell/pandas | [
"81c57e20da278494dfebc2f1043f5ff361a234f3",
"81c57e20da278494dfebc2f1043f5ff361a234f3",
"81c57e20da278494dfebc2f1043f5ff361a234f3",
"81c57e20da278494dfebc2f1043f5ff361a234f3",
"81c57e20da278494dfebc2f1043f5ff361a234f3",
"81c57e20da278494dfebc2f1043f5ff361a234f3",
"81c57e20da278494dfebc2f1043f5ff361a234f... | [
"pandas/tseries/tools.py",
"pandas/tseries/offsets.py",
"pandas/tests/io/parser/c_parser_only.py",
"pandas/core/config.py",
"pandas/tests/indexing/test_datetime.py",
"asv_bench/benchmarks/gil.py",
"scripts/bench_join.py"
] | [
"from datetime import datetime, timedelta, time\nimport numpy as np\nfrom collections import MutableMapping\n\nimport pandas.lib as lib\nimport pandas.tslib as tslib\n\nfrom pandas.types.common import (_ensure_object,\n is_datetime64_ns_dtype,\n is_dat... | [
[
"pandas.Series",
"pandas.tslib.array_to_datetime",
"pandas.DataFrame",
"pandas.core.config.get_option",
"pandas.lib.ismember",
"pandas.types.common.is_integer_dtype",
"pandas.types.missing.notnull",
"pandas.Index",
"pandas.types.common.is_list_like",
"pandas.tslib.array_wit... |
Lalf-Klein/megnet | [
"e3977ce372b74380268659e964c85bf59c1aac34"
] | [
"megnet/utils/tests/test_general.py"
] | [
"import unittest\nimport numpy as np\n\nfrom megnet.utils.general import expand_1st, to_list, fast_label_binarize\n\n\nclass TestGeneralUtils(unittest.TestCase):\n def test_expand_dim(self):\n x = np.array([1, 2, 3])\n self.assertListEqual(list(expand_1st(x).shape), [1, 3])\n\n def test_to_list(... | [
[
"numpy.array"
]
] |
benoitLemoine/stage2A | [
"a81de38deaf786227e6d34c04803da5e5854c9f1",
"a81de38deaf786227e6d34c04803da5e5854c9f1",
"a81de38deaf786227e6d34c04803da5e5854c9f1"
] | [
"detection/yolov3/yolov3.py",
"detection/yolov3/src/evaluate.py",
"detection/tinyYolo/src/yolov3_tf2/dataset.py"
] | [
"import tensorflow as tf\nimport cv2 as cv\nimport numpy as np\n\nfrom PIL import Image\nfrom core import utils\n\nclassesPath = \"../../data/coco.names\"\nmodelPath = \"../../checkpoint/yolov3_cpu_nms.pb\"\n\nIMAGE_H, IMAGE_W = 416, 416\nclasses = utils.read_coco_names(classesPath)\nnum_classes = len(classes)\ninp... | [
[
"tensorflow.get_default_graph",
"numpy.expand_dims",
"tensorflow.Session"
],
[
"numpy.ones_like",
"numpy.uint8",
"numpy.cumsum",
"numpy.finfo",
"numpy.argmax",
"tensorflow.variable_scope",
"tensorflow.Session",
"tensorflow.train.Saver",
"numpy.array"
],
[
... |
JamesWang007/Dive-into-DL-PyTorch | [
"267b54168322ab37da44e83008fba4f24b70fa9f"
] | [
"mycode/test_03_ch5_4.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Mar 25 23:09:40 2020\n 5.4 池化层\n https://tangshusen.me/Dive-into-DL-PyTorch/#/chapter05_CNN/5.4_pooling\n@author: bejin\n\"\"\"\n\n\nimport torch\nfrom torch import nn\n\n\ndef pool2d(X, pool_size, mode='max'):\n X = X.float()\n p_h, p_w = pool_size\n ... | [
[
"torch.zeros",
"torch.cat",
"torch.tensor",
"torch.nn.MaxPool2d",
"torch.arange"
]
] |
dheerajgupta0001/rtm_daily_report_generator | [
"591a21ed1888df8b50eb8e873e03387df5d5a6e7"
] | [
"src/app/section_3/sectionWrInjGraph.py"
] | [
"import datetime as dt\nfrom src.repos.metricsData.metricsDataRepo import MetricsDataRepo\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\nplt.rcParams.update({'figure.max_open_warning': 0})\nimport matplotlib.dates as mdates\n\n\ndef fetchWrInjGraphContext(appDbConnStr: str, startDt: dt.datetime, endDt: dt... | [
[
"pandas.merge",
"matplotlib.pyplot.subplots",
"pandas.DataFrame",
"matplotlib.pyplot.close",
"matplotlib.pyplot.rcParams.update"
]
] |
ii-research-yu/pgbm | [
"d050a5f71f1a458d8269c4f5201744c0d7c4d487"
] | [
"examples/pytorch/example04_housing_validation.py"
] | [
"\"\"\"\n Copyright (c) 2021 Olivier Sprangers as part of Airlab Amsterdam\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... | [
[
"matplotlib.pyplot.legend",
"torch.zeros",
"sklearn.model_selection.train_test_split",
"sklearn.datasets.fetch_california_housing",
"matplotlib.pyplot.plot",
"torch.ones_like"
]
] |
zhangkaifang/cp_decomposition | [
"75eb5f3df302c08ad2e62f41e6d93bb990a16797",
"75eb5f3df302c08ad2e62f41e6d93bb990a16797"
] | [
"matrix_cp_one.py",
"tensor_cp_one.py"
] | [
"#!/usr/bin/env python\n# -*- coding: UTF-8 -*-\n'''=====================================\n@Author :Kaifang Zhang\n@Time :2021/7/5 1:31\n@Contact: kaifang.zkf@dtwave-inc.com\n========================================'''\nimport numpy as np\n\n\ndef LFM_grad_desc(R, K, max_iter, alpha=1e-4, lamda=1e-4):\n \"\"\"... | [
[
"numpy.dot",
"numpy.array",
"numpy.random.rand"
],
[
"numpy.square",
"numpy.einsum",
"numpy.linalg.inv",
"numpy.matmul",
"numpy.random.normal",
"scipy.linalg.khatri_rao",
"numpy.moveaxis",
"numpy.load",
"numpy.where",
"numpy.zeros"
]
] |
EmiCareOfCell44/BigDL | [
"6278ee8eed09b5072da53dab3a99530cf5f69ba2",
"6278ee8eed09b5072da53dab3a99530cf5f69ba2"
] | [
"python/nano/src/bigdl/nano/pytorch/onnx/onnxrt_inference.py",
"python/orca/src/bigdl/orca/tfpark/tf_optimizer.py"
] | [
"#\n# Copyright 2016 The BigDL Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law ... | [
[
"numpy.concatenate",
"torch.no_grad",
"torch.Tensor",
"torch.cat"
],
[
"tensorflow.shape",
"tensorflow.get_collection",
"tensorflow.keras.backend.get_session",
"tensorflow.keras.backend.learning_phase",
"tensorflow.assign",
"tensorflow.is_numeric_tensor",
"tensorflo... |
gavinmacaulay/echopype | [
"1698b6076a16506f638e691d4d014c8649cc735d"
] | [
"echopype/convert/set_groups_ad2cp.py"
] | [
"from typing import List, Optional\n\nimport numpy as np\nimport xarray as xr\n\nfrom .parse_ad2cp import Ad2cpDataPacket, Field, HeaderOrDataRecordFormats\nfrom .set_groups_base import SetGroupsBase, set_encodings\n\n\ndef merge_attrs(datasets: List[xr.Dataset]) -> List[xr.Dataset]:\n \"\"\"\n Merges attrs f... | [
[
"numpy.array",
"numpy.pad"
]
] |
nenb/cycling_in_france | [
"6cddc433a2136f52be996719db0a1d876fcf5c59"
] | [
"cycling_in_france/helper_func.py"
] | [
"import regionmask\nimport numpy as np\nimport dask\n\n\ndef create_windmax_dict(u, v, names, borders, longitude, latitude):\n \"\"\"Produce a dictionary of masked maximum wind speeds in units of mph.\"\"\"\n\n if u.units != \"m s**-1\":\n raise ValueError(\"U field does not have units m/s\")\n if v... | [
[
"numpy.isnan",
"numpy.sqrt"
]
] |
AldrickF/SlicerRegularizedFastMarching | [
"8a04a594cf5dd6c98e1f9dd93e61af6e6852339f"
] | [
"RegularizedFastMarching/RegularizedFastMarchingLib/Regularization.py"
] | [
"def regularization(InputImage, StructuringElementRadius=3):\n \"\"\"\n Compute the 3D scalar field that will be used to regularize the seeds propagation\n Inputs:\n * InputImage: the 3D image that will be segmented. Must be a 3D numpy array.\n * StructuringElementRadius: A structuring element of... | [
[
"scipy.ndimage.morphological_gradient"
]
] |
wohlbier/GraphSAINT | [
"cea64e77d97b77d76b05fba17cbfaa0d985d9aa3"
] | [
"graphsaint/setup.py"
] | [
"# cython: language_level=3\nfrom distutils.core import setup, Extension\nfrom Cython.Build import cythonize\nimport numpy\n# import cython_utils\n\nimport os\nos.environ[\"CC\"] = \"g++\"\nos.environ[\"CXX\"] = \"g++\"\n\nsetup(ext_modules = cythonize([\"graphsaint/cython_sampler.pyx\",\"graphsaint/cython_utils.py... | [
[
"numpy.get_include"
]
] |
YoshimitsuMatsutaIe/ans_2021 | [
"a04cd9b9541583aaa8a6dc5ece323ae1cf706c3b"
] | [
"example_py/example_2.py"
] | [
"### SciPyを使った実装 ###\nimport numpy as np\nfrom scipy.integrate import solve_ivp\nimport matplotlib.pyplot as plt\n\n\ndef diff_eq(x, t, a):\n \"\"\"微分方程式\"\"\"\n return a * x\n\ndef do_example_2():\n time_list = np.arange(0.0, 2.0, 0.01) # 時間のリスト\n x_init = [1.0] # 初期値\n \n a = 1\n \n # 解く... | [
[
"numpy.arange",
"scipy.integrate.solve_ivp",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
LLNL/XNAS | [
"62f90bb29b492a3b993d7a866d229634a2d95057"
] | [
"experiments/mnist/load_data.py"
] | [
"\"\"\"\nMIT License\n\nCopyright (c) 2022, Lawrence Livermore National Security, LLC\nWritten by Zachariah Carmichael et al.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without rest... | [
[
"tensorflow.image.resize_with_crop_or_pad",
"tensorflow.image.random_flip_left_right",
"tensorflow.reshape",
"tensorflow.squeeze",
"tensorflow.expand_dims",
"tensorflow.image.random_crop",
"tensorflow.one_hot",
"tensorflow.image.convert_image_dtype"
]
] |
EpistasisLab/penn-ml-benchmarks | [
"ac4ae198e62a7828cb9ff957d805bc33197dca28"
] | [
"pmlb/pmlb.py"
] | [
"# -*- coding: utf-8 -*-\n\n\"\"\"\nPMLB was primarily developed at the University of Pennsylvania by:\n - Randal S. Olson (rso@randalolson.com)\n - William La Cava (lacava@upenn.edu)\n - Weixuan Fu (weixuanf@upenn.edu)\n - and many more generous open source contributors\n\nPermission is hereby granted,... | [
[
"sklearn.preprocessing.StandardScaler",
"pandas.read_csv",
"pandas.to_numeric",
"sklearn.neighbors.NearestNeighbors"
]
] |
haroldship/SCLPsolver | [
"70b79acb074f51d4a269993f6a1fcf04a8196a89"
] | [
"SCLPsolver/tests/MCQN_test_mpc.py"
] | [
"# Copyright 2020 IBM Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ... | [
[
"numpy.where"
]
] |
dennis-l/so_pysm_models | [
"da21d51fd09ef409542862a773d22ed1656bb1bb"
] | [
"so_pysm_models/alms.py"
] | [
"import numpy as np\nimport healpy as hp\n\ntry:\n from pixell import curvedsky, enmap\nexcept:\n pass\n\ntry: # PySM >= 3.2.1\n import pysm3.units as u\n import pysm3 as pysm\nexcept ImportError:\n import pysm.units as u\n import pysm\n\n\nclass PrecomputedAlms(object):\n def __init__(\n ... | [
[
"numpy.trapz",
"numpy.random.seed",
"numpy.ones"
]
] |
zzpwahaha/DataCrylsis | [
"b4436435d6ead3322ce54d22e048077732e39e57",
"b4436435d6ead3322ce54d22e048077732e39e57"
] | [
"ExpFile.py",
"fitters/Gaussian/bump2.py"
] | [
"# created by mark brown\nimport h5py as h5\nfrom colorama import Fore, Style\nfrom numpy import array as arr\nimport numpy as np\nimport Miscellaneous as misc\nimport datetime\ndataAddress = None\ncurrentVersion = 1\n\ndef annotate(fileID=None, expFile_version=currentVersion, useBaseA=True):\n #hashNum = int(in... | [
[
"numpy.array",
"numpy.string_",
"numpy.zeros"
],
[
"numpy.abs",
"numpy.sqrt",
"numpy.isnan",
"numpy.finfo",
"numpy.array"
]
] |
yotammarton/TransformDF2Numpy | [
"3528fe2f207089186865290b9f5cbd14d91e8c82"
] | [
"tests/test_one_hot_encode.py"
] | [
"import unittest\nimport numpy as np\nimport pandas as pd\nimport df2numpy\nfrom df2numpy import TransformDF2Numpy, one_hot_encode, NAN_CATEGORY, DROPPED_CATEGORY\nfrom df2numpy.errors import *\n\n\ndf = pd.DataFrame({\n \"A\": [\"Aa\", \"Ab\", \"Ac\", \"Aa\", \"Ac\", \"Aa\", \"Aa\", \"Aa\"], # uniques: 3, to_b... | [
[
"numpy.alltrue",
"pandas.DataFrame"
]
] |
chrisjuniorli/pytorch-image-models | [
"bb815fa90c46b1f5f2f59a0dcddab8ce69f91dcf",
"bb815fa90c46b1f5f2f59a0dcddab8ce69f91dcf"
] | [
"validate.py",
"timm/models/layers/mlp.py"
] | [
"#!/usr/bin/env python3\n\"\"\" ImageNet Validation Script\n\nThis is intended to be a lean and easily modifiable ImageNet validation script for evaluating pretrained\nmodels or training checkpoints against ImageNet or similarly organized image datasets. It prioritizes\ncanonical PyTorch, standard Python style, and... | [
[
"torch.jit.script",
"torch.nn.CrossEntropyLoss",
"torch.jit.optimized_execution",
"torch.cuda.empty_cache",
"torch.no_grad"
],
[
"torch.nn.Linear",
"torch.nn.Dropout",
"torch.nn.Conv2d",
"torch.nn.Identity"
]
] |
mcnoat/pymc3 | [
"8b1f64cce32db3357301b88bbe9f7108733ac70a",
"8b1f64cce32db3357301b88bbe9f7108733ac70a"
] | [
"pymc3/step_methods/metropolis.py",
"pymc3/plots/posteriorplot.py"
] | [
"# Copyright 2020 The PyMC Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli... | [
[
"numpy.dot",
"numpy.sqrt",
"numpy.concatenate",
"numpy.max",
"numpy.random.standard_exponential",
"numpy.round",
"numpy.random.randn",
"numpy.exp",
"numpy.random.randint",
"numpy.atleast_1d",
"numpy.size",
"numpy.copy",
"numpy.zeros",
"numpy.random.choice",
... |
wodxyj/plpp | [
"cd74916536cf180a37b088ec61ea2a12a63719f2"
] | [
"src/main.py"
] | [
"import os\nimport shutil\nimport time\n\nimport configargparse\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.nn.parallel\nimport torch.optim as optim\nimport torch.utils.data\nfrom tensorboardX import SummaryWriter\nfrom torch.optim.lr_scheduler import Mult... | [
[
"torch.optim.lr_scheduler.MultiStepLR",
"torch.load",
"torch.cuda.empty_cache",
"numpy.save",
"torch.no_grad",
"torch.nn.functional.smooth_l1_loss",
"torch.nn.DataParallel",
"torch.squeeze",
"torch.save"
]
] |
wangyuan249/Mymmt767 | [
"6b9bb566d290bd3157350f6496fcb5df8c2b515c"
] | [
"mmt/models/resnet.py"
] | [
"from __future__ import absolute_import\n\nfrom torch import nn\nfrom torch.nn import functional as F\nfrom torch.nn import init\nimport torchvision\nimport torch\nimport pdb\nfrom .layers import (\n SpatialAttention2d,\n WeightedSum2d)\n\n\n__all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101'... | [
[
"torch.nn.functional.normalize",
"torch.nn.Sequential",
"torch.nn.BatchNorm1d",
"torch.nn.Dropout",
"torch.nn.init.constant_",
"torch.nn.Linear",
"torch.nn.functional.relu",
"torch.nn.AdaptiveAvgPool2d",
"torch.nn.init.normal_",
"torch.nn.init.kaiming_normal_"
]
] |
KyGao/pygame_tracker | [
"c1c4cc4a74c478e6655aa02aa4950d2ab97f6eae"
] | [
"shmup_detect/fhog.py"
] | [
"# -*- coding: utf-8 -*\n\nimport numpy as np \nimport cv2\nfrom numba import njit\nimport time\n\nNUM_SECTOR = 9\nFLT_EPSILON = 1e-07\n\n\n@njit\ndef func1(dx, dy, boundary_x, boundary_y, height, width, numChannels):\n r = np.zeros((height, width), dtype=np.float32)\n alfa = np.zeros((height, width, 2), np.i... | [
[
"numpy.sqrt",
"numpy.arange",
"numpy.cos",
"numpy.ones",
"numpy.sin",
"numpy.float32",
"numpy.array",
"numpy.zeros",
"numpy.sum"
]
] |
wylloong/TDMOA-USV | [
"3a8690559f6df76f0ed457a89dcec2ec268db34f"
] | [
"COLREGsBasedRiskDomain/RiskSubjection.py"
] | [
"# -*- coding: utf-8 -*-\r\n\r\nimport math\r\nfrom matplotlib import pyplot as plt\r\nfrom mpl_toolkits.mplot3d import Axes3D\r\nimport numpy as np\r\nimport GeoCommonBase as CoordinateBase\r\n\r\n# 危险隶属度函数,障碍物周围隶属度函数随着方向和速度逐渐变小\r\n# 改进:隶属度范围和速度大小有关\r\ndef riskSubjection(boatPnt,currPnt,boatVelo,boatOrien,evaluTim... | [
[
"numpy.arange",
"matplotlib.pyplot.contour",
"numpy.ravel",
"numpy.meshgrid",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
nchlis/image_captioning | [
"e1ac6ae9ed9b398417a91563f1cfe316705c8e58"
] | [
"train_model_LSTM.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu May 3 19:22:59 2018\n\n@author: nikos\n\"\"\"\n\nimport os\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nfrom scipy.io import loadmat\nfrom skimage.transform import rescale, resize, downscale_local_mean\nfrom lmfi... | [
[
"pandas.read_csv",
"numpy.sort",
"numpy.load",
"numpy.array",
"numpy.where"
]
] |
cda-group/baloo | [
"f6e05e35b73a75e8a300754c6bdc575e5f2d53b9"
] | [
"tests/core/indexes/test_base.py"
] | [
"import numpy as np\nimport pytest\n\nfrom baloo import Index\n\n\ndef assert_index_equal(actual, expected, sort=False):\n actual = actual.evaluate()\n expected = expected.evaluate()\n\n actual_values = actual.values\n expected_values = expected.values\n if sort:\n actual_values = np.sort(actu... | [
[
"numpy.arange",
"numpy.dtype",
"numpy.sort",
"numpy.testing.assert_array_equal",
"numpy.array"
]
] |
EdgarLefevre/wnet_pytorch | [
"ba8fa5465f72351f349c18fe7df20a60a7c7f3c5"
] | [
"wnet/utils/soft_n_cut_loss.py"
] | [
"# Some methods in this file ported to Pytorch from https://github.com/Ashish77IITM/W-Net/\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom scipy.stats import norm\nfrom torch import Tensor\n\n# The weight matrix w is a measure of the weight between each pixel and\n#... | [
[
"torch.div",
"torch.mean",
"torch.add",
"numpy.linspace",
"scipy.stats.norm.pdf",
"torch.nn.functional.conv2d",
"torch.sum",
"torch.zeros_like",
"torch.unsqueeze",
"torch.mul",
"torch.cuda.is_available",
"torch.arange",
"torch.nn.L1Loss",
"torch.t",
"tor... |
LCOGT/image_align | [
"12ddfb924301039a3cba5007106f6f8ff27f925e"
] | [
"quad.py"
] | [
"import numpy as np\nimport os\nfrom astropy.io import fits\nimport operator\nimport itertools\n\nclass ImgCat:\n \"\"\"\n Represent an individual image and its associated catalog, starlist, quads etc.\n \"\"\"\n\n def __init__(self, filepath, hdu=0, cat=None):\n \"\"\"\n\n :param filepath... | [
[
"numpy.min",
"numpy.asarray",
"numpy.linalg.inv",
"numpy.lexsort",
"numpy.max",
"numpy.argmax",
"numpy.diff",
"numpy.array",
"numpy.sum"
]
] |
ANCL/QuadPPO | [
"b7ed0574467bd321f4259175621a12ff7aeb7d12",
"b7ed0574467bd321f4259175621a12ff7aeb7d12"
] | [
"spinup/algos/tf1/td3/core.py",
"spinup/algos/pytorch/ppo/ppo_quad.py"
] | [
"import numpy as np\nimport tensorflow as tf\n\n\ndef placeholder(dim=None):\n return tf.placeholder(dtype=tf.float32, shape=(None,dim) if dim else (None,))\n\ndef placeholders(*args):\n return [placeholder(dim) for dim in args]\n\ndef mlp(x, hidden_sizes=(32,), activation=tf.tanh, output_activation=None):\n ... | [
[
"tensorflow.concat",
"tensorflow.global_variables",
"tensorflow.layers.dense",
"tensorflow.placeholder",
"tensorflow.variable_scope"
],
[
"numpy.random.seed",
"torch.manual_seed",
"torch.min",
"torch.exp",
"numpy.append",
"torch.clamp",
"numpy.zeros",
"torch... |
kunalq/Cirq | [
"de0c5e855069bba71e55b070fc9b06f58c07a861",
"e73c9bef672e83143ab04e7f169988149055d630",
"5ad06cc7a487ca94436715a3c51b6a50dfd10513",
"e73c9bef672e83143ab04e7f169988149055d630",
"e73c9bef672e83143ab04e7f169988149055d630",
"e73c9bef672e83143ab04e7f169988149055d630",
"5ad06cc7a487ca94436715a3c51b6a50dfd1051... | [
"cirq/ion/convert_to_ion_gates_test.py",
"cirq/linalg/transformations.py",
"cirq/testing/lin_alg_utils.py",
"cirq/testing/circuit_compare.py",
"cirq/study/trial_result.py",
"cirq/linalg/operator_spaces_test.py",
"cirq/protocols/approximate_equality_test.py",
"cirq/protocols/unitary.py",
"cirq/sim/mu... | [
"# Copyright 2018 The Cirq Developers\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... | [
[
"numpy.array"
],
[
"numpy.dot",
"numpy.imag",
"numpy.log2",
"numpy.sqrt",
"numpy.einsum",
"numpy.random.random",
"numpy.eye",
"numpy.linalg.norm",
"numpy.arctan2",
"numpy.real",
"numpy.linalg.eigh",
"numpy.copy",
"numpy.ndindex",
"numpy.array",
"... |
garymm/tensorflow-onnx | [
"a8f78ac7903493dee579304b7b1717aa9ec9706f"
] | [
"tf2onnx/rewriter/quantization_ops_rewriter.py"
] | [
"# SPDX-License-Identifier: Apache-2.0\n\n\n\"\"\"\ntf2onnx.rewriter - rewrite tensorflow QuantizeAndDequantizeV2|QuantizeAndDequantizeV3|QuantizeAndDequantizeV4 op\n\"\"\"\n\nimport numpy as np\nfrom onnx import TensorProto, helper\nfrom tf2onnx.graph_matcher import OpTypePattern, GraphMatcher\nfrom tf2onnx import... | [
[
"numpy.frombuffer",
"numpy.array",
"numpy.zeros",
"numpy.float32"
]
] |
ChengF-Lab/scIVA | [
"f70a927531dd16236dff30decbe77f0552ad4f2d"
] | [
"sciva/loss.py"
] | [
"#!/usr/bin/env python\n\"\"\"\n#\n#\n\n# File Name: loss_function.py\n# Description:\n\n\"\"\"\nimport torch\nimport torch.nn.functional as F\n\nimport math\n\ndef kl_divergence(mu, logvar):\n \"\"\"\n Computes the KL-divergence of\n some element z.\n\n KL(q||p) = -∫ q(z) log [ p(z) / q(z) ... | [
[
"torch.exp",
"torch.nn.functional.mse_loss",
"torch.sum",
"torch.log"
]
] |
sighingnow/tensorflow | [
"12579f9a795da54db405b5918f709665e2a7c07f",
"12579f9a795da54db405b5918f709665e2a7c07f",
"12579f9a795da54db405b5918f709665e2a7c07f"
] | [
"tensorflow/python/framework/function_def_to_graph.py",
"tensorflow/python/summary/summary_v2_test.py",
"tensorflow/python/ops/ragged/ragged_shape.py"
] | [
"# 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.python.eager.context.context",
"tensorflow.core.framework.function_pb2.GradientDef",
"tensorflow.python.framework.func_graph.FuncGraph",
"tensorflow.python.framework.cpp_shape_inference_pb2.CppShapeInferenceResult.HandleData",
"tensorflow.python.framework.cpp_shape_inference_pb2.Cp... |
KosingZhu/tensorflow | [
"60028072a1c3b4376e145b6fea8e4ccd3324377f",
"60028072a1c3b4376e145b6fea8e4ccd3324377f",
"60028072a1c3b4376e145b6fea8e4ccd3324377f",
"60028072a1c3b4376e145b6fea8e4ccd3324377f",
"7ac2521a4e609ddef0f0ea3ffc2e76102da934d7",
"60028072a1c3b4376e145b6fea8e4ccd3324377f",
"7ac2521a4e609ddef0f0ea3ffc2e76102da934d... | [
"tensorflow/python/kernel_tests/array_ops/denormal_test.py",
"tensorflow/python/kernel_tests/random/stateless_random_ops_test.py",
"tensorflow/python/kernel_tests/pooling_ops_test.py",
"tensorflow/python/kernel_tests/cudnn_deterministic_ops_test.py",
"tensorflow/lite/testing/generate_examples_lib.py",
"te... | [
"# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.python.framework.test_util.run_in_graph_and_eager_modes",
"numpy.finfo",
"tensorflow.python.platform.test.main",
"numpy.zeros",
"tensorflow.python.framework.constant_op.constant"
],
[
"tensorflow.python.framework.config.set_soft_device_placement",
"tensorflow.python.ops... |
UCL/xclim | [
"118441f89d221cfffbd2e1fd0b966517e731378d"
] | [
"xclim/indices/_conversion.py"
] | [
"# noqa: D100\nfrom typing import Optional, Tuple\n\nimport numpy as np\nimport xarray as xr\n\nfrom xclim.core.calendar import date_range, datetime_to_decimal_year\nfrom xclim.core.units import amount2rate, convert_units_to, declare_units, units2pint\n\n__all__ = [\n \"humidex\",\n \"tas\",\n \"uas_vas_2_... | [
[
"numpy.log",
"numpy.radians",
"numpy.linspace",
"numpy.cos",
"numpy.sin",
"numpy.arctan2",
"numpy.tan",
"numpy.log10",
"numpy.exp",
"numpy.hypot"
]
] |
AQ18/skimpy | [
"435fc50244f2ca815bbb39d525a82a4692f5c0ac",
"435fc50244f2ca815bbb39d525a82a4692f5c0ac",
"435fc50244f2ca815bbb39d525a82a4692f5c0ac",
"435fc50244f2ca815bbb39d525a82a4692f5c0ac"
] | [
"tests/test_ORACLE.py",
"tutorials/mechanisms/tutorial_convenience.py",
"skimpy/analysis/oracle/load_pytfa_solution.py",
"tutorials/parameter_sampling/tutorial_dependent_non_linear_fluxes.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\n.. module:: skimpy\n :platform: Unix, Windows\n :synopsis: Simple Kinetic Models in Python\n\n.. moduleauthor:: SKiMPy team\n\n[---------]\n\nCopyright 2018 Laboratory of Computational Systems Biotechnology (LCSB),\nEcole Polytechnique Federale de Lausanne (EPFL), Switzerland\n... | [
[
"numpy.exp",
"numpy.linspace"
],
[
"numpy.linspace"
],
[
"numpy.log",
"numpy.exp",
"pandas.Series"
],
[
"numpy.exp",
"numpy.linspace"
]
] |
alliecc/argoverse-api | [
"8d96ebd92195a4fdb228d45b4584fdc61d4522c9",
"8d96ebd92195a4fdb228d45b4584fdc61d4522c9",
"8d96ebd92195a4fdb228d45b4584fdc61d4522c9"
] | [
"argoverse/evaluation/eval_forecasting.py",
"tests/test_mpl_plotting_utils.py",
"tests/test_polyline_density.py"
] | [
"# <Copyright 2019, Argo AI, LLC. Released under the MIT license.>\n\n\"\"\"This module evaluates the forecasted trajectories against the ground truth.\"\"\"\n\nimport math\nimport pickle as pkl\nfrom typing import Dict, List, Optional, Tuple\n\nimport numpy as np\n\nfrom argoverse.map_representation.map_api import... | [
[
"numpy.argsort",
"numpy.log",
"numpy.sum"
],
[
"matplotlib.pyplot.axes",
"numpy.array",
"matplotlib.pyplot.close"
],
[
"numpy.array"
]
] |
rscalzo/sami | [
"7ac5632e018cdf2384f5ff067c503177684f61c8",
"7ac5632e018cdf2384f5ff067c503177684f61c8"
] | [
"utils/cCirc.py",
"samifitting.py"
] | [
"from __future__ import print_function\n\n\"\"\"\nWrapper for the C++ drizzle overlap code.\n\nHistory\n-------\n\nCreated by Jon Nielsen in 2012\nUpdated for the new cubing algorithm by Francesco D'Eugenio 16/02/2017\n\nNotes\n-----\nThis module contains a testing function. At the moment it requires that the libra... | [
[
"numpy.ctypeslib.ndpointer",
"numpy.random.uniform",
"numpy.repeat",
"numpy.zeros"
],
[
"numpy.linspace",
"numpy.ones",
"scipy.sqrt",
"numpy.size",
"scipy.optimize.leastsq",
"scipy.sin",
"numpy.where",
"scipy.exp",
"scipy.cos"
]
] |
ShihanYang/dgl | [
"ec2e24be6dcc3bcc3d4ad5dff78212735f9db00f"
] | [
"tests/compute/test_transform.py"
] | [
"from scipy import sparse as spsp\nimport unittest\nimport networkx as nx\nimport numpy as np\nimport dgl\nimport dgl.function as fn\nimport backend as F\nfrom dgl.graph_index import from_scipy_sparse_matrix\nimport unittest\nfrom utils import parametrize_dtype\n\nD = 5\n\n# line graph related\n\ndef test_line_grap... | [
[
"scipy.sparse.coo_matrix",
"numpy.nonzero",
"numpy.unique",
"numpy.random.choice",
"numpy.arange",
"numpy.sort",
"scipy.sparse.csr_matrix",
"numpy.all",
"numpy.argsort",
"numpy.array",
"numpy.sum",
"numpy.isin"
]
] |
iLuSIAnn/test | [
"10d0a20dc1a646b5c1f6c7bff2960e3f5df0510e",
"10d0a20dc1a646b5c1f6c7bff2960e3f5df0510e",
"10d0a20dc1a646b5c1f6c7bff2960e3f5df0510e",
"10d0a20dc1a646b5c1f6c7bff2960e3f5df0510e",
"10d0a20dc1a646b5c1f6c7bff2960e3f5df0510e",
"10d0a20dc1a646b5c1f6c7bff2960e3f5df0510e"
] | [
"tests/sandbox/.venv_ccf_sandbox/lib/python3.8/site-packages/sklearn/base.py",
"tests/sandbox/.venv_ccf_sandbox/lib/python3.8/site-packages/sklearn/preprocessing/tests/test_data.py",
"tests/sandbox/.venv_ccf_sandbox/lib/python3.8/site-packages/sklearn/manifold/_mds.py",
"tests/sandbox/.venv_ccf_sandbox/lib/py... | [
"\"\"\"\nBase classes for all estimators.\n\nUsed for VotingClassifier\n\"\"\"\n\n# Author: Gael Varoquaux <gael.varoquaux@normalesup.org>\n# License: BSD 3 clause\n\nimport copy\nimport warnings\nfrom collections import defaultdict\nimport platform\nimport inspect\nimport re\n\nimport numpy as np\n\nfrom . import ... | [
[
"numpy.nonzero",
"numpy.set_printoptions",
"numpy.get_printoptions"
],
[
"sklearn.utils._testing.assert_array_less",
"sklearn.preprocessing._data.QuantileTransformer",
"sklearn.utils._testing.assert_almost_equal",
"scipy.sparse.isspmatrix_csc",
"sklearn.utils._testing.assert_al... |
realchrisward/RodentPlethysmography | [
"6b27e08a65b4c0b399e5b20173c0d134f5dbca38"
] | [
"calm segment extractor py34 v5 20170918.py"
] | [
"#!usr/bin/env python3\r\n## /\\ compatability line\r\n\r\n## distribution notes - Calm Segment Extractor py34 v4.py\r\n\"\"\"\r\nCalm Segment Extractor by Chris Ward (C) 2015\r\nupdated for python 3.4 compatability by Chris Ward (C) 2016\r\nprovided free for non-commercial/fair use.\r\n\r\nThis program attempts to... | [
[
"numpy.percentile",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
ablotekar/irfu-python | [
"740cb51ca9ce2ab0d62cb6fef3a7a722d430d79e",
"740cb51ca9ce2ab0d62cb6fef3a7a722d430d79e",
"740cb51ca9ce2ab0d62cb6fef3a7a722d430d79e",
"740cb51ca9ce2ab0d62cb6fef3a7a722d430d79e",
"740cb51ca9ce2ab0d62cb6fef3a7a722d430d79e",
"740cb51ca9ce2ab0d62cb6fef3a7a722d430d79e",
"740cb51ca9ce2ab0d62cb6fef3a7a722d430d79... | [
"pyrfu/mms/eis_skymap_combine_sc.py",
"pyrfu/pyrf/convert_fac.py",
"pyrfu/pyrf/dynamic_press.py",
"pyrfu/pyrf/movmean.py",
"pyrfu/mms/eis_proton_correction.py",
"pyrfu/pyrf/filt.py",
"pyrfu/mms/psd_rebin.py",
"pyrfu/pyrf/dist_append.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# 3rd party imports\nimport numpy as np\nimport xarray as xr\n\n__author__ = \"Louis Richard\"\n__email__ = \"louisr@irfu.se\"\n__copyright__ = \"Copyright 2020-2021\"\n__license__ = \"MIT\"\n__version__ = \"2.3.7\"\n__status__ = \"Prototype\"\n\n\ndef _idx_closest... | [
[
"numpy.min",
"numpy.asarray",
"numpy.tile",
"numpy.stack",
"numpy.argmin",
"numpy.nanmean"
],
[
"numpy.linalg.norm",
"numpy.cross",
"numpy.array",
"numpy.zeros",
"numpy.sum"
],
[
"numpy.linalg.norm"
],
[
"numpy.cumsum",
"numpy.floor"
],
[
... |
RobertJaro/qt-solar-viewer | [
"dcecdc8040f457abf8d978a5ecbff61396358c32"
] | [
"solarviewer/app/plot.py"
] | [
"from abc import abstractmethod\n\nfrom matplotlib import pyplot as plt\nfrom matplotlib.backends.backend_qt5 import NavigationToolbar2QT\nfrom matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas\nfrom qtpy import QtWidgets\n\nfrom solarviewer.config.base import Viewer, DataModel\nfrom solar... | [
[
"matplotlib.backends.backend_qt5.NavigationToolbar2QT",
"matplotlib.pyplot.figure",
"matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg.updateGeometry",
"matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg",
"matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg.setSizePolicy"
]
] |
ducongju/HRNet | [
"8c6e1580d0410c439d16a9f220bf0ac48fb39e9a",
"8c6e1580d0410c439d16a9f220bf0ac48fb39e9a"
] | [
"lib/dataset/coco.py",
"lib/models/pose_resnet.py"
] | [
"# ------------------------------------------------------------------------------\n# Copyright (c) Microsoft\n# Licensed under the MIT License.\n# Written by Bin Xiao (Bin.Xiao@microsoft.com)\n# ------------------------------------------------------------------------------\n\nfrom __future__ import absolute_import\... | [
[
"numpy.max",
"numpy.array",
"numpy.zeros",
"numpy.ones"
],
[
"torch.nn.Sequential",
"torch.nn.ConvTranspose2d",
"torch.load",
"torch.nn.init.constant_",
"torch.nn.Conv2d",
"torch.nn.MaxPool2d",
"torch.nn.init.normal_",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"... |
frankdvd/curb-monitor | [
"a5ad37a9dd0ca93477dffc647d2dfe7a8d9361e0"
] | [
"scripts/extract_gps.py"
] | [
"from pathlib import Path\nimport os, sys, shutil\nimport subprocess\nimport pandas as pd\nimport string\n\nif len(sys.argv) != 2:\n print(\"Usage: ./extract_gps.py <video dir>\")\n sys.exit()\n\ndef convert_latlong(in_str):\n split_latlong = in_str.split(' ')\n return float(split_latlong[0]) + float(sp... | [
[
"pandas.Series"
]
] |
sgdread/autogluon | [
"fa95c72a07066dc5380fccf8bbce04b5c031fc68"
] | [
"text/src/autogluon/text/automm/optimization/utils.py"
] | [
"from typing import Optional, Union, Tuple, List, Dict\nimport functools\nfrom torch import nn\nfrom torch import optim\nfrom torch.nn import functional as F\nfrom transformers.trainer_pt_utils import get_parameter_names\nimport torchmetrics\nfrom .lr_scheduler import (\n get_cosine_schedule_with_warmup,\n ge... | [
[
"torch.optim.Adam",
"torch.nn.CrossEntropyLoss",
"torch.optim.AdamW",
"torch.optim.SGD",
"torch.nn.MSELoss"
]
] |
xiaohui-zhang/audio | [
"0ec482cedfe82b209d23769a286fcd7d3fd468d2"
] | [
"test/torchaudio_unittest/common_utils/data_utils.py"
] | [
"import os.path\nfrom typing import Union, Optional\n\nimport torch\n\n\n_TEST_DIR_PATH = os.path.realpath(os.path.join(os.path.dirname(__file__), \"..\"))\n\n\ndef get_asset_path(*paths):\n \"\"\"Return full path of a test asset\"\"\"\n return os.path.join(_TEST_DIR_PATH, \"assets\", *paths)\n\n\ndef convert... | [
[
"torch.linspace",
"torch.sin",
"torch.random.fork_rng",
"torch.randn",
"torch.random.manual_seed",
"torch.hann_window",
"torch.stft"
]
] |
siddarthjha/Opencv | [
"ccf26ade18a4a04da464acbbc15f074904fab208"
] | [
"Image Processing/11_Template_Matching.py"
] | [
"import cv2\nimport numpy as np\nfrom matplotlib import pyplot as plt\n\nimg = cv2.imread('a.jpg',0)\nimg2 = img.copy()\ntemplate = cv2.imread('b.jpg',0)\nw, h = template.shape[::-1]\n\n# All the 6 methods for comparison in a list\nmethods = ['cv2.TM_CCOEFF', 'cv2.TM_CCOEFF_NORMED', 'cv2.TM_CCORR',\n 'cv... | [
[
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.yticks",
"matplotlib.pyplot.title",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.xticks",
"matplotlib.pyplot.suptitle",
"matplotlib.pyplot.show"
]
] |
terry97-guel/SMInet | [
"e4c158fb03096a12723bb474c3e468044eca46a6"
] | [
"evaluate.py"
] | [
"import torch\nfrom model import *\nfrom dataloader import *\nfrom utils.pyart import *\nimport argparse\nimport numpy as np\nfrom pathlib import Path\n\ndef main(args):\n print(\"Processing...\")\n\n # set device:\n if torch.cuda.is_available():\n device = torch.device('cuda:0')\n else:\n ... | [
[
"torch.load",
"torch.cuda.is_available",
"numpy.savetxt",
"torch.device",
"numpy.array",
"numpy.vstack"
]
] |
levskaya/tensor2tensor | [
"4643800137f802693f880a1fab9e10de7ba32e66",
"4643800137f802693f880a1fab9e10de7ba32e66",
"4643800137f802693f880a1fab9e10de7ba32e66",
"4643800137f802693f880a1fab9e10de7ba32e66"
] | [
"tensor2tensor/layers/common_attention_test.py",
"tensor2tensor/models/mtf_resnet.py",
"tensor2tensor/data_generators/translate.py",
"tensor2tensor/models/video/basic_deterministic.py"
] | [
"# coding=utf-8\n# Copyright 2019 The Tensor2Tensor 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 requir... | [
[
"numpy.dot",
"tensorflow.contrib.eager.run_test_in_graph_and_eager_modes",
"tensorflow.zeros",
"tensorflow.compat.v1.enable_eager_execution",
"numpy.concatenate",
"numpy.exp",
"numpy.pad",
"numpy.reshape",
"tensorflow.gradients",
"tensorflow.test.main",
"tensorflow.to_f... |
NCLPhD/FedML | [
"ffa15262ee963b9c856f34f0b2202f4dfeb3a76b",
"ffa15262ee963b9c856f34f0b2202f4dfeb3a76b",
"ffa15262ee963b9c856f34f0b2202f4dfeb3a76b",
"ffa15262ee963b9c856f34f0b2202f4dfeb3a76b"
] | [
"python/fedml/cross_silo/hierarchical/trainer_dist_adapter.py",
"python/fedml/simulation/mpi_p2p_mp/fedavg_robust/FedAvgRobustAggregator.py",
"python/fedml/simulation/single_process/fednova/client.py",
"python/fedml/simulation/mpi_p2p_mp/turboaggregate/mpc_function.py"
] | [
"from torch.nn.parallel import DistributedDataParallel as DDP\nimport torch.distributed as dist\n\nfrom .fedml_trainer import FedMLTrainer\nfrom .process_group_manager import ProcessGroupManager\nfrom torch.nn.parallel import DistributedDataParallel as DDP\nfrom .trainer.my_model_trainer_classification import MyMod... | [
[
"torch.distributed.barrier",
"torch.nn.parallel.DistributedDataParallel"
],
[
"torch.nn.CrossEntropyLoss",
"torch.max",
"numpy.random.seed",
"torch.no_grad",
"torch.where",
"torch.ones_like"
],
[
"torch.nn.CrossEntropyLoss",
"torch.no_grad",
"torch.max",
"to... |
alexjuda2/z-quantum-core | [
"c258100dbd091f0b22495b77b36399426ae9abac"
] | [
"src/python/zquantum/core/circuits/conversions/qiskit_conversions.py"
] | [
"import hashlib\nfrom typing import Dict, Iterable, List, NamedTuple, Sequence, Tuple, Union\n\nimport numpy as np\nimport qiskit\nimport sympy\n\nfrom .. import _builtin_gates, _circuit, _gates\nfrom ..symbolic.qiskit_expressions import QISKIT_DIALECT, expression_from_qiskit\nfrom ..symbolic.sympy_expressions impo... | [
[
"numpy.array"
]
] |
aalaprana995/Turtlebot_Navigation_Non_Holonomic_Constrains- | [
"9978467def69080fcd4da7c856e54b6ebda98248"
] | [
"code/final_rrl.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Sun Apr 28 00:33:10 2019\r\n\r\n@author: Aalap\r\n\"\"\"\r\n\r\n\r\n# -*- coding: utf-8 -*\r\n\"\"\"\r\nCreated on Thu Mar 28 18:47:25 2019\r\n\r\n@author: Aalap\r\n\"\"\"\r\n\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport math\r\n\r\nclass Node:\... | [
[
"matplotlib.pyplot.plot",
"matplotlib.pyplot.show",
"numpy.zeros",
"matplotlib.pyplot.grid"
]
] |
plopresti/tensorflow | [
"8b0c84d30d957596cbb3bcac9245e114c3f0b65b",
"8b0c84d30d957596cbb3bcac9245e114c3f0b65b",
"8b0c84d30d957596cbb3bcac9245e114c3f0b65b",
"8b0c84d30d957596cbb3bcac9245e114c3f0b65b",
"8b0c84d30d957596cbb3bcac9245e114c3f0b65b",
"8b0c84d30d957596cbb3bcac9245e114c3f0b65b"
] | [
"tensorflow/python/framework/func_graph.py",
"tensorflow/python/eager/core_test.py",
"tensorflow/python/keras/layers/gru_test.py",
"tensorflow/python/ops/linalg/linear_operator_diag.py",
"tensorflow/python/keras/utils/generic_utils_test.py",
"tensorflow/python/framework/auto_control_deps.py"
] | [
"# 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.python.eager.tape.record_operation",
"tensorflow.python.framework.ops._as_graph_element",
"tensorflow.python.util.tf_decorator.rewrap",
"tensorflow.python.ops.array_ops.placeholder",
"tensorflow.python.util.tf_decorator.make_decorator",
"tensorflow.python.eager.context.context"... |
hanhou/map-ephys | [
"4262e1ba68671b342a77f386e4ebabcce138c453"
] | [
"pipeline/plot/unit_characteristic_plot.py"
] | [
"import numpy as np\nimport datajoint as dj\nfrom PIL import ImageColor\nfrom collections import Counter\n\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nimport itertools\nimport pandas as pd\n\nfrom pipeline import experiment, ephys, psth, lab, histology, ccf, psth_foraging\n\nf... | [
[
"numpy.nanmax",
"numpy.linspace",
"numpy.cumsum",
"pandas.DataFrame",
"numpy.where",
"numpy.hstack",
"numpy.arange",
"numpy.full",
"numpy.sin",
"matplotlib.pyplot.subplot",
"numpy.nansum",
"numpy.diff",
"numpy.repeat",
"matplotlib.pyplot.figure",
"matplo... |
Azarattum/Jumpcutter | [
"f8439776689c7baecfc68516b2ef3afe743284db"
] | [
"jumpcutter.py"
] | [
"from contextlib import closing\nfrom PIL import Image\nimport subprocess\nfrom audiotsm import phasevocoder\nfrom audiotsm.io.wav import WavReader, WavWriter\nfrom scipy.io import wavfile\nimport numpy as np\nimport re\nimport math\nfrom shutil import copyfile, rmtree\nimport os\nimport argparse\nfrom pytube impor... | [
[
"scipy.io.wavfile.write",
"numpy.min",
"numpy.arange",
"numpy.concatenate",
"numpy.max",
"numpy.repeat",
"numpy.zeros",
"scipy.io.wavfile.read"
]
] |
nagachika/probability | [
"2a5609ceec01a388ec03b583b4f8e813cfbad981",
"2a5609ceec01a388ec03b583b4f8e813cfbad981",
"2a5609ceec01a388ec03b583b4f8e813cfbad981",
"2a5609ceec01a388ec03b583b4f8e813cfbad981",
"2a5609ceec01a388ec03b583b4f8e813cfbad981",
"2a5609ceec01a388ec03b583b4f8e813cfbad981"
] | [
"tensorflow_probability/python/distributions/zipf.py",
"tensorflow_probability/python/distributions/batch_reshape_test.py",
"experimental/fun_mcmc/fun_mcmc_lib.py",
"tensorflow_probability/python/distributions/vector_sinh_arcsinh_diag.py",
"tensorflow_probability/python/distributions/quantized_distribution.... | [
"# Copyright 2018 The TensorFlow Probability Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a... | [
[
"tensorflow.compat.v2.math.zeta",
"tensorflow.compat.v2.shape",
"tensorflow.compat.v2.identity",
"tensorflow.compat.v2.ones",
"tensorflow.compat.v2.TensorShape",
"tensorflow.compat.v2.name_scope",
"tensorflow.compat.v2.where",
"tensorflow.compat.v2.zeros",
"tensorflow.compat.v2... |
profintegra/stumpy | [
"66b3402d91820005b466e1da6fe353b61e6246c5",
"66b3402d91820005b466e1da6fe353b61e6246c5"
] | [
"stumpy/gpu_aamp.py",
"tests/test_mstump.py"
] | [
"# STUMPY\n# Copyright 2019 TD Ameritrade. Released under the terms of the 3-Clause BSD license.\n# STUMPY is a trademark of TD Ameritrade IP Company, Inc. All rights reserved.\nimport logging\nimport math\nimport multiprocessing as mp\nimport os\n\nimport numpy as np\nfrom numba import cuda\n\nfrom . import core, ... | [
[
"numpy.sqrt",
"numpy.full",
"numpy.ceil",
"numpy.load",
"numpy.where",
"numpy.empty"
],
[
"numpy.testing.assert_equal",
"numpy.dot",
"numpy.random.seed",
"numpy.arange",
"pandas.DataFrame",
"numpy.ones",
"numpy.testing.assert_almost_equal",
"numpy.ceil",... |
susantamoh84/TensorFlow-Book | [
"905bd82e6e58c373b566f4813859c5dfc1fa1aa4"
] | [
"ch09_cnn/cifar_tools.py"
] | [
"import cPickle\nimport numpy as np\n\n\ndef unpickle(file):\n fo = open(file, 'rb')\n dict = cPickle.load(fo)\n fo.close()\n return dict\n\n\ndef clean(data):\n imgs = data.reshape(data.shape[0], 3, 32, 32)\n grayscale_imgs = imgs.mean(1)\n cropped_imgs = grayscale_imgs[:, 4:28, 4:28]\n img... | [
[
"numpy.hstack",
"numpy.sqrt",
"numpy.std",
"numpy.shape",
"numpy.mean",
"numpy.vstack"
]
] |
joschout/Multi-Directional-Rule-Set-Learning | [
"ef0620b115f4e0fd7fba3e752d238a8020c1ca6b",
"ef0620b115f4e0fd7fba3e752d238a8020c1ca6b",
"ef0620b115f4e0fd7fba3e752d238a8020c1ca6b",
"ef0620b115f4e0fd7fba3e752d238a8020c1ca6b",
"ef0620b115f4e0fd7fba3e752d238a8020c1ca6b"
] | [
"mdrsl/rule_generation/association_rule_mining/apyori_impl/mine_mt_rules_from_dataframe_with_apyori.py",
"experiments/arcbench_data_preparation/arc_model_data_preparation.py",
"mdrsl/rule_models/mids/objective_function/mids_objective_function_statistics.py",
"experiments/e2_multi_directional_model_comparison/... | [
"import random\n\nimport numpy as np\nfrom typing import List, Optional, Dict\nimport pandas as pd\nimport time\n\nfrom mdrsl.rule_generation.association_rule_mining.apyori_impl.mine_mt_rules_from_transactions_with_apyori import (\n mine_MCARs_from_transactions_using_apyori)\nfrom mdrsl.rule_generation.associati... | [
[
"numpy.array"
],
[
"pandas.read_csv"
],
[
"pandas.DataFrame"
],
[
"sklearn.ensemble.RandomForestClassifier"
],
[
"numpy.dot",
"numpy.logical_or",
"numpy.array",
"numpy.zeros",
"numpy.sum"
]
] |
ashishpatel26/ML-DL-scripts | [
"25f930630f6e546955ad13863d6e728c8c702d43",
"25f930630f6e546955ad13863d6e728c8c702d43"
] | [
"NLP/LSTM RNN/WSDM - Fake News Classification/Berd generate embeddings/3_bert_encode_ch_test.py",
"DEEP LEARNING/instance segmentation/Kaggle TGS Salt Identification Challenge/v2/common_blocks/augmentation.py"
] | [
"# Please run bert-serving-start before running this notebook\n# Setup: https://github.com/hanxiao/bert-as-service\n# Examples (change folders to your locals)\n# english cased: bert-serving-start -model_dir /bert-as-service/cased_L-24_H-1024_A-16/ -num_worker=4\n# multi cased: bert-serving-start -model_dir /bert-as... | [
[
"pandas.read_csv",
"pandas.DataFrame"
],
[
"numpy.rot90",
"numpy.expand_dims",
"numpy.random.seed",
"numpy.fliplr",
"numpy.squeeze",
"numpy.flipud",
"numpy.random.randint"
]
] |
sburgholzer/MSDS-Capstone-Project | [
"4f22149c7ebff5c3dc129bb785d56f161ab138a8"
] | [
"implementation/spcTornadoCounts.py"
] | [
"import pandas as pd\r\n\r\ndf = pd.read_csv('/mnt/data3/scott/1950-2018_actual_tornadoes.csv')\r\n\r\ndf['date'] = pd.to_datetime(df['date'])\r\nmask = (df['date'] >= '1979-1-1') & (df['date'] <= '2013-12-31')\r\ndf = df.loc[mask]\r\ndf.groupby('date').size()\r\ndf.groupby('date').size().to_csv('/mnt/data3/scott/t... | [
[
"pandas.read_csv",
"pandas.to_datetime"
]
] |
Harald-R/aw_nas | [
"8cf0cf48f7bcfd7893e6355dcc3ccbc83fd39783",
"8cf0cf48f7bcfd7893e6355dcc3ccbc83fd39783",
"8cf0cf48f7bcfd7893e6355dcc3ccbc83fd39783",
"8cf0cf48f7bcfd7893e6355dcc3ccbc83fd39783",
"8cf0cf48f7bcfd7893e6355dcc3ccbc83fd39783"
] | [
"aw_nas/final/rnn_model.py",
"aw_nas/final/cnn_trainer.py",
"aw_nas/utils/common_utils.py",
"aw_nas/hardware/utils.py",
"examples/plugins/robustness/2_multi_evaluator.py"
] | [
"#pylint: disable=invalid-name\n\nimport numpy as np\nimport torch\nfrom torch import nn\n\nfrom aw_nas import ops\nfrom aw_nas.utils.exception import expect, ConfigException\nfrom aw_nas.weights_manager.rnn_shared import RNNSharedNet, INIT_RANGE\n\nclass RNNGenotypeModel(RNNSharedNet):\n REGISTRY = \"final_mode... | [
[
"torch.nn.BatchNorm1d",
"torch.cat",
"torch.nn.ModuleList",
"torch.nn.Linear",
"torch.split",
"torch.stack",
"numpy.argsort"
],
[
"torch.nn.CrossEntropyLoss",
"torch.utils.data.distributed.DistributedSampler",
"numpy.random.seed",
"torch.utils.data.DataLoader",
... |
UST-QuAntiL/qhana | [
"bf499d072dcc37f81efec1b8e17b7d5460db7a04",
"bf499d072dcc37f81efec1b8e17b7d5460db7a04"
] | [
"qhana/backend/elementComparer.py",
"qhana/backend/clustering.py"
] | [
"from abc import ABCMeta\nfrom abc import abstractmethod\nfrom typing import Any\nimport enum\nimport networkx as nx\nfrom networkx import Graph\nfrom qhana.backend.taxonomie import Taxonomie\nfrom qhana.backend.logger import Logger\nimport numpy as np\nfrom qhana.backend.logger import Logger\nimport os\nimport jso... | [
[
"numpy.abs"
],
[
"numpy.zeros",
"sklearn.cluster.OPTICS",
"sklearn.cluster.KMeans",
"numpy.ones"
]
] |
zhangxinzhou/play_game | [
"854448f8416b2d3f98bb2c3ed0f7d834a61593de"
] | [
"opencv_learn/charpter12/demo_12.06.py"
] | [
"import cv2\nimport numpy as np\n\no = cv2.imread(\"contours.bmp\")\ngray = cv2.cvtColor(o, cv2.COLOR_BGR2GRAY)\nret, binary = cv2.threshold(gray, 127, 255, cv2.THRESH_BINARY)\ncontours, hierarchy = cv2.findContours(binary, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)\ncv2.imshow(\"original\", o)\nn = len(contours)\ncon... | [
[
"numpy.zeros"
]
] |
bstriner/gym-learning-to-learn | [
"4cd93bf7a306255771a32e0d97b3d705b2666656"
] | [
"gym_learning_to_learn/envs/base_env.py"
] | [
"from gym import Env\nfrom gym.utils import seeding\nfrom gym import spaces\nimport numpy as np\nimport keras.backend as K\n\n\nclass BaseEnv(Env):\n metadata = {'render.modes': ['human', 'ansi']}\n\n def __init__(self, action_mapping):\n self._seed()\n self.verbose = 0\n self.viewer = No... | [
[
"numpy.log",
"numpy.array",
"numpy.isfinite",
"numpy.float32"
]
] |
cocolord/SegmenTron | [
"940015dc35614c15bd303f91f611878efbab8796",
"940015dc35614c15bd303f91f611878efbab8796"
] | [
"segmentron/models/danet.py",
"segmentron/models/ccnet.py"
] | [
"from __future__ import division\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom .segbase import SegBaseModel\nfrom .model_zoo import MODEL_REGISTRY\nfrom ..modules import _FCNHead, PAM_Module, CAM_Module\n\n__all__ = ['DANet']\n\n\n@MODEL_REGISTRY.register()\nclass DANet(SegBaseMode... | [
[
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.nn.Dropout2d",
"torch.nn.functional.interpolate"
],
[
"torch.nn.Dropout2d",
"torch.cat",
"torch.nn.Conv2d",
"torch.nn.functional.interpolate",
"torch.nn.ReLU"
]
] |
thisch/unyt | [
"27894c1edc275205a9ad2e0d9f47d11241e1f5c3"
] | [
"unyt/tests/test_units.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nTest symbolic unit handling.\n\n\n\n\n\"\"\"\n\n# -----------------------------------------------------------------------------\n# Copyright (c) 2018, yt Development Team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the LICENSE file, ... | [
[
"numpy.testing.assert_equal",
"numpy.array",
"numpy.testing.assert_almost_equal",
"numpy.testing.assert_allclose"
]
] |
pierrick-giffard/parcels | [
"2447d4785b915e17f59f6c1f90703a35d2235c91"
] | [
"tests/test_kernel_language.py"
] | [
"from parcels import FieldSet, ParticleSet, ScipyParticle, JITParticle, Kernel, Variable, ErrorCode\nfrom parcels.kernels.seawaterdensity import polyTEOS10_bsq, UNESCO_Density\nfrom parcels import random as parcels_random\nimport numpy as np\nimport pytest\nimport random as py_random\nfrom os import path\nimport sy... | [
[
"numpy.allclose",
"numpy.linspace",
"numpy.arange",
"numpy.ones",
"numpy.all",
"numpy.array",
"numpy.meshgrid",
"numpy.zeros",
"numpy.isclose"
]
] |
PudPawat/protest-detection-violence-estimation | [
"6469c3ae47a7d99308458174fe16bd2c5c7821aa"
] | [
"resnext_wsl.py"
] | [
"\n# Copyright (c) Facebook, Inc. and its affiliates.\n# All rights reserved.\n#\n# This source code is licensed under the license found in the\n# LICENSE file in the root directory of this source tree.\n\n# Optional list of dependencies required by the package\n\n'''\n Code From : https://github.com/facebookres... | [
[
"torch.utils.model_zoo.load_url"
]
] |
spetrescu/sesn | [
"43ecc5da7083364eea2c66742c17231c18465973",
"43ecc5da7083364eea2c66742c17231c18465973"
] | [
"models/mnist_ses.py",
"models/stl_ses.py"
] | [
"'''MIT License. Copyright (c) 2020 Ivan Sosnovik, Michał Szmaja'''\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom .impl.ses_conv import SESMaxProjection\nfrom .impl.ses_conv import SESConv_Z2_H, SESConv_H_H\n\n\nclass MNIST_SES_Scalar(nn.Module):\n\n def __init__(self, pool_size=4... | [
[
"torch.nn.BatchNorm1d",
"torch.nn.Dropout",
"torch.nn.Linear",
"torch.nn.MaxPool2d",
"torch.nn.MaxPool3d",
"torch.nn.Upsample",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU",
"torch.nn.BatchNorm3d"
],
[
"torch.nn.Sequential",
"torch.nn.functional.dropout",
"torch.nn.f... |
tomaslovato/mocsy | [
"ede19cde4be5cd37ed192a3f3394e81302d11616"
] | [
"examples/test_mocsy.py"
] | [
"# -*- coding: utf-8 -*-\nimport sys\nimport numpy as np\nsys.path.append(\"../\")\nimport mocsy\n\n# Define input data (typical values at depth from 0 to 5000 meters)\ntemp = np.repeat(2.0, 6).astype('float32')\ndepth = np.arange (0, 6000, 1000).astype('float32')\nsal = np.repeat(35.0, 6).astype('float32')\nalk = ... | [
[
"numpy.arange",
"numpy.repeat",
"numpy.zeros",
"numpy.log"
]
] |
JayChanHoi/adaptive_gradient_clipping | [
"ab9a7c88bf67843d87919dd51d7b722e063ad2b8"
] | [
"models/nfnet.py"
] | [
"\"\"\" Normalization Free Nets. NFNet, NF-RegNet, NF-ResNet (pre-activation) Models\n\nPaper: `Characterizing signal propagation to close the performance gap in unnormalized ResNets`\n - https://arxiv.org/abs/2101.08692\n\nPaper: `High-Performance Large-Scale Image Recognition Without Normalization`\n - http... | [
[
"torch.nn.Sequential",
"torch.tensor",
"torch.nn.MaxPool2d",
"torch.nn.Identity",
"torch.nn.init.normal_",
"torch.nn.init.zeros_",
"torch.nn.init.kaiming_normal_"
]
] |
lesserwhirls/scipy-cwt | [
"ee673656d879d9356892621e23ed0ced3d358621",
"ee673656d879d9356892621e23ed0ced3d358621",
"ee673656d879d9356892621e23ed0ced3d358621",
"ee673656d879d9356892621e23ed0ced3d358621",
"ee673656d879d9356892621e23ed0ced3d358621"
] | [
"scipy/lib/lapack/setupscons.py",
"scipy/weave/tests/test_scxx_dict.py",
"scipy/integrate/setupscons.py",
"scipy/interpolate/tests/test_regression.py",
"scipy/maxentropy/tests/test_maxentropy.py"
] | [
"#!/usr/bin/env python\n\nimport os\nfrom glob import glob\n\ndef configuration(parent_package='',top_path=None):\n from numpy.distutils.misc_util import Configuration\n from numpy.distutils.system_info import get_info\n\n config = Configuration('lapack',parent_package,top_path)\n\n config.add_sconscrip... | [
[
"numpy.distutils.misc_util.Configuration"
],
[
"scipy.weave.inline_tools.inline",
"numpy.testing.assert_raises",
"numpy.testing.assert_",
"numpy.testing.dec.knownfailureif"
],
[
"numpy.distutils.misc_util.Configuration"
],
[
"scipy.interpolate.splrep",
"numpy.linspace",... |
old-school-kid/keras | [
"326cf80085a9d7d980b968ea1ca235490e32833b"
] | [
"keras/layers/dense_attention_test.py"
] | [
"# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.compat.v2.executing_eagerly",
"tensorflow.compat.v2.test.main",
"numpy.ones",
"tensorflow.compat.v2.shape",
"tensorflow.compat.v2.random.uniform",
"numpy.array"
]
] |
Fritingo/AlexNet_on_browser | [
"3e674dd84e25ee74f2efde77882b4faa788907c2"
] | [
"AlexNet/Alexnet_to_onnx.py"
] | [
"import torch\n\nfrom inference_Alexnet import AlexNet\n\n\ndef main():\n pytorch_model = AlexNet()\n pytorch_model.load_state_dict(torch.load('cifar100_Alexnet.pt'))\n pytorch_model.eval()\n dummy_input = torch.zeros(128*128*4)\n torch.onnx.export(pytorch_model, dummy_input, 'cifar100_Alexnet.onnx', verbose=T... | [
[
"torch.onnx.export",
"torch.load",
"torch.zeros"
]
] |
vincefn/silx | [
"4b239abfc90d2fa7d6ab61425f8bfc7b83c0f444",
"4b239abfc90d2fa7d6ab61425f8bfc7b83c0f444",
"4b239abfc90d2fa7d6ab61425f8bfc7b83c0f444",
"4b239abfc90d2fa7d6ab61425f8bfc7b83c0f444",
"13301e61627f98fa837008250ac74a0627a7a560",
"13301e61627f98fa837008250ac74a0627a7a560",
"13301e61627f98fa837008250ac74a0627a7a56... | [
"examples/plotStats.py",
"silx/gui/plot/CompareImages.py",
"silx/io/spech5.py",
"silx/opencl/backprojection.py",
"silx/utils/test/test_proxy.py",
"silx/gui/_glutils/Texture.py",
"silx/gui/plot3d/scene/cutplane.py",
"silx/gui/plot3d/items/volume.py",
"examples/colormapDialog.py",
"silx/image/marchi... | [
"#!/usr/bin/env python\n# coding: utf-8\n# /*##########################################################################\n#\n# Copyright (c) 2016-2019 European Synchrotron Radiation Facility\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated document... | [
[
"numpy.arange",
"numpy.sum",
"numpy.trapz"
],
[
"numpy.zeros_like",
"numpy.zeros",
"numpy.empty",
"numpy.isclose"
],
[
"numpy.linspace",
"numpy.asarray",
"numpy.int_",
"numpy.prod",
"numpy.float32",
"numpy.array",
"numpy.empty"
],
[
"numpy.li... |
duncanmazza/ml_stock_prediction_api | [
"4cf6325ff1252511049b87bc46fa4d5b48acf4f3",
"4cf6325ff1252511049b87bc46fa4d5b48acf4f3"
] | [
"src/CombinedModel.py",
"src/StockRNN.py"
] | [
"\"\"\"\nCode for the combined model approach.\n\n@author: Shashank Swaminathan\n\"\"\"\n\nfrom src.BayesReg import GPM\nfrom src.StockRNN import StockRNN\nimport pandas as pd\nimport numpy as np\nfrom datetime import datetime\nfrom datetime import date\n\nZERO_TIME = \" 00:00:00\"\n\nDEVICE = \"cuda\" # selects t... | [
[
"pandas.to_datetime",
"pandas.Timedelta",
"numpy.append",
"numpy.busday_count",
"numpy.array"
],
[
"matplotlib.pyplot.legend",
"torch.zeros",
"torch.load",
"torch.utils.data.DataLoader",
"matplotlib.pyplot.plot",
"numpy.mean",
"torch.nn.Dropout",
"numpy.aran... |
naylor-b/OpenMDAO1 | [
"49d82f6601b33db9bdcf7d146d030d55e3b62ef4"
] | [
"openmdao/solvers/test/test_ln_direct.py"
] | [
"\"\"\" Unit test for the DirectSolver linear solver. \"\"\"\n\nimport unittest\nimport numpy as np\n\nfrom openmdao.api import Group, Problem, IndepVarComp, ExecComp, DirectSolver, \\\n LinearGaussSeidel, Newton\nfrom openmdao.core.test.test_residual_sign import SimpleImplicitSL\nfrom openm... | [
[
"numpy.array",
"numpy.linalg.norm",
"numpy.ones"
]
] |
ad6398/Pointer-Generator-NW | [
"4bf997453fb8570fe04668318ca3861cb7d23ecf"
] | [
"utils/dataset.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport csv\nimport glob\nimport time\nimport queue\nimport struct\nimport numpy as np\nimport tensorflow as tf\nfrom random import shuffle\nfrom threading import Thread\nfrom tensorflow.core.example import example_pb2\n\nfrom utils import utils\nfrom utils import config\n\nimport random\... | [
[
"tensorflow.logging.error",
"numpy.zeros",
"tensorflow.core.example.example_pb2.Example.FromString",
"tensorflow.logging.info"
]
] |
veterinarian-5300/Genious-Python-Code-Generator | [
"d78cd5f4b64221e8e4dc80d6e1f5ba0a4c613bcd",
"d78cd5f4b64221e8e4dc80d6e1f5ba0a4c613bcd",
"d78cd5f4b64221e8e4dc80d6e1f5ba0a4c613bcd",
"d78cd5f4b64221e8e4dc80d6e1f5ba0a4c613bcd"
] | [
"practice/check.py",
"Py_lab/Lab 1,2/plotting_unit_signals.py",
"Py_lab/Lab 1,2/matrix.py",
"Py_lab/Lab 4/unsolved_1.py"
] | [
"import csv\r\nimport pandas as pd\r\n\r\none=pd.read_csv(\"pa_dashboards.csv\")\r\n\r\ntwo=pd.read_csv(\"pa_dashboards(1).csv\", squeeze=True)\r\n\r\npattern = '|'.join(two)\r\n\r\nexist=one['sentences'].str.contains(pattern, na=False)\r\n\r\nwith open('new.csv', 'w') as outFile:\r\n for cols in exist:\r\n ... | [
[
"pandas.read_csv"
],
[
"matplotlib.pyplot.stem",
"matplotlib.pyplot.title",
"numpy.linspace",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
],
[
"numpy.array"
],
[
"matplotlib.pyplot.stem",
"numpy.linspace",
"matplotlib.pyp... |
csaid/bokeh | [
"4312b2de1a15fb24884fcd97eaf6442bf8b4bd7b",
"4312b2de1a15fb24884fcd97eaf6442bf8b4bd7b",
"4312b2de1a15fb24884fcd97eaf6442bf8b4bd7b"
] | [
"examples/plotting/server/boxplot.py",
"bokeh/charts/scatter.py",
"sphinx/source/tutorial/solutions/histogram.py"
] | [
"# The plot server must be running\n# Go to http://localhost:5006/bokeh to view this plot\n\nimport numpy as np\nimport pandas as pd\nfrom bokeh.plotting import *\n\n# Generate some synthetic time series for six different categories\ncats = list(\"abcdef\")\ny = np.random.randn(2000)\ng = np.random.choice(cats, 200... | [
[
"numpy.random.randn",
"numpy.random.choice"
],
[
"numpy.array"
],
[
"numpy.random.lognormal",
"numpy.log",
"numpy.random.beta",
"numpy.sqrt",
"numpy.linspace",
"numpy.random.normal",
"numpy.random.gamma",
"numpy.random.uniform",
"numpy.exp",
"numpy.histo... |
valentinaschueller/sweet | [
"27e99c7a110c99deeadee70688c186d82b39ac90",
"27e99c7a110c99deeadee70688c186d82b39ac90",
"27e99c7a110c99deeadee70688c186d82b39ac90",
"27e99c7a110c99deeadee70688c186d82b39ac90"
] | [
"benchmarks_sphere/paper_jrn_parco_rexi_nonlinear/compare_wt_dt_vs_accuracy_galewsky/postprocessing_consolidate.py",
"doc/rexi/rexi_with_cauchy_integral/test_cauchy_shifted/CauchyPhiQuadrature.py",
"benchmarks_plane/nonlinear_interaction/pp_nm_plot_evol_modewise.py",
"benchmarks_sphere/paper_jrn_sl_exp/refere... | [
"#! /usr/bin/env python3\n\nimport sys\nimport math\n\nfrom SWEET import *\nfrom mule.plotting.Plotting import *\nfrom mule.postprocessing.JobsData import *\nfrom mule.postprocessing.JobsDataConsolidate import *\n\nsys.path.append('../')\nimport pretty_plotting as pp\nsys.path.pop()\n\nmule_plotting_usetex(False)\n... | [
[
"matplotlib.ticker.FormatStrFormatter",
"matplotlib.ticker.LogLocator"
],
[
"numpy.diag",
"numpy.dot",
"numpy.linalg.inv",
"numpy.linalg.eig",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"numpy.identity",
"numpy.array",
"matplotlib.pyplot.show"
],
[
... |
NunoEdgarGFlowHub/cvxpy | [
"43270fcc8af8fc4742f1b3519800b0074f2e6693"
] | [
"cvxpy/atoms/max.py"
] | [
"\"\"\"\nCopyright 2013 Steven Diamond\n\nThis file is part of CVXPY.\n\nCVXPY is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nCVXP... | [
[
"numpy.matrix",
"numpy.argmax",
"numpy.zeros",
"numpy.ones"
]
] |
damien911224/augmentation-corruption | [
"4cf22bd3be1d100635fb6cd41e9b71a6949b5dd0",
"4cf22bd3be1d100635fb6cd41e9b71a6949b5dd0"
] | [
"experiments/severity_scan_imagenet.py",
"experiments/overlap/test_corrupt_net.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 hydra\nfrom hydra.utils import instantiate\nimport logging\nfrom overlap.train_net import train_net\nfrom overlap.test_net im... | [
[
"numpy.savez",
"numpy.random.seed",
"torch.cuda.current_device",
"torch.cuda.set_device",
"torch.manual_seed",
"torch.distributed.destroy_process_group",
"torch.utils.data.Subset",
"numpy.load",
"torch.nn.parallel.DistributedDataParallel"
],
[
"torch.utils.data.distribu... |
francisengelmann/PyViz3D | [
"51e49788e2aafc522920cbde7c48e962aca8e7b5"
] | [
"examples/example_normals.py"
] | [
"import numpy as np\nimport pyviz3d.visualizer as viz\n\n\ndef create_color_palette():\n return np.array([\n (0, 0, 0),\n (174, 199, 232),\t\t# wall\n (152, 223, 138),\t\t# floor\n (31, 119, 180), \t\t# cabinet\n (255, 187, 120),\t\t# bed\n (188, 189, 34), \t\t# chair\n ... | [
[
"numpy.load",
"numpy.array",
"numpy.mean"
]
] |
lyuwen/phono3py | [
"9e2adffa6c07abb4bdbe4e4188c460cb8a0462fd",
"9e2adffa6c07abb4bdbe4e4188c460cb8a0462fd"
] | [
"phono3py/cui/settings.py",
"phono3py/phonon3/triplets.py"
] | [
"import numpy as np\nfrom phonopy.cui.settings import Settings, ConfParser, fracval\n\nclass Phono3pySettings(Settings):\n def __init__(self):\n Settings.__init__(self)\n\n self._boundary_mfp = 1.0e6 # In micrometre. The default value is\n # just set to avoid diver... | [
[
"numpy.diag",
"numpy.linalg.det",
"numpy.array",
"numpy.reshape"
],
[
"numpy.dot",
"numpy.sqrt",
"numpy.unique",
"numpy.extract",
"numpy.prod",
"numpy.ndindex",
"numpy.array",
"numpy.exp",
"numpy.where",
"numpy.zeros"
]
] |
bputman/schrutepy | [
"68f18a4e47a77bcfc92e0f76c3ba6bb135add65c"
] | [
"schrutepy/schrutepy.py"
] | [
"import pandas\n\n\ndef load_schrute():\n \"\"\"\n The entire script transcriptions from The Office in pandas dataframe format.\n \"\"\"\n\n full_path = \"https://github.com/bradlindblad/schrutepy/raw/master/data/schrute.csv\"\n\n df = pandas.read_csv(full_path)\n df = df.drop(\"Unnamed: 0\", axis... | [
[
"pandas.read_csv"
]
] |
joshrose/Horizon | [
"a2eb407b31a16560ae78aa6751eb83672a122a7e",
"a2eb407b31a16560ae78aa6751eb83672a122a7e",
"a2eb407b31a16560ae78aa6751eb83672a122a7e",
"a2eb407b31a16560ae78aa6751eb83672a122a7e"
] | [
"ml/rl/test/gym/world_model/mdnrnn_gym.py",
"ml/rl/test/gym/run_gym.py",
"ml/rl/test/preprocessing/test_normalization.py",
"ml/rl/test/environment/linear_dynamics.py"
] | [
"#!/usr/bin/env python3\n# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n\"\"\"\nLearn a world model on gym environments\n\"\"\"\nimport argparse\nimport json\nimport logging\nimport sys\nfrom typing import Dict, Optional\n\nimport ml.rl.types as rlt\nimport numpy as np\nimport torch\nfrom ... | [
[
"numpy.logical_not",
"numpy.expand_dims",
"numpy.pad",
"torch.tensor",
"numpy.mean",
"numpy.float32",
"torch.device",
"numpy.vstack"
],
[
"torch.max",
"numpy.random.seed",
"torch.zeros",
"torch.manual_seed",
"torch.eye",
"sklearn.model_selection.train_te... |
Derikka/simulacrum | [
"99c4db9b15913c3c838532a86569645b3345fb83",
"99c4db9b15913c3c838532a86569645b3345fb83"
] | [
"model_service/model_service.py",
"klystron_service/klystron_service.py"
] | [
"#!/usr/bin/env python3\nimport os\nimport argparse\nimport sys\nimport pickle\nimport asyncio\nimport time\nimport numpy as np\nimport zmq\nimport pytao\nfrom p4p.nt import NTTable\nfrom p4p.server import Server as PVAServer\nfrom p4p.server.asyncio import SharedPV\nfrom zmq.asyncio import Context\nimport simulacr... | [
[
"numpy.matmul",
"numpy.stack",
"numpy.random.normal",
"numpy.identity",
"numpy.array"
],
[
"numpy.zeros"
]
] |
takuya-ki/wrs | [
"f6e1009b94332504042fbde9b39323410394ecde",
"f6e1009b94332504042fbde9b39323410394ecde",
"f6e1009b94332504042fbde9b39323410394ecde",
"f6e1009b94332504042fbde9b39323410394ecde",
"f6e1009b94332504042fbde9b39323410394ecde",
"f6e1009b94332504042fbde9b39323410394ecde"
] | [
"basis/trimesh/io/stl.py",
"drivers/devices/kinect_azure/helper.py",
"basis/trimesh/visual.py",
"0000_students_work/2021tro/projection_global_localrefine.py",
"0000_examples/hayakawa/research_posemake_many.py",
"motion/probabilistic/_rrt_connect_wrsnew.py"
] | [
"import numpy as np\n\nfrom ..util import is_binary_file\n\n# define a numpy datatype for the STL file\n_stl_dtype = np.dtype([('normals', np.float32, (3)), ('vertices', np.float32, (3, 3)), ('attributes', np.uint16)])\n_stl_dtype_header = np.dtype([('header', np.void, 80), ('face_count', np.int32)])\n\n\ndef load_... | [
[
"numpy.arange",
"numpy.zeros",
"numpy.tile",
"numpy.dtype"
],
[
"numpy.arange",
"numpy.array",
"numpy.tile",
"numpy.ones"
],
[
"numpy.random.random",
"numpy.dtype",
"numpy.append",
"numpy.asanyarray",
"numpy.argmax",
"numpy.shape",
"numpy.any",
... |
NathanLoPresto/UI-for-servicing-OP-AMPs | [
"75605aa8b2315c1bbf3e7eee0f8ad706fa7e4f14"
] | [
"Python/DDR.py"
] | [
"import ok\nfrom fpga import FPGA\nimport numpy as np\nimport time\nimport matplotlib.pyplot as plot\nimport struct\nfrom collections import namedtuple\n\nBLOCK_SIZE = (16384)\nWRITE_SIZE=(8*1024*1024)\nREAD_SIZE = (8*1024*1024)\ng_nMemSize = (8*1024*1024)\nsample_size = (524288)\nep = namedtuple('ep', 'addr bits t... | [
[
"matplotlib.pyplot.axhline",
"matplotlib.pyplot.title",
"numpy.arange",
"numpy.sin",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"numpy.zeros",
"matplotlib.pyplot.ylabel"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.