code stringlengths 31 1.05M | apis list | extract_api stringlengths 97 1.91M |
|---|---|---|
"""
Modified code from https://github.com/nwojke/deep_sort
"""
from __future__ import absolute_import
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
from . import linear_assignment
from .track import Track
class Tracker:
"""
This is the multi-target tracker.
Param... | [
"numpy.asarray",
"torch.no_grad",
"numpy.array"
] | [((7857, 7873), 'numpy.array', 'np.array', (['l_time'], {}), '(l_time)\n', (7865, 7873), True, 'import numpy as np\n'), ((7899, 7919), 'numpy.array', 'np.array', (['t_features'], {}), '(t_features)\n', (7907, 7919), True, 'import numpy as np\n'), ((3830, 3850), 'numpy.asarray', 'np.asarray', (['features'], {}), '(featu... |
import numpy as np
from collections import Sequence
from .__about__ import *
class RingBuffer(Sequence):
def __init__(self, capacity, dtype=float, allow_overwrite=True):
"""
Create a new ring buffer with the given capacity and element type
Parameters
----------
capacity: int
The maximum capacity of the... | [
"numpy.empty",
"numpy.asarray"
] | [((594, 619), 'numpy.empty', 'np.empty', (['capacity', 'dtype'], {}), '(capacity, dtype)\n', (602, 619), True, 'import numpy as np\n'), ((4695, 4711), 'numpy.asarray', 'np.asarray', (['item'], {}), '(item)\n', (4705, 4711), True, 'import numpy as np\n'), ((5263, 5279), 'numpy.asarray', 'np.asarray', (['self'], {}), '(s... |
"""
====================================================
Chebyshev Series (:mod:`numpy.polynomial.chebyshev`)
====================================================
This module provides a number of objects (mostly functions) useful for
dealing with Chebyshev series, including a `Chebyshev` class that
encapsulates the us... | [
"numpy.linalg.eigvals",
"numpy.moveaxis",
"numpy.empty",
"numpy.asarray",
"numpy.zeros",
"numpy.core.multiarray.normalize_axis_index",
"numpy.ndim",
"numpy.ones",
"numpy.iterable",
"numpy.array",
"numpy.arange",
"numpy.cos",
"numpy.linspace",
"numpy.dot",
"numpy.convolve",
"numpy.all",... | [((11189, 11206), 'numpy.array', 'np.array', (['[-1, 1]'], {}), '([-1, 1])\n', (11197, 11206), True, 'import numpy as np\n'), ((11263, 11276), 'numpy.array', 'np.array', (['[0]'], {}), '([0])\n', (11271, 11276), True, 'import numpy as np\n'), ((11331, 11344), 'numpy.array', 'np.array', (['[1]'], {}), '([1])\n', (11339,... |
import functools
import operator
import os
import os.path
import sys
import numpy as np
# Bamboo utilities
current_file = os.path.realpath(__file__)
current_dir = os.path.dirname(current_file)
sys.path.insert(0, os.path.join(os.path.dirname(current_dir), 'common_python'))
import tools
# ==============================... | [
"tools.str_list",
"tools.create_python_data_reader",
"numpy.random.seed",
"os.path.realpath",
"os.path.dirname",
"tools.create_tests",
"numpy.finfo",
"numpy.mean",
"numpy.random.normal",
"numpy.cov",
"tools.numpy_l2norm2"
] | [((123, 149), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (139, 149), False, 'import os\n'), ((164, 193), 'os.path.dirname', 'os.path.dirname', (['current_file'], {}), '(current_file)\n', (179, 193), False, 'import os\n'), ((536, 562), 'numpy.random.seed', 'np.random.seed', (['(201910241... |
from safety_multiagent_mujoco.mujoco_multi import MujocoMulti
import numpy as np
import time
def main():
# Swimmer
# env_args = {"scenario": "manyagent_swimmer",
# "agent_conf": "10x2",
# "agent_obsk": 1,
# "episode_limit": 1000}
# coupled_half_cheetah
... | [
"numpy.nonzero",
"numpy.random.uniform",
"safety_multiagent_mujoco.mujoco_multi.MujocoMulti"
] | [((1953, 1983), 'safety_multiagent_mujoco.mujoco_multi.MujocoMulti', 'MujocoMulti', ([], {'env_args': 'env_args'}), '(env_args=env_args)\n', (1964, 1983), False, 'from safety_multiagent_mujoco.mujoco_multi import MujocoMulti\n'), ((2552, 2590), 'numpy.random.uniform', 'np.random.uniform', (['(-10)', '(0.0)', 'n_actions... |
# Copyright 2016 the GPflow authors.
#
# 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 law or agreed to in writi... | [
"numpy.random.seed",
"tensorflow.reset_default_graph",
"numpy.allclose",
"numpy.ones",
"GPflow.transforms.DiagMatrix",
"numpy.arange",
"GPflow.transforms.Log1pe",
"GPflow.priors.Prior",
"unittest.main",
"GPflow.priors.Gamma",
"GPflow.gpr.GPR",
"numpy.random.randn",
"numpy.random.RandomState"... | [((25049, 25064), 'unittest.main', 'unittest.main', ([], {}), '()\n', (25062, 25064), False, 'import unittest\n'), ((1010, 1031), 'GPflow.param.Param', 'GPflow.param.Param', (['(1)'], {}), '(1)\n', (1028, 1031), False, 'import GPflow\n'), ((1121, 1142), 'GPflow.param.Param', 'GPflow.param.Param', (['(1)'], {}), '(1)\n'... |
# -*- coding: utf-8 -*-
"""
普量学院量化投资课程系列案例源码包
普量学院版权所有
仅用于教学目的,严禁转发和用于盈利目的,违者必究
©Plouto-Quants All Rights Reserved
普量学院助教微信:niuxiaomi3
"""
from pymongo import ASCENDING, DESCENDING
from database import DB_CONN
from datetime import datetime, timedelta
import tushare as ts
import numpy as np
import pandas as pd
def... | [
"pandas.DataFrame",
"tushare.trade_cal",
"datetime.datetime.now",
"datetime.timedelta",
"pandas.Series",
"numpy.round",
"database.DB_CONN.basic.find"
] | [((844, 855), 'pandas.Series', 'pd.Series', ([], {}), '()\n', (853, 855), True, 'import pandas as pd\n'), ((1348, 1380), 'numpy.round', 'np.round', (['(annual_profit * 100)', '(2)'], {}), '(annual_profit * 100, 2)\n', (1356, 1380), True, 'import numpy as np\n'), ((2147, 2188), 'pandas.DataFrame', 'pd.DataFrame', ([], {... |
"""
============================
Typing (:mod:`numpy.typing`)
============================
.. warning::
Some of the types in this module rely on features only present in
the standard library in Python 3.8 and greater. If you want to use
these types in earlier versions of Python, you should install the
typing-... | [
"numpy._pytesttester.PytestTester"
] | [((7111, 7133), 'numpy._pytesttester.PytestTester', 'PytestTester', (['__name__'], {}), '(__name__)\n', (7123, 7133), False, 'from numpy._pytesttester import PytestTester\n')] |
import os
import re
import numpy as np
import csv
import cv2
from PIL import Image
import matplotlib.pyplot as plt
from time import strftime
import pytesseract
import tensorflow as tf
def load_interpreter(model_path=None):
"""
This function loads a tflite model interpreter
"""
if model_... | [
"matplotlib.pyplot.title",
"time.strftime",
"matplotlib.pyplot.figure",
"tensorflow.keras.preprocessing.image.array_to_img",
"os.path.exists",
"cv2.boundingRect",
"re.sub",
"numpy.uint8",
"matplotlib.pyplot.show",
"csv.writer",
"numpy.asarray",
"tensorflow.lite.Interpreter",
"os.makedirs",
... | [((410, 452), 'tensorflow.lite.Interpreter', 'tf.lite.Interpreter', ([], {'model_path': 'model_path'}), '(model_path=model_path)\n', (429, 452), True, 'import tensorflow as tf\n'), ((1395, 1418), 'time.strftime', 'strftime', (['"""%Y%m%d-%H%M"""'], {}), "('%Y%m%d-%H%M')\n", (1403, 1418), False, 'from time import strfti... |
import time
from multiprocessing.dummy import Pool as ThreadPool
import pandas as pd
from bs4 import BeautifulSoup
import numpy as np
import requests
import queue
table = queue.Queue()
failed_url = queue.Queue()
PROXY_POOL_URL = 'http://localhost:5555/random'
headers = {
'User-Agent': 'Mozilla/5.0 (Windo... | [
"pandas.read_csv",
"multiprocessing.dummy.Pool",
"time.sleep",
"time.time",
"numpy.array",
"requests.get",
"bs4.BeautifulSoup",
"queue.Queue"
] | [((174, 187), 'queue.Queue', 'queue.Queue', ([], {}), '()\n', (185, 187), False, 'import queue\n'), ((201, 214), 'queue.Queue', 'queue.Queue', ([], {}), '()\n', (212, 214), False, 'import queue\n'), ((1566, 1594), 'pandas.read_csv', 'pd.read_csv', (['"""failed136.csv"""'], {}), "('failed136.csv')\n", (1577, 1594), True... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import time
class Identity:
def __init__(self, eps=0.0001, name=""):
self.name = name + "preprocessing(identity)"
def fit(self, x, *args, **kwargs):
return self
def fit_transform(self, x, *args, **kwargs):
return x... | [
"time.time",
"numpy.linalg.svd",
"numpy.reshape",
"numpy.dot",
"numpy.sqrt"
] | [((2051, 2092), 'numpy.linalg.svd', 'np.linalg.svd', (['flatx'], {'full_matrices': '(False)'}), '(flatx, full_matrices=False)\n', (2064, 2092), True, 'import numpy as np\n'), ((673, 684), 'time.time', 'time.time', ([], {}), '()\n', (682, 684), False, 'import time\n'), ((1469, 1480), 'time.time', 'time.time', ([], {}), ... |
"""
Mask grid points based on different criteria.
"""
import numpy as np
from .base import n_1d_arrays
try:
from pykdtree.kdtree import KDTree
except ImportError:
from scipy.spatial import cKDTree as KDTree # pylint: disable=no-name-in-module
def distance_mask(
data_coordinates, maxdist, coordinates=No... | [
"numpy.meshgrid"
] | [((3958, 4013), 'numpy.meshgrid', 'np.meshgrid', (['grid.coords[dims[1]]', 'grid.coords[dims[0]]'], {}), '(grid.coords[dims[1]], grid.coords[dims[0]])\n', (3969, 4013), True, 'import numpy as np\n')] |
from baumgarte2d import RigidBody, Simulator
from sympy import symbols, latex
import numpy as np
import matplotlib.pyplot as plt
from typing import List
from copy import deepcopy
import os
IMAGE_FILE_PATH: str = "./examples/temp"
def do_simulation(omega: float, save_image: bool):
# 記号・値の定義
t = symbols("t")
... | [
"sympy.symbols",
"matplotlib.pyplot.subplot",
"baumgarte2d.RigidBody",
"matplotlib.pyplot.show",
"os.mkdir",
"baumgarte2d.Simulator",
"matplotlib.pyplot.plot",
"numpy.degrees",
"matplotlib.pyplot.legend",
"os.path.exists",
"matplotlib.pyplot.figure",
"numpy.sin",
"numpy.array",
"numpy.lins... | [((306, 318), 'sympy.symbols', 'symbols', (['"""t"""'], {}), "('t')\n", (313, 318), False, 'from sympy import symbols, latex\n'), ((778, 789), 'baumgarte2d.Simulator', 'Simulator', ([], {}), '()\n', (787, 789), False, 'from baumgarte2d import RigidBody, Simulator\n'), ((854, 881), 'numpy.array', 'np.array', (['[0, val_... |
import numpy as np
from algos.agent import randombot
from algos.encoders.trojangoPlane import TrojanGoPlane
from algos import gohelper
from algos import godomain
from algos.utils import display_board, alphaNumnericMove_from_point
import time
import math
import h5py
import multiprocessing
from multiprocessing import po... | [
"h5py.File",
"algos.godomain.GameState.new_game",
"numpy.zeros",
"math.floor",
"time.time",
"numpy.array",
"algos.encoders.trojangoPlane.TrojanGoPlane",
"algos.agent.randombot.RandomBot"
] | [((1767, 1779), 'numpy.zeros', 'np.zeros', (['(26)'], {}), '(26)\n', (1775, 1779), True, 'import numpy as np\n'), ((2348, 2399), 'algos.encoders.trojangoPlane.TrojanGoPlane', 'TrojanGoPlane', (['(board_size, board_size)', 'num_planes'], {}), '((board_size, board_size), num_planes)\n', (2361, 2399), False, 'from algos.e... |
import logging
from typing import List, Set
import numpy as np
from tqdm import tqdm
from src.common.audioviz_dataset import AudiovizDataset
from src.common.audioviz_datastore import AbstractAudiovizDataStore
from src.common.fun_call import FunCall
class FuncallStore:
"""
Represents a collection of features... | [
"tqdm.tqdm",
"logging.debug",
"logging.info",
"numpy.ndarray",
"numpy.concatenate"
] | [((2313, 2377), 'numpy.concatenate', 'np.concatenate', (['[self[fe][sl] for fe in self.__funcalls]'], {'axis': '(1)'}), '([self[fe][sl] for fe in self.__funcalls], axis=1)\n', (2327, 2377), True, 'import numpy as np\n'), ((2445, 2523), 'logging.info', 'logging.info', (['f"""Calculating funcall {funcall.name} with chunk... |
import itertools
import warnings
import numpy as np
from .base import imgfeature, ndfeature
@ndfeature
def gradient(pixels):
r"""
Calculates the gradient of an input image. The image is assumed to have
channel information on the first axis. In the case of multiple channels,
it returns the gradient o... | [
"numpy.abs",
"numpy.median",
"numpy.empty",
"numpy.angle",
"scipy.ndimage.gaussian_filter",
"numpy.std",
"numpy.var",
"menpo.external.skimage._daisy._daisy",
"numpy.any",
"numpy.gradient",
"numpy.sin",
"numpy.linalg.norm",
"numpy.array",
"numpy.cos",
"numpy.mean",
"warnings.warn",
"i... | [((2217, 2257), 'numpy.concatenate', 'np.concatenate', (['grad_per_channel'], {'axis': '(0)'}), '(grad_per_channel, axis=0)\n', (2231, 2257), True, 'import numpy as np\n'), ((3271, 3313), 'numpy.empty', 'np.empty', (['pixels.shape'], {'dtype': 'pixels.dtype'}), '(pixels.shape, dtype=pixels.dtype)\n', (3279, 3313), True... |
# Lint as: python3
# Copyright 2019 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | [
"iree.tf.support.tf_utils.uniform",
"iree.tf.support.tf_test_utils.compile_tf_module",
"tensorflow.compat.v2.test.main",
"tensorflow.compat.v2.enable_v2_behavior",
"tensorflow.compat.v2.TensorSpec",
"absl.app.run",
"numpy.array",
"tensorflow.compat.v2.matmul"
] | [((2135, 2149), 'tensorflow.compat.v2.test.main', 'tf.test.main', ([], {}), '()\n', (2147, 2149), True, 'import tensorflow.compat.v2 as tf\n'), ((2181, 2194), 'absl.app.run', 'app.run', (['main'], {}), '(main)\n', (2188, 2194), False, 'from absl import app\n'), ((1180, 1195), 'tensorflow.compat.v2.matmul', 'tf.matmul',... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 5 11:28:36 2020
@author: routhier
"""
import numpy as np
import sys
import six
try:
import h5py
HDF5_OBJECT_HEADER_LIMIT = 64512
except ImportError:
h5py = None
if sys.version_info[0] == 3:
import pickle
else:
import cPickle... | [
"h5py.File",
"cPickle.loads",
"numpy.asarray",
"cPickle.dumps",
"numpy.array_split"
] | [((1116, 1142), 'h5py.File', 'h5py.File', (['path'], {'mode': 'mode'}), '(path, mode=mode)\n', (1125, 1142), False, 'import h5py\n'), ((2328, 2345), 'cPickle.dumps', 'pickle.dumps', (['val'], {}), '(val)\n', (2340, 2345), True, 'import cPickle as pickle\n'), ((3926, 3941), 'numpy.asarray', 'np.asarray', (['val'], {}), ... |
import os
import os.path as osp
import mmcv
import numpy as np
from PIL import Image
def norm_angle(angle, range=[-np.pi / 4, np.pi]):
return (angle - range[0]) % range[1] + range[0]
def poly_to_rotated_box_single(poly):
"""
poly:[x0,y0,x1,y1,x2,y2,x3,y3]
to
rotated_box:[x_ctr,y_ctr,w,h,angle]
... | [
"os.path.getsize",
"os.path.exists",
"numpy.float",
"numpy.array",
"mmcv.dump",
"os.path.splitext",
"os.path.join",
"os.listdir",
"numpy.sqrt"
] | [((339, 375), 'numpy.array', 'np.array', (['poly[:8]'], {'dtype': 'np.float32'}), '(poly[:8], dtype=np.float32)\n', (347, 375), True, 'import numpy as np\n'), ((506, 596), 'numpy.sqrt', 'np.sqrt', (['((pt1[0] - pt2[0]) * (pt1[0] - pt2[0]) + (pt1[1] - pt2[1]) * (pt1[1] - pt2[1]))'], {}), '((pt1[0] - pt2[0]) * (pt1[0] - ... |
# IMPORTS
# ------------------------------------------------------------------------------
import os
import sys
# DataScience
import numpy as np
import pandas as pd
from sklearn.preprocessing import StandardScaler
# Custom Packages
nb_dir = os.path.split(os.getcwd())[0]
if nb_dir not in sys.path:
sys.path.append(n... | [
"pandas.DataFrame",
"sys.path.append",
"dataset_manager.dataset_manager.DatasetManager",
"sklearn.preprocessing.StandardScaler",
"numpy.log",
"os.getcwd",
"numpy.where",
"numpy.linspace",
"neural_network_lab.ann_classification.ModelNeuralNetwork",
"neural_network_lab.model_preset.logger.Logger"
] | [((996, 1031), 'neural_network_lab.ann_classification.ModelNeuralNetwork', 'ModelNeuralNetwork', ([], {'data_manager': 'dm'}), '(data_manager=dm)\n', (1014, 1031), False, 'from neural_network_lab.ann_classification import ModelNeuralNetwork\n'), ((1839, 1877), 'numpy.log', 'np.log', (["dm.df['past_price_regression']"],... |
'''
Author: Dr. <NAME> <<EMAIL>>
This package is distributed under New BSD license.
'''
from __future__ import division
import warnings
import numpy as np
from smt.surrogate_models.krg_based import KrgBased
from smt.utils.kriging_utils import componentwise_distance_PLS, ge_compute_pls
"""
The KPLS class.
"""
class ... | [
"smt.utils.kriging_utils.componentwise_distance_PLS",
"numpy.vstack"
] | [((1604, 1710), 'smt.utils.kriging_utils.componentwise_distance_PLS', 'componentwise_distance_PLS', (['dx', "self.options['corr'].__name__", "self.options['n_comp']", 'self.coeff_pls'], {}), "(dx, self.options['corr'].__name__, self.options[\n 'n_comp'], self.coeff_pls)\n", (1630, 1710), False, 'from smt.utils.krigi... |
"""
Misc tools for implementing data structures
Note: pandas.core.common is *not* part of the public API.
"""
import collections
from collections import abc
from datetime import datetime, timedelta
from functools import partial
import inspect
from typing import Any, Collection, Iterable, Union
import numpy as np
fr... | [
"pandas.core.dtypes.common.is_array_like",
"functools.partial",
"pandas.core.dtypes.inference._iterable_not_string",
"pandas._libs.lib.is_bool_array",
"pandas._libs.lib.is_float",
"pandas._libs.tslibs.Timedelta",
"pandas.core.dtypes.common.is_extension_array_dtype",
"inspect.isclass",
"numpy.asarray... | [((5495, 5526), 'numpy.asarray', 'np.asarray', (['values'], {'dtype': 'dtype'}), '(values, dtype=dtype)\n', (5505, 5526), True, 'import numpy as np\n'), ((10265, 10282), 'pandas.core.dtypes.common.is_integer', 'is_integer', (['state'], {}), '(state)\n', (10275, 10282), False, 'from pandas.core.dtypes.common import is_a... |
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# 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 app... | [
"paddle.fluid.io.save_inference_model",
"paddle.enable_static",
"paddle.fluid.layers.data",
"paddle.fluid.layers.embedding",
"paddle.fluid.framework.default_startup_program",
"paddle.fluid.executor.Executor",
"paddle.dataset.movielens.get_movie_title_dict",
"paddle.fluid.layers.fc",
"paddle.fluid.la... | [((952, 974), 'paddle.enable_static', 'paddle.enable_static', ([], {}), '()\n', (972, 974), False, 'import paddle\n'), ((1257, 1310), 'paddle.fluid.layers.data', 'layers.data', ([], {'name': '"""user_id"""', 'shape': '[1]', 'dtype': '"""int64"""'}), "(name='user_id', shape=[1], dtype='int64')\n", (1268, 1310), True, 'i... |
# the code logic is the same as mask_bn.py
# keep as a seperate file to distinguish between PatchGuard and PatchGuard++
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import torch.backends.cudnn as cudnn
from torchvision import datasets, transforms
import nets.bagnet
im... | [
"torch.utils.data.Subset",
"tqdm.tqdm",
"numpy.sum",
"argparse.ArgumentParser",
"torch.utils.data.DataLoader",
"math.ceil",
"torchvision.transforms.Normalize",
"torchvision.transforms.ToTensor",
"torchvision.datasets.ImageFolder",
"torchvision.datasets.CIFAR10",
"numpy.mean",
"torchvision.tran... | [((532, 557), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (555, 557), False, 'import argparse\n'), ((1625, 1658), 'os.path.join', 'os.path.join', (['"""."""', 'args.model_dir'], {}), "('.', args.model_dir)\n", (1637, 1658), False, 'import os\n'), ((1667, 1708), 'os.path.join', 'os.path.join'... |
# ============================================================================
# Copyright 2021 The AIMM team at Shenzhen Bay Laboratory & Peking University
#
# People: <NAME>, <NAME>, <NAME>, <NAME>, <NAME>,
# <NAME>, <NAME>, <NAME>, <NAME>, <NAME>
#
# This code is a part of Cybertron-Code package.
#
# The Cyb... | [
"mindspore.ops.functional.select",
"mindspore.ops.functional.expand_dims",
"mindspore.Tensor",
"mindspore.ops.operations.ScalarSummary",
"numpy.sin",
"numpy.arange",
"mindspore.ops.operations.Fill",
"mindspore.ops.operations.Concat",
"numpy.pad",
"mindspore.ops.operations.ReduceSum",
"mindspore.... | [((5609, 5618), 'mindspore.ops.operations.Zeros', 'P.Zeros', ([], {}), '()\n', (5616, 5618), True, 'from mindspore.ops import operations as P\n'), ((5639, 5647), 'mindspore.ops.operations.Ones', 'P.Ones', ([], {}), '()\n', (5645, 5647), True, 'from mindspore.ops import operations as P\n'), ((20335, 20370), 'mindspore.T... |
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import six
from six import with_metaclass
from six.moves import range
import os
import numpy as np
import collections
import itertools
import functools
import contextlib
from threading import Lock
from .frame i... | [
"itertools.repeat",
"numpy.cumprod",
"six.moves.range",
"numpy.all",
"threading.Lock",
"numpy.array",
"functools.wraps",
"numpy.rollaxis",
"itertools.tee",
"warnings.warn",
"numpy.prod",
"six.with_metaclass"
] | [((465, 496), 'six.with_metaclass', 'with_metaclass', (['ABCMeta', 'object'], {}), '(ABCMeta, object)\n', (479, 496), False, 'from six import with_metaclass\n'), ((19188, 19199), 'functools.wraps', 'wraps', (['func'], {}), '(func)\n', (19193, 19199), False, 'from functools import wraps\n'), ((12477, 12483), 'threading.... |
# -*- coding: utf-8 -*-
"""Utility functions for reading and writing tables
"""
import os
import copy
import numpy as np
import sqlite3
from sqlalchemy import create_engine
from astropy.io import fits
import pandas as pd
__all__ = ['to_csv', 'export_db']
def to_csv(truth_db_path, dest_dir='.', table_suffix=''):
... | [
"copy.deepcopy",
"os.remove",
"os.path.abspath",
"numpy.sum",
"astropy.io.fits.PrimaryHDU",
"os.path.exists",
"numpy.isfinite",
"numpy.max",
"sqlite3.connect",
"pandas.read_sql_query",
"os.path.join",
"numpy.concatenate"
] | [((526, 556), 'sqlite3.connect', 'sqlite3.connect', (['truth_db_path'], {}), '(truth_db_path)\n', (541, 556), False, 'import sqlite3\n'), ((1245, 1277), 'os.path.join', 'os.path.join', (['out_dir', 'out_fname'], {}), '(out_dir, out_fname)\n', (1257, 1277), False, 'import os\n'), ((1683, 1749), 'numpy.concatenate', 'np.... |
#!/usr/bin/env python
import time
import InstrumentDriver
import numpy as np
import sys
from pathlib import Path
sys.path.append(str((Path(__file__).parents[1]/'QuantumCTek'/'lib').resolve()))
import device_interface
import write_configuration as CONST
dev = device_interface.DeviceInterface()
class Driver(Instrum... | [
"json.load",
"numpy.clip",
"time.sleep",
"numpy.any",
"device_interface.DeviceInterface",
"pathlib.Path",
"numpy.round"
] | [((264, 298), 'device_interface.DeviceInterface', 'device_interface.DeviceInterface', ([], {}), '()\n', (296, 298), False, 'import device_interface\n'), ((641, 653), 'json.load', 'json.load', (['f'], {}), '(f)\n', (650, 653), False, 'import json\n'), ((2222, 2248), 'numpy.round', 'np.round', (['(32767 * waveform)'], {}... |
import ftplib
import glob
import subprocess as sp
import csv
import numpy as np
import netCDF4 as nc4
import pygrib as pg
import matplotlib.pyplot as plt
plt.switch_backend('agg')
import datetime
import scipy
import os
import sys
from mpl_toolkits.basemap import Basemap
from matplotlib.patches import Polygon
from matp... | [
"matplotlib.pyplot.switch_backend",
"numpy.load",
"csv.reader",
"matplotlib.pyplot.close",
"matplotlib.pyplot.box",
"matplotlib.pyplot.colorbar",
"matplotlib.patches.Polygon",
"matplotlib.pyplot.figure",
"numpy.mean",
"numpy.array",
"matplotlib.pyplot.gca",
"mpl_toolkits.basemap.Basemap",
"m... | [((154, 179), 'matplotlib.pyplot.switch_backend', 'plt.switch_backend', (['"""agg"""'], {}), "('agg')\n", (172, 179), True, 'import matplotlib.pyplot as plt\n'), ((1008, 1035), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(16, 9)'}), '(figsize=(16, 9))\n', (1018, 1035), True, 'import matplotlib.pyplot as... |
'''
A custom Keras layer to perform L2-normalization.
Copyright (C) 2018 <NAME>
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 ap... | [
"keras.backend.l2_normalize",
"numpy.ones",
"keras.backend.image_data_format",
"keras.engine.topology.InputSpec"
] | [((2173, 2201), 'keras.backend.l2_normalize', 'K.l2_normalize', (['x', 'self.axis'], {}), '(x, self.axis)\n', (2187, 2201), True, 'import keras.backend as K\n'), ((1582, 1603), 'keras.backend.image_data_format', 'K.image_data_format', ([], {}), '()\n', (1601, 1603), True, 'import keras.backend as K\n'), ((1845, 1873), ... |
from unittest import TestCase, TestLoader, TextTestRunner
import numpy as np
from bdpy.feature import normalize_feature
class TestUtilFeature(TestCase):
def test_normalize_feature_1d(self):
feat = np.random.rand(4096)
feat_mean0 = np.random.rand(1, 1)
feat_std0 = np.random.rand(1, 1)
... | [
"unittest.TextTestRunner",
"numpy.std",
"numpy.testing.assert_array_equal",
"bdpy.feature.normalize_feature",
"numpy.mean",
"unittest.TestLoader",
"numpy.random.rand"
] | [((214, 234), 'numpy.random.rand', 'np.random.rand', (['(4096)'], {}), '(4096)\n', (228, 234), True, 'import numpy as np\n'), ((256, 276), 'numpy.random.rand', 'np.random.rand', (['(1)', '(1)'], {}), '(1, 1)\n', (270, 276), True, 'import numpy as np\n'), ((297, 317), 'numpy.random.rand', 'np.random.rand', (['(1)', '(1)... |
import numpy as np
from random import choice, random
import time
# start timer
start_time = time.time()
# set initial parameters' values
population_size = 50
dimension_size = 3
donors_number = 1
receivers_number = 1
maximum_evaluations = 2500
bound = 200
# other dependent parameters, no need to change
current_evalua... | [
"numpy.random.uniform",
"numpy.zeros",
"numpy.ones",
"time.time",
"numpy.argsort",
"random.random",
"numpy.random.randint",
"numpy.where",
"numpy.loadtxt",
"numpy.log10",
"numpy.sqrt"
] | [((93, 104), 'time.time', 'time.time', ([], {}), '()\n', (102, 104), False, 'import time\n'), ((855, 876), 'numpy.loadtxt', 'np.loadtxt', (['user_data'], {}), '(user_data)\n', (865, 876), True, 'import numpy as np\n'), ((9417, 9428), 'time.time', 'time.time', ([], {}), '()\n', (9426, 9428), False, 'import time\n'), ((1... |
# -*- coding: utf-8 -*-
'''
StarGAN_v2_paddle.core.model
@author: RyanHuang
@github: DrRyanHuang
@updateTime: 2020.8.15
@notice: GPL v3
'''
import math
import copy
import numpy as np
from munch import Munch
import paddle
import paddle.fluid as fluid
from paddle.fluid.dygraph import to_variable, Conv2D, InstanceNor... | [
"paddle.fluid.layers.split",
"paddle.fluid.dygraph.LayerList",
"numpy.arange",
"paddle.fluid.layers.pool2d",
"paddle.fluid.layers.concat",
"paddle.fluid.layers.image_resize",
"paddle.fluid.dygraph.Linear",
"paddle.fluid.initializer.NumpyArrayInitializer",
"paddle.fluid.layers.reshape",
"math.sqrt"... | [((5502, 5527), 'paddle.fluid.layers.concat', 'fluid.layers.concat', (['temp'], {}), '(temp)\n', (5521, 5527), True, 'import paddle.fluid as fluid\n'), ((12356, 12478), 'munch.Munch', 'Munch', ([], {'generator': 'generator', 'mapping_network': 'mapping_network', 'style_encoder': 'style_encoder', 'discriminator': 'discr... |
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from typing import Optional, Union
import numpy as np
from scipy import stats
from ..common.typetools import ArrayLike
fr... | [
"numpy.zeros",
"numpy.log",
"numpy.sqrt"
] | [((2628, 2652), 'numpy.zeros', 'np.zeros', (['self.dimension'], {}), '(self.dimension)\n', (2636, 2652), True, 'import numpy as np\n'), ((8502, 8526), 'numpy.zeros', 'np.zeros', (['self.dimension'], {}), '(self.dimension)\n', (8510, 8526), True, 'import numpy as np\n'), ((3084, 3107), 'numpy.sqrt', 'np.sqrt', (['self.d... |
"""
auralib module containing objects and functions to read data from an auralib
project structure.
Author: <NAME>
Created: 25-Mar-2016
Last Mod: 17-Aug-2016
"""
import os
import numpy as np
def create(projpath):
"""
Function to create a new empty project directory structure with the
... | [
"os.mkdir",
"os.path.join",
"numpy.arange"
] | [((419, 437), 'os.mkdir', 'os.mkdir', (['projpath'], {}), '(projpath)\n', (427, 437), False, 'import os\n'), ((1123, 1162), 'os.path.join', 'os.path.join', (['projpath', '"""well_list.csv"""'], {}), "(projpath, 'well_list.csv')\n", (1135, 1162), False, 'import os\n'), ((1377, 1398), 'numpy.arange', 'np.arange', (['z0',... |
import numpy as np
import nnfs
from nnfs.datasets import spiral_data
nnfs.init()
# Dense layer
class Layer_Dense:
# Layer initialization
def __init__(self, n_inputs, n_neurons,
weight_regularizer_l1=0, weight_regularizer_l2=0,
bias_regularizer_l1=0, bias_regularizer_l2=0):
... | [
"numpy.sum",
"numpy.maximum",
"numpy.abs",
"numpy.argmax",
"numpy.diagflat",
"numpy.clip",
"numpy.mean",
"numpy.zeros_like",
"numpy.random.randn",
"numpy.empty_like",
"numpy.max",
"numpy.ones_like",
"numpy.random.binomial",
"numpy.dot",
"numpy.log",
"nnfs.init",
"nnfs.datasets.spiral... | [((70, 81), 'nnfs.init', 'nnfs.init', ([], {}), '()\n', (79, 81), False, 'import nnfs\n'), ((17482, 17518), 'nnfs.datasets.spiral_data', 'spiral_data', ([], {'samples': '(1000)', 'classes': '(3)'}), '(samples=1000, classes=3)\n', (17493, 17518), False, 'from nnfs.datasets import spiral_data\n'), ((20247, 20282), 'nnfs.... |
#!/usr/bin/env python
# encoding: utf-8
# Subdirectory
# LIDAR-DTM-2M-SJ46
# Filenames like:
# sj4060_DTM_2m.asc,
# sj4{0-9}{60-69}_DTM_2m.asc
#ncols 500
#nrows 500
#xllcorner 340000
#yllcorner 360000
#cellsize 2
#NODATA_value -9999
from collections import OrderedDict
import json
import sys... | [
"json.dump",
"matplotlib.pyplot.gray",
"json.load",
"zipfile.ZipFile",
"matplotlib.pyplot.show",
"os.getcwd",
"matplotlib.pyplot.margins",
"os.path.exists",
"numpy.zeros",
"matplotlib.pyplot.axis",
"collections.OrderedDict",
"os.path.join",
"bng_to_latlon.OSGB36toWGS84"
] | [((484, 637), 'collections.OrderedDict', 'OrderedDict', (["[('name', None), ('nrows', None), ('ncols', None), ('xllcorner', None), (\n 'yllcorner', None), ('cellsize', None), ('NODATA_value', None)]"], {}), "([('name', None), ('nrows', None), ('ncols', None), ('xllcorner',\n None), ('yllcorner', None), ('cellsize... |
import numpy as np
import random
import matplotlib.pyplot as plt
def random_obstacle(x, y, max_size):
obstacle_size = random.randint(5,max_size)
obstacle_occupancy = [(x,y)]
for i in range(obstacle_size):
x += random.choice([1, 0, -1])
y += random.choice([1, 0, -1])
obstacle_occupa... | [
"random.choice",
"random.randint",
"numpy.sqrt"
] | [((124, 151), 'random.randint', 'random.randint', (['(5)', 'max_size'], {}), '(5, max_size)\n', (138, 151), False, 'import random\n'), ((232, 257), 'random.choice', 'random.choice', (['[1, 0, -1]'], {}), '([1, 0, -1])\n', (245, 257), False, 'import random\n'), ((271, 296), 'random.choice', 'random.choice', (['[1, 0, -1... |
"""Test Gaussian MLP Policy."""
import pickle
import numpy as np
import pytest
import torch
from torch import nn
from garage.envs import GarageEnv
from garage.torch.policies import GaussianMLPPolicy
from tests.fixtures.envs.dummy import DummyBoxEnv
class TestGaussianMLPPolicies:
"""Class for Testing Gaussian M... | [
"pickle.loads",
"torch.ones",
"torch.from_numpy",
"numpy.ones",
"torch.full",
"torch.Tensor",
"garage.torch.policies.GaussianMLPPolicy",
"numpy.array_equal",
"pytest.mark.parametrize",
"tests.fixtures.envs.dummy.DummyBoxEnv",
"pickle.dumps"
] | [((359, 434), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""hidden_sizes"""', '[(1,), (2,), (3,), (1, 4), (3, 5)]'], {}), "('hidden_sizes', [(1,), (2,), (3,), (1, 4), (3, 5)])\n", (382, 434), False, 'import pytest\n'), ((1647, 1722), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""hidden_sizes... |
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license
"""
General utils
"""
import contextlib
import glob
import logging
import math
import os
import platform
import random
import re
import shutil
import signal
import time
import urllib
from itertools import repeat
from multiprocessing.pool import ThreadPool
from pathlib import... | [
"urllib.parse.unquote",
"platform.python_version",
"numpy.random.seed",
"pathlib.Path.home",
"yaml.safe_dump",
"pkg_resources.parse_requirements",
"pandas.read_csv",
"pkg_resources.require",
"numpy.ones",
"torch.cat",
"torch.mm",
"pathlib.Path",
"yaml.safe_load",
"glob.glob",
"torch.devi... | [((611, 677), 'torch.set_printoptions', 'torch.set_printoptions', ([], {'linewidth': '(320)', 'precision': '(5)', 'profile': '"""long"""'}), "(linewidth=320, precision=5, profile='long')\n", (633, 677), False, 'import torch\n'), ((678, 757), 'numpy.set_printoptions', 'np.set_printoptions', ([], {'linewidth': '(320)', '... |
from math import exp
from .dataframe import DataFrame
import numpy as np
import matplotlib.pyplot as plt
from pandas import Series
from .chart import Chart
import seaborn as sns
class CSM:
def __init__(self):
self.crop_type = 'Wheat'
self.season_length = 242
self.climate_dataframe = se... | [
"math.exp",
"matplotlib.pyplot.show",
"numpy.zeros",
"numpy.argwhere",
"matplotlib.pyplot.subplots"
] | [((1474, 1505), 'numpy.zeros', 'np.zeros', (['(self.season_length,)'], {}), '((self.season_length,))\n', (1482, 1505), True, 'import numpy as np\n'), ((1519, 1550), 'numpy.zeros', 'np.zeros', (['(self.season_length,)'], {}), '((self.season_length,))\n', (1527, 1550), True, 'import numpy as np\n'), ((1564, 1595), 'numpy... |
from __future__ import absolute_import, division, print_function
import sys
import base64
import uuid
if sys.version_info >= (3, 0):
unicode = str
from io import StringIO, BytesIO
else:
from StringIO import StringIO
BytesIO = StringIO
import umsgpack
import numpy as np
from . import transformations... | [
"numpy.asarray",
"numpy.hstack",
"uuid.uuid1",
"numpy.array",
"base64.b64encode"
] | [((12821, 12859), 'numpy.asarray', 'np.asarray', (['vertices'], {'dtype': 'np.float32'}), '(vertices, dtype=np.float32)\n', (12831, 12859), True, 'import numpy as np\n'), ((12876, 12910), 'numpy.asarray', 'np.asarray', (['faces'], {'dtype': 'np.uint32'}), '(faces, dtype=np.uint32)\n', (12886, 12910), True, 'import nump... |
"""
Script plots relationship between vertical warming in modeled data sets
Notes
-----
Author : <NAME>
Date : 21 February 2020
"""
### Import modules
import datetime
import numpy as np
import matplotlib.pyplot as plt
import cmocean
import calc_Utilities as UT
import scipy.stats as sts
import read_CTLNQ as ... | [
"matplotlib.pyplot.yscale",
"numpy.empty",
"numpy.isnan",
"numpy.shape",
"matplotlib.pyplot.figure",
"numpy.arange",
"matplotlib.pyplot.contourf",
"matplotlib.pyplot.gca",
"calc_Utilities.calcDecJanFeb",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.hlines",
"numpy.nanmean",
"numpy.me... | [((555, 578), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (576, 578), False, 'import datetime\n'), ((8053, 8080), 'matplotlib.pyplot.rc', 'plt.rc', (['"""text"""'], {'usetex': '(True)'}), "('text', usetex=True)\n", (8059, 8080), True, 'import matplotlib.pyplot as plt\n'), ((8080, 8153), 'matplot... |
# coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# 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 applicab... | [
"polish.utils.tf_layers.fc",
"tensorflow.compat.v1.equal",
"tensorflow.compat.v1.reduce_mean",
"tensorflow.compat.v1.init_from_checkpoint",
"absl.logging.info",
"tensorflow.compat.v1.estimator.export.PredictOutput",
"polish.utils.distributions.MultiVariateNormalDiag",
"absl.logging.set_verbosity",
"... | [((1112, 1147), 'absl.logging.set_verbosity', 'logging.set_verbosity', (['logging.INFO'], {}), '(logging.INFO)\n', (1133, 1147), False, 'from absl import logging\n'), ((7245, 7272), 'tensorflow.compat.v1.layers.flatten', 'tf.layers.flatten', (['features'], {}), '(features)\n', (7262, 7272), True, 'import tensorflow.com... |
# coding=utf-8
# Copyright (c) 2021-present, Data-driven Intelligent System Research Center (DIRECT), National Institute of Information and Communications Technology (NICT). (Modifications for BERTAC)
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPOR... | [
"numpy.random.seed",
"argparse.ArgumentParser",
"ptvsd.enable_attach",
"train_utils.load_cnn_model",
"torch.cuda.device_count",
"torch.device",
"transformers.glue_processors.keys",
"os.path.join",
"torch.load",
"os.path.exists",
"random.seed",
"torch.cuda.set_device",
"torch.manual_seed",
... | [((3077, 3104), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (3094, 3104), False, 'import logging\n'), ((4617, 4639), 'cnn_utils.get_fields', 'cnn_utils.get_fields', ([], {}), '()\n', (4637, 4639), False, 'import cnn_utils\n'), ((4859, 4909), 'train_utils.load_cnn_model', 'train_utils.l... |
from pathlib import Path
import numpy as np
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from elastic import ES
app = FastAPI()
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
es = ES(... | [
"numpy.load",
"elastic.ES",
"pathlib.Path",
"numpy.random.choice",
"fastapi.FastAPI"
] | [((155, 164), 'fastapi.FastAPI', 'FastAPI', ([], {}), '()\n', (162, 164), False, 'from fastapi import FastAPI\n'), ((317, 321), 'elastic.ES', 'ES', ([], {}), '()\n', (319, 321), False, 'from elastic import ES\n'), ((328, 337), 'fastapi.FastAPI', 'FastAPI', ([], {}), '()\n', (335, 337), False, 'from fastapi import FastA... |
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import matplotlib.pyplot as plt
import numpy as np
import math
import random
import os
import gym
# Hyper Parameters
STATE_DIM = 4
ACTION_DIM = 2
STEP = 2000
SAMPLE_NUMS = 30
class ActorNetwork(nn.Module):
def... | [
"torch.nn.MSELoss",
"numpy.zeros_like",
"gym.make",
"torch.exp",
"torch.Tensor",
"torch.nn.Linear",
"torch.sum"
] | [((2252, 2268), 'numpy.zeros_like', 'np.zeros_like', (['r'], {}), '(r)\n', (2265, 2268), True, 'import numpy as np\n'), ((2517, 2540), 'gym.make', 'gym.make', (['"""CartPole-v0"""'], {}), "('CartPole-v0')\n", (2525, 2540), False, 'import gym\n'), ((439, 473), 'torch.nn.Linear', 'nn.Linear', (['input_size', 'hidden_size... |
# Copyright 2021 Huawei Technologies Co., Ltd
#
# 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 law or agreed to... | [
"mindspore.context.set_context",
"argparse.ArgumentParser",
"src.dataset.testdataset.create_testdataset",
"mindspore.ops.ReduceSum",
"numpy.clip",
"mindspore.common.set_seed",
"skimage.color.rgb2ycbcr",
"numpy.mean",
"mindspore.train.serialization.load_checkpoint",
"skimage.metrics.peak_signal_noi... | [((1088, 1099), 'mindspore.common.set_seed', 'set_seed', (['(1)'], {}), '(1)\n', (1096, 1099), False, 'from mindspore.common import set_seed\n'), ((1109, 1158), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""SRGAN eval"""'}), "(description='SRGAN eval')\n", (1132, 1158), False, 'import a... |
import numpy as np
import dolfin
import os
class Domain():
"""
GENERAL DOMAIN HANDLING
* This class reads the mesh file, optionally convert it to xml
format (cannot be paralellized) to xml format.
* Important geometric properties for the periodic boundary
condit... | [
"dolfin.Cell",
"dolfin.MeshValueCollection",
"dolfin.MeshFunction",
"numpy.zeros",
"dolfin.XDMFFile",
"dolfin.Mesh",
"numpy.array",
"os.path.splitext"
] | [((573, 599), 'os.path.splitext', 'os.path.splitext', (['filename'], {}), '(filename)\n', (589, 599), False, 'import os\n'), ((1759, 1785), 'os.path.splitext', 'os.path.splitext', (['filename'], {}), '(filename)\n', (1775, 1785), False, 'import os\n'), ((2025, 2056), 'dolfin.Mesh', 'dolfin.Mesh', (["(self.name + '.xml'... |
from __future__ import print_function
import numpy as np
import tensorflow as tf
import six
from timeit import default_timer as timer
class LSTM_Var_Autoencoder(object):
def __init__(self, intermediate_dim=None, z_dim=None, n_dim=None, kulback_coef=0.1,
stateful=False):
"""
... | [
"tensorflow.contrib.layers.xavier_initializer",
"tensorflow.nn.rnn_cell.LSTMStateTuple",
"tensorflow.trainable_variables",
"tensorflow.get_collection",
"tensorflow.reset_default_graph",
"numpy.shape",
"tensorflow.ConfigProto",
"tensorflow.matmul",
"six.iteritems",
"tensorflow.variable_scope",
"t... | [((874, 898), 'tensorflow.reset_default_graph', 'tf.reset_default_graph', ([], {}), '()\n', (896, 898), True, 'import tensorflow as tf\n'), ((1063, 1121), 'tensorflow.placeholder', 'tf.placeholder', (['tf.float32'], {'shape': '[None, None, self.n_dim]'}), '(tf.float32, shape=[None, None, self.n_dim])\n', (1077, 1121), ... |
# coding=utf-8
# Copyright 2019 The Google Research Authors.
#
# 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 applicab... | [
"io.StringIO",
"tensorflow.gfile.MakeDirs",
"numpy.zeros",
"collections.defaultdict",
"tensorflow.summary.FileWriter",
"numpy.mean",
"tensorflow.Summary.Value",
"numpy.sqrt"
] | [((1670, 1706), 'collections.defaultdict', 'collections.defaultdict', (['(lambda : [])'], {}), '(lambda : [])\n', (1693, 1706), False, 'import collections\n'), ((2388, 2424), 'collections.defaultdict', 'collections.defaultdict', (['(lambda : [])'], {}), '(lambda : [])\n', (2411, 2424), False, 'import collections\n'), (... |
import numpy as np
from chameleon.legacy.skfeature.utility.mutual_information import su_calculation
def merit_calculation(X, y):
"""
This function calculates the merit of X given class labels y, where
merits = (k * rcf)/sqrt(k+k*(k-1)*rff)
rcf = (1/k)*sum(su(fi,y)) for all fi in X
rff = (1/(k*(k-1... | [
"numpy.array",
"chameleon.legacy.skfeature.utility.mutual_information.su_calculation",
"numpy.sqrt"
] | [((2268, 2279), 'numpy.array', 'np.array', (['F'], {}), '(F)\n', (2276, 2279), True, 'import numpy as np\n'), ((747, 768), 'chameleon.legacy.skfeature.utility.mutual_information.su_calculation', 'su_calculation', (['fi', 'y'], {}), '(fi, y)\n', (761, 768), False, 'from chameleon.legacy.skfeature.utility.mutual_informat... |
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np
from torchvision import ops
# ops.DeformConv2d()
from .correlation_package.correlation import Correlation
def conv(in_planes, out_planes, kernel_size=3, stride=1, padding=1, dilation=1, activatio... | [
"torch.ones_like",
"torch.repeat_interleave",
"torch.flip",
"torch.nn.ConvTranspose2d",
"torch.nn.functional.grid_sample",
"torch.zeros_like",
"torch.autograd.Variable",
"torch.nn.functional.conv_transpose2d",
"torch.nn.Conv2d",
"torch.nn.functional.conv2d",
"torch.cat",
"numpy.cumsum",
"tor... | [((801, 871), 'torch.nn.Conv2d', 'nn.Conv2d', (['in_planes', '(2)'], {'kernel_size': '(3)', 'stride': '(1)', 'padding': '(1)', 'bias': '(True)'}), '(in_planes, 2, kernel_size=3, stride=1, padding=1, bias=True)\n', (810, 871), True, 'import torch.nn as nn\n'), ((914, 984), 'torch.nn.Conv2d', 'nn.Conv2d', (['in_planes', ... |
import os
import ast
import pandas as pd
import numpy as np
import networkx as nx
import json
path = os.path.dirname(os.path.abspath(__file__))
def get_presynaptic(X, G, threshold=0.05):
""" Returns a list of predecessors for a group of neurons.
# Arguments
X (list): List of nodes to get the predec... | [
"os.path.abspath",
"numpy.save",
"numpy.load",
"ast.literal_eval",
"pyclustering.cluster.center_initializer.kmeans_plusplus_initializer",
"pandas.read_csv",
"numpy.zeros",
"pyclustering.cluster.kmeans.kmeans",
"numpy.hstack",
"pyclustering.cluster.elbow.elbow",
"numpy.where",
"numpy.array",
... | [((118, 143), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (133, 143), False, 'import os\n'), ((2034, 2074), 'networkx.read_gexf', 'nx.read_gexf', (['"""hemi12_G_normalized.gexf"""'], {}), "('hemi12_G_normalized.gexf')\n", (2046, 2074), True, 'import networkx as nx\n'), ((9484, 9503), 'nump... |
import bayesiancoresets as bc
import numpy as np
import warnings
warnings.filterwarnings('ignore', category=UserWarning) #tests will generate warnings (due to pathological data design for testing), just ignore them
np.seterr(all='raise')
np.set_printoptions(linewidth=500)
np.random.seed(100)
Nsamps=10000000
#linear ... | [
"numpy.set_printoptions",
"numpy.random.seed",
"numpy.zeros_like",
"numpy.random.randn",
"numpy.seterr",
"warnings.filterwarnings",
"numpy.zeros",
"numpy.any",
"numpy.fabs",
"numpy.array",
"numpy.unique"
] | [((67, 122), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {'category': 'UserWarning'}), "('ignore', category=UserWarning)\n", (90, 122), False, 'import warnings\n'), ((217, 239), 'numpy.seterr', 'np.seterr', ([], {'all': '"""raise"""'}), "(all='raise')\n", (226, 239), True, 'import numpy as ... |
import cv2
import numpy as np
from keras.models import load_model
from statistics import mode
from utils.datasets import get_labels
from utils.inference import detect_faces
from utils.inference import draw_text
from utils.inference import draw_bounding_box
from utils.inference import apply_offsets
from utils.inference ... | [
"keras.models.load_model",
"numpy.argmax",
"cv2.imshow",
"cv2.cvtColor",
"numpy.max",
"utils.inference.apply_offsets",
"statistics.mode",
"cv2.destroyAllWindows",
"cv2.resize",
"utils.preprocessor.preprocess_input",
"utils.inference.draw_bounding_box",
"cv2.waitKey",
"numpy.asarray",
"util... | [((561, 582), 'utils.datasets.get_labels', 'get_labels', (['"""fer2013"""'], {}), "('fer2013')\n", (571, 582), False, 'from utils.datasets import get_labels\n'), ((706, 774), 'cv2.CascadeClassifier', 'cv2.CascadeClassifier', (['"""/models/haarcascade_frontalface_default.xml"""'], {}), "('/models/haarcascade_frontalface... |
# Copyright (c) 2015, 2014 Computational Molecular Biology Group, Free University
# Berlin, 14195 Berlin, Germany.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source c... | [
"unittest.main",
"pyemma.coordinates.data.util.reader_utils.compare_coords_md_trajectory_objects",
"numpy.copy",
"os.stat",
"pyemma.coordinates.data.util.reader_utils.save_traj_w_md_load_frame",
"pyemma.coordinates.source",
"pyemma.coordinates.api.save_trajs",
"numpy.shape",
"tempfile.mkdtemp",
"n... | [((7244, 7259), 'unittest.main', 'unittest.main', ([], {}), '()\n', (7257, 7259), False, 'import unittest\n'), ((2181, 2214), 'os.path.join', 'os.path.join', (['path', '"""bpti_ca.pdb"""'], {}), "(path, 'bpti_ca.pdb')\n", (2193, 2214), False, 'import os\n'), ((2969, 3012), 'tempfile.mkdtemp', 'tempfile.mkdtemp', ([], {... |
from typing import Callable, Optional, List
from collections import namedtuple
import numpy as np
from easydict import EasyDict
from ding.utils import import_module, PLAYER_REGISTRY
from .algorithm import pfsp
class Player:
"""
Overview:
Base player class, player is the basic member of a league
I... | [
"numpy.random.uniform",
"ding.utils.PLAYER_REGISTRY.build",
"ding.utils.PLAYER_REGISTRY.register",
"collections.namedtuple"
] | [((2445, 2490), 'ding.utils.PLAYER_REGISTRY.register', 'PLAYER_REGISTRY.register', (['"""historical_player"""'], {}), "('historical_player')\n", (2469, 2490), False, 'from ding.utils import import_module, PLAYER_REGISTRY\n'), ((11628, 11671), 'ding.utils.PLAYER_REGISTRY.register', 'PLAYER_REGISTRY.register', (['"""naiv... |
#-*-coding:utf-8-*-
# date:2021-06-15
# Author: Eric.Lee
# function: handpose 3D Yolo_v3 Detect Inference
import os
import argparse
import torch
import torch.nn as nn
import numpy as np
import time
import datetime
import os
import math
from datetime import datetime
import cv2
import torch.nn.functional as F
from mod... | [
"utils.bone.caculate_length",
"utils.AIK.adaptive_IK",
"torch.eye",
"argparse.ArgumentParser",
"open3d.geometry.PointCloud",
"numpy.clip",
"utils.func.initiate",
"hand_detect.yolo_v3_hand.yolo_v3_hand_model",
"numpy.linalg.norm",
"torch.device",
"torch.no_grad",
"cv2.imshow",
"models.resnet.... | [((443, 475), 'sys.path.append', 'sys.path.append', (['"""./components/"""'], {}), "('./components/')\n", (458, 475), False, 'import sys\n'), ((891, 961), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '""" Project Hand Pose 3D Inference"""'}), "(description=' Project Hand Pose 3D Inference'... |
#!/usr/bin/env python
import rospy
from geometry_msgs.msg import PoseStamped, TwistStamped
from styx_msgs.msg import Lane, Waypoint
from std_msgs.msg import Int32
import math
import numpy as np
from scipy.spatial import KDTree
'''
This node will publish waypoints from the car's current position to some `x` distance ... | [
"rospy.logerr",
"rospy.Subscriber",
"math.sqrt",
"styx_msgs.msg.Lane",
"rospy.Publisher",
"rospy.Rate",
"rospy.is_shutdown",
"numpy.array",
"rospy.init_node",
"scipy.spatial.KDTree",
"numpy.dot",
"styx_msgs.msg.Waypoint"
] | [((1158, 1193), 'rospy.init_node', 'rospy.init_node', (['"""waypoint_updater"""'], {}), "('waypoint_updater')\n", (1173, 1193), False, 'import rospy\n'), ((1438, 1492), 'rospy.Publisher', 'rospy.Publisher', (['"""final_waypoints"""', 'Lane'], {'queue_size': '(1)'}), "('final_waypoints', Lane, queue_size=1)\n", (1453, 1... |
import cv2
import ctypes
import numpy as np
from ctypes import cdll
import matplotlib.pyplot as plt
if __name__ == '__main__':
mg_cv = cv2.imread("test.JPG")
gray=cv2.cvtColor(mg_cv,cv2.COLOR_BGR2GRAY)
n = gray.shape[0]
m = gray.shape[1]
res = np.empty((gray.shape[0], gray.shape[1]), dtype='float64... | [
"numpy.ctypeslib.ndpointer",
"cv2.cvtColor",
"numpy.empty",
"matplotlib.pyplot.imshow",
"ctypes.cdll.LoadLibrary",
"cv2.imread",
"matplotlib.pyplot.savefig"
] | [((140, 162), 'cv2.imread', 'cv2.imread', (['"""test.JPG"""'], {}), "('test.JPG')\n", (150, 162), False, 'import cv2\n'), ((172, 211), 'cv2.cvtColor', 'cv2.cvtColor', (['mg_cv', 'cv2.COLOR_BGR2GRAY'], {}), '(mg_cv, cv2.COLOR_BGR2GRAY)\n', (184, 211), False, 'import cv2\n'), ((265, 322), 'numpy.empty', 'np.empty', (['(g... |
#!/usr/bin/env python3
import json
import random
import warnings
from datetime import datetime
from pathlib import Path
import numpy
from PIL import Image, ImageEnhance
from samples.misc.synthesis.mask_json_utilities import MaskJsonUtils
from tqdm import tqdm
class ImageComposition:
""" Composes images together... | [
"numpy.dstack",
"PIL.Image.new",
"PIL.ImageEnhance.Brightness",
"numpy.uint8",
"random.randint",
"argparse.ArgumentParser",
"PIL.Image.composite",
"random.choice",
"json.dumps",
"PIL.Image.open",
"numpy.any",
"random.random",
"pathlib.Path",
"numpy.array",
"PIL.Image.fromarray",
"sampl... | [((17523, 17579), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Image Composition"""'}), "(description='Image Composition')\n", (17546, 17579), False, 'import argparse\n'), ((2144, 2167), 'pathlib.Path', 'Path', (['config.output_dir'], {}), '(config.output_dir)\n', (2148, 2167), False, ... |
import trimesh
import numpy as np
import copy
from pychop3d.configuration import Configuration
from pychop3d import bsp_node
class BSPTree:
def __init__(self, part):
"""start a new BSPTree from a single part / object
:param part: original part / object to split
:type part: `trimesh.Trim... | [
"copy.deepcopy",
"pychop3d.bsp_node.BSPNode",
"pychop3d.bsp_node.split",
"numpy.arange",
"numpy.prod"
] | [((7515, 7546), 'pychop3d.bsp_node.split', 'bsp_node.split', (['new_node', 'plane'], {}), '(new_node, plane)\n', (7529, 7546), False, 'from pychop3d import bsp_node\n'), ((780, 811), 'numpy.prod', 'np.prod', (['config.printer_extents'], {}), '(config.printer_extents)\n', (787, 811), True, 'import numpy as np\n'), ((152... |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
Helper script to pre-compute embeddings for a wav2letter++ dataset
"""
import argparse
import glob
import os
from ... | [
"tqdm.tqdm",
"soundfile.read",
"h5py.File",
"os.makedirs",
"fairseq.models.wav2vec.Wav2VecModel.build_model",
"torch.load",
"os.path.dirname",
"os.path.exists",
"numpy.array",
"torch.no_grad",
"os.path.join",
"shutil.copy",
"torch.from_numpy"
] | [((600, 614), 'soundfile.read', 'sf.read', (['fname'], {}), '(fname)\n', (607, 614), True, 'import soundfile as sf\n'), ((782, 799), 'torch.load', 'torch.load', (['fname'], {}), '(fname)\n', (792, 799), False, 'import torch\n'), ((855, 896), 'fairseq.models.wav2vec.Wav2VecModel.build_model', 'Wav2VecModel.build_model',... |
import ctypes
from collections import OrderedDict
from collections.abc import Iterable
from functools import reduce
from itertools import chain, combinations, groupby, product, zip_longest
from operator import attrgetter, mul
import types
import numpy as np
import sympy
from cgen import dtype_to_ctype as cgen_dtype_to... | [
"cgen.dtype_to_ctype",
"itertools.groupby",
"devito.ir.iet.printAST",
"itertools.zip_longest",
"numpy.argsort",
"itertools.combinations",
"operator.attrgetter",
"itertools.product",
"functools.reduce",
"collections.OrderedDict",
"numpy.unique"
] | [((721, 751), 'functools.reduce', 'reduce', (['mul', 'iterable', 'initial'], {}), '(mul, iterable, initial)\n', (727, 751), False, 'from functools import reduce\n'), ((2700, 2717), 'itertools.groupby', 'groupby', (['iterable'], {}), '(iterable)\n', (2707, 2717), False, 'from itertools import chain, combinations, groupb... |
from tensorflow._api.v2 import image
from metrics.results import get_image_results
from yolo.yolo_mask import YoloMask
import numpy as np
import os
def main():
yolo = YoloMask()
total_tp = 0
total_fp = 0
total_fn = 0
images_path = './../../darknet/data/mask-dataset/images/test/'
images = os.li... | [
"numpy.asarray",
"yolo.yolo_mask.YoloMask",
"metrics.results.get_image_results",
"tensorflow._api.v2.image.split",
"os.listdir"
] | [((172, 182), 'yolo.yolo_mask.YoloMask', 'YoloMask', ([], {}), '()\n', (180, 182), False, 'from yolo.yolo_mask import YoloMask\n'), ((315, 338), 'os.listdir', 'os.listdir', (['images_path'], {}), '(images_path)\n', (325, 338), False, 'import os\n'), ((1657, 1700), 'numpy.asarray', 'np.asarray', (['ground_truths'], {'dt... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# File: CAM-resnet.py
import cv2
import sys
import argparse
import numpy as np
import os
import multiprocessing
import tensorflow as tf
from tensorpack import *
from tensorpack.dataflow import dataset
from tensorpack.tfutils import optimizer, gradproc
from tensorpack.tfu... | [
"cv2.resize",
"tensorpack.tfutils.optimizer.apply_grad_processors",
"tensorpack.utils.gpu.get_num_gpu",
"argparse.ArgumentParser",
"numpy.concatenate",
"imagenet_utils.fbresnet_augmentor",
"tensorpack.dataflow.dataset.ILSVRCMeta",
"tensorpack.dataflow.dataset.ILSVRC12",
"multiprocessing.cpu_count",
... | [((2366, 2423), 'tensorpack.dataflow.dataset.ILSVRC12', 'dataset.ILSVRC12', (['datadir', 'train_or_test'], {'shuffle': 'isTrain'}), '(datadir, train_or_test, shuffle=isTrain)\n', (2382, 2423), False, 'from tensorpack.dataflow import dataset\n'), ((2441, 2468), 'imagenet_utils.fbresnet_augmentor', 'fbresnet_augmentor', ... |
import numpy as np
def number_steps_in_queue_simulation(queue_length):
curr_position = queue_length - 1
steps = 0
while curr_position != 0:
new_position_for_first_element = np.random.randint(0, queue_length)
if new_position_for_first_element >= curr_position:
curr_position -= 1
... | [
"numpy.random.randint"
] | [((194, 228), 'numpy.random.randint', 'np.random.randint', (['(0)', 'queue_length'], {}), '(0, queue_length)\n', (211, 228), True, 'import numpy as np\n')] |
"""Compressed Sparse Column matrix format"""
from __future__ import division, print_function, absolute_import
__docformat__ = "restructuredtext en"
__all__ = ['csc_matrix', 'isspmatrix_csc']
from warnings import warn
import numpy as np
from scipy.lib.six import xrange
from .base import isspmatrix
from ._sparsetool... | [
"scipy.lib.six.xrange",
"numpy.empty",
"numpy.lexsort"
] | [((3465, 3486), 'scipy.lib.six.xrange', 'xrange', (['self.shape[0]'], {}), '(self.shape[0])\n', (3471, 3486), False, 'from scipy.lib.six import xrange\n'), ((3825, 3857), 'numpy.empty', 'np.empty', (['(M + 1)'], {'dtype': 'idx_dtype'}), '(M + 1, dtype=idx_dtype)\n', (3833, 3857), True, 'import numpy as np\n'), ((3876, ... |
import argparse
import logging
import time
from os import makedirs
from os.path import exists, join
from shutil import rmtree
import matplotlib.pyplot as plt
import numpy as np
from dejavu.tests.dejavu_test import (DejavuTest, autolabeldoubles,
generate_test_files, log_msg, set_s... | [
"dejavu.tests.dejavu_test.DejavuTest",
"argparse.ArgumentParser",
"os.makedirs",
"logging.basicConfig",
"os.path.join",
"os.path.exists",
"time.time",
"dejavu.tests.dejavu_test.set_seed",
"matplotlib.pyplot.figure",
"numpy.arange",
"dejavu.tests.dejavu_test.generate_test_files",
"dejavu.tests.... | [((516, 530), 'dejavu.tests.dejavu_test.set_seed', 'set_seed', (['seed'], {}), '(seed)\n', (524, 530), False, 'from dejavu.tests.dejavu_test import DejavuTest, autolabeldoubles, generate_test_files, log_msg, set_seed\n'), ((980, 1069), 'dejavu.tests.dejavu_test.log_msg', 'log_msg', (['f"""Running Dejavu fingerprinter o... |
import batoid
import numpy as np
from test_helpers import timer, do_pickle, rays_allclose, all_obj_diff
@timer
def test_properties():
np.random.seed(5)
for _ in range(100):
s1 = batoid.Sphere(np.random.uniform(1, 3))
s2 = batoid.Paraboloid(np.random.uniform(1, 3))
sum = batoid.Sum([s1,... | [
"batoid.Sphere",
"numpy.random.uniform",
"numpy.random.seed",
"test_helpers.rays_allclose",
"batoid.RayVector",
"test_helpers.do_pickle",
"batoid.Plane",
"numpy.random.normal",
"batoid.Sum",
"test_helpers.all_obj_diff",
"batoid.Paraboloid"
] | [((140, 157), 'numpy.random.seed', 'np.random.seed', (['(5)'], {}), '(5)\n', (154, 157), True, 'import numpy as np\n'), ((1118, 1136), 'numpy.random.seed', 'np.random.seed', (['(57)'], {}), '(57)\n', (1132, 1136), True, 'import numpy as np\n'), ((1885, 1904), 'numpy.random.seed', 'np.random.seed', (['(577)'], {}), '(57... |
#!/usr/bin/env python
import respirnet
import numpy as np
import networkx as nx
import sys
import argparse
'''
This class outputs a file (.gml) that contains a network for the pre-bot and botzinger complex based on the desired network parameters. This class allows you to vary the architecture based on the amount ... | [
"respirnet.er_prebot_bot",
"argparse.ArgumentParser",
"numpy.array",
"networkx.write_gml",
"sys.exit"
] | [((1150, 1303), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'prog': '"""genPreBotBot_gamma"""', 'description': '"""Generates Graph based on Block Model with varying amounts of intra inhibition"""'}), "(prog='genPreBotBot_gamma', description=\n 'Generates Graph based on Block Model with varying amount... |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
This module implements a simple algorithm for extracting nearest neighbor
exchange parameters by mapping low energy magnetic orderings to a Heisenberg
model.
"""
import copy
import logging
import sys
from ... | [
"pymatgen.analysis.graphs.StructureGraph.from_dict",
"pymatgen.analysis.local_env.MinimumDistanceNN",
"pandas.DataFrame",
"pymatgen.analysis.graphs.StructureGraph.with_local_env_strategy",
"logging.warning",
"numpy.linalg.eig",
"monty.serialization.dumpfn",
"pymatgen.Structure.from_dict",
"copy.deep... | [((10534, 10563), 'pandas.DataFrame', 'pd.DataFrame', ([], {'columns': 'columns'}), '(columns=columns)\n', (10546, 10563), True, 'import pandas as pd\n'), ((15375, 15391), 'numpy.linalg.inv', 'np.linalg.inv', (['H'], {}), '(H)\n', (15388, 15391), True, 'import numpy as np\n'), ((15407, 15423), 'numpy.dot', 'np.dot', ([... |
"""
This module is used to call CP2K simulation and parse its output
The user need to supply a complete input script with ENERGY_FORCE or ENERGY runtype, and CELL, COORD blocks. Example scripts can be found in tests/test_files/cp2k_input...
The module will copy the input template to a new file with "_run" suffix,
edit... | [
"os.remove",
"flare.struc.Structure",
"flare.struc.get_unique_species",
"numpy.shape",
"numpy.array",
"subprocess.call"
] | [((1840, 1862), 'os.remove', 'os.remove', (['newfilename'], {}), '(newfilename)\n', (1849, 1862), False, 'import os\n'), ((2821, 2850), 'subprocess.call', 'call', (['dft_command'], {'shell': '(True)'}), '(dft_command, shell=True)\n', (2825, 2850), False, 'from subprocess import call\n'), ((2855, 2877), 'os.remove', 'os... |
from collections import namedtuple
import numpy as np
import numpy.random as nr
from ..arraystep import Competence
from .base_hmc import BaseHMC, HMCStepData, DivergenceInfo
from .integration import IntegrationError
from pymc3.backends.report import SamplerWarning, WarningType
from pymc3.theanof import floatX
from py... | [
"numpy.random.uniform",
"numpy.abs",
"numpy.log",
"numpy.asarray",
"numpy.isnan",
"numpy.logaddexp",
"numpy.array",
"collections.namedtuple",
"pymc3.backends.report.SamplerWarning",
"numpy.exp"
] | [((8313, 8372), 'collections.namedtuple', 'namedtuple', (['"""Proposal"""', '"""q, q_grad, energy, p_accept, logp"""'], {}), "('Proposal', 'q, q_grad, energy, p_accept, logp')\n", (8323, 8372), False, 'from collections import namedtuple\n'), ((8430, 8522), 'collections.namedtuple', 'namedtuple', (['"""Subtree"""', '"""... |
#! user/bin/python3
import numpy as np
class Bfunc:
def __init__(self, sol):
self.func = getattr(self, sol)
def __call__(self, r, r0, *args, **kwargs):
return self.transform(r, r0, self.func, *args, **kwargs)
def transform(self, r, r0, func, *args, **kwargs):
r = np.array(r)
... | [
"numpy.array"
] | [((303, 314), 'numpy.array', 'np.array', (['r'], {}), '(r)\n', (311, 314), True, 'import numpy as np\n'), ((328, 340), 'numpy.array', 'np.array', (['r0'], {}), '(r0)\n', (336, 340), True, 'import numpy as np\n')] |
from typing import Any, Dict, Optional, Sequence, Tuple, Union
import numpy as np
import torch
from torch import nn
from tianshou.utils.net.discrete import NoisyLinear
class DQN(nn.Module):
"""Reference: Human-level control through deep reinforcement learning.
For advanced usage (how to customize the networ... | [
"torch.nn.ReLU",
"torch.nn.Conv2d",
"tianshou.utils.net.discrete.NoisyLinear",
"torch.nn.Linear",
"torch.zeros",
"torch.as_tensor",
"torch.no_grad",
"numpy.prod",
"torch.nn.Flatten"
] | [((1861, 1922), 'torch.as_tensor', 'torch.as_tensor', (['obs'], {'device': 'self.device', 'dtype': 'torch.float32'}), '(obs, device=self.device, dtype=torch.float32)\n', (1876, 1922), False, 'import torch\n'), ((2403, 2424), 'numpy.prod', 'np.prod', (['action_shape'], {}), '(action_shape)\n', (2410, 2424), True, 'impor... |
#! /usr/bin/env python
"""
matrixDFT exercising driver for Fourier Optics 2017 class
<EMAIL> 2018
"""
import sys, os, time
import numpy as np
from astropy.io import fits
import poppy.matrixDFT as matrixDFT
def makedisk(s, ctr=None, radius=None):
return make_ellipse(s, ctr=ctr, ellpars = (radius,radius,0.0))
... | [
"os.path.abspath",
"numpy.meshgrid",
"os.makedirs",
"poppy.matrixDFT.MatrixFourierTransform",
"os.path.dirname",
"astropy.io.fits.PrimaryHDU",
"numpy.zeros",
"os.path.exists",
"numpy.sin",
"numpy.exp",
"numpy.linspace",
"numpy.cos"
] | [((509, 556), 'numpy.linspace', 'np.linspace', (['(-ctr[0] + 0.5)', '(s - ctr[0] - 0.5)', 's'], {}), '(-ctr[0] + 0.5, s - ctr[0] - 0.5, s)\n', (520, 556), True, 'import numpy as np\n'), ((561, 608), 'numpy.linspace', 'np.linspace', (['(-ctr[1] + 0.5)', '(s - ctr[1] - 0.5)', 's'], {}), '(-ctr[1] + 0.5, s - ctr[1] - 0.5,... |
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
#
# This source code is licensed under the BSD license found in the
# LICENSE file in the root directory of this source tree.
# pylint: disable=missing-module-docstring
# pylint: disable=missing-class-docstring
# pylint: disable=missing-function-d... | [
"numpy.random.seed",
"torch.optim.lr_scheduler.StepLR",
"torch.testing.assert_allclose",
"torch.cuda.device_count",
"torch.device",
"torch.distributed.gather",
"torch.ones",
"torch.nn.parallel.DistributedDataParallel",
"pytest.raises",
"fairscale.optim.OSS",
"torch.nn.Linear",
"torch.cuda.set_... | [((797, 822), 'torch.cuda.is_available', 'torch.cuda.is_available', ([], {}), '()\n', (820, 822), False, 'import torch\n'), ((881, 906), 'torch.cuda.is_available', 'torch.cuda.is_available', ([], {}), '()\n', (904, 906), False, 'import torch\n'), ((912, 931), 'torch.device', 'torch.device', (['"""cpu"""'], {}), "('cpu'... |
# -*- coding: utf-8 -*-
"""
Created on Wed Aug 11 17:09:03 2021
@author: zongsing.huang
"""
# =============================================================================
# 最佳解的適應值為0
# 統計分析->mean, std
# 即時更新pbest, gbest
# 提早終止:若gbest_F的改善率小於0.1%連續發生0.1*G次,就結束計算
# 用semilogy畫圖
# ========================================... | [
"numpy.random.uniform",
"numpy.abs",
"matplotlib.pyplot.plot",
"numpy.zeros",
"numpy.ones",
"matplotlib.pyplot.ylabel",
"numpy.argmin",
"matplotlib.pyplot.figure",
"scipy.stats.ranksums",
"matplotlib.pyplot.semilogy",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.grid"
] | [((833, 849), 'numpy.zeros', 'np.zeros', (['[T, G]'], {}), '([T, G])\n', (841, 849), True, 'import numpy as np\n'), ((875, 886), 'numpy.zeros', 'np.zeros', (['T'], {}), '(T)\n', (883, 886), True, 'import numpy as np\n'), ((3086, 3110), 'scipy.stats.ranksums', 'ranksums', (['assum1', 'assum2'], {}), '(assum1, assum2)\n'... |
from trueskill import Rating, quality, rate, TrueSkill
import itertools
import math
from .config import *
import numpy as np
def win_probability(ts, team1, team2):
delta_mu = sum(r.mu for r in team1) - sum(r.mu for r in team2)
sum_sigma = sum(r.sigma ** 2 for r in itertools.chain(team1, team2))
size = len... | [
"math.sqrt",
"numpy.argmax",
"numpy.max",
"trueskill.TrueSkill",
"itertools.chain",
"trueskill.Rating"
] | [((353, 395), 'math.sqrt', 'math.sqrt', (['(size * ts.beta ** 2 + sum_sigma)'], {}), '(size * ts.beta ** 2 + sum_sigma)\n', (362, 395), False, 'import math\n'), ((699, 776), 'trueskill.TrueSkill', 'TrueSkill', ([], {'mu': 'MU', 'sigma': 'SIGMA', 'beta': 'BETA', 'tau': 'TAU', 'draw_probability': 'DRAW_PROB'}), '(mu=MU, ... |
import tensorflow as tf
from tensorflow.keras import layers
import tensorflow_probability as tfp
import numpy as np
from dataclasses import dataclass
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
import tensorflow as tf
import tensorflow.keras.layers as kl
import tensorflow_probability as tfp
import numpy as np... | [
"tensorflow.nn.softmax",
"tensorflow.math.log",
"tensorflow.one_hot",
"tensorflow.reduce_sum",
"tensorflow.keras.layers.Dense",
"tensorflow_probability.distributions.Categorical",
"tensorflow.stop_gradient",
"tensorflow.reduce_mean",
"tensorflow.keras.optimizers.Adam",
"tensorflow.square",
"tens... | [((513, 545), 'tensorflow.keras.layers.Dense', 'kl.Dense', (['(100)'], {'activation': '"""relu"""'}), "(100, activation='relu')\n", (521, 545), True, 'import tensorflow.keras.layers as kl\n'), ((568, 600), 'tensorflow.keras.layers.Dense', 'kl.Dense', (['(100)'], {'activation': '"""relu"""'}), "(100, activation='relu')\... |
import boto3
import botocore
import sshtunnel
import pymysql
import psycopg2
import sqlite3
import pandas as pd
import numpy as np
import re
from tqdm import tqdm
import os
import sys
import getpass
import json
import datetime
import hashlib
import warnings
import csv
from types import SimpleNamespace
from .misc i... | [
"os.listdir",
"boto3.Session",
"warnings.filterwarnings",
"pandas.read_csv",
"pymysql.converters.encoders.copy",
"numpy.dtype",
"datetime.datetime.now",
"pymysql.converters.conversions.update",
"re.findall",
"sqlite3.connect",
"pandas.to_datetime",
"pandas.read_sql",
"os.path.join",
"types... | [((2906, 2923), 'types.SimpleNamespace', 'SimpleNamespace', ([], {}), '()\n', (2921, 2923), False, 'from types import SimpleNamespace\n'), ((2946, 2963), 'types.SimpleNamespace', 'SimpleNamespace', ([], {}), '()\n', (2961, 2963), False, 'from types import SimpleNamespace\n'), ((3093, 3127), 'os.path.join', 'os.path.joi... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
VOC2012 preprocessing to speed up training
"""
import os
import sys
from glob import glob
import numpy as np
import tensorflow as tf
from tqdm import tqdm
from models.SSD300 import SSD300
from .VOC2012ManagerObjDetection import VOC2012ManagerObjDetection
sys.path.... | [
"os.mkdir",
"tqdm.tqdm",
"numpy.load",
"os.path.exists",
"sys.path.insert",
"models.SSD300.SSD300",
"glob.glob"
] | [((311, 336), 'sys.path.insert', 'sys.path.insert', (['(1)', '"""../"""'], {}), "(1, '../')\n", (326, 336), False, 'import sys\n'), ((687, 711), 'models.SSD300.SSD300', 'SSD300', (['(21)'], {'floatType': '(32)'}), '(21, floatType=32)\n', (693, 711), False, 'from models.SSD300 import SSD300\n'), ((517, 544), 'os.path.ex... |
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import division
from __future__ import print_function
import argparse
import os
from os.path import join
import numpy as np
import torch
import pandas as pd
import sklearn
from sklearn.metrics.pairwise import cosine_similari... | [
"utils.data_utils.load_json",
"argparse.ArgumentParser",
"logging.basicConfig",
"os.makedirs",
"keras.preprocessing.sequence.pad_sequences",
"utils.data_utils.dump_large_obj",
"numpy.zeros",
"utils.feature_utils.scale_matrix",
"utils.data_utils.load_large_obj",
"numpy.ones",
"sklearn.utils.shuff... | [((529, 556), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (546, 556), False, 'import logging\n'), ((557, 630), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO', 'format': '"""%(asctime)s %(message)s"""'}), "(level=logging.INFO, format='%(asctime)s %(message)s... |
import tensorflow as tf
from tensorflow.python.ops.rnn import dynamic_rnn
import numpy as np
import sonnet as snt
from matplotlib.colors import to_rgb
import matplotlib.patches as patches
import shutil
import os
from dps import cfg
from dps.utils import Param
from dps.utils.tf import RNNCell, tf_mean_sum
from auto_yo... | [
"tensorflow.reduce_sum",
"tensorflow.clip_by_value",
"tensorflow.cumsum",
"tensorflow.identity",
"tensorflow.maximum",
"tensorflow.reshape",
"tensorflow.zeros_like",
"auto_yolo.tf_ops.render_sprites.render_sprites",
"dps.cfg.build_object_decoder",
"tensorflow.reduce_max",
"tensorflow.split",
"... | [((1795, 1802), 'dps.utils.Param', 'Param', ([], {}), '()\n', (1800, 1802), False, 'from dps.utils import Param\n'), ((1822, 1829), 'dps.utils.Param', 'Param', ([], {}), '()\n', (1827, 1829), False, 'from dps.utils import Param\n'), ((1156, 1194), 'tensorflow.reduce_max', 'tf.reduce_max', (['nonzero_indices'], {'axis':... |
# clone.py
# Udacity Self-Driving Car Engineer
# Behavioral Cloning Project
# Script to import data saved from self-driving car simulator
# and train in a Keras neural network
import os
import csv
import cv2
import numpy as np
import tensorflow as tf
from sklearn.preprocessing import LabelBinarizer
from keras.models... | [
"matplotlib.pyplot.title",
"matplotlib.pyplot.show",
"csv.reader",
"matplotlib.pyplot.plot",
"keras.layers.Cropping2D",
"sklearn.model_selection.train_test_split",
"keras.models.Sequential",
"matplotlib.pyplot.legend",
"keras.layers.Flatten",
"keras.layers.pooling.MaxPooling2D",
"cv2.imread",
... | [((3094, 3132), 'sklearn.model_selection.train_test_split', 'train_test_split', (['lines'], {'test_size': '(0.2)'}), '(lines, test_size=0.2)\n', (3110, 3132), False, 'from sklearn.model_selection import train_test_split\n'), ((3649, 3661), 'keras.models.Sequential', 'Sequential', ([], {}), '()\n', (3659, 3661), False, ... |
import numpy as np
import nibabel as nb
import os
import sys
import nighresjava
from ..io import load_volume, save_volume
from ..utils import _output_dir_4saving, _fname_4saving, \
_check_topology_lut_dir, _check_atlas_file, _check_available_memory
def filter_ridge_structures(input_image,
... | [
"nibabel.Nifti1Image",
"nighresjava.initVM",
"numpy.nanmin",
"os.path.isfile",
"nighresjava.JArray",
"sys.exc_info",
"nighresjava.FilterRidgeStructures",
"numpy.nanmax"
] | [((2717, 2752), 'nighresjava.FilterRidgeStructures', 'nighresjava.FilterRidgeStructures', ([], {}), '()\n', (2750, 2752), False, 'import nighresjava\n'), ((4326, 4384), 'nibabel.Nifti1Image', 'nb.Nifti1Image', (['ridge_structure_image_data', 'affine', 'header'], {}), '(ridge_structure_image_data, affine, header)\n', (4... |
from __future__ import division
import os
import sys
import logging
import torch
import numpy as np
import cv2
import torch.nn.functional as F
from thop import profile
sys.path.append("./")
from transform import ToTensor
from utils.darts_utils import create_exp_dir, plot_op, plot_path_width, objective_acc_lat
try... | [
"sys.path.append",
"lib.models.model_stages.BiSeNet",
"numpy.random.seed",
"torch.manual_seed",
"cv2.imwrite",
"torch.load",
"torch.cuda.manual_seed",
"torch.nn.functional.softmax",
"cv2.imread",
"numpy.random.randint",
"torch.cuda.is_available",
"transform.ToTensor",
"os.path.join"
] | [((171, 192), 'sys.path.append', 'sys.path.append', (['"""./"""'], {}), "('./')\n", (186, 192), False, 'import sys\n'), ((1009, 1029), 'numpy.random.seed', 'np.random.seed', (['seed'], {}), '(seed)\n', (1023, 1029), True, 'import numpy as np\n'), ((1034, 1057), 'torch.manual_seed', 'torch.manual_seed', (['seed'], {}), ... |
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# 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 appli... | [
"unittest.main",
"numpy.sum",
"paddle.distribution.kl._kl_expfamily_expfamily",
"config.RTOL.get",
"paddle.distribution.kl_divergence",
"paddle.fluid.dygraph.guard",
"numpy.random.random",
"paddle.set_default_dtype",
"config.ATOL.get",
"paddle.rand",
"paddle.to_tensor",
"parameterize.place"
] | [((821, 856), 'paddle.set_default_dtype', 'paddle.set_default_dtype', (['"""float64"""'], {}), "('float64')\n", (845, 856), False, 'import paddle\n'), ((860, 887), 'parameterize.place', 'param.place', (['config.DEVICES'], {}), '(config.DEVICES)\n', (871, 887), True, 'import parameterize as param\n'), ((2229, 2256), 'pa... |
import os
import unittest
import numpy as np
from prive.report import MIAttackSummary
class MiAttackSummaryTest(unittest.TestCase):
def setUp(self):
np.random.seed(0)
self.predictions = (np.random.randint(2, size=100))
self.labels = (np.random.randint(2, size=100))
self.attack_summ... | [
"numpy.random.seed",
"os.path.dirname",
"prive.report.MIAttackSummary",
"os.path.exists",
"numpy.random.randint",
"numpy.mean",
"numpy.where",
"os.path.join"
] | [((163, 180), 'numpy.random.seed', 'np.random.seed', (['(0)'], {}), '(0)\n', (177, 180), True, 'import numpy as np\n'), ((209, 239), 'numpy.random.randint', 'np.random.randint', (['(2)'], {'size': '(100)'}), '(2, size=100)\n', (226, 239), True, 'import numpy as np\n'), ((264, 294), 'numpy.random.randint', 'np.random.ra... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for `deconvoluted` package."""
import unittest
import numpy as np
from deconvoluted import fourier_transform, inverse_fourier_transform
from deconvoluted.conventions import conventions, Convention
from deconvoluted.transforms import determine_norm
class TestD... | [
"numpy.meshgrid",
"numpy.zeros_like",
"numpy.abs",
"numpy.testing.assert_almost_equal",
"deconvoluted.transforms.determine_norm",
"deconvoluted.inverse_fourier_transform",
"deconvoluted.conventions.Convention",
"numpy.sin",
"deconvoluted.fourier_transform",
"numpy.linalg.norm",
"numpy.linspace"
... | [((430, 454), 'numpy.linspace', 'np.linspace', (['(-20)', '(20)', '(41)'], {}), '(-20, 20, 41)\n', (441, 454), True, 'import numpy as np\n'), ((467, 491), 'numpy.linspace', 'np.linspace', (['(-10)', '(10)', '(21)'], {}), '(-10, 10, 21)\n', (478, 491), True, 'import numpy as np\n'), ((507, 524), 'numpy.meshgrid', 'np.me... |
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve.
#
# 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 appl... | [
"pickle.dump",
"numpy.random.seed",
"paddle.fluid.regularizer.L2DecayRegularizer",
"paddle.fluid.program_guard",
"paddle.fluid.core.CPUPlace",
"json.dumps",
"logging.Formatter",
"pickle.load",
"paddle.fluid.executor.Executor",
"os.path.join",
"numpy.prod",
"sys.path.append",
"logging.FileHan... | [((1053, 1074), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (1068, 1074), False, 'import sys\n'), ((1021, 1052), 'sys.setdefaultencoding', 'sys.setdefaultencoding', (['"""utf-8"""'], {}), "('utf-8')\n", (1043, 1052), False, 'import sys\n'), ((3518, 3538), 'numpy.array', 'np.array', (['lod_tens... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module defines base classes for all models. The base class of all
models is `~astropy.modeling.Model`. `~astropy.modeling.FittableModel` is
the base class for all fittable models. Fittable models can be linear or
nonlinear in a regression analys... | [
"numpy.empty",
"astropy.utils.indent",
"collections.defaultdict",
"numpy.shape",
"inspect.isabstract",
"numpy.mean",
"astropy.utils.codegen.make_function_with_signature",
"collections.deque",
"astropy.utils.isiterable",
"numpy.logical_not",
"numpy.ndim",
"inspect.signature",
"numpy.rollaxis"... | [((25352, 25371), 'astropy.utils.metadata.MetaData', 'metadata.MetaData', ([], {}), '()\n', (25369, 25371), False, 'from astropy.utils import indent, metadata\n'), ((142922, 142944), 'astropy.utils.find_current_module', 'find_current_module', (['(2)'], {}), '(2)\n', (142941, 142944), False, 'from astropy.utils import s... |
import numpy as np
import pytest
from openff.toolkit.tests.utils import compare_system_energies
from openff.toolkit.topology import Molecule, Topology
from simtk import unit
from openff.system.stubs import ForceField
from openff.system.utils import get_test_file_path
@pytest.mark.parametrize("n_mols", [1, 2])
@pytes... | [
"openff.toolkit.topology.Topology.from_molecules",
"openff.toolkit.topology.Molecule.from_smiles",
"numpy.eye",
"numpy.asarray",
"numpy.min",
"openff.system.utils.get_test_file_path",
"openff.toolkit.tests.utils.compare_system_energies",
"pytest.mark.parametrize",
"numpy.vstack"
] | [((272, 313), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""n_mols"""', '[1, 2]'], {}), "('n_mols', [1, 2])\n", (295, 313), False, 'import pytest\n'), ((315, 389), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""mol"""', "['C', 'CC', 'OC=O', 'CCOC', 'C1COC(=O)O1']"], {}), "('mol', ['C', 'CC', ... |
import numpy as np
# Setting the random seed, feel free to change it and see different solutions.
np.random.seed(42)
def stepFunction(t):
if t >= 0:
return 1
return 0
def prediction(X, W, b):
return stepFunction((np.matmul(X, W) + b)[0])
# TODO: Fill in the code below to implement the percept... | [
"numpy.random.rand",
"numpy.random.seed",
"numpy.matmul"
] | [((99, 117), 'numpy.random.seed', 'np.random.seed', (['(42)'], {}), '(42)\n', (113, 117), True, 'import numpy as np\n'), ((1598, 1618), 'numpy.random.rand', 'np.random.rand', (['(2)', '(1)'], {}), '(2, 1)\n', (1612, 1618), True, 'import numpy as np\n'), ((1628, 1645), 'numpy.random.rand', 'np.random.rand', (['(1)'], {}... |
#!/usr/bin/env python
# encoding: utf-8
#
# Copyright SAS Institute
#
# 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 b... | [
"pandas.DataFrame",
"collections.OrderedDict.fromkeys",
"numpy.mean",
"numpy.diag",
"matplotlib.pyplot.subplots"
] | [((4395, 4451), 'pandas.DataFrame', 'pd.DataFrame', ([], {'data': 'ret', 'columns': 'cls_list', 'index': 'cls_list'}), '(data=ret, columns=cls_list, index=cls_list)\n', (4407, 4451), True, 'import pandas as pd\n'), ((12386, 12421), 'matplotlib.pyplot.subplots', 'plt.subplots', (['(1)', '(1)'], {'figsize': 'figsize'}), ... |
from typing import Callable, Type, Union
import numpy as np
import numpy.typing as npt
def init(shape: Union[int, tuple[int, int]],
setting: str = "simple",
dtype: Type[float] = int,
k: int = 2) -> npt.NDArray[float]:
if setting == "simple":
a = np.zeros(shape, dtype=dtype)
... | [
"numpy.random.randint",
"numpy.zeros"
] | [((288, 316), 'numpy.zeros', 'np.zeros', (['shape'], {'dtype': 'dtype'}), '(shape, dtype=dtype)\n', (296, 316), True, 'import numpy as np\n'), ((535, 580), 'numpy.random.randint', 'np.random.randint', (['k'], {'size': 'shape', 'dtype': 'dtype'}), '(k, size=shape, dtype=dtype)\n', (552, 580), True, 'import numpy as np\n... |
import json
import numpy as np
from tensorflow import keras
from colorama import Fore, Style, Back
import pickle
import colorama
colorama.init()
with open("intents.json") as file:
data = json.load(file)
def chat():
# load trained model
model = keras.models.load_model('chat_model_college... | [
"colorama.init",
"json.load",
"tensorflow.keras.models.load_model",
"numpy.argmax",
"pickle.load",
"numpy.random.choice"
] | [((137, 152), 'colorama.init', 'colorama.init', ([], {}), '()\n', (150, 152), False, 'import colorama\n'), ((205, 220), 'json.load', 'json.load', (['file'], {}), '(file)\n', (214, 220), False, 'import json\n'), ((277, 322), 'tensorflow.keras.models.load_model', 'keras.models.load_model', (['"""chat_model_college"""'], ... |
"""Wrapper for creating the ant environment in gym_mujoco."""
import math
import numpy as np
from gym import utils
from gym.envs.mujoco import mujoco_env
class PointEnv(mujoco_env.MujocoEnv, utils.EzPickle):
FILE = "point.xml"
ORI_IND = 2
def __init__(self, file_path=None, expose_all_qpos=True):
... | [
"gym.utils.EzPickle.__init__",
"gym.envs.mujoco.mujoco_env.MujocoEnv.__init__",
"numpy.copy",
"numpy.clip",
"math.sin",
"math.cos",
"numpy.concatenate"
] | [((382, 431), 'gym.envs.mujoco.mujoco_env.MujocoEnv.__init__', 'mujoco_env.MujocoEnv.__init__', (['self', 'file_path', '(1)'], {}), '(self, file_path, 1)\n', (411, 431), False, 'from gym.envs.mujoco import mujoco_env\n'), ((440, 469), 'gym.utils.EzPickle.__init__', 'utils.EzPickle.__init__', (['self'], {}), '(self)\n',... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.