repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
Gonaz/keras-tuner
[ "f8264811d4744abb4f0fdab480e8a4e6ddf91c4e" ]
[ "tutorials/tunable_xception_cifar10/tunable_xception_cifar10.py" ]
[ "# Copyright 2019 The Keras Tuner 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable l...
[ [ "tensorflow.keras.utils.to_categorical", "tensorflow.keras.datasets.cifar10.load_data" ] ]
willprice/pytorch-lightning
[ "94bba4059ce3dc13799d0fd59592f3bcfbbf19c4" ]
[ "pytorch_lightning/accelerators/ddp2_backend.py" ]
[ "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law...
[ [ "torch.cuda.empty_cache", "torch.cuda.set_device", "torch.cuda.amp.autocast" ] ]
jmhernan/NIreland_NLP
[ "c360c4978452e80575db2e0eed9ef540ed83b5c6" ]
[ "class_nn/embeddings_google.py" ]
[ "######################################################\n### Builds NN using google embeddings, parameters ###\n### Uses: justifications_clean_text_ohe.csv ###\n###### Collapses justifications to 6 categories. ###\n###### Stems and tokenizes words ###\n### Next step: Sarah needs to talk ...
[ [ "pandas.notnull", "numpy.sqrt", "sklearn.model_selection.train_test_split", "numpy.max", "numpy.mean", "numpy.count_nonzero", "sklearn.preprocessing.LabelEncoder", "numpy.zeros" ] ]
tom01h/deep-learning-from-scratch
[ "acb3c31976cd736b4abd21c3e8ab81c3bf0eb9bb" ]
[ "ch07/train_convnet.py" ]
[ "# coding: utf-8\nimport sys, os\nsys.path.append(os.pardir) # 親ディレクトリのファイルをインポートするための設定\nimport pickle\nimport time\nimport cupy as cp\n#import numpy as cp\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom dataset.cifar10 import load_cifar10\nfrom simple_convnet import SimpleConvNet\nfrom common.trainer ...
[ [ "matplotlib.pyplot.legend", "numpy.arange", "matplotlib.pyplot.ylim", "numpy.set_printoptions", "matplotlib.pyplot.plot", "numpy.round", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
stanford-policylab/surveilling-surveillance
[ "bbb9a147927a6342eecfe07ffa756b3acdb63f35" ]
[ "detection/models/detection/yolo/backbone.py" ]
[ "'''\nABOUT THIS SCRIPT:\nThis is a yolov3 implementation that constructs the appropriate\nyolov3 model layers and performs forward runs as per these modules\n\nThis script is a slightly modified version of the follwoing repo:\nhttps://github.com/eriklindernoren/PyTorch-YOLOv3.git\n\n'''\n\nimport numpy as np\nimpo...
[ [ "torch.nn.Sequential", "torch.sigmoid", "numpy.fromfile", "torch.isnan", "torch.cat", "torch.nn.ModuleList", "torch.sum", "torch.from_numpy", "torch.arange", "torch.nn.BCELoss", "torch.exp", "torch.nn.LeakyReLU", "torch.nn.functional.interpolate", "torch.nn....
TopoXLab/TopoCount
[ "eb93de2bc40d4421ea39c1b80d5c4c4829f3e369" ]
[ "my_dataset_test.py" ]
[ "from torch.utils.data import Dataset\nimport os\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport torch\nimport cv2\nfrom torchvision import transforms\nimport random\nfrom PIL import Image\nimport glob\n\n\nclass CrowdDataset(Dataset):\n '''\n crowdDataset\n '''\n def __init__(self, img_roo...
[ [ "numpy.pad", "torch.tensor", "numpy.concatenate", "numpy.load", "numpy.zeros", "numpy.loadtxt", "numpy.random.randint" ] ]
guoshuhong/yolo4_SVHN
[ "fb91d5c21a3ff2b6f8e977e7de5b91b1ecf3394e" ]
[ "predict.py" ]
[ "#-------------------------------------#\n# 对单张图片进行预测\n#-------------------------------------#\nfrom yolo import YOLO\nfrom PIL import Image\nimport os\nimport time\nimport pandas as pd\nimport numpy as np\n\nyolo = YOLO()\n\nwhile True:\n filelist = os.listdir()\n img = input('Input image filename:')\n...
[ [ "pandas.read_csv" ] ]
EivindFa/benfords_law
[ "6f2a0ab3f63d21b2caeef8f54922972b10d2b1b7" ]
[ "benford.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport math\nfrom scipy import stats\n\n# data source: https://ourworldindata.org/coronavirus-source-data\n\n\ndef setup(csv_filename, country):\n df = pd.read_csv(csv_filename)\n df = df.loc[: , [\"location\", \"date\", \"new_cases\" ...
[ [ "matplotlib.pyplot.legend", "pandas.read_csv", "matplotlib.pyplot.axhline", "matplotlib.pyplot.axvline", "numpy.linspace", "matplotlib.pyplot.scatter", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
yanzhicong/realistic-ssl-evaluation-pytorch
[ "d0ea3349765f8642e97dce57cf319f703b7f1e42" ]
[ "test_dataset.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport numpy as np\nimport argparse, math, time, json, os\n\nfrom lib import wrn, transform\nfrom config import config\nimport vis\n\n\nparser = argparse.ArgumentParser()\nparser.add_argument(\"--dataset\", \"-d\", default=\"cifar10\", type=str, help=\"dataset name :...
[ [ "numpy.max", "numpy.min", "numpy.sum", "numpy.unique" ] ]
ylsung/VL_adapter
[ "287409f383f89a11764fc45806864693a4d3e498", "1799110fe55ad3badc031fe2a3718c1ba61b4fc5" ]
[ "CLIP-ViL/clip/model.py", "VL-T5/src/refcoco_model.py" ]
[ "from collections import OrderedDict\nfrom typing import Tuple, Union\n\nimport torch\nimport torch.nn.functional as F\nfrom torch import nn\n\n\nclass VisualAdapter(nn.Module):\n \"\"\"Conventional Adapter layer, in which the weights of up and down sampler modules\n are parameters and are optimized.\"\"\"\n\...
[ [ "torch.nn.Sequential", "torch.sigmoid", "torch.ones", "torch.empty", "torch.nn.MultiheadAttention", "torch.cat", "torch.zeros", "torch.randn", "torch.nn.init.zeros_", "torch.nn.Conv2d", "torch.arange", "torch.nn.Embedding", "torch.nn.Linear", "torch.nn.AvgPo...
hyliush/deep-time-series
[ "3fea4f62ea740c721c559a0d413e4b3a3e214b3e" ]
[ "models/seq2seq/Transformer.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom layers.Transformer_EncDec import Decoder, DecoderLayer, Encoder, EncoderLayer, ConvLayer\nfrom layers.SelfAttention_Family import FullAttention, AttentionLayer\nfrom layers.Embed import DataEmbedding\nimport numpy as np\n\n\nclass Transform...
[ [ "torch.nn.Linear", "torch.nn.LayerNorm" ] ]
renskir/sv-channels
[ "284335dc20b775f9e90a7f77809acbb838308cd8" ]
[ "scripts/genome_wide/add_win_channels.py" ]
[ "import argparse\nimport logging\nfrom time import time\n\nimport numpy as np\nimport pysam\nfrom functions import (is_left_clipped, is_right_clipped, load_windows,\n save_windows)\n\n\ndef init_log(logfile):\n FORMAT = '%(asctime)s %(message)s'\n logging.basicConfig(format=FORMAT,\n ...
[ [ "numpy.concatenate", "numpy.arange", "numpy.isnan", "numpy.argwhere" ] ]
omidsakhi/tpu_dist_gan
[ "c676540dcd7c9fc8eb3e01bb976ed6655e1c906d" ]
[ "dist_input.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport numpy as np\nimport tensorflow as tf\nimport math\n\nclass InputFunction(object): \n \n def __init__(self, noise_dim): \n self.noise_dim = noise_dim\n\n def points_on_circle(self, num,...
[ [ "tensorflow.random_normal" ] ]
kar-thik/TensorFlow-Examples
[ "2097ad0a6faf55a4a9cee00cc1b0ae3454b178fc" ]
[ "examples/1_Introduction/helloworld.py" ]
[ "'''\nHelloWorld example using TensorFlow library.\n\nAuthor: Aymeric Damien\nProject: https://github.com/aymericdamien/TensorFlow-Examples/\n'''\n\nfrom __future__ import print_function\n\nimport tensorflow as tf\n\n# Simple hello world using TensorFlow\n\n# Create a Constant op\n# The op is added as a node to the...
[ [ "tensorflow.constant", "tensorflow.Session" ] ]
HeyItsRiddhi/cs207_riddhi_shah
[ "18d7d6f1fcad213ce35a93ee33c03620f8b06b65" ]
[ "project/code/thermo.py" ]
[ "\"\"\"Thermodynamics and Thermochemistry for Chemical Kinetics\nThis module contains a thermochem class with methods for \ncomputing the backward reaction rates for a set of \nreversible, elementary reactions.\n\"\"\"\n\nimport numpy as np\n\nclass thermochem:\n \"\"\"Methods for calculating the backward reacti...
[ [ "numpy.log", "numpy.exp", "numpy.sum" ] ]
agroome/report_compliance
[ "9fc0050f6ebc3498528d46b9e0973855d1b8072f" ]
[ "report_compliance.py" ]
[ "import csv\r\nfrom dotenv import load_dotenv\r\nimport logging\r\n\r\nimport os\r\nimport datetime\r\nimport pandas as pd\r\nimport argparse\r\nimport time\r\nfrom collections import defaultdict, Counter\r\nfrom functools import partial\r\nfrom pathlib import Path\r\nfrom typing import List, Iterable\r\nfrom tenab...
[ [ "pandas.DataFrame.from_records", "pandas.to_datetime" ] ]
MIXIAOXIN/detectron2-0.3-mxx
[ "3b4eb6da27b6360139228052690bce7a74b1268e" ]
[ "detectron2/export/caffe2_inference.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates.\n\nimport logging\nimport numpy as np\nfrom itertools import count\nimport torch\nfrom caffe2.proto import caffe2_pb2\nfrom caffe2.python import core\n\nfrom .caffe2_modeling import META_ARCH_CAFFE2_EXPORT_TYPE_MAP, convert_batched_inputs_to_c2_format\nfrom .share...
[ [ "torch.Tensor" ] ]
joycenerd/GenRep
[ "9cc21dd4b81d6649659308c42c192b0be73a040d" ]
[ "main_unified_inverter.py" ]
[ "from __future__ import print_function\n\nimport numpy as np\nimport os\nimport sys\nimport argparse\nimport time\nimport math\n\nimport torchvision.utils as vutils\nimport tensorboard_logger as tb_logger\nimport torch\nimport torch.backends.cudnn as cudnn\nfrom torchvision import transforms, datasets\n\nfrom util ...
[ [ "torch.nn.CrossEntropyLoss", "torch.cat", "torch.utils.data.DataLoader", "torch.nn.DataParallel", "torch.cuda.is_available", "torch.cuda.device_count", "numpy.array" ] ]
KoenvanLoon/EWS
[ "3447921ec2140f29fd69d5b140b5eba2f244bccd" ]
[ "EWS/EWS_weekly.py" ]
[ "\"\"\"\r\nEWS - Early Warning Signals\r\nEWS_weekly\r\n\r\n@authors: KoenvanLoon & TijmenJanssen\r\n\"\"\"\r\n\r\nfrom pcraster import *\r\nimport numpy as np\r\nimport os\r\nimport time\r\n\r\nimport EWSPy as ews\r\nimport EWS_configuration as cfg\r\nimport NULL_models_timeseries_weekly as temp_NULL\r\nimport NUL...
[ [ "numpy.asarray", "numpy.arange", "numpy.lib.stride_tricks.as_strided", "numpy.savetxt", "numpy.loadtxt" ] ]
spark1729/scikit-image
[ "65d525bcd5f30604c9a71c3480355580e9db7162" ]
[ "skimage/_shared/testing.py" ]
[ "\"\"\"Testing utilities.\"\"\"\n\n\nimport os\nimport re\nfrom tempfile import NamedTemporaryFile\n\nfrom numpy import testing\nimport numpy as np\nfrom skimage._shared._warnings import expected_warnings\nimport warnings\n\nfrom .. import data, io, img_as_uint, img_as_float, img_as_int, img_as_ubyte\n\n\nSKIP_RE =...
[ [ "numpy.random.seed", "numpy.testing.assert_allclose" ] ]
KlrShaK/Oxford_flowers102-using-Tensorflow
[ "7966a0ead1ce0175fbb1d9d658da3ec915e2d77a" ]
[ "Classifier/oxford_flower102.py" ]
[ "import tensorflow as tf\r\nimport tensorflow_datasets as tfds\r\nimport matplotlib.pyplot as plt\r\nfrom acc_plotter import plot_accuracy\r\nfrom tensorflow.keras.applications.inception_v3 import InceptionV3\r\n\r\ndataset_name = 'oxford_flowers102'\r\n\r\ntrain_dataset = tfds.load(dataset_name, split=tfds.Split.T...
[ [ "tensorflow.keras.callbacks.ModelCheckpoint", "tensorflow.image.random_brightness", "tensorflow.image.random_flip_left_right", "tensorflow.keras.layers.Dense", "tensorflow.random.uniform", "tensorflow.divide", "tensorflow.image.random_saturation", "tensorflow.image.resize", "te...
rickyHong/Pennylane-repl
[ "f18e5f233f84b91bbac8e61cebdee77c66fafd79" ]
[ "pennylane/plugins/default_gaussian.py" ]
[ "# Copyright 2018-2019 Xanadu Quantum Technologies Inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless required by ap...
[ [ "numpy.sqrt", "numpy.asarray", "numpy.zeros_like", "numpy.any", "numpy.exp", "numpy.trace", "numpy.hstack", "numpy.arange", "numpy.sin", "numpy.linalg.det", "numpy.block", "scipy.special.factorial", "numpy.outer", "numpy.zeros", "numpy.cosh", "numpy....
autobotasia/autoface
[ "8283a089c824acc62640899864111cf6962cb692" ]
[ "utils/clustering.py" ]
[ "\"\"\" Face Cluster \"\"\"\nimport tensorflow as tf\nimport numpy as np\nimport importlib\nimport argparse\nimport facenet\nimport os\nimport math\ndef face_distance(face_encodings, face_to_compare):\n \"\"\"\n Given a list of face encodings, compare them to a known face encoding and get a euclidean distance...
[ [ "tensorflow.get_default_session", "tensorflow.Graph", "tensorflow.Session", "tensorflow.get_default_graph", "numpy.zeros", "numpy.sum", "numpy.empty" ] ]
bo-ke/cybo
[ "612f30b0466b4ed6d04f5c2128b133367b55e576" ]
[ "cybo/models/stack_propagation_slu.py" ]
[ "# -*- coding: utf-8 -*-\n'''\n@author: kebo\n@contact: kebo0912@outlook.com\n\n@version: 1.0\n@file: stack_propagation_slu.py\n@time: 2021/02/23 01:01:13\n\n这一行开始写关于本文件的说明与解释\n\n\n'''\nimport tensorflow as tf\nfrom typing import Dict\n\nfrom cybo.data.vocabulary import Vocabulary\nfrom cybo.modules.attentions impo...
[ [ "tensorflow.keras.layers.Concatenate", "tensorflow.boolean_mask", "tensorflow.concat", "tensorflow.range", "tensorflow.keras.layers.Embedding", "tensorflow.zeros", "tensorflow.keras.layers.Dense", "tensorflow.reduce_sum", "tensorflow.cast", "tensorflow.argmax", "tensorf...
arash-safari/vp
[ "377e0172112157b79690b32349481a17e7590063" ]
[ "image/pixelsnail.py" ]
[ "# Copyright (c) Xi Chen\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# Borrowed from https://github.com/neocxi/pixelsnail-public and ported it to PyTorch\n\nfrom math import sqrt\nfrom functools import partial, lru_cache\n\nimpo...
[ [ "torch.nn.Sequential", "torch.nn.Dropout", "torch.nn.GLU", "torch.softmax", "torch.cat", "torch.nn.ModuleList", "torch.nn.Conv2d", "torch.nn.ELU", "torch.from_numpy", "numpy.ones", "torch.nn.Linear", "torch.matmul", "torch.nn.functional.interpolate", "torch....
tpmp-inra/ipso_cli
[ "6de4097dcb1536b546d9e2cdeb61057e5f931537" ]
[ "ipapi/base/ipt_loose_pipeline.py" ]
[ "from ipapi.tools.folders import ipso_folders\r\nfrom uuid import uuid4\r\nimport json\r\nfrom datetime import datetime as dt\r\nfrom timeit import default_timer as timer\r\nimport itertools\r\nfrom typing import Union\r\nimport logging\r\nimport csv\r\nimport os\r\n\r\nimport numpy as np\r\n\r\nfrom ipapi.base.ipt...
[ [ "numpy.array", "numpy.dstack", "numpy.full" ] ]
prashankkadam/Maer_1
[ "e201866429a1231df7f439797ef100f9e4e6da37" ]
[ "Database_test_git.py" ]
[ "# -*- coding:/ utf-8 -*-\r\n\"\"\"\r\nCreated on Tue Jul 23 12:07:20 2019\r\nThis piece of software is bound by The MIT License (MIT)\r\nCopyright (c) 2019 Prashank Kadam\r\nCode written by : Prashank Kadam\r\nUser name - ADM-PKA187\r\nEmail ID : prashank.kadam@maersktankers.com\r\nCreated on - Tue Jul 30 09:12:00...
[ [ "pandas.read_sql" ] ]
NeehaK/pandas
[ "0815c433b58920c658f1be9c7eb00cf7e75a3e2b" ]
[ "pandas/core/indexes/datetimelike.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nBase and utility classes for tseries type pandas objects.\n\"\"\"\nimport warnings\nimport operator\nfrom datetime import datetime, timedelta\n\nfrom pandas import compat\nfrom pandas.compat.numpy import function as nv\nfrom pandas.core.tools.timedeltas import to_timedelta\n\nimpor...
[ [ "pandas.tseries.frequencies.to_offset", "pandas._libs.tslibs.timedeltas.delta_to_nanoseconds", "pandas.core.dtypes.concat._concat_datetimetz", "pandas.core.common.AbstractMethodError", "pandas.compat.numpy.function.validate_argmax", "pandas.core.dtypes.common.is_dtype_equal", "numpy.as...
toddrme2178/pyfda
[ "c20355fb36ace6902aebd1a6bc6c1a71771b84f4" ]
[ "pyfda/filter_designs/cheby1.py" ]
[ "# -*- coding: utf-8 -*-\n#\n# This file is part of the pyFDA project hosted at https://github.com/chipmuenk/pyfda\n#\n# Copyright © pyFDA Project Contributors\n# Licensed under the terms of the MIT License\n# (see file LICENSE in root directory for details)\n\n\"\"\"\nDesign Chebychev 1 filters (LP, HP, BP, BS) wi...
[ [ "scipy.signal.cheby1", "scipy.signal.cheb1ord" ] ]
VSCHY/download_SatPP
[ "58ccffbce639496afdb54bbf41cd965f2c3b7037" ]
[ "IMERG_LR/main.py" ]
[ "import sys\nsys.path.append(\"./library\")\nimport requests \nfrom datetime import date, timedelta\nimport numpy as np \nimport os \nimport subprocess\nimport time\nimport multiprocessing\nimport random\nimport glob\nfrom imerg_func import *\nimport download_function as down\nfrom calendar import monthrange\nimpor...
[ [ "numpy.arange" ] ]
arielmakestuff/loadlimit
[ "70d3d23eecfe7922699098ea4901cc8673d14576" ]
[ "loadlimit/util.py" ]
[ "# -*- coding: utf-8 -*-\n# loadlimit/util.py\n# Copyright (C) 2016 authors and contributors (see AUTHORS file)\n#\n# This module is released under the MIT License.\n\n\"\"\"Utility objects and functions\"\"\"\n\n# ============================================================================\n# Imports\n# ==========...
[ [ "pandas.Timestamp.now" ] ]
jacksonlli/learn-hippo
[ "7695d22e73c334b6d9df7e35cb6e30855db187fe" ]
[ "src/models/LCALSTM_after.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport pdb\nfrom models.EM import EM\nfrom torch.distributions import Categorical\nfrom models.initializer import initialize_weights\n\n# constants\n# number of vector signal (lstm gates)\nN_VSIG = 3\n# number of scalar signal (sigma)\nN_SSIG = ...
[ [ "torch.isnan", "torch.cat", "torch.randn", "torch.zeros_like", "torch.nn.Sigmoid", "torch.nn.Linear", "torch.distributions.Categorical", "torch.mul", "torch.squeeze" ] ]
rwalkerlewis/devito
[ "262364e5f2855ad01a281d517d400704b7667420", "262364e5f2855ad01a281d517d400704b7667420" ]
[ "examples/seismic/poroelastic/poroelastic_example.py", "examples/seismic/tti/tti_example.py" ]
[ "import numpy as np\nfrom argparse import ArgumentParser\n\nfrom devito.logger import info\nfrom examples.seismic.poroelastic import PoroelasticWaveSolver, demo_model\nfrom examples.seismic import AcquisitionGeometry\n\n\ndef poroelastic_setup(shape=(50, 50), spacing=(15.0, 15.0), tn=500., num=200, space_order=4, n...
[ [ "numpy.array", "numpy.linspace" ], [ "numpy.array", "numpy.linspace" ] ]
anhlnt/age-gender-estimation
[ "0a1c3a289a33c96c586ae8219911dbe51724f6d9" ]
[ "convert_savedmodel.py" ]
[ "import tensorflow as tf\nfrom src.factory import get_model\nfrom omegaconf import OmegaConf\nfrom pathlib import Path\n\n\n\ndef getModel():\n weight_file = \"pretrained_models/EfficientNetB3_224_weights.26-3.15.hdf5\"\n model_name, img_size = Path(weight_file).stem.split(\"_\")[:2]\n print('model_name: '...
[ [ "tensorflow.saved_model.save" ] ]
ploomber/posts
[ "5f739cf04ff77932c34d5d3ad8d6d94dfe97f051" ]
[ "hypervector/scripts/get.py" ]
[ "# ---\n# jupyter:\n# jupytext:\n# text_representation:\n# extension: .py\n# format_name: light\n# format_version: '1.5'\n# jupytext_version: 1.11.4\n# kernelspec:\n# display_name: Python 3 (ipykernel)\n# language: python\n# name: python3\n# ---\n\nimport pandas as pd\nfr...
[ [ "sklearn.datasets.load_iris" ] ]
Peter42/iasi
[ "fc799d542c2bb80c3f559bc2f9e833ac330a5506" ]
[ "iasi/evaluation.py" ]
[ "from functools import partial\nimport math\nimport os\n\nimport luigi\nimport numpy as np\nimport pandas as pd\nfrom netCDF4 import Dataset, Group, Variable\nfrom sklearn.model_selection import ParameterGrid\n\nfrom iasi.composition import Composition\nfrom iasi.compression import CompressDataset, SelectSingleVari...
[ [ "numpy.absolute", "pandas.read_csv", "numpy.allclose", "numpy.isnan", "numpy.ndarray", "pandas.DataFrame", "sklearn.model_selection.ParameterGrid", "numpy.identity", "numpy.exp", "numpy.ma.is_masked", "numpy.isinf", "numpy.zeros" ] ]
matias-seer/seer-py
[ "fbb018e683817d108f2e1ee3162680de06ce110c", "fbb018e683817d108f2e1ee3162680de06ce110c" ]
[ "tests/test_seerpy.py", "seerpy/utils.py" ]
[ "# Copyright 2017,2018 Seer Medical Pty Ltd, Inc. or its affiliates. All Rights Reserved.\n\nimport json\nimport pathlib\nfrom unittest import mock\n\nimport pytest\nimport pandas as pd\n\nfrom seerpy.seerpy import SeerConnect\n\n\n# having a class is useful to allow patches to be shared across mutliple test functi...
[ [ "pandas.read_csv", "pandas.testing.assert_frame_equal" ], [ "scipy.signal.sosfilt", "numpy.asarray", "pandas.DataFrame", "numpy.dtype", "numpy.iinfo", "pandas.DataFrame.from_records", "numpy.hstack", "matplotlib.pyplot.tight_layout", "numpy.arange", "numpy.ceil"...
liespace/pyRRTs
[ "11bfefad99218bc9eccd97040355c61d34a1181d" ]
[ "test/test_planner.py" ]
[ "#!/usr/bin/env python\nfrom copy import deepcopy\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport cv2\nfrom matplotlib.patches import Polygon\nfrom rrts import BiRRTStar, RRTStar\nfrom rrts.debugger import Debugger\n\n\ndef center2rear(node, wheelbase=2.96):\n \"\"\"calculate the coordinate of rear ...
[ [ "numpy.dot", "matplotlib.pyplot.gca", "numpy.radians", "numpy.cos", "numpy.sin", "matplotlib.pyplot.draw", "numpy.array", "matplotlib.pyplot.ion", "matplotlib.pyplot.figure" ] ]
LouisFaure/simpleppt
[ "466c73fc64b9c4e3bf14b2c46c11d69de31c8a9b" ]
[ "simpleppt/SimplePPT.py" ]
[ "from typing import Any, Union, Optional, Mapping, Iterable # Meta\nfrom typing import Mapping\nimport numpy as np\nimport igraph\nfrom sklearn.metrics import pairwise_distances\nfrom scipy.sparse import csr_matrix\nfrom scipy.sparse.csgraph import shortest_path\nimport pandas as pd\nimport itertools\n\n\nclass Si...
[ [ "sklearn.metrics.pairwise_distances", "scipy.sparse.csgraph.shortest_path", "scipy.sparse.csr_matrix", "pandas.DataFrame", "numpy.append", "numpy.argmax", "numpy.argmin", "numpy.array", "numpy.zeros", "numpy.isin" ] ]
onl1ner/django-image-classifier
[ "6bb0726fbd61bb60bd245356ca85d7030ced131e" ]
[ "imageclassifierapp/services/classifier.py" ]
[ "import os\n\nimport numpy as np\nimport tensorflow as tf\n\nfrom PIL import Image\n\nfrom django.conf import settings\n\nfrom keras.preprocessing import image\nfrom keras.models import load_model\n\nclass Classifier:\n IMG_SIZE = (32, 32)\n\n LABELS = ['airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', ...
[ [ "numpy.expand_dims", "numpy.argmax" ] ]
shenyuanv/powerAnalysis
[ "8ebd4c9ad79c1bfe7ac13008fe39a74b00d64805" ]
[ "analyseUsage.py" ]
[ "import sys\nimport sqlite3\nfrom datetime import datetime\nfrom datetime import timedelta\nimport numpy as np\nimport argparse\nfrom collections import namedtuple\n\ndef contiguous_regions(condition):\n d = np.diff(condition)\n idx, = d.nonzero() \n\n idx += 1\n\n if condition[0]:\n idx = np.r_[...
[ [ "numpy.diff", "numpy.abs" ] ]
timcera/tstoolbox
[ "a32fa399d96082f01b7eedfd6c8893bdb881845c", "a32fa399d96082f01b7eedfd6c8893bdb881845c" ]
[ "tests/test_convert_units.py", "src/tstoolbox/functions/expanding_window.py" ]
[ "# -*- coding: utf-8 -*-\n\nfrom unittest import TestCase\n\nimport pint_pandas\nimport pytest\nfrom pandas.testing import assert_frame_equal\n\nfrom tstoolbox import tstoolbox\n\n\nclass TestConvertUnits(TestCase):\n @staticmethod\n def test_convert_units():\n a = tstoolbox.read(\"tests/data_gainesvil...
[ [ "pandas.testing.assert_frame_equal" ], [ "pandas.DataFrame" ] ]
BillyCheung10botics/donkeycar
[ "a3278818367e65250a381e59458b5be13b7d2b7c" ]
[ "donkeycar/parts/lidar.py" ]
[ "\"\"\"\nLidar\n\"\"\"\n\n# requies glob to be installed: \"pip3 install glob2\"\n# requires rplidar to be installed: \"pip3 install rplidar\"\n\nimport time\nimport math\nimport pickle\nimport serial\nimport numpy as np\nfrom donkeycar.utils import norm_deg, dist, deg2rad, arr_to_img\nfrom PIL import Image, ImageD...
[ [ "numpy.array", "numpy.argsort", "numpy.copy", "numpy.radians" ] ]
zixia/python-facenet
[ "d86e0c49a9ce413bef6e58a19a9f723aadcef968" ]
[ "src/models/inception_resnet_v1.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 required...
[ [ "tensorflow.concat", "tensorflow.contrib.slim.dropout", "tensorflow.contrib.slim.arg_scope", "tensorflow.contrib.slim.max_pool2d", "tensorflow.contrib.slim.l2_regularizer", "tensorflow.contrib.slim.repeat", "tensorflow.contrib.slim.initializers.xavier_initializer", "tensorflow.cont...
xfli376/Lecture
[ "4ee193769df089053726ec6e7792718e30f633a4" ]
[ "EM-beamer/image/bessel.py" ]
[ "from scipy import optimize, special\nfrom numpy import *\nfrom matplotlib import pyplot as pb \n \nx = arange(0,20,0.01)\n \nfor k in arange(0.5,5.5):\n y = special.jv(k,x)\n pb.plot(x,y)\n f = lambda x: -special.jv(k,x)\n x_max = optimize.fminbound(f,0,6)\n pb.plot([x_max], [special.jv(k,x_max...
[ [ "matplotlib.pyplot.title", "scipy.special.jv", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "scipy.optimize.fminbound", "matplotlib.pyplot.show" ] ]
Sliverk/hybridAveragePrecision
[ "e0417ef71e7419a770b3c106624b5f4336ff5a8d" ]
[ "utils/kitti.py" ]
[ "import pathlib\nimport numpy as np\n\ndef get_image_index_str(img_idx):\n return \"{:06d}\".format(img_idx)\n\n\ndef get_label_anno(label_path):\n annotations = {}\n annotations.update({\n 'name': [],\n 'truncated': [],\n 'occluded': [],\n 'alpha': [],\n 'bbox': [],\n ...
[ [ "numpy.array" ] ]
uv10000/P4
[ "e9e7f0c06dd9fb32e0febae016857b113eee747a" ]
[ "model.py" ]
[ "import os\nimport csv\nimport cv2\nimport numpy as np\nimport keras\nfrom scipy import ndimage\nfrom random import shuffle\n\n\n# read in udacity data from file\nlines=[]\nwith open('../data_provided_by_udacity/driving_log.csv') as csvfile:\n reader=csv.reader(csvfile)\n i_have_seen_firstline=False\n for ...
[ [ "matplotlib.pyplot.legend", "scipy.ndimage.imread", "matplotlib.pyplot.title", "numpy.fliplr", "sklearn.utils.shuffle", "sklearn.model_selection.train_test_split", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlabel", "numpy.array", "matplotlib.pyplot.show", "matplotlib...
chariothy/proxy-mon
[ "aa51220874d8a08553d4a2a26783533feb4a4949" ]
[ "rank.py" ]
[ "from pandas import DataFrame\nfrom utils import ut, tmp_env\nfrom pybeans import utils as pu\n\nimport pandas as pd\nfrom datetime import datetime, timedelta\n\n#from model import Proxy, Delay, Rank, query_delay, query_proxy\n\nfrom premailer import transform\nfrom pybeans import today\nfrom notify import notify_b...
[ [ "pandas.concat", "pandas.read_csv", "pandas.json_normalize", "pandas.DataFrame", "pandas.read_sql" ] ]
nairobi222/chainhammer
[ "94ab5269a9a9c751d355b41f90ac244026ccf46b" ]
[ "reader/blocksDB_diagramming.py" ]
[ "#!/usr/bin/env python3\n\"\"\"\n@summary: for the jupyter notebooks: tools, column creators, diagramming routines, etc. \n\n@version: v40 (29/November/2018)\n@since: 26/June/2018\n@organization: \n@author: https://github.com/drandreaskrueger\n@see: https://github.com/drandreaskrueger/chainhammer for updates...
[ [ "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.subplots", "matplotlib.get_backend", "matplotlib.pyplot.suptitle", "pandas.read_sql" ] ]
kongyanye/paper_search
[ "a5e8ab6210dd73988a5b0912bcbfc814b8a09f5e" ]
[ "analyze.py" ]
[ "\"\"\"\nReads txt files of all papers and computes tfidf vectors for all papers.\nDumps results to file tfidf.p\n\"\"\"\n\nfrom random import shuffle, seed\nimport numpy as np\nfrom sklearn.feature_extraction.text import TfidfVectorizer\n\nfrom utils import Config, safe_pickle_dump, load_db\n\nseed(1337)\n# max nu...
[ [ "sklearn.feature_extraction.text.TfidfVectorizer" ] ]
MISC-FORKS-cqc/onnx
[ "c50f329dcde038aa364082e0942764d36fcd1448" ]
[ "onnx/backend/test/case/node/sub.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport numpy as np # type: ignore\n\nimport onnx\nfrom ..base import Base\nfrom . import expect\n\n\nclass Sub(Base):\n\n @staticmethod\n def export(): ...
[ [ "numpy.array", "numpy.random.randn" ] ]
FMsunyh/SiamDW
[ "ef7a97ee6bdf732edbb7dc2943daf15b92535019" ]
[ "siamese_tracking/test_siamrpn.py" ]
[ "# ------------------------------------------------------------------------------\r\n# Copyright (c) Microsoft\r\n# Licensed under the MIT License.\r\n# Written by Houwen Peng and Zhipeng Zhang\r\n# Email: houwen.peng@microsoft.com\r\n# Clean testing scripts for SiamRPN\r\n# New: support GENE and TPE tuning\r\n# --...
[ [ "numpy.array" ] ]
gnomonsis/nncf_pytorch
[ "9fc4a92b5cb1b2c240e633c4ffa69b4fae1917fb" ]
[ "tests/test_backward_compat.py" ]
[ "\"\"\"\n Copyright (c) 2019-2020 Intel Corporation\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n Unless required by applicable law o...
[ [ "torch.load" ] ]
UnnamedMoose/LearningMLandRL
[ "a3a47998c32078a069ea82ce0032c30bb8b387f2" ]
[ "_old_basic_tensorflow/tutorial2_simpleRegressionLowLevel/simpleRegressionLowLevel.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nimport tensorflow as tf\n\n# correlation variable x and ground truth values\nx = tf.constant([[1], [2], [3], [4]], dtype=tf.float32, name=\"inputData\")\ny_true = tf.constant([[0], [-1], [-2], [-3]], dtype=tf.float32, name=\"groundTruth\")\n\n# linear model\nlin...
[ [ "matplotlib.pyplot.legend", "tensorflow.losses.mean_squared_error", "tensorflow.get_default_graph", "tensorflow.constant", "tensorflow.summary.FileWriter", "tensorflow.layers.Dense", "matplotlib.pyplot.plot", "tensorflow.global_variables_initializer", "matplotlib.pyplot.ylabel"...
leosampaio/scene-designer
[ "8a7276067acfde1997d386942aabc44d92436a1a" ]
[ "metrics/visualisation.py" ]
[ "import os\n\nimport numpy as np\nfrom sklearn.manifold import TSNE\nfrom sklearn.decomposition import PCA\nimport skimage.transform as sk_transform\nfrom sklearn.cluster import KMeans\nfrom PIL import Image\n\nfrom core.metrics import ProjectionMetric, ImageMetric\n\n\nclass TSNEProjection(ProjectionMetric):\n ...
[ [ "numpy.expand_dims", "numpy.random.seed", "numpy.min", "sklearn.cluster.KMeans", "numpy.uint8", "numpy.concatenate", "sklearn.manifold.TSNE", "numpy.max", "numpy.array", "numpy.where", "sklearn.decomposition.PCA" ] ]
iamdebanjangoswami/Image-Caption-IR--Im2txt
[ "e871cdd03c80fd70695ae5a46f32351e35956684" ]
[ "im2txt/train.py" ]
[ "\n\"\"\"Train the model.\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\n\nimport tensorflow as tf\n\nfrom im2txt import configuration\nfrom im2txt import show_and_tell_model\n\nFLAGS = tf.app.flags.FLAGS\n\ntf.flags.DEFINE_string(\"input_f...
[ [ "tensorflow.flags.DEFINE_boolean", "tensorflow.Graph", "tensorflow.contrib.slim.learning.train", "tensorflow.constant", "tensorflow.flags.DEFINE_string", "tensorflow.train.exponential_decay", "tensorflow.contrib.layers.optimize_loss", "tensorflow.gfile.MakeDirs", "tensorflow.lo...
samholt/NeuralSymbolicRegressionThatScales
[ "da023e5a3fdf157ab60e56a966eeea0129366bfc" ]
[ "scripts/csv_handling/dataload_format_to_csv.py" ]
[ "import pandas as pd \nimport numpy as np\nimport multiprocessing\nfrom multiprocessing import Manager\nimport click\nimport warnings\nfrom tqdm import tqdm\nimport json\nimport os\nfrom nesymres.dataset import generator\nimport time\nimport signal\nfrom pathlib import Path\nimport pickle\nfrom sympy import lambdif...
[ [ "pandas.DataFrame" ] ]
hkvision/analytics-zoo
[ "aee693a0604db5b5d01540d5d414b644313d5d22" ]
[ "pyzoo/test/zoo/serving/test_serialization.py" ]
[ "#\n# Copyright 2018 Analytics Zoo Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable ...
[ [ "numpy.array" ] ]
AndrewJBean/Stocks
[ "1a082856983936e77c45d5b47274ac5f2a344348" ]
[ "Processing/play_model.py" ]
[ "#!/usr/bin/env python3\n\n# MIT License\n\n# Copyright (c) 2018 Andrew J. Bean\n\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation th...
[ [ "numpy.log", "numpy.cumsum", "numpy.ones", "matplotlib.pyplot.plot", "numpy.exp", "matplotlib.pyplot.show" ] ]
YHKIM71/openpilot0813Volt
[ "9f8b401d2b544d54e3b5e8c019f6ca20926a61f0" ]
[ "selfdrive/controls/lib/lane_planner.py" ]
[ "import numpy as np\nfrom cereal import log\nfrom common.filter_simple import FirstOrderFilter\nfrom common.numpy_fast import interp, clip, mean\nfrom common.realtime import DT_MDL\nfrom selfdrive.hardware import EON, TICI\nfrom selfdrive.swaglog import cloudlog\nfrom selfdrive.ntune import ntune_common_get\n\nENAB...
[ [ "numpy.array", "numpy.zeros", "numpy.interp", "numpy.isfinite" ] ]
AlexsLemonade/refinebio
[ "52f44947f902adedaccf270d5f9dbd56ab47e40a" ]
[ "workers/data_refinery_workers/processors/test_compendia.py" ]
[ "import copy\nimport itertools\nimport json\nimport math\nimport os\nimport random\nimport zipfile\nfrom typing import Dict\n\nfrom django.test import TransactionTestCase, tag\n\nimport numpy as np\nimport pandas as pd\n\nfrom data_refinery_common.enums import PipelineEnum, ProcessorPipeline\nfrom data_refinery_com...
[ [ "pandas.DataFrame" ] ]
myatthukyaw/res_efficient_gcns
[ "89280d10f1d4864dfa0a5c3813db11e074dcb2f2" ]
[ "EfficientGCNv1/utils/tracking/deepsort/deep/model.py" ]
[ "import torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\n\r\n\r\nclass BasicBlock(nn.Module):\r\n def __init__(self, c_in, c_out, is_downsample=False):\r\n super(BasicBlock, self).__init__()\r\n self.is_downsample = is_downsample\r\n if is_downsample:\r\n self....
[ [ "torch.nn.Sequential", "torch.nn.BatchNorm1d", "torch.nn.Dropout", "torch.randn", "torch.nn.Conv2d", "torch.nn.MaxPool2d", "torch.nn.AvgPool2d", "torch.nn.Linear", "torch.nn.BatchNorm2d", "torch.nn.ReLU" ] ]
Eclipse-Dominator/machine_learning_ANN_python
[ "cb65b1ed6d62544ee8eaa749fb64fa5d3e792f76" ]
[ "Python_3.6/ANN_class/ANN.py" ]
[ "import numpy as np\n# Artificial Neural Network\nclass ANN:\n\tdef __init__(self, layer_size_list):\n\t\tself.input_size = layer_size_list[0]\n\t\tself.hidden_output_layer = []\n\t\tself.cost_result = []\n\t\tself.accuracy_result = []\n\t\tfor layer_index in range(1, len(layer_size_list)):\n\t\t\tself.hidden_outpu...
[ [ "numpy.dot", "numpy.random.random", "numpy.linalg.norm", "numpy.random.shuffle", "numpy.copy", "numpy.argmax", "numpy.exp", "numpy.array", "numpy.sum" ] ]
mataney/encoder-agnostic-adaptation
[ "59d7c2d4fe69f794c7449f0459f00350fcfbbf70" ]
[ "onmt/model_builder.py" ]
[ "\"\"\"\nThis file is for models creation, which consults options\nand creates each encoder and decoder accordingly.\n\"\"\"\nimport re\nimport math\nimport copy\nimport torch\nimport torch.nn as nn\nfrom torch.nn.init import xavier_uniform_\n\nimport onmt.inputters as inputters\nimport onmt.modules\nfrom onmt.enco...
[ [ "torch.nn.LogSoftmax", "torch.load", "torch.nn.ModuleList", "torch.from_numpy", "torch.nn.init.xavier_uniform_", "torch.device" ] ]
alvicler/python-nmr
[ "7b68275f0e1e8dd85622a6b796dc618eb5ac3e62" ]
[ "py-code/nmrvar.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# In[ ]:\n\n\nimport nmrglue as ng\nimport sys\nimport numpy as np\nimport pandas as pd\nget_ipython().run_line_magic('matplotlib', 'qt5')\nimport matplotlib.pyplot as plt\n\n#import matplotlib\n#print('Python version ' + sys.version)\n#print('Pandas version ' + pd.__versi...
[ [ "pandas.Series", "numpy.abs", "numpy.asarray", "numpy.arange", "pandas.DataFrame" ] ]
goel96vibhor/AdvSentEval
[ "c23684c5f9da905517071361fdb40acf194cd608" ]
[ "examples/gensen_util.py" ]
[ "# Copyright (c) 2017-present, Facebook, Inc.\n# All rights reserved.\n#\n# This source code is licensed under the license found in the\n# LICENSE file in the root directory of this source tree.\n#\n\n\"\"\"\nClone GenSen repo here: https://github.com/Maluuba/gensen.git\nAnd follow instructions for loading the mode...
[ [ "numpy.fromstring" ] ]
PingjunChen/pycontour
[ "13f64b685740368605db314b0f547f9f8dd4e737" ]
[ "pycontour/fea/setup.py" ]
[ "# -*- coding: utf-8 -*-\n\nimport os\n\nBASE_PATH = os.path.abspath(os.path.dirname(__file__))\nMODULE_NAME = os.path.basename(BASE_PATH)\n\ndef configuration(parent_package='', top_path=None):\n from numpy.distutils.misc_util import Configuration\n\n config = Configuration(MODULE_NAME, parent_package, top_p...
[ [ "numpy.distutils.misc_util.Configuration" ] ]
RiccardoRuggiero/micronet
[ "bfdac2a50a5f0f8484a253b356c06a166bf7e6a0" ]
[ "micronet/compression/quantization/wqaq/iao/main.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport sys\nsys.path.append(\"../../../..\")\nimport math\nimport os\nimport argparse\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport torchvision\nimport t...
[ [ "torch.optim.Adam", "torch.nn.CrossEntropyLoss", "numpy.random.seed", "torch.load", "torch.nn.init.zeros_", "torch.manual_seed", "torch.utils.data.DataLoader", "torch.save", "torch.nn.init.normal_", "torch.cuda.manual_seed_all", "torch.nn.init.xavier_uniform_", "tor...
asnt/vispy
[ "e515b00de7086527070b3e51e1133f8c1c5ca165" ]
[ "vispy/visuals/image.py" ]
[ "# -*- coding: utf-8 -*-\n# Copyright (c) Vispy Development Team. All Rights Reserved.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\"\"\"Primitive 2D image visual class.\"\"\"\n\nfrom __future__ import division\n\nimport numpy as np\n\nfrom ..gloo import Texture2D, VertexBuffer\nfrom...
[ [ "numpy.asarray", "numpy.array", "numpy.empty", "numpy.ascontiguousarray" ] ]
hoondy/pegasus
[ "ca6e8dc3b39402deab21d6db80ad4ce8d41631e9" ]
[ "pegasus/tools/visualization.py" ]
[ "import time\nimport numpy as np\nimport scipy\nimport umap as umap_module\nimport forceatlas2 as fa2\nimport uuid\n\nfrom threadpoolctl import threadpool_limits\nfrom pegasusio import MultimodalData\n\nfrom pegasus.tools import (\n eff_n_jobs,\n update_rep,\n X_from_rep,\n W_from_rep,\n get_neighbor...
[ [ "numpy.random.seed", "sklearn.utils.check_array", "numpy.std", "numpy.insert", "sklearn.decomposition.PCA", "scipy.sparse.isspmatrix_csr", "numpy.zeros", "sklearn.utils.check_random_state" ] ]
greenmonn/distanceMatrixGPU
[ "b06d9309ff6bf5e950a1f9384e58b47665a9b22e" ]
[ "cudaDistanceMatrix/cudaDistanceMatrix.py" ]
[ "import h5py\nimport numpy as np\nfrom skcuda import linalg, misc\nimport pycuda.autoinit\nfrom pycuda.compiler import SourceModule\nimport pycuda.gpuarray as gpuarray\nlinalg.init()\nfrom numpy.linalg import norm\nimport os.path\n\ncuda_driver = pycuda.driver.init()\npycuda.driver.Device(0).retain_primary_context(...
[ [ "numpy.dot", "numpy.asarray", "numpy.tril_indices", "numpy.linalg.norm", "numpy.ones", "numpy.floor", "numpy.array", "numpy.zeros" ] ]
RobbinBouwmeester/CALLC_evaluation
[ "0125ed88b767c305261cf5731c671f890bfacadd" ]
[ "CALLC/trainl2.py" ]
[ "\"\"\"\nRobbin Bouwmeester\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, ...
[ [ "pandas.read_csv" ] ]
swyjay/MRC
[ "47b0baeaa1544dbf4d763471692c508cb32ec93d" ]
[ "tensorflow/vocab.py" ]
[ "# -*- coding:utf8 -*-\n# ==============================================================================\n# Copyright 2017 Baidu.com, Inc. All Rights Reserved\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain...
[ [ "numpy.zeros" ] ]
himbeles/geo3d
[ "b9a01868207e9f2c0364eb3a6c130c9304cde0b6" ]
[ "tests/test_frame.py" ]
[ "import pytest\n\nfrom numpy import sqrt\n\nfrom geo3d import (\n Frame,\n frame_wizard,\n Point,\n Vector,\n UnitFrame,\n RotationMatrix,\n transformation_between_frames,\n)\n\n\ndef test_frame_wizard():\n t = frame_wizard([0, 0, 1], [0, 1, 0], \"z\", \"y\", [0, 0, 0])\n assert t == Unit...
[ [ "numpy.sqrt" ] ]
TWCurry/emotion-recognition-training-platform
[ "748fcdf2558fbfe9fb1523ef4024e7373543f0e3" ]
[ "Training/testModel.py" ]
[ "import sys, os\nimport tensorflow as tf\nimport numpy as np\nfrom tensorflow import keras\nimport matplotlib.pyplot as plt\n\nimgHeight = 762\nimgWidth = 562\nemotionCodes = [\"AF\", \"AN\", \"DI\", \"HA\", \"NE\", \"SA\", \"SU\"]\nemotionNames = [\"Afraid\", \"Angry\", \"Disgusted\", \"Happy\", \"Neutral\", \"Sad...
[ [ "tensorflow.keras.models.load_model", "tensorflow.keras.layers.Softmax", "tensorflow.keras.preprocessing.image.load_img", "numpy.argmax", "matplotlib.pyplot.bar", "matplotlib.pyplot.xticks", "numpy.array", "tensorflow.keras.preprocessing.image.img_to_array", "matplotlib.pyplot....
tk-ML/SALib
[ "2545a439ca474a673fddadf0399f7c4e21000d99" ]
[ "tests/test_cli_analyze.py" ]
[ "import sys\nimport subprocess\nfrom SALib.test_functions import Ishigami\nimport numpy as np\nimport re\n\nsalib_cli = \"./src/SALib/scripts/salib.py\"\nishigami_fp = \"./src/SALib/test_functions/params/Ishigami.txt\"\n\nif sys.version_info[0] == 2:\n subprocess.run = subprocess.call\n\n\ndef test_delta():\n ...
[ [ "numpy.loadtxt" ] ]
sschoedel/lanenet-lane-detection
[ "210116a7d4d1324fcfb2b8b50404e4c3bf99811f" ]
[ "test_lanenet.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n# @Time : 18-5-23 上午11:33\n# @Author : MaybeShewill-CV\n# @Site : https://github.com/MaybeShewill-CV/lanenet-lane-detection\n# @File : test_lanenet.py\n# @IDE: PyCharm Community Edition\n\"\"\"\ntest LaneNet model on single image\n\"\"\"\nimport argparse\n...
[ [ "matplotlib.pyplot.imshow", "numpy.min", "tensorflow.placeholder", "tensorflow.ConfigProto", "numpy.max", "tensorflow.train.ExponentialMovingAverage", "tensorflow.variable_scope", "tensorflow.Session", "tensorflow.train.Saver", "numpy.array", "matplotlib.pyplot.show", ...
DAIZHENWEI/FastGCN_pytorch
[ "87efe350d5acbe517a0642e9862ac9676b55c053", "87efe350d5acbe517a0642e9862ac9676b55c053" ]
[ "train_sage_EL2N_increment.py", "train_sage_AGE.py" ]
[ "import argparse\nimport time\nimport os\nimport torch\nimport torch.nn.functional as F\nimport torch.optim as optim\nimport dgl\nimport torch.nn as nn\nimport dgl.nn.pytorch as dglnn\nimport numpy as np\nimport pdb\nimport tqdm\nfrom scipy.sparse.linalg import norm as sparse_norm\nfrom utils import get_batches, ac...
[ [ "torch.nn.CrossEntropyLoss", "torch.norm", "numpy.random.seed", "numpy.random.choice", "torch.cuda.manual_seed", "torch.manual_seed", "numpy.concatenate", "numpy.intersect1d", "torch.cuda.max_memory_allocated", "torch.no_grad", "numpy.mean", "torch.cuda.is_available...
lavoiems/NeuralWassersteinFlow
[ "b120778d75fc7afc9b6a56724768ab39ad7c0b91" ]
[ "src/models/legendre_duality/train.py" ]
[ "import time\nimport torch\nfrom torch import optim\nfrom sklearn.decomposition import PCA\nimport matplotlib.pylab as plt\nimport torch.nn.functional as F\n\nfrom common.util import sample, save_models\nfrom common.initialize import initialize, infer_iteration\nfrom . import model\n\n\ndef c_transform(y, ey, lp, c...
[ [ "torch.zeros", "torch.randn", "matplotlib.pylab.close", "torch.nn.functional.pairwise_distance", "matplotlib.pylab.figure", "torch.no_grad", "matplotlib.pylab.subplots", "matplotlib.pylab.clf", "torch.FloatTensor", "sklearn.decomposition.PCA" ] ]
phecda-xu/PaddleSpeech
[ "6bf0d3bf57229091a74912633e837dabc6215c86" ]
[ "paddlespeech/t2s/exps/synthesize.py" ]
[ "# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless re...
[ [ "numpy.load" ] ]
sigfredonin/NEU_CS6120
[ "878fb65f9685af8f4d464398f26d1c5e1a803971" ]
[ "assignment_1/pos_hmm_bigram.py" ]
[ "\"\"\"\nNEU CS6120 Assignment 1\nProblem 4 POS Tagging - Hidden Markov Model\n\nThe training set is a collection of files from the Brown corpus.\nThe training set files have sentences of tokenized tagged words,\n w_1/t_1 w_2/t_2 w_3/t_3 ... w_k-1/t_k-1 w_k/t_k\none sentence per line, with leading white space.\n...
[ [ "numpy.array" ] ]
Bokubst/homework-scientific-computing
[ "4a7e1f896ad19ed55260a584bee2d6d6521de78b" ]
[ "homework04-python-scientific-ecosystem/exercise 4 code.py" ]
[ "import numpy as np\n\nrandom1 = np.random.uniform(size=100)\nprint(\"random1 values\")\nprint(random1 , \"\\n\")\n\nrandom2 = np.random.uniform(size=100)\nprint(\"random2 values\")\nprint(random2 , \"\\n\")\n\nfrom matplotlib import pyplot as plt\n\nplt.plot(random1, label = 'random number 1')\nplt.title('random n...
[ [ "matplotlib.pyplot.title", "matplotlib.pyplot.plot", "numpy.add", "numpy.mean", "numpy.random.uniform", "matplotlib.pyplot.show" ] ]
HongtaoYang/mean-average-precision
[ "84a4b72f07e9143948319b75a2b50f1d371a0b11" ]
[ "base.py" ]
[ "from abc import abstractmethod\nfrom typing import List, Any, Set\n\nimport numpy as np\n\n\nclass GroundTruthItem:\n def __init__(self, *, clazz: str, location: Any = None) -> None:\n \"\"\"\n Args:\n clazz: the class of the item.\n location: the location of the item.\n ...
[ [ "numpy.mean", "numpy.cumsum" ] ]
souleater42/MMP-Robotic-Artist
[ "2a67b611c2a3af5feb34276c0d3d30340667f1fa" ]
[ "code_v3/edges_style.py" ]
[ "\"\"\"\nSummary => will apply the EdgesStlye to the image given.\n\nDescription => This class is going to control the proccessing of images for\n the EdgesStlye. It will take a the 'takenPicture.jpg'\n from the Image folder and then stlye it. The output will\n be a list of x and y ...
[ [ "numpy.uint8" ] ]
luigialberti/pytriangle
[ "99ecafc299a692ef0f33e262bc7a1c912d3aa694" ]
[ "triangle.py" ]
[ "#!/usr/bin/env python\n\nimport triangulate\nimport sys\n\n\"\"\"\nInterface to the TRIANGLE program by Jonathan Richard Shewchuck\n\"\"\"\n\nclass Triangle:\n\n\n def __init__(self):\n\n \"\"\"\n Constructor\n \"\"\"\n\n # create handles to hold the\n # triangulation structur...
[ [ "matplotlib.path.Path", "matplotlib.pyplot.subplots", "matplotlib.patches.PathPatch" ] ]
OctThe16th/BetterTrainingDataMnist_RL_GAN
[ "fcc75c9ddf768d7c66c9fade3e86973a4c828624" ]
[ "Environnement/Environnement.py" ]
[ "import numpy as np\nfrom lightgbm import LGBMClassifier\nfrom keras.datasets import mnist\nfrom sklearn.metrics import f1_score\nimport warnings\nwarnings.filterwarnings(\"ignore\")\n\n\nclass Environnement:\n def __init__(self, amount_per_class):\n self.amount_per_class = amount_per_class\n\n (se...
[ [ "numpy.reshape", "sklearn.metrics.f1_score", "numpy.where", "numpy.random.choice" ] ]
pietrotrope/SolarSystemSimulation
[ "905eec31eb73e1203ee23a32846954b30bbc5925" ]
[ "RocketSimulation.py" ]
[ "import sys\nimport csv\nimport json\nimport math\nimport pygame\nimport numpy as np\nfrom pygame.locals import *\nimport pandas as pd\n\nfrom data import *\nfrom agent import agentsList, Agent\n\nglobal screenSize\nscreenSize = [1920, 1080]\n\n\ndef load_parameters(path):\n package = []\n file = open(path, '...
[ [ "pandas.read_csv" ] ]
wilsonloo/my_traffic_tf2_yolo3
[ "322104de934794870822e1ea2494ee8228de2540" ]
[ "evaluate.py" ]
[ "#! /usr/bin/env python\n# coding=utf-8\n#================================================================\n# Copyright (C) 2019 * Ltd. All rights reserved.\n#\n# Editor : VIM\n# File name : evaluate.py\n# Author : YunYang1994\n# Created date: 2019-02-21 15:30:26\n# Description :\n#\n#======...
[ [ "tensorflow.compat.v1.ConfigProto", "tensorflow.compat.v1.disable_v2_behavior", "numpy.reshape", "tensorflow.compat.v1.train.ExponentialMovingAverage", "numpy.copy", "tensorflow.compat.v1.placeholder", "numpy.array", "tensorflow.compat.v1.name_scope" ] ]
ntuecon/2018groupCE
[ "51c4442bcae8fbd3841b12b8f87d5eefe11e23f8" ]
[ "MarketVersion/ConsumerCES_original.py" ]
[ "class Consumer:\n \"\"\"This class is the optimization of individual choice of consumer\"\"\"\n #def __init__(self,GoodPrices,FacPrices):\n def __init__(self,alpha,beta,theta):\n import numpy as np\n #self.GoodPrices=np.array(GoodPrices)\n #self.FacPrices=np.array(FacPrices)\n ...
[ [ "numpy.array" ] ]
fumitoh/spyder
[ "12294fec88a2f61c756538ac38bd748d8e7b3f82" ]
[ "external-deps/spyder-kernels/spyder_kernels/console/kernel.py" ]
[ "# -*- coding: utf-8 -*-\n# -----------------------------------------------------------------------------\n# Copyright (c) 2009- Spyder Kernels Contributors\n#\n# Licensed under the terms of the MIT License\n# (see spyder_kernels/__init__.py for details)\n# ----------------------------------------------------------...
[ [ "matplotlib.get_backend", "matplotlib.pyplot.close" ] ]
HuiminHe/PyDy
[ "0834605bc2eed8d2768b50f55162bd6ac09cc694" ]
[ "swing_open_loop.py" ]
[ "from scipy.integrate import odeint\nfrom swing_config import *\n\nf = cloudpickle.load(open('./swing_open_loop_dynamic.dll', 'rb'))\n\ndef fv_gen(amp, ome, phi, q_max):\n return lambda t, y: amp * np.sin(ome * t + phi) / (1 + np.exp((np.abs(y[1:3])-q_max) / 0.01) * np.logical_or(np.abs(y[1:3]) < q_max, y[1:3] *...
[ [ "matplotlib.pyplot.show", "scipy.integrate.odeint" ] ]
seonho/facenet
[ "0804d06a3533a83ff865a3c4343cfca2a5cbe063" ]
[ "tmp/visualize_vggface.py" ]
[ "import numpy as np\nimport tensorflow as tf\nimport matplotlib.pyplot as plt\nimport vggface16\n\ndef main():\n \n sess = tf.Session()\n \n t_input = tf.placeholder(np.float32, name='input') # define the input tensor\n image_mean = 117.0\n t_preprocessed = tf.expand_dims(t_input-image_mean, 0)\n ...
[ [ "matplotlib.pyplot.imshow", "tensorflow.reduce_mean", "numpy.clip", "tensorflow.gradients", "tensorflow.expand_dims", "tensorflow.placeholder", "tensorflow.Session", "numpy.random.uniform", "matplotlib.pyplot.show" ] ]
ArmatureSystems/content
[ "ddb88044c5b39a17894dd13e7ae260d9854afc30" ]
[ "Packs/rasterize/Integrations/rasterize/rasterize.py" ]
[ "import demistomock as demisto\nfrom CommonServerPython import *\nfrom CommonServerUserPython import *\n\nfrom selenium import webdriver\nfrom selenium.common.exceptions import NoSuchElementException, InvalidArgumentException, TimeoutException\nfrom PyPDF2 import PdfFileReader\nfrom pdf2image import convert_from_pa...
[ [ "numpy.sum" ] ]
YoshikiMas/espnet
[ "793b999a50af484a5eaf6227ef7556b48514ef15" ]
[ "espnet2/bin/enh_scoring.py" ]
[ "#!/usr/bin/env python3\nimport argparse\nimport logging\nimport sys\nfrom typing import List\nfrom typing import Union\n\nfrom mir_eval.separation import bss_eval_sources\nimport numpy as np\nfrom pystoi import stoi\nimport torch\nfrom typeguard import check_argument_types\n\nfrom espnet.utils.cli_utils import get...
[ [ "numpy.array", "torch.from_numpy" ] ]
open-mmlab/mmrotate
[ "e22c8dfa3c309aa68ff18a5a03316f69c6eb2880" ]
[ "tests/test_data/test_datasets/test_dota.py" ]
[ "# Copyright (c) OpenMMLab. All rights reserved.\nimport os.path as osp\nimport shutil\nimport tempfile\n\nimport numpy as np\nimport pytest\nfrom mmdet.datasets import build_dataset\n\nfrom mmrotate.datasets.dota import DOTADataset\n\n\ndef _create_dummy_results():\n \"\"\"Create dummy results.\"\"\"\n boxes...
[ [ "numpy.testing.assert_almost_equal", "numpy.array" ] ]
dkkim93/pytorch-maml
[ "039e7ecf9b3d0b7543ebceb31a6443cc5516779a" ]
[ "misc/batch_sampler.py" ]
[ "import copy\nimport torch\nimport multiprocessing as mp\nfrom misc.utils import make_env\nfrom misc.batch_episode import BatchEpisode\nfrom env.subproc_vec_env import SubprocVecEnv\n\ndevice = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n\n\nclass BatchSampler(object):\n def __init__(self, ...
[ [ "torch.cuda.is_available" ] ]
pingheng001/Cnn-Bert
[ "d2be31634d693fbbe3b4bf2b28eb83af015cda72" ]
[ "modeling.py" ]
[ "# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unl...
[ [ "tensorflow.layers.conv1d", "tensorflow.concat", "numpy.sqrt", "tensorflow.control_dependencies", "tensorflow.zeros", "tensorflow.gfile.GFile", "tensorflow.cast", "tensorflow.assert_less_equal", "tensorflow.truncated_normal_initializer", "tensorflow.squeeze", "tensorflo...
gregdp/segger
[ "d4c112fd43f0b088145e225f976335800874ebe5" ]
[ "Segger/quaternion.py" ]
[ "\nimport chimera\nimport numpy\n\n\nclass Quaternion :\n\n def __init__ ( self, s=1.0, v=chimera.Vector(0,0,0) ) :\n self.s = s\n self.v = v\n\n def length (self) :\n return numpy.sqrt ( (self.s*self.s) + self.v.sqlength() )\n\n\n def rotation (self, angDegrees, axis) :\n angRa...
[ [ "numpy.sqrt", "numpy.cos", "numpy.arccos", "numpy.sin", "numpy.transpose" ] ]
ikaroszhang96/Convex-AlphaZero
[ "d96c9790529e48ff4e2ec34649bdc312a0abcc53" ]
[ "Main/AlphaZero/DistributedSelfPlay/SelfPlay.py" ]
[ "from Main.AlphaZero.DistributedSelfPlay import Constants\nfrom Main.Training.Connect4 import MemoryBuffers\nfrom Main import Hyperparameters\nimport multiprocessing as mp\nimport numpy as np\nimport time\n\n'''\nListen for data from the Remote Worker and forward it to the Replay Watcher.\nEvery worker will continu...
[ [ "numpy.around" ] ]
m214089/lorenz-da
[ "da02fddcac6eb85e285843da35bf1a3e7c07fe62" ]
[ "src/comp_varDA.py" ]
[ "#!/usr/bin/env python\n\n###############################################################\n# < next few lines under version control, D O N O T E D I T >\n# $Date$\n# $Revision$\n# $Author$\n# $Id$\n###############################################################\n\n#################################################...
[ [ "numpy.diag", "matplotlib.pyplot.legend", "numpy.squeeze", "matplotlib.pyplot.hold", "matplotlib.pyplot.plot", "numpy.mean", "matplotlib.pyplot.gca", "numpy.arange", "numpy.std", "matplotlib.pyplot.text", "matplotlib.pyplot.figure", "matplotlib.pyplot.title", "m...