repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
JTT94/filterflow | [
"536f71105dc263472f54e80f2ef4ad5e4ee6621f"
] | [
"tests/resampling/differentiable/test_optimized.py"
] | [
"import tensorflow as tf\n\nfrom filterflow.base import State\nfrom filterflow.resampling.differentiable.loss.regularized import SinkhornLoss\nfrom filterflow.resampling.differentiable.optimized import OptimizedPointCloud\nfrom filterflow.resampling.differentiable.optimizer.sgd import SGD\nfrom filterflow.resamplin... | [
[
"tensorflow.constant",
"tensorflow.zeros",
"tensorflow.reduce_sum",
"tensorflow.random.uniform",
"tensorflow.math.log",
"tensorflow.logical_not"
]
] |
mikeryu/pover-t | [
"1c6b67f3eeae386f8a627b282f31b5d4483977dc"
] | [
"DAG/trim-nn.py"
] | [
"# %matplotlib inline\n\nimport os\nimport numpy as np\nimport pandas as pd\nimport matplotlib\nmatplotlib.use('TkAgg')\nimport matplotlib.pyplot as plt\n\nfrom sklearn.ensemble import RandomForestClassifier\nfrom keras.models import Sequential, Model\nfrom keras.layers import Dense, Input\nfrom keras import optimi... | [
[
"pandas.concat",
"pandas.read_csv",
"matplotlib.use",
"pandas.DataFrame",
"numpy.setdiff1d",
"numpy.ravel",
"pandas.get_dummies"
]
] |
18150167970/YOLOV3_pytorch | [
"0a0c872c6fe086e534224568082d7754790f0c07"
] | [
"dataset/vocdataset.py"
] | [
"import os\nimport numpy as np\nimport xml.etree.ElementTree as ET\nimport torch\nfrom torch.utils.data import Dataset\nimport cv2\nfrom pycocotools.coco import COCO\n\nfrom utils.utils import *\n\n\nclass VOCDataset(Dataset):\n \"\"\"\n COCO dataset class.\n \"\"\"\n def __init__(self, model_type, data... | [
[
"torch.from_numpy",
"numpy.stack",
"numpy.random.rand",
"numpy.transpose",
"numpy.flip",
"numpy.zeros"
]
] |
qcri/tasrif | [
"327bc1eccb8f8e11d8869ba65a7c72ad038aa094",
"327bc1eccb8f8e11d8869ba65a7c72ad038aa094",
"327bc1eccb8f8e11d8869ba65a7c72ad038aa094",
"327bc1eccb8f8e11d8869ba65a7c72ad038aa094",
"327bc1eccb8f8e11d8869ba65a7c72ad038aa094",
"327bc1eccb8f8e11d8869ba65a7c72ad038aa094"
] | [
"tasrif/test_scripts/test_pipeline_RenameOperator.py",
"tasrif/test_scripts/test_pipeline_AggregateActivityDatesOperator.py",
"tasrif/processing_pipeline/tests/test_scoped_processing_operator.py",
"tasrif/processing_pipeline/pandas/qcut_operator.py",
"tasrif/test_scripts/test_pipeline_SetIndexOperator.py",
... | [
"# ---\n# jupyter:\n# jupytext:\n# text_representation:\n# extension: .py\n# format_name: percent\n# format_version: '1.3'\n# jupytext_version: 1.7.1\n# kernelspec:\n# display_name: Python 3\n# language: python\n# name: python3\n# ---\n\n# %%\nimport pandas as pd\n\nfrom ... | [
[
"pandas.DataFrame"
],
[
"pandas.DataFrame"
],
[
"pandas.DataFrame"
],
[
"pandas.qcut"
],
[
"pandas.DataFrame"
],
[
"pandas.to_datetime"
]
] |
saadatshakeel/SoftwareLabPointNet | [
"1c197ae3ec76a0c2983e184f17f114fd9efe8c81"
] | [
"evaluate.py"
] | [
"import tensorflow.compat.v1 as tf\nimport numpy as np\nimport argparse\nimport socket\nimport importlib\nimport time\nimport os\nimport scipy.misc\nimport sys\nBASE_DIR = os.path.dirname(os.path.abspath(__file__))\nsys.path.append(BASE_DIR)\nsys.path.append(os.path.join(BASE_DIR, 'models'))\nsys.path.append(os.pat... | [
[
"tensorflow.compat.v1.ConfigProto",
"numpy.squeeze",
"tensorflow.compat.v1.Session",
"tensorflow.compat.v1.placeholder",
"numpy.argmax",
"tensorflow.compat.v1.Graph",
"numpy.array",
"tensorflow.compat.v1.train.Saver",
"numpy.zeros",
"numpy.sum"
]
] |
nordmtr/quantpy | [
"b23b4fea8c5028e2598790e6e418b02932ca59ca",
"b23b4fea8c5028e2598790e6e418b02932ca59ca"
] | [
"quantpy/operator.py",
"quantpy/polytope.py"
] | [
"from copy import deepcopy\n\nimport numpy as np\n\nfrom .base_quantum import BaseQuantum\nfrom .qobj import Qobj\nfrom .routines import _SIGMA_I, _SIGMA_X, _SIGMA_Y, _SIGMA_Z, _vec2mat\n\n\nclass Operator(BaseQuantum):\n \"\"\"Class for representing quantum operators\n\n Parameters\n ----------\n data ... | [
[
"numpy.log2",
"numpy.sqrt",
"numpy.cos",
"numpy.sin",
"numpy.array",
"numpy.exp",
"numpy.trace"
],
[
"numpy.dot",
"numpy.sqrt",
"numpy.min",
"numpy.tile",
"numpy.linalg.norm",
"numpy.all",
"numpy.random.rand",
"numpy.prod",
"numpy.array"
]
] |
jeremy9959/cnvkit | [
"b839a2b323113a7d318d216f61a0ed6657c70ed4",
"b839a2b323113a7d318d216f61a0ed6657c70ed4",
"b839a2b323113a7d318d216f61a0ed6657c70ed4"
] | [
"cnvlib/autobin.py",
"scripts/guess_baits.py",
"cnvlib/call.py"
] | [
"\"\"\"Estimate reasonable bin sizes from BAM read counts or depths.\"\"\"\nfrom __future__ import absolute_import, division, print_function\nimport logging\nimport os\nimport tempfile\n\nimport numpy as np\nimport pandas as pd\nfrom skgenome import tabio, GenomicArray as GA\n\nfrom . import coverage, samutil\nfrom... | [
[
"numpy.percentile"
],
[
"pandas.concat",
"numpy.array",
"numpy.nonzero"
],
[
"numpy.maximum",
"pandas.DataFrame"
]
] |
pohlt/streamlit | [
"852764f4f7d2bc06ddf932632df06c9104bf0a35",
"852764f4f7d2bc06ddf932632df06c9104bf0a35"
] | [
"lib/tests/streamlit/write_test.py",
"lib/tests/streamlit/keras_test.py"
] | [
"# Copyright 2018-2020 Streamlit 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/LICENSE-2.0\n#\n# Unless required by applicable law or ... | [
[
"numpy.array",
"pandas.DataFrame"
],
[
"tensorflow.python.keras.layers.Flatten",
"tensorflow.python.keras.layers.MaxPooling2D",
"tensorflow.python.keras.layers.Dense",
"tensorflow.python.keras.models.Sequential",
"tensorflow.python.keras.layers.Conv2D",
"tensorflow.python.keras... |
gummz/cell | [
"a741ca4900a11f1080b7572ac969f765e5ac2ffd",
"a741ca4900a11f1080b7572ac969f765e5ac2ffd"
] | [
"src/experiments/compare_filters/experiment_compare_filters.py",
"src/data/make_dataset_val.py"
] | [
"import os\nfrom os import listdir, makedirs\nfrom os.path import join\nimport pickle\nimport sys\nimport cv2\nimport matplotlib.pyplot as plt\nfrom PIL import Image\nimport numpy as np\nfrom time import time\nfrom skimage import filters # threshold_yen, frangi\nfrom skimage.exposure import rescale_intensity\n\nim... | [
[
"numpy.load",
"numpy.linspace"
],
[
"numpy.save",
"pandas.DataFrame"
]
] |
tilmanbeck/contextualized-topic-models | [
"53d3dc262dc2370a9d9052f798565833f2472320"
] | [
"CTM.py"
] | [
"from contextualized_topic_models.models.ctm import CTM\nfrom contextualized_topic_models.utils.data_preparation import TextHandler\nfrom contextualized_topic_models.utils.data_preparation import bert_embeddings_from_list\nfrom contextualized_topic_models.datasets.dataset import CTMDataset\nimport pandas as pd\nimp... | [
[
"numpy.argmax",
"pandas.read_csv",
"pandas.read_json"
]
] |
jvegreg/ESMValCore | [
"b46b948c47d8579d997b28501f8588f5531aa354",
"03eb1c942bf1dc3be98cb30c3592b42e82a94f16"
] | [
"esmvalcore/cmor/_fixes/cmip5/gfdl_cm2p1.py",
"esmvalcore/cmor/_fixes/native6/oras5.py"
] | [
"\"\"\"Fixes for GFDL CM2p1 model.\"\"\"\nfrom copy import deepcopy\n\nimport cftime\nimport numpy as np\n\nfrom esmvalcore.iris_helpers import date2num\n\nfrom ..cmip5.gfdl_esm2g import AllVars as BaseAllVars\nfrom ..fix import Fix\nfrom .cesm1_cam5 import Cl as BaseCl\n\nCl = BaseCl\n\n\nclass AllVars(BaseAllVars... | [
[
"numpy.stack"
],
[
"numpy.arange",
"numpy.array",
"numpy.vectorize",
"numpy.zeros"
]
] |
jkpawlowski96/Web-scraper | [
"5b6db52198b10e6de619a4db7e5a1ba652e98c45"
] | [
"app/database.py"
] | [
"from pymongo import MongoClient\nimport pandas as pd\nfrom bson.json_util import dumps\nfrom flask import make_response\n\n\ndef db_init():\n \"\"\"\n Initialize database connection and clear data in collection\n :return: MongoDB reference object\n \"\"\"\n client = MongoClient(\"mongodb+srv://admin... | [
[
"pandas.read_json"
]
] |
Sesamestrong/COCO_Utils | [
"998cfc9cdd93203c86011632cd8f45bcdc6eceb9"
] | [
"labelbox2coco.py"
] | [
"# Labelbox json file to COCO json files\n# Based on the LBExporters 0.1.1 file (https://pypi.org/project/LBExporters/), but heavily modified\n\n# Import libraries\nimport json\nimport datetime as dt\nimport logging\nimport requests\nfrom PIL import Image\nimport numpy as np\nimport os\n\nimport rasterio\nimport sh... | [
[
"numpy.array"
]
] |
hossein20s/CycleGAN-Tensorflow-2 | [
"272a886939d8ef81cf3dcc53df6b945ab375cc36"
] | [
"tf2gan/loss.py"
] | [
"import logging\n\nimport tensorflow as tf\n\nlogging.config.fileConfig(fname='log.conf')\nlogger = logging.getLogger('dev')\n\n\ndef get_gan_losses_fn():\n bce = tf.losses.BinaryCrossentropy(from_logits=True)\n\n def d_loss_fn(r_logit, f_logit):\n r_loss = bce(tf.ones_like(r_logit), r_logit)\n ... | [
[
"tensorflow.constant",
"tensorflow.reduce_mean",
"tensorflow.shape",
"tensorflow.maximum",
"tensorflow.random.uniform",
"tensorflow.ones_like",
"tensorflow.losses.MeanSquaredError",
"tensorflow.math.reduce_std",
"tensorflow.zeros_like",
"tensorflow.losses.BinaryCrossentropy... |
PatriciaXiao/Structured-Self-Attention | [
"a13208565e2ba313b151420aca0c36fae2f3da9b"
] | [
"classification.py"
] | [
"#You can write your own classification file to use the module\nfrom attention.model import StructuredSelfAttention\nfrom attention.train import train,get_activation_wts,evaluate\nfrom utils.pretrained_glove_embeddings import load_glove_embeddings\nfrom utils.data_loader import load_data_set\nfrom visualization.att... | [
[
"torch.nn.NLLLoss",
"torch.sum",
"torch.from_numpy",
"torch.nn.BCELoss"
]
] |
SamuelMarks/botorch | [
"7801e2f56dc447322b2b6c92cab683d8900e4c7f",
"7801e2f56dc447322b2b6c92cab683d8900e4c7f",
"7801e2f56dc447322b2b6c92cab683d8900e4c7f",
"7801e2f56dc447322b2b6c92cab683d8900e4c7f",
"7801e2f56dc447322b2b6c92cab683d8900e4c7f"
] | [
"botorch/utils/torch.py",
"test/utils/test_testing.py",
"test/test_cross_validation.py",
"botorch/acquisition/fixed_feature.py",
"test/posteriors/test_deterministic.py"
] | [
"#!/usr/bin/env python3\n# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\n# NOTE: To be removed once (if) https://github.com/pytorch/pytorch/pull/37385 lands\n\nfrom __future__ impor... | [
[
"torch.typename"
],
[
"torch.Size",
"torch.empty",
"torch.eye",
"torch.equal",
"torch.rand"
],
[
"torch.full_like",
"torch.Size"
],
[
"torch.as_tensor",
"torch.nn.Module.__init__",
"torch.cat"
],
[
"torch.randn",
"torch.Size",
"torch.zeros_li... |
zokin/human_body_prior | [
"0278cb45180992e4d39ba1a11601f5ecc53ee148"
] | [
"src/human_body_prior/visualizations/training_visualization.py"
] | [
"# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2019 Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (MPG),\n# acting on behalf of its Max Planck Institute for Intelligent Systems and the\n# Max Planck Institute for Biological Cybernetics. All rights reserved.\n#\n# Max-Planck-Gesellschaft zur Förderung ... | [
[
"numpy.sqrt",
"numpy.random.choice",
"torch.zeros",
"numpy.ones",
"numpy.array",
"numpy.zeros"
]
] |
yoohyewony/mcan | [
"5e6fa78ca76d05fa936d473d3cf7ca9c563a354e"
] | [
"core/exec_rubi.py"
] | [
"# --------------------------------------------------------\n# mcan-vqa (Deep Modular Co-Attention Networks)\n# Licensed under The MIT License [see LICENSE for details]\n# Written by Yuhao Cui https://github.com/cuiyuhao1996\n# --------------------------------------------------------\n\nfrom core.data.load_data imp... | [
[
"torch.sigmoid",
"torch.norm",
"torch.ones",
"numpy.pad",
"torch.load",
"torch.utils.data.DataLoader",
"torch.nn.BCELoss",
"numpy.argmax",
"torch.nn.DataParallel",
"numpy.array"
]
] |
Quik-e/Agilent-33220a-Remote-Control | [
"279b546b2ebd430fe137966130ad0f8c6410863c"
] | [
"agilent33220a_test.py"
] | [
"import agilent33220a as agi\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport arbitraryfunctions as af\r\n\r\ninstrument=agi.connect_device()\r\n#t=np.linspace(-32768,32767)\r\n#function=np.round(t/6553.6)\r\nfunction=af.mati()\r\nplt.plot(function)\r\nplt.show()\r\nprint(len(function))\r\ninstrum... | [
[
"matplotlib.pyplot.plot",
"matplotlib.pyplot.show"
]
] |
dwarf-miner/midas | [
"68ff19da4a1f1a095b9c37e2fd53b77a2e27e562"
] | [
"vision/common.py"
] | [
"#!/usr/bin/env python\r\n\r\n'''\r\nThis module contains some common routines used by other samples.\r\n'''\r\n\r\n# Python 2/3 compatibility\r\nfrom __future__ import print_function\r\nimport sys\r\nPY3 = sys.version_info[0] == 3\r\n\r\nif PY3:\r\n from functools import reduce\r\n\r\nimport numpy as np\r\nimpo... | [
[
"numpy.dot",
"numpy.minimum",
"numpy.maximum",
"numpy.linspace",
"numpy.asarray",
"numpy.eye",
"numpy.int16",
"numpy.arctan2",
"numpy.zeros_like",
"numpy.float64",
"numpy.interp",
"numpy.cross",
"numpy.ravel",
"numpy.array"
]
] |
adamomainz/pytorch | [
"09b90612c464c499a6ce6b92e57ba64546ba6adb",
"09b90612c464c499a6ce6b92e57ba64546ba6adb"
] | [
"test/fx2trt/converters/acc_op/test_split.py",
"test/test_fx_experimental.py"
] | [
"import torch\nimport torch.fx.experimental.fx_acc.acc_ops as acc_ops\nimport torch.nn as nn\nfrom torch.testing._internal.common_fx2trt import AccTestCase\nfrom parameterized import parameterized\n\n\nclass TestSplitConverter(AccTestCase):\n @parameterized.expand(\n [\n (\"split_size\", 3, 1),... | [
[
"torch.randn"
],
[
"torch.abs",
"torch._C._jit_try_infer_type",
"torch.randint",
"torch.cat",
"torch.fx.experimental.partitioner_utils.get_latency_of_partitioned_graph",
"torch.sum",
"torch.fx.passes.param_fetch.lift_lowering_attrs_to_nodes",
"torch.fx.operator_schemas.type... |
zhenfisher/scikit-learn | [
"be765c59542ced1e0fccbf531bef6705919474be"
] | [
"sklearn/neighbors/_base.py"
] | [
"\"\"\"Base and mixin classes for nearest neighbors\"\"\"\n# Authors: Jake Vanderplas <vanderplas@astro.washington.edu>\n# Fabian Pedregosa <fabian.pedregosa@inria.fr>\n# Alexandre Gramfort <alexandre.gramfort@inria.fr>\n# Sparseness support by Lars Buitinck\n# Multi-output suppo... | [
[
"numpy.split",
"numpy.sqrt",
"numpy.cumsum",
"numpy.dtype",
"numpy.all",
"numpy.any",
"numpy.where",
"numpy.hstack",
"scipy.sparse.issparse",
"numpy.unique",
"numpy.reshape",
"numpy.arange",
"numpy.diff",
"numpy.argpartition",
"numpy.ravel",
"numpy.z... |
mirceast/continuous-control | [
"d209b45b3db9eab10ca68cbd07e0e0a713fb071a"
] | [
"misc.py"
] | [
"import os\nimport numpy as np\nimport time\nfrom collections import deque\nimport glob\n\nimport matplotlib.pyplot as plt\nimport torch\n\n\ndef ddpg(agent, env, n_episodes=1000, max_t=1000, scores_window=100, progress_every=2, save_every=60, folder=None):\n brain_name = env.brain_names[0]\n brain = env.brai... | [
[
"numpy.abs",
"numpy.clip",
"numpy.arange",
"matplotlib.pyplot.subplots",
"numpy.std",
"numpy.mean",
"numpy.random.randn",
"numpy.savetxt",
"numpy.array",
"numpy.loadtxt"
]
] |
alex123012/biotite | [
"5702c6eb4e9a577954177788815b0f517c111c12",
"5702c6eb4e9a577954177788815b0f517c111c12",
"5702c6eb4e9a577954177788815b0f517c111c12",
"5702c6eb4e9a577954177788815b0f517c111c12",
"5702c6eb4e9a577954177788815b0f517c111c12"
] | [
"src/biotite/structure/io/pdb/file.py",
"tests/sequence/align/test_matrix.py",
"tests/structure/test_pdbqt.py",
"tests/application/test_tantan.py",
"src/biotite/structure/compare.py"
] | [
"# This source code is part of the Biotite package and is distributed\n# under the 3-Clause BSD License. Please see 'LICENSE.rst' for further\n# information.\n\n__name__ = \"biotite.structure.io.pdb\"\n__author__ = \"Patrick Kunzmann, Daniel Bauer\"\n__all__ = [\"PDBFile\"]\n\nimport warnings\nimport numpy as np\nf... | [
[
"numpy.abs",
"numpy.isnan",
"numpy.rad2deg",
"numpy.count_nonzero",
"numpy.array",
"numpy.zeros",
"numpy.where",
"numpy.isin"
],
[
"numpy.arange"
],
[
"numpy.allclose"
],
[
"numpy.array"
],
[
"numpy.mean"
]
] |
JungHoonJung/2021MD | [
"29bfae7a750217d50654e4973a2be6fb0d968bdf",
"29bfae7a750217d50654e4973a2be6fb0d968bdf",
"29bfae7a750217d50654e4973a2be6fb0d968bdf",
"29bfae7a750217d50654e4973a2be6fb0d968bdf"
] | [
"examples-master/python_examples/mc_sc_module.py",
"examples-master/python_examples/md_lj_module.py",
"examples-master/python_examples/sample_mean.py",
"examples-master/python_examples/md_nvt_lj_le.py"
] | [
"#!/usr/bin/env python3\n# mc_sc_module.py\n\n#------------------------------------------------------------------------------------------------#\n# This software was written in 2016/17 #\n# by Michael P. Allen <m.p.allen@warwick.ac.uk>/<m.p.allen@bristol.ac.... | [
[
"numpy.logical_not",
"numpy.dot",
"numpy.rint",
"numpy.sign",
"numpy.any",
"numpy.count_nonzero",
"numpy.where",
"numpy.sum",
"numpy.fabs"
],
[
"numpy.dot",
"numpy.rint",
"numpy.all",
"numpy.zeros_like",
"numpy.any",
"numpy.where",
"numpy.sum"
... |
syedhamzazaidi/CompGCN | [
"76de7466b18ee39416fd9fc0d45996f0caa60186"
] | [
"helper.py"
] | [
"import numpy as np, sys, os, random, pdb, json, uuid, time, argparse\nfrom pprint import pprint\nimport logging, logging.config\nfrom collections import defaultdict as ddict\nfrom ordered_set import OrderedSet\n\n# PyTorch related imports\nimport torch\nfrom torch.nn import functional as F\nfrom torch.nn.init impo... | [
[
"torch.Tensor",
"numpy.set_printoptions",
"torch.nn.init.xavier_normal_",
"torch.rfft",
"torch.stack"
]
] |
BendeguzToth/torchagents | [
"172a19e740406c650129da2a489943b13999b710"
] | [
"torchagents/agent.py"
] | [
"\"\"\"\nThis file implements the base agent class.\n\"\"\"\n\n# Standard libraries\nfrom abc import ABC, abstractmethod\nfrom typing import TypeVar\n\n# Third-party dependencies\nimport torch\n\n# Type definitions\nAction = TypeVar(\"Action\")\n# Need this for type hints, true base\n# class is hidden.\nScheduler =... | [
[
"torch.tensor"
]
] |
AlastairWiseman/ODE | [
"3fdfc18e8376dab8042c300db7bda91ad27c7c78"
] | [
"LinearStabilityDomains.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Sat Nov 11 13:59:10 2017\r\n\r\n@author: Alastair Wiseman\r\n\"\"\"\r\nimport matplotlib\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport matplotlib.patches as mpatches\r\nimport matplotlib.lines as mlines\r\n\r\n#set up Latex labeling\r\nmatplotlib... | [
[
"matplotlib.pyplot.gca",
"matplotlib.pyplot.contourf",
"numpy.abs",
"numpy.linspace",
"matplotlib.patches.Rectangle",
"matplotlib.lines.Line2D",
"numpy.conjugate",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.axes",
"numpy.exp",
"numpy.meshgrid",
"numpy.zeros",
... |
Tencent/TPAT | [
"6380a44ed1c2c35c97dc30768835197bfb79eeb1"
] | [
"python/plugin_template_params.py"
] | [
"##############################\n# author : qianqiu\n# email : qianqiu@tencent.com\n# time : 2022.1.7\n##############################\nimport os\nimport onnx\nfrom onnx import shape_inference\nimport onnx_graphsurgeon as gs\nimport onnxruntime as ort\nimport numpy as np\nfrom type_mapping import (\n tvm_to_c_typ... | [
[
"numpy.random.random"
]
] |
nahanoo/StrucFollower | [
"b61d87f3e65720b3c721b695b3a7484535ec8dfa"
] | [
"deletion_detection/deletion_detection.py"
] | [
"from os.path import join, exists\nfrom os import mkdir, remove\nfrom io import StringIO\nfrom subprocess import call, run as r, DEVNULL, STDOUT\nfrom Bio import SeqIO\nfrom Bio.SeqRecord import SeqRecord\nimport pandas as pd\nfrom .plotting import plot_alignment, plot_genbank\nimport pysam\n\n\nclass Deletion():\n... | [
[
"pandas.DataFrame"
]
] |
joramwessels/torcs-client | [
"257441138ebcce3928f100f28e58d9d5a7221d8a"
] | [
"ffnn_gears.py"
] | [
"import torch\nfrom torch.autograd import Variable\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.nn.functional as F\nimport time\nimport sys\nimport numpy as np\nimport argparse\nimport driver_support\nfrom os import listdir\nfrom os.path import isfile, join\nfrom collections import defaultdict\... | [
[
"torch.nn.CrossEntropyLoss",
"torch.LongTensor",
"torch.nn.Linear",
"torch.nn.functional.relu",
"torch.FloatTensor"
]
] |
hsivan/automon | [
"222b17651533bdb2abce7de36a80156ab7b9cc21",
"222b17651533bdb2abce7de36a80156ab7b9cc21",
"222b17651533bdb2abce7de36a80156ab7b9cc21"
] | [
"experiments/test_ablation_study_quadratic_inverse.py",
"automon/gm/gm_variance_node.py",
"automon/common_coordinator.py"
] | [
"from automon import AutomonNode, AutomonCoordinator, RlvNode, RlvCoordinator, SlackType, SyncType\nfrom test_utils.functions_to_monitor import func_quadratic_inverse\nfrom test_utils.data_generator import DataGeneratorQuadraticInverse\nfrom experiments.visualization.plot_monitoring_stats_ablation_study import plot... | [
[
"numpy.random.seed"
],
[
"numpy.sqrt",
"numpy.abs",
"numpy.linalg.norm",
"numpy.all",
"numpy.cbrt",
"scipy.optimize.minimize",
"scipy.optimize.NonlinearConstraint",
"numpy.array"
],
[
"numpy.logical_not",
"numpy.abs",
"numpy.nonzero",
"numpy.random.shuff... |
ijauregiCMCRC/Shared_Attention_for_APE | [
"c51ee9bd75c66906bddcd59d271f48e62dbd2636"
] | [
"onmt/modules/Embeddings.py"
] | [
"import torch\nimport torch.nn as nn\nfrom torch.autograd import Variable\n\nfrom onmt.modules import BottleLinear, Elementwise\nfrom onmt.Utils import aeq\n\n\nclass PositionalEncoding(nn.Module):\n\n def __init__(self, dropout, dim, max_len=5000):\n pe = torch.arange(0, max_len).unsqueeze(1).expand(max_... | [
[
"torch.nn.Sequential",
"torch.nn.Dropout",
"torch.sin",
"torch.load",
"torch.nn.Embedding",
"torch.arange",
"torch.nn.ReLU",
"torch.cos"
]
] |
MichaelSchreier/pyod | [
"10a29b9999cb1fc340f8d5335850952cdb4b5b46"
] | [
"pyod/models/mcd.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"Outlier Detection with Minimum Covariance Determinant (MCD)\n\"\"\"\n# Author: Yue Zhao <zhaoy@cmu.edu>\n# License: BSD 2 clause\n\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom sklearn.covariance import MinCovDet\nfrom sklearn.utils.validation import... | [
[
"sklearn.covariance.MinCovDet",
"sklearn.utils.validation.check_is_fitted",
"sklearn.utils.validation.check_array"
]
] |
hugobb/OnlineAttacks | [
"5cc971eba014e625ec43f67f6c5eadf713c4141c",
"5cc971eba014e625ec43f67f6c5eadf713c4141c"
] | [
"online_attacks/classifiers/mnist/models.py",
"online_attacks/classifiers/cifar/models/__init__.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom enum import Enum\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch\nimport os\n\n\nclass MnistModel(Enum):\... | [
[
"torch.nn.Dropout",
"torch.nn.Conv2d",
"torch.nn.Linear",
"torch.device",
"torch.nn.functional.max_pool2d"
],
[
"torch.device"
]
] |
aokad/GenomonToolkit | [
"d9fbe2dcd91271e47eab8b91fff792e3f7b7320c"
] | [
"subcode.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Nov 05 16:44:30 2015\n\n@brief: Common functions\n@author: okada\n\n$Id: subcode.py 199 2017-07-10 04:27:19Z aokada $\n$Rev: 199 $\n\"\"\"\n\n# ファイルがあるかチェック\ndef path_check(path, config):\n \n if config != None and config.has_option(\"MAIN\", \"path_check\"):\... | [
[
"pandas.DataFrame"
]
] |
phcanalytics/ibd_flare_model | [
"78da4640ab5a3a5d174d604d764f46059ee66dce"
] | [
"scripts/sql_query/06_cdiff_query.py"
] | [
"\"\"\"\n--------------------------------------------------------------------------------\nTitle: Query to persons in the IBD cohort with a clostridium difficile diagnosis\nAuthor: Ryan Gan\nDate Created: 2019-06-28\n\nThis script will generate permanent SQL table persons in our IBD cohort with a \ndiagnosis of C-d... | [
[
"pandas.read_sql"
]
] |
vt-sailbot/sailbot-20 | [
"b5d75cb82e4bc3e9c4e428a288c6ac98a4aa2c52",
"b5d75cb82e4bc3e9c4e428a288c6ac98a4aa2c52"
] | [
"src/buoy_detection/Distance_Calculator.py",
"src/tracking/kalman_filter.py"
] | [
"import numpy as np\nimport cv2\nfrom src.buoy_detection.Depth_Map_Calculator import Depth_Map\nfrom math import sin, cos, asin, atan2, pi\nimport os\nclass DistanceCalculator():\n path = os.path.realpath(__file__)[:-len(os.path.basename(__file__))] + \"stereo_calibration.npz\"\n\n def __init__(self, calibrat... | [
[
"numpy.rad2deg",
"numpy.ones"
],
[
"numpy.power",
"numpy.eye",
"numpy.ones",
"numpy.append",
"numpy.array"
]
] |
toddrme2178/OpenMDAO | [
"379cc6216d13d380e11cb3a46f03960981de4660",
"379cc6216d13d380e11cb3a46f03960981de4660",
"379cc6216d13d380e11cb3a46f03960981de4660",
"379cc6216d13d380e11cb3a46f03960981de4660",
"379cc6216d13d380e11cb3a46f03960981de4660"
] | [
"openmdao/components/structured_metamodel_util/scipy_interp.py",
"openmdao/recorders/tests/sqlite_recorder_test_utils.py",
"openmdao/drivers/tests/test_doe_driver.py",
"openmdao/components/tests/test_vector_magnitude_comp.py",
"openmdao/drivers/pyoptsparse_driver.py"
] | [
"\"\"\"Grid interpolation using scipy splines.\"\"\"\nfrom __future__ import division, print_function, absolute_import\n\nfrom six.moves import range\n\nfrom scipy import __version__ as scipy_version\ntry:\n from scipy.interpolate._bsplines import make_interp_spline as _make_interp_spline\nexcept ImportError:\n ... | [
[
"scipy.interpolate._bsplines.make_interp_spline",
"numpy.eye",
"numpy.empty_like",
"numpy.empty"
],
[
"numpy.array"
],
[
"numpy.array",
"numpy.ones"
],
[
"numpy.dot",
"numpy.testing.assert_almost_equal",
"numpy.set_printoptions",
"numpy.random.rand"
],
[... |
LauJames/QuestionMatching | [
"380e32ad4d884ecbf314fbb69b009f34a1f8f6a9"
] | [
"run_esim.py"
] | [
"#! /user/bin/evn python\n# -*- coding:utf8 -*-\n\n\"\"\"\n\n@Author : Lau James\n@Contact : LauJames2017@whu.edu.cn\n@Project : MVLSTM \n@File : run_esim.py\n@Time : 18-12-18 下午1:04\n@Software : PyCharm\n@Copyright: \"Copyright (c) 2018 Lau James. All Rights Reserved\"\n\"\"\"\n\nimport os\nimport sys\... | [
[
"tensorflow.summary.FileWriter",
"tensorflow.summary.scalar",
"sklearn.metrics.classification_report",
"sklearn.metrics.confusion_matrix",
"numpy.concatenate",
"tensorflow.global_variables_initializer",
"tensorflow.summary.merge_all",
"tensorflow.Session",
"tensorflow.train.Sav... |
guiwitz/napari-animation | [
"a2d94656d9ae86b7018afaeede683e7d9929717b"
] | [
"napari_animation/interpolation.py"
] | [
"import numbers\nfrom enum import Enum\nfrom functools import partial\n\nimport numpy as np\nfrom scipy.spatial.transform import Rotation as R\nfrom scipy.spatial.transform import Slerp\n\nfrom .utils import keys_to_list, nested_get, nested_set, quaternion2euler\n\n\ndef default(a, b, fraction):\n \"\"\"Default ... | [
[
"scipy.spatial.transform.Rotation.from_euler",
"numpy.log10",
"scipy.spatial.transform.Slerp",
"numpy.power"
]
] |
gifford-lab/seqgra | [
"3c7547878ecda4c00572746b8a07e0d614c9dbef",
"3c7547878ecda4c00572746b8a07e0d614c9dbef",
"3c7547878ecda4c00572746b8a07e0d614c9dbef",
"3c7547878ecda4c00572746b8a07e0d614c9dbef"
] | [
"docsrc/defs/md/PyTorch/o100-dna1000-conv100-gmp-fc100.py",
"seqgra/evaluator/metricsevaluator.py",
"docsrc/defs/md/PyTorch/o2-dna150-fc1000.py",
"docsrc/defs/md/PyTorch/o87-dna1000-chromdragonn.py"
] | [
"import math\n\nimport torch\n\n\nclass TorchModel(torch.nn.Module):\n def __init__(self):\n super().__init__()\n INPUT_CHANNELS: int = 4\n CONV_NUM_FILTERS: int = 10\n CONV_FILTER_WIDTH: int = 11\n FC_NUM_UNITS: int = 100\n OUTPUT_UNITS: int = 100\n\n self.conv =... | [
[
"torch.nn.Linear",
"torch.nn.AdaptiveMaxPool1d",
"torch.nn.ReLU"
],
[
"pandas.DataFrame"
],
[
"torch.nn.Linear",
"torch.nn.ReLU",
"torch.nn.Flatten"
],
[
"torch.nn.BatchNorm1d",
"torch.nn.Conv2d",
"torch.nn.Linear",
"torch.nn.MaxPool2d",
"torch.nn.functi... |
arthur-qiu/BasicSR | [
"2e5f131edfc2adf912a1ed3b8c818a63d590a282"
] | [
"codes/data/util.py"
] | [
"import os\nimport math\nimport pickle\nimport random\nimport numpy as np\nimport lmdb\nimport torch\nimport cv2\n\nIMG_EXTENSIONS = ['.jpg', '.JPG', '.jpeg', '.JPEG', '.png', '.PNG', '.ppm', '.PPM', '.bmp', '.BMP']\n\n####################\n# Files & IO\n####################\n\n\ndef is_image_file(filename):\n r... | [
[
"torch.abs",
"torch.linspace",
"numpy.expand_dims",
"numpy.dot",
"torch.floor",
"torch.sum",
"torch.from_numpy",
"numpy.matmul",
"numpy.frombuffer",
"numpy.copy",
"torch.FloatTensor",
"numpy.transpose"
]
] |
jataware/flee | [
"67c00c4572e71dd2bbfb390d7d7ede13ffb9594e"
] | [
"flee/postprocessing/analyze_graph.py"
] | [
"import matplotlib.pyplot as plt\nimport networkx as nx\n\n\ndef print_graph(vertices, edges, print_dist: bool = False) -> None:\n \"\"\"\n Summary\n\n Args:\n vertices (TYPE): Description\n edges (TYPE): Description\n print_dist (bool, optional): Description\n \"\"\"\n for v in ... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.savefig"
]
] |
RandolphVI/Text-Pairs-Relation-Classification | [
"25a746ac9e72efdc79c9d90af9769e02587cf650"
] | [
"RCNN/train_rcnn.py"
] | [
"# -*- coding:utf-8 -*-\n__author__ = 'Randolph'\n\nimport os\nimport sys\nimport time\nimport logging\n\nsys.path.append('../')\nlogging.getLogger('tensorflow').disabled = True\n\nimport numpy as np\nimport tensorflow as tf\nfrom tensorboard.plugins import projector\nfrom text_rcnn import TextRCNN\nfrom utils impo... | [
[
"tensorflow.train.global_step",
"tensorflow.Graph",
"tensorflow.summary.FileWriter",
"tensorflow.train.latest_checkpoint",
"tensorflow.local_variables_initializer",
"tensorflow.get_collection",
"tensorflow.global_variables",
"tensorflow.train.exponential_decay",
"tensorflow.Con... |
himanshukgp/Lyssandra | [
"994da67a8bf4a63561cf4d6c58c7e58722e192f7",
"994da67a8bf4a63561cf4d6c58c7e58722e192f7"
] | [
"lyssa/feature_extract/pooling.py",
"lyssa/feature_extract/preproc.py"
] | [
"import numpy as np\n\n\nclass sc_max_pooling:\n \"\"\"applies max pooling on the absolute values of the sparse codes in Z\"\"\"\n def __call__(self, Z):\n return np.max(np.abs(Z), axis=1)\n\n\nclass max_pooling:\n \"\"\"applies max pooling on the the sparse codes in Z\"\"\"\n def __call__(self, ... | [
[
"numpy.max",
"numpy.sum",
"numpy.abs"
],
[
"numpy.dot",
"numpy.maximum",
"numpy.sqrt",
"numpy.identity",
"numpy.mean"
]
] |
elyase/polyaxon | [
"1c19f059a010a6889e2b7ea340715b2bcfa382a0"
] | [
"polyaxon/hpsearch/search_managers/utils.py"
] | [
"import copy\nimport numpy as np\nimport uuid\n\nfrom functools import reduce\nfrom operator import mul\n\n\nclass Suggestion(object):\n \"\"\"A structure that defines an experiment hyperparam suggestion.\"\"\"\n\n def __init__(self, params):\n self.params = params\n\n def __eq__(self, other):\n ... | [
[
"numpy.random.RandomState"
]
] |
eyler94/ee674AirplaneSim | [
"3ba2c6e685c2688a7f372475a7cd1f55f583d10e",
"3ba2c6e685c2688a7f372475a7cd1f55f583d10e",
"3ba2c6e685c2688a7f372475a7cd1f55f583d10e"
] | [
"Submarine/chap7/mavsim_chap7.py",
"Submarine/chap8/mavsim_chap8.py",
"Airplane/chap10/autopilot.py"
] | [
"\"\"\"\nmavsim_python\n - Chapter 7 assignment for Beard & McLain, PUP, 2012\n - Last Update:\n 2/16/2019 - RWB\n\"\"\"\nimport sys\nsys.path.append('..')\nimport numpy as np\nimport parameters.simulation_parameters as SIM\n\nfrom chap2.mav_viewer import mav_viewer\nfrom chap3.data_viewer import data_... | [
[
"numpy.radians"
],
[
"numpy.radians"
],
[
"numpy.array",
"numpy.radians"
]
] |
ljhOfGithub/pytorch | [
"c568f7b16f2a98d72ff5b7c6c6161b67b2c27514",
"c568f7b16f2a98d72ff5b7c6c6161b67b2c27514",
"e5282c3cb8bf6ad8c5161f9d0cc271edb9abed25"
] | [
"torch/nn/functional.py",
"torch/nn/modules/container.py",
"torch/autograd/forward_ad.py"
] | [
"r\"\"\"Functional interface\"\"\"\nfrom typing import Callable, List, Optional, Tuple\nimport math\nimport warnings\n\nimport torch\nfrom torch import _VF\nfrom torch._C import _infer_size, _add_docstr\nfrom torch._torch_docs import reproducibility_notes, tf32_notes\n# A workaround to support both TorchScript and ... | [
[
"torch.zeros",
"torch.max_pool1d_with_indices",
"torch._C._add_docstr",
"torch.adaptive_max_pool1d",
"torch._C._nn.adaptive_avg_pool3d",
"torch._C._nn.relu6_",
"torch.bmm",
"torch.empty_like",
"torch._VF.feature_alpha_dropout_",
"torch.cosine_embedding_loss",
"torch.min... |
mediocretech/patchwork | [
"ad21c81611f74569e93f563d765cba2259b1d4b3",
"ad21c81611f74569e93f563d765cba2259b1d4b3",
"ad21c81611f74569e93f563d765cba2259b1d4b3"
] | [
"patchwork/tests/test_sample.py",
"patchwork/_fine_tuning_models.py",
"patchwork/tests/test_augment.py"
] | [
"# -*- coding: utf-8 -*-\nimport numpy as np\nimport pandas as pd\n\nfrom patchwork._sample import find_unlabeled, find_fully_labeled\nfrom patchwork._sample import find_partially_labeled\nfrom patchwork._sample import stratified_sample, unlabeled_sample\n\n\ntestdf = pd.DataFrame({\n \"filepath\":[\"a.jpg\"... | [
[
"pandas.DataFrame"
],
[
"tensorflow.keras.layers.GlobalMaxPool2D",
"tensorflow.keras.layers.GlobalAvgPool2D",
"tensorflow.keras.Model",
"tensorflow.keras.layers.Flatten",
"tensorflow.keras.layers.Input"
],
[
"tensorflow.constant",
"numpy.random.uniform",
"numpy.zeros"
... |
jain-harshil/Adapter-BERT | [
"fd74ed0eea21b13034f9a834244191846de6b8d5"
] | [
"trainer.py"
] | [
"import argparse\nimport glob\nimport json\nimport logging\nimport os\nimport random\nimport helper\nimport numpy as np\nimport torch\nfrom torch.utils.data import DataLoader, RandomSampler, SequentialSampler, TensorDataset\nfrom torch.utils.data.distributed import DistributedSampler\nfrom tqdm import tqdm, trange\... | [
[
"numpy.random.seed",
"torch.manual_seed",
"torch.utils.data.SequentialSampler",
"torch.utils.data.DataLoader",
"torch.utils.data.RandomSampler",
"numpy.argmax",
"torch.no_grad",
"torch.cuda.manual_seed_all"
]
] |
yzhou2890/demo | [
"7cbc43dc17680a199bc9376690f95cbf27dcafd6",
"7cbc43dc17680a199bc9376690f95cbf27dcafd6"
] | [
"demo_CamShift.py",
"demo_otsu.py"
] | [
"\n\n\n#-------------------\n# demo of mean-shift and camshift\n# http://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_video/py_meanshift/py_meanshift.html\n#-------------------\n\n\nimport numpy as np\nimport cv2\n\n\nvcap = cv2.VideoCapture(0)\nnw0 = vcap.get(cv2.CAP_PROP_FRAME_WIDTH)\nnh0 = vc... | [
[
"numpy.array"
],
[
"numpy.uint16",
"numpy.vstack"
]
] |
ADI10HERO/statsmodels | [
"d932507dc71c93b5d162a678042fb0701ee4bf57",
"d932507dc71c93b5d162a678042fb0701ee4bf57",
"d932507dc71c93b5d162a678042fb0701ee4bf57"
] | [
"statsmodels/tsa/statespace/simulation_smoother.py",
"statsmodels/tsa/statespace/dynamic_factor.py",
"statsmodels/multivariate/factor.py"
] | [
"\"\"\"\nState Space Representation, Kalman Filter, Smoother, and Simulation Smoother\n\nAuthor: Chad Fulton\nLicense: Simplified-BSD\n\"\"\"\n\nimport numpy as np\nfrom .kalman_smoother import KalmanSmoother\nfrom . import tools\n\nSIMULATION_STATE = 0x01\nSIMULATION_DISTURBANCE = 0x04\nSIMULATION_ALL = (\n SIM... | [
[
"numpy.array"
],
[
"numpy.dot",
"numpy.tril_indices",
"numpy.arange",
"numpy.eye",
"numpy.isnan",
"numpy.lexsort",
"numpy.concatenate",
"numpy.linalg.pinv",
"numpy.asanyarray",
"numpy.array_split",
"numpy.linalg.cholesky",
"numpy.diag_indices",
"numpy.ar... |
NicRSkinner/tensorflow | [
"4cb0397a8bcd5527a00418e04ac843ecd472de4a"
] | [
"tensorflow/contrib/learn/python/learn/tests/estimators_test.py"
] | [
"# Copyright 2016 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.constant",
"tensorflow.Variable",
"tensorflow.contrib.learn.python.learn.datasets.load_iris",
"tensorflow.test.main",
"tensorflow.contrib.layers.real_valued_column",
"tensorflow.contrib.learn.Estimator",
"tensorflow.train.MomentumOptimizer",
"tensorflow.no_op",
"ten... |
giovanism/pandas | [
"ac3056f2f13e5287dc66d09f31522f7fba592fec"
] | [
"pandas/tests/extension/json/test_json.py"
] | [
"import collections\nimport operator\n\nimport pytest\n\nimport pandas as pd\nimport pandas._testing as tm\nfrom pandas.tests.extension import base\n\nfrom .array import JSONArray, JSONDtype, make_data\n\n\n@pytest.fixture\ndef dtype():\n return JSONDtype()\n\n\n@pytest.fixture\ndef data():\n \"\"\"Length-100... | [
[
"pandas._testing.assert_series_equal",
"pandas._testing.assert_frame_equal",
"pandas.Series"
]
] |
quantumjot/napari | [
"3b92d9cba5a178d04c5b5231192448cc316a9bfd",
"f87e18641c529f6c592553b052805c9d75231b90"
] | [
"napari/_vispy/vispy_base_layer.py",
"napari/components/add_layers_mixin.py"
] | [
"from abc import ABC, abstractmethod\nfrom functools import lru_cache\nimport numpy as np\nfrom vispy.app import Canvas\nfrom vispy.gloo import gl\nfrom vispy.visuals.transforms import STTransform\n\n\nclass VispyBaseLayer(ABC):\n \"\"\"Base object for individual layer views\n\n Meant to be subclassed.\n\n ... | [
[
"numpy.all",
"numpy.array",
"numpy.zeros"
],
[
"numpy.take",
"numpy.empty"
]
] |
binghuang2018/aqml | [
"4901f3bd85db968fb3fc7ab97fd443421909d89d",
"4901f3bd85db968fb3fc7ab97fd443421909d89d"
] | [
"io2/__init__.py",
"lo/dmx.py"
] | [
"\nimport os,sys,time,re,fnmatch\nimport numpy as np\nimport ase.units as au\n\ndef timer(start,end):\n hours, rem = divmod(end-start, 3600)\n minutes, seconds = divmod(rem, 60)\n print((\"Time elapsed: {:0>2}:{:0>2}:{:05.2f}\".format(int(hours),int(minutes),seconds)))\n return\n\ndef cmdout(cmd):\n ... | [
[
"numpy.unique",
"numpy.min",
"numpy.arange",
"numpy.vectorize",
"numpy.load",
"numpy.array"
],
[
"numpy.unique",
"numpy.arange",
"numpy.cumsum",
"numpy.ones",
"numpy.concatenate",
"numpy.max",
"numpy.all",
"scipy.spatial.distance.pdist",
"numpy.array... |
mfreiwald/FromMotionToEmotion | [
"6417432ae56f1d9aabab1112e704671df8770a59"
] | [
"PCATest.py"
] | [
"from module.Configuration import Configuration\nfrom dask.distributed import Client\nimport logging\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.decomposition import PCA\nimport pandas as pd\nfrom module.Evaluation import Evaluation\n# from module.Cluster import Cluster\n\n\ndef main():\n\n c... | [
[
"sklearn.preprocessing.StandardScaler",
"sklearn.decomposition.PCA",
"pandas.DataFrame"
]
] |
dnxbjyj/python-basic | [
"14cba06cd84715ebb8acc6dd3cef84789316d81e"
] | [
"gui/wxpython/wxPython-demo-4.0.1/samples/floatcanvas/MovingTriangle.py"
] | [
"#!/usr/bin/env python\n\"\"\"\n\nThis is a small demo, showing how to make an object that can be moved around.\n\n\"\"\"\n\nimport wx\n\n#ver = 'local'\nver = 'installed'\n\nif ver == 'installed': ## import the installed version\n from wx.lib.floatcanvas import NavCanvas, Resources\n from wx.lib.floatcanvas ... | [
[
"numpy.asarray",
"numpy.array",
"numpy.sqrt"
]
] |
ansvver/pylufia | [
"0076b4baef1de5371476910c12c1829d694fa2f3"
] | [
"mir/feature/timbre/bark.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport scipy as sp\nfrom pylufia.signal.spectral import *\n\ndef _make_bark_filterbank(fs, framesize):\n \"\"\"\n Calculate Bark-band filterbank\n \"\"\"\n f_centers = sp.array([50,150,250,350,450,570,700,840,1000,1170,1370,1600,1850,2150,2500,2900,3400,4000,4800,5800,7000,85... | [
[
"scipy.zeros",
"scipy.absolute",
"scipy.arctan",
"scipy.arange",
"scipy.array",
"scipy.dot"
]
] |
juheerizwana/tensorflow | [
"eb67de2735cb0350c2bac9fbdf6635670aabd5ae"
] | [
"tensorflow/python/keras/__init__.py"
] | [
"# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.python.util.tf_export.keras_export",
"tensorflow.python.tf2.enabled"
]
] |
AlonKellner/hifi-gan | [
"e842836a0c879289c1848e922695ea1117715739",
"e842836a0c879289c1848e922695ea1117715739",
"e842836a0c879289c1848e922695ea1117715739"
] | [
"src/speech_distillation/custom_layers.py",
"src/speech_distillation/validation_visualization_callback.py",
"src/speech_distillation/multilabel_wave_dataset.py"
] | [
"from random import randint\r\n\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as f\r\nimport math\r\nfrom extra_utils import get_padding_period, get_padding\r\nfrom src.meldataset import mel_spectrogram\r\n\r\n\r\nclass Conv1dRechanneled(nn.Conv1d):\r\n def __init__(self, in_channels, ou... | [
[
"torch.div",
"torch.cat",
"torch.randn",
"torch.nn.functional.avg_pool2d",
"torch.nn.functional.one_hot",
"torch.nn.functional.pad"
],
[
"torch.cat"
],
[
"pandas.concat",
"torch.zeros",
"pandas.DataFrame",
"torch.FloatTensor",
"torch.nn.functional.pad"
]
] |
janmaltel/pytetris | [
"a60475c89ed0fd9666c6e0f1df42c63f62a5b2aa"
] | [
"tetris/board.py"
] | [
"import numpy as np\nimport numba\nfrom numba import njit, jitclass, float64, bool_, int64\n\n\n# Need to specify types for numba's @jitclass\nspec = [\n ('representation', bool_[:, :]),\n ('lowest_free_rows', int64[:]),\n ('changed_lines', int64[:]),\n ('pieces_per_changed_row', int64[:]),\n ('landi... | [
[
"numpy.minimum",
"numpy.arange",
"numpy.vstack",
"numpy.ones",
"numpy.mean",
"numpy.array",
"numpy.where",
"numpy.sum",
"numpy.zeros"
]
] |
sdmccabe/netrd | [
"f703c19b02f42c9f54bcab57014381da11dd58da",
"f703c19b02f42c9f54bcab57014381da11dd58da"
] | [
"netrd/distance/distributional_nbd.py",
"netrd/dynamics/branching_process.py"
] | [
"\"\"\"\ndistributional_nbd.py\n------\n\nDistributional Non-backtracking Spectral Distance.\n\n\"\"\"\n\nimport numpy as np\nimport networkx as nx\nimport scipy.sparse as sp\nfrom scipy.spatial.distance import euclidean, chebyshev\nfrom ..utilities.graph import unweighted\n\nfrom .base import BaseDistance\n\n\ncla... | [
[
"numpy.log",
"numpy.linalg.eigvals",
"numpy.split",
"numpy.abs",
"numpy.linspace",
"numpy.angle",
"scipy.sparse.bmat",
"numpy.random.RandomState"
],
[
"numpy.abs",
"numpy.nonzero",
"numpy.random.choice",
"numpy.round",
"numpy.random.poisson",
"numpy.rand... |
katherine-atwell/DiscourseSenser | [
"73008c9437a0466005be5f6d130050eece4069a6"
] | [
"dsenser/judge/judge.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8; mode: python; -*-\n\n\"\"\"Module providing class for judges classification.\n\nAttributes:\nJudge (class):\n class for merging judgments of different classifiers\n\n\"\"\"\n\n##################################################################\n# Imports\nfrom __future__... | [
[
"numpy.argmax",
"numpy.mean"
]
] |
adowaconan/variational_autoencoder_spindles | [
"0410fe86372ed50c5d136e7bbb13bbdf4dc4cc7b"
] | [
"old stuff/activiationFuns.py"
] | [
"\"\"\"Activations for TensorFlow.\nParag K. Mital, Jan 2016.\"\"\"\nimport tensorflow as tf\n\n\ndef lrelu(x, leak=0.2, name=\"lrelu\"):\n \"\"\"Leaky rectifier.\n\n Parameters\n ----------\n x : Tensor\n The tensor to apply the nonlinearity to.\n leak : float, optional\n Leakage param... | [
[
"tensorflow.variable_scope"
]
] |
jemiar/surgery-gesture-recog | [
"83b98c2ccd937c898eb731ccdf28c9248ce3df8d"
] | [
"transit_classification.py"
] | [
"import cv2\nimport os\nimport numpy as np\nimport tensorflow as tf\nfrom tensorflow import keras\nimport tensorflow.keras.layers as layers\nfrom data_generator import DataGenerator\n\nbase_directory = './'\n\n# function used to read video data and save normal or transit blocks to folder\ndef save_data(fromarray=tr... | [
[
"numpy.expand_dims",
"tensorflow.keras.Input",
"tensorflow.keras.layers.MaxPool3D",
"numpy.asarray",
"tensorflow.keras.layers.GlobalAveragePooling3D",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.DropOut",
"tensorflow.keras.layers.Conv3D",
"tensorflow.keras.Model",... |
Akshaykumarcp/ML-hyperparameter-optimization | [
"9348b5b497a9f545f2e0cfe58450fd837ba42cb2"
] | [
"0.3_search_based_CV/0.3.3.1_grid_search.py"
] | [
"\"\"\" Grid Search for Hyperparameters \"\"\"\r\n\r\nimport pandas as pd\r\nimport matplotlib.pyplot as plt\r\n# https://archive.ics.uci.edu/ml/datasets/Breast+Cancer+Wisconsin+(Diagnostic)\r\nfrom sklearn.datasets import load_breast_cancer\r\nfrom sklearn.ensemble import GradientBoostingClassifier\r\nfrom sklearn... | [
[
"sklearn.metrics.roc_auc_score",
"sklearn.model_selection.GridSearchCV",
"sklearn.datasets.load_breast_cancer",
"pandas.Series",
"sklearn.model_selection.train_test_split",
"pandas.DataFrame",
"sklearn.ensemble.GradientBoostingClassifier",
"matplotlib.pyplot.xlabel",
"matplotli... |
pk1601cs33/baseline | [
"3cbe990533dad15e67018b4e529d26845574fb67"
] | [
"python/baseline/tf/tfy.py"
] | [
"import tensorflow as tf\nimport numpy as np\nfrom tensorflow.python.layers import core as layers_core\nfrom baseline.utils import lookup_sentence, beam_multinomial\nimport os\n\n\ndef _find_files_by_type(model_file, filetype):\n \"\"\"Find all files by type, removing suffix\n\n we rely on the fact that vocab... | [
[
"tensorflow.layers.conv1d",
"tensorflow.get_variable",
"tensorflow.concat",
"tensorflow.contrib.rnn.GRUCell",
"tensorflow.control_dependencies",
"tensorflow.stack",
"tensorflow.reduce_sum",
"tensorflow.train.AdamOptimizer",
"tensorflow.python.layers.core.Dense",
"tensorflow... |
luxrck/ML-and-DL-course-work | [
"81b691cb0b4f6f63b4178f05cf309271a420e0dc"
] | [
"base/bert.py"
] | [
"import torch\nfrom torch.autograd import Variable\nfrom torch import nn, optim\nimport torch.nn.functional as F\n\nfrom transformers import BertForSequenceClassification, BertModel\n\n\nclass BertClassification(nn.Module):\n def __init__(self, model=\"bert-base-uncased\"):\n super().__init__()\n s... | [
[
"torch.nn.Linear",
"torch.nn.Dropout"
]
] |
WYVERN2742/pl_curves | [
"4688b3132318e28e51c9a80e32e0452f4caf972e"
] | [
"tests/test_calculate_cumulative_prop_trf.py"
] | [
"#!/usr/bin/env python3\nfrom pl_curve import calculate_cumulative_relative_abundance\nfrom pl_curve import remove_cumulative_abundance_over_one\nfrom pl_curve import calculate_cumulative_prop_trf\nimport pandas\nimport numpy as np\n\n\ndef test_calculate_cumulative_prop_trf():\n\n data1 = np.array([['', 'Step I... | [
[
"numpy.array",
"numpy.dtype",
"pandas.DataFrame"
]
] |
vibhavk/DrishtiShakti | [
"55f5c4ae48575ae58b8e4a4dde1d85be3d27a1f1"
] | [
"video_demo.py"
] | [
"from __future__ import division\nimport time\nimport torch \nimport torch.nn as nn\nfrom torch.autograd import Variable\nimport numpy as np\nimport cv2 \nfrom util import *\nfrom darknet import Darknet\nfrom preprocess import prep_image, inp_to_image\nimport pandas as pd\nimport random \nimport pickle as pkl\nimpo... | [
[
"torch.FloatTensor",
"torch.from_numpy",
"torch.cuda.is_available",
"torch.autograd.Variable"
]
] |
Sebashndz/Divisa | [
"928f634adffa09e3d14a3b8914ab716dc8e6aa92"
] | [
"Divisa_Functions.py"
] | [
"\n#Librerias para webservice_request(nit)\nfrom zeep import Client\nimport os\nimport codecs\n\n#Funciones para lectura de XML e\n#inserción del mismo en BD\n\nimport logging\nimport pyodbc\n\nimport pandas as pd\nimport numpy as np\n#xml\nfrom collections import OrderedDict\nimport xml.etree.ElementTree as ET\nim... | [
[
"pandas.concat",
"pandas.notnull",
"pandas.DataFrame",
"pandas.DataFrame.from_dict"
]
] |
YuxinZou/mmclassification | [
"2037260ea6c98a3b115e97727e1151a1c2c32f7a",
"2037260ea6c98a3b115e97727e1151a1c2c32f7a",
"2037260ea6c98a3b115e97727e1151a1c2c32f7a",
"2037260ea6c98a3b115e97727e1151a1c2c32f7a",
"2037260ea6c98a3b115e97727e1151a1c2c32f7a"
] | [
"mmcls/core/export/test.py",
"mmcls/datasets/base_dataset.py",
"tools/visualizations/vis_pipeline.py",
"mmcls/models/utils/embed.py",
"mmcls/models/losses/asymmetric_loss.py"
] | [
"# Copyright (c) OpenMMLab. All rights reserved.\nimport warnings\n\nimport numpy as np\nimport onnxruntime as ort\nimport torch\n\nfrom mmcls.models.classifiers import BaseClassifier\n\n\nclass ONNXRuntimeClassifier(BaseClassifier):\n \"\"\"Wrapper for classifier's inference with ONNXRuntime.\"\"\"\n\n def _... | [
[
"torch.cuda.device",
"torch.no_grad"
],
[
"numpy.array",
"numpy.vstack"
],
[
"numpy.concatenate",
"numpy.ascontiguousarray"
],
[
"torch.cat",
"torch.zeros",
"torch.nn.Linear",
"torch.nn.Unfold",
"torch.no_grad",
"torch.nn.functional.interpolate",
"to... |
volpatto/fluids | [
"693268d0fd7c9e2f276ebdf14353cb9d7dbac195",
"693268d0fd7c9e2f276ebdf14353cb9d7dbac195",
"693268d0fd7c9e2f276ebdf14353cb9d7dbac195"
] | [
"tests/test_design_climate.py",
"tests/test_control_valve.py",
"tests/test_jet_pump.py"
] | [
"# -*- coding: utf-8 -*-\n'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling.\nCopyright (C) 2016, 2017 Caleb Bell <Caleb.Andrew.Bell@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Sof... | [
[
"numpy.testing.assert_allclose"
],
[
"numpy.isclose",
"scipy.interpolate.splrep",
"numpy.testing.assert_allclose"
],
[
"numpy.linspace",
"numpy.testing.assert_allclose"
]
] |
src-d/formatml | [
"f052313391a5a2ca47af7859520f968c423024f1",
"f052313391a5a2ca47af7859520f968c423024f1"
] | [
"formatml/models/codrep_model.py",
"formatml/pipelines/codrep/run.py"
] | [
"from bisect import bisect_right\nfrom logging import getLogger\nfrom typing import Any, Dict, List, Optional\n\nfrom dgl import unbatch\nfrom torch.nn import LogSoftmax, Module, NLLLoss\n\nfrom formatml.models.model import Model\nfrom formatml.modules.graph_encoders.graph_encoder import GraphEncoder\nfrom formatml... | [
[
"torch.nn.LogSoftmax"
],
[
"torch.no_grad",
"torch.utils.data.DataLoader",
"torch.load"
]
] |
linyiyue/ray | [
"90d2456ec70270a1f894ec3ef6f3004533859e03",
"90d2456ec70270a1f894ec3ef6f3004533859e03",
"90d2456ec70270a1f894ec3ef6f3004533859e03",
"c18caa4db36d466718bdbcb2229aa0b2dc03da1f",
"90d2456ec70270a1f894ec3ef6f3004533859e03",
"c18caa4db36d466718bdbcb2229aa0b2dc03da1f"
] | [
"python/ray/tests/test_reference_counting.py",
"python/ray/util/sgd/v2/tests/test_trainer.py",
"python/ray/tune/tests/test_tune_restore.py",
"rllib/tests/test_external_multi_agent_env.py",
"python/ray/data/datasource/numpy_datasource.py",
"rllib/examples/custom_observation_filters.py"
] | [
"# coding: utf-8\nimport copy\nimport logging\nimport os\nimport sys\nimport time\n\nimport numpy as np\n\nimport pytest\n\nimport ray\nimport ray.cluster_utils\nimport ray._private.gcs_utils as gcs_utils\nfrom ray._private.test_utils import (\n SignalActor, kill_actor_and_wait_for_failure, put_object,\n wait... | [
[
"numpy.zeros",
"numpy.sum"
],
[
"torch.cuda.device_count",
"tensorflow.config.list_physical_devices"
],
[
"numpy.random.set_state",
"tensorflow.python.keras.datasets.cifar10.load_data",
"numpy.random.get_state",
"numpy.random.seed"
],
[
"numpy.unique"
],
[
"... |
PterosDiacos/jiant | [
"5aca4c5c54c4385708d3bda2d53420224ddf5dc3"
] | [
"scripts/winograd/preprocess_winograd.py"
] | [
"#!/usr/bin/env python\n\n\"\"\"\nThis file will preprocess the SuperGLUE Winograd Schema Challenge data, aligning the span indices\nto the tokenizaer of choice, and saving as a JSON file.\n\nAn example of the span index transformation is below:\n[Mr., Porter, is, nice] with span indices [0, 2] -> [Mr, ., Por, ter,... | [
[
"pandas.read_json"
]
] |
SLAMPAI/large-scale-pretraining-transfer | [
"730c1f25e56bbe5c70e5933f845824f98c015876"
] | [
"transfer_learning/datasets/padchest.py"
] | [
"import pandas as pd\nimport numpy as np\nimport os\nimport albumentations as A\nimport torch\nfrom torch.utils.data import Dataset\nimport random\n# import cv2\nfrom skimage.io import imread\nSEED = 42\nTRAIN_RATIO = 0.9\n\nclass PadChest(Dataset):\n \"\"\"\n PadChest dataset\n Hospital San Juan de Alican... | [
[
"pandas.read_csv",
"pandas.to_datetime",
"numpy.asarray",
"torch.from_numpy",
"numpy.ones",
"numpy.random.RandomState"
]
] |
adamzabek/Drug-Repurposing | [
"9dbe94305b17db1cb5dba2e9a27c38d07a97dad3"
] | [
"Code_ppi/Code/graphviz_plotting.py"
] | [
"import numpy as np\nimport pandas as pd\nimport networkx as nx\nimport matplotlib.pyplot as plt\nfrom matplotlib.colors import LinearSegmentedColormap\nimport graphviz\nimport matplotlib\nimport matplotlib.cm as cm\n\n\n# define which genes are targets of drugs\nrectangles = ['ACVR2A', 'AURKC', 'BRSK1', 'CDK17', '... | [
[
"pandas.read_csv",
"matplotlib.cm.ScalarMappable",
"matplotlib.colors.Normalize"
]
] |
marcelsan/OpenBot | [
"44b52d7155c3ad216231a6548361cafdaae5d5b3"
] | [
"policy/openbot/tfrecord_utils.py"
] | [
"\"\"\"\nCreated by Marcel Santos - Intel Intelligent Systems Lab - 2021\nThis script implements several utility routines for manipulating tensorflow records.\n\"\"\"\nimport tensorflow as tf\n\n\ndef image_feature(value):\n \"\"\"Returns a bytes_list from a string / byte.\"\"\"\n return tf.train.Feature(\n ... | [
[
"tensorflow.io.decode_jpeg",
"tensorflow.io.parse_single_example",
"tensorflow.io.FixedLenFeature",
"tensorflow.train.FloatList",
"tensorflow.image.convert_image_dtype",
"tensorflow.train.Features",
"tensorflow.io.encode_jpeg",
"tensorflow.train.Int64List"
]
] |
skristimorris/grocery-spending_skmorris | [
"88e441d258370263ba3920d30fafd14f8d8ac7ca"
] | [
"app.py"
] | [
"\"\"\"Track and analyze grocery spending at an item level.\n\nThis app allows a user to input a grocery item.\n\n\"\"\"\n\n# app.py\n\nimport dash\nimport dash_core_components as dcc\nimport dash_html_components as html\nimport dash_bootstrap_components as dbc\nfrom dash.dependencies import Input, Output, State\ni... | [
[
"pandas.read_csv",
"pandas.to_datetime",
"pandas.DataFrame.from_dict"
]
] |
drozzy/autonomous-learning-library | [
"67b27aa71e6689e3447f1b342296b4360419ac38",
"67b27aa71e6689e3447f1b342296b4360419ac38",
"67b27aa71e6689e3447f1b342296b4360419ac38"
] | [
"all/agents/dqn.py",
"all/bodies/vision.py",
"all/presets/continuous/ddpg.py"
] | [
"import numpy as np\nimport torch\nfrom torch.nn.functional import mse_loss\nfrom ._agent import Agent\n\n\nclass DQN(Agent):\n '''\n Deep Q-Network (DQN).\n DQN was one of the original deep reinforcement learning algorithms.\n It extends the ideas behind Q-learning to work well with modern convolution ... | [
[
"numpy.random.rand",
"numpy.random.randint"
],
[
"torch.device",
"torch.is_tensor",
"torch.cat"
],
[
"torch.optim.lr_scheduler.CosineAnnealingLR"
]
] |
skriegman/evometamaterials | [
"5975f132e31ff826fc18c025c61ed29545a7b8da"
] | [
"HomProp2D.py"
] | [
"import numpy as np\r\nimport scipy as sp\r\nfrom numpy import linalg as LA\r\nfrom scipy.sparse import coo_matrix, csc_matrix\r\nfrom scipy.sparse.linalg import spsolve\r\nimport cvxopt \r\nimport cvxopt.cholmod\r\n\r\n\r\ndef GetHomProp2D_PlaneStress(MetaDesign,E1,nu1,E2,nu2,Amat=np.eye(2)):\r\n# Get unit cell fu... | [
[
"scipy.sparse.coo_matrix",
"scipy.sparse.eye",
"numpy.arange",
"numpy.eye",
"numpy.ones",
"numpy.linalg.det",
"numpy.array",
"numpy.zeros",
"numpy.sum"
]
] |
Yokohide0317/transformers | [
"1089c30a4a3c56dcf017e500ba4b44e5c39f68dd",
"28e091430eea9e0d40839e56fd0d57aec262f5f9",
"1089c30a4a3c56dcf017e500ba4b44e5c39f68dd"
] | [
"tests/test_trainer.py",
"src/transformers/trainer_seq2seq.py",
"src/transformers/models/ctrl/modeling_tf_ctrl.py"
] | [
"# coding=utf-8\n# Copyright 2018 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# Unless requir... | [
[
"torch.optim.lr_scheduler.LambdaLR",
"torch.randint",
"torch.zeros",
"numpy.all",
"torch.cuda.is_available",
"torch.allclose",
"numpy.random.randint",
"torch.ones",
"numpy.allclose",
"torch.randn",
"torch.tensor",
"torch.nn.functional.mse_loss",
"torch.nn.Linear... |
6895mahfuzgit/Linear_Algebra_for_Machine_Learning | [
"3f266391491d9ab99e53a3547900c6b1bd657af1",
"3f266391491d9ab99e53a3547900c6b1bd657af1",
"3f266391491d9ab99e53a3547900c6b1bd657af1"
] | [
"eigonvector_using_numpy.py",
"matrix_inverse_using_numpy.py",
"trace_operator.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Sep 18 02:37:53 2021\n\n@author: Mahfuz_Shazol\n\"\"\"\n\nimport numpy as np\n\nA=np.array([\n [-1,4],\n [2,-2]\n ])\n\nlambdas,V=np.linalg.eig(A)\nprint('lambdas',lambdas)\n\n#each column is separate eivactor V\nprint('V',V)\n\n#A**v==Lamda**v\n\nv=V[:,0]\n... | [
[
"numpy.linalg.eig",
"numpy.dot",
"numpy.array"
],
[
"numpy.linalg.inv",
"numpy.dot",
"numpy.array"
],
[
"numpy.linalg.norm",
"torch.tensor",
"numpy.array",
"numpy.trace",
"torch.as_tensor"
]
] |
yuanliangxie/YOLOv3_simple_baseline | [
"325e2963ae770e6f45912f3142941d3bddaf9d6e",
"325e2963ae770e6f45912f3142941d3bddaf9d6e"
] | [
"models/model/poly_yolo.py",
"models/loss/centernet_hourglass_loss_module.py"
] | [
"import torch.nn as nn\nimport models.head.poly_yolo_head as yolov3_head\nimport models.backbone.poly_darknet.poly_darknet as darknet53\nimport models.backbone.poly_darknet.poly_neck as neck\nimport models.loss.poly_yolo_loss_anchor_free_module as loss\nfrom utils.logger import print_logger\nfrom models.layer.layer... | [
[
"numpy.fromfile",
"torch.ones",
"numpy.random.seed",
"torch.load",
"torch.nn.init.constant_",
"torch.manual_seed",
"torch.from_numpy",
"torch.nn.init.normal_",
"torch.cuda.manual_seed_all"
],
[
"torch.cat"
]
] |
udellgroup/gcimpute | [
"b29650e61785af904a3bff753ffc2995449883cf"
] | [
"gcimpute/marginal_imputation.py"
] | [
"import numpy as np\nfrom statsmodels.distributions.empirical_distribution import ECDF\nfrom scipy.stats import norm, poisson\n\ndef weighted_quantile(values, quantiles, sample_weight=None, \n values_sorted=False, old_style=True):\n \"\"\" \n Very close to numpy.percentile, but supports w... | [
[
"scipy.stats.norm.ppf",
"numpy.clip",
"numpy.empty_like",
"numpy.quantile",
"numpy.cumsum",
"numpy.sort",
"numpy.all",
"numpy.interp",
"numpy.round_",
"numpy.argsort",
"numpy.array",
"numpy.sum",
"numpy.isclose"
]
] |
Datatouille/pythainlp | [
"286c67bf75be53e9a90ad1078c2250a5769be8a3"
] | [
"pythainlp/word_vector/__init__.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nthai2fit - Thai word vector\nCode by https://github.com/cstorm125/thai2fit\n\"\"\"\nfrom typing import List, Tuple\n\nimport numpy as np\nfrom gensim.models import KeyedVectors\nfrom gensim.models.keyedvectors import Word2VecKeyedVectors\nfrom pythainlp.corpus import download as do... | [
[
"numpy.zeros"
]
] |
bo-miao/MAMP | [
"61c7ed01150f870084b93987bd528d855e2dbb50"
] | [
"functional/dataset/TestLoader.py"
] | [
"import os\nimport random\nimport json\nimport cv2\nimport numpy as np\nimport torch.utils.data as data\nimport torch\nimport torchvision.transforms as transforms\n\nfrom functional.utils.mask_io import read_mask\n\nvideo_names = None\n\n\ndef dataloader_davis(filepath):\n global video_names\n video_txt = fil... | [
[
"numpy.expand_dims",
"torch.Tensor",
"numpy.unique",
"torch.utils.data.keys",
"numpy.float32"
]
] |
openAIRoom/IQAAD | [
"d6a74558ea5335367be139b3d021f217b292fcda"
] | [
"anomaly_loss/ms_ssim.py"
] | [
"# -*- coding: utf-8 -*-\r\n# @Time : \r\n# @Author : \r\n# @Email : \r\n# @File : \r\n# @Software: \r\n\r\n\r\nimport torch\r\nimport torch.nn.functional as F\r\nimport torch.nn as nn\r\nfrom torch import Tensor\r\n\r\n\r\nclass SSIMLoss(nn.Module):\r\n def __init__(self, kernel_size: int = 11, sigma: ... | [
[
"torch.mean",
"torch.nn.functional.conv2d",
"torch.nn.functional.avg_pool2d",
"torch.nn.functional.interpolate",
"torch.arange",
"torch.stack",
"torch.pow"
]
] |
bateman/twitpersonality | [
"0d25ecf617f414f55f472144e8f57026b5cca1c3",
"0d25ecf617f414f55f472144e8f57026b5cca1c3"
] | [
"training/plot_LASSO_OCEAN.py",
"utilities/word_coverage.py"
] | [
"from sklearn.linear_model import Lasso\nfrom sklearn.metrics import mean_squared_error\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport datasetUtils as dsu\nimport embeddings\nimport sys\nimport os\n\n#configs\nmethod = \"conc\"\npost_threshold = 3\nx_scale = (0,5.5)\ny_scale = (0,5.5)\n\ndef savePlot(... | [
[
"matplotlib.pyplot.title",
"matplotlib.pyplot.ylim",
"numpy.arange",
"matplotlib.pyplot.savefig",
"numpy.random.shuffle",
"matplotlib.pyplot.plot",
"sklearn.metrics.mean_squared_error",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.clf",
"sklearn.linear_model.Lasso",
"ma... |
Prakhar016/GRE-admission-Predictor | [
"69ffbeb5aad59e513e94215e2e699de5f73f3505"
] | [
"GRE_COLLEGE_PREDICT.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Jul 23 18:35:16 2019\n\n@author: Prakhar\n\"\"\"\n\n\nimport numpy as np\nimport pandas as pd\nfrom sklearn.linear_model import LassoCV\ndf = pd.read_csv(\"Admission_Predict.csv\")\nx=df.iloc[:,1:-2].values\n\ny=df[df.columns[-1:]]\nls = LassoCV(cv=5, random_state=0)... | [
[
"numpy.array",
"pandas.read_csv",
"sklearn.linear_model.LassoCV"
]
] |
lev1khachatryan/ASDS_CV | [
"c9f0c0412002e929bcb7cc2fc6e5392977a9fa76",
"c9f0c0412002e929bcb7cc2fc6e5392977a9fa76"
] | [
"Classes/20191114-Semantic_Segmentation/experiments/experiment_segmentation/run.py",
"CaseStudies/Canny_Edge_Detector/Python/my_utils.py"
] | [
"import argparse\nfrom segmentation import SegModel\nimport tensorflow as tf\nimport os\n\nparser = argparse.ArgumentParser(description='')\nparser.add_argument('--dataset_path', dest='dataset_path',\n default='dataset/',\n help='name of the dataset')\nparser.add_argument('--ep... | [
[
"tensorflow.ConfigProto",
"tensorflow.Session",
"tensorflow.app.run"
],
[
"matplotlib.pyplot.imshow",
"matplotlib.image.imread",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
MarcelGM/transformers | [
"aad1d9b6d5c58fd974618ac0aead1c5bd1119467",
"aad1d9b6d5c58fd974618ac0aead1c5bd1119467",
"aad1d9b6d5c58fd974618ac0aead1c5bd1119467",
"aad1d9b6d5c58fd974618ac0aead1c5bd1119467",
"aad1d9b6d5c58fd974618ac0aead1c5bd1119467",
"aad1d9b6d5c58fd974618ac0aead1c5bd1119467",
"aad1d9b6d5c58fd974618ac0aead1c5bd111946... | [
"kk_development.py",
"examples/research_projects/bert-loses-patience/run_glue_with_pabee.py",
"examples/flax/language-modeling/run_mlm_flax.py",
"examples/research_projects/lxmert/processing_image.py",
"examples/legacy/run_openai_gpt.py",
"tests/test_modeling_deberta.py",
"examples/research_projects/dis... | [
"import torch\nfrom transformers import AutoConfig, AutoModelForSeq2SeqLM, BartTokenizer, BartForConditionalGeneration, BartExtendedForConditionalGeneration, BartConfig, BartExtendedModel\n\n# Loading trained model\nPATH = \"/home/ec2-user/moymarce/transformers/checkpoints/5-source_oracle-double/\"\ntokenizer = Bar... | [
[
"torch.Tensor"
],
[
"torch.load",
"numpy.squeeze",
"torch.utils.data.DataLoader",
"torch.no_grad",
"torch.cuda.manual_seed_all",
"torch.cuda.is_available",
"torch.device",
"torch.distributed.get_rank",
"torch.save",
"torch.distributed.init_process_group",
"torch... |
UditSinghParihar/d2-net | [
"f0d63609730b06e064c037256e0e40bac5b5ca43"
] | [
"lib/lossSIFT.py"
] | [
"import matplotlib\nimport matplotlib.pyplot as plt\n\nimport numpy as np\nimport cv2\nfrom sys import exit\n\nimport torch\nimport torch.nn.functional as F\n\nfrom lib.utils import (\n\tgrid_positions,\n\tupscale_positions,\n\tdownscale_positions,\n\tsavefig,\n\timshow_image\n)\nfrom lib.exceptions import NoGradie... | [
[
"torch.abs",
"matplotlib.pyplot.imshow",
"torch.transpose",
"torch.cat",
"numpy.asarray",
"torch.sum",
"torch.ones",
"torch.from_numpy",
"torch.inverse",
"matplotlib.pyplot.subplot",
"torch.nn.functional.relu",
"matplotlib.pyplot.close",
"matplotlib.pyplot.axis"... |
xhuohai/nncase | [
"cf7921c273c7446090939c64f57ef783a62bf29c"
] | [
"tests/importer/tflite_/basic/test_unary.py"
] | [
"# Copyright 2019-2021 Canaan 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/LICENSE-2.0\n#\n# Unless required by applicable law or ag... | [
[
"tensorflow.math.abs",
"tensorflow.math.sqrt",
"tensorflow.math.cos",
"tensorflow.math.negative",
"tensorflow.math.rsqrt",
"tensorflow.math.log",
"tensorflow.math.exp",
"tensorflow.math.sigmoid",
"tensorflow.math.sin",
"tensorflow.math.ceil",
"tensorflow.math.square",
... |
RicardoSerr/ProDy | [
"bdd7bab89d32033d20cd26bb17789f94ee4f7c02",
"bdd7bab89d32033d20cd26bb17789f94ee4f7c02",
"bdd7bab89d32033d20cd26bb17789f94ee4f7c02"
] | [
"prody/dynamics/analysis.py",
"prody/dynamics/functions.py",
"prody/proteins/header.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"This module defines functions for calculating physical properties from normal\nmodes.\"\"\"\n\nimport time\n\nimport numpy as np\n\nfrom prody import LOGGER\nfrom prody.atomic import Atomic\nfrom prody.ensemble import Ensemble, Conformation\nfrom prody.trajectory import TrajBase\nfro... | [
[
"numpy.diag",
"numpy.dot",
"numpy.sqrt",
"numpy.asarray",
"numpy.where",
"numpy.reshape",
"numpy.arange",
"numpy.eye",
"numpy.stack",
"numpy.finfo",
"numpy.diff",
"numpy.outer",
"numpy.zeros",
"numpy.append",
"numpy.array",
"numpy.vdot",
"numpy.a... |
haowu74/advanced-lane-lines | [
"5daf8572e132ee42a3309ff6f73680301cc8953c"
] | [
"src/color_gradient_threshold.py"
] | [
"import numpy as np\nimport cv2\nimport matplotlib.pyplot as plt\nimport matplotlib.image as mpimg\nimport pickle\n\ndef abs_sobel_thresh(img, orient='x', sobel_kernel=3, thresh=(0, 255)):\n # Apply the following steps to img\n # 1) Convert to grayscale\n gray = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)\n #... | [
[
"numpy.absolute",
"numpy.multiply",
"numpy.arctan2",
"numpy.max",
"numpy.zeros_like"
]
] |
arbenton/garage | [
"5c398255fbfae375370483f18216996d82590a88",
"5c398255fbfae375370483f18216996d82590a88",
"96cb8887fcae90531a645d540653010e7fe10fcc",
"5c398255fbfae375370483f18216996d82590a88"
] | [
"tests/garage/tf/core/test_mlp.py",
"src/garage/experiment/experiment.py",
"src/garage/tf/distributions/categorical.py",
"tests/garage/tf/models/test_mlp_model.py"
] | [
"import numpy as np\nimport tensorflow as tf\n\nfrom garage.tf.core.mlp import mlp\nfrom tests.fixtures import TfGraphTestCase\n\n\nclass TestMLP(TfGraphTestCase):\n def setup_method(self):\n super(TestMLP, self).setup_method()\n self.obs_input = np.array([[1, 2, 3, 4]])\n input_shape = self... | [
[
"tensorflow.get_variable",
"tensorflow.matmul",
"tensorflow.nn.moments",
"tensorflow.placeholder",
"numpy.testing.assert_array_equal",
"tensorflow.global_variables_initializer",
"tensorflow.variable_scope",
"numpy.not_equal",
"tensorflow.sqrt",
"numpy.array",
"numpy.tes... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.