repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
johnlyzhou/behavenet | [
"aa7187322e491299cd7fefbecb8f8f215b33edba",
"aa7187322e491299cd7fefbecb8f8f215b33edba"
] | [
"search/nogamma/search_utils_nogamma.py",
"tests/test_plotting/test_arhmm_utils.py"
] | [
"import os\nimport numpy as np\nimport pandas as pd\nimport pickle as pkl\nfrom tqdm import tqdm\nfrom sklearn.metrics import r2_score\nfrom behavenet import get_user_dir\nfrom behavenet.fitting.eval import export_latents\nfrom behavenet.fitting.utils import (\n get_expt_dir,\n get_session_dir,\n get_lab_e... | [
[
"numpy.square",
"pandas.concat",
"pandas.read_csv",
"numpy.ones_like",
"sklearn.metrics.r2_score",
"numpy.arange",
"numpy.concatenate"
],
[
"numpy.array"
]
] |
jeffpollock9/probability | [
"a4e6841b3d5116a56ef5383ddc6a6e03ccc4ce82",
"24352279e5e255e054bfe9c7bdc7080ecb280fba",
"24352279e5e255e054bfe9c7bdc7080ecb280fba"
] | [
"tensorflow_probability/examples/statistical_rethinking/rethinking/quap.py",
"tensorflow_probability/python/distributions/truncated_cauchy.py",
"tensorflow_probability/python/experimental/distribute/distribute_lib.py"
] | [
"# Copyright 2020 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... | [
[
"tensorflow.compat.v2.nest.map_structure",
"tensorflow.compat.v2.linalg.diag_part",
"tensorflow.compat.v2.unstack",
"tensorflow.compat.v2.debugging.Assert",
"tensorflow.compat.v2.name_scope",
"tensorflow.compat.v2.nest.pack_sequence_as",
"tensorflow.compat.v2.nest.flatten",
"tensor... |
Zino-chata/question_gen_v2 | [
"440fbb4eaccb86232a54287d0890c79a4935e418"
] | [
"backUp/prepare_data_orig.py"
] | [
"import pyforest\nimport os\nimport logging\nfrom dataclasses import dataclass, field\nfrom typing import Dict, List, Optional\nimport sys\n\nimport torch\nimport nlp\nfrom transformers import T5Tokenizer, BartTokenizer, HfArgumentParser\nfrom datasets import list_datasets, load_dataset, list_metrics, load_metric, ... | [
[
"torch.save"
]
] |
vrdmr/Intro-to-AI-and-ML | [
"9b109a02949ae9cc71580b95c7e9a389412c056d"
] | [
"kmeans.py"
] | [
"import matplotlib.pyplot as plt\nfrom sklearn.datasets import make_blobs\nfrom sklearn.cluster import KMeans\n\n# create dataset\nX, y = make_blobs(\n n_samples=150, n_features=2,\n centers=3, cluster_std=0.5,\n shuffle=True, random_state=0\n)\n\nkm = KMeans(\n n_clusters=3, init='random',\n n_init=10,... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.scatter",
"sklearn.cluster.KMeans",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.show",
"sklearn.datasets.make_blobs"
]
] |
rajivpatel36/pyesg | [
"f16939f6de003c55fc89d8e1bd11af03011ee0aa"
] | [
"pyesg/yield_curve/yield_curve.py"
] | [
"import bisect\nimport numpy as np\n\nfrom typing import Dict, List\n\nCC_SPOT_RATE = \"cc_spot_rate\"\nZCB = \"zcb\"\n\n\nclass YieldCurve:\n \"\"\"\n Class for specifying and extracting rates from a yield curve including interpolation of unspecified points.\n \"\"\"\n def __init__(self):\n # Se... | [
[
"numpy.exp"
]
] |
Turgibot/JupyterNinja | [
"93320e918bb4ef51392bf9b2a4ef76b48bb08815"
] | [
"Teaching_Tensorflow/utils.py"
] | [
"# The MIT License (MIT)\n# Copyright (c) 2018 Guy Tordjman. All Rights Reserved.\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation th... | [
[
"numpy.arange",
"sklearn.metrics.confusion_matrix",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.colorbar",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.matshow",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] |
rdarie/statsmodels | [
"55f9e73b7665bc6bda0f4c13a1ac27d60c021777"
] | [
"statsmodels/tsa/tests/test_ar.py"
] | [
"\"\"\"\nTest AR Model\n\"\"\"\nfrom statsmodels.compat.pytest import pytest_warns\nfrom typing import NamedTuple, Union\n\nimport datetime as dt\nfrom itertools import product\n\nimport numpy as np\nfrom numpy.testing import assert_allclose, assert_almost_equal\nimport pandas as pd\nfrom pandas import Index, Serie... | [
[
"pandas.testing.assert_series_equal",
"pandas.Series",
"numpy.sqrt",
"numpy.asarray",
"pandas.DataFrame",
"numpy.random.randn",
"numpy.ones_like",
"numpy.allclose",
"numpy.arange",
"numpy.eye",
"pandas.Index",
"numpy.testing.assert_almost_equal",
"pandas.testing... |
peterdodds-fb/SOFASonix | [
"6c7156ccc91a6e925599dc590c12b3bc99bd1243",
"6c7156ccc91a6e925599dc590c12b3bc99bd1243",
"6c7156ccc91a6e925599dc590c12b3bc99bd1243"
] | [
"Templates/SimpleFreeFieldHRIR_1.0_1.0.py",
"Templates/SimpleFreeFieldTF_1.0_1.0.py",
"Templates/GeneralFIRE_1.0_1.0.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (c) 2018, I.Laghidze\n#\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must reta... | [
[
"numpy.zeros"
],
[
"numpy.zeros"
],
[
"numpy.zeros"
]
] |
yycho0108/ai604-video-object-pose | [
"7067f36281038272b0e39166d8f9718076bb6e75",
"7067f36281038272b0e39166d8f9718076bb6e75"
] | [
"scripts/keypoint_regression.py",
"src/top/model/loss.py"
] | [
"#!/usr/bin/env python3\n#PYTHON_ARGCOMPLETE_OK\n\nimport enum\nimport logging\nfrom dataclasses import dataclass, replace\nfrom simple_parsing import Serializable\nfrom typing import Dict, Any\nfrom tqdm.auto import tqdm\n\nimport torch as th\nfrom torchvision.transforms import Compose\nfrom torch.utils.tensorboar... | [
[
"torch.clip",
"torch.no_grad",
"torch.utils.tensorboard.SummaryWriter",
"torch.device",
"torch.autograd.profiler.profile"
],
[
"torch.abs",
"torch.nn.CrossEntropyLoss",
"torch.ones_like",
"torch.round",
"torch.sum",
"torch.isfinite",
"torch.square",
"torch.l... |
hyzhak/zalando-research-fashionmnist-analyze | [
"5dfff74f80982769c7ffae746abc58fc7113113b"
] | [
"src/models/baseline_logistic_regression.py"
] | [
"import luigi\nimport mlflow\nimport mlflow.sklearn\nimport pickle\nfrom sklearn.linear_model import LogisticRegression\nimport time\n\nfrom src.data.external_train_set import ExternalTrainSet\nfrom src.utils.params_to_filename import encode_task_to_filename\nfrom src.utils.extract_x_y import extract_x_and_y\n\n\nc... | [
[
"sklearn.linear_model.LogisticRegression"
]
] |
h0ke/jesse | [
"02dbf2b5df3a970eed18b276d5e3bcf8fb3f9220",
"02dbf2b5df3a970eed18b276d5e3bcf8fb3f9220"
] | [
"jesse/indicators/beta.py",
"jesse/indicators/willr.py"
] | [
"from typing import Union\n\nimport numpy as np\nimport talib\n\n\ndef beta(candles: np.ndarray, period=5, sequential=False) -> Union[float, np.ndarray]:\n \"\"\"\n BETA - Beta\n\n :param candles: np.ndarray\n :param period: int - default: 5\n :param sequential: bool - default=False\n\n :return: f... | [
[
"numpy.isnan"
],
[
"numpy.isnan"
]
] |
jojochuang/determined | [
"22a7cd4b497767d7420b26ead769ba7e61d7f90a"
] | [
"examples/official/native/native_mnist_estimator/native_impl.py"
] | [
"\"\"\"\nThis example demonstrates training a simple DNN with tf.estimator using the Determined\nNative API.\n\"\"\"\nimport argparse\nimport json\nimport logging\nimport os\nimport pathlib\nimport tarfile\nfrom typing import Callable, Dict, List, Tuple\n\nimport requests\nimport tensorflow as tf\n\nimport determin... | [
[
"tensorflow.io.gfile.exists",
"tensorflow.data.TFRecordDataset",
"tensorflow.io.gfile.GFile",
"tensorflow.io.decode_raw",
"tensorflow.io.gfile.makedirs",
"tensorflow.io.FixedLenFeature",
"tensorflow.feature_column.numeric_column",
"tensorflow.io.gfile.listdir",
"tensorflow.data... |
hellomirro/dgl | [
"ff64bd0de83f865a8076cf50f69525549c32ca87",
"ff64bd0de83f865a8076cf50f69525549c32ca87"
] | [
"python/dgl/transform.py",
"python/dgl/nn/pytorch/conv/agnnconv.py"
] | [
"\"\"\"Module for graph transformation utilities.\"\"\"\n\nfrom collections.abc import Iterable, Mapping\nfrom collections import defaultdict\nimport numpy as np\nfrom scipy import sparse\n\nfrom ._ffi.function import _init_api\nfrom .base import dgl_warning, DGLError\nfrom . import convert\nfrom .heterograph impor... | [
[
"numpy.unique",
"scipy.sparse.eye",
"numpy.cumsum",
"scipy.sparse.linalg.eigs",
"numpy.repeat"
],
[
"torch.nn.functional.normalize",
"torch.Tensor"
]
] |
scikit-learn-contrib/categorical_encoding | [
"6a13c14919d56fed8177a173d4b3b82c5ea2fef5",
"6a13c14919d56fed8177a173d4b3b82c5ea2fef5"
] | [
"category_encoders/hashing.py",
"category_encoders/ordinal.py"
] | [
"\"\"\"The hashing module contains all methods and classes related to the hashing trick.\"\"\"\n\nimport sys\nimport hashlib\nimport category_encoders.utils as util\nimport multiprocessing\nimport pandas as pd\nimport math\nimport platform\n\n__author__ = 'willmcginnis', 'LiuShulun'\n\n\nclass HashingEncoder(util.B... | [
[
"pandas.concat",
"pandas.Series"
],
[
"pandas.Series"
]
] |
AsifHasanChowdhury/Airtificial-Intelligence-CSE422-BRACU- | [
"03acedf4694111eddde3c1ccce9d009571a7f546"
] | [
"L-A-1/Task1.py"
] | [
"import numpy as dp\r\nimport queue\r\nq=queue.Queue()\r\nvertex=0\r\nedge=0\r\nline=0\r\ncount=0\r\n\r\n#with open('F:\\\\CSE422\\\\bfs.txt') as file:\r\n# for line in file:\r\n# print(line.rstrip())\r\n# vertex=line\r\n# Edge=line\r\n# break\r\n \r\narr_zeros=dp.zeros((vertex,... | [
[
"numpy.zeros"
]
] |
Wollala/Gradient-Free-Optimizers | [
"8fb1608c264431b87f66fd2d233b76a0fa75316c",
"8fb1608c264431b87f66fd2d233b76a0fa75316c"
] | [
"gradient_free_optimizers/optimizers/exp_opt/ensemble_optimizer.py",
"gradient_free_optimizers/optimizers/smb_opt/exp_imp_based_opt.py"
] | [
"# Author: Simon Blanke\n# Email: simon.blanke@yahoo.com\n# License: MIT License\n\n\nfrom ..smb_opt.exp_imp_based_opt import ExpectedImprovementBasedOptimization\nfrom ..smb_opt.surrogate_models import EnsembleRegressor\n\n\nfrom sklearn.tree import DecisionTreeRegressor\nfrom sklearn.ensemble import GradientBoost... | [
[
"sklearn.gaussian_process.GaussianProcessRegressor",
"sklearn.ensemble.GradientBoostingRegressor"
],
[
"scipy.stats.norm.cdf",
"scipy.stats.norm.pdf",
"numpy.random.random_sample",
"numpy.max",
"numpy.zeros_like",
"numpy.array"
]
] |
hqucms/dgl | [
"bf8bb58f60863466e5254bfa6ee2ad15f2384acb"
] | [
"examples/pytorch/sgc/sgc.py"
] | [
"\"\"\"\nThis code was modified from the GCN implementation in DGL examples.\nSimplifying Graph Convolutional Networks\nPaper: https://arxiv.org/abs/1902.07153\nCode: https://github.com/Tiiiger/SGC\nSGC implementation in DGL.\n\"\"\"\nimport argparse, time, math\nimport numpy as np\nimport torch\nimport torch.nn as... | [
[
"torch.ByteTensor",
"torch.nn.CrossEntropyLoss",
"torch.LongTensor",
"torch.max",
"torch.cuda.set_device",
"torch.sum",
"torch.no_grad",
"torch.FloatTensor",
"numpy.mean"
]
] |
TJ-Machine-Learning-Group/LAB1-Regression | [
"86baa7123f711cdf4a39a1632223cdc5ae0e6d2b"
] | [
"EDA.py"
] | [
"import numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nfrom sklearn.decomposition import PCA\ndata = pd.read_excel(r\"Concrete_Data.xls\")\nreq_col_names = [\"Cement\", \"BlastFurnaceSlag\", \"FlyAsh\", \"Water\", \"Superplasticizer\",\n \"CoarseAggregate\"... | [
[
"pandas.read_excel",
"matplotlib.pyplot.title",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.subplots",
"numpy.corrcoef",
"matplotlib.pyplot.show",
"sklearn.decomposition.PCA",
"matplotlib.pyplot.figure"
]
] |
rakeshchada/gpt2-singular-plural | [
"80744e3049af8014ad0e32675665d6886ab6bfa8"
] | [
"generate_singular.py"
] | [
"#!/usr/bin/env python3\n# coding=utf-8\n# Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team.\n# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this fil... | [
[
"torch.nn.functional.softmax",
"numpy.random.seed",
"torch.zeros",
"torch.manual_seed",
"torch.tensor",
"torch.no_grad",
"torch.sort",
"torch.cuda.manual_seed_all",
"torch.cuda.is_available",
"torch.topk",
"torch.cuda.device_count"
]
] |
andreandradecosta/Adversarial_Autoencoder | [
"255a5cc021a46d9f8320a8608f15370d3e89e29e"
] | [
"semi_supervised_adversarial_autoencoder.py"
] | [
"import tensorflow as tf\nimport numpy as np\nimport datetime\nimport os\nimport argparse\nimport matplotlib.pyplot as plt\nfrom matplotlib import gridspec\nfrom tensorflow.examples.tutorials.mnist import input_data\n\n# Get the MNIST data\nmnist = input_data.read_data_sets('./Data', one_hot=True)\n\n# Parameters\n... | [
[
"tensorflow.nn.softmax_cross_entropy_with_logits",
"tensorflow.concat",
"tensorflow.cast",
"numpy.concatenate",
"numpy.random.randn",
"tensorflow.train.AdamOptimizer",
"tensorflow.summary.scalar",
"numpy.random.randint",
"numpy.reshape",
"numpy.arange",
"tensorflow.summ... |
policy-in-practice/stata-linter | [
"eaff30abdf3597d6f53839e9082e83ae09dedde3"
] | [
"src/stata_linter_detect.py"
] | [
"# version 1.0 (based on DIME 0.0.2) 29/12/2021\n# Import packages ====================\nimport os\nimport re\nimport sys\nimport pandas as pd\nimport argparse\n\n# simple run entry point\ndef run():\n parser = argparse.ArgumentParser(description='Lint a Stata do-file.')\n parser.add_argument('filename', meta... | [
[
"pandas.DataFrame",
"pandas.ExcelWriter"
]
] |
josiahjohnston/PowerGenome | [
"6e8c353cb185479c0cf2235d8c6d02dcadd4990c"
] | [
"powergenome/load_data.py"
] | [
"\"Load and download data for use in other modules\"\n\nimport sqlite3\n\nimport geopandas as gpd\nimport pandas as pd\nimport requests\nimport sqlalchemy as sa\nfrom bs4 import BeautifulSoup\nfrom xlrd import XLRDError\n\nfrom powergenome.params import IPM_GEOJSON_PATH\n\n\ndef load_ipm_plant_region_map(pudl_engin... | [
[
"pandas.read_sql_table"
]
] |
dominik-steenken/qiskit-terra | [
"1e04bad5067610abda5e7cbba36939745075f3b9",
"1e04bad5067610abda5e7cbba36939745075f3b9",
"1e04bad5067610abda5e7cbba36939745075f3b9",
"1e04bad5067610abda5e7cbba36939745075f3b9"
] | [
"qiskit/quantum_info/states/states.py",
"qiskit/visualization/latex.py",
"qiskit/pulse/commands/sample_pulse.py",
"qiskit/quantum_info/operators/channel/superop.py"
] | [
"# -*- coding: utf-8 -*-\n\n# Copyright 2017, IBM.\n#\n# This source code is licensed under the Apache License, Version 2.0 found in\n# the LICENSE.txt file in the root directory of this source tree.\n\n# pylint: disable=invalid-name,anomalous-backslash-in-string\n\n\"\"\"\nA collection of useful quantum informatio... | [
[
"numpy.log",
"numpy.sqrt",
"numpy.iinfo",
"numpy.exp",
"numpy.array",
"numpy.zeros",
"numpy.random.RandomState"
],
[
"numpy.sqrt"
],
[
"numpy.abs"
],
[
"numpy.dot",
"numpy.conj",
"numpy.sqrt",
"numpy.reshape",
"numpy.linalg.matrix_power",
"nu... |
HumaticsLAB/GTM-Transformer | [
"94124d3246c7c22d8b952beeda53639a9ad170e3"
] | [
"models/GTM.py"
] | [
"import math\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nimport pytorch_lightning as pl\r\nfrom transformers import pipeline\r\nfrom torchvision import models\r\nfrom fairseq.optim.adafactor import Adafactor\r\n\r\n\r\nclass PositionalEncoding(nn.Module):\r\n def __init__(self,... | [
[
"torch.nn.functional.l1_loss",
"torch.sin",
"torch.zeros",
"torch.cat",
"torch.FloatTensor",
"torch.nn.Dropout",
"torch.ones",
"torch.nn.MultiheadAttention",
"torch.nn.TransformerDecoder",
"torch.nn.TransformerEncoder",
"torch.arange",
"torch.cos",
"torch.nn.Seq... |
joergfranke/recnet | [
"bfb8a359207258d4c2f71fe4a1304764f6f355cb"
] | [
"recnet/layer_pool/ln_reccurent_layer.py"
] | [
"from __future__ import absolute_import, print_function, division\n\"\"\"\nThis file contains the implementation of different layer normalized recurrent layers.\n\"\"\"\n\n###### Imports\n########################################\nimport numpy as np\nimport theano\nimport theano.tensor as T... | [
[
"numpy.zeros",
"numpy.ones"
]
] |
klevis-a/process-vicon-biplane | [
"f140589b4705f0d6411b80b8e2699add68d08662"
] | [
"biplane_kine/graphing/vicon_accuracy_plotters.py"
] | [
"\"\"\"A module that provides plotters for Vicon markers that have been tracked via biplane fluoroscopy to ascertain the\nspatiotemporal syncing accuracy between the Vicon and biplane fluoroscopy systems .\"\"\"\n\nimport numpy as np\nfrom typing import Sequence, List\nimport matplotlib.figure\nimport matplotlib.py... | [
[
"numpy.arange",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.figure",
"numpy.full"
]
] |
GitHubEmploy/DashboardWebsite | [
"1b84b2df36e6a360c6b91d8d7ba5fc4f64332698"
] | [
"app/views.py"
] | [
"# -*- encoding: utf-8 -*-\n\"\"\"\nLicense: MIT\nCopyright (c) 2019 - present AppSeed.us\n\"\"\"\n\n# Python modules\nimport fnmatch\nimport os, logging\n\n# Flask modules\nimport threading\n\nimport requests\nfrom flask import render_template, request, url_for, redirect, send_from_directory, session, Response, fl... | [
[
"pandas.read_html"
]
] |
juliaavaladares/data-science-ethereum | [
"035cf959123645394e09566092e3529716f83652",
"035cf959123645394e09566092e3529716f83652"
] | [
"src/models/semi_supervised_pred.py",
"src/data/make_final_data.py"
] | [
"# Data manipulation\nimport numpy as np\nimport pandas as pd\nfrom sklearn import preprocessing\n# Sklearn\nfrom sklearn.model_selection import train_test_split # for splitting data into train and test samples\nfrom sklearn.svm import SVC # for Support Vector Classification baseline model\nfrom sklearn.semi_superv... | [
[
"pandas.concat",
"pandas.read_csv",
"sklearn.linear_model.LogisticRegression",
"sklearn.ensemble.RandomForestClassifier",
"sklearn.model_selection.train_test_split",
"sklearn.ensemble.VotingClassifier",
"sklearn.neighbors.KNeighborsClassifier",
"numpy.concatenate",
"pandas.Data... |
trotsky1997/mars | [
"315b94ade1489d4fdfd351f17263fbc1d4c47008",
"315b94ade1489d4fdfd351f17263fbc1d4c47008",
"315b94ade1489d4fdfd351f17263fbc1d4c47008"
] | [
"mars/learn/metrics/pairwise/tests/test_manhattan_distances.py",
"mars/learn/contrib/xgboost/tests/test_train.py",
"mars/services/storage/tests/test_transfer.py"
] | [
"# Copyright 1999-2021 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appl... | [
[
"scipy.sparse.random",
"numpy.testing.assert_almost_equal",
"numpy.random.rand",
"sklearn.metrics.pairwise.manhattan_distances"
],
[
"numpy.arange",
"numpy.random.rand",
"numpy.random.randint"
],
[
"numpy.testing.assert_array_equal",
"pandas.testing.assert_frame_equal",... |
monkeyhippies/speech2signs-2017-nmt | [
"b2cc696f1673a59e32f3f1a3e2896b9f80e75d7a"
] | [
"transformer/Modules.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.init as init\nimport numpy as np\n\n__author__ = \"Yu-Hsiang Huang\"\n\nclass Linear(nn.Module):\n ''' Simple Linear layer with xavier init '''\n def __init__(self, d_in, d_out, bias=True):\n super(Linear, self).__init__()\n self.linear = nn.... | [
[
"torch.mean",
"torch.nn.Dropout",
"torch.ones",
"numpy.power",
"torch.zeros",
"torch.nn.Linear",
"torch.std",
"torch.bmm",
"torch.nn.init.xavier_normal"
]
] |
Yanci0/openGauss-server | [
"f43410e1643c887819e718d9baceb9e853ad9574",
"f43410e1643c887819e718d9baceb9e853ad9574"
] | [
"src/gausskernel/dbmind/tools/ai_server/app/monitor/algorithm/anomaly_detection/spectral_residual.py",
"src/gausskernel/dbmind/tools/anomaly_detection/detector/algorithm/fb_prophet.py"
] | [
"# SR.py\nimport numpy as np\nimport scipy as sc\nimport pandas as pd\nimport matplotlib.pyplot as plt\nfrom gs_aiops.detector.algorithm.anomal_detect_algorithm.utils import *\nfrom scipy.fftpack import fft, ifft\nfrom gs_aiops.tools import generate_anomal_data\nfrom gs_aiops.detector.algorithm.anomal_detect_algori... | [
[
"numpy.log",
"scipy.fftpack.ifft",
"numpy.sqrt",
"matplotlib.pyplot.scatter",
"matplotlib.pyplot.plot",
"scipy.fftpack.fft",
"matplotlib.pyplot.subplot",
"numpy.array",
"numpy.where",
"numpy.sum",
"matplotlib.pyplot.show"
],
[
"pandas.DataFrame"
]
] |
arthurpessoa/tensorflow-handwriten-digits | [
"d140299b96c4da146ca4c63015c9101aacb851f1"
] | [
"mnist_softmax.py"
] | [
"# 1) Download dataset from MNIST (\"Modified National Institute of Standards and Technology\"),\n# 2) Splits it into Training + Test data\nfrom tensorflow.examples.tutorials.mnist import input_data\nmnist = input_data.read_data_sets(\"MNIST_data/\", one_hot=True)\n\nimport tensorflow as tf\n\n#Set parameters\nlea... | [
[
"tensorflow.matmul",
"tensorflow.summary.FileWriter",
"tensorflow.zeros",
"tensorflow.cast",
"tensorflow.placeholder",
"tensorflow.initialize_all_variables",
"tensorflow.train.GradientDescentOptimizer",
"tensorflow.summary.merge_all",
"tensorflow.name_scope",
"tensorflow.Se... |
wingkitlee0/pt-dec | [
"087b6231ea52422d827bf446b2ecf755ae9a6679"
] | [
"ptdec/model.py"
] | [
"from typing import Callable, Optional, Tuple, Union\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nfrom sklearn.cluster import KMeans\nfrom torch.utils.data.dataloader import DataLoader, default_collate\nfrom tqdm import tqdm\n\nfrom ptdec.utils import cluster_accuracy, target_distribution\n\n\ndef tr... | [
[
"torch.nn.KLDivLoss",
"sklearn.cluster.KMeans",
"torch.cat",
"torch.tensor",
"numpy.copy",
"torch.no_grad",
"torch.utils.data.dataloader.DataLoader"
]
] |
muminkoykiran/computervision-recipes | [
"b573f2600ebda68b1ab571d4122a32525b674587",
"b573f2600ebda68b1ab571d4122a32525b674587"
] | [
"utils_cv/action_recognition/dataset.py",
"utils_cv/detection/references/coco_utils.py"
] | [
"# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\nimport os\nimport copy\nimport math\nfrom pathlib import Path\nimport warnings\nfrom typing import Callable, Tuple, Union, List\n\nimport decord\nfrom einops.layers.torch import Rearrange\nimport matplotlib.pyplot as ... | [
[
"matplotlib.pyplot.tight_layout",
"torch.manual_seed",
"matplotlib.pyplot.subplots",
"torch.from_numpy",
"torch.utils.data.Subset",
"numpy.zeros",
"numpy.random.randint"
],
[
"torch.zeros",
"torch.tensor",
"torch.as_tensor",
"torch.utils.data.Subset",
"torch.sta... |
LawrenceMMStewart/Optimal_Transport_MIT | [
"a71a0110fa15110692fd383c1e77a6c347ef9ca3",
"a71a0110fa15110692fd383c1e77a6c347ef9ca3"
] | [
"src/augment.py",
"datasets/wine/process_example.py"
] | [
"\"\"\"\nFile: augment\nDescription: Evaluate the performance of MLP's (trained on various levels\nof noisy data) on the validation set. \nAuthor Lawrence Stewart <lawrence.stewart@ens.fr>\nLicense: Mit License \n\"\"\"\n\n\nimport numpy as np\nimport tensorflow as tf\nimport matplotlib.pyplot as plt\nimport panda... | [
[
"tensorflow.keras.models.load_model",
"pandas.read_csv",
"numpy.random.seed",
"tensorflow.random.set_seed",
"matplotlib.pyplot.yscale",
"sklearn.model_selection.train_test_split",
"matplotlib.pyplot.subplots",
"pandas.DataFrame.to_numpy",
"matplotlib.pyplot.bar",
"matplotli... |
kclamar/vedo | [
"2fd8b02ba8debcabbf43f0a4decbc141854273e1"
] | [
"examples/pyplot/plot_errband.py"
] | [
"\"\"\"Plotting functions with error bands\"\"\"\nimport numpy as np\nfrom vedo import *\nfrom vedo.pyplot import plot\n\n# Make up same data\nx = np.arange(0, 6, 0.1)\ny = 2+2*np.sin(2*x)/(x+1)\nye= y**2 / 10\nminy = np.min(y-ye)\nidx = np.argmax(y)\n\n# Plot the two variables, return a Plot(Assembly) object:\nplt... | [
[
"numpy.arange",
"numpy.argmax",
"numpy.sin",
"numpy.min"
]
] |
mfwarren/FreeCoding | [
"58ac87f35ad2004a3514782556762ee0ed72c39a"
] | [
"2015/06/fc_2015_06_07.py"
] | [
"#!/usr/bin/env python3\n# imports go here\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib.collections import LineCollection\n\nfrom sklearn.isotonic import IsotonicRegression\nfrom sklearn.utils import check_random_state\n\n#\n# Free Coding session for 2015-06-07\n# Written by Matt Warren\n#\... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.gca",
"sklearn.isotonic.IsotonicRegression",
"matplotlib.pyplot.title",
"matplotlib.collections.LineCollection",
"numpy.arange",
"numpy.ones",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.show",
"sklearn.utils.check_random_stat... |
carlosferpereira/OpenAeroStruct | [
"35e1ff8aac5c67e40b1925829cfbc203ba1b2f2d",
"35e1ff8aac5c67e40b1925829cfbc203ba1b2f2d",
"35e1ff8aac5c67e40b1925829cfbc203ba1b2f2d",
"35e1ff8aac5c67e40b1925829cfbc203ba1b2f2d",
"35e1ff8aac5c67e40b1925829cfbc203ba1b2f2d"
] | [
"openaerostruct/common/tests/test_reynolds_comp.py",
"openaerostruct/tests/test_simple_rect_AS.py",
"openaerostruct/structures/local_stiff.py",
"openaerostruct/structures/fuel_loads.py",
"openaerostruct/tests/test_aero_opt_no_symmetry.py"
] | [
"import unittest\r\nimport numpy as np\r\nimport openmdao.api as om\r\nfrom openmdao.utils.assert_utils import assert_check_partials\r\nfrom openaerostruct.common.reynolds_comp import ReynoldsComp\r\n\r\n\r\nclass Test(unittest.TestCase):\r\n\r\n def test_reynolds_derivs(self):\r\n comp = ReynoldsComp()\r... | [
[
"numpy.random.random"
],
[
"numpy.array",
"numpy.zeros",
"numpy.ones"
],
[
"numpy.arange",
"numpy.array",
"numpy.ones"
],
[
"numpy.zeros",
"numpy.sum",
"numpy.ones"
],
[
"numpy.array",
"numpy.zeros"
]
] |
LukeTheHecker/mne-python | [
"7d508e4fded73b5beb73564e4a01169530e058a8",
"7d508e4fded73b5beb73564e4a01169530e058a8"
] | [
"mne/export/_egimff.py",
"mne/channels/montage.py"
] | [
"# -*- coding: utf-8 -*-\n# Authors: MNE Developers\n#\n# License: BSD (3-clause)\n\nimport datetime\n\nimport numpy as np\n\nfrom ..io.egi.egimff import _import_mffpy\nfrom ..io.pick import pick_types, pick_channels\nfrom ..utils import verbose\n\n\n@verbose\ndef export_evokeds_mff(fname, evoked, history=None, *, ... | [
[
"numpy.round",
"numpy.isin",
"numpy.flatnonzero"
],
[
"numpy.array_equal",
"numpy.isnan",
"numpy.arange",
"numpy.eye",
"numpy.linalg.norm",
"numpy.empty",
"numpy.genfromtxt",
"numpy.full",
"numpy.concatenate",
"numpy.fromstring",
"numpy.zeros",
"nump... |
gAldeia/iirsBenchmark | [
"2211b4755405eb32178a09f1a01143d53dc6516d",
"2211b4755405eb32178a09f1a01143d53dc6516d",
"2211b4755405eb32178a09f1a01143d53dc6516d"
] | [
"iirsBenchmark/regressors/DecisionTree_regressor.py",
"iirsBenchmark/explainers/ELA_explainer.py",
"iirsBenchmark/regressors/Linear_regressor.py"
] | [
"# Author: Guilherme Aldeia\r\n# Contact: guilherme.aldeia@ufabc.edu.br\r\n# Version: 1.0.0\r\n# Last modified: 08-20-2021 by Guilherme Aldeia\r\n\r\n\"\"\"\r\nDecision tree regressor. This method is considered a white-box for most \r\nauthors.\r\n\r\nThis regressor extends the scikit-learn\r\n[DecisionTreeRegress... | [
[
"sklearn.tree.export_text"
],
[
"numpy.abs",
"sklearn.utils.validation.check_array",
"numpy.zeros_like",
"sklearn.linear_model.LinearRegression",
"numpy.sum"
],
[
"numpy.zeros_like",
"numpy.isclose"
]
] |
kyleaton/great_expectations | [
"a856513859445cdb1b254e0d90022bab6257b6a2"
] | [
"tests/conftest.py"
] | [
"import datetime\nimport json\nimport locale\nimport os\nimport shutil\n\nimport numpy as np\nimport pandas as pd\nimport pytest\n\nimport great_expectations as ge\nfrom great_expectations.core import (\n ExpectationConfiguration,\n ExpectationSuite,\n ExpectationValidationResult,\n expectationSuiteSche... | [
[
"pandas.DataFrame"
]
] |
bobatsar/moviepy | [
"75a111b9d3b2c50c6f2a9a36d21432053f02284d"
] | [
"moviepy/video/tools/segmenting.py"
] | [
"import numpy as np\nimport scipy.ndimage as ndi\nfrom moviepy.video.VideoClip import ImageClip\n\n\ndef findObjects(clip,rem_thr=500, preview=False):\n \"\"\" \n Returns a list of ImageClips representing each a separate object on\n the screen.\n \n rem_thr : all objects found with size < rem_Thr... | [
[
"matplotlib.pyplot.subplots",
"scipy.ndimage.measurements.label",
"scipy.ndimage.find_objects",
"numpy.array",
"matplotlib.pyplot.show"
]
] |
proteneer/timemachine | [
"feee9f24adcb533ab9e1c15a3f4fa4dcc9d9a701",
"feee9f24adcb533ab9e1c15a3f4fa4dcc9d9a701",
"feee9f24adcb533ab9e1c15a3f4fa4dcc9d9a701",
"feee9f24adcb533ab9e1c15a3f4fa4dcc9d9a701"
] | [
"tests/test_jax_nonbonded.py",
"tests/test_centroid_rescaler.py",
"tests/test_standard_state.py",
"fe/model_rabfe.py"
] | [
"import jax\n\njax.config.update(\"jax_enable_x64\", True)\n\nimport numpy as onp\nfrom numpy.random import randn, rand, randint, seed\n\nseed(2021)\n\nfrom scipy.optimize import minimize\n\nfrom jax import numpy as np, value_and_grad, jit, vmap\n\nfrom jax.ops import index_update, index\nfrom timemachine.potential... | [
[
"numpy.random.seed",
"numpy.ones",
"numpy.testing.assert_almost_equal",
"numpy.random.randn",
"numpy.random.rand",
"scipy.optimize.minimize",
"numpy.testing.assert_allclose",
"numpy.array",
"numpy.random.randint"
],
[
"numpy.hstack",
"numpy.testing.assert_array_almo... |
YUANMUCE/masktrackrcnn | [
"10e5d7ded62e0b7c5bf79075d9ee0cc37dc15321"
] | [
"tools/test_video.py"
] | [
"import argparse\n\nimport torch\nimport mmcv\nfrom mmcv.runner import load_checkpoint, parallel_test, obj_from_dict\nfrom mmcv.parallel import scatter, collate, MMDataParallel\n\nfrom mmdet import datasets\nfrom mmdet.core import results2json_videoseg, ytvos_eval\nfrom mmdet.datasets import build_dataloader\nfrom ... | [
[
"torch.no_grad"
]
] |
ryfi/scikit-allel | [
"a597b50ff32d0280fd8187f8fadc0b2b895dda61"
] | [
"allel/test/test_stats.py"
] | [
"# -*- coding: utf-8 -*-\nimport unittest\n\n\nimport numpy as np\nimport pytest\nfrom pytest import approx\n\n\nimport allel\nfrom allel.test.tools import assert_array_equal as aeq, assert_array_almost_equal\nfrom allel.util import ignore_invalid, mask_inaccessible\nfrom allel import GenotypeArray, HaplotypeArray,... | [
[
"numpy.random.seed",
"numpy.isnan",
"numpy.arange",
"numpy.array",
"numpy.zeros",
"numpy.sum",
"numpy.random.randint"
]
] |
hesenp/pyro | [
"0c49858ab8c5f263d1ece7f212180c8ccd8da370"
] | [
"examples/vae/vae_comparison.py"
] | [
"import argparse\nimport itertools\nimport os\nfrom abc import ABCMeta, abstractmethod\n\nimport torch\nimport torch.nn as nn\nfrom six import add_metaclass\nfrom torch.nn import functional\nfrom torchvision.utils import save_image\n\nimport pyro\nfrom pyro.contrib.examples import util\nfrom pyro.distributions impo... | [
[
"torch.optim.Adam",
"torch.nn.Linear",
"torch.nn.ReLU",
"torch.no_grad"
]
] |
rushike/polymuse-future | [
"25af861e11fc3f4f95327405fec15d48bcc84a62"
] | [
"polymuse/drawer.py"
] | [
"import matplotlib.pyplot as plt\nimport numpy, json\nimport matplotlib \n\n\"\"\"\nThis files has some function to draw the traing results. Like training losses, accuraces\n\"\"\"\n\nfont = {'family' : 'normal',\n 'weight' : 'bold',\n 'size' : 22}\n\nlines = {\n 'linewidth': 7,\n }\n\... | [
[
"matplotlib.pyplot.legend",
"numpy.arange",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.rc",
"matplotlib.pyplot.figure"
]
] |
raikel/dnfas | [
"56b4dfbef33fd9ad6e6504d1cb88105069b57d70"
] | [
"dfapi/tests/factory.py"
] | [
"import shutil\nfrom datetime import timedelta\nfrom os import path, mkdir\nfrom uuid import uuid4\n\nimport cv2 as cv\nimport numpy as np\nfrom django.conf import settings\nfrom django.core.files.uploadedfile import SimpleUploadedFile\nfrom django.utils import timezone\nfrom faker import Faker\n\nfrom ..models imp... | [
[
"numpy.random.uniform"
]
] |
kjanjua26/PolypDetect | [
"296815368d6504e50c2fbdc10e214bc46e98928c",
"296815368d6504e50c2fbdc10e214bc46e98928c"
] | [
"UNet_Segmentation/network.py",
"UNet_Segmentation/train.py"
] | [
"import tensorflow as tf\n\ndef make_unet(X, training):\n input_layer = X / 127.5 - 1\n conv1 = tf.layers.conv2d(inputs=input_layer, filters=8, kernel_size=[5, 5],padding=\"same\",activation=tf.nn.relu,kernel_regularizer=tf.contrib.layers.l2_regularizer(0.1), name=\"conv_layer_1\")\n bn1 = tf.layers.batch_... | [
[
"tensorflow.layers.conv2d",
"tensorflow.concat",
"tensorflow.layers.batch_normalization",
"tensorflow.reduce_mean",
"tensorflow.reduce_sum",
"tensorflow.reshape",
"tensorflow.layers.max_pooling2d",
"tensorflow.contrib.layers.l2_regularizer"
],
[
"tensorflow.Variable",
"... |
hadivafaii/vedo | [
"15f9adbd36d25c0212cbd4eb0c15af54c19f3819",
"15f9adbd36d25c0212cbd4eb0c15af54c19f3819",
"15f9adbd36d25c0212cbd4eb0c15af54c19f3819",
"15f9adbd36d25c0212cbd4eb0c15af54c19f3819"
] | [
"examples/volumetric/multiscalars.py",
"examples/pyplot/numpy2picture.py",
"examples/basic/flatarrow.py",
"examples/simulations/grayscott.py"
] | [
"\"\"\"A Volume can have multiple\nscalars associated to each voxel\"\"\"\nfrom vedo import *\nimport numpy as np\n\nvol = Volume(dataurl+'vase.vti')\nnx, ny, nz = vol.dimensions()\nr0,r1 = vol.scalarRange()\nvol.addScalarBar3D(title='original voxel scalars')\n\n\n# create a set of scalars and add it to the Volume\... | [
[
"numpy.linspace",
"numpy.random.randint"
],
[
"matplotlib.image.imread"
],
[
"numpy.arange"
],
[
"numpy.random.uniform",
"numpy.zeros"
]
] |
petroniocandido/STPE | [
"0303224fadddd40f86b816432e1a594afaebe8fe"
] | [
"distribuicoes.py"
] | [
"import numpy as np \nfrom scipy import stats\nimport matplotlib.pyplot as plt\n\n\ndef phi(px):\n ''' Função característica da PMF P(x) '''\n rads = np.linspace(-np.pi, np.pi, 100)\n ret = { w : np.sum([px[x] * np.exp(w*1j*x) for x in px.keys()]) for w in rads}\n return ret\n\n\ndef phi_plot(px, ax):\n fph... | [
[
"numpy.exp",
"numpy.mean",
"numpy.zeros",
"numpy.linspace"
]
] |
lee-hyeonseung/lab_dl | [
"b8906247b6e0e2586f538081e2efaf47dac34972",
"b8906247b6e0e2586f538081e2efaf47dac34972",
"b8906247b6e0e2586f538081e2efaf47dac34972",
"b8906247b6e0e2586f538081e2efaf47dac34972"
] | [
"ch04/ex10_nditer.py",
"ch06/ex01_matplot3d.py",
"ch03/ex11.py",
"ch07/ex08_pulling.py"
] | [
"\"\"\"\nnumpy.nditer 객체: 반복문(for, while)을 쓰기 쉽게 도와주는 객체\n\"\"\"\nimport numpy as np\n\nnp.random.seed(1231)\na = np.random.randint(100, size=(2, 3))\nprint(a)\n\n# 40 21 5 52 84 39\nfor row in a:\n for x in row:\n print(x, end=' ')\nprint()\n\ni = 0\nwhile i < a.shape[0]:\n j = 0\n while j < a.shap... | [
[
"numpy.arange",
"numpy.nditer",
"numpy.random.seed",
"numpy.random.randint"
],
[
"numpy.linspace",
"matplotlib.pyplot.axes",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.contour",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.xlabel",
"numpy.meshgrid",
"matplot... |
zhangarejiu/algorithmic-trading | [
"ae5def0934a97d454a987f73e2096eb5f20d5166"
] | [
"market_maker/exchange_interface.py"
] | [
"import bitmex, json, sys\nfrom datetime import datetime\nfrom time import sleep\nimport pandas as pd\nimport decimal # this module is used to round up the tickSize\nfrom market_maker.utils import log, errors, constants\n# import mombot.settings as settings\nfrom market_maker.settings import settings\nfrom market_m... | [
[
"pandas.DataFrame.from_records",
"pandas.concat",
"pandas.to_datetime",
"pandas.DataFrame.from_dict"
]
] |
LazyBusyYang/mmhuman3d | [
"c653f05a6d3264cf49d86df5e3ffd8cdf9ca9057"
] | [
"tests/test_models/test_heads/test_hybrik_forward.py"
] | [
"import os\nimport os.path as osp\nimport tempfile\n\nimport numpy as np\nimport pytest\nimport torch\n\nfrom mmhuman3d.models import HybrIK_trainer, HybrIKHead\nfrom mmhuman3d.models.builder import build_body_model\nfrom mmhuman3d.models.utils.inverse_kinematics import (\n batch_get_3children_orient_svd,\n b... | [
[
"torch.Tensor",
"torch.zeros",
"numpy.arange",
"numpy.ones",
"torch.FloatTensor",
"torch.no_grad",
"torch.cuda.is_available",
"numpy.array",
"numpy.zeros",
"numpy.random.RandomState"
]
] |
kjappelbaum/pymatgen | [
"0766980bf693d816fb9d9beebe85d3e51685fa76"
] | [
"pymatgen/analysis/diffusion_analyzer.py"
] | [
"# coding: utf-8\n# Copyright (c) Pymatgen Development Team.\n# Distributed under the terms of the MIT License.\n\n\"\"\"\nA module to perform diffusion analyses (e.g. calculating diffusivity from\nmean square displacements etc.). If you use this module, please consider\nciting the following papers::\n\n Ong, S.... | [
[
"numpy.dot",
"numpy.log",
"numpy.sqrt",
"numpy.array_equal",
"numpy.arange",
"numpy.cumsum",
"numpy.var",
"numpy.concatenate",
"numpy.linalg.lstsq",
"numpy.max",
"numpy.round",
"numpy.zeros_like",
"numpy.any",
"numpy.average",
"numpy.exp",
"numpy.arr... |
fengredrum/hands-on-es | [
"3432b818e4a522448516f2e84342d72a0eaa6531"
] | [
"es_to_df.py"
] | [
"from elasticsearch import Elasticsearch\nfrom elasticsearch_dsl import Q, Search\nimport pandas as pd\n\nes = Elasticsearch([{'host': '10.10.10.10', 'port': 9200}])\n\ndelete_docs = False\n\nquery = Q('range', update_time={'gte': \"2021-06-01T01:31:00\"}) | Q('range', title={'lte': 10})\ns = Search(using=es, index... | [
[
"pandas.DataFrame.from_records"
]
] |
avani17101/trimesh | [
"e9fcff42384734b2d13dc4c8f66eb9b319945995",
"2115c0d393bbb75443cdd42cc18ab0f99bf1d081"
] | [
"trimesh/path/path.py",
"trimesh/primitives.py"
] | [
"\"\"\"\npath.py\n-----------\n\nA module designed to work with vector paths such as\nthose stored in a DXF or SVG file.\n\"\"\"\nimport numpy as np\n\nimport copy\nimport collections\n\nfrom ..points import plane_fit\nfrom ..geometry import plane_transform\nfrom ..visual import to_rgba\nfrom ..constants import log... | [
[
"numpy.hstack",
"numpy.dot",
"numpy.abs",
"numpy.linalg.inv",
"numpy.eye",
"matplotlib.pyplot.show",
"numpy.setdiff1d",
"numpy.concatenate",
"matplotlib.pyplot.axes",
"matplotlib.pyplot.plot",
"numpy.asanyarray",
"numpy.array",
"numpy.vstack",
"matplotlib.py... |
tyIceStream/Kats | [
"abb507615b8ee2470461e7c368226bbb9a634065"
] | [
"kats/detectors/cusum_detection.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\n# pyre-unsafe\n\n\"\"\"\nCUSUM stands for cumulative sum, it is a changepoint detection algorithm.\n\nIn the Kats implementation, it ha... | [
[
"scipy.stats.chi2.ppf",
"numpy.log",
"matplotlib.pyplot.axvline",
"pandas.to_datetime",
"numpy.abs",
"numpy.min",
"numpy.linalg.inv",
"numpy.quantile",
"numpy.cumsum",
"pandas.Timedelta",
"numpy.matmul",
"numpy.linalg.det",
"numpy.std",
"numpy.cov",
"num... |
WAzaizeh/Halal_o_Meter | [
"4e452a135aef1de72a17b8c18910d6e0bc0fc4e9"
] | [
"src/features/target_feature/zabiha_list_DEPRECATED.py"
] | [
"''' A script to scrape a list of 744 confirmed Halal restaurants in\n NYC area from Zabiha.com\n As well as, requesting 338 halal tagged restaurants in NYC from Zomato.com\n'''\n\nimport review_scraper\nimport pandas as pd\nimport os, requests, json\nfrom dotenv import load_dotenv\n\n\ndef _zabiha_to_csv(url_dic... | [
[
"pandas.DataFrame"
]
] |
mpmkp2021/pandas | [
"7c40d2c85df03a66268987d14d76ec1421429dde"
] | [
"pandas/core/groupby/ops.py"
] | [
"\"\"\"\nProvide classes to perform the groupby aggregate operations.\n\nThese are not exposed to the user and provide implementations of the grouping\noperations, primarily in cython. These classes (BaseGrouper and BinGrouper)\nare contained *in* the SeriesGroupBy and DataFrameGroupBy objects.\n\"\"\"\n\nimport co... | [
[
"pandas.core.base.SelectionMixin._builtin_table.get",
"pandas.core.common.get_callable_name",
"pandas.core.dtypes.common.is_extension_array_dtype",
"pandas._libs.lib.generate_slices",
"pandas.core.dtypes.common.is_datetime64tz_dtype",
"pandas.core.sorting.get_group_index_sorter",
"pand... |
OliverWarrington/nilearn | [
"d42d3b10eb543619ed4189f05b74ef2e75a92068",
"d42d3b10eb543619ed4189f05b74ef2e75a92068",
"d42d3b10eb543619ed4189f05b74ef2e75a92068"
] | [
"nilearn/surface/surface.py",
"nilearn/glm/first_level/first_level.py",
"nilearn/plotting/__init__.py"
] | [
"\"\"\"\nFunctions for surface manipulation.\n\"\"\"\nimport os\nimport warnings\nimport collections\nimport gzip\nfrom distutils.version import LooseVersion\nfrom collections import namedtuple\n\n\nimport numpy as np\nfrom scipy import sparse, interpolate\nimport sklearn.preprocessing\nimport sklearn.cluster\ntry:... | [
[
"numpy.rollaxis",
"numpy.linspace",
"numpy.asarray",
"numpy.squeeze",
"numpy.vstack",
"numpy.round",
"numpy.concatenate",
"numpy.nanmean",
"numpy.ravel_multi_index",
"numpy.cross",
"numpy.arange",
"numpy.eye",
"scipy.interpolate.RegularGridInterpolator",
"nu... |
yu-frank/Few-shot-Scene-adaptive-Anomaly-Detection | [
"702dfbdeb6abf235397de45aaa97d3194d0547f3"
] | [
"train.py"
] | [
"from __future__ import print_function\r\nimport matplotlib.pyplot as plt\r\nimport argparse\r\nimport torch\r\nimport torch.utils.data\r\nimport torch.nn as nn\r\nimport torch.optim as optim\r\nfrom torch.autograd import Variable\r\nfrom torch.utils.data import Dataset,DataLoader\r\nfrom torchvision import dataset... | [
[
"torch.load",
"scipy.misc.imsave",
"torch.manual_seed",
"torch.utils.data.DataLoader",
"torch.FloatTensor",
"torch.cuda.memory_allocated"
]
] |
johanlahti/reinforcement-algorithms | [
"d861b67bd2d3e48e949f30d11a70d072586c4c62"
] | [
"q-learning/q_learn_linear_func_approx.py"
] | [
"import numpy as np\nfrom numpy.core.numeric import Infinity\nimport gym\nfrom collections import namedtuple\nfrom time import sleep\nimport plotting\n\n\nDEFAULT_CONFIG = {\n 'MAX_EPISODES': 2000,\n 'MAX_STEPS_PER_EPISODE': 1000,\n 'LEARNING_RATE': 0.01,\n 'DISCOUNT_RATE': 0.99,\n 'EXPLORATION_DECAY': 0.01,\n... | [
[
"numpy.dot",
"numpy.abs",
"numpy.random.choice",
"numpy.max",
"numpy.argmax",
"numpy.mean",
"numpy.random.uniform"
]
] |
XuelongSun/InsectNavigationToolkitModelling | [
"454daaee19cb0f18d6f194a2fa79669c07c0f3f3"
] | [
"source/insect_navigation.py"
] | [
"# @File: insect_navigation.py\r\n# @Info: to create an agent of insect navigation based on the insect brain model in insect_brain_model.py\r\n# @Author: Xuelong Sun, UoL, UK\r\n# @Time: 2020-02-17\r\n\r\nimport numpy as np\r\nfrom scipy.special import expit\r\nfrom image_processing import visual_sense\r\nfrom inse... | [
[
"numpy.dot",
"numpy.cumsum",
"numpy.arctan2",
"numpy.max",
"numpy.exp",
"numpy.roll",
"numpy.hstack",
"numpy.clip",
"numpy.eye",
"numpy.sin",
"numpy.zeros",
"numpy.min",
"numpy.deg2rad",
"numpy.array",
"numpy.sum",
"numpy.abs",
"scipy.special.exp... |
HELLORPG/GraduationProjec | [
"5d3925502626e7179598d447d0a07c3c28a499e2"
] | [
"model/encoder.py"
] | [
"\"\"\"\nencoder是使用了学长文中TRecgNet中的构建\n使用ResNet18卷积部分的改版来构建\n\"\"\"\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torchvision.models as models\nfrom config.secret_config import SECRET_CONFIG\nimport os\nimport torch\n\n\nclass Encoder(nn.Module):\n def __init__(self, config):\n \"\"\"\n ... | [
[
"torch.nn.Sequential",
"torch.load",
"torch.nn.Conv2d",
"torch.nn.functional.relu",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
]
] |
telent/luaradio | [
"c1cb47325e4eb2886915f810fff5324571aeb59d"
] | [
"tests/blocks/signal/multiplyconjugate_spec.py"
] | [
"import numpy\nfrom generate import *\n\n\ndef generate():\n vectors = []\n\n x, y = random_complex64(256), random_complex64(256)\n vectors.append(TestVector([], [x, y], [x * numpy.conj(y)], \"2 256 ComplexFloat32 inputs, 256 ComplexFloat32 output\"))\n\n return BlockSpec(\"MultiplyConjugateBlock\", vec... | [
[
"numpy.conj"
]
] |
gmshashank/pytorch_vision | [
"54367b83e9780fe14c6f8b93157091ffdf7266eb",
"54367b83e9780fe14c6f8b93157091ffdf7266eb"
] | [
"CIFAR10/Session3/dl_vision/utils/config.py",
"CIFAR10/Session5/dl_vision/model/resnet.py"
] | [
"import os\nimport numpy as np\nimport random\nimport torch\nimport torch.nn as nn\nimport yaml\n\nfrom typing import Any, List, Tuple, Dict\nfrom types import ModuleType\nfrom utils.logger import setup_logger\n\nlogger = setup_logger(__name__)\n\n\ndef get_instance(module: ModuleType, name: str, config: Dict, *arg... | [
[
"torch.device",
"torch.manual_seed",
"torch.cuda.manual_seed",
"numpy.random.seed"
],
[
"torch.nn.Sequential",
"torch.randn",
"torch.nn.functional.avg_pool2d",
"torch.nn.Conv2d",
"torch.nn.Linear",
"torch.nn.functional.relu",
"torch.nn.BatchNorm2d"
]
] |
icewing1996/uis-rnn | [
"3fd6a73dad1f999a4bcd2013171e041176812b26"
] | [
"demo.py"
] | [
"# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ... | [
[
"numpy.load",
"numpy.split",
"numpy.array"
]
] |
ryul99/mmsr | [
"f2649d155f00478b96c7629bbe6f310e8f2549af"
] | [
"codes/models/SRGAN_model.py"
] | [
"import logging\nfrom collections import OrderedDict\nimport torch\nimport torch.nn as nn\nfrom torch.nn.parallel import DataParallel, DistributedDataParallel\nimport models.networks as networks\nimport models.lr_scheduler as lr_scheduler\nfrom .base_model import BaseModel\nfrom models.loss import GANLoss\nimport w... | [
[
"torch.optim.Adam",
"torch.mean",
"torch.nn.MSELoss",
"torch.nn.parallel.DataParallel",
"torch.cuda.current_device",
"torch.no_grad",
"torch.rand",
"torch.distributed.get_rank",
"torch.nn.L1Loss"
]
] |
jalayrupera/Sentiment-analysis-on-amazon-product | [
"f04d77769f9c9b533d530ce5b217d741c09c93ee"
] | [
"code/code/load.py"
] | [
"import numpy as np\nfrom os import path\n\nfrom Tree import Tree\n\nDATASET = '../data'\n\n\ndef load():\n print('Load Trees...')\n with open(path.join(DATASET, 'STree.txt')) as f:\n trees = []\n for line in f.readlines():\n tree = line.split('|')\n tree = np.array(tree).a... | [
[
"numpy.array"
]
] |
marcelroed/equivariant-MLP | [
"453d948055936aab3e718c36863c2db318c038ce"
] | [
"emlp/reps/linear_operator_base.py"
] | [
"\"\"\"Abstract linear algebra library.\nThis module defines a class hierarchy that implements a kind of \"lazy\"\nmatrix representation, called the ``LinearOperator``. It can be used to do\nlinear algebra with extremely large sparse or structured matrices, without\nrepresenting those explicitly in memory. Such mat... | [
[
"numpy.asarray",
"torch.tensor"
]
] |
ruyuanzhang/ccnss2018_students | [
"978b2414ade6116da01c19a945304f9c514fb93f"
] | [
"module2/2_model_fitting_and_model_comparison/untitled0.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Fri Jul 13 05:16:40 2018\n\n@author: J-Y Moon\n\"\"\"\nimport matplotlib.pyplot as plt # import matplotlib\nimport numpy as np # import numpy\nimport scipy as sp # import scipy\nfrom scipy import sparse # import sparse module ... | [
[
"numpy.matrix",
"scipy.sparse.coo_matrix",
"numpy.amax",
"matplotlib.pyplot.title",
"numpy.unique",
"numpy.nonzero",
"numpy.trace",
"matplotlib.pyplot.loglog",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.subplot",
"numpy.where",
"mat... |
Ruhen-Bhuiyan/Logistic-regression-vs-SVM-vs-Decision-Tree-vs-Random-Forest | [
"6908d197bae1d7f8d7083b007aba9f71739822d2",
"6908d197bae1d7f8d7083b007aba9f71739822d2"
] | [
"Value count for replacing missing values.py",
"Heatmap.py"
] | [
"import pandas as pd\nd = pd.read_csv(\"D:\\\\445\\\\13.csv\")\n\nd['Smoke'].value_counts()\n",
"import pandas as pd \nimport numpy as np\nfrom sklearn import preprocessing\nfrom sklearn.metrics import confusion_matrix\nfrom sklearn import svm\nimport itertools\nimport matplotlib.pyplot as plt\nimport matplotlib.... | [
[
"pandas.read_csv"
],
[
"pandas.read_csv",
"matplotlib.pyplot.title",
"pandas.DataFrame",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
FHaase/pandas | [
"dc8d35aa53d496b651f5e1ab4cb2604e9f7236c7"
] | [
"pandas/tests/sparse/frame/test_frame.py"
] | [
"# pylint: disable-msg=E1101,W0612\n\nimport operator\n\nimport pytest\nfrom numpy import nan\nimport numpy as np\nimport pandas as pd\n\nfrom pandas import Series, DataFrame, bdate_range, Panel\nfrom pandas.errors import PerformanceWarning\nfrom pandas.core.indexes.datetimes import DatetimeIndex\nfrom pandas.tseri... | [
[
"pandas.util.testing.assert_sp_frame_equal",
"pandas.util.testing.assert_class_equal",
"pandas.Series",
"numpy.sqrt",
"pandas.util.testing.assert_produces_warning",
"pandas.MultiIndex.from_tuples",
"pandas.SparseDataFrame",
"pandas.DataFrame",
"pandas.core.sparse.api.SparseData... |
GiscardBiamby/geo | [
"54f54ea1c41c1d573eb59f67d1b4338f936414d9"
] | [
"geoscreens/data/splitting.py"
] | [
"from pathlib import Path\nfrom typing import Any, Dict, List, Optional, Tuple, Union, cast\n\nimport numpy as np\nimport pandas as pd\nfrom IPython.display import display\nfrom pycocotools.helpers import CocoClassDistHelper as COCO\nfrom pycocotools.helpers import CocoJsonBuilder\nfrom tqdm.auto import tqdm\n\nfro... | [
[
"pandas.DataFrame"
]
] |
TamerMograbi/ShadowNet | [
"99a9fb4522546e58817bbdd373f63d6996685e21"
] | [
"data/aligned_dataset.py"
] | [
"import os.path\nfrom data.base_dataset import BaseDataset, get_params, get_transform\nfrom data.image_folder import make_dataset\nfrom PIL import Image\nimport cv2\nimport numpy as np\n\nclass AlignedDataset(BaseDataset):\n \"\"\"A dataset class for paired image dataset.\n\n It assumes that the directory '/p... | [
[
"numpy.stack"
]
] |
hershg/ray | [
"a1744f67fe954d8408c5b84e28ecccc130157f8e",
"a1744f67fe954d8408c5b84e28ecccc130157f8e",
"a1744f67fe954d8408c5b84e28ecccc130157f8e",
"a1744f67fe954d8408c5b84e28ecccc130157f8e",
"a1744f67fe954d8408c5b84e28ecccc130157f8e",
"a1744f67fe954d8408c5b84e28ecccc130157f8e",
"2e30f7ba386e716bf80f019dcd473b67d83abb9... | [
"rllib/models/catalog.py",
"rllib/examples/custom_keras_rnn_model.py",
"rllib/tests/test_nested_spaces.py",
"python/ray/experimental/sgd/tests/test_tensorflow.py",
"rllib/tests/test_reproducibility.py",
"rllib/policy/rnn_sequencing.py",
"rllib/offline/mixed_input.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport gym\nimport logging\nimport numpy as np\nfrom functools import partial\n\nfrom ray.tune.registry import RLLIB_MODEL, RLLIB_PREPROCESSOR, \\\n RLLIB_ACTION_DIST, _global_registry\n\nfrom ray.r... | [
[
"numpy.product"
],
[
"numpy.zeros"
],
[
"torch.nn.Module.__init__"
],
[
"numpy.array_equal"
],
[
"numpy.random.randn"
],
[
"numpy.reshape",
"numpy.add",
"numpy.array",
"numpy.shape"
],
[
"numpy.random.choice"
]
] |
artofimagination/py-algo-trading-client | [
"4459e53cf184cd2cdda402ef903561d8df7ce3bc"
] | [
"src/trade_platforms/platform_wrapper_base.py"
] | [
"from datetime import datetime\nfrom typing import List\nfrom enum import Enum\nimport pandas as pd\nimport time\nimport plotly.graph_objects as go\n\n\n## Enum to identify platforms\nclass Platforms(Enum):\n FTX = \"FTX\"\n\n\n## Base class for platfrom wrappers.\n# Implements all common functionalities\n# for ... | [
[
"pandas.to_datetime"
]
] |
jairotunior/gym_suppy | [
"71eb58c9e40723e9474d20b7439a50cedea3e085"
] | [
"deeplog/wrappers/model.py"
] | [
"import gym\nimport gym.spaces\nfrom deeplog.environments import SupplyEnv\nimport pandas as pd\nimport numpy as np\n\nfrom deeplog.wrappers import Base\n\nfrom abc import ABC, abstractmethod\n\n\nclass Model(Base):\n\n def __init__(self, env):\n Base.__init__(self, env)\n\n self.series: pd.DataFra... | [
[
"pandas.DataFrame"
]
] |
rafelafrance/traiter_butterflynet | [
"a96300d43ef855ef06b8d15196d39ca5628b0480"
] | [
"costa_rica_downloader.py"
] | [
"#!/usr/bin/env python\n\n\"\"\"Download files from UPenn Butterflies of Costa Rica Web Site.\"\"\"\n\nimport argparse\nimport re\nimport socket\nimport urllib.request\nfrom urllib.error import HTTPError\n\nimport pandas as pd\nfrom bs4 import BeautifulSoup\n\nfrom src.pylib.consts import DATA_DIR\n\n# Make a few a... | [
[
"pandas.concat"
]
] |
katherineedgley/model-stats-extension | [
"1e983c3588ccedc1b6faf2531312ee0b45e30ba1"
] | [
"linear_model_extension/model_stats.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nimport numpy as np\nimport pandas as pd\n\nclass ModelStats:\n '''\n General class (not to be called outside of RegressionStats) for classes\n that generate model statistics, like RegressionStats\n Input:\n fitted_model - a scikit-learn LinearRe... | [
[
"numpy.asarray"
]
] |
tkaya94/UdemyDataScience | [
"83fe006bace0e91a273006546df3f3ee408b7797",
"83fe006bace0e91a273006546df3f3ee408b7797"
] | [
"4_Matplotlib/PandasVisualisation.py",
"3_Pandas/ConcatAppendJoin.py"
] | [
"import matplotlib.pyplot as plt\nimport numpy as np\nnp.random.seed(0)\nimport pandas as pd\n\nnum_samples = 100\nts = pd.Series(np.random.randn(num_samples), index=pd.date_range(\"1/1/2000\", periods=num_samples))\n# # print(ts.head())\n# ts.plot()\n# plt.show()\n\ndata = np.concatenate([np.random.randn(num_sampl... | [
[
"numpy.random.seed",
"pandas.DataFrame",
"numpy.random.randn",
"pandas.date_range",
"matplotlib.pyplot.show",
"numpy.random.randint"
],
[
"pandas.concat",
"pandas.merge",
"numpy.random.seed",
"pandas.DataFrame"
]
] |
beantowel/librosa | [
"f54cc970e6089b3d1254cdb430a8747e5e68a940"
] | [
"tests/test_sequence.py"
] | [
"#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\n\nimport numpy as np\n\nimport pytest\nfrom test_core import srand\n\nimport librosa\n\n\n# Core viterbi tests\ndef test_viterbi_example():\n # Example from https://en.wikipedia.org/wiki/Viterbi_algorithm#Example\n\n # States: 0 = healthy, 1 = fever\n p_in... | [
[
"numpy.diag",
"numpy.log",
"numpy.random.random",
"numpy.allclose",
"numpy.array_equal",
"numpy.isfinite",
"numpy.asarray",
"numpy.ones",
"numpy.all",
"numpy.diff",
"numpy.mod",
"numpy.zeros",
"numpy.vstack"
]
] |
WeiXuanChan/medImgProc | [
"d3f6da63d426993e1a5bccd322313e9e79ab039c"
] | [
"medImgProc/GUI.py"
] | [
"'''\nFile: GUI.py\nDescription: load all class for medImgProc\n Contains externally usable class\nHistory:\n Date Programmer SAR# - Description\n ---------- ---------- ----------------------------\n Author: w.x.chan@gmail.com 12JAN2019 - Created\nAuthor: w.x.chan@gmail.com ... | [
[
"numpy.maximum",
"numpy.minimum",
"numpy.arange",
"numpy.vstack",
"numpy.round",
"matplotlib.widgets.Slider",
"numpy.copy",
"matplotlib.pyplot.clf",
"matplotlib.pyplot.ylabel",
"numpy.argmin",
"matplotlib.pyplot.close",
"matplotlib.pyplot.xlabel",
"numpy.array",... |
datactive/bigbang | [
"ea2e9aab156490d1af965409adb60b68291281dc",
"ea2e9aab156490d1af965409adb60b68291281dc",
"ea2e9aab156490d1af965409adb60b68291281dc"
] | [
"bigbang/listserv.py",
"tests/analysis/test_listserv.py",
"bigbang/visualisation/stackedareachart.py"
] | [
"import datetime\nimport email\nimport logging\nimport os\nimport re\nimport subprocess\nimport time\nimport warnings\nimport mailbox\nfrom mailbox import mboxMessage\nfrom pathlib import Path\nfrom typing import Dict, List, Optional, Tuple, Union\nfrom urllib.parse import urljoin, urlparse\n\nimport numpy as np\ni... | [
[
"numpy.max",
"numpy.min"
],
[
"numpy.array"
],
[
"numpy.max",
"numpy.sum",
"numpy.min"
]
] |
steipatr/EMAworkbench | [
"3438b7a48d7104a121d0d28a9cbadc8219ddb74c"
] | [
"ema_workbench/em_framework/outcomes.py"
] | [
"'''\nModule for outcome classes\n\n'''\nimport abc\nimport collections\nimport numbers\nimport six\n\nimport pandas\n\nfrom .util import Variable\nfrom ema_workbench.util.ema_exceptions import EMAError\nfrom ..util import get_module_logger\n\n# Created on 24 mei 2011\n#\n# .. codeauthor:: jhkwakkel <j.h.kwakkel (a... | [
[
"pandas.read_csv",
"pandas.DataFrame.from_dict"
]
] |
JiwonCocoder/-Joint-Learning-of-Feature-Extraction-and-Cost-Aggregation-for-Semantic-Matching | [
"b79e0e20fd5a1a9ddc0ffa9d7a92e0ebd21018b9",
"b79e0e20fd5a1a9ddc0ffa9d7a92e0ebd21018b9",
"b79e0e20fd5a1a9ddc0ffa9d7a92e0ebd21018b9",
"b79e0e20fd5a1a9ddc0ffa9d7a92e0ebd21018b9"
] | [
"trash/train_ncnet_adap_pixelCT1.py",
"trash/train_pixelCT_both_negative_normalized_WTA01.py",
"trash/train_ncnet_adap_pixelCT_L2norm2.py",
"lib/model_eval/model_eval_ncnet_adap.py"
] | [
"from __future__ import print_function, division\nimport os\nimport numpy as np\nimport numpy.random\nimport datetime\nimport torch\nimport torch.optim as optim\nfrom torch.nn.functional import relu\n\nfrom lib.dataloader import DataLoader # modified dataloader\nfrom lib.model_train.model_pixelCT_ncnet_adap import... | [
[
"torch.nn.functional.softmax",
"torch.max",
"torch.cat",
"torch.zeros",
"torch.sum",
"torch.cuda.is_available",
"torch.pow",
"numpy.arange",
"torch.arange",
"numpy.zeros",
"torch.div",
"torch.cuda.current_device",
"torch.cuda.device_count",
"torch.cuda.set_d... |
yf19970118/OPLD-Pytorch | [
"4939bf62587da4533276fda20db36bb019575511",
"4939bf62587da4533276fda20db36bb019575511",
"4939bf62587da4533276fda20db36bb019575511"
] | [
"utils/events.py",
"rcnn/modeling/rpn/loss.py",
"rcnn/modeling/rpn/anchor_generator.py"
] | [
"import os\nimport json\nimport torch\nimport shutil\nimport logging\nimport datetime\nimport numpy as np\n\nfrom collections import defaultdict, deque\nfrom contextlib import contextmanager\n\n_CURRENT_STORAGE_STACK = []\n\n\ndef get_event_storage():\n assert len(\n _CURRENT_STORAGE_STACK\n ), \"get_e... | [
[
"numpy.median",
"torch.cuda.max_memory_allocated",
"numpy.mean",
"torch.utils.tensorboard.SummaryWriter",
"torch.cuda.is_available"
],
[
"torch.nn.functional.binary_cross_entropy_with_logits",
"torch.cat"
],
[
"numpy.hstack",
"torch.ones",
"numpy.sqrt",
"torch.f... |
sakdag/crime-data-analysis | [
"9c95238c6aaf1394f68be59e26e8c6d75f669d7e"
] | [
"src/preprocessing/census_preprocessor.py"
] | [
"import numpy as np\nimport pandas as pd\n\nimport src.utils.crime_classification_utils as utils\nimport src.config.column_names as col_names\n\n\ndef preprocess_and_save(original_file_name: str,\n preprocessed_file_name: str,\n zip_codes_dataset_file_path: str):\n\n ... | [
[
"numpy.logical_and"
]
] |
Na1an/VIP | [
"2e45617a8b58dd4a4889114592bac3c4786abc15",
"2e45617a8b58dd4a4889114592bac3c4786abc15"
] | [
"vip_hci/pca/pca_fullfr.py",
"vip_hci/negfc/mcmc_sampling.py"
] | [
"#! /usr/bin/env python\n\n\"\"\"\nFull-frame PCA algorithm for ADI, ADI+RDI and ADI+mSDI (IFS data) cubes.\n\"\"\"\n\n__author__ = 'Carlos Alberto Gomez Gonzalez'\n__all__ = ['pca']\n\nimport numpy as np\nfrom multiprocessing import cpu_count\nfrom .svd import svd_wrapper, SVDecomposer\nfrom .utils_pca import pca_... | [
[
"numpy.dot",
"numpy.amax",
"numpy.amin",
"numpy.zeros_like",
"numpy.array",
"numpy.zeros"
],
[
"numpy.vstack",
"numpy.concatenate",
"numpy.zeros_like",
"numpy.histogram",
"numpy.where",
"matplotlib.pyplot.tight_layout",
"numpy.ones_like",
"scipy.stats.no... |
leandro-gracia-gil/addons | [
"af6866a2e6d9ddbc79d612d7cb04a8a5befe4a47",
"d981b0f1d1bc23f697d159eb1510c24b3c476d28"
] | [
"tensorflow_addons/image/tests/dense_image_warp_test.py",
"tensorflow_addons/layers/snake.py"
] | [
"# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.convert_to_tensor",
"tensorflow.constant",
"numpy.abs",
"tensorflow.ones",
"numpy.random.normal",
"numpy.random.randint",
"numpy.testing.assert_allclose",
"numpy.array",
"tensorflow.random.normal",
"tensorflow.TensorSpec",
"tensorflow.GradientTape"
],
[
... |
ocefpaf/pysal | [
"7e397bdb4c22d4e2442b4ee88bcd691d2421651d",
"7e397bdb4c22d4e2442b4ee88bcd691d2421651d",
"7e397bdb4c22d4e2442b4ee88bcd691d2421651d",
"7e397bdb4c22d4e2442b4ee88bcd691d2421651d"
] | [
"pysal/model/spvcm/abstracts.py",
"pysal/explore/esda/lee.py",
"pysal/lib/weights/set_operations.py",
"pysal/model/spvcm/both_levels/generic/sample.py"
] | [
"import warnings\nfrom datetime import datetime as dt\nimport numpy as np\nimport copy\nimport multiprocessing as mp\nimport pandas as pd\nimport os\n\n\nfrom .sqlite import head_to_sql, start_sql\nfrom .plotting import plot_trace\nfrom collections import OrderedDict\ntry:\n from tqdm import tqdm\n import six... | [
[
"pandas.read_csv",
"numpy.abs",
"numpy.random.seed",
"numpy.asarray",
"numpy.squeeze",
"pandas.DataFrame",
"numpy.random.normal",
"numpy.testing.assert_allclose",
"numpy.argsort",
"numpy.random.uniform",
"numpy.random.randint"
],
[
"numpy.minimum",
"numpy.ra... |
fhaase2/sentence-use | [
"8acfde806d8bc866f7559e99a2cb6b684d96d796"
] | [
"train.py"
] | [
"import logging\n\nimport tensorflow as tf\n\nfrom sentence_use.data import read_data\nfrom sentence_use.models import SiameseUSE\nfrom sentence_use.parser import train_args\n\n\ndef train(args):\n \"\"\"Runs training script for given CLI arguments.\n\n :param args: Arguments\n :type args: argparse.Namespa... | [
[
"tensorflow.keras.callbacks.TensorBoard",
"tensorflow.data.Dataset.from_tensor_slices",
"tensorflow.random.set_seed"
]
] |
xy-guo/mmdetection_kitti | [
"5cf3d2227531101dc45ea9f5b4f8c04ee124afcf",
"5cf3d2227531101dc45ea9f5b4f8c04ee124afcf",
"5cf3d2227531101dc45ea9f5b4f8c04ee124afcf",
"5cf3d2227531101dc45ea9f5b4f8c04ee124afcf"
] | [
"mmdet/utils/det3d/kitti_utils.py",
"mmdet/core/utils/debug_utils.py",
"mmdet/utils/det3d/pytorch_utils.py",
"mmdet/datasets/kitti_utils/target_assigner.py"
] | [
"\"\"\"utility functions for kitti dataset\"\"\"\nfrom scipy.spatial import Delaunay\nimport scipy\nimport numpy as np\nimport torch\n\n\ndef in_hull(p, hull):\n \"\"\"\n :param p: (N, K) test points\n :param hull: (M, K) M corners of a box\n :return (N) bool\n \"\"\"\n try:\n if not isinst... | [
[
"numpy.dot",
"torch.Size",
"torch.cat",
"torch.sin",
"scipy.spatial.Delaunay",
"numpy.cos",
"numpy.sin",
"torch.matmul",
"numpy.array",
"numpy.zeros",
"torch.cos"
],
[
"numpy.round"
],
[
"torch.nn.init.constant_",
"numpy.stack",
"numpy.full",
... |
yiwc/robotics-world | [
"48efda3a8ea6741b35828b02860f45753252e376",
"48efda3a8ea6741b35828b02860f45753252e376",
"48efda3a8ea6741b35828b02860f45753252e376"
] | [
"metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_bin_picking_v2.py",
"metaworld/policies/sawyer_push_back_v2_policy.py",
"metaworld/policies/sawyer_reach_wall_v2_policy.py"
] | [
"import numpy as np\nfrom gym.spaces import Box\n\nfrom metaworld.envs import reward_utils\nfrom metaworld.envs.asset_path_utils import full_v2_path_for\nfrom metaworld.envs.mujoco.sawyer_xyz.sawyer_xyz_env import SawyerXYZEnv, _assert_task_is_set\n\n\nclass SawyerBinPickingEnvV2(SawyerXYZEnv):\n \"\"\"\n Mot... | [
[
"numpy.hstack",
"numpy.log",
"numpy.linalg.norm",
"numpy.concatenate",
"numpy.array"
],
[
"numpy.arange",
"numpy.array",
"numpy.linalg.norm"
],
[
"numpy.arange",
"numpy.array"
]
] |
manipopopo/C5 | [
"154eb38c330e65476ddb77836948a28237f23c88"
] | [
"src/dataset.py"
] | [
"\"\"\"\n##### Copyright 2021 Google LLC. 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required... | [
[
"numpy.expand_dims",
"torch.from_numpy",
"torch.tensor",
"numpy.concatenate",
"numpy.array",
"numpy.zeros"
]
] |
lin-tan/fairness-variance | [
"7f6aee23160707ffe78f429e5d960022ea1c9fe4",
"7f6aee23160707ffe78f429e5d960022ea1c9fe4"
] | [
"dlfairness/original_code/FairALM/Experiments-CelebA/label_ablation/fcn.py",
"dlfairness/original_code/Balanced-Datasets-Are-Not-Enough/verb_classification/adv/ae_adv_model.py"
] | [
"import os\nimport time\n\nimport numpy as np\nimport pandas as pd\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom torch.utils.data import Dataset\nfrom torch.utils.data import DataLoader\n\nfrom torchvision import datasets\nfrom torchvision import transforms\n\nimport matplotlib.pyp... | [
[
"torch.nn.Linear",
"torch.nn.functional.relu",
"torch.squeeze",
"torch.cat"
],
[
"torch.nn.Sequential",
"torch.nn.ReflectionPad2d",
"torch.load",
"torch.cat",
"torch.nn.Conv2d",
"torch.nn.Sigmoid",
"torch.nn.Linear",
"torch.mul",
"torch.nn.init.normal_",
... |
vocthor/rlcard | [
"eacf578379ed838cf1ceae6eba19dcbf774e3333"
] | [
"rlcard/utils/utils.py"
] | [
"import numpy as np\n\nfrom rlcard.games.base import Card\n\n\ndef set_seed(seed):\n if seed is not None:\n import subprocess\n import sys\n\n reqs = subprocess.check_output([sys.executable, '-m', 'pip', 'freeze'])\n installed_packages = [r.decode().split('==')[0] for r in reqs.split(... | [
[
"numpy.random.seed",
"torch.manual_seed",
"matplotlib.pyplot.subplots",
"torch.cuda.is_available",
"torch.device",
"numpy.zeros",
"numpy.sum"
]
] |
alexglibby/RotationalDynamics | [
"e877ad0f7dd623106ec5336ff4a45018ae9fb525"
] | [
"network_helper_functions.py"
] | [
"#### Network Model of Rotation\n#### place in folder with network_model_rnn.py\n#### 7/22/2019 - AL\n### 3/2/2020 - Al\n\n### numpy version - '1.16.2'\nimport numpy as np\nimport functools\nimport operator\nimport sys\nimport pickle \n\n### torch version - '1.0.1'\nimport torch\nimport torch.nn as nn\nimport rando... | [
[
"numpy.dot",
"numpy.expand_dims",
"numpy.random.multivariate_normal",
"numpy.round",
"numpy.max",
"numpy.all",
"numpy.mean",
"numpy.any",
"numpy.nanmean",
"numpy.exp",
"numpy.unique",
"numpy.arange",
"numpy.copy",
"numpy.std",
"numpy.zeros",
"numpy.l... |
marksibrahim/CrypTen | [
"4e5b13487d7f6ceaa4f06e86f0b260e0761960fd",
"4e5b13487d7f6ceaa4f06e86f0b260e0761960fd"
] | [
"crypten/__init__.py",
"test/test_common.py"
] | [
"#!/usr/bin/env python3\n\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__version__ = \"0.1.0\"\n\nimport copy\nimport warnings\n\nimport crypten.common\nimport crypten.communica... | [
[
"torch.Generator",
"torch.LongTensor",
"numpy.random.seed",
"torch.is_tensor",
"torch.cuda.is_available",
"torch.device",
"numpy.random.randint"
],
[
"torch.Size",
"torch.tensor",
"torch.LongTensor",
"torch.zeros"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.