code stringlengths 31 1.05M | apis list | extract_api stringlengths 97 1.91M |
|---|---|---|
# -*- coding: utf-8 -*-
"""
Functions to transfer coordinates under different coordinate system
"""
# Author: <NAME> <<EMAIL>>
# License: MIT
import numpy as np
def geo_to_transform(lat, lon, alt, lat_0, lon_0, alt_0):
"""
Convert WG84 to ENU. The origin of the ENU should pass the geo reference.
Note this... | [
"numpy.tan",
"numpy.deg2rad"
] | [((670, 687), 'numpy.deg2rad', 'np.deg2rad', (['lat_0'], {}), '(lat_0)\n', (680, 687), True, 'import numpy as np\n'), ((764, 781), 'numpy.deg2rad', 'np.deg2rad', (['lon_0'], {}), '(lon_0)\n', (774, 781), True, 'import numpy as np\n'), ((945, 979), 'numpy.tan', 'np.tan', (['((90 + lat_0) * np.pi / 360)'], {}), '((90 + l... |
import numpy as np
import pytest
import os
import itertools as it
from sympde.topology import Domain, ScalarFunctionSpace
from psydac.api.discretization import discretize
from psydac.utilities.utils import refine_array_1d
from psydac.fem.basic import FemField
from psydac.mapping.discrete import NurbsMapping
from psyda... | [
"numpy.moveaxis",
"psydac.core.kernels.eval_jacobians_3d",
"numpy.allclose",
"numpy.ones",
"pytest.mark.parametrize",
"psydac.api.discretization.discretize",
"os.path.join",
"psydac.core.kernels.eval_fields_3d_weighted",
"psydac.utilities.utils.refine_array_1d",
"numpy.zeros_like",
"psydac.core.... | [((1406, 1533), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""geometry"""', "('identity_2d.h5', 'identity_3d.h5', 'bent_pipe.h5', 'collela_2d.h5',\n 'collela_3d.h5')"], {}), "('geometry', ('identity_2d.h5', 'identity_3d.h5',\n 'bent_pipe.h5', 'collela_2d.h5', 'collela_3d.h5'))\n", (1429, 1533), Fals... |
import csv
import gensim
import numpy as np
if __name__ == '__main__':
csvfile = open("../data/data.csv", 'r')
spamreader = csv.reader(csvfile, delimiter=';', quotechar='|')
next(spamreader, None)
data_set = list()
documents_context_str = list()
documents_context_emb = list()
embedding_siz... | [
"gensim.models.Doc2Vec",
"numpy.dtype",
"csv.reader",
"csv.writer"
] | [((134, 183), 'csv.reader', 'csv.reader', (['csvfile'], {'delimiter': '""";"""', 'quotechar': '"""|"""'}), "(csvfile, delimiter=';', quotechar='|')\n", (144, 183), False, 'import csv\n'), ((693, 844), 'gensim.models.Doc2Vec', 'gensim.models.Doc2Vec', (['documents_context_str'], {'dm': '(0)', 'vector_size': 'embedding_s... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Define class game"""
import numpy as np
import tkinter as tk
from connectFour import find_row, drop_piece, winner, valid_move
from strategyAI import smart_AI, random_AI
ROW_COUNT = 6
COLUMN_COUNT = 7
WIDTH = 50
LENGTH = 40
listMessage=['Click on Game to start a new ga... | [
"connectFour.valid_move",
"numpy.zeros",
"connectFour.winner",
"connectFour.drop_piece",
"strategyAI.random_AI",
"strategyAI.smart_AI",
"connectFour.find_row"
] | [((1021, 1056), 'numpy.zeros', 'np.zeros', (['(ROW_COUNT, COLUMN_COUNT)'], {}), '((ROW_COUNT, COLUMN_COUNT))\n', (1029, 1056), True, 'import numpy as np\n'), ((2008, 2035), 'connectFour.valid_move', 'valid_move', (['self.board', 'col'], {}), '(self.board, col)\n', (2018, 2035), False, 'from connectFour import find_row,... |
#!/usr/bin/env python
#
# Copyright 2012 atlas
#
# This file was adapted from a part of Project Ubertooth written by <NAME>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or... | [
"PySide2.QtGui.QColor",
"past.utils.old_div",
"PySide2.QtGui.QPainterPath",
"future.standard_library.install_aliases",
"numpy.empty",
"numpy.arange",
"sys.exc_info",
"PySide2.QtGui.QPen",
"threading.Thread.__init__",
"numpy.copy",
"PySide2.QtWidgets.QWidget.__init__",
"rflib.RfCat",
"PySide2... | [((936, 970), 'future.standard_library.install_aliases', 'standard_library.install_aliases', ([], {}), '()\n', (968, 970), False, 'from future import standard_library\n'), ((20081, 20113), 'PySide2.QtWidgets.QApplication', 'QtWidgets.QApplication', (['sys.argv'], {}), '(sys.argv)\n', (20103, 20113), False, 'from PySide... |
"""A `dowel.logger.LogOutput` for Numpy npz files."""
import warnings
from pathlib import Path
import zipfile
import tempfile
from dowel import TabularInput
from dowel.logger import LogOutput
from dowel.simple_outputs import FileOutput
from dowel.utils import colorize
import numpy as np
try:
import torch
except I... | [
"tensorflow.is_tensor",
"pathlib.Path",
"numpy.savez_compressed",
"numpy.savez",
"torch.is_tensor"
] | [((1610, 1625), 'pathlib.Path', 'Path', (['file_name'], {}), '(file_name)\n', (1614, 1625), False, 'from pathlib import Path\n'), ((4100, 4150), 'numpy.savez_compressed', 'np.savez_compressed', (['self._file_path'], {}), '(self._file_path, **self._data)\n', (4119, 4150), True, 'import numpy as np\n'), ((4177, 4216), 'n... |
import csv
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import os
import numpy as np
import transforms3d.euler as t3d
import helper
import tensorflow as tf
###################### Print Operations #########################
def print_(text="Test", color='w', style='no', bg_color=''):
color_d... | [
"matplotlib.pyplot.title",
"os.mkdir",
"csv.reader",
"numpy.random.random_sample",
"tensorflow.reshape",
"matplotlib.pyplot.figure",
"numpy.sin",
"numpy.arange",
"numpy.mean",
"numpy.random.normal",
"os.path.join",
"numpy.round",
"transforms3d.euler.quat2mat",
"tensorflow.sin",
"numpy.co... | [((2496, 2512), 'numpy.asarray', 'np.asarray', (['data'], {}), '(data)\n', (2506, 2512), True, 'import numpy as np\n'), ((2894, 2915), 'numpy.asarray', 'np.asarray', (['templates'], {}), '(templates)\n', (2904, 2915), True, 'import numpy as np\n'), ((3384, 3401), 'numpy.asarray', 'np.asarray', (['poses'], {}), '(poses)... |
import numpy as np
import matplotlib.pyplot as plt
def visualize_gmm(gmm, max_K_to_display=16, fontsize=25):
''' Create single image visualization of all GMM parameters
Post Condition
--------------
New matplotlib figure created with visual of means and stddevs for all K clusters.
'''
K = gmm... | [
"matplotlib.pyplot.subplots",
"numpy.argsort",
"numpy.exp",
"matplotlib.pyplot.tight_layout",
"numpy.sqrt"
] | [((493, 555), 'matplotlib.pyplot.subplots', 'plt.subplots', ([], {'nrows': '(2)', 'ncols': 'ncols', 'figsize': '(3 * ncols, 3 * 2)'}), '(nrows=2, ncols=ncols, figsize=(3 * ncols, 3 * 2))\n', (505, 555), True, 'import matplotlib.pyplot as plt\n'), ((2006, 2024), 'matplotlib.pyplot.tight_layout', 'plt.tight_layout', ([],... |
import cv2
import time
import numpy as np
from statistics import mean
from unified_detector import Fingertips
images = np.load('../dataset/test/images.npy')
test_x = np.load('../dataset/test/test_x.npy')
test_y_prob = np.load('../dataset/test/test_y_prob.npy')
test_y_keys = np.load('../dataset/test/test_y_keys.npy')
c... | [
"numpy.load",
"numpy.save",
"cv2.waitKey",
"numpy.asarray",
"numpy.square",
"numpy.zeros",
"time.time",
"numpy.mean",
"numpy.array",
"statistics.mean",
"unified_detector.Fingertips",
"cv2.imshow",
"numpy.round",
"numpy.sqrt"
] | [((120, 157), 'numpy.load', 'np.load', (['"""../dataset/test/images.npy"""'], {}), "('../dataset/test/images.npy')\n", (127, 157), True, 'import numpy as np\n'), ((167, 204), 'numpy.load', 'np.load', (['"""../dataset/test/test_x.npy"""'], {}), "('../dataset/test/test_x.npy')\n", (174, 204), True, 'import numpy as np\n'... |
from image_display import display_image
import numpy as np, cv2, os
from torchvision.transforms import Grayscale
from torchvision.transforms import Compose
import torch
from torch import nn
from torchvision.transforms import ToTensor
model = nn.Sequential(
nn.Conv2d(in_channels=1, out_channels=30, kernel_size=3,... | [
"torch.nn.Dropout",
"image_display.display_image",
"cv2.rectangle",
"cv2.imshow",
"torch.nn.Flatten",
"cv2.cvtColor",
"cv2.imwrite",
"torch.load",
"torch.nn.Linear",
"cv2.destroyAllWindows",
"cv2.resize",
"cv2.waitKey",
"numpy.asarray",
"torch.nn.Conv2d",
"torch.max",
"torchvision.tran... | [((264, 331), 'torch.nn.Conv2d', 'nn.Conv2d', ([], {'in_channels': '(1)', 'out_channels': '(30)', 'kernel_size': '(3)', 'padding': '(1)'}), '(in_channels=1, out_channels=30, kernel_size=3, padding=1)\n', (273, 331), False, 'from torch import nn\n'), ((339, 348), 'torch.nn.ReLU', 'nn.ReLU', ([], {}), '()\n', (346, 348),... |
from typing import Optional
import numpy as np
import torch
from sklearn.model_selection import KFold, cross_val_score
from sklearn.neural_network import MLPClassifier
def c2st(
X: torch.Tensor,
Y: torch.Tensor,
seed: int = 1,
n_folds: int = 5,
scoring: str = "accuracy",
z_score: bool = True,... | [
"torch.mean",
"sklearn.model_selection.cross_val_score",
"numpy.zeros",
"torch.randn",
"sklearn.model_selection.KFold",
"numpy.ones",
"torch.std",
"numpy.mean",
"sklearn.neural_network.MLPClassifier",
"numpy.atleast_1d",
"numpy.concatenate"
] | [((1343, 1472), 'sklearn.neural_network.MLPClassifier', 'MLPClassifier', ([], {'activation': '"""relu"""', 'hidden_layer_sizes': '(10 * ndim, 10 * ndim)', 'max_iter': '(10000)', 'solver': '"""adam"""', 'random_state': 'seed'}), "(activation='relu', hidden_layer_sizes=(10 * ndim, 10 * ndim),\n max_iter=10000, solver=... |
################################################################################
# #
# SOD SHOCKTUBE #
# ... | [
"matplotlib.pyplot.figure",
"os.path.join",
"os.chdir",
"bhlight.bcall",
"hdf5_to_dict.load_hdr",
"numpy.linspace",
"hdf5_to_dict.load_geom",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.legend",
"matplotlib.use",
"subprocess.call",
"matplotlib.pyplot.subplots_adjust",
"matplotlib.pyplot.yla... | [((507, 539), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""../script/"""'], {}), "(0, '../script/')\n", (522, 539), False, 'import sys\n'), ((540, 580), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""../script/analysis"""'], {}), "(0, '../script/analysis')\n", (555, 580), False, 'import sys\n'), ((753, 778), ... |
'''
open3d visualizer
'''
import carla_utils as cu
from carla_utils import carla
import numpy as np
import open3d
import open3d
import os
import glob
from ..system import Clock, parse_yaml_file_unsafe
from ..basic import HomogeneousMatrix
from ..augment import ActorVertices
from ..world_map import connect_to_se... | [
"numpy.stack",
"os.path.abspath",
"open3d.visualization.Visualizer",
"carla_utils.GlobalPath.read_from_disk",
"numpy.deg2rad",
"os.path.join",
"os.path.dirname",
"open3d.geometry.LineSet",
"numpy.zeros",
"numpy.expand_dims",
"open3d.utility.Vector2iVector",
"numpy.array",
"numpy.sin",
"num... | [((556, 581), 'open3d.geometry.LineSet', 'open3d.geometry.LineSet', ([], {}), '()\n', (579, 581), False, 'import open3d\n'), ((799, 838), 'open3d.utility.Vector3dVector', 'open3d.utility.Vector3dVector', (['vertices'], {}), '(vertices)\n', (828, 838), False, 'import open3d\n'), ((860, 896), 'open3d.utility.Vector2iVect... |
import unittest
from unittest import mock
import numpy
from PIL import Image
import image_generator
from materials import *
def mock_get_global_material_list(material):
return [(material + '_1', 'white'), (material + '_2', 'black')]
class Test_Image_Generator(unittest.TestCase):
@mock.patch('im... | [
"image_generator.generate_scene_configuration",
"image_generator.generate_output_file_name",
"image_generator.generate_scene_configuration_list",
"image_generator.generate_materials_lists",
"unittest.mock.patch",
"image_generator.retrieve_image_pixel_list",
"numpy.array",
"image_generator.get_global_m... | [((306, 408), 'unittest.mock.patch', 'mock.patch', (['"""image_generator.get_global_material_list"""'], {'side_effect': 'mock_get_global_material_list'}), "('image_generator.get_global_material_list', side_effect=\n mock_get_global_material_list)\n", (316, 408), False, 'from unittest import mock\n'), ((741, 843), 'u... |
# -*- coding: utf-8 -*-
#
# This file is part of the FFEA simulation package
#
# Copyright (c) by the Theory and Development FFEA teams,
# as they appear in the README.md file.
#
# FFEA is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published ... | [
"json.dump",
"numpy.zeros",
"argparse.ArgumentParser"
] | [((1775, 1862), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""CLI for analysing Myosin-7 trajectory files"""'}), "(description=\n 'CLI for analysing Myosin-7 trajectory files')\n", (1798, 1862), False, 'import argparse\n'), ((4725, 4752), 'json.dump', 'json.dump', (['results', 'outfi... |
"""
Testing a point ('Null') Hypothesis (not using pseudopriors)
"""
from __future__ import division
import numpy as np
import pymc3 as pm
from scipy.stats import binom
import matplotlib.pyplot as plt
plt.style.use('seaborn-darkgrid')
# THE DATA.
# For each subject, specify the condition s/he was in,
# the number of t... | [
"pymc3.sample",
"numpy.random.seed",
"matplotlib.pyplot.subplot2grid",
"pymc3.DiscreteUniform",
"matplotlib.pyplot.style.use",
"matplotlib.pyplot.figure",
"pymc3.Binomial",
"matplotlib.pyplot.tight_layout",
"pymc3.math.eq",
"numpy.repeat",
"pymc3.Model",
"matplotlib.pyplot.show",
"matplotlib... | [((201, 234), 'matplotlib.pyplot.style.use', 'plt.style.use', (['"""seaborn-darkgrid"""'], {}), "('seaborn-darkgrid')\n", (214, 234), True, 'import matplotlib.pyplot as plt\n'), ((505, 533), 'numpy.repeat', 'np.repeat', (['[0, 1, 2, 3]', 'npg'], {}), '([0, 1, 2, 3], npg)\n', (514, 533), True, 'import numpy as np\n'), (... |
# -*- coding: utf-8 -*-
# @Author: <NAME>
# @Email: <EMAIL>
# @Date: 2017-07-31 15:20:54
# @Last Modified by: <NAME>
# @Last Modified time: 2020-03-31 18:15:43
from functools import partialmethod
import numpy as np
from ..core import PointNeuron, addSonicFeatures
from ..constants import FARADAY, Rg, Z_Na, Z_Ca
... | [
"functools.partialmethod",
"numpy.exp"
] | [((5582, 5638), 'functools.partialmethod', 'partialmethod', (['_xinf'], {'halfmax': '(-35.0)', 'slope': '(-5.0)', 'power': '(1)'}), '(_xinf, halfmax=-35.0, slope=-5.0, power=1)\n', (5595, 5638), False, 'from functools import partialmethod\n'), ((5650, 5705), 'functools.partialmethod', 'partialmethod', (['_xinf'], {'hal... |
import mne
import numpy as np
from config import fname, subject_id, n_jobs
report = mne.open_report(fname.report)
# Read longer epochs
epochs = mne.read_epochs(fname.epochs_long).pick_types(meg=True)
# Compute Cross-Spectral Density matrices
freqs = np.logspace(np.log10(12), np.log10(30), 9)
csd = mne.time_frequenc... | [
"numpy.log",
"mne.open_report",
"numpy.log10",
"mne.time_frequency.csd_morlet",
"mne.read_forward_solution",
"mne.beamformer.apply_dics_csd",
"mne.beamformer.make_dics",
"mne.read_epochs"
] | [((86, 115), 'mne.open_report', 'mne.open_report', (['fname.report'], {}), '(fname.report)\n', (101, 115), False, 'import mne\n'), ((303, 394), 'mne.time_frequency.csd_morlet', 'mne.time_frequency.csd_morlet', (['epochs', 'freqs'], {'tmin': '(-1)', 'tmax': '(1.5)', 'decim': '(5)', 'n_jobs': 'n_jobs'}), '(epochs, freqs,... |
# -*- coding: utf-8 -*-
import logging
import os
import cfg
import numpy as np
import torch
import torch.nn as nn
from methods import DigitsDA
from models import Classifier1, SVHN_generator, USPS_generator, weights_init
from torch.utils.data import DataLoader
from torchvision import datasets, transforms
from tqdm impo... | [
"os.remove",
"numpy.random.seed",
"torchvision.transforms.Normalize",
"torchvision.datasets.SVHN",
"os.path.join",
"models.USPS_generator",
"torch.utils.data.DataLoader",
"torch.multiprocessing.set_sharing_strategy",
"os.path.exists",
"torch.manual_seed",
"cfg.parse_args",
"torchvision.dataset... | [((369, 426), 'torch.multiprocessing.set_sharing_strategy', 'torch.multiprocessing.set_sharing_strategy', (['"""file_system"""'], {}), "('file_system')\n", (411, 426), False, 'import torch\n'), ((2666, 2724), 'utils.BalancedBatchSampler', 'BalancedBatchSampler', (['source_labels'], {'batch_size': 'batch_size'}), '(sour... |
'''
Reference : https://github.com/graykode/nlp-tutorial
'''
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
import os
def get_sinusoid_encoding_table(n_position, d_model):
##PE(pos,2i) = sin(pos/10000^(2i/dmodel))
##PE(pos,2i+1) = cos(pos/10000^(2i/dmodel))
def cal_ang... | [
"torch.nn.ReLU",
"torch.LongTensor",
"numpy.power",
"torch.nn.Embedding",
"torch.nn.Conv1d",
"torch.FloatTensor",
"torch.nn.CrossEntropyLoss",
"os.path.exists",
"torch.nn.LayerNorm",
"numpy.sin",
"torch.nn.Softmax",
"numpy.cos",
"torch.nn.Linear",
"torch.matmul",
"numpy.sqrt"
] | [((678, 709), 'numpy.sin', 'np.sin', (['sinusoid_table[:, 0::2]'], {}), '(sinusoid_table[:, 0::2])\n', (684, 709), True, 'import numpy as np\n'), ((750, 781), 'numpy.cos', 'np.cos', (['sinusoid_table[:, 1::2]'], {}), '(sinusoid_table[:, 1::2])\n', (756, 781), True, 'import numpy as np\n'), ((805, 838), 'torch.FloatTens... |
# readers.py provides functions to read spectrum files for data and
# metadata.
import pandas as pd
import numpy as np
from os.path import abspath, expanduser, splitext, basename, join, split
import glob
from collections import OrderedDict
import json
PICO_GPS_KEYS = "gps","GPS start","GPS"
class PiccoloFileError(Ex... | [
"numpy.poly1d",
"json.load",
"numpy.array",
"collections.OrderedDict",
"os.path.split",
"os.path.expanduser"
] | [((2071, 2083), 'json.load', 'json.load', (['f'], {}), '(f)\n', (2080, 2083), False, 'import json\n'), ((4346, 4359), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (4357, 4359), False, 'from collections import OrderedDict\n'), ((2291, 2303), 'json.load', 'json.load', (['f'], {}), '(f)\n', (2300, 2303), Fa... |
# -*- coding: utf-8 -*-
"""
Created on Fri Sep 13 12:21:09 2019
@author: reonid
mailto: <EMAIL>
Reads data from ASTRA res-file, result of modelling of code ASTRA*
*Automated System for TRansport Analysis (c) G.V.Pereverzev, P.N.Yushmanov
Res-file has the following general structure:
Signature
Text (Model ... | [
"textwrap.wrap",
"struct.unpack",
"numpy.dtype",
"numpy.searchsorted",
"numpy.array"
] | [((1776, 1798), 'struct.unpack', 'struct.unpack', (['"""<d"""', 'b'], {}), "('<d', b)\n", (1789, 1798), False, 'import struct\n'), ((1562, 1584), 'struct.unpack', 'struct.unpack', (['"""<l"""', 'b'], {}), "('<l', b)\n", (1575, 1584), False, 'import struct\n'), ((1693, 1715), 'struct.unpack', 'struct.unpack', (['"""<b""... |
"""
File: plot_ball.py
Copyright (c) 2016 <NAME>
License: MIT
Course: PHYS227
Assignment: cw-2-classwork-team
Date: Feb 11, 2016
Email: <EMAIL>
Name: <NAME>
Description: Plot a formula
"""
import numpy as np
import matplotlib.pyplot as plt
g = 9.81
def f(t, v):
y = v * t - ((g * t**2) /2)
return y
def test... | [
"matplotlib.pyplot.title",
"matplotlib.pyplot.show",
"matplotlib.pyplot.plot",
"numpy.linspace",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel"
] | [((801, 833), 'numpy.linspace', 'np.linspace', (['(0)', '(2 * v / 9.8)', '(100)'], {}), '(0, 2 * v / 9.8, 100)\n', (812, 833), True, 'import numpy as np\n'), ((858, 875), 'matplotlib.pyplot.plot', 'plt.plot', (['t', 'func'], {}), '(t, func)\n', (866, 875), True, 'import matplotlib.pyplot as plt\n'), ((880, 913), 'matpl... |
# -*- encoding: utf-8 -*-
"""
@Author : zYx.Tom
@Contact : <EMAIL>
@site : https://github.com/zhuyuanxiang/tensorflow_cookbook
---------------------------
@Software : PyCharm
@Project : TensorFlow_Machine_Learning_Cookbook
@File : C0107_activation_functions.py
@Version : v0.... | [
"matplotlib.pyplot.title",
"numpy.random.seed",
"tensorflow.nn.tanh",
"matplotlib.pyplot.figure",
"tensorflow.python.framework.ops.reset_default_graph",
"tensorflow.nn.relu6",
"numpy.set_printoptions",
"tensorflow.nn.relu",
"tensorflow.nn.elu",
"numpy.linspace",
"matplotlib.pyplot.get_fignums",
... | [((814, 899), 'numpy.set_printoptions', 'np.set_printoptions', ([], {'precision': '(8)', 'suppress': '(True)', 'threshold': 'np.inf', 'linewidth': '(200)'}), '(precision=8, suppress=True, threshold=np.inf, linewidth=200\n )\n', (833, 899), True, 'import numpy as np\n'), ((938, 956), 'numpy.random.seed', 'np.random.s... |
# %%
import numpy as np
import sys
sys.path.append('../..')
from utils.tester import Tester
import pickle
import os
import matplotlib
import matplotlib.pyplot as plt
import math
import tikzplotlib
city_name = 'Phoenix'
data = []
# data.append({'save_file_name': '2021-03-20_03-48-37', 'description': 'Fully Targeted L... | [
"sys.path.append",
"numpy.sum",
"numpy.average",
"matplotlib.cm.get_cmap",
"os.getcwd",
"matplotlib.pyplot.figure",
"tikzplotlib.save",
"pickle.load",
"numpy.min",
"numpy.max",
"os.path.join"
] | [((35, 59), 'sys.path.append', 'sys.path.append', (['"""../.."""'], {}), "('../..')\n", (50, 59), False, 'import sys\n'), ((1514, 1525), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (1523, 1525), False, 'import os\n'), ((1765, 1871), 'os.path.join', 'os.path.join', (['base_directory', '""".."""', '"""data"""', 'data_fol... |
from pynput.keyboard import Key
import numpy as np
import threading
import time
from utils.player import Player
from utils.keyboard import Keyboard
from utils.reader import Reader
# env vars
orbDist = None
# screen reader
reader = Reader()
reader.showWindow = False
reader.printDebug = False
reader.selectMonitor(2... | [
"threading.Thread",
"utils.keyboard.Keyboard",
"time.sleep",
"utils.player.Player",
"numpy.array_equal",
"utils.reader.Reader"
] | [((235, 243), 'utils.reader.Reader', 'Reader', ([], {}), '()\n', (241, 243), False, 'from utils.reader import Reader\n'), ((357, 394), 'threading.Thread', 'threading.Thread', ([], {'target': 'reader.start'}), '(target=reader.start)\n', (373, 394), False, 'import threading\n'), ((414, 468), 'utils.player.Player', 'Playe... |
import cv2
import numpy as np
from Align.affine_ransac import Ransac
from Align.affine_transform import Affine
# The ration of the best match over second best match
# distance of best match
# ------------------------------- <= MATCH_RATIO
# distance of second best match
RATIO = 0.8
class Align():
def __i... | [
"numpy.uint8",
"cv2.cvtColor",
"cv2.waitKey",
"cv2.destroyAllWindows",
"cv2.BFMatcher",
"cv2.imwrite",
"numpy.hstack",
"cv2.imread",
"cv2.warpAffine",
"Align.affine_ransac.Ransac",
"numpy.array",
"cv2.xfeatures2d.SIFT_create",
"cv2.imshow",
"Align.affine_transform.Affine",
"numpy.vstack"... | [((1397, 1419), 'cv2.imread', 'cv2.imread', (['path', 'mode'], {}), '(path, mode)\n', (1407, 1419), False, 'import cv2\n'), ((1921, 1958), 'cv2.cvtColor', 'cv2.cvtColor', (['img', 'cv2.COLOR_BGR2GRAY'], {}), '(img, cv2.COLOR_BGR2GRAY)\n', (1933, 1958), False, 'import cv2\n'), ((2025, 2054), 'cv2.xfeatures2d.SIFT_create... |
import numpy as np
class AllPlayers(object): #Parent class for all players
def __init__(self, mark):
self.mark = mark
class Hooman(AllPlayers): #Hooman class for User
pass
class Computer(AllPlayers): ... | [
"numpy.random.uniform"
] | [((1216, 1235), 'numpy.random.uniform', 'np.random.uniform', ([], {}), '()\n', (1233, 1235), True, 'import numpy as np\n')] |
import torch
import torch.nn as nn
import torch.optim as optim
import numpy as np
import time
import logging
from sklearn.metrics import roc_auc_score, f1_score
from src.utils.utils import print_progessbar, get_best_threshold
class DROCC_trainer:
"""
Trainer for the DROCC following the paper of Goyal et al. (... | [
"torch.autograd.grad",
"torch.no_grad",
"torch.flatten",
"torch.ones",
"torch.utils.data.DataLoader",
"torch.FloatTensor",
"torch.Tensor",
"torch.zeros",
"torch.nn.BCEWithLogitsLoss",
"src.utils.utils.get_best_threshold",
"src.utils.utils.print_progessbar",
"sklearn.metrics.roc_auc_score",
"... | [((3439, 3458), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (3456, 3458), False, 'import logging\n'), ((3509, 3628), 'torch.utils.data.DataLoader', 'torch.utils.data.DataLoader', (['dataset'], {'batch_size': 'self.batch_size', 'shuffle': '(True)', 'num_workers': 'self.n_jobs_dataloader'}), '(dataset, ba... |
########################################################################################################
# A Program to read the NIST website and output figures
########################################################################################################
import numpy as np
import matplotlib.pyplot as plt
i... | [
"numpy.size",
"numpy.zeros",
"matplotlib.pyplot.figure",
"pdb.set_trace",
"numpy.linspace",
"NIST_reader.colNIST",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel",
"NIST_reader.readNIST",
"matplotlib.pyplot.savefig"
] | [((934, 966), 'numpy.zeros', 'np.zeros', (['[NVar, NbT * NbP * 10]'], {}), '([NVar, NbT * NbP * 10])\n', (942, 966), True, 'import numpy as np\n'), ((2477, 2491), 'matplotlib.pyplot.figure', 'plt.figure', (['(33)'], {}), '(33)\n', (2487, 2491), True, 'import matplotlib.pyplot as plt\n'), ((2492, 2517), 'matplotlib.pypl... |
import matplotlib
matplotlib.use('Agg')
import re
import argparse
from datetime import datetime, timedelta, time
import matplotlib.pyplot as plt
import matplotlib.lines as mlines
import matplotlib.patches as mpatches
import numpy as np
import pandas as pd
from pandas.plotting import register_matplotlib_converters
regis... | [
"numpy.isin",
"argparse.ArgumentParser",
"numpy.argmax",
"pandas.read_csv",
"matplotlib.pyplot.figure",
"numpy.arange",
"matplotlib.patches.Patch",
"datetime.time",
"numpy.unique",
"matplotlib.lines.Line2D",
"numpy.max",
"datetime.timedelta",
"matplotlib.pyplot.subplots",
"re.sub",
"re.s... | [((18, 39), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (32, 39), False, 'import matplotlib\n'), ((315, 347), 'pandas.plotting.register_matplotlib_converters', 'register_matplotlib_converters', ([], {}), '()\n', (345, 347), False, 'from pandas.plotting import register_matplotlib_converters\n')... |
import gym
from gym import spaces
import numpy as np
from .zinc_coating.base import ZincCoatingBase as base
class ZincCoatingV0(gym.Env):
"""Simple continous zinc coating environment"""
def __init__(self, steps_per_episode=5000, coating_reward_time_offset=0, random_coating_targets=False, random_... | [
"numpy.random.randint",
"numpy.array",
"gym.spaces.Box"
] | [((712, 768), 'gym.spaces.Box', 'spaces.Box', ([], {'low': '(0)', 'high': '(1)', 'shape': '(39,)', 'dtype': 'np.float32'}), '(low=0, high=1, shape=(39,), dtype=np.float32)\n', (722, 768), False, 'from gym import spaces\n'), ((628, 641), 'numpy.array', 'np.array', (['[0]'], {}), '([0])\n', (636, 641), True, 'import nump... |
import torch
import torch.nn as nn
import torchvision
import numpy as np
from PIL import Image
import PIL
from matplotlib import pyplot as plt
def pil_to_np(img_PIL):
'''
Converts image in PIL format to np.array.
From W x H x C [0...255] to C x W x H [0..1]
'''
ar = np.array(img_PIL)
if len... | [
"matplotlib.pyplot.show",
"matplotlib.pyplot.imshow",
"numpy.clip",
"torchvision.utils.make_grid",
"numpy.array",
"PIL.Image.fromarray",
"numpy.concatenate",
"torch.from_numpy"
] | [((291, 308), 'numpy.array', 'np.array', (['img_PIL'], {}), '(img_PIL)\n', (299, 308), True, 'import numpy as np\n'), ((748, 767), 'PIL.Image.fromarray', 'Image.fromarray', (['ar'], {}), '(ar)\n', (763, 767), False, 'from PIL import Image\n'), ((1795, 1842), 'torchvision.utils.make_grid', 'torchvision.utils.make_grid',... |
"""
Accesing SFD98 maps.
Most code taken from
https://raw.githubusercontent.com/dstndstn/tractor/master/projects/desi/common.py
,
replaced the transformation with ours.
"""
import fitsio
import os
from ..utils import wcs_simplezea
from ..utils.euler import euler
import numpy as np
# to run need to
# export DUST_DI... | [
"numpy.zeros_like",
"numpy.floor",
"numpy.logical_not",
"os.path.exists",
"numpy.all",
"numpy.clip",
"datarelease.DataRelease",
"fitsio.read",
"os.environ.get",
"numpy.array",
"os.path.join",
"fitsio.read_header"
] | [((6209, 6222), 'datarelease.DataRelease', 'DataRelease', ([], {}), '()\n', (6220, 6222), False, 'from datarelease import DataRelease\n'), ((672, 691), 'numpy.array', 'np.array', (['[ra, dec]'], {}), '([ra, dec])\n', (680, 691), True, 'import numpy as np\n'), ((3408, 3433), 'fitsio.read', 'fitsio.read', (['ngp_filename... |
"""
IMPORTING LIBS
"""
import numpy as np
import os
import time
import random
import glob
import argparse, json
import pickle
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.utils.data import DataLoader
from tqdm import tqdm
class DotDict(dict):
de... | [
"data.superpixels.SuperPixDataset",
"numpy.random.seed",
"argparse.ArgumentParser",
"nets.superpixels_graph_classification.dgn_net.DGNNet",
"numpy.mean",
"torch.device",
"torch.utils.data.DataLoader",
"torch.optim.lr_scheduler.ReduceLROnPlateau",
"random.seed",
"torch.cuda.get_device_name",
"tor... | [((1175, 1193), 'nets.superpixels_graph_classification.dgn_net.DGNNet', 'DGNNet', (['net_params'], {}), '(net_params)\n', (1181, 1193), False, 'from nets.superpixels_graph_classification.dgn_net import DGNNet\n'), ((1501, 1512), 'time.time', 'time.time', ([], {}), '()\n', (1510, 1512), False, 'import time\n'), ((1669, ... |
import cv2
import numpy as np
import scipy.io
from scipy.spatial import transform
from distilled import hopenet
def get_pt2d_from_mat(mat_path):
# Get 2D landmarks
mat = scipy.io.loadmat(mat_path)
pt2d = mat['pt2d']
return pt2d
def get_ypr_from_mat(mat_path):
# Get yaw, pitch, roll from .mat a... | [
"cv2.line",
"numpy.eye",
"math.sin",
"numpy.rad2deg",
"numpy.linalg.inv",
"numpy.array",
"math.cos",
"scipy.spatial.transform.Rotation.from_matrix",
"numpy.dot",
"numpy.linalg.det",
"distilled.hopenet.angles_to_rotation_matrix"
] | [((2301, 2333), 'numpy.array', 'np.array', (['axes'], {'dtype': 'np.float32'}), '(axes, dtype=np.float32)\n', (2309, 2333), True, 'import numpy as np\n'), ((2343, 2408), 'distilled.hopenet.angles_to_rotation_matrix', 'hopenet.angles_to_rotation_matrix', (['yaw', 'pitch', 'roll'], {'degrees': '(True)'}), '(yaw, pitch, r... |
import pandas as pd
import numpy as np
import os,json,pickle
from scipy.signal import butter, lfilter
def butter_lowpass(cutoff, fs, order):
"""
Designs a lowpass Butterworth filter
cutoff: the cutoff frequency of the lowpass filter
fs: the sampling frequency used to sample the signal
order:... | [
"scipy.signal.lfilter",
"json.load",
"numpy.array",
"scipy.signal.butter"
] | [((490, 545), 'scipy.signal.butter', 'butter', (['order', 'normal_cutoff'], {'btype': '"""low"""', 'analog': '(False)'}), "(order, normal_cutoff, btype='low', analog=False)\n", (496, 545), False, 'from scipy.signal import butter, lfilter\n'), ((1337, 1351), 'numpy.array', 'np.array', (['data'], {}), '(data)\n', (1345, ... |
"""
Implements the spike and step check used in the EN quality control
system, pages 20-21 of http://www.metoffice.gov.uk/hadobs/en3/OQCpaper.pdf
The EN quality control system does not directly reject levels that are marked as
steps, it marks them as suspect and then they are subjected to an extra test (a
backgro... | [
"numpy.count_nonzero",
"numpy.abs",
"numpy.max",
"numpy.array",
"util.main.unpack_row",
"numpy.ma.zeros",
"util.main.pack_array",
"util.main.dbinteract"
] | [((1363, 1396), 'numpy.array', 'np.array', (['[0, 200, 300, 500, 600]'], {}), '([0, 200, 300, 500, 600])\n', (1371, 1396), True, 'import numpy as np\n'), ((1412, 1445), 'numpy.array', 'np.array', (['[0, 300, 400, 500, 600]'], {}), '([0, 300, 400, 500, 600])\n', (1420, 1445), True, 'import numpy as np\n'), ((1461, 1496)... |
import os
import sys
import argparse
import pickle
import numpy as np
import warnings
import pandas as pd
import functools
from keras.callbacks import TensorBoard, ModelCheckpoint, EarlyStopping, Callback
from keras import backend as K
from keras.models import load_model
from sklearn.metrics import classification_repo... | [
"numpy.load",
"os.path.abspath",
"numpy.delete",
"warnings.simplefilter",
"numpy.argmax",
"keras.callbacks.ModelCheckpoint",
"numpy.asarray",
"numpy.zeros",
"sklearn.metrics.classification_report",
"numpy.insert",
"keras.backend.set_learning_phase",
"keras.callbacks.TensorBoard",
"keras.call... | [((1208, 1234), 'numpy.zeros', 'np.zeros', (['(max_len, N_DIM)'], {}), '((max_len, N_DIM))\n', (1216, 1234), True, 'import numpy as np\n'), ((4278, 4316), 'numpy.load', 'np.load', (["(targetPath + '/embedding.npy')"], {}), "(targetPath + '/embedding.npy')\n", (4285, 4316), True, 'import numpy as np\n'), ((4398, 4421), ... |
import cv2
import numpy as np
import os
import pandas as pd
from skimage.feature import greycomatrix, greycoprops
from skimage import io, color, img_as_ubyte
# 数据划分为5个等级
def fivegrade(data):
grade = 0
if 0 < data < 0.2:
grade = 0
elif 0.2 <= data < 0.4:
grade = 1
elif 0.... | [
"pandas.DataFrame",
"cv2.GaussianBlur",
"skimage.color.rgb2gray",
"cv2.bitwise_and",
"cv2.cvtColor",
"skimage.feature.greycoprops",
"numpy.asarray",
"cv2.threshold",
"skimage.img_as_ubyte",
"skimage.feature.greycomatrix",
"cv2.imread",
"cv2.split",
"numpy.array",
"numpy.mean",
"numpy.sig... | [((633, 647), 'cv2.split', 'cv2.split', (['img'], {}), '(img)\n', (642, 647), False, 'import cv2\n'), ((1131, 1150), 'skimage.color.rgb2gray', 'color.rgb2gray', (['img'], {}), '(img)\n', (1145, 1150), False, 'from skimage import io, color, img_as_ubyte\n'), ((1164, 1182), 'skimage.img_as_ubyte', 'img_as_ubyte', (['gray... |
import numpy as np
import torch
import torch.nn as nn
from torch.autograd import Variable, grad
### Messy code for continuous translation
def interpolate_vae_3d(vae,img_1,img_2,img_3,attr_inters = 5,id_inters = 3, attr_max = 1.0, attr_dim=2,
random_test=False,return_each_layer=False, sd =1, disenta... | [
"numpy.random.seed",
"numpy.random.randn",
"torch.autograd.Variable",
"torch.FloatTensor",
"numpy.linspace",
"torch.rand",
"numpy.concatenate"
] | [((383, 427), 'numpy.linspace', 'np.linspace', (['attr_min', 'attr_max', 'attr_inters'], {}), '(attr_min, attr_max, attr_inters)\n', (394, 427), True, 'import numpy as np\n'), ((4948, 4992), 'numpy.linspace', 'np.linspace', (['attr_min', 'attr_max', 'attr_inters'], {}), '(attr_min, attr_max, attr_inters)\n', (4959, 499... |
import unittest
import numpy
import theano
from theano.tests import unittest_tools as utt
# Skip tests if cuda_ndarray is not available.
from nose.plugins.skip import SkipTest
import theano.sandbox.cuda as cuda_ndarray
if not cuda_ndarray.cuda_available:
raise SkipTest('Optional package cuda not available')
from ... | [
"theano.compile.mode.get_default_mode",
"nose.plugins.skip.SkipTest",
"theano.compile.mode.get_mode",
"theano.tests.unittest_tools.assert_allclose",
"theano.function",
"numpy.random.random",
"theano.tensor.nnet.conv.conv2d",
"theano.sandbox.cuda.fftconv.conv2d_fft",
"theano.sandbox.cuda.float32_shar... | [((267, 314), 'nose.plugins.skip.SkipTest', 'SkipTest', (['"""Optional package cuda not available"""'], {}), "('Optional package cuda not available')\n", (275, 314), False, 'from nose.plugins.skip import SkipTest\n'), ((403, 452), 'nose.plugins.skip.SkipTest', 'SkipTest', (['"""Optional package pycuda not available"""'... |
import os
os.environ['MKL_THREADING_LAYER'] = "GNU" # a temporary workaround
from enum import Enum
import numpy as np
from torch import multiprocessing as mp
from omegaconf import OmegaConf
from pyarrow import plasma
from typing import Callable, List
import atexit
import logging
from .vector_env import VectorEnv
fro... | [
"atexit.register",
"torch.multiprocessing.get_context",
"torch.set_num_threads",
"numpy.arange",
"numpy.array_split",
"pyarrow.plasma.connect",
"logging.getLogger"
] | [((365, 392), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (382, 392), False, 'import logging\n'), ((7131, 7155), 'torch.set_num_threads', 'torch.set_num_threads', (['(1)'], {}), '(1)\n', (7152, 7155), False, 'import torch\n'), ((1672, 1715), 'numpy.array_split', 'np.array_split', (['en... |
import pyclesperanto_prototype as cle
import numpy as np
def test_masked_voronoi_labeling():
gpu_input = cle.push(np.asarray([
[0, 0, 1, 1, 0, 0],
[0, 1, 8, 9, 1, 0],
[0, 1, 7, 6, 1, 0],
[0, 0, 1, 1, 1, 0],
[0, 0, 1, 1, 1, 0],
[0, 0, 1, ... | [
"numpy.array_equal",
"numpy.asarray",
"pyclesperanto_prototype.voronoi_otsu_labeling",
"pyclesperanto_prototype.pull"
] | [((667, 734), 'pyclesperanto_prototype.voronoi_otsu_labeling', 'cle.voronoi_otsu_labeling', (['gpu_input'], {'spot_sigma': '(1)', 'outline_sigma': '(1)'}), '(gpu_input, spot_sigma=1, outline_sigma=1)\n', (692, 734), True, 'import pyclesperanto_prototype as cle\n'), ((744, 764), 'pyclesperanto_prototype.pull', 'cle.pull... |
import unittest
from ctypes import ArgumentError
import os
import numpy as np
from sdl2 import *
from glaze.GL import *
BASEPATH = 'shots_results'
def getSDLError():
sderr = SDL_GetError()
try:
sderr = sderr.decode()
except Exception:
pass
return sderr
class OGL3Tester(unittest.Tes... | [
"numpy.empty",
"numpy.asarray",
"os.path.exists",
"PIL.Image.open",
"numpy.array",
"PIL.ImageOps.flip",
"os.path.join",
"PIL.Image.merge"
] | [((7115, 7145), 'numpy.array', 'np.array', (['[GL_FALSE]', 'np.int32'], {}), '([GL_FALSE], np.int32)\n', (7123, 7145), True, 'import numpy as np\n'), ((7170, 7193), 'numpy.array', 'np.array', (['[0]', 'np.int32'], {}), '([0], np.int32)\n', (7178, 7193), True, 'import numpy as np\n'), ((3916, 3986), 'numpy.array', 'np.a... |
#! -*- coding:utf-8 -*-
'''
@Author: ZM
@Date and Time: 2021/1/1 20:12
@File: train.py
'''
import math
import numpy as np
import cv2
from keras.layers import Input, Lambda
from keras import Model
from keras.optimizers import Adam
from keras import backend as K
from keras.callbacks import Callback
fro... | [
"keras.backend.concatenate",
"keras.Model",
"cv2.imwrite",
"keras.optimizers.Adam",
"numpy.expand_dims",
"generator_model.generator_model",
"numpy.around",
"mnist_dataset.get_mnist",
"keras.backend.mean",
"keras.layers.Lambda",
"numpy.random.normal",
"keras.layers.Input",
"Dataset.Dataset",
... | [((919, 930), 'mnist_dataset.get_mnist', 'get_mnist', ([], {}), '()\n', (928, 930), False, 'from mnist_dataset import get_mnist\n'), ((1033, 1059), 'numpy.expand_dims', 'np.expand_dims', (['X_train', '(3)'], {}), '(X_train, 3)\n', (1047, 1059), True, 'import numpy as np\n'), ((1074, 1090), 'Dataset.Dataset', 'Dataset',... |
# coding: utf-8
# # Code to extract out the chi2 values for many different SNR values combinations.
# Like excel sheet
#
# In[1]:
import os
import matplotlib.pyplot as plt
get_ipython().run_line_magic('matplotlib', 'inline')
import numpy as np
home = "/home/jneal/Phd/Analysis/fake_sims_with_var_teff1"
import pand... | [
"pandas.DataFrame",
"matplotlib.pyplot.title",
"matplotlib.pyplot.axhline",
"matplotlib.pyplot.show",
"numpy.median",
"sqlalchemy.select",
"os.path.join"
] | [((739, 753), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (751, 753), True, 'import pandas as pd\n'), ((2000, 2046), 'matplotlib.pyplot.axhline', 'plt.axhline', ([], {'y': '(5200)', 'color': '"""k"""', 'linestyle': '"""--"""'}), "(y=5200, color='k', linestyle='--')\n", (2011, 2046), True, 'import matplotlib.p... |
# -*- coding: utf-8 -*-
"""1D ALE plotting."""
import logging
import sys
import warnings
from operator import add, attrgetter, sub
from pathlib import Path
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
from loguru import logger as loguru_logger
from matplotlib.lines import Line2D
from em... | [
"empirical_fire_modelling.logging_config.enable_logging",
"loguru.logger.enable",
"matplotlib.pyplot.figure",
"pathlib.Path",
"numpy.arange",
"loguru.logger.remove",
"empirical_fire_modelling.cx1.run",
"empirical_fire_modelling.data.get_experiment_split_data.check_in_store",
"loguru.logger.add",
"... | [((749, 782), 'loguru.logger.enable', 'loguru_logger.enable', (['"""alepython"""'], {}), "('alepython')\n", (769, 782), True, 'from loguru import logger as loguru_logger\n'), ((783, 805), 'loguru.logger.remove', 'loguru_logger.remove', ([], {}), '()\n', (803, 805), True, 'from loguru import logger as loguru_logger\n'),... |
import numpy as np
def predict(sample):
matrix_w_input_hidden = np.array([[0.9, 0.3, 0.4], [0.2, 0.8, 0.2], [0.1, 0.5, 0.6]])
matrix_w_hidden_output = np.array([[0.3, 0.7, 0.5], [0.6, 0.5, 0.2], [0.8, 0.1, 0.9]])
# Berechnung zwischen Input Layer und Hidden Layer
# Matrix mal Vektor
z = matrix_w_i... | [
"numpy.random.rand",
"numpy.array",
"numpy.exp",
"numpy.argmax"
] | [((782, 807), 'numpy.array', 'np.array', (['[0.9, 0.1, 0.8]'], {}), '([0.9, 0.1, 0.8])\n', (790, 807), True, 'import numpy as np\n'), ((835, 855), 'numpy.random.rand', 'np.random.rand', (['(3)', '(1)'], {}), '(3, 1)\n', (849, 855), True, 'import numpy as np\n'), ((70, 131), 'numpy.array', 'np.array', (['[[0.9, 0.3, 0.4... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Distributed under the terms of the MIT License.
"""
Script to plot the chemical space of molecules.
Author: <NAME>
Date Created: 16 Feb 2020
"""
from os.path import exists
import sys
import glob
import matplotlib.pyplot as plt
import matplotlib.colors as colors
impo... | [
"matplotlib.colors.LinearSegmentedColormap.from_list",
"plotting_fn.define_standard_plot",
"json.load",
"pandas.read_csv",
"reaction.KEGG_IDs_to_ignore",
"os.path.exists",
"numpy.histogram",
"plotting_fn.twoD_histogram",
"numpy.arange",
"glob.glob",
"matplotlib.pyplot.subplots",
"sys.exit"
] | [((482, 510), 'matplotlib.pyplot.subplots', 'plt.subplots', ([], {'figsize': '(8, 5)'}), '(figsize=(8, 5))\n', (494, 510), True, 'import matplotlib.pyplot as plt\n'), ((2626, 2730), 'plotting_fn.define_standard_plot', 'pfn.define_standard_plot', (['ax'], {'xtitle': '"""intermediate diameter [$\\\\mathrm{\\\\AA}$]"""', ... |
import os
import sys
import yaml
import shutil
import numpy as np
from PIL import Image
from tqdm import tqdm
from subprocess import call
def mkdir(folder):
if os.path.exists(folder):
shutil.rmtree(folder)
os.makedirs(folder)
policy = 'single_obs_1_food'
output_video_folder = 'output_progressive... | [
"tqdm.tqdm",
"numpy.load",
"os.makedirs",
"os.path.exists",
"subprocess.call",
"shutil.rmtree",
"os.path.join",
"os.listdir"
] | [((393, 416), 'os.listdir', 'os.listdir', (['test_folder'], {}), '(test_folder)\n', (403, 416), False, 'import os\n'), ((458, 474), 'tqdm.tqdm', 'tqdm', (['test_files'], {}), '(test_files)\n', (462, 474), False, 'from tqdm import tqdm\n'), ((170, 192), 'os.path.exists', 'os.path.exists', (['folder'], {}), '(folder)\n',... |
import tensorflow as tf
from lanenet_model import hnet_model
from data_provider import hnet_data_processor
import numpy as np
import cv2
import glob
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--phase', type=str, help='The phase is train or pretrain')
parser.add_argument('--pre_hnet_weights... | [
"argparse.ArgumentParser",
"tensorflow.trainable_variables",
"tensorflow.get_collection",
"tensorflow.global_variables",
"glob.glob",
"cv2.warpPerspective",
"cv2.imwrite",
"numpy.transpose",
"tensorflow.placeholder",
"lanenet_model.hnet_model.HNet",
"tensorflow.control_dependencies",
"cv2.circ... | [((175, 200), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (198, 200), False, 'import argparse\n'), ((507, 571), 'tensorflow.placeholder', 'tf.placeholder', ([], {'dtype': 'tf.float32', 'shape': '[batch_size, 64, 128, 3]'}), '(dtype=tf.float32, shape=[batch_size, 64, 128, 3])\n', (521, 571), ... |
import numpy as np
import tensorflow as tf
def reset_random_state(seed):
np.random.seed(seed)
tf.random.set_seed(seed)
| [
"tensorflow.random.set_seed",
"numpy.random.seed"
] | [((79, 99), 'numpy.random.seed', 'np.random.seed', (['seed'], {}), '(seed)\n', (93, 99), True, 'import numpy as np\n'), ((104, 128), 'tensorflow.random.set_seed', 'tf.random.set_seed', (['seed'], {}), '(seed)\n', (122, 128), True, 'import tensorflow as tf\n')] |
# Texas A&M University
# Electronic Systems Engineering Technology
# ESET-420 Capstone II
# Author: <NAME>
# File: main.py
# --------
# Main is the heart of the program that runs the code. The code will determine
# if it connected to the internet then request data from the google Datastore
# database then run the hackr... | [
"serial.Serial",
"google.cloud.datastore.Client.from_service_account_json",
"Adafruit_BBIO.GPIO.input",
"Adafruit_BBIO.GPIO.output",
"google.cloud.storage.Client.from_service_account_json",
"i2c_lcd.I2cLcd",
"Adafruit_BBIO.GPIO.setup",
"numpy.empty",
"socket.socket",
"os.path.exists",
"customCha... | [((1319, 1349), 'i2c_lcd.I2cLcd', 'I2cLcd', (['(1)', 'LCD_I2C_ADDR', '(2)', '(16)'], {}), '(1, LCD_I2C_ADDR, 2, 16)\n', (1325, 1349), False, 'from i2c_lcd import I2cLcd\n'), ((3536, 3553), 'pylibhackrf.hackrfCtrl', 'hackrfCtrl', (['DEBUG'], {}), '(DEBUG)\n', (3546, 3553), False, 'from pylibhackrf import hackrfCtrl\n'),... |
import copy
import numpy
import time
from pauxy.estimators.mixed import local_energy
from pauxy.estimators.greens_function import gab
from pauxy.utils.linalg import diagonalise_sorted
from pauxy.systems.hubbard import decode_basis
from pauxy.utils.io import get_input_value
class UHF(object):
r"""UHF trial wavefunc... | [
"copy.deepcopy",
"numpy.zeros_like",
"numpy.abs",
"pauxy.estimators.greens_function.gab",
"numpy.zeros",
"pauxy.utils.io.get_input_value",
"time.time",
"pauxy.estimators.mixed.local_energy",
"numpy.append",
"numpy.random.random",
"numpy.array",
"numpy.diag",
"pauxy.utils.linalg.diagonalise_s... | [((1695, 1706), 'time.time', 'time.time', ([], {}), '()\n', (1704, 1706), False, 'import time\n'), ((1974, 2037), 'pauxy.utils.io.get_input_value', 'get_input_value', (['trial', '"""ninitial"""'], {'default': '(10)', 'verbose': 'verbose'}), "(trial, 'ninitial', default=10, verbose=verbose)\n", (1989, 2037), False, 'fro... |
import colorsys
import os
from pathlib import Path
import mmcv
import numpy as np
from scipy import interpolate
from mmhuman3d.core.post_processing import build_post_processing
try:
from typing import Literal
except ImportError:
from typing_extensions import Literal
def xyxy2xywh(bbox_xyxy):
"""Transfo... | [
"numpy.random.seed",
"numpy.einsum",
"mmcv.VideoReader",
"numpy.ones",
"numpy.random.set_state",
"pathlib.Path",
"numpy.arange",
"mmcv.Config.fromfile",
"colorsys.hls_to_rgb",
"scipy.interpolate.interp1d",
"os.path.join",
"mmcv.imread",
"numpy.max",
"numpy.stack",
"numpy.asarray",
"mmh... | [((2316, 2425), 'numpy.stack', 'np.stack', (['[bbox_xywh[..., 0] + bbox_xywh[..., 2] * 0.5, bbox_xywh[..., 1] + bbox_xywh\n [..., 3] * 0.5]', '(-1)'], {}), '([bbox_xywh[..., 0] + bbox_xywh[..., 2] * 0.5, bbox_xywh[..., 1] + \n bbox_xywh[..., 3] * 0.5], -1)\n', (2324, 2425), True, 'import numpy as np\n'), ((2670, ... |
"""
Weather Underground PWS Metadata Scraping Module
Code to scrape PWS network metadata
"""
import pandas as pd
import urllib3
from bs4 import BeautifulSoup as BS
import numpy as np
import requests
# import time
def scrape_station_info(state="WA"):
"""
A script to scrape the station information published ... | [
"pandas.DataFrame",
"pandas.read_csv",
"numpy.array",
"urllib3.PoolManager",
"requests.get",
"bs4.BeautifulSoup",
"numpy.vstack"
] | [((801, 836), 'bs4.BeautifulSoup', 'BS', (['raw_site_content', '"""html.parser"""'], {}), "(raw_site_content, 'html.parser')\n", (803, 836), True, 'from bs4 import BeautifulSoup as BS\n'), ((907, 982), 'numpy.array', 'np.array', (["['id', 'neighborhood', 'city', 'type', 'lat', 'lon', 'elevation']"], {}), "(['id', 'neig... |
from IPython.display import Markdown as md
import numpy as np
def fixCORs(dataset):
'''
Last column and row of XCOR and YCOR are all 0's, this function fixes that. Nice for plotting
'''
dataset.XCOR.load()
dataset.YCOR.load()
dataset.XCOR[-1,:] = dataset.XCOR.isel(MC=-2).values + data... | [
"IPython.display.Markdown",
"numpy.meshgrid"
] | [((1272, 1297), 'numpy.meshgrid', 'np.meshgrid', (['xList', 'yList'], {}), '(xList, yList)\n', (1283, 1297), True, 'import numpy as np\n'), ((2659, 2854), 'IPython.display.Markdown', 'md', (['f"""\n # Times\n | Name | Value |\n | --- | --- |\n | x gridstep | {x_gridstep} |\n | y gridstep | {y_gridstep} |... |
# Import Dependencies
import numpy as np
import sqlalchemy
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import Session
from sqlalchemy import create_engine, func
from flask import Flask, jsonify
#################################################
# Database Setup
#############################... | [
"sqlalchemy.func.avg",
"numpy.ravel",
"flask.Flask",
"sqlalchemy.orm.Session",
"flask.jsonify",
"sqlalchemy.func.min",
"sqlalchemy.create_engine",
"sqlalchemy.ext.automap.automap_base",
"sqlalchemy.func.max"
] | [((350, 400), 'sqlalchemy.create_engine', 'create_engine', (['"""sqlite:///Resources/hawaii.sqlite"""'], {}), "('sqlite:///Resources/hawaii.sqlite')\n", (363, 400), False, 'from sqlalchemy import create_engine, func\n'), ((457, 471), 'sqlalchemy.ext.automap.automap_base', 'automap_base', ([], {}), '()\n', (469, 471), F... |
#################################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"). ... | [
"deepsim.core.vector3.Vector3",
"shapely.geometry.Point",
"math.atan2",
"numpy.isclose",
"numpy.array",
"geometry_msgs.msg.Point",
"typing.TypeVar"
] | [((1463, 1481), 'typing.TypeVar', 'TypeVar', (['"""Vector3"""'], {}), "('Vector3')\n", (1470, 1481), False, 'from typing import Union, TypeVar, Iterable, Optional, Iterator\n'), ((1495, 1516), 'typing.TypeVar', 'TypeVar', (['"""Quaternion"""'], {}), "('Quaternion')\n", (1502, 1516), False, 'from typing import Union, Ty... |
import argparse
import os
import random
import numpy as np
import tensorboardX
import torch
import torchvision
from prefetch_generator import BackgroundGenerator
# from pudb import set_trace
from torch import distributed as dist
from torch.nn.parallel import DistributedDataParallel
from torch.utils.data import DataLoa... | [
"torch.optim.lr_scheduler.StepLR",
"numpy.random.seed",
"argparse.ArgumentParser",
"torch.argmax",
"torchvision.datasets.CIFAR10",
"torch.distributed.get_world_size",
"torchvision.transforms.Normalize",
"torch.nn.parallel.DistributedDataParallel",
"torch.utils.data.distributed.DistributedSampler",
... | [((1891, 2004), 'torchvision.datasets.CIFAR10', 'torchvision.datasets.CIFAR10', ([], {'root': '"""./data/cifar10"""', 'train': '(True)', 'transform': "transform['train']", 'download': '(True)'}), "(root='./data/cifar10', train=True, transform=\n transform['train'], download=True)\n", (1919, 2004), False, 'import tor... |
# This code is part of Mthree.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | [
"numpy.array",
"mthree.M3Mitigation"
] | [((664, 689), 'mthree.M3Mitigation', 'mthree.M3Mitigation', (['None'], {}), '(None)\n', (683, 689), False, 'import mthree\n'), ((877, 902), 'mthree.M3Mitigation', 'mthree.M3Mitigation', (['None'], {}), '(None)\n', (896, 902), False, 'import mthree\n'), ((1019, 1069), 'numpy.array', 'np.array', (['[[0.99, 0.08288574], [... |
# Copyright 2019-2020, University of Freiburg
# Author: <NAME> <<EMAIL>>
import sys
import logging
import os
import getopt
import matplotlib
import datrie
import string
import numpy as np
import tensorflow as tf
# Setting the seed for numpy-generated random numbers to make sure results are
# reproduceable
# np.random... | [
"matplotlib.pyplot.title",
"keras.models.load_model",
"getopt.gnu_getopt",
"keras.preprocessing.sequence.pad_sequences",
"logging.getLogger",
"collections.defaultdict",
"numpy.argsort",
"os.path.isfile",
"polyaxon_client.tracking.get_outputs_path",
"matplotlib.pyplot.close",
"tensorflow.compat.v... | [((792, 891), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(asctime)s : %(message)s"""', 'datefmt': '"""%H:%M:%S"""', 'level': 'logging.INFO'}), "(format='%(asctime)s : %(message)s', datefmt='%H:%M:%S',\n level=logging.INFO)\n", (811, 891), False, 'import logging\n'), ((917, 944), 'logging.getL... |
import pandas as pd
import numpy as np
class regout(object):
def __init__(self, **kwargs):
self.__dict__.update(kwargs)
stat_names=['coeff', 'se', 't', 'p>t', 'CI_low', 'CI_high']
var_names=['mpg', 'length', '_cons']
liml_std = regout(
summary=pd.DataFrame(np.array([
[-2883.485724395141,
5736.949... | [
"numpy.array"
] | [((278, 674), 'numpy.array', 'np.array', (['[[-2883.485724395141, 5736.949960235051, -0.5026165025634982, \n 0.6167893963364323, -14322.63904926804, 8555.667600477756], [-\n 561.1914219781756, 1262.970349885851, -0.4443425152687845, \n 0.6581464352023914, -3079.482774918735, 1957.099930962384], [\n 173041.7... |
import numpy as np
from .base_symbol_analyzer import SymbolAnalyzer
class MedianVolume(SymbolAnalyzer):
timeframes = ['1D']
lookback = 200
@classmethod
def run(cls, df):
return dict(median_volume=int(np.median(df.Volume)))
| [
"numpy.median"
] | [((228, 248), 'numpy.median', 'np.median', (['df.Volume'], {}), '(df.Volume)\n', (237, 248), True, 'import numpy as np\n')] |
from abc import ABC, abstractmethod, abstractproperty
import matplotlib.pyplot as plot
import numpy as np
from spike_swarm_sim.algorithms.interfaces import GET, SET, LEN, INIT
from spike_swarm_sim.register import neuron_model_registry
from spike_swarm_sim.utils import sigmoid, tanh, increase_time
class BaseNeur... | [
"spike_swarm_sim.utils.sigmoid",
"numpy.zeros_like",
"spike_swarm_sim.algorithms.interfaces.SET",
"numpy.tanh",
"numpy.random.randn",
"numpy.zeros",
"numpy.ones",
"numpy.clip",
"spike_swarm_sim.algorithms.interfaces.GET",
"spike_swarm_sim.utils.tanh",
"spike_swarm_sim.algorithms.interfaces.INIT"... | [((2517, 2557), 'spike_swarm_sim.register.neuron_model_registry', 'neuron_model_registry', ([], {'name': '"""rate_model"""'}), "(name='rate_model')\n", (2538, 2557), False, 'from spike_swarm_sim.register import neuron_model_registry\n'), ((5279, 5313), 'spike_swarm_sim.register.neuron_model_registry', 'neuron_model_reg... |
"""
Name: percussivenessEstimation
Date: Jun 2019
Programmer: <NAME>, <NAME>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
If you use the 'NMF toolbox' please refer to:
[1] <NAME>, <NAME>, <NAME>, and <NAME>
NMF Toolbox: Music Processing Applications of Nonn... | [
"numpy.zeros"
] | [((2284, 2295), 'numpy.zeros', 'np.zeros', (['R'], {}), '(R)\n', (2292, 2295), True, 'import numpy as np\n')] |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'mayanqiong'
import numpy as np
from pandas import DataFrame
from tqsdk.datetime import _get_trading_timestamp, _get_trade_timestamp
from tqsdk.rangeset import _rangeset_head, _rangeset_slice, _rangeset_length
"""
检查参数类型
"""
from inspect import isfunction
... | [
"numpy.isin",
"tqsdk.rangeset._rangeset_length",
"numpy.where",
"inspect.isfunction",
"tqsdk.datetime._get_trading_timestamp",
"tqsdk.rangeset._rangeset_slice",
"numpy.issubdtype"
] | [((3315, 3360), 'tqsdk.datetime._get_trading_timestamp', '_get_trading_timestamp', (['quote', 'quote.datetime'], {}), '(quote, quote.datetime)\n', (3337, 3360), False, 'from tqsdk.datetime import _get_trading_timestamp, _get_trade_timestamp\n'), ((2025, 2042), 'inspect.isfunction', 'isfunction', (['price'], {}), '(pric... |
import unittest
import numpy as np
from gym_jsbsim.agents import RandomAgent, ConstantAgent
from gym_jsbsim.tests.stubs import FlightTaskStub
class TestRandomAgent(unittest.TestCase):
def setUp(self):
self.action_space = FlightTaskStub().get_action_space()
self.agent = RandomAgent(action_space=sel... | [
"numpy.testing.assert_array_almost_equal",
"gym_jsbsim.agents.ConstantAgent",
"gym_jsbsim.tests.stubs.FlightTaskStub",
"gym_jsbsim.agents.RandomAgent"
] | [((292, 335), 'gym_jsbsim.agents.RandomAgent', 'RandomAgent', ([], {'action_space': 'self.action_space'}), '(action_space=self.action_space)\n', (303, 335), False, 'from gym_jsbsim.agents import RandomAgent, ConstantAgent\n'), ((649, 665), 'gym_jsbsim.tests.stubs.FlightTaskStub', 'FlightTaskStub', ([], {}), '()\n', (66... |
from __future__ import print_function, division
from builtins import range
# Note: you may need to update your version of future
# sudo pip install -U future
# Some utility functions we need for the class.
# For the class Data Science: Practical Deep Learning Concepts in Theano and TensorFlow
# https://deeplearningcou... | [
"numpy.argmax",
"pandas.read_csv",
"numpy.empty",
"numpy.mean",
"numpy.sin",
"numpy.exp",
"numpy.arange",
"builtins.range",
"numpy.random.randn",
"numpy.place",
"numpy.linspace",
"numpy.random.shuffle",
"matplotlib.pyplot.show",
"numpy.cos",
"numpy.vstack",
"numpy.log",
"matplotlib.p... | [((898, 921), 'numpy.vstack', 'np.vstack', (['[X1, X2, X3]'], {}), '([X1, X2, X3])\n', (907, 921), True, 'import numpy as np\n'), ((931, 983), 'numpy.array', 'np.array', (['([0] * Nclass + [1] * Nclass + [2] * Nclass)'], {}), '([0] * Nclass + [1] * Nclass + [2] * Nclass)\n', (939, 983), True, 'import numpy as np\n'), (... |
import matplotlib.pyplot as plt
import networkx as nx
import numpy as np
import seaborn as sns
def visualize_network(M, graph, num, iterations):
# to plot the nodes and edges of friendships. Only plots at last iteration, does not take average.
scores = graph.to_numpy()
for j in range(len(scores)):
... | [
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.savefig",
"numpy.std",
"matplotlib.pyplot.close",
"matplotlib.pyplot.axes",
"numpy.zeros",
"matplotlib.pyplot.setp",
"matplotlib.pyplot.errorbar",
"matplotlib.pyplot.figure",
"numpy.mean",
"numpy.arange",
"networkx.get_node_attributes",
"m... | [((2129, 2146), 'numpy.zeros', 'np.zeros', (['maxdist'], {}), '(maxdist)\n', (2137, 2146), True, 'import numpy as np\n'), ((2157, 2174), 'numpy.zeros', 'np.zeros', (['maxdist'], {}), '(maxdist)\n', (2165, 2174), True, 'import numpy as np\n'), ((2185, 2202), 'numpy.zeros', 'np.zeros', (['maxdist'], {}), '(maxdist)\n', (... |
import sys
import time
import gym
import numpy as np
from collections import defaultdict
from gym.envs.toy_text import BlackjackEnv
from plot_utils import plot_blackjack_values, plot_policy
env = gym.make('Blackjack-v0')
def generate_episode_from_limit_stochastic(bj_env):
episode = []
state = bj_env.reset... | [
"gym.make",
"numpy.zeros",
"sys.stdout.flush",
"numpy.arange",
"plot_utils.plot_blackjack_values",
"numpy.dot"
] | [((200, 224), 'gym.make', 'gym.make', (['"""Blackjack-v0"""'], {}), "('Blackjack-v0')\n", (208, 224), False, 'import gym\n'), ((2445, 2477), 'plot_utils.plot_blackjack_values', 'plot_blackjack_values', (['V_to_plot'], {}), '(V_to_plot)\n', (2466, 2477), False, 'from plot_utils import plot_blackjack_values, plot_policy\... |
import numba
import numpy as np
from ..dtypes import DTYPES
from ..meta_func import Func
from .linalg import _lapack_linalg, dot, vdot, inner, outer, matrix_rank, solve, inv, det
# Placeholder functions to be replaced by JIT-compiled function
ADD_UFUNC = lambda x, y: x + y
SUBTRACT_UFUNC = lambda x, y: x - y
MULTIPL... | [
"numpy.vectorize",
"numpy.sum",
"numpy.copy",
"numpy.isscalar",
"numpy.zeros",
"numpy.iinfo",
"numba.jit",
"numba.guvectorize",
"numpy.convolve",
"numpy.atleast_1d"
] | [((9290, 9322), 'numpy.zeros', 'np.zeros', (['(M, N)'], {'dtype': 'np.int64'}), '((M, N), dtype=np.int64)\n', (9298, 9322), True, 'import numpy as np\n'), ((9547, 9591), 'numpy.zeros', 'np.zeros', (['(a.size + b.size - 1)'], {'dtype': 'a.dtype'}), '(a.size + b.size - 1, dtype=a.dtype)\n', (9555, 9591), True, 'import nu... |
from contextlib import ExitStack, redirect_stdout
import numpy as np
from mdp import MDP, FrozenLakeEnv
import sys
sys.path.append("..")
import grading
def submit_assigment(
get_action_value,
get_new_state_value,
get_optimal_action,
value_iteration,
email,
token,
... | [
"sys.path.append",
"numpy.sum",
"numpy.std",
"grading.Grader",
"mdp.FrozenLakeEnv",
"contextlib.ExitStack",
"numpy.mean",
"contextlib.redirect_stdout",
"mdp.MDP"
] | [((116, 137), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (131, 137), False, 'import sys\n'), ((352, 392), 'grading.Grader', 'grading.Grader', (['"""EheZDOgLEeenIA4g5qPHFA"""'], {}), "('EheZDOgLEeenIA4g5qPHFA')\n", (366, 392), False, 'import grading\n'), ((403, 414), 'contextlib.ExitStack', 'E... |
#!/usr/bin/env python
# coding: utf-8
# # Workflow for a multi-regional energy system
#
# In this application of the FINE framework, a multi-regional energy system is modeled and optimized.
#
# All classes which are available to the user are utilized and examples of the selection of different parameters within these... | [
"FINE.EnergySystemModel",
"FINE.Conversion",
"FINE.Source",
"FINE.Sink",
"FINE.Transmission",
"numpy.array",
"FINE.Storage"
] | [((1170, 1512), 'FINE.EnergySystemModel', 'fn.EnergySystemModel', ([], {'locations': "{'ElectrolyzerLocation', 'IndustryLocation'}", 'commodities': "{'electricity', 'hydrogen'}", 'numberOfTimeSteps': 'numberOfTimeSteps', 'commodityUnitsDict': "{'electricity': 'kW$_{el}$', 'hydrogen': 'kW$_{H_{2},LHV}$'}", 'hoursPerTime... |
#########################################################################################################################
## Distribution code Version 1.0 -- 14/10/2021 by <NAME> Copyright 2021, University of Siegen
##
## The Code is created based on the method described in the following paper
## [1] "Deep Optim... | [
"matplotlib.pyplot.show",
"IPython.display.clear_output",
"matplotlib.pyplot.close",
"numpy.asarray",
"numpy.transpose",
"numpy.unravel_index",
"numpy.where",
"numpy.array",
"numpy.log10",
"torch.is_tensor",
"matplotlib.pyplot.subplots",
"numpy.repeat"
] | [((2262, 2373), 'matplotlib.pyplot.subplots', 'plt.subplots', ([], {'nrows': 'subfig_num_row', 'ncols': 'subfig_num_col', 'figsize': '(fig_size_horizontal, fig_size_vertical)'}), '(nrows=subfig_num_row, ncols=subfig_num_col, figsize=(\n fig_size_horizontal, fig_size_vertical))\n', (2274, 2373), True, 'import matplot... |
from flask import Flask, make_response, request, render_template
import io
import os
import csv
import pickle
import pandas as pd
from sklearn.preprocessing import LabelEncoder
import numpy as np
app = Flask(__name__)
model = pickle.load(open(r'model.pkl', 'rb'))
# Base Route
@app.route('/')
def hello():
return r... | [
"flask.request.files.get",
"pandas.read_csv",
"flask.Flask",
"sklearn.preprocessing.LabelEncoder",
"numpy.mean",
"flask.request.form.to_dict",
"flask.render_template"
] | [((203, 218), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (208, 218), False, 'from flask import Flask, make_response, request, render_template\n'), ((319, 350), 'flask.render_template', 'render_template', (['"""bigmart.html"""'], {}), "('bigmart.html')\n", (334, 350), False, 'from flask import Flask, ma... |
#!/usr/bin/env python
# Software License Agreement (MIT License)
#
# Copyright (c) 2020, tri_star
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction... | [
"os.path.abspath",
"json.load",
"os.makedirs",
"os.path.basename",
"os.path.isdir",
"tri_star.transformation_util.AngleGroup.from_json",
"re.findall",
"numpy.array",
"re.search",
"glob.glob",
"shutil.move",
"os.path.join",
"json.JSONEncoder.default"
] | [((2450, 2495), 'os.path.join', 'os.path.join', (['base_data_dir', 'archive_dir_name'], {}), '(base_data_dir, archive_dir_name)\n', (2462, 2495), False, 'import os\n'), ((6513, 6528), 'numpy.array', 'np.array', (['value'], {}), '(value)\n', (6521, 6528), True, 'import numpy as np\n'), ((6817, 6832), 'numpy.array', 'np.... |
#!/usr/local/bin/python2.7
from sys import exit
from os import environ
environ['KERAS_BACKEND'] = 'tensorflow'
import numpy as np
import utils
import obj
obj.DEBUG = True
def make_coll(fpath):
coll = obj.PFSVCollection()
coll.weight = 'ptweight'
coll.add_categories(['singletons', 'inclusive'], fpath)... | [
"utils.Plotter",
"numpy.arange",
"obj.PFSVCollection"
] | [((659, 682), 'numpy.arange', 'np.arange', (['(0)', '(1.1)', '(0.05)'], {}), '(0, 1.1, 0.05)\n', (668, 682), True, 'import numpy as np\n'), ((694, 722), 'numpy.arange', 'np.arange', (['(200.0)', '(2000.0)', '(40)'], {}), '(200.0, 2000.0, 40)\n', (703, 722), True, 'import numpy as np\n'), ((733, 756), 'numpy.arange', 'n... |
from collections import Counter, OrderedDict
from sklearn.naive_bayes import GaussianNB, MultinomialNB, ComplementNB
from sklearn.ensemble import RandomForestClassifier, GradientBoostingClassifier
from sklearn.model_selection import RepeatedStratifiedKFold
from sklearn import svm
from sklearn.neural_network import MLPC... | [
"sklearn.metrics.confusion_matrix",
"pickle.dump",
"ipclassifier.dataprep.RawFileProcessor",
"random.shuffle",
"os.path.dirname",
"sklearn.metrics.accuracy_score",
"sklearn.metrics.classification_report",
"pickle.load",
"numpy.array",
"sklearn.naive_bayes.ComplementNB",
"collections.OrderedDict"... | [((1255, 1281), 'ipclassifier.dataprep.RawFileProcessor', 'RawFileProcessor', (['filename'], {}), '(filename)\n', (1271, 1281), False, 'from ipclassifier.dataprep import RawFileProcessor\n'), ((3771, 3809), 'random.shuffle', 'shuffle', (['flattened_all_period_features'], {}), '(flattened_all_period_features)\n', (3778,... |
#
# This script uses the data from spin echo experiments to determine
# the half life etime of the magnetisation of the samples spins
#
#
# STEP 1 : READ DATA FROM FILES
#
# IMPORT MODULES
# Handling files and paths
from pathlib import Path
from matplotlib import pyplot as plt
# CODE
#
# Get the working di... | [
"matplotlib.pyplot.title",
"matplotlib.pyplot.show",
"numpy.log",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.scatter",
"matplotlib.pyplot.legend",
"scipy.optimize.curve_fit",
"pathlib.Path",
"numpy.exp",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel"
] | [((1974, 1996), 'matplotlib.pyplot.legend', 'plt.legend', ([], {'fontsize': '(8)'}), '(fontsize=8)\n', (1984, 1996), True, 'from matplotlib import pyplot as plt\n'), ((2020, 2054), 'matplotlib.pyplot.title', 'plt.title', (['"""Loss of Magnetisation"""'], {}), "('Loss of Magnetisation')\n", (2029, 2054), True, 'from mat... |
# -*- coding: utf-8 -*-
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
import numpy as np
from ...ext.six import string_types
from .shader_object import ShaderObject
VARIABLE_TYPES = ('const', 'uniform', 'attribute', 'varying', 'in... | [
"numpy.isscalar"
] | [((3956, 3974), 'numpy.isscalar', 'np.isscalar', (['value'], {}), '(value)\n', (3967, 3974), True, 'import numpy as np\n')] |
import os
from matplotlib import pyplot as plt
import torch
import torch.nn.functional as F
import random
from collections import Counter
from collections.abc import Iterable # import directly from collections for Python < 3.3
import numpy as np
from typing import Union
import networkx as nx
# List operation
def de... | [
"matplotlib.pyplot.title",
"torch.ones",
"torch.stack",
"torch.sparse_coo_tensor",
"matplotlib.pyplot.hist",
"matplotlib.pyplot.clf",
"torch.norm",
"numpy.tril",
"os.makedirs",
"os.path.exists",
"random.choice",
"random.seed",
"matplotlib.pyplot.gca",
"torch.zeros",
"collections.Counter"... | [((3097, 3124), 'torch.zeros', 'torch.zeros', (['n'], {'dtype': 'dtype'}), '(n, dtype=dtype)\n', (3108, 3124), False, 'import torch\n'), ((3340, 3377), 'torch.norm', 'torch.norm', (['vec'], {'dim': '(-1)', 'keepdim': '(True)'}), '(vec, dim=-1, keepdim=True)\n', (3350, 3377), False, 'import torch\n'), ((3916, 3953), 'to... |
# coding=utf-8
# Copyright (C) 2020 NumS Development Team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | [
"nums.core.array.utils.broadcast_shape_to_alt",
"nums.core.array.utils.can_broadcast_shapes",
"nums.core.array.utils.can_broadcast_shape_to",
"nums.core.array.utils.broadcast_shape",
"pytest.raises",
"numpy.product",
"numpy.array",
"itertools.product",
"tests.conftest.get_app",
"numpy.broadcast_to... | [((4113, 4139), 'tests.conftest.get_app', 'conftest.get_app', (['"""serial"""'], {}), "('serial')\n", (4129, 4139), False, 'from tests import conftest\n'), ((1973, 2015), 'itertools.product', 'itertools.product', (['[0, 1, 2, 3]'], {'repeat': '(10)'}), '([0, 1, 2, 3], repeat=10)\n', (1990, 2015), False, 'import itertoo... |
import os
import time
import argparse
import numpy as np
import cv2
from datetime import datetime
import nnabla as nn
import nnabla.functions as F
import nnabla.parametric_functions as PF
import nnabla.solvers as S
import nnabla.logger as logger
import nnabla.utils.save as save
from nnabla.monitor import Monitor, Moni... | [
"nnabla.save_parameters",
"numpy.random.seed",
"argparse.ArgumentParser",
"nnabla.ext_utils.get_extension_context",
"os.path.join",
"nnabla.monitor.MonitorSeries",
"model.l1_loss",
"nnabla.solvers.Adam",
"auxiliary.convert_depth2colormap",
"model.depth_cnn_model",
"nnabla.get_parameters",
"dat... | [((532, 540), 'numpy.random.seed', 'seed', (['(46)'], {}), '(46)\n', (536, 540), False, 'from numpy.random import seed\n'), ((626, 692), 'nnabla.ext_utils.get_extension_context', 'get_extension_context', (['"""cudnn"""'], {'device_id': '"""0"""', 'type_config': '"""float"""'}), "('cudnn', device_id='0', type_config='fl... |
import os
import numpy as np
import pandas as pd
import shapely.wkt
import pyproj
import pytest
from gisutils.projection import project, get_authority_crs
from gisutils.shapefile import (df2shp, shp2df, shp_properties, get_shapefile_crs,
rename_fields_to_10_characters)
def test_shp_properties... | [
"pandas.DataFrame",
"gisutils.shapefile.shp_properties",
"gisutils.shapefile.get_shapefile_crs",
"gisutils.projection.project",
"pytest.fixture",
"numpy.all",
"numpy.ones",
"gisutils.shapefile.rename_fields_to_10_characters",
"pyproj.crs.CRS.from_epsg",
"gisutils.projection.get_authority_crs",
"... | [((2332, 2362), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (2346, 2362), False, 'import pytest\n'), ((2713, 2743), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (2727, 2743), False, 'import pytest\n'), ((4232, 4284), 'pytest.ma... |
"""Metrics for the computation of a Lens summary"""
from __future__ import division
import logging
import time
from functools import wraps
from tdigest import TDigest
import numpy as np
from scipy import stats
from scipy import signal
import pandas as pd
from .utils import hierarchical_ordering_indices
DENSITY_N =... | [
"numpy.nanpercentile",
"numpy.sum",
"numpy.abs",
"numpy.logspace",
"numpy.isnan",
"numpy.histogram",
"scipy.signal.fftconvolve",
"numpy.histogram2d",
"scipy.stats.norm.cdf",
"scipy.stats.distributions.ksone.sf",
"numpy.linspace",
"tdigest.TDigest",
"numpy.log10",
"numpy.trapz",
"numpy.av... | [((389, 416), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (406, 416), False, 'import logging\n'), ((435, 458), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (456, 458), False, 'import logging\n'), ((714, 725), 'functools.wraps', 'wraps', (['func'], {}), '(func)\n'... |
import numpy as np
from scipy import sparse
from ._igl_ext import exact_geodesic
from ..vector import veclen, normalized, sq_veclen
from .laplacian import compute_mesh_laplacian
from .gradient import gradient_op
from .div import div_op
try:
from sksparse.cholmod import cholesky
factorized = lambda A: cholesk... | [
"numpy.errstate",
"numpy.nan_to_num",
"sksparse.cholmod.cholesky"
] | [((313, 343), 'sksparse.cholmod.cholesky', 'cholesky', (['A'], {'mode': '"""simplicial"""'}), "(A, mode='simplicial')\n", (321, 343), False, 'from sksparse.cholmod import cholesky\n'), ((3681, 3706), 'numpy.errstate', 'np.errstate', ([], {'all': '"""ignore"""'}), "(all='ignore')\n", (3692, 3706), True, 'import numpy as... |
#!/usr/bin/env python3
# https://stackoverflow.com/questions/48213884/transparent-error-bars-without-affecting-markers
# https://matplotlib.org/stable/gallery/text_labels_and_annotations/text_alignment.html
import os, pickle, argparse, yaml
import numpy as np, matplotlib.pyplot as plt, matplotlib as mpl
import util_bwo... | [
"yaml.load",
"util_bwopt_plotter.get_shortenvid",
"argparse.ArgumentParser",
"os.path.join",
"os.makedirs",
"matplotlib.pyplot.close",
"os.path.dirname",
"numpy.isfinite",
"collections.defaultdict",
"pickle.load",
"numpy.array",
"matplotlib.pyplot.subplots"
] | [((417, 441), 'os.path.dirname', 'os.path.dirname', (['arg.cfg'], {}), '(arg.cfg)\n', (432, 441), False, 'import os, pickle, argparse, yaml\n'), ((6219, 6298), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'formatter_class': 'argparse.ArgumentDefaultsHelpFormatter'}), '(formatter_class=argparse.ArgumentDe... |
'''
CBOR reader and writing functionality used by the `Artifact` class.
Exported definitions:
PersistentArray (`numpy.memmap` subclass): A `memmap` backed by a CBOR file.
PersistentList (`list` subclass): A `list` backed by a CBOR file.
read_cbor_file (function): Read a CBOR file.
write_object_as_cbor ... | [
"fcntl.lockf",
"cbor2.loads",
"numpy.dtype",
"numpy.asanyarray",
"numpy.require",
"numpy.memmap",
"numpy.ascontiguousarray",
"numpy.prod"
] | [((1337, 1351), 'numpy.dtype', 'np.dtype', (['"""u1"""'], {}), "('u1')\n", (1345, 1351), True, 'import numpy as np\n'), ((1361, 1376), 'numpy.dtype', 'np.dtype', (['""">u2"""'], {}), "('>u2')\n", (1369, 1376), True, 'import numpy as np\n'), ((1386, 1401), 'numpy.dtype', 'np.dtype', (['""">u4"""'], {}), "('>u4')\n", (13... |
#!/usr/env python
# Imports
import numpy as np
from scipy.special import erf
from scipy.optimize import curve_fit, least_squares
from astropy.io import fits
from scipy import ndimage
from scipy.interpolate import interp1d
from scipy.special import wofz
from . import utils
def trace(im,yestimate=None,yorder=2,sigorde... | [
"numpy.sum",
"numpy.maximum",
"numpy.argmax",
"numpy.polyfit",
"numpy.mean",
"numpy.arange",
"numpy.exp",
"numpy.diag",
"numpy.round",
"numpy.max",
"numpy.repeat",
"numpy.minimum",
"numpy.median",
"scipy.optimize.curve_fit",
"numpy.hstack",
"numpy.percentile",
"numpy.min",
"numpy.p... | [((639, 674), 'scipy.ndimage.uniform_filter1d', 'ndimage.uniform_filter1d', (['im', '(50)', '(1)'], {}), '(im, 50, 1)\n', (663, 674), False, 'from scipy import ndimage\n'), ((1097, 1146), 'numpy.polyfit', 'np.polyfit', (["tcat['x']", "tcat['pars'][:, 1]", 'yorder'], {}), "(tcat['x'], tcat['pars'][:, 1], yorder)\n", (11... |
# -*- coding: utf-8 -*-
"""
data
~~~~
Utility functions and classes.
"""
import numpy as np
import pandas as pd
import xspline
import ipopt
from typing import Tuple
import process
class TempData:
"""Temperature data class"""
def __init__(
self,
mean_temp,
daily... | [
"numpy.dstack",
"xspline.XSpline",
"numpy.random.randn",
"numpy.ones",
"numpy.argmin",
"numpy.insert",
"numpy.argsort",
"numpy.hstack",
"numpy.arange",
"numpy.random.multivariate_normal",
"numpy.linspace",
"numpy.array",
"process.extract_at_mean_temp",
"numpy.sqrt",
"numpy.unique",
"nu... | [((9713, 9774), 'numpy.arange', 'np.arange', (['scaled_dt_range[0]', 'scaled_dt_range[1]', 'scaled_ddt'], {}), '(scaled_dt_range[0], scaled_dt_range[1], scaled_ddt)\n', (9722, 9774), True, 'import numpy as np\n'), ((10502, 10536), 'numpy.arange', 'np.arange', (['dt_lb', '(dt_ub + ddt)', 'ddt'], {}), '(dt_lb, dt_ub + dd... |
"""
Tokenizer
---------
Classes with a .text_to_token_list method (and a bit more). Used by other
modules as a means to convert stings to lists of strings.
If you have a function that converts strings to lists of strings, you can
make a tokenizer from it by using MakeTokenizer(my_tokenizing_func).
SparseFormatter
--... | [
"pandas.DataFrame",
"random.randint",
"numpy.log2",
"collections.defaultdict",
"re.findall",
"random.seed",
"numpy.exp",
"hashlib.sha224",
"re.search"
] | [((5219, 5259), 're.findall', 're.findall', (['"""(\\\\S+):(\\\\S*)"""', 'feature_str'], {}), "('(\\\\S+):(\\\\S*)', feature_str)\n", (5229, 5259), False, 'import re\n'), ((16768, 16786), 'collections.defaultdict', 'defaultdict', (['float'], {}), '(float)\n', (16779, 16786), False, 'from collections import Counter, def... |
import numpy as np
from skimage.io import imsave
def softmax(x):
"""Compute softmax values for each sets of scores in x."""
e_x = np.exp(x - np.expand_dims(np.max(x, axis=-1), axis=-1))
return e_x / np.expand_dims(e_x.sum(axis=-1), axis=-1) # only difference
def save_samples(np_imgs, img_path):
"""
... | [
"numpy.sum",
"numpy.floor",
"numpy.zeros",
"numpy.max",
"numpy.arange",
"skimage.io.imsave"
] | [((486, 533), 'numpy.zeros', 'np.zeros', (['(num * H, num * W, 3)'], {'dtype': 'np.uint8'}), '((num * H, num * W, 3), dtype=np.uint8)\n', (494, 533), True, 'import numpy as np\n'), ((658, 685), 'skimage.io.imsave', 'imsave', (['img_path', 'merge_img'], {}), '(img_path, merge_img)\n', (664, 685), False, 'from skimage.io... |
#! /usr/bin/env python
# =======
# Imports
# =======
import sys
import os
from os.path import join
import getopt
import re
import numpy
import pickle
import platform
import subprocess
import multiprocessing
from datetime import datetime
from imate import traceinv, logdet
# ===============
# parse arguments
# ======... | [
"platform.processor",
"pickle.dump",
"getopt.getopt",
"numpy.zeros",
"datetime.datetime.now",
"pickle.load",
"re.sub",
"platform.system",
"subprocess.getoutput",
"os.path.join",
"sys.exit",
"multiprocessing.cpu_count"
] | [((3480, 3530), 'numpy.zeros', 'numpy.zeros', (["(config['num_repeats'],)"], {'dtype': 'float'}), "((config['num_repeats'],), dtype=float)\n", (3491, 3530), False, 'import numpy\n'), ((3555, 3605), 'numpy.zeros', 'numpy.zeros', (["(config['num_repeats'],)"], {'dtype': 'float'}), "((config['num_repeats'],), dtype=float)... |
# -*- coding: utf-8 -*-
# pylint: disable=missing-docstring, redefined-outer-name
"""Tests for estimators working with multiplicities and related routines"""
from collections import Counter
import numpy
import pytest
from make_test_ref import SEED, approx
from ndd import fnsb
from ndd.counters import MultiCounter
fro... | [
"ndd.fnsb.nsb_from_multiplicities",
"ndd.estimators.Grassberger",
"numpy.random.seed",
"ndd.fnsb.ww",
"ndd.fnsb.nsb",
"make_test_ref.approx",
"numpy.random.randint",
"ndd.counters.MultiCounter",
"ndd.estimators.Plugin",
"ndd.fnsb.ww_from_multiplicities",
"collections.Counter",
"ndd.estimators.... | [((442, 465), 'numpy.random.seed', 'numpy.random.seed', (['SEED'], {}), '(SEED)\n', (459, 465), False, 'import numpy\n'), ((477, 508), 'numpy.random.randint', 'numpy.random.randint', (['K'], {'size': 'N'}), '(K, size=N)\n', (497, 508), False, 'import numpy\n'), ((546, 569), 'numpy.random.seed', 'numpy.random.seed', (['... |
from __future__ import absolute_import, division, print_function
import warnings
from collections import defaultdict
from distutils.version import LooseVersion
from threading import Lock
from timeit import default_timer
import numpy as np
from dask.base import normalize_token
from scipy import sparse
from scipy.stats... | [
"numpy.average",
"distutils.version.LooseVersion",
"timeit.default_timer",
"numpy.ix_",
"scipy.sparse.issparse",
"numpy.zeros",
"scipy.stats.rankdata",
"numpy.empty",
"numpy.hstack",
"threading.Lock",
"numpy.ma.getmaskarray",
"sklearn.utils.validation.check_consistent_length",
"numpy.array",... | [((7839, 7845), 'threading.Lock', 'Lock', ([], {}), '()\n', (7843, 7845), False, 'from threading import Lock\n'), ((775, 803), 'distutils.version.LooseVersion', 'LooseVersion', (['np.__version__'], {}), '(np.__version__)\n', (787, 803), False, 'from distutils.version import LooseVersion\n'), ((2127, 2309), 'warnings.wa... |
# BSD 3-Clause License
#
# Copyright (c) 2021, <NAME>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list o... | [
"Bezier.Bezier.Curve",
"time.time",
"numpy.shape",
"pydirectinput.position",
"numpy.linalg.norm",
"numpy.arange",
"numpy.array",
"pydirectinput.mouseUp",
"pydirectinput.mouseDown"
] | [((1959, 1970), 'time.time', 'time.time', ([], {}), '()\n', (1968, 1970), False, 'import time\n'), ((2358, 2436), 'numpy.linalg.norm', 'np.linalg.norm', (['(end_point[0] - start_point[0], end_point[1] - start_point[1])'], {}), '((end_point[0] - start_point[0], end_point[1] - start_point[1]))\n', (2372, 2436), True, 'im... |
import os
import sys
from PIL import Image
import glob
import numpy as np
import h5py
import csv
import time
import zipfile
import matplotlib.pyplot as plt
from sklearn.preprocessing import LabelEncoder
try:
from urllib.request import urlretrieve
except ImportError:
from urllib import urlretrieve
def reporth... | [
"sys.stdout.write",
"numpy.dstack",
"h5py.File",
"os.getcwd",
"os.walk",
"time.time",
"PIL.Image.open",
"sys.stdout.flush",
"numpy.array",
"urllib.urlretrieve",
"numpy.string_"
] | [((896, 1024), 'sys.stdout.write', 'sys.stdout.write', (["('\\r...%d%%, %d MB, %d KB/s, %d seconds passed' % (percent, progress_size /\n (1024 * 1024), speed, duration))"], {}), "('\\r...%d%%, %d MB, %d KB/s, %d seconds passed' % (percent,\n progress_size / (1024 * 1024), speed, duration))\n", (912, 1024), False,... |
import json
from pathlib import Path
import warnings
import numpy as np
import tensorflow as tf
from tensorflow.keras import layers, models
from tensorflow.keras import backend as K
from algorithms.agent_interface import SpiceAIAgent
from algorithms.vpg.memory import Memory
from exception import InvalidDataShapeExcep... | [
"tensorflow.keras.backend.sum",
"numpy.zeros_like",
"warnings.simplefilter",
"tensorflow.keras.layers.Dense",
"numpy.std",
"numpy.expand_dims",
"tensorflow.keras.backend.clip",
"json.dumps",
"tensorflow.keras.models.Model",
"tensorflow.keras.backend.log",
"numpy.mean",
"tensorflow.keras.optimi... | [((953, 992), 'tensorflow.keras.layers.Input', 'layers.Input', (['state_shape'], {'name': '"""state"""'}), "(state_shape, name='state')\n", (965, 992), False, 'from tensorflow.keras import layers, models\n'), ((1005, 1037), 'tensorflow.keras.layers.Input', 'layers.Input', (['(1,)'], {'name': '"""gamma"""'}), "((1,), na... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.