code stringlengths 31 1.05M | apis list | extract_api stringlengths 97 1.91M |
|---|---|---|
import sys
import numpy as np
import os
sys.path.append("./pb")
from pb.localization_pb2 import Pose
# 文件取出的顺序变
def getpath():
for root,dirs,files in os.walk(r"./dump"):
for file in files:
#获取文件路径
filepath= os.path.join(root,file)
path_this.append(filepa... | [
"sys.path.append",
"numpy.save",
"os.walk",
"pb.localization_pb2.Pose",
"numpy.array",
"os.path.join",
"os.listdir",
"numpy.vstack"
] | [((42, 65), 'sys.path.append', 'sys.path.append', (['"""./pb"""'], {}), "('./pb')\n", (57, 65), False, 'import sys\n'), ((159, 176), 'os.walk', 'os.walk', (['"""./dump"""'], {}), "('./dump')\n", (166, 176), False, 'import os\n'), ((569, 585), 'os.listdir', 'os.listdir', (['path'], {}), '(path)\n', (579, 585), False, 'i... |
# -*- coding: utf-8 -*-
from numpy import linspace, where, sin, pi
def get_data(self):
"""Generate the toothsaw vector
Parameters
----------
self : ImportGenToothSaw
An ImportGenToothSaw object
Returns
-------
vect: ndarray
The generated toothsaw vector
"""
tim... | [
"numpy.where",
"numpy.linspace"
] | [((324, 383), 'numpy.linspace', 'linspace', ([], {'start': '(0)', 'stop': 'self.Tf', 'num': 'self.N', 'endpoint': '(False)'}), '(start=0, stop=self.Tf, num=self.N, endpoint=False)\n', (332, 383), False, 'from numpy import linspace, where, sin, pi\n'), ((521, 549), 'numpy.where', 'where', (['(time <= 0.5 * T)', '(1)', '... |
import numpy as np
from CIS import *
from Hartree_Fock import *
basis = ((0,0), (0,1), (1,0), (1,1), (2,0), (2,1))
Beryllium = CIS(4,basis)
Beryllium_HF = HF(4,basis)
# === Configuration Interaction Singles ===
A = np.zeros((5,5))
# --- <c|H|c> ---
A[0,0] = Beryllium.c_H_c()
# --- <c|H|p_i^a> ---
A[0,1] = Beryllium... | [
"numpy.linalg.eigh",
"numpy.zeros"
] | [((217, 233), 'numpy.zeros', 'np.zeros', (['(5, 5)'], {}), '((5, 5))\n', (225, 233), True, 'import numpy as np\n'), ((1247, 1264), 'numpy.linalg.eigh', 'np.linalg.eigh', (['A'], {}), '(A)\n', (1261, 1264), True, 'import numpy as np\n')] |
import os, pickle, datetime, string, random
import numpy as np
from src.utils.ibr_argument_parser import IBRParser
from tqdm import trange
import json
from src.traffic_world import TrafficWorld
from src.iterative_best_response import run_iterative_best_response
import src.utils.solver_helper as helper
def run_simul... | [
"os.path.expanduser",
"json.dump",
"pickle.dump",
"os.getpid",
"os.makedirs",
"tqdm.trange",
"numpy.floor",
"src.traffic_world.TrafficWorld",
"random.choice",
"src.utils.solver_helper.initialize_cars_from_positions",
"src.utils.ibr_argument_parser.IBRParser",
"numpy.insert",
"pickle.load",
... | [((917, 959), 'src.traffic_world.TrafficWorld', 'TrafficWorld', (["params['n_lanes']", '(0)', '(999999)'], {}), "(params['n_lanes'], 0, 999999)\n", (929, 959), False, 'from src.traffic_world import TrafficWorld\n'), ((1650, 1760), 'src.utils.solver_helper.initialize_cars_from_positions', 'helper.initialize_cars_from_po... |
import pandas as pd
import matplotlib.pyplot as plt
import os
import numpy as np
import seaborn as sns
import argparse
parser = argparse.ArgumentParser('QQ Plot for histograms of two variables')
parser.add_argument('file', type=str,
metavar='DF',
help='Location where pkl file saved')
parser.add_argu... | [
"numpy.poly1d",
"numpy.sum",
"argparse.ArgumentParser",
"numpy.log",
"numpy.polyfit",
"matplotlib.pyplot.show",
"matplotlib.pyplot.close",
"os.path.join",
"numpy.logical_not",
"numpy.mean",
"matplotlib.pyplot.rc",
"seaborn.color_palette",
"numpy.exp",
"pandas.read_pickle",
"pandas.qcut",... | [((130, 196), 'argparse.ArgumentParser', 'argparse.ArgumentParser', (['"""QQ Plot for histograms of two variables"""'], {}), "('QQ Plot for histograms of two variables')\n", (153, 196), False, 'import argparse\n'), ((1357, 1394), 'seaborn.set_palette', 'sns.set_palette', ([], {'palette': '"""colorblind"""'}), "(palette... |
# Copyright 2019 NREL
# 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 writing, software distribu... | [
"numpy.min",
"numpy.unique"
] | [((2172, 2184), 'numpy.unique', 'np.unique', (['x'], {}), '(x)\n', (2181, 2184), True, 'import numpy as np\n'), ((2191, 2203), 'numpy.unique', 'np.unique', (['y'], {}), '(y)\n', (2200, 2203), True, 'import numpy as np\n'), ((2241, 2253), 'numpy.unique', 'np.unique', (['z'], {}), '(z)\n', (2250, 2253), True, 'import num... |
r""":mod:`mirgecom.diffusion` computes the diffusion operator.
.. autofunction:: gradient_flux
.. autofunction:: diffusion_flux
.. autofunction:: diffusion_operator
.. autoclass:: DiffusionBoundary
.. autoclass:: DirichletDiffusionBoundary
.. autoclass:: NeumannDiffusionBoundary
"""
__copyright__ = """
Copyright (C) ... | [
"grudge.dof_desc.as_dofdesc",
"grudge.eager.cross_rank_trace_pairs",
"grudge.dof_desc.DOFDesc",
"pytools.obj_array.make_obj_array",
"grudge.eager.interior_trace_pair",
"grudge.trace_pair.TracePair",
"numpy.dot"
] | [((9047, 9071), 'grudge.dof_desc.DOFDesc', 'DOFDesc', (['"""vol"""', 'quad_tag'], {}), "('vol', quad_tag)\n", (9054, 9071), False, 'from grudge.dof_desc import DOFDesc, as_dofdesc\n'), ((9095, 9125), 'grudge.dof_desc.DOFDesc', 'DOFDesc', (['"""all_faces"""', 'quad_tag'], {}), "('all_faces', quad_tag)\n", (9102, 9125), ... |
# test_eng.py
# Copyright (c) 2013-2016 <NAME>
# See LICENSE for details
# pylint: disable=C0103,C0111,C0302,E0611,R0913,R0915,W0108,W0212
# Standard library imports
import functools
import sys
import pytest
from numpy import array, ndarray
# Putil imports
import putil.eng
from putil.test import AE, AI, CS
###
# Glo... | [
"functools.partial",
"numpy.array",
"pytest.mark.parametrize",
"putil.test.AE",
"putil.test.AI"
] | [((1132, 1778), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""text, sep, num, lstrip, rstrip, ref"""', "[('a, b, c, d', ',', 1, DFLT, DFLT, ('a', ' b', ' c', ' d')), (\n 'a , b , c , d ', ',', 1, DFLT, DFLT, ('a ', ' b ', ' c ', ' d ')), (\n 'a , b , c , d ', ',', 1, True, DFLT, ('a ', 'b ', 'c ', '... |
import torch
import numpy as np
import rlkit.torch.pytorch_util as ptu
def GaussianKernel(x, y, bs):
sigma = 1
I = torch.ones([bs, 1])
x_tmp = torch.sum(torch.square(x), dim=1)
y_tmp = torch.sum(torch.square(y), dim=1)
x2 = torch.matmul(I, x_tmp.T)
y2 = torch.matmul(I, y_tmp.T)
normTmp = ... | [
"torch.mean",
"torch.ones",
"numpy.random.uniform",
"numpy.random.randn",
"torch.exp",
"torch.matmul",
"torch.sum",
"torch.square",
"numpy.sqrt"
] | [((126, 145), 'torch.ones', 'torch.ones', (['[bs, 1]'], {}), '([bs, 1])\n', (136, 145), False, 'import torch\n'), ((247, 271), 'torch.matmul', 'torch.matmul', (['I', 'x_tmp.T'], {}), '(I, x_tmp.T)\n', (259, 271), False, 'import torch\n'), ((281, 305), 'torch.matmul', 'torch.matmul', (['I', 'y_tmp.T'], {}), '(I, y_tmp.T... |
"""
This is the main script for running the baseline algorithms reported in the paper.
It should output a folder full of metadata, as well as the summary of results for each algorithm.
"""
import json
import os
import sys
import numpy as np
import pandas as pd
import pathlib2
from sklearn.ensemble import AdaBoostClas... | [
"sklearn.model_selection.StratifiedKFold",
"pandas.Categorical",
"reporter.BaselineReporter.generate_summary",
"pathlib2.Path",
"os.path.join",
"numpy.unique",
"reporter.BaselineReporter"
] | [((1477, 1508), 'pandas.Categorical', 'pd.Categorical', (['full_df[y_name]'], {}), '(full_df[y_name])\n', (1491, 1508), True, 'import pandas as pd\n'), ((1660, 1759), 'sklearn.model_selection.StratifiedKFold', 'StratifiedKFold', ([], {'n_splits': "params['n_folds']", 'shuffle': '(True)', 'random_state': "params['random... |
# ----------------------------------------------------------------------------
# Copyright (c) 2016-2020, empress development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | [
"numpy.zeros_like",
"os.path.isdir",
"pandas.read_csv",
"pkg_resources.resource_filename",
"q2templates.render",
"os.path.join"
] | [((512, 571), 'pkg_resources.resource_filename', 'pkg_resources.resource_filename', (['"""empress"""', '"""support_files"""'], {}), "('empress', 'support_files')\n", (543, 571), False, 'import pkg_resources\n'), ((584, 624), 'os.path.join', 'os.path.join', (['SUPPORT_FILES', '"""templates"""'], {}), "(SUPPORT_FILES, 't... |
# Copyright 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from torch.optim.lr_scheduler import ReduceLROnPlateau
from scipy.stats.mstats import mquantiles
from tqdm import tqdm
import argpars... | [
"scipy.stats.norm.ppf",
"torch.nn.ReLU",
"argparse.ArgumentParser",
"os.path.join",
"matplotlib.pyplot.close",
"matplotlib.pyplot.legend",
"numpy.unique",
"torch.optim.lr_scheduler.ReduceLROnPlateau",
"torch.cat",
"matplotlib.pyplot.figure",
"matplotlib.use",
"torch.Tensor",
"matplotlib.pypl... | [((2278, 2307), 'scipy.stats.norm.ppf', 'stats.norm.ppf', (['x_rank.values'], {}), '(x_rank.values)\n', (2292, 2307), False, 'from scipy import stats\n'), ((3981, 4086), 'torch.optim.lr_scheduler.ReduceLROnPlateau', 'ReduceLROnPlateau', (['opt'], {'patience': '(2)', 'factor': '(0.99)', 'threshold': '(1e-10)', 'min_lr':... |
"""
This module contains code to calculate QNM amplitude and phases given a set of
spherical waveform modes of a given azimuthal index m.
e.g. given h22, h32, h42 spherical modes, these routines will compute the
m = 2, l = 2,3,4 QNMs and m = -2, l = 2,3,4 mirror QNMS
"""
import os
import numpy as np
import pandas as p... | [
"numpy.load",
"numpy.save",
"numpy.abs",
"os.makedirs",
"numpy.std",
"numpy.angle",
"numpy.zeros",
"os.path.exists",
"qnm.modes_cache",
"numpy.min",
"numpy.mean",
"numpy.array",
"numpy.exp",
"numpy.vstack",
"numpy.conjugate",
"numpy.linalg.solve",
"numpy.gradient"
] | [((7060, 7099), 'numpy.gradient', 'np.gradient', (['wavedatas', 'delta_t'], {'axis': '(1)'}), '(wavedatas, delta_t, axis=1)\n', (7071, 7099), True, 'import numpy as np\n'), ((8140, 8186), 'numpy.zeros', 'np.zeros', (['spherical_coefs.shape'], {'dtype': 'complex'}), '(spherical_coefs.shape, dtype=complex)\n', (8148, 818... |
from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import sys
import time
import logging
import itertools
import collections
from copy import copy, deepcopy
import numpy as np
from matplotlib import pyplot as plt
try:
import pygraphviz as pgv
except ImportError:
... | [
"copy.deepcopy",
"collections.defaultdict",
"pygraphviz.AGraph",
"itertools.combinations",
"numpy.max",
"builtins.str",
"logging.getLogger"
] | [((413, 446), 'logging.getLogger', 'logging.getLogger', (['"""preassembler"""'], {}), "('preassembler')\n", (430, 446), False, 'import logging\n'), ((26834, 26849), 'copy.deepcopy', 'deepcopy', (['stmts'], {}), '(stmts)\n', (26842, 26849), False, 'from copy import copy, deepcopy\n'), ((2276, 2291), 'copy.deepcopy', 'de... |
# Copyright 2020 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... | [
"numpy.random.uniform",
"mindspore.export",
"argparse.ArgumentParser",
"mindspore.load_param_into_net",
"mindspore.load_checkpoint",
"mindspore.Tensor",
"os.path.join"
] | [((1021, 1083), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""MindSpore LSTM Exporter"""'}), "(description='MindSpore LSTM Exporter')\n", (1044, 1083), False, 'import argparse\n'), ((1935, 1966), 'mindspore.load_checkpoint', 'load_checkpoint', (['args.ckpt_file'], {}), '(args.ckpt_file)... |
#!/usr/bin/env python3
"""
Authors: <NAME>, <NAME>
Functionality implemented:
- Scraper that retrieves conversations from multiple online web sources
- Formats and outputs conversations in a Pandas table
"""
# Libraries and Dependencies
import demoji
import numpy as np
import pandas as pd
from bs4 import BeautifulSou... | [
"pandas.DataFrame",
"selenium.webdriver.support.expected_conditions.element_to_be_clickable",
"pandas.read_csv",
"demoji.download_codes",
"pathlib.Path",
"selenium.webdriver.ChromeOptions",
"numpy.array",
"webdriver_manager.chrome.ChromeDriverManager",
"bs4.BeautifulSoup",
"selenium.webdriver.supp... | [((850, 873), 'demoji.download_codes', 'demoji.download_codes', ([], {}), '()\n', (871, 873), False, 'import demoji\n'), ((1277, 1302), 'selenium.webdriver.ChromeOptions', 'webdriver.ChromeOptions', ([], {}), '()\n', (1300, 1302), False, 'from selenium import webdriver\n'), ((2169, 2210), 'bs4.BeautifulSoup', 'Beautifu... |
import numpy as np
import cv2
import time
from skimage.measure import find_contours,approximate_polygon
import math
from intervaltree import Interval, IntervalTree # to select not overlapping edges
import numpy_opencv
def load_params():
params={'Kalib': np.array([[570.34,0,319.5],[0, 570.34, 239.5], [0, 0, 1]])... | [
"numpy.delete",
"numpy.argmax",
"numpy.empty",
"numpy.append",
"numpy.array",
"numpy.linalg.inv",
"skimage.measure.find_contours",
"numpy.arange",
"numpy.linalg.norm",
"intervaltree.IntervalTree",
"skimage.measure.approximate_polygon"
] | [((1365, 1395), 'numpy.linalg.inv', 'np.linalg.inv', (["params['Kalib']"], {}), "(params['Kalib'])\n", (1378, 1395), True, 'import numpy as np\n'), ((2562, 2589), 'skimage.measure.find_contours', 'find_contours', (['label_map', '(0)'], {}), '(label_map, 0)\n', (2575, 2589), False, 'from skimage.measure import find_cont... |
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE.md file in the project root
# for full license information.
# ==============================================================================
import numpy as np
import pytest
import cntk as C
from cntk.axis import Axis
def _... | [
"cntk.default_options.default_options",
"cntk.axis.Axis",
"cntk.layers.MaxPooling",
"cntk.constant",
"cntk.layers.Convolution",
"cntk.times",
"numpy.zeros",
"cntk.layers.BlockFunction",
"cntk.plus",
"cntk.input_variable",
"cntk.parameter",
"cntk.logging.graph.find_by_name",
"cntk.sequence.fi... | [((3159, 3206), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""depth"""', '[-1, 0, 1, 5]'], {}), "('depth', [-1, 0, 1, 5])\n", (3182, 3206), False, 'import pytest\n'), ((3613, 4332), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""depth,prefix_count"""', '[(0, {"Input(\'image\'": 1, \'blocked_d... |
"""
Streamlit WhatsApp Chat Analyzer
"""
import re
import os
import time
import warnings
import logging
import logging.config
import yaml
from typing import Dict, Any
import streamlit as st
from numpy import sum as npsum
import matplotlib.pyplot as plt
from wordcloud import WordCloud, STOPWORDS
from processor.transform... | [
"matplotlib.pyplot.title",
"processor.graphs.charts.who_shared_links",
"numpy.sum",
"processor.graphs.charts.max_words_used",
"processor.graphs.charts.message_cluster",
"streamlit.title",
"streamlit.sidebar.title",
"matplotlib.pyplot.figure",
"processor.graphs.charts.top_media_contributor",
"strea... | [((820, 875), 'streamlit.set_option', 'st.set_option', (['"""deprecation.showPyplotGlobalUse"""', '(False)'], {}), "('deprecation.showPyplotGlobalUse', False)\n", (833, 875), True, 'import streamlit as st\n'), ((877, 966), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {'message': '"""Glyph 12... |
# ----------------------------------------------------------------------------
# - Open3D: www.open3d.org -
# ----------------------------------------------------------------------------
# The MIT License (MIT)
#
# Copyright (c) 2018-2021 www.open3d.org
#
# Permission i... | [
"numpy.arctan2",
"open3d.visualization.draw",
"numpy.sin",
"numpy.linalg.norm",
"os.path.join",
"open3d.geometry.VoxelGrid.create_dense",
"sys.path.append",
"os.path.abspath",
"open3d.geometry.Image",
"os.path.dirname",
"open3d_example.get_armadillo_mesh",
"numpy.arccos",
"numpy.asarray",
... | [((1656, 1687), 'sys.path.append', 'sys.path.append', (['pyexample_path'], {}), '(pyexample_path)\n', (1671, 1687), False, 'import sys\n'), ((1610, 1641), 'os.path.dirname', 'os.path.dirname', (['pyexample_path'], {}), '(pyexample_path)\n', (1625, 1641), False, 'import os\n'), ((1799, 1829), 'numpy.sqrt', 'np.sqrt', ([... |
#!/usr/bin/env python3
import os
# sys.path.append('/foss_fim/src')
import geopandas as gpd
from utils.shared_variables import PREP_PROJECTION
from utils.shared_functions import getDriver
from reduce_nhd_stream_density import subset_nhd_network
from adjust_headwater_streams import adjust_headwaters
from shapely.geomet... | [
"os.remove",
"concurrent.futures.ProcessPoolExecutor",
"numpy.argmin",
"os.path.isfile",
"pygeos.linear.line_locate_point",
"shapely.geometry.Point",
"os.path.exists",
"geopandas.GeoDataFrame",
"shapely.wkb.loads",
"reduce_nhd_stream_density.subset_nhd_network",
"geopandas.read_file",
"pygeos.... | [((510, 547), 'os.environ.get', 'os.environ.get', (['"""nhdplus_vectors_dir"""'], {}), "('nhdplus_vectors_dir')\n", (524, 547), False, 'import os\n'), ((563, 593), 'os.environ.get', 'os.environ.get', (['"""wbd_filename"""'], {}), "('wbd_filename')\n", (577, 593), False, 'import os\n'), ((622, 665), 'os.environ.get', 'o... |
from unittest import TestCase
import numpy as np
import cca_zoo.models.innerloop
class TestInnerLoop(TestCase):
def setUp(self):
self.X = np.random.rand(10, 10)
self.Y = np.random.rand(10, 10)
self.Z = np.random.rand(10, 10)
def tearDown(self):
pass
def test_regularize... | [
"numpy.random.rand"
] | [((155, 177), 'numpy.random.rand', 'np.random.rand', (['(10)', '(10)'], {}), '(10, 10)\n', (169, 177), True, 'import numpy as np\n'), ((195, 217), 'numpy.random.rand', 'np.random.rand', (['(10)', '(10)'], {}), '(10, 10)\n', (209, 217), True, 'import numpy as np\n'), ((235, 257), 'numpy.random.rand', 'np.random.rand', (... |
import json
import logging
from argparse import Namespace
import numpy as np
from fairseq import metrics, search, utils
from fairseq.data import encoders
from fairseq.tasks import register_task
from fairseq.tasks.translation_multi_simple_epoch import TranslationMultiSimpleEpochTask
from fairseq.sequence_generator impo... | [
"fairseq.tasks.translation_multi_simple_epoch.TranslationMultiSimpleEpochTask.add_args",
"argparse.Namespace",
"inspect.getfullargspec",
"fairseq.tasks.register_task",
"sacrebleu.compute_bleu",
"sacrebleu.corpus_bleu",
"fairseq.search.BeamSearch",
"numpy.array",
"fairseq.metrics.log_derived",
"log... | [((372, 399), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (389, 399), False, 'import logging\n'), ((403, 459), 'fairseq.tasks.register_task', 'register_task', (['"""translation_multi_simple_epoch_extended"""'], {}), "('translation_multi_simple_epoch_extended')\n", (416, 459), False, 'f... |
from collections import defaultdict
from time import sleep
import numpy as np
import tensorflow as tf
from scipy.misc import imresize
import matplotlib.pyplot as plt
from rllab.envs.mujoco.reach_env import ReachEnv
from rllab.envs.mujoco.arm_env import COLORS, ALL_CONDITIONS
from modular.modular_architecture import c... | [
"modular.display_network.show_graph",
"tensorflow.trainable_variables",
"tensorflow.all_variables",
"matplotlib.pyplot.legend",
"tensorflow.device",
"tensorflow.Session",
"modular.get_rollouts.good_environments",
"collections.defaultdict",
"matplotlib.pyplot.ion",
"modular.get_rollouts.get_rollout... | [((671, 688), 'modular.get_rollouts.get_rollouts', 'get_rollouts', (['env'], {}), '(env)\n', (683, 688), False, 'from modular.get_rollouts import good_environments, get_rollouts, run_sim_policy\n'), ((2505, 2514), 'matplotlib.pyplot.ion', 'plt.ion', ([], {}), '()\n', (2512, 2514), True, 'import matplotlib.pyplot as plt... |
# Function for testing models
import numpy as np
import torch
def test(data, model, pad_idx, device, args):
model.eval()
with torch.no_grad():
all_correct_trials = [] # list of booleans indicating whether correct
for batch in data:
out, attn_wts = model(batch.src, batch.trg)
... | [
"torch.argmax",
"numpy.mean",
"torch.no_grad",
"numpy.logical_or"
] | [((714, 741), 'numpy.mean', 'np.mean', (['all_correct_trials'], {}), '(all_correct_trials)\n', (721, 741), True, 'import numpy as np\n'), ((136, 151), 'torch.no_grad', 'torch.no_grad', ([], {}), '()\n', (149, 151), False, 'import torch\n'), ((334, 358), 'torch.argmax', 'torch.argmax', (['out'], {'dim': '(2)'}), '(out, ... |
import numpy as np
from scipy.linalg import lstsq
from qml.fchl import get_local_kernels
from qml.fchl import get_atomic_local_kernels
from qml.fchl import get_atomic_local_gradient_kernels
# Default fchl kernel values
KERNEL_ARGS = {
"verbose": False,
"cut_distance": 1e6,
"kernel": "gaussian",
"ker... | [
"qml.fchl.get_atomic_local_kernels",
"numpy.concatenate",
"qml.fchl.get_atomic_local_gradient_kernels",
"scipy.linalg.lstsq"
] | [((573, 650), 'qml.fchl.get_atomic_local_kernels', 'get_atomic_local_kernels', (['representations_a', 'representations_b'], {}), '(representations_a, representations_b, **KERNEL_ARGS)\n', (597, 650), False, 'from qml.fchl import get_atomic_local_kernels\n'), ((677, 784), 'qml.fchl.get_atomic_local_gradient_kernels', 'g... |
# 2020.09.18
# finalized 2020.09.29
# @yifan
#
# plot and evl functions
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.pyplot import figure
import cv2
import os
import copy
import pickle
from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import
from matplotlib import cm
from... | [
"evaluate.PSNR",
"pickle.dump",
"matplotlib.pyplot.show",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.figure",
"pickle.load",
"numpy.array",
"matplotlib.ticker.LinearLocator",
"matplotlib.ticker.FormatStrFormatter",
"numpy.mean",
"evaluate.SSIM",
"matplotlib.pypl... | [((2701, 2773), 'matplotlib.pyplot.figure', 'figure', ([], {'num': 'None', 'figsize': '(11, 8)', 'dpi': '(200)', 'facecolor': '"""w"""', 'edgecolor': '"""k"""'}), "(num=None, figsize=(11, 8), dpi=200, facecolor='w', edgecolor='k')\n", (2707, 2773), False, 'from matplotlib.pyplot import figure\n'), ((3251, 3279), 'matpl... |
"""All the layer functions go here.
"""
#<NAME>
#HW2
from __future__ import print_function, absolute_import
import numpy as np
class FullyConnected(object):
"""Fully connected layer 'y = Wx + b'.
Arguments:
shape (tuple): the shape of the fully connected layer. shape[0] is the
output si... | [
"numpy.pad",
"numpy.sum",
"numpy.random.randn",
"numpy.empty",
"numpy.max",
"numpy.dot"
] | [((2631, 2666), 'numpy.empty', 'np.empty', (['x.shape'], {'dtype': 'np.float32'}), '(x.shape, dtype=np.float32)\n', (2639, 2666), True, 'import numpy as np\n'), ((2682, 2722), 'numpy.empty', 'np.empty', (['self.W.shape'], {'dtype': 'np.float32'}), '(self.W.shape, dtype=np.float32)\n', (2690, 2722), True, 'import numpy ... |
import numpy as np
from scipy.interpolate import interp1d
def _Gradient(x,y):
dydx = (y[1:] - y[:-1])/(x[:1] - x[:-1])
return dydx
def _TraceAlt(S,R,B,z,Bm):
Re = 6378.0
#calculate the indices for northern and southern bits of the field line
dRdS = _Gradient(S,R)
zc = 0.5*(z[1:] + z[:-1])
#north
indn =... | [
"numpy.copy",
"numpy.zeros",
"numpy.where",
"numpy.int32",
"scipy.interpolate.interp1d",
"numpy.sqrt"
] | [((1632, 1645), 'numpy.copy', 'np.copy', (['AltN'], {}), '(AltN)\n', (1639, 1645), True, 'import numpy as np\n'), ((321, 352), 'numpy.where', 'np.where', (['((dRdS < 0) & (zc > 0))'], {}), '((dRdS < 0) & (zc > 0))\n', (329, 352), True, 'import numpy as np\n'), ((400, 479), 'scipy.interpolate.interp1d', 'interp1d', (['B... |
import os
from PIL import Image
import torch
from torch.utils import data
import numpy as np
from torchvision import transforms as T
import torchvision
import cv2
import sys
from PIL import ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True
import pickle
import mxnet as mx
class Dataset(data.Dataset):
def __init__... | [
"torch.utils.data.float",
"torch.utils.data.DataLoader",
"cv2.waitKey",
"torch.utils.data.convert",
"numpy.transpose",
"PIL.Image.open",
"torchvision.transforms.ToTensor",
"torchvision.utils.make_grid",
"numpy.array",
"numpy.int32",
"torchvision.transforms.Normalize",
"cv2.imshow",
"os.path.... | [((2387, 2426), 'torch.utils.data.DataLoader', 'data.DataLoader', (['dataset'], {'batch_size': '(10)'}), '(dataset, batch_size=10)\n', (2402, 2426), False, 'from torch.utils import data\n'), ((914, 968), 'torchvision.transforms.Normalize', 'T.Normalize', ([], {'mean': '[0.5, 0.5, 0.5]', 'std': '[0.5, 0.5, 0.5]'}), '(me... |
import numpy as np
from collections import Counter
from nar_module.nar.nar_model import get_list_id
class RecentlyPopularRecommender():
def __init__(self):
pass
def get_recent_popular_item_ids(self):
# get item recent buffer from google service
# recent_items_buffer = self.clicked_it... | [
"collections.Counter",
"numpy.zeros",
"nar_module.nar.nar_model.get_list_id"
] | [((387, 400), 'nar_module.nar.nar_model.get_list_id', 'get_list_id', ([], {}), '()\n', (398, 400), False, 'from nar_module.nar.nar_model import get_list_id\n'), ((689, 717), 'collections.Counter', 'Counter', (['recent_items_buffer'], {}), '(recent_items_buffer)\n', (696, 717), False, 'from collections import Counter\n'... |
import numpy as np
class Arena(object):
def __init__(self, n, h, t):
self.arena = np.array(np.zeros([n, n]), dtype=int)
self.size = n
self.humans = h
self.targets = t
self.action_space = 3
self.time = 0
self.state = 's'
def game_state(self):
if... | [
"numpy.zeros"
] | [((106, 122), 'numpy.zeros', 'np.zeros', (['[n, n]'], {}), '([n, n])\n', (114, 122), True, 'import numpy as np\n')] |
from gutfit.experimentalneutrinomassmatrix import ExperimentalNeutrinoMassMatrix
from gutfit.type1and2seesaw_v3 import Type1And2SeeSaw_v3
from gutfit import parameterlist
def overlap(A,B):
A.sort()
B.sort()
minA = min(A)
minB = min(B)
maxA = max(A)
maxB = max(B)
Ni = 0
if maxA < min... | [
"pymultinest.Analyzer",
"gutfit.experimentalneutrinomassmatrix.ExperimentalNeutrinoMassMatrix",
"os.makedirs",
"optparse.OptionParser",
"matplotlib.pyplot.clf",
"gutfit.parameterlist.ParameterList.fromConfigFile",
"collections.OrderedDict.fromkeys",
"matplotlib.pyplot.style.use",
"numpy.mean",
"gu... | [((2176, 2205), 'numpy.mean', 'np.mean', (['[d[0][0] for d in D]'], {}), '([d[0][0] for d in D])\n', (2183, 2205), True, 'import numpy as np\n'), ((2217, 2246), 'numpy.mean', 'np.mean', (['[t[0][0] for t in T]'], {}), '([t[0][0] for t in T])\n', (2224, 2246), True, 'import numpy as np\n'), ((2306, 2335), 'numpy.mean', ... |
import numpy as np
import sonnet as snt
import tensorflow as tf
from sklearn import tree
import copy
import os
import matplotlib.pyplot as plt
from tqdm import tqdm
import pickle
skew_rank = accu_rank = [24, 39, 2, 21, 31, 36, 19, 20, 18, 33, 25, 27, 1, 6, 8, 7, 32, 3, 11, 34, 5, 9, 12, 37, 23, 0, 28, 38, 29, 15, 16,... | [
"numpy.load",
"copy.deepcopy",
"tensorflow.Session",
"tensorflow.ConfigProto",
"numpy.append",
"numpy.array",
"tensorflow.saved_model.loader.load",
"tensorflow.get_default_graph",
"os.path.join"
] | [((3866, 3882), 'tensorflow.ConfigProto', 'tf.ConfigProto', ([], {}), '()\n', (3880, 3882), True, 'import tensorflow as tf\n'), ((3932, 3957), 'tensorflow.Session', 'tf.Session', ([], {'config': 'config'}), '(config=config)\n', (3942, 3957), True, 'import tensorflow as tf\n'), ((3782, 3836), 'numpy.load', 'np.load', ([... |
import matplotlib.pyplot as plt
import matplotlib.patches as patches
from PIL import Image
import numpy as np
import pycocotools.mask as mask_util
import cv2
classes = [line.rstrip('\n') for line in open('coco_classes.txt')]
# You might need to adjust score threshold
def display_objdetect_image(image, boxes, labels,... | [
"cv2.resize",
"cv2.findContours",
"matplotlib.patches.Rectangle",
"numpy.fromfile",
"numpy.round",
"numpy.zeros",
"PIL.Image.open",
"numpy.array",
"cv2.drawContours",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig"
] | [((2010, 2050), 'PIL.Image.open', 'Image.open', (['"""../images/preprocessed.jpg"""'], {}), "('../images/preprocessed.jpg')\n", (2020, 2050), False, 'from PIL import Image\n'), ((2061, 2106), 'numpy.fromfile', 'np.fromfile', (['"""../labels.data"""'], {'dtype': 'np.int64'}), "('../labels.data', dtype=np.int64)\n", (207... |
# -*- coding: utf-8 -*-
from numpy import (
array,
linspace,
argmin,
take,
isclose,
isin,
around,
all,
abs as np_abs,
)
from scipy import interpolate
def get_common_base(values1, values2, is_extrap=False, is_downsample=False):
"""Returns a common base for vectors values1 and va... | [
"numpy.abs",
"numpy.around",
"numpy.isclose",
"numpy.take",
"numpy.array",
"scipy.interpolate.interp1d"
] | [((2653, 2672), 'numpy.take', 'take', (['values', '[idx]'], {}), '(values, [idx])\n', (2657, 2672), False, 'from numpy import array, linspace, argmin, take, isclose, isin, around, all, abs as np_abs\n'), ((2596, 2636), 'numpy.abs', 'np_abs', (['(axis_values - new_axis_values[0])'], {}), '(axis_values - new_axis_values[... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of the
# GriSPy Project (https://github.com/mchalela/GriSPy).
# Copyright (c) 2019, <NAME>
# License: MIT
# Full Text: https://github.com/mchalela/GriSPy/blob/master/LICENSE
import numpy as np
import matplotlib.pyplot as plt
from grispy import Gri... | [
"matplotlib.pyplot.title",
"numpy.random.uniform",
"matplotlib.pyplot.subplot",
"numpy.random.seed",
"matplotlib.pyplot.show",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.scatter",
"grispy.GriSPy",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.tight_layout"
] | [((671, 688), 'numpy.random.seed', 'np.random.seed', (['(2)'], {}), '(2)\n', (685, 688), True, 'import numpy as np\n'), ((696, 743), 'numpy.random.uniform', 'np.random.uniform', (['(0)', 'Lbox'], {'size': '(Npoints, dim)'}), '(0, Lbox, size=(Npoints, dim))\n', (713, 743), True, 'import numpy as np\n'), ((754, 802), 'nu... |
import os
from config import *
import numpy as np
import tensorflow as tf
import scipy.io
import random
import matplotlib
import matplotlib.pyplot as plt
from matplotlib import colors as mcolors
from skimage import util
import tensorflow.contrib.slim as slim
from tensorflow import initializers as tfinit
# DATASETs
... | [
"matplotlib.pyplot.show",
"random.randint",
"numpy.sum",
"numpy.argmax",
"os.path.join",
"random.shuffle",
"numpy.zeros",
"numpy.expand_dims",
"numpy.transpose",
"numpy.equal",
"tensorflow.placeholder",
"matplotlib.pyplot.figure",
"numpy.rot90",
"random.randrange",
"matplotlib.colors.Lis... | [((8688, 8720), 'numpy.zeros', 'np.zeros', (['(h, w)'], {'dtype': 'np.uint8'}), '((h, w), dtype=np.uint8)\n', (8696, 8720), True, 'import numpy as np\n'), ((8746, 8778), 'numpy.zeros', 'np.zeros', (['(h, w)'], {'dtype': 'np.uint8'}), '((h, w), dtype=np.uint8)\n', (8754, 8778), True, 'import numpy as np\n'), ((8794, 882... |
# pyrates imports
from pyrates.frontend import EdgeTemplate, CircuitTemplate
from pyrates.backend import ComputeGraph
from pyrates.ir import CircuitIR
# additional imports
import numpy as np
import matplotlib.pyplot as plt
from scipy.ndimage.filters import gaussian_filter1d
# general parameters
dt = 1e-1 ... | [
"pyrates.ir.CircuitIR",
"numpy.random.uniform",
"scipy.ndimage.filters.gaussian_filter1d",
"matplotlib.pyplot.show",
"numpy.sum",
"numpy.random.randn",
"matplotlib.pyplot.legend",
"numpy.zeros",
"pyrates.frontend.EdgeTemplate.from_yaml",
"pyrates.ir.CircuitIR.from_yaml",
"matplotlib.pyplot.figur... | [((892, 917), 'numpy.random.randn', 'np.random.randn', (['N_c', 'N_c'], {}), '(N_c, N_c)\n', (907, 917), True, 'import numpy as np\n'), ((1128, 1153), 'numpy.random.randn', 'np.random.randn', (['N_c', 'N_c'], {}), '(N_c, N_c)\n', (1143, 1153), True, 'import numpy as np\n'), ((1364, 1389), 'numpy.random.randn', 'np.rand... |
from matplotlib import pyplot as plt
import pandas as pd
import numpy as np
import os, sys, getopt, pdb
from numpy import *
from numpy.linalg import *
from numpy.random import *
import pylab
namelist = ['Data_P1_RB1.pkl', 'Data_P1_RB2.pkl', 'Data_P1_RB3.pkl']
list_of_dfs = []
for name in namelist:
df = pd.read_pi... | [
"matplotlib.pyplot.title",
"sklearn.preprocessing.StandardScaler",
"sklearn.model_selection.train_test_split",
"sklearn.metrics.f1_score",
"pylab.figure",
"proximityMatrix.proximityMatrix",
"pandas.concat",
"sklearn.ensemble.RandomForestClassifier",
"matplotlib.pyplot.show",
"matplotlib.pyplot.yli... | [((393, 415), 'pandas.concat', 'pd.concat', (['list_of_dfs'], {}), '(list_of_dfs)\n', (402, 415), True, 'import pandas as pd\n'), ((2171, 2208), 'pandas.concat', 'pd.concat', (['[rgb_df1, rgb_df2]'], {'axis': '(1)'}), '([rgb_df1, rgb_df2], axis=1)\n', (2180, 2208), True, 'import pandas as pd\n'), ((3541, 3571), 'numpy.... |
# -*- coding: utf-8 -*-
import os, random
import numpy as np
from sklearn.utils import shuffle
from keras.preprocessing.image import ImageDataGenerator, NumpyArrayIterator
from skimage import transform
from keras_preprocessing.image.affine_transformations import apply_affine_transform
import sys
sys.path.append(os.pa... | [
"numpy.random.seed",
"numpy.empty",
"random.gauss",
"utils.utils.rgb2gray",
"numpy.unique",
"random.seed",
"numpy.reshape",
"numpy.random.choice",
"keras_preprocessing.image.affine_transformations.apply_affine_transform",
"os.path.realpath",
"skimage.transform.warp",
"numpy.squeeze",
"random... | [((8171, 8202), 'skimage.transform.ProjectiveTransform', 'transform.ProjectiveTransform', ([], {}), '()\n', (8200, 8202), False, 'from skimage import transform\n'), ((9097, 9141), 'skimage.transform.warp', 'transform.warp', (['img', 'projection'], {'mode': '"""edge"""'}), "(img, projection, mode='edge')\n", (9111, 9141... |
import numpy as np
import logging
import tensorflow as tf
from tensorflow.python.framework import ops
from tensorflow.keras.optimizers.schedules import LearningRateSchedule
from tensorflow.keras.callbacks import Callback
logging.getLogger("tensorflow").setLevel(logging.ERROR)
class CosineAnnealer:
def __init__(... | [
"tensorflow.keras.backend.set_value",
"tensorflow.convert_to_tensor",
"numpy.floor",
"tensorflow.cast",
"numpy.cos",
"tensorflow.python.framework.ops.name_scope",
"logging.getLogger"
] | [((223, 254), 'logging.getLogger', 'logging.getLogger', (['"""tensorflow"""'], {}), "('tensorflow')\n", (240, 254), False, 'import logging\n'), ((2792, 2830), 'tensorflow.convert_to_tensor', 'tf.convert_to_tensor', (['full_lr_schedule'], {}), '(full_lr_schedule)\n', (2812, 2830), True, 'import tensorflow as tf\n'), ((4... |
"""
The viewer for rendering the gym-idsgame environment. Supports both agent-mode and manual-mode
"""
try:
import pyglet
except ImportError as e:
raise ImportError('''
Cannot import pyglet.
HINT: you can install pyglet directly via 'pip install pyglet'.
But if you really just want to install all Gy... | [
"pyglet.app.run",
"time.sleep",
"numpy.array",
"gym_idsgame.envs.rendering.frames.game_frame.GameFrame",
"pyglet.image.get_buffer_manager",
"sys.exit",
"pyglet.clock.schedule_interval"
] | [((1690, 1735), 'gym_idsgame.envs.rendering.frames.game_frame.GameFrame', 'GameFrame', ([], {'idsgame_config': 'self.idsgame_config'}), '(idsgame_config=self.idsgame_config)\n', (1699, 1735), False, 'from gym_idsgame.envs.rendering.frames.game_frame import GameFrame\n'), ((1832, 1895), 'pyglet.clock.schedule_interval',... |
#!/usr/bin/env python2
import numpy as np
from setpoint_bitmasks import *
from tf.transformations import euler_from_quaternion
def pose2yaw(this_pose):
orientation_q = this_pose.pose.orientation
(_, _, yaw) = euler_from_quaternion([orientation_q.x, orientation_q.y, orientation_q.z, orientation_q.w])
retur... | [
"numpy.uint16",
"tf.transformations.euler_from_quaternion"
] | [((219, 314), 'tf.transformations.euler_from_quaternion', 'euler_from_quaternion', (['[orientation_q.x, orientation_q.y, orientation_q.z, orientation_q.w]'], {}), '([orientation_q.x, orientation_q.y, orientation_q.z,\n orientation_q.w])\n', (240, 314), False, 'from tf.transformations import euler_from_quaternion\n')... |
from __future__ import division
import warnings
import numpy as np
import ROOT
from matplotlib import pyplot as plt
def single_fit(
spec,
fix=list(),
values=dict(),
scales=dict(),
randomize=False,
max_retries=100,
max_calls=1000000,
tol=1e-2):
... | [
"numpy.diag",
"numpy.set_printoptions",
"numpy.copy",
"numpy.asarray",
"numpy.zeros",
"numpy.argsort",
"ROOT.Double",
"numpy.fabs",
"numpy.array",
"numpy.arange",
"numpy.linspace",
"numpy.exp",
"warnings.warn",
"numpy.all"
] | [((1056, 1075), 'numpy.array', 'np.array', (['spec.lows'], {}), '(spec.lows)\n', (1064, 1075), True, 'import numpy as np\n'), ((1088, 1108), 'numpy.array', 'np.array', (['spec.highs'], {}), '(spec.highs)\n', (1096, 1108), True, 'import numpy as np\n'), ((1124, 1146), 'numpy.array', 'np.array', (['spec.central'], {}), '... |
import numpy as np
import math as ma
x = 1.0
y_numpy = np.sin(x)
y_math = ma.sin(x)
print('numpy:',y_numpy)
print('math: ',y_math)
| [
"numpy.sin",
"math.sin"
] | [((55, 64), 'numpy.sin', 'np.sin', (['x'], {}), '(x)\n', (61, 64), True, 'import numpy as np\n'), ((74, 83), 'math.sin', 'ma.sin', (['x'], {}), '(x)\n', (80, 83), True, 'import math as ma\n')] |
# Lint as: python3
# Copyright 2021 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 agr... | [
"numpy.add",
"numpy.array",
"tensorflow_model_analysis.utils.size_estimator.SizeEstimator"
] | [((3520, 3634), 'tensorflow_model_analysis.utils.size_estimator.SizeEstimator', 'size_estimator.SizeEstimator', ([], {'size_threshold': 'self._TOTAL_INPUT_BYTE_SIZE_THRESHOLD', 'size_fn': 'size_estimator_fn'}), '(size_threshold=self.\n _TOTAL_INPUT_BYTE_SIZE_THRESHOLD, size_fn=size_estimator_fn)\n', (3548, 3634), Fa... |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import os
import argparse
from time import gmtime, strftime
import torch
import torch.nn as nn
from torch.utils.data import DataLoader
from tqdm import tqdm
import numpy as np
from utils import *
device = torch.device("cuda" if torch.cuda.is_a... | [
"os.mkdir",
"tqdm.tqdm",
"argparse.ArgumentParser",
"torch.utils.data.DataLoader",
"torch.nn.CrossEntropyLoss",
"torch.set_num_threads",
"torch.cuda.is_available",
"numpy.array",
"torch.no_grad"
] | [((427, 448), 'torch.nn.CrossEntropyLoss', 'nn.CrossEntropyLoss', ([], {}), '()\n', (446, 448), True, 'import torch.nn as nn\n'), ((1088, 1125), 'torch.set_num_threads', 'torch.set_num_threads', (['args.n_workers'], {}), '(args.n_workers)\n', (1109, 1125), False, 'import torch\n'), ((1357, 1381), 'os.mkdir', 'os.mkdir'... |
import unittest
import numpy
import cupy
from cupy import cuda
from cupy import testing
import cupyx.scipy.linalg
if cupyx.scipy._scipy_available:
import scipy.linalg
@testing.gpu
@testing.parameterize(*testing.product({
'shape': [(1, 1), (2, 2), (3, 3), (5, 5)],
}))
@testing.fix_random()
@unittest.skipUnles... | [
"cupy.testing.fix_random",
"cupy.asarray",
"numpy.random.randn",
"numpy.asarray",
"cupy.testing.assert_array_equal",
"unittest.skipUnless",
"cupy.testing.with_requires",
"cupy.testing.numpy_cupy_allclose",
"cupy.testing.product",
"cupy.testing.shaped_random",
"cupy.testing.for_float_dtypes",
"... | [((280, 300), 'cupy.testing.fix_random', 'testing.fix_random', ([], {}), '()\n', (298, 300), False, 'from cupy import testing\n'), ((302, 390), 'unittest.skipUnless', 'unittest.skipUnless', (['cuda.cusolver_enabled', '"""Only cusolver in CUDA 8.0 is supported"""'], {}), "(cuda.cusolver_enabled,\n 'Only cusolver in C... |
from math import sqrt
import matplotlib.pyplot as plt
import numpy as np
from prettytable import PrettyTable
headers = PrettyTable(['№', 'x1', 'x2', 'function(x1,x2)', 'dgrad'])
def table(count, x1, x2, delta_grad, function):
Tablelist = {
'№': count,
'x1': round(x1, 7),
'x2': round(x2, ... | [
"matplotlib.pyplot.clabel",
"numpy.meshgrid",
"matplotlib.pyplot.show",
"math.sqrt",
"matplotlib.pyplot.plot",
"numpy.ravel",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.contour",
"numpy.arange",
"prettytable.PrettyTable",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel"
] | [((121, 179), 'prettytable.PrettyTable', 'PrettyTable', (["['№', 'x1', 'x2', 'function(x1,x2)', 'dgrad']"], {}), "(['№', 'x1', 'x2', 'function(x1,x2)', 'dgrad'])\n", (132, 179), False, 'from prettytable import PrettyTable\n'), ((1162, 1203), 'math.sqrt', 'sqrt', (['(gradient[0] ** 2 + gradient[1] ** 2)'], {}), '(gradie... |
"""
DSACALIB/UTILS.PY
<NAME>, <EMAIL>, 10/2019
Modified for python3 from DSA-10 routines written by <NAME>, <NAME>.
Routines to interact w/ fits visibilities recorded by DSA-10, hdf5 visibilities
recorded by DSA-110, and visibility in CASA measurement sets.
"""
# TODO: Update source class
# Always import scipy bef... | [
"numpy.abs",
"casatools.measures",
"numpy.std",
"numpy.median",
"traceback.format_tb",
"numpy.mean",
"antpos.utils.get_itrf",
"numpy.array",
"numpy.sin",
"numpy.loadtxt",
"numpy.tan",
"numpy.cos",
"astropy.coordinates.Angle",
"scipy.ndimage.filters.median_filter"
] | [((7337, 7375), 'numpy.std', 'np.std', (['vis_avg'], {'axis': '(1)', 'keepdims': '(True)'}), '(vis_avg, axis=1, keepdims=True)\n', (7343, 7375), True, 'import numpy as np\n'), ((6918, 6960), 'numpy.mean', 'np.mean', (['vis'], {'axis': 'avg_axis', 'keepdims': '(True)'}), '(vis, axis=avg_axis, keepdims=True)\n', (6925, 6... |
import random
from collections import namedtuple
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import gym
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns; sns.set()
Experience = namedtuple("Experience", field_names="state action reward next_... | [
"random.sample",
"torch.cat",
"numpy.mean",
"torch.nn.init.calculate_gain",
"torch.no_grad",
"torch.nn.init.kaiming_normal_",
"torch.load",
"numpy.max",
"torch.nn.Linear",
"torch.zeros",
"seaborn.set",
"matplotlib.pyplot.show",
"torch.nn.functional.mse_loss",
"matplotlib.pyplot.ylabel",
... | [((232, 241), 'seaborn.set', 'sns.set', ([], {}), '()\n', (239, 241), True, 'import seaborn as sns\n'), ((257, 332), 'collections.namedtuple', 'namedtuple', (['"""Experience"""'], {'field_names': '"""state action reward next_state done"""'}), "('Experience', field_names='state action reward next_state done')\n", (267, ... |
import os
import numpy as np
import subprocess
def redrock_scripts(i, flag='v0p5'):
''' generate scripts for running redrock
'''
# job name
fjob = os.path.join('cori_redrock%i.slurm' % i)
queue = 'regular'
constraint = 'knl'
jb = '\n'.join([
'#!/bin/bash',
'#SBA... | [
"numpy.array",
"subprocess.check_output",
"os.path.isfile",
"os.path.join"
] | [((170, 210), 'os.path.join', 'os.path.join', (["('cori_redrock%i.slurm' % i)"], {}), "('cori_redrock%i.slurm' % i)\n", (182, 210), False, 'import os\n'), ((1461, 1534), 'os.path.join', 'os.path.join', (["('cori_redrock.TSreview.exp%i.texp_%.f.slurm' % (iexp, texp))"], {}), "('cori_redrock.TSreview.exp%i.texp_%.f.slurm... |
import numpy as np
import numpy.random as random
import sys
import h5py
import scipy.ndimage as img
import scipy.interpolate as interp
import scipy.io
import astropy.units as u
import astropy.constants as const
import astropy.table as at
import astropy.io
import data.tellurics.skycalc.skycalc as skycalc
import data... | [
"numpy.empty",
"numpy.ones",
"numpy.sin",
"numpy.arange",
"numpy.exp",
"numpy.linalg.norm",
"numpy.random.normal",
"numpy.max",
"numpy.repeat",
"numpy.min",
"astropy.table.Table.read",
"sys.exit",
"numpy.log",
"numpy.zeros",
"numpy.expand_dims",
"scipy.ndimage.convolve",
"numpy.where... | [((791, 807), 'numpy.log', 'np.log', (['lamb_min'], {}), '(lamb_min)\n', (797, 807), True, 'import numpy as np\n'), ((821, 837), 'numpy.log', 'np.log', (['lamb_max'], {}), '(lamb_max)\n', (827, 837), True, 'import numpy as np\n'), ((1551, 1584), 'numpy.log', 'np.log', (['(lamb_stellar / u.Angstrom)'], {}), '(lamb_stell... |
from bs4 import BeautifulSoup
import numpy as np
PI = np.pi
import csv
import os
from collections import OrderedDict
import re
OUTPUT_FILE = 'gpx_processed_info.csv'
MAX_SPEED = 50#mph
#radius of earth in miles
C_R = 6371/1.60934
def distcalc(c1, c2):
lat1 = float(c1['lat'])*PI/180.
lon1 = float(c1['lon'])... | [
"os.listdir",
"os.setwd",
"numpy.sum",
"os.makedirs",
"os.path.join",
"numpy.abs",
"os.getcwd",
"os.path.exists",
"numpy.diff",
"numpy.sin",
"numpy.cos",
"collections.OrderedDict",
"re.sub",
"os.chdir",
"numpy.sqrt"
] | [((920, 939), 'numpy.diff', 'np.diff', (['velocities'], {}), '(velocities)\n', (927, 939), True, 'import numpy as np\n'), ((1086, 1138), 're.sub', 're.sub', (['"""([^.]+)\\\\.gpx"""', '"""raw_csv/\\\\1.csv"""', 'filename'], {}), "('([^.]+)\\\\.gpx', 'raw_csv/\\\\1.csv', filename)\n", (1092, 1138), False, 'import re\n')... |
#!/sscc/opt/anaconda3/bin/python
import numpy as nump
ndsa = 58 #number of DSAs
###################################################################Simulation Engine Classes#####################################################
class Event:
"""
This is an Event class.
Attributes:
@event_type: type o... | [
"numpy.zeros"
] | [((1659, 1683), 'numpy.zeros', 'nump.zeros', ([], {'shape': '(1, 3)'}), '(shape=(1, 3))\n', (1669, 1683), True, 'import numpy as nump\n'), ((1748, 1772), 'numpy.zeros', 'nump.zeros', ([], {'shape': '(1, 3)'}), '(shape=(1, 3))\n', (1758, 1772), True, 'import numpy as nump\n'), ((1847, 1871), 'numpy.zeros', 'nump.zeros',... |
from __future__ import print_function
import os
import numpy as np
import tensorflow as tf
import tensorflow as image_summary
from tensorflow.examples.tutorials.mnist import input_data
from tensorflow.python.client import device_lib
import matplotlib.pyplot as plt
from collections import namedtuple
import pickle
# from... | [
"tensorflow.reset_default_graph",
"tensorflow.reshape",
"tensorflow.train.AdamOptimizer",
"tensorflow.ConfigProto",
"matplotlib.pyplot.figure",
"tensorflow.Variable",
"pickle.load",
"tensorflow.nn.conv2d",
"tensorflow.matmul",
"matplotlib.pyplot.gca",
"tensorflow.GPUOptions",
"matplotlib.pyplo... | [((417, 454), 'tensorflow.keras.datasets.cifar10.load_data', 'tf.keras.datasets.cifar10.load_data', ([], {}), '()\n', (452, 454), True, 'import tensorflow as tf\n'), ((606, 634), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(10, 10)'}), '(figsize=(10, 10))\n', (616, 634), True, 'import matplotlib.pyplot ... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
####
# <NAME>
# Email: <EMAIL>
# Midterm
# PHYS 220
# 10/26/2018
####
import matplotlib.pyplot as plt
import numpy as np
class MysterySequence(object):
"""
Creates object with four attributes: (r)- value that is evaluated, (x0)- initial x value, (N)- number of it... | [
"matplotlib.pyplot.axes",
"matplotlib.pyplot.figure",
"numpy.arange",
"matplotlib.pyplot.subplots"
] | [((2171, 2195), 'numpy.arange', 'np.arange', (['(2.9)', '(4)', '(0.001)'], {}), '(2.9, 4, 0.001)\n', (2180, 2195), True, 'import numpy as np\n'), ((2396, 2425), 'matplotlib.pyplot.subplots', 'plt.subplots', ([], {'figsize': '(12, 8)'}), '(figsize=(12, 8))\n', (2408, 2425), True, 'import matplotlib.pyplot as plt\n'), ((... |
import numpy as np
import torch
from padertorch.contrib.je.modules.gmm import GMM
from padertorch.ops.losses import gaussian_kl_divergence
from torch import nn
from padertorch.contrib.je.modules.hmm_utils import batch_forward_backward, batch_viterbi, squeeze_sequence
from padertorch.utils import to_list
class HMM(GM... | [
"torch.log_softmax",
"torch.ones_like",
"numpy.zeros_like",
"padertorch.utils.to_list",
"numpy.log",
"numpy.zeros",
"numpy.ones",
"torch.Tensor",
"numpy.arange",
"padertorch.contrib.je.modules.hmm_utils.batch_viterbi",
"padertorch.contrib.je.modules.hmm_utils.squeeze_sequence",
"padertorch.con... | [((946, 983), 'numpy.zeros', 'np.zeros', (['(num_units * states_per_unit)'], {}), '(num_units * states_per_unit)\n', (954, 983), True, 'import numpy as np\n'), ((1270, 1349), 'numpy.arange', 'np.arange', (['(self.states_per_unit - 1)', '(self.num_classes - 1)', 'self.states_per_unit'], {}), '(self.states_per_unit - 1, ... |
#!/usr/bin/env python3
import numpy as np
from gaussianKernel import gaussianKernel
from svmTrain import svmTrain
from svmPredict import svmPredict
def dataset3Params(X, y, Xval, yval):
#EX6PARAMS returns your choice of C and sigma for Part 3 of the exercise
#where you select the optimal (C, sigma) learning... | [
"svmPredict.svmPredict",
"numpy.mean",
"svmTrain.svmTrain"
] | [((1494, 1550), 'svmTrain.svmTrain', 'svmTrain', (['X', 'y', 'C_val', 'gaussianKernel'], {'args': '(sigma_val,)'}), '(X, y, C_val, gaussianKernel, args=(sigma_val,))\n', (1502, 1550), False, 'from svmTrain import svmTrain\n'), ((1577, 1600), 'svmPredict.svmPredict', 'svmPredict', (['model', 'Xval'], {}), '(model, Xval)... |
# -*- coding:utf-8 -*-
import argparse
import sys
import os
import torch
import torch.nn as nn
from torch.autograd import Variable
import torchvision
import torchvision.datasets as datasets
import torchvision.transforms as transforms
from torchvision.utils import save_image
from models import Generator, Discriminator,... | [
"torchvision.models.vgg19",
"models.Discriminator",
"torchvision.datasets.CIFAR10",
"torchvision.transforms.Pad",
"train.setup",
"torchvision.transforms.Normalize",
"torch.ones",
"torch.nn.MSELoss",
"torch.nn.BCELoss",
"torch.load",
"torch.FloatTensor",
"torchvision.transforms.ToPILImage",
"... | [((475, 482), 'train.setup', 'setup', ([], {}), '()\n', (480, 482), False, 'from train import setup\n'), ((1183, 1258), 'torchvision.transforms.Normalize', 'transforms.Normalize', ([], {'mean': '[0.485, 0.456, 0.406]', 'std': '[0.229, 0.224, 0.225]'}), '(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])\n', (1203,... |
from __future__ import print_function
import argparse
import json
from collections import defaultdict
import numpy as np
parser = argparse.ArgumentParser()
parser.add_argument('--questions_file', required=True)
parser.add_argument('--answers_file', required=True)
def main(args):
# Load true answers from questions... | [
"collections.defaultdict",
"numpy.asarray",
"json.load",
"argparse.ArgumentParser"
] | [((132, 157), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (155, 157), False, 'import argparse\n'), ((518, 535), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (529, 535), False, 'from collections import defaultdict\n'), ((1226, 1242), 'numpy.asarray', 'np.asarray', (['... |
#!/usr/bin/env python3
import numpy as np
import wave
import struct
import sys
from sbc import *
from sbc_synthesis_v1 import *
V = np.zeros(shape = (2, 10*2*8))
N = np.zeros(shape = (16,8))
total_time_ms = 0
mSBC_enabled = 1
H2_first_byte = 0
H2_second_byte = 0
def find_syncword(h2_first_byte, h2_second_byte):
i... | [
"wave.open",
"numpy.zeros",
"struct.pack",
"numpy.cos",
"numpy.int16",
"numpy.ndarray",
"sys.exit"
] | [((133, 164), 'numpy.zeros', 'np.zeros', ([], {'shape': '(2, 10 * 2 * 8)'}), '(shape=(2, 10 * 2 * 8))\n', (141, 164), True, 'import numpy as np\n'), ((167, 190), 'numpy.zeros', 'np.zeros', ([], {'shape': '(16, 8)'}), '(shape=(16, 8))\n', (175, 190), True, 'import numpy as np\n'), ((2202, 2272), 'numpy.zeros', 'np.zeros... |
import time
import os
import pathlib
from absl import app, flags, logging
from absl.flags import FLAGS
import cv2
import numpy as np
import tensorflow as tf
from yolov3_tf2.models import (
YoloV3, YoloV3Tiny
)
from yolov3_tf2.dataset import transform_images, load_tfrecord_dataset
from yolov3_tf2.utils import draw... | [
"yolov3_tf2.dataset.transform_images",
"absl.logging.info",
"pathlib.Path",
"yolov3_tf2.utils.draw_outputs",
"absl.flags.DEFINE_boolean",
"os.path.join",
"os.chdir",
"cv2.imwrite",
"absl.flags.DEFINE_integer",
"yolov3_tf2.models.YoloV3Tiny",
"tensorflow.config.experimental.set_memory_growth",
... | [((330, 405), 'absl.flags.DEFINE_string', 'flags.DEFINE_string', (['"""classes"""', '"""./data/coco.names"""', '"""path to classes file"""'], {}), "('classes', './data/coco.names', 'path to classes file')\n", (349, 405), False, 'from absl import app, flags, logging\n'), ((406, 491), 'absl.flags.DEFINE_string', 'flags.D... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue May 19 15:27:48 2020
@author: virati
Patient specific readouts for a *PREDICTIVE* model without need for parsimony
"""
from DBSpace.readout import BR_DataFrame as BRDF
from DBSpace.readout import ClinVect, decoder
from DBSpace.readout.BR_DataFrame imp... | [
"DBSpace.readout.decoder.var_decoder",
"DBSpace.nestdict",
"numpy.sum",
"DBSpace.readout.ClinVect.CStruct"
] | [((1240, 1258), 'DBSpace.readout.ClinVect.CStruct', 'ClinVect.CStruct', ([], {}), '()\n', (1256, 1258), False, 'from DBSpace.readout import ClinVect, decoder\n'), ((1477, 1487), 'DBSpace.nestdict', 'nestdict', ([], {}), '()\n', (1485, 1487), False, 'from DBSpace import nestdict\n'), ((1528, 1664), 'DBSpace.readout.deco... |
import numpy as np
import scipy
class nerual_newtork(object):
def __init__(self, input_layers, hidden_layers, output_layers, learning_rate = 0.1, n_iterations =100 ):
self.input_nodes = input_layers
self.hidden_nodes = hidden_layers
self.output_nodes = output_layers
self.learning_ra... | [
"numpy.random.rand",
"numpy.dot",
"numpy.array",
"scipy.special.expit"
] | [((834, 880), 'numpy.dot', 'np.dot', (['self.weights_with_input_hidden', 'inputs'], {}), '(self.weights_with_input_hidden, inputs)\n', (840, 880), True, 'import numpy as np\n'), ((971, 1026), 'numpy.dot', 'np.dot', (['self.weights_with_output_hidden', 'hidden_outputs'], {}), '(self.weights_with_output_hidden, hidden_ou... |
import numpy as np
from pyldpc import (make_ldpc, binaryproduct, ldpc_images)
from pyldpc.utils_img import gray2bin, rgb2bin
import pytest
from itertools import product
@pytest.mark.filterwarnings("ignore: In LDPC applications, using systematic")
@pytest.mark.parametrize("systematic, sparse",
... | [
"pyldpc.make_ldpc",
"numpy.random.RandomState",
"pyldpc.binaryproduct",
"pyldpc.ldpc_images.encode_img",
"pyldpc.utils_img.gray2bin",
"pyldpc.ldpc_images.decode_img",
"itertools.product",
"pytest.mark.filterwarnings",
"pyldpc.utils_img.rgb2bin"
] | [((173, 249), 'pytest.mark.filterwarnings', 'pytest.mark.filterwarnings', (['"""ignore: In LDPC applications, using systematic"""'], {}), "('ignore: In LDPC applications, using systematic')\n", (199, 249), False, 'import pytest\n'), ((968, 1044), 'pytest.mark.filterwarnings', 'pytest.mark.filterwarnings', (['"""ignore:... |
"""
Compare the various algorithms on a synthetic dataset.
"""
import pickle
import os
import copy
import gzip
import numpy as np
# Use the Agg backend in running on a server without the DISPLAY variable
if "DISPLAY" not in os.environ:
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
# i... | [
"harness.fit_standard_hawkes_model_bfgs",
"matplotlib.pyplot.subplot",
"copy.deepcopy",
"matplotlib.pyplot.show",
"os.path.join",
"numpy.random.seed",
"gzip.open",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.ylim",
"os.path.dirname",
"hips.plotting.colormaps.harvard_colors",
"numpy.ones",
"... | [((263, 284), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (277, 284), False, 'import matplotlib\n'), ((1021, 1042), 'hips.plotting.layout.create_figure', 'create_figure', (['(4, 3)'], {}), '((4, 3))\n', (1034, 1042), False, 'from hips.plotting.layout import create_figure\n'), ((1082, 1098), 'h... |
from numpy import zeros,mean,std, sum, array,inf,isinf
import copy
from multiprocessing import Process, Manager, Queue
from queue import Empty
import time
def summed_sq_error(features,segment_ends):
num_segs = len(segment_ends)
seg_begin = 0
sse = 0
for l in range(0,num_segs):
seg_end = segme... | [
"copy.deepcopy",
"numpy.sum",
"numpy.std",
"multiprocessing.Manager",
"numpy.zeros",
"time.sleep",
"time.time",
"numpy.mean",
"multiprocessing.Queue",
"multiprocessing.Process"
] | [((637, 661), 'numpy.zeros', 'zeros', (['(1, num_features)'], {}), '((1, num_features))\n', (642, 661), False, 'from numpy import zeros, mean, std, sum, array, inf, isinf\n'), ((1220, 1246), 'copy.deepcopy', 'copy.deepcopy', (['segment_set'], {}), '(segment_set)\n', (1233, 1246), False, 'import copy\n'), ((1533, 1540),... |
"""
sigma.py
"""
import numpy as np
def sigma(self, n):
pol = n.shape[1]
if pol == 1:
sigma = (self.grada @ n) ** 2 + (self.gradr @ n) ** 2
elif pol == 2:
npoints = n.shape[0]
sigma = np.zeros((npoints, 3))
sigma[:,2] = (self.grada @ n[:, 1]) ** 2 + (self.gradr @ n[:,... | [
"numpy.zeros"
] | [((227, 249), 'numpy.zeros', 'np.zeros', (['(npoints, 3)'], {}), '((npoints, 3))\n', (235, 249), True, 'import numpy as np\n')] |
""" Han """
import numpy as np
from shapely.geometry import Point, Polygon, LineString, MultiLineString
import matplotlib.pyplot as plt
""" Parameters to specify """
POLYGONS = {
"triangle.obj": [(0, 0), (0.068 + 0.002, 0), (0.068 + 0.002, 0.053 + 0.002), (0, 0.053 + 0.002)],
"square.obj": [(0, 0), (0.07 + 0.0... | [
"numpy.random.uniform",
"numpy.random.seed",
"shapely.geometry.Polygon",
"numpy.copy",
"numpy.asarray",
"numpy.transpose",
"numpy.random.randint",
"numpy.array",
"numpy.sin",
"numpy.cos",
"numpy.random.choice"
] | [((1342, 1553), 'numpy.asarray', 'np.asarray', (['[[78.0, 151.0, 167.0], [89.0, 161.0, 109.0], [186, 117, 95], [242, 172, 43],\n [237.0, 201.0, 102.0], [216, 176, 172], [255.0, 117.0, 89.0], [176, 122,\n 191], [148, 183, 178], [255, 187, 167]]'], {}), '([[78.0, 151.0, 167.0], [89.0, 161.0, 109.0], [186, 117, 95],... |
from pathlib import Path
from typing import Dict
from typing import List
from typing import Optional
import numpy
from astropy.io import fits
from tqdm import tqdm
from utils import paths
__all__ = ['extract_apogee', 'APOGEE_OUT_PATH', 'JSON_PATH']
APO_TELESCOPE = '25m'
APOGEE_PATH = Path(f'/data/abd/sdss/stars/ap... | [
"tqdm.tqdm",
"numpy.asarray",
"numpy.zeros",
"numpy.expand_dims",
"utils.paths.RESULTS_DIR.joinpath",
"pathlib.Path",
"utils.paths.DATA_DIR.joinpath",
"numpy.mean"
] | [((367, 417), 'utils.paths.DATA_DIR.joinpath', 'paths.DATA_DIR.joinpath', (['f"""apo{APO_TELESCOPE}.npy"""'], {}), "(f'apo{APO_TELESCOPE}.npy')\n", (390, 417), False, 'from utils import paths\n'), ((441, 501), 'utils.paths.DATA_DIR.joinpath', 'paths.DATA_DIR.joinpath', (['f"""apo{APO_TELESCOPE}_filenames.csv"""'], {}),... |
# -*- coding: utf-8 -*-
import numpy
import os
import run_model
import datetime
import argparse
from logger import create_logger
def main():
parser = argparse.ArgumentParser(
description='Training model ... '
)
#
# The directory from which to find the data. default in data_... | [
"os.path.abspath",
"os.getpid",
"argparse.ArgumentParser",
"os.makedirs",
"logger.create_logger",
"run_model.train_model",
"numpy.float32",
"os.path.exists",
"datetime.datetime.now",
"numpy.int32",
"os.path.join"
] | [((170, 228), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Training model ... """'}), "(description='Training model ... ')\n", (193, 228), False, 'import argparse\n'), ((2842, 2853), 'os.getpid', 'os.getpid', ([], {}), '()\n', (2851, 2853), False, 'import os\n'), ((3084, 3120), 'os.pat... |
"""@package docstring
Encoding and decoding python native data structures as
portable JData-spec annotated dict structure
Copyright (c) 2019-2022 <NAME> <q.<EMAIL> at neu.edu>
"""
__all__ = ['encode','decode','jdtype','jsonfilter']
##===================================================================================... | [
"copy.deepcopy",
"backports.lzma.decompress",
"numpy.asarray",
"numpy.dtype",
"numpy.isinf",
"base64.b64decode",
"numpy.isnan",
"zlib.compress",
"backports.lzma.compress",
"base64.b64encode"
] | [((10784, 10801), 'copy.deepcopy', 'copy.deepcopy', (['d0'], {}), '(d0)\n', (10797, 10801), False, 'import copy\n'), ((11103, 11120), 'copy.deepcopy', 'copy.deepcopy', (['d0'], {}), '(d0)\n', (11116, 11120), False, 'import copy\n'), ((2467, 2478), 'numpy.isnan', 'np.isnan', (['d'], {}), '(d)\n', (2475, 2478), True, 'im... |
import dask.array
import h5py
import numpy as np
import torch
import torch.utils.data
class DaskDataset(torch.utils.data.Dataset):
"""
This represents a dataset store in a dask array. As such it can handle
datasets that are too big to fit into memory.
When queried for training examples, it returns to... | [
"h5py.File",
"numpy.array"
] | [((2155, 2208), 'h5py.File', 'h5py.File', (['self.h5fn', '"""r"""'], {'libver': '"""latest"""', 'swmr': '(True)'}), "(self.h5fn, 'r', libver='latest', swmr=True)\n", (2164, 2208), False, 'import h5py\n'), ((3140, 3166), 'numpy.array', 'np.array', (['self.data[index]'], {}), '(self.data[index])\n', (3148, 3166), True, '... |
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright 2020 by ShabaniPy Authors, see AUTHORS for more details.
#
# Distributed under the terms of the MIT license.
#
# The full license is in the file LICENCE, distributed with this software.
# ----------------... | [
"matplotlib.pyplot.show",
"numpy.abs",
"numpy.copy",
"scipy.signal.peak_widths",
"numpy.argmax",
"matplotlib.pyplot.plot",
"numpy.nditer",
"matplotlib.pyplot.figure",
"lmfit.models.GaussianModel",
"numpy.concatenate"
] | [((1289, 1302), 'numpy.argmax', 'np.argmax', (['ic'], {}), '(ic)\n', (1298, 1302), True, 'import numpy as np\n'), ((1319, 1361), 'scipy.signal.peak_widths', 'peak_widths', (['ic', '[max_loc]'], {'rel_height': '(0.5)'}), '(ic, [max_loc], rel_height=0.5)\n', (1330, 1361), False, 'from scipy.signal import peak_widths\n'),... |
import numpy as np
from tqdm import tqdm
from scipy import misc
from collections import deque, namedtuple
from datetime import datetime
import matplotlib.pyplot as plt
import tensorflow as tf
import os
from utils import linear_scale, preprocess, LearnerState
class DoubleDQNLearner(object):
#Args
# imsize: int... | [
"numpy.load",
"numpy.sum",
"tensorflow.trainable_variables",
"numpy.argmax",
"utils.LearnerState",
"tensorflow.train.RMSPropOptimizer",
"datetime.datetime.utcnow",
"tensorflow.assign",
"numpy.mean",
"numpy.arange",
"tensorflow.summary.merge",
"tensorflow.clip_by_global_norm",
"collections.de... | [((2560, 2589), 'collections.deque', 'deque', ([], {'maxlen': 'self.max_memory'}), '(maxlen=self.max_memory)\n', (2565, 2589), False, 'from collections import deque, namedtuple\n'), ((2637, 2647), 'tensorflow.Graph', 'tf.Graph', ([], {}), '()\n', (2645, 2647), True, 'import tensorflow as tf\n'), ((3332, 3356), 'tensorf... |
#!/usr/bin python3
# Imports
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Python:
import logging
from os import getenv
from urllib.parse import urlparse, unquote_plus
from dataclasses import dataclass
from functools import lru_cache
from typing import Awaitable, Union, ... | [
"pandas.DataFrame",
"asyncpg.connect",
"datetime.datetime.fromisoformat",
"numpy.ceil",
"orjson.loads",
"logging.getLogger",
"logging.info",
"orjson.dumps",
"functools.lru_cache",
"os.getenv",
"urllib.parse.urlparse"
] | [((1213, 1244), 'os.getenv', 'getenv', (['"""API_ENV"""', '"""PRODUCTION"""'], {}), "('API_ENV', 'PRODUCTION')\n", (1219, 1244), False, 'from os import getenv\n'), ((2016, 2042), 'logging.getLogger', 'logging.getLogger', (['"""azure"""'], {}), "('azure')\n", (2033, 2042), False, 'import logging\n'), ((7317, 7330), 'fun... |
# -*- coding: utf-8 -*-
"""
@author: <NAME>
"""
import os
import time
import numpy as np
from keras.models import Model
from keras.layers import Input, Dense, BatchNormalization, LeakyReLU, Flatten, Activation, Reshape
from keras.optimizers import Adam
from keras.utils import plot_model
from utils.datasets import DA... | [
"numpy.random.uniform",
"os.makedirs",
"keras.layers.Activation",
"keras.layers.Flatten",
"time.strftime",
"keras.models.Model",
"os.path.exists",
"utils.saving.save_loss_log",
"keras.optimizers.Adam",
"numpy.zeros",
"numpy.random.randint",
"numpy.ones",
"numpy.array",
"keras.layers.Input"... | [((755, 785), 'time.strftime', 'time.strftime', (['"""%Y%m%d-%H%M%S"""'], {}), "('%Y%m%d-%H%M%S')\n", (768, 785), False, 'import time\n'), ((2486, 2518), 'keras.layers.Input', 'Input', (['img_shape'], {'name': '"""D_Input"""'}), "(img_shape, name='D_Input')\n", (2491, 2518), False, 'from keras.layers import Input, Dens... |
import sys
from collections import defaultdict
import numpy as np
import os
sys.path.append("../RQ1_1/")
import utils as ut
def get_basic(tool_combs,single_tool_base_path,proj,ver,mix_unmodified):
method_cate = defaultdict(list) #index of Unmodified_ranking
method_value = dict() #suspicious value
meth... | [
"sys.path.append",
"os.path.exists",
"collections.defaultdict",
"utils.get_final",
"numpy.sort",
"numpy.array",
"utils.get_static_final"
] | [((76, 104), 'sys.path.append', 'sys.path.append', (['"""../RQ1_1/"""'], {}), "('../RQ1_1/')\n", (91, 104), False, 'import sys\n'), ((216, 233), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (227, 233), False, 'from collections import defaultdict\n'), ((331, 348), 'collections.defaultdict', 'def... |
from transformers import AutoModelForSequenceClassification, Trainer, TrainingArguments, AutoTokenizer
from sklearn.metrics import accuracy_score, precision_recall_fscore_support
from datasets import load_dataset
import random
import logging
import sys
import argparse
import os
import torch
import json
import numpy as ... | [
"numpy.random.seed",
"argparse.ArgumentParser",
"sklearn.metrics.accuracy_score",
"logging.getLevelName",
"torch.nn.Softmax",
"torch.no_grad",
"os.path.join",
"sklearn.metrics.precision_recall_fscore_support",
"json.loads",
"random.seed",
"torch.manual_seed",
"logging.StreamHandler",
"transf... | [((351, 378), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (368, 378), False, 'import logging\n'), ((917, 942), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (940, 942), False, 'import argparse\n'), ((2067, 2113), 'transformers.AutoTokenizer.from_pretrained', '... |
from .context import lux
import pytest
import pandas as pd
import numpy as np
from lux.utils import date_utils
from lux.executor.PandasExecutor import PandasExecutor
def test_dateformatter():
ldf = pd.read_csv("lux/data/car.csv")
ldf["Year"] = pd.to_datetime(ldf["Year"], format='%Y') # change pandas dtype for the c... | [
"pandas.DataFrame",
"lux.vis.Vis.Vis",
"pandas.read_csv",
"numpy.datetime64",
"pytest.warns",
"pandas.DatetimeIndex",
"pandas.to_datetime",
"lux.executor.PandasExecutor.PandasExecutor.execute",
"lux.utils.date_utils.date_formatter"
] | [((200, 231), 'pandas.read_csv', 'pd.read_csv', (['"""lux/data/car.csv"""'], {}), "('lux/data/car.csv')\n", (211, 231), True, 'import pandas as pd\n'), ((247, 287), 'pandas.to_datetime', 'pd.to_datetime', (["ldf['Year']"], {'format': '"""%Y"""'}), "(ldf['Year'], format='%Y')\n", (261, 287), True, 'import pandas as pd\n... |
import numpy
import csb.numeric
import csb.test as test
from csb.statmech.ensembles import BoltzmannEnsemble, TsallisEnsemble, CompositeEnsemble
@test.functional
class TestEnergy(test.Case):
def testBoltzmann(self):
e = numpy.linspace(-50, 1000, 1000)
be = BoltzmannEnsemble(beta=1,)
te... | [
"numpy.linspace",
"csb.statmech.ensembles.BoltzmannEnsemble",
"csb.statmech.ensembles.TsallisEnsemble",
"csb.test.Console"
] | [((1668, 1682), 'csb.test.Console', 'test.Console', ([], {}), '()\n', (1680, 1682), True, 'import csb.test as test\n'), ((237, 268), 'numpy.linspace', 'numpy.linspace', (['(-50)', '(1000)', '(1000)'], {}), '(-50, 1000, 1000)\n', (251, 268), False, 'import numpy\n'), ((283, 308), 'csb.statmech.ensembles.BoltzmannEnsembl... |
# Copyright (c) 2014, <NAME>, <NAME>
# Licensed under the BSD 3-clause license (see LICENSE.txt)
import numpy as np
from .parameterized import Parameterized
from .param import Param
class Remapping(Parameterized):
def mapping(self):
"""
The return value of this function gives the values which the ... | [
"numpy.empty",
"numpy.logical_not",
"numpy.zeros",
"numpy.ones",
"numpy.unique",
"numpy.where",
"numpy.all"
] | [((5972, 6019), 'numpy.ones', 'np.ones', (['(self.tied_param.size,)'], {'dtype': 'np.bool'}), '((self.tied_param.size,), dtype=np.bool)\n', (5979, 6019), True, 'import numpy as np\n'), ((7295, 7342), 'numpy.zeros', 'np.zeros', (['(self.label_buf.size,)'], {'dtype': 'np.bool'}), '((self.label_buf.size,), dtype=np.bool)\... |
'''
The LaserAtomSystem class definition.
'''
from LASED.time_evolution import *
from LASED.density_matrix import *
from LASED.index import *
from LASED.generate_sub_states import *
from LASED.save_to_csv import *
from LASED.rotation import *
import numpy as np
class LaserAtomSystem:
"""A physical system compo... | [
"numpy.transpose",
"numpy.zeros"
] | [((3101, 3146), 'numpy.zeros', 'np.zeros', (['(self.n * self.n, 1)'], {'dtype': 'complex'}), '((self.n * self.n, 1), dtype=complex)\n', (3109, 3146), True, 'import numpy as np\n'), ((4413, 4437), 'numpy.transpose', 'np.transpose', (['self.rho_t'], {}), '(self.rho_t)\n', (4425, 4437), True, 'import numpy as np\n'), ((50... |
import csv
import io
import pandas as pd
import numpy as np
import tensorflow as tf
from sklearn import preprocessing
import matplotlib as mpl
import matplotlib.pyplot as plt
from google.colab import files
train = pd.read_csv(io.StringIO(uploadTrain['asteroid_training.csv'].decode('utf-8'))).replace('\n','', regex=True... | [
"matplotlib.pyplot.title",
"matplotlib.pyplot.show",
"matplotlib.pyplot.plot",
"tensorflow.keras.layers.Dense",
"numpy.argmax",
"matplotlib.pyplot.legend",
"tensorflow.train.AdamOptimizer",
"tensorflow.keras.Sequential",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel"
] | [((771, 792), 'tensorflow.keras.Sequential', 'tf.keras.Sequential', ([], {}), '()\n', (790, 792), True, 'import tensorflow as tf\n'), ((1325, 1357), 'matplotlib.pyplot.plot', 'plt.plot', (["history.history['acc']"], {}), "(history.history['acc'])\n", (1333, 1357), True, 'import matplotlib.pyplot as plt\n'), ((1358, 139... |
import unittest
import numpy as np
import alphaBetaLab.abHighResAlphaMatrix as hram
class testAbHighResAlphaMatrix(unittest.TestCase):
def testWrapAroundDateline(self):
xs = np.arange(-180, 180, 1)
ys = np.arange(-90, 90, 1)
alphas = np.zeros((len(ys), len(xs)))
alphas[:,1] = 1
alphas[:,4] = .9
... | [
"unittest.main",
"alphaBetaLab.abHighResAlphaMatrix.abHighResAlphaMatrix",
"numpy.arange",
"numpy.all"
] | [((969, 984), 'unittest.main', 'unittest.main', ([], {}), '()\n', (982, 984), False, 'import unittest\n'), ((182, 205), 'numpy.arange', 'np.arange', (['(-180)', '(180)', '(1)'], {}), '(-180, 180, 1)\n', (191, 205), True, 'import numpy as np\n'), ((215, 236), 'numpy.arange', 'np.arange', (['(-90)', '(90)', '(1)'], {}), ... |
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
import murnaghan2017 as m
def main():
"""
Reads in energy data and polynomial fit parameters and passes to plot
funtion.
Currently assumes that a and c are the lattice parameters, but this
could be changed... | [
"matplotlib.pyplot.title",
"numpy.meshgrid",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure",
"numpy.loadtxt",
"numpy.linspace",
"murnaghan2017.poly2d"
] | [((430, 456), 'numpy.loadtxt', 'np.loadtxt', (['"""energies.dat"""'], {}), "('energies.dat')\n", (440, 456), True, 'import numpy as np\n'), ((1257, 1278), 'matplotlib.pyplot.title', 'plt.title', (['"""Raw data"""'], {}), "('Raw data')\n", (1266, 1278), True, 'import matplotlib.pyplot as plt\n'), ((1283, 1304), 'matplot... |
import netsquid as ns
import netsquid.components.instructions as instr
import numpy as np
from netsquid.components import QuantumProgram
from netsquid.protocols import NodeProtocol, Signals
from netsquid.nodes import Node, Network, DirectConnection
from netsquid.components.qprocessor import QuantumProcessor, Phys... | [
"netsquid.sim_run",
"netsquid.components.ClassicalChannel",
"netsquid.components.qprocessor.PhysicalInstruction",
"netsquid.components.qprocessor.QuantumProcessor",
"netsquid.components.QuantumChannel",
"numpy.random.randint",
"netsquid.nodes.Network"
] | [((6824, 6924), 'netsquid.components.qprocessor.QuantumProcessor', 'QuantumProcessor', (['"""quantum_processor"""'], {'num_positions': '(5)', 'phys_instructions': 'physical_instructions'}), "('quantum_processor', num_positions=5, phys_instructions=\n physical_instructions)\n", (6840, 6924), False, 'from netsquid.com... |
#!/usr/bin/python
"""
Builder Class generic Male-Female comparison plot
"""
## MIT License
##
## Copyright (c) 2017, <NAME>
## 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 restr... | [
"numpy.append",
"numpy.asarray"
] | [((3006, 3042), 'numpy.asarray', 'np.asarray', (["self.coordinates['xval']"], {}), "(self.coordinates['xval'])\n", (3016, 3042), True, 'import numpy as np\n'), ((3064, 3095), 'numpy.append', 'np.append', (['x_data', 'x_data[::-1]'], {}), '(x_data, x_data[::-1])\n', (3073, 3095), True, 'import numpy as np\n'), ((3119, 3... |
import numpy as np
import matplotlib.pyplot as plt
stars = np.genfromtxt("planetfits_revised.csv", delimiter=",", names=True, dtype=None)
#nplanets = [(1,3), (1,4), (4,4)]
nplanets = [(1,6), (5,6), (5,5), (6,6)]
# iterate over: [5,e,f,n][n,p] fits, and 1-3, 4, 5, 6, 1-4, 5-6, 1-6 planet systems?
for minplanets, maxpla... | [
"matplotlib.pyplot.subplots",
"numpy.genfromtxt",
"matplotlib.pyplot.savefig"
] | [((60, 138), 'numpy.genfromtxt', 'np.genfromtxt', (['"""planetfits_revised.csv"""'], {'delimiter': '""","""', 'names': '(True)', 'dtype': 'None'}), "('planetfits_revised.csv', delimiter=',', names=True, dtype=None)\n", (73, 138), True, 'import numpy as np\n'), ((2114, 2128), 'matplotlib.pyplot.subplots', 'plt.subplots'... |
# -*- coding: utf-8 -*-
"""
Created on Sat Apr 28 10:53:05 2018
@author: <NAME>
"""
#
import glob
import cv2
from PIL import Image
import os
import sys
import dlib
from skimage import io
from imutils import face_utils
import pandas as pd
import numpy as np
#################################With Video###################... | [
"numpy.zeros_like",
"cv2.bitwise_not",
"cv2.cvtColor",
"cv2.imwrite",
"cv2.waitKey",
"cv2.imshow",
"cv2.addWeighted",
"cv2.imread",
"imutils.face_utils.shape_to_np",
"cv2.bitwise_or",
"dlib.simple_object_detector",
"dlib.get_frontal_face_detector",
"cv2.convexHull",
"numpy.array",
"cv2.f... | [((351, 422), 'cv2.imread', 'cv2.imread', (['"""/home/senscript/Music/Face-Overlay-AR-master/eye3.png"""', '(-1)'], {}), "('/home/senscript/Music/Face-Overlay-AR-master/eye3.png', -1)\n", (361, 422), False, 'import cv2\n'), ((422, 447), 'cv2.imshow', 'cv2.imshow', (['"""eye"""', 'imgEye'], {}), "('eye', imgEye)\n", (43... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Audio utilities
<NAME>, 2020-02-05
"""
# general modules
import numpy as np
import contextlib
import progressbar
# basic audio modules
import pyaudio
import wave
# additional module for wav editing
from pydub import AudioSegment
#from pydub.playback import play
#imp... | [
"wave.open",
"numpy.ceil",
"numpy.frombuffer",
"pyrubberband.time_stretch",
"progressbar.Bar",
"progressbar.Percentage",
"pyaudio.PyAudio",
"numpy.int16"
] | [((686, 706), 'wave.open', 'wave.open', (['audiofile'], {}), '(audiofile)\n', (695, 706), False, 'import wave\n'), ((1367, 1395), 'numpy.frombuffer', 'np.frombuffer', (['data', '"""int16"""'], {}), "(data, 'int16')\n", (1380, 1395), True, 'import numpy as np\n'), ((1870, 1890), 'wave.open', 'wave.open', (['audiofile'],... |
from functools import partial
from itertools import product
import numpy as np
import pandas as pd
import pytest
from numpy.testing import assert_array_almost_equal as aaae
from estimagic.differentiation.derivatives import first_derivative
from estimagic.optimization.process_constraints import process_constraints
fro... | [
"functools.partial",
"numpy.random.uniform",
"numpy.random.seed",
"estimagic.optimization.process_constraints.process_constraints",
"numpy.isnan",
"pandas.MultiIndex.from_product",
"estimagic.optimization.reparametrize.post_replace_jacobian",
"estimagic.optimization.reparametrize._multiply_from_right"... | [((1814, 1862), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""case, number"""', 'to_test'], {}), "('case, number', to_test)\n", (1837, 1862), False, 'import pytest\n'), ((2824, 2872), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""case, number"""', 'to_test'], {}), "('case, number', to_test)\... |
import tensorflow as tf
import os
import numpy as np
from tf_metric_learning.utils.index import AnnoyDataIndex
class TripletAnnoyMiner(AnnoyDataIndex):
def __init__(
self,
base_model,
eb_size,
labels,
metric="euclidean",
save_dir=None,
progress=False,
... | [
"numpy.asarray",
"numpy.where",
"tensorflow.nn.l2_normalize"
] | [((1067, 1092), 'numpy.where', 'np.where', (['(labels == label)'], {}), '(labels == label)\n', (1075, 1092), True, 'import numpy as np\n'), ((1113, 1138), 'numpy.where', 'np.where', (['(labels != label)'], {}), '(labels != label)\n', (1121, 1138), True, 'import numpy as np\n'), ((2141, 2160), 'numpy.asarray', 'np.asarr... |
import copy
import json
from typing import Tuple
import numpy as np
from PIL import ImageColor
from rastervision.core.box import Box
from rastervision.data import (ChipClassificationLabels, ObjectDetectionLabels)
from rastervision.utils.files import file_to_str
def add_classes_to_geojson(geojson, class_map):
""... | [
"copy.deepcopy",
"rastervision.utils.files.file_to_str",
"PIL.ImageColor.getrgb",
"rastervision.data.ObjectDetectionLabels.make_empty",
"rastervision.core.box.Box",
"numpy.max",
"numpy.min",
"rastervision.data.ChipClassificationLabels",
"numpy.array",
"rastervision.data.ObjectDetectionLabels",
"... | [((396, 418), 'copy.deepcopy', 'copy.deepcopy', (['geojson'], {}), '(geojson)\n', (409, 418), False, 'import copy\n'), ((4322, 4348), 'rastervision.data.ChipClassificationLabels', 'ChipClassificationLabels', ([], {}), '()\n', (4346, 4348), False, 'from rastervision.data import ChipClassificationLabels, ObjectDetectionL... |
import collections
import warnings
import numpy as np
import decimal as dc
import nengo.utils.numpy as npext
from nengo.builder.builder import Builder
from nengo.builder.operator import Copy, DotInc, Reset, SimNoise
from nengo.dists import Distribution
from nengo.ensemble import Ensemble
from nengo.neurons import Dir... | [
"nengo.rc.rc.get",
"decimal.Decimal",
"nengo.builder.operator.Reset",
"numpy.asarray",
"numpy.zeros",
"numpy.identity",
"numpy.random.RandomState",
"nengo.builder.operator.DotInc",
"nengo.utils.numpy.norm",
"numpy.array",
"nengo.builder.builder.Builder.register",
"collections.namedtuple",
"n... | [((420, 554), 'collections.namedtuple', 'collections.namedtuple', (['"""BuiltEnsemble"""', "['eval_points', 'encoders', 'intercepts', 'max_rates', 'scaled_encoders',\n 'gain', 'bias']"], {}), "('BuiltEnsemble', ['eval_points', 'encoders',\n 'intercepts', 'max_rates', 'scaled_encoders', 'gain', 'bias'])\n", (442, ... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# IIR testing
# model for multiplier less IIR filters with feedback close to 1
# second order is just two first order concatinated
# you can multiply with (1-2**-l) easily by bitshifting and subtracting in hardware
import numpy as np
import matplotlib.pyplot as plt
fr... | [
"matplotlib.pyplot.xscale",
"matplotlib.pyplot.xlim",
"dsp_fpga_lib.zplane",
"matplotlib.pyplot.show",
"matplotlib.pyplot.plot",
"numpy.empty",
"numpy.logspace",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.minorticks_on",
"scipy.signal.freqz",
"matplotlib.pyplot.grid"
] | [((422, 435), 'numpy.empty', 'np.empty', (['max'], {}), '(max)\n', (430, 435), True, 'import numpy as np\n'), ((463, 476), 'numpy.empty', 'np.empty', (['max'], {}), '(max)\n', (471, 476), True, 'import numpy as np\n'), ((1132, 1145), 'matplotlib.pyplot.figure', 'plt.figure', (['(0)'], {}), '(0)\n', (1142, 1145), True, ... |
import json
import numpy as np
import os
from os import path
from typing import List, Tuple, Dict, Optional, Union
import autoarray as aa
class PointDataset:
def __init__(
self,
name: str,
positions: Union[aa.Grid2DIrregular, List[List], List[Tuple]],
positions_noise... | [
"autoarray.ValuesIrregular",
"os.remove",
"json.load",
"json.dump",
"os.makedirs",
"autoarray.Grid2DIrregular",
"os.path.exists",
"os.path.split",
"numpy.round"
] | [((1980, 2014), 'autoarray.Grid2DIrregular', 'aa.Grid2DIrregular', ([], {'grid': 'positions'}), '(grid=positions)\n', (1998, 2014), True, 'import autoarray as aa\n'), ((2159, 2205), 'autoarray.ValuesIrregular', 'aa.ValuesIrregular', ([], {'values': 'positions_noise_map'}), '(values=positions_noise_map)\n', (2177, 2205)... |
# -*- coding: utf-8 -*-
"""
@date Created on Tue Mar 24 2020
@author martin_g for Eomys
"""
# Standard library imports
# Third party imports
import numpy as np
from scipy.io import wavfile
# Local application imports
from mosqito.generic.oct3spec import oct3spec
from mosqito.generic.calc_third_octave_levels import c... | [
"scipy.io.wavfile.read",
"mosqito.generic.calc_third_octave_levels.calc_third_octave_levels",
"numpy.array",
"numpy.squeeze",
"mosqito.generic.oct3spec.oct3spec"
] | [((1310, 1328), 'scipy.io.wavfile.read', 'wavfile.read', (['file'], {}), '(file)\n', (1322, 1328), False, 'from scipy.io import wavfile\n'), ((1541, 1592), 'mosqito.generic.oct3spec.oct3spec', 'oct3spec', (['sig', 'fs', '(25)', '(12500)'], {'sig_type': '"""stationary"""'}), "(sig, fs, 25, 12500, sig_type='stationary')\... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.