repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
LinkageIO/Camoco | [
"c77cb4cda840838be8cd0a65c92b2c6b187a7c0b"
] | [
"camoco/COB.py"
] | [
"#!/usr/bin/python3\n\nimport warnings\n\nwarnings.simplefilter(action=\"ignore\", category=FutureWarning)\n\nimport camoco.PCCUP as PCCUP\n\n\nfrom .Camoco import Camoco\nfrom .RefGen import RefGen\nfrom .Locus import Locus, Gene\nfrom .Expr import Expr\nfrom .Tools import memoize, available_datasets\nfrom .Term i... | [
[
"scipy.sparse.csgraph.connected_components",
"matplotlib.pyplot.rc_context",
"scipy.cluster.hierarchy.set_link_color_palette",
"pandas.DataFrame.from_items",
"matplotlib.colors.XKCD_COLORS.copy",
"scipy.stats.pearsonr",
"numpy.where",
"numpy.nanmean",
"matplotlib.patches.Ellips... |
XC-Li/DL_Final_Project_Group_1 | [
"6b7fadc3066688a3adba4a8e8a279a24611bb0af"
] | [
"Xiaochi-Li-individual-project/Code/V2_helper.py"
] | [
"\"\"\"\nPrototype V2 Helper\nlabel loader, data loader and plot for accuracy and loss\nBy: Xiaochi (George) Li\nNov.2018\n\"\"\"\nfrom PIL import Image\nimport numpy as np\nimport time\n\n\ndef label_loader(label_file):\n \"\"\"\n label loader function\n read list_partition_label.txt of RAF-DB and generat... | [
[
"numpy.array",
"numpy.empty",
"numpy.zeros",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.close",
"numpy.linspace"
]
] |
omyllymaki/account-analyzer | [
"ddcc8400289336e9f9785bba37399af4340185f4"
] | [
"src/data_processing/loaders/nordea_loader.py"
] | [
"from typing import List\n\nimport pandas as pd\n\nfrom src.data_processing.loaders.loader_interface import LoaderInterface\n\n\nclass NordeaLoader(LoaderInterface):\n\n def load(self, file_paths: List[str]) -> pd.DataFrame:\n raw_data_list = []\n for path in file_paths:\n df = pd.read_c... | [
[
"pandas.read_csv",
"pandas.concat"
]
] |
ChristianolXL/tvm | [
"8f5d3bd20f819c25973db3ab29029448ebfd61f7",
"8f5d3bd20f819c25973db3ab29029448ebfd61f7"
] | [
"nnvm/tests/python/frontend/onnx/test_forward.py",
"tutorials/nnvm/from_tensorflow.py"
] | [
"import numpy as np\nimport math\nimport nnvm\nimport topi\nimport topi.testing\nimport tvm\nfrom tvm.contrib import graph_runtime\nfrom nnvm.testing.config import ctx_list\nimport onnx\nfrom model_zoo import super_resolution, squeezenet1_1, lenet, resnet18_1_0\nfrom onnx import helper, TensorProto\n\ndef get_tvm_o... | [
[
"numpy.max",
"numpy.testing.assert_allclose",
"numpy.array",
"numpy.ndindex",
"numpy.matmul",
"numpy.argmin",
"numpy.zeros",
"numpy.random.randn",
"numpy.min",
"numpy.mean",
"numpy.take",
"numpy.random.uniform",
"numpy.argmax",
"numpy.power",
"numpy.clip... |
glennklockwood/beaglebone-cloud9-examples | [
"180a0eedeb69b9671a185f97e3848ce46cea8fc5"
] | [
"PocketBeagle/Grove/ToneGenerator.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: UTF-8 -*-\nimport numpy as np\nimport pyaudio\nimport wave\nimport time\nfrom Shell import GetCmdReturn\nimport os\nimport sys\n\ntone_freq_map={\"do\": 261.5, \"re\": 293.4,\"me\": 329.5,\"fa\": 349.1,\"so\": 391.7, \\\n\"la\": 440,\"ti\": 493.8,\"do+\":523}\n_SCALE_DEFS = [\... | [
[
"numpy.sin",
"numpy.arange",
"numpy.exp"
]
] |
GoDa-Choe/capstone_design | [
"cb3ce264c7720594a64b7e1717247ad12c522116"
] | [
"src/train/mvp_incomplete.py"
] | [
"import torch\nimport torch.nn.parallel\nimport torch.optim as optim\nimport torch.utils.data\nimport torch.nn.functional as F\n\nimport sys\n\nsys.path.append('/home/goda/Undergraduate/capstone_design_base/src')\n\nfrom src.dataset.dataset import MVP\nfrom src.models.pointnet import PointNetCls, feature_transform_... | [
[
"torch.device",
"torch.optim.lr_scheduler.StepLR",
"torch.max",
"torch.no_grad",
"torch.cuda.is_available",
"torch.utils.data.DataLoader",
"torch.nn.functional.nll_loss"
]
] |
Codeshastra-7/31_DeepMind | [
"1469ffed44b3751ea87bb1d66e5f78d760c3f6bf"
] | [
"get_aasan.py"
] | [
"import pandas as pd \n\ndef fun(key):\n df = pd.read_csv(\"benefits.csv\")\n df = df.set_index(\"exercise\")\n \n df = df.dot(key)\n df = df.reset_index(level=0)\n df.columns = [\"exercise\", \"scores\"]\n df = df.sort_values([\"scores\"], ascending=0)\n print(df)\n return df\n\ndef get_... | [
[
"pandas.DataFrame",
"pandas.read_csv"
]
] |
ionq/ProjectQ | [
"0cf7322cde910f79c6d4515fed36beaad2ae2f40"
] | [
"projectq/setups/decompositions/time_evolution_test.py"
] | [
"# -*- coding: utf-8 -*-\n# Copyright 2017 ProjectQ-Framework (www.projectq.ch)\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/LI... | [
[
"scipy.sparse.csc_matrix",
"numpy.allclose",
"scipy.sparse.identity",
"scipy.sparse.linalg.expm",
"scipy.sparse.kron"
]
] |
ustunb/actionable-recourse | [
"e851de05ad32c077daf037a231addd271fcb1aac"
] | [
"tests/conftest.py"
] | [
"import pytest\r\nimport numpy as np\r\nimport pandas as pd\r\nfrom sklearn.linear_model import LogisticRegression\r\nfrom recourse import *\r\nfrom recourse.paths import *\r\nfrom recourse.defaults import SUPPORTED_SOLVERS, _SOLVER_TYPE_CPX, _SOLVER_TYPE_PYTHON_MIP\r\n\r\n@pytest.fixture(params = ['german', 'germa... | [
[
"numpy.array",
"numpy.flatnonzero",
"sklearn.linear_model.LogisticRegression",
"numpy.less_equal",
"numpy.greater",
"pandas.read_csv",
"pandas.get_dummies"
]
] |
kevinbhingaradiya/nlp-dl-prework | [
"91c9f23981b159c7ab72780413b3de130f9a985d"
] | [
"Classify-the-News-Articles/code.py"
] | [
"# --------------\n# import packages\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\nimport seaborn as sns\nimport re\nfrom nltk.corpus import stopwords\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer\nf... | [
[
"sklearn.naive_bayes.MultinomialNB",
"sklearn.linear_model.LogisticRegression",
"sklearn.feature_extraction.text.CountVectorizer",
"sklearn.feature_extraction.text.TfidfVectorizer",
"sklearn.model_selection.train_test_split",
"pandas.read_csv"
]
] |
RyanYunfeiLi/OOD | [
"b498066eb890a1ff86884bf440fbb9daafe89587"
] | [
"GOT4OOD/model/ConditionalLM.py"
] | [
"import torch.nn as nn\nimport torch\n\n\nclass ConditionalLM(nn.Module):\n def __init__(self, gpu, dataset, label_num, fix_word_embedding=False):\n super().__init__()\n pre_embedding = torch.load('output/params/{}/embedding'.format(dataset),\\\n map_location='cuda:{}'.format(gpu) if gpu... | [
[
"torch.nn.Linear",
"torch.nn.LSTM",
"torch.nn.Embedding"
]
] |
JoaoCostaIFG/MNUM | [
"6e042d8a6f64feb9eae9c79afec2fbab51f46fbd"
] | [
"Pratical/Class09/rk4.py"
] | [
"#!/usr/bin/env python3\n\nimport math\nimport matplotlib.pyplot as plt\n\n\ndef f(x, y):\n return math.pow(math.sin(x), 2)\n\n\ndef qc(a, b, h, f, xn, metodo):\n s = metodo(a, b, h, f, xn)\n sl = metodo(a, b, h/2, f, xn)\n sll = metodo(a, b, h/4, f, xn)\n\n print(\"qc\\nerro\")\n qc = []\n for... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.scatter"
]
] |
SubOptimal/PythonChallenge | [
"989a04500aa371057315dffb6e3d03a968f16130"
] | [
"Python9.py"
] | [
"#http://www.pythonchallenge.com/pc/return/good.html\nimport numpy\nfrom matplotlib import pyplot\nfirst=[146,399,163,403,170,393,169,391,166,386,170,381,170,371,170,355,169,346,167,335,170,329,170,320,170,\n310,171,301,173,290,178,289,182,287,188,286,190,286,192,291,194,296,195,305,194,307,191,312,190,316,\n190,32... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.plot"
]
] |
c4f3a0ce/pandas | [
"9cfb8b55b70028d818fe4727d7587586f581673a"
] | [
"pandas/tests/indexes/common.py"
] | [
"import gc\n\nimport numpy as np\nimport pytest\n\nfrom pandas._libs.tslib import iNaT\n\nfrom pandas.core.dtypes.dtypes import CategoricalDtype\n\nimport pandas as pd\nfrom pandas import (\n CategoricalIndex,\n DatetimeIndex,\n Index,\n Int64Index,\n IntervalIndex,\n MultiIndex,\n PeriodIndex,... | [
[
"pandas.util.testing.assert_numpy_array_equal",
"numpy.array",
"pandas.Index",
"pandas.isna",
"numpy.asarray",
"pandas.CategoricalIndex",
"pandas.util.testing.assert_index_equal",
"pandas.core.dtypes.dtypes.CategoricalDtype",
"pandas.option_context",
"numpy.arange",
"nu... |
nickwiecien/AzureML_RegisterParameterizedDataset | [
"346943998f79d18037562b067820e392f45fcb49"
] | [
"register_file_data.py"
] | [
"from azureml.core import Run, Workspace, Datastore, Dataset\nfrom azureml.data.datapath import DataPath\nimport pandas as pd\nimport os\nimport argparse\n\n\n#Parse input arguments\nparser = argparse.ArgumentParser(\"Register Uploaded File Data\")\nparser.add_argument('--uploaded_file_path_param', type=str, requir... | [
[
"pandas.read_csv"
]
] |
CatalystCode/VoTT-train | [
"89b5cecfe91daa19be8a712d9c72466ffa88cc63"
] | [
"plugins/retinanet/plugin.py"
] | [
"import argparse\nimport glob\nimport os\nimport pandas\nimport re\nimport requests\nimport subprocess\nimport sys\nimport tarfile\nimport threading\nimport time\nimport urllib\n\ndef parse_args(args):\n parser = argparse.ArgumentParser(description='RetinaNet VoTT-train plugin.')\n parser.add_argument('--anno... | [
[
"pandas.read_csv"
]
] |
empet/more-graphs | [
"a40b32a0fe2aeaa8f104bcfc16fdd80350a00e43"
] | [
"IMDb-directors-writers/Graph_Gen.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# @Time : Oct. 11, 2019 10:37 AM\n# @Author : Veritas YIN\n# @FileName : Graph_Gen.py\n# @Version : 1.2\n# @IDE : PyCharm\n# @Github : https://github.com/VeritasYin/Nx_Graph\n\nimport pandas as pd\nimport networkx as nx\nfrom itertools import combina... | [
[
"pandas.DataFrame",
"pandas.read_csv"
]
] |
bam241/helpmetric | [
"c4d5bb85214b6c97ac13003e46b3439f566004a1"
] | [
"pandahelper.py"
] | [
"#!/usr/bin/env python\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\n\n\n\ndef RemoveNan(df):\n df.fillna(0, inplace=True)\n return df \n\n\ndef RenameTS(df, x_label, y_label):\n return pd.DataFrame({x_label: df[df.columns[0]], y_label: df[df.columns[1]]})\n\n\ndef MakePlot(dfs, x_name, y_name, ... | [
[
"pandas.DataFrame",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.rc",
"matplotlib.pyplot.ylabel"
]
] |
wedexyz/mediapipe | [
"e8af4afd324cca0458b764c8feb76b7eaf85e3a2"
] | [
"mediapipe/python/solutions/drawing_utils.py"
] | [
"# Copyright 2020 The MediaPipe Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable la... | [
[
"numpy.matmul",
"matplotlib.pyplot.figure",
"numpy.float32",
"matplotlib.pyplot.show",
"numpy.clip",
"numpy.int32",
"matplotlib.pyplot.axes"
]
] |
bendecoste/tf-encrypted | [
"00c9b80435411299a518f777de644c61d64cceea",
"00c9b80435411299a518f777de644c61d64cceea"
] | [
"tests/test_tanh.py",
"tests/test_reduce_max.py"
] | [
"import unittest\n\nimport numpy as np\nimport tensorflow as tf\nimport tf_encrypted as tfe\nfrom tf_encrypted.layers.activation import Tanh\n\n\nclass TestTanh(unittest.TestCase):\n def setUp(self):\n tf.reset_default_graph()\n\n def test_forward(self):\n input_shape = [4]\n input_tanh =... | [
[
"numpy.array",
"numpy.isclose",
"tensorflow.Session",
"tensorflow.reset_default_graph",
"tensorflow.Variable",
"tensorflow.nn.tanh",
"tensorflow.global_variables_initializer"
],
[
"numpy.array",
"numpy.testing.assert_array_equal",
"tensorflow.Session",
"tensorflow.r... |
ricardoavelino/compas | [
"e3c7f004b8839f96bf01f9f6b21a75786c3f59fa"
] | [
"src/compas_plotters/artists/vectorartist.py"
] | [
"from typing import Tuple\nfrom typing import List\nfrom typing import Any\nfrom typing import Optional\n\nfrom matplotlib.patches import FancyArrowPatch\nfrom matplotlib.patches import ArrowStyle\nfrom compas.geometry import Point, Vector\n\nfrom compas.artists import PrimitiveArtist\nfrom .artist import PlotterAr... | [
[
"matplotlib.patches.FancyArrowPatch",
"matplotlib.patches.ArrowStyle"
]
] |
AlanDecode/detectron2 | [
"94af461322feba0c3cadde886367445d62bc45a7"
] | [
"detectron2/export/torchscript.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\n\nimport os\nimport torch\n\nfrom detectron2.utils.env import TORCH_VERSION\nfrom detectron2.utils.file_io import PathManager\n\nfrom .torchscript_patch import freeze_training_mode, patch_instances\n\n__all__ = [\"scripting_with_instances\", \"dump_torchscript_IR... | [
[
"torch.jit.script"
]
] |
abrams27/mimuw | [
"ad8b01b63c05d7903aab29fd145845cf97ac32d9",
"ad8b01b63c05d7903aab29fd145845cf97ac32d9"
] | [
"sem6/wbo/laby/lab2/src/task4.py",
"sem3/rpis/laby/lab1/1a.py"
] | [
"from Bio import Seq\nfrom task2 import jukes_cantor\nfrom task3 import distanceJC69\n\nimport matplotlib.pyplot as plt\nimport random\n\n\ndef random_seq(length):\n result = Seq.MutableSeq(\"\")\n for _ in range(length):\n result.append(random.choice(\"AGCT\"))\n\n return result.toseq()\n\n\ndef pl... | [
[
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
],
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.plot"
]
] |
bistrulli/3tier-bench-app | [
"71c6bbcd1e0c13f7247702867df4158f6a14744d"
] | [
"3tier-app/controller/optCtrlNN_real2.py"
] | [
"'''\nCreated on 14 mag 2021\n\n@author: emilio\n'''\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport time\nimport tflite_runtime.interpreter as tflite\nimport os\nimport scipy.io\nfrom tqdm import tqdm\nimport casadi\nimport subprocess\nimport signal\nfrom cgroupspy import trees\nimport docker\nfrom pa... | [
[
"numpy.random.choice",
"numpy.random.rand",
"matplotlib.pyplot.stem",
"numpy.minimum",
"numpy.mean",
"numpy.cumsum",
"matplotlib.pyplot.xticks",
"matplotlib.pyplot.savefig",
"numpy.random.randint",
"numpy.arange",
"numpy.matrix",
"numpy.array",
"numpy.zeros",
... |
ThorbenJensen/feature-engineering | [
"a5f73b29289dd982ab89ea5080186b833c362cfa",
"a5f73b29289dd982ab89ea5080186b833c362cfa"
] | [
"scripts/03_features_featuretools.py",
"feature_engineering/utils/preprocessing.py"
] | [
"\"\"\"Applying Featuretools to engineer features.\"\"\"\n# %%\nimport sys\n\nimport pandas as pd\nimport featuretools as ft\nimport featuretools.selection\n\nsys.path.append(\".\")\nfrom feature_engineering.featuretools_config import (\n FT_MAX_DEPTH\n)\n\n# %% LOAD DATA\nX_base_complete = pd.read_parquet(\n ... | [
[
"pandas.read_parquet"
],
[
"pandas.datetime.strptime",
"pandas.DataFrame",
"pandas.get_dummies"
]
] |
ShizuApp/tensor-flow-ml | [
"9c0900eff412928504d1149f8a1799b04f4082de"
] | [
"Tuning/GridSearch/main.py"
] | [
"from sklearn.model_selection import train_test_split\nfrom sklearn.metrics import f1_score, make_scorer\n\n#Fixing a random seed\nimport random\nrandom.seed(42)\n\n# Split the data into training and testing sets\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)\n\nfrom skle... | [
[
"sklearn.model_selection.GridSearchCV",
"sklearn.metrics.make_scorer",
"sklearn.tree.DecisionTreeClassifier",
"sklearn.model_selection.train_test_split",
"sklearn.metrics.f1_score"
]
] |
ryohei-kamiya/2D-GRD | [
"52b6dea0369f020838238d64bd7e4bf137a70836"
] | [
"src/chainer_lstm_with_baseshift.py"
] | [
"from logzero import logger\nimport argparse\nimport numpy as np\nimport pandas as pd\nimport os\n\nimport chainer\nimport chainer.functions as F\nimport chainer.links as L\nfrom chainer import training\nfrom chainer import serializers\nfrom chainer.training import extensions\nfrom chainer.datasets import tuple_dat... | [
[
"pandas.read_csv",
"numpy.subtract",
"numpy.float32"
]
] |
arp95/vit_image_qc | [
"460e4959023e0115bf47440b9c922640f374904d"
] | [
"code/model/model.py"
] | [
"# header files\nimport torch\nimport torch.nn as nn\nimport torchvision\nfrom torch.nn import CrossEntropyLoss, Dropout, Softmax, Linear, Conv2d, LayerNorm\nfrom torch.nn.modules.utils import _pair\nimport numpy as np\nimport skimage\nfrom skimage import io, transform\nimport glob\nimport csv\nfrom PIL import Imag... | [
[
"torch.nn.Linear",
"torch.sigmoid",
"torch.nn.Dropout",
"torch.cat",
"torch.nn.LayerNorm",
"torch.zeros",
"torch.nn.Softmax",
"torch.nn.ModuleList",
"torch.nn.Sequential",
"torch.nn.BatchNorm2d",
"torch.nn.init.xavier_uniform_",
"torch.from_numpy",
"torch.nn.ReL... |
nathanrooy/dash-sample-apps | [
"90fefa2cbc46f24a5621617cd64bb4346c4b21fe"
] | [
"apps/dash-object-detection/app.py"
] | [
"from textwrap import dedent\nimport dash\nimport dash_core_components as dcc\nimport dash_html_components as html\nimport dash_player as player\nimport numpy as np\nimport pandas as pd\nimport plotly.graph_objs as go\nfrom dash.dependencies import Input, Output, State\nimport pathlib\n\nFRAMERATE = 24.0\n\napp = d... | [
[
"numpy.pad",
"numpy.flip"
]
] |
Infi-zc/horovod | [
"94cd8561a21d449fc8c80c8fef422025b84dfc22",
"94cd8561a21d449fc8c80c8fef422025b84dfc22"
] | [
"examples/tensorflow2/tensorflow2_mnist.py",
"horovod/tensorflow/functions.py"
] | [
"# Copyright 2019 Uber Technologies, Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.GradientTape",
"tensorflow.keras.layers.Flatten",
"tensorflow.config.experimental.set_memory_growth",
"tensorflow.train.Checkpoint",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.Dropout",
"tensorflow.keras.layers.MaxPooling... |
vita-epfl/RRB | [
"9099356565c4150d2c53e9a6cfc75bdb792a8929"
] | [
"trajnetbaselines/trajnetbaselines/scene_funcs/scene_funcs.py"
] | [
"import cv2\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom .. import augmentation\n\n\nclass scene_funcs(torch.nn.Module):\n \"\"\" This class has all we want to do with the scene\n \"\"\"\n\n def __init__(self, device='cpu'):\n super(scene_funcs, se... | [
[
"torch.zeros",
"torch.min",
"torch.nn.AvgPool2d",
"torch.argmin",
"torch.unsqueeze",
"torch.tensor"
]
] |
ClayLiu/optimization-algorithm | [
"1fb535a79d857a8545dfacfc7c79c0b3649d8d2d"
] | [
"MultiobjectiveUtils/archiving.py"
] | [
"import numpy as np\nimport random\n\n\nclass mesh_crowd(object):\n def __init__(self, curr_archiving_in, curr_archiving_fit, mesh_div, lb, ub):\n \"\"\"\n :param curr_archiving_in:\n :param curr_archiving_fit:\n :param mesh_div: 等分因子\n :param lb: 目标函数下界,应传入列表[a, b, c]\n ... | [
[
"numpy.sum",
"numpy.delete",
"numpy.linspace",
"numpy.zeros"
]
] |
HimashiRathnayake/adapter-transformers | [
"d9c06ecbf4aaa33756e848b8fc5b3ec65f5ff4f4"
] | [
"tests/test_adapter_heads.py"
] | [
"import tempfile\n\nimport torch\n\nfrom transformers import MODEL_WITH_HEADS_MAPPING, AutoModelForSequenceClassification, AutoModelWithHeads\nfrom transformers.adapters.composition import BatchSplit, Stack\nfrom transformers.testing_utils import require_torch, torch_device\n\nfrom .test_adapter_common import creat... | [
[
"torch.zeros",
"torch.isclose",
"torch.equal",
"torch.ones"
]
] |
kain88-de/numkit | [
"31b948b5d6f9093fbb35db98496dd69046511afe"
] | [
"src/numkit/observables.py"
] | [
"# numkit --- observables\n# Copyright (c) 2010 Oliver Beckstein <orbeckst@gmail.com>\n# Released under the \"Modified BSD Licence\" (see COPYING).\n\nimport numpy\n\nclass QID(frozenset):\n \"\"\"Identity of a :class:`QuantityWithError`.\n\n QID(iterable) --> identity\n QID() --> ``None``\n\n The a... | [
[
"numpy.log",
"numpy.abs",
"numpy.power",
"numpy.sqrt"
]
] |
mberkanbicer/BciPy | [
"c18878ad6fc4d1f69e2091b8f029f3b9ab9a923a",
"c18878ad6fc4d1f69e2091b8f029f3b9ab9a923a",
"c18878ad6fc4d1f69e2091b8f029f3b9ab9a923a"
] | [
"bcipy/tasks/tests/test_decision_maker.py",
"bcipy/signal/model/demo/demo_validate_data.py",
"bcipy/tasks/rsvp/query_mechanisms.py"
] | [
"\"\"\"Tests for Copy Phrase DecisionMaker\"\"\"\n\nimport unittest\nimport numpy as np\n\nimport bcipy.tasks.rsvp.main_frame as mf\nfrom bcipy.tasks.rsvp.stopping_criteria import CriteriaEvaluator, \\\n MaxIterationsCriteria, MinIterationsCriteria, ProbThresholdCriteria\nfrom bcipy.tasks.rsvp.query_mechanisms i... | [
[
"numpy.array"
],
[
"matplotlib.use",
"numpy.concatenate",
"numpy.max",
"scipy.stats.iqr",
"matplotlib.pylab.ylabel",
"numpy.random.permutation",
"numpy.random.randn",
"numpy.min",
"numpy.exp",
"matplotlib.pylab.show",
"matplotlib.pylab.figure",
"numpy.std",
... |
HarunaHaju/IRL | [
"a49fb15bf2f84a690197147886317c6eb5ce0c53"
] | [
"mountaincar/app/env_utils.py"
] | [
"from matplotlib import pyplot as plt\nimport setting\nimport numpy as np\n\n\ndef draw_learning_curve_raw(episodes, scores, file_path, title):\n # 对最后100个数据取平均值\n plt.plot(episodes, scores)\n label = ['score']\n plt.legend(label, loc='upper left')\n plt.title(title)\n plt.show()\n\n\ndef draw_le... | [
[
"matplotlib.pyplot.plot",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.title",
"numpy.average",
"matplotlib.pyplot.show"
]
] |
xyise/xyise | [
"e2bc1c2e824da4fc5cd1d81aaef76a1ad147fb01"
] | [
"notebook/turbulence/navier_stokes_2d/fftw_helper.py"
] | [
"import numpy as np\nimport pyfftw\n\nclass FFTW_base():\n\n def __init__(self):\n\n self._in = None\n self._out = None\n self._p = None\n \n def run(self, data_in=None, copy=True, data_out=None):\n\n if data_in is not None:\n np.copyto(self._in, data_in)\n\n ... | [
[
"numpy.array",
"numpy.copyto"
]
] |
lknak/tigr | [
"614a6435c483a25cb8183c08184d140120053a4f"
] | [
"runner.py"
] | [
"# Task Inference based meta-rl algorithm using Gaussian mixture models and gated Recurrent units (TIGR)\n\nimport os\nimport numpy as np\nimport click\nimport json\nimport torch\nimport copy\n\nfrom rlkit.envs import ENVS\nfrom rlkit.envs.wrappers import NormalizedBoxEnv\nfrom rlkit.torch.sac.policies import TanhG... | [
[
"numpy.asarray",
"numpy.random.seed",
"torch.manual_seed",
"numpy.prod",
"torch.set_num_threads"
]
] |
flyingTan/QuantMmdetection | [
"6126cd7725dcd0c4d3ad68f016908c500a0adbb9"
] | [
"tools/test.py"
] | [
"import argparse\nimport os\nimport warnings\n\nimport mmcv\nimport torch\nfrom mmcv import Config, DictAction\nfrom mmcv.cnn import fuse_conv_bn\nfrom mmcv.parallel import MMDataParallel, MMDistributedDataParallel\nfrom mmcv.runner import (get_dist_info, init_dist, load_checkpoint,\n wrap_f... | [
[
"torch.cuda.current_device"
]
] |
shaimach/qiskit-terra-osq | [
"4d321afc84d3b82248112ae0616c3b86bee3d08a"
] | [
"qiskit/extensions/standard/rx_pi.py"
] | [
"# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\... | [
[
"numpy.exp"
]
] |
marcelpinheiro/api-python-flask | [
"7285c5110498c7c8abd4cb2f3dd876a1c2cabed5"
] | [
"app.py"
] | [
"from datetime import datetime\nfrom flask import Flask\nfrom flask_restful import Resource, Api, reqparse\nimport pandas as pd\n\napp = Flask(__name__)\napi = Api(app)\n\ndef get_arguments():\n parser = reqparse.RequestParser()\n parser.add_argument(\"member_id\", default=None)\n parser.add_ar... | [
[
"pandas.read_csv"
]
] |
hsali/Transformer-TTS | [
"e1701a3f00a786827b7df643ff34e0d1abaff1d5"
] | [
"utils.py"
] | [
"import numpy as np\nimport librosa\nimport os, copy\nfrom scipy import signal\nimport hyperparams as hp\nimport torch as t\n\n\ndef get_spectrograms(fpath):\n '''Parse the wave file in `fpath` and\n Returns normalized melspectrogram and linear spectrogram.\n Args:\n fpath: A string. The full path of ... | [
[
"numpy.append",
"numpy.sin",
"numpy.dot",
"numpy.zeros",
"torch.FloatTensor",
"numpy.real",
"torch.from_numpy",
"scipy.signal.lfilter",
"numpy.power",
"numpy.abs",
"numpy.clip",
"numpy.cos",
"numpy.maximum"
]
] |
13266828291/tensorpack | [
"c7fd1d9fb18862318b133c9474d37c5085850070"
] | [
"examples/keras/mnist-keras.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# File: mnist-keras.py\n# Author: Yuxin Wu\n\nimport tensorflow as tf\nfrom tensorflow import keras\nKL = keras.layers\n\n\"\"\"\nThis is an mnist example demonstrating how to use Keras symbolic function inside tensorpack.\nThis way you can define models in Keras-sty... | [
[
"tensorflow.nn.in_top_k",
"tensorflow.train.AdamOptimizer",
"tensorflow.summary.scalar",
"tensorflow.expand_dims",
"tensorflow.add_n",
"tensorflow.placeholder",
"tensorflow.keras.models.Sequential",
"tensorflow.keras.regularizers.l2",
"tensorflow.reduce_mean",
"tensorflow.n... |
ericgreenwell/turret | [
"c00477750b7bb2364c5e2a66dac80bcfb777f17b"
] | [
"CMT/util.py"
] | [
"import cv2\nfrom numpy import math, hstack\n\nimport numpy as np\n\n\nclass FileVideoCapture(object):\n\n\tdef __init__(self, path):\n\t\tself.path = path\n\t\tself.frame = 1\n\n\tdef isOpened(self):\n\t\tim = cv2.imread(self.path.format(self.frame))\n\t\treturn im != None\n\n\tdef read(self):\n\t\tim = cv2.imread... | [
[
"numpy.array",
"numpy.empty",
"numpy.copy",
"numpy.power",
"numpy.argsort",
"numpy.hstack"
]
] |
layolu/tensorpack | [
"97360e5b8ca9ce03d8a18b3abef5abfc92cb9907"
] | [
"examples/ImageNetModels/alexnet.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# File: alexnet.py\n\nimport argparse\nimport numpy as np\nimport os\nimport cv2\nimport tensorflow as tf\n\nfrom tensorpack import *\nfrom tensorpack.dataflow import imgaug\nfrom tensorpack.tfutils import argscope\nfrom tensorpack.utils.gpu import get_num_gpu\n\nfro... | [
[
"numpy.array",
"tensorflow.summary.image",
"numpy.asarray",
"tensorflow.ones_initializer",
"tensorflow.nn.lrn",
"tensorflow.transpose",
"tensorflow.reshape",
"tensorflow.name_scope",
"tensorflow.pad",
"tensorflow.variance_scaling_initializer",
"tensorflow.random_normal_... |
romainVala/fmriprep | [
"c82cae431d58655bf532d676f27df0b7b3659943"
] | [
"fmriprep/interfaces/cifti.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n\"\"\"\nHandling connectivity\n~~~~~~~~~~~~~~~~~~~~~\nCombines FreeSurfer surfaces with subcortical volumes\n\n\"\"\"\nimport os\nfrom glob import glob... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.empty",
"numpy.nonzero",
"numpy.column_stack"
]
] |
stereo720712/FinMind | [
"ec0482e7a2811fc3bf1a5641fee6c6cd61d63844"
] | [
"tests/data/test_data_loader.py"
] | [
"import os\r\n\r\nimport pandas as pd\r\nimport pytest\r\n\r\nfrom FinMind.data import DataLoader\r\nfrom FinMind.data import FinMindApi\r\n\r\nuser_id = os.environ.get(\"FINMIND_USER\", \"\")\r\npassword = os.environ.get(\"FINMIND_PASSWORD\", \"\")\r\n\r\n\r\n@pytest.fixture(scope=\"module\")\r\ndef api():\r\n ... | [
[
"pandas.DataFrame",
"pandas.Series"
]
] |
TUD-STKS/PyRCN | [
"26fb7f0d55e8c8925f692191c56db2ea32e3f630"
] | [
"pyrcn/datasets/_maps_piano_dataset.py"
] | [
"\"\"\"MAPS piano dataset.\nThe original database is available at\n\n https://adasp.telecom-paris.fr/resources/2010-07-08-maps-database/\n\nThe license is restricted, and one needs to register and download the dataset.\n\n\"\"\"\nfrom pathlib import Path\nfrom os.path import dirname, exists, join\nfrom os import... | [
[
"numpy.array",
"sklearn.datasets.get_data_home",
"sklearn.datasets._base._pkl_filepath",
"numpy.zeros",
"numpy.unique"
]
] |
jrper/thetis | [
"3c08a2e6947552119232fefd7380fa61b2a9b84b"
] | [
"test/pressure_grad/test_pg-stack_mes.py"
] | [
"\"\"\"\nUnit tests for computing density, baroclinic head and the internal pressure\ngradient from a temperature field.\n\nRuns MES convergence tests against a non-trivial analytical solution in a\ndeformed geometry.\n\nNOTE currently only linear equation of state is tested\nTODO test full nonlinear equation of st... | [
[
"matplotlib.pyplot.savefig",
"scipy.stats.linregress",
"matplotlib.pyplot.subplots"
]
] |
houliangict/mimicry | [
"d9e43940254de4a85c78e644f2d2b1135de4b50d"
] | [
"tests/nets/ssgan/test_ssgan_32.py"
] | [
"\"\"\"\nTest functions for SSGAN for image size 32.\n\"\"\"\nimport torch\nimport torch.optim as optim\n\nfrom torch_mimicry.nets.ssgan.ssgan_32 import SSGANGenerator32, SSGANDiscriminator32\nfrom torch_mimicry.training import metric_log\nfrom torch_mimicry.utils import common\n\n\nclass TestSSGAN32:\n def setu... | [
[
"torch.ones"
]
] |
DKISTDC/dkist | [
"2f4d930ea0e002db40e8ef17a79b0b4fb2e6d3f3"
] | [
"dkist/dataset/utils.py"
] | [
"\"\"\"\nHelper functions for the Dataset class.\n\"\"\"\n\nimport numpy as np\n\nimport gwcs\n\n__all__ = ['dataset_info_str']\n\n\ndef dataset_info_str(ds):\n wcs = ds.wcs.low_level_wcs\n\n # Pixel dimensions table\n\n instr = ds.meta.get(\"instrument_name\", \"\")\n if instr:\n instr += \" \"\... | [
[
"numpy.empty"
]
] |
Tim-HU/sphinx-report | [
"3a0dc225e594c4b2083dff7a93b6d77054256416"
] | [
"SphinxReport/Dispatcher.py"
] | [
"import os, sys, re, shelve, traceback, pickle, types, itertools\n\nfrom SphinxReport.ResultBlock import ResultBlock, ResultBlocks\nfrom SphinxReport import DataTree\nfrom SphinxReport.Component import *\nfrom SphinxReport import Utils\nfrom SphinxReport import Cache\nfrom SphinxReport import Tracker\n\n# move User... | [
[
"pandas.MultiIndex.from_tuples"
]
] |
LetMe-GX/Tweet-Sentiment-Extraction | [
"8a3defe8d06a899c4ce50c68018c846f8027f4e0"
] | [
"preprocess.py"
] | [
"import numpy as np\nimport pandas as pd\nimport json\nimport os\n\nfrom sklearn.model_selection import StratifiedKFold\n\nROOT = './input/tweet-sentiment-extraction/'\ntrain_df = pd.read_csv(os.path.join(ROOT, 'train.csv'))\ntest_df = pd.read_csv(os.path.join(ROOT, 'test.csv'))\ntrain_np = np.array(train_df)\ntest... | [
[
"numpy.array",
"sklearn.model_selection.StratifiedKFold"
]
] |
skelemoa/synse-zsl | [
"90f39a118170d708843c5d4305bd807905cb4c54",
"90f39a118170d708843c5d4305bd807905cb4c54"
] | [
"synse/data_cnn60.py",
"revise/data_cnn60.py"
] | [
"# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\nimport torch\nfrom torch.utils.data import Dataset, DataLoader\nimport os\nimport numpy as np\nimport h5py\nimport os.path as osp\nimport sys\nimport scipy.misc\nif sys.version_info[0] == 2:\n import cPickle as pickl... | [
[
"numpy.concatenate",
"torch.cat",
"numpy.array",
"torch.stack",
"numpy.reshape",
"numpy.delete",
"numpy.zeros",
"torch.FloatTensor",
"numpy.ones",
"numpy.load",
"torch.from_numpy",
"torch.LongTensor",
"torch.utils.data.DataLoader",
"numpy.transpose",
"nu... |
carderne/raster-vision | [
"915fbcd3263d8f2193e65c2cd0eb53e050a47a01",
"915fbcd3263d8f2193e65c2cd0eb53e050a47a01",
"915fbcd3263d8f2193e65c2cd0eb53e050a47a01"
] | [
"rastervision/backend/torch_utils/object_detection/train.py",
"tests/data-files/plugins/noop_raster_source.py",
"integration_tests/integration_tests.py"
] | [
"from collections import defaultdict\nimport warnings\n\nimport click\nimport torch\nimport numpy as np\n\nfrom rastervision.backend.torch_utils.object_detection.metrics import (\n compute_coco_eval, compute_class_f1)\n\nwarnings.filterwarnings('ignore')\n\n\ndef train_epoch(model,\n device,\n ... | [
[
"torch.no_grad",
"numpy.mean"
],
[
"numpy.random.rand"
],
[
"numpy.random.seed",
"tensorflow.set_random_seed"
]
] |
FlorentCollin/contiki-ng | [
"3084c8f8aa6cd0ceb46f999574568a4a1c381ee0"
] | [
"project/utils/merge.py"
] | [
"import json\nimport numpy as np\n\ndef load_files(filenames):\n res = []\n for filename in filenames:\n # print(f\"Loading filename: {filename}...\")\n with open(filename) as f:\n stats = json.load(f)\n stats[\"filename\"] = filename\n res.append(stats)\n ret... | [
[
"pandas.to_datetime",
"numpy.matrix",
"numpy.array",
"matplotlib.pyplot.savefig",
"pandas.DataFrame",
"matplotlib.pyplot.close",
"matplotlib.pyplot.clf"
]
] |
travisMichael/unsupervisedLearning | [
"f01bd4e36833de4917811e51042e3937510e2701"
] | [
"preprocess/cardiovascular.py"
] | [
"import pandas as pd\nimport pickle\nimport numpy as np\nimport os\nfrom sklearn.preprocessing import StandardScaler, RobustScaler, minmax_scale\nfrom sklearn.model_selection import train_test_split\n\n# def normalize_gender_attribute(x):\n# if x == 1:\n# return 0.0\n# else:\n# return 1.0\n\... | [
[
"sklearn.model_selection.train_test_split",
"numpy.array",
"pandas.read_csv",
"sklearn.preprocessing.StandardScaler"
]
] |
gmcvicker/CHT | [
"e4bee5dc62f03eb1b153dc8e23ee649d34bf5a03"
] | [
"extract_haplotype_read_counts.py"
] | [
"#!/bin/env python\n#\n# Copyright 2013 Graham McVicker and Bryce van de Geijn\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... | [
[
"numpy.sum",
"numpy.random.randint",
"numpy.where"
]
] |
j-brady/nmrglue | [
"aaa0abd79b50b4a9dc9b6b6acecdfd87e643deb8"
] | [
"nmrglue/fileio/spinsolve.py"
] | [
"\"\"\"\nFunctions for reading Magritek Spinsolve binary (dx/1d) files and\nparameter (acqu.par/proc.par) files.\n\"\"\"\n\nfrom warnings import warn\n\nimport os\nimport numpy as np\n\nfrom . import fileiobase\nfrom . import jcampdx\n\n__developer_info__ = \"\"\"\nSpinsolve is the software used on the Magritek ben... | [
[
"numpy.frombuffer"
]
] |
xcgoner/incubator-mxnet-old | [
"e6efa1129bdc83e9a95c17fecb48c15efae20a41"
] | [
"python/mxnet/gluon/utils.py"
] | [
"# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y... | [
[
"numpy.isfinite"
]
] |
r3dlobst3r/openpilot | [
"a94746c6f8cba518f6051d808af0b06ac97dd838"
] | [
"selfdrive/car/honda/interface.py"
] | [
"#!/usr/bin/env python3\nimport numpy as np\nfrom cereal import car\nfrom panda import Panda\nfrom common.numpy_fast import clip, interp\nfrom common.params import Params\nfrom selfdrive.config import Conversions as CV\nfrom selfdrive.car.honda.values import CarControllerParams, CruiseButtons, CAR, HONDA_BOSCH, HON... | [
[
"numpy.array",
"numpy.dot",
"numpy.maximum"
]
] |
g-braeunlich/imSim | [
"c6f97ba39f05313570d15671f2b9eb9bd1de24bc"
] | [
"python/desc/imsim/sed_wrapper.py"
] | [
"\"\"\"\nWrapper code for lsst.sims.photUtils.Sed to defer reading of SED data and\nrelated calculations until they are needed in order to save memory.\n\"\"\"\nimport copy\nimport numpy as np\nimport lsst.sims.photUtils as sims_photUtils\n\n__all__ = ['SedWrapper']\n\n\nclass CCMmodel:\n \"\"\"\n Helper clas... | [
[
"numpy.array_equal"
]
] |
shreeram0206/structure_demo | [
"7faebf24d1d1e5117ae1b29ecc2d4124215b3dd6"
] | [
"src/data/make_dataset.py"
] | [
"\"\"\"\nMask R-CNN\nCommon utility functions and classes.\nCopyright (c) 2017 Matterport, Inc.\nLicensed under the MIT License (see LICENSE for details)\nWritten by Waleed Abdulla\n\"\"\"\n\nimport sys\nimport os\nimport logging\nimport math\nimport random\nimport numpy as np\nimport tensorflow as tf\nimport scipy... | [
[
"numpy.arange",
"numpy.empty"
]
] |
seabay/UnbalancedDataset | [
"b15b868019343052d4b57bf748d658367166c8b3"
] | [
"imblearn/combine/tests/test_smote_enn.py"
] | [
"\"\"\"Test the module SMOTE ENN.\"\"\"\n# Authors: Guillaume Lemaitre <g.lemaitre58@gmail.com>\n# Christos Aridas\n# License: MIT\n\nfrom __future__ import print_function\n\nimport numpy as np\nfrom pytest import raises\n\nfrom sklearn.utils.testing import assert_allclose, assert_array_equal\n\nfrom imble... | [
[
"sklearn.utils.testing.assert_array_equal",
"numpy.array",
"sklearn.utils.testing.assert_allclose"
]
] |
Jonerjon/ModelsForEIT | [
"70871943c93048ac650af3a6a5eb4e6d74539734"
] | [
"graphinh.py"
] | [
"import csv\nimport plotly.graph_objects as go\nimport pandas as pd\nimport numpy as numpy\n\n#Key Variables\npowerConsumption = 300.4 #per second, we're working as if it was every 10th minute #actually 201.268+27.72\nusedPower = 201.268+27.72\npowerConsumption = usedPower\nbufferLength = 24*0 +0 #in hours 24*48 + ... | [
[
"pandas.array",
"pandas.read_csv",
"numpy.mean"
]
] |
ximmit/ddsp | [
"f5bc4c13b65b2e774b73ffe31dda5db051dba8eb"
] | [
"ddsp/core_test.py"
] | [
"# Copyright 2020 The DDSP Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or a... | [
[
"numpy.zeros_like",
"numpy.ones_like",
"numpy.array",
"scipy.signal.fftconvolve",
"numpy.zeros",
"tensorflow.compat.v2.concat",
"numpy.sin",
"tensorflow.compat.v2.ones_like",
"numpy.ones",
"numpy.tile",
"numpy.random.randn",
"tensorflow.compat.v2.ones",
"tensorf... |
cosmicoder/astropy | [
"c4e9a703af2b0ffb2c65c3b195c9af3b9d902819"
] | [
"astropy/wcs/wcs.py"
] | [
"# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\n# Under the hood, there are 3 separate classes that perform different\n# parts of the transformation:\n#\n# - `~astropy.wcs.Wcsprm`: Is a direct wrapper of the core WCS\n# functionality in `wcslib`_. (This includes TPV and TPD\n# poly... | [
[
"numpy.square",
"numpy.array",
"numpy.dot",
"numpy.empty",
"numpy.asarray",
"numpy.zeros",
"numpy.broadcast_arrays",
"numpy.ascontiguousarray",
"numpy.sum",
"numpy.geterr",
"numpy.count_nonzero",
"numpy.seterr",
"numpy.where",
"numpy.any",
"numpy.isfinit... |
wjallen/summarize | [
"3ef5fc393fea26700336de764a830b094010ce39"
] | [
"tests/test_summarize.py"
] | [
"#!/usr/bin/env python3\n\nimport numpy as np\nimport summarize\nimport pytest\n\ndef test_true():\n assert True == True\n\ndef test_gen_numbers_5():\n\tassert len(summarize.gen_numbers(5)) == 5\n\ndef test_gen_numbers_10():\n\tassert len(summarize.gen_numbers(10)) == 10\n\n@pytest.mark.parametrize(\"n\", [5, 10... | [
[
"numpy.random.seed",
"numpy.mean"
]
] |
acalephx/QUANTAXIS | [
"e9bb0af52a8dafa55492f2f4eed8167ea5885473"
] | [
"QUANTAXIS/QAARP/QAAccount.py"
] | [
"# coding:utf-8\n#\n# The MIT License (MIT)\n#\n# Copyright (c) 2016-2018 yutiansut/QUANTAXIS\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including withou... | [
[
"pandas.to_datetime",
"pandas.concat",
"pandas.DataFrame",
"pandas.Timestamp",
"pandas.Series",
"numpy.average"
]
] |
jythonic/pandas | [
"0801b8c9090752c1342962aecd03e9a0468adbd4"
] | [
"pandas/io/excel.py"
] | [
"\"\"\"\nModule parse to/from Excel\n\"\"\"\n\n# ---------------------------------------------------------------------\n# ExcelFile class\nfrom datetime import datetime, date, time, MINYEAR, timedelta\n\nimport os\nimport abc\nimport warnings\nimport numpy as np\nfrom io import UnsupportedOperation\n\nfrom pandas.c... | [
[
"pandas.io.common._validate_header_arg",
"pandas.compat.u",
"pandas.io.parsers.TextParser",
"pandas.compat.OrderedDict",
"pandas.io.formats.printing.pprint_thing",
"pandas.compat.map",
"pandas._libs.json.dumps",
"pandas.io.common._is_url",
"pandas.compat.range",
"pandas.com... |
jhlee93/pytorch-ssd | [
"65069d02fe06e349fc87f1f2bf0db7c49832900d"
] | [
"vision/datasets/piap_dataset.py"
] | [
"import numpy as np\nimport logging\nimport pathlib\nimport xml.etree.ElementTree as ET\nimport cv2\nimport os\n\n\nclass PIAPDataset:\n \n def __init__(self, root, transform=None, target_transform=None, is_test = False, keep_difficult=False, label_file=None):\n self.root = pathlib.Path(root)\n ... | [
[
"numpy.array"
]
] |
lzhbrian/deepfashion2-kps-agg-finetune | [
"089cbb365c359ce738e5626be555f3282fd0d6d0"
] | [
"HRNet-Human-Pose-Estimation/scripts/dataset_agg81kps.py"
] | [
"\"\"\"\nbrief: aggregate original 294 kps to 81 kps\nauthor: lzhbrian\ndate: 2020.3.31\nusage: \n python scripts/dataset_agg81kps.py\n\"\"\"\n\nfrom tqdm import tqdm\nimport copy\nimport json\nimport numpy as np\n\nimport sys\nsys.path.insert(0, '../dataset/')\nfrom lib.dataset import deepfashion2agg81kps_util\... | [
[
"numpy.array"
]
] |
juanjq/cta-lstchain | [
"b14b6a914cc804291cb223428ee5e3e04e05a45a"
] | [
"lstchain/scripts/lstchain_dl1_muon_analysis.py"
] | [
"#!/usr/bin/env python3\n\n\"\"\"\nScript to perform the analysis of muon events.\n\n- Inputs are a DL1a data file (pixel information is needed) and a\ncalibration file\n- Output is a table with muon parameters (to be updated to a dataframe!)\n\nUsage:\n\n$> python lstchain_muon_analysis_dl1.py\n--input-file dl1_Ru... | [
[
"numpy.sum",
"pandas.read_hdf"
]
] |
apaleyes/trieste | [
"6551fa7b36007de64d73fb8fb6778acd90551e72"
] | [
"tests/unit/test_ask_tell_optimization.py"
] | [
"# Copyright 2021 The Trieste Contributors\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 l... | [
[
"tensorflow.constant"
]
] |
rgreenblatt/realistic-ssl-evaluation-pytorch | [
"e70266b405adec2a108667e48bca90f70646c270"
] | [
"train.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport argparse\nimport math\nimport time\nimport json\nimport os\n\nimport torch\nimport torch.optim as optim\nimport torch.nn.functional as F\nfrom torch.utils.data import DataLoader\nfrom tensorboardX import SummaryWriter\n\nfrom build_dataset import build_dataset... | [
[
"torch.zeros",
"torch.cat",
"torch.no_grad",
"torch.randperm",
"torch.nn.functional.log_softmax",
"torch.nn.functional.cross_entropy",
"torch.cuda.is_available",
"torch.utils.data.DataLoader"
]
] |
jatk/pymolcolorizer | [
"8c23409bcc84351e9894bef0bb73046b3ae1907b"
] | [
"pymolcolorizer3.py"
] | [
"from pymol import cmd, stored\nfrom matplotlib import pyplot as plt\nimport matplotlib as mpl\nfrom matplotlib.cm import ScalarMappable\nfrom matplotlib.pyplot import get_cmap\nfrom matplotlib.colors import Normalize\nimport numpy as np\nimport re\n\ncolors = ['tv_blue', 'tv_red', 'tv_green']\n\nclass attributePai... | [
[
"matplotlib.cm.ScalarMappable",
"matplotlib.pyplot.colorbar",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.get_cmap",
"matplotlib.pyplot.figure",
"matplotlib.colors.Normalize",
"matplotlib.pyplot.gca"
]
] |
laszukdawid/ai-traineree | [
"af32940eba8e11012de87b60d78f10f5a3b96c79",
"af32940eba8e11012de87b60d78f10f5a3b96c79"
] | [
"ai_traineree/networks/bodies.py",
"tests/buffers/test_nstep.py"
] | [
"from functools import reduce\nfrom math import sqrt\nfrom typing import Any, Optional, Sequence, Tuple, Union\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom ai_traineree.networks import NetworkType\nfrom ai_traineree.types import FeatureType\n\n\ndef hidden_init(layer: nn.Module):\... | [
[
"torch.zeros",
"torch.nn.Linear",
"torch.nn.Identity",
"torch.nn.ModuleList",
"torch.nn.MaxPool2d",
"torch.no_grad",
"torch.nn.init.xavier_uniform_",
"torch.nn.functional.linear",
"torch.nn.Conv2d"
],
[
"numpy.random.random"
]
] |
Goorman/pygbm | [
"456c374318c033c502d1bd663decbd2ff4e0c055"
] | [
"pygbm/binning.py"
] | [
"\"\"\"\nThis module contains the BinMapper class.\n\nBinMapper is used for mapping a real-valued dataset into integer-valued bins\nwith equally-spaced thresholds.\n\"\"\"\nimport numpy as np\nfrom numba import njit, prange\nfrom sklearn.utils import check_random_state, check_array\nfrom sklearn.base import BaseEst... | [
[
"numpy.zeros_like",
"numpy.array",
"numpy.ascontiguousarray",
"numpy.percentile",
"sklearn.utils.check_random_state",
"numpy.arange",
"sklearn.utils.check_array",
"numpy.linspace",
"numpy.unique"
]
] |
hu64/FFAVOD | [
"e2214e7989a32def9d4602b6f72aab0982472d88",
"e2214e7989a32def9d4602b6f72aab0982472d88"
] | [
"src/lib/models/networks/large_hourglass_vid.py",
"src/lib/detectors/ctdetSpotNet2.py"
] | [
"# ------------------------------------------------------------------------------\n# This code is base on\n# CornerNet (https://github.com/princeton-vl/CornerNet)\n# Copyright (c) 2018, University of Michigan\n# Licensed under the BSD 3-Clause License\n# -------------------------------------------------------------... | [
[
"torch.nn.Linear",
"torch.cat",
"torch.nn.Sigmoid",
"torch.nn.Sequential",
"torch.nn.MaxPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.Upsample",
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.nn.BatchNorm1d",
"torch.nn.functional.pad"
],
[
"numpy.concatenate",
"num... |
kshpv/nncf_pytorch | [
"9f7035e31732f5a3c0403edce759729d9425d4a5",
"9f7035e31732f5a3c0403edce759729d9425d4a5",
"9f7035e31732f5a3c0403edce759729d9425d4a5",
"9f7035e31732f5a3c0403edce759729d9425d4a5",
"9f7035e31732f5a3c0403edce759729d9425d4a5"
] | [
"beta/tests/tensorflow/quantization/test_algorithm_quantization.py",
"nncf/sparsity/rb/layers.py",
"beta/nncf/tensorflow/sparsity/magnitude/operation.py",
"tests/sparsity/magnitude/test_algo.py",
"examples/object_detection/models/ssd_vgg.py"
] | [
"\"\"\"\n Copyright (c) 2020 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... | [
[
"tensorflow.reshape",
"tensorflow.keras.Model",
"tensorflow.python.keras.layers.Dense",
"tensorflow.math.reduce_all",
"tensorflow.concat",
"tensorflow.python.keras.layers.Conv2D",
"tensorflow.python.keras.layers.MaxPool2D",
"tensorflow.transpose",
"tensorflow.python.keras.layer... |
matteolucchi/robo-gym | [
"d56869a362c9f9bf5a7769f7fdf4a703518122e3"
] | [
"robo_gym/envs/ur/ur_avoidance_basic.py"
] | [
"\"\"\"\nEnvironment for basic obstacle avoidance controlling a robotic arm from UR.\n\nIn this environment the obstacle is only moving up and down in a vertical line in front of the robot.\nThe goal is for the robot to stay within a predefined minimum distance to the moving obstacle.\nWhen feasible the robot shoul... | [
[
"numpy.square",
"numpy.array",
"numpy.linalg.norm",
"numpy.zeros",
"numpy.random.default_rng",
"numpy.min"
]
] |
athril/scikit-rebate | [
"bfc8dd6aab9ea7b5a196e318322a938d36723955"
] | [
"skrebatedev/IVLS.py"
] | [
"import numpy as np\r\nimport pandas as pd\r\nimport time\r\nimport warnings\r\nimport sys\r\nfrom sklearn.base import BaseEstimator\r\nfrom sklearn.base import TransformerMixin\r\n# from sklearn.feature_selection.base import SelectorMixin\r\nfrom sklearn.externals.joblib import Parallel, delayed\r\n# from .scoring... | [
[
"pandas.DataFrame",
"numpy.array",
"numpy.ones",
"numpy.argsort"
]
] |
showa-yojyo/deep-learning-from-scratch | [
"9dd8e0f2cbfc4888f7546b424dcb18e3f479c5c7"
] | [
"ch06/weight_init_compare.py"
] | [
"#!/usr/bin/env python\nimport os\nimport sys\n\nsys.path.append(os.pardir) # 親ディレクトリのファイルをインポートするための設定\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom dataset.mnist import load_mnist\nfrom common.util import smooth_curve\nfrom common.multi_layer_net import MultiLayerNet\nfrom common.optimizer import SG... | [
[
"numpy.random.choice",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.legend",
"numpy.arange",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.show"
]
] |
EmersonYe/TensorFlowIntro | [
"8212256d0e771feb9f03a4ec4f9fdcc31c7355ad"
] | [
"mlr1_helloWorld.py"
] | [
"from sklearn import tree\nfeatures = [[140, 1], [130,1], [150, 0], [170, 0]]\nlabels = [0, 0, 1, 1]\nclf = tree.DecisionTreeClassifier()\nclf = clf.fit(features, labels)\nprint (clf.predict([[150, 0]]))"
] | [
[
"sklearn.tree.DecisionTreeClassifier"
]
] |
itpplasma/SIMPLE | [
"77722c2479b4a064b99d0e2a58ef7749ce157c07"
] | [
"python/test_mappings.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Feb 13 12:35:03 2019\n\n@author: calbert\n\"\"\"\nimport time\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom fffi import fortran_library, fortran_module\n\npi=3.14159265358979\nc=2.9979e10\ne_charge=4.8032e-10\ne_mass=9.1094e-28\np... | [
[
"numpy.array",
"numpy.sin",
"numpy.empty",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.figure",
"numpy.sqrt",
"matplotlib.pyplot.ylabel",
"numpy.cos",
"matplotlib.pyplot.show",
"numpy.linspace",
"numpy.mes... |
kevincao91/kevin.ai.vehicle_detection | [
"fccf0ebb778ff408bc5990ab29b90ee7cb9d97ad"
] | [
"lib/model/faster_rcnn/resnet.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom model.utils.config import cfg\nfrom model.faster_rcnn.faster_rcnn import _fasterRCNN\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\ni... | [
[
"torch.nn.Linear",
"torch.nn.MaxPool2d",
"torch.nn.Sequential",
"torch.nn.AvgPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.Module.train",
"torch.utils.model_zoo.load_url",
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.load"
]
] |
cogito233/Toxic_Debias | [
"0505eeae46e8eed49158040080490fc59f18aa16"
] | [
"src/toxic.py"
] | [
"# coding=utf-8\n# This code was copied from\n# (https://github.com/huggingface/transformers/)\n# and amended by Xuhui Zhou. All modifications are licensed under Apache 2.0 as is the\n# original code. See below for the original license:\n\n# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc... | [
[
"tensorflow.data.experimental.cardinality",
"pandas.read_csv",
"tensorflow.TensorShape"
]
] |
mg64ve/ray_tests | [
"94e16375bb3b13db02693816668cff67b11e9aae"
] | [
"pytorch/CustomModels/ViewRequirements/custom_model_trajectory.py"
] | [
"import numpy as np\nimport gym\nfrom gym.spaces import Box, Discrete, MultiDiscrete\nfrom typing import Dict, List, Union\nfrom gym.envs.classic_control import CartPoleEnv\n\nimport ray\nfrom ray import tune\nfrom ray.tune.registry import register_env\nfrom ray.rllib.models import ModelCatalog\nfrom ray.rllib.util... | [
[
"numpy.array"
]
] |
BeautifulBeer/Youflix | [
"751dcf257ce36b7ac597eaabcf4e67ab237f1eff"
] | [
"django-vue/djangoAPI/api/algorithms/kmeansClustering.py"
] | [
"from rest_framework import status\nfrom rest_framework.decorators import api_view\n\nfrom django.http import JsonResponse\nfrom django.db.models import Max \n\nfrom api.models import User, Profile, UserCluster\n\nfrom sklearn.cluster import KMeans\nfrom sklearn.preprocessing import StandardScaler\n\nimport pandas ... | [
[
"pandas.DataFrame",
"sklearn.cluster.KMeans",
"numpy.linalg.norm",
"sklearn.preprocessing.StandardScaler"
]
] |
thomasjhuang/deep-learning-for-document-dewarping | [
"2c04f2f2baf9e54c85830fd5a9055de8237900af"
] | [
"models/base_model.py"
] | [
"import os\nimport torch\nimport sys\n\nclass BaseModel(torch.nn.Module):\n def name(self):\n return 'BaseModel'\n\n def initialize(self, opt):\n self.opt = opt\n self.gpu_ids = opt.gpu_ids\n self.isTrain = opt.isTrain\n self.Tensor = torch.cuda.FloatTensor if self.gpu_ids e... | [
[
"torch.cuda.is_available",
"torch.load"
]
] |
etarakci-hvl/probability | [
"7a0ce5e5beff91051028258dfbc7bc6cf0c4998d"
] | [
"tensorflow_probability/python/internal/backend/numpy/numpy_math.py"
] | [
"# Copyright 2018 The TensorFlow Probability Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a... | [
[
"numpy.arccos",
"numpy.ones_like",
"numpy.minimum",
"numpy.not_equal",
"numpy.negative",
"numpy.tan",
"numpy.true_divide",
"numpy.exp",
"numpy.multiply",
"numpy.where",
"numpy.sign",
"numpy.expm1",
"numpy.cos",
"numpy.imag",
"numpy.divide",
"numpy.bi... |
vixues/Sr | [
"1b49c64715fc14d667d32d679fd6ddec65748331"
] | [
"Napture.py"
] | [
"# -*- coding: UTF-8 -*-\nimport pandas as pd\n\n\nclass Napture(object):\n\n def __init__(self):\n self.filename = None\n self.file = None\n \n def open(self, filename, encoding=None):\n self.filename = filename\n self.file = open(self.filename, 'r', buffering= -1, encoding = e... | [
[
"pandas.DataFrame"
]
] |
mbaharan/DeepRace | [
"55e3df2a09b54cab5fab18dd657c5792e2d8b537"
] | [
"utility/generate_sample.py"
] | [
"import numpy as np\nfrom typing import Optional, Tuple\nimport scipy.io as matloader\n\n\n'''\nCopyright (c) 2018, University of North Carolina at Charlotte All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions ... | [
[
"numpy.empty",
"numpy.random.random_integers",
"matplotlib.pyplot.xlabel",
"scipy.io.loadmat",
"matplotlib.pyplot.plot",
"numpy.transpose",
"matplotlib.pyplot.ylabel",
"numpy.append",
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplot"
]
] |
rijo11811/Behavioral-cloning | [
"8b6e964f1bd6425465a1f1afa0304711d499aae4"
] | [
"model.py"
] | [
"from math import ceil\nimport csv \nimport cv2\nimport numpy as np\nfrom keras.models import Sequential\nfrom keras.layers.core import Dense, Activation, Flatten, Dropout\nfrom keras.layers.convolutional import Conv2D\nfrom keras.layers.pooling import MaxPooling2D\nfrom keras.layers import Cropping2D\nfrom keras.l... | [
[
"numpy.array",
"numpy.zeros",
"numpy.fliplr",
"sklearn.model_selection.train_test_split",
"sklearn.utils.shuffle"
]
] |
barrierye/PaddleFL | [
"583691acd5db0a7ca331cc9a72415017b18669b8"
] | [
"python/paddle_fl/mpc/examples/youtubednn_with_movielens/mpc_network.py"
] | [
"\n\nimport paddle\nimport io\nimport math\nimport numpy as np\nimport paddle.fluid as fluid\nimport paddle_fl.mpc as pfl_mpc\n\nclass YoutubeDNN(object):\n def input_data(self, batch_size, watch_vec_size, search_vec_size, other_feat_size):\n watch_vec = pfl_mpc.data(name='watch_vec', shape=[batch_size, w... | [
[
"numpy.concatenate",
"numpy.sqrt",
"numpy.random.RandomState"
]
] |
gregorjerse/resolwe-bio | [
"80f1e354cf0014a1eeff00acc112c622a2a044a9",
"80f1e354cf0014a1eeff00acc112c622a2a044a9"
] | [
"resolwe_bio/tools/bed_file_corrections_genome_browsers.py",
"resolwe_bio/tools/make_multireport.py"
] | [
"#!/usr/bin/env python3\n\"\"\"\nCorrect bed file to be compatible with bedToBigBed tool.\n\n 1.) restrict all scores to the maximal value of 1000,\n 2.) in strand column replace '?' with '.'.\n\"\"\"\n\nimport argparse\n\nimport pandas as pd\nfrom pandas.errors import EmptyDataError\nfrom resolwe_runtime_uti... | [
[
"pandas.read_csv",
"pandas.to_numeric"
],
[
"pandas.DataFrame",
"numpy.amax",
"numpy.amin"
]
] |
david0811/ATMS-597-SP-2020 | [
"3e6a18370cc51c711bfe5f9f80f77c05cda7028e"
] | [
"ATMS-597-SP-2020-Project-1/SUBMISSION.py"
] | [
"import numpy as np\n\nclass MrT:\n\n \"\"\"\n Authors: Randy J. Chase ... \n \n MrT is a temperature conversion module. It can convert to any of the 4 major\n temperature units (F,C,K and R). \n Supported datatypes: \n 1) float \n 2) int \n 3) list of floats/ints\n 4) np.array of floats/ints \n ... | [
[
"numpy.round",
"numpy.asarray"
]
] |
IBM/optflow-region-tracker | [
"133b165d431d6785d84656dc70714adfa0ff6a91"
] | [
"optflow_region_tracker/optflow_region_tracker.py"
] | [
"#\n# Copyright 2020- IBM Inc. All rights reserved\n# SPDX-License-Identifier: Apache-2.0\n#\n# -*- coding: utf-8 -*-\nimport numpy as np\nimport scipy.optimize as opt\nimport cv2\nfrom helper_functions import cv2_helpers\nimport warnings\nimport time\n\n\ndef affine_flow(nghood, flows, model=\"scale\", return_full... | [
[
"numpy.array",
"numpy.dot",
"numpy.zeros",
"numpy.round",
"numpy.fmax",
"numpy.ones",
"scipy.optimize.lsq_linear",
"numpy.eye",
"numpy.any",
"numpy.random.randint",
"numpy.hstack",
"numpy.diag",
"numpy.fmin",
"numpy.nanmedian"
]
] |
yuanchi2807/ray | [
"cf512254bb4bcd71ff1818dff5c868ab10c5f620",
"cf512254bb4bcd71ff1818dff5c868ab10c5f620"
] | [
"rllib/agents/maml/maml.py",
"rllib/utils/test_utils.py"
] | [
"import logging\nimport numpy as np\nfrom typing import Type\n\nfrom ray.rllib.utils.sgd import standardized\nfrom ray.rllib.agents import with_common_config\nfrom ray.rllib.agents.maml.maml_tf_policy import MAMLTFPolicy\nfrom ray.rllib.agents.maml.maml_torch_policy import MAMLTorchPolicy\nfrom ray.rllib.agents.tra... | [
[
"numpy.array"
],
[
"numpy.testing.assert_allclose",
"numpy.array",
"numpy.testing.assert_almost_equal",
"numpy.testing.assert_array_equal",
"numpy.mean",
"numpy.isscalar",
"numpy.abs",
"numpy.clip",
"tensorflow.python.eager.context.eager_mode",
"numpy.expand_dims"
... |
hua1024/OpenOCR | [
"13ecfd18d103d5e70a87922cebe89077e8f0eb9c"
] | [
"torchocr/models/heads/pse_head.py"
] | [
"# coding=utf-8 \r\n# @Time : 2020/12/22 18:22\r\n# @Auto : zzf-jeff\r\n\r\n\r\nimport torch\r\nimport torch.nn as nn\r\nfrom ..builder import HEADS\r\nimport torch.nn.functional as F\r\n\r\n\r\n@HEADS.register_module()\r\nclass PSEHead(nn.Module):\r\n def __init__(self, in_channels, result_num=6, img_shape... | [
[
"torch.nn.Conv2d",
"torch.nn.functional.interpolate"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.