code stringlengths 31 1.05M | apis list | extract_api stringlengths 97 1.91M |
|---|---|---|
import sys
import time
import os
import gc
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import majoranaJJ.modules.SNRG as SNRG
import majoranaJJ.modules.finders as finders
import majoranaJJ.modules.constants as const
###################################################
#Defining System
... | [
"matplotlib.pyplot.title",
"numpy.load",
"numpy.save",
"matplotlib.pyplot.show",
"os.makedirs",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.ylim",
"os.path.exists",
"numpy.zeros",
"majoranaJJ.modules.finders.targ_step_finder",
"gc.collect",
"numpy.linspace",
"matplotlib.pyplot.subplots_adju... | [((1442, 1472), 'numpy.linspace', 'np.linspace', (['Vj_i', 'Vj_f', 'steps'], {}), '(Vj_i, Vj_f, steps)\n', (1453, 1472), True, 'import numpy as np\n'), ((1584, 1605), 'numpy.zeros', 'np.zeros', (['Vj.shape[0]'], {}), '(Vj.shape[0])\n', (1592, 1605), True, 'import numpy as np\n'), ((1618, 1639), 'numpy.zeros', 'np.zeros... |
# BSD 3-Clause License
#
# Copyright (c) 2016-21, University of Liverpool
# 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 code must retain the above copyright notic... | [
"conkit.plot.tools.get_radius_around_circle",
"numpy.zeros",
"conkit.plot.tools._isinstance",
"numpy.append",
"numpy.sin",
"numpy.array",
"numpy.arange",
"numpy.cos",
"conkit.plot.tools.get_points_on_circle"
] | [((5048, 5146), 'numpy.array', 'np.array', (['[(c.res1, c.res1_seq, c.res2, c.res2_seq, c.raw_score, c.status) for c in\n hierarchy]'], {}), '([(c.res1, c.res1_seq, c.res2, c.res2_seq, c.raw_score, c.status) for\n c in hierarchy])\n', (5056, 5146), True, 'import numpy as np\n'), ((5416, 5440), 'numpy.arange', 'np... |
"""A module for a mixture density network layer."""
import torch
import torch.nn as nn
from torch.distributions import Categorical
from spirl.modules.variational_inference import MultivariateGaussian
from spirl.utils.pytorch_utils import ten2ar
class MDN(nn.Module):
"""A mixture density network layer"""
def ... | [
"spirl.utils.pytorch_utils.ten2ar",
"torch.distributions.Categorical",
"torch.cat",
"matplotlib.pyplot.figure",
"torch.nn.Softmax",
"numpy.exp",
"spirl.utils.general_utils.AttrDict",
"torch.ones",
"spirl.modules.subnetworks.Predictor",
"torch.nn.Linear",
"torch.zeros",
"torch.log",
"spirl.mo... | [((6282, 6323), 'torch.zeros', 'torch.zeros', (['(256, 2)'], {'requires_grad': '(True)'}), '((256, 2), requires_grad=True)\n', (6293, 6323), False, 'import torch\n'), ((6333, 6383), 'spirl.utils.general_utils.AttrDict', 'AttrDict', (["{'nz_mid': 32, 'n_processing_layers': 3}"], {}), "({'nz_mid': 32, 'n_processing_layer... |
from tensorflow.keras import layers, Model, backend
import numpy as np
import tensorflow as tf
from signal_separation._signal_creator import destandardize_height, height_ratio, places_change, de_standardize
def multiply_cnn(n, kernel_size, added_filters, filter_beg, dense1, dense2, x, batch_n):
for i in np... | [
"tensorflow.random.set_seed",
"signal_separation._signal_creator.destandardize_height",
"tensorflow.keras.layers.Dense",
"signal_separation._signal_creator.places_change",
"signal_separation._signal_creator.height_ratio",
"numpy.arange",
"tensorflow.keras.callbacks.EarlyStopping",
"tensorflow.keras.la... | [((318, 330), 'numpy.arange', 'np.arange', (['n'], {}), '(n)\n', (327, 330), True, 'import numpy as np\n'), ((913, 925), 'numpy.arange', 'np.arange', (['n'], {}), '(n)\n', (922, 925), True, 'import numpy as np\n'), ((1340, 1369), 'tensorflow.keras.layers.Input', 'layers.Input', ([], {'shape': '(1000, 1)'}), '(shape=(10... |
"""
This module contains nonlinear solvers used in time stepping.
At the moment this is simply Newton's method.
"""
# Spitfire - a Python-C++ library for building tabulated chemistry models and solving differential equations
# Copyright 2019 National Technology & Engineering Solutions of Sandia, LL... | [
"numpy.abs",
"numpy.copy",
"numpy.isinf",
"numpy.isnan",
"scipy.linalg.norm",
"numpy.ndarray"
] | [((1592, 1614), 'numpy.ndarray', 'np.ndarray', (['(neq, neq)'], {}), '((neq, neq))\n', (1602, 1614), True, 'import numpy as np\n'), ((1663, 1680), 'numpy.copy', 'numpy_copy', (['state'], {}), '(state)\n', (1673, 1680), True, 'from numpy import copy as numpy_copy\n'), ((8569, 8594), 'numpy.copy', 'numpy_copy', (['initia... |
# -*- coding: utf-8 -*-
"""
Created on Wed Jul 17 01:07:21 2019
@author: Vicky
"""
import numpy as np
def Quadratic_diamond(X):
'''X is the matrix N x 3 for diamond input'''
X = np.atleast_2d(X)
mean = np.array([0.789931, 0.875172, 0.650252, 0.871259, 0.691304, 0.965172, 0.769182])
std = np.array([0... | [
"numpy.stack",
"numpy.dot",
"numpy.array",
"numpy.atleast_2d"
] | [((190, 206), 'numpy.atleast_2d', 'np.atleast_2d', (['X'], {}), '(X)\n', (203, 206), True, 'import numpy as np\n'), ((218, 303), 'numpy.array', 'np.array', (['[0.789931, 0.875172, 0.650252, 0.871259, 0.691304, 0.965172, 0.769182]'], {}), '([0.789931, 0.875172, 0.650252, 0.871259, 0.691304, 0.965172, 0.769182]\n )\n'... |
import pymesh
import sys
import time
import os
import numpy as np
from IPython.core.debugger import set_trace
import warnings
with warnings.catch_warnings():
warnings.filterwarnings("ignore",category=FutureWarning)
# Configuration imports. Config should be in run_args.py
from default_config.masif_opts import mas... | [
"numpy.save",
"numpy.random.seed",
"os.makedirs",
"warnings.filterwarnings",
"os.path.exists",
"time.time",
"warnings.catch_warnings",
"masif_modules.read_data_from_surface.read_data_from_surface",
"masif_modules.read_data_from_surface.compute_shape_complementarity",
"sys.exit"
] | [((329, 346), 'numpy.random.seed', 'np.random.seed', (['(0)'], {}), '(0)\n', (343, 346), True, 'import numpy as np\n'), ((1084, 1101), 'numpy.random.seed', 'np.random.seed', (['(0)'], {}), '(0)\n', (1098, 1101), True, 'import numpy as np\n'), ((132, 157), 'warnings.catch_warnings', 'warnings.catch_warnings', ([], {}), ... |
# Copyright 2020, The TensorFlow 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 t... | [
"absl.testing.absltest.main",
"tensorflow_privacy.privacy.membership_inference_attack.utils.prepend_to_keys",
"numpy.sum",
"tensorflow_privacy.privacy.membership_inference_attack.utils.log_loss_from_logits",
"tensorflow_privacy.privacy.membership_inference_attack.utils.get_train_test_split",
"numpy.testin... | [((6467, 6482), 'absl.testing.absltest.main', 'absltest.main', ([], {}), '()\n', (6480, 6482), False, 'from absl.testing import absltest\n'), ((968, 993), 'numpy.random.RandomState', 'np.random.RandomState', (['(33)'], {}), '(33)\n', (989, 993), True, 'import numpy as np\n'), ((1318, 1346), 'numpy.array', 'np.array', (... |
from typing import Tuple
import numpy as np
import scipy.sparse as sparse
from edgeseraser.misc.typing import NpArrayEdges, NpArrayEdgesFloat
def construct_sp_matrices(
weights: NpArrayEdgesFloat,
edges: NpArrayEdges,
num_vertices: int,
is_directed: bool = True,
) -> Tuple[sparse.csr_matrix, sparse.c... | [
"scipy.sparse.csr_matrix",
"numpy.zeros"
] | [((415, 510), 'scipy.sparse.csr_matrix', 'sparse.csr_matrix', (['(weights, edges.T)'], {'shape': '(num_vertices, num_vertices)', 'dtype': 'np.float64'}), '((weights, edges.T), shape=(num_vertices, num_vertices),\n dtype=np.float64)\n', (432, 510), True, 'import scipy.sparse as sparse\n'), ((555, 611), 'numpy.zeros',... |
import numpy as np
from pyannote.core import SlidingWindowFeature
import random
import torch
class SpecAugmentor(object):
"""2 way spectrogram augmentation :
1) Frequency masking
2) Time masking
"""
def _spec_augment(mel_spectrogram, frequency_masking_para=27,
time_ma... | [
"pyannote.core.SlidingWindowFeature",
"numpy.random.uniform",
"random.randint"
] | [((1867, 1922), 'numpy.random.uniform', 'np.random.uniform', ([], {'low': '(0.0)', 'high': 'frequency_masking_para'}), '(low=0.0, high=frequency_masking_para)\n', (1884, 1922), True, 'import numpy as np\n'), ((1963, 1987), 'random.randint', 'random.randint', (['(0)', '(v - f)'], {}), '(0, v - f)\n', (1977, 1987), False... |
import os
import sys
import numpy as np
import math
from scipy.signal import get_window
import matplotlib.pyplot as plt
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../software/models/'))
import utilFunctions as UF
import harmonicModel as HM
import sineModel as SM
import stft
eps = np... | [
"numpy.floor",
"matplotlib.pyplot.figure",
"numpy.arange",
"scipy.signal.get_window",
"numpy.finfo",
"matplotlib.pyplot.autoscale",
"utilFunctions.wavread",
"matplotlib.pyplot.show",
"numpy.ceil",
"matplotlib.pyplot.legend",
"os.path.realpath",
"utilFunctions.sinewaveSynth",
"matplotlib.pypl... | [((318, 333), 'numpy.finfo', 'np.finfo', (['float'], {}), '(float)\n', (326, 333), True, 'import numpy as np\n'), ((3870, 3891), 'utilFunctions.wavread', 'UF.wavread', (['inputFile'], {}), '(inputFile)\n', (3880, 3891), True, 'import utilFunctions as UF\n'), ((3950, 3971), 'scipy.signal.get_window', 'get_window', (['wi... |
import numpy as np
def transp(matrise):
return [[matrise[rad][kol] for rad in range(len(matrise))] for kol in range(len(matrise[0]))]
def matrisemult(mat1,mat2):
# Bør sjekke om det går å multiplisere
mat1rad = len(mat1) # Antall rader i matrise 1
mat2kol = len(mat2[0]) # antall kolonner i matrise 2... | [
"numpy.matrix"
] | [((990, 1008), 'numpy.matrix', 'np.matrix', (['matrise'], {}), '(matrise)\n', (999, 1008), True, 'import numpy as np\n'), ((1028, 1047), 'numpy.matrix', 'np.matrix', (['matrise3'], {}), '(matrise3)\n', (1037, 1047), True, 'import numpy as np\n')] |
# -*- coding: utf-8 -*-
#
# Copyright 2017 Ricequant, Inc
#
# 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 ... | [
"pandas.DataFrame",
"pickle.dump",
"rqalpha.execution_context.ExecutionContext.plots.get_plots",
"os.path.basename",
"rqalpha.plot.plot_result",
"collections.defaultdict",
"pandas.to_datetime",
"numpy.array",
"rqalpha.utils.repr.properties",
"rqalpha.utils.report.generate_report",
"six.iteritems... | [((1194, 1211), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (1205, 1211), False, 'from collections import defaultdict\n'), ((1305, 1322), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (1316, 1322), False, 'from collections import defaultdict\n'), ((1349, 1366), 'collect... |
import pandas as pd
import numpy as np
data = []
f = range(1,75,1)
for n in f:
print(n)
in_file = open('/Users/annethessen/NSF_awards/award_data/' + str(n) + '.txt', 'r')
next(in_file)
for line in in_file:
line.strip('\n')
row = line.split('\t')
#print(row[0:24])
data.a... | [
"pandas.DataFrame",
"numpy.array"
] | [((343, 357), 'numpy.array', 'np.array', (['data'], {}), '(data)\n', (351, 357), True, 'import numpy as np\n'), ((950, 1006), 'pandas.DataFrame', 'pd.DataFrame', (['arr'], {'columns': 'labels', 'index': "['AwardNumber']"}), "(arr, columns=labels, index=['AwardNumber'])\n", (962, 1006), True, 'import pandas as pd\n')] |
# !/usr/bin/env python
import numpy as np
from sklearn.decomposition import PCA
import umap
import matplotlib.pyplot as plt
# 9-class Set1, for plotting data with qualitative labels
color_dict = {0:'#e41a1c', 1:'#377eb8', 2:'#4daf4a', 3: '#984ea3', 4:'#ff7f00',
5:'#ffff33', 6:'#a65628', 7:'#f781bf', 8:'#... | [
"matplotlib.pyplot.close",
"numpy.zeros",
"umap.UMAP",
"numpy.argsort",
"numpy.where",
"sklearn.decomposition.PCA",
"matplotlib.pyplot.subplots",
"numpy.unique"
] | [((919, 1035), 'umap.UMAP', 'umap.UMAP', ([], {'n_neighbors': 'n_neighbors', 'min_dist': 'min_dist', 'n_components': 'n_components', 'metric': 'metric', 'random_state': '(0)'}), '(n_neighbors=n_neighbors, min_dist=min_dist, n_components=\n n_components, metric=metric, random_state=0)\n', (928, 1035), False, 'import ... |
# -*- coding: UTF-8 -*-
#
# Copyright (C) 2012 <NAME> <<EMAIL>>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# T... | [
"sys.platform.startswith",
"solvcon.case.BlockCase",
"solvcon.helper.Information",
"numpy.empty",
"numpy.zeros",
"os.path.join",
"solvcon.parcel.fake._algorithm.FakeAlgorithm"
] | [((1718, 1768), 'numpy.empty', 'empty', (['(ngstcell + ncell, neq)'], {'dtype': 'self.fpdtype'}), '((ngstcell + ncell, neq), dtype=self.fpdtype)\n', (1723, 1768), False, 'from numpy import empty\n'), ((1787, 1837), 'numpy.empty', 'empty', (['(ngstcell + ncell, neq)'], {'dtype': 'self.fpdtype'}), '((ngstcell + ncell, ne... |
import torch
import torch.nn as nn
import torch.optim as optim
import numpy as np
from model_dqn import NetworkDQN
from memory_agent import Memory
import os
class Agent():
def __init__(self, gamma, eps, lr, tau, batch_size, max_mem, obs_dim, n_actions, frame_stack):
self.device = torch.device('cuda:0' if t... | [
"os.mkdir",
"torch.nn.MSELoss",
"os.path.isdir",
"torch.argmax",
"torch.load",
"numpy.random.random",
"torch.cuda.is_available",
"numpy.random.choice",
"model_dqn.NetworkDQN",
"torch.tensor",
"memory_agent.Memory"
] | [((608, 645), 'memory_agent.Memory', 'Memory', (['max_mem', 'obs_dim', 'frame_stack'], {}), '(max_mem, obs_dim, frame_stack)\n', (614, 645), False, 'from memory_agent import Memory\n'), ((1165, 1177), 'torch.nn.MSELoss', 'nn.MSELoss', ([], {}), '()\n', (1175, 1177), True, 'import torch.nn as nn\n'), ((2709, 2735), 'os.... |
import numpy as np
from tensorflow import keras
from utils.preprocessing import *
from pickle import load, dump
import random
'''
*We have Flickr_8k.trainImages.txt and Flickr_8k.devImages.txt files which consist of unique identifiers(id)
which can be used to filter the images and their descriptions
*Load ... | [
"tensorflow.keras.preprocessing.text.Tokenizer",
"tensorflow.keras.utils.to_categorical",
"random.shuffle",
"tensorflow.keras.preprocessing.sequence.pad_sequences",
"random.seed",
"numpy.array"
] | [((3370, 3406), 'tensorflow.keras.preprocessing.text.Tokenizer', 'keras.preprocessing.text.Tokenizer', ([], {}), '()\n', (3404, 3406), False, 'from tensorflow import keras\n'), ((5622, 5646), 'random.seed', 'random.seed', (['random_seed'], {}), '(random_seed)\n', (5633, 5646), False, 'import random\n'), ((6342, 6371), ... |
import numpy as np
import cntk
from cntk import output_variable, user_function
from cntk.ops.functions import UserFunction
from cntk_helper.numerical_grad import test_numerical_grad
class ParameterizedVectorNorm(UserFunction):
def __init__(self, arg1, axis=0,
name='ParameterizedVectorNorm', ep... | [
"numpy.random.uniform",
"numpy.sum",
"cntk.sequence.input",
"cntk.output_variable",
"numpy.random.normal",
"cntk_helper.numerical_grad.test_numerical_grad",
"numpy.sqrt"
] | [((553, 597), 'numpy.sum', 'np.sum', (['(x * x)'], {'axis': 'self.axis', 'keepdims': '(True)'}), '(x * x, axis=self.axis, keepdims=True)\n', (559, 597), True, 'import numpy as np\n'), ((665, 686), 'numpy.sqrt', 'np.sqrt', (['(b + self.eps)'], {}), '(b + self.eps)\n', (672, 686), True, 'import numpy as np\n'), ((851, 90... |
#!/usr/bin/env python3
# -*- coding: utf8 -*-
import numpy as np
# define selector functions for rho and theta
# as well as the coordinates of the foot point
def r(line):
"""
Selects rho from a given line.
"""
r, _ = line
return r
def t(line):
"""
Selects theta from a given line.
"... | [
"numpy.arctan2",
"numpy.tan",
"numpy.sin",
"numpy.cos",
"numpy.sqrt"
] | [((2738, 2760), 'numpy.sqrt', 'np.sqrt', (['(x * x + y * y)'], {}), '(x * x + y * y)\n', (2745, 2760), True, 'import numpy as np\n'), ((2773, 2789), 'numpy.arctan2', 'np.arctan2', (['y', 'x'], {}), '(y, x)\n', (2783, 2789), True, 'import numpy as np\n'), ((6084, 6106), 'numpy.sqrt', 'np.sqrt', (['(x * x + y * y)'], {})... |
"""
Goals of this part of the examples:
1. Learn how to create a custom `Optimizer` class
2. Learn the different optimizer frameworks
3. Learn the usage of `StatisticsAnalyzer`
4. Understand the motivation behing `AixCaliBuHA`
"""
# Start by importing all relevant packages
import matplotlib.pyplot as plt
import numpy a... | [
"matplotlib.pyplot.title",
"matplotlib.pyplot.show",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.legend",
"sklearn.metrics.r2_score",
"matplotlib.pyplot.figure",
"numpy.sin",
"numpy.mean",
"numpy.linspace",
"sklearn.metrics.mean_squared_error",
"ebcpy.utils.statistics_analyzer.StatisticsAnalyze... | [((2370, 2396), 'numpy.linspace', 'np.linspace', (['(0)', 'np.pi', '(100)'], {}), '(0, np.pi, 100)\n', (2381, 2396), True, 'import numpy as np\n'), ((2411, 2426), 'numpy.sin', 'np.sin', (['my_data'], {}), '(my_data)\n', (2417, 2426), True, 'import numpy as np\n'), ((2447, 2486), 'ebcpy.utils.statistics_analyzer.Statist... |
# -*- coding: utf-8 -*-
# Copyright 2016 Stanford University
#
# 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... | [
"pinyin.get",
"random.shuffle",
"numpy.array"
] | [((3341, 3389), 'pinyin.get', 'pinyin.get', (['s'], {'format': '"""numerical"""', 'delimiter': '""" """'}), "(s, format='numerical', delimiter=' ')\n", (3351, 3389), False, 'import pinyin\n'), ((2652, 2675), 'random.shuffle', 'random.shuffle', (['batches'], {}), '(batches)\n', (2666, 2675), False, 'import random\n'), (... |
#!/usr/bin/env ipython
# The functions in this file relate to evaluating the performance of the model
# Specifically we are interested in the utility of models with different privacy levels
import numpy as np
from sklearn.metrics import log_loss
import data_utils
import model_utils
from results_utils import Experimen... | [
"numpy.abs",
"numpy.arange",
"numpy.random.normal",
"experiment_metadata.get_experiment_details",
"derived_results.estimate_variability",
"derived_results.estimate_sensitivity_empirically",
"sklearn.metrics.log_loss",
"model_utils.K.backend.clear_session",
"model_utils.define_metric_functions",
"e... | [((1103, 1190), 'derived_results.estimate_variability', 'estimate_variability', (['cfg_name', 'model', 't'], {'multivariate': 'multivariate', 'diffinit': '(False)'}), '(cfg_name, model, t, multivariate=multivariate,\n diffinit=False)\n', (1123, 1190), False, 'from derived_results import estimate_variability, estimat... |
import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import minimize
# function
def f(x):
return 2*x[0]**2 + 10*x[1]**2
# gradient (normalized)
def fp(x):
fx1 = 4*x[0]
fx2 = 20*x[1]
# mag = np.sqrt(fx1**2+fx2**2)
return np.array([fx1, fx2])
x0 = [3,3]
res = minimize(f, x0)#, jac=fp)
p... | [
"scipy.optimize.minimize",
"numpy.array"
] | [((290, 305), 'scipy.optimize.minimize', 'minimize', (['f', 'x0'], {}), '(f, x0)\n', (298, 305), False, 'from scipy.optimize import minimize\n'), ((251, 271), 'numpy.array', 'np.array', (['[fx1, fx2]'], {}), '([fx1, fx2])\n', (259, 271), True, 'import numpy as np\n')] |
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from pycqed.analysis.analysis_toolbox import get_datafilepath_from_timestamp
# import pycqed.analysis.measurement_analysis as ma
import h5py
from pycqed.analysis import analysis_toolbox as a_tools
# from os.path import join
# import pycqed.analysis_... | [
"matplotlib.colors.LinearSegmentedColormap.from_list",
"pycqed.measurement.hdf5_data.extract_pars_from_datafile",
"pandas.DataFrame.from_dict",
"pycqed.analysis.analysis_toolbox.latest_data",
"pycqed.analysis.analysis_toolbox.get_datafilepath_from_timestamp",
"matplotlib.pyplot.colorbar",
"pycqed.analys... | [((3215, 3260), 'pycqed.analysis.analysis_toolbox.get_datafilepath_from_timestamp', 'get_datafilepath_from_timestamp', (['self.t_start'], {}), '(self.t_start)\n', (3246, 3260), False, 'from pycqed.analysis.analysis_toolbox import get_datafilepath_from_timestamp\n'), ((7563, 7572), 'matplotlib.colors.LogNorm', 'LogNorm'... |
# =========================================================================== #
# GRIDSEARCH #
# =========================================================================== #
"""Plots results of sklearn gridsearches"""
# ----------------------------------... | [
"pandas.DataFrame",
"matplotlib.pyplot.show",
"pandas.DataFrame.from_dict",
"matplotlib.pyplot.close",
"math.floor",
"matplotlib.pyplot.style.use",
"numpy.arange",
"pandas.Categorical",
"matplotlib.pyplot.subplots",
"pandas.concat"
] | [((433, 467), 'matplotlib.pyplot.style.use', 'plt.style.use', (['"""seaborn-whitegrid"""'], {}), "('seaborn-whitegrid')\n", (446, 467), True, 'import matplotlib.pyplot as plt\n'), ((1334, 1360), 'pandas.concat', 'pd.concat', (['results'], {'axis': '(0)'}), '(results, axis=0)\n', (1343, 1360), True, 'import pandas as pd... |
from netCDF4 import Dataset
import numpy as np
import matplotlib as mpl
from matplotlib.patches import Polygon
from matplotlib.collections import PatchCollection
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import make_axes_locatable
import math
#from matplotlib.mlab import griddata
from matplotlib.tick... | [
"netCDF4.Dataset",
"mpl_toolkits.axes_grid1.make_axes_locatable",
"numpy.amin",
"scipy.interpolate.griddata",
"math.fabs",
"matplotlib.collections.PatchCollection",
"numpy.zeros",
"matplotlib.pyplot.colorbar",
"numpy.amax",
"matplotlib.patches.Polygon",
"numpy.array",
"matplotlib.pyplot.rc",
... | [((7152, 7183), 'netCDF4.Dataset', 'Dataset', (['filenameMPASWachs', '"""r"""'], {}), "(filenameMPASWachs, 'r')\n", (7159, 7183), False, 'from netCDF4 import Dataset\n'), ((7200, 7229), 'netCDF4.Dataset', 'Dataset', (['filenameMPASPWL', '"""r"""'], {}), "(filenameMPASPWL, 'r')\n", (7207, 7229), False, 'from netCDF4 imp... |
"""SQL access functions."""
from collections import defaultdict
from datetime import datetime, timezone
from functools import wraps
from hashlib import md5
from itertools import product, chain
import json
import logging
import re
import operator
import os
import time
from typing import Any, Callable, Dict, List, Union
... | [
"json.dumps",
"collections.defaultdict",
"sqlalchemy.column",
"redis.Redis",
"json.loads",
"sqlalchemy.table",
"numpy.finfo",
"itertools.product",
"sqlalchemy.sql.func",
"sqlalchemy.sql.select",
"itertools.chain",
"hashlib.md5",
"sqlalchemy.sql.func.count",
"statsmodels.stats.multitest.mul... | [((712, 751), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO'}), '(level=logging.INFO)\n', (731, 751), False, 'import logging\n'), ((761, 788), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (778, 788), False, 'import logging\n'), ((13587, 13628), 'os.environ.g... |
import torch
import numpy as np
from crowd_sim.envs.utils.action import ActionRot, ActionXY
from crowd_nav.policy.cadrl import CADRL
import math
from crowd_sim.envs.utils.state import ObservableState
class MultiHumanRL(CADRL):
def __init__(self):
super().__init__()
def predict(self, state):
"... | [
"numpy.arctan2",
"numpy.floor",
"crowd_sim.envs.utils.action.ActionXY",
"torch.cat",
"numpy.argsort",
"numpy.sin",
"numpy.linalg.norm",
"crowd_sim.envs.utils.action.ActionRot",
"torch.ones",
"math.pow",
"torch.Tensor",
"torch.zeros",
"math.sqrt",
"numpy.ndenumerate",
"crowd_sim.envs.util... | [((1102, 1120), 'numpy.random.random', 'np.random.random', ([], {}), '()\n', (1118, 1120), True, 'import numpy as np\n'), ((5034, 5125), 'crowd_sim.envs.utils.state.ObservableState', 'ObservableState', (['fake_px', 'fake_py', 'fake_vx', 'fake_vy', 'fake_radius', 'fake_hr_social_stress'], {}), '(fake_px, fake_py, fake_v... |
#! usr/bin/env python
# -*- coding:utf-8 -*-
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
# 通过rcParams设置全局横纵轴字体大小
mpl.rcParams['xtick.labelsize'] = 10
mpl.rcParams['ytick.labelsize'] = 10
'''
当我们设置相同的seed,每次生成的随机数相同。
如果不设置seed,则每次会生成不同的随机数
'''
np.random.seed(42)
# x
x = np.lins... | [
"numpy.random.seed",
"matplotlib.pyplot.show",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.scatter",
"matplotlib.pyplot.figure",
"numpy.sin",
"numpy.linspace",
"numpy.random.normal"
] | [((283, 301), 'numpy.random.seed', 'np.random.seed', (['(42)'], {}), '(42)\n', (297, 301), True, 'import numpy as np\n'), ((313, 335), 'numpy.linspace', 'np.linspace', (['(0)', '(5)', '(100)'], {}), '(0, 5, 100)\n', (324, 335), True, 'import numpy as np\n'), ((468, 486), 'matplotlib.pyplot.figure', 'plt.figure', (['"""... |
import matplotlib.pyplot as plt
import numpy as np
import sys, os
from numpy import pi, sin, cos
from scipy.signal import sawtooth
from ament_index_python import get_package_share_directory
from parameters import *
sys.path.insert(1, os.path.join(get_package_share_directory('slider_experiment'), 'python_build/tsl_opti... | [
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.show",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.suptitle",
"scipy.signal.sawtooth",
"ament_index_python.get_package_share_directory",
"tsl_optimizer.solver",
"matplotlib.pyplot.figure",
"numpy.sin",
"numpy.arange",
"numpy.array",
"numpy.cos",... | [((372, 390), 'tsl_optimizer.solver', 'optimizer.solver', ([], {}), '()\n', (388, 390), True, 'import tsl_optimizer as optimizer\n'), ((446, 467), 'numpy.arange', 'np.arange', (['(0)', '(4)', '(0.01)'], {}), '(0, 4, 0.01)\n', (455, 467), True, 'import numpy as np\n'), ((608, 621), 'matplotlib.pyplot.figure', 'plt.figur... |
# -*- coding: utf-8 -*-
"""
Module to handle word vectors and initializing embeddings.
"""
import os
import string
from collections import Counter
import numpy as np
from .utils import constants as Constants
from .utils import dump_ndarray, load_ndarray, dump_json, load_json, Timer
##################################... | [
"numpy.random.uniform",
"os.path.exists",
"gensim.models.keyedvectors.KeyedVectors.load_word2vec_format",
"string.capwords",
"collections.Counter"
] | [((1461, 1470), 'collections.Counter', 'Counter', ([], {}), '()\n', (1468, 1470), False, 'from collections import Counter\n'), ((1026, 1052), 'string.capwords', 'string.capwords', (['word', '"""_"""'], {}), "(word, '_')\n", (1041, 1052), False, 'import string\n'), ((1583, 1609), 'os.path.exists', 'os.path.exists', (['v... |
import numpy as np
import os
import platform
import cv2
slash = '\\' if platform.system() == 'Windows' else '/'
Destination = f'.{slash}Output'
Input_images = f'.{slash}Database'
if not os.path.exists(Destination):
os.makedirs(Destination)
def image2double(img):
if (img.dtype != np.uint8):
... | [
"numpy.ones",
"numpy.iinfo",
"numpy.mean",
"cv2.imshow",
"numpy.true_divide",
"os.path.exists",
"numpy.reshape",
"cv2.destroyAllWindows",
"numpy.cov",
"cv2.resize",
"cv2.waitKey",
"cv2.PSNR",
"platform.system",
"os.listdir",
"numpy.concatenate",
"cv2.putText",
"os.makedirs",
"numpy... | [((198, 225), 'os.path.exists', 'os.path.exists', (['Destination'], {}), '(Destination)\n', (212, 225), False, 'import os\n'), ((232, 256), 'os.makedirs', 'os.makedirs', (['Destination'], {}), '(Destination)\n', (243, 256), False, 'import os\n'), ((1071, 1096), 'numpy.ones', 'np.ones', (['(30, 2 * w + 90)'], {}), '((30... |
import numpy as np
from numpy import bool_, inf, int, float
from sklearn.base import BaseEstimator, TransformerMixin
import featuretools as ft
class BooleanTransformer(BaseEstimator, TransformerMixin):
"""Convert values to True or False."""
def __init__(self, true_value="yes", false_value="no"):
"""I... | [
"numpy.vectorize",
"featuretools.dfs",
"numpy.float",
"featuretools.EntitySet",
"featuretools.calculate_feature_matrix"
] | [((2030, 2061), 'featuretools.EntitySet', 'ft.EntitySet', ([], {'id': '"""Transactions"""'}), "(id='Transactions')\n", (2042, 2061), True, 'import featuretools as ft\n'), ((2607, 2757), 'featuretools.dfs', 'ft.dfs', ([], {'entityset': 'entityset', 'target_entity': 'self.target_entity', 'trans_primitives': 'self.trans_p... |
import os
import math
import random
import numpy as np
import networkx as nx
from copy import deepcopy
from typing import List
from barl_simpleoptions.option import Option
from barl_simpleoptions.state import State
from barl_simpleoptions.environment import Environment
class OptionAgent :
"""
An agent which ... | [
"numpy.full",
"copy.deepcopy",
"numpy.multiply",
"random.choice",
"random.random",
"numpy.arange"
] | [((1969, 2001), 'numpy.full', 'np.full', (['num_rewards', 'self.gamma'], {}), '(num_rewards, self.gamma)\n', (1976, 2001), True, 'import numpy as np\n'), ((2003, 2032), 'numpy.arange', 'np.arange', (['(1)', '(1 + num_rewards)'], {}), '(1, 1 + num_rewards)\n', (2012, 2032), True, 'import numpy as np\n'), ((2129, 2160), ... |
# -*- coding: utf-8 -*-
"""
Created on Sat Jan 12 18:36:44 2019
@author: Yatharth
"""
import gmplot
import geopy.distance
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
points = pd.read_csv(r'C:\Users\Yatharth\Desktop\map_dataset3.csv')
metros = pd.read_csv(r'C:\Users\Yatharth\Des... | [
"pandas.read_csv",
"numpy.asarray",
"numpy.max",
"numpy.min",
"numpy.mean",
"gmplot.GoogleMapPlotter"
] | [((216, 277), 'pandas.read_csv', 'pd.read_csv', (['"""C:\\\\Users\\\\Yatharth\\\\Desktop\\\\map_dataset3.csv"""'], {}), "('C:\\\\Users\\\\Yatharth\\\\Desktop\\\\map_dataset3.csv')\n", (227, 277), True, 'import pandas as pd\n'), ((285, 347), 'pandas.read_csv', 'pd.read_csv', (['"""C:\\\\Users\\\\Yatharth\\\\Desktop\\\\d... |
import ismrmrd
import os
import itertools
import logging
import numpy as np
import numpy.fft as fft
import base64
import re
import mrdhelper
# Folder for debug output files
debugFolder = "/tmp/share/debug"
def process(connection, config, metadata):
logging.info("Config: \n%s", config)
# Metadata should be M... | [
"numpy.save",
"logging.debug",
"os.makedirs",
"ismrmrd.get_dtype_from_data_type",
"os.path.exists",
"ismrmrd.Meta.serialize",
"base64.b64decode",
"ismrmrd.Meta.deserialize",
"logging.info",
"numpy.around",
"numpy.diff",
"re.search",
"numpy.concatenate"
] | [((256, 292), 'logging.info', 'logging.info', (['"""Config: \n%s"""', 'config'], {}), "('Config: \\n%s', config)\n", (268, 292), False, 'import logging\n'), ((4093, 4145), 'ismrmrd.Meta.deserialize', 'ismrmrd.Meta.deserialize', (['images[0].attribute_string'], {}), '(images[0].attribute_string)\n', (4117, 4145), False,... |
import numpy as np
import importlib
import sys
if not '../aux/' in sys.path: sys.path.append('../aux/')
import paths; importlib.reload(paths)
import nessy; importlib.reload(nessy)
import auxsys; importlib.reload(auxsys)
if len(sys.argv) < 3: auxsys.abort('Not enough arguments. Abort.')
run = sys.argv[1]
w1 = i... | [
"sys.path.append",
"auxsys.abort",
"numpy.transpose",
"importlib.reload",
"nessy.read_spec"
] | [((123, 146), 'importlib.reload', 'importlib.reload', (['paths'], {}), '(paths)\n', (139, 146), False, 'import importlib\n'), ((162, 185), 'importlib.reload', 'importlib.reload', (['nessy'], {}), '(nessy)\n', (178, 185), False, 'import importlib\n'), ((201, 225), 'importlib.reload', 'importlib.reload', (['auxsys'], {})... |
import numpy as np
from PuzzleLib.Backend import gpuarray
from PuzzleLib.Backend.Kernels import Pool
from PuzzleLib.Modules.Module import ModuleError, Module
from PuzzleLib.Modules.MaxPool2D import MaxPool2D
class MaxUnpool2D(Module):
def __init__(self, maxpool2d, name=None):
super().__init__(name)
self.regist... | [
"PuzzleLib.Backend.Kernels.Pool.maxunpool2dBackward",
"numpy.random.randn",
"numpy.empty",
"numpy.zeros",
"PuzzleLib.Modules.Module.ModuleError",
"PuzzleLib.Modules.MaxPool2D.MaxPool2D",
"PuzzleLib.Backend.Kernels.Pool.maxunpool2d"
] | [((1920, 1931), 'PuzzleLib.Modules.MaxPool2D.MaxPool2D', 'MaxPool2D', ([], {}), '()\n', (1929, 1931), False, 'from PuzzleLib.Modules.MaxPool2D import MaxPool2D\n'), ((2170, 2220), 'numpy.zeros', 'np.zeros', (['maxpool2d.inData.shape'], {'dtype': 'np.float32'}), '(maxpool2d.inData.shape, dtype=np.float32)\n', (2178, 222... |
import numpy as np
import matplotlib.pyplot as plt
import os
import sys
from glob import glob
import pickle
import healpy as hp
import astropy.io.fits as pf
from planck_util import log_bin
from measure_bias_tools import *
force = False
do_plot = True
mapcache = "maps"
clcache = "cls"
fwhm_deg = 3
fwhm_arcmin = fwhm_... | [
"numpy.amin",
"numpy.ones",
"matplotlib.pyplot.figure",
"os.path.isfile",
"numpy.arange",
"matplotlib.pyplot.gca",
"matplotlib.pyplot.close",
"numpy.radians",
"healpy.read_cl",
"matplotlib.pyplot.legend",
"numpy.sort",
"astropy.io.fits.open",
"matplotlib.pyplot.subplots_adjust",
"matplotli... | [((340, 360), 'numpy.radians', 'np.radians', (['fwhm_deg'], {}), '(fwhm_deg)\n', (350, 360), True, 'import numpy as np\n'), ((1470, 1505), 'healpy.read_map', 'hp.read_map', (['fn_dipo'], {'verbose': '(False)'}), '(fn_dipo, verbose=False)\n', (1481, 1505), True, 'import healpy as hp\n'), ((5141, 5156), 'numpy.array', 'n... |
import os
import time
import numpy as np
import tensorflow as tf
from a_nice_mc.utils.bootstrap import Buffer
from a_nice_mc.utils.logger import create_logger
from a_nice_mc.utils.nice import TrainingOperator, InferenceOperator
from a_nice_mc.utils.hmc import HamiltonianMonteCarloSampler as HmcSampler
class Trainer(... | [
"tensorflow.reshape",
"tensorflow.local_variables_initializer",
"tensorflow.multiply",
"tensorflow.global_variables",
"tensorflow.ConfigProto",
"tensorflow.GPUOptions",
"numpy.random.randn",
"numpy.transpose",
"tensorflow.concat",
"tensorflow.stack",
"tensorflow.placeholder",
"a_nice_mc.utils.... | [((796, 819), 'a_nice_mc.utils.logger.create_logger', 'create_logger', (['__name__'], {}), '(__name__)\n', (809, 819), False, 'from a_nice_mc.utils.logger import create_logger\n'), ((844, 869), 'a_nice_mc.utils.nice.TrainingOperator', 'TrainingOperator', (['network'], {}), '(network)\n', (860, 869), False, 'from a_nice... |
'''
Unit tests for quantum analysis. Takes in pre-made data with known results,
computes the results from the data and checks everything is correct.
'''
import unittest
import pickle
import numpy as np
import sys
sys.path.append('..') # noqa
import pyEPR as epr
# Files location
save_file = './data.npz'
correct_result... | [
"sys.path.append",
"numpy.allclose",
"pickle.load",
"numpy.array",
"pyEPR.QuantumAnalysis"
] | [((213, 234), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (228, 234), False, 'import sys\n'), ((438, 468), 'pyEPR.QuantumAnalysis', 'epr.QuantumAnalysis', (['save_file'], {}), '(save_file)\n', (457, 468), True, 'import pyEPR as epr\n'), ((550, 567), 'pickle.load', 'pickle.load', (['file'], {})... |
#! /usr/bin/env python
"""
File: integrate_exp.py
Copyright (c) 2016 <NAME>
License: MIT
Course: PHYS227
Assignment: B.6
Date: March 18th, 2016
Email: <EMAIL>
Name: <NAME>
Description: Uses the trapezoid rule to approximate integration
"""
from __future__ import division
import numpy as np
import pandas as pd
import ... | [
"matplotlib.pyplot.title",
"matplotlib.pyplot.show",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.figure",
"numpy.exp",
"numpy.linspace",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel",
"numpy.sqrt"
] | [((369, 382), 'matplotlib.pyplot.figure', 'plt.figure', (['(1)'], {}), '(1)\n', (379, 382), True, 'import matplotlib.pyplot as plt\n'), ((391, 418), 'numpy.linspace', 'np.linspace', (['(-10)', '(10)', '(10000)'], {}), '(-10, 10, 10000)\n', (402, 418), True, 'import numpy as np\n'), ((427, 442), 'numpy.exp', 'np.exp', (... |
'''
Created on Jun 3, 2021
@author: immanueltrummer
'''
import argparse
import checker.match
import checker.rl
import itertools
import json
import numpy as np
from stable_baselines3 import A2C
import stable_baselines3.common.evaluation
# Login data can be retrieved at https://programmablesearchengine.google.com/
pars... | [
"json.dump",
"argparse.ArgumentParser",
"stable_baselines3.A2C",
"numpy.array",
"itertools.product"
] | [((325, 390), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Simple test for WebChecker"""'}), "(description='Simple test for WebChecker')\n", (348, 390), False, 'import argparse\n'), ((1673, 1698), 'json.dump', 'json.dump', (['json_res', 'file'], {}), '(json_res, file)\n', (1682, 1698),... |
import numpy as np
import pandas as pd
from pickle_functions import unpicklify
import plotly.graph_objects as go
import dash_core_components as dcc
import dash_html_components as html
import dash_bootstrap_components as dbc
import dash_table as dt
from dash.dependencies import Input, Output, State
from pickle_function... | [
"dash_bootstrap_components.ListGroupItemText",
"plotly.graph_objects.Figure",
"pandas.isna",
"numpy.log"
] | [((2701, 2712), 'plotly.graph_objects.Figure', 'go.Figure', ([], {}), '()\n', (2710, 2712), True, 'import plotly.graph_objects as go\n'), ((4522, 4533), 'plotly.graph_objects.Figure', 'go.Figure', ([], {}), '()\n', (4531, 4533), True, 'import plotly.graph_objects as go\n'), ((6317, 6328), 'plotly.graph_objects.Figure',... |
import numpy as np
# 求绝对值
# np.absolute () = np.abs() 支持复数
# np.fabs() 不支持复数
a = -2.5
np.absolute(a)
np.abs(a)
b = -2 -3j
np.abs(b)
| [
"numpy.absolute",
"numpy.abs"
] | [((87, 101), 'numpy.absolute', 'np.absolute', (['a'], {}), '(a)\n', (98, 101), True, 'import numpy as np\n'), ((102, 111), 'numpy.abs', 'np.abs', (['a'], {}), '(a)\n', (108, 111), True, 'import numpy as np\n'), ((123, 132), 'numpy.abs', 'np.abs', (['b'], {}), '(b)\n', (129, 132), True, 'import numpy as np\n')] |
# 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.
import datetime
import logging
import time,json
from argparse import Namespace
import numpy as np
import torch
from fairseq.data import (
... | [
"argparse.Namespace",
"fairseq.data.ListDataset",
"torch.autograd.profiler.record_function",
"fairseq.data.multilingual.multilingual_data_manager.MultilingualDatasetManager.add_args",
"fairseq.data.multilingual.sampling_method.SamplingMethod.add_arguments",
"fairseq.metrics.log_derived",
"torch.no_grad"... | [((909, 936), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (926, 936), False, 'import logging\n'), ((940, 987), 'fairseq.tasks.register_task', 'register_task', (['"""translation_multi_simple_epoch"""'], {}), "('translation_multi_simple_epoch')\n", (953, 987), False, 'from fairseq.tasks ... |
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.pyplot import figure
labels = ['FDX', 'GL', 'PYRO', 'TANE', 'CORDS', 'RFI(.3)', 'RFI(.5)', 'RFI(1)']
f1_dict = {
'tlarge_rlarge_dlarge_nhigh': np.array([0.336, 0.207, 0.022, -1, 0.148, -1, -1, -1]),
'tlarge_rlarge_dlarge_nlow... | [
"matplotlib.pyplot.savefig",
"numpy.array",
"matplotlib.pyplot.subplots"
] | [((234, 288), 'numpy.array', 'np.array', (['[0.336, 0.207, 0.022, -1, 0.148, -1, -1, -1]'], {}), '([0.336, 0.207, 0.022, -1, 0.148, -1, -1, -1])\n', (242, 288), True, 'import numpy as np\n'), ((323, 377), 'numpy.array', 'np.array', (['[0.939, 0.514, 0.021, -1, 0.276, -1, -1, -1]'], {}), '([0.939, 0.514, 0.021, -1, 0.27... |
#!/usr/bin/env python3
"""
Usage: analyze.py FILE [options]
Analyze feature importance of an FI-based classifier (like random forests).
Options:
-o, --oob Report out-of-bag (OOB) scores. (default: full training set)
-m, --max-feats NUM Maximum number of features to extract; features ... | [
"numpy.random.seed",
"numpy.triu",
"numpy.abs",
"numpy.argmax",
"docopt.docopt",
"logzero.LogFormatter",
"collections.defaultdict",
"numpy.mean",
"pyconll.load_from_file",
"sklearn.metrics.precision_recall_fscore_support",
"sklearn.dummy.DummyClassifier",
"warnings.simplefilter",
"sklearn.pr... | [((2455, 2486), 'logzero.loglevel', 'logzero.loglevel', (['logging.DEBUG'], {}), '(logging.DEBUG)\n', (2471, 2486), False, 'import logzero\n'), ((2499, 2519), 'numpy.random.seed', 'np.random.seed', (['SEED'], {}), '(SEED)\n', (2513, 2519), True, 'import numpy as np\n'), ((2404, 2453), 'logzero.LogFormatter', 'logzero.L... |
import matplotlib.pyplot as plt
import numpy as np
import sys
def load() -> list:
values = list()
with open("values.txt", "r") as f:
data = f.read().split("),")
for i in range(len(data)):
new_data = data[i].replace("(", "").replace(")", "")
t1, t2, t3, t4 = new_data.sp... | [
"matplotlib.pyplot.title",
"matplotlib.pyplot.show",
"matplotlib.pyplot.imshow",
"numpy.zeros",
"matplotlib.pyplot.colorbar",
"numpy.arange",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel"
] | [((460, 497), 'matplotlib.pyplot.title', 'plt.title', (['f"""Accuracy {curr_set}-Set"""'], {}), "(f'Accuracy {curr_set}-Set')\n", (469, 497), True, 'import matplotlib.pyplot as plt\n'), ((549, 580), 'matplotlib.pyplot.xlabel', 'plt.xlabel', (['"""Hidden Layer Size"""'], {}), "('Hidden Layer Size')\n", (559, 580), True,... |
""" Dataset Module for handling datasets
Copyright, 2018(c), <NAME>
"""
import numpy as np
from .vision import Images
class Dataset(object):
""" Manage Dataset for Training a Model """
def __init__(self):
self._init()
def _init(self):
""" re-initialize variables """
self.... | [
"numpy.eye",
"numpy.asarray"
] | [((1521, 1545), 'numpy.asarray', 'np.asarray', (['self.X_train'], {}), '(self.X_train)\n', (1531, 1545), True, 'import numpy as np\n'), ((1569, 1593), 'numpy.asarray', 'np.asarray', (['self.Y_train'], {}), '(self.Y_train)\n', (1579, 1593), True, 'import numpy as np\n'), ((1617, 1640), 'numpy.asarray', 'np.asarray', (['... |
# TODO:
# - Test forward times
# - Test grad time
# - Test compile time
import functools as ft
import diffrax
import equinox as eqx
import jax
import jax.lax as lax
import jax.numpy as jnp
import jax.random as jrandom
import numpy as np
from helpers import shaped_allclose, time_fn
def test_functional_no_vmap_no_in... | [
"functools.partial",
"jax.numpy.array",
"numpy.polynomial.Polynomial.fit",
"jax.random.PRNGKey",
"jax.numpy.minimum",
"diffrax.misc.HadInplaceUpdate",
"diffrax.misc.bounded_while_loop",
"equinox.nn.MLP",
"jax.tree_map"
] | [((531, 605), 'diffrax.misc.bounded_while_loop', 'diffrax.misc.bounded_while_loop', (['cond_fun', 'body_fun', 'init_val'], {'max_steps': '(0)'}), '(cond_fun, body_fun, init_val, max_steps=0)\n', (562, 605), False, 'import diffrax\n'), ((686, 760), 'diffrax.misc.bounded_while_loop', 'diffrax.misc.bounded_while_loop', ([... |
import graph_tool.all as gt
import numpy as np
from SGD_MDS_sphere import SMDS
from SGD_MDS2 import SGD
from HMDS import HMDS
import matplotlib.pyplot as plt
from sklearn.metrics import pairwise_distances
import math
sin,cos, acos, sqrt = np.sin, np.cos, np.arccos, np.sqrt
acosh, cosh, sinh = np.arccosh, np.cosh, np.... | [
"graph_tool.all.shortest_distance",
"numpy.savetxt",
"numpy.dtype",
"numpy.linalg.norm",
"graph_tool.all.remove_parallel_edges",
"graph_tool.all.load_graph_from_csv",
"os.listdir"
] | [((569, 617), 'graph_tool.all.load_graph_from_csv', 'gt.load_graph_from_csv', (['"""txt_graphs/494_bus.txt"""'], {}), "('txt_graphs/494_bus.txt')\n", (591, 617), True, 'import graph_tool.all as gt\n'), ((618, 645), 'graph_tool.all.remove_parallel_edges', 'gt.remove_parallel_edges', (['G'], {}), '(G)\n', (642, 645), Tru... |
import numpy as np
import matplotlib.pyplot as plt
import torch as T
import copy
from tqdm import tqdm
import datetime
from app.util.ML.constants import *
from app.util.ML.dataset import *
class AnomalyDetector():
def load_model(self):
try:
if self.cuda:
self.model.load_state_... | [
"torch.nn.MSELoss",
"torch.nn.ReLU",
"torch.utils.data.DataLoader",
"torch.load",
"torch.set_grad_enabled",
"torch.save",
"numpy.random.randint",
"numpy.array",
"datetime.timedelta",
"torch.nn.Linear",
"torch.device",
"torch.no_grad",
"torch.tensor"
] | [((850, 918), 'torch.save', 'T.save', (['state_dict', '(self.modelPath + self.modelName + EXTENSION_NAME)'], {}), '(state_dict, self.modelPath + self.modelName + EXTENSION_NAME)\n', (856, 918), True, 'import torch as T\n'), ((2375, 2402), 'numpy.random.randint', 'np.random.randint', (['(30)', '(3000)'], {}), '(30, 3000... |
import numpy as np
class DopingProfile:
def __init__(self, ion_number_densities, radii=None, areas=None):
if radii is None and areas is None:
raise RuntimeError('Either radii or areas must be specified.')
elif radii is not None and areas is not None:
raise RuntimeError('Bot... | [
"numpy.array",
"numpy.all",
"numpy.hstack"
] | [((906, 936), 'numpy.array', 'np.array', (['ion_number_densities'], {}), '(ion_number_densities)\n', (914, 936), True, 'import numpy as np\n'), ((1014, 1035), 'numpy.hstack', 'np.hstack', (['(0, radii)'], {}), '((0, radii))\n', (1023, 1035), True, 'import numpy as np\n'), ((506, 521), 'numpy.array', 'np.array', (['area... |
#pytorch mlp for regression
from numpy import vstack
from numpy import sqrt
from pandas import read_csv
from sklearn.metrics import mean_squared_error
from torch.utils.data import Dataset
from torch.utils.data import DataLoader
from torch.utils.data import random_split
from torch import Tensor
from torch.nn import Line... | [
"torch.nn.MSELoss",
"torch.utils.data.DataLoader",
"pandas.read_csv",
"torch.nn.init.xavier_uniform_",
"torch.nn.Linear",
"torch.Tensor",
"torch.utils.data.random_split",
"sklearn.metrics.mean_squared_error",
"numpy.vstack",
"torch.nn.Sigmoid"
] | [((3673, 3719), 'torch.utils.data.DataLoader', 'DataLoader', (['train'], {'batch_size': '(32)', 'shuffle': '(True)'}), '(train, batch_size=32, shuffle=True)\n', (3683, 3719), False, 'from torch.utils.data import DataLoader\n'), ((3734, 3782), 'torch.utils.data.DataLoader', 'DataLoader', (['test'], {'batch_size': '(1024... |
#
# File:
# taylor_diagram1.py
#
# Synopsis:
# Illustrates how to create a taylor diagram.
#
# Categories:
# taylor diagrams
#
# Author:
# <NAME>
#
# Date of initial publication:
# March 2015
#
# Description:
# This example shows how to use the taylor_diagram function added
# in PyNGL 1.5.0... | [
"Ngl.open_wks",
"numpy.size",
"numpy.zeros",
"numpy.array",
"Ngl.taylor_diagram",
"Ngl.Resources"
] | [((588, 601), 'numpy.size', 'np.size', (['case'], {}), '(case)\n', (595, 601), True, 'import numpy as np\n'), ((756, 768), 'numpy.size', 'np.size', (['var'], {}), '(var)\n', (763, 768), True, 'import numpy as np\n'), ((854, 919), 'numpy.array', 'np.array', (['[1.23, 0.988, 1.092, 1.172, 1.064, 0.966, 1.079, 0.781]'], {... |
#!/usr/bin/env python3
from pathlib import Path
import cv2
import depthai as dai
import numpy as np
import time
nnPath = str((Path(__file__).parent / Path('./models/OpenVINO_2021_2/mobilenet-ssd_openvino_2021.2_6shave.blob')).resolve().absolute())
# MobilenetSSD class labels
labelMap = ["background", "aeroplane", "b... | [
"depthai.Pipeline",
"cv2.putText",
"cv2.waitKey",
"depthai.Device",
"pathlib.Path",
"time.monotonic",
"numpy.array",
"cv2.rectangle",
"cv2.imshow"
] | [((551, 565), 'depthai.Pipeline', 'dai.Pipeline', ([], {}), '()\n', (563, 565), True, 'import depthai as dai\n'), ((1330, 1350), 'depthai.Device', 'dai.Device', (['pipeline'], {}), '(pipeline)\n', (1340, 1350), True, 'import depthai as dai\n'), ((1684, 1700), 'time.monotonic', 'time.monotonic', ([], {}), '()\n', (1698,... |
import pandas as pd
import networkx as nx
import numpy as np
from amftrack.pipeline.functions.image_processing.extract_graph import (
prune_graph,
)
from amftrack.pipeline.functions.image_processing.node_id import reconnect_degree_2
import scipy.io as sio
from amftrack.pipeline.functions.image_processing.ex... | [
"pandas.DataFrame",
"amftrack.pipeline.functions.image_processing.experiment_class_surf.Node",
"networkx.relabel_nodes",
"numpy.linalg.norm",
"collections.Counter",
"amftrack.pipeline.functions.image_processing.node_id.reconnect_degree_2",
"amftrack.pipeline.functions.image_processing.experiment_class_s... | [((4876, 4918), 'pandas.DataFrame', 'pd.DataFrame', ([], {'columns': 'column_names_hyphaes'}), '(columns=column_names_hyphaes)\n', (4888, 4918), True, 'import pandas as pd\n'), ((4938, 4984), 'pandas.DataFrame', 'pd.DataFrame', ([], {'columns': 'column_names_growth_info'}), '(columns=column_names_growth_info)\n', (4950... |
import matplotlib as mpl
mpl.use('Qt5Agg')
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from PyQt5 import QtGui, QtCore
from syncmrt.imageGuidance import optimiseFiducials
# from skimage import exposure
from skimage.external import ... | [
"numpy.load",
"matplotlib.widgets.Cursor",
"numpy.sum",
"matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg",
"numpy.amax",
"matplotlib.pyplot.figure",
"matplotlib.use",
"numpy.array",
"syncmrt.imageGuidance.optimiseFiducials",
"numpy.column_stack",
"numpy.concatenate"
] | [((25, 42), 'matplotlib.use', 'mpl.use', (['"""Qt5Agg"""'], {}), "('Qt5Agg')\n", (32, 42), True, 'import matplotlib as mpl\n'), ((1157, 1169), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (1167, 1169), True, 'import matplotlib.pyplot as plt\n'), ((1985, 2007), 'matplotlib.backends.backend_qt5agg.FigureCa... |
# from __future__ import annotations # type annotations
# import typing
from graphic import Graphic
from graphic import Color
from enum import Enum
import random
import pygame
import time
import numpy as np
pygame.init()
columns = 19 # X
rows = 19 # Y
# Chance that the measurement gives the wrong color
# Here 40%, ... | [
"pygame.quit",
"numpy.sum",
"random.randint",
"pygame.font.SysFont",
"pygame.event.get",
"numpy.argmax",
"numpy.roll",
"numpy.zeros",
"pygame.init",
"time.sleep",
"numpy.amax",
"graphic.Graphic",
"pygame.font.init",
"random.random",
"numpy.swapaxes",
"pygame.key.get_pressed"
] | [((208, 221), 'pygame.init', 'pygame.init', ([], {}), '()\n', (219, 221), False, 'import pygame\n'), ((6967, 6985), 'pygame.font.init', 'pygame.font.init', ([], {}), '()\n', (6983, 6985), False, 'import pygame\n'), ((6993, 7022), 'pygame.font.SysFont', 'pygame.font.SysFont', (['None', '(25)'], {}), '(None, 25)\n', (701... |
import numpy as np
import argparse
import pandas as pd
import os
from scipy.signal import find_peaks
def remove_pos_bias(pos, direct, d):
"""
remove position bias in pair file
"""
shift = np.zeros(len(pos))
shift[np.argwhere(direct=='-')] -= d
shift[np.argwhere(direct=='+')] += d
return pos... | [
"argparse.ArgumentParser",
"numpy.logical_and",
"pandas.read_csv",
"scipy.signal.find_peaks",
"numpy.array",
"numpy.linspace",
"numpy.argwhere",
"os.path.join"
] | [((339, 379), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '""" """'}), "(description=' ')\n", (362, 379), False, 'import argparse\n'), ((724, 774), 'pandas.read_csv', 'pd.read_csv', (['args.pair_file'], {'header': 'None', 'sep': '"""\t"""'}), "(args.pair_file, header=None, sep='\\t')\n", ... |
import pytest
import numpy as np
from scipy import constants
from os.path import join, dirname
from numpy.testing import assert_allclose
import emg3d
from emg3d import fields
from . import alternatives, helpers
try:
import discretize
except ImportError:
discretize = None
# Data generated with tests/create_... | [
"numpy.abs",
"numpy.sum",
"numpy.angle",
"emg3d.fields._point_vector_magnetic",
"emg3d.construct_mesh",
"numpy.ones",
"emg3d.fields.get_source_field",
"pytest.mark.skipif",
"numpy.arange",
"numpy.random.randint",
"pytest.mark.parametrize",
"emg3d.fields._point_vector",
"numpy.may_share_memor... | [((22657, 22731), 'pytest.mark.skipif', 'pytest.mark.skipif', (['(discretize is None)'], {'reason': '"""discretize not installed."""'}), "(discretize is None, reason='discretize not installed.')\n", (22675, 22731), False, 'import pytest\n'), ((28363, 28409), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""n... |
"""
Dynamical Systems with a closed-form description.
"""
# Author: <NAME>
# Email: <EMAIL>
# License: BSD (c) 2021
import numpy as np
from numpy import linalg as LA
from ._base import DynamicalSystem
class LinearSystem(DynamicalSystem):
"""
Linear Dyanmical system of the form
dot[x] = A @ (x - center_p... | [
"numpy.zeros",
"numpy.linalg.eig",
"numpy.linalg.norm",
"numpy.eye",
"numpy.linalg.pinv"
] | [((1903, 1946), 'numpy.linalg.norm', 'LA.norm', (['(position - self.attractor_position)'], {}), '(position - self.attractor_position)\n', (1910, 1946), True, 'from numpy import linalg as LA\n'), ((2051, 2068), 'numpy.linalg.norm', 'LA.norm', (['velocity'], {}), '(velocity)\n', (2058, 2068), True, 'from numpy import lin... |
import pdb
#pdb.set_trace()
import pickle
import gzip
import glob
from collections import defaultdict
import numpy as np
from subprocess import Popen
from multiprocessing import Pool,cpu_count,active_children
import time
import os
import sys
from argparse import ArgumentParser
parser = ArgumentParser(description="Autho... | [
"subprocess.Popen",
"argparse.ArgumentParser",
"os.makedirs",
"os.path.exists",
"time.sleep",
"collections.defaultdict",
"numpy.min",
"numpy.max",
"multiprocessing.Pool",
"multiprocessing.active_children"
] | [((287, 399), 'argparse.ArgumentParser', 'ArgumentParser', ([], {'description': '"""Author: <EMAIL>\n"""', 'usage': '"""use "python3 %(prog)s --help" for more information"""'}), '(description=\'Author: <EMAIL>\\n\', usage=\n \'use "python3 %(prog)s --help" for more information\')\n', (301, 399), False, 'from argpars... |
#!/usr/bin/env python
"""
This demonstrates how to use FloatCanvas with a coordinate system where
Y is increased down, instead of up. This is a standard system for
images, for instance.
Note that there are some problems with doing this for bitmaps and text: things that require positioning.
I'm sure it can be fixed, ... | [
"numpy.array",
"wx.Frame.__init__",
"wx.App",
"wx.lib.floatcanvas.NavCanvas.NavCanvas"
] | [((2044, 2057), 'wx.App', 'wx.App', (['(False)'], {}), '(False)\n', (2050, 2057), False, 'import wx\n'), ((669, 685), 'numpy.array', 'N.array', (['(1, -1)'], {}), '((1, -1))\n', (676, 685), True, 'import numpy as N\n'), ((823, 863), 'wx.Frame.__init__', 'wx.Frame.__init__', (['self', '*args'], {}), '(self, *args, **kwa... |
"""
This file contains experimental versions of downgridding xp-grids.
"""
from scipy.interpolate import UnivariateSpline, interp1d
import numpy as np
import scipy.stats as ss
import scipy.stats.distributions as distrs
from randomvars import Disc
from randomvars._continuous import _xy_from_cdf_spline
import randomvars... | [
"numpy.abs",
"numpy.sum",
"numpy.argmin",
"numpy.argsort",
"scipy.interpolate.interp1d",
"randomvars._utils._trapez_integral",
"scipy.stats.energy_distance",
"scipy.interpolate.UnivariateSpline",
"randomvars._continuous._xy_from_cdf_spline",
"numpy.cumsum",
"randomvars._utilsgrid._p_from_xy",
... | [((6979, 7007), 'numpy.random.uniform', 'np.random.uniform', ([], {'size': '(1000)'}), '(size=1000)\n', (6996, 7007), True, 'import numpy as np\n'), ((965, 975), 'numpy.diff', 'np.diff', (['x'], {}), '(x)\n', (972, 975), True, 'import numpy as np\n'), ((1170, 1237), 'numpy.concatenate', 'np.concatenate', (['([dc[0] * d... |
import numpy as np
from ts_embedder.processors.ProcessorABC import ProcessorABC
from ts_embedder.processors.Seq2SeqShifter import Seq2SeqShifter
class TsSeq2SeqProcessor(ProcessorABC):
def __init__(self, aux_tokens):
super().__init__()
self._start_token = aux_tokens["start_token"] if "start_toke... | [
"ts_embedder.processors.Seq2SeqShifter.Seq2SeqShifter",
"numpy.expand_dims"
] | [((461, 511), 'ts_embedder.processors.Seq2SeqShifter.Seq2SeqShifter', 'Seq2SeqShifter', (['self._start_token', 'self._end_token'], {}), '(self._start_token, self._end_token)\n', (475, 511), False, 'from ts_embedder.processors.Seq2SeqShifter import Seq2SeqShifter\n'), ((923, 960), 'numpy.expand_dims', 'np.expand_dims', ... |
# Copyright 2018 The Lucid 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 applicable l... | [
"numpy.maximum",
"numpy.asarray",
"math.floor",
"numpy.ones",
"numpy.linalg.norm"
] | [((918, 996), 'numpy.asarray', 'np.asarray', (['[[1, 0, 0], [1, 1, 0], [0, 1, 0], [0, 1, 1], [0, 0, 1], [1, 0, 1]]'], {}), '([[1, 0, 0], [1, 1, 0], [0, 1, 0], [0, 1, 1], [0, 0, 1], [1, 0, 1]])\n', (928, 996), True, 'import numpy as np\n'), ((1122, 1141), 'math.floor', 'math.floor', (['(ang / R)'], {}), '(ang / R)\n', (... |
# -*- coding: utf-8 -*-
"""
Created on Thu Jan 25 07:05:44 2018
@author: <NAME>.
"""
# =====================================================================
# CONFIG PANEL
# Here you can select one of the four proposed exercises for revision,
# change the EXERCISE_NUMBER for select an exersice.
EXERCISE_NUMBER = 0
#... | [
"cv2.waitKey",
"cv2.destroyAllWindows",
"cv2.imwrite",
"numpy.zeros",
"numpy.ones",
"cv2.imread",
"cv2.imshow"
] | [((7817, 7840), 'cv2.destroyAllWindows', 'cv2.destroyAllWindows', ([], {}), '()\n', (7838, 7840), False, 'import cv2\n'), ((1380, 1412), 'cv2.imread', 'cv2.imread', (['"""1_cho_in_color.jpg"""'], {}), "('1_cho_in_color.jpg')\n", (1390, 1412), False, 'import cv2\n'), ((1685, 1723), 'numpy.zeros', 'np.zeros', (['(height,... |
# -*- coding: utf-8 -*-
"""
Created on Mon Feb 12 13:03:27 2018
@author: smanski
This code is set up to simulate a 3 x 1 grid of individual population models. Because
there is no migration between the populations, each can be treated as an independent experiment.
TODO: make it possible for gestating eggs to... | [
"mesa.time.RandomActivation",
"mesa.datacollection.DataCollector",
"numpy.subtract",
"math.sqrt",
"pandas.read_csv",
"winsound.Beep",
"math.floor",
"random.choice",
"time.time",
"random.random",
"mesa.space.MultiGrid",
"random.randrange"
] | [((2772, 2790), 'pandas.read_csv', 'pd.read_csv', (['tempC'], {}), '(tempC)\n', (2783, 2790), True, 'import pandas as pd\n'), ((30993, 31018), 'winsound.Beep', 'winsound.Beep', (['(2000)', '(2000)'], {}), '(2000, 2000)\n', (31006, 31018), False, 'import winsound\n'), ((30942, 30967), 'winsound.Beep', 'winsound.Beep', (... |
import numpy as np
import h5py
import json
import os
import time
import scipy
import scipy.signal
import sys
from tqdm import tqdm
import click
from collections import namedtuple
from datetime import datetime
from math import ceil
from struct import calcsize, pack, unpack, unpack_from
from qtpy.QtWidgets... | [
"click.option",
"qtpy.QtWidgets.QFileDialog",
"os.path.isfile",
"numpy.float64",
"numpy.ndarray",
"numpy.power",
"numpy.transpose",
"click.command",
"numpy.int64",
"h5py.File",
"math.ceil",
"os.path.getsize",
"struct.unpack",
"struct.calcsize",
"datetime.datetime",
"scipy.signal.resamp... | [((821, 879), 'collections.namedtuple', 'namedtuple', (['"""FieldDef"""', "['name', 'formatStr', 'formatFnc']"], {}), "('FieldDef', ['name', 'formatStr', 'formatFnc'])\n", (831, 879), False, 'from collections import namedtuple\n'), ((29404, 29419), 'click.command', 'click.command', ([], {}), '()\n', (29417, 29419), Fal... |
#!/usr/bin/env python
import sys
import os
import numpy as np
from Bio import SeqIO
# list of natural aminoacids
alphabet = [
'-',
'A','C','D','E',
'F','G','H','I',
'K','L','M','N',
'P','Q','R','S',
'T','V','W','Y',
]
# add 1 to the indices (gaps will have index 1)
AAMap = {alphabet[i]: i+1 for i in range(len(alphab... | [
"numpy.sum",
"argparse.ArgumentParser",
"numpy.asarray",
"numpy.arange",
"sys.stderr.write",
"numpy.random.shuffle"
] | [((2465, 2481), 'numpy.asarray', 'np.asarray', (['msa1'], {}), '(msa1)\n', (2475, 2481), True, 'import numpy as np\n'), ((2487, 2503), 'numpy.asarray', 'np.asarray', (['msa2'], {}), '(msa2)\n', (2497, 2503), True, 'import numpy as np\n'), ((2508, 2523), 'numpy.asarray', 'np.asarray', (['msa'], {}), '(msa)\n', (2518, 25... |
import gym
import numpy as np
import tensorflow as tf
from tqdm import tqdm
from gym.envs.registration import register
def onehot(label, num_labels):
result = np.zeros((1, num_labels))
result[0, label] = 1
return result
register(
id='MyFrozenLake-v0',
entry_point='gym.envs.toy_text:FrozenLakeEn... | [
"numpy.random.uniform",
"gym.make",
"numpy.argmax",
"tensorflow.global_variables_initializer",
"tensorflow.layers.dense",
"numpy.zeros",
"tensorflow.Session",
"tensorflow.placeholder",
"numpy.max",
"tensorflow.square",
"tensorflow.train.GradientDescentOptimizer",
"gym.envs.registration.registe... | [((237, 418), 'gym.envs.registration.register', 'register', ([], {'id': '"""MyFrozenLake-v0"""', 'entry_point': '"""gym.envs.toy_text:FrozenLakeEnv"""', 'kwargs': "{'map_name': '4x4', 'is_slippery': True}", 'max_episode_steps': '(100)', 'reward_threshold': '(0.78)'}), "(id='MyFrozenLake-v0', entry_point=\n 'gym.envs... |
import strax
import numpy as np
import straxen
from .LinPosFit import *
@strax.takes_config(
strax.Option('n_top_pmts'),
strax.Option('pmt_to_lxe',default=7,help='Distance between the PMTs and the liquid interface'))
class PeakPositionsLinFit(strax.Plugin):
depends_on=('peaks','peak_basics')
rechunk_o... | [
"strax.Option",
"numpy.repeat",
"straxen.pmt_positions"
] | [((99, 125), 'strax.Option', 'strax.Option', (['"""n_top_pmts"""'], {}), "('n_top_pmts')\n", (111, 125), False, 'import strax\n'), ((131, 232), 'strax.Option', 'strax.Option', (['"""pmt_to_lxe"""'], {'default': '(7)', 'help': '"""Distance between the PMTs and the liquid interface"""'}), "('pmt_to_lxe', default=7, help=... |
import torch
import torchvision.transforms as transforms
import numpy as np
import torch.nn.functional as F
class RGBDAugmentor:
""" perform augmentation on RGB-D video """
def __init__(self, crop_size):
self.crop_size = crop_size
self.augcolor = transforms.Compose([
transforms.To... | [
"torchvision.transforms.ColorJitter",
"numpy.random.uniform",
"torchvision.transforms.ToPILImage",
"torchvision.transforms.RandomGrayscale",
"torch.nn.functional.interpolate",
"torch.tensor",
"torchvision.transforms.ToTensor"
] | [((1022, 1135), 'torch.nn.functional.interpolate', 'F.interpolate', (['images'], {'scale_factor': 'scale', 'mode': '"""bilinear"""', 'align_corners': '(False)', 'recompute_scale_factor': '(True)'}), "(images, scale_factor=scale, mode='bilinear', align_corners=\n False, recompute_scale_factor=True)\n", (1035, 1135), ... |
#!/usr/bin/env python
"""
Este programa permite detectar patos dentro del simulador mediante el análisis
de color.
"""
import sys
import argparse
import gym
import gym_duckietown
from gym_duckietown.envs import DuckietownEnv
import numpy as np
import cv2
def mov_duckiebot(key):
# La acción de Duckiebot consiste ... | [
"gym.make",
"argparse.ArgumentParser",
"cv2.bitwise_and",
"cv2.waitKey",
"cv2.cvtColor",
"cv2.dilate",
"gym_duckietown.envs.DuckietownEnv",
"numpy.ones",
"cv2.bitwise_or",
"numpy.array",
"cv2.erode",
"cv2.boundingRect",
"cv2.inRange",
"cv2.findContours"
] | [((814, 839), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (837, 839), False, 'import argparse\n'), ((2157, 2178), 'numpy.array', 'np.array', (['[0, 0, 155]'], {}), '([0, 0, 155])\n', (2165, 2178), True, 'import numpy as np\n'), ((2197, 2221), 'numpy.array', 'np.array', (['[255, 55, 255]'], {... |
import os, sys, random
import numpy as np
from noise import Noise
from multiprocessing import Process
# GNU Public Licence Copyright (c) <NAME>
# Comments and questions to <EMAIL>
# This code is provided freely, however when using this code you are asked to cite our related paper:
# Krafft et al. (2015) Emergent Coll... | [
"numpy.random.seed",
"os.makedirs",
"numpy.arctan2",
"noise.Noise",
"numpy.random.randint",
"numpy.random.random",
"numpy.sin",
"numpy.cos",
"multiprocessing.Process",
"numpy.sqrt"
] | [((1709, 1729), 'numpy.random.seed', 'np.random.seed', (['seed'], {}), '(seed)\n', (1723, 1729), True, 'import numpy as np\n'), ((1741, 1771), 'numpy.random.randint', 'np.random.randint', (['(2 ** 32 - 1)'], {}), '(2 ** 32 - 1)\n', (1758, 1771), True, 'import numpy as np\n'), ((1845, 1866), 'noise.Noise', 'Noise', (['N... |
import collections
import logging
import numpy
import time
def scoreAlignmentSetCollection(alnCollection, isd, minInsertSizeScore=0, expectedOrientations="any", singleEnded=False,
flankingRegionCollection=None, maxMultimappingSimilarity=0.9):
for name, alignmentSet in alnCollection.... | [
"collections.defaultdict",
"logging.warn",
"numpy.log10",
"time.time"
] | [((4840, 4851), 'time.time', 'time.time', ([], {}), '()\n', (4849, 4851), False, 'import time\n'), ((5276, 5287), 'time.time', 'time.time', ([], {}), '()\n', (5285, 5287), False, 'import time\n'), ((4146, 4264), 'numpy.log10', 'numpy.log10', (["(alnCollection['alt'].evidences['insertSizeScore'] / alnCollection['ref'].\... |
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from sklearn import datasets as skdata
from sklearn.decomposition import PCA
from sklearn.cluster import KMeans
# We will use the iris dataset
iris_dataset = skdata.load_iris()
X = iris_dataset.data # (150, 4)
y = iris_dataset.ta... | [
"sklearn.datasets.load_iris",
"matplotlib.pyplot.show",
"sklearn.cluster.KMeans",
"matplotlib.pyplot.figure",
"numpy.where",
"sklearn.decomposition.PCA",
"numpy.random.rand"
] | [((249, 267), 'sklearn.datasets.load_iris', 'skdata.load_iris', ([], {}), '()\n', (265, 267), True, 'from sklearn import datasets as skdata\n'), ((335, 355), 'sklearn.cluster.KMeans', 'KMeans', ([], {'n_clusters': '(3)'}), '(n_clusters=3)\n', (341, 355), False, 'from sklearn.cluster import KMeans\n'), ((718, 730), 'mat... |
import tensorflow as tf
import numpy as np
from utils.IoU import IOU
from utils.tools import str_to_int, resize_box, preprocess_image
from configuration import MAX_BOXES_PER_IMAGE, IMAGE_WIDTH, IMAGE_HEIGHT, IOU_THRESHOLD
from core.anchor import DefaultBoxes
class ReadDataset(object):
def __init__(self):
... | [
"numpy.stack",
"utils.tools.resize_box",
"numpy.zeros_like",
"numpy.log",
"numpy.argmax",
"tensorflow.convert_to_tensor",
"utils.IoU.IOU",
"tensorflow.stack",
"numpy.max",
"numpy.where",
"numpy.array",
"utils.tools.str_to_int",
"utils.tools.preprocess_image",
"core.anchor.DefaultBoxes",
... | [((1676, 1709), 'numpy.array', 'np.array', (['boxes'], {'dtype': 'np.float32'}), '(boxes, dtype=np.float32)\n', (1684, 1709), True, 'import numpy as np\n'), ((2109, 2137), 'numpy.stack', 'np.stack', (['boxes_list'], {'axis': '(0)'}), '(boxes_list, axis=0)\n', (2117, 2137), True, 'import numpy as np\n'), ((2368, 2403), ... |
import matplotlib.pyplot as plt
import matplotlib
import numpy as np
#for smoothing
#http://scipy.github.io/old-wiki/pages/Cookbook/SavitzkyGolay
def savitzky_golay(y, window_size, order, deriv=0, rate=1):
r"""Smooth (and optionally differentiate) data with a Savitzky-Golay filter.
The Savitzky-Golay filter r... | [
"matplotlib.pyplot.register_cmap",
"matplotlib.colors.LinearSegmentedColormap",
"numpy.abs",
"numpy.int",
"math.factorial",
"numpy.linspace",
"numpy.convolve",
"numpy.linalg.pinv",
"numpy.concatenate"
] | [((2634, 2674), 'numpy.concatenate', 'np.concatenate', (['(firstvals, y, lastvals)'], {}), '((firstvals, y, lastvals))\n', (2648, 2674), True, 'import numpy as np\n'), ((2686, 2723), 'numpy.convolve', 'np.convolve', (['m[::-1]', 'y'], {'mode': '"""valid"""'}), "(m[::-1], y, mode='valid')\n", (2697, 2723), True, 'import... |
# -*- coding: utf-8 -*-
import pytorch_lightning as pl
import xarray as xr
import numpy as np
import torch
from typing import Union
def predit(model: Union[pl.LightningDataModule, list], metadata: dict,
raw_input: xr.DataArray):
""" Given a model and the conterpart metadata, the function will calculate... | [
"numpy.empty",
"torch.no_grad"
] | [((931, 996), 'numpy.empty', 'np.empty', (['(pred.shape[0], lat.shape[0], lon.shape[0])', 'np.float32'], {}), '((pred.shape[0], lat.shape[0], lon.shape[0]), np.float32)\n', (939, 996), True, 'import numpy as np\n'), ((759, 774), 'torch.no_grad', 'torch.no_grad', ([], {}), '()\n', (772, 774), False, 'import torch\n')] |
from typing import Tuple
import numpy as np
import torch
import torch.nn as nn
from torch.optim import Adam
from models.transformers.sign_language_transformer import SignLanguageTransformer
def generate_mockup_input(
batch_size: int, input_shape: Tuple, value_range: Tuple
) -> torch.Tensor:
"""
Function... | [
"numpy.random.uniform",
"models.transformers.sign_language_transformer.SignLanguageTransformer",
"torch.nn.BCEWithLogitsLoss",
"numpy.argmax",
"numpy.zeros",
"numpy.random.randint",
"torch.Tensor",
"numpy.arange"
] | [((1226, 1285), 'numpy.random.randint', 'np.random.randint', ([], {'low': '(0)', 'high': 'num_classes', 'size': 'batch_size'}), '(low=0, high=num_classes, size=batch_size)\n', (1243, 1285), True, 'import numpy as np\n'), ((1308, 1343), 'numpy.zeros', 'np.zeros', (['(batch_size, num_classes)'], {}), '((batch_size, num_c... |
"""
Helper functions for using arrays as spatial lattices.
"""
from __future__ import print_function, division
import numpy as np
from fealty import lattice_numerics
def extend_array(a, n):
"""Increase the resolution of an array by duplicating its values to fill
a larger array.
Parameters
----------
... | [
"fealty.lattice_numerics.r_to_i",
"numpy.array",
"numpy.repeat"
] | [((2790, 2801), 'numpy.array', 'np.array', (['x'], {}), '(x)\n', (2798, 2801), True, 'import numpy as np\n'), ((3412, 3445), 'fealty.lattice_numerics.r_to_i', 'lattice_numerics.r_to_i', (['r', 'L', 'dx'], {}), '(r, L, dx)\n', (3435, 3445), False, 'from fealty import lattice_numerics\n'), ((567, 594), 'numpy.repeat', 'n... |
import numpy as np
import torch
import torch.nn as nn
import utils.chem as chem
fpe = [None]
FP_CONFIG = {
"mol_fp_len": 512,
"mol_fp_radiis": [3],
"stem_fp_len": 64,
"stem_fp_radiis": [4, 3, 2]
}
class MFP_MLP(nn.Module):
def __init__(self, nhid, nvec, out_per_stem, out_per_mol):
super(... | [
"torch.ones",
"torch.stack",
"torch.zeros_like",
"utils.chem.FPEmbedding_v2",
"torch.cat",
"numpy.cumsum",
"torch.exp",
"torch.arange",
"torch.nn.Linear",
"torch.nn.LeakyReLU",
"torch.log"
] | [((347, 361), 'torch.nn.LeakyReLU', 'nn.LeakyReLU', ([], {}), '()\n', (359, 361), True, 'import torch.nn as nn\n'), ((382, 422), 'torch.nn.Linear', 'nn.Linear', (["FP_CONFIG['mol_fp_len']", 'nhid'], {}), "(FP_CONFIG['mol_fp_len'], nhid)\n", (391, 422), True, 'import torch.nn as nn\n'), ((448, 521), 'torch.nn.Linear', '... |
# kernelRidgeRegression.py
import numpy as np
import scipy.linalg
class KernelRidgeRegression:
"""
Ridge regression using a kernel
"""
def __init__(self, kernel, alpha):
self.kernel = kernel
self.alpha = alpha
self.coef: np.array
self.X: np.array
def fit(self,... | [
"numpy.eye"
] | [((418, 427), 'numpy.eye', 'np.eye', (['n'], {}), '(n)\n', (424, 427), True, 'import numpy as np\n')] |
"""Unit tests for the MLLM model in Annif"""
import numpy as np
import pytest
from annif.lexical.mllm import MLLMModel
from annif.exception import OperationFailedException
def test_mllmmodel_prepare_terms(vocabulary):
model = MLLMModel()
graph = vocabulary.as_graph()
params = {'language': 'fi', 'use_hidd... | [
"numpy.array_equal",
"pytest.raises",
"annif.lexical.mllm.MLLMModel"
] | [((233, 244), 'annif.lexical.mllm.MLLMModel', 'MLLMModel', ([], {}), '()\n', (242, 244), False, 'from annif.lexical.mllm import MLLMModel\n'), ((597, 608), 'annif.lexical.mllm.MLLMModel', 'MLLMModel', ([], {}), '()\n', (606, 608), False, 'from annif.lexical.mllm import MLLMModel\n'), ((1099, 1135), 'numpy.array_equal',... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
__author__ = 'maxim'
import sys
import numpy as np
import matplotlib.pyplot as plt
from itertools import product
class NeuralNetwork:
class __Layer:
def __init__(self, args):
self.__epsilon = 5e-5
self.localGrad =... | [
"matplotlib.pyplot.show",
"numpy.tanh",
"numpy.random.randn",
"numpy.zeros",
"numpy.array",
"itertools.product",
"numpy.dot",
"matplotlib.pyplot.subplots"
] | [((2781, 2811), 'numpy.array', 'np.array', (['[[0], [1], [1], [1]]'], {}), '([[0], [1], [1], [1]])\n', (2789, 2811), True, 'import numpy as np\n'), ((3255, 3269), 'matplotlib.pyplot.subplots', 'plt.subplots', ([], {}), '()\n', (3267, 3269), True, 'import matplotlib.pyplot as plt\n'), ((3323, 3337), 'numpy.array', 'np.a... |
""""""
from os.path import basename, dirname
import tempfile
import numpy as np
import pandas as pd
import math
def ddm2dg(ddm):
"""Convert a float in decimal degree minutes to decimal degrees"""
decimal, integer = math.modf(ddm / 100)
decimal = decimal / 60 * 100
dg = integer + decimal
... | [
"pandas.read_csv",
"math.modf",
"tempfile.TemporaryFile",
"pandas.to_datetime",
"numpy.int64",
"pandas.Timedelta",
"pandas.to_numeric"
] | [((235, 255), 'math.modf', 'math.modf', (['(ddm / 100)'], {}), '(ddm / 100)\n', (244, 255), False, 'import math\n'), ((839, 853), 'numpy.int64', 'np.int64', (['s[7]'], {}), '(s[7])\n', (847, 853), True, 'import numpy as np\n'), ((2101, 2125), 'tempfile.TemporaryFile', 'tempfile.TemporaryFile', ([], {}), '()\n', (2123, ... |
import warnings
import numpy as np
import pytest
from dpmmlearn.density import (multivariate_t_density, scaled_IX_density,
t_density)
from scipy.integrate import dblquad, quad
def test_scaled_IX_density():
nu = 3
sigsqr = 1.0
# test that probability integrates to 1.0
r... | [
"warnings.simplefilter",
"numpy.ndenumerate",
"numpy.testing.assert_almost_equal",
"dpmmlearn.density.t_density",
"dpmmlearn.density.scaled_IX_density",
"numpy.array",
"warnings.catch_warnings",
"numpy.arange",
"dpmmlearn.density.multivariate_t_density",
"numpy.eye",
"numpy.testing.assert_array_... | [((389, 485), 'numpy.testing.assert_almost_equal', 'np.testing.assert_almost_equal', (['r[0]', '(1.0)', '(10)', '"""scaled_IX_density does not integrate to 1.0"""'], {}), "(r[0], 1.0, 10,\n 'scaled_IX_density does not integrate to 1.0')\n", (419, 485), True, 'import numpy as np\n'), ((611, 697), 'numpy.testing.asser... |
import torch
import torch.nn as nn
import torch.optim as optim
import torch.utils.data as data
import torch.nn.functional as F
import torchvision.datasets as datasets
import torchvision
import torchvision.transforms as transforms
from torch.autograd import Variable
import math
import os
import time
import numpy as n... | [
"numpy.mean",
"torchvision.transforms.Normalize",
"torch.utils.data.DataLoader",
"torch.nn.Linear",
"torch.nn.Dropout2d",
"torchvision.transforms.RandomHorizontalFlip",
"torch.autograd.Variable",
"torch.nn.Conv2d",
"torchvision.datasets.CIFAR100",
"torch.nn.BatchNorm2d",
"torch.cuda.is_available... | [((711, 810), 'torchvision.datasets.CIFAR100', 'torchvision.datasets.CIFAR100', ([], {'root': '"""../"""', 'train': '(True)', 'download': '(True)', 'transform': 'transform_train'}), "(root='../', train=True, download=True,\n transform=transform_train)\n", (740, 810), False, 'import torchvision\n'), ((862, 948), 'tor... |
"""
@name: cluster_perturbation_validation.py
@description:
Look at differences in weight differences to find appropriate noise level
@author: <NAME>
@email: "cabrittin"+ <at>+ "gmail"+ "."+ "com"
@date: 2019-12-05
"""
import sys
sys.path.append(r'./preprocess')
import os
from configparser import ConfigParser,Extended... | [
"ioaux.write.from_list",
"argparse.ArgumentParser",
"numpy.mean",
"matplotlib.pyplot.tight_layout",
"sys.path.append",
"scipy.stats.norm",
"connectome.format_graphs.normalize_edge_weight",
"numpy.true_divide",
"numpy.std",
"numpy.max",
"numpy.linspace",
"configparser.ExtendedInterpolation",
... | [((231, 262), 'sys.path.append', 'sys.path.append', (['"""./preprocess"""'], {}), "('./preprocess')\n", (246, 262), False, 'import sys\n'), ((1072, 1081), 'numpy.log', 'np.log', (['V'], {}), '(V)\n', (1078, 1081), True, 'import numpy as np\n'), ((1091, 1108), 'numpy.mean', 'np.mean', (['_V[:, 0]'], {}), '(_V[:, 0])\n',... |
import numpy as np
from pybrain.tools.shortcuts import buildNetwork
import pygame
class CoopGame(object):
""" Class that runs and renders the game """
window = None
DIM = (600, 600)
FPS = 24
DT = 1.0/FPS
players = []
bullets = []
def __init__(self, render=False, max_moves=200):
... | [
"pygame.display.set_mode",
"pygame.init",
"pygame.display.flip",
"numpy.sin",
"numpy.array",
"numpy.cos",
"pygame.time.Clock"
] | [((3372, 3391), 'pygame.time.Clock', 'pygame.time.Clock', ([], {}), '()\n', (3389, 3391), False, 'import pygame\n'), ((460, 473), 'pygame.init', 'pygame.init', ([], {}), '()\n', (471, 473), False, 'import pygame\n'), ((500, 533), 'pygame.display.set_mode', 'pygame.display.set_mode', (['self.DIM'], {}), '(self.DIM)\n', ... |
import numpy as np
from . import constants
class Object:
def __init__(self, world, pos):
self.world = world
self.pos = np.array(pos)
self.random = world.random
self.health = 0
@property
def texture(self):
raise 'unknown'
@property
def walkable(self):
return constants.walkable
... | [
"numpy.abs",
"numpy.array",
"numpy.sign"
] | [((133, 146), 'numpy.array', 'np.array', (['pos'], {}), '(pos)\n', (141, 146), True, 'import numpy as np\n'), ((363, 382), 'numpy.array', 'np.array', (['direction'], {}), '(direction)\n', (371, 382), True, 'import numpy as np\n'), ((993, 1007), 'numpy.abs', 'np.abs', (['offset'], {}), '(offset)\n', (999, 1007), True, '... |
from auxiliaries import set_verbosity
import time
import numpy as np
import matplotlib.pyplot as plt
class Rt_Waterfall_D3S(object):
"""
Class for running the D3S in real-time waterfall mode
"""
def __init__(self,
manager=None,
verbosity=1,
log... | [
"auxiliaries.set_verbosity",
"matplotlib.pyplot.close",
"numpy.zeros",
"numpy.transpose",
"matplotlib.pyplot.colorbar",
"matplotlib.pyplot.draw",
"numpy.shape",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.pause",
"numpy.ndarray.flatten... | [((1262, 1292), 'numpy.zeros', 'np.zeros', (['(self.resolution, 1)'], {}), '((self.resolution, 1))\n', (1270, 1292), True, 'import numpy as np\n'), ((2549, 2577), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(25, 15)'}), '(figsize=(25, 15))\n', (2559, 2577), True, 'import matplotlib.pyplot as plt\n'), ((... |
from sklearn.datasets import make_blobs
from sklearn.model_selection import train_test_split
import matplotlib.pyplot as plt
import numpy as np
import cvxpy as cp
import sccf
import time
from utils import latexify
import IPython as ipy
np.random.seed(243)
N, n = 1000, 5
X, y = make_blobs(N, n, centers=2, cluster_... | [
"numpy.random.seed",
"sklearn.model_selection.train_test_split",
"numpy.logspace",
"utils.latexify",
"numpy.mean",
"numpy.arange",
"matplotlib.pyplot.close",
"sklearn.datasets.make_blobs",
"sccf.minimum",
"cvxpy.logistic",
"numpy.log10",
"matplotlib.pyplot.subplots",
"cvxpy.sum_squares",
"... | [((242, 261), 'numpy.random.seed', 'np.random.seed', (['(243)'], {}), '(243)\n', (256, 261), True, 'import numpy as np\n'), ((284, 329), 'sklearn.datasets.make_blobs', 'make_blobs', (['N', 'n'], {'centers': '(2)', 'cluster_std': '(10.0)'}), '(N, n, centers=2, cluster_std=10.0)\n', (294, 329), False, 'from sklearn.datas... |
from odin.core.GP_risk_minimization import GPRiskMinimization
from odin.core.GP_approx_risk_minimization import GPApproxRiskMinimization
from odin.core.ODE_risk_minimization import ODERiskMinimization
from odin.core.ODE_approx_risk_minimization import ODEApproxRiskMinimization
import numpy as np
import tensorflow as tf... | [
"numpy.load",
"odin.core.ODE_approx_risk_minimization.ODEApproxRiskMinimization",
"argparse.ArgumentParser",
"numpy.ceil",
"odin.utils.trainable_models.TrainableLotkaVolterra",
"numpy.savetxt",
"odin.core.ODE_risk_minimization.ODERiskMinimization",
"odin.core.GP_approx_risk_minimization.GPApproxRiskMi... | [((347, 372), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (370, 372), False, 'import argparse\n'), ((1695, 1728), 'numpy.load', 'np.load', (['"""state_observations.npy"""'], {}), "('state_observations.npy')\n", (1702, 1728), True, 'import numpy as np\n'), ((1737, 1763), 'numpy.load', 'np.loa... |
import matplotlib.pyplot as plt
import numpy as np
np.set_printoptions(threshold=np.inf)
from sklearn import datasets
from mpl_toolkits.mplot3d import Axes3D
from scipy.spatial import distance
def neigbourhood_points(X, x_centroid, dist=3):
eligible_X = []
for x in X:
distance_between = distance.eucl... | [
"numpy.set_printoptions",
"matplotlib.pyplot.show",
"scipy.spatial.distance.euclidean",
"numpy.copy",
"matplotlib.pyplot.clf",
"numpy.random.randn",
"matplotlib.pyplot.scatter",
"numpy.zeros",
"numpy.argmin",
"numpy.mean",
"numpy.array",
"matplotlib.pyplot.pause",
"matplotlib.pyplot.grid",
... | [((52, 89), 'numpy.set_printoptions', 'np.set_printoptions', ([], {'threshold': 'np.inf'}), '(threshold=np.inf)\n', (71, 89), True, 'import numpy as np\n'), ((657, 693), 'numpy.concatenate', 'np.concatenate', (['(data, temp)'], {'axis': '(0)'}), '((data, temp), axis=0)\n', (671, 693), True, 'import numpy as np\n'), ((7... |
import cv2
import numpy as np
import os
import radialProfile
import glob
from matplotlib import pyplot as plt
import pickle
from sklearn.model_selection import train_test_split
from sklearn.svm import SVC
from sklearn.linear_model import LogisticRegression
# uncomment following code to create the features on your own... | [
"matplotlib.pyplot.show",
"matplotlib.pyplot.plot",
"numpy.std",
"sklearn.model_selection.train_test_split",
"numpy.zeros",
"sklearn.linear_model.LogisticRegression",
"pickle.load",
"numpy.arange",
"numpy.mean",
"sklearn.svm.SVC",
"matplotlib.pyplot.tick_params",
"matplotlib.pyplot.ylabel",
... | [((1631, 1652), 'pickle.load', 'pickle.load', (['pkl_file'], {}), '(pkl_file)\n', (1642, 1652), False, 'import pickle\n'), ((1705, 1716), 'matplotlib.pyplot.plot', 'plt.plot', (['y'], {}), '(y)\n', (1713, 1716), True, 'from matplotlib import pyplot as plt\n'), ((1717, 1727), 'matplotlib.pyplot.show', 'plt.show', ([], {... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.