repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
Knarik1/transformers | [
"c2a7d7280250addae38a49c31a57ddd897be2065",
"c2a7d7280250addae38a49c31a57ddd897be2065",
"c2a7d7280250addae38a49c31a57ddd897be2065",
"c2a7d7280250addae38a49c31a57ddd897be2065",
"c2a7d7280250addae38a49c31a57ddd897be2065"
] | [
"examples/tensorflow/multiple-choice/run_swag.py",
"src/transformers/models/mobilebert/modeling_mobilebert.py",
"src/transformers/models/funnel/modeling_funnel.py",
"src/transformers/models/layoutlm/modeling_tf_layoutlm.py",
"src/transformers/models/roformer/modeling_tf_roformer.py"
] | [
"#!/usr/bin/env python\n# coding=utf-8\n# Copyright The HuggingFace Team and The HuggingFace Inc. team. 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# ... | [
[
"tensorflow.keras.metrics.SparseCategoricalAccuracy",
"tensorflow.keras.losses.SparseCategoricalCrossentropy",
"tensorflow.ragged.constant",
"tensorflow.data.Dataset.from_tensor_slices",
"tensorflow.data.Options",
"numpy.array"
],
[
"torch.nn.Dropout",
"torch.nn.functional.soft... |
4kubo/rllib | [
"4f9f5f49916c7681675305b6c9a276b9e88c5e22"
] | [
"rllib/util/tests/test_value_estimation.py"
] | [
"import numpy as np\nimport pytest\nimport scipy\nimport torch\nimport torch.testing\n\nfrom rllib.dataset.datatypes import Observation\nfrom rllib.dataset.utilities import stack_list_of_tuples\nfrom rllib.util.value_estimation import discount_cumsum, discount_sum, mc_return\n\n\nclass TestDiscountedCumSum(object):... | [
[
"torch.get_default_dtype",
"numpy.array",
"torch.testing.assert_allclose",
"torch.tensor"
]
] |
juhyeonkim95/PyOptiX | [
"c7510ee9d967fe6c22fddcdcdd3b0127e075c8ba"
] | [
"pyoptix/enums.py"
] | [
"import numpy\nfrom pyoptix._driver import RTobjecttype, RTformat, RTfiltermode, RTwrapmode, RTtexturereadmode, \\\n RTtextureindexmode, RTbuffertype, RTbufferflag, RTexception\n\n\nclass Format:\n unknown = RTformat.RT_FORMAT_UNKNOWN\n float = RTformat.RT_FORMAT_FLOAT\n float2 = RTformat.RT_FORMAT_FLOA... | [
[
"numpy.dtype"
]
] |
shashank-srikant/reckless-minimax | [
"840745614be59d75535a81ef5ca79f4abdfcfaa6",
"840745614be59d75535a81ef5ca79f4abdfcfaa6"
] | [
"test_suite/toy_problem.py",
"experiments/scale_experiment.py"
] | [
"\"\"\"\nPython implementation of the toy problem\nBy:\n - Gidel et al., Frank-Wolfe Algorithms for Saddle Point Problems (2016)\n\"\"\"\nfrom __future__ import print_function, division\nimport numpy as np\nfrom saddle_point_problem import SaddlePointProblem\nimport warnings\n\nclass ToyProblem(SaddlePointProble... | [
[
"numpy.square",
"numpy.dot",
"numpy.random.random"
],
[
"numpy.std",
"numpy.mean",
"numpy.random.seed"
]
] |
trungnt13/odin-ai | [
"9c6986a854e62da39637ea463667841378b7dd84",
"9c6986a854e62da39637ea463667841378b7dd84",
"9c6986a854e62da39637ea463667841378b7dd84"
] | [
"odin/fuel/nlp_data/_base.py",
"odin/visual/scatter_plot.py",
"odin/ml/gmm_tmat.py"
] | [
"import os\nimport pickle\nimport re\nfrom abc import ABCMeta, abstractproperty\nfrom itertools import chain\nfrom numbers import Number\nfrom types import MethodType\nfrom typing import Dict, Generator, Iterable, List, Optional, Tuple, Union\nfrom typing_extensions import Literal\nfrom urllib.request import urlret... | [
[
"tensorflow.random.experimental.Generator.from_seed",
"tensorflow.sparse.to_dense",
"tensorflow.strings.unicode_split",
"numpy.logical_and",
"numpy.asarray",
"tensorflow.data.Dataset.from_tensor_slices",
"numpy.quantile",
"sklearn.feature_extraction.text.TfidfVectorizer",
"tens... |
michaelnowotny/cocos | [
"3c34940d7d9eb8592a97788a5df84b8d472f2928",
"3c34940d7d9eb8592a97788a5df84b8d472f2928"
] | [
"cocos/tests/test_numerics/test_data/test_squeeze_reshape.py",
"cocos/numerics/random.py"
] | [
"import cocos.device\nimport cocos.numerics as cn\nimport numpy as np\nimport pytest\n\n\ntest_data = [np.array([[1, 2, 3],\n [4, 5, 6],\n [7, 8, 20]],\n dtype=np.int32),\n np.array([[0.2, 1.0, 0.5],\n [0.4, 0.5, 0.6]... | [
[
"numpy.array",
"numpy.allclose"
],
[
"numpy.minimum",
"numpy.sqrt",
"numpy.prod",
"numpy.finfo"
]
] |
mjredmond/FEMApp | [
"dd8cc53acf80d0a1bb83ce9c89bcfd51e85c6be8"
] | [
"fem/utilities/tables/table_data/_table_np_data_list.py"
] | [
"\"\"\"\ntable_data.table_data_list\n\ntable data list\n\nauthor: Michael Redmond\n\n\"\"\"\n\nfrom __future__ import print_function, absolute_import\n\nfrom ._table_data import TableData, DummyTableData\n\nfrom fem.utilities import MrSignal\nfrom fem.utilities.error_handling import MyExceptions\nfrom fem.utilities... | [
[
"numpy.copyto",
"numpy.delete",
"numpy.zeros",
"numpy.insert"
]
] |
Kuga23/Deep-Learning | [
"86980338208c702b6bfcbcfffdb18498e389a56b"
] | [
"Pytorch/Scratch CNN and Pytorch/part1-convnet/tests/test_relu.py"
] | [
"import unittest\nimport numpy as np\nfrom modules import ReLU\nfrom .utils import *\n\nclass TestReLU(unittest.TestCase):\n \"\"\" The class containing all test cases for this assignment\"\"\"\n\n def setUp(self):\n \"\"\"Define the functions to be tested here.\"\"\"\n pass\n\n def _relu_for... | [
[
"numpy.array",
"numpy.random.randn",
"numpy.linspace"
]
] |
taoshen58/ReSAN | [
"f65f3fe656907be0ec14ddf18cd7d2608e7ef905",
"f65f3fe656907be0ec14ddf18cd7d2608e7ef905"
] | [
"resan/resa.py",
"SICK_rl_pub/src/nn_utils/integration_func.py"
] | [
"import tensorflow as tf\n\nfrom resan.utils.nn import bn_dense_layer, dropout, linear\nfrom resan.utils.general import exp_mask_for_high_rank, mask_for_high_rank\nfrom resan.rl_nn import reduce_data_rep_max_len\n\n\ndef reinforced_self_attention(\n rep_tensor, rep_mask, dep_selection, head_selection,\n ... | [
[
"tensorflow.concat",
"tensorflow.zeros",
"tensorflow.reduce_sum",
"tensorflow.stack",
"tensorflow.equal",
"tensorflow.cast",
"tensorflow.greater",
"tensorflow.add",
"tensorflow.name_scope",
"tensorflow.logical_not",
"tensorflow.shape",
"tensorflow.less",
"tensor... |
18279406017/code-of-csdn | [
"0c22f3abda9605f9a46e4f639739904ed271e6d7"
] | [
"Traffic Light Detection using Python OpenCV/TLState.py"
] | [
"import cv2\r\nimport random\r\nimport numpy as np\r\nfrom enum import Enum\r\nfrom detectColor import detectColor\r\nimport matplotlib.pyplot as plt\r\nimport matplotlib.image as mpimg\r\nclass TLState(Enum):\r\n red = 1\r\n yellow = 2\r\n green = 3\r\n red_yellowArrow = 4\r\n red_greenArrow = 5\r\n... | [
[
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.title",
"numpy.around",
"matplotlib.image.imread",
"matplotlib.pyplot.show"
]
] |
TomArrow/ebu_adm_renderer | [
"c09691610d42aaa42f1a547ab85a468d33dfe0e3",
"c09691610d42aaa42f1a547ab85a468d33dfe0e3"
] | [
"da_ear/common.py",
"da_ear/core/util.py"
] | [
"from attr import attrs, attrib\nfrom attr.validators import instance_of\nimport numpy as np\n\n\ndef validate_range(minimum, maximum):\n def f(instance, attribute, value):\n if not (minimum <= value <= maximum):\n raise ValueError('value \"%s\" out of range ( % s, % s)'\n ... | [
[
"numpy.radians",
"numpy.broadcast_arrays",
"numpy.linalg.norm",
"numpy.arctan2",
"numpy.moveaxis",
"numpy.array",
"numpy.hypot"
],
[
"numpy.asarray",
"numpy.linalg.norm",
"numpy.all",
"numpy.interp",
"numpy.array"
]
] |
yanconglin/Deep-Hough-Transform-Line-Priors | [
"628bae16c5deccc7b1c6688f295533b3adba86a7"
] | [
"ht-lcnn/lcnn/models/HT.py"
] | [
"#encoding:utf-8\n\"\"\"\nDeep-Hough-Transform-Line-Priors (ECCV 2020) https://arxiv.org/abs/2007.09493\n\nYancong Lin, and Silvia Laura Pintea, and Jan C. van Gemert\n\ne-mail: y.lin-1ATtudelftDOTnl\n\nVision Lab, Delft University of Technology\n\nMIT license\n\n\"\"\"\n\nfrom torch.nn import functional as F\nimpo... | [
[
"numpy.sqrt",
"torch.cat",
"numpy.concatenate",
"scipy.ndimage.filters.gaussian_filter",
"torch.from_numpy",
"numpy.stack",
"numpy.sin",
"numpy.ceil",
"numpy.size",
"torch.nn.functional.relu",
"numpy.zeros",
"torch.nn.Sequential",
"torch.nn.Conv2d",
"torch.n... |
m4ni5h/PythonScripts | [
"7adffd478cf5ab3863eb69af1c2a04b3655a872f"
] | [
"NSEPyProject/PE_Earning_Analysis_Func.py"
] | [
"# https://nsepy.readthedocs.io/en/latest/\n\nfrom nsepy import get_history\nfrom nsepy import get_index_pe_history\nfrom datetime import date\nimport calendar\nimport pandas as pd\nfrom pandas import Series, DataFrame\n\n# =(K3-K2)/K2*100\n# =(K3-K2)\nSTARTYEAR = 2011\nENDYEAR = 2020\n\n\ndef indexhistoryyear(inde... | [
[
"pandas.merge",
"pandas.DataFrame"
]
] |
ErillLab/MGE_TF | [
"31af2a203b9a1fde73d35a668b61f365af325257"
] | [
"src/mge.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"\r\n\r\n\r\n\"\"\"\r\n\r\nimport numpy as np\r\nimport random\r\nimport copy\r\nfrom Bio.Seq import Seq\r\nfrom genome import Genome\r\nimport warnings\r\n\r\n\r\nclass MGE():\r\n \r\n def __init__(self, filepath, fileformat):\r\n \r\n self.original = Genome(fil... | [
[
"numpy.array"
]
] |
mgoldchild/keras-onnx | [
"8e700572b89a907ca21a3096556f64b62b7aa76c",
"c08d52bf4d4ec2bba69ec4ffd2ea14f47fecb1f5"
] | [
"applications/mask_rcnn/mask_rcnn.py",
"keras2onnx/ke2onnx/merge.py"
] | [
"import os\nimport sys\nimport numpy as np\nimport skimage\nimport onnx\nimport keras2onnx\n\nfrom mrcnn.config import Config\nfrom mrcnn.model import BatchNorm, DetectionLayer\nfrom mrcnn import model as modellib\nfrom mrcnn import visualize\n\nfrom keras2onnx import set_converter\nfrom keras2onnx.ke2onnx.batch_no... | [
[
"numpy.array",
"numpy.broadcast_to"
],
[
"numpy.array"
]
] |
ngc7331/ArkGachaStatistics | [
"88450218371fe62efcd798acf4e2e7f06a3a55cc"
] | [
"ArkGachaStatistics.py"
] | [
"import argparse\nimport json\nimport os\nimport re\nimport time\nimport matplotlib.pyplot as plt\nimport msedge.selenium_tools\nimport pylab\nfrom selenium import webdriver\nfrom selenium.common.exceptions import NoSuchElementException\n\nrec = []\nUID = ''\ncookies = []\nolddate = 0\n\nparser = argparse.ArgumentP... | [
[
"matplotlib.pyplot.suptitle"
]
] |
arpanmangal/action-detection | [
"fedad54b22a25b5fd12d3bc2cc48bda1a7d6bbfd"
] | [
"load_binary_score.py"
] | [
"import torch.utils.data as data\n\nimport os\nimport os.path\nfrom numpy.random import randint\nfrom ops.io import load_proposal_file\nfrom transforms import *\nfrom ops.utils import temporal_iou\n\n\n\nclass BinaryInstance:\n\n def __init__(self, start_frame, end_frame, video_frame_count,\n fps... | [
[
"numpy.random.randint"
]
] |
christophersampson/digit_recognition_demo | [
"2269354761d7ae64a3d165bb7fbfa8f023c0725f"
] | [
"confusion_matrix.py"
] | [
"\"\"\"\nhttp://scikit-learn.org/stable/auto_examples/model_selection/plot_confusion_matrix.html#sphx-glr-auto-examples-model-selection-plot-confusion-matrix-py\n\"\"\"\nimport itertools\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom sklearn.metrics import confusion_matrix\n\ndef plot_confusion_matrix... | [
[
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.title",
"matplotlib.pyplot.figure",
"numpy.set_printoptions",
"sklearn.metrics.confusion_matrix",
"matplotlib.pyplot.colorbar",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.yticks",
"matplotl... |
xternalz/SDPoint | [
"0013c5dafe80780ea749198ebc42824c3ed41e6c"
] | [
"main.py"
] | [
"import argparse\nimport os\nimport shutil\nimport time\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.parallel\nimport torch.backends.cudnn as cudnn\nimport torch.distributed as dist\nimport torch.optim\nimport torch.utils.data\nimport torch.utils.data.distributed\nimport torchvision.transforms as transfo... | [
[
"torch.nn.CrossEntropyLoss",
"torch.distributed.init_process_group",
"torch.utils.data.distributed.DistributedSampler",
"torch.load",
"torch.utils.data.DataLoader",
"torch.no_grad",
"torch.nn.DataParallel",
"torch.nn.parallel.DistributedDataParallel",
"torch.save"
]
] |
danielmk/pyDentateeLife2020 | [
"b4a9f2beaa0c74dbc9583e2cf228856612596f8a",
"b4a9f2beaa0c74dbc9583e2cf228856612596f8a",
"b4a9f2beaa0c74dbc9583e2cf228856612596f8a",
"b4a9f2beaa0c74dbc9583e2cf228856612596f8a",
"df8f67d4523ce463701c5e5675e74e309dd151e7"
] | [
"deprecated_nets/net_focal2.py",
"deprecated_nets/net_focal.py",
"analysis/model_get_perc_active.py",
"analysis/obsolete/patterns_get_sqrt-diff-norm_outputs.py",
"deprecated_nets/net_global.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nThis module implements the class StandardNetwork.\nStandardNetwork creates a ring network as defined in Santhakumar et al. 2005\nwith some changes as in Yim et al. 2015.\nSee StandardNetwork docstring for details.\nCreated on Tue Nov 28 13:01:38 2017\n\n@author: DanielM\n\"\"\"\n\n... | [
[
"numpy.array",
"numpy.shape"
],
[
"numpy.array",
"numpy.shape"
],
[
"numpy.array"
],
[
"numpy.load"
],
[
"numpy.array",
"numpy.shape"
]
] |
dreaming-coder/DeepLab | [
"3020544e2f9e139dde7bd04f6ff59e6f44d49c6e",
"3020544e2f9e139dde7bd04f6ff59e6f44d49c6e",
"3020544e2f9e139dde7bd04f6ff59e6f44d49c6e",
"3020544e2f9e139dde7bd04f6ff59e6f44d49c6e"
] | [
"src/model/PredRNNpp/run.py",
"src/model/RadarNet/ConvRLSTM.py",
"src/model/MIM/MIMBlock.py",
"src/model/MIM/project_run.py"
] | [
"from pathlib import Path\nfrom typing import List\n\nfrom torch import optim, nn\nfrom torch.utils.data import DataLoader\n\nfrom PredRNNpp import PredRNNpp\nfrom data.RadarDataset2 import RadarDataset2\nfrom util import TrainingTemplate\nfrom util.TestingTemplate import TestingTemplate\nfrom util.transforms.patch... | [
[
"torch.utils.data.DataLoader",
"torch.nn.MSELoss"
],
[
"torch.sigmoid",
"torch.nn.Conv2d",
"torch.tanh",
"torch.layer_norm",
"torch.split",
"torch.pow"
],
[
"torch.sigmoid",
"torch.cat",
"torch.nn.Conv2d",
"torch.tanh",
"torch.layer_norm",
"torch.spl... |
jasonzutty/ezCGP | [
"ee44425e4835f9d7ca5651bbea3340cf9466840a"
] | [
"codes/block_definitions/block_arguments.py"
] | [
"'''\nroot/code/block_definitions/block_arguments.py\n\nOverview:\nIn the first ever iteration of creating a CGP framework, it was suggested by Dr. Greg Rohling to remove hyperparamters from the genome and keep them in their own space and perform basic GA on them instead; that way, all the primitives only deal with... | [
[
"numpy.argsort"
]
] |
Chaanks/speechbrain | [
"6447bde54f6e3fb07fdb934ab535f17cadfbad53",
"6447bde54f6e3fb07fdb934ab535f17cadfbad53"
] | [
"speechbrain/processing/multi_mic.py",
"speechbrain/processing/decomposition.py"
] | [
"\"\"\"Multi-microphone components.\n\nThis library contains functions for multi-microphone signal processing.\n\nExample\n-------\n>>> import torch\n>>>\n>>> from speechbrain.dataio.dataio import read_audio\n>>> from speechbrain.processing.features import STFT, ISTFT\n>>> from speechbrain.processing.multi_mic impo... | [
[
"torch.mean",
"torch.fmod",
"torch.max",
"torch.zeros",
"torch.sin",
"torch.cat",
"torch.sum",
"torch.unique",
"torch.FloatTensor",
"torch.complex",
"torch.irfft",
"torch.sqrt",
"torch.reshape",
"torch.sort",
"torch.triu_indices",
"torch.arange",
... |
zanecodes/asdf | [
"c1f6cf915409da5372c47ac725dc922b4bd52f7d",
"c1f6cf915409da5372c47ac725dc922b4bd52f7d"
] | [
"asdf/tests/test_schema.py",
"asdf/commands/tests/test_edit.py"
] | [
"import io\nfrom datetime import datetime\n\nfrom jsonschema import ValidationError\nimport numpy as np\nfrom numpy.testing import assert_array_equal\nimport pytest\n\nimport asdf\nfrom asdf import constants\nfrom asdf import get_config, config_context\nfrom asdf import extension\nfrom asdf import resolver\nfrom as... | [
[
"numpy.uint32",
"numpy.uint8",
"numpy.float16",
"numpy.int32",
"numpy.int8",
"numpy.ndarray",
"numpy.ulonglong",
"numpy.int16",
"numpy.testing.assert_array_equal",
"numpy.longlong",
"numpy.uint16",
"numpy.float64",
"numpy.bytes_",
"numpy.float32",
"numpy... |
argearriojas/ModEx | [
"b440fb69870960e2c088d1f9afdfdce0beea1dda",
"b440fb69870960e2c088d1f9afdfdce0beea1dda"
] | [
"Scripts/.ipynb_checkpoints/Main-checkpoint.py",
"Scripts/.ipynb_checkpoints/pubtator-checkpoint.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n\nimport pandas as pd\nimport sys\nfrom Bio import Entrez\nfrom Rules_Class import Rules\nimport functions as fn\nfrom configCHIP import output_directory\nfrom configCHIP import input_directory\nfrom configCHIP im... | [
[
"pandas.read_csv",
"pandas.DataFrame"
],
[
"pandas.concat",
"pandas.read_csv",
"pandas.DataFrame"
]
] |
Erotemic/misc | [
"6f8460a690d05e7e0117becc6cae9902cbe2cedd",
"6f8460a690d05e7e0117becc6cae9902cbe2cedd"
] | [
"tests/python/bench_template.py",
"notes/hdd_rates.py"
] | [
"\n\ndef benchmark_template():\n import ubelt as ub\n import pandas as pd\n import timerit\n\n def method1(x, y, z):\n ret = []\n for i in range((x + y) * z):\n ret.append(i)\n return ret\n\n def method2(x, y, z):\n ret = [i for i in range((x + y) * z)]\n ... | [
[
"pandas.DataFrame"
],
[
"numpy.exp",
"pandas.read_excel"
]
] |
mepearson/Dash | [
"b8755882818ac6d064a3c91c1b0eaec930b10a10"
] | [
"dynamic_sql_scatter.py"
] | [
"# dash libs\r\nimport collections\r\nimport dash\r\nimport pandas as pd\r\nfrom sqlalchemy import create_engine\r\n\r\n# dash interactive states\r\nfrom dash.dependencies import Input, Output, State\r\nfrom dash.exceptions import PreventUpdate\r\n\r\n# dash components\r\nimport dash_html_components as html\r\nimpo... | [
[
"pandas.read_sql",
"pandas.DataFrame"
]
] |
DuJiajun1994/RepeatBuyerPrediction | [
"3e77aa3c9468060b335bd9be056cd9c3e1975393"
] | [
"tools/date_process.py"
] | [
"import pandas as pd\r\nimport numpy as np\r\n\r\nuser_log = pd.read_csv('user_log_format1.csv')\r\nuser_log = user_log.drop('item_id', 1)\r\nuser_log = user_log.drop('cat_id', 1)\r\nuser_log = user_log.drop('seller_id', 1)\r\nuser_log = user_log.drop('brand_id', 1)\r\n#7 months + 11.11 mul 4 action_type\r\nresult... | [
[
"pandas.read_csv",
"numpy.lexsort",
"numpy.delete",
"numpy.row_stack",
"numpy.savetxt",
"numpy.array"
]
] |
mhilmiasyrofi/CodeXGLUE | [
"6b267a0047319378954334820a32ea916848d1f6"
] | [
"Code-Code/ActionableWarning-detection/code/run.py"
] | [
"# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.\n# Copyright (c) 2018, 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... | [
[
"torch.load",
"torch.utils.data.DataLoader",
"numpy.concatenate",
"numpy.mean",
"torch.no_grad",
"torch.cuda.is_available",
"torch.device",
"sklearn.metrics.f1_score",
"numpy.exp",
"torch.distributed.init_process_group",
"torch.utils.data.distributed.DistributedSampler"... |
sjang42/keraspp | [
"1496a20b50b1f7ae19f0da32c40c210285406e93"
] | [
"my_ex2_2.py"
] | [
"from keras import layers, models\nfrom keras import datasets\nfrom sklearn import preprocessing\nimport matplotlib.pyplot as plt\n\n\ndef boston_housing_data():\n (X_train, y_train), (X_test, y_test) = datasets.boston_housing.load_data()\n scaler = preprocessing.MinMaxScaler()\n\n X_train = scaler.fit_tra... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.title",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"sklearn.preprocessing.MinMaxScaler",
"matplotlib.pyplot.ylabel"
]
] |
jwzheng94/gps_time | [
"c9c5ec118b6bdbd1d3fdccb034765b5946eb0c98"
] | [
"gps_time/utilities.py"
] | [
"# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/10_utilities.ipynb (unless otherwise specified).\n\n__all__ = ['logger', 'arange_gpstime', 'validate_gps_week']\n\n# Cell\n\"\"\"Copyright 2020 The Aerospace Corporation\"\"\"\n\n# Cell\n\nimport numpy as np\n\nfrom typing import List\nfrom logging import getLogger\n... | [
[
"numpy.arange"
]
] |
ig248/timeserio | [
"afc2a953a83e763418d417059493ef13a17d349c",
"afc2a953a83e763418d417059493ef13a17d349c",
"afc2a953a83e763418d417059493ef13a17d349c"
] | [
"timeserio/preprocessing/pandas.py",
"timeserio/keras/utils.py",
"tests/test_pipeline/test_utils.py"
] | [
"import numpy as np\nimport pandas as pd\nfrom sklearn.base import BaseEstimator, TransformerMixin\n\nfrom .utils import _as_list_of_str\n\n\ndef array_to_dataframe(\n array: np.ndarray, column: str, df=None\n) -> pd.DataFrame:\n \"\"\"Add 1D or 2D array as column in df.\n\n If no df provided, return a new... | [
[
"numpy.hstack",
"pandas.concat",
"pandas.DataFrame",
"numpy.concatenate",
"pandas.MultiIndex.from_product"
],
[
"numpy.random.seed"
],
[
"pandas.testing.assert_series_equal",
"pandas.DataFrame"
]
] |
atfkaka/tensorflow | [
"5657d0dee8d87f4594b3e5902ed3e3ca8d6dfc0a",
"5657d0dee8d87f4594b3e5902ed3e3ca8d6dfc0a",
"5657d0dee8d87f4594b3e5902ed3e3ca8d6dfc0a",
"5657d0dee8d87f4594b3e5902ed3e3ca8d6dfc0a",
"5657d0dee8d87f4594b3e5902ed3e3ca8d6dfc0a"
] | [
"tensorflow/python/training/basic_session_run_hooks_test.py",
"tensorflow/python/util/deprecation_test.py",
"tensorflow/contrib/testing/python/framework/fake_summary_writer.py",
"tensorflow/python/ops/logging_ops.py",
"tensorflow/models/image/cifar10/cifar10.py"
] | [
"# pylint: disable=g-bad-file-header\n# 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/l... | [
[
"tensorflow.train.LoggingTensorHook",
"tensorflow.train.SummaryWriterCache.get",
"tensorflow.python.training.monitored_session.Scaffold",
"tensorflow.contrib.testing.FakeSummaryWriter.uninstall",
"tensorflow.python.training.basic_session_run_hooks._SecondOrStepTimer",
"tensorflow.summary.s... |
colombod/image-tools | [
"40f615307ed95b07de09e5ceb101a5e3d545222d"
] | [
"app/components/model.py"
] | [
"import os\nfrom PyQt5.QtWidgets import (QPushButton, QVBoxLayout, QHBoxLayout, QFrame, QLabel, QFileDialog, QMessageBox, QComboBox,\n QProgressBar, QSizePolicy)\nfrom app.components.stretch_wrapper import NoStretch\nimport pandas as pd\nfrom model.predict_from_file import predict_datase... | [
[
"pandas.read_excel",
"pandas.read_csv"
]
] |
sbisdog/multi_task | [
"63f5236649dd344f1582eba0ff630a635b045be8",
"63f5236649dd344f1582eba0ff630a635b045be8"
] | [
"public/test_scripts/test_on_coco.py",
"public/detection/models/backbone.py"
] | [
"import time\nimport random\nimport argparse\nimport json\nimport os\nimport sys\nimport warnings\n\nBASE_DIR = os.path.dirname(\n os.path.dirname(os.path.dirname(os.path.abspath(__file__))))\nsys.path.append(BASE_DIR)\nwarnings.filterwarnings('ignore')\n\nfrom tqdm import tqdm\nfrom thop import profile\nfrom th... | [
[
"torch.randn",
"torch.utils.data.DataLoader",
"torch.cuda.empty_cache",
"torch.tensor",
"torch.no_grad",
"torch.cuda.is_available",
"torch.cuda.manual_seed_all",
"torch.device",
"torch.nn.DataParallel"
],
[
"torch.randn"
]
] |
interpss/DeepMachineLearning | [
"7799e188996105ab51f2aef45262b04d336ad89b"
] | [
"lfGenNPred/py/single_net/predict_voltage1.py"
] | [
"'''\r\n Copyright (C) 2005-17 www.interpss.org\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 ... | [
[
"tensorflow.matmul",
"tensorflow.zeros",
"tensorflow.reduce_sum",
"tensorflow.placeholder",
"tensorflow.initialize_all_variables",
"tensorflow.train.GradientDescentOptimizer",
"tensorflow.Session"
]
] |
rsignell-usgs/post_gnome | [
"e24492751458570e00d07e7dd1958881f6dfa51b"
] | [
"post_gnome/kmz_particles.py"
] | [
"#!/usr/bin/env python\n\n\"\"\"\nCode for workign with particle fiels in mkz\n\nOnly handles reading for now\n\"\"\"\n# for py2/3 compatibility\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport os\nimport zipfile\nimport base64\nfrom datetime import datetime\n\nimport nu... | [
[
"numpy.zeros"
]
] |
RamParameswaran/pyAFL | [
"d1aa027da43ae6f7e757d99b3b1203e27272785b"
] | [
"pyAFL/teams/models.py"
] | [
"from bs4 import BeautifulSoup\nimport pandas as pd\n\nfrom pyAFL.base.exceptions import LookupError\nfrom pyAFL.players.models import Player\nfrom pyAFL.requests import requests\n\n\nclass Team(object):\n \"\"\"\n A class to represent an AFL Team.\n\n Attributes\n ----------\n name : str\n te... | [
[
"pandas.concat",
"pandas.to_datetime"
]
] |
yuzhouhe2000/video-conference-enhancer | [
"46aa130c0b7f02db5055c8d15877c8287c2276c7"
] | [
"Processor/EQ/bp_filter.py"
] | [
"#TESTING SOSFILT FUNCTION\n\nfrom scipy import signal\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom scipy.io import wavfile\nfrom scipy.io.wavfile import write\n\nsample_rate, sig = wavfile.read('Testing_Files/test_mono.wav')\nsos = signal.ellip(4,5,40,[.009,0.45],btype='bandpass', output='sos')\nfilt... | [
[
"scipy.io.wavfile.write",
"scipy.signal.sosfilt",
"scipy.io.wavfile.read",
"scipy.signal.ellip"
]
] |
lcrh/falken | [
"7545431c7bfa34a9b45c2243cae40dbb58adefaa"
] | [
"service/learner/brains/policies_test.py"
] | [
"# Copyright 2021 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 ... | [
[
"numpy.array"
]
] |
hsauro/PathwayModelingBook | [
"7faff28e2b79a6e2dc017be6f8e8270aaf31478b"
] | [
"Chapter 10/crossValidation.py"
] | [
"import numpy as np, pylab as plt\n\nnp.random.seed (127)\n\ndef gendata():\n y = []\n x = np.arange (-1, 2.5, 0.1)\n for value in x:\n y.append (1.1*value*value*value - 2.3*value*value + 1.1*value + 2 + np.random.normal (0, 2))\n return [x, y] \n\n[x, y] = gendata()\nxn = copy.copy (x); yn = c... | [
[
"numpy.polyfit",
"numpy.poly1d",
"numpy.random.seed",
"numpy.arange",
"numpy.delete",
"numpy.random.normal"
]
] |
szWingLee/pytorch-CycleGAN-and-pix2pix | [
"6127c7ad361ff5545beb14a8b814cb81cf369f35",
"6127c7ad361ff5545beb14a8b814cb81cf369f35"
] | [
"util/image_pool.py",
"scripts/edges/batch_hed.py"
] | [
"import random\nimport torch\n\n\nclass ImagePool():\n \"\"\"This class implements an image buffer that stores previously generated images.\n\n This buffer enables us to update discriminators using a history of generated images\n rather than the ones produced by the latest generators.\n \"\"\"\n\n de... | [
[
"torch.unsqueeze",
"torch.cat"
],
[
"numpy.array",
"numpy.pad"
]
] |
likelyzhao/pysot | [
"01de9d4817904c68b65ddb8aba47cbf3cb9b695a"
] | [
"pysot/tracker/siamrpn_tracker.py"
] | [
"# Copyright (c) SenseTime. All Rights Reserved.\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport numpy as np\nimport torch.nn.functional as F\n\nfrom pysot.core.config import cfg\nfrom pysot.utils.an... | [
[
"torch.nn.functional.softmax",
"numpy.maximum",
"numpy.sqrt",
"numpy.tile",
"numpy.stack",
"numpy.argmax",
"numpy.mean",
"numpy.hanning",
"numpy.exp",
"numpy.outer",
"numpy.array",
"numpy.sum"
]
] |
myprogrammerpersonality/BlackBoxOptimizer | [
"e0050480c2d1a79092429d2da99f7a8f1851c07d"
] | [
"Functions_Final_v3_1.py"
] | [
"# import packages\nimport numpy as np\nimport pandas as pd\nimport os\nfrom itertools import product\nfrom collections.abc import Iterable\n\n\ndef allowed_output(value, reaction_vol_nl=20000, drop_size_nl=100, verbose=0):\n \"\"\"Based on high ,low and stock concentrations and droplet size calculate how many c... | [
[
"pandas.concat",
"numpy.random.choice",
"pandas.DataFrame",
"numpy.array",
"numpy.where",
"numpy.random.randint"
]
] |
junchenfeng/diagnosis_tracing | [
"4e26e2ad0c7abc547f22774b6c9c299999a152c3"
] | [
"StateTracing/train_helper.py"
] | [
"# -*- coding: utf-8 -*-\r\nfrom torch import optim\r\nfrom torch import tensor,save\r\nfrom torch import cuda\r\nfrom torch.nn.utils import clip_grad_value_\r\n\r\nfrom dataloader import read_data,DataLoader,load_init\r\nfrom cdkt import CDKT\r\n\r\n\r\nuse_cuda = True\r\n\r\nif use_cuda:\r\n cuda.empty_cache()... | [
[
"torch.cuda.empty_cache",
"torch.tensor"
]
] |
nawar29/dash-sample-apps | [
"c0ebb97a1c3afd9955f9a83f585e0bda200f4011"
] | [
"apps/dash-oil-and-gas/app.py"
] | [
"# Import required libraries\nimport pickle\nimport copy\nimport pathlib\nimport dash\nimport math\nimport datetime as dt\nimport pandas as pd\nfrom dash.dependencies import Input, Output, State, ClientsideFunction\nimport dash_core_components as dcc\nimport dash_html_components as html\n\n# Multi-dropdown options\... | [
[
"pandas.to_datetime"
]
] |
psydox/Axie_Manager_Bot | [
"34894e4f6f3eb55efbdea2d4a1e54ec23ffd1ffd"
] | [
"src/cogs/loops/axie_trades.py"
] | [
"##> Imports\nimport math\nimport sys\n\n# > 3rd party dependencies\nimport pandas as pd\nimport gspread\nimport gspread_dataframe as gd\nfrom urllib.request import urlopen\nfrom PIL import Image\nfrom io import BytesIO\n\n# > Discord dependencies\nimport discord\nfrom discord.ext import commands\nfrom discord.ext.... | [
[
"pandas.concat",
"pandas.DataFrame",
"pandas.DataFrame.from_dict"
]
] |
jbjjbjjbj/eittek651 | [
"3f735eb1836fc6e144b885654f71d3fe2b4e2c03",
"3f735eb1836fc6e144b885654f71d3fe2b4e2c03"
] | [
"examples/selection_rssi_graph.py",
"examples/benchmark_gfsk_modulate.py"
] | [
"import ad_path\nimport antenna_diversity as ad\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport math\n\"\"\"\nThis file will show the insights of a chosen selection algorithm.\nVery nice for seing what is actually done.\n\nIt will output the following data:\n- A plot showing CRC error and the selected ... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
],
[
"numpy.random.randint"
]
] |
c37102001/DQN | [
"d9d74787547d8649ec766b93211c7bd159f2484f"
] | [
"improved_pg/main.py"
] | [
"import argparse, os\n\nimport matplotlib.pyplot as plt\nimport gym\nimport numpy as np\nimport torch\nfrom torch.autograd import Variable\n\nimport importance_sampling\nimport reinforce\n\nplt.style.use('ggplot')\n\nparser = argparse.ArgumentParser()\nparser.add_argument('--env-name', type=str, default='CartPole-v... | [
[
"numpy.random.seed",
"torch.Tensor",
"torch.manual_seed",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.style.use",
"matplotlib.pyplot.ylabel"
]
] |
sarthakpati/Red-GAN | [
"45cee4ca73fb2c0665b76e3df049184511d18bc6"
] | [
"unet/dataset/isic_dataset.py"
] | [
"from torch.utils.data import Dataset as BaseDataset\nimport os\nimport cv2\nimport glob\nimport numpy as np\nimport json\n\n\nclass Dataset(BaseDataset):\n\n def __init__(\n self,\n images_dir,\n masks_dir,\n classes=None,\n augmentation=None,\n ... | [
[
"numpy.swapaxes",
"numpy.expand_dims"
]
] |
siebeniris/superresolution | [
"2eec93029c1332720ba17d5747ec9aee19bc0c63"
] | [
"src/models/test_models.py"
] | [
"# Test images with pretrained tensorflow models\n# call :\n# python models/research/object_detection/test_models.py --frozen_graph {$path_to_frozen_graph}\n# --label_map {$path_to_##.pbtxt} --test_dir {$path_to_test_set}\n# --num {$number_test_images} --output_dir {$path_to_save_output_imagesWITHboxes}\n\nimport a... | [
[
"tensorflow.Graph",
"numpy.expand_dims",
"tensorflow.import_graph_def",
"tensorflow.greater",
"tensorflow.slice",
"tensorflow.gfile.GFile",
"tensorflow.cast",
"tensorflow.squeeze",
"tensorflow.expand_dims",
"tensorflow.Session",
"tensorflow.get_default_graph",
"tens... |
Rishab26/causalnex | [
"127d9324a3d68c1795299c7522f22cdea880f344"
] | [
"causalnex/structure/pytorch/dist_type/_base.py"
] | [
"# Copyright 2019-2020 QuantumBlack Visual Analytics Limited\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# THE SOFTWARE IS P... | [
[
"numpy.hstack"
]
] |
oneconcern/stompy | [
"4efb78824804edc68555bced275e37842f98ba1f",
"4efb78824804edc68555bced275e37842f98ba1f",
"4efb78824804edc68555bced275e37842f98ba1f"
] | [
"test/test_harm_decomp.py",
"test/test_cgal_line_walk.py",
"stompy/spatial/medial_axis.py"
] | [
"from __future__ import print_function\n\n\nfrom stompy import harm_decomp\nimport numpy as np\n\ndef test_basic():\n # A sample problem:\n omegas = np.array([1.0,0.0])\n\n # the constructed data:\n amps = np.array([1,5.0])\n phis = np.array([1,0])\n\n t = np.linspace(0,10*np.pi,125)\n h = amps... | [
[
"numpy.cos",
"numpy.array",
"numpy.allclose",
"numpy.linspace"
],
[
"numpy.array"
],
[
"matplotlib.pyplot.gca",
"numpy.sqrt",
"matplotlib.pyplot.scatter",
"matplotlib.collections.LineCollection",
"numpy.arange",
"numpy.sorted",
"matplotlib.patches.Circle",
... |
vinitra-zz/sklearn-onnx | [
"a8f2657525d0b4dd279bcd1a971397d002929a77",
"a8f2657525d0b4dd279bcd1a971397d002929a77"
] | [
"skl2onnx/operator_converters/naive_bayes.py",
"tests/test_sklearn_nearest_neighbour_converter.py"
] | [
"# -------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See License.txt in the project root for\n# license information.\n# --------------------------------------------------------------------------\n... | [
[
"numpy.log",
"numpy.issubdtype",
"numpy.zeros"
],
[
"numpy.abs",
"sklearn.datasets.load_iris",
"sklearn.model_selection.train_test_split",
"sklearn.neighbors.KNeighborsClassifier",
"sklearn.neighbors.KNeighborsRegressor",
"sklearn.datasets.make_regression",
"sklearn.pre... |
EngBioNUS/BMSS2 | [
"41163c61a4e0ef3c6430e5954d81a77832e49a9d",
"41163c61a4e0ef3c6430e5954d81a77832e49a9d",
"41163c61a4e0ef3c6430e5954d81a77832e49a9d",
"41163c61a4e0ef3c6430e5954d81a77832e49a9d"
] | [
"build/lib/BMSS/traceanalysis.py",
"examples/example_2_logic_gate/LogicGate_Not_Double_MaturationSecond.py",
"BMSS/models/model_functions/TestModel_Monod_Constitutive_Double.py",
"BMSS/models/model_functions/BMSS_InducerDegradation_DelayActivation_Inducible_ActiveTransport.py"
] | [
"import matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\nimport seaborn as sns\nfrom matplotlib import get_backend\nfrom scipy.stats import skewtest, kurtosistest\n\n###############################################################################\n#... | [
[
"pandas.read_csv",
"pandas.DataFrame",
"matplotlib.get_backend",
"matplotlib.pyplot.get_current_fig_manager",
"matplotlib.pyplot.pause",
"matplotlib.pyplot.figure"
],
[
"numpy.array"
],
[
"numpy.array"
],
[
"numpy.array"
]
] |
JMazick/Web-Design-Challenge | [
"38f848da734baf68a15a62957fe53dcdba373daf"
] | [
"WebVisualizations/data_to_html.py"
] | [
"# Python program to convert \n# CSV to HTML Table \n\n\nimport pandas as pd \n\n# to read csv file named \"cities\" \na = pd.read_csv(\"cities.csv\") \n\n# to save as html file \n# named as \"Table\" \na.to_html(\"Table.html\") \n\n# assign it to a \n# variable (string) \ndata_table = a.to_html() \n"
] | [
[
"pandas.read_csv"
]
] |
daobook/autogluon | [
"7309118f2ab1c9519f25acf61a283a95af95842b",
"bdbaac2d13d14d075b7aa751561f0bbd39927789",
"7309118f2ab1c9519f25acf61a283a95af95842b"
] | [
"core/tests/unittests/scheduler/test_scheduler.py",
"core/src/autogluon/core/scheduler/seq_scheduler.py",
"tabular/src/autogluon/tabular/models/tabular_nn/tabular_nn_model.py"
] | [
"import numpy as np\nimport pickle\nimport time\nfrom autogluon.core.space import Real\nfrom autogluon.core.scheduler import LocalSequentialScheduler\n\n\ndef test_local_sequential_scheduler():\n search_space = dict(\n lr=Real(1e-3, 1e-2, log=True),\n wd=Real(1e-3, 1e-2),\n epochs=10,\n )... | [
[
"numpy.random.uniform"
],
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.title",
"numpy.isnan",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"numpy.nanmean",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
],
[
"numpy... |
Jacob-Zhou/spw-parser | [
"5f746a54d9a1da0591fc34f024eac2639bc3f407",
"5f746a54d9a1da0591fc34f024eac2639bc3f407"
] | [
"parser/model.py",
"parser/cmds/train.py"
] | [
"# -*- coding: utf-8 -*-\n\nfrom parser.modules import CHAR_LSTM, MLP, BertEmbedding, Biaffine, BiLSTM\nfrom parser.modules.dropout import IndependentDropout, SharedDropout\n\nimport torch\nimport torch.nn as nn\nfrom torch.nn.utils.rnn import (pack_padded_sequence, pad_packed_sequence,\n ... | [
[
"torch.load",
"torch.cat",
"torch.nn.utils.rnn.pack_padded_sequence",
"torch.nn.Embedding",
"torch.nn.utils.rnn.pad_packed_sequence",
"torch.nn.Embedding.from_pretrained",
"torch.cuda.is_available",
"torch.nn.init.zeros_",
"torch.save"
],
[
"torch.cuda.device_count",
... |
mieskolainen/icenet | [
"030e2ab658ebc1d83f20cb24dca2bb46b8ac44ca",
"030e2ab658ebc1d83f20cb24dca2bb46b8ac44ca"
] | [
"iceplot/iceplot.py",
"analysis/trg_train.py"
] | [
"# Advanced histogramming & automated plotting functions\n# \n# (c) 2021 Mikael Mieskolainen\n# Licensed under the MIT License <http://opensource.org/licenses/MIT>.\n\n\nimport pathlib\nimport matplotlib\nmatplotlib.use('Agg') # Important for multithreaded applications\nfrom matplotlib import pyplot as plt\n\nimpor... | [
[
"numpy.sqrt",
"numpy.linspace",
"numpy.asarray",
"numpy.concatenate",
"numpy.round",
"numpy.max",
"numpy.random.randn",
"numpy.digitize",
"numpy.histogram",
"matplotlib.pyplot.gca",
"numpy.arange",
"numpy.zeros",
"numpy.power",
"numpy.array",
"numpy.sum"... |
dmishin/fft-image-experiments | [
"3caf46f06de65d06072f5863907cd7998ba005a9"
] | [
"dragon.py"
] | [
"import numpy as np\r\n\r\ndef turn(n):\r\n \"\"\"Formula from WIkipedia.\r\n n could be numpy array of integers\r\n \"\"\"\r\n return (((n & -n) << 1) & n) != 0 \r\n\r\ndef dragon(N):\r\n \"\"\"Generate dragon curve\r\n Returns a pair of integer arrays, (x,y), each 2^N elements long\r\n ... | [
[
"numpy.linspace",
"numpy.cumsum",
"numpy.array",
"numpy.zeros",
"matplotlib.pyplot.show"
]
] |
kumayu0108/model-zoo | [
"4285779f6ff51fa1efb0625d67b428e90c343c0c",
"4285779f6ff51fa1efb0625d67b428e90c343c0c"
] | [
"super_resolution/VDSR_PyTorch/model.py",
"multimodal_models/WaveGAN_TensorFlow/wgan_gp.py"
] | [
"import torch\nimport torch.nn as nn\nfrom math import sqrt\n\nclass VDSR(nn.Module):\n def __init__(self):\n super(VDSR, self).__init__()\n self.layer = self.make_layer(18)\n self.conv1 = nn.Conv2d(1, 64, kernel_size=3,stride=1, padding=1, bias=False)\n self.conv2 = nn.Conv2d(64, 1, ... | [
[
"torch.nn.Sequential",
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.add"
],
[
"tensorflow.shape",
"tensorflow.reduce_mean",
"tensorflow.square",
"tensorflow.random.normal",
"tensorflow.GradientTape"
]
] |
ssalonen/pandas | [
"1929563fdb5358a41420d103a388aa2bd494d543",
"f9e0b7df8ca8a92133d3cea0a26181140f991e2d",
"1929563fdb5358a41420d103a388aa2bd494d543"
] | [
"pandas/tools/tests/test_merge.py",
"pandas/core/config_init.py",
"pandas/computation/expr.py"
] | [
"# pylint: disable=E1103\n\nimport nose\nimport unittest\n\nfrom datetime import datetime\nfrom numpy.random import randn\nfrom numpy import nan\nimport numpy as np\nimport random\n\nfrom pandas.compat import range, lrange, lzip, zip\nfrom pandas import compat\nfrom pandas.tseries.index import DatetimeIndex\nfrom p... | [
[
"pandas.Series",
"pandas.MultiIndex.from_tuples",
"pandas.DataFrame",
"numpy.dtype",
"pandas.util.testing.assert_frame_equal",
"numpy.concatenate",
"pandas.util.testing.makePanel",
"numpy.random.randn",
"pandas.compat.iteritems",
"pandas.compat.lzip",
"numpy.random.rand... |
XWilliamY/Dancing2Music | [
"2352a99e0dcbd74e621b40a47fc2142089e9b400"
] | [
"mfcc_rev.py"
] | [
"import numpy, numpy.fft\nimport math\n\ndef mel(f):\n return 2595. * numpy.log10(1. + f / 700.)\n\ndef melinv(m):\n return 700. * (numpy.power(10., m / 2595.) - 1.)\n\nclass MFCC(object):\n def __init__(self, nfilt=40, ncep=13,\n lowerf=133.3333, upperf=6855.4976, alpha=0.97,\n ... | [
[
"numpy.dot",
"numpy.resize",
"numpy.sqrt",
"numpy.fft.rfft",
"numpy.power",
"numpy.arange",
"numpy.cos",
"numpy.log10",
"numpy.hamming",
"numpy.zeros",
"numpy.empty"
]
] |
telmuunwj/frankmocap1 | [
"86b87833fe4597433e3be4e457c79d6edb6bdc43"
] | [
"mocap_utils/compose_image.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\n\nimport os, sys, shutil\nimport os.path as osp\nimport cv2\nimport numpy as np\nfrom . import general_utils as gnu\n\n\ndef main():\n in_dir = \"./sample_data/images/single_person\"\n out_dir = \"./sample_data/images/multi_person\"\n gnu.renew_dir(out_d... | [
[
"numpy.concatenate"
]
] |
chandar-lab/RLHive | [
"c5b1b77a3daf87aeb877e10c4f65bcd7e2bc1ff8"
] | [
"hive/envs/marlgrid/ma_envs/checkers.py"
] | [
"import numpy as np\nfrom marlgrid.base import MultiGrid\nfrom marlgrid.objects import Goal, GridAgent\n\nfrom hive.envs.marlgrid.ma_envs.base import MultiGridEnvHive\n\n\nclass CheckersMultiGrid(MultiGridEnvHive):\n \"\"\"\n Checkers environment based on sunehag et al. 2017\n\n \"... The map contains appl... | [
[
"numpy.array",
"numpy.sum"
]
] |
caochenrui/USTC-ncov-AutoReport | [
"bb7042519d0c285d7612d38f483a64d4ac704397"
] | [
"ustclogin.py"
] | [
"from bs4 import BeautifulSoup\nimport requests\nfrom io import BytesIO\nimport pytesseract\nfrom PIL import Image\nimport numpy as np\nimport cv2\nfrom urllib.parse import unquote\nheaders={'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537... | [
[
"numpy.asarray",
"numpy.ones"
]
] |
ZhiningLiu1998/imbalanced-ensemble | [
"d6ed07689ad8c9cd27ecd589849f7122b98ab1a4",
"26670c8a6b7bab26ae1e18cba3174a9d9038a680",
"26670c8a6b7bab26ae1e18cba3174a9d9038a680",
"26670c8a6b7bab26ae1e18cba3174a9d9038a680",
"d6ed07689ad8c9cd27ecd589849f7122b98ab1a4"
] | [
"imbalanced_ensemble/datasets/tests/test_zenodo.py",
"imbalanced_ensemble/ensemble/_bagging.py",
"imbalanced_ensemble/datasets/_imbalance.py",
"imbalanced_ensemble/ensemble/over_sampling/kmeans_smote_boost.py",
"docs/source/auto_examples/classification/plot_resampling_target.py"
] | [
"\"\"\"Test the datasets loader.\n\nSkipped if datasets is not already downloaded to data_home.\n\"\"\"\n# Authors: Guillaume Lemaitre <g.lemaitre58@gmail.com>\n# Christos Aridas\n# License: MIT\n\nimport pytest\n\nfrom imbalanced_ensemble.datasets import fetch_datasets\nfrom sklearn.utils._testing import ... | [
[
"sklearn.utils._testing.SkipTest"
],
[
"sklearn.utils.validation._check_sample_weight",
"sklearn.utils.random.sample_without_replacement",
"sklearn.utils.validation.has_fit_parameter",
"sklearn.utils.fixes.delayed",
"numpy.ones",
"sklearn.base.clone",
"sklearn.tree.DecisionTree... |
Carles-Figuerola/Vitis-AI | [
"611b82cfc32ea2fe04491432bf8feed1f378c9de",
"611b82cfc32ea2fe04491432bf8feed1f378c9de",
"e86b6efae11f8703ee647e4a99004dc980b84989",
"611b82cfc32ea2fe04491432bf8feed1f378c9de",
"611b82cfc32ea2fe04491432bf8feed1f378c9de",
"611b82cfc32ea2fe04491432bf8feed1f378c9de"
] | [
"dsa/DPU-for-RNN/app/customer_satisfaction/run_cpu_e2e.py",
"tools/RNN/rnn_quantizer/example/new_api_resnet18_quant.py",
"tools/Vitis-AI-Quantizer/vai_q_tensorflow2.x/tensorflow_model_optimization/python/core/quantization/keras/vitis/layers/conv_batchnorm_test_utils.py",
"demo/Whole-App-Acceleration/resnet50_... | [
"\"\"\"\nCopyright 2019 Xilinx Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in w... | [
[
"pandas.read_csv",
"tensorflow.python.keras.layers.LSTM",
"tensorflow.python.keras.layers.Embedding",
"tensorflow.python.keras.layers.Dense",
"sklearn.model_selection.train_test_split",
"tensorflow.python.keras.preprocessing.text.Tokenizer",
"tensorflow.python.keras.preprocessing.seque... |
yyb1995/software_technology_project | [
"4b5d9bf04a744b220e0b931917372f32d5bbfcfb"
] | [
"hw2/pymoo/operators/crossover/simulated_binary_crossover.py"
] | [
"import numpy as np\n\nfrom pymoo.model.crossover import Crossover\nfrom pymoo.rand import random\nfrom pymoo.util.misc import covert_to_type\n\n\nclass SimulatedBinaryCrossover(Crossover):\n def __init__(self, prob_cross, eta_cross):\n super().__init__(2, 2)\n self.prob_cross = float(prob_cross)\n... | [
[
"numpy.abs",
"numpy.min",
"numpy.power",
"numpy.full",
"numpy.max",
"numpy.repeat",
"numpy.zeros"
]
] |
david-yoon/UMIC | [
"0dfab17d826e65ae3cb112e3da300772b168776f"
] | [
"model/ce.py"
] | [
"\"\"\"\nCopyright (c) Microsoft Corporation.\nLicensed under the MIT license.\n\nUNITER for ITM model\n\"\"\"\nfrom collections import defaultdict\n\nimport torch\nfrom torch import nn\nfrom torch.nn import functional as F\n#from apex.normalization.fused_layer_norm import FusedLayerNorm as LayerNorm\nfrom torch.nn... | [
[
"torch.clamp",
"torch.nn.Linear",
"torch.sigmoid",
"torch.nn.functional.binary_cross_entropy_with_logits"
]
] |
giuliapezzutti/eeg-preprocessing | [
"a3edfcdac3d9ca273e2d8c2ac70a606747543f18"
] | [
"src/functions.py"
] | [
"import numpy as np\nfrom matplotlib import pyplot as plt\nimport pylab as py\nfrom scipy import optimize\n\n\ndef create_personality_matrix(num_personalities, num_data, personality_types):\n \"\"\"\n Creation of multiplication matrix and bias vector for the computation of the personality test according to th... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"scipy.optimize.curve_fit",
"matplotlib.pyplot.close",
"numpy.zeros"
]
] |
min19828257/AIWorldCup | [
"29a30796a35f7369d63c853b3cdf846481a385af"
] | [
"examples/test_defense1/player_rulebased-B_py/player_rulebased-B.py"
] | [
"#!/usr/bin/python3\n\nfrom __future__ import print_function\n\nfrom twisted.internet import reactor\nfrom twisted.internet.defer import inlineCallbacks\n\nfrom autobahn.wamp.serializer import MsgPackSerializer\nfrom autobahn.wamp.types import ComponentConfig\nfrom autobahn.twisted.wamp import ApplicationSession, A... | [
[
"numpy.argsort",
"numpy.fromstring",
"numpy.zeros"
]
] |
qibaoyuan/fairseq | [
"eabd07fdcfd5b007d05428e81a31b7f3fc5de959",
"eabd07fdcfd5b007d05428e81a31b7f3fc5de959",
"208295dfc76492748500f97a4f9a808d8053a184"
] | [
"fairseq/models/roberta/hub_interface.py",
"fairseq/data/indexed_dataset.py",
"tests/test_binaries.py"
] | [
"# Copyright (c) 2017-present, Facebook, Inc.\n# All rights reserved.\n#\n# This source code is licensed under the license found in the LICENSE file in\n# the root directory of this source tree. An additional grant of patent rights\n# can be found in the PATENTS file in the same directory.\n\nimport torch\nimport t... | [
[
"torch.nn.functional.log_softmax",
"torch.tensor"
],
[
"numpy.memmap",
"torch.from_numpy",
"numpy.frombuffer",
"numpy.copyto",
"numpy.array",
"numpy.empty"
],
[
"torch.floor",
"torch.rand"
]
] |
madhushree14/statsmodels | [
"04f00006a7aeb1c93d6894caa420698400da6c33",
"04f00006a7aeb1c93d6894caa420698400da6c33",
"04f00006a7aeb1c93d6894caa420698400da6c33",
"04f00006a7aeb1c93d6894caa420698400da6c33",
"04f00006a7aeb1c93d6894caa420698400da6c33",
"04f00006a7aeb1c93d6894caa420698400da6c33",
"04f00006a7aeb1c93d6894caa420698400da6c3... | [
"statsmodels/examples/ex_lowess.py",
"docs/source/plots/graphics_plot_fit_ex.py",
"statsmodels/stats/nonparametric.py",
"examples/python/statespace_local_linear_trend.py",
"statsmodels/examples/ex_kernel_semilinear_dgp.py",
"examples/python/robust_models_0.py",
"examples/run_all.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Oct 31 15:26:06 2011\n\nAuthor: Chris Jordan Squire\n\nextracted from test suite by josef-pktd\n\"\"\"\n\nimport os\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport statsmodels.api as sm\nimport statsmodels.nonparametric.tests.results\n\n# this is just ... | [
[
"matplotlib.pyplot.plot",
"numpy.arange",
"numpy.array",
"numpy.abs"
],
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots"
],
[
"scipy.stats.norm.ppf",
"numpy.sqrt",
"scipy.stats.rankdata",
"numpy.power",
"numpy.asarray",
"numpy.abs",
"numpy.concat... |
mountain/self | [
"189e00e810d4d719fa6b37b400eef17d2521a64c"
] | [
"src/gym_selfx/render/draw.py"
] | [
"# -*- coding: utf-8 -*-\n#\n# Python version Copyright (c) 2015 John Stowers\n#\n# This software is provided 'as-is', without any express or implied\n# warranty. In no event will the authors be held liable for any damages\n# arising from the use of this software.\n# Permission is granted to anyone to use this sof... | [
[
"numpy.array",
"numpy.zeros"
]
] |
gunkaynar/cs464_hw2 | [
"087cf7eab185644f5197891965f7a5ced93be447",
"087cf7eab185644f5197891965f7a5ced93be447"
] | [
"q2/q2.py",
"q3/q3.py"
] | [
"import pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n\n\ndf = pd.read_csv(\"question-2-features.csv\")\ndf2 = pd.read_csv(\"question-2-labels.csv\")\nx_train = df.to_numpy()\ny_train = df2.to_numpy()\n\ndef add_bias(x):\n if (len(x.shape)==1):\n x=x[:,np.newaxis]\n b=np.ones((x.... | [
[
"numpy.square",
"numpy.dot",
"matplotlib.pyplot.legend",
"pandas.read_csv",
"matplotlib.pyplot.title",
"numpy.linalg.inv",
"matplotlib.pyplot.savefig",
"numpy.ones",
"numpy.concatenate",
"matplotlib.pyplot.plot",
"numpy.append",
"matplotlib.pyplot.xlabel",
"matp... |
jeandersonbc/pandas | [
"19a1072f1c96638025201c2e6a5805e749e9005c"
] | [
"pandas/core/generic.py"
] | [
"import collections\nfrom datetime import timedelta\nimport functools\nimport gc\nimport json\nimport operator\nimport pickle\nimport re\nfrom textwrap import dedent\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Callable,\n Dict,\n FrozenSet,\n Hashable,\n List,\n Mapping,\n Optional,\n... | [
[
"pandas.tseries.frequencies.to_offset",
"pandas.util._validators.validate_bool_kwarg",
"pandas.core.dtypes.inference.is_hashable",
"numpy.unique",
"numpy.asanyarray",
"pandas.core.dtypes.common.is_re_compilable",
"pandas.concat",
"pandas.core.dtypes.common.is_list_like",
"panda... |
QDucasse/FDIA_simulation | [
"bdd0cb072f07b9a96fd82df581c9c7493ae66cbc",
"bdd0cb072f07b9a96fd82df581c9c7493ae66cbc"
] | [
"fdia_simulation/tests/filters/test_filters_ct.py",
"fdia_simulation/tests/attackers/test_period_attacker.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Jul 22 09:19:47 2019\n\n@author: qde\n\"\"\"\n\nimport unittest\nimport numpy as np\nfrom pprint import pprint\nfrom copy import deepcopy\nfrom math import sqrt,atan2, cos, sin\nfrom nose.tools import raises\nfrom nu... | [
[
"numpy.allclose",
"numpy.array_equal",
"scipy.linalg.block_diag",
"numpy.linalg.inv",
"numpy.array"
],
[
"numpy.eye",
"numpy.array",
"numpy.array_equal",
"numpy.ones"
]
] |
Yosshi999/tcav-TF2 | [
"cb785502bb58d5bd9278424bce1fab6275a9c3b1"
] | [
"tcav/cav_test.py"
] | [
"\"\"\"\nCopyright 2018 Google LLC\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n https://www.apache.org/licenses/LICENSE-2.0\nUnless required by applicable law or agreed to in writing... | [
[
"tensorflow.io.gfile.GFile",
"numpy.ones",
"tensorflow.python.platform.googletest.main",
"tensorflow.python.platform.flags.DEFINE_string",
"numpy.array",
"sklearn.linear_model.SGDClassifier"
]
] |
markus583/alibi | [
"ee709d6296b0d803707bce2ed8a47488cd9e9cee"
] | [
"alibi/utils/visualization.py"
] | [
"import numpy as np\nimport warnings\nfrom enum import Enum\nfrom matplotlib import pyplot as plt\nfrom matplotlib.pyplot import figure, axis\nfrom matplotlib.figure import Figure\nfrom matplotlib.colors import LinearSegmentedColormap\nfrom mpl_toolkits.axes_grid1 import make_axes_locatable\nfrom numpy import ndarr... | [
[
"numpy.expand_dims",
"numpy.abs",
"numpy.clip",
"matplotlib.figure.Figure",
"numpy.cumsum",
"matplotlib.pyplot.subplots",
"numpy.max",
"numpy.mean",
"matplotlib.colors.LinearSegmentedColormap.from_list",
"matplotlib.pyplot.show",
"numpy.where",
"numpy.sum"
]
] |
MarkMoretto/python-examples-main | [
"37b8c41d2f175029f4536ca970f037ff19b4e951",
"37b8c41d2f175029f4536ca970f037ff19b4e951"
] | [
"clustering/old_patient_clustering_script.py",
"notebook-samples/unsupervised/pred_electricity_consumption.py"
] | [
"\n\"\"\"\nTopic: Claims Grouping Analysis Exercise\nAuthor: Mark Moretto\nDate Created: 05/10/2018\n\"\"\"\n\n\nimport gc\nimport os\nimport sys\nimport pyodbc\nimport random\nimport textwrap\nimport warnings\nimport numpy as np\nimport pandas as pd\nfrom time import time\nfrom time import sleep\nfrom copy import ... | [
[
"pandas.concat",
"pandas.read_sql_query",
"sklearn.cluster.KMeans",
"sklearn.preprocessing.Imputer",
"numpy.seterr",
"sklearn.mixture.GaussianMixture",
"pandas.set_option",
"numpy.float"
],
[
"pandas.to_datetime",
"pandas.read_csv",
"torch.cuda.empty_cache",
"nu... |
ijufumi/demo-python | [
"b48bdebde172ca581a48346a77b12c30ff202e73"
] | [
"result_of_deep-learning-from-scratch/chap4/4_4_2.py"
] | [
"import sys, os\nsys.path.append(os.pardir)\nimport numpy as np\nfrom common.functions import softmax, cross_entropy_error\nfrom common.gradient import numerical_gradient\n\nclass simpleNet:\n def __init__(self):\n self.W = np.random.randn(2, 3)\n\n def predict(self, x):\n return np.dot(x, self.... | [
[
"numpy.dot",
"numpy.array",
"numpy.random.randn",
"numpy.argmax"
]
] |
ZeusNightBolt/DIGITS | [
"3450cc683143415418af5ecdb1b17b02da3e2c79"
] | [
"tools/create_db.py"
] | [
"#!/usr/bin/env python2\n# Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.\n\nimport sys\nimport os\nimport time\nimport argparse\nimport logging\nimport re\nimport shutil\nimport math\nimport random\nfrom collections import Counter\nimport threading\nimport Queue\n\n# Add path for DIGITS package... | [
[
"numpy.around",
"numpy.array",
"numpy.zeros",
"numpy.save"
]
] |
henriquesimoes/humpback | [
"ba687a71f95ef9c9c30426eefae11a69efd6f942",
"ba687a71f95ef9c9c30426eefae11a69efd6f942"
] | [
"solutions/2nd-place/bbox_model/utils.py",
"solutions/2nd-place/utils.py"
] | [
"import torch\nimport cv2\nimport numpy as np\n\nimport sys\nimport os\nimport numpy as np\nimport torch\n\nclass Logger(object):\n def __init__(self, logfile):\n self.terminal = sys.stdout\n self.log = open(logfile, \"a\")\n\n def write(self, message):\n self.terminal.write(message)\n ... | [
[
"torch.LongTensor",
"numpy.amax",
"numpy.pad",
"torch.max",
"torch.cat",
"numpy.sqrt",
"torch.min",
"torch.from_numpy",
"torch.Tensor.numpy",
"numpy.concatenate",
"numpy.round",
"numpy.copy",
"numpy.zeros",
"numpy.sum"
],
[
"numpy.dot",
"numpy.as... |
tushar-deepsource/pandas | [
"700be617eb567fb4ab82aa8151d5c4ee02c22b95"
] | [
"pandas/tests/frame/test_query_eval.py"
] | [
"import operator\n\nimport numpy as np\nimport pytest\n\nimport pandas.util._test_decorators as td\n\nimport pandas as pd\nfrom pandas import (\n DataFrame,\n Index,\n MultiIndex,\n Series,\n date_range,\n)\nimport pandas._testing as tm\nfrom pandas.core.computation.check import NUMEXPR_INSTALLED\n\n... | [
[
"pandas.eval",
"numpy.random.choice",
"numpy.isnan",
"numpy.arange",
"numpy.tile",
"pandas.MultiIndex.from_arrays",
"pandas.DataFrame",
"pandas._testing.makeCustomDataframe",
"numpy.random.randn",
"numpy.random.rand",
"pandas.date_range",
"pandas._testing.assert_ser... |
mpashchenkov/open_model_zoo | [
"ee811e1dc0ac79aba46b82322102a728b9ba5de3"
] | [
"tools/accuracy_checker/openvino/tools/accuracy_checker/evaluators/custom_evaluators/segnet_background_matting.py"
] | [
"\"\"\"\nCopyright (c) 2018-2021 Intel Corporation\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law ... | [
[
"numpy.expand_dims",
"numpy.ndim",
"numpy.concatenate",
"numpy.shape",
"numpy.transpose",
"numpy.zeros"
]
] |
james-yoo/onshape-to-robot | [
"c48bdfebb9f8aacb7a2d55bc063363364e74a46f"
] | [
"onshape-to-robot.py"
] | [
"#!/usr/bin/env python\nimport numpy as np\nfrom onshape_api.client import Client\nfrom copy import copy\nfrom robot import RobotURDF, RobotSDF\nimport sys\nimport os\nimport json\nimport csg\n\n# Loading configuration\nrobot = 'robots/demo/'\nif len(sys.argv) > 1:\n robot = sys.argv[1]\n\nconfigFile = robot+'/c... | [
[
"numpy.reshape",
"numpy.array",
"numpy.identity",
"numpy.linalg.inv"
]
] |
towzeur/vision | [
"cabf5876e2a16bf3132a63c7c19cfc35c7c241e1"
] | [
"torchvision/models/efficientnet.py"
] | [
"import copy\nimport math\nfrom functools import partial\nfrom typing import Any, Callable, Optional, List, Sequence\n\nimport torch\nfrom torch import nn, Tensor\nfrom torchvision.ops import StochasticDepth\n\nfrom .._internally_replaced_utils import load_state_dict_from_url\nfrom ..ops.misc import ConvNormActivat... | [
[
"torch.nn.Sequential",
"torch.nn.Dropout",
"torch.nn.init.uniform_",
"torch.nn.Linear",
"torch.nn.init.ones_",
"torch.nn.AdaptiveAvgPool2d",
"torch.flatten",
"torch.nn.init.zeros_",
"torch.nn.init.kaiming_normal_"
]
] |
narminmammadsoy/taaraxtak | [
"8df538a23003d9b18120885eac9b78388f7be0d2",
"8df538a23003d9b18120885eac9b78388f7be0d2"
] | [
"test/w3techs-test.py",
"src/shared/utils.py"
] | [
"import src.w3techs.utils as utils\nimport src.w3techs.types as types\nimport src.shared.types as shared_types\n\nimport pandas as pd\nimport numpy as np\n\nimport psycopg2\nimport testing.postgresql\n\nimport pytest\n\n\n@pytest.fixture(scope='function')\ndef postgresdb(request):\n '''Postgres testing mock'''\n... | [
[
"numpy.array",
"pandas.Timestamp",
"numpy.zeros",
"pandas.Series"
],
[
"pandas.read_csv",
"pandas.Timestamp.utcnow"
]
] |
AlvaroCavalcante/video2tfrecord | [
"a77b6e999bbf0edbc254c0fa42549d9ab5f9013c"
] | [
"src/data_augmentation.py"
] | [
"import math\n\nimport tensorflow as tf\nfrom tensorflow.keras import backend as K\n\n\ndef get_rotation_matrix(rotation, zero, one):\n rotation = math.pi * rotation / 180.\n c1 = tf.math.cos(rotation)\n s1 = tf.math.sin(rotation)\n return tf.reshape(tf.concat([c1, s1, zero, -s1, c1, zero, zero, zero, o... | [
[
"tensorflow.constant",
"tensorflow.math.cos",
"tensorflow.concat",
"tensorflow.range",
"tensorflow.keras.backend.dot",
"tensorflow.stack",
"tensorflow.transpose",
"tensorflow.reshape",
"tensorflow.random.uniform",
"tensorflow.ones",
"tensorflow.keras.backend.cast",
... |
wimvillano/git_telco | [
"2f783bdb2d72d7862594d15b97e6988b3bdb4b26"
] | [
"dsfortelco_sklearn.py"
] | [
"from pyspark.sql import SparkSession\nfrom pyspark.sql.types import *\nfrom pyspark.ml.feature import StringIndexer\nfrom pyspark.ml import Pipeline\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.metrics import roc_auc_score, average_precision_score\nimport numpy as np\nimport pandas as pd\nimp... | [
[
"pandas.crosstab",
"sklearn.metrics.roc_auc_score",
"sklearn.metrics.average_precision_score",
"sklearn.ensemble.RandomForestClassifier"
]
] |
eddie-chiang/ccc4prc | [
"7659dfb4fe6e736f80249d935ed37a343dc4fefa",
"7659dfb4fe6e736f80249d935ed37a343dc4fefa"
] | [
"classifier/CodeComprehensionClassifierFactory.py",
"classifier/DialogueActClassifierFactory.py"
] | [
"from sklearn.compose import ColumnTransformer\nfrom sklearn.feature_extraction.text import TfidfVectorizer\nfrom sklearn.linear_model import LogisticRegression\nfrom sklearn.pipeline import Pipeline\nfrom sklearn.preprocessing import OneHotEncoder\n\nfrom nlp import LemmaTokenizer\n\n\nclass CodeComprehensionClass... | [
[
"sklearn.preprocessing.OneHotEncoder",
"sklearn.linear_model.LogisticRegression"
],
[
"pandas.read_csv"
]
] |
StSav012/pyqtgraph | [
"65e17c4e3707eb3bd4d91cdc13504d9b150f4360",
"65e17c4e3707eb3bd4d91cdc13504d9b150f4360",
"65e17c4e3707eb3bd4d91cdc13504d9b150f4360"
] | [
"pyqtgraph/examples/Legend.py",
"pyqtgraph/examples/GLScatterPlotItem.py",
"pyqtgraph/opengl/items/GLTextItem.py"
] | [
"\"\"\"\nDemonstrates basic use of LegendItem\n\"\"\"\n\nimport numpy as np\n\nimport pyqtgraph as pg\n\nwin = pg.plot()\nwin.setWindowTitle('pyqtgraph example: BarGraphItem')\n\n# # option1: only for .plot(), following c1,c2 for example-----------------------\n# win.addLegend(frame=False, colCount=2)\n\n# bar grap... | [
[
"numpy.arange",
"numpy.random.randint",
"numpy.sin"
],
[
"numpy.random.random",
"numpy.clip",
"numpy.cos",
"numpy.ones",
"numpy.zeros",
"numpy.empty"
],
[
"numpy.array",
"numpy.matmul"
]
] |
mlize/gs-quant | [
"253ed75519abbbe407e17e39ca5ed7340fa010dc"
] | [
"gs_quant/test/timeseries/test_analysis.py"
] | [
"\"\"\"\nCopyright 2018 Goldman Sachs.\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in wr... | [
[
"pandas.util.testing.assert_series_equal"
]
] |
abenassi/xlseries | [
"ac507c732a84f9f692a89894399bf12a933d3687"
] | [
"xlseries/tests/strategies/test_strategies.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ntest_strategies\n\nTests for `strategies` module.\n\"\"\"\n\nfrom __future__ import unicode_literals\nimport unittest\nimport nose\nimport pandas as pd\nfrom functools import wraps\n\nfrom xlseries.strategies.discover.parameters import Parameters\nfrom xlse... | [
[
"pandas.date_range"
]
] |
ihish52/d-HAT | [
"35d12828fb9e8e7a184adaa4caa187bef3a94be2",
"35d12828fb9e8e7a184adaa4caa187bef3a94be2"
] | [
"train.py",
"fairseq/modules/linear_super.py"
] | [
"# HAT: Hardware-Aware Transformers for Efficient Natural Language Processing\n# Hanrui Wang, Zhanghao Wu, Zhijian Liu, Han Cai, Ligeng Zhu, Chuang Gan and Song Han\n# The 58th Annual Meeting of the Association for Computational Linguistics (ACL), 2020.\n# Paper: https://arxiv.org/abs/2005.14187\n# Project page: ht... | [
[
"torch.cuda.set_device",
"torch.multiprocessing.spawn",
"torch.manual_seed",
"torch.tensor",
"torch.cuda.is_available",
"torch.cuda.device_count"
],
[
"torch.nn.init.constant_",
"torch.nn.functional.linear",
"torch.nn.init.xavier_uniform_"
]
] |
bin-lin/PyRef | [
"30502be3185d343c91d76ba51b011bc191440a33"
] | [
"preprocessing/refactoring_heuristics.py"
] | [
"import ast\nimport pandas as pd\nimport editdistance\nfrom preprocessing.refactorings_info import RefInfo\nfrom preprocessing.conditions_match import body_mapper\nfrom preprocessing.refactorings import ExtractInlineRef, RenameRef, MoveRef, ClassRef, ExtractVarRef\nfrom preprocessing.utils import intersection, get_... | [
[
"pandas.DataFrame"
]
] |
gorsol/pyroms | [
"d293c9949daf95ec8a0a4e2ff1f67af8969c2b3f"
] | [
"pyroms_toolbox/pyroms_toolbox/CGrid_GLORYS/flood.py"
] | [
"# encoding: utf-8\n\nimport numpy as np\nfrom pyroms import _remapping\n\nimport pyroms\n\ndef flood(varz, Cgrd, Cpos='t', irange=None, jrange=None, \\\n spval=-9.99e+33, dmax=0, cdepth=0, kk=0):\n \"\"\"\n var = flood(var, Cgrd)\n\n optional switch:\n - Cpos='t', 'u', 'v' specify ... | [
[
"numpy.isnan",
"numpy.ones",
"numpy.array",
"numpy.where",
"numpy.zeros"
]
] |
aanurraj/PySyft | [
"1d2c6928b95a2f8164167a8c53f350b188e4533c"
] | [
"packages/syft/src/syft/core/node/domain/client.py"
] | [
"# stdlib\nimport logging\nimport sys\nimport time\nfrom typing import Any\nfrom typing import Dict\nfrom typing import List\nfrom typing import Optional\nfrom typing import Type\nfrom typing import Union\n\n# third party\nfrom nacl.signing import SigningKey\nfrom nacl.signing import VerifyKey\nimport names\nimport... | [
[
"pandas.DataFrame"
]
] |
pferido/Energy-Disaggregation | [
"5558e65bd2c3fd4c602bf76504a8acd2c51ae23e"
] | [
"Tuning_Notebooks/model_structure.py"
] | [
"import tensorflow as tf \nimport os\n\ndef create_model(input_window_length):\n\n \"\"\"Specifies the structure of a seq2point model using Keras' functional API.\n\n Returns:\n model (tensorflow.keras.Model): The uncompiled seq2point model.\n\n \"\"\"\n\n input_layer = tf.keras.layers.Input(shape=(i... | [
[
"tensorflow.keras.models.load_model",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.Model",
"tensorflow.keras.layers.Convolution2D",
"tensorflow.keras.layers.Reshape",
"tensorflow.keras.layers.Flatten",
"tensorflow.keras.layers.Input"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.