repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
aounleonardo/pitchgrader
[ "8822cd38c00a9ab8ac970ef5a9c04af0e959ae45" ]
[ "python/maps/image_rotater.py" ]
[ "from . import *\n\nfrom .cvfun import align_vertically\n\nimport matplotlib.pyplot as plt\n\n\nclass Rotater:\n def rotate_data(self, filename):\n filename = verify_json_in_filename(filename)\n data = read(PROCESSED + filename)\n for field in data:\n field_id = field[\"id\"]\n ...
[ [ "matplotlib.pyplot.imsave" ] ]
QuadQuanta/QuadQuanta
[ "e0f2e534ea44e8e7f97e732f7612b4abf6774929" ]
[ "QuadQuanta/examples/DoubleMA.py" ]
[ "#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\n'''\n@File : DoubleMA.py\n@Time : 2021/05/23\n@Author : levonwoo\n@Version : 0.2\n@Contact : \n@License : (C)Copyright 2020-2021\n@Desc : 双均线策略示例\n'''\n\n# here put the import lib\nimport numpy as np\nimport time\nimport matplotlib.pyplot as...
[ [ "matplotlib.pyplot.show", "matplotlib.pyplot.plot", "numpy.unique" ] ]
schhx/stock-analyze
[ "9595595580872e574d3b21ca2c6bf1182d6660f4" ]
[ "check_stock.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\nimport time\n\nimport pandas as pd\nimport stock\nimport baostock as bs\n\n\ndef dispatch(row):\n if 'watch' == row['status']:\n return handle_watch(row)\n elif 'pre_buy' == row['status']:\n return handle_pre_buy(row)\n elif 'buy' == row['stat...
[ [ "pandas.read_csv" ] ]
TongtongSong/speech_experiments
[ "8f69766d7c262c62dd4d36696a46b64c58570eda" ]
[ "experiments/04-speaker-recognition/Speaker_Verification_Code/pooling.py" ]
[ "import torch\nimport torch.nn as nn\n\nclass StatisticsPooling(torch.nn.Module):\n \"\"\"\n Mean and Standard deviation pooling\n \"\"\"\n def __init__(self):\n \"\"\"\n\n \"\"\"\n super(StatisticsPooling, self).__init__()\n pass\n\n def forward(self, x):\n \"\"\"\...
[ [ "torch.nn.AdaptiveAvgPool1d", "torch.cat", "torch.std", "torch.mean" ] ]
davidd-55/cs152fa21
[ "de0876195d8da74909416aef3dece1848179b777" ]
[ "lectures/l18-PlottingParameters.py" ]
[ "# ---\n# jupyter:\n# jupytext:\n# formats: ipynb,py:percent\n# text_representation:\n# extension: .py\n# format_name: percent\n# format_version: '1.3'\n# jupytext_version: 1.11.4\n# kernelspec:\n# display_name: Python 3 (ipykernel)\n# language: python\n# name: python...
[ [ "torch.nn.Linear", "torch.nn.Sigmoid", "torch.no_grad", "torch.std", "torch.linspace", "matplotlib.pyplot.subplots", "torch.nn.L1Loss", "torch.manual_seed", "torch.cuda.is_available", "torch.zeros_like", "matplotlib.patches.Rectangle" ] ]
thejumboroar/deep-human-action-recognition
[ "c0fa2245d4e716837efead5cc304a5b6e2c2df55" ]
[ "benset/data_preprocessing/generate_pose_for_training.py" ]
[ "import os\nimport sys\nimport time\nimport numpy as np\nfrom PIL import Image\nimport pickle\n\n#if os.path.realpath(os.getcwd()) != os.path.dirname(os.path.realpath(__file__)):\n# sys.path.append(os.getcwd())\n\nimport deephar\n\nfrom keras.utils.data_utils import get_file\n\nfrom deephar.config import ntu_dat...
[ [ "numpy.uint16", "numpy.interp" ] ]
operationcanard/tensorflow
[ "55e65d43f103a6dac2b4c4d274de7a8352e13528" ]
[ "tensorflow/python/keras/callbacks.py" ]
[ "# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.python.ops.math_ops.equal", "tensorflow.python.ops.summary_ops_v2.graph", "tensorflow.python.framework.ops.inside_function", "tensorflow.python.keras.utils.generic_utils.is_default", "tensorflow.python.lib.io.file_io.file_exists_v2", "tensorflow.python.ops.summary_ops_v2.histog...
stakira/ENUNU
[ "3ee981785507ca8a1612d7501b89c47c87c400c3" ]
[ "synthesis/enulib/world.py" ]
[ "#!/usr/bin/env python3\n# Copyright (c) 2022 oatsu\n\"\"\"\nacousticのファイルをWAVファイルにするまでの処理を行う。\n\"\"\"\nimport numpy as np\nimport pyworld\nfrom hydra.utils import to_absolute_path\nfrom nnmnkwii.io import hts\nfrom nnsvs.gen import gen_world_params\nfrom nnsvs.logger import getLogger\nfrom omegaconf import DictCon...
[ [ "numpy.abs", "numpy.loadtxt", "numpy.savetxt", "scipy.io.wavfile.write" ] ]
dumpmemory/BlockShuffleTest
[ "549dae7195196956f164e32ce4883af1099ab3cf" ]
[ "train.py" ]
[ "# -*- coding:utf-8 -*-\n# @project: BlockShuffleTest\n# @filename: train\n# @author: 刘聪NLP\n# @zhihu: https://www.zhihu.com/people/LiuCongNLP\n# @contact: logcongcong@gmail.com\n# @time: 2021/9/27 10:51\n\"\"\"\n 文件说明:\n \n\"\"\"\nimport torch\nimport os\nimport random\nimport numpy as np\nimport arg...
[ [ "numpy.array", "torch.utils.data.RandomSampler", "numpy.random.seed", "torch.no_grad", "torch.utils.data.SequentialSampler", "sklearn.metrics.accuracy_score", "torch.manual_seed", "torch.cuda.empty_cache", "torch.cuda.is_available", "torch.utils.data.DataLoader", "sklea...
anushri2325/Topsis_Anushri_101903678
[ "fe51bccf9efb03c9ad9e5085e029ae78169a6be5" ]
[ "Topsis_Anushri_101903678/topsis.py" ]
[ "import sys\nimport pandas as pd \nimport numpy as np\n\ndef normalized_matrix(filename):\n '''To normalize each of the values in the csv file'''\n try:\n dataset = pd.read_csv(filename) #loading the csv file into dataset\n if len(dataset.axes[1])<3:\n print(\"Number of columns should...
[ [ "numpy.square", "pandas.read_csv", "numpy.sqrt" ] ]
isuruf/scipy
[ "a767030252ba3f7c8e2924847dffa7024171657b" ]
[ "scipy/interpolate/interpolate.py" ]
[ "from __future__ import division, print_function, absolute_import\n\n__all__ = ['interp1d', 'interp2d', 'lagrange', 'PPoly', 'BPoly', 'NdPPoly',\n 'RegularGridInterpolator', 'interpn']\n\nimport itertools\nimport warnings\nimport functools\nimport operator\n\nimport numpy as np\nfrom numpy import (array, ...
[ [ "numpy.nextafter", "scipy.special.gamma", "numpy.ones_like", "numpy.rollaxis", "numpy.where", "numpy.sort", "numpy.cumsum", "scipy._lib.six.xrange", "numpy.issubdtype", "numpy.zeros_like", "numpy.empty", "numpy.interp", "numpy.take", "numpy.can_cast", "n...
ishine/dialogbot
[ "6c3d2f95555a05a3b935dda818e481ddc20eed08" ]
[ "dialogbot/task/babi_dialog.py" ]
[ "#!/usr/bin/env python\n# ******************************************************************************\n# Copyright 2017-2018 Intel 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 th...
[ [ "numpy.max", "numpy.array", "numpy.zeros", "numpy.ones", "numpy.load", "numpy.save", "numpy.unique" ] ]
jason-sjy/DVAE_mix2
[ "26df900f71737b3aa54fd77dee319b6339cb197e" ]
[ "3stage_random_topo/test_spectre_netlist.py" ]
[ "import os\r\nimport sys\r\nimport argparse\r\nimport logging\r\nimport time\r\nimport math\r\nimport traceback\r\nimport numpy as np\r\nfrom scipy.optimize import fmin_l_bfgs_b\r\nfrom shutil import copy\r\n\r\nimport igraph\r\nimport torch\r\nfrom torch import nn, optim\r\n\r\nfrom util import *\r\nfrom dataset i...
[ [ "numpy.random.randint", "numpy.shape", "numpy.zeros" ] ]
docsteveharris/flask-dash-app
[ "3948872df23db6b4fd5782f5b9fbe1e33dac2e4b" ]
[ "app/dash/crossfilter_example.py" ]
[ "from dash.dependencies import Input, Output\nimport dash_core_components as dcc\nimport dash_html_components as html\nimport dash_bootstrap_components as dbc\nimport plotly.graph_objs as go\nimport pandas as pd\n\nfrom .dash import Dash\n\ndf = pd.read_csv(\"app/data/indicators.csv\")\navailable_indicators = df[\"...
[ [ "pandas.read_csv" ] ]
elmexx/eWolf-Jetson
[ "34242b1cea360c1e81d0e26a9e8cb70cf9ca354e" ]
[ "src/yolo_trt_ros/scripts/utils/yolo_with_plugins.py" ]
[ "\"\"\"yolo_with_plugins.py\n\nImplementation of TrtYOLO class with the yolo_layer plugins.\n\"\"\"\n\n\nfrom __future__ import print_function\n\nimport ctypes\n\nimport numpy as np\nimport cv2\nimport tensorrt as trt\nimport pycuda.driver as cuda\n\n\ntry:\n ctypes.cdll.LoadLibrary('./plugins/libyolo_layer.so')...
[ [ "numpy.concatenate", "numpy.full", "numpy.array", "numpy.zeros", "numpy.minimum", "numpy.ascontiguousarray", "numpy.where", "numpy.clip", "numpy.maximum" ] ]
WayneCross/DDPG-in-tensorflow-2.1
[ "41801bfc11e5209d86419b1439ceca169a7bab47" ]
[ "DDPG.py" ]
[ "import numpy as np\r\nimport tensorflow as tf\r\nfrom tensorflow.keras import Sequential\r\nfrom tensorflow.keras.layers import Dense\r\nfrom tensorflow.keras.optimizers import Adam\r\ntf.keras.backend.set_floatx('float64')\r\n\r\n\"\"\"\r\nCritic model\r\nlr = 0.001\r\nl2 weight decay 0.01\r\ngamma = 0.99 for los...
[ [ "tensorflow.keras.backend.set_floatx", "tensorflow.convert_to_tensor", "numpy.zeros_like", "numpy.random.normal", "tensorflow.GradientTape", "tensorflow.random_uniform_initializer", "tensorflow.keras.models.Model", "tensorflow.keras.regularizers.l2", "numpy.sqrt", "tensorfl...
AngusMonroe/CS224n
[ "5fdb4bf38beccb63be1d5a1d6ed12dce7e8fbad7" ]
[ "Assignments/assignment3/q3_gru.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nQ3: Grooving with GRUs\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\n\nimport argparse\nimport logging\nimport sys\nimport time\nfrom datetime import datetime\n\nimport tensorflow as tf\nimport numpy as np\n\nimport matp...
[ [ "tensorflow.global_variables_initializer", "tensorflow.train.GradientDescentOptimizer", "tensorflow.set_random_seed", "tensorflow.sigmoid", "matplotlib.pyplot.savefig", "tensorflow.variable_scope", "numpy.arange", "tensorflow.get_variable_scope", "tensorflow.nn.dynamic_rnn", ...
viotemp1/talos
[ "b78d047b0f6d6f2a6a074c12d6c79bb1386fe791" ]
[ "talos/utils/gpu_utils.py" ]
[ "def parallel_gpu_jobs(allow_growth=True, fraction=.5):\n\n '''Sets the max used memory as a fraction for tensorflow\n backend\n\n allow_growth :: True of False\n\n fraction :: a float value (e.g. 0.5 means 4gb out of 8gb)\n\n '''\n\n import keras.backend as K\n import tensorflow as tf\n fro...
[ [ "tensorflow.Session", "tensorflow.config.experimental.set_memory_growth", "tensorflow.ConfigProto", "tensorflow.config.experimental.list_physical_devices", "tensorflow.GPUOptions", "tensorflow.config.experimental.VirtualDeviceConfiguration" ] ]
RahulSajnani/Robotics-Planning-and-Navigation
[ "a2fc1174a465b39b51cca498230af4ba699aae83" ]
[ "RapidlyExploringRandomTrees/src/RRT.py" ]
[ "from sys import platform\nimport numpy as np\nfrom Agents import *\nfrom Graph import *\nfrom utils import *\nfrom Map import *\nfrom sklearn.neighbors import NearestNeighbors\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as mpatches\n\n'''\nAuthors:\n\nRahul Sajnani\nAmarthya Sasi Kiran\nAbhiram Kad...
[ [ "numpy.array", "numpy.linalg.norm", "numpy.zeros", "matplotlib.pyplot.get_current_fig_manager", "numpy.random.seed", "matplotlib.pyplot.plot", "matplotlib.pyplot.title", "matplotlib.pyplot.legend", "matplotlib.pyplot.imread", "matplotlib.patches.Patch", "matplotlib.pypl...
hadi-gharibi/irholiday
[ "956ce06ca2cfcce65236ec11af582d944714ca34" ]
[ "irholiday/utils.py" ]
[ "import requests\nfrom bs4 import BeautifulSoup\nimport khayyam\nimport json\nimport pandas as pd\nimport re\n\ndef req(POSTstr):\n\n headers={\n 'Host': 'www.time.ir',\n 'User-Agent':'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0',\n 'Accept': '*/*',\n ...
[ [ "pandas.DataFrame" ] ]
Sebidev/MikuAi
[ "8e84280a38ac45ca9ec18b2e972e29cecfba3337" ]
[ "mikuai/speedyspeech/stft.py" ]
[ "import torch\nimport torch.nn.functional as F\nfrom librosa.feature.inverse import mel_to_stft\nfrom librosa.filters import mel as librosa_mel_fn\nimport numpy as np\nfrom mikuai.speedyspeech.utils.torch_stft import STFT\nfrom mikuai.speedyspeech.functional import pad_batch\nfrom mikuai.speedyspeech.hparam import ...
[ [ "torch.min", "torch.nn.utils.clip_grad_norm_", "torch.max", "torch.clamp", "torch.from_numpy", "torch.as_tensor", "torch.pinverse", "torch.optim.LBFGS", "torch.matmul", "torch.exp", "torch.pow" ] ]
prrao87/pytorch-openai-transformer-lm
[ "2ab3e0ee72d72b10065c896e03a599e9574fbd15" ]
[ "utils.py" ]
[ "import os\nimport sys\nimport json\nimport time\nfrom functools import partial\nimport numpy as np\n# import tensorflow as tf\n# from tensorflow.python.framework import function\nfrom tqdm import tqdm\n\ndef encode_dataset(*splits, encoder):\n encoded_splits = []\n for split in splits:\n fields = []\n...
[ [ "numpy.max", "numpy.sum", "numpy.exp", "numpy.eye", "numpy.floor" ] ]
mfkiwl/gap_sdk
[ "6d255c70883cf157d76d006b2dbf55bc6974b21f" ]
[ "tools/nntool/importer/tflite2/handlers/backend/shape.py" ]
[ "# Copyright (C) 2020 GreenWaves Technologies, SAS\n\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public License as\n# published by the Free Software Foundation, either version 3 of the\n# License, or (at your option) any later version.\n\n...
[ [ "numpy.array" ] ]
PhucNguyen-rsc/DeepStack
[ "12b093ac1325343d9caa08ca90558c84daffe2f5" ]
[ "deepstack/ensemble.py" ]
[ "\"\"\"\nModule representing the Meta-Learners, containing an Ensemble of Base-Learners\n\"\"\"\nimport numpy as np\nfrom sklearn import metrics\nimport warnings\nfrom abc import abstractmethod\nfrom sklearn.ensemble import RandomForestRegressor\nimport os\nimport joblib\nimport glob\nfrom deepstack.base import Mem...
[ [ "numpy.concatenate", "numpy.array", "numpy.array_equal", "numpy.sum", "numpy.ones", "numpy.prod", "numpy.argmax", "sklearn.ensemble.RandomForestRegressor", "tensorflow.one_hot" ] ]
Can-Zhao/NVFlare
[ "52d9dee9972b32d49d9a8add52a652ce3bb878b5" ]
[ "nvflare/app_common/homomorphic_encryption/he_pt_model_reader_writer.py" ]
[ "# Copyright (c) 2021-2022, 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# Unle...
[ [ "numpy.reshape", "numpy.shape" ] ]
yongqiangma/Paddle
[ "fd3c6146804f9055c36622ed8b9f5f4f6ad6a058" ]
[ "python/paddle/fluid/tests/unittests/test_roi_pool_op.py" ]
[ "# Copyright (c) 2018 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 ...
[ [ "numpy.array", "numpy.random.random_integers", "numpy.asarray", "numpy.zeros", "numpy.random.random" ] ]
mtbkb/Gasyori100knock
[ "03b9c85dde2c467403185521620ee9823f1d52e8" ]
[ "MyAns/q18.py" ]
[ "import cv2\nimport base as bs\nimport numpy as np\n\n\ndef emboss_filter(img, K_size=3, sigma=1.3):\n if len(img.shape) == 3:\n H, W, C = img.shape\n else:\n img = np.expand_dims(img, axis=-1)\n H, W, C = img.shape\n \n ##padding\n pad = K_size // 2\n out = np.zeros((H + pad ...
[ [ "numpy.max", "numpy.array", "numpy.zeros", "numpy.sum", "numpy.clip", "numpy.expand_dims" ] ]
hutomadotAI/Research-Experiments
[ "ae354930a164dee96b2f7cb32f19a70eb85db887" ]
[ "lstm/encoder.py" ]
[ "import tensorflow as tf\n\nfrom layers import BiLSTM\n\n\nclass Encoder(object):\n def __init__(self, hidden_units, output_keep_prob, input_keep_prob,\n state_keep_prob, n_layers=1, seed=3435):\n self.hidden_units = hidden_units\n self.seed = seed\n self.output_keep_prob = o...
[ [ "tensorflow.cond", "tensorflow.variable_scope", "tensorflow.concat" ] ]
RADAR-base/pyRADAR-processing
[ "3995d5f5f52b7be116a3b9dcaa7a1fa36875354a" ]
[ "radar/wrappers.py" ]
[ "#!/usr/bin/env python3\n\"\"\"A module containing the base classes for RADAR.\n\nClasses corresponding to the project, participant, and data\n\"\"\"\nfrom collections.abc import MutableMapping, KeysView, ItemsView, ValuesView\nfrom datetime import datetime\nfrom fsspec import filesystem\nfrom fsspec.utils import i...
[ [ "pandas.Timestamp", "numpy.array" ] ]
majacQ/angr
[ "e52a6193d9b8d949b059354471f588e23e434067" ]
[ "angr/knowledge_plugins/functions/function.py" ]
[ "\nimport os\nimport logging\nimport networkx\nimport string\nimport itertools\nimport pickle\nfrom collections import defaultdict\n\nfrom itanium_demangler import parse\n\nfrom archinfo.arch_arm import get_real_address_if_arm\nimport claripy\n\nfrom ...protos import function_pb2, primitives_pb2\nfrom ...serializab...
[ [ "matplotlib.pyplot.savefig" ] ]
klarman-cell-observatory/perturbseq
[ "37b197700ba9b3d76d45a6b00102b5b3e03fc45e" ]
[ "perturbseq/tl.py" ]
[ "import numpy as np\nimport pandas as pd\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport scanpy as sc\nimport seaborn as sns\n\n#========= may have to split some of these methods into utils later\ndef get_cls_adata(adata_here,n_neighbors):\n sc.pp.neighbors(adata_here,n_neighbors=n_neighbors,use_rep=...
[ [ "numpy.sign", "matplotlib.pyplot.colorbar", "numpy.log", "pandas.DataFrame", "numpy.nonzero", "numpy.arange", "numpy.log10", "matplotlib.pyplot.gca", "scipy.stats.fisher_exact", "scipy.cluster.hierarchy.dendrogram", "scipy.cluster.hierarchy.linkage", "numpy.array", ...
chrislybaer/huggingmolecules
[ "210239ac46b467e900a47e8f4520054636744ca6" ]
[ "src/huggingmolecules/models/models_mat.py" ]
[ "\"\"\"\nThis implementation is adapted from\nhttps://github.com/ardigen/MAT/blob/master/src/transformer.py\n\"\"\"\n\nimport math\nfrom typing import Type\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom .models_api import PretrainedModelBase\nfrom .models_common_...
[ [ "torch.softmax", "torch.abs", "torch.nn.functional.softmax", "torch.matmul", "torch.exp" ] ]
ground0state/dpmmlearn
[ "c602082586fba4e8b3163a694c9c32f44d6dd01c" ]
[ "tests/test_density.py" ]
[ "import warnings\n\nimport numpy as np\nimport pytest\nfrom dpmmlearn.density import (multivariate_t_density, scaled_IX_density,\n t_density)\nfrom scipy.integrate import dblquad, quad\n\n\ndef test_scaled_IX_density():\n nu = 3\n sigsqr = 1.0\n\n # test that probability integ...
[ [ "numpy.array", "numpy.ndenumerate", "numpy.testing.assert_almost_equal", "numpy.eye", "numpy.testing.assert_array_almost_equal", "numpy.arange", "numpy.vstack" ] ]
cspencerjones/xarray
[ "76d4a6710a1e22c6af112d0c3f5a81a7b435448d", "76d4a6710a1e22c6af112d0c3f5a81a7b435448d" ]
[ "xarray/plot/facetgrid.py", "xarray/core/accessor_str.py" ]
[ "import functools\nimport itertools\nimport warnings\n\nimport numpy as np\n\nfrom ..core.formatting import format_item\nfrom .utils import (\n _infer_xy_labels,\n _process_cmap_cbar_kwargs,\n import_matplotlib_pyplot,\n label_from_attrs,\n)\n\n# Overrides axes.labelsize, xtick.major.size, ytick.major.s...
[ [ "numpy.array", "numpy.ceil", "matplotlib.ticker.MaxNLocator" ], [ "numpy.vectorize" ] ]
perellonieto/fat-forensics
[ "0fd975ec743c5f44fc29bb2a499a2c1067bdbeff" ]
[ "fatf/__init__.py" ]
[ "\"\"\"\nFAT-Forensics\n=============\n\nFAT-Forensics is a Python module integrating a variety of fairness,\naccountability (security, privacy) and transparency (explainability,\ninterpretability) approaches to assess social impact of artificial\nintelligence systems.\n\"\"\"\n# Author: Kacper Sokol <k.sokol@brist...
[ [ "numpy.random.seed", "numpy.random.uniform" ] ]
dizzy21c/easyqtrs
[ "4704674d2175d40afdc306afd8a002a486c83220", "4704674d2175d40afdc306afd8a002a486c83220", "4704674d2175d40afdc306afd8a002a486c83220" ]
[ "tdx/tdx_a1cd.py", "strategies/Strategy_data_calc_01.py", "tdx/func/func_sys.py" ]
[ "import pandas as pd\nimport os\nimport datetime\nimport numpy as np \nimport statsmodels.formula.api as sml\n\nimport matplotlib.pyplot as plt\nimport scipy.stats as scs\nimport matplotlib.mlab as mlab\nfrom easyquant.indicator.base import *\n\nimport json\nfrom easyquant import MongoIo\nimport statsmodels.api as ...
[ [ "pandas.DataFrame", "matplotlib.pyplot.legend", "matplotlib.pyplot.figure", "numpy.arange", "matplotlib.pyplot.show", "matplotlib.pyplot.axes" ], [ "pandas.to_datetime" ], [ "pandas.read_csv" ] ]
hilman-dayo/ObjectDetection-OneStageDet
[ "d29f69cdce32b006bd040edb6e66427b3c987c70" ]
[ "yolo/vedanet/network/head/_tiny_yolov2.py" ]
[ "import os\nfrom collections import OrderedDict\nimport torch\nimport torch.nn as nn\n\nfrom .. import layer as vn_layer\n\n__all__ = ['TinyYolov2']\n\n\nclass TinyYolov2(nn.Module):\n def __init__(self, num_anchors, num_classes):\n \"\"\" Network initialisation \"\"\"\n super().__init__()\n ...
[ [ "torch.nn.Sequential", "torch.nn.Conv2d" ] ]
HenryFBP/itmd-413-final-project
[ "535102122aea97526a9f2d572aaf2d3e7718b881" ]
[ "LootCrate.py" ]
[ "import numpy as np\n\nfrom guiLib import *\n\n\nclass LootCrate:\n \"\"\"\n A class representing a single loot crate that can have multiple items.\n\n Attributes\n - ``name``: The name of the ``LootCrate``.\n - ``cost``: The cost of the ``LootCrate``.\n - ``pool``: ...
[ [ "numpy.array", "numpy.random.choice" ] ]
ral9000/pennylane
[ "0afbd155d044730af546c6d90cef9d01f931632d", "0afbd155d044730af546c6d90cef9d01f931632d" ]
[ "tests/tape/test_qnode.py", "pennylane/measure.py" ]
[ "# Copyright 2018-2021 Xanadu Quantum Technologies Inc.\r\n\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n\r\n# http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n# Unles...
[ [ "numpy.testing.assert_allclose", "numpy.array", "numpy.sin", "numpy.random.rand", "numpy.zeros", "numpy.random.default_rng", "numpy.allclose", "numpy.std", "numpy.cos", "numpy.random.random" ], [ "numpy.array" ] ]
zduey/shap
[ "1bb8203f2d43f7552396a5f26167a258cbdc505c" ]
[ "shap/explainers/_linear.py" ]
[ "import numpy as np\nimport scipy as sp\nimport warnings\nfrom tqdm.autonotebook import tqdm\nfrom ._explainer import Explainer\nfrom ..utils import safe_isinstance\nfrom .. import maskers\nfrom .. import links\n\n\nclass Linear(Explainer):\n \"\"\" Computes SHAP values for a linear model, optionally accounting ...
[ [ "scipy.sparse.issparse", "numpy.array", "numpy.dot", "numpy.cov", "numpy.matmul", "numpy.zeros", "numpy.ones", "numpy.random.shuffle", "numpy.eye", "numpy.multiply", "numpy.mean", "numpy.arange", "numpy.linalg.eig", "numpy.abs", "numpy.outer", "numpy...
zxydi1992/faster-rcnn.pytorch
[ "730eaca8528d22ed3aa6b4dbc1965828a697cf9a" ]
[ "lib/model/roi_align/build.py" ]
[ "from __future__ import print_function\nimport os\nimport torch\nfrom torch.utils.ffi import create_extension\n\nsources = ['src/roi_align.c']\nheaders = ['src/roi_align.h']\nextra_objects = []\n#sources = []\n#headers = []\ndefines = []\nwith_cuda = False\n\nthis_file = os.path.dirname(os.path.realpath(__file__))\...
[ [ "torch.cuda.is_available", "torch.utils.ffi.create_extension" ] ]
VolpeUSDOT/fra-gctd-model-dev
[ "d88bfc14c90393e51e24bcd3330999b6e428e2b4" ]
[ "PhaseTwo/train_grade_row_model.py" ]
[ "from pycocotools import mask\nimport torch\nimport random\nimport numpy as np\nimport cv2\nimport torchvision\nfrom torchvision.models.detection.faster_rcnn import FastRCNNPredictor\nfrom torchvision.models.detection.mask_rcnn import MaskRCNNPredictor\nimport transforms as T\nfrom engine import train_one_epoch, ev...
[ [ "torch.device", "numpy.array", "numpy.zeros_like", "torch.optim.lr_scheduler.StepLR", "torch.no_grad", "torch.optim.SGD", "numpy.stack", "torch.cuda.is_available", "torch.utils.data.DataLoader", "torch.load", "torch.utils.data.Subset" ] ]
fatterbetter/CodeSearchNet
[ "7232d333515b56f771d46683c795d4032e7b8930" ]
[ "src/encoders/seq_encoder.py" ]
[ "from collections import Counter\nimport numpy as np\nfrom typing import Dict, Any, List, Iterable, Optional, Tuple\nimport random\nimport re\n\nfrom utils.bpevocabulary import BpeVocabulary\nfrom utils.tfutils import convert_and_pad_token_sequence\n\nimport tensorflow as tf\nfrom dpu_utils.codeutils import split_i...
[ [ "tensorflow.glorot_uniform_initializer", "numpy.zeros", "numpy.sum", "tensorflow.nn.embedding_lookup", "tensorflow.nn.dropout", "numpy.flatnonzero" ] ]
5seunghoon/tensorflow
[ "c1162e860fe15d03ab8d98647f8f4a66208c28a3" ]
[ "tensorflow/python/autograph/core/converter.py" ]
[ "# Copyright 2016 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.python.autograph.pyct.static_analysis.liveness.resolve", "tensorflow.python.autograph.core.naming.Namer", "tensorflow.python.autograph.pyct.qual_names.resolve", "tensorflow.python.autograph.pyct.compiler.ast_to_source", "tensorflow.python.autograph.pyct.static_analysis.live_values....
YanhuaCheng/maskrcnn-benchmark
[ "4bdea73f9c12ba11b82be0d51c32a5b2ab3317b9" ]
[ "interface/inference_batch/transforms.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\nimport random\n\nimport torch\nimport torchvision\nfrom torchvision.transforms import functional as F\n\n\nclass Compose(object):\n def __init__(self, transforms):\n self.transforms = transforms\n\n def __call__(self, image):\n ...
[ [ "torch.as_tensor" ] ]
henryroe/ztv
[ "392a110edb70a5696cf3cf4bcfdf5afa47adcabf" ]
[ "ztv/stats_panel.py" ]
[ "from __future__ import absolute_import\nimport wx\nfrom wx.lib.pubsub import pub\nfrom matplotlib.patches import Rectangle\nfrom matplotlib import cm\nimport numpy as np\nfrom astropy.stats import sigma_clipped_stats\nimport sys\nfrom .ztv_wx_lib import set_textctrl_background_color, validate_textctrl_str, textctr...
[ [ "numpy.median", "numpy.round", "numpy.arange", "numpy.isfinite", "matplotlib.patches.Rectangle" ] ]
exc4l/MRR-NN
[ "941692db34ef8c7583bae6734e14c3ac9ade6966" ]
[ "lorentzian.py" ]
[ "import tensorflow as tf\nfrom tensorflow import keras\nfrom tensorflow.keras import regularizers, initializers\nfrom tensorflow.python.framework import tensor_shape\nfrom tensorflow.python.keras.engine.input_spec import InputSpec\nfrom tensorflow.python.keras import constraints\nimport numpy as np\nfrom scipy.opti...
[ [ "tensorflow.keras.regularizers.get", "tensorflow.matmul", "tensorflow.keras.Sequential", "numpy.multiply", "tensorflow.python.framework.tensor_shape.dimension_value", "tensorflow.python.keras.engine.input_spec.InputSpec", "tensorflow.clip_by_value", "tensorflow.divide", "numpy....
albine/taichi
[ "8c46f51647a1d759aa7a88720006edecd13bb63b" ]
[ "tests/python/test_matrix.py" ]
[ "import taichi as ti\nimport numpy as np\nfrom taichi import approx\nimport operator\nimport pytest\n\noperation_types = [operator.add, operator.sub, operator.matmul]\ntest_matrix_arrays = [\n np.array([[1, 2], [3, 4]]),\n np.array([[5, 6], [7, 8]]),\n np.array([[2, 8], [-1, 3]])\n]\n\nvector_operation_typ...
[ [ "numpy.array", "numpy.ones" ] ]
limhj159/NewsRecommendation
[ "5d19566b63b6cf35b5be0c2b175c5050e51f57b8" ]
[ "newsrec/model/Exp3/news_encoder.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom model.general.attention.multihead_self import MultiHeadSelfAttention\nfrom model.general.attention.additive import AdditiveAttention\n\ndevice = torch.device(\"cuda:0\" if torch.cuda.is_available() else \"cpu\")\n\n\nclass TextEncoder(torch...
[ [ "torch.nn.Linear", "torch.stack", "torch.nn.functional.dropout", "torch.cuda.is_available", "torch.nn.Embedding" ] ]
laclouis5/CenterNet
[ "f25e42993b169cbc4aaf3b10734babebeab2c7a7" ]
[ "src/lib/datasets/dataset/coco_hp.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport pycocotools.coco as coco\nfrom pycocotools.cocoeval import COCOeval\nimport numpy as np\nimport json\nimport os\n\nimport torch.utils.data as data\n\nclass COCOHP(data.Dataset):\n num_classes =...
[ [ "numpy.array", "numpy.ones", "numpy.random.RandomState" ] ]
katiemcgoldrick/Nashpy
[ "352747a8970e24a1dcc27f16c68f3eedf62f28fa", "352747a8970e24a1dcc27f16c68f3eedf62f28fa" ]
[ "docs/_static/learning/evolutionary_dynamics/steady_state_example/main.py", "tests/unit/test_stochastic_fictitious_play.py" ]
[ "\"\"\"\nCode to draw plot for the documentation.\n\nThis plots an example of an stable steady state.\n\nThe code should match the reference code in the documentation.\n\"\"\"\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nimport nashpy as nash\n\nA = np.array([[4, 3], [2, 3]])\ngame = nash.Game(A)\ny0 = n...
[ [ "numpy.array", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.savefig", "matplotlib.pyplot.title", "matplotlib.pyplot.legend", "matplotlib.pyplot.ylabel", "numpy.linspace" ], [ "numpy.array", "numpy.zeros", "numpy.random.seed", "numpy.sum", "numpy.allclose", ...
swapUniba/Elliot_refactor-tesi-Ventrella
[ "3ddffc041696c90a6f6d3e8906c212fc4f55f842" ]
[ "elliot/recommender/visual_recommenders/DeepStyle/DeepStyle.py" ]
[ "\"\"\"\nModule description:\n\n\"\"\"\n\n__version__ = '0.1'\n__author__ = 'Vito Walter Anelli, Claudio Pomo, Daniele Malitesta'\n__email__ = 'vitowalter.anelli@poliba.it, claudio.pomo@poliba.it, daniele.malitesta@poliba.it'\n\nimport os\n\nimport numpy as np\nimport tensorflow as tf\nfrom tqdm import tqdm\n\nfrom...
[ [ "numpy.random.seed", "tensorflow.random.set_seed" ] ]
YIN95/Wrist-Position
[ "06438d38143309a0288c39f1c0aafabf7ad4d5a0" ]
[ "cICA/cICA_util.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Mon Oct 11 02:33:42 2018\r\n\r\n@author: Jingjing Luo, Wenjie Yin\r\n\r\ncICA:\r\n X: input matrix, array?\r\n\r\nReference:\r\n [1] Wei Lu, Jagath C. Rajapakse: ICA with reference. ICA 2001\r\n [2] Zhi-Lin Zhang, Morphologically Constrained ICA for Extracti...
[ [ "numpy.dot", "scipy.linalg.eigh", "numpy.exp", "numpy.mean", "scipy.signal.filtfilt", "numpy.sign", "numpy.finfo", "sklearn.preprocessing.normalize", "numpy.max", "numpy.random.normal", "matplotlib.pyplot.colorbar", "numpy.linalg.norm", "numpy.tanh", "numpy....
gaurav67890/mmdetection
[ "e736c56c0566ec5119e94a417ae4829184d081ad" ]
[ "mmdet/datasets/coco.py" ]
[ "import itertools\nimport logging\nimport os.path as osp\nimport tempfile\n\nimport mmcv\nimport numpy as np\nfrom mmcv.utils import print_log\nfrom pycocotools.coco import COCO\n#from pycocotools.cocoeval import COCOeval\nfrom mmdet.datasets.fast_eval_api import COCOeval_opt as COCOeval\nfrom terminaltables import...
[ [ "numpy.round", "numpy.array", "numpy.mean", "numpy.zeros" ] ]
priyanshu-max/tensorflow
[ "5e97d96c809232a716d6b04ec9b128ebaf1b73f7" ]
[ "tensorflow/contrib/data/python/kernel_tests/resample_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.contrib.data.python.ops.dataset_ops.rejection_resample", "tensorflow.python.training.device_setter.replica_device_setter", "tensorflow.python.ops.variables.local_variables", "tensorflow.python.ops.variables.local_variables_initializer", "tensorflow.contrib.data.python.ops.dataset_o...
mleila/transformers
[ "ecd891a2fc3e1846c14b7ce482433b303448674e" ]
[ "transformers/torch_models.py" ]
[ "'''Torch transformer models.'''\nimport math\n\nimport torch\nfrom torch import nn\n\n\n# helper functions\ndef generate_square_subsequent_mask(size: int):\n \"\"\"Generate a triangular (size, size) mask. From PyTorch docs.\"\"\"\n mask = (torch.triu(torch.ones(size, size)) == 1).transpose(0, 1)\n mask = ...
[ [ "torch.zeros", "torch.cos", "torch.nn.Dropout", "torch.nn.TransformerDecoderLayer", "torch.nn.Linear", "torch.nn.TransformerDecoder", "torch.sin", "torch.argmax", "torch.arange", "torch.ones", "torch.nn.TransformerEncoderLayer", "torch.nn.Embedding", "torch.nn.T...
a710128/Lesson9
[ "0f48651aff2cb12f97d92fb27d722d1680026ac1" ]
[ "API/user.py" ]
[ "import copy\nimport re\nimport urllib\n\nimport cv2\nimport numpy as np\nimport urllib3\n\nfrom . import config\nfrom .course import Course, courseTimeParser\nimport datetime\nimport threading\nfrom queue import Queue\n\n\nurllib3.disable_warnings()\n\n\ndef capture_idft_worker(qin):\n from . import capture\n ...
[ [ "numpy.fromstring" ] ]
ashika6/PaDiM-Anomaly-Detection-Localization-master
[ "c2f8f0f0da8e528945a96ebfe6c46e6995e1f729" ]
[ "main.py" ]
[ "import random\nfrom random import sample\nimport argparse\nimport numpy as np\nimport os\nimport pickle\nfrom tqdm import tqdm\nfrom collections import OrderedDict\nfrom sklearn.metrics import roc_auc_score\nfrom sklearn.metrics import roc_curve\nfrom sklearn.metrics import precision_recall_curve\nfrom sklearn.cov...
[ [ "torch.nn.functional.unfold", "torch.cat", "numpy.mean", "torch.cuda.is_available", "matplotlib.pyplot.colorbar", "numpy.zeros_like", "matplotlib.pyplot.subplots", "torch.manual_seed", "torch.tensor", "torch.utils.data.DataLoader", "numpy.argmax", "torch.index_selec...
FinnJB/conway-1
[ "88d3c586ccd74fa2053145cb365d232d98f66a5f" ]
[ "conway.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Apr 17 09:31:37 2021\nProvides the ConwayBase class and an implementation of said class.\n\n@author: dkappe\n\"\"\"\n\nfrom abc import ABC, abstractclassmethod\n\nimport numpy as np\n\nfrom configs import DYING, REBORN, ALIVE\n\n\nclass Conway...
[ [ "numpy.array", "numpy.ndenumerate", "numpy.count_nonzero", "numpy.sum", "numpy.where" ] ]
fs-shunsuke-iwamoto/beam
[ "50879dae54b6064b1bf2111e4bca6af573bca619" ]
[ "sdks/python/apache_beam/dataframe/frames_test.py" ]
[ "#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); yo...
[ [ "numpy.array", "numpy.isnan", "pandas.testing.assert_frame_equal", "pandas.DatetimeIndex", "numpy.isclose", "pandas.DataFrame", "pandas.date_range", "pandas.__version__.split", "numpy.random.randn", "pandas.MultiIndex.from_arrays", "pandas.testing.assert_series_equal", ...
guhur/vilbert-multi-task
[ "7c416a526f29ddb3101bc403fec598c0a2bd0ed2" ]
[ "vilbert/datasets/guesswhat_pointing_dataset.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 os\n\nimport torch\nfrom torch.utils.data import Dataset\nimport numpy as np\nimport jsonlines\nimport json\n\nfrom pytorch_tr...
[ [ "numpy.concatenate", "torch.zeros", "numpy.array", "torch.min", "numpy.zeros", "torch.max", "torch.tensor" ] ]
ArtistBanda/Bread-and-Butter_Machine-Learning
[ "8b9c5cedaf00db87838a6cacfcddadfcb9b8bdaa" ]
[ "bnbML/Supervised_Learning/LinearModel.py" ]
[ "import numpy as np\nfrom bnbML.Deep_Learning import ActivationFunctions\nfrom bnbML.Utils import LossFunctions\nfrom bnbML.Utils.Metrics import accuracy\nfrom bnbML.Utils.Plotting import plotLossGraph\nfrom bnbML.Utils.PreProcessing import normalize\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport pro...
[ [ "numpy.reshape", "numpy.dot", "numpy.insert", "numpy.zeros" ] ]
lukelbd/panplot
[ "6cb47b9d5e719dfe34dfe1770538cf475b4abac8" ]
[ "proplot/config.py" ]
[ "#!/usr/bin/env python3\n\"\"\"\nTools for setting up proplot and configuring global settings.\nSee the :ref:`configuration guide <ug_config>` for details.\n\"\"\"\n# NOTE: The matplotlib analogue to this file is actually __init__.py\n# but it makes more sense to have all the setup actions in a separate file\n# so ...
[ [ "matplotlib.RcParams", "numpy.isclose", "numpy.iterable", "matplotlib.colors.is_color_like", "matplotlib.font_manager._rebuild", "matplotlib.matplotlib_fname", "matplotlib.colors.to_rgba", "matplotlib.rc_params_from_file", "matplotlib.get_cachedir", "matplotlib.font_manager...
wizardxz/pythran
[ "9a1b1c08cf9d3478be3b6313ac8ebca9e5b88e65" ]
[ "pythran/tests/cases/pythagorean_triples.py" ]
[ "#pythran export next_pythagorean_triples(int64[:,:])\n#runas import numpy as np; next_pythagorean_triples(np.array([[3, 4, 5]]))\nimport numpy as np\ndef next_pythagorean_triples(previous):\n matrices = np.array(\n [[-1, 2, 2],\n [-2, 1, 2],\n [-2, 2, 3],\n [1, 2, 2],\n [2...
[ [ "numpy.array", "numpy.transpose" ] ]
QMHTMY/PyScripts
[ "625863061e3f271e72bde3da2096681cc959aa06" ]
[ "SystemFileStatic.py" ]
[ "#!/usr/bin/python3\n# 统计系统文件大小\n\n# 使用方式:\n# 1. sudo find $HOME -type f -printf \"%s %p\\n\" > home_file.txt\n# 2. ./SystemFileStatic.py home_file.txt\n\nimport sys\nimport argparse\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom math import ceil, log2\nfrom bisect import bisect_left\n\ndef numfmt(s):\n...
[ [ "numpy.histogram", "matplotlib.pyplot.xlim", "numpy.median", "matplotlib.pyplot.savefig", "matplotlib.pyplot.ylim", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show" ] ]
tedhyu/thermo
[ "1966c7cba5a603984b49f22c97ff00a144d90812" ]
[ "thermo/thermal_conductivity.py" ]
[ "# -*- coding: utf-8 -*-\n'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling.\nCopyright (C) 2016, Caleb Bell <Caleb.Andrew.Bell@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software...
[ [ "numpy.array", "scipy.interpolate.interp2d" ] ]
turanoo/q2-feature-classifier
[ "4ba1f4c1b0110fb57c673eafebf1a8e41aacdc51" ]
[ "q2_feature_classifier/_skl.py" ]
[ "# ----------------------------------------------------------------------------\n# Copyright (c) 2016-2018, QIIME 2 development team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the file LICENSE, distributed with this software.\n# -------------------------------------...
[ [ "sklearn.externals.joblib.Parallel", "sklearn.externals.joblib.delayed" ] ]
ddomurad/simple_mlp
[ "31296032b018be4c92958869eaa5ccef884a024e" ]
[ "loaders/mnist.py" ]
[ "import matplotlib.pyplot as plt\nimport numpy as np\nimport os\nimport gzip\n\ndef get_network_constrains():\n return (784, 10)\n\ndef plot(data):\n img_size = int(len(data)**0.5)\n plt.imshow(np.matrix(data).reshape(img_size, img_size), cmap='gray')\n\ndef _normalize(data):\n data = data/np.linalg.nor...
[ [ "numpy.matrix", "numpy.linalg.norm", "numpy.mean" ] ]
sberbank-ai-lab/viral-mutation
[ "c0d53cfb88a9ae60c24cfc083b0a2610a31c27e3" ]
[ "bin/cov.py" ]
[ "import tensorflow as tf\nimport pandas as pd\n\nfrom lib.mutation import *\nfrom lib.sequence_parser_utils import (parse_aggregated_mut_escapes,\n parse_gisaid, parse_nih, parse_viprbrc)\n\nnp.random.seed(1)\nrandom.seed(1)\nAAs = [\n 'A', 'R', 'N', 'D', 'C', 'Q', 'E', 'G',...
[ [ "tensorflow.distribute.MirroredStrategy", "pandas.DataFrame", "tensorflow.config.experimental.set_memory_growth", "tensorflow.config.experimental.list_physical_devices", "tensorflow.data.Options" ] ]
martinmin4096/PCAClustering
[ "a00d4ec1a3b4d80acdd3519fcfe0731b4c4ce1f9" ]
[ "PCA3.py" ]
[ "#Load dependencies\nimport pandas as pd\nimport numpy as np\nfrom sklearn.preprocessing import StandardScaler\nfrom matplotlib import*\nimport matplotlib.pyplot as plt\nfrom matplotlib.cm import register_cmap\nfrom scipy import stats\nfrom sklearn.decomposition import PCA\nimport seaborn\nimport os\nimport glob\n\...
[ [ "numpy.array", "numpy.cov", "numpy.empty", "pandas.pivot_table", "sklearn.preprocessing.StandardScaler", "numpy.linalg.eig", "pandas.read_csv", "sklearn.decomposition.PCA" ] ]
zhangmarvin/DomainBed
[ "066a48c81f44ad8e3e41381b6a3fc80b07b969ad" ]
[ "domainbed/scripts/train.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n\nimport argparse\nimport collections\nimport json\nimport os\nimport random\nimport sys\nimport time\nimport uuid\n\nimport numpy as np\nimport torch\nimport torch.utils.data\n\nfrom domainbed import datasets\nfrom domainbed import hparams_re...
[ [ "numpy.random.seed", "torch.manual_seed", "torch.cuda.is_available", "numpy.mean" ] ]
tfrizza/MuZero
[ "8783d2819f465df066071379d0bf4fa7ccd1a0df" ]
[ "muzero/selfplay.py" ]
[ "import ray\nfrom tqdm import tqdm\nimport numpy as np\nimport tensorflow as tf\nimport pdb\nimport time\n\nimport matplotlib\n#matplotlib.use(\"MacOSX\")\nfrom matplotlib import pyplot as plt\n\nfrom .config import MuZeroConfig\nfrom .storage import SharedStorage, ReplayBuffer\nfrom .models import Network, Network...
[ [ "tensorflow.nn.softmax", "numpy.around" ] ]
vladserkoff/pytorch-tools
[ "c838b5776b3d7e2d9d20c98432db400d5d842144" ]
[ "pytorch_tools/losses/smooth.py" ]
[ "import torch\nimport torch.nn.functional as F\nfrom .base import Loss\nfrom .base import Mode\nfrom .base import Reduction\n\n\nclass CrossEntropyLoss(Loss):\n \"\"\"\n CE with optional smoothing and support for multiple positive labels.\n Can accept one-hot encoded y_trues\n\n Args:\n mode (str...
[ [ "torch.zeros_like", "torch.Tensor", "torch.tensor", "torch.nn.functional.log_softmax" ] ]
muzammilafroz/Face-Recognition-Based-Attendance-Using-OpenCV-python
[ "b368877ae297d7bebb739b1b80dec19aa0b6595c" ]
[ "trainer.py" ]
[ "import os\nimport numpy as np\nfrom PIL import Image\nimport cv2\n\ndef train_classifier(data_dir):\n allImagePaths = [os.path.join(data_dir, f) for f in os.listdir(data_dir)] #this is used to create the relative of all image that are stored in dara_dir all these paths are stored in python list 'allImagePaths'\...
[ [ "numpy.array" ] ]
freefrag/mlflow
[ "b8e74cfc591397290e1c1ba2600be7daa64b4c05" ]
[ "mlflow/tensorflow.py" ]
[ "\"\"\"\nThe ``mlflow.tensorflow`` module provides an API for logging and loading TensorFlow models.\nThis module exports TensorFlow models with the following flavors:\n\nTensorFlow (native) format\n This is the main flavor that can be loaded back into TensorFlow.\n:py:mod:`mlflow.pyfunc`\n Produced for use b...
[ [ "pandas.DataFrame", "tensorflow.Graph", "tensorflow.Session", "tensorflow.saved_model.loader.load" ] ]
chenlab-sj/M2A
[ "6fdbd13cfdc5c3b9ce6a2bfccca9b091a589d400" ]
[ "M2A_analyses/1_M2A_v1/6_AdditionalScripts/FS3_featureInputPerformance.py" ]
[ "#!/usr/bin/python\n\n\n'''\n1) Compare Train feature performance (all features) stratified by resolution and feature type (input vs CNN extracted), across entire train set\n\n2) Compare best features determined by step 1) performance in validation set by sample.\n'''\n\n# Set random seed\nimport numpy as np\nnp.ra...
[ [ "matplotlib.use", "matplotlib.pyplot.rcParams.update", "numpy.array", "matplotlib.style.use", "numpy.concatenate", "numpy.random.seed", "matplotlib.pyplot.savefig", "pandas.DataFrame", "scipy.stats.pearsonr", "pandas.concat", "matplotlib.pyplot.clf" ] ]
ZubinGou/Learn-Python3-The-Hard-Way
[ "63019ffcafaf4b649e6580bc9f99bb840d218ab6" ]
[ "ex-tensorflow-hello/tf_hello.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# @Date : 2020-02-19 20:56:46\n# @Author : ZubinGou (zebgou@gmail.com)\n# @Link : https://github.com/ZubinGou\n# @Version : $Id$\n\nfrom __future__ import print_function\n\nimport tensorflow as tf\n\nhello = tf.constant(\"Heyyyy, TensorFlow!\")\n\nprint(hello)...
[ [ "tensorflow.constant" ] ]
adivijaykumar/astropy
[ "0fd7ae818fed3abe4c468170a507d52ef91dc7e8" ]
[ "astropy/cosmology/core.py" ]
[ "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\nfrom abc import ABCMeta\nfrom inspect import signature\n\nimport numpy as np\n\nimport astropy.units as u\nfrom astropy.io.registry import UnifiedReadWriteMethod\nfrom astropy.utils import isiterable\nfrom astropy.utils.decorators import classprope...
[ [ "numpy.all" ] ]
rogerriomp/AGENCIA
[ "0ba384bce01fc34e45721279ebb4fbccb6b8b066" ]
[ "backend/auth.py" ]
[ "import jwt\nfrom time import time\nfrom sqlalchemy import create_engine\nimport ast\nimport pandas as pd\nimport json\nimport settings\n# engine = create_engine('postgresql://postgres:55262408@localhost:5432/postgres')\n# cur = engine.connect()\nengine = settings.engine\ncur = engine.connect()\n# user_id = 123\n\n...
[ [ "pandas.read_sql" ] ]
manogna-s/da-fer
[ "43229ba368454cb4e5aecab8fdb3ea68ad9060e4" ]
[ "training/Train_MCD.py" ]
[ "import torch.nn.functional as F\nfrom torch.autograd import Variable\n\nfrom models.ResNet_feat import ResClassifier\nfrom train_setup import *\nfrom utils.Loss import *\nimport copy\n\neta = 1.0\nnum_k = 2 #4\n\n\ndef Train_MCD(args, G, F1, F2, train_source_dataloader, train_target_dataloader, optimizer_g, optimi...
[ [ "torch.autograd.Variable", "torch.nn.functional.softmax" ] ]
xiaohuaibaoguigui/r3det-on-mmdetection
[ "ddbb0a66af5e304c6668e265d133260d9c7710ea" ]
[ "mmdet/models/backbones/moblienet.py" ]
[ "import torch.nn as nn\nfrom ..builder import BACKBONES\n\nfrom mmcv.runner import load_checkpoint\nfrom mmdet.utils import get_root_logger\nfrom torch.nn.modules.batchnorm import _BatchNorm\n\nimport math\nfrom torchtoolbox.nn import Activation\nfrom functools import partial\nimport torch.nn.functional as F\n\n\nd...
[ [ "torch.nn.functional.relu6", "torch.nn.Sequential", "torch.nn.BatchNorm2d", "torch.nn.functional.adaptive_avg_pool2d", "torch.nn.ReLU", "torch.nn.Conv2d" ] ]
benarthur91/pandas
[ "69203636c2f661bbc167a5a4fc91ea7d30ff0b67" ]
[ "pandas/tests/scalar/timedelta/test_arithmetic.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nTests for scalar Timedelta arithmetic ops\n\"\"\"\nfrom datetime import datetime, timedelta\nimport operator\n\nimport numpy as np\nimport pytest\n\nimport pandas as pd\nimport pandas.util.testing as tm\nfrom pandas.core import ops\nfrom pandas import Timedelta, Timestamp, NaT\n\n\...
[ [ "pandas.util.testing.assert_numpy_array_equal", "numpy.array", "numpy.isnan", "pandas.offsets.Second", "pandas.Timedelta", "pandas.offsets.Day", "pandas.offsets.Minute", "numpy.uint8", "pandas.offsets.Hour", "pandas.Timestamp.now", "pandas.Timestamp", "numpy.float64...
tcpedersen/ANNOptionPricingAndCalibration
[ "9db7b6ccd4609f399aa817869b41104eac488e88" ]
[ "anderson_lake/pricers.py" ]
[ "# -*- coding: utf-8 -*-\nimport numpy as np\nfrom torch.quasirandom import SobolEngine\n\nfrom scipy.optimize import brentq, fminbound\nfrom scipy.stats import norm\n\n# Local modules\nfrom .integration import GaussianQuadrature\nfrom .models import HestonModel, BlackScholesModel\nfrom .options import EuropeanCall...
[ [ "numpy.sin", "numpy.log", "numpy.hsplit", "scipy.optimize.brentq", "numpy.cosh", "numpy.tan", "numpy.ones", "torch.quasirandom.SobolEngine", "numpy.exp", "numpy.sign", "numpy.finfo", "numpy.sinh", "numpy.sqrt", "numpy.cos", "scipy.optimize.fminbound", ...
ezeli/InSentiCap_model
[ "96d4e3add5860f637eb0106b545d32998d03d643" ]
[ "train_senti.py" ]
[ "# coding:utf8\nimport tqdm\nimport os\nimport h5py\nimport time\nimport json\nimport sys\nimport pdb\nimport traceback\nfrom bdb import BdbQuit\nimport torch\n\nfrom opts import parse_opt\nfrom models.sentiment_detector import SentimentDetector\nfrom dataloader import get_senti_image_dataloader\n\n\ndef clip_gradi...
[ [ "torch.no_grad", "torch.save", "torch.load" ] ]
CarlFredriksson/regression_techniques
[ "3bf72ca4910d8417b099a1846cbccf16b479d85b" ]
[ "main.py" ]
[ "import os\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom linear_regression import linear_regression_1D\nfrom nn_regression import nn_regression_1D\n\ndef create_output_dir():\n \"\"\"Create output dir if it does not exist.\"\"\"\n cwd = os.getcwd()\n output_dir_path = os.path.join(cwd, \"outpu...
[ [ "numpy.random.normal", "matplotlib.pyplot.clf", "matplotlib.pyplot.grid", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.scatter", "numpy.linspace" ] ]
nicolasspring/fairseq-states
[ "f4c53b5cec53181b1cd84b452f9de1f94b829ab6" ]
[ "fairseq/models/fconv.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 math\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom fairseq import utils\nfrom fairseq.model...
[ [ "torch.nn.Linear", "torch.nn.functional.glu", "torch.nn.ModuleList", "torch.nn.init.constant_", "torch.nn.utils.remove_weight_norm", "torch.nn.functional.dropout", "torch.nn.init.normal_", "torch.nn.functional.pad", "torch.nn.utils.weight_norm", "torch.Tensor", "torch.n...
world-modelz/world-modelz
[ "2ac6388ec9c90d186ec0a1e10affd7984c7ba331" ]
[ "som-diffusion/diffusion_model.py" ]
[ "import math\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom autoencoder import conv1x1, conv3x3, Residual\n\n\nclass SimpleDiffusionModel(nn.Module):\n def __init__(self, d_model=128, dropout=.1, num_layers=10, d_pos=32):\n super().__init__()\n\n self.d_model = d_mo...
[ [ "torch.cos", "torch.cat", "torch.nn.Dropout", "torch.sin", "torch.nn.init.constant_", "torch.nn.Sequential", "torch.nn.SiLU", "torch.arange", "torch.nn.GroupNorm" ] ]
ts4051/pisa
[ "f96733b774f42e8234156d625f916d8e04677c5b" ]
[ "pisa/stages/discr_sys/pi_hypersurfaces.py" ]
[ "\"\"\"\nPISA pi stage to apply hypersurface fits from discrete systematics parameterizations\n\"\"\"\n\n#TODO Currently have to defined the `links` value in the stage config to match what the `combine_regex` does in\n# the Hypersurface fitting. The `combine_regex` is stored in the hypersurface instance, so sho...
[ [ "numpy.sum", "numpy.empty", "numpy.isfinite" ] ]
Guangjun-A/---11-
[ "43ecfae86e5785410d5812d22700bf32397a75e1" ]
[ "feeder/efficent_fsd_feed_with_angle2_test_B.py" ]
[ "#!/usr/bin/env python\r\n# -*- coding: utf-8 -*-\r\n# @Time : 2021/10/9 12:13\r\n# @Author : Jun\r\nimport pickle, logging, numpy as np\r\nfrom paddle.io import Dataset\r\nimport os\r\nimport random\r\nfrom efficentgcn.reader.transformer import pre_normalization\r\nimport paddle\r\nfrom paddle.io import Subset...
[ [ "numpy.max", "numpy.zeros_like", "numpy.array", "numpy.int", "numpy.arccos", "numpy.zeros", "numpy.random.choice", "numpy.sum", "numpy.random.permutation", "numpy.load", "numpy.min", "numpy.random.beta", "numpy.stack", "numpy.random.randint", "numpy.sqrt...
923427357/tfjs
[ "5b2b48722708929b7220160ddf20e1ccfbdedb88" ]
[ "tfjs-converter/python/tensorflowjs/converters/converter.py" ]
[ "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed t...
[ [ "tensorflow.compat.v1.Session", "tensorflow.keras.models.load_model", "tensorflow.Graph", "tensorflow.keras.models.save_model" ] ]
marcoslbueno/openml-python
[ "2bfd581e212e7ef91ec65d1d7976f0984f72724a" ]
[ "openml/datasets/functions.py" ]
[ "# License: BSD 3-Clause\n\nimport io\nimport logging\nimport os\nimport re\nfrom typing import List, Dict, Union, Optional\n\nimport numpy as np\nimport arff\nimport pandas as pd\n\nimport xmltodict\nfrom scipy.sparse import coo_matrix\nfrom collections import OrderedDict\n\nimport openml.utils\nimport openml._api...
[ [ "pandas.DataFrame.from_dict", "pandas.api.types.infer_dtype", "numpy.argsort" ] ]
c0deaddict/Pyrr
[ "809a1018f4481cd962bbadda4cf156e4cad671ae" ]
[ "tests/test_plane.py" ]
[ "try:\n import unittest2 as unittest\nexcept:\n import unittest\nimport numpy as np\nfrom pyrr import plane\n\nclass test_plane(unittest.TestCase):\n def test_import(self):\n import pyrr\n pyrr.plane\n from pyrr import plane\n\n def test_create(self):\n result = plane.create(...
[ [ "numpy.allclose", "numpy.array" ] ]
hudmgy/insightface
[ "2ebc87e1bde3d4ef04bc0d4498038a0bc01b0ddc" ]
[ "stranger/test.py" ]
[ "import argparse\nimport os,sys\nimport numpy as np\nimport datetime\nfrom train import get_symbol, data_loader\nimport mxnet as mx\nfrom mxnet import ndarray as nd\nimport ipdb\n\n\ndef softmax(x):\n exp = np.exp(x)\n partition = exp.sum(axis=1,keepdims=True)\n return exp / partition\n\n\nparser = argpars...
[ [ "numpy.argmax", "numpy.exp" ] ]
shiinamiyuki/LuisaRender
[ "46f4d5baa3adf1923bbe1f854f3b0db2739e33bd" ]
[ "tools/cie_y_integral.py" ]
[ "import numpy as np\n\ncie_y = [\n 0.000003917000, 0.000004393581, 0.000004929604, 0.000005532136, 0.000006208245,\n 0.000006965000, 0.000007813219, 0.000008767336, 0.000009839844, 0.00001104323,\n 0.00001239000, 0.00001388641, 0.00001555728, 0.00001744296, 0.00001958375,\n 0.00002202000, 0.00002483965,...
[ [ "numpy.sum", "numpy.array" ] ]
adijunn/Rainbow_ddpg-fork
[ "424fa47cb3ba59476aa8991d33be08e7ebf64886", "424fa47cb3ba59476aa8991d33be08e7ebf64886" ]
[ "common/distributions.py", "rainbow_ddpg/prioritized_memory.py" ]
[ "import tensorflow as tf\nimport numpy as np\nimport baselines.common.tf_util as U\nfrom baselines.a2c.utils import fc\nfrom tensorflow.python.ops import math_ops\n\nclass Pd(object):\n \"\"\"\n A particular probability distribution\n \"\"\"\n def flatparam(self):\n raise NotImplementedError\n ...
[ [ "tensorflow.exp", "tensorflow.get_default_session", "tensorflow.python.ops.math_ops.less", "tensorflow.to_float", "tensorflow.nn.softmax", "tensorflow.nn.softmax_cross_entropy_with_logits_v2", "tensorflow.shape", "tensorflow.concat", "numpy.log", "tensorflow.sigmoid", "...
ConnollyLeon/functorch
[ "0a7b3dff269148ceac831194f3358452b18b6e19" ]
[ "test/common_utils.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates.\n# All rights reserved.\n#\n# This source code is licensed under the BSD-style license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport itertools\nimport torch\nimport functorch\nfrom functorch import vmap\nimport torch.utils._pytr...
[ [ "torch.testing._internal.common_methods_invocations.DecorateInfo", "torch.stack", "torch.utils._pytree.tree_map", "torch.ones", "torch.utils._pytree.tree_unflatten", "torch.testing._internal.common_device_type.toleranceOverride", "torch.utils._pytree.tree_flatten" ] ]
habitus-eu/rawacc2agc
[ "086c8c8fa622d54efe6e46bee4c64ab606b43504" ]
[ "externalfunctions/dominant_frequency.py" ]
[ "import numpy\n\ndef dominant_frequency(x, sf):\n # x: vector with data values\n # sf: sample frequency\n fourier = numpy.fft.fft(x)\n frequencies = numpy.fft.fftfreq(len(x), 1/sf)\n magnitudes = abs(fourier[numpy.where(frequencies > 0)])\n peak_frequency = frequencies[numpy.argmax(magnitudes)]\n return peak...
[ [ "numpy.where", "numpy.fft.fft", "numpy.argmax" ] ]
Navan0/poc-of-hm
[ "9b14325908445462721d7bed64e09b6c5d39f694" ]
[ "service/classification/detect_from_video.py" ]
[ "import os\n\nimport cv2\nimport dlib\nimport torch\nimport torch.nn as nn\nfrom classification.dataset.transform import xception_default_data_transforms\nfrom PIL import Image as pil_image\nfrom tqdm import tqdm\n\ncuda = False\n\n\ndef get_boundingbox(face, width, height, scale=1.3, minsize=None):\n \"\"\"\n ...
[ [ "torch.load", "numpy.mean", "torch.nn.Softmax", "torch.max" ] ]
ekolve/ai2thor-lgtm
[ "0a8d5cf961134ee31f5410d4aa2f3f9f750d6911" ]
[ "ai2thor/tests/test_unity.py" ]
[ "# import pytest\nimport os\nimport string\nimport random\nimport copy\nimport json\nimport pytest\nimport warnings\nimport jsonschema\nimport numpy as np\nfrom ai2thor.controller import Controller\nfrom ai2thor.tests.constants import TESTS_DATA_DIR\nfrom ai2thor.wsgi_server import WsgiServer\nfrom ai2thor.fifo_ser...
[ [ "numpy.all", "numpy.allclose", "numpy.array", "numpy.array_equal" ] ]
ricardowiest/Exercicios_Python
[ "bed8e88d142379d5f09216f4a9f5b00f097bb8fb" ]
[ "equacoes_simples.py" ]
[ "import numpy\n\ndef multi(*lista_):\n total_multi = 1\n for c in lista_:\n total_multi *= numpy.prod(c)\n return total_multi\n\n\ndef soma(*lista_):\n total_soma = 0\n for c in lista_:\n total_soma = sum(c)\n return total_soma\n\n\nlista = list()\nesc = 'S'\nwhile esc == 'S':\n ...
[ [ "numpy.prod" ] ]