repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
tmcunningham/planning-for-drunks
[ "e012721a8a35251281dcf2f7449400818d908bcc" ]
[ "python/measure_drunks_moves.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Nov 25 14:11:59 2021\n\n@author: Tom Cunningham\n\nThis module uses the drunk_functions module to track how many moves it takes\nall drunks to get home at a range of drunk levels. The module will produce a\nboxplot of the results.\n\n\"\"\"\n\nimport drunk_functions\...
[ [ "matplotlib.pyplot.boxplot", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.savefig", "matplotlib.pyplot.ylabel" ] ]
urakubo/ffn_windows
[ "5c3739e2d3f1d8667c994d9126eafa936c66e02b" ]
[ "postprocessing/npz_to_png.py" ]
[ "import os\nfilename = 'seg-0_0_0.npz'\noutputdir = os.getcwd() + os.sep + 'inferred_segmentation'\ninputdir = os.getcwd()\n\n\nimport numpy as np\nimport h5py\n\nimport PIL\nimport PIL.Image\nimport cv2\nimport png\n\n\ndef save_tif8(id_data, filename):\n cv2.imwrite(filename, id_data.astype('uint8'))\n\ndef...
[ [ "numpy.load", "numpy.save" ] ]
jiawei-ren/BalancedMSE
[ "4e1f44fe4cc2518159b1c67159abe3d2b0cea014" ]
[ "imdb-wiki-dir/utils.py" ]
[ "import os\nimport shutil\nimport torch\nimport logging\nimport numpy as np\nfrom scipy.ndimage import gaussian_filter1d\nfrom scipy.signal.windows import triang\n\n\nclass AverageMeter(object):\n def __init__(self, name, fmt=':f'):\n self.name = name\n self.fmt = fmt\n self.reset()\n\n d...
[ [ "torch.sqrt", "numpy.arange", "torch.sum", "scipy.ndimage.gaussian_filter1d", "scipy.signal.windows.triang", "torch.clamp", "torch.save" ] ]
NunoEdgarGFlowHub/autogluon
[ "714894698495ef4352706d3c4250823ad4a43ead", "714894698495ef4352706d3c4250823ad4a43ead", "714894698495ef4352706d3c4250823ad4a43ead" ]
[ "autogluon/searcher/bayesopt/tuning_algorithms/bo_algorithm_components.py", "autogluon/core/decorator.py", "tests/unittests/utils/tabular/data/test_label_cleaner.py" ]
[ "from typing import Iterable, List, Type, Optional\nimport numpy as np\nfrom scipy.optimize import fmin_l_bfgs_b\nimport logging\n\nfrom .base_classes import SurrogateModel, AcquisitionFunction, ScoringFunction, LocalOptimizer\nfrom ..datatypes.common import Candidate\nfrom ..datatypes.tuning_job_state import Tunin...
[ [ "numpy.clip", "scipy.optimize.fmin_l_bfgs_b", "numpy.linalg.norm", "numpy.array", "numpy.random.RandomState" ], [ "numpy.random.seed" ], [ "numpy.array", "pandas.testing.assert_frame_equal", "pandas.Series", "pandas.DataFrame" ] ]
SKA-ScienceDataProcessor/integration-prototype
[ "5875dc0489f707232534ce75daf3707f909bcd15" ]
[ "sip/science_pipeline_workflows/ical_dask/pipelines/imaging_modeling.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"Dask workflow for generating model data for the SIP example ICAL workflow.\n\nThis is code based on the test ICAL pipeline notebook from ARL.\n\"\"\"\nimport logging\nimport pickle\nimport os\nimport sys\nimport json\n\nimport numpy\n\nfrom astropy import units as u\nfrom astropy.coo...
[ [ "numpy.array", "numpy.linspace" ] ]
shuoli90/PAC-confidence-set
[ "ab8dcd5205f9aba6b490aabe7bfc74e1410d0f26" ]
[ "calibration/utils.py" ]
[ "import numpy as np\nimport sys, os\nimport matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt\nfrom matplotlib.backends.backend_pdf import PdfPages\n\nimport pickle\nimport glob\nimport time\n\nimport torch as tc\nfrom torch import nn, optim\nimport torch.tensor as T\nimport torch.nn.functional as ...
[ [ "matplotlib.backends.backend_pdf.PdfPages", "torch.linspace", "matplotlib.pyplot.title", "torch.zeros", "torch.cat", "matplotlib.use", "matplotlib.pyplot.ylim", "matplotlib.pyplot.rc", "matplotlib.pyplot.savefig", "matplotlib.pyplot.xlim", "matplotlib.pyplot.clf", "...
igor-krawczuk/garage
[ "aa86ce710c6d01380477d6feddc0e38427b1e3b4" ]
[ "src/garage/torch/modules/gaussian_mlp_module.py" ]
[ "\"\"\"GaussianMLPModule.\"\"\"\nimport abc\n\nimport torch\nfrom torch import nn\nfrom torch.distributions import Normal\nfrom torch.distributions.independent import Independent\n\nfrom garage.torch.distributions import TanhNormal\nfrom garage.torch.modules.mlp_module import MLPModule\nfrom garage.torch.modules.mu...
[ [ "torch.nn.Parameter", "torch.zeros", "torch.Tensor", "torch.distributions.independent.Independent" ] ]
rafvasq/ml-agents
[ "e3b86a27a2547cdd177bf9e848b4337aa71b887a" ]
[ "ml-agents/mlagents/trainers/trainer_controller.py" ]
[ "# # Unity ML-Agents Toolkit\n# ## ML-Agent Learning\n\"\"\"Launches trainers for each External Brains in a Unity Environment.\"\"\"\n\nimport os\nimport logging\nimport shutil\nimport sys\nif sys.platform.startswith('win'):\n import win32api\n import win32con\nfrom typing import *\n\nimport numpy as np\nimpo...
[ [ "tensorflow.set_random_seed", "tensorflow.reset_default_graph", "numpy.mean", "numpy.random.seed" ] ]
sadielbartholomew/openscm-twolayermodel
[ "19b030571892a3238082765671e161ddd4c2ab97" ]
[ "tests/integration/test_impulse_response_integration.py" ]
[ "import numpy as np\nimport numpy.testing as npt\nimport pytest\nfrom openscm_units import unit_registry as ur\nfrom scmdata import ScmRun\nfrom test_model_integration_base import TwoLayerVariantIntegrationTester\n\nfrom openscm_twolayermodel import ImpulseResponseModel\n\n\nclass TestTwoLayerModel(TwoLayerVariantI...
[ [ "numpy.vstack", "numpy.linspace" ] ]
tanglemontree/StockPrediction-1
[ "80e95bcdd6d77b9250d3b6a452850c1184fad29a" ]
[ "LSTM3/Technical.py" ]
[ "# coding: utf-8\n\n# In[4]:\n\nimport numpy as np\nimport pandas as pd\nfrom pandas import DataFrame\n\n\n\n# In[7]:\n\ndef moving_average(values, period):\n \"\"\"\n 移動平均を計算するのです。\n * values: 調整後終値を指定するのです。\n * period: 期間なのです。\n \"\"\"\n return DataFrame(values).rolling(period).mean()\n\n\n# In[...
[ [ "pandas.DataFrame" ] ]
alexanu/tf-quant-finance
[ "d0eb0e778d2422c6190844ef8f8c457ae25f9265", "d0eb0e778d2422c6190844ef8f8c457ae25f9265", "d0eb0e778d2422c6190844ef8f8c457ae25f9265", "d0eb0e778d2422c6190844ef8f8c457ae25f9265", "d0eb0e778d2422c6190844ef8f8c457ae25f9265" ]
[ "tf_quant_finance/models/joined_ito_process_test.py", "tf_quant_finance/experimental/instruments/overnight_index_linked_futures.py", "tf_quant_finance/experimental/dates/schedules.py", "tf_quant_finance/experimental/dates/holiday_calendar_v2.py", "tf_quant_finance/models/utils_test.py" ]
[ "# Lint as: python3\n# Copyright 2020 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli...
[ [ "tensorflow.compat.v2.test.main", "numpy.var", "tensorflow.compat.v2.random.set_seed", "tensorflow.compat.v2.ones", "numpy.mean", "numpy.corrcoef", "numpy.array" ], [ "tensorflow.compat.v2.compat.v2.name_scope", "tensorflow.compat.v2.concat", "tensorflow.compat.v2.name_...
liupeng678/AudioEmotionRcognition
[ "2cd6261a84788d9d2b08fc1204a262ad6a33a7bb" ]
[ "lstm.py" ]
[ "# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np\nimport pandas as pd\nimport os\nimport librosa\nimport librosa...
[ [ "numpy.expand_dims", "numpy.savez", "numpy.sqrt", "numpy.reshape", "tensorflow.python.keras.Model", "sklearn.model_selection.train_test_split", "numpy.stack", "pandas.DataFrame", "numpy.ones", "numpy.random.normal", "numpy.array", "numpy.sum", "numpy.random.rand...
santhoshkumarvs/tensorflow
[ "5581b91ada226f1ec20f55cd6423853072b2813c", "5581b91ada226f1ec20f55cd6423853072b2813c" ]
[ "tensorflow/python/training/tracking/data_structures_test.py", "tensorflow/python/eager/function_test.py" ]
[ "# Copyright 2018 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.python.training.tracking.util.list_objects", "tensorflow.python.keras.layers.normalization.BatchNormalization", "tensorflow.python.ops.variables.Variable", "tensorflow.python.ops.array_ops.zeros", "tensorflow.python.layers.core.Dense", "tensorflow.python.framework.test_util.run...
dykuang/Unsupervised-brain-leision-segmentation
[ "c83462db3cebcf8af357fc42d1a2592b67eace9b" ]
[ "sources/architecture.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Apr 23 16:17:32 2019\n\n@author: dykua\n\narchitectures for the network\n\"\"\"\nfrom keras.layers import Input, Conv2D, Conv2DTranspose, Reshape, Lambda, MaxPooling2D, UpSampling2D, Dropout, concatenate, multiply, add, BatchNormalization, PReLU, GaussianNoise, ZeroP...
[ [ "tensorflow.stack", "tensorflow.exp" ] ]
abfariah/flatland-project
[ "eae13d1d37820514db05d30fd668ed4f4413c33f" ]
[ "example_submission/policy.py" ]
[ "import copy\nimport os\nimport random\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\nclass PolicyNetwork(nn.Module):\n\n def __init__(self, state_size, action_size, hidsize1=128, hidsize2=128):\n super(PolicyNetwork, self).__init__()\n\n self.fc1 = n...
[ [ "torch.load", "numpy.isnan", "torch.nn.utils.parameters_to_vector", "torch.from_numpy", "torch.tensor", "torch.nn.Linear", "torch.no_grad", "torch.device", "numpy.array" ] ]
Magician6174/manipulation
[ "5e386e3a5bb2414693a72f7a4a606a7fd4188045" ]
[ "manipulation/exercises/clutter/test_grasp_candidate.py" ]
[ "import unittest\nimport timeout_decorator\nfrom gradescope_utils.autograder_utils.decorators import weight\nimport numpy as np\nimport os\nimport open3d as o3d\n\nfrom pydrake.all import RigidTransform\n\n# Store X_lst_target as global for testing all the functions\n# yapf: disable\nX_lst_target = np.array([ # no...
[ [ "numpy.random.seed", "numpy.asarray", "numpy.isnan", "numpy.linalg.norm", "numpy.array" ] ]
SiriusKY/SceneTextDetector
[ "88bf3cf12e2ee0887f6b1795f25d4c1e5217b665" ]
[ "tools/eval/icdar_2019_ArT.py" ]
[ "import os\nfrom tqdm import tqdm\nfrom mmdet.apis import init_detector, inference_detector\nimport numpy as np\nimport torch\nimport mmcv\nimport cv2\nimport json\nimport PIL\n\n\ntestset_dir = '/home/xiekaiyu/ocr/dataset/ICDAR2019ArT/test_task13'\noutput_dir = '/home/xiekaiyu/ocr/dataset/ICDAR2019ArT/output/preds...
[ [ "numpy.random.seed", "torch.cuda.empty_cache", "numpy.full", "numpy.concatenate", "numpy.where", "numpy.vstack" ] ]
rishabh1694/pytorch-deepsets-contrastive
[ "94ce648692528ceaafe1310575db8a43cdb68f4f" ]
[ "src/deepsets/experiments.py" ]
[ "import numpy as np\r\nimport torch\r\nimport torch.nn.functional as F\r\nfrom tensorboardX import SummaryWriter\r\nfrom torch import optim\r\nfrom torch.autograd import Variable\r\nfrom tqdm import tqdm\r\n\r\nfrom .datasets import MNISTSummation, MNIST_TRANSFORM\r\nfrom .networks import InvariantModel, SmallMNIST...
[ [ "torch.mm", "matplotlib.pyplot.scatter", "torch.cat", "numpy.random.choice", "numpy.arange", "torch.utils.data.DataLoader", "torch.sum", "matplotlib.pyplot.savefig", "torch.eye", "torch.autograd.Variable", "sklearn.manifold.TSNE", "torch.no_grad", "torch.cuda.is...
Karapyon/apli_env
[ "c6004a43e646a85bd2ccba2249254c1bab9a7709" ]
[ "ml/tests/test_trainer.py" ]
[ "import os, sys\nsys.path.append(os.path.join(os.path.dirname(__file__), \"../../\"))\nimport unittest\nimport shutil\nimport numpy as np\nfrom ml.model import NumberRecognizeNN\nfrom ml.data_processor import DataProcessor\nfrom ml.trainer import Trainer\nfrom ml.resource import Resource\n\n\nclass TestTrainer(unit...
[ [ "sklearn.svm.SVC", "sklearn.metrics.accuracy_score" ] ]
truetqy/lesion_det_dual_att
[ "5a5a77dd7f3aa195a2f5b84169822eb32c396d65", "5a5a77dd7f3aa195a2f5b84169822eb32c396d65", "5a5a77dd7f3aa195a2f5b84169822eb32c396d65" ]
[ "rcnn/dataset/DeepLesion.py", "rcnn/processing/bbox_regression.py", "rcnn/fio/rpn.py" ]
[ "\"\"\"\r\nDeepLesion database\r\n\"\"\"\r\n\r\nimport cPickle\r\nimport cv2\r\nimport os\r\nimport numpy as np\r\n# from scipy.io import loadmat\r\nimport csv\r\nimport sys\r\n\r\nfrom ..logger import logger\r\nfrom imdb import IMDB\r\nfrom rcnn.config import config, default\r\n\r\nDEBUG = False\r\n\r\n\r\nclass D...
[ [ "numpy.ones", "numpy.array", "numpy.where", "numpy.unique" ], [ "numpy.sqrt", "numpy.array", "numpy.zeros", "numpy.where" ], [ "numpy.hstack", "numpy.sqrt", "numpy.meshgrid", "numpy.arange", "numpy.empty", "numpy.max", "numpy.array", "numpy.w...
tinkerNamedFerro/5head.biz
[ "413da41f03e3b3f0ea0d86c0b56a8203867c7c3b" ]
[ "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" ] ]
zhaoguangxiang/OFA
[ "cc1719df2713f0a046f34acb0afd8782e08ea6be", "cc1719df2713f0a046f34acb0afd8782e08ea6be", "cc1719df2713f0a046f34acb0afd8782e08ea6be", "cc1719df2713f0a046f34acb0afd8782e08ea6be", "cc1719df2713f0a046f34acb0afd8782e08ea6be", "cc1719df2713f0a046f34acb0afd8782e08ea6be" ]
[ "models/clip/clip.py", "fairseq/examples/speech_text_joint_to_text/models/s2t_dualinputtransformer.py", "fairseq/fairseq/options.py", "fairseq/fairseq/models/text_to_speech/tts_transformer.py", "fairseq/fairseq/criterions/fastspeech2_loss.py", "fairseq/fairseq/data/iterators.py" ]
[ "import hashlib\nimport os\nimport urllib\nimport warnings\nfrom typing import Any, Union, List\nfrom pkg_resources import packaging\n\nimport torch\nfrom PIL import Image\nfrom torchvision.transforms import Compose, Resize, CenterCrop, ToTensor, Normalize\nfrom tqdm import tqdm\n\nfrom .model import build_model\nf...
[ [ "torch.jit.load", "torch.ones", "torch.load", "torch.tensor", "torch.cuda.is_available", "torch.device" ], [ "torch.cat", "torch.zeros", "torch.nn.Linear", "torch.no_grad", "torch.bmm", "torch.nn.ReLU" ], [ "torch.cuda.device_count" ], [ "torch.n...
FelixVi/Bedrock
[ "82072341902048e5b37022512909d209efb243d6" ]
[ "projects/common/get_raw_adcs.py" ]
[ "import time\nimport struct\nfrom banyan_ch_find import banyan_ch_find\nimport numpy\nimport datetime\nimport sys\nimport os\n\nsys.path.append(os.path.join(os.path.dirname(__file__), \"../submodules/FEED/src/python\"))\n\n# Grab the start time early, so things like\n# python get_raw_adcs.py | tee `date \"+%Y%m%d_%...
[ [ "numpy.cos", "numpy.sin", "numpy.ones", "numpy.linalg.lstsq", "numpy.savetxt", "numpy.angle", "numpy.array", "numpy.empty" ] ]
AlmondDust/Assignment3-Final-AIFO
[ "b006b2090a7b597fde7f92e9d9fbf204bc3c993e" ]
[ "aifo_simulation/java-code/analysis/analyze_1s.py" ]
[ "import numpy as np\nimport csv\nimport sys\nimport os\n\n\n##################################\n# Setup\n#\n\nprint(\"NetBench python analysis tool v0.01\")\n\n# Usage print\ndef print_usage():\n print(\"Usage: python analyze.py /path/to/run/folder\")\n\n# Check length of arguments\nif len(sys.argv) != 2:\n p...
[ [ "numpy.std", "numpy.mean", "numpy.median", "numpy.percentile" ] ]
ezekial4/atomic_neu
[ "2d7c8b9e587dd0e6076b37cb1f07560a488bca50" ]
[ "atomic/tests/test_electron_cooling.py" ]
[ "import unittest\nimport atomic_neu.atomic as atomic\nimport numpy as np\n\nclass TestElectronCooling(unittest.TestCase):\n def setUp(self):\n ad = atomic.element('li')\n eq = atomic.CollRadEquilibrium(ad)\n\n self.temperature = np.logspace(0, 3, 50)\n self.electron_density = 1e19\n ...
[ [ "numpy.logspace", "numpy.testing.assert_allclose" ] ]
TransLinkForecasting/activitysim
[ "3df695bd2bf921aa46d296a09889b68087b8c911" ]
[ "activitysim/examples/example_multiple_zone/marin_work_tour_mode_choice_data.py" ]
[ "\n# marin tvpb example data processing\n# Ben Stabler, ben.stabler@rsginc.com, 09/17/20\n\nimport pandas as pd\nimport openmatrix as omx\n\n# command to run the underdevelopment example\n# python simulation.py -c configs_3_zone_marin -d data_3_marin -o output_3_marin\n\n# data processing at c:\\projects\\activitys...
[ [ "pandas.concat", "pandas.read_csv", "pandas.io.pytables.HDFStore", "pandas.merge" ] ]
Idein/chainer-hand-pose
[ "a47e0c61c4fea3369db566eea3d539d1c9398bf7", "a47e0c61c4fea3369db566eea3d539d1c9398bf7", "a47e0c61c4fea3369db566eea3d539d1c9398bf7", "a47e0c61c4fea3369db566eea3d539d1c9398bf7", "a47e0c61c4fea3369db566eea3d539d1c9398bf7" ]
[ "experiments/notebooks/data_visualizer.py", "src/demo/hand_pose_utils.py", "src/pose/models/network_base.py", "src/pose/demo_rgb.py", "src/pose/utils.py" ]
[ "# ---\n# jupyter:\n# jupytext:\n# text_representation:\n# extension: .py\n# format_name: light\n# format_version: '1.4'\n# jupytext_version: 1.2.4\n# kernelspec:\n# display_name: Python 3\n# language: python\n# name: python3\n# ---\n\n# # Dataset Visualizer\n\n# +\nimpor...
[ [ "numpy.arange", "numpy.max", "numpy.array", "matplotlib.pyplot.figure" ], [ "numpy.max", "numpy.array", "numpy.min" ], [ "numpy.sqrt" ], [ "matplotlib.use", "numpy.array", "numpy.hstack", "matplotlib.pyplot.figure" ], [ "numpy.array", "numpy....
halen48/MusicTransformer-Pytorch
[ "62f2f05d48ce7ab5b6c29a354c50b46914c08d70" ]
[ "generate.py" ]
[ "import torch\nimport torch.nn as nn\nimport os\nimport random\n\nfrom third_party.midi_processor.processor import decode_midi, encode_midi\n\nfrom utilities.argument_funcs import parse_generate_args, print_generate_args\nfrom model.music_transformer import MusicTransformer\nfrom model.music_lstm import MusicLSTM\n...
[ [ "torch.set_grad_enabled", "torch.load" ] ]
caidevOficial/Python_Udemy_DataManipulation
[ "a35e6f798bfd3a8857d07ff457d7fb64fa72ab81", "a35e6f798bfd3a8857d07ff457d7fb64fa72ab81" ]
[ "Numpy_Practice/Mathematics_For_DataScience/m_01_Array_Zeros.py", "Pandas_Practice/p_09_DataFrame_Boolean_List.py" ]
[ "# MIT License\n\n# Copyright (c) 2022 [FacuFalcone]\n\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, m...
[ [ "numpy.zeros" ], [ "pandas.read_csv", "pandas.read_json" ] ]
DanielChen98/Dose-Normalization-Have-Effect-On-Domain-Adaptation
[ "99ac8072432491e350c5c24cc93aeb8b3b6ad752" ]
[ "inference.py" ]
[ "'''\nTraining script for CIFAR-10/100\nCopyright (c) Wei YANG, 2017\n'''\nfrom __future__ import print_function\n\nimport argparse\nimport os\nimport shutil\nimport time\nimport random\nfrom dataloader import my_dataset\nfrom ngd import NGD\nimport torch\nimport torch.nn as nn\nimport torch.nn.parallel\nimport tor...
[ [ "torch.nn.CrossEntropyLoss", "torch.load", "torch.manual_seed", "torch.utils.data.DataLoader", "torch.no_grad", "torch.cuda.is_available", "torch.cuda.manual_seed_all", "torch.nn.DataParallel", "torch.autograd.Variable" ] ]
tsinggggg/pandas
[ "8dbb593d0c94107ec8b91a4723c40af537807ca4" ]
[ "pandas/core/frame.py" ]
[ "\"\"\"\nDataFrame\n---------\nAn efficient 2D container for potentially mixed-type time series or other\nlabeled data series.\n\nSimilar to its R counterpart, data.frame, except providing automatic data\nalignment and a host of useful data manipulation methods having to do with the\nlabeling information\n\"\"\"\nf...
[ [ "pandas.util._validators.validate_bool_kwarg", "pandas.core.dtypes.cast.maybe_box_datetimelike", "pandas.core.aggregation.transform", "pandas.core.dtypes.common.infer_dtype_from_object", "pandas.core.aggregation.reconstruct_func", "numpy.where", "pandas.core.dtypes.common.is_named_tupl...
pcmoritz/analytics-zoo
[ "4d9f1eb6ccbf58d49dd5dce41b491c0f76107c31" ]
[ "pyzoo/zoo/pipeline/api/net/tf_dataset.py" ]
[ "#\n# Copyright 2018 Analytics Zoo Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable ...
[ [ "tensorflow.Graph", "tensorflow.as_dtype", "tensorflow.cast", "tensorflow.placeholder", "numpy.dtype", "numpy.float32", "tensorflow.get_default_graph", "numpy.array", "tensorflow.add_to_collection" ] ]
blutjens/deepxde
[ "f74b9a48165eee1984f4b43dec05f1129f77200f" ]
[ "deepxde/optimizers/tensorflow_compat_v1/external_optimizer.py" ]
[ "\"\"\"TensorFlow interface for third-party optimizers.\n\nCode below is taken from https://github.com/tensorflow/tensorflow/blob/v1.15.2/tensorflow/contrib/opt/python/training/external_optimizer.py,\nbecause the ``tf.contrib`` module is not included in TensorFlow 2.\n\nAnother solution is using TensorFlow Probabil...
[ [ "numpy.broadcast_to" ] ]
pmulcaire/rosita
[ "fffe45fb450d79cf36e0a3e2625300dc95249367", "fffe45fb450d79cf36e0a3e2625300dc95249367" ]
[ "allennlp/data/fields/text_field.py", "allennlp/tests/custom_extensions/alternating_highway_lstm_test.py" ]
[ "\"\"\"\nA ``TextField`` represents a string of text, the kind that you might want to represent with\nstandard word vectors, or pass through an LSTM.\n\"\"\"\nimport IPython as ipy\n\nfrom typing import Dict, List, Optional, Iterator\nimport textwrap\n\nfrom overrides import overrides\nfrom spacy.tokens import Toke...
[ [ "torch.LongTensor" ], [ "torch.randn", "torch.nn.utils.rnn.pad_packed_sequence", "torch.cuda.is_available", "torch.nn.utils.rnn.pack_padded_sequence" ] ]
stharrold/doc
[ "a96647f0bd090069112be9f097db0ec5cc5a052b" ]
[ "doc/utils.py" ]
[ "#!/usr/bin/env python\n\"\"\"Utilities for documentation.\n\nSee Also\n--------\nRELATED : {}\n\nNotes\n-----\nDocstring formats adapted from [1]_.\nTODO : To-do items are flagged with 'TODO:'.\nSee Also : Sets of related objects, categorized by `CALLS`, `CALLED_BY`, `RELATED`.\n\nReferences\n----------\n.. [1] ht...
[ [ "matplotlib.pyplot.show", "matplotlib.pyplot.savefig", "pandas.DataFrame" ] ]
captain-pool/optuna
[ "2ae8c17afea54362460320870304c763e91c0596", "2ae8c17afea54362460320870304c763e91c0596", "2ae8c17afea54362460320870304c763e91c0596", "2ae8c17afea54362460320870304c763e91c0596" ]
[ "tests/integration_tests/lightgbm_tuner_tests/test_optimize.py", "optuna/samplers/nsgaii/_sampler.py", "optuna/samplers/_qmc.py", "tests/visualization_tests/matplotlib_tests/test_pareto_front.py" ]
[ "import contextlib\nfrom tempfile import TemporaryDirectory\nfrom typing import Any\nfrom typing import Dict\nfrom typing import Generator\nfrom typing import List\nfrom typing import Optional\nfrom typing import TYPE_CHECKING\nfrom typing import Union\nfrom unittest import mock\nimport warnings\n\nfrom lightgbm im...
[ [ "sklearn.model_selection.train_test_split", "sklearn.model_selection.KFold", "numpy.random.uniform", "numpy.zeros", "numpy.random.randint" ], [ "numpy.random.RandomState" ], [ "numpy.random.PCG64" ], [ "numpy.array", "numpy.unique" ] ]
edchengg/MyNLP
[ "350c14efebc1440d6e132c6c516f0a02625df320" ]
[ "examples/conll2003ner/conll2003_ner.py" ]
[ "'''\nNER example for CoNLL 2003\n\n'''\nimport argparse\nimport random\nimport numpy as np\nimport torch\nfrom edcnlp.dataloader.feature import Example\nfrom edcnlp.dataloader.loader import examples_to_dataloader\nfrom edcnlp.model.taskModel import TokenClassification\nfrom edcnlp.utils.utils import display, build...
[ [ "torch.nn.functional.log_softmax", "numpy.random.seed", "torch.manual_seed", "torch.no_grad", "torch.device" ] ]
stjordanis/mmocr
[ "e267d0628141cc74a10b6daf2946a88958e5c24b" ]
[ "mmocr/core/visualize.py" ]
[ "# Copyright (c) OpenMMLab. All rights reserved.\nimport math\nimport os\nimport shutil\nimport urllib\nimport warnings\n\nimport cv2\nimport mmcv\nimport numpy as np\nimport torch\nfrom matplotlib import pyplot as plt\nfrom PIL import Image, ImageDraw, ImageFont\n\nimport mmocr.utils as utils\n\n\ndef overlay_mask...
[ [ "matplotlib.pyplot.imshow", "torch.max", "matplotlib.pyplot.title", "numpy.asarray", "matplotlib.pyplot.savefig", "numpy.ones", "matplotlib.pyplot.subplot", "numpy.array", "numpy.zeros", "numpy.where", "matplotlib.pyplot.show" ] ]
davidelbaze/plotter
[ "79871d87b6d1d35ce72159e664dd4e09eef559b7" ]
[ "examples/gtk3_example.py" ]
[ "import sys\nimport gi\n\ngi.require_version(\"Gtk\", \"3.0\")\nfrom gi.repository import GLib, Gtk, GObject\n\nimport numpy as np\n\nfrom plotter.gtk3_plotter import PlotSelector\n\n\ndef create_to_plot():\n mat = np.random.random((100, 100))\n trace = np.random.random(100)\n to_plot = [\n {\"title...
[ [ "numpy.random.random" ] ]
Herding/SeeST
[ "6a0a9fea2e0abe91bc30785f769eefb1ccba07b3" ]
[ "TraFlow/utils/evaluator.py" ]
[ "\"\"\"评价指标\"\"\"\nimport torch\nfrom torch import Tensor\n\n\ndef mape(hat_y, y, masked_value=torch.tensor(0.)):\n \"\"\"MAPE\n\n Args:\n hat_y: 预测值\n y: 真实值\n masked_value: 遮掩运算过程中会异常的值,默认为0\n\n Return:\n ('mape', mape): 评价指标名称,评价结果\n \"\"\"\n masked_val_mtx = torch.ones...
[ [ "torch.abs", "torch.zeros_like", "torch.tensor", "torch.pow", "torch.where", "torch.ones_like", "torch.ne" ] ]
philtrade/cudf
[ "a4d5c281c9ede5cd31aeaa6c0d131d932a951554" ]
[ "python/cudf/cudf/core/multiindex.py" ]
[ "# Copyright (c) 2019, NVIDIA CORPORATION.\n\nimport numbers\nimport pickle\nimport warnings\nfrom collections.abc import Sequence\n\nimport cupy\nimport numpy as np\nimport pandas as pd\n\nimport cudf\nfrom cudf.core.column import column\nfrom cudf.core.index import Index, as_index\n\n\nclass MultiIndex(Index):\n ...
[ [ "pandas.MultiIndex.from_frame", "pandas.MultiIndex", "pandas.MultiIndex.from_tuples", "pandas.core.indexes.frozen.FrozenList", "pandas.MultiIndex.from_product", "numpy.array", "pandas.api.types.is_bool_dtype" ] ]
SMU-HCI-Lab/tutorials
[ "621d5d65ac1556ecbc62ec885ca12d7e860af832" ]
[ "NLP/MLForNLP/lib/logisticreg_wdbc.py" ]
[ "import logisticreg\nimport csv\nimport numpy as np\n\n\nn_test = 100\nX = []\ny = []\n\n# Data: https://archive.ics.uci.edu/ml/machine-learning-databases/breast-cancer-wisconsin/\nwith open(\"wdbc.data\") as fp:\n for row in csv.reader(fp):\n if row[1] == \"B\":\n y.append(0)\n else:\n...
[ [ "numpy.array" ] ]
chrisquince/BayesPaths
[ "d632578079daa9edd65d5a60f9244c3f2017cc14" ]
[ "scripts/Add_color_CQE.py" ]
[ "import os\nimport sys\nimport argparse\nimport numpy as np\nfrom collections import Counter,defaultdict\nimport matplotlib.patches as mpatches\nimport matplotlib.pyplot as plt\n\n\n#Color_scheme=[\"#0277BD\",]\n\nColor_scheme=['#42A5F5','#66BB6A','#FFEB3B','#EF5350','#FF00FF']\n\n#Color_scheme=[\"#F0A3FF\", \"#007...
[ [ "numpy.zeros" ] ]
NoVarlok/sova-tts-engine
[ "1b7c0b3591bb7f823be648093de279881e194d05" ]
[ "utils/utils.py" ]
[ "\"\"\"\nBSD 3-Clause License\n\nCopyright (c) 2018, NVIDIA Corporation\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice,...
[ [ "torch.max", "torch.empty", "torch.tensor", "torch.cuda.is_available", "torch.arange", "numpy.load", "torch.autograd.Variable" ] ]
kenfranko/tensorboard
[ "0b56d33ef422cdf7916e3ba2cb1674a669c42db7", "0b56d33ef422cdf7916e3ba2cb1674a669c42db7" ]
[ "tensorboard/uploader/uploader_test.py", "tensorboard/compat/proto/proto_test.py" ]
[ "# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.test.main" ], [ "tensorflow.test.main" ] ]
nikit91/ERNIE
[ "a40e498e5b0adbfdce39a478737418199f773d96" ]
[ "code/run_tacred_new.py" ]
[ "# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors and The HugginFace 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.utils.data.DataLoader", "torch.FloatTensor", "torch.nn.Embedding.from_pretrained", "torch.cuda.manual_seed_all", "torch.cuda.is_available", "torch.device", "torch.distributed.init_process_group", "torch.utils.data.distributed.DistributedSampler", "torch.utils.data.Tensor...
codesankalp/Indian-Road-Safety
[ "0892da419707a8ccc1d42d6f68aa20ab085f41f9" ]
[ "webapp/api/mlmodel.py" ]
[ "from .utils.label_map import convert_label_map_to_categories, load_labelmap, create_category_index\nfrom .utils.visualize import *\nimport os\nfrom django.conf import settings\nimport numpy as np\nimport sys\nimport tarfile\nimport tensorflow.compat.v1 as tf\nimport zipfile\nfrom pathlib import Path\nfrom collecti...
[ [ "matplotlib.pyplot.imshow", "numpy.expand_dims", "tensorflow.compat.v1.import_graph_def", "tensorflow.compat.v1.disable_v2_behavior", "numpy.squeeze", "matplotlib.pyplot.savefig", "tensorflow.compat.v1.Session", "tensorflow.compat.v1.Graph", "tensorflow.compat.v1.gfile.GFile", ...
xlnwel/g2rl
[ "e1261fdd2ce70724a99ddd174616cf013917b241", "e1261fdd2ce70724a99ddd174616cf013917b241" ]
[ "nn/rnns/gru.py", "core/optimizer.py" ]
[ "import tensorflow as tf\nfrom tensorflow.keras import layers, activations, initializers, regularizers, constraints\nfrom tensorflow.keras.mixed_precision import global_policy\n\nfrom core.module import Module\nfrom nn.registry import rnn_registry\nfrom nn.typing import GRUState\nfrom utility.tf_utils import assert...
[ [ "tensorflow.keras.layers.LayerNormalization", "tensorflow.concat", "tensorflow.zeros", "tensorflow.cast", "tensorflow.nest.flatten", "tensorflow.keras.initializers.Ones", "tensorflow.keras.mixed_precision.global_policy", "tensorflow.keras.initializers.get", "tensorflow.keras.la...
hwaipy/InteractionFreeNode
[ "88642b68430f57b028fd0f276a5709f89279e30d", "88642b68430f57b028fd0f276a5709f89279e30d", "88642b68430f57b028fd0f276a5709f89279e30d" ]
[ "runtime/python/Lib/site-packages/numpy/fft/_pocketfft.py", "runtime/python/Lib/site-packages/numpy/core/tests/test_mem_overlap.py", "runtime/python/Lib/site-packages/numpy/lib/scimath.py" ]
[ "\"\"\"\r\nDiscrete Fourier Transforms\r\n\r\nRoutines in this module:\r\n\r\nfft(a, n=None, axis=-1, norm=\"backward\")\r\nifft(a, n=None, axis=-1, norm=\"backward\")\r\nrfft(a, n=None, axis=-1, norm=\"backward\")\r\nirfft(a, n=None, axis=-1, norm=\"backward\")\r\nhfft(a, n=None, axis=-1, norm=\"backward\")\r\nihf...
[ [ "numpy.core.swapaxes", "numpy.core.zeros", "numpy.core.take", "numpy.core.conjugate", "numpy.core.asarray", "numpy.core.multiarray.normalize_axis_index", "numpy.core.sqrt" ], [ "numpy.product", "numpy.sqrt", "numpy.issubdtype", "numpy.dtype", "numpy.lib.stride_t...
li-yong/tushare
[ "26da8129fb770e26128b9c2cebc7ef72c9491243" ]
[ "tushare/stock/trading.py" ]
[ "# -*- coding:utf-8 -*- \r\n\"\"\"\r\n交易数据接口 \r\nCreated on 2014/07/31\r\n@author: Jimmy Liu\r\n@group : waditu\r\n@contact: jimmysoa@sina.cn\r\n\"\"\"\r\nfrom __future__ import division\r\n\r\nimport time\r\nimport json\r\nimport lxml.html\r\nfrom lxml import etree\r\nimport pandas as pd\r\nimport numpy as np\r\nf...
[ [ "pandas.read_csv", "pandas.to_datetime", "pandas.read_excel", "pandas.compat.StringIO", "pandas.DataFrame", "pandas.read_html", "pandas.read_json", "pandas.read_pickle" ] ]
Sherry-XLL/RecVAE
[ "e734dad3b59dd3b8101aa40c8ce849a992328e12" ]
[ "preprocessing.py" ]
[ "# based on https://github.com/dawenl/vae_cf\n\nimport os\nimport sys\n\nimport numpy as np\nfrom scipy import sparse\nimport pandas as pd\n\nimport argparse\n\nparser = argparse.ArgumentParser()\nparser.add_argument('--dataset', type=str)\nparser.add_argument('--output_dir', type=str)\nparser.add_argument('--thres...
[ [ "numpy.logical_not", "pandas.concat", "pandas.read_csv", "numpy.random.seed", "pandas.DataFrame", "numpy.random.permutation", "pandas.unique", "numpy.zeros" ] ]
martindurant/xarray
[ "98a05f11c6f38489c82e86c9e9df796e7fb65fd2", "98a05f11c6f38489c82e86c9e9df796e7fb65fd2" ]
[ "xarray/backends/memory.py", "xarray/tests/test_utils.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nimport copy\n\nimport numpy as np\n\nfrom ..core.variable import Variable\nfrom ..core.pycompat import OrderedDict\n\nfrom .common import AbstractWritableDataStore\n\n\nclass InMemoryDataStore(AbstractWr...
[ [ "numpy.empty_like" ], [ "numpy.arange", "pandas.Index", "numpy.testing.assert_array_equal", "numpy.timedelta64", "pandas.MultiIndex.from_product", "pandas.date_range", "numpy.array", "numpy.zeros" ] ]
WangYongzhao/OpenNMT-tf
[ "b1c51e8a3560aa96c3359c5dfa3312d9771c3a32" ]
[ "opennmt/layers/transformer.py" ]
[ "\"\"\"Define layers related to the Google's Transformer model.\"\"\"\n\nimport tensorflow as tf\n\nfrom opennmt.layers import common\nfrom opennmt.utils import compat\n\n\ndef tile_sequence_length(sequence_length, num_heads):\n \"\"\"Tiles lengths :obj:`num_heads` times.\n\n Args:\n sequence_length: The seque...
[ [ "tensorflow.convert_to_tensor", "tensorflow.layers.conv1d", "tensorflow.get_variable", "tensorflow.concat", "tensorflow.layers.dropout", "tensorflow.cast", "tensorflow.gather", "tensorflow.name_scope", "tensorflow.tile", "tensorflow.matmul", "tensorflow.shape", "ten...
joaohenggeler/software-vulnerability-collection-scripts
[ "4719f8c279ebd6b879b7d8bce2a2789cd28c6929" ]
[ "Scripts/modules/project.py" ]
[ "#!/usr/bin/env python3\n\n\"\"\"\n\tThis module defines a class that represents a C/C++ project and that contains methods for interfacing with its vulnerabilities and source files.\n\"\"\"\n\nimport glob\nimport json\nimport os\nimport random\nimport re\nimport sys\nfrom collections import defaultdict, namedtuple\...
[ [ "pandas.isna", "pandas.read_csv", "pandas.to_numeric" ] ]
jefpadfi/pdfkivygui
[ "2fc529065f723fe917065a7b4b5e3b6293dd9e1e" ]
[ "pdfkivygui/garden/matplotlib/backend_kivyagg.py" ]
[ "'''\nBackend KivyAgg\n=====\n\n.. image:: images/backend_agg_example.jpg\n :align: right\n\nThe :class:`FigureCanvasKivyAgg` widget is used to create a matplotlib graph.\nThe render will cover the whole are of the widget unless something different is\nspecified using a :meth:`blit`.\nWhen you are creating a Fig...
[ [ "matplotlib.backend_bases.register_backend", "matplotlib.backends.backend_agg.FigureCanvasAgg.draw" ] ]
MaybeShewill-CV/image-classification-tensorflow
[ "1587fa7acfaba6d33fb07c2c25248570c5d41927" ]
[ "tools/freeze_model.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n# @Time : 2021/3/26 下午4:10\n# @Author : MaybeShewill-CV\n# @Site : https://github.com/MaybeShewill-CV/image-classification-tensorflow\n# @File : freeze_model.py\n# @IDE: PyCharm\n\"\"\"\nfreeze ckpt model file into pb model\n\"\"\"\nimport os.path as ops\n...
[ [ "tensorflow.nn.softmax", "tensorflow.gfile.GFile", "tensorflow.profiler.ProfileOptionBuilder.trainable_variables_parameter", "tensorflow.placeholder", "tensorflow.ConfigProto", "tensorflow.train.ExponentialMovingAverage", "tensorflow.variable_scope", "tensorflow.Session", "tens...
mortarsynth/Audio-Signal-Processing-for-Music-Applications
[ "4674d9e15885401d69d4a468e3ad756ea2600523", "4674d9e15885401d69d4a468e3ad756ea2600523" ]
[ "A7/test3.py", "A3/A3Part4.py" ]
[ "import numpy as np\nfrom scipy.signal import get_window\nfrom scipy.fftpack import fft\nimport sys, os, math\nsys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../software/models/'))\nimport dftModel as DFT\nimport utilFunctions as UF\nimport harmonicModel as HM\nimport matplotlib.pyplo...
[ [ "scipy.fftpack.fft", "numpy.zeros", "scipy.signal.get_window" ], [ "numpy.ceil", "scipy.signal.get_window" ] ]
greaseuniverse/greaseterminator
[ "ed00a63a5306d9020a8f9941815f6e85cd01c83c" ]
[ "interventions/vision.py" ]
[ "import numpy as np\nimport cv2\nimport matplotlib.pyplot as plt\nimport os\nimport sched, time\n\nfrom text.text_filter import *\nfrom visual.inpainting import *\nfrom visual.template_matching import *\nfrom visual.darken import *\nfrom visual.video_obscenity import *\nfrom PIL import Image\n\n\ndef run(image_in =...
[ [ "numpy.zeros" ] ]
jcbird/apogee
[ "a4aac39fe52d1ca8ba8a790678e9b330f9462d49" ]
[ "apogee/tools/path.py" ]
[ "##################################################################################\n#\n# apogee.tools.path: return the path of various APOGEE data files\n#\n# This file depends on various environment variables that should be set:\n#\n# - SDSS_LOCAL_SAS_MIRROR: top-level directory with data\n# ...
[ [ "numpy.linspace", "numpy.ceil", "numpy.floor", "numpy.array", "numpy.fabs" ] ]
karaage0703/zero-deeplearning
[ "8b6e4550d14819c2b4f3114405af15e78c700a33" ]
[ "3_2_4_sigmoid.py" ]
[ "import numpy as np\nimport matplotlib.pylab as plt\n\ndef sigmoid(x):\n return 1/(1 + np.exp(-x))\n\nx = np.arange(-5.0, 5.0 , 0.1)\ny = sigmoid(x)\nplt.plot(x, y)\nplt.ylim(-0.1, 1.1)\nplt.show()\n" ]
[ [ "matplotlib.pylab.show", "numpy.arange", "matplotlib.pylab.plot", "matplotlib.pylab.ylim", "numpy.exp" ] ]
yongjun823/Open3D-PointNet
[ "defe5ff0e190d77723bb7f08287e172ff8f8ff34" ]
[ "datasets.py" ]
[ "from __future__ import print_function\nimport open3d\nimport torch.utils.data as data\nfrom PIL import Image\nimport os\nimport os.path\nimport errno\nimport torch\nimport json\nimport codecs\nimport numpy as np\nimport progressbar\nimport sys\nimport torchvision.transforms as transforms\nimport argparse\nimport j...
[ [ "numpy.array", "torch.from_numpy", "numpy.loadtxt" ] ]
LucasHelal/data-science
[ "9b243be1dea23a521e6ebb49dc358708a9b17dbd", "9b243be1dea23a521e6ebb49dc358708a9b17dbd", "9b243be1dea23a521e6ebb49dc358708a9b17dbd" ]
[ "working-with-data/part2/binning.py", "pandas/rank-and-sort.py", "working-with-data/part2/merge-on-index.py" ]
[ "import pandas as pd\n\n# Now we'll learn about binning\n\nyears = [1990, 1991, 1992, 2008, 2012, 2015, 1987, 1969, 2013, 2008, 1999]\n\n# We can seperate these years by decade\ndecade_bins = [1960, 1970, 1980, 1990, 2000, 2010, 2020]\n\n# Now we'll use cut to get somethign called a Category object\ndecade_cat = pd...
[ [ "pandas.value_counts", "pandas.cut" ], [ "numpy.random.randn" ], [ "numpy.arange", "pandas.merge", "pandas.DataFrame" ] ]
penaguerrero/jwql
[ "0e6eb58e7a631c1d6356ce6c1b192c7dd52962bf" ]
[ "setup.py" ]
[ "import numpy as np\nfrom setuptools import setup\nfrom setuptools import find_packages\n\nVERSION = '0.25.0'\n\nAUTHORS = 'Matthew Bourque, Lauren Chambers, Misty Cracraft, Mike Engesser, Mees Fix, Joe Filippazzo, Bryan Hilbert, '\nAUTHORS += 'Graham Kanarek, Teagan King, Catherine Martlin, Maria Pena-Guerrero, Jo...
[ [ "numpy.get_include" ] ]
burntfalafel/torch-mlir-internal
[ "d3ef58450fc94e9337dc0434fa3af6dd7b54b37f", "d3ef58450fc94e9337dc0434fa3af6dd7b54b37f", "d3ef58450fc94e9337dc0434fa3af6dd7b54b37f" ]
[ "python/torch_mlir_e2e_test/test_suite/scalar.py", "python/torch_mlir/dialects/torch/importer/jit_ir/build_tools/upstream_shape_helpers.py", "python/torch_mlir_e2e_test/test_suite/elementwise.py" ]
[ "# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.\n# See https://llvm.org/LICENSE.txt for license information.\n# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception\n# Also available under a BSD-style license. See LICENSE.\n\nimport torch\n\nfrom torch_mlir_e2e_test.torchscript.f...
[ [ "torch.ops.aten.sqrt", "torch.randint", "torch.rand", "torch.ops.aten.Bool" ], [ "torch.ceil" ], [ "torch.abs", "torch.randint", "torch.ops.aten.erf", "torch.ops.aten.maximum", "torch.sin", "torch.neg", "torch.tanh", "torch.rsqrt", "torch.where", ...
tfiers/parachute
[ "7a88c0708274670d8b381282cae829c928a7c344" ]
[ "tests/validators/ndarray/test_array.py" ]
[ "import numpy as np\n\nfrom parachute import array, shape, Arbitrary\n\n\ndef test_type_arbitrary():\n Array = array()\n assert not Array(\"No good type\").is_valid()\n assert not Array([\"a\", \"b\"]).is_valid()\n assert Array(3.2).is_valid()\n assert Array([1, 2]).is_valid()\n assert Array((5, 6...
[ [ "numpy.array" ] ]
mathxyz/stock2
[ "1e07156dea37f987efbc03025693b9ca2acf3f96", "1e07156dea37f987efbc03025693b9ca2acf3f96" ]
[ "hockey_dat/hockey_front_to_back.py", "comments_toxicity/comments_xgb_final.py" ]
[ "import pandas as pd\nimport numpy as np\nfrom sklearn.base import BaseEstimator, TransformerMixin\nfrom sklearn.pipeline import Pipeline\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.preprocessing import LabelBinarizer\nfrom sklearn.preprocessing import Imputer\nfrom sklearn.pipeline import Featu...
[ [ "sklearn.ensemble.RandomForestRegressor", "sklearn.model_selection.GridSearchCV", "pandas.read_csv", "sklearn.model_selection.cross_val_score", "numpy.sqrt", "numpy.median", "sklearn.preprocessing.Imputer", "sklearn.metrics.mean_squared_error", "numpy.concatenate", "sklearn...
dannyb2018/gs-quant
[ "e963c4af1c7c65b2ee8f7995815542f6fb7b4957" ]
[ "gs_quant/timeseries/measures_reports.py" ]
[ "\"\"\"\nCopyright 2020 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.to_datetime", "pandas.Series", "pandas.DataFrame", "pandas.tseries.offsets.BDay" ] ]
ZixuanJiang/dnnweaver2
[ "984ffaf670378f7d83f61064d7984008461e6990" ]
[ "dnnweaver2/tf_utils/dataset.py" ]
[ "'''Utility functions and classes for handling image datasets.'''\n\nimport os.path as osp\nimport numpy as np\nimport tensorflow as tf\n\n\ndef process_image(img, scale, isotropic, crop, mean):\n '''Crops, scales, and normalizes the given image.\n scale : The image wil be first scaled to this size.\n ...
[ [ "tensorflow.reverse", "tensorflow.FIFOQueue", "tensorflow.range", "tensorflow.read_file", "tensorflow.shape", "tensorflow.image.resize_images", "tensorflow.stack", "tensorflow.minimum", "tensorflow.image.decode_png", "tensorflow.train.QueueRunner", "tensorflow.to_float"...
TLYu0419/pyquantanalyst
[ "b5be77726b2a7438d4c4d1d768f3c3340f0a286b" ]
[ "predict_stockprice.py" ]
[ "from prophet import Prophet\nimport datetime\nimport pandas as pd\n\n# predict stickprice\ndef predict_stockprice(data, date_col, target_col, periods=100, future_data=None):\n '''\n data: Your current data to training model\n date_col: Date column name\n target_col: Target Variable columns name.\n p...
[ [ "pandas.concat", "pandas.merge" ] ]
feiranwang/deepdive
[ "53c03edba643d53fbb6d9d382870fe5dfb2e47a1" ]
[ "util/calibration.py" ]
[ "#! /usr/bin/env python\n\n# Usage: calibration.py [target/calibration_data_file.csv] [output_file.png]\n\nimport sys\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.gridspec as gridspec\n\nCALIBRATION_FILE = sys.argv[1]\nOUT_IMG_FILE = sys.argv[2]\n\nlabels = []\ncounts = []\nprec = []\nco...
[ [ "matplotlib.pyplot.title", "matplotlib.pyplot.ylim", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlim", "matplotlib.pyplot.subplot", "matplotlib.gridspec.GridSpec", "matplotlib.pyplot.bar", "matplotlib.pyplot.xlabe...
nivedwho/gan
[ "723ce1e3627778b979f048d817f834f253611ff4", "723ce1e3627778b979f048d817f834f253611ff4", "723ce1e3627778b979f048d817f834f253611ff4", "723ce1e3627778b979f048d817f834f253611ff4", "723ce1e3627778b979f048d817f834f253611ff4", "723ce1e3627778b979f048d817f834f253611ff4", "723ce1e3627778b979f048d817f834f253611ff...
[ "tensorflow_gan/examples/mnist/train_test.py", "tensorflow_gan/examples/progressive_gan/networks.py", "tensorflow_gan/python/eval/inception_metrics.py", "tensorflow_gan/examples/stargan/train_lib.py", "tensorflow_gan/examples/mnist_estimator/train_lib.py", "tensorflow_gan/examples/esrgan/train_test.py", ...
[ "# coding=utf-8\n# Copyright 2021 The TensorFlow GAN Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requi...
[ [ "tensorflow.compat.v1.executing_eagerly", "tensorflow.compat.v1.test.main", "tensorflow.compat.v1.zeros", "tensorflow.compat.v1.one_hot" ], [ "tensorflow.compat.v1.math.mod", "tensorflow.compat.v1.expand_dims", "tensorflow.compat.v1.math.floordiv", "tensorflow.compat.v1.add_n",...
geo7/scientific-visualization-book
[ "389766215aa6b234ed1cf560a3768437d41d1d37", "389766215aa6b234ed1cf560a3768437d41d1d37", "389766215aa6b234ed1cf560a3768437d41d1d37", "389766215aa6b234ed1cf560a3768437d41d1d37" ]
[ "code/layout/layout-classical.py", "code/optimization/line-benchmark.py", "code/ornaments/legend-regular.py", "code/rules/graphics.py" ]
[ "# ----------------------------------------------------------------------------\n# Title: Scientific Visualisation - Python & Matplotlib\n# Author: Nicolas P. Rougier\n# License: BSD\n# ----------------------------------------------------------------------------\n#\n# --------------------------------------------...
[ [ "matplotlib.pyplot.tight_layout", "numpy.linspace", "numpy.cos", "matplotlib.pyplot.savefig", "numpy.sin", "matplotlib.pyplot.subplot", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ], [ "matplotlib.pyplot.tight_layout", "matplotlib.collections.LineCollection", ...
RabbitWhite1/torchrec
[ "031bcca5300d52099eb7490ff06fe0301c1c02f2", "031bcca5300d52099eb7490ff06fe0301c1c02f2", "031bcca5300d52099eb7490ff06fe0301c1c02f2" ]
[ "torchrec/modules/deepfm.py", "torchrec/distributed/tests/test_train_pipeline.py", "torchrec/distributed/sharding/cw_sharding.py" ]
[ "#!/usr/bin/env python3\n# Copyright (c) Meta Platforms, Inc. and 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\n\"\"\"\n.. fb:display_title::\n Deep Factorization-Machine Modules\n\n===...
[ [ "torch.sum" ], [ "torch.randint", "torch.nn.Linear", "torch.nn.BCEWithLogitsLoss", "torch.rand", "torch.distributed.destroy_process_group", "torch.device", "torch.optim.SGD", "torch.cuda.device_count" ], [ "torch.Size" ] ]
richardsun-voyager/capsule-network
[ "349cec1caa9ab95ff4b3333c33d04b1bdb442f67" ]
[ "model.py" ]
[ "########################################\n#### Licensed under the MIT license ####\n########################################\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\nfrom numpy import prod\nimport capsules as caps\n\nclass CapsuleNetwork(nn.Modul...
[ [ "torch.norm", "torch.nn.Conv2d", "torch.nn.Sigmoid", "torch.nn.Linear", "torch.sparse.torch.eye", "torch.cuda.is_available", "numpy.prod", "torch.nn.ReLU" ] ]
pengyuanzhuo/Detection
[ "18ac491a41f31978216e198c4d3bf4862564789a" ]
[ "data/voc.py" ]
[ "\"\"\"VOC Dataset Classes\n\nOriginal author: Francisco Massa\nhttps://github.com/fmassa/vision/blob/voc_dataset/torchvision/datasets/voc.py\n\nUpdated by: Ellis Brown, Max deGroot\n\"\"\"\nimport os\nimport torch\nimport torch.utils.data as data\nimport cv2\nimport numpy as np\nimport sys\nif sys.version_info[0] ...
[ [ "numpy.hstack", "numpy.array" ] ]
sthagen/pyvtreat
[ "c32e7ce6db11a2ccdd63e545b25028cbec03a3ff" ]
[ "pkg/tests/test_outcome_name_required.py" ]
[ "\nimport numpy\n\nimport pytest\nimport pandas\n\nimport vtreat # https://github.com/WinVector/pyvtreat\n\n\ndef test_outcome_name_required():\n\n numpy.random.seed(235)\n d = pandas.DataFrame(\n {\"x\": ['1', '1', '1', '2', '2', '2']})\n y = [1, 2, 3, 4, 5, 6]\n\n transform = vtreat.NumericOut...
[ [ "numpy.random.seed", "pandas.DataFrame" ] ]
angelikakw/e-commerce-reviews
[ "109ec5fb4e74bf37d4fd445c6fc3f2284fc1b6ba" ]
[ "main.py" ]
[ "import pandas as pd\nfrom dash_app import show_dashboard\n\n\ndef read_data():\n data = pd.read_csv('Womens Clothing E-Commerce Reviews.csv', index_col=0)\n return data\n\n\ndef main():\n data = read_data()\n show_dashboard(data)\n\n\nif __name__ == '__main__':\n main()\n" ]
[ [ "pandas.read_csv" ] ]
arlanschouwstra/Robotica-Groep-11
[ "17cac9527c3cc3f94f5a8ab11741cb5e546c85c1" ]
[ "camera/shapedetection/colorred.py" ]
[ "import cv2\nimport numpy as np\nimport imutils\nfrom shapedetector import ShapeDetector\n\ncap = cv2.VideoCapture(0)\n\ndef findContours(mask, frame):\n # find contours in the treshholded frame and initialize the shape detector\n ratio = 1.0\n cnts = cv2.findContours(mask.copy(), cv2.RETR_EXTERNAL, cv2.CH...
[ [ "numpy.array" ] ]
Vipin3112/arviz
[ "000b2823b3b008845c2a2f6d4117acab034ebae5" ]
[ "arviz/plots/jointplot.py" ]
[ "\"\"\"Joint scatter plot of two variables.\"\"\"\nimport matplotlib.pyplot as plt\n\nfrom ..data import convert_to_dataset\nfrom .kdeplot import plot_kde\nfrom .plot_utils import _scale_fig_size, get_bins, xarray_var_iter, make_label, get_coords\nfrom ..utils import _var_names\n\n\ndef plot_joint(\n data,\n ...
[ [ "matplotlib.pyplot.GridSpec", "matplotlib.pyplot.subplots" ] ]
yuga-n/ModelLearner
[ "3193efd5eb15172ba8231a34829942040fcb0fc5", "3193efd5eb15172ba8231a34829942040fcb0fc5" ]
[ "network_model/builder/pytorch_builder.py", "DataIO/data_loader.py" ]
[ "# -*- coding: utf-8 -*-\nimport keras.engine.training\nfrom typing import Callable\nfrom typing import Tuple\nfrom typing import List\nfrom typing import Union\nfrom util_types import types_of_loco\nfrom network_model.distillation.distillation_model_builder import DistllationModelIncubator\nfrom network_model.buil...
[ [ "torch.jit.load" ], [ "numpy.array", "numpy.random.randint" ] ]
wikeex/tensorflow-learning
[ "a6ab7c99455711e9f3c015e0abb04fa58342e0cb" ]
[ "tensorflow1.x/lstm_test.py" ]
[ "import numpy as np\nimport tensorflow as tf\nimport reader\nDATA_PATH = 'E:/datasets/ptb'\nVOCAB_SIZE = 10000\n\nHIDDEN_SIZE = 200 # lstm隐含层神经元数\nNUM_LAYERS = 2 # lstm结构层数\nLEARNING_RATE = 1.0 # 学习率\nKEEP_PROB = 0.5 # Dropout保留率\nMAX_GRAD_NORM = 5 # 控制梯度膨胀的系数\n\nTRAIN_BATCH_SIZE = 20 # 训练batch尺寸\nTRAIN_NUM_S...
[ [ "tensorflow.get_variable", "tensorflow.concat", "tensorflow.reduce_sum", "numpy.exp", "tensorflow.random_uniform_initializer", "tensorflow.gradients", "tensorflow.contrib.rnn.MultiRNNCell", "tensorflow.Session", "tensorflow.trainable_variables", "tensorflow.nn.dropout", ...
pkol/metaworld
[ "718e4d1bc2b34e0ae3ef6415fb6cbe4afe8ea4b9", "718e4d1bc2b34e0ae3ef6415fb6cbe4afe8ea4b9", "718e4d1bc2b34e0ae3ef6415fb6cbe4afe8ea4b9" ]
[ "metaworld/policies/sawyer_window_open_v2_policy.py", "metaworld/envs/mujoco/sawyer_xyz/sawyer_disassemble_peg.py", "metaworld/envs/mujoco/sawyer_xyz/sawyer_basketball_v2.py" ]
[ "import numpy as np\n\nfrom metaworld.policies.action import Action\nfrom metaworld.policies.policy import Policy, assert_fully_parsed, move\n\n\nclass SawyerWindowOpenV2Policy(Policy):\n\n @staticmethod\n @assert_fully_parsed\n def _parse_obs(obs):\n return {\n 'hand_xyz': obs[:3],\n ...
[ [ "numpy.arange", "numpy.array", "numpy.linalg.norm" ], [ "numpy.hstack", "numpy.abs", "numpy.linalg.norm", "numpy.concatenate", "numpy.exp", "numpy.random.uniform", "numpy.array" ], [ "numpy.hstack", "numpy.linalg.norm", "numpy.concatenate", "numpy.ex...
morph-dev/self-learning-ai
[ "f94f3e86ab5bc088adf9fdcc320edc9debb4fb87" ]
[ "morphzero/games/connectfour/game.py" ]
[ "from __future__ import annotations\n\nfrom typing import Union, Iterator, Tuple, Optional\n\nimport numpy as np\n\nfrom morphzero.core.common.connect_on_matrix_board import ConnectOnMatrixBoardResult, ConnectOnMatrixBoardState, \\\n ConnectOnMatrixBoardRules, ConnectOnMatrixBoardEngine, ConnectOnMatrixBoardMove...
[ [ "numpy.array" ] ]
rahul0/spark
[ "057c051285ec32c665fb458d0670c1c16ba536b2" ]
[ "python/pyspark/pandas/internal.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...
[ [ "pandas.Index", "pandas.MultiIndex.from_tuples", "numpy.dtype" ] ]
akhilagrawal1001/model-zoo
[ "984ee5091b2835c9555b2cea2745ce36229efa92", "984ee5091b2835c9555b2cea2745ce36229efa92" ]
[ "multimodal_models/ShowAndTellTensorflow/data_process.py", "object_detection/SSD300_VGG16_TensorFlow/iou.py" ]
[ "from tensorflow.keras.preprocessing.text import Tokenizer\nimport numpy as np\n\n\n# Loading all the captions data into a dictionary with the image_name as key\n# Enter the path of \"Flickr8k.token.txt\" present in Dataset in \"caps_path\" variable\ncaps_path = \"../input/flickr8k/Flickr_Data/Flickr_Data/Flickr_Te...
[ [ "tensorflow.keras.preprocessing.text.Tokenizer", "numpy.random.choice" ], [ "numpy.maximum", "numpy.minimum" ] ]
damazz/HQCA
[ "b013ba68f86e42350913c4abc2e1c91695a429b7", "b013ba68f86e42350913c4abc2e1c91695a429b7", "b013ba68f86e42350913c4abc2e1c91695a429b7", "b013ba68f86e42350913c4abc2e1c91695a429b7", "b013ba68f86e42350913c4abc2e1c91695a429b7" ]
[ "hqca/tomography/__constant_project.py", "examples/r2021_arxiv_qcase_benzyne/_instruct_22.py", "examples/r2021_pra_tomography/02_pra_example_2.py", "hqca/acse/_qubit_A.py", "hqca/transforms/_functions.py" ]
[ "'''\nfrom a given operator, looking to project the operator into the constant number\nspace\n'''\nfrom hqca.tools import *\nimport numpy as np\nimport sys\nfrom copy import deepcopy as copy\nfrom hqca.operators import *\nimport scipy as sp\n\nclass ConstantNumberProjection:\n def __init__(self,op,transform,verb...
[ [ "numpy.matrix", "numpy.linalg.solve", "numpy.linalg.matrix_rank", "numpy.asarray", "numpy.asmatrix", "numpy.linalg.lstsq", "numpy.linalg.det", "numpy.iscomplex", "numpy.array", "numpy.isreal", "numpy.zeros" ], [ "numpy.matrix", "numpy.dot", "numpy.log", ...
seeekr/lingvo
[ "3be069de2795cc6d12475bec60a1d96ba521ef16" ]
[ "lingvo/core/lr_schedule_test.py" ]
[ "# Copyright 2018 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.global_variables_initializer", "tensorflow.constant", "tensorflow.test.main", "tensorflow.test.get_temp_dir" ] ]
rovinyu/xalpha
[ "218281552d7f243ee0cb393938a00a041e618246" ]
[ "xalpha/info.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nmodules of info class, including cashinfo, indexinfo and fundinfo class\n\"\"\"\n\nimport os\nimport csv\nimport datetime as dt\nimport json\nimport re\nimport logging\nfrom functools import lru_cache\n\nimport pandas as pd\nfrom bs4 import BeautifulSoup\nfrom sqlalchemy import exc...
[ [ "pandas.read_csv", "pandas.to_datetime", "pandas.DataFrame", "pandas.Timestamp", "pandas.read_sql" ] ]
TimWeaving/CS-VQE-Ansatz
[ "42b4db51e8639e7bcc014af67f353c18ab8b01a5" ]
[ "utils/molecule_tools.py" ]
[ "import numpy as np\nimport json\nfrom collections import Counter\nimport utils.qonversion_tools as qonvert\nimport utils.bit_tools as bit\nimport utils.linalg_tools as la\nimport itertools\nfrom copy import deepcopy\n# Qiskit libraries\nfrom qiskit_nature.operators.second_quantization.fermionic_op import Fermionic...
[ [ "numpy.asarray", "numpy.delete", "numpy.array" ] ]
jiang1997/mmaction2
[ "3cc2e807d91c6f829ec7b6debfaf76ce97858b40", "ccc759dcf159969aa93865bc2a0b18a0c3494044", "ccc759dcf159969aa93865bc2a0b18a0c3494044" ]
[ "mmaction/datasets/pipelines/augmentations.py", "tests/test_data/test_pipelines/test_augmentations/test_crop.py", "demo/demo_posec3d.py" ]
[ "import random\nimport warnings\nfrom collections.abc import Sequence\nfrom distutils.version import LooseVersion\n\nimport cv2\nimport mmcv\nimport numpy as np\nfrom torch.nn.modules.utils import _pair\n\nfrom ..builder import PIPELINES\nfrom .formating import to_tensor\n\n\ndef _combine_quadruple(a, b):\n retu...
[ [ "numpy.log", "numpy.pad", "numpy.sqrt", "numpy.clip", "numpy.min", "numpy.isnan", "numpy.stack", "numpy.concatenate", "numpy.max", "numpy.all", "numpy.random.permutation", "numpy.random.rand", "torch.nn.modules.utils._pair", "numpy.random.uniform", "nump...
akhandait/curiosity-driven-world-models
[ "544326f1ed4274c2e96addebd414f05dead721a9" ]
[ "models_sep.py" ]
[ "import torch.nn.functional as F\nimport torch.nn as nn\nimport torch\nimport torch.optim as optim\nimport numpy as np\nimport math\nfrom torch.nn import init\nfrom torch.distributions.normal import Normal\n\nclass Flatten(nn.Module):\n def forward(self, input):\n return input.view(input.size(0), -1)\n\n\...
[ [ "torch.mean", "torch.nn.init.uniform_", "torch.max", "torch.nn.functional.log_softmax", "torch.cat", "torch.nn.LSTM", "numpy.sqrt", "torch.nn.Conv2d", "torch.sum", "torch.exp", "torch.nn.Linear", "torch.nn.init.kaiming_uniform_", "torch.log", "torch.nn.Leaky...
cdawei/stellargraph
[ "53206a0bf133b47261d5f96f5325aa72ad424138", "53206a0bf133b47261d5f96f5325aa72ad424138", "60edf4a6268f29b49b7c768c382e235af4108506" ]
[ "tests/core/test_utils.py", "stellargraph/data/explorer.py", "tests/data/test_epgm.py" ]
[ "# -*- coding: utf-8 -*-\n#\n# Copyright 2018-2019 Data61, CSIROß\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 req...
[ [ "scipy.eye", "numpy.linalg.matrix_power", "numpy.array_equal", "numpy.ones" ], [ "numpy.isnan", "numpy.random.RandomState" ], [ "numpy.unique" ] ]
hofbi/vibromaf
[ "7678042d18fa3b4ab006283bdbd1b1cc6d84e822", "7678042d18fa3b4ab006283bdbd1b1cc6d84e822", "7678042d18fa3b4ab006283bdbd1b1cc6d84e822" ]
[ "examples/evaluate_wav.py", "vibromaf/util/matlab.py", "vibromaf/util/common.py" ]
[ "\"\"\"Example to evaluate WAV files\"\"\"\n\nimport sys\nfrom argparse import ArgumentDefaultsHelpFormatter, ArgumentParser, FileType\nfrom pathlib import Path\n\nfrom scipy.io import wavfile\n\n# This is to make the local vibromaf package available\ntry:\n sys.path.append(str(Path(__file__).absolute().parents[...
[ [ "scipy.io.wavfile.read" ], [ "numpy.split" ], [ "numpy.corrcoef", "sklearn.metrics.mean_squared_error" ] ]
agamemnonc/sklearn-ext
[ "1a3a55f36bf0398d175fb2660a0eeff032c6c522", "1a3a55f36bf0398d175fb2660a0eeff032c6c522" ]
[ "sklearn_ext/discriminant_analysis.py", "sklearn_ext/tests/test_discriminant_analysis.py" ]
[ "\"\"\"\nRegularized Discriminant Analysis\n\"\"\"\n\nimport warnings\n\nimport numpy as np\n\nfrom sklearn.base import BaseEstimator, ClassifierMixin\nfrom sklearn.covariance import ledoit_wolf, empirical_covariance\nfrom sklearn.covariance import shrunk_covariance\nfrom sklearn.utils import check_array, check_X_y...
[ [ "numpy.array", "numpy.dot", "numpy.log", "numpy.linalg.svd", "sklearn.utils.validation.check_is_fitted", "sklearn.utils.check_X_y", "numpy.diag", "numpy.unique", "numpy.asarray", "sklearn.utils.check_array", "sklearn.utils.multiclass.check_classification_targets", "...
danhey/exoplanet
[ "bc82756dfa1b084e82cbcfa6185800833415e847", "bc82756dfa1b084e82cbcfa6185800833415e847" ]
[ "src/exoplanet/light_curves/interpolated.py", "tests/light_curves_test.py" ]
[ "# -*- coding: utf-8 -*-\n\n__all__ = [\"InterpolatedLightCurve\"]\n\nimport aesara_theano_fallback.tensor as tt\nimport numpy as np\n\n\ndef interp(n, x, xmin, xmax, dx, func):\n \"\"\"One-dimensional regularly spaced cubic interpolation\n\n Args:\n n (int): The axis of the output that should be inter...
[ [ "numpy.atleast_1d" ], [ "numpy.allclose", "numpy.linspace", "numpy.sqrt", "numpy.degrees", "numpy.zeros_like", "numpy.shape", "numpy.mean", "numpy.testing.assert_allclose", "numpy.float64", "numpy.array" ] ]
tknapen/pearl_3T
[ "5e199973002766349b7eb13a04dafe62827f34ec" ]
[ "pearl/stop/roi.py" ]
[ "from __future__ import division, print_function\n\n# def prepare_mcf_data(in_mcf_data):\n\n# np.hstack(np.vstack([np.zeros(in_mcf_data.shape[0]), np.diff(in_mcf_data)])\n\n# return \n\n\ndef fit_FIR_roi(experiment,\n h5_file,\n in_files,\n vol_regressor_list, \n...
[ [ "matplotlib.pyplot.legend", "numpy.hstack", "matplotlib.pyplot.tight_layout", "numpy.dot", "numpy.nan_to_num", "matplotlib.pyplot.plot", "numpy.loadtxt", "numpy.array", "numpy.sum", "numpy.vstack", "matplotlib.pyplot.figure" ] ]
ehsanasgari/1000langs
[ "6a6b745c1094581cd95e992e6be4e06967426570" ]
[ "run_crawler/lang1000.py" ]
[ "import sys\n\nsys.path.append('../')\nfrom utility.visualization_utility import methods2venn2\nimport pandas as pd\nimport numpy as np\nfrom metaAPI.metadata import getMassiveparallel_meta\nfrom bdpAPI.bdpAPI import BDPAPl\nfrom bibleCLOUDAPI.biblecloudAPI import BibleCloudAPl\nfrom biblePNGAPI.pngAPI import PNGAP...
[ [ "pandas.read_table", "numpy.mean", "pandas.DataFrame", "pandas.ExcelWriter" ] ]
google/multi-task-architecture-search
[ "f75c0b4893b3c6ac897bc05c84096ee3eb93d79f" ]
[ "train/distill.py" ]
[ "# Copyright 2019 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
[ [ "numpy.array", "torch.nn.CrossEntropyLoss", "torch.max", "torch.nn.MSELoss" ] ]
CU-NESS/pylinex
[ "b6f342595b6a154e129eb303782e5268088f34d5", "b6f342595b6a154e129eb303782e5268088f34d5", "b6f342595b6a154e129eb303782e5268088f34d5", "b6f342595b6a154e129eb303782e5268088f34d5" ]
[ "pylinex/basis/TrainingSetPlot.py", "pylinex/model/OutputInterpolatedModel.py", "pylinex/model/ExpandedModel.py", "pylinex/model/DirectSumModel.py" ]
[ "\"\"\"\nFile: pylinex/basis/TrainingSetPlot.py\nAuthor: Keith Tauscher\nDate: 22 Feb 2019\n\nDescription: File containing a function which plots a three panel figure\n summarizing a given training set.\n\"\"\"\nimport numpy as np\nimport matplotlib.pyplot as pl\nfrom .TrainedBasis import TrainedBasis\n...
[ [ "numpy.arange", "matplotlib.pyplot.show", "numpy.mean", "matplotlib.pyplot.figure" ], [ "numpy.all", "numpy.array" ], [ "numpy.ones_like" ], [ "numpy.ones_like", "scipy.linalg.block_diag", "numpy.ones", "numpy.concatenate", "numpy.zeros" ] ]
AlexSath/prodivis
[ "a0061ee54e09721da4e3f4fe0af4a2b6dec81383" ]
[ "scripts/norm_heatmap.py" ]
[ "import os\r\nimport cv2\r\nimport matplotlib.pyplot as plt\r\nimport tools\r\nimport normalize\r\nimport numpy as np\r\nimport argparse\r\nimport sys\r\nimport warnings\r\n\r\n\"\"\"\r\nFilename: norm_heatmap.py\r\nAuthor: Alexandre R. Sathler\r\nDate: 05/04/2022\r\nDescription: Primary interface file users intera...
[ [ "numpy.asarray", "numpy.tile", "numpy.mean", "numpy.nanmean", "numpy.floor", "numpy.zeros", "matplotlib.pyplot.figure" ] ]