repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
Attrezzi/vision | [
"1aef87d01eec2c0989458387fa04baebcc86ea7b"
] | [
"torchvision/transforms/transforms.py"
] | [
"import math\nimport numbers\nimport random\nimport warnings\nfrom collections.abc import Sequence\nfrom typing import Tuple, List, Optional\n\nimport numpy as np\nimport torch\nfrom PIL import Image\nfrom torch import Tensor\n\ntry:\n import accimage\nexcept ImportError:\n accimage = None\n\nfrom . import fu... | [
[
"torch.mm",
"torch.randint",
"torch.empty",
"torch.randperm",
"torch.tensor",
"torch.rand"
]
] |
ChristianCKKoch/Projektarbeit_Digethic | [
"80999e48de29106545398252bbc6cea2b8b953ce"
] | [
"src/models/model_library.py"
] | [
"from sklearn.model_selection import GridSearchCV\nfrom sklearn.neighbors import KNeighborsClassifier\nfrom sklearn.tree import DecisionTreeClassifier\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.neural_network import MLPClassifier\nfrom sklearn.ensemble import VotingClassifier\nfrom sklearn.s... | [
[
"sklearn.neural_network.MLPClassifier",
"torch.nn.CrossEntropyLoss",
"torch.nn.LogSoftmax",
"sklearn.model_selection.GridSearchCV",
"sklearn.ensemble.RandomForestClassifier",
"torch.from_numpy",
"sklearn.ensemble.VotingClassifier",
"torch.tensor",
"sklearn.neighbors.KNeighborsC... |
Comp-UFSCar/neural-networks-2 | [
"e5e105c91bcd1d63b200f36b9e02dbcde54ae756"
] | [
"tasks/assignment-1/p2.py"
] | [
"\"\"\"Problem 2.\n\nAuthor: Lucas David -- <ld492@drexel.edu>\n\n\"\"\"\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom algorithms.linear_estimator import Perceptron\nfrom mpl_toolkits.mplot3d import Axes3D\nfrom scipy.io import loadmat\nfrom sklearn.metrics import accuracy_score\n\nAxes3D\n\n\ndef a(X,... | [
[
"matplotlib.pyplot.tight_layout",
"sklearn.metrics.accuracy_score",
"scipy.io.loadmat",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.figure"
]
] |
MaxVanDeursen/pandas | [
"9821b77de692716d7c2b62db1a68cac9ffc456c3",
"9821b77de692716d7c2b62db1a68cac9ffc456c3"
] | [
"pandas/core/arrays/base.py",
"pandas/tests/groupby/test_transform.py"
] | [
"\"\"\"An interface for extending pandas with custom arrays.\n\n.. warning::\n\n This is an experimental API and subject to breaking changes\n without warning.\n\"\"\"\nimport operator\nfrom typing import Any, Callable, Optional, Sequence, Tuple, Union\n\nimport numpy as np\n\nfrom pandas.compat import PY3, set... | [
[
"pandas.compat.set_function_name",
"pandas.core.dtypes.common.is_list_like",
"pandas.util._decorators.Substitution",
"pandas.util._decorators.Appender",
"pandas.errors.AbstractMethodError",
"pandas.core.algorithms._factorize_array",
"numpy.asarray",
"pandas.compat.numpy.function.va... |
nliolios24/textrank | [
"845c0a46b9bd36c36773bf106c0e2fee3bdb61a5",
"845c0a46b9bd36c36773bf106c0e2fee3bdb61a5"
] | [
"share/doc/networkx-1.9.1/examples/graph/unix_email.py",
"share/doc/networkx-1.9.1/examples/drawing/degree_histogram.py"
] | [
"#!/usr/bin/env python\n\"\"\"\nCreate a directed graph, allowing multiple edges and self loops, from\na unix mailbox. The nodes are email addresses with links\nthat point from the sender to the recievers. The edge data\nis a Python email.Message object which contains all of\nthe email message data. \n\nThis exam... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.savefig"
],
[
"matplotlib.pyplot.title",
"matplotlib.pyplot.loglog",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.axes",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.yl... |
dguari1/Auto-eFace | [
"5d30493deccb73bc6a355ce342ae0f6a4a0e177d"
] | [
"ImageViewerandProcess.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Aug 16 10:53:19 2017\n\n@author: Diego L.Guarin -- diego_guarin at meei.harvard.edu\n\"\"\"\nimport cv2\nimport numpy as np\nfrom scipy.spatial.distance import cdist\n\nfrom PyQt5 import QtWidgets\nfrom PyQt5 import QtGui\nfrom PyQt5 import QtCore\n\n\nfrom utilities... | [
[
"numpy.append",
"numpy.array",
"scipy.spatial.distance.cdist"
]
] |
tomkooij/covid19 | [
"a7d8a5781ed84b4a59652fc4575c15679de7898a"
] | [
"nl_regions.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"Holiday zones, municipality classes in the Netherlands; module for importing.\n\nFunction:\n\n- build_municipality_csv()\n- get_municipality_data()\n- select_cases_region()\n\nCreated on Sat Nov 7 16:08:51 2020 @hk_nien\n\nNote: changes as of 2021-01-07:\n\n... | [
[
"pandas.DataFrame.from_records",
"pandas.read_csv",
"pandas.to_datetime",
"pandas.DataFrame"
]
] |
harrysame/ReinforcementLearning | [
"6b2f85d2200c391b7fde2529ef26178c1be52959"
] | [
"codes/hw3/TD.py"
] | [
"import numpy as np\n\ndef TD0(get_episode,policy, initial_v, gamma, alpha,num_episodes = 1):\n# This function implements TD(0).\n# get_episode: function to generate an episode\n# policy: the policy to be evaluated \n# initial_v: initial estimate for value function\n# gamma: discount factor\n# alpha: learning rate\... | [
[
"numpy.copy",
"numpy.zeros"
]
] |
fbravosanchez/NIPS4Bplus | [
"6166042f0ded907ba70e943496f3aad4a8b62c62"
] | [
"cut_nips4bplus_files.py"
] | [
"# -*- coding: utf-8 -*-\r\n\r\n\"\"\"\r\nCreated by Francisco Bravo Sanchez July 2021\r\nThis scripts reads the NIPS4B wav files and splits them according to the\r\ncsv annotations from NIPS4Bplus (Morfi V, Bas Y, Pamula H, Glotin H,\r\nStowell D. 2019. NIPS4Bplus: a richly annotated birdsong audio dataset.\r\nPee... | [
[
"numpy.max",
"pandas.read_csv"
]
] |
uhh-lt/dl-seminar | [
"b146db2f63462a7d795c43b484dc9e8ca38fb4d6"
] | [
"dump/04_dnn_tagger_02.py"
] | [
"# -*- coding: utf-8 -*-\n\nfrom nltk.corpus import brown\nimport sklearn\nimport tensorflow as tf\nimport numpy as np\nimport numpy.random as random\n\nimport itertools\n\nrandom.seed(42)\n\n## Install data by running the following code:\n#import nltk\n#nltk.download('brown')\n#nltk.download('universal_tagset')\n\... | [
[
"tensorflow.nn.relu",
"tensorflow.matmul",
"tensorflow.nn.softmax",
"numpy.random.seed",
"tensorflow.placeholder",
"numpy.random.shuffle",
"sklearn.preprocessing.LabelEncoder",
"tensorflow.global_variables_initializer",
"tensorflow.train.GradientDescentOptimizer",
"tensorfl... |
cyuuu4u/CNN-text-classification-tf-master | [
"b2cce63a71cff57319705ec96ac164b79a89cc21"
] | [
"data_helpers.py"
] | [
"import numpy as np\nimport re\nimport itertools\nfrom collections import Counter\nfrom collections import defaultdict\nimport os\nimport pandas as pd\nimport pickle\n\n\ndef clean_str(string): #清洗数据\n \"\"\"\n Tokenization/string cleaning for all datasets except for SST.\n Original taken from https://gith... | [
[
"numpy.asarray",
"numpy.arange",
"numpy.dtype",
"numpy.concatenate",
"numpy.array"
]
] |
JohannesGaessler/presentation_mc | [
"0d43f3b70d71f063f872a5fb8b09cde3b756ee36",
"0d43f3b70d71f063f872a5fb8b09cde3b756ee36",
"0d43f3b70d71f063f872a5fb8b09cde3b756ee36"
] | [
"02_pi_crude.py",
"05_pi_vegas_ensemble.py",
"03_pi_variance_reduction.py"
] | [
"import numpy as np\nfrom scipy.integrate import quad\nimport matplotlib.pyplot as plt\nplt.figure(figsize=(32.0, 6.0))\n\n\ndef f(x):\n return 1 - np.sqrt(1 - x ** 2)\n\n\nSAMPLE_SIZE = 1000\nEf = quad(lambda x: f(x), 0, 1)[0]\nVarf = quad(lambda x: (f(x) - Ef) ** 2, 0, 1)[0]\n\nrand_x = np.random.rand(SAMPLE_S... | [
[
"numpy.sqrt",
"numpy.linspace",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.ylabel",
"numpy.random.rand",
"matplotlib.pyplot.bar",
"numpy.var",
"matplotlib.pyplot.xlabel",
"numpy.su... |
pkicsiny/xline | [
"a0dcc6655082bc08e882509bc4e65204de836b8a",
"a0dcc6655082bc08e882509bc4e65204de836b8a",
"a0dcc6655082bc08e882509bc4e65204de836b8a"
] | [
"xline/be_beamfields/boost.py",
"examples/lhc/benchmark.py",
"examples/rf_multipole/rf_multipole.py"
] | [
"import numpy as np\n\n# I program as close as possible to C...\n\n\ndef boost(x, px, y, py, sigma, delta, parboost):\n\n sphi = parboost.sphi\n cphi = parboost.cphi\n tphi = parboost.tphi\n salpha = parboost.salpha\n calpha = parboost.calpha\n\n h = (\n delta\n + 1.0\n - np.s... | [
[
"numpy.sqrt"
],
[
"numpy.array",
"matplotlib.pyplot.show",
"matplotlib.pyplot.close",
"matplotlib.pyplot.figure"
],
[
"numpy.array"
]
] |
ZhiangChen/tornado_damage | [
"25af94dc170a118cc4e10b6b302a55283e48ce75"
] | [
"tiles.py"
] | [
"\"\"\"\ntiles.py\nZhiang Chen, Jan 7 2020\nTo process tornado damage tiles\n\"\"\"\n\nimport os\nimport numpy as np\nimport pickle\nimport sys\nsys.path.remove('/opt/ros/kinetic/lib/python2.7/dist-packages')\nimport cv2\nimport matplotlib.pyplot as plt\n\nclass Tiles(object):\n def __init__(self, size=(1000, 10... | [
[
"numpy.all",
"numpy.where",
"numpy.sum",
"numpy.zeros"
]
] |
kmdalton/reciprocalspaceship | [
"cf936cca64c5c387ace505416a047318efa9375f"
] | [
"reciprocalspaceship/utils/math.py"
] | [
"import numpy as np\n\ndef angle_between(vec1, vec2, deg=True):\n \"\"\"\n This function computes the angle between vectors along the last dimension of the input arrays.\n This version is a numerically stable one based on arctan2 as described in this post:\n - https://scicomp.stackexchange.com/a/27769/... | [
[
"numpy.arctan2",
"numpy.linalg.norm",
"numpy.rad2deg"
]
] |
ginggs/statsmodels | [
"a74a179d2a3267ed992871f8d9ef6c6d86c9b934",
"a74a179d2a3267ed992871f8d9ef6c6d86c9b934",
"a74a179d2a3267ed992871f8d9ef6c6d86c9b934",
"a74a179d2a3267ed992871f8d9ef6c6d86c9b934"
] | [
"statsmodels/tsa/statespace/exponential_smoothing.py",
"statsmodels/tsa/base/tests/test_tsa_indexes.py",
"statsmodels/tsa/ar_model.py",
"statsmodels/sandbox/distributions/otherdist.py"
] | [
"\"\"\"\nLinear exponential smoothing models\n\nAuthor: Chad Fulton\nLicense: BSD-3\n\"\"\"\n\nimport numpy as np\nimport pandas as pd\nfrom statsmodels.base.data import PandasData\n\nfrom statsmodels.genmod.generalized_linear_model import GLM\nfrom statsmodels.tools.validation import (array_like, bool_like, float_... | [
[
"numpy.dot",
"numpy.log",
"numpy.clip",
"numpy.eye",
"pandas.DataFrame",
"numpy.exp",
"numpy.zeros_like",
"numpy.var",
"numpy.array",
"numpy.zeros",
"numpy.sum"
],
[
"numpy.testing.assert_equal",
"pandas.to_datetime",
"pandas.Series",
"pandas.period_... |
mizolotu/izi | [
"d2d00813919259aad3dcdbc54039c30cbb16b125",
"d2d00813919259aad3dcdbc54039c30cbb16b125",
"d2d00813919259aad3dcdbc54039c30cbb16b125"
] | [
"plot_roc_old.py",
"reinforcement_learning/common/buffers.py",
"reinforcement_learning/a2c/a2c.py"
] | [
"import os\nimport os.path as osp\nimport plotly.io as pio\nimport plotly.graph_objs as go\nimport numpy as np\nimport argparse as arp\n\nfrom common.plot import generate_line_scatter\nfrom config import *\n\nif __name__ == '__main__':\n\n parser = arp.ArgumentParser(description='Plot ROC')\n parser.add_argum... | [
[
"numpy.genfromtxt"
],
[
"numpy.max",
"numpy.array",
"numpy.random.random",
"numpy.min"
],
[
"tensorflow.Graph",
"tensorflow.compat.v1.summary.merge_all",
"tensorflow.compat.v1.train.RMSPropOptimizer",
"numpy.clip",
"numpy.asarray",
"tensorflow.reduce_mean",
... |
nightfuryyy/mmpose | [
"93c3a742c540dfb4ca515ad545cef705a07d90b4",
"93c3a742c540dfb4ca515ad545cef705a07d90b4",
"93c3a742c540dfb4ca515ad545cef705a07d90b4",
"93c3a742c540dfb4ca515ad545cef705a07d90b4",
"910d9e31dd9d46e3329be1b7567e6309d70ab64c",
"93c3a742c540dfb4ca515ad545cef705a07d90b4"
] | [
"mmpose/models/backbones/vgg.py",
"mmpose/datasets/datasets/mesh/mesh_base_dataset.py",
"tests/test_post_processing.py",
"tests/test_backbones/test_resnet.py",
"mmpose/apis/inference.py",
"tests/test_backbones/test_mobilenet_v3.py"
] | [
"# Copyright (c) OpenMMLab. All rights reserved.\nimport torch.nn as nn\nfrom mmcv.cnn import ConvModule, constant_init, kaiming_init, normal_init\nfrom mmcv.utils.parrots_wrapper import _BatchNorm\n\nfrom ..builder import BACKBONES\nfrom .base_backbone import BaseBackbone\n\n\ndef make_vgg_layer(in_channels,\n ... | [
[
"torch.nn.Sequential",
"torch.nn.Dropout",
"torch.nn.Linear",
"torch.nn.MaxPool2d",
"torch.nn.ReLU"
],
[
"numpy.load",
"numpy.array",
"numpy.zeros",
"numpy.ones"
],
[
"numpy.array",
"numpy.random.random",
"numpy.random.rand",
"numpy.testing.assert_array_... |
yutliu/betterSAT | [
"db7c1b323f26ec19533a4b19804cf2c8a52643e5",
"fb983f43b12352f9ee6ae40b4e0954f6ba502fb8"
] | [
"videoanalyst/data/target/target_impl/utils/make_densebox_target.py",
"main/test.py"
] | [
"# encoding: utf-8\nfrom typing import Dict, Tuple\n\nimport numpy as np\n\n\ndef make_densebox_target(gt_boxes: np.array, config: Dict) -> Tuple:\n \"\"\"\n Model training target generation function for densebox\n\n Arguments\n ---------\n gt_boxes : np.array\n ground truth bounding boxes wit... | [
[
"numpy.minimum",
"numpy.abs",
"numpy.maximum",
"numpy.asarray",
"numpy.arange",
"numpy.ones",
"numpy.concatenate",
"numpy.ceil",
"numpy.argmax",
"numpy.argsort",
"numpy.meshgrid",
"numpy.zeros"
],
[
"torch.multiprocessing.set_start_method"
]
] |
lhcorralo/image-utils | [
"87e8fb9c1a6763d0dfa7a441ac105ccb9b6cc065"
] | [
"image_utils/image_utils.py"
] | [
"import argparse\nimport os\nimport rasterio as rio\nimport numpy as np\nimport cv2 as cv\nimport importlib.resources as pkg_resources\nfrom . import resources\n\n\n\ndef get_castellon_image_path():\n path_ctx = pkg_resources.path(resources, 'castellon.tif')\n return path_ctx\n\n\ndef generate(base_name, coun... | [
[
"numpy.ones"
]
] |
VictoriaLouiseS/improver | [
"a5c31be3430df429ae38e7c16e267fcbc2af1858"
] | [
"improver_tests/psychrometric_calculations/precip_phase_probability/test_PrecipPhaseProbability.py"
] | [
"# -*- coding: utf-8 -*-\n# -----------------------------------------------------------------------------\n# (C) British Crown Copyright 2017-2020 Met Office.\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following c... | [
[
"numpy.array",
"numpy.zeros"
]
] |
DrMatters/ParlAI | [
"755b9dcb778deb5a82029d69ae3260579c6450f1"
] | [
"parlai/agents/rag/retrievers.py"
] | [
"#!/usr/bin/env python3\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\"\"\"\nRetrievers for RAG.\n\"\"\"\nfrom abc import ABC, abstractmethod\nimport copy\nimport csv\nimport gzip\ni... | [
[
"torch.Tensor",
"torch.isnan",
"numpy.append",
"torch.mul",
"torch.FloatTensor",
"torch.cuda.is_available",
"torch.stack",
"numpy.argsort",
"numpy.array",
"sklearn.feature_extraction.text.TfidfVectorizer"
]
] |
mvernacc/lvreuse | [
"e2ac6aca334b49b0d4f5f881861cb42ce86dd130",
"e2ac6aca334b49b0d4f5f881861cb42ce86dd130"
] | [
"lvreuse/cost/indirect_ops.py",
"lvreuse/performance/payload.py"
] | [
"import numpy as np\n\ndef indirect_ops_cost(launch_rate, launch_provider_type):\n \"\"\"Find the indirect operations cost per launch.\n\n Arguments:\n launch_rate (positive scalar): launch rate [units: launches/year]\n launch_provider_type: letter designation indicating the launch provider type... | [
[
"numpy.interp"
],
[
"numpy.isnan",
"numpy.log",
"scipy.optimize.fsolve"
]
] |
leitro/research-WriterAdaptation-HTR | [
"224f7843b7c848cd7f04957168f7f8f5e4386afa"
] | [
"utils.py"
] | [
"import os\nimport numpy as np\nimport cv2\nimport loadData6_vgg as loadData\n\nHEIGHT = loadData.IMG_HEIGHT\nWIDTH = loadData.IMG_WIDTH\noutput_max_len = loadData.OUTPUT_MAX_LEN\ntokens = loadData.tokens\nnum_tokens = loadData.num_tokens\nvocab_size = loadData.num_classes + num_tokens\nindex2letter = loadData.inde... | [
[
"numpy.flip",
"numpy.vstack"
]
] |
thewtex/itkwidgets | [
"c8ac608aebf38479bc45ec20700f82456a26b2fc"
] | [
"itkwidgets/_transform_types.py"
] | [
"__all__ = ['to_itk_image', 'to_point_set', 'to_geometry', 'vtkjs_to_zarr', 'zarr_to_vtkjs']\n\nimport itk\nimport numpy as np\n\ndef is_arraylike(arr):\n return hasattr(arr, 'shape') and \\\n hasattr(arr, 'dtype') and \\\n hasattr(arr, '__array__') and \\\n hasattr(arr, 'ndim')\n\n# from IP... | [
[
"numpy.asarray",
"numpy.arange",
"numpy.ascontiguousarray",
"numpy.ones",
"numpy.concatenate",
"numpy.iinfo",
"numpy.array",
"numpy.flip",
"numpy.empty"
]
] |
RyanHonwad/Two-Samples-in-GANs | [
"190853e56d6e7843c0d991dc64658cfb3311135e"
] | [
"stacked_MNIST_experiments/unrolled_GAN_experiment/D=0.5G/utils.py"
] | [
"\"\"\"\nSome codes from https://github.com/Newmu/dcgan_code\n\"\"\"\nfrom __future__ import division\nimport math\nimport json\nimport random\nimport pprint\nimport scipy.misc\nimport numpy as np\nfrom time import gmtime, strftime\nfrom six.moves import xrange\n\nimport tensorflow as tf\nimport tensorflow.contrib.... | [
[
"numpy.sqrt",
"numpy.random.choice",
"numpy.arange",
"numpy.tile",
"tensorflow.trainable_variables",
"numpy.random.uniform",
"numpy.array",
"tensorflow.contrib.slim.model_analyzer.analyze_vars",
"numpy.zeros"
]
] |
spencerahill/aospy | [
"6c8df45705927476e140df903bcb88e5abadae22"
] | [
"aospy/test/test_utils_vertcoord.py"
] | [
"#!/usr/bin/env python\n\"\"\"Test suite for aospy.utils module.\"\"\"\nimport sys\nimport unittest\n\nimport numpy as np\n\nimport aospy.utils.vertcoord as vertcoord\n\n\nclass AospyUtilsTestCase(unittest.TestCase):\n def setUp(self):\n self.p_in_hpa = np.array([1000, 925, 850, 775, 700, 600, 500, 400, 3... | [
[
"numpy.concatenate",
"numpy.array"
]
] |
prakashcc/datacamp-python-data-science-track | [
"8d35b2d78e5f923c7320e33bfc7b038556efe30a"
] | [
"10.Merging DataFrames with pandas/Chapter 1 - Preparing data.py"
] | [
"#Chapter 1 - Preparing data\r\n#--------------------------------------------------------------------------------------------#\r\n\r\n\r\n#Reading DataFrames from multiple files in a loop\r\n# Import pandas\r\nimport pandas as pd\r\n\r\n# Create the list of file names: filenames\r\nfilenames = ['Gold.csv', 'Silver.... | [
[
"pandas.read_csv"
]
] |
zalayo/Hierarchical-Linkage-Regression | [
"0d6eb11affb3dbf452cd6ded6d564862f9ccb55f",
"0d6eb11affb3dbf452cd6ded6d564862f9ccb55f"
] | [
"HLRdata.py",
"libHLR.py"
] | [
"\r\nimport numpy as np\r\nfrom libHLR import randclust as rclust\r\n\r\n## set paths\r\ninputpath = './input/'\r\n\r\n## Generate Random Clustered Data for training and testing\r\n################################################################################\r\n## Total number of clustering instances\r\nK = 100\... | [
[
"numpy.savetxt",
"numpy.random.seed"
],
[
"numpy.random.seed",
"numpy.asarray",
"numpy.finfo",
"numpy.ones",
"numpy.concatenate",
"numpy.random.randn",
"numpy.shape",
"numpy.histogram2d",
"numpy.triu",
"numpy.random.uniform",
"sklearn.cluster.AgglomerativeCl... |
silverriver/AdaLabel | [
"baefd765d79d90869ed4d28f76418c1a39eb0ae8"
] | [
"onmt/utils/loss.py"
] | [
"\"\"\"\nThis includes: LossComputeBase and the standard NMTLossCompute, and\n sharded loss compute stuff.\n\"\"\"\nfrom __future__ import division\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nimport onmt\nfrom onmt.modules.sparse_losses import SparsemaxLoss\nfrom onmt.modu... | [
[
"torch.nn.functional.kl_div",
"torch.nn.NLLLoss",
"torch.full",
"torch.autograd.backward",
"torch.nn.functional.nll_loss",
"torch.min",
"torch.nn.functional.cross_entropy",
"torch.zeros_like",
"torch.lt",
"torch.tensor",
"torch.split",
"torch.topk",
"torch.gt"
... |
ruestefa/stormtrack | [
"e9378f013c406d387ea944c97e5adc68df864dee",
"e9378f013c406d387ea944c97e5adc68df864dee",
"e9378f013c406d387ea944c97e5adc68df864dee",
"e9378f013c406d387ea944c97e5adc68df864dee"
] | [
"tests/test_stormtrack/test_core/test_features/data/circle_on_globe_clat-10_rad-800_delta-0.5_dyntools.py",
"tests/test_stormtrack/test_core/test_features/data/circle_on_globe_clat-00_rad-800_delta-1.0_pyproj.py",
"tests/test_stormtrack/test_core/test_features/data/circle_on_globe_clat-00_rad-800_delta-1.0_dynt... | [
"import numpy as np\n\n# fmt: off\n\nclon, clat = 0.0, 10.0\nrad_km = 800.0\narea_km2 = np.pi*rad_km**2\n\nnlat, nlon = 31, 31\nlat1d = np.linspace(2.5, 17.5, nlat)\nlon1d = np.linspace(-7.5, 7.5, nlon)\nlat2d, lon2d = np.meshgrid(lat1d, lon1d)\n\n_, X = 0, 1\nmask = np.array([\n[_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_... | [
[
"numpy.array",
"numpy.meshgrid",
"numpy.linspace"
],
[
"numpy.array",
"numpy.meshgrid",
"numpy.linspace"
],
[
"numpy.array",
"numpy.meshgrid",
"numpy.linspace"
],
[
"numpy.array",
"numpy.meshgrid",
"numpy.linspace"
]
] |
tau-lex/market-analysis-system | [
"19926ca92bcab31a51fdac8f1910c8775d3d38d1",
"19926ca92bcab31a51fdac8f1910c8775d3d38d1"
] | [
"mas_mt/v0.4_simple_classifier/classifier_0_kfold.py",
"mas_tools/classes.py"
] | [
"# -*- coding: utf-8 -*-\nimport math\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nfrom mas_tools.os import get_parameters\nfrom mas_tools.ml import plot_history\nfrom mas_tools.data import create_timeseries_matrix\nfrom mas_tools.data import get_delta, get_diff, get_log_diff\nfrom mas_tools.data import ... | [
[
"matplotlib.pyplot.legend",
"sklearn.model_selection.cross_val_score",
"numpy.random.seed",
"matplotlib.pyplot.title",
"sklearn.metrics.matthews_corrcoef",
"sklearn.model_selection.train_test_split",
"sklearn.model_selection.KFold",
"numpy.genfromtxt",
"sklearn.metrics.confusio... |
braycarlson/warbler.py | [
"6746dc6479c9360811634c2d627606d788538d7e",
"6746dc6479c9360811634c2d627606d788538d7e"
] | [
"warbler.py/analyze/3.0-pdf.py",
"warbler.py/spectrogram/plot.py"
] | [
"import fitz\nimport io\nimport matplotlib\nimport pandas as pd\n\nfrom multiprocessing import cpu_count, Pool\nfrom natsort import os_sorted\nfrom parameters import BASELINE\nfrom path import DATA, INDIVIDUALS, PRINTOUTS\nfrom spectrogram.axes import SpectrogramAxes\nfrom spectrogram.plot import (\n create_lusc... | [
[
"matplotlib.use",
"pandas.read_excel"
],
[
"matplotlib.pyplot.yticks",
"matplotlib.collections.PatchCollection",
"matplotlib.pyplot.tight_layout",
"matplotlib.patches.Rectangle",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.subplot",
"matplotlib.gridspec.GridSpec",
... |
gokhanagma/nengo | [
"ee88870491af0dcec969f66613fdf4b2b68a92d4",
"55b5c4f7da351dfefd8b40eb14d2e47c1006cff0"
] | [
"nengo/tests/test_dists.py",
"nengo/networks/product.py"
] | [
"import time\n\nimport numpy as np\nimport pytest\n\nimport nengo.utils.numpy as npext\nfrom nengo.dists import (\n PDF,\n Choice,\n CosineSimilarity,\n DistOrArrayParam,\n Exponential,\n Gaussian,\n QuasirandomSequence,\n Samples,\n ScatteredHypersphere,\n SqrtBeta,\n Uniform,\n ... | [
[
"numpy.sqrt",
"numpy.linspace",
"numpy.cumsum",
"numpy.all",
"numpy.concatenate",
"numpy.max",
"numpy.mean",
"numpy.fill_diagonal",
"numpy.exp",
"numpy.histogram",
"numpy.allclose",
"numpy.arange",
"numpy.asfarray",
"numpy.std",
"numpy.diff",
"numpy.... |
canghaiyunfan/kaggle-dstl | [
"93d6509c1af86a3e9f7cdc6b98252960285f9b4e"
] | [
"make_submission_rssrai.py"
] | [
"#!/usr/bin/env python3\nimport argparse\nimport csv\nimport json\nimport gzip\nfrom functools import partial\nfrom pathlib import Path\nfrom multiprocessing.pool import Pool\nimport traceback\nfrom typing import List, Tuple, Set\n\nimport cv2\nimport numpy as np\n\nimport utils_rssrai\nfrom train_rssrai import Mod... | [
[
"numpy.save"
]
] |
JayaIngle12345/CNN | [
"da8f02027604da8d4618854d3b33c6b69d4b0205"
] | [
"gb_mod.py"
] | [
"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport pickle\nimport tensorflow as tf\nimport pandas as pd \nimport numpy as np \nimport os\nfrom tensorflow.python.framework import ops\nfrom tensorflow.python.ops import gen_nn_ops\n\nindices =[[0... | [
[
"tensorflow.contrib.layers.l1_l2_regularizer",
"tensorflow.cast",
"tensorflow.equal",
"numpy.mean",
"tensorflow.train.AdamOptimizer",
"tensorflow.keras.initializers.he_normal",
"pandas.read_csv",
"tensorflow.get_collection",
"tensorflow.gradients",
"tensorflow.layers.dense"... |
Michaelsqj/pytorch_connectomics | [
"abaf6ccb39fb2ec09f9fd0632a1294288678eb02"
] | [
"connectomics/data/dataset/dataset_tile.py"
] | [
"from __future__ import print_function, division\nfrom typing import Optional, List\nimport numpy as np\nimport json\nimport random\n\nimport torch\nimport torch.utils.data\n\nfrom . import VolumeDataset\nfrom ..augmentation import Compose\nfrom ..utils import crop_volume, relabel,seg_widen_border, tileToVolume \n\... | [
[
"numpy.array",
"numpy.zeros",
"numpy.prod"
]
] |
elan17/GamestonkTerminal | [
"f958f8275dc15ffaf30c1f0652f5b033725b7f10",
"f958f8275dc15ffaf30c1f0652f5b033725b7f10",
"f958f8275dc15ffaf30c1f0652f5b033725b7f10",
"f958f8275dc15ffaf30c1f0652f5b033725b7f10",
"f958f8275dc15ffaf30c1f0652f5b033725b7f10"
] | [
"gamestonk_terminal/stocks/options/pricing_controller.py",
"gamestonk_terminal/common/prediction_techniques/arima_view.py",
"discordbot/stocks/government/gtrades.py",
"tests/gamestonk_terminal/stocks/prediction_techniques/test_pred_controller.py",
"gamestonk_terminal/economy/alphavantage_view.py"
] | [
"\"\"\" Pricing Controller Module \"\"\"\n__docformat__ = \"numpy\"\n\nimport argparse\nfrom typing import List\nimport pandas as pd\nfrom tabulate import tabulate\nfrom prompt_toolkit.completion import NestedCompleter\nfrom gamestonk_terminal.rich_config import console\nfrom gamestonk_terminal import feature_flags... | [
[
"pandas.DataFrame"
],
[
"pandas.Series",
"pandas.date_range",
"matplotlib.pyplot.title",
"matplotlib.pyplot.plot",
"pandas.plotting.register_matplotlib_converters",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ion"
],
[
"matplotlib.pyplot.g... |
martinrohbeck/kartothek | [
"9314d66b2b35a64282945c6b6ae24d8bb5a51ed0"
] | [
"tests/io/dask/dataframe/test_read.py"
] | [
"import pickle\nfrom functools import partial\n\nimport pandas as pd\nimport pytest\nfrom pandas import testing as pdt\n\nfrom kartothek.io.dask.dataframe import read_dataset_as_ddf\nfrom kartothek.io.eager import store_dataframes_as_dataset\nfrom kartothek.io.testing.read import * # noqa\nfrom kartothek.io_compon... | [
[
"pandas.api.types.is_categorical",
"pandas.testing.assert_frame_equal",
"pandas.api.types.CategoricalDtype",
"pandas.DataFrame"
]
] |
m-triassi/ai-projects-472 | [
"feb82550c59e785ec5427b457e0c5d38e980a1d4"
] | [
"Project 2/line-em-upScoreboard.py"
] | [
"# based on code from https://stackabuse.com/minimax-and-alpha-beta-pruning-in-python\n\nimport time\nimport numpy as np\nfrom contextlib import redirect_stdout\nfrom random import randint\n\nclass Game:\n\tMINIMAX = 0\n\tALPHABETA = 1\n\tHUMAN = 2\n\tAI = 3\n\n\tdef __init__(self, recommend=True):\n\t\tn, s, t = s... | [
[
"numpy.full"
]
] |
wilson1yan/routing-transformer | [
"cc2700f54f1ade9b0d896f4d9cb8cbe896ae8e77"
] | [
"routing_transformer/routing_transformer.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport math\nfrom inspect import isfunction\nfrom operator import mul\nfrom functools import partial, reduce, wraps\n\nfrom local_attention import LocalAttention\nfrom axial_positional_embedding import AxialPositionalEmbedding\nfrom product_key_... | [
[
"torch.randint",
"torch.max",
"torch.cat",
"torch.randperm",
"torch.nn.Embedding",
"torch.no_grad",
"torch.finfo",
"torch.pow",
"torch.nn.Dropout",
"torch.ones",
"torch.einsum",
"torch.randn",
"torch.reshape",
"torch.ones_like",
"torch.nn.functional.pad"... |
kruus/pymde | [
"0bfa9c308660bda2fa5161ffce00ce22ef6e773b"
] | [
"pymde/util.py"
] | [
"\"\"\"Internal utilities.\"\"\"\nimport functools\nimport numbers\n\nimport numpy as np\nimport scipy.sparse\nimport torch\n\nfrom pymde.average_distortion import _project_gradient\n\n\n_DEVICE = torch.device(\"cpu\")\n\n\nclass SolverError(Exception):\n pass\n\n\ndef get_default_device():\n return str(_DEVI... | [
[
"torch.svd",
"numpy.sqrt",
"torch.zeros",
"torch.sin",
"torch.sum",
"torch.split",
"torch.device",
"torch.isclose",
"numpy.random.default_rng",
"torch.sqrt",
"torch.randn",
"torch.eye",
"numpy.stack",
"torch.tensor",
"torch.triu_indices",
"torch.cos"... |
zjzh/Paddle | [
"fdab43b56692c93a5a732108cca66638796ed66f"
] | [
"python/paddle/distributed/auto_parallel/planner.py"
] | [
"# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless re... | [
[
"numpy.array",
"numpy.random.seed",
"numpy.random.randint"
]
] |
maxim5/time_series_machine_learning | [
"819d0dc71078e2bd4d991c5759e52a3a973267b0",
"819d0dc71078e2bd4d991c5759e52a3a973267b0"
] | [
"poloniex/api.py",
"train/evaluator.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# See the full API here:\n# https://poloniex.com/support/api/\n\n__author__ = 'maxim'\n\n\nfrom six import string_types\nimport pandas as pd\n\nfrom util import *\n\n\nAVAILABLE_PERIODS = [300, 900, 1800, 7200, 14400, 86400]\n\n\ndef get_chart_data(pair, start_tim... | [
[
"pandas.read_json"
],
[
"numpy.abs",
"pandas.Series",
"numpy.power",
"numpy.sign",
"numpy.std",
"numpy.mean"
]
] |
mrsempress/OBMO_GUPNet | [
"4b03f372743a50c439aaedbb203c67394ab6a293"
] | [
"lib/datasets/kitti.py"
] | [
"import os\nimport numpy as np\nimport torch\nimport torch.utils.data as data\nimport torch.nn.functional as F\nfrom PIL import Image\nimport matplotlib.pyplot as plt\n\nfrom lib.datasets.utils import angle2class\nfrom lib.datasets.utils import gaussian_radius\nfrom lib.datasets.utils import draw_umich_gaussian\nfr... | [
[
"numpy.random.random",
"torch.utils.data.DataLoader",
"numpy.random.randn",
"numpy.array",
"numpy.zeros"
]
] |
Makarov-AA/CV-SUMMER-CAMP-2021 | [
"fa7154842a4b6b295b8fb1a9986329694a4410d0"
] | [
"practice/4_tracking/tracker.py"
] | [
"import numpy as np\nimport math\nimport logging as log\nimport sys\nfrom tqdm import tqdm\nfrom scipy.spatial.distance import cosine\nfrom common.feature_distance import calc_features_similarity\nfrom common.common_objects import DetectedObject, validate_detected_object, Bbox\nfrom common.common_objects import get... | [
[
"numpy.array",
"numpy.printoptions"
]
] |
cyberdeception/deepdig | [
"482061bc5039181a95631fcb8515d990eb2e16a9"
] | [
"ml/code/svm/classifiers/GloveClassifierv1.py"
] | [
"# This is a Python framework to compliment \"Peek-a-Boo, I Still See You: Why Efficient Traffic Analysis Countermeasures Fail\".\n# Copyright (C) 2012 Kevin P. Dyer (kpdyer.com)\n# See LICENSE for more details.\n\nimport arffWriter\nimport wekaAPI\nfrom glove import Glove\nimport numpy as np\n\n\nclass GloveClass... | [
[
"numpy.isnan",
"numpy.mean"
]
] |
raynardj/torchember | [
"635a6578760ede37c2b02b47be84e3bf773a18a4"
] | [
"torchember/whyhat.py"
] | [
"# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/20_why_hat.ipynb (unless otherwise specified).\n\n__all__ = ['md5hash', 'ModelInput', 'InputEmb', 'InputOneHot', 'InputConti', 'YEncoder', 'YOneHot', 'YConti',\n 'RichColumn', 'RichDF', 'TabularModel', 'TabularNN']\n\n# Cell\nimport pandas as pd\nimport num... | [
[
"torch.nn.BatchNorm1d",
"torch.LongTensor",
"torch.cat",
"numpy.clip",
"torch.nn.Tanh",
"torch.nn.Linear",
"torch.nn.BCEWithLogitsLoss",
"torch.FloatTensor",
"torch.nn.ReLU",
"torch.nn.MSELoss"
]
] |
rez-spb/OpenSeeFace | [
"be86991e7ac2855bf0f42f5816af6eb9a12706fb"
] | [
"facetracker.py"
] | [
"import copy\nimport os\nimport sys\nimport argparse\nimport traceback\nimport gc\n\nparser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)\nparser.add_argument(\"-i\", \"--ip\", help=\"Set IP address for sending tracking data\", default=\"127.0.0.1\")\nparser.add_argument(\"-p\", ... | [
[
"numpy.set_printoptions",
"numpy.zeros"
]
] |
petavazohi/PyChemia | [
"e779389418771c25c830aed360773c63bb069372",
"e779389418771c25c830aed360773c63bb069372",
"e779389418771c25c830aed360773c63bb069372"
] | [
"scripts/Report_Orbital.py",
"pychemia/utils/netcdf.py",
"pychemia/core/composition.py"
] | [
"#!/usr/bin/env python\n\nimport sys\nimport numpy as np\nimport pychemia\nfrom pychemia.visual.searcher import *\nfrom matplotlib.backends.backend_pdf import PdfPages\nimport matplotlib.pyplot as plt\nfrom pychemia.crystal import CrystalSymmetry\nimport matplotlib.lines as mlines\nimport matplotlib.patches as mpat... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.plot",
"numpy.mean",
"matplotlib.backends.backend_pdf.PdfPages",
"numpy.arange",
"numpy.sin",
"matplotlib.pyplot.close",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.subplots_adjust",
"matplotlib.pyplot.text",
"numpy.zeros"... |
asappresearch/compositional-inductive-bias | [
"2c67713306ec6591f397ca252f915c3edc5a794f"
] | [
"ulfs/gumbel.py"
] | [
"import torch\nfrom typing import Optional\nimport torch.nn.functional as F\n\n\ndef sample_gumbel(shape: torch.Size, eps: float = 1e-10):\n \"\"\"\n Sample from Gumbel(0, 1)\n based on\n https://github.com/ericjang/gumbel-softmax/blob/3c8584924603869e90ca74ac20a6a03d99a91ef9/Categorical%20VAE.ipynb ,\n... | [
[
"torch.FloatTensor",
"torch.nn.functional.softmax",
"torch.log",
"torch.rand"
]
] |
jkariukidev/geemap | [
"51cbd3169cd077f3666173a0c4b02e70f7207870"
] | [
"geemap/toolbar.py"
] | [
"\"\"\"Module for dealing with the toolbar.\n\"\"\"\nimport os\n\nimport ee\nimport ipyevents\nimport ipyleaflet\nimport ipywidgets as widgets\nfrom ipyfilechooser import FileChooser\nfrom IPython.core.display import display\n\nfrom .common import *\nfrom .timelapse import *\n\n\ndef tool_template(m=None):\n\n w... | [
[
"matplotlib.colorbar.ColorbarBase",
"pandas.read_csv",
"matplotlib.colors.Normalize"
]
] |
susumOyaji/chaquopy-matplotlib-master | [
"dda4a8da1391f968023bdd9d4b9c05e63b499390",
"dda4a8da1391f968023bdd9d4b9c05e63b499390",
"dda4a8da1391f968023bdd9d4b9c05e63b499390"
] | [
"app/src/main/python/main.py",
"app/src/main/python/KinoCode.py",
"app/src/main/python/kabu_pre10.py"
] | [
"import glob\nimport pandas as pd\nimport numpy as np\nimport torch\nimport torch.nn as nn\nfrom sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score, roc_auc_score\nimport torch.nn.functional as F\nimport torch.optim as optim\n\ndevice = torch.device(\"cuda\" if torch.cuda.is_available() ... | [
[
"sklearn.metrics.roc_auc_score",
"torch.sigmoid",
"pandas.read_csv",
"torch.load",
"torch.nn.LSTM",
"torch.manual_seed",
"numpy.arange",
"torch.nn.BCELoss",
"torch.tensor",
"numpy.round",
"torch.nn.Linear",
"numpy.zeros_like",
"torch.no_grad",
"torch.cuda.is... |
Hsy-Intel/fedlearner | [
"d5d0bb5549e115eaf0dec5a00a78dcb21ac0909d",
"d5d0bb5549e115eaf0dec5a00a78dcb21ac0909d",
"d5d0bb5549e115eaf0dec5a00a78dcb21ac0909d"
] | [
"example/sparse_model/follower.py",
"fedlearner/trainer/sparse_estimator.py",
"test/data_join/test_data_block_visitor.py"
] | [
"# Copyright 2020 The FedLearner Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.compat.v1.train.AdagradOptimizer",
"tensorflow.compat.v1.math.reduce_mean",
"tensorflow.compat.v1.train.FtrlOptimizer",
"tensorflow.compat.v1.zeros_initializer",
"tensorflow.compat.v1.train.get_or_create_global_step",
"tensorflow.compat.v1.FixedLenFeature",
"tensorflow.comp... |
lzhangbj/Tracking | [
"1cb3d28f95c6e9bbe27c1eec8b0cb19cc2045ff0"
] | [
"test_net.py"
] | [
"# --------------------------------------------------------\n# Tensorflow Faster R-CNN\n# Licensed under The MIT License [see LICENSE for details]\n# Written by Jiasen Lu, Jianwei Yang, based on code from Ross Girshick\n# --------------------------------------------------------\nfrom __future__ import absolute_impo... | [
[
"torch.load",
"torch.utils.data.DataLoader",
"torch.FloatTensor",
"torch.no_grad",
"torch.cuda.is_available",
"numpy.where",
"torch.autograd.Variable",
"numpy.copy",
"torch.sort",
"torch.nonzero",
"torch.LongTensor",
"torch.cuda.device_count",
"numpy.array",
... |
NitishaS-812k/Mp3-Encoder | [
"318342e62b93e6bc63fdb2735c24c62918e68231",
"318342e62b93e6bc63fdb2735c24c62918e68231",
"318342e62b93e6bc63fdb2735c24c62918e68231"
] | [
"subband_filtering.py",
"psychoacoustic.py",
"scaled_fft.py"
] | [
"import numpy as np\n\ndef subband_filtering(x, h):\n \"\"\" \n\n implementing the efficient version of the subband filter\n as specified by the MP3 standard\n\n Arguments:\n x: a new 512-point data buffer, in time-reversed order [x[n],x[n-1],...,x[n-511]].\n h: The prototype... | [
[
"numpy.arange",
"numpy.multiply"
],
[
"numpy.power",
"numpy.min",
"numpy.arange",
"numpy.int",
"numpy.copy",
"numpy.log10",
"numpy.argmin",
"numpy.zeros"
],
[
"numpy.absolute",
"numpy.multiply",
"numpy.fft.rfft",
"numpy.log10",
"numpy.hanning",
... |
sumanurawat/bert | [
"0f3a4fac1b886ec196868d469ea1fb410bd38e26"
] | [
"optimization.py"
] | [
"# coding=utf-8\n# Copyright 2018 The Google AI Language Team 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# Unl... | [
[
"tensorflow.train.polynomial_decay",
"tensorflow.multiply",
"tensorflow.constant",
"tensorflow.zeros_initializer",
"tensorflow.cast",
"tensorflow.gradients",
"tensorflow.train.get_or_create_global_step",
"tensorflow.clip_by_global_norm",
"tensorflow.square",
"tensorflow.tra... |
Chrisyunhua/cantools | [
"c0e3a92a23af997de20b4e3ceef323e1dd0f15ec"
] | [
"cantools/subparsers/plot.py"
] | [
"\n'''\nDecode \"candump\" CAN frames or the output of \"cantools decode\"\nread from standard input and plot them using matplotlib.\nYou can select which signals to plot by specifying them on the command line.\nEach signal is one argument and has the pattern \"[bo.]sg[:fmt]\"\nwhere bo is the name of the message, ... | [
[
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.show",
"matplotlib.pyplot.style.use",
"matplotlib.pyplot.savefig"
]
] |
juancanete86/Nuclei-Competition | [
"d66df6f79ca55f63b99ccd870886718450bc5403"
] | [
"Nuclei_keras.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sun Feb 25 11:42:23 2018\n\n@author: jcanete\n\"\"\"\n\nimport os\nimport sys\nimport random\nimport warnings\n\nimport numpy as np\nimport pandas as pd\n\nimport matplotlib.pyplot as plt\n\nfrom tqdm import tqdm\nfrom itertools import chain\nfrom... | [
[
"tensorflow.metrics.mean_iou",
"numpy.maximum",
"pandas.Series",
"tensorflow.test.gpu_device_name",
"tensorflow.local_variables_initializer",
"tensorflow.control_dependencies",
"numpy.arange",
"numpy.squeeze",
"tensorflow.identity",
"pandas.DataFrame",
"tensorflow.Confi... |
arthus701/algopy | [
"1e2430f803289bbaed6bbdff6c28f98d7767835c",
"1e2430f803289bbaed6bbdff6c28f98d7767835c",
"1e2430f803289bbaed6bbdff6c28f98d7767835c",
"1e2430f803289bbaed6bbdff6c28f98d7767835c"
] | [
"experimental/tests/scalar_reverse.py",
"experimental/tests/trash/unit_test_with_sympy.py",
"algopy/globalfuncs.py",
"algopy/__init__.py"
] | [
"#!/usr/bin/env python\n\ntry:\n\tfrom reverse_mode import *\nexcept:\n\timport sys\n\tsys.path = ['..'] + sys.path\n\tfrom reverse_mode import *\n\n#############################################################\n# TESTING CLASS TC\n#############################################################\n# TESTING ALL FUNCT... | [
[
"numpy.dot",
"numpy.array",
"numpy.prod"
],
[
"numpy.shape",
"numpy.random.random",
"numpy.linalg.norm",
"numpy.zeros"
],
[
"numpy.dot",
"numpy.imag",
"numpy.linalg.slogdet",
"numpy.ones",
"numpy.real",
"numpy.prod",
"numpy.isscalar",
"numpy.oute... |
WoutDavid/ST-nextflow-pipeline | [
"8de3da218ec4f10f183e1163fe782c19fd8dd841"
] | [
"src/quality_control/bin/createSpotDetectionQCHTML.py"
] | [
"import json\nfrom bs4 import BeautifulSoup\nimport pandas as pd\nimport sys\n\n# Argparsing\nargument_index = 1\ntemplate = sys.argv[argument_index]\nargument_index +=1\n\nrecall_json = sys.argv[argument_index]\nargument_index +=1\n\nrecall_plot = sys.argv[argument_index]\nargument_index +=1\n\nprecision_jsons_lis... | [
[
"pandas.DataFrame"
]
] |
Aria461863631/GraphGallery | [
"7b62f80ab36b29013bea2538a6581fc696a80201"
] | [
"graphgallery/attack/targeted/experimental/sga2.py"
] | [
"import numpy as np\nimport tensorflow as tf\nfrom numba import njit\n\nfrom tensorflow.keras.losses import sparse_categorical_crossentropy\nfrom graphadv.attack.targeted.targeted_attacker import TargetedAttacker\nfrom graphadv.utils.surrogate_utils import train_a_surrogate\n\nfrom graphgallery.nn.layers import SGC... | [
[
"numpy.hstack",
"tensorflow.device",
"tensorflow.nn.softmax",
"tensorflow.Variable",
"tensorflow.pow",
"numpy.union1d",
"numpy.tile",
"numpy.stack",
"numpy.ones",
"numpy.setdiff1d",
"tensorflow.gather",
"tensorflow.argsort",
"tensorflow.sparse.SparseTensor",
... |
hakunanatasha/deeplearning_genetics | [
"f8ae543e04bcacc8a668175b7f9ea2a50b02c5e2"
] | [
"preprocessing/preprocess.py"
] | [
"\"\"\"\n2021.01.31\nType-hinting would make some of these structures clearer.\n\nReturns a dataset of one-hot-encoded sequences of DNA and whether the motif of \ninterest is present or absent in the data.\n\nThis is done after \"datagen\" or \"make_data.sh\" is run.\n\"\"\"\n\nimport pandas as pd\nimport numpy as ... | [
[
"pandas.read_csv",
"torch.Tensor",
"sklearn.model_selection.StratifiedShuffleSplit",
"sklearn.preprocessing.LabelEncoder",
"numpy.zeros"
]
] |
dumpmemory/FLASH-pytorch | [
"8e0d2fd7925c0de9703d666ea2cc004327f6e544"
] | [
"train.py"
] | [
"from flash_pytorch import FLASHTransformer\nfrom flash_pytorch.autoregressive_wrapper import AutoregressiveWrapper\n\nimport random\nimport tqdm\nimport gzip\nimport numpy as np\nimport torch\nimport torch.optim as optim\nfrom torch.nn import functional as F\nfrom torch.utils.data import DataLoader, Dataset\n\n# c... | [
[
"torch.no_grad",
"torch.utils.data.DataLoader",
"torch.from_numpy"
]
] |
DBRTII/Deep-NILMtk | [
"cf6c50ec9891c17f9c626e23c0e1b6f488fefcb3",
"cf6c50ec9891c17f9c626e23c0e1b6f488fefcb3"
] | [
"deep_nilmtk/data/pre_process/preprocess.py",
"deep_nilmtk/models/pytorch/test/test_seq2point.py"
] | [
"import logging\n\nimport numpy as np\nimport pandas as pd\n\nfrom .normalize import normalize\n\ndef pad_data(data, sequence_length, pad_at_begin= False):\n \"\"\"\n Performs data padding for both target and aggregate consumption\n\n :param data: The aggregate power\n :type data: np.array\n :param c... | [
[
"numpy.concatenate",
"pandas.concat",
"numpy.zeros",
"pandas.DataFrame"
],
[
"numpy.random.random"
]
] |
AICPS/roadscene2vec | [
"aea84d3aa0e339a58fd92bbee3140df9fa4abde8",
"aea84d3aa0e339a58fd92bbee3140df9fa4abde8"
] | [
"roadscene2vec/learning/model/mrgcn.py",
"roadscene2vec/scripts/4_test_model.py"
] | [
"import os\nimport sys\n\nsys.path.append(os.path.dirname(sys.path[0]))\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torchnlp.nn import Attention\nfrom torch.nn import Linear, LSTM\nfrom torch_geometric.nn import RGCNConv, TopKPooling, FastRGCNConv\nfrom torch_geometric.nn import glob... | [
[
"torch.nn.functional.dropout",
"torch.nn.Linear",
"torch.cat",
"torch.nn.LSTM"
],
[
"torch.nn.CrossEntropyLoss"
]
] |
kuroko1t/nne | [
"184aa535ad588c1403520acaddca8e01b532e68d"
] | [
"examples/torch_example.py"
] | [
"import nne\nimport torchvision\nimport torch\nimport numpy as np\n\ninput_shape = (1, 3, 224, 224)\nmodel = torchvision.models.resnet34(pretrained=True).cuda()\n\ninput_data = np.array(np.random.random_sample(input_shape), dtype=np.float32)\noutput_data = nne.infer_torch(model, input_data)\n"
] | [
[
"numpy.random.random_sample"
]
] |
shubhada-2019/tsfresh | [
"ff69073bbb4df787fcbf277a611c6b40632e767d",
"ff69073bbb4df787fcbf277a611c6b40632e767d",
"ff69073bbb4df787fcbf277a611c6b40632e767d"
] | [
"tests/units/feature_selection/test_feature_significance.py",
"tests/units/feature_selection/test_checks.py",
"tsfresh/scripts/measure_execution_time.py"
] | [
"# -*- coding: utf-8 -*-\n# This file as well as the whole tsfresh package are licenced under the MIT licence (see the LICENCE.txt)\n# Maximilian Christ (maximilianchrist.com), Blue Yonder Gmbh, 2016\n\nfrom unittest import TestCase\n\nimport numpy as np\nimport pandas as pd\n\nfrom tsfresh.feature_selection.releva... | [
[
"numpy.sqrt",
"numpy.random.seed",
"numpy.random.poisson",
"numpy.random.normal",
"numpy.random.binomial"
],
[
"pandas.Series"
],
[
"pandas.read_csv",
"numpy.random.randn",
"numpy.random.seed",
"pandas.DataFrame"
]
] |
SharathRaparthy/DeepRL | [
"96cc5d586c63681b469eca38fcf20f988b7f1ced"
] | [
"deep_rl/utils/misc.py"
] | [
"#######################################################################\n# Copyright (C) 2017 Shangtong Zhang(zhangshangtong.cpp@gmail.com) #\n# Permission given to modify the code as long as you keep this #\n# declaration at the top #\n#######################... | [
[
"numpy.random.permutation"
]
] |
CognitiaAI/StreetFighterRL | [
"2b902ee7bb502336e1ba3f74ebeb09d843a75e73"
] | [
"agent/learning/pipeline/input_provider/normalized_one_hot_input_provider.py"
] | [
"import numpy as np\n\nfrom pipeline.input_provider.base_input_provider import BaseInputProvider\n\n\nclass NormalizedOneHotInputProvider(BaseInputProvider):\n def __init__(self):\n BaseInputProvider.__init__(self)\n self.__game_state = None\n self.__screen_shot = None\n\n def store(self,... | [
[
"numpy.array",
"numpy.zeros"
]
] |
YoanSallami/robot_monitor | [
"633ae1cfdc3fb6b49a48ac606e79d10f6ecc2801"
] | [
"scripts/robot_monitor_node.py"
] | [
"#!/usr/bin/env python\n# -*- coding: UTF-8 -*-\n\nimport math\nimport sys\nimport argparse\nimport rospy\nimport time\nimport tf2_ros\nfrom lxml import etree\nfrom collections import deque\nimport numpy\nimport yaml\nimport underworlds\nfrom std_msgs.msg import String\nfrom underworlds.types import Entity, Mesh, C... | [
[
"numpy.dot",
"numpy.allclose"
]
] |
andreashirley/Lolipop | [
"658a05c55fe8950f75d7ef50f1d983e86bd6fedf",
"658a05c55fe8950f75d7ef50f1d983e86bd6fedf"
] | [
"muller/graphics/heatmap.py",
"muller/graphics/distancegraphs.py"
] | [
"from pathlib import Path\n\nimport matplotlib\nimport matplotlib.pyplot as plt\n# plt.switch_backend('agg')\nimport pandas\nimport seaborn\n\ndef plot_heatmap(data: pandas.DataFrame, filename: Path):\n\tfont = {\n\t\t'size': 20\n\t}\n\tuse_annotations = len(data) < 20 # So the annotations are actually visible\n\t... | [
[
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.subplots",
"matplotlib.rc"
],
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig"
]
] |
jangirrishabh/Overcoming-exploration-from-demos | [
"3760d5329326d47c068fd0c65330a0abad7f0197"
] | [
"experiment/config.py"
] | [
"import numpy as np\nimport gym\nimport gym_gazebo\n\nimport sys\nsys.path.append('/home/rjangir/software/workSpace/Overcoming-exploration-from-demos/')\n\n\nfrom baselines import logger\nfrom ddpg import DDPG\nfrom her import make_sample_her_transitions\n\n\nDEFAULT_ENV_PARAMS = {\n 'FetchReach-v1': {\n ... | [
[
"numpy.array"
]
] |
rollingman1/audioset_tagging_cnn | [
"5036f772dfa8dd05fbfb0b6fa5bfedcea10cfb10"
] | [
"pytorch/inference.py"
] | [
"import os\nimport sys\n\nsys.path.insert(1, os.path.join(sys.path[0], '../utils'))\nimport numpy as np\nimport argparse\nimport librosa\nimport matplotlib.pyplot as plt\nimport torch\n\nfrom utilities import create_folder, get_filename\nfrom models import *\nfrom pytorch_utils import move_data_to_device\nimport co... | [
[
"matplotlib.pyplot.tight_layout",
"numpy.abs",
"torch.load",
"numpy.arange",
"torch.cuda.device_count",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"numpy.max",
"torch.no_grad",
"torch.cuda.is_available",
"torch.device",
"numpy.argsort",
"torch.nn... |
visitor9999th/Tensorflow_GP-GAN | [
"344efbfe4805fadf539151b18b7431a481c5c9ba"
] | [
"run_gp_gan.py"
] | [
"import argparse\nimport os\n\nimport cv2\nimport tensorflow as tf\n\nfrom gp_gan import gp_gan\nfrom model import EncoderDecoder\n\n#os.environ['CUDA_VISIBLE_DEVICES'] = '-1' # Disable GPU computation\n\nbasename = lambda path: os.path.splitext(os.path.basename(path))[0]\n\n\"\"\"\n Note: source image, destina... | [
[
"tensorflow.all_variables",
"tensorflow.placeholder",
"tensorflow.Session"
]
] |
mahiuchun/agents | [
"965e9868c3f921b33fddef37b5b9d1662e0ea448"
] | [
"tf_agents/bandits/policies/greedy_reward_prediction_policy.py"
] | [
"# coding=utf-8\n# Copyright 2018 The TF-Agents 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 b... | [
[
"tensorflow.fill",
"tensorflow.shape",
"tensorflow.argmax",
"tensorflow.gather",
"tensorflow.nest.flatten",
"tensorflow.nest.map_structure"
]
] |
ZibinGuo/Paddle | [
"6e0892312de5e4ba76d980ff0e4322ac55ca0d07",
"6e0892312de5e4ba76d980ff0e4322ac55ca0d07",
"6e0892312de5e4ba76d980ff0e4322ac55ca0d07",
"6e0892312de5e4ba76d980ff0e4322ac55ca0d07"
] | [
"python/paddle/nn/layer/rnn.py",
"python/paddle/fluid/tests/unittests/test_diag_v2.py",
"python/paddle/fluid/tests/unittests/xpu/test_prior_box_op_xpu.py",
"python/paddle/fluid/tests/unittests/test_trunc_op.py"
] | [
"# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless ... | [
[
"numpy.sum",
"numpy.prod"
],
[
"numpy.diag",
"numpy.random.random",
"numpy.allclose",
"numpy.ones",
"numpy.random.rand",
"numpy.random.randint"
],
[
"numpy.random.random",
"numpy.clip",
"numpy.tile",
"numpy.array",
"numpy.zeros"
],
[
"numpy.trunc... |
kafan1986/Peppa-Facial-Landmark-PyTorch | [
"238063317fd31c4c21c5c43692e6a5d769970370"
] | [
"utils/augmentation.py"
] | [
"import os\nimport numpy as np\nimport cv2\nimport random\nimport math\n\n\ndef Rotate_aug(src, angle, label=None, center=None, scale=1.0):\n image = src\n (h, w) = image.shape[:2]\n if center is None:\n center = (w / 2, h / 2)\n M = cv2.getRotationMatrix2D(center, angle, scale)\n if label is ... | [
[
"numpy.dot",
"numpy.amax",
"numpy.expand_dims",
"numpy.ones_like",
"numpy.meshgrid",
"numpy.clip",
"numpy.min",
"numpy.fliplr",
"numpy.asarray",
"numpy.ones",
"numpy.max",
"numpy.random.rand",
"numpy.float32",
"numpy.exp",
"numpy.array",
"numpy.zeros... |
kanguyn/Deep_Learning_Spring2018 | [
"90b65b2aa15ca19de570a3b99976906ed5533f67"
] | [
"Lab1-ANN-handwritten-digit-recognition/NeuralNetwork.py"
] | [
"import time\nimport random\nimport numpy as np\nfrom utils import *\nfrom transfer_functions import * \n\n\nclass NeuralNetwork(object):\n \n def __init__(self, input_layer_size, hidden_layer_size, output_layer_size, transfer_f=sigmoid, transfer_df=dsigmoid):\n \"\"\"\n input_layer_size: number... | [
[
"numpy.log",
"numpy.sqrt",
"numpy.ones",
"numpy.random.normal",
"numpy.argmax",
"numpy.count_nonzero",
"numpy.random.uniform",
"numpy.zeros",
"numpy.sum"
]
] |
joshbriegal/roto | [
"58694285932e101286e407bc521b2fa80e4eed47",
"58694285932e101286e407bc521b2fa80e4eed47"
] | [
"src/roto/methods/lombscargle.py",
"src/roto/methods/gacf.py"
] | [
"import logging\nfrom typing import Optional\n\nimport numpy as np\nimport progressbar\nfrom astropy.timeseries import LombScargle\nfrom matplotlib.axes import Axes\n\nfrom roto.methods.periodfinder import PeriodFinder, Periodogram, PeriodResult\n\nlogger = logging.getLogger(__name__)\n\n\nclass LombScarglePeriodFi... | [
[
"numpy.percentile",
"numpy.diff",
"numpy.nanmean",
"numpy.nanstd",
"numpy.logical_and"
],
[
"numpy.median",
"scipy.stats.median_abs_deviation",
"numpy.ceil",
"numpy.delete",
"numpy.array"
]
] |
HobnobMancer/cazy_webscraper | [
"3f74492f46db2093f7e6cd91fffcb8347694e54e"
] | [
"tests/test_crawler_get_html_pages.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n# (c) University of St Andrews 2020-2021\n# (c) University of Strathclyde 2020-2021\n# (c) James Hutton Institute 2020-2021\n#\n# Author:\n# Emma E. M. Hobbs\n#\n# Contact\n# eemh1@st-andrews.ac.uk\n#\n# Emma E. M. Hobbs,\n# Biomolecular Sciences Building,\n# Univer... | [
[
"pandas.to_datetime"
]
] |
eto/study | [
"95f506569657c174bf2347b5240768fafedaa285"
] | [
"0104/face_camera.py"
] | [
"#!/usr/bin/env python\n# from https://qiita.com/YomamaBanana/items/4197c4f9ec26a05416ed\n\n# ②モジュールをimportする\nimport yaml\n\nimport sys\nimport argparse\nfrom loguru import logger\n\nimport cv2\nimport numpy as np\nimport mediapipe as mp\n\nimport pyvirtualcam\n\n# VirtualCameraクラス\nclass VirtualCamera():\n def... | [
[
"numpy.ravel",
"numpy.array",
"numpy.zeros"
]
] |
liuyu2022/game_robot | [
"d4261219ba81eee844fd19ab691f45522e0b127a"
] | [
"lib/pyscreeze/__init__.py"
] | [
"# PyScreeze\r\n\r\n\"\"\"\r\nNOTE:\r\nApparently Pillow support on Ubuntu 64-bit has several additional steps since it doesn't have JPEG/PNG support out of the box. Description here:\r\n\r\nhttps://stackoverflow.com/questions/7648200/pip-install-pil-e-tickets-1-no-jpeg-png-support\r\nhttp://ubuntuforums.org/showth... | [
[
"numpy.arange",
"numpy.unravel_index"
]
] |
avivajpeyi/gw_pe_judge | [
"151d597fdd6128a278e1d4cff65d3e6776e1fa83",
"151d597fdd6128a278e1d4cff65d3e6776e1fa83"
] | [
"deep_gw_pe_followup/plotting/ci.py",
"tests/test_prob_calculators.py"
] | [
"import numpy as np\nimport pandas as pd\n\n\ndef plot_ci(x, y, ax, label='', alpha=0.7, zorder=-10):\n cols = ['#EE7550', '#F19463', '#F6B176']\n ci = bin_by(x, y)\n # plot the 3rd stdv\n ax.fill_between(ci.x, ci['5th'], ci['95th'], alpha=alpha, color=cols[2], zorder=zorder - 3)\n ax.fill_between(ci... | [
[
"numpy.digitize",
"numpy.percentile",
"numpy.delete",
"pandas.DataFrame"
],
[
"numpy.log",
"matplotlib.pyplot.tight_layout",
"numpy.sum",
"numpy.abs",
"matplotlib.pyplot.title",
"numpy.arange",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"pand... |
seva100/grid-artefacts-mwe | [
"c6914370ff6603dcf3fe0a9cb72221aa9dd9ebc1"
] | [
"train.py"
] | [
"import torch\nimport torch.nn as nn\nfrom backbone.model_resnet import ResNet_50\n\n# from tensorboardX import SummaryWriter\n# import wandb\n# from tqdm import tqdm\nimport time\nimport os\nfrom glob import glob\n\nif __name__ == '__main__':\n # os.makedirs(os.path.join(MODEL_ROOT, EXP_NAME), exist_ok=True)\n ... | [
[
"torch.nn.DataParallel"
]
] |
jsk389/lightkurve | [
"2fe031708f4c241b61796ccdacf658717b2ffa44"
] | [
"lightkurve/tests/test_targetpixelfile.py"
] | [
"from __future__ import division, print_function\n\nimport os\nfrom astropy.utils.data import get_pkg_data_filename\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom numpy.testing import assert_array_equal\nimport pytest\nimport tempfile\n\nfrom ..targetpixelfile import KeplerTargetPixelFile, KeplerTargetP... | [
[
"numpy.isnan",
"numpy.ones",
"numpy.all",
"numpy.testing.assert_array_equal",
"numpy.round",
"numpy.any",
"matplotlib.pyplot.close",
"numpy.isclose"
]
] |
leejaeyong7/OpenSfM | [
"893354cdd2f131782407d7d0be88c8fe92911b6f",
"893354cdd2f131782407d7d0be88c8fe92911b6f"
] | [
"opensfm/test/test_reconstruction_resect.py",
"opensfm/feature_loading.py"
] | [
"import numpy as np\nimport networkx as nx\n\nfrom opensfm import reconstruction\nfrom opensfm import multiview\nfrom opensfm import config\nfrom opensfm import types\nfrom opensfm.test import data_generation\n\n\ndef test_corresponding_tracks():\n t1 = {1: {\"feature_id\": 1}}\n t2 = {1: {\"feature_id\": 2}}... | [
[
"numpy.testing.assert_almost_equal",
"numpy.eye",
"numpy.random.rand"
],
[
"numpy.array"
]
] |
zhujun98/EXtra-foam | [
"680d6d7fd4afdcbc41eb8e440feac54b6cecab33",
"680d6d7fd4afdcbc41eb8e440feac54b6cecab33",
"680d6d7fd4afdcbc41eb8e440feac54b6cecab33"
] | [
"extra_foam/pipeline/processors/base_processor.py",
"extra_foam/algorithms/miscellaneous.py",
"extra_foam/gui/pyqtgraph/graphicsItems/GraphicsObject.py"
] | [
"\"\"\"\nDistributed under the terms of the BSD 3-Clause License.\n\nThe full license is in the file LICENSE, distributed with this software.\n\nAuthor: Jun Zhu <jun.zhu@xfel.eu>\nCopyright (C) European X-Ray Free-Electron Laser Facility GmbH.\nAll rights reserved.\n\"\"\"\nfrom abc import ABC, abstractmethod\nimpo... | [
[
"numpy.mean"
],
[
"numpy.copy",
"numpy.any"
],
[
"numpy.array",
"numpy.log10",
"numpy.nan_to_num"
]
] |
i-pan/kaggle-rsna-pe | [
"81ca9ee45014b7ef1647000492a4ef5fbad7126f",
"81ca9ee45014b7ef1647000492a4ef5fbad7126f"
] | [
"src/etl/08_create_train_df_with_pe_and_heart_probas.py",
"src/etl/04_write_sample_to_jpeg.py"
] | [
"import glob\nimport os, os.path as osp\nimport pandas as pd\n\n\ndef enumerate_slices(df):\n df = df.sort_values('ImagePositionPatient_2')\n df['SliceIndex'] = list(range(len(df)))\n return df\n\n\nPE_PROBA_DIR = '../../data/train-pe-probas/'\nHEART_PROBA_DIR = '../../data/train-heart-probas/'\n\n\npe_pro... | [
[
"pandas.read_csv"
],
[
"numpy.max",
"numpy.min",
"numpy.clip"
]
] |
nkeim/pims | [
"3c8f7832113517a37ddd65a2803a6b17f9c33e4c",
"3c8f7832113517a37ddd65a2803a6b17f9c33e4c"
] | [
"pims/tests/test_process.py",
"pims/tests/test_frame.py"
] | [
"from __future__ import (absolute_import, division, print_function,\n unicode_literals)\n\nimport six\n\nimport os\nimport unittest\nimport nose\nimport numpy as np\nfrom numpy.testing import assert_equal\nfrom pims import FramesSequence, Frame\nfrom pims.process import crop\n\n\nclass Random... | [
[
"numpy.testing.assert_equal",
"numpy.issubdtype",
"numpy.random.random",
"numpy.iinfo"
],
[
"numpy.isscalar",
"numpy.ones"
]
] |
ericl/ray | [
"b8669bc06c4535e1715b3a84ad193cdfa0e237f3",
"b8669bc06c4535e1715b3a84ad193cdfa0e237f3"
] | [
"python/ray/tests/test_advanced_3.py",
"python/ray/tests/test_memory_limits.py"
] | [
"# coding: utf-8\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport glob\nimport logging\nimport os\nimport setproctitle\nimport shutil\nimport sys\nimport socket\nimport subprocess\nimport tempfile\nimport time\n\nimport numpy as np\nimport pic... | [
[
"numpy.zeros",
"pandas.DataFrame"
],
[
"numpy.zeros"
]
] |
Jjschwartz/rltorch | [
"eeb2ad955f018d768db98c4a2be5da96a75579f6",
"eeb2ad955f018d768db98c4a2be5da96a75579f6"
] | [
"rltorch/utils/plot_utils.py",
"rltorch/algs/policy_gradients/REINFORCE/buffer.py"
] | [
"import numpy as np\n\n\ndef one_sided_ema(xolds, yolds, low=None, high=None, n=512, decay_steps=1.,\n low_counts_threshold=1e-8):\n \"\"\"From openai.baselines.common.plot_util.py\n\n perform one-sided (causal) EMA (exponential moving average)\n smoothing and resampling to an even grid wi... | [
[
"numpy.linspace",
"numpy.std",
"numpy.zeros_like",
"numpy.mean",
"numpy.exp"
],
[
"numpy.append",
"numpy.zeros",
"torch.from_numpy"
]
] |
fourjr/advent-of-code | [
"5f7a34be4d81957c3e8ca504e095786c823042ba"
] | [
"2020/Day 20/part2.py"
] | [
"import copy\nimport math\nimport re\nfrom collections import defaultdict\nfrom enum import Enum\nfrom typing import DefaultDict, Iterable, List, Set\n\nimport numpy as np\n\nfrom aoc import get_input_as, submit\n\n\ninp = get_input_as(str, sep='\\n\\n')\n\n\nclass FlipVariant(Enum):\n ORIGINAL = 0b0000\n V... | [
[
"numpy.flipud",
"numpy.rot90",
"numpy.fliplr",
"numpy.array"
]
] |
530824679/KPROI | [
"f485c83bb6401156653e1c60af92df5427aa1296"
] | [
"train.py"
] | [
"# -*- coding: utf-8 -*-\n# --------------------------------------\n# @Time : 2021/10/30 下午12:54\n# @Author : Oscar Chen\n# @Email : 530824679@qq.com\n# @File : train.py\n# @Software: PyCharm\n# Description : None\n# --------------------------------------\nfrom __future__ import absolute_import\nfrom __fut... | [
[
"torch.cuda.set_device",
"torch.utils.tensorboard.SummaryWriter",
"torch.cuda.is_available",
"torch.load"
]
] |
davidcoelho89/MLTool_python | [
"d8293ac73650028d9c8d8c101bfc3cb28a2ebb9f",
"d8293ac73650028d9c8d8c101bfc3cb28a2ebb9f"
] | [
"scripts_patternRecognition/lssvm_classifier.py",
"scripts_patternRecognition/data_loader.py"
] | [
"import numpy as np\nfrom numpy import dot, exp\nfrom scipy.spatial.distance import cdist\n\nclass LSSVM:\n 'Class that implements the Least-Squares Support Vector Machine.'\n \n def __init__(self, gamma=1, kernel='rbf', **kernel_params): \n \n self.gamma = gamma\n \n self.x ... | [
[
"numpy.dot",
"torch.cdist",
"torch.unique",
"torch.cuda.is_available",
"torch.where",
"torch.t",
"numpy.where",
"torch.mm",
"numpy.unique",
"torch.from_numpy",
"torch.tensor",
"numpy.argmax",
"torch.dot",
"numpy.zeros",
"torch.empty",
"scipy.spatial.... |
chongxi/vispy | [
"fa5e2eab9bb3d956f87ae68a56e342913e58a305",
"3683ea1f58e43b4aa1b32a3e69656bead8a31e99",
"cc17f94b0e60c7845320017e60b355245f8bafff"
] | [
"examples/basics/plotting/mpl_plot.py",
"examples/demo/scene/probe_view.py",
"examples/basics/visuals/dynamic_polygon.py"
] | [
"# -*- coding: utf-8 -*-\n# vispy: testskip\n# -----------------------------------------------------------------------------\n# Copyright (c) 2015, Vispy Development Team.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n# ------------------------------------------------------------------... | [
[
"numpy.fft.fft",
"numpy.arange",
"numpy.sin",
"numpy.argmax",
"numpy.fft.fftfreq",
"numpy.random.RandomState"
],
[
"numpy.hstack",
"numpy.ones_like",
"numpy.linspace",
"numpy.cos",
"numpy.sin",
"numpy.ones",
"numpy.array",
"numpy.zeros",
"numpy.empty... |
shixinlishixinli/openvino_training_extensions | [
"cd34e5ceb8ae016e14b8b43b033f82bd5e11949e",
"cd34e5ceb8ae016e14b8b43b033f82bd5e11949e"
] | [
"pytorch_toolkit/nncf/examples/object_detection/models/ssd_vgg.py",
"pytorch_toolkit/super_resolution/tools/infer_ie.py"
] | [
"\"\"\"\n Copyright (c) 2019 Intel Corporation\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 http://www.apache.org/licenses/LICENSE-2.0\n Unless required by applicable law or agr... | [
[
"torch.load",
"torch.nn.Conv2d",
"torch.nn.MaxPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
],
[
"numpy.clip"
]
] |
gitoni/geopandas | [
"6163bc92ab501c571e98bde737d80c464a9f50cc",
"6163bc92ab501c571e98bde737d80c464a9f50cc"
] | [
"geopandas/plotting.py",
"tests/test_geocode.py"
] | [
"from __future__ import print_function\n\nimport numpy as np\nfrom six import next\nfrom six.moves import xrange\n\n\ndef plot_polygon(ax, poly, facecolor='red', edgecolor='black', alpha=0.5):\n \"\"\" Plot a single Polygon geometry \"\"\"\n from descartes.patch import PolygonPatch\n a = np.asarray(poly.ex... | [
[
"matplotlib.pyplot.gca",
"numpy.asarray",
"numpy.dtype",
"matplotlib.pyplot.draw",
"matplotlib.pyplot.gcf",
"matplotlib.cm.ScalarMappable",
"matplotlib.cm.get_cmap",
"numpy.array"
],
[
"pandas.Series",
"pandas.np.isnan"
]
] |
egreen-park/oneplus | [
"5b2e6fa3aaf3514bbc5c98ccff9b0f97418cbd2d"
] | [
"selfdrive/ntune.py"
] | [
"import os\nimport fcntl\nimport signal\nimport json\nimport numpy as np\n\nCONF_PATH = '/data/ntune/'\nCONF_LQR_FILE = '/data/ntune/lat_lqr.json'\n\nntunes = {}\n\ndef file_watch_handler(signum, frame):\n global ntunes\n for ntune in ntunes.values():\n ntune.handle()\n\nclass nTune():\n def __init__(self, CP... | [
[
"numpy.array"
]
] |
mzient/vision | [
"6eac421ca2ea1ca52f49e10d7ac191c0d6900df1"
] | [
"torchvision/models/inception.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.utils.model_zoo as model_zoo\n\n\n__all__ = ['Inception3', 'inception_v3']\n\n\nmodel_urls = {\n # Inception v3 ported from TensorFlow\n 'inception_v3_google': 'https://download.pytorch.org/models/inception_v3_google-1a9a5a14.... | [
[
"torch.nn.functional.dropout",
"torch.cat",
"torch.utils.model_zoo.load_url",
"torch.nn.functional.avg_pool2d",
"torch.nn.Conv2d",
"scipy.stats.truncnorm",
"torch.nn.init.constant_",
"torch.unsqueeze",
"torch.nn.functional.adaptive_avg_pool2d",
"torch.nn.Linear",
"torch... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.