repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
jgwak/McRecon
[ "b90acc3017ba2dbb99ef13bb2033be30059d7108" ]
[ "lib/data_process.py" ]
[ "'''\nParallel data loading functions\n'''\nimport sys\nimport time\nimport theano\nimport numpy as np\nimport traceback\nfrom PIL import Image\nfrom six.moves import queue\nfrom multiprocessing import Process, Event\n\nfrom lib.config import cfg\nfrom lib.data_augmentation import preprocess_img\nfrom lib.data_io i...
[ [ "numpy.array", "numpy.random.choice", "numpy.zeros", "numpy.random.randint", "numpy.arange" ] ]
lzx551402/SuperPoint
[ "a7bda1f6b5c5262b89aeeb48160c36dbd7aa4a2f" ]
[ "superpoint/experiment.py" ]
[ "import logging\nimport yaml\nimport os\nimport argparse\nimport numpy as np\nfrom contextlib import contextmanager\nfrom json import dumps as pprint\n\nfrom datasets import get_dataset\nfrom models import get_model\nfrom utils.stdout_capturing import capture_outputs\nfrom settings import EXPER_PATH\n\nlogging.basi...
[ [ "tensorflow.set_random_seed", "tensorflow.reset_default_graph", "numpy.random.seed" ] ]
shivangeerathi/photutils
[ "446b9701b14ab80a307a7da04d1c1609cc24e569" ]
[ "photutils/isophote/tests/test_harmonics.py" ]
[ "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"\nTests for the harmonics module.\n\"\"\"\n\nimport numpy as np\nfrom numpy.testing import assert_allclose\nimport pytest\n\nfrom .make_test_data import make_test_image\nfrom ..harmonics import (first_and_second_harmonic_function,\n ...
[ [ "numpy.testing.assert_allclose", "numpy.sin", "numpy.array", "numpy.random.default_rng", "numpy.mean", "numpy.std", "scipy.optimize.leastsq", "numpy.cos", "numpy.linspace" ] ]
HAOCHENYE/mmdetection-mini
[ "3858c8c2f071c064fe78ce24088a1c9815ae1a21" ]
[ "mmdet/models/detectors/cornernet.py" ]
[ "import torch\n\nfrom mmdet.det_core import bbox2result, bbox_mapping_back\nfrom ..builder import DETECTORS\nfrom .single_stage import SingleStageDetector\n\n\n@DETECTORS.register_module()\nclass CornerNet(SingleStageDetector):\n \"\"\"CornerNet.\n\n This detector is the implementation of the paper `CornerNet...
[ [ "torch.cat" ] ]
chinmay3/NiaPy
[ "b4e5c0f98063e2a9eebd8d750f0922cfca88bc55" ]
[ "niapy/algorithms/other/aso.py" ]
[ "# encoding=utf8\nimport logging\n\nimport numpy as np\n\nfrom niapy.algorithms.algorithm import Algorithm\nfrom niapy.util import full_array, euclidean\n\nlogging.basicConfig()\nlogger = logging.getLogger('niapy.algorithms.other')\nlogger.setLevel('INFO')\n\n__all__ = ['AnarchicSocietyOptimization', 'elitism', 'se...
[ [ "numpy.full", "numpy.zeros", "numpy.argmin", "numpy.where", "numpy.apply_along_axis" ] ]
chenzhutian/auto-infog-timeline
[ "b01e6efdaeb2f63da449844ec818d21ed305c4cf" ]
[ "maskrcnn_benchmark/modeling/backbone/fpn.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\nimport torch\nimport torch.nn.functional as F\nfrom torch import nn\n\n\nclass FPN(nn.Module):\n \"\"\"\n Module that adds FPN on top of a list of feature maps.\n The feature maps are currently supposed to be in increasing depth\n ...
[ [ "torch.nn.functional.interpolate", "torch.nn.functional.max_pool2d" ] ]
naivelogic/vision-ai-developer-kit
[ "e72ed377c027df24f125ad1bdd0c94652075e25a" ]
[ "machine-learning-notebooks/02-mobilenet-transfer-learning-scripts/retrain.py" ]
[ "# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.image.resize_bilinear", "tensorflow.reduce_min", "tensorflow.nn.softmax_cross_entropy_with_logits", "tensorflow.image.random_flip_left_right", "tensorflow.matmul", "tensorflow.import_graph_def", "tensorflow.python.platform.gfile.ListDirectory", "tensorflow.stack", "...
BarryBAOWEI/CodeL
[ "3e2df2b1086e0e2208fa471e04af7b3a81740df3" ]
[ "JQdata/get_stock_inf.py" ]
[ "# -*- coding:utf-8 -*-\nimport tushare as ts\nimport pandas as pd\nimport datetime\n\n################### 子函数 ###################\ndef stock_inf_get(L,start_date,end_date):\n \"\"\"\n L : list 股票代码的列表,例如['000002','000423',...]\n start_date: str 数据起始时间,格式YYYY-MM-DD\n end_date : str 数据结束时间,格式Y...
[ [ "pandas.ExcelWriter" ] ]
jizongFox/IIC
[ "572076d5c0c26516ff3e807f2bad4e3498ab12c1" ]
[ "IIC/utils/segmentation/segmentation_eval.py" ]
[ "from __future__ import print_function\n\nimport sys\nfrom datetime import datetime\n\nimport torch\nfrom tqdm import tqdm\n\nfrom IIC.utils.cluster.cluster_eval import cluster_subheads_eval\nfrom IIC.utils.cluster.transforms import sobel_process\n\n\ndef segmentation_eval(config, net,\n mappin...
[ [ "torch.zeros", "torch.cuda.empty_cache", "torch.argmax", "torch.no_grad" ] ]
julien-amar/date-a-scientist
[ "8748516ab5bcfca488e6ef6ecb4fcd3786daa8fc" ]
[ "models/naive-bayes/review-scikit.py" ]
[ "from reviews import neg_list, pos_list\nfrom sklearn.feature_extraction.text import CountVectorizer\nfrom sklearn.naive_bayes import MultinomialNB\n\nreview = \"This crib was amazing\"\n\n# Vectorize & count words gathering both positive & negative words\ncounter = CountVectorizer()\ncounter.fit(neg_list + pos_lis...
[ [ "sklearn.naive_bayes.MultinomialNB", "sklearn.feature_extraction.text.CountVectorizer" ] ]
Yuhuishishishi/dask-sql
[ "6fa88edf972d4d00eaed63927c328cd9a5b7b339" ]
[ "tests/unit/test_utils.py" ]
[ "import pytest\nfrom dask import dataframe as dd\nimport pandas as pd\n\nfrom dask_sql.utils import (\n is_frame,\n Pluggable,\n ParsingException,\n _set_or_check_java_home,\n)\n\n\ndef test_is_frame_for_frame():\n df = dd.from_pandas(pd.DataFrame({\"a\": [1]}), npartitions=1)\n assert is_frame(df...
[ [ "pandas.DataFrame" ] ]
HunterLC/Features
[ "77e10d743a673fd03f8450719b56896916edf3b6" ]
[ "example/imagetoword.py" ]
[ "import tensorflow as tf\nfrom tensorflow import keras\n# 载入vgg19模型\nfrom tensorflow.keras.applications import vgg19\nfrom tensorflow.keras.applications import resnet50\nfrom tensorflow.keras.preprocessing import image\nimport numpy as np\nimport pandas as pd\nimport os\nfrom PIL import ImageFile\nImageFile.LOAD_TR...
[ [ "pandas.isna", "tensorflow.keras.preprocessing.image.load_img", "tensorflow.keras.applications.resnet50.decode_predictions", "tensorflow.keras.applications.resnet50.ResNet50", "tensorflow.keras.preprocessing.image.img_to_array", "pandas.read_csv", "numpy.expand_dims" ] ]
Jeket/japonicus
[ "a4f9dbb9d59be9ada645cdc13b70ec4841564304" ]
[ "web.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport datetime\nimport pandas as pd\nimport os\n\nimport flask\nimport dash\nfrom dash.dependencies import Input, Output, Event\nimport dash_core_components as dcc\nimport dash_html_components as html\nfrom flask_caching import Cache\nfrom promoterz.statistics impor...
[ [ "pandas.DataFrame", "pandas.read_csv" ] ]
DanielCastriani/machine-learning-algorithms
[ "5a1f361b283a751af0cb0157e28bfda2fb38d656" ]
[ "utils/math_functions.py" ]
[ "import numpy as np\n\n\ndef euclidian_distance(a: np.ndarray, b: np.ndarray) -> np.ndarray:\n diff = a - b\n elms_pow = diff ** 2\n elms_sum = np.sum(elms_pow, axis=1)\n return np.sqrt(elms_sum)\n" ]
[ [ "numpy.sum", "numpy.sqrt" ] ]
edsuom/ade
[ "cd1058224017efe631f60adbbf2d19a5f882f810" ]
[ "ade/test/test_population.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# ade:\n# Asynchronous Differential Evolution.\n#\n# Copyright (C) 2018-19 by Edwin A. Suominen,\n# http://edsuom.com/ade\n#\n# See edsuom.com for API documentation as well as information about\n# Ed's background and other projects, software and otherwise.\n# \n# ...
[ [ "numpy.array", "matplotlib.pyplot.grid", "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "matplotlib.pyplot.hist", "numpy.random.uniform", "numpy.arange", "numpy.argmax", "numpy.all", "matplotlib.pyplot.show", "numpy.linspace" ] ]
xhsheng-ustc/Deep-PCAC
[ "3e655fc2df5c4491257f1556ac34e1f0b270e974" ]
[ "mycodec.py" ]
[ "import os\r\nimport argparse\r\nimport numpy as np\r\nimport tensorflow as tf\r\nimport importlib \r\nimport subprocess\r\ntf.enable_eager_execution()\r\n\r\nfrom entropy_model import EntropyBottleneck\r\nfrom conditional_entropy_model import SymmetricConditional\r\nimport open3d as o3d\r\n########################...
[ [ "numpy.concatenate", "tensorflow.convert_to_tensor", "numpy.ceil", "tensorflow.train.latest_checkpoint", "numpy.asarray", "numpy.zeros", "tensorflow.expand_dims", "tensorflow.shape", "numpy.array", "tensorflow.Session", "tensorflow.train.Checkpoint", "tensorflow.map...
csb6/libtcod-ada
[ "89c2a75eb357a8468ccb0a6476391a6b388f00b4" ]
[ "third_party/libtcod/python/libtcodpy/__init__.py" ]
[ "#\n# libtcod Python wrapper\n# Copyright (c) 2008-2018 Jice & Mingos & rmtew\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# * Redistributions of source code must retain the above ...
[ [ "numpy.ascontiguousarray" ] ]
nguyenquangminh/gpt2-tf2
[ "3683c12322481510b850da01f5f471f07f8ba016" ]
[ "train-horovod.py" ]
[ "#!/usr/bin/env python3\n# Usage:\n# PYTHONPATH=src ./train --dataset <file|directory|glob>\n\nimport fire\nimport json\nimport os\nimport numpy as np\nimport tensorflow as tf\nimport random\nimport time\n\nimport horovod.tensorflow as hvd\n\nimport model, sample, encoder\nfrom load_dataset import load_dataset, Sa...
[ [ "tensorflow.compat.v1.placeholder", "tensorflow.compat.v1.global_variables_initializer", "tensorflow.train.latest_checkpoint", "tensorflow.compat.v1.train.AdamOptimizer", "numpy.random.seed", "tensorflow.compat.v1.train.Saver", "tensorflow.compat.v1.ConfigProto", "tensorflow.compat...
DMkelllog/wafermap_stacking
[ "3be5d3f878211efdce3f9199e8eaf1c12a2ccd09" ]
[ "run/mfe.py" ]
[ "import pickle\nimport numpy as np\nimport torch\nimport os\nimport csv\n\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.preprocessing import StandardScaler\n\n\nfrom torch.utils.data import DataLoader\nfrom torchvision import transforms\n\nfrom utils import softmax, CustomDataset, FNN, trainin...
[ [ "sklearn.preprocessing.StandardScaler", "torch.from_numpy", "torch.utils.data.DataLoader", "sklearn.model_selection.train_test_split", "numpy.unique" ] ]
trakru/scikit-mobility
[ "ae3c6b7bb6189a01add9ade67a2b704ea5e28462" ]
[ "skmob/privacy/attacks.py" ]
[ "from itertools import combinations\nfrom abc import ABCMeta, abstractmethod\nfrom skmob.utils import constants\nfrom skmob.core.trajectorydataframe import TrajDataFrame\nfrom tqdm import tqdm\nimport pandas as pd\nfrom ..utils.utils import frequency_vector, probability_vector, date_time_precision\n\n\nclass Attack...
[ [ "pandas.DataFrame", "pandas.merge" ] ]
Flux9665/IMS-Toucan
[ "dca76d37c5ea35bcdb35f979efd533fec75ed855" ]
[ "Preprocessing/visualize_phoneme_embeddings.py" ]
[ "import json\n\nimport numpy as np\nfrom matplotlib import pyplot as plt\nfrom matplotlib.markers import MarkerStyle\nfrom sklearn.decomposition import PCA\nfrom sklearn.manifold import TSNE\n\nfrom Preprocessing.ArticulatoryCombinedTextFrontend import ArticulatoryCombinedTextFrontend\n\n\ndef plot_embeddings(reduc...
[ [ "numpy.array", "sklearn.manifold.TSNE", "matplotlib.pyplot.subplots", "matplotlib.markers.MarkerStyle", "matplotlib.pyplot.show", "matplotlib.pyplot.clf", "sklearn.decomposition.PCA" ] ]
fcollman/cloud-volume
[ "906b6d338f7588b9091f99d1d0f4bca9a35e2709" ]
[ "cloudvolume/skeletonservice.py" ]
[ "from collections import defaultdict\nimport copy\nimport datetime\nimport re\nimport os\n\ntry:\n from StringIO import cStringIO as BytesIO\nexcept ImportError:\n from io import BytesIO\n\nimport numpy as np\nimport struct\n\nfrom . import lib\nfrom .exceptions import (\n SkeletonDecodeError, SkeletonEncodeErro...
[ [ "numpy.copy", "numpy.where", "numpy.sort", "numpy.unique", "numpy.frombuffer", "numpy.concatenate", "numpy.vectorize", "numpy.arange", "numpy.sqrt", "numpy.array", "numpy.zeros", "numpy.lexsort", "numpy.sum", "numpy.ones", "numpy.any", "numpy.abs", ...
bioembeddings/PLUS
[ "349cf3b9c69c20c0aa59aa404c40ba79fe62c1ce" ]
[ "plus_embedding.py" ]
[ "# Written by Seonwoo Min, Seoul National University (mswzeus@gmail.com)\n# PLUS\n\nimport os\nimport sys\nimport argparse\n\nimport torch\n\nimport plus.config as config\nfrom plus.data.alphabets import Protein\nimport plus.data.dataset as dataset\nimport plus.model.plus_rnn as plus_rnn\nimport plus.model.plus_tfm...
[ [ "torch.cuda.is_available", "torch.utils.data.DataLoader", "torch.cuda.device_count" ] ]
eric-erki/autokeras
[ "d365a04af7f41641c4b0634fc076f6dbe2364d53" ]
[ "autokeras/layers.py" ]
[ "import torch\nfrom torch import nn\nfrom keras import layers\n\nclass StubLayer:\n def __init__(self, input_node=None, output_node=None):\n self.input = input_node\n self.output = output_node\n self.weights = None\n\n def build(self, shape):\n pass\n\n def set_weights(self, wei...
[ [ "torch.nn.Linear", "torch.nn.LogSoftmax", "torch.cat", "torch.nn.MaxPool2d", "torch.nn.BatchNorm2d", "torch.nn.Dropout2d", "torch.nn.ReLU", "torch.Tensor" ] ]
jiashenC/detectron2
[ "a0d88f9b191e2dcbe987b1ccb53f280ea018c2e4" ]
[ "detectron2/engine/train_loop.py" ]
[ "# -*- coding: utf-8 -*-\n# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n\nimport os\nimport logging\nimport numpy as np\nimport time\nimport weakref\nimport torch\n\nimport detectron2.utils.comm as comm\nfrom detectron2.utils.events import EventStorage\n\n__all__ = [\"HookBase\", \"Trainer...
[ [ "torch.isfinite", "torch.autograd.profiler.profile", "numpy.mean" ] ]
tastiSaher/SpectralReconstruction
[ "f60c9fdc46fc00f3a2167c5425fc4e20bd77edb5" ]
[ "data.py" ]
[ "import numpy as np, h5py\nfrom torch.utils.data import Dataset\nimport torch\nimport os\nimport random\nimport cv2\nfrom SpectralImage import MSpecImage\n\n\"\"\"\nThis function defines the data_loader\n\nArgs:\n file_name: path to the utilized data\n\"\"\"\n\nclass RGB2SpectralDataset(Dataset):\n def __ini...
[ [ "numpy.array", "numpy.reshape", "numpy.load", "numpy.random.shuffle", "torch.unsqueeze", "torch.from_numpy", "numpy.where", "numpy.savez", "numpy.arange", "numpy.squeeze", "numpy.vstack" ] ]
lee-winchester/deep-neural-network
[ "8f7c012e864a6bf9a3257d8cd08e3b3488243b19" ]
[ "logistic regression.py" ]
[ "import os\nimport cv2\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport scipy\n\nROWS = 64\nCOLS = 64\nCHANNELS = 3\n\nTRAIN_DIR = 'Train_data/'\nTEST_DIR = 'Test_data/'\n\ntrain_images = [TRAIN_DIR+i for i in os.listdir(TRAIN_DIR)]\ntest_images = [TEST_DIR+i for i in os.listdir(TEST_DIR)]\n\ndef read_...
[ [ "numpy.dot", "numpy.zeros", "numpy.log", "numpy.exp", "numpy.abs", "numpy.average", "numpy.squeeze" ] ]
fenzhantw/BQ_AUTOML
[ "6f3a592a74320fab6fe85ab4f956294d5a5a422d" ]
[ "retail/recommendation-system/bqml-scann/index_builder/builder/indexer.py" ]
[ "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ...
[ [ "numpy.array", "numpy.linalg.norm", "tensorflow.io.gfile.GFile", "tensorflow.io.gfile.glob", "tensorflow.saved_model.save" ] ]
simonbowly/lp-generators
[ "a1c13c02d2fa32ecf12a6e5134e2672e5397735c" ]
[ "lp_generators/neighbours_common.py" ]
[ "''' Elementwise modifiers to instance data. Functions here take a matrix of\ninstance data and modify in place. Implementors at the instance level should\ncopy the data. '''\n\nimport numpy as np\n\n\ndef apply_repeat(func):\n ''' Add a count argument to the decorated modifier function to allow its\n operati...
[ [ "numpy.where" ] ]
manigalati/MnMs2
[ "76e14053604803d64a1fe37a66cc258c71742ff6" ]
[ "reconstructor.py" ]
[ "import torch.nn as nn\r\nimport torch\r\nimport os\r\nimport numpy as np\r\nfrom utils import device\r\nfrom utils import MSELoss, GDLoss\r\nfrom utils import DC, HD\r\n\r\nclass Reconstructor(nn.Module):\r\n def __init__(self, args):\r\n super().__init__()\r\n self.args = args\r\n self.ini...
[ [ "torch.nn.Dropout", "torch.nn.init.kaiming_uniform_", "torch.cat", "torch.nn.Softmax", "torch.nn.BatchNorm2d", "torch.nn.ConvTranspose2d", "torch.nn.LeakyReLU", "numpy.copy", "numpy.mean", "torch.no_grad", "numpy.where", "torch.nn.Conv2d" ] ]
oliverrose1998/Attention-Confidence
[ "fda42ee155c8075e571281e85810e2f2b8e3bc6f" ]
[ "model/recurrent_encoder/lstmcell.py" ]
[ "\"\"\" `lstmcell.py` defines:\n * basic LSTM cell,\n\"\"\"\n\n\nimport numpy as np\nimport sys\nimport torch\nimport torch.nn as nn\nfrom torch.autograd import Variable\nfrom torch.nn import init\n\n\nDURATION_IDX = 50\n\n\nclass LSTMCell(nn.LSTMCell):\n \"\"\" Overriding initialization and naming methods of...
[ [ "torch.eye", "torch.nn.init.orthogonal", "torch.nn.init.constant" ] ]
ffancheng/megaman
[ "faccaf267aad0a8b18ec8a705735fd9dd838ca1e" ]
[ "megaman/utils/tests/test_analyze_dimension_and_radius.py" ]
[ "import numpy as np\r\nfrom numpy.random import RandomState\r\nfrom scipy.spatial.distance import squareform, pdist\r\nimport megaman.utils.analyze_dimension_and_radius as adar\r\nfrom scipy.sparse import csr_matrix\r\nfrom numpy.testing import assert_array_almost_equal\r\n\r\ndef test_dim_distance_passed_vs_comput...
[ [ "numpy.testing.assert_array_almost_equal", "numpy.log10", "scipy.spatial.distance.pdist", "numpy.random.RandomState" ] ]
nicktimko/multiworm
[ "d694b8c2738cb3b5052ade880bca8587ada2c1e7" ]
[ "multiworm/analytics/sgolay.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nSavitzky-Golay Filter from the Scipy.org Cookbook:\nhttp://wiki.scipy.org/Cookbook/SavitzkyGolay\n\"\"\"\nfrom __future__ import (\n absolute_import, division, print_function, unicode_literals)\nimport six\nfrom six.moves import (zip, filter, map, redu...
[ [ "numpy.concatenate", "numpy.random.normal", "numpy.int", "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "numpy.exp", "numpy.linalg.pinv", "numpy.abs", "matplotlib.pyplot.show", "numpy.linspace", "numpy.convolve" ] ]
GiDiPa/LinkPredictionCo-AuthorNetworks
[ "d4b7ec6e40102a99c5d659f8cd5729a6b0e7179e" ]
[ "LinkPrediction/DatasetCelegans/orderResults.py" ]
[ "import time\nimport numpy as np\nimport pandas as pd\nimport pickle\nimport gc\nimport networkx as nx\n\nG = nx.read_gml('GeneratedData/testCelegans.gml')\nGset_edges = set(G.edges())\n\nprint(len(Gset_edges))\nnp.set_printoptions(precision=7)\nnp.set_printoptions(suppress=True)\n\npath = 'GeneratedData/mp_lp_alg_...
[ [ "numpy.set_printoptions", "numpy.empty", "pandas.DataFrame" ] ]
PastorD/rpi-deep-pantilt
[ "4c432a4003cc76e1997fec3d1c4f55f3d01d526c" ]
[ "rpi_deep_pantilt/control/manager.py" ]
[ "import logging\nfrom multiprocessing import Value, Process, Manager\nimport time\n\nimport pantilthat as pth\nimport signal\nimport sys\nimport numpy as np\n\nfrom rpi_deep_pantilt.detect.camera import PiCameraStream\nfrom rpi_deep_pantilt.detect.ssd_mobilenet_v3_coco import SSDMobileNet_V3_Small_Coco_PostProcesse...
[ [ "numpy.take" ] ]
rushabh-v/estimator
[ "6915557cef8bfc86f29f87e4467d601e4553b957" ]
[ "tensorflow_estimator/python/estimator/keras_test.py" ]
[ "# Copyright 2016 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.core.protobuf.config_pb2.ConfigProto", "tensorflow.compat.v1.gfile.MakeDirs", "tensorflow.executing_eagerly", "tensorflow.compat.v1.initializers.global_variables", "tensorflow.python.keras.testing_utils.get_test_data", "tensorflow.python.keras.layers.Dense", "tensorflow.pyt...
Xylonwang/mindspore
[ "ea37dc76f0a8f0b10edd85c2ad545af44552af1e" ]
[ "tests/ut/python/nn/optim/test_proximal_ada_grad.py" ]
[ "# Copyright 2020 Huawei Technologies Co., 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 applicable l...
[ [ "numpy.ones", "numpy.zeros" ] ]
xiaohanzai/fake_spectra
[ "170b42ac7732eb4f299617a1049cd3eabecfa3a7" ]
[ "fake_spectra/rate_network.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"A rate network for neutral hydrogen following\nKatz, Weinberg & Hernquist 1996, eq. 28-32.\"\"\"\nimport os.path\nimport math\nimport numpy as np\nimport scipy.interpolate as interp\nimport scipy.optimize\n\nclass RateNetwork(object):\n \"\"\"A rate network for neutral hydrogen fo...
[ [ "numpy.logical_not", "numpy.ones_like", "scipy.interpolate.InterpolatedUnivariateSpline", "numpy.log", "numpy.exp", "numpy.shape", "numpy.loadtxt", "numpy.power", "numpy.sqrt", "numpy.log10" ] ]
zahrag/BRLVBVC
[ "47c61eb69fbe96789b6a84c1510df0426bbcbfcc" ]
[ "collisions.py" ]
[ "import numpy as np\nimport csv\nimport matplotlib.pyplot as plt\nfrom matplotlib import rc\nrc('text', usetex=True)\n\nfrom scipy.special import gamma as scigamma\nfrom scipy.special import gammaln as scigammaln\nfrom collections import OrderedDict\n\n\ndef split_into_tasks(reader):\n out = list()\n tmp = Or...
[ [ "scipy.special.gamma", "matplotlib.pyplot.xlim", "numpy.argmin", "numpy.median", "numpy.exp", "numpy.mean", "matplotlib.pyplot.xticks", "numpy.concatenate", "numpy.histogram", "numpy.zeros_like", "numpy.log", "matplotlib.pyplot.savefig", "numpy.argmax", "num...
ostwind/ProteinLatentRep
[ "33d2667b6ee6dfeed0946fd9e2f22eef0e2960cc" ]
[ "Similarity_Reg/train.py" ]
[ "import torch \nimport numpy as np\nfrom torch.autograd import Variable\nfrom torch import nn\nfrom torch.optim import SGD\nfrom torch.utils.data.dataloader import DataLoader\nfrom torch.utils.data.dataset import Dataset\nfrom Bio import SeqIO\nimport matplotlib.pyplot as plt\n\ndef plot_loss(loss_list, epoch, trai...
[ [ "torch.autograd.Variable", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.savefig", "matplotlib.pyplot.close", "numpy.mean", "matplotlib.pyplot.figure", "torch.abs", "matplotlib.pyplot.ylabel" ] ]
douglasresende/lambda-deep-learning-demo
[ "ebbbd63c0abf87a1a4155b17cef145039b7a1ef7" ]
[ "source/network/seq2label_basic.py" ]
[ "import numpy as np\n\nimport tensorflow as tf\n\nrnn = tf.contrib.rnn\n\nEMBEDDING_SIZE = 200\nNUM_RNN_LAYER = 2\nRNN_SIZE = [128, 128]\n\n\ndef net(inputs, mask, num_classes, is_training, batch_size, vocab_size, embd=None, use_one_hot_embeddings=False):\n\n\n with tf.variable_scope(name_or_scope='seq2label_basic...
[ [ "tensorflow.zeros_initializer", "tensorflow.zeros", "tensorflow.shape", "tensorflow.expand_dims", "tensorflow.gather_nd", "tensorflow.contrib.layers.variance_scaling_initializer", "tensorflow.constant", "tensorflow.variable_scope", "tensorflow.get_variable", "tensorflow.nn....
compmech/particles
[ "d23ae69ad4c79024b997a232247b4ae0e1e7031c" ]
[ "meshless/espim/tests/test_calc_linear_buckling.py" ]
[ "import os\nimport inspect\n\nimport numpy as np\nfrom scipy.sparse import coo_matrix\nfrom composites.laminate import read_stack\nfrom structsolve import solve, lb\n\nfrom meshless.espim.read_mesh import read_mesh\nfrom meshless.espim.plate2d_calc_k0 import calc_k0\nfrom meshless.espim.plate2d_calc_kG import calc_...
[ [ "scipy.sparse.coo_matrix", "numpy.isclose", "numpy.zeros" ] ]
Panxj/models-1
[ "840f652d8d8ac2175551803bb17f4259e14161c5" ]
[ "fluid/text_classification/clouds/scdb_single_card.py" ]
[ "import unittest\nimport contextlib\nimport paddle.fluid as fluid\nimport paddle.v2 as paddle\nimport numpy as np\nimport sys\nimport time\nimport os\nimport json\nimport random\n\n\ndef to_lodtensor(data, place):\n \"\"\"\n convert to LODtensor\n \"\"\"\n seq_lens = [len(seq) for seq in data]\n cur_...
[ [ "numpy.concatenate" ] ]
andres091096/FPGA_FiniteDifference
[ "8d9b1db1884c7f5d83dfa6c04d70c2402372b333" ]
[ "plot_results.py" ]
[ "import numpy as np\nimport struct\nfrom matplotlib import pyplot as plt\n\npixels = 64;\n\nimg = []\nf = open(\"data/U.bin\",\"rb\")\nwhile True:\n byte=f.read(1)\n if not byte:\n break;\n value = struct.unpack('B', byte)[0]\n img.append(value)\n\nf.close()\n\nfig, axes = plt.subplots(nrows=1, n...
[ [ "numpy.uint8", "numpy.array", "numpy.reshape", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show" ] ]
taneemishere/Live_Face_Recognizer
[ "debe0f052d438de4ba6e76a04422614546f2b567" ]
[ "main.py" ]
[ "import cv2\r\nimport numpy as np\r\nimport face_recognition\r\n\r\n# Capture the video from the webcam\r\nwebcam = cv2.VideoCapture(0)\r\n\r\n# Loading the known faces images.\r\nimran_image = face_recognition.load_image_file(\"imrankhan.jpg\")\r\nimran_face_encoding = face_recognition.face_encodings(imran_image)[...
[ [ "numpy.argmin" ] ]
ashwin-M-D/DM-Gym
[ "f468c175d16b09d88edc21d77b6755ca2d35fc13" ]
[ "dm_gym/rewards/ClusteringEnv_2_reward.py" ]
[ "import numpy as np\nimport math\n\n\n\nclass Reward_Function:\n\n def __init__(self):\n pass\n\n def reward_function(self, obs, action, centroids):\n reward = 0\n\n y_i = self.get_yi(centroids, obs, action)\n p = self.get_p_i(centroids[action], obs)\n\n '''\n p_is = ...
[ [ "numpy.array", "numpy.linalg.norm" ] ]
simplelifetime/LXMERT-MPOCompressed
[ "ecb5d0e0fd3d57f9cbb965c353b8f0637fc0e2b0" ]
[ "src/tasks/vqa.py" ]
[ "# coding=utf-8\n# Copyleft 2019 project LXRT.\n\nimport os\nimport collections\n\nimport torch\nimport torch.nn as nn\nfrom torch.utils.data.dataloader import DataLoader\nfrom tqdm import tqdm\n\nfrom param import args\nfrom pretrain.qa_answer_table import load_lxmert_qa\nfrom tasks.vqa_model import VQAModel\nfrom...
[ [ "torch.no_grad", "torch.utils.data.dataloader.DataLoader", "torch.nn.BCEWithLogitsLoss", "torch.load" ] ]
OatmealLiu/DTC
[ "a2d0d2279efc946b83692d5af32008559eb74eff" ]
[ "fianl_DTC_tinyimagenet.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.nn.parameter import Parameter\nfrom torch.optim import SGD\nfrom torch.autograd import Variable\nfrom sklearn.metrics.cluster import normalized_mutual_info_score as nmi_score\nfrom sklearn.metrics import adjusted_rand_score as ari_sco...
[ [ "torch.device", "numpy.array", "torch.cat", "sklearn.cluster.KMeans", "numpy.copy", "sklearn.metrics.cluster.normalized_mutual_info_score", "torch.manual_seed", "torch.from_numpy", "torch.cuda.is_available", "torch.tensor", "sklearn.metrics.adjusted_rand_score", "to...
otmanon/gpytoolbox
[ "81d305bba9767a94f4d36264dd6849c410231c7c" ]
[ "unit_tests/cotmatrix_tets.py" ]
[ "import igl\nimport numpy as np\nfrom scipy.sparse import csr_matrix, diags\nfrom cotan_weights_tets import cotan_weights_tets\n\ndef cotmatrix_tets(V, T):\n \"\"\"\n Returns the cotangent Laplacian matrix for tet-meshes, implemented as described in\n \"Algorithms and Interfaces for Real-Time Deformation o...
[ [ "scipy.sparse.csr_matrix", "scipy.sparse.diags" ] ]
fernandezfran/exma
[ "4d489d14814f91dc364eaaae9239c52e125a7244" ]
[ "tests/electrochemistry/test_voltage.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# This file is part of exma (https://github.com/fernandezfran/exma/).\n# Copyright (c) 2021, Francisco Fernandez\n# License: MIT\n# Full Text: https://github.com/fernandezfran/exma/blob/master/LICENSE\n\n# =========================================================...
[ [ "numpy.testing.assert_almost_equal", "pandas.DataFrame", "numpy.array", "numpy.linspace" ] ]
MetaCell/PsyNeuLink
[ "aeddf3e8ea62504a5d928b100b59aa18e593156c" ]
[ "psyneulink/core/components/ports/inputport.py" ]
[ "# Princeton University licenses this file to You under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License. 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 agreed to...
[ [ "numpy.array", "numpy.zeros_like", "numpy.zeros" ] ]
stsauter/TDX
[ "23fe06876ad36162ac13e6c7365399b4bde10deb" ]
[ "src/data/skew_normal_drift_stream.py" ]
[ "import numpy as np\n\nfrom typing import List\nfrom collections import namedtuple\nfrom sklearn.utils import check_random_state\nfrom src.data.base_drift_stream import BaseDriftStream\nfrom src.proba.skew_normal import SkewNormal\n\n\nclass SkewNormalDriftStream(BaseDriftStream):\n \"\"\" Base class for streams...
[ [ "numpy.array", "numpy.empty", "numpy.rint", "numpy.tile", "sklearn.utils.check_random_state", "numpy.append" ] ]
harunaabdu/Tensorflow-Models
[ "dc91f48b70ebb6e92deca7ce5bce24c2dfa30f90" ]
[ "official/vision/beta/modeling/backbones/factory_test.py" ]
[ "# Copyright 2022 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.keras.layers.InputSpec", "tensorflow.python.distribute.combinations.combine", "tensorflow.test.main" ] ]
rafaelcostafrf/ros_quad_ufabc
[ "0be895851a2b3e8ed2b7ba292e1d9e6e3a93f5c1" ]
[ "src/mateus/quad_ros.py" ]
[ "import rospy\nimport numpy as np\nfrom gazebo_msgs.msg import ModelStates, ModelState\nfrom gazebo_msgs.srv import SetModelState\nfrom std_msgs.msg import Float64MultiArray, Float32\nfrom std_srvs.srv import Empty\nfrom sensor_msgs.msg import JointState\nfrom geometry_msgs.msg import Pose\nfrom scipy.spatial.trans...
[ [ "numpy.array", "numpy.zeros", "numpy.random.randn", "scipy.spatial.transform.Rotation.from_euler", "scipy.spatial.transform.Rotation.from_quat" ] ]
yaskev/mipt-thesis
[ "fb7001c6dfbe17a114748aebce0685c037b7ec97" ]
[ "monte_carlo/greeks.py" ]
[ "import pandas as pd\n\nfrom monte_carlo.dataset_maker import _get_price\nfrom utils.mapping import idx_to_col_name, idx_to_greek\n\nEPS = 0.01\n\n\ndef get_greeks(data: pd.DataFrame) -> pd.DataFrame:\n print('original')\n original_price_ci_df = data.apply(_get_price, axis=1, result_type='expand')\n origin...
[ [ "pandas.DataFrame" ] ]
skillup-ai/tettei-engineer
[ "d3f8a36c068db44391afcf4727ccbb7c456852c2" ]
[ "appendix/max_2.py" ]
[ "import numpy as np\n\na = np.array([[1, 3, 5, 7, 9, 11, 13],\n [2, 4, 6, 8, 10, 12, 14],\n [3, 5, 7, 9, 11, 13, 15],\n [2, 4, 6, 8, 10, 12, 14],\n [1, 3, 5, 7, 9, 11, 13]])\n\nprint(np.argmax(a)) #最大値をとるインデックス(1 次元 array に引き伸ばされている)\n\n'''\n20\n'''\n\nprint(np.argmax(a, ...
[ [ "numpy.array", "numpy.argmax" ] ]
weicheng113/deep-reinforcement-learning
[ "9b1653b7aedeb4dc0e4aab9351cc4a7f4ccb4f32" ]
[ "soccer-twos-ppo/soccer_env.py" ]
[ "import numpy as np\n\n\nclass SoccerEnvWrapper:\n def __init__(self, env, train_mode=False):\n self.env = env\n self.brain_names = env.brain_names\n self.train_mode = train_mode\n self.goalie_action_size = 4\n self.num_goalies = 2\n self.striker_action_size = 6\n ...
[ [ "numpy.array", "numpy.zeros" ] ]
geeknarendra/The-Complete-FAANG-Preparation
[ "3ed22719022bc66bd05c5c1ed091fe605e979908" ]
[ "4]. Projects/Desktop Development/GUI Projects/10). Curve Fitting and Interpolation/mplwidget.py" ]
[ "# ------------------------------------------------------\n# -------------------- mplwidget.py --------------------\n# ------------------------------------------------------\nfrom PyQt5.QtWidgets import*\n\nfrom matplotlib.backends.backend_qt5agg import FigureCanvas\n\nfrom matplotlib.figure import Figure\nfrom mat...
[ [ "matplotlib.figure.Figure" ] ]
zenetio/autogluon
[ "0b761703abfc0b9af6250e5bea378698d82bce9a" ]
[ "examples/image_classification/data_processing.py" ]
[ "import csv\nimport os\nimport pandas as pd\nimport shutil\nimport string\nfrom gluoncv.utils import makedirs\nimport argparse\ndef parse_args():\n parser = argparse.ArgumentParser(description='Train a model for different kaggle competitions.')\n parser.add_argument('--data-dir', type=str, default='/home/ubun...
[ [ "pandas.read_csv" ] ]
thirionjl/chains
[ "31bd4b85744fd56096fcc08027e8d20ce145bf0b" ]
[ "tests/core/test_ops_regularization.py" ]
[ "import numpy as np\n\nfrom chains.core import ops_regularization as reg, env\nfrom chains.core.static_shape import StaticShape\n\n\ndef test_coursera_dropout_forward():\n np.random.seed(1)\n dropout = reg.Dropout(keep_prob=0.7)\n dropout.compute(np.array([[0., 3.32524635, 2.13994541, 2.60700654, 0.],\n ...
[ [ "numpy.testing.assert_allclose", "numpy.array", "numpy.testing.assert_equal", "numpy.random.seed", "numpy.random.randn" ] ]
khoaideptrai/deep500
[ "0953038f64bc73c8d41d01796e07d3a23ca97822" ]
[ "deep500/datasets/cifar.py" ]
[ "import tarfile\nfrom typing import List, Tuple, Dict\n\nimport numpy as np\n\nfrom deep500.utils.download import real_download, unzip\nfrom deep500.lv2.dataset import NumpyDataset\nfrom deep500.utils.onnx_interop.losses import SoftmaxCrossEntropy\n\ndef download_cifar10_and_get_file_paths(folder=''):\n \"\"\"\n...
[ [ "numpy.arange", "numpy.zeros" ] ]
jjhelmus/distributed
[ "3fceec696b81f02c8082f253bf340e3f494fc42c" ]
[ "distributed/protocol/numba.py" ]
[ "import numba.cuda\nimport numpy as np\n\nfrom .cuda import cuda_deserialize, cuda_serialize\nfrom .serialize import dask_deserialize, dask_serialize\n\ntry:\n from .rmm import dask_deserialize_rmm_device_buffer\nexcept ImportError:\n dask_deserialize_rmm_device_buffer = None\n\n\n@cuda_serialize.register(num...
[ [ "numpy.dtype" ] ]
jasonwirth/zipline
[ "4dd6e4fb61bcb01cb2af809128611a8f4a0fd788" ]
[ "tests/data/bundles/test_yahoo.py" ]
[ "import numpy as np\nimport pandas as pd\nfrom six.moves.urllib.parse import urlparse, parse_qs\nfrom toolz import flip, identity\nfrom toolz.curried import merge_with, operator as op\n\nfrom zipline.data.bundles.core import _make_bundle_core\nfrom zipline.data.bundles import yahoo_equities, load\nfrom zipline.lib....
[ [ "pandas.Timestamp", "pandas.Index", "numpy.arange" ] ]
VishalSharma0309/gap_sdk
[ "09ccc594a3696a84953b732022cecae11e751c97" ]
[ "tools/nntool/interpreter/commands/fquant.py" ]
[ "# Copyright (C) 2020 GreenWaves Technologies, SAS\n\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public License as\n# published by the Free Software Foundation, either version 3 of the\n# License, or (at your option) any later version.\n\n...
[ [ "numpy.random.normal" ] ]
redeboer/mpl-interactions
[ "649190fea86f2885ba62aeb3eb198f9ab148bf51" ]
[ "mpl_interactions/xarray_helpers.py" ]
[ "import numpy as np\n\nfrom .helpers import choose_fmt_str\n\n\ndef choose_datetime_nonsense(arr, timeunit=\"m\"):\n \"\"\"\n Try to do something reasonable to datetimes and timedeltas.\n\n Parameters\n ----------\n arr : np.array\n Array with values to be formatted.\n timeunit : str, defau...
[ [ "numpy.issubdtype" ] ]
IITDBGroup/cape
[ "0b656e3a03bc2b79ae9015d37dc372cd18cb3da0" ]
[ "capexplain/dev/find_user_questions.py" ]
[ "#!/usr/bin/python\n# -*- coding:utf-8 -*- \n\nimport sys, getopt\nimport pandas\nimport csv\n#import statsmodels.formula.api as smf\nfrom sklearn import preprocessing\nimport math\nimport time\nfrom heapq import *\n\nimport operator\n\nsys.path.append('./')\nsys.path.append('../')\nfrom similarity_calculation.cate...
[ [ "pandas.DataFrame", "sklearn.preprocessing.LabelEncoder", "sklearn.preprocessing.OneHotEncoder", "pandas.Index" ] ]
fbartolic/volcano
[ "c9630a8a6ac64ace71631b00cb7afe9482572f0b" ]
[ "paper/figures/scripts/irtf_fit.py" ]
[ "import numpy as np\nimport pickle as pkl\n\nimport starry\nimport jax.numpy as jnp\nfrom jax import random\nimport numpyro\nimport numpyro.distributions as dist\nfrom numpyro.infer import *\n\nimport celerite2.jax\nfrom celerite2.jax import terms as jax_terms\nfrom celerite2 import terms, GaussianProcess\nfrom exo...
[ [ "numpy.concatenate", "numpy.array", "numpy.random.seed", "numpy.ones", "numpy.mean", "numpy.sqrt", "numpy.linspace" ] ]
sppleHao/water
[ "f7b274b5084e69da31ef4f7084cc7ab2c09e6b53" ]
[ "process_anno_angle.py" ]
[ "'''\n角度预处理\n'''\nimport numpy as np\nimport cv2\nimport os\nimport sys\nimport math\nfrom math import *\nimport scipy.misc\nfrom yolo import YOLO\n\n#恢复原图框\ndef scale_box(box,scale):\n new_box = (box[0]/scale[0],box[1]/scale[1],box[2]/scale[0],box[3]/scale[1])\n return [int(x) for x in new_box]\n\n#恢复原图点\nde...
[ [ "numpy.array", "numpy.linalg.norm", "numpy.dot" ] ]
StoneSwine/Segmentt
[ "5bb1076b4ced3b108481994caf78461bcd60eb22" ]
[ "src/pixel_feature_extraction.py" ]
[ "#!/usr/bin/env python3\n\nimport math\n# Standard library imports\nimport os\n\n# Third party imports\nimport cv2\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport seaborn as sns\n# finseg imports\nfrom Segmentt.flooding import segment_image\n\nWSIZ=50\n\ndef local_coherence(img, window_s=WSIZ):\n \"\"...
[ [ "matplotlib.pyplot.show", "numpy.var", "matplotlib.pyplot.title", "numpy.mean" ] ]
duthedd/keras-deep-learning
[ "f4cb8900245a12d03e33a5b76d2e33aa2bdda4f0" ]
[ "keras/backend/common.py" ]
[ "import numpy as np\n\n# the type of float to use throughout the session.\n_FLOATX = 'float32'\n_EPSILON = 10e-8\n_IMAGE_DATA_FORMAT = 'channels_last'\n\n\ndef epsilon():\n \"\"\"Returns the value of the fuzz\n factor used in numeric expressions.\n\n # Returns\n A float.\n\n # Example\n ```pyt...
[ [ "numpy.asarray" ] ]
RileyMShea/vectorbt
[ "92ce571ce9fd0667f2994a2c922fb4cfcde10c88" ]
[ "tests/test_generic.py" ]
[ "import numpy as np\nimport pandas as pd\nfrom numba import njit\nfrom datetime import datetime\nimport pytest\nfrom itertools import product\n\nfrom vectorbt.generic import nb\nfrom vectorbt.generic.drawdowns import Drawdowns\n\nseed = 42\n\nday_dt = np.timedelta64(86400000000000)\n\ndf = pd.DataFrame({\n 'a': ...
[ [ "pandas.DatetimeIndex", "numpy.argmin", "numpy.tile", "numpy.nanmean", "numpy.empty", "pandas.DataFrame", "numpy.nanmin", "numpy.argmax", "numpy.arange", "numpy.nanmax", "numpy.array", "numpy.nansum", "numpy.power", "numpy.timedelta64", "pandas.Index", ...
mearlboro/python-classifier-2020
[ "51125c3508af55fd04eddcb32729dcf35e6c4b1a" ]
[ "train_12ECG_classifier.py" ]
[ "#!/usr/bin/env python\n\nimport numpy as np, os, sys, joblib\nfrom scipy.io import loadmat\nfrom sklearn.impute import SimpleImputer\nfrom sklearn.ensemble import RandomForestClassifier\nfrom get_12ECG_features import get_12ECG_features\n\ndef train_12ECG_classifier(input_directory, output_directory):\n # Load ...
[ [ "sklearn.impute.SimpleImputer", "numpy.array", "numpy.asarray", "numpy.zeros", "sklearn.ensemble.RandomForestClassifier", "scipy.io.loadmat" ] ]
azaryabernard/audio_track_hackathon21
[ "3d3ae04dc93ef0f898e2a1e123c435030c74abe8" ]
[ "speechrecog/filter.py" ]
[ "import sounddevice as sd\nimport numpy as np\nfrom scipy.io.wavfile import write, read\nfrom scipy import signal\nimport os\n\n# These values can be adapted according to your requirements.\nsamplerate = 48000\ndownsample = 1\ninput_gain_db = 12\n#'''device = 'snd_rpi_i2s_card''''\n\ndef butter_highpass(cutoff, fs,...
[ [ "numpy.array", "scipy.io.wavfile.read", "scipy.signal.butter", "scipy.signal.filtfilt", "numpy.power" ] ]
VincentSaleh/Mundi_NotebookUsage
[ "37a50631971fc58b2b18d0b0b3f020b8e06f3623" ]
[ "lib/internal_lib/utils.py" ]
[ "import os \n\nimport geopandas as gpd\nimport math\nfrom descartes import PolygonPatch\nfrom matplotlib import pyplot as plt\nimport osmnx\nimport folium\nfrom IPython.display import display\nfrom PIL import Image\n\nos.environ[\"PROJ_LIB\"] = r\"c:\\Users\\a766113\\AppData\\Local\\Continuum\\anaconda3\\envs\\mund...
[ [ "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
nouyang/howe299r
[ "5ec4e23a2d808272ec541df511f4cbf60bfa4cd9" ]
[ "Experiments/03April2018/3d_plots_resid_vs_all_vars.py" ]
[ "\"\"\"\nAbstract version of 3d_residuals_plot.py, to handle making 14 graphs\nCreated on Fri Apr 10\n@author: nrw\n\"\"\"\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport shelve\nfrom datetime import datetime\n\nimport plotly.offline as po\nimport plotly.graph_objs as go\nfrom plotly import tools\n\n...
[ [ "numpy.array_str" ] ]
robmarkcole/img2vec
[ "02f1a59edd6d8a3711567ce82e559463ad0fe72e" ]
[ "img2vec_pytorch/img_to_vec.py" ]
[ "import torch\nimport torch.nn as nn\nimport torchvision.models as models\nimport torchvision.transforms as transforms\nimport numpy as np\n\nclass Img2Vec():\n RESNET_OUTPUT_SIZES = {\n 'resnet18': 512,\n 'resnet34': 512,\n 'resnet50': 2048,\n 'resnet101': 2048,\n 'resnet152':...
[ [ "torch.zeros", "torch.device", "torch.stack", "torch.no_grad", "torch.mean" ] ]
nikvaessen/voxceleb_trainer
[ "6f3a6fd316fbcfe357234ad678181fc3666b067e" ]
[ "dataprep.py" ]
[ "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# The script downloads the VoxCeleb datasets and converts all files to WAV.\n# Requirement: ffmpeg and wget running on a Linux system.\n\nimport argparse\nimport multiprocessing\nimport os\nimport pathlib\nimport subprocess\nimport pathlib\nimport pdb\nimport hashlib\nim...
[ [ "scipy.io.wavfile.read", "scipy.io.wavfile.write" ] ]
jchen42703/g2net_ml_dl
[ "7d514d3ef00727990202f86d67e3020b342d5584" ]
[ "python/scripts/train_minirocket.py" ]
[ "from g2net.train import TrainPipeline, create_base_transforms, create_dataloaders\nfrom g2net.train import create_base_transforms, create_dataloaders\nfrom datetime import datetime\nfrom torch.utils.data import DataLoader\nimport pandas as pd\nfrom sklearn.model_selection import StratifiedKFold\nfrom typing import...
[ [ "pandas.read_csv", "sklearn.model_selection.StratifiedKFold" ] ]
OlivierDehaene/GPA4.0
[ "11e39f3e43c08081b70cdf67bef8894bf75b5afb" ]
[ "gpa/scripts/decoding_utils.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\n\nimport numpy as np\nimport tensorflow as tf\nfrom copy import deepcopy, copy\nfrom itertools import groupby, chain\nfrom tqdm import tqdm\n\nimport pandas as pd\n\nfrom tensor2tensor.utils...
[ [ "tensorflow.train.get_checkpoint_state", "pandas.read_csv", "numpy.max", "pandas.DataFrame", "tensorflow.train.Saver", "numpy.arange", "tensorflow.get_variable_scope", "numpy.argmax", "numpy.transpose", "numpy.array", "numpy.reshape", "matplotlib.pyplot.figure", ...
VIVelev/PyDojo
[ "d932b3df841636208611192be1f881390c361289" ]
[ "dojo/cluster/kmeans.py" ]
[ "import numpy as np\nfrom scipy import linalg\n\nfrom ..base import Clustering\n\n__all__ = [\n \"KMeans\",\n]\n\n\nclass KMeans(Clustering):\n \"\"\"K-Means Clustering algorithm\n \n Parameters:\n -----------\n n_clusters : integer, optional\n n_runs : integer, how many times to run the algori...
[ [ "numpy.all", "scipy.linalg.norm", "numpy.mean" ] ]
jackleland/flopter
[ "8f18f81470b456884108dc33baee836a672409c4" ]
[ "analysis/scripts/magnum/magnum_midrun_analysis.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nimport xarray as xr\nimport json\nimport os\nimport glob\n# sys.path.append('/home/jleland/Coding/Projects/flopter')\nimport flopter.magnum.magoptoffline as mg\nimport flopter.core.lputils as lp\nimport flopter.core.ivdata as ivd\nimport flopter.core.fitters as ...
[ [ "numpy.array", "matplotlib.pyplot.errorbar", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.ylim", "matplotlib.pyplot.legend", "numpy.shape", "matplotlib.pyplot.figure", "numpy.radians", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.show", "numpy.flip" ] ]
Bachmvp/mmdetection3d
[ "b5b1a15a885eee92749e60a5837e2ce4918119f8" ]
[ "mmdet3d/apis/inference.py" ]
[ "import mmcv\nimport numpy as np\nimport re\nimport torch\nfrom copy import deepcopy\nfrom mmcv.parallel import collate, scatter\nfrom mmcv.runner import load_checkpoint\nfrom os import path as osp\n\nfrom mmdet3d.core import (Box3DMode, CameraInstance3DBoxes,\n DepthInstance3DBoxes, LiDARI...
[ [ "numpy.array", "torch.no_grad", "numpy.eye", "numpy.random.randint", "torch.onnx.export" ] ]
MuneetSJ/Exploration-vs-Exploitation-in-RL
[ "22c55e4b8d33c9519dc0cf73af9e99d540175228" ]
[ "agents/deep_q_agent.py" ]
[ "import os\n\nimport numpy as np\nimport rl.policy\n\nimport wandb\nfrom tensorflow.keras.optimizers import Adam\nfrom rl.agents import DQNAgent\nfrom rl.memory import SequentialMemory\nfrom rl.callbacks import WandbLogger\nfrom exploration_policies import *\nimport cartpole.model as cp\nimport lunarlander.model as...
[ [ "tensorflow.keras.optimizers.Adam", "numpy.mean" ] ]
bjwhite-fnal/decisionengine_modules
[ "1a2c3e4f57e60925dc374f386d8bca3ba9fa3e7e" ]
[ "AWS/sources/AWSSpotPriceWithSourceProxy.py" ]
[ "\"\"\"\nGet AWS spot price information\n\"\"\"\n\nimport datetime\nimport sys\nimport os\nimport time\nimport copy\nimport numpy as np\nimport pandas as pd\nimport pprint\nimport boto3\n\nimport decisionengine.framework.modules.SourceProxy as SourceProxy\nimport logging\nimport decisionengine_modules.load_config a...
[ [ "pandas.DataFrame" ] ]
arcada-uas/LSTMVis
[ "e0628caf16265feb61193251dc1c9b3e1af444ad" ]
[ "lstm_server.py" ]
[ "import argparse\nimport connexion\nimport numpy as np\nimport os\nimport yaml\nfrom flask import send_from_directory, redirect\nimport json\nfrom lstmdata.data_handler import LSTMDataHandler\nimport lstmdata.read_index as ri\nimport types\n\n__author__ = 'Hendrik Strobelt'\n\nCONFIG_FILE_NAME = 'lstm.yml'\ndata_ha...
[ [ "numpy.fromstring" ] ]
JayjeetAtGithub/dask
[ "ee9d64a98193f67567fc289b2306199b0bcf5b59" ]
[ "dask/array/routines.py" ]
[ "import inspect\nimport math\nimport warnings\nfrom collections.abc import Iterable\nfrom functools import partial, wraps\nfrom numbers import Integral, Real\nfrom typing import List, Tuple\n\nimport numpy as np\nfrom tlz import concat, interleave, sliding_window\n\nfrom ..base import is_dask_collection, tokenize\n...
[ [ "numpy.promote_types", "numpy.min", "numpy.histogramdd", "numpy.where", "numpy.apply_along_axis", "numpy.cumsum", "numpy.gradient", "numpy.bincount", "numpy.histogram", "numpy.count_nonzero", "numpy.empty", "numpy.vectorize", "numpy.take", "numpy.unravel_ind...
flyaway1217/FeVER
[ "cd4a82cb2f2405671e53cecafcf59cda30eff8eb" ]
[ "FeVER/test/memory_test.py" ]
[ "# !/usr/bin/env python3\n# -*- coding:utf-8 -*-\n#\n# Author: Yichu Zhou - flyaway1217@gmail.com\n# Blog: zhouyichu.com\n#\n# Python release: 3.6.0\n#\n# Date: 2018-10-02 15:03:12\n# Last modified: 2018-10-03 10:28:08\n\n\"\"\"\nMemory test.\n\"\"\"\n\nimport numpy as np\nimport torch\n\n# M = 500000\n# \n# x = [1...
[ [ "numpy.int32", "torch.from_numpy" ] ]
andreas-h/ledger-quotes
[ "6b300a7535f0bc3c9421bb29015ae6906a5aecad" ]
[ "aggregate_estateguru.py" ]
[ "#!/usr/bin/env python3\n\nfrom sys import argv\nimport pandas as pd\n\nSTRINGS_DE = {\n 'payment_date': 'Zahlungsdatum',\n 'cash_flow_status': 'Cashflow-Status',\n 'cash_flow_type': 'Cashflow-Typ',\n 'approved': 'Genehmigt',\n 'amount': 'Betrag',\n 'investment_auto': 'Investition(Auto Invest)',\n...
[ [ "pandas.Grouper", "pandas.read_csv", "pandas.DatetimeIndex" ] ]
zhhongsh/StablePose
[ "bf0b8bd98b9f514776474f1b368608e13ec4a84d" ]
[ "train_lmo.py" ]
[ "import torch.utils as utils\nimport argparse\nimport os\nimport random\nimport time\nimport numpy as np\nimport torch\nimport sys\nimport torch.nn.parallel\nimport torch.optim as optim\nimport torch.utils.data\nfrom torch.autograd import Variable\nfrom datasets.tless.dataset_triplet import PoseDataset as PoseDatas...
[ [ "torch.autograd.Variable", "matplotlib.pyplot.close", "matplotlib.pyplot.figure", "torch.manual_seed", "torch.cuda.empty_cache", "torch.utils.data.DataLoader", "matplotlib.pyplot.show", "torch.set_num_threads" ] ]
franksam007/incubator-superset
[ "a0f572eb3ea4b89cb435a8af20436f8e1d34814e" ]
[ "superset/data/unicode_test_data.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...
[ [ "pandas.read_csv" ] ]
liquidpeachy/advertools2
[ "86a7294c68f966e16ff1a021020645693770d91e" ]
[ "advertools2/knowledge_graph.py" ]
[ "\"\"\"\n.. _knowledge_graph:\n\nImport and Analyze Knowledge Graph Results on a Large Scale\n===========================================================\n\nIf :ref:`analyzing SERPs <serp>` is the first step in understanding your\nrankings on search engines, then analyzing the knowledge graph can be thought\nof as ...
[ [ "pandas.DataFrame", "pandas.Timestamp.utcnow" ] ]
aleksanderujek/knapsack-problem
[ "42ab0887e84979ebcc18d80a1f9269ce46088346" ]
[ "models/individual.py" ]
[ "import numpy as np\n\nclass Individual:\n knapsack = np.array([])\n fitness = 0\n weight = 0\n\n def __init__(self, n):\n if (n is not None):\n self.knapsack = np.random.choice([False, True], size=n)\n \n def num_of_elements(self):\n return np.sum(self.knapsack)\n\n ...
[ [ "numpy.sum", "numpy.array", "numpy.dot", "numpy.random.choice" ] ]
sheelabhadra/Learning2Drive
[ "f93cb5651c08b87b66b3f2ffc8a3512a9af73db4" ]
[ "environment/env.py" ]
[ "import random\nimport time\nimport os\nimport warnings\n\nimport gym\nfrom gym import spaces\nfrom gym.utils import seeding\nfrom PIL import Image\nimport numpy as np\n\nfrom config import INPUT_DIM, MIN_STEERING, MAX_STEERING, JERK_REWARD_WEIGHT, MAX_STEERING_DIFF\nfrom config import ROI, THROTTLE_REWARD_WEIGHT, ...
[ [ "numpy.concatenate", "numpy.array", "numpy.zeros", "numpy.roll", "numpy.finfo", "numpy.clip" ] ]
sjshtura/thesis_code
[ "1358f504cf3cfd0741e65723736dca7f039779d4" ]
[ "electricity_capacity.py" ]
[ "import pandas as pd\nimport matplotlib.pyplot as plt \nimport datetime\n\ndf_data = pd.read_excel(\"Wholesale_Electricity_Prices_2020.xlsx\")\n# print(df_data)\n\n# df_data = df_data.set_index(\"Gewerbe allgemein\")\ndf_data\n#df.index = pd.to_datetime(df.index, errors='ignore')\n#df\ndf_data\ndf_data = df_data[[...
[ [ "pandas.to_datetime", "pandas.read_excel", "pandas.to_timedelta" ] ]
lorentzj/garden
[ "6f946a441c02a89c30bd8e2498ff81d7c6275d3e" ]
[ "gan_model_definitions.py" ]
[ "import torch\nimport torch.nn as nn\n\n# Size of feature maps in generator\nngf = 64\n# Size of z latent vector (i.e. size of generator input)\nnz = 200\n# Size of inner layer for image type classification\nntc = 50\n\nclass Generator(nn.Module):\n def __init__(self, image_content_types):\n super(Generat...
[ [ "torch.nn.Sigmoid", "torch.nn.Tanh", "torch.nn.BatchNorm2d", "torch.nn.LeakyReLU", "torch.nn.ConvTranspose2d", "torch.nn.ReLU", "torch.nn.Conv2d" ] ]
OGalOz/omreegalozMediaPermutations
[ "a3480092967dee8f6ce6c911f10e4a731a410a78" ]
[ "lib/myothermodule/comp_fba_m.py" ]
[ "#!/bin/python3\nimport pandas as pd\nfrom optparse import OptionParser\nimport sys\nimport numpy as np\nimport logging\nimport os\n\ndef compare_two_files(filename1, filename2, output_dir_name, rxns_dir):\n f1_fullpath = os.path.join(rxns_dir, filename1)\n f2_fullpath = os.path.join(rxns_dir, filename2)\n ...
[ [ "numpy.corrcoef", "pandas.read_csv", "numpy.subtract" ] ]
yashasvimisra2798/numpy
[ "b892ed2c7fa27b2e0d73c12d12ace4b4d4e12897" ]
[ "numpy/typing/tests/data/reveal/arraypad.py" ]
[ "from typing import List, Any, Mapping, Tuple, SupportsIndex\n\nimport numpy as np\nimport numpy.typing as npt\n\ndef mode_func(\n ar: npt.NDArray[np.number[Any]],\n width: Tuple[int, int],\n iaxis: SupportsIndex,\n kwargs: Mapping[str, Any],\n) -> None: ...\n\nAR_i8: npt.NDArray[np.int64]\nAR_f8: npt.N...
[ [ "numpy.pad" ] ]
Thevenkster/Sweepstakes
[ "78cf1b95c4bb174c6e57394a5f7b9ddd1f79941a" ]
[ "Sweepstakes.py" ]
[ "'''\nThis python script can be used to randomly assign teams to players using an\nexcel spreadsheet as input. Please ensure that the input files/sheets/columns\nfollow the naming conventions of the code to avoid errors/exceptions.\n\nWhat this script does:\n1. Opens an xlsx spreadsheet X\n2. Reads the column with ...
[ [ "pandas.DataFrame", "pandas.read_excel", "pandas.ExcelWriter" ] ]
lgalmant/pyannote-audio
[ "d58a9d2e18fb2fddaab99dbc6f93fdbdcfc5f290" ]
[ "pyannote/audio/labeling/extraction.py" ]
[ "#!/usr/bin/env python\n# encoding: utf-8\n\n# The MIT License (MIT)\n\n# Copyright (c) 2016-2018 CNRS\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, includin...
[ [ "torch.device", "numpy.zeros", "numpy.stack", "torch.tensor", "torch.sort", "numpy.vstack", "numpy.maximum" ] ]
Shashank-Holla/motleyNet
[ "05a8c758f650a90f5f53e51bb89909fdc1b735f4" ]
[ "models/mnist_model.py" ]
[ "import torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\n\r\n# Object Recognition\r\ndropout_value = 0.05\r\nclass Net(nn.Module):\r\n def __init__(self, norm_type):\r\n super(Net, self).__init__()\r\n\r\n self.norm_type = norm_type\r\n assert self.norm_type in ('BatchNor...
[ [ "torch.nn.Dropout", "torch.nn.MaxPool2d", "torch.nn.AvgPool2d", "torch.nn.BatchNorm2d", "torch.nn.GroupNorm", "torch.nn.ReLU", "torch.nn.Conv2d" ] ]