repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
WangChen0902/FRSKD-Paddle | [
"d7e8313be6f7785e64a35623074271288d6c57aa"
] | [
"segmentation/utils/efficientdet.py"
] | [
"from efficientnet_pytorch import EfficientNet\nimport torch.nn as nn\nimport torch\nimport torch.nn.functional as F\nfrom .BiFPN import BiFPNSeg\n\n\nclass EfficientDet(nn.Module):\n def __init__(self, backbone=\"efficientnet-b0\"):\n super(EfficientDet, self).__init__()\n model = EfficientNet.fro... | [
[
"torch.nn.functional.upsample",
"torch.nn.Sequential",
"torch.nn.Conv2d",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
]
] |
lw0517/transferlearning | [
"17583db86db19709ff483a24590f0d5b88e25fe5"
] | [
"code/traditional/SFA.py"
] | [
"import sys\nimport math\nimport numpy as np\nimport scipy.io as sio\nimport scipy.sparse as sp\nfrom scipy.sparse.linalg import svds as SVD\nfrom sklearn import svm\nfrom sklearn.metrics import accuracy_score\n\n\nclass SFA:\n '''\n spectrual feature alignment\n '''\n\n def __init__(self, l=500, K=100,... | [
[
"numpy.reshape",
"sklearn.metrics.accuracy_score",
"numpy.matmul",
"numpy.linalg.norm",
"numpy.concatenate",
"numpy.intersect1d",
"sklearn.svm.SVC",
"numpy.zeros",
"numpy.sum",
"scipy.sparse.lil_matrix"
]
] |
Jayanth-kumar5566/CAMEB2-machine-learning | [
"36678cb55f15b75094fa097963ad4661a21b92d8"
] | [
"pipeline_wilcoxon.py"
] | [
"#!/usr/bin/env python3\n\n# Single pipeline to run all the analysis\nimport sys\nimport os\nimport pandas\nfrom joblib import Parallel, delayed\n\nargs=sys.argv\n\n'''\nRun as:\n\t./pipeline_wilcoxon.py dataset alpha dimension_reduction ml_algo param_dimred param_ml\n\ndataset:\n\tI - clinical attributes\n\tII ... | [
[
"pandas.read_csv"
]
] |
deepang17/pandas | [
"bf31347a1e82ac5e17b4d515b07e16aae738e60b"
] | [
"pandas/core/tools/datetimes.py"
] | [
"from __future__ import annotations\n\nfrom collections import abc\nfrom datetime import datetime\nfrom functools import partial\nfrom itertools import islice\nfrom typing import (\n TYPE_CHECKING,\n Callable,\n Hashable,\n List,\n Optional,\n Tuple,\n TypeVar,\n Union,\n overload,\n)\nim... | [
[
"pandas._libs.tslibs.conversion.datetime_to_datetime64",
"pandas.core.indexes.datetimes.DatetimeIndex",
"pandas.core.dtypes.common.is_datetime64_ns_dtype",
"pandas.Series",
"pandas._libs.tslibs.Timestamp",
"pandas._libs.tslibs.Timestamp.min.to_julian_date",
"numpy.asarray",
"pandas... |
adityamangal410/nlp_with_pytorch | [
"81919102339ee483210f366aeaec0dd30273a846",
"81919102339ee483210f366aeaec0dd30273a846"
] | [
"scripts/3.3-am-pl-rnn-glove-disaster-tweets.py",
"scripts/2.0-am-pl-mlp-house-prices.py"
] | [
"from argparse import ArgumentParser\n\nimport sh\nimport torch.nn\nfrom sklearn.metrics import f1_score, accuracy_score, roc_auc_score\n\nfrom disaster_tweets_data_module import *\n\n\n# sh.rm('-r', '-f', 'lightning_logs/disaster_tweets_rnn_glove')\n\n\nclass DisasterTweetsClassifierRNN(pl.LightningModule):\n\n ... | [
[
"sklearn.metrics.roc_auc_score",
"sklearn.metrics.f1_score",
"sklearn.metrics.accuracy_score"
],
[
"pandas.read_csv",
"torch.utils.data.DataLoader",
"torch.tensor",
"torch.nn.Linear",
"sklearn.preprocessing.StandardScaler",
"torch.nn.MSELoss"
]
] |
googlearchive/rgc-models | [
"0dea94bbd54f591d82d95169e33d40bb55b6be94",
"0dea94bbd54f591d82d95169e33d40bb55b6be94",
"0dea94bbd54f591d82d95169e33d40bb55b6be94",
"0dea94bbd54f591d82d95169e33d40bb55b6be94",
"0dea94bbd54f591d82d95169e33d40bb55b6be94"
] | [
"response_model/python/metric_learning/end_to_end/data_util.py",
"response_model/python/metric_learning/score_fcns/mlnn_slim.py",
"response_model/python/metric_learning/end_to_end/s_r_embedding_multiple_retina.py",
"response_model/python/population_subunits/coarse/analysis/few_cells_tf_analyse_roc.py",
"res... | [
"# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed t... | [
[
"numpy.sqrt",
"numpy.squeeze",
"numpy.max",
"numpy.int",
"tensorflow.python.platform.gfile.Exists",
"numpy.mean",
"tensorflow.python.platform.gfile.IsDirectory",
"numpy.where",
"numpy.double",
"numpy.unique",
"numpy.arange",
"scipy.io.loadmat",
"tensorflow.pytho... |
agatak8/AAL-GraphTriangles | [
"3d738e38bef840abd9a50aa68182db6d4be32ab6"
] | [
"algorithms/solvers.py"
] | [
"# Agata Kłoss\n# znalezienie liczby trójkątów w grafie\n\nimport algorithms.graph as graph\nimport numpy as np\n\n\n# O(n^5)\ndef naive(vertices, edges, only_count=False):\n def has_edge(i, j, edges):\n for edge in edges:\n if (edge[0] == i and edge[1] == j) or (edge[0] == j and edge[1] == i):... | [
[
"numpy.zeros"
]
] |
thecho7/faster-rcnn.pytorch | [
"9cebac3d519f3a1deea4c9d2b2fe9b138cb99f44"
] | [
"lib/model/rpn/generate_anchors.py"
] | [
"from __future__ import print_function\n# --------------------------------------------------------\n# Faster R-CNN\n# Copyright (c) 2015 Microsoft\n# Licensed under The MIT License [see LICENSE for details]\n# Written by Ross Girshick and Sean Bell\n# --------------------------------------------------------\n\nimpo... | [
[
"numpy.hstack",
"numpy.array",
"numpy.arange"
]
] |
bmj-hackathon/hack_sfpd2 | [
"23fcce244c3f430413811e388a293e87b95a8df2",
"23fcce244c3f430413811e388a293e87b95a8df2"
] | [
"03 scripts/02 Plotting Kernel Density.py",
"03 scripts/00 Superceded/03 Model Fitting r00.py"
] | [
"\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nimport pickle\nimport matplotlib\n\n#%% SF Map\n# Supplied map bounding box:\n# ll.lon ll.lat ur.lon ur.lat\n# -122.52469 37.69862 -122.33663 37.82986\nPATH_MAP = \"/home/batman/git/hack_sfpd/INPUT/sf... | [
[
"matplotlib.pyplot.savefig",
"numpy.loadtxt",
"matplotlib.pyplot.figure"
],
[
"sklearn.ensemble.RandomForestRegressor",
"matplotlib.pyplot.title",
"numpy.random.seed",
"sklearn.linear_model.SGDRegressor",
"pandas.DataFrame",
"sklearn.ensemble.GradientBoostingRegressor",
... |
greenatom21/greenatom | [
"089bf1c7f8819dd0d8a151c2006b42f09da93fa1"
] | [
"app/main/routes.py"
] | [
"from datetime import datetime\nfrom flask import render_template, flash, redirect, url_for, request, g, \\\n jsonify, current_app\nfrom flask_login import current_user, login_required\nfrom flask_babel import _, get_locale\nfrom guess_language import guess_language\nfrom app import db\nfrom app.main.forms impor... | [
[
"numpy.array"
]
] |
MHersche/HDembedding-BCI | [
"d815dd75c326114da11f0fc2e0acc6da67d10d74",
"d815dd75c326114da11f0fc2e0acc6da67d10d74"
] | [
"hd_utils/nn_trainer3.py",
"hd_utils/HD_Kmeans.py"
] | [
"#!/usr/bin/env python3\n\nfrom __future__ import print_function\nimport argparse\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\nimport numpy as np\nfrom sklearn.svm import LinearSVC,SVC\n\nimport sys, os\nfrom model1 import Net\n\n\nclass proj_trainer_end_end:\n... | [
[
"torch.manual_seed",
"torch.ShortTensor",
"torch.from_numpy",
"torch.no_grad",
"numpy.floor"
],
[
"torch.add",
"numpy.array_equal",
"numpy.random.choice",
"numpy.min",
"torch.ShortTensor",
"torch.sum",
"numpy.var",
"numpy.ones",
"torch.numel",
"numpy... |
ishidaira233/TX-Credit-Assessement | [
"289f230a609554db32552670c300f992a3fe068f",
"289f230a609554db32552670c300f992a3fe068f"
] | [
"variableProcessing/BFSVM_class/LS_FSVM.py",
"variableProcessing/Kernel.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Apr 1 22:46:20 2020\n@author: zinan\n\"\"\"\n\nimport numpy as np\nfrom numpy import linalg as LA\nfrom BFSVM_class import Kernel\nfrom BFSVM_class import precision\nfrom imblearn.over_sampling import SVMSMOTE\nimport math\nfrom sklearn.model... | [
[
"numpy.matrix",
"numpy.dot",
"numpy.linalg.solve",
"numpy.multiply",
"numpy.asarray",
"numpy.eye",
"sklearn.model_selection.train_test_split",
"numpy.linalg.norm",
"numpy.ones",
"numpy.concatenate",
"numpy.exp",
"numpy.append",
"numpy.mean",
"numpy.savetxt",... |
Jf-Chen/FRN-main | [
"5b57b9e0d7368058a8e3ba41a53c460b54ab9b91",
"5b57b9e0d7368058a8e3ba41a53c460b54ab9b91"
] | [
"models/Proto.py",
"experiments/CUB_fewshot_cropped/Proto/Conv-4_1-shot/test.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torchvision.models as torch_models\nimport numpy as np\nfrom .backbones import Conv_4,ResNet\n\ndef pdist(x,y):\n '''\n Input: x is a Nxd matrix\n y is an optional Mxd matirx\n Output: dist is a NxM matrix where dist[i,... | [
[
"torch.mean",
"torch.transpose",
"torch.mm",
"torch.max",
"torch.nn.functional.log_softmax",
"torch.FloatTensor"
],
[
"torch.no_grad",
"torch.cuda.set_device"
]
] |
tanelk/spark | [
"544865db77d942fbbeabde96e644c98a892d5045"
] | [
"python/pyspark/pandas/tests/test_dataframe_spark_io.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.concat",
"pandas.read_excel",
"numpy.random.choice",
"numpy.arange",
"pandas.read_parquet",
"numpy.random.rand",
"pandas.ExcelWriter"
]
] |
robertofratello/keras-tensorflow2.0compat | [
"09cf58de0b64b347fcbd06f30096528350dd47e6"
] | [
"keras/backend/tensorflow_backend.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport tensorflow.compat.v1 as tf\ntf.disable_eager_execution()\nfrom tensorflow.python.framework import ops as tf_ops\nfrom tensorflow.python.training import moving_averages\nfrom tensorflow.python.op... | [
[
"tensorflow.compat.v1.assign_sub",
"tensorflow.compat.v1.reduce_all",
"tensorflow.compat.v1.foldr",
"tensorflow.compat.v1.nn.elu",
"tensorflow.compat.v1.eye",
"tensorflow.compat.v1.image.resize_nearest_neighbor",
"tensorflow.python.ops.ctc_ops.ctc_loss",
"tensorflow.compat.v1.nn.sp... |
mweiss17/transformers | [
"ae88d5adc89a2020c21d62481e98f058f91784aa"
] | [
"src/transformers/trainer.py"
] | [
"# coding=utf-8\n# Copyright 2020-present the HuggingFace Inc. team.\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# Unles... | [
[
"torch.load",
"torch.cat",
"torch.utils.data.DataLoader",
"torch.cuda.random.get_rng_state_all",
"torch.cuda.amp.autocast",
"numpy.concatenate",
"torch.no_grad",
"torch.cuda.is_available",
"torch.Generator",
"torch.utils.data.distributed.DistributedSampler",
"torch.dist... |
kapikantzari/MultiBench | [
"44ab6ea028682040a0c04de68239ce5cdf15123f",
"44ab6ea028682040a0c04de68239ce5cdf15123f",
"44ab6ea028682040a0c04de68239ce5cdf15123f",
"44ab6ea028682040a0c04de68239ce5cdf15123f",
"44ab6ea028682040a0c04de68239ce5cdf15123f",
"44ab6ea028682040a0c04de68239ce5cdf15123f",
"44ab6ea028682040a0c04de68239ce5cdf15123... | [
"deprecated/examples_robust/multimedia/avmnist_unimodal_1_robust.py",
"deprecated/dataloaders/mimic/get_data.py",
"deprecated/dataloaders/affect/humor_dataset.py",
"deprecated/robustness_tests_draft.py",
"deprecated/examples_robust/affect/mosi_early_fusion_robust.py",
"examples/hci/enrico_unimodal_1.py",
... | [
"from unimodals.common_models import LeNet, MLP, Constant\nimport torch\nfrom torch import nn\nfrom datasets.avmnist.get_data_robust import get_dataloader\nfrom training_structures.unimodal import train, test\nimport sys\nimport os\nsys.path.append(os.path.dirname(os.path.dirname(os.getcwd())))\n\nfilename_encoder ... | [
[
"torch.load"
],
[
"numpy.isnan",
"torch.utils.data.DataLoader",
"numpy.std",
"numpy.average",
"numpy.isinf"
],
[
"numpy.concatenate",
"numpy.array",
"torch.FloatTensor",
"numpy.zeros"
],
[
"numpy.random.choice",
"numpy.arange",
"numpy.random.random_s... |
mehsoy/walltime-prediction-tools | [
"23e382b3d4a6c10b7ce05cefa99b8917c515f3b6",
"23e382b3d4a6c10b7ce05cefa99b8917c515f3b6",
"23e382b3d4a6c10b7ce05cefa99b8917c515f3b6"
] | [
"helpers/tools.py",
"results-collection/tpot-collection/DAS2-fs2-2003-1.swf.gz.tpot.py",
"results-collection/tpot-collection/CTC-SP2-1995-2.swf.gz.tpot.py"
] | [
"import glob, os\nimport pandas as pd\nimport numpy as np\nfrom sklearn.model_selection import train_test_split\n\ndef get_initial_df(workload):\n filename = \"workloads/\" + workload\n #if workload == \"SDSC\":\n # filename = \"workloads/SDSC.swf\"\n #if workload == \"CTC\":\n # filename = \... | [
[
"numpy.square",
"pandas.read_csv",
"pandas.to_datetime",
"numpy.abs",
"numpy.nonzero",
"sklearn.model_selection.train_test_split",
"numpy.mean",
"numpy.diff",
"numpy.array"
],
[
"pandas.read_csv",
"sklearn.tree.DecisionTreeRegressor",
"sklearn.linear_model.Elast... |
abitrolly/lightwood | [
"ee0c095f594c5d491196401b59344702f346bc9c"
] | [
"lightwood/encoders/image/helpers/img_to_vec.py"
] | [
"import torch\r\nimport torch.nn as nn\r\nimport torchvision.models as models\r\nimport torchvision.transforms as transforms\r\n\r\nclass ChannelPoolAdaptiveAvg1d(torch.nn.AdaptiveAvgPool1d):\r\n def forward(self, input):\r\n n, c = input.size()\r\n input = input.view(n,c,1).permute(0,2,1)\r\n ... | [
[
"torch.nn.functional.adaptive_avg_pool1d",
"torch.device",
"torch.zeros"
]
] |
puat133/MCMC-MultiSPDE | [
"2beca39f32c0cdd7664baeacd495b193850d8e7d"
] | [
"Legacy/optimizerTest.py"
] | [
"import numpy as np\nimport numba as nb\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nimport importlib\n# from numba.typed import List\n# from numba.typed import List\nimport mcmc.util as util\nimport mcmc.fourier as fourier\nimport mcmc.L as L\nimport mcmc.layer as layer\nimport mcmc.randomGenerator as ... | [
[
"numpy.diag",
"numpy.sqrt",
"numpy.concatenate",
"numpy.linalg.lstsq",
"numpy.random.randn",
"matplotlib.pyplot.show",
"numpy.zeros",
"numpy.vstack",
"matplotlib.pyplot.figure"
]
] |
vikatelis/baselines | [
"668abf167f54317dca7795588c61f1055a4d017f"
] | [
"baselines/a2c/utils.py"
] | [
"import os\nimport numpy as np\nimport tensorflow as tf\nfrom collections import deque\n\ndef sample(logits):\n noise = tf.random_uniform(tf.shape(logits))\n return tf.argmax(logits - tf.log(-tf.log(noise)), 1)\n\ndef cat_entropy(logits):\n a0 = logits - tf.reduce_max(logits, 1, keepdims=True)\n ea0 = t... | [
[
"tensorflow.concat",
"tensorflow.reduce_sum",
"tensorflow.stack",
"tensorflow.tanh",
"numpy.mean",
"tensorflow.nn.conv2d",
"numpy.linalg.svd",
"numpy.reshape",
"tensorflow.nn.moments",
"tensorflow.squeeze",
"tensorflow.square",
"tensorflow.trainable_variables",
... |
PoCFrance/security-pool-2018 | [
"acabc082808ade8ceccc395736a337059c0650de"
] | [
"ai/corrections/ml_d01/ex04.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\n\nx = np.linspace(-5, 3, 30)\ny = 1 + np.exp(-x)\nplt.xlim(-5, 3)\nplt.plot(x, y)\nplt.show()\n"
] | [
[
"numpy.linspace",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlim",
"numpy.exp",
"matplotlib.pyplot.show"
]
] |
ethem-kinginthenorth/cloud-ml-examples | [
"e434d2bdbf2adf058dc436f992a56585537dc8ab"
] | [
"gcp/docker/infrastructure/rapids_lib.py"
] | [
"# os\nimport sys, os, time, logging\n\n# CPU DS stack\nimport pandas as pd\nimport numpy as np\nimport sklearn\n\n# GPU DS stack [ rapids ]\nimport gcsfs\n\n# scaling library\nimport dask\n\n# data ingestion [ CPU ]\nfrom pyarrow import orc as pyarrow_orc\n\n# ML models\nfrom sklearn import ensemble\nimport xgboos... | [
[
"numpy.array",
"pandas.read_csv",
"sklearn.model_selection.train_test_split"
]
] |
migkapa/lanefinding | [
"48a86986e72c063eaa8e49139f63cc0c0d2de916"
] | [
"P1.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\n# # Self-Driving Car Engineer Nanodegree\n# \n# \n# ## Project: **Finding Lane Lines on the Road** \n# ***\n# In this project, you will use the tools you learned about in the lesson to identify lane lines on the road. You can develop your pipeline on a series of individua... | [
[
"matplotlib.pyplot.imshow",
"numpy.polyfit",
"matplotlib.image.imread",
"numpy.zeros_like",
"numpy.array",
"numpy.zeros",
"matplotlib.pyplot.show"
]
] |
sdjsngs/Cross-Epoch-Learning-for-Weakly-Supervised-Anomaly-Detection-in-Surveillance-Videos | [
"f734db8d440f2974cb6b4234b30da6856ef62ce3"
] | [
"net/dataset/loader.py"
] | [
"\"\"\"\nload dataset\n\"\"\"\nimport torch\nfrom torch.utils.data import DataLoader\nfrom .build import build_dataset\n\n\ndef construct_loader(mode,cfg,):\n \"\"\"\n consturct data loader\n :param cfg:\n :param mode:\n :return:\n \"\"\"\n assert mode in [\"train\",\"test\",\"update_epoch\"]... | [
[
"torch.utils.data.DataLoader"
]
] |
Qointum/pypy | [
"c0ed88efbc135a75a535f4534ca1f3baf0bf39d8"
] | [
"pypy/module/micronumpy/test/test_flagsobj.py"
] | [
"from pypy.module.micronumpy.test.test_base import BaseNumpyAppTest\n\n\nclass AppTestFlagsObj(BaseNumpyAppTest):\n def test_init(self):\n import numpy as np\n a = np.array([1,2,3])\n assert a.flags['C'] is True\n b = type(a.flags)()\n assert b is not a.flags\n assert b[... | [
[
"numpy.array",
"numpy.int32"
]
] |
NatLee/models | [
"0c9253b4a0b34935cf78bd13e6520bbeee2f5f92"
] | [
"official/core/base_task.py"
] | [
"# Copyright 2021 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.io.gfile.isdir",
"tensorflow.train.latest_checkpoint",
"tensorflow.constant",
"tensorflow.train.Checkpoint",
"tensorflow.distribute.get_strategy",
"tensorflow.add_n",
"tensorflow.GradientTape"
]
] |
WillAdams-afk/Corona | [
"04f28216deca8856eea0c796f214735ad9726866",
"04f28216deca8856eea0c796f214735ad9726866"
] | [
"scripts/adjust_regional_meta.py",
"scripts/add_priorities_to_meta.py"
] | [
"\"\"\"\r\nAdd column to metadata to denote 'focal' samples based on supplied region\r\nRewrite location, division and country for non-focal samples to be region\r\nRewrite division_exposure and country_exposure for non-focal samples to be region_exposure\r\n\"\"\"\r\n\r\nimport argparse\r\nimport pandas as pd\r\n\... | [
[
"pandas.read_csv"
],
[
"pandas.read_csv"
]
] |
AIDEmeProject/AIDEme-Web | [
"1a802a19edf03b8fddcea950ff91e749283e7d18"
] | [
"api/src/routes/create_labeled_set.py"
] | [
"# Copyright 2019 École Polytechnique\n#\n# Authorship\n# Luciano Di Palma <luciano.di-palma@polytechnique.edu>\n# Enhui Huang <enhui.huang@polytechnique.edu>\n# Le Ha Vy Nguyen <nguyenlehavy@gmail.com>\n# Laurent Cetinsoy <laurent.cetinsoy@gmail.com>\n#\n# Disclaimer\n# THE SOFTWARE IS PROVIDED \... | [
[
"numpy.prod"
]
] |
ttk21/lab_04 | [
"b9c2f8f941c76218b4c0fd7ad1580e844c4c0104"
] | [
"ex2-map-estimation.py"
] | [
"import numpy as np\nimport visgeom as vg\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport scipy.linalg\nfrom pylie import SO3, SE3\nfrom optim import gauss_newton\n\n\"\"\"Example 2 - MAP estimation\"\"\"\n\n\nclass NoisyPointAlignmentBasedPoseEstimatorObjective:\n \"\"\"Implements linearisation of t... | [
[
"numpy.printoptions",
"numpy.linalg.inv",
"matplotlib.use",
"matplotlib.pyplot.draw",
"matplotlib.pyplot.axes",
"numpy.random.randn",
"matplotlib.pyplot.waitforbuttonpress",
"numpy.array",
"numpy.zeros",
"matplotlib.pyplot.figure"
]
] |
thunderhoser/WaveTF | [
"6e3f2b04334a0a51476ad316e6d97965ce009f4b"
] | [
"wavetf/_haar_conv.py"
] | [
"# Copyright 2020 CRS4 (http://www.crs4.it/)\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.transpose",
"tensorflow.concat",
"tensorflow.constant",
"tensorflow.reshape",
"tensorflow.cast",
"tensorflow.nn.conv1d"
]
] |
martijnberger/OpenGL-tests | [
"cd259d923a70c22566fa3dc140764b409181cfc5"
] | [
"pyglfw/test-opengl-2.1.py"
] | [
"__author__ = 'Martijn Berger'\n\nimport OpenGL.GL as gl\nimport numpy as np\nimport ctypes\nimport glfw\n\nNULL = ctypes.c_void_p(0)\n\nvertex_data = np.array([-1,-1, -1,+1, +1,-1, +1,+1 ], dtype=np.float32)\n\ncolor_data = np.array([1,0,0,1, 0,1,0,1, 0,0,1,1, 1,1,0,1], dtype=np.float32)\n\ndef main():\n # Ini... | [
[
"numpy.array"
]
] |
dariovins/pandas | [
"ea2e26ae7d700d7fd363ea5bfc05d2fe3fb8a5ee"
] | [
"pandas/core/indexes/range.py"
] | [
"from datetime import timedelta\nimport operator\nfrom sys import getsizeof\nfrom typing import Optional, Union\nimport warnings\n\nimport numpy as np\n\nfrom pandas._libs import index as libindex\nimport pandas.compat as compat\nfrom pandas.compat.numpy import function as nv\nfrom pandas.util._decorators import Ap... | [
[
"numpy.asarray",
"numpy.dtype",
"pandas.core.indexes.base.Index",
"numpy.concatenate",
"pandas.core.ops.common.unpack_zerodim_and_defer",
"pandas.core.common.any_not_none",
"numpy.arange",
"pandas.core.common.all_none",
"pandas.compat.set_function_name",
"pandas.core.indexe... |
vlad17/timedime | [
"90473c3026e040c02a1775325aed0cffa2b77da8"
] | [
"timefly/tags.py"
] | [
"\"\"\"\nHandling for the tags from calendar events.\n\"\"\"\n\nimport pandas as pd\n\n\ndef explode(df, min_support_count=None):\n \"\"\"\n Given a dataframe with a tags column that contains an iterable of tags,\n creates a new dataframe containing the (sparse) binary\n columns for each tag. The index ... | [
[
"pandas.Series"
]
] |
yohan-pg/stylegan2-ada-pytorch | [
"e1225b08d55ff5ca38e1646fa430d3c3c3bb3c68"
] | [
"torch_utils/training_stats.py"
] | [
"# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.\n#\n# NVIDIA CORPORATION and its licensors retain all intellectual property\n# and proprietary rights in and to this software, related documentation\n# and any modifications thereto. Any use, reproduction, disclosure or\n# distribution of this softwa... | [
[
"numpy.square",
"torch.zeros",
"torch.zeros_like",
"torch.stack",
"torch.device",
"torch.distributed.all_reduce",
"torch.ones_like",
"torch.as_tensor"
]
] |
bartholmberg/OpenVINO-YoloV3 | [
"7ea554d34880dfe86b2318938dd6b4a0aaf00979"
] | [
"pbmodels/tensorboard_log_output_yolov3.py"
] | [
"import tensorflow as tf\nfrom tensorflow.python.platform import gfile\n\nwith tf.Session() as sess:\n model_filename =\"frozen_yolo_v3.pb\"\n with gfile.FastGFile(model_filename, \"rb\") as f:\n graph_def = tf.GraphDef()\n graph_def.ParseFromString(f.read())\n g_in = tf.import_graph_def(... | [
[
"tensorflow.import_graph_def",
"tensorflow.summary.FileWriter",
"tensorflow.Session",
"tensorflow.python.platform.gfile.FastGFile",
"tensorflow.GraphDef"
]
] |
jianlingzhong/xonsh | [
"42e2d792117ceeb0ab7ec8f92fb1177b21388f84"
] | [
"xontrib/mplhooks.py"
] | [
"\"\"\"Matplotlib hooks, for what its worth.\"\"\"\nfrom io import BytesIO\nimport shutil\n\nimport numpy as np\nimport matplotlib\nimport matplotlib.pyplot as plt\n\nfrom xonsh.tools import print_color, ON_WINDOWS\n\ntry:\n # Use iterm2_tools as an indicator for the iterm2 terminal emulator\n from iterm2_too... | [
[
"matplotlib.rcParams.update",
"matplotlib.pyplot.gcf"
]
] |
laurens-in/magenta | [
"cf80d19fc0c2e935821f284ebb64a8885f793717",
"cf80d19fc0c2e935821f284ebb64a8885f793717",
"cf80d19fc0c2e935821f284ebb64a8885f793717"
] | [
"magenta/interfaces/midi/midi_hub_test.py",
"magenta/music/chord_symbols_lib_test.py",
"magenta/models/arbitrary_image_stylization/nza_model.py"
] | [
"# Copyright 2019 The Magenta Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law o... | [
[
"tensorflow.compat.v1.test.main"
],
[
"tensorflow.compat.v1.test.main"
],
[
"tensorflow.compat.v1.constant_initializer",
"tensorflow.compat.v1.random_normal_initializer",
"tensorflow.compat.v1.variable_scope"
]
] |
gvvynplaine/sonnet | [
"5a465696383f967d5bffb6599347d9e6c15cef4b",
"5a465696383f967d5bffb6599347d9e6c15cef4b",
"5a465696383f967d5bffb6599347d9e6c15cef4b"
] | [
"sonnet/src/leaky_clip_by_value_test.py",
"sonnet/src/dropout.py",
"sonnet/src/test_utils.py"
] | [
"# Copyright 2019 The Sonnet 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 required ... | [
[
"tensorflow.test.main",
"tensorflow.Variable",
"tensorflow.GradientTape"
],
[
"tensorflow.nn.dropout"
],
[
"tensorflow.tpu.experimental.initialize_tpu_system",
"tensorflow.device",
"tensorflow.config.experimental.list_logical_devices"
]
] |
ln0119/tensorflow-fast-rcnn | [
"da88903d5e29230d68d861053aa1dea1432c0696",
"da88903d5e29230d68d861053aa1dea1432c0696",
"da88903d5e29230d68d861053aa1dea1432c0696",
"da88903d5e29230d68d861053aa1dea1432c0696",
"da88903d5e29230d68d861053aa1dea1432c0696",
"da88903d5e29230d68d861053aa1dea1432c0696",
"da88903d5e29230d68d861053aa1dea1432c069... | [
"tensorflow/models/embedding/word2vec.py",
"tensorflow/python/kernel_tests/check_ops_test.py",
"tensorflow/python/training/summary_writer_test.py",
"tensorflow/python/kernel_tests/denormal_test.py",
"tensorflow/python/kernel_tests/tensor_array_ops_test.py",
"tensorflow/examples/skflow/resnet.py",
"tenso... | [
"# Copyright 2015 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 appl... | [
[
"tensorflow.device",
"tensorflow.zeros",
"tensorflow.reduce_sum",
"tensorflow.cast",
"tensorflow.Graph",
"tensorflow.Variable",
"tensorflow.merge_all_summaries",
"tensorflow.gather",
"tensorflow.nn.top_k",
"tensorflow.models.embedding.gen_word2vec.skipgram",
"tensorflow... |
gjunyi90/Machine-Learning-For-Finance | [
"e73c3df3c68d71f671cdde3153988c6c617eba53"
] | [
"Classification Based Machine Learning for Algorithmic Trading/default_predictions/Naive Bayes.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sun Jun 25 22:02:07 2017\n\n@author: Anthony\n\"\"\"\nimport numpy as np\nimport pandas as pd\ndf = pd.read_csv(\"dataset_2.csv\")\n\ndf['default'].describe()\nprint(sum(df['default'] == 0))\nprint(sum(df['default'] == 1))\n\nX = df.iloc[:, 1:6].values\ny = df['default']... | [
[
"pandas.read_csv",
"sklearn.model_selection.cross_val_score",
"sklearn.naive_bayes.GaussianNB",
"sklearn.model_selection.cross_val_predict",
"sklearn.metrics.precision_score",
"sklearn.model_selection.train_test_split",
"sklearn.metrics.confusion_matrix",
"sklearn.preprocessing.Sta... |
0x384c0/Experiments-RL | [
"709f720fbba1d4b15a29fbc6ed80d17852b627f8"
] | [
"keras-rl/dqn_atari.py"
] | [
"from __future__ import division\nimport argparse\n\nfrom PIL import Image\nimport numpy as np\nimport gym\n\nfrom keras.models import Sequential\nfrom keras.layers import Dense, Activation, Flatten, Convolution2D, Permute\nfrom keras.optimizers import Adam\nimport keras.backend as K\n\nfrom rl.agents.dqn import DQ... | [
[
"numpy.array",
"numpy.random.seed",
"numpy.clip"
]
] |
jhykes/rebin | [
"1f106c3a856289c26aaead8c7e08b37a1e88b266"
] | [
"test_rebin.py"
] | [
"\"\"\"\nTesting bebin histogram values.\n\n\"\"\"\nimport numpy as np\nfrom numpy.random import uniform\nfrom numpy.testing import assert_allclose\n\nfrom scipy.interpolate import splrep, splint\n\nimport uncertainties.unumpy as unp\n\nimport rebin\nfrom bounded_splines import BoundedUnivariateSpline, BoundedRectB... | [
[
"numpy.hstack",
"scipy.interpolate.splrep",
"numpy.random.random",
"numpy.linspace",
"numpy.ediff1d",
"numpy.sin",
"numpy.ones",
"scipy.interpolate.splint",
"numpy.diff",
"numpy.testing.assert_allclose",
"numpy.random.uniform",
"numpy.array",
"numpy.zeros"
]
] |
Polarbeartnt/SP-ILC | [
"07c812dfe40461409c9714936190ba1470f91fc3"
] | [
"data180k/multA.py"
] | [
"import numpy as np\nimport os\nfrom PIL import Image\n\nMatrixA = np.loadtxt('../A_8192.txt')\n\nroot = 'selfmadeimg'\nnew_root = 'selfmadetxt'\nfolders = ['2']\n\nif not os.path.exists(new_root):\n os.mkdir(new_root)\n\ncnt = 0\nfor folder in folders:\n if not os.path.exists('%s/%s'%(new_root, folder)):\n ... | [
[
"numpy.reshape",
"numpy.transpose",
"numpy.savetxt",
"numpy.array",
"numpy.loadtxt"
]
] |
nolaurence/mlflow | [
"2e8a3c53a3657f92cf23b5508f537abd6c2d71f4"
] | [
"mlflow/models/evaluation/base.py"
] | [
"from typing import Dict, Union, Any\nimport mlflow\nimport hashlib\nimport json\nimport os\nfrom contextlib import contextmanager\nfrom mlflow.exceptions import MlflowException\nfrom mlflow.utils.file_utils import TempDir\nfrom mlflow.entities import RunTag\nfrom mlflow.tracking.artifact_utils import _download_art... | [
[
"pandas.util.hash_pandas_object",
"numpy.array",
"numpy.array_equal"
]
] |
MajesticKhan/adanet | [
"574d3dc8b3a531830f6870ffa223317890c20d2e"
] | [
"adanet/core/estimator_distributed_test.py"
] | [
"\"\"\"Test AdaNet estimator cluster training support.\n\nCopyright 2019 The AdaNet Authors. All Rights Reserved.\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 https://www.apache.... | [
[
"tensorflow.test.main"
]
] |
xSakix/AI_playground | [
"17587583ecfc8fd9e92d9d3f643da6d37ac5cffd",
"17587583ecfc8fd9e92d9d3f643da6d37ac5cffd",
"17587583ecfc8fd9e92d9d3f643da6d37ac5cffd",
"17587583ecfc8fd9e92d9d3f643da6d37ac5cffd"
] | [
"reinforcement_learning/market/market_env_random_agent.py",
"reinforcement_learning/crypto_market_regressor/choose_best_15min_data.py",
"reinforcement_learning/crypto_market/crypto_sklearnclass_agent.py",
"price_seq.py"
] | [
"from reinforcement_learning.market.random_agent import RandomAgent\n\nimport sys\n\nsys.path.insert(0, '../../../etf_data')\nfrom etf_data_loader import load_all_data_from_file2\n\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom datetime import datetime\nimport seaborn as sns\n\n\nde... | [
[
"pandas.read_csv",
"pandas.DataFrame",
"numpy.save",
"numpy.concatenate",
"numpy.warnings.filterwarnings",
"numpy.random.randint"
],
[
"pandas.read_csv",
"pandas.DataFrame",
"numpy.mean",
"numpy.warnings.filterwarnings",
"numpy.array"
],
[
"sklearn.neural_ne... |
eambutu/prototypical-pytorch | [
"4164705ab5808c288349c6113f2a2e2f6f6ea7b1"
] | [
"src/loss_plot.py"
] | [
"# coding=utf-8\nfrom prototypical_batch_sampler import PrototypicalBatchSampler\nfrom omniglot_dataset import OmniglotDataset\nfrom mini_imagenet_dataset import MiniImagenetDataset\nfrom protonet import ProtoNet\nimport torch\nfrom prototypical_loss import prototypical_loss as loss, obtain_mean\nfrom torch.autogra... | [
[
"torch.cuda.manual_seed",
"numpy.random.seed",
"torch.load",
"torch.manual_seed",
"torch.utils.data.DataLoader",
"numpy.random.randn",
"torch.FloatTensor",
"torch.cuda.is_available",
"torch.autograd.Variable"
]
] |
bahp/datablend | [
"f0b69a012af6ea7cedc9210d46b3047d8e0bf504",
"f0b69a012af6ea7cedc9210d46b3047d8e0bf504",
"f0b69a012af6ea7cedc9210d46b3047d8e0bf504",
"f0b69a012af6ea7cedc9210d46b3047d8e0bf504",
"f0b69a012af6ea7cedc9210d46b3047d8e0bf504"
] | [
"datablend/tests/test_widgets.py",
"examples/oucru/oucru-32dx/create_data_fixed.py",
"examples/oucru/oucru-fl/create_data_ccfgs.py",
"datablend/utils/methods.py",
"examples/oucru/oucru-01nva/create_data_ccfgs.py"
] | [
"# Libraries\nimport pytest\nimport pandas as pd\n\n# DataBlend libraries\nfrom datablend.core.blend.template import BlenderTemplate\nfrom datablend.core.widgets.base import BaseWidget\nfrom datablend.core.widgets.format import RenameWidget\nfrom datablend.core.widgets.format import ReplaceWidget\nfrom datablend.co... | [
[
"pandas.DataFrame"
],
[
"pandas.read_excel",
"pandas.ExcelWriter"
],
[
"pandas.read_excel"
],
[
"pandas.concat",
"pandas.to_datetime",
"pandas.DataFrame"
],
[
"pandas.read_excel"
]
] |
Amir-Mehrpanah/RRFLab | [
"0991b7a0c0c977fd25ab3d218ba509db889489ad"
] | [
"windows-mlps-lrsignal/main.py"
] | [
"import torch.nn\nfrom src.model_management import models\nfrom torch import optim\nfrom src import signal_functions, metrics\nfrom ray import tune\nimport numpy as np\nfrom src.model_management.hyperparameter_optimization import optimization_objective\nfrom src.trade_utils import ParallelTrader, Trader\n\nanalysis... | [
[
"numpy.random.randint"
]
] |
michiyasunaga/DrRepair | [
"fb447594149ac4f80fef8ba091373184120019c7"
] | [
"evaluation/spoc/test_spoc.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport csv, os, sys, math, time, random, re\nimport argparse\nimport heapq\nimport subprocess\nfrom enum import Enum\nimport itertools\nimport traceback\nimport json\nimport numpy as np\n\n## for parallel\nfrom joblib import Parallel, delayed\nimport multiprocessin... | [
[
"numpy.arange"
]
] |
assadullah96/mlops-sales-forecasting | [
"83cdda22a15720f8f1cfc98810d1643c7cbeb8cd"
] | [
"sales_forecast/scoring/score.py"
] | [
"\"\"\"\r\nCopyright (C) Microsoft Corporation. All rights reserved.\r\n \r\nMicrosoft Corporation (“Microsoft”) grants you a nonexclusive, perpetual,\r\nroyalty-free right to use, copy, and modify the software code provided by us\r\n(\"Software Code\"). You may not sublicense the Software Code or any use of it\r... | [
[
"numpy.concatenate",
"numpy.array",
"sklearn.preprocessing.MinMaxScaler"
]
] |
AJamesPhillips/cf-python | [
"4631bc4ba3c0cb51dcd18905116440007e291e6b"
] | [
"cf/umread_lib/umfile.py"
] | [
"import os\n\nfrom functools import cmp_to_key\n\nimport numpy\n\nfrom . import cInterface\nfrom .extraData import ExtraDataUnpacker\n\n\nclass UMFileException(Exception):\n pass\n\n\nclass File:\n '''A class for a UM data file that gives a view of the file including\n sets of PP records combined into vari... | [
[
"numpy.dtype"
]
] |
ojipadeson/NLPGNN | [
"b9ecec2c6df1b3e40a54511366dcb6085cf90c34"
] | [
"tests/GNN/nodes_graph_classfication/train_graphsage.py"
] | [
"#! encoding:utf-8\nimport tensorflow as tf\nimport numpy as np\nimport time\nimport sys\nfrom tqdm import tqdm\nfrom nlpgnn.datas import TUDataset\nfrom nlpgnn.metrics import Losess, Metric\nfrom nlpgnn.models import GraphSAGE\nfrom nlpgnn.gnn.utils import merge_batch_graph\nfrom sklearn.metrics import classificat... | [
[
"tensorflow.cast",
"numpy.std",
"numpy.mean",
"tensorflow.optimizers.Adam",
"tensorflow.argmax",
"sklearn.metrics.classification_report",
"tensorflow.GradientTape"
]
] |
uvashisth/Sonification-using-Deep-Learning | [
"a0917e785c35aa5fadcbb258e938c58071b4e482"
] | [
"Temporal-Based Approach/generate_music.py"
] | [
"import torch\nimport torch.nn.functional as F\nimport configparser\nimport matplotlib.pyplot as plt\nimport os\nimport numpy as np\nplt.figure(figsize=(20,5))\n\nimport ast\n\nimport sys\n#to import parent-level modules\nos.chdir('Temporal-Based Approach')\nsys.path.append('..')\n\n\nfrom model.StackedLSTM import ... | [
[
"torch.cuda.is_available",
"matplotlib.pyplot.figure"
]
] |
StarxSky/TF2_GPT-2 | [
"770dc7bc559be4f24c65e94d4d21bbe1bb00703e"
] | [
"iGPT/Core/Function.py"
] | [
"import torch\r\nimport random\r\nimport numpy as np\r\n\r\nfrom torch.nn import functional as F\r\n\r\n\r\n\r\n# ==============================================\r\n# 设置种子\r\ndef set_seed(seed):\r\n np.random.seed(seed)\r\n random.seed(seed)\r\n torch.manual_seed(seed)\r\n torch.cuda.manual_seed_all(seed... | [
[
"torch.onnx.export",
"torch.nn.functional.softmax",
"numpy.random.seed",
"torch.cat",
"torch.isnan",
"torch.manual_seed",
"torch.randperm",
"torch.multinomial",
"torch.no_grad",
"torch.cuda.manual_seed_all",
"torch.topk"
]
] |
tbloch1/HelioML | [
"ae308b1881bfd08d9dd7add53d304446423a3342"
] | [
"book/_build/jupyter_execute/08/notebook.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\n# # Notebook\n# \n# **Authors:** Colin Small (crs1031@wildcats.unh.edu), Matthew Argall (Matthew.Argall@unh.edu), Marek Petrik (Marek.Petrik@unh.edu)\n\n# [\ndataset = loadtxt(raw_data, delimiter=\",\")\nprint(dataset.shape)\n",
"# Compare Algorithms\nfrom pandas import read_csv\nfrom matplotlib import pyplot\nfrom sk... | [
[
"numpy.loadtxt"
],
[
"matplotlib.pyplot.boxplot",
"pandas.read_csv",
"sklearn.model_selection.cross_val_score",
"sklearn.linear_model.LogisticRegression",
"sklearn.naive_bayes.GaussianNB",
"sklearn.model_selection.KFold",
"sklearn.neighbors.KNeighborsClassifier",
"sklearn.t... |
kniazevgeny/GPT2sQA-1 | [
"b319016f51847a25ea3e9cd9c8450d58831cc42a"
] | [
"gpt2sqa/gpt2/gpt2lmhead.py"
] | [
"from torch import nn\n\n\nclass GPT2LMHead(nn.Module):\n \"\"\" Language Model Head for the transformer \"\"\"\n\n def __init__(self, model_embeddings_weights, config):\n super(GPT2LMHead, self).__init__()\n self.n_embd = config.n_embd\n self.set_embeddings_weights(model_embeddings_weigh... | [
[
"torch.nn.Linear",
"torch.nn.init.normal_"
]
] |
k920049/brunch-hgru | [
"f832de2d7d8e1e74a58e1a4851f57dfa6751e717",
"f832de2d7d8e1e74a58e1a4851f57dfa6751e717",
"f832de2d7d8e1e74a58e1a4851f57dfa6751e717"
] | [
"model.py",
"pipeline/tensorflow/Datasets.py",
"torchmodel.py"
] | [
"import tensorflow as tf\nimport numpy as np\nimport datetime\n\nfrom model.tensorflow.Wrapper import HierarchicalRNNCell\nfrom model.tensorflow.Loss import RankingLoss\nfrom pipeline.tensorflow.Datasets import Datasets\n\nfrom tensorflow.python.keras.layers.recurrent import RNN, GRUCell\nfrom tensorflow.python.ker... | [
[
"tensorflow.python.keras.layers.recurrent.GRUCell",
"tensorflow.concat",
"tensorflow.python.keras.callbacks.TensorBoard",
"tensorflow.reduce_sum",
"tensorflow.python.keras.layers.recurrent.RNN",
"tensorflow.keras.Input",
"tensorflow.squeeze",
"tensorflow.divide",
"tensorflow.ga... |
mobbslab/foraging_paper | [
"d1d3f68ce3980112e274633be6fe4d4e9f7d0367"
] | [
"code/foraging_firstlevel_univariate.py"
] | [
"# Limit the number of threads used by numpy\nimport os\nos.environ[\"MKL_NUM_THREADS\"] = \"1\" \nos.environ[\"NUMEXPR_NUM_THREADS\"] = \"1\" \nos.environ[\"OPENBLAS_NUM_THREADS\"] = \"1\"\nos.environ[\"OMP_NUM_THREADS\"] = \"1\" \n\nimport os\nimport re\nimport pandas as pd\nimport numpy as np\nimport matplotlib.... | [
[
"numpy.dot",
"pandas.read_csv",
"numpy.ones_like",
"numpy.arange",
"pandas.DataFrame",
"numpy.all",
"numpy.savetxt",
"numpy.array",
"sklearn.preprocessing.scale",
"numpy.sum"
]
] |
bicycle315/qiskit-experiments | [
"894dcf41ac69ace9e6a0a3c4800d4b6994ac3b5a",
"7c2b83beb1566a6b9985e0c7adf38cd8b8f30953"
] | [
"qiskit_experiments/library/tomography/fitters/lininv.py",
"test/calibration/experiments/test_fine_drag.py"
] | [
"# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2021.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\n#\n# Any modifications or ... | [
[
"numpy.conj",
"numpy.asarray",
"numpy.linalg.inv",
"numpy.reshape",
"numpy.kron",
"numpy.shape",
"numpy.tensordot"
],
[
"numpy.sqrt",
"numpy.allclose",
"numpy.sin"
]
] |
paulorauber/rpg | [
"bd668c361a2c0367c58c6d30b961eec604365c54"
] | [
"rpg/environments/maze.py"
] | [
"import numpy as np\n\nfrom gym import Env\nfrom gym import spaces\nfrom gym import Wrapper\n\n\nclass TimedEnvironmentWrapper(Wrapper):\n def __init__(self, env, max_steps):\n Wrapper.__init__(self, env)\n self._max_steps = max_steps\n\n def reset(self):\n self._n_steps = 0\n retu... | [
[
"numpy.random.random",
"numpy.nonzero",
"numpy.random.seed",
"numpy.random.shuffle",
"numpy.ones",
"numpy.array",
"numpy.zeros",
"numpy.random.randint"
]
] |
mehrdad-shokri/ludwig | [
"f167981683c067b50be6a3656cbf553efbf192e9",
"f167981683c067b50be6a3656cbf553efbf192e9"
] | [
"ludwig/utils/math_utils.py",
"ludwig/data/dataset_synthesizer.py"
] | [
"#! /usr/bin/env python\n# coding=utf-8\n# Copyright (c) 2019 Uber Technologies, Inc.\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/LICENS... | [
[
"numpy.max",
"numpy.iinfo"
],
[
"numpy.arange",
"numpy.random.random",
"numpy.random.rand",
"numpy.random.choice"
]
] |
chiahungyang/EEG_demo | [
"c76e8f88368ef7c5f24bc7443a556e36713c454c"
] | [
"eegbci.py"
] | [
"\"\"\"Utility module for the EEGBCI motor/imagery dataset.\"\"\"\n\n\nfrom multiprocessing.pool import RUN\nimport numpy as np\nimport pandas as pd\nimport mne\nimport torch\nfrom torch.utils.data import Dataset, DataLoader, ConcatDataset, Subset\nimport pytorch_lightning as pl\nimport sklearn\nfrom typing import ... | [
[
"pandas.concat",
"torch.utils.data.DataLoader",
"sklearn.model_selection.train_test_split",
"pandas.DataFrame",
"torch.from_numpy",
"torch.utils.data.Subset"
]
] |
braniii/prettypyplot | [
"39d7d133fe0dc6699fafd57e00a0ec07672fd344"
] | [
"prettypyplot/plot.py"
] | [
"\"\"\"Wrapper for matplotlib plotting functions.\n\nBSD 3-Clause License\nCopyright (c) 2020-2021, Daniel Nagel\nAll rights reserved.\n\n\"\"\"\n# ~~~ IMPORT ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nimport warnings\nfrom os import path\n\nimport numpy as np\nfrom matplotlib import legend... | [
[
"matplotlib.pyplot.gca",
"matplotlib.legend._get_legend_handles_labels",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.gcf",
"matplotlib.pyplot.colorbar",
"numpy.array"
]
] |
AbdullahKeteldijk/yahoo_fin | [
"b6753cf929965009a0e30450e2ad2fddad2e93fd"
] | [
"yahoo_fin/stock_info.py"
] | [
"import requests\r\nimport pandas as pd\r\nimport ftplib\r\nimport io\r\nimport re\r\nimport json\r\nimport datetime\r\n\r\ntry:\r\n from requests_html import HTMLSession\r\nexcept Exception:\r\n print(\"\"\"Warning - Certain functionality \r\n requires requests_html, which is not installed.\r\n ... | [
[
"pandas.to_datetime",
"pandas.read_csv",
"pandas.DateOffset",
"pandas.DataFrame",
"pandas.read_html",
"pandas.DataFrame.from_dict",
"pandas.Timestamp",
"pandas.Timestamp.today"
]
] |
jvpoulos/NeurIPS2019-traffic4cast | [
"707ab2d2b3fcad8df19ab6e5443f0280c00a02c5"
] | [
"utils/pred.py"
] | [
"import numpy as np\nimport os, csv, re, datetime\nimport sys, getopt\nimport h5py\nfrom h5shape import *\nfrom keras import models\nfrom keras.models import load_model\n\n#prediction times in test sets)\nutcPlus2 = [30, 69, 126, 186, 234]\nutcPlus3 = [57, 114, 174, 222, 258]\n\ndef load_test_data(file_path, indice... | [
[
"numpy.random.shuffle",
"numpy.stack",
"numpy.transpose"
]
] |
criddle858/PyLTEs | [
"ef16e595339542b8b0d774ed1699fde65723ac74"
] | [
"pyltes/powerConfigurator.py"
] | [
"__author__ = 'mslabicki'\r\n\r\nimport pygmo as pg\r\n#\r\nfrom pyltes.powerOptimizationProblemsDef import maximalThroughputProblemRR\r\nfrom pyltes.powerOptimizationProblemsDef import local_maximalThroughputProblemRR\r\nfrom pyltes.powerOptimizationProblemsDef import maximalMedianThrProblemRR\r\nfrom pyltes.power... | [
[
"numpy.asarray"
]
] |
viztopia/animegan2-pytorch | [
"cef7f42fa429cfc902c3b419d343389e690943f5"
] | [
"model.py"
] | [
"import torch\nfrom torch import nn\nimport torch.nn.functional as F\n\n\nclass ConvNormLReLU(nn.Sequential):\n def __init__(self, in_ch, out_ch, kernel_size=3, stride=1, padding=1, pad_mode=\"reflect\", groups=1, bias=False):\n \n pad_layer = {\n \"zero\": nn.ZeroPad2d,\n ... | [
[
"torch.nn.Sequential",
"torch.nn.Conv2d",
"torch.nn.Tanh",
"torch.nn.InstanceNorm2d",
"torch.nn.LeakyReLU",
"torch.nn.functional.interpolate"
]
] |
lsiemens/QBox | [
"ef43c9bbc5f8437fb4d44fbf0e58e29a8e0b1b39"
] | [
"ProofOfConcept/PythonVSFortran/PQBoxTest.py"
] | [
"import numpy\n\nres, iterations = 100, 10000\ndt = 0.1\nV = 0*numpy.empty((res, res))\nphi = (1.0 + 1.0j) + 0*V\na = (0.0 + 0.0j) + 0*V\ngrad = (0.0 + 0.0j) + 0*V\n\nphi[0, :] = (0.0 + 0.0j)\nphi[res - 1, :] = (0.0 + 0.0j)\nphi[:, 0] = (0.0 + 0.0j)\nphi[:, res - 1] = (0.0 + 0.0j)\n\nphi = phi/numpy.sqrt(numpy.sum(... | [
[
"numpy.conj",
"numpy.empty"
]
] |
louis-li/PlantDiseaseDetection | [
"14db4089a0f4f8fed00500d4c574fd3bcfcd29ad"
] | [
"grad_cam.py"
] | [
"## Based on https://keras.io/examples/vision/grad_cam/\n\nimport numpy as np\nimport tensorflow as tf\nfrom tensorflow import keras\n\n# Display\nfrom IPython.display import Image\nimport matplotlib.pyplot as plt\nimport matplotlib.cm as cm\n\ndef get_img_array(img_path, size):\n # `img` is a PIL image of size ... | [
[
"numpy.hstack",
"numpy.expand_dims",
"numpy.maximum",
"tensorflow.keras.Input",
"tensorflow.keras.preprocessing.image.load_img",
"tensorflow.reduce_mean",
"numpy.uint8",
"numpy.arange",
"tensorflow.keras.Model",
"numpy.max",
"numpy.argmax",
"numpy.mean",
"matplo... |
Matthew-Signorotti/mpi-sppy | [
"5c6b4b8cd26af517ff09706d11751f2fb05b1b5f"
] | [
"mpisppy/utils/listener_util/demo_listener_util.py"
] | [
"# Copyright 2020 by B. Knueven, D. Mildebrath, C. Muir, J-P Watson, and D.L. Woodruff\n# This software is distributed under the 3-clause BSD License.\n# Demonstrate some uses of listener_util.py for asynchronous computing.\n# This very silly and of limited value.\n# DLW March 2019\n# NOTE: If you have runtime erro... | [
[
"numpy.array_equal",
"numpy.random.seed",
"numpy.random.normal",
"numpy.copyto",
"numpy.random.uniform",
"numpy.zeros"
]
] |
jiahuanglin/pytorch-transformers | [
"a7a93143df4e60e31e062d7f2a4eb0d6283473a4"
] | [
"pytorch_transformers/modeling_bert.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.nn.Softmax",
"torch.zeros",
"torch.nn.Embedding",
"torch.nn.Dropout",
"torch.nn.CrossEntropyLoss",
"torch.ones",
"torch.sqrt",
"torch.from_numpy",
"torch.arange",
"tensorflow.train.list_variables",
"torch.ones_like",
"torch.sigmoid",
"torch.zeros_like",
... |
xingshulicc/citrus-pest-classification-by-advanced-deep-learning | [
"6f98ddcf680356db35ac111204da12a057ed8bd8"
] | [
"xception_test_model.py"
] | [
"# -*- coding: utf-8 -*-\nfrom __future__ import print_function\n\"\"\"\nCreated on Mon Sep 25 09:51:13 2017\n\n@author: xingshuli\n\"\"\"\n\n'''\nThe default_size of input image is 299 and min_size = 71\nShould note that the input preprocessing function is also different from\nVGG16 and ResNet but same as Xception... | [
[
"numpy.expand_dims"
]
] |
EmoryMLIP/DynamicBlocks | [
"52acc9fbc1a2640c6ac8922fa18105279ccaea97"
] | [
"modules/TvNorm.py"
] | [
"# TvNorm.py\n\nimport torch\nimport torch.nn as nn\n\nclass TvNorm(nn.Module):\n \"\"\"\n normalization using the total variation; idea is to normalize pixel-wise by the length of the feature vector, i.e.,\n MATLAB notation:\n z = diag( 1/ sqrt( sum(x.^2,3)+eps)) x\n\n Attributes:\n e... | [
[
"torch.sum",
"torch.ones",
"torch.pow",
"torch.zeros"
]
] |
ttpro1995/CV_FinalProject | [
"89aa252f349561b6d4a6a4a9c8d0ae6e00429f92"
] | [
"preprocessor.py"
] | [
"# Thai Thien 1351040\n\nimport cv2\nimport copyright\nimport numpy as np\nfrom os import listdir\nfrom os.path import isfile, join, splitext\nimport os.path\n\nclass PreProcessor:\n def __init__(self, face_xml, eye_xml, mouth_xml, nose_xml):\n \"\"\"\n\n :param face_xml: pretrain cascade classifie... | [
[
"numpy.ones"
]
] |
ckm3/eleanor | [
"d460ec5b420781c7adc44ed260020d60d1cb91ed"
] | [
"eleanor/update.py"
] | [
"import os\nfrom urllib.request import urlopen\nfrom datetime import datetime\nimport math\nfrom astropy.coordinates import SkyCoord\nfrom astropy import units as u\nfrom astroquery.mast import Tesscut\nfrom astropy.io import fits\nimport numpy as np\nfrom lightkurve import TessLightCurveFile, search_targetpixelfil... | [
[
"numpy.abs",
"numpy.isfinite",
"numpy.unique",
"numpy.arange",
"numpy.sort",
"numpy.bitwise_or.reduce",
"numpy.round",
"numpy.bitwise_and",
"numpy.zeros_like",
"numpy.mean",
"numpy.savetxt",
"numpy.array",
"numpy.sum"
]
] |
johnmartinsson/adversarial-representation-learning | [
"86cd1489b0bdfa76bab37e313c6ab53304179f1e",
"86cd1489b0bdfa76bab37e313c6ab53304179f1e",
"86cd1489b0bdfa76bab37e313c6ab53304179f1e"
] | [
"vis/create_attributes_experiment_plot.py",
"vis/create_adversarial_plot.py",
"data/preprocess_annotations.py"
] | [
"import os\nimport pickle\nimport json\nimport numpy as np\n\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nsns.set()\n\ndef scatterplot(attribute_idx, table, epsilons, label, ax):\n ys = []\n xs = []\n for eps in epsilons:\n row = table[eps]\n y = row[attribute_idx]\n ys.app... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"numpy.std",
"numpy.mean",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.ylabel"
],
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.subplots",
"numpy.mean",
"matplotlib.pyplot.x... |
silence0201/Learn-Python | [
"662da7c0e74221cedb445ba17d5cb1cd3af41c86",
"662da7c0e74221cedb445ba17d5cb1cd3af41c86"
] | [
"Others/Source/19/19.5/plot_guangzhou_weather_net.py",
"Others/Source/19/19.1/plot_subplot.py"
] | [
"# coding: utf-8\r\n#########################################################################\r\n# 网站: <a href=\"http://www.crazyit.org\">疯狂Java联盟</a> #\r\n# author yeeku.H.lee kongyeeku@163.com #\r\n# ... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.gca",
"matplotlib.pyplot.title",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.fill_between",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
],
[
"matplotlib.pypl... |
DizzyYunxuan/FlappyBird | [
"4a078edff0d2276a717c437032cdbcebf33366f3",
"4a078edff0d2276a717c437032cdbcebf33366f3"
] | [
"edge_detect_template_single_test.py",
"edge_detect_template.py"
] | [
"import numpy as np\nimport cv2\nfrom matplotlib import pyplot as plt\nfrom PIL import Image\nfrom scipy import ndimage\nimport time\nimport os\n\n\n\n\ndef get_decisionMap(img):\n img_gray = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)\n img = img_gray[34:434, 8:-8]\n [h, w] = img.shape\n\n\n # lap kernel\n ... | [
[
"numpy.min",
"numpy.int32",
"numpy.argwhere",
"numpy.ones",
"numpy.max",
"numpy.append",
"numpy.zeros_like",
"numpy.array"
],
[
"numpy.uint8"
]
] |
ProGamerCode/FitML | [
"3b44160bbf6c0587b8df198d3ceef10a42e2bfca",
"3b44160bbf6c0587b8df198d3ceef10a42e2bfca"
] | [
"QLearning/LunarLander_v2.py",
"ActorCritic/LunarLander_ActorCritic.py"
] | [
"'''\nLunarLander-v2 solution by Michel Aka\nhttps://github.com/FitMachineLearning/FitML/\nhttps://www.youtube.com/channel/UCi7_WxajoowBl4_9P0DhzzA/featured\nUsing Modified Q Learning, Bellman, Reinforcement Learning, RL memory\n\n'''\nimport numpy as np\nimport keras\nimport gym\nimport os\nimport h5py\n\nfrom ker... | [
[
"numpy.random.random",
"numpy.alen",
"numpy.arange",
"numpy.concatenate",
"numpy.delete",
"numpy.argmax",
"numpy.random.rand",
"numpy.array",
"numpy.zeros",
"numpy.vstack"
],
[
"numpy.random.random",
"numpy.alen",
"numpy.arange",
"numpy.concatenate",
... |
tmensink/deepncm | [
"fe7cdd43eb7276f4374c9c51715bf6cf417f994b"
] | [
"resnet_deepncm_run_loop.py"
] | [
"# Copyright 2018 Thomas Mensink, University of Amsterdam, thomas.mensink@uva.nl\n#\n# Beloning to the DeepNCM repository\n# DeepNCM is proposed in\n# Samantha Guerriero, Barbara Caputo, and Thomas Mensink\n# DeepNCM: Deep Nearest Class Mean Classifiers\n# ICLR Workshop 2018\n# https://openreview.net/fo... | [
[
"tensorflow.cast",
"tensorflow.nn.l2_loss",
"tensorflow.estimator.RunConfig",
"tensorflow.group",
"tensorflow.summary.scalar",
"tensorflow.get_collection",
"tensorflow.summary.image",
"tensorflow.estimator.export.PredictOutput",
"tensorflow.train.get_or_create_global_step",
... |
kumasento/gradient-scaling | [
"0ca435433b9953e33656173c4d60ebd61c5c5e87"
] | [
"chainerlp/notebook_utils.py"
] | [
"\"\"\" Utility functions for Jupyter notebooks \"\"\"\nimport os\nimport json\nimport subprocess\nimport time\n\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\nimport chainer\nimport chainer.links as L\nfrom chainerlp.links import models\nfrom chainerlp.training.load_only_updator impor... | [
[
"numpy.isnan",
"matplotlib.pyplot.subplots"
]
] |
eodcgmbh/datacube-core | [
"0792e519ccfd33e0a0acf368aa6f33ca2c1ea50f"
] | [
"tests/test_utils_other.py"
] | [
"# This file is part of the Open Data Cube, see https://opendatacube.org for more information\n#\n# Copyright (c) 2015-2020 ODC Contributors\n# SPDX-License-Identifier: Apache-2.0\n\"\"\"\nTest utility functions from :module:`datacube.utils`\n\n\n\"\"\"\nimport os\nimport pathlib\nimport string\nfrom pathlib import... | [
[
"pandas.to_datetime",
"numpy.asarray",
"numpy.uint8",
"numpy.arange",
"numpy.int8",
"numpy.dtype",
"numpy.stack",
"numpy.testing.assert_array_equal",
"numpy.array",
"numpy.zeros"
]
] |
kwryankrattiger/xmsinterp | [
"c3d7ffda8851acd328068e144db1a6120bd77c26"
] | [
"_package/tests/unit_tests/interp_idw_pyt.py"
] | [
"\"\"\"Test InterpIdw_py.cpp.\"\"\"\nimport unittest\n\nimport numpy as np\n\nfrom xms.core.misc import Observer\n\nfrom xms.interp.interpolate import InterpIdw\n\n\nclass MockObserver(Observer):\n \"\"\"Mock Observer class for testing.\"\"\"\n def __init__(self, obs_id=\"X\"):\n \"\"\"Constructor.\n\n... | [
[
"numpy.testing.assert_array_equal",
"numpy.array",
"numpy.random.rand",
"numpy.testing.assert_array_almost_equal"
]
] |
rafaelmm82/learning | [
"c8cd7408404dbbcc0af3ae0a18c6c311d4003269"
] | [
"mlfrancais/Partie 1 - Data Preprocessing/01 - Data Preprocessing.py"
] | [
"'''\ncours en france de machine learning\nGithub: @rafaelmm82\n'''\n\n# Importer les librairies\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport pandas as pd\n\n# La gestion des données\n# ----------------------\n\n# Importer le dataset\nfilename = 'mlfrancais/Partie 1 - Data Preprocessing/Data.csv'\nd... | [
[
"pandas.read_csv",
"sklearn.impute.SimpleImputer",
"sklearn.model_selection.train_test_split",
"sklearn.preprocessing.LabelBinarizer",
"numpy.column_stack",
"sklearn.preprocessing.StandardScaler",
"sklearn.preprocessing.LabelEncoder"
]
] |
jvishnuvardhan/probability | [
"a408f8fbde831a40df3fb10023deaf997d104b24",
"a408f8fbde831a40df3fb10023deaf997d104b24"
] | [
"tensorflow_probability/python/internal/backend/numpy/numpy_array.py",
"tensorflow_probability/python/distributions/gamma.py"
] | [
"# Copyright 2018 The TensorFlow Probability Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a... | [
[
"numpy.split",
"numpy.expand_dims",
"numpy.take",
"numpy.asarray",
"numpy.issubdtype",
"numpy.squeeze",
"numpy.concatenate",
"numpy.max",
"numpy.moveaxis",
"numpy.where",
"numpy.roll",
"numpy.conjugate",
"numpy.reshape",
"numpy.arange",
"numpy.repeat",
... |
lisurui6/acdrnet | [
"bf7e5a93149dd1e71a42669f2463212e7bb82bd3"
] | [
"data/transforms.py"
] | [
"from __future__ import division\nimport torch\nimport math\nimport sys\nimport random\nfrom PIL import Image\n\ntry:\n import accimage\nexcept ImportError:\n accimage = None\nimport numpy as np\nimport numbers\nimport collections\nimport warnings\n\nfrom torchvision.transforms import functional as F\n\nif sy... | [
[
"numpy.array"
]
] |
guillochon/humantree | [
"94b8e01561da98701633a26452678e50c285c45c"
] | [
"humantree/humantree.py"
] | [
"\"\"\"Find trees on a property, make suggestions for new trees.\"\"\"\nimport json\nimport os\nimport pprint\nfrom glob import glob\n\nimport numpy as np\nimport requests\nfrom scipy import misc\nfrom skimage.io import imsave\nfrom skimage.transform import resize\nfrom tqdm import tqdm\n\npp = pprint.PrettyPrinter... | [
[
"numpy.sqrt",
"numpy.ndarray",
"numpy.mean",
"matplotlib.patches.Polygon",
"matplotlib.pyplot.gray",
"numpy.save",
"numpy.ceil",
"numpy.std",
"matplotlib.pyplot.close",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.figure",
"scipy.misc.imsave",
"matplotlib.pyplot... |
drammock/mne-tools.github.io | [
"5d3a104d174255644d8d5335f58036e32695e85d",
"5d3a104d174255644d8d5335f58036e32695e85d",
"5d3a104d174255644d8d5335f58036e32695e85d",
"5d3a104d174255644d8d5335f58036e32695e85d",
"5d3a104d174255644d8d5335f58036e32695e85d",
"5d3a104d174255644d8d5335f58036e32695e85d",
"5d3a104d174255644d8d5335f58036e32695e85... | [
"stable/_downloads/a0763e9183d7a6c5e07101a3d36cc949/plot_brainstorm_auditory.py",
"0.12/_downloads/plot_stats_cluster_methods.py",
"0.16/_downloads/plot_visualize_evoked.py",
"stable/_downloads/afd72e067412c390ceccc64f99255ba2/plot_compute_raw_data_spectrum.py",
"0.17/_downloads/42ebe982e3b37b9899162c8d60f2... | [
"# -*- coding: utf-8 -*-\n\"\"\"\n.. _tut-brainstorm-auditory:\n\n====================================\nBrainstorm auditory tutorial dataset\n====================================\n\nHere we compute the evoked from raw for the auditory Brainstorm\ntutorial dataset. For comparison, see [1]_ and the associated\n`brain... | [
[
"pandas.concat",
"pandas.read_csv",
"numpy.abs",
"numpy.arange",
"pandas.DataFrame",
"numpy.std",
"numpy.diff",
"numpy.mean"
],
[
"numpy.convolve",
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.tight_layout",
"numpy.arange",
"scipy.stats.distributions.t.ppf... |
jtianesq/protein-prediction-nmt-evo | [
"fd08a92625a7feced03bc2b5c01a6545f03e5a88"
] | [
"Neural Machine Translation/search/beam.py"
] | [
"# search.py\n\nimport numpy as np\nimport itertools\n\n\n# score: a beam_size * num_vars matrix, represent current score\n# n: max number of elements to select\n# threshold: prune if score < best + threshold\ndef find_nbest(score, n, threshold=None):\n num_vars = score.shape[1]\n # print(score.shape)\n\n ... | [
[
"numpy.max",
"numpy.array",
"numpy.argpartition",
"numpy.floor"
]
] |
yanlinqian/Temporal-Color-Constancy | [
"ebd363962fa8ae0908252cabaf97355da3da8a80"
] | [
"auxiliary/diffihistogram_wrap.py"
] | [
"import torch\nimport torch.nn as nn\nimport time,datetime\nimport torch.nn.functional as F\nimport numpy as np\n\nclass Histogram2D_wrap(nn.Module):\n def __init__(self, bins=100, min=0, max=1, norm=True, cuda=False):\n super(Histogram2D_wrap, self).__init__()\n self.bins, self.min, self.max, self... | [
[
"torch.abs",
"torch.cuda.synchronize",
"torch.isinf",
"torch.isnan",
"torch.remainder",
"torch.unsqueeze",
"torch.relu",
"torch.rand",
"torch.arange",
"torch.meshgrid"
]
] |
sumanthd17/text-to-text-transfer-transformer | [
"df22dc95426f6a8af65edca8a5495eaed00e19bc"
] | [
"t5/evaluation/metrics.py"
] | [
"# Copyright 2021 The T5 Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agr... | [
[
"numpy.ones_like",
"numpy.logical_and",
"numpy.array_equal",
"numpy.asarray",
"numpy.arange",
"numpy.eye",
"numpy.argmax",
"numpy.mean",
"numpy.zeros_like",
"numpy.exp",
"numpy.array"
]
] |
gmhaber/gnn_laminar_flow | [
"13070d046c30e30ce7820f93a373b903a1a0b6dd"
] | [
"network_utils.py"
] | [
"import tensorflow as tf\n\n\ndef update_symmetry_edge_features(node_features, edges, edge_features, message_fn):\n\n \"\"\"\n Pass messages between nodes and sum the incoming messages at each node.\n Implements equation 1 and 2 in the paper, i.e. m_{.j}^t &= \\\\sum_{i \\\\in N(j)} f(h_i^{t-1}, h_j^{t-1})... | [
[
"tensorflow.math.subtract",
"tensorflow.math.add",
"tensorflow.concat",
"tensorflow.nn.sigmoid",
"tensorflow.shape",
"tensorflow.math.unsorted_segment_sum",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.concatenate",
"tensorflow.linalg.matmul",
"tensorflow.gathe... |
midiya/food-detection | [
"c88cb89dc4a4fd1bd0677ef2017b6793a7289faf",
"c88cb89dc4a4fd1bd0677ef2017b6793a7289faf"
] | [
"app.py",
"model/utils/utils.py"
] | [
"import os\nimport argparse\nimport requests\nimport cv2\nimport numpy as np\nimport tldextract\nimport pytube\nimport hashlib\nimport tldextract\nimport pytube\nimport time\nimport base64\n\nfrom PIL import Image\nfrom flask import Flask, request, render_template, redirect, make_response, jsonify\nfrom pathlib imp... | [
[
"numpy.fromstring"
],
[
"matplotlib.patches.Rectangle",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"numpy.round",
"matplotlib.pyplot.close",
"matplotlib.pyplot.axis"
]
] |
koconnor4/hstphot | [
"04ec83fc6dce056bd6153e407446e1be4dff3923"
] | [
"hstfakestar.py"
] | [
"__author__ = 'rodney'\n\nfrom hstphot import radec2xy\nfrom astropy.io import fits as pyfits\nimport numpy as np\nfrom PythonPhot.photfunctions import rdpsfmodel\nfrom PythonPhot.photfunctions import addtoimarray\n\ndef addtofits(fitsin, fitsout, psfmodelfile, position, fluxscale,\n coordsys='xy', ver... | [
[
"numpy.iterable",
"numpy.array"
]
] |
int-brain-lab/spikes | [
"bc557fa5024e8eedc60b7369dba12121df56d3be",
"bc557fa5024e8eedc60b7369dba12121df56d3be"
] | [
"localization_pipeline/denoiser.py",
"localization_pipeline/localizer_with_residuals.py"
] | [
"\nimport numpy as np\nimport os\nimport torch\nfrom torch import nn, optim\nimport torch.utils.data as Data\nfrom torch.nn import functional as F\nfrom torch import distributions\n\n\nclass Denoise(nn.Module):\n def __init__(self, n_filters, filter_sizes, spike_size):\n\n super(Denoise, self).__init__()\... | [
[
"torch.load",
"torch.utils.data.DataLoader",
"torch.cuda.empty_cache",
"torch.nn.Linear",
"torch.FloatTensor",
"torch.nn.Conv1d",
"torch.nn.ReLU",
"torch.nn.MSELoss"
],
[
"numpy.fromfile",
"numpy.abs",
"numpy.unique",
"scipy.optimize.least_squares",
"numpy.a... |
tig/datapane | [
"defae6776e73b07191c0a5804a50b284ec3c9a63"
] | [
"tests/client/e2e/test_reports.py"
] | [
"import json\nfrom datetime import date, datetime, timedelta, timezone\nfrom pathlib import Path\n\nimport altair as alt\nimport pandas as pd\nimport pytest\nimport requests\nfrom furl import furl\n\nimport datapane as dp\nfrom datapane.client import config as c\n\nfrom ..local.test_api import gen_report_complex_wi... | [
[
"pandas.DataFrame"
]
] |
Shahaf-Yamin/Vlocano_erruption_time_predication | [
"2cb7c9476c6929b85ce6ea05d513c82b1bf0d1e3"
] | [
"losses/losses.py"
] | [
"import tensorflow as tf\nfrom tensorflow.keras.losses import SparseCategoricalCrossentropy\nfrom backend.loss_metric_utils import nan_mask, identity\n\n\nclass ClassificationLoss(tf.keras.losses.Loss):\n\n def __init__(self, config, name='classification_loss', **kwargs):\n super().__init__(name=name, **k... | [
[
"tensorflow.keras.losses.SparseCategoricalCrossentropy",
"tensorflow.reshape"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.