code stringlengths 31 1.05M | apis list | extract_api stringlengths 97 1.91M |
|---|---|---|
"""
=============================================================================
Eindhoven University of Technology
==============================================================================
Source Name : inferenceToyCase.py
This file load weights of a pretrained model and runs infer... | [
"numpy.load",
"numpy.sum",
"tensorflow.image.ssim",
"tensorflow.image.psnr",
"matplotlib.pyplot.figure",
"numpy.mean",
"numpy.exp",
"os.path.join",
"numpy.prod",
"numpy.zeros_like",
"keras.optimizers.SGD",
"matplotlib.pyplot.imshow",
"os.path.dirname",
"matplotlib.pyplot.yticks",
"numpy.... | [((2587, 2609), 'numpy.load', 'np.load', (['"""testSet.npy"""'], {}), "('testSet.npy')\n", (2594, 2609), True, 'import numpy as np\n'), ((2619, 2642), 'numpy.load', 'np.load', (['"""testSetY.npy"""'], {}), "('testSetY.npy')\n", (2626, 2642), True, 'import numpy as np\n'), ((10057, 10107), 'matplotlib.pyplot.imshow', 'p... |
#!/usr/bin/env python
#
# SPECCLIENT -- Client methods for the Spectroscopic Data Service
#
__authors__ = '<NAME> <<EMAIL>>'
__version__ = 'v1.2.0'
'''
Client methods for the Spectroscopic Data Service.
Spectro Client Interface
------------------------
client = getClient (context='<context>', ... | [
"matplotlib.pyplot.savefig",
"socket.socket",
"dl.helpers.utils.convert",
"os.path.isfile",
"matplotlib.pyplot.figure",
"dl.Util.def_token",
"requests.post",
"specutils.SpectrumCollection.from_spectra",
"pandas.DataFrame",
"warnings.simplefilter",
"json.loads",
"os.path.exists",
"matplotlib.... | [((2320, 2367), 'warnings.simplefilter', 'warnings.simplefilter', (['"""ignore"""', 'AstropyWarning'], {}), "('ignore', AstropyWarning)\n", (2341, 2367), False, 'import warnings\n'), ((2384, 2416), 'logging.disable', 'logging.disable', (['logging.WARNING'], {}), '(logging.WARNING)\n', (2399, 2416), False, 'import loggi... |
import os,sys
import pandas as pd
import numpy as np
import json,time
import tensorflow as tf
import filterSlidingWindow
from tensorflow import keras
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense,Activation, Dropout,BatchNormalization,Conv2D,Conv1D,Flatten,LSTM,MaxPool1D,TimeD... | [
"filterSlidingWindow.loadFileApplyfilterAndSlidingWindow",
"sklearn.preprocessing.LabelBinarizer",
"tensorflow.keras.layers.BatchNormalization",
"tensorflow.keras.models.clone_model",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv1D",
"sklearn.model_selection.train_test_split",
"tensor... | [((1417, 1510), 'filterSlidingWindow.loadFileApplyfilterAndSlidingWindow', 'filterSlidingWindow.loadFileApplyfilterAndSlidingWindow', (['windowSize', 'slide', 'cutoff', 'order'], {}), '(windowSize, slide,\n cutoff, order)\n', (1472, 1510), False, 'import filterSlidingWindow\n'), ((1751, 1860), 'sklearn.model_selecti... |
#!/usr/bin/env python3
import numpy as np
from matplotlib import pyplot as plt
positiondata = np.loadtxt("positiondata.txt", delimiter=' ')
measurementdata = np.loadtxt("measurementdata.txt", delimiter=' ')
posteriordata = np.loadtxt("posterior.txt", delimiter=' ')
plt.figure(figsize=(10,4))
plt.plot(np.arange(0,... | [
"matplotlib.pyplot.legend",
"matplotlib.pyplot.figure",
"numpy.arange",
"numpy.loadtxt",
"numpy.array",
"matplotlib.pyplot.savefig"
] | [((98, 143), 'numpy.loadtxt', 'np.loadtxt', (['"""positiondata.txt"""'], {'delimiter': '""" """'}), "('positiondata.txt', delimiter=' ')\n", (108, 143), True, 'import numpy as np\n'), ((162, 210), 'numpy.loadtxt', 'np.loadtxt', (['"""measurementdata.txt"""'], {'delimiter': '""" """'}), "('measurementdata.txt', delimite... |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# graph_tool -- a general graph manipulation python module
#
# Copyright (C) 2006-2018 <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 Fou... | [
"numpy.dot",
"numpy.zeros"
] | [((4078, 4108), 'numpy.zeros', 'numpy.zeros', (['E'], {'dtype': '"""double"""'}), "(E, dtype='double')\n", (4089, 4108), False, 'import numpy\n'), ((4117, 4146), 'numpy.zeros', 'numpy.zeros', (['E'], {'dtype': '"""int32"""'}), "(E, dtype='int32')\n", (4128, 4146), False, 'import numpy\n'), ((4155, 4184), 'numpy.zeros',... |
# ---------------------------------------------------------------
# het_util.py
# Set-up time: 2021/4/1 11:40
# Copyright (c) 2020 ICT
# Licensed under The MIT License [see LICENSE for details]
# Written by Kenneth-Wong (Wenbin-Wang) @ VIPL.ICT
# Contact: <EMAIL> [OR] <EMAIL>
# ----------------------------------... | [
"numpy.zeros",
"torch.cat",
"numpy.argsort",
"numpy.max",
"numpy.array",
"torch.from_numpy"
] | [((1370, 1394), 'torch.cat', 'torch.cat', (['all_bboxes', '(0)'], {}), '(all_bboxes, 0)\n', (1379, 1394), False, 'import torch\n'), ((5522, 5559), 'numpy.array', 'np.array', (['[n.score for n in children]'], {}), '([n.score for n in children])\n', (5530, 5559), True, 'import numpy as np\n'), ((6088, 6107), 'numpy.argso... |
import matplotlib.pyplot as plt
import numpy as np
import math
from collections import defaultdict
class Graph:
def __init__(self):
self.graph = defaultdict(list)
def addEdge(self, u, v):
self.graph[u].append(v)
def delEdge(self, u):
self.graph[u].clear()
def DFSUtil... | [
"matplotlib.pyplot.title",
"matplotlib.pyplot.show",
"numpy.sum",
"numpy.zeros",
"collections.defaultdict",
"numpy.loadtxt"
] | [((686, 740), 'numpy.loadtxt', 'np.loadtxt', (['file'], {'delimiter': '""","""', 'dtype': 'str', 'max_rows': '(1)'}), "(file, delimiter=',', dtype=str, max_rows=1)\n", (696, 740), True, 'import numpy as np\n'), ((756, 787), 'numpy.loadtxt', 'np.loadtxt', (['file'], {'delimiter': '""","""'}), "(file, delimiter=',')\n", ... |
import copy
import numpy as np
class BaseElement(object):
def __init__(self, object_index, medium_index, fl_brightness,
points):
"""Initialize a basic element
Parameters
----------
object_index: float
Refractive index of the element
medium_ind... | [
"numpy.pad",
"numpy.zeros",
"numpy.ones",
"copy.copy",
"numpy.sin",
"numpy.array",
"numpy.cos",
"numpy.dot"
] | [((1179, 1195), 'numpy.array', 'np.array', (['points'], {}), '(points)\n', (1187, 1195), True, 'import numpy as np\n'), ((1318, 1350), 'numpy.zeros', 'np.zeros', (['grid_size'], {'dtype': 'float'}), '(grid_size, dtype=float)\n', (1326, 1350), True, 'import numpy as np\n'), ((3355, 3424), 'numpy.pad', 'np.pad', (['rotat... |
#!/usr/bin/env python3
import time
import numpy as np
from litex import RemoteClient
wb = RemoteClient()
wb.open()
# # #
x = np.linspace(0,2 * np.pi, 1000)
sine = (2**15 * np.sin(x)) + 2**15
sine = sine.astype('int').tolist()
print("artistic sine output...")
i = 0
while(1):
i = (i + 1) % 1000
wb.regs.dac... | [
"litex.RemoteClient",
"numpy.sin",
"numpy.linspace"
] | [((93, 107), 'litex.RemoteClient', 'RemoteClient', ([], {}), '()\n', (105, 107), False, 'from litex import RemoteClient\n'), ((130, 161), 'numpy.linspace', 'np.linspace', (['(0)', '(2 * np.pi)', '(1000)'], {}), '(0, 2 * np.pi, 1000)\n', (141, 161), True, 'import numpy as np\n'), ((177, 186), 'numpy.sin', 'np.sin', (['x... |
## License: Apache 2.0. See LICENSE file in root directory.
## Copyright(c) 2017 Intel Corporation. All Rights Reserved.
#####################################################
## Align Depth to Color ##
#####################################################
# First import the library
import p... | [
"numpy.load",
"pyrealsense2.disparity_transform",
"pyrealsense2.pipeline",
"pyrealsense2.temporal_filter",
"pyrealsense2.config",
"pyrealsense2.hole_filling_filter",
"cv2.destroyAllWindows",
"cv2.resize",
"numpy.dstack",
"pyrealsense2.rs400_advanced_mode",
"numpy.save",
"cv2.waitKey",
"pyrea... | [((622, 645), 'os.path.expanduser', 'os.path.expanduser', (['"""~"""'], {}), "('~')\n", (640, 645), False, 'import sys, os\n'), ((677, 690), 'pyrealsense2.pipeline', 'rs.pipeline', ([], {}), '()\n', (688, 690), True, 'import pyrealsense2 as rs\n'), ((814, 825), 'pyrealsense2.config', 'rs.config', ([], {}), '()\n', (823... |
import numpy as np
penalty_12 = [ 'l2']#'l1',
penalty_12none = ['l1', 'l2', None]
penalty_all = ['l1', 'l2', None, 'elasticnet']
penalty_12e = ['l1', 'l2', 'elasticnet']
max_iter = [100 , 300, 1000]
max_iter_inf = [100 , 300, 500, 1000, np.inf]
max_iter_inf2 = [... | [
"numpy.logspace"
] | [((962, 983), 'numpy.logspace', 'np.logspace', (['(-9)', '(3)', '(6)'], {}), '(-9, 3, 6)\n', (973, 983), True, 'import numpy as np\n'), ((1023, 1044), 'numpy.logspace', 'np.logspace', (['(-6)', '(3)', '(3)'], {}), '(-6, 3, 3)\n', (1034, 1044), True, 'import numpy as np\n')] |
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plot
import numpy, scipy, cvxpy, pprint, itertools
from scipy.spatial import ConvexHull
from patch import *
def random_2d_convex_hull():
ps = numpy.random.rand(30, 2)
hull = ConvexHull(ps)
print("ps= {}".format(ps) )
plot.plot(ps[:,0], p... | [
"matplotlib.pyplot.title",
"pprint.pformat",
"numpy.random.seed",
"cvxpy.Maximize",
"numpy.random.randn",
"cvxpy.Problem",
"numpy.linspace",
"numpy.linalg.det",
"matplotlib.use",
"cvxpy.Variable",
"matplotlib.pyplot.gcf",
"scipy.spatial.ConvexHull",
"numpy.matrix",
"matplotlib.pyplot.plot"... | [((18, 39), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (32, 39), False, 'import matplotlib\n'), ((213, 237), 'numpy.random.rand', 'numpy.random.rand', (['(30)', '(2)'], {}), '(30, 2)\n', (230, 237), False, 'import numpy, scipy, cvxpy, pprint, itertools\n'), ((247, 261), 'scipy.spatial.ConvexH... |
from unittest import TestCase
import numpy as np
from uniqed.models.tof import TOF
import matplotlib.pyplot as plt
class TestTOF(TestCase):
def _gen_data(self, n=100, d=5):
return np.random.random(n*d).reshape([n, d])
def test_fit(self):
X = self._gen_data()
TOF().fit(X)
def test... | [
"numpy.mean",
"numpy.array",
"numpy.arange",
"numpy.random.random",
"uniqed.models.tof.TOF",
"numpy.round",
"numpy.all"
] | [((1204, 1218), 'numpy.arange', 'np.arange', (['(100)'], {}), '(100)\n', (1213, 1218), True, 'import numpy as np\n'), ((1231, 1258), 'numpy.arange', 'np.arange', (['(0.01)', '(1.01)', '(0.01)'], {}), '(0.01, 1.01, 0.01)\n', (1240, 1258), True, 'import numpy as np\n'), ((1613, 1655), 'numpy.array', 'np.array', (['[[1, 3... |
"""
Created on Tue Mar 12 01:27:39 2019
@author: soumi
"""
from ast import literal_eval
import numpy as np
from skimage.draw import line_aa
from skimage.transform import resize
import imageio
#get bound of the image
def get_bounds(strokes):
min_x, max_x, min_y, max_y = (1000, 0, 1000, 0)
for stroke in stroke... | [
"skimage.draw.line_aa",
"numpy.asarray",
"numpy.zeros",
"skimage.transform.resize",
"imageio.imwrite"
] | [((1669, 1694), 'skimage.transform.resize', 'resize', (['img', '(size, size)'], {}), '(img, (size, size))\n', (1675, 1694), False, 'from skimage.transform import resize\n'), ((1823, 1842), 'numpy.asarray', 'np.asarray', (['strokes'], {}), '(strokes)\n', (1833, 1842), True, 'import numpy as np\n'), ((1894, 1919), 'skima... |
# Author: wangxy
# Emial: <EMAIL>
import copy, math
import numpy as np
from numba import jit
from scipy.spatial import ConvexHull
def iou_batch(boxA, boxB):
boxA = [int(x) for x in boxA]
boxB = [int(x) for x in boxB]
xA = max(boxA[0], boxB[0])
yA = max(boxA[1], boxB[1])
xB = min(boxA[2], boxB[2... | [
"numpy.sum",
"math.sqrt",
"numpy.roll",
"copy.copy",
"numpy.transpose",
"numpy.sin",
"numpy.array",
"numpy.cos",
"scipy.spatial.ConvexHull",
"numpy.vstack"
] | [((4886, 4997), 'math.sqrt', 'math.sqrt', (['((detection[0] - track[0]) ** 2 + (detection[1] - track[1]) ** 2 + (\n detection[2] - track[2]) ** 2)'], {}), '((detection[0] - track[0]) ** 2 + (detection[1] - track[1]) ** 2 +\n (detection[2] - track[2]) ** 2)\n', (4895, 4997), False, 'import copy, math\n'), ((5115, ... |
# -*- coding: utf-8 -*-
"""
-------------------------------
Time : 2018-12-02 12:29
Author : diw
Email : <EMAIL>
File : predict.py
Desc: Load model, predict audio's class.
-------------------------------
"""
"""
audio_class = ['angry','fear','happy','neutral','sad','surprise']
Input audio's ... | [
"pyAudioAnalysis.audioFeatureExtraction.stFeatureSpeed",
"keras.models.load_model",
"numpy.full",
"scipy.stats.zscore",
"keras.preprocessing.sequence.pad_sequences",
"keras.backend.backend",
"tensorflow.Session",
"pyAudioAnalysis.audioFeatureExtraction.stFeatureExtraction",
"tensorflow.ConfigProto",... | [((1461, 1472), 'keras.backend.backend', 'K.backend', ([], {}), '()\n', (1470, 1472), True, 'from keras import backend as K\n'), ((1578, 1594), 'tensorflow.ConfigProto', 'tf.ConfigProto', ([], {}), '()\n', (1592, 1594), True, 'import tensorflow as tf\n'), ((1649, 1674), 'tensorflow.Session', 'tf.Session', ([], {'config... |
import os
import pytest
import sys
import numpy as np
try:
import pymake
except:
msg = "Error. Pymake package is not available.\n"
msg += "Try installing using the following command:\n"
msg += " pip install https://github.com/modflowpy/pymake/zipball/master"
raise Exception(msg)
try:
import fl... | [
"flopy.mf6.ModflowIms",
"flopy.utils.CellBudgetFile",
"os.path.join",
"flopy.mf6.ModflowTdis",
"os.path.basename",
"numpy.allclose",
"framework.testing_framework",
"flopy.mf6.ModflowGwfnpf",
"flopy.mf6.ModflowGwf",
"simulation.Simulation",
"flopy.mf6.ModflowGwfic",
"flopy.mf6.MFSimulation",
... | [((1137, 1216), 'flopy.mf6.MFSimulation', 'flopy.mf6.MFSimulation', ([], {'sim_name': 'name', 'version': '"""mf6"""', 'exe_name': '"""mf6"""', 'sim_ws': 'ws'}), "(sim_name=name, version='mf6', exe_name='mf6', sim_ws=ws)\n", (1159, 1216), False, 'import flopy\n'), ((1268, 1344), 'flopy.mf6.ModflowTdis', 'flopy.mf6.Modfl... |
import numpy as np
from kernel_tuner import core
from kernel_tuner.interface import Options, _kernel_options
from kernel_tuner.integration import TuneResults
class PythonKernel(object):
def __init__(self, kernel_name, kernel_string, problem_size, arguments, params=None, inputs=None, outputs=None, device=0, plat... | [
"numpy.zeros_like",
"kernel_tuner.integration.TuneResults",
"kernel_tuner.core.DeviceInterface",
"kernel_tuner.interface._kernel_options.keys",
"kernel_tuner.core.KernelSource"
] | [((1716, 1767), 'kernel_tuner.core.KernelSource', 'core.KernelSource', (['kernel_name', 'kernel_string', 'lang'], {}), '(kernel_name, kernel_string, lang)\n', (1733, 1767), False, 'from kernel_tuner import core\n'), ((1787, 1849), 'kernel_tuner.core.DeviceInterface', 'core.DeviceInterface', (['kernel_source'], {'device... |
import pytest
from .fixtures import *
import pandas as pd
import numpy as np
DROPPED_ROWS_INDICES = [2, 5, 7, 10]
@pytest.mark.parametrize("original_df", [
make_table(unsorted_int_index, rows=30, astype="pandas"),
make_table(unsorted_datetime_index, rows=37, astype="pandas"),
make_table(unsorted_string_... | [
"pytest.raises",
"pandas.concat",
"numpy.random.choice"
] | [((432, 490), 'numpy.random.choice', 'np.random.choice', (['original_df.index'], {'size': '(5)', 'replace': '(False)'}), '(original_df.index, size=5, replace=False)\n', (448, 490), True, 'import numpy as np\n'), ((1214, 1272), 'numpy.random.choice', 'np.random.choice', (['original_df.index'], {'size': '(5)', 'replace':... |
from django.shortcuts import render,redirect
from .models import given_image,predicted_label,image_name
from .forms import given_image_form
import numpy as np
import pandas as pd
from PIL import Image
import cv2
import os.path
import pickle
from sklearn.tree import DecisionTreeClassifier
# Create your views here.
de... | [
"cv2.imread",
"numpy.array",
"numpy.reshape",
"django.shortcuts.render",
"numpy.asscalar"
] | [((1654, 1704), 'django.shortcuts.render', 'render', (['request', '"""mnistwebsite/home.html"""', 'context'], {}), "(request, 'mnistwebsite/home.html', context)\n", (1660, 1704), False, 'from django.shortcuts import render, redirect\n'), ((1750, 1785), 'django.shortcuts.render', 'render', (['request', '"""successPage.h... |
"""
Unit tests for optimizers.
"""
import numpy as np
import pytest
from numpy.linalg import norm
from scipy.integrate import odeint
from sklearn.base import BaseEstimator
from sklearn.exceptions import ConvergenceWarning
from sklearn.exceptions import NotFittedError
from sklearn.linear_model import ElasticNet
from skl... | [
"numpy.ones",
"pysindy.optimizers.STLSQ",
"numpy.arange",
"pysindy.optimizers.TrappingSR3",
"numpy.linalg.norm",
"numpy.random.normal",
"pytest.mark.parametrize",
"pysindy.PolynomialLibrary",
"sklearn.linear_model.ElasticNet",
"scipy.integrate.odeint",
"pytest.warns",
"pysindy.optimizers.SR3",... | [((1541, 1706), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""cls, support"""', '[(Lasso, True), (STLSQ, True), (SR3, True), (ConstrainedSR3, True), (\n TrappingSR3, True), (DummyLinearModel, False)]'], {}), "('cls, support', [(Lasso, True), (STLSQ, True), (SR3,\n True), (ConstrainedSR3, True), (Tra... |
import warnings
from ast import literal_eval
from datetime import datetime
import numpy as np
from scipy.stats import pearsonr
from sklearn import metrics
from sklearn.utils.multiclass import type_of_target
MULTICLASS_INDICATOR = "multiclass-indicator"
warnings.filterwarnings("ignore")
def get_epoch_time():
re... | [
"numpy.nan_to_num",
"numpy.argmax",
"sklearn.metrics.accuracy_score",
"numpy.isnan",
"numpy.mean",
"numpy.exp",
"numpy.round",
"numpy.isposinf",
"numpy.std",
"sklearn.utils.multiclass.type_of_target",
"sklearn.metrics.average_precision_score",
"numpy.var",
"sklearn.metrics.mean_squared_error... | [((256, 289), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (279, 289), False, 'import warnings\n'), ((1737, 1754), 'sklearn.utils.multiclass.type_of_target', 'type_of_target', (['y'], {}), '(y)\n', (1751, 1754), False, 'from sklearn.utils.multiclass import type_of_target... |
# %%
from logging import critical
from typing import Callable, Tuple, Union
import numpy as np
from enum import Enum, auto
from scipy.stats import norm, t, chi2
# %%
decimal_limit = 2
class TestType(Enum):
# Non-directional
DOUBLE_TAILED = auto()
# directional
LOWER_TAILED = auto()
... | [
"scipy.stats.norm.ppf",
"scipy.stats.chi2.ppf",
"enum.auto",
"scipy.stats.t.ppf",
"numpy.sqrt"
] | [((264, 270), 'enum.auto', 'auto', ([], {}), '()\n', (268, 270), False, 'from enum import Enum, auto\n'), ((310, 316), 'enum.auto', 'auto', ([], {}), '()\n', (314, 316), False, 'from enum import Enum, auto\n'), ((337, 343), 'enum.auto', 'auto', ([], {}), '()\n', (341, 343), False, 'from enum import Enum, auto\n'), ((99... |
# test solver
import numpy as np
from MLEK.main.solver import solver
from MLEK.main.utils import irfft
def V_gen(nbasis, V0):
hamilton_mat = np.zeros((nbasis, nbasis), dtype=np.complex64)
np.fill_diagonal(hamilton_mat[1:, :-1], V0*(-0.25))
Vq = np.zeros(nbasis, dtype=np.complex64)
Vq[0], Vq[1] = -0.5*... | [
"numpy.fill_diagonal",
"matplotlib.pyplot.show",
"matplotlib.pyplot.plot",
"MLEK.main.solver.solver",
"numpy.zeros",
"MLEK.main.utils.irfft",
"numpy.exp",
"numpy.linspace",
"numpy.sqrt"
] | [((452, 488), 'MLEK.main.solver.solver', 'solver', (['nk', 'nbasis', 'mu', 'hamilton_mat'], {}), '(nk, nbasis, mu, hamilton_mat)\n', (458, 488), False, 'from MLEK.main.solver import solver\n'), ((500, 525), 'numpy.linspace', 'np.linspace', (['(0)', 'np.pi', 'nk'], {}), '(0, np.pi, nk)\n', (511, 525), True, 'import nump... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jun 14 11:48:32 2021
@author: surajitrana
"""
import matplotlib.pyplot as plt
import numpy as np
def plot_barchart():
x = np.array(["Apple", "Samsung", "IBM", "Intel"])
y = np.array([1000, 560, 900, 678])
plt.xlabel("Brands")
plt.yl... | [
"matplotlib.pyplot.title",
"matplotlib.pyplot.show",
"matplotlib.pyplot.bar",
"numpy.array",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel"
] | [((197, 243), 'numpy.array', 'np.array', (["['Apple', 'Samsung', 'IBM', 'Intel']"], {}), "(['Apple', 'Samsung', 'IBM', 'Intel'])\n", (205, 243), True, 'import numpy as np\n'), ((252, 283), 'numpy.array', 'np.array', (['[1000, 560, 900, 678]'], {}), '([1000, 560, 900, 678])\n', (260, 283), True, 'import numpy as np\n'),... |
import numpy as np
import scipy.io as spio
# Utility functions to initialize the problem
from Grid.GridProcessing import Grid
from Shapes.ShapesFunctions import *
# Specify the file that includes dynamic systems
from dynamics.DubinsCar4D_HRI import *
# Plot options
from plot_options import *
# Solver core
from solver ... | [
"Grid.GridProcessing.Grid",
"numpy.empty",
"numpy.array",
"numpy.arange",
"solver.HJSolver"
] | [((3021, 3118), 'numpy.array', 'np.array', (["[params['rd_len_lb'], params['rd_bd_min'], params['rd_bd_min'], params[\n 'v_rel_lb']]"], {}), "([params['rd_len_lb'], params['rd_bd_min'], params['rd_bd_min'],\n params['v_rel_lb']])\n", (3029, 3118), True, 'import numpy as np\n'), ((3129, 3226), 'numpy.array', 'np.a... |
# -*- coding: utf-8 -*-
import numpy as np
import pyworld
import pysptk
from pysptk.synthesis import MLSADF
class Synthesizer(object):
"""
Speech synthesizer with several acoustic features
Parameters
----------
fs: int, optional
Sampling frequency
Default set to 16000
fftl: i... | [
"pyworld.synthesize",
"numpy.log",
"numpy.copy",
"pysptk.synthesis.MLSADF",
"pyworld.decode_aperiodicity",
"numpy.isfinite",
"numpy.apply_along_axis",
"pysptk.mc2sp",
"pysptk.mc2e"
] | [((4755, 4800), 'pysptk.mc2e', 'pysptk.mc2e', (['cvmcep'], {'alpha': 'alpha', 'irlen': 'irlen'}), '(cvmcep, alpha=alpha, irlen=irlen)\n', (4766, 4800), False, 'import pysptk\n'), ((4811, 4855), 'pysptk.mc2e', 'pysptk.mc2e', (['rmcep'], {'alpha': 'alpha', 'irlen': 'irlen'}), '(rmcep, alpha=alpha, irlen=irlen)\n', (4822,... |
import numpy as np
from taped.util import (
DFLT_SR,
DFLT_SAMPLE_WIDTH,
DFLT_CHK_SIZE,
DFLT_STREAM_BUF_SIZE_S,
waveform_to_bytes,
)
from taped.scrap.audio_pokes import live_wf_ctx
######################################################################################################
# Example appli... | [
"warnings.warn",
"taped.scrap.audio_pokes.live_wf_ctx",
"pyaudio.PyAudio",
"numpy.abs"
] | [((1362, 1379), 'pyaudio.PyAudio', 'pyaudio.PyAudio', ([], {}), '()\n', (1377, 1379), False, 'import pyaudio\n'), ((1450, 1515), 'warnings.warn', 'warn', (['"""I\'ve never seen it work with anything than sample_width=2"""'], {}), '("I\'ve never seen it work with anything than sample_width=2")\n', (1454, 1515), False, '... |
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | [
"gam.data.dataset.PlanetoidDataset",
"tensorflow_datasets.load",
"gam.data.dataset.Dataset.build_from_splits",
"networkx.from_dict_of_lists",
"tensorflow_datasets.as_numpy",
"scipy.sparse.vstack",
"numpy.asarray",
"numpy.zeros",
"numpy.ones",
"logging.info",
"numpy.sort",
"pickle.load",
"num... | [((1277, 1351), 'logging.info', 'logging.info', (['"""Loading and preprocessing data from tensorflow datasets..."""'], {}), "('Loading and preprocessing data from tensorflow datasets...')\n", (1289, 1351), False, 'import logging\n'), ((1380, 1442), 'tensorflow_datasets.load', 'tfds.load', (['dataset_name'], {'split': '... |
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
dataset = pd.read_csv('Position_Salaries.csv')
X = dataset.iloc[:, 1:-1].values
y = dataset.iloc[:, dataset.shape[1]-1:dataset.shape[1]].values
#Feature Scaling
from sklearn.preprocessing import StandardScaler
sc_X = StandardScaler()
sc_y = Standa... | [
"sklearn.svm.SVR",
"sklearn.preprocessing.StandardScaler",
"matplotlib.pyplot.show",
"pandas.read_csv",
"matplotlib.pyplot.scatter",
"numpy.reshape"
] | [((82, 118), 'pandas.read_csv', 'pd.read_csv', (['"""Position_Salaries.csv"""'], {}), "('Position_Salaries.csv')\n", (93, 118), True, 'import pandas as pd\n'), ((290, 306), 'sklearn.preprocessing.StandardScaler', 'StandardScaler', ([], {}), '()\n', (304, 306), False, 'from sklearn.preprocessing import StandardScaler\n'... |
import numpy as np
import torch
from scipy import signal
import math
import cv2
import random
class Transform:
def __init__(self):
pass
def add_noise(self, signal, noise_amount):
"""
adding noise
"""
signal = signal.T
noise = (0.4 ** 0.5)... | [
"numpy.floor",
"numpy.ones",
"numpy.shape",
"numpy.mean",
"numpy.exp",
"random.randint",
"numpy.log10",
"scipy.signal.butter",
"cv2.resize",
"numpy.random.shuffle",
"numpy.asarray",
"transform.Transform",
"numpy.hstack",
"numpy.concatenate",
"numpy.vstack",
"matplotlib.pyplot.subplot",... | [((9807, 9818), 'transform.Transform', 'Transform', ([], {}), '()\n', (9816, 9818), False, 'from transform import Transform\n'), ((9832, 9851), 'numpy.zeros', 'np.zeros', (['(1, 3072)'], {}), '((1, 3072))\n', (9840, 9851), True, 'import numpy as np\n'), ((9895, 9911), 'matplotlib.pyplot.subplot', 'plt.subplot', (['(211... |
import numpy
from obspy import Stream, UTCDateTime
from obspy.clients.neic.client import Client
from geomagio import TimeseriesUtility
from geomagio.edge import SNCL
class MockMiniSeedClient(Client):
"""replaces default obspy miniseed client's get_waveforms method to return trace of ones
Note: includes 'ret... | [
"geomagio.TimeseriesUtility.create_empty_trace",
"geomagio.edge.SNCL",
"numpy.ones",
"obspy.Stream"
] | [((761, 835), 'geomagio.edge.SNCL', 'SNCL', ([], {'station': 'station', 'network': 'network', 'channel': 'channel', 'location': 'location'}), '(station=station, network=network, channel=channel, location=location)\n', (765, 835), False, 'from geomagio.edge import SNCL\n'), ((911, 1130), 'geomagio.TimeseriesUtility.crea... |
import numpy as np
from yaglm.metrics.base import Scorer
from yaglm.autoassign import autoassign
from yaglm.config.penalty import Lasso, ElasticNet
from yaglm.utils import count_support
from yaglm.extmath import log_binom
class InfoCriteria(Scorer):
"""
Computes information criteria for GLM model selection.... | [
"yaglm.utils.count_support",
"numpy.log",
"yaglm.extmath.log_binom",
"numpy.clip"
] | [((5733, 5769), 'yaglm.extmath.log_binom', 'log_binom', ([], {'n': 'n_features', 'k': 'n_support'}), '(n=n_features, k=n_support)\n', (5742, 5769), False, 'from yaglm.extmath import log_binom\n'), ((5534, 5566), 'numpy.clip', 'np.clip', (['gamma'], {'a_min': '(0)', 'a_max': '(1)'}), '(gamma, a_min=0, a_max=1)\n', (5541... |
import matplotlib.pyplot as plt
import numpy as np
"""
Input:
Q_tab : Tabulr Q (numpy matrix |S| by |A|)
env : an environment object (e.g. env = Maze())
isMaze : fixed to True
arrow : True if you want to plot arrows.s
"""
def value_plot(Q_tab, env, isMaze = True, arrow = True):
direction={0:(0,-0.4)... | [
"matplotlib.pyplot.show",
"numpy.argmax",
"matplotlib.pyplot.imshow",
"numpy.zeros",
"numpy.max",
"matplotlib.pyplot.arrow",
"matplotlib.pyplot.subplots"
] | [((379, 400), 'numpy.max', 'np.max', (['Q_tab'], {'axis': '(1)'}), '(Q_tab, axis=1)\n', (385, 400), True, 'import numpy as np\n'), ((418, 442), 'numpy.argmax', 'np.argmax', (['Q_tab'], {'axis': '(1)'}), '(Q_tab, axis=1)\n', (427, 442), True, 'import numpy as np\n'), ((1516, 1526), 'matplotlib.pyplot.show', 'plt.show', ... |
#!/usr/bin/env python3
import numpy as np
import pickle
import sklearn.metrics
import sklearn.preprocessing
import sklearn.feature_selection
import sklearn.svm
import utils
def main():
metadata = utils.get_metadata()
settings = utils.get_settings('probablygood.gavin.json')
settings['R_SEED'] = None
... | [
"utils.get_settings",
"pickle.dump",
"utils.DataAssembler",
"utils.get_metadata",
"utils.Sequence_CV",
"numpy.hstack",
"numpy.mean",
"utils.get_data",
"numpy.var",
"numpy.vstack"
] | [((204, 224), 'utils.get_metadata', 'utils.get_metadata', ([], {}), '()\n', (222, 224), False, 'import utils\n'), ((240, 285), 'utils.get_settings', 'utils.get_settings', (['"""probablygood.gavin.json"""'], {}), "('probablygood.gavin.json')\n", (258, 285), False, 'import utils\n'), ((869, 893), 'utils.get_data', 'utils... |
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2017-2019 Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions a... | [
"unittest.main",
"numpy.full",
"numpy.multiply",
"numpy.copy",
"numpy.float32",
"improver.nowcasting.optical_flow.OpticalFlow",
"numpy.zeros",
"numpy.ones",
"numpy.ma.MaskedArray",
"datetime.datetime",
"numpy.where",
"numpy.array",
"datetime.timedelta",
"numpy.mean",
"improver.utilities.... | [((20613, 20640), 'improver.utilities.warnings_handler.ManageWarnings', 'ManageWarnings', ([], {'record': '(True)'}), '(record=True)\n', (20627, 20640), False, 'from improver.utilities.warnings_handler import ManageWarnings\n'), ((21393, 21420), 'improver.utilities.warnings_handler.ManageWarnings', 'ManageWarnings', ([... |
# This code is part of Qiskit.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | [
"qiskit_nature.problems.second_quantization.electronic.integrals_calculators.calc_total_magnetization_ints",
"numpy.allclose",
"ddt.data"
] | [((1251, 1272), 'ddt.data', 'data', (['*num_modes_list'], {}), '(*num_modes_list)\n', (1255, 1272), False, 'from ddt import ddt, data\n'), ((1570, 1610), 'qiskit_nature.problems.second_quantization.electronic.integrals_calculators.calc_total_magnetization_ints', 'calc_total_magnetization_ints', (['num_modes'], {}), '(n... |
import abc
import copy
import numpy as np
from .config import DATABUFFER_CONFIG
class databuffer(object):
def __init__(self, hyperparams):
config = copy.deepcopy(DATABUFFER_CONFIG)
config.update(hyperparams)
self.max_size = config['memory_size']
self.state_dims = config['n_states']
... | [
"copy.deepcopy",
"numpy.random.randint",
"numpy.zeros",
"numpy.concatenate"
] | [((161, 193), 'copy.deepcopy', 'copy.deepcopy', (['DATABUFFER_CONFIG'], {}), '(DATABUFFER_CONFIG)\n', (174, 193), False, 'import copy\n'), ((740, 790), 'numpy.zeros', 'np.zeros', (['((0,) + self.state_dims)'], {'dtype': 'np.float32'}), '((0,) + self.state_dims, dtype=np.float32)\n', (748, 790), True, 'import numpy as n... |
# This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | [
"unittest.main",
"ddt.data",
"numpy.zeros"
] | [((1599, 1789), 'ddt.data', 'data', (['((0, 0, 1), None)', '((0, 1, 1), None)', '((0, 1, 2), None)', '((0, 1, (2, 2)), None)', '((1, 0, 1), 0)', '((1, 1, 1), 0)', '((1, 1, 2), 0)', '((1, 1, (2, 2)), 0)', '((2, 2, (2, 2)), [0, 0])'], {}), '(((0, 0, 1), None), ((0, 1, 1), None), ((0, 1, 2), None), ((0, 1, (2, 2\n )), ... |
import numpy as np
import torch
import gym
import argparse
import os
import copy
import utils
import TD3
import Q_TD3
import pandas as pd
import json,os
import time
#device = torch.device("cuda:4" if torch.cuda.is_available() else "cpu")
def eval_policy(policy, env_name,eval_episodes=10):
eval_env = gym.mak... | [
"numpy.random.seed",
"argparse.ArgumentParser",
"numpy.amin",
"numpy.random.normal",
"utils.ReplayBuffer",
"pandas.DataFrame",
"os.path.exists",
"TD3.TD3",
"torch.Tensor",
"json.dump",
"torch.randn_like",
"torch.manual_seed",
"time.sleep",
"torch.cuda.is_available",
"gym.make",
"os.mak... | [((313, 331), 'gym.make', 'gym.make', (['env_name'], {}), '(env_name)\n', (321, 331), False, 'import gym\n'), ((908, 926), 'gym.make', 'gym.make', (['env_name'], {}), '(env_name)\n', (916, 926), False, 'import gym\n'), ((1530, 1548), 'gym.make', 'gym.make', (['env_name'], {}), '(env_name)\n', (1538, 1548), False, 'impo... |
from typing import Tuple, List
import numpy as np
from .types import GridShape, ReceptiveFieldRect
def estimate_rf_from_gradient(receptive_field_grad: np.ndarray) -> ReceptiveFieldRect:
"""
Given input gradient tensors of shape [N, W, H, C] it returns the
estimated size of gradient `blob` in W-H directions i.e. t... | [
"numpy.array",
"numpy.sum"
] | [((870, 886), 'numpy.sum', 'np.sum', (['(x * x_cs)'], {}), '(x * x_cs)\n', (876, 886), True, 'import numpy as np\n'), ((900, 916), 'numpy.sum', 'np.sum', (['(y * y_cs)'], {}), '(y * y_cs)\n', (906, 916), True, 'import numpy as np\n'), ((574, 604), 'numpy.array', 'np.array', (['receptive_field_grad'], {}), '(receptive_f... |
"""
Graph related functions.
"""
import itertools
import json
from networkx.readwrite import json_graph
import networkx as nx
import numpy as np
import seaborn as sns
from scipy.special import comb
import trilearn.auxiliary_functions
def from_json_file(filename):
"""From json graph to graph.
Args:
... | [
"networkx.readwrite.json_graph.node_link_graph",
"numpy.matrix",
"numpy.zeros_like",
"json.load",
"networkx.from_numpy_matrix",
"seaborn.axes_style",
"seaborn.heatmap",
"scipy.special.comb",
"networkx.nx_agraph.to_agraph",
"numpy.zeros",
"networkx.is_chordal",
"networkx.to_numpy_matrix",
"nu... | [((535, 569), 'networkx.readwrite.json_graph.node_link_graph', 'json_graph.node_link_graph', (['json_G'], {}), '(json_G)\n', (561, 569), False, 'from networkx.readwrite import json_graph\n'), ((1151, 1180), 'networkx.nx_agraph.to_agraph', 'nx.nx_agraph.to_agraph', (['graph'], {}), '(graph)\n', (1173, 1180), True, 'impo... |
import sys
if sys.version_info < (3,):
range = xrange
import numpy as np
import pandas as pd
import scipy.linalg as la
import scipy.sparse as sp
import scipy.stats as ss
from scipy.stats import multivariate_normal
from .. import arma
from .. import output as op
from .. import tests as tst
from .. import tsm as ts... | [
"matplotlib.pyplot.title",
"matplotlib.pyplot.figure",
"numpy.mean",
"numpy.diag",
"matplotlib.pyplot.fill_between",
"pandas.DataFrame",
"numpy.std",
"numpy.power",
"scipy.linalg.cho_solve",
"numpy.transpose",
"numpy.append",
"matplotlib.pyplot.show",
"matplotlib.pyplot.legend",
"matplotli... | [((2273, 2335), 'numpy.array', 'np.array', (['self.data_full[self.max_lag:self.data_full.shape[0]]'], {}), '(self.data_full[self.max_lag:self.data_full.shape[0]])\n', (2281, 2335), True, 'import numpy as np\n'), ((2380, 2398), 'numpy.mean', 'np.mean', (['self.data'], {}), '(self.data)\n', (2387, 2398), True, 'import nu... |
"""
Composite Laminate Module (:mod:`compmech.composite.laminate`)
==============================================================
.. currentmodule:: compmech.composite.laminate
"""
from __future__ import division, absolute_import
import numpy as np
from .lamina import Lamina
from .matlamina import read_laminaprop
f... | [
"numpy.matrix",
"numpy.linalg.linalg.inv",
"numpy.zeros",
"numpy.array",
"numpy.dot",
"numpy.concatenate"
] | [((3755, 3806), 'numpy.array', 'np.array', (['[1, xiA1, xiA2, xiA3, xiA4]'], {'dtype': 'DOUBLE'}), '([1, xiA1, xiA2, xiA3, xiA4], dtype=DOUBLE)\n', (3763, 3806), True, 'import numpy as np\n'), ((3821, 3872), 'numpy.array', 'np.array', (['[0, xiB1, xiB2, xiB3, xiB4]'], {'dtype': 'DOUBLE'}), '([0, xiB1, xiB2, xiB3, xiB4]... |
import qulacs
from qulacs.gate import to_matrix_gate, RZ
from math import pi
import numpy as np
from ..op.util import break_operators_into_subsets_dummy
from ..context import rotation_factor
from time import time
class ElpTime:
init_tot = 0.0
init_0 = 0.0
init_1 = 0.0
init_2 = 0.0
init_3 = 0.0
... | [
"numpy.random.seed",
"numpy.einsum",
"qulacs.ParametricQuantumCircuit",
"numpy.exp",
"sympy.utilities.iterables.flatten",
"sympy.expand",
"openfermion.jordan_wigner",
"qulacs.gate.RZ",
"openfermion.FermionOperator",
"matplotlib.pyplot.show",
"matplotlib.pyplot.legend",
"qulacs.QuantumState",
... | [((1577, 1625), 'qulacs.gate.RZ', 'RZ', (['relevant_qubits[-1]', '(theta * rotation_factor)'], {}), '(relevant_qubits[-1], theta * rotation_factor)\n', (1579, 1625), False, 'from qulacs.gate import to_matrix_gate, RZ\n'), ((14664, 14675), 'symbol_for_openfermion.WrappedExpr', 'Symbol', (['"""x"""'], {}), "('x')\n", (14... |
import sys
import numpy as np
from numpy.core._multiarray_umath import ndarray
import models as md
class individual:
model: md.individual_graph
start_direction: ndarray
end_direction: ndarray
end_position: ndarray
start_position: ndarray
hermite_matrix: ndarray
def __init__(self, state_p... | [
"numpy.random.uniform",
"models.individual_graph",
"numpy.array",
"numpy.random.normal",
"numpy.matmul",
"numpy.concatenate"
] | [((738, 771), 'numpy.random.uniform', 'np.random.uniform', (['(0)', '(100)', '[2, 1]'], {}), '(0, 100, [2, 1])\n', (755, 771), True, 'import numpy as np\n'), ((979, 1092), 'numpy.concatenate', 'np.concatenate', (['[self.start_position, self.end_position, -self.start_direction, -self.\n end_direction]'], {'axis': '(1... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 4 19:44:03 2021
@author: mike_ubuntu
"""
'''
По данным из решения волнового уравнения получаем 1 уравнение (тесты методов src.structure.)
'''
import time
import sys
sys.path.append('/media/mike_ubuntu/DATA/ESYS/')
import numpy as np
import copy... | [
"sys.path.append",
"src.globals.tensor_cache.memory_usage_properties",
"src.cache.cache.upload_simple_tokens",
"numpy.random.seed",
"src.cache.cache.download_variable",
"src.token_family.Token_family",
"src.evo_optimizer.Operator_director",
"src.supplementary.Define_Derivatives",
"numpy.ones",
"sr... | [((240, 288), 'sys.path.append', 'sys.path.append', (['"""/media/mike_ubuntu/DATA/ESYS/"""'], {}), "('/media/mike_ubuntu/DATA/ESYS/')\n", (255, 288), False, 'import sys\n'), ((1190, 1286), 'src.cache.cache.download_variable', 'download_variable', (["(folder + 'wave_HP.npy')", "(folder + 'Derivatives.npy')", 'boundary']... |
from bert.preprocess import PAD_INDEX
from sklearn.metrics import f1_score, balanced_accuracy_score
import numpy as np
def mlm_accuracy(predictions, targets):
mlm_predictions, nsp_predictions = predictions
mlm_targets, is_nexts = targets
relevent_indexes = np.where(mlm_targets != PAD_INDEX)
relevent... | [
"sklearn.metrics.f1_score",
"numpy.where",
"sklearn.metrics.balanced_accuracy_score",
"numpy.equal"
] | [((273, 307), 'numpy.where', 'np.where', (['(mlm_targets != PAD_INDEX)'], {}), '(mlm_targets != PAD_INDEX)\n', (281, 307), True, 'import numpy as np\n'), ((438, 486), 'numpy.equal', 'np.equal', (['relevent_predictions', 'relevent_targets'], {}), '(relevent_predictions, relevent_targets)\n', (446, 486), True, 'import nu... |
import numpy as np
import astropy.units as u
from astropy.units.quantity import Quantity
from astropy.units import UnitTypeError, get_physical_type
from astropy.config.paths import get_cache_dir
from snewpy import get_models
import os
try:
from snewpy import model_path
except ImportError:
model_path = os.pat... | [
"snewpy.get_models",
"astropy.units.UnitTypeError",
"astropy.config.paths.get_cache_dir",
"astropy.units.get_physical_type",
"numpy.arange",
"logging.getLogger"
] | [((327, 342), 'astropy.config.paths.get_cache_dir', 'get_cache_dir', ([], {}), '()\n', (340, 342), False, 'from astropy.config.paths import get_cache_dir\n'), ((2196, 2215), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (2213, 2215), False, 'import logging\n'), ((2407, 2443), 'snewpy.get_models', 'get_mod... |
##############################################################################
#
# Author: <NAME>
# Date: 30 April 2019
# Name: file_decoder.py
# Description:
# This script takes in .mat files (produced by record_spectrum_orbcomm.py) and
# produces multiple plots of the signals spectrum, constellation, timing
# recover... | [
"matplotlib.pyplot.title",
"ephem.Observer",
"numpy.abs",
"scipy.signal.welch",
"numpy.sum",
"scipy.io.loadmat",
"helpers.butter_lowpass_filter",
"numpy.argmax",
"numpy.angle",
"helpers.complex_mix",
"matplotlib.pyplot.figure",
"numpy.sinc",
"numpy.exp",
"glob.glob",
"matplotlib.pyplot.t... | [((1269, 1289), 'scipy.io.loadmat', 'loadmat', (['sample_file'], {}), '(sample_file)\n', (1276, 1289), False, 'from scipy.io import loadmat\n'), ((2796, 2812), 'ephem.Observer', 'ephem.Observer', ([], {}), '()\n', (2810, 2812), False, 'import ephem\n'), ((2940, 2976), 'datetime.datetime.utcfromtimestamp', 'datetime.utc... |
import json
import numpy as np
import glob
import re
import copy
import uuid
from preprocessing import prune_sentence
with open('data/concepts_and_synonyms.txt', "r") as f:
sec_tag_labels = f.readlines()
sec_tag_labels = sec_tag_labels[1:]
headers = set([line.strip().split("\t")[-2].lower().strip().replace('_', '... | [
"copy.deepcopy",
"json.loads",
"numpy.sort",
"uuid.uuid1",
"glob.glob",
"preprocessing.prune_sentence",
"re.compile"
] | [((1504, 1542), 're.compile', 're.compile', (['"""([^A-Za-z]*)([^:]+):(.*)"""'], {}), "('([^A-Za-z]*)([^:]+):(.*)')\n", (1514, 1542), False, 'import re\n'), ((1662, 1711), 're.compile', 're.compile', (['"""[^A-Za-z]*([A-Za-z ]*)[^A-Za-z](.*)"""'], {}), "('[^A-Za-z]*([A-Za-z ]*)[^A-Za-z](.*)')\n", (1672, 1711), False, '... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Apr 1 21:22:56 2022
Using Gaussian basis set to propagate the nonadiabatic molecular dynamics
@author: <NAME>
"""
import numpy as np
class GWP:
def __init__(self, x, p, a, phase, coeff):
self.x = x
self.p = p
self.a = a
... | [
"numpy.conj",
"numpy.zeros",
"numpy.exp",
"numpy.sqrt"
] | [((2769, 2802), 'numpy.zeros', 'np.zeros', (['(nb, nb)'], {'dtype': 'complex'}), '((nb, nb), dtype=complex)\n', (2777, 2802), True, 'import numpy as np\n'), ((1685, 1709), 'numpy.exp', 'np.exp', (['(1.0j * (sk - sj))'], {}), '(1.0j * (sk - sj))\n', (1691, 1709), True, 'import numpy as np\n'), ((1566, 1677), 'numpy.exp'... |
"""
2019 (c) piteren
"""
import numpy as np
from typing import List
from ptools.neuralmess.get_tf import tf
from ptools.neuralmess.base_elements import my_initializer, flatten_LOTens
# residual (advanced) connection for (any) layer
def lay_res(
lay_in, # layer input
lay_out, ... | [
"ptools.neuralmess.get_tf.tf.split",
"ptools.neuralmess.get_tf.tf.layers.dropout",
"ptools.neuralmess.get_tf.tf.equal",
"ptools.neuralmess.get_tf.tf.matmul",
"ptools.neuralmess.base_elements.flatten_LOTens",
"ptools.neuralmess.get_tf.tf.cast",
"numpy.sin",
"numpy.arange",
"ptools.neuralmess.get_tf.t... | [((2240, 2275), 'ptools.neuralmess.get_tf.tf.reduce_sum', 'tf.reduce_sum', (['activated'], {'axis': 'axes'}), '(activated, axis=axes)\n', (2253, 2275), False, 'from ptools.neuralmess.get_tf import tf\n'), ((2343, 2373), 'ptools.neuralmess.get_tf.tf.equal', 'tf.equal', (['activated_reduced', '(0)'], {}), '(activated_red... |
#!/usr/bin/python
#coding = utf-8
import numpy as np
from RiskQuantLib.SecurityList.BondList.bondList import bondList
from RiskQuantLib.Security.Bond.bondIndexUnderlyingBond import bondIndexUnderlyingBond
from RiskQuantLib.Set.SecurityList.BondList.bondIndexUnderlyingBondList import setBondIndexUnderlyingBondList
clas... | [
"RiskQuantLib.Security.Bond.bondIndexUnderlyingBond.bondIndexUnderlyingBond",
"numpy.isnan"
] | [((720, 787), 'RiskQuantLib.Security.Bond.bondIndexUnderlyingBond.bondIndexUnderlyingBond', 'bondIndexUnderlyingBond', (['codeString', 'nameString', 'securityTypeString'], {}), '(codeString, nameString, securityTypeString)\n', (743, 787), False, 'from RiskQuantLib.Security.Bond.bondIndexUnderlyingBond import bondIndexU... |
#Author: <NAME>. Licence: MIT. Objective: Create representations of texts
import os
import random
import sys # Import other directory
import timeit # Measure time
import numpy
import scipy
import torch
from afinn import Afinn
from scipy.sparse import hstack
from sklearn.datasets import dump_svmlight_file # save form... | [
"os.mkdir",
"numpy.random.seed",
"sklearn.preprocessing.StandardScaler",
"sklearn.feature_extraction.text.TfidfVectorizer",
"sklearn.preprocessing.MinMaxScaler",
"torch.cat",
"sklearn.preprocessing.MaxAbsScaler",
"numpy.mean",
"claudio_funcoes_sub.file_to_corpus",
"claudio_funcoes_sub.preprocessor... | [((853, 868), 'random.seed', 'random.seed', (['(42)'], {}), '(42)\n', (864, 868), False, 'import random\n'), ((870, 891), 'torch.manual_seed', 'torch.manual_seed', (['(42)'], {}), '(42)\n', (887, 891), False, 'import torch\n'), ((893, 919), 'numpy.random.seed', 'numpy.random.seed', ([], {'seed': '(42)'}), '(seed=42)\n'... |
# -*- coding: utf-8 -*-
"""A set of utility functions to support outlier detection.
"""
# Author: <NAME> <<EMAIL>>
# License: BSD 2 clause
from __future__ import division
from __future__ import print_function
import os
import numpy as np
import pandas as pd
from numpy import percentile
import numbers
import sklearn
... | [
"os.makedirs",
"os.path.isdir",
"pandas.read_csv",
"numpy.iinfo",
"pandas.read_excel"
] | [((658, 676), 'numpy.iinfo', 'np.iinfo', (['np.int32'], {}), '(np.int32)\n', (666, 676), True, 'import numpy as np\n'), ((793, 816), 'os.path.isdir', 'os.path.isdir', (['save_dir'], {}), '(save_dir)\n', (806, 816), False, 'import os\n'), ((826, 847), 'os.makedirs', 'os.makedirs', (['save_dir'], {}), '(save_dir)\n', (83... |
#!/usr/bin/env python3
""" 音声情報処理 n本ノック !! """
# MIT License
# Copyright (C) 2020 by <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 restriction,
# including without limitat... | [
"matplotlib.pyplot.title",
"matplotlib.pyplot.xlim",
"librosa.util.frame",
"matplotlib.pyplot.show",
"numpy.sum",
"matplotlib.pyplot.plot",
"numpy.fft.fft",
"numpy.linalg.eig",
"scipy.io.wavfile.read",
"matplotlib.pyplot.figure",
"numpy.where",
"numpy.arange",
"scipy.signal.argrelmax",
"nu... | [((1511, 1537), 'scipy.io.wavfile.read', 'wavfile.read', (['IN_WAVE_FILE'], {}), '(IN_WAVE_FILE)\n', (1523, 1537), False, 'from scipy.io import wavfile\n'), ((1712, 1747), 'numpy.linspace', 'np.linspace', (['(0)', 'fs', 'frames.shape[0]'], {}), '(0, fs, frames.shape[0])\n', (1723, 1747), True, 'import numpy as np\n'), ... |
import numpy as np
def calc_area(vertex):
vec_a = vertex[:,1] - vertex[:,0]
vec_b = vertex[:,2] - vertex[:,0]
normal = np.cross(vec_a, vec_b)
area = np.absolute(np.linalg.norm(normal, ord=2, axis=1))*0.5
return area
def uniform_sample_on_triangle(triangle):
while True:
rn = np.random.r... | [
"numpy.sum",
"numpy.cross",
"numpy.linalg.norm",
"numpy.random.choice",
"numpy.random.rand"
] | [((132, 154), 'numpy.cross', 'np.cross', (['vec_a', 'vec_b'], {}), '(vec_a, vec_b)\n', (140, 154), True, 'import numpy as np\n'), ((590, 613), 'numpy.sum', 'np.sum', (['area_collection'], {}), '(area_collection)\n', (596, 613), True, 'import numpy as np\n'), ((933, 1010), 'numpy.random.choice', 'np.random.choice', (['a... |
# Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | [
"cv2.cvtColor",
"numpy.asarray",
"numpy.zeros",
"os.path.exists",
"cv2.imread",
"os.path.splitext",
"PIL.Image.fromarray",
"os.path.split",
"os.path.join",
"os.listdir",
"cv2.resize"
] | [((952, 1003), 'os.path.join', 'os.path.join', (['self.test_root_dir', '"""ch4_test_images"""'], {}), "(self.test_root_dir, 'ch4_test_images')\n", (964, 1003), False, 'import os\n'), ((1603, 1623), 'cv2.imread', 'cv2.imread', (['img_path'], {}), '(img_path)\n', (1613, 1623), False, 'import cv2\n'), ((1638, 1674), 'cv2.... |
from pynq import DefaultIP
from pynq import DefaultHierarchy
from pynq import allocate
import numpy as np
from rfsoc_qpsk.dma_timer import DmaTimer
class QPSKRx(DefaultHierarchy):
def __init__(self, description):
super().__init__(description)
def get_decimated(self):
return self.qpsk_rx... | [
"numpy.array",
"pynq.allocate"
] | [((1567, 1630), 'pynq.allocate', 'allocate', ([], {'shape': '(pkt_size * buf_words_per_pkt,)', 'dtype': 'np.int16'}), '(shape=(pkt_size * buf_words_per_pkt,), dtype=np.int16)\n', (1575, 1630), False, 'from pynq import allocate\n'), ((1975, 1993), 'numpy.array', 'np.array', (['self.buf'], {}), '(self.buf)\n', (1983, 199... |
import os
import sys
# Adding project folder to import modules
root = os.getcwd().replace("\\", "/")
sys.path.append(root)
import mod.env.config as conf
from mod.env.config import ConfigNetwork
import pandas as pd
from copy import deepcopy
from collections import defaultdict
from pprint import pprint
import numpy a... | [
"sys.path.append",
"pandas.DataFrame",
"numpy.set_printoptions",
"os.getcwd",
"pandas.read_csv",
"collections.defaultdict",
"numpy.linspace",
"seaborn.set",
"seaborn.set_context",
"matplotlib.pyplot.savefig",
"mod.env.config.ConfigNetwork"
] | [((103, 124), 'sys.path.append', 'sys.path.append', (['root'], {}), '(root)\n', (118, 124), False, 'import sys\n'), ((379, 401), 'seaborn.set', 'sns.set', ([], {'style': '"""ticks"""'}), "(style='ticks')\n", (386, 401), True, 'import seaborn as sns\n'), ((27632, 27649), 'collections.defaultdict', 'defaultdict', (['list... |
import pygame
import numpy as np
'''GUI for the Game of Mills.
Gets the Mapping of the field as an array.
Has a fixed conversion Array as an 2D Space on which the board is to be represented, which can be scaled as needed.
Scans the GUI for mouseclicks, and transforms them via indexation of the unscaled Array back into... | [
"pygame.draw.line",
"pygame.font.SysFont",
"pygame.draw.rect",
"pygame.display.set_mode",
"pygame.event.get",
"numpy.zeros",
"pygame.init",
"pygame.time.wait",
"numpy.fliplr",
"pygame.display.update",
"numpy.array",
"numpy.all"
] | [((3601, 3829), 'numpy.array', 'np.array', (['[[(5, 7), (5, 9), (7, 9), (9, 9), (9, 7), (9, 5), (7, 5), (5, 5)], [(3, 7),\n (3, 11), (7, 11), (11, 11), (11, 7), (11, 3), (7, 3), (3, 3)], [(1, 7),\n (1, 13), (7, 13), (13, 13), (13, 7), (13, 1), (7, 1), (1, 1)]]'], {}), '([[(5, 7), (5, 9), (7, 9), (9, 9), (9, 7), (... |
#!/usr/bin/env python3
import os as os
import sys as sys
import logging as log
import io as io
import traceback as trb
import argparse as argp
import collections as col
import numpy as np
def parse_command_line():
"""
:return:
"""
parser = argp.ArgumentParser(prog="np_cov_to_regions.py", description... | [
"os.path.abspath",
"io.StringIO",
"traceback.print_exc",
"argparse.ArgumentParser",
"logging.basicConfig",
"numpy.zeros",
"collections.defaultdict",
"numpy.nonzero",
"logging.shutdown",
"sys.exit",
"logging.getLogger"
] | [((260, 329), 'argparse.ArgumentParser', 'argp.ArgumentParser', ([], {'prog': '"""np_cov_to_regions.py"""', 'description': '__doc__'}), "(prog='np_cov_to_regions.py', description=__doc__)\n", (279, 329), True, 'import argparse as argp\n'), ((1982, 2024), 'numpy.zeros', 'np.zeros', (['total_seq_length'], {'dtype': 'np.i... |
import numpy as np
from multiprocessing import Pool, cpu_count
import statsmodels.api as sm
from statsmodels.gam.api import GLMGam, BSplines
from scipy.stats import norm
from tqdm import tqdm
from itertools import product
import pandas as pd
from ananke.graphs import ADMG
from ananke.models import LinearGaussianSEM
fro... | [
"numpy.random.uniform",
"numpy.nansum",
"os.path.abspath",
"numpy.random.seed",
"wrapper_resampler.ShiftedTester",
"statsmodels.api.tools.add_constant",
"numpy.isnan",
"statsmodels.stats.proportion.proportion_confint",
"numpy.random.gamma",
"multiprocessing.cpu_count",
"statsmodels.gam.api.BSpli... | [((581, 598), 'numpy.random.seed', 'np.random.seed', (['(1)'], {}), '(1)\n', (595, 598), True, 'import numpy as np\n'), ((636, 665), 'numpy.random.normal', 'np.random.normal', ([], {'size': '(n, 1)'}), '(size=(n, 1))\n', (652, 665), True, 'import numpy as np\n'), ((703, 733), 'numpy.random.uniform', 'np.random.uniform'... |
"""
This module contains classes used to define the standard behavior of the agent.
It relies on the controllers, the chosen training/test policy and the learning algorithm
to specify its behavior in the environment.
"""
import os
import numpy as np
import copy
import sys
import joblib
from warnings import warn
fro... | [
"os.mkdir",
"copy.deepcopy",
"numpy.zeros_like",
"numpy.average",
"os.remove",
"numpy.trim_zeros",
"numpy.zeros",
"joblib.dump",
"numpy.random.RandomState",
"numpy.where",
"joblib.load",
"os.listdir"
] | [((2233, 2256), 'numpy.random.RandomState', 'np.random.RandomState', ([], {}), '()\n', (2254, 2256), True, 'import numpy as np\n'), ((5500, 5540), 'numpy.average', 'np.average', (['self._training_loss_averages'], {}), '(self._training_loss_averages)\n', (5510, 5540), True, 'import numpy as np\n'), ((9394, 9414), 'os.li... |
import numpy as np
import pandas
from pandas import Series, DataFrame
import matplotlib.pyplot as plt
from pylab import rcParams
def sendfunc(rows1):
import seaborn as sb
sb.set_style('dark')
l = list(rows1)
data = []
for i in l:
data.append(list(i))
length=len(da... | [
"seaborn.set_style",
"seaborn.barh",
"seaborn.tick_params",
"numpy.arange",
"matplotlib.pyplot.gca",
"matplotlib.pyplot.gcf",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.grid"
] | [((190, 210), 'seaborn.set_style', 'sb.set_style', (['"""dark"""'], {}), "('dark')\n", (202, 210), True, 'import seaborn as sb\n'), ((877, 897), 'seaborn.set_style', 'sb.set_style', (['"""dark"""'], {}), "('dark')\n", (889, 897), True, 'import seaborn as sb\n'), ((913, 927), 'matplotlib.pyplot.subplots', 'plt.subplots'... |
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 6 21:38:42 2019
"""
import numpy as np
from scipy import linalg
# try to keep it in block
##################### basic functions ################################################
def mass_action_law (ln_X, ln_K, A):
'''
all inputs are numpy arrays!!!
... | [
"scipy.linalg.solve",
"numpy.multiply",
"numpy.log",
"numpy.zeros",
"numpy.isnan",
"numpy.exp",
"numpy.matmul",
"numpy.cosh",
"numpy.sinh",
"numpy.sqrt"
] | [((2849, 2913), 'numpy.sqrt', 'np.sqrt', (['(8 * 1000 * R * T * epsilon * epsilon_0 * ionic_strength)'], {}), '(8 * 1000 * R * T * epsilon * epsilon_0 * ionic_strength)\n', (2856, 2913), True, 'import numpy as np\n'), ((2946, 2962), 'numpy.sinh', 'np.sinh', (['inner_B'], {}), '(inner_B)\n', (2953, 2962), True, 'import ... |
#!/usr/bin/env python3
import sys
import shutil
from pathlib import Path
from multiprocessing import Pool
import numpy as np
import spectral_cube
from astropy import convolution
sys.path.append('/lustre/aoc/users/bsvoboda/temp/nestfit')
import nestfit as nf
from nestfit.main import get_irdc_priors
from . import (PD... | [
"astropy.convolution.Gaussian2DKernel",
"nestfit.aggregate_run_attributes",
"astropy.convolution.CustomKernel",
"nestfit.CubeStack",
"nestfit.CubeFitter",
"pathlib.Path",
"shutil.rmtree",
"nestfit.convolve_evidence",
"nestfit.main.get_irdc_priors",
"sys.path.append",
"nestfit.HdfStore",
"nestf... | [((181, 239), 'sys.path.append', 'sys.path.append', (['"""/lustre/aoc/users/bsvoboda/temp/nestfit"""'], {}), "('/lustre/aoc/users/bsvoboda/temp/nestfit')\n", (196, 239), False, 'import sys\n'), ((899, 944), 'nestfit.NoiseMap.from_pbimg', 'nf.NoiseMap.from_pbimg', (['rms', 'pb_11_cube._data'], {}), '(rms, pb_11_cube._da... |
from entente.landmarks.symmetrize_landmarks import (
symmetrize_landmarks_using_plane,
symmetrize_landmarks_using_topology,
)
import numpy as np
from polliwog import Plane
import pytest
from vg.compat import v1 as vg
from ..test_symmetry import create_seat_and_arm_mesh
def test_symmetrize_landmarks_using_plan... | [
"numpy.copy",
"numpy.flipud",
"pytest.raises",
"vg.compat.v1.euclidean_distance",
"numpy.array",
"numpy.testing.assert_allclose",
"entente.landmarks.symmetrize_landmarks.symmetrize_landmarks_using_plane",
"entente.landmarks.symmetrize_landmarks.symmetrize_landmarks_using_topology"
] | [((340, 410), 'numpy.array', 'np.array', (['[[-18.5657, 54.7161, -19.5649], [20.0896, 54.919, -19.5738]]'], {}), '([[-18.5657, 54.7161, -19.5649], [20.0896, 54.919, -19.5738]])\n', (348, 410), True, 'import numpy as np\n'), ((429, 481), 'entente.landmarks.symmetrize_landmarks.symmetrize_landmarks_using_plane', 'symmetr... |
"""
Show some diagnostic plots for an LNGS wav. Usage:
plotwav.py [filename]
If not specified, the file read is
darksidehd/nuvhd_lf_3x_tile57_77K_64V_6VoV_1.wav. The plots are:
* An histogram of all data;
* A temporal plot of some events;
* The temporal distribution of the trigger rising edge.
At most 1... | [
"readwav.readwav",
"fighelp.saveaspng",
"fighelp.figwithsize",
"readwav.first_nonzero",
"numpy.bincount"
] | [((588, 641), 'readwav.readwav', 'readwav.readwav', (['filename'], {'mmap': '(False)', 'maxevents': '(1000)'}), '(filename, mmap=False, maxevents=1000)\n', (603, 641), False, 'import readwav\n'), ((761, 813), 'fighelp.figwithsize', 'fighelp.figwithsize', (['[11.8, 4.8]'], {'resetfigcount': '(True)'}), '([11.8, 4.8], re... |
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 28 17:27:37 2019
@author: <NAME>
"""
import copy
import numpy as np
import populationevolution as popev
import populationevolution.raggedtoregular as r2r
import SweepApproximationFunctions as SAF
def compareNeq_Ntrue(mu_min, delta_f, M, P_mu, K, t):
Neq = SAF.findN... | [
"numpy.maximum",
"numpy.sum",
"numpy.abs",
"numpy.allclose",
"numpy.isclose",
"numpy.arange",
"numpy.unique",
"numpy.pad",
"populationevolution.Population",
"SweepApproximationFunctions.fixation_probability",
"numpy.geomspace",
"numpy.append",
"numpy.cumsum",
"numpy.linspace",
"SweepAppr... | [((311, 351), 'SweepApproximationFunctions.findNeq', 'SAF.findNeq', (['mu_min', 'delta_f', 'M', 'P_mu', 'K'], {}), '(mu_min, delta_f, M, P_mu, K)\n', (322, 351), True, 'import SweepApproximationFunctions as SAF\n'), ((486, 549), 'populationevolution.Population', 'popev.Population', (['(0)', 'mu_min', 'N_start', 'delta_... |
import os
import csv
from argparse import ArgumentParser
import numpy as np
import torch
from torchvision import transforms
from assets.inference import classify
from assets.mtdp import build_model
from assets.mtdp.components import Head
from assets.mtdp.networks import SingleHead
from svm_classifier_train import gro... | [
"svm_classifier_train.group_per_slide",
"assets.mtdp.build_model",
"numpy.save",
"csv.reader",
"argparse.ArgumentParser",
"os.path.basename",
"torch.load",
"assets.inference.classify",
"numpy.array",
"torch.device",
"torchvision.transforms.Normalize",
"torch.no_grad",
"os.path.join",
"nump... | [((1075, 1091), 'argparse.ArgumentParser', 'ArgumentParser', ([], {}), '()\n', (1089, 1091), False, 'from argparse import ArgumentParser\n'), ((2073, 2108), 'svm_classifier_train.group_per_slide', 'group_per_slide', (['args.metadata_path'], {}), '(args.metadata_path)\n', (2088, 2108), False, 'from svm_classifier_train ... |
import PSICT_UIF
import numpy as np
import os
import sys
import Labber
from PSICT_extras.PSICT_MultiPulse.PSICT_MultiPulse_tools import writePulseDefs, writePulseSeqs
## Create pulse definitions (list of dicts)
pulse_defs = []
## qubit
pulse_defs.append({'a': 0.3, 'w': 60e-9, 'v': 0e-9, 's': 60e-9, 'f': 90e6, 'o': 2,... | [
"os.path.abspath",
"numpy.array",
"PSICT_UIF.psictUIFInterface",
"PSICT_extras.PSICT_MultiPulse.PSICT_MultiPulse_tools.writePulseSeqs",
"PSICT_extras.PSICT_MultiPulse.PSICT_MultiPulse_tools.writePulseDefs"
] | [((1138, 1176), 'os.path.abspath', 'os.path.abspath', (['"""definitions_002.txt"""'], {}), "('definitions_002.txt')\n", (1153, 1176), False, 'import os\n'), ((1177, 1240), 'PSICT_extras.PSICT_MultiPulse.PSICT_MultiPulse_tools.writePulseDefs', 'writePulseDefs', (['pulse_def_path', 'pulse_defs', 'pulse_def_key_order'], {... |
import numpy as np
# flattening
two_dim_array = np.array([[1, 2, 3], [4, 5, 6]])
""" array([[1, 2, 3],
[4, 5, 6]]) """
# convert 2Dim to 1Dim
two_dim_array.ravel()
# array([1, 2, 3, 4, 5, 6])
# transpose
two_dim_array.T
""" array([[1, 4],
[2, 5],
[3, 6]]) """
# re-shaping
one... | [
"numpy.array"
] | [((52, 84), 'numpy.array', 'np.array', (['[[1, 2, 3], [4, 5, 6]]'], {}), '([[1, 2, 3], [4, 5, 6]])\n', (60, 84), True, 'import numpy as np\n')] |
"""
Module provides telemetry services.
"""
import collections
import numpy
class Telemetry:
"""
Calculates object movement parameters like velocity, acceleration. Additionally the class provides service to
predict further position of the object using velocity and acceleration.
"""
... | [
"numpy.diff",
"numpy.sum",
"collections.deque"
] | [((467, 486), 'collections.deque', 'collections.deque', ([], {}), '()\n', (484, 486), False, 'import collections\n'), ((1062, 1089), 'numpy.diff', 'numpy.diff', (['self._positions'], {}), '(self._positions)\n', (1072, 1089), False, 'import numpy\n'), ((1256, 1269), 'numpy.sum', 'numpy.sum', (['ds'], {}), '(ds)\n', (126... |
import datetime as dt
import glob
import os
import pickle
import time # for start stop calc
from threading import Thread
import numpy as np
import torch
import torch.utils.data as data
from deeplio.common import utils, logger
from deeplio.common.laserscan import LaserScan
class KittiRawData:
""" KiitiRawData
... | [
"deeplio.common.laserscan.LaserScan",
"numpy.maximum",
"pickle.load",
"os.path.join",
"deeplio.common.utils.transform_from_rot_trans",
"deeplio.common.logger.get_app_logger",
"deeplio.common.utils.subselect_files",
"torch.is_tensor",
"numpy.dstack",
"threading.Thread",
"deeplio.common.utils.read... | [((1279, 1313), 'os.path.join', 'os.path.join', (['base_path_sync', 'date'], {}), '(base_path_sync, date)\n', (1291, 1313), False, 'import os\n'), ((1345, 1401), 'os.path.join', 'os.path.join', (['base_path_sync', 'date', 'self.drive_full_sync'], {}), '(base_path_sync, date, self.drive_full_sync)\n', (1357, 1401), Fals... |
"""
_physical_abstract_data.py
Copyright 2016 University of Melbourne.
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... | [
"os.remove",
"setup_logging.get_logger",
"fourdvar.util.date_handle.replace_date",
"numpy.zeros",
"fourdvar.util.archive_handle.get_archive_path",
"fourdvar.util.netcdf_handle.create",
"os.path.isfile",
"numpy.array",
"fourdvar.util.netcdf_handle.get_variable",
"numpy.int32",
"numpy.array_equal"... | [((909, 943), 'setup_logging.get_logger', 'setup_logging.get_logger', (['__file__'], {}), '(__file__)\n', (933, 943), False, 'import setup_logging\n'), ((4183, 4201), 'fourdvar.util.archive_handle.get_archive_path', 'get_archive_path', ([], {}), '()\n', (4199, 4201), False, 'from fourdvar.util.archive_handle import get... |
import numpy as np
# Untested function
from source.env.lib.log import Blob
def discountRewards(rewards, gamma=0.99):
rets, N = [], len(rewards)
discounts = np.array([gamma ** i for i in range(N)])
rewards = np.array(rewards)
for idx in range(N): rets.append(sum(rewards[idx:] * discounts[:N - idx]))
... | [
"source.env.lib.log.Blob",
"numpy.array"
] | [((223, 240), 'numpy.array', 'np.array', (['rewards'], {}), '(rewards)\n', (231, 240), True, 'import numpy as np\n'), ((873, 879), 'source.env.lib.log.Blob', 'Blob', ([], {}), '()\n', (877, 879), False, 'from source.env.lib.log import Blob\n')] |
import sys
import os
# import warnings
# import pickle
from datetime import datetime
import requests
from bs4 import BeautifulSoup
import numpy as np
import matplotlib.pyplot as plt
from scipy import stats
from astropy.timeseries import LombScargle
# from astroquery.simbad import Simbad
# cSimbad = Simbad()
# cSimbad... | [
"numpy.ones_like",
"matplotlib.pyplot.show",
"scipy.stats.sigmaclip",
"numpy.polyfit",
"numpy.median",
"astropy.timeseries.LombScargle",
"matplotlib.pyplot.close",
"numpy.polyval",
"os.path.exists",
"numpy.genfromtxt",
"numpy.negative",
"datetime.datetime.strptime",
"requests.get",
"bs4.Be... | [((706, 723), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (718, 723), False, 'import requests\n'), ((1117, 1154), 'bs4.BeautifulSoup', 'BeautifulSoup', (['content', '"""html.parser"""'], {}), "(content, 'html.parser')\n", (1130, 1154), False, 'from bs4 import BeautifulSoup\n'), ((1544, 1594), 'datetime.da... |
import numpy as np
class GreedyOpt:
"""
iterable:
the items to pick from
size:
size of subset of items to search
target:
Function to minimize
"""
def __init__(self, iterable=[], target=lambda x: 1):
self.iterable = iterable
self._target = target
... | [
"numpy.argmin"
] | [((1099, 1115), 'numpy.argmin', 'np.argmin', (['costs'], {}), '(costs)\n', (1108, 1115), True, 'import numpy as np\n')] |
import os
import subprocess
from multiprocessing.pool import Pool
import miditoolkit
import pandas as pd
import pretty_midi
from tqdm import tqdm
import numpy as np
import pickle
from copy import deepcopy
from midi_preprocess.utils.hparams import hparams
import midi_preprocess.steps.track_separate as tc
def filter_... | [
"pandas.DataFrame",
"midi_preprocess.steps.track_separate.remove_file_duplicate_tracks",
"midi_preprocess.steps.track_separate.add_labels",
"copy.deepcopy",
"os.makedirs",
"tqdm.tqdm",
"midi_preprocess.steps.track_separate.predict_labels",
"numpy.std",
"midi_preprocess.steps.track_separate.cal_file_... | [((859, 916), 'subprocess.check_call', 'subprocess.check_call', (['f"""rm -rf "{save_dir}\\""""'], {'shell': '(True)'}), '(f\'rm -rf "{save_dir}"\', shell=True)\n', (880, 916), False, 'import subprocess\n'), ((1522, 1548), 'pandas.DataFrame', 'pd.DataFrame', (['merged_infos'], {}), '(merged_infos)\n', (1534, 1548), Tru... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Mar 5 09:01:46 2021
@author: Michi
"""
import os
import sys
import numpy as np
PACKAGE_PARENT = '..'
SCRIPT_DIR = os.path.dirname(os.path.realpath(os.path.join(os.getcwd(), os.path.expanduser(__file__))))
sys.path.append(os.path.normpath(os.path.join(... | [
"os.path.expanduser",
"cosmology.cosmo.Cosmo",
"population.astro.astroPopulation.AstroPopulation",
"numpy.random.seed",
"dataStructures.O3adata.O3aData",
"dataStructures.O3bdata.O3bInjectionsData",
"os.getcwd",
"dataStructures.mockData.GWMockInjectionsData",
"dataStructures.O3adata.O3aInjectionsData... | [((4125, 4145), 'numpy.random.seed', 'np.random.seed', (['seed'], {}), '(seed)\n', (4139, 4145), True, 'import numpy as np\n'), ((4542, 4561), 'cosmology.cosmo.Cosmo', 'Cosmo', ([], {}), '(**cosmo_args)\n', (4547, 4561), False, 'from cosmology.cosmo import Cosmo\n'), ((4620, 4643), 'population.allPopulations.AllPopulat... |
import numpy as np
from PuzzleLib.Backend import gpuarray, Blas
from PuzzleLib.Backend.Dnn import PoolMode, poolNd, poolNdBackward
from PuzzleLib.Modules.Module import ModuleError, Module
class SubtractMean(Module):
def __init__(self, size=5, includePad=True, name=None):
super().__init__(name)
self.registerBlu... | [
"PuzzleLib.Backend.Dnn.poolNd",
"numpy.sum",
"numpy.random.randn",
"numpy.empty",
"numpy.zeros",
"PuzzleLib.Backend.Dnn.poolNdBackward",
"PuzzleLib.Modules.Module.ModuleError"
] | [((1836, 1915), 'numpy.zeros', 'np.zeros', ([], {'shape': '(batchsize, maps, h + 2 * hpad, w + 2 * wpad)', 'dtype': 'np.float32'}), '(shape=(batchsize, maps, h + 2 * hpad, w + 2 * wpad), dtype=np.float32)\n', (1844, 1915), True, 'import numpy as np\n'), ((1985, 2036), 'numpy.empty', 'np.empty', (['subtractMean.data.sha... |
import tensorflow as tf
import numpy as np
np.random.seed(1234)
import os
import time
import datetime
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
from builddata import *
from model import ConvKB
# Parameters
# ==================================================
parser = ArgumentParser("ConvKB", ... | [
"numpy.random.seed",
"argparse.ArgumentParser",
"os.makedirs",
"tensorflow.global_variables_initializer",
"tensorflow.Session",
"os.path.exists",
"tensorflow.set_random_seed",
"tensorflow.ConfigProto",
"tensorflow.Variable",
"numpy.array",
"tensorflow.Graph",
"tensorflow.train.AdamOptimizer",
... | [((44, 64), 'numpy.random.seed', 'np.random.seed', (['(1234)'], {}), '(1234)\n', (58, 64), True, 'import numpy as np\n'), ((295, 398), 'argparse.ArgumentParser', 'ArgumentParser', (['"""ConvKB"""'], {'formatter_class': 'ArgumentDefaultsHelpFormatter', 'conflict_handler': '"""resolve"""'}), "('ConvKB', formatter_class=A... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# author: 11360
# datetime: 2021/2/28 23:43
# project: Particle Filter
import numpy as np
import matplotlib.pyplot as plt
dt = 0.4
# 认为噪声仍服从高斯分布
variance_Q = 0.1 * dt # 状态转移噪声协方差
variance_R = 1 * dt # 测量协方差
class Particle_filter:
def __init__(self,... | [
"numpy.average",
"numpy.sum",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.show",
"matplotlib.pyplot.scatter",
"matplotlib.pyplot.legend",
"numpy.searchsorted",
"numpy.cumsum",
"matplotlib.pyplot.figure",
"numpy.exp",
"numpy.random.normal",
"numpy.cos",
"numpy.random.rand",
"numpy.sqrt"
] | [((505, 543), 'numpy.average', 'np.average', (['particles'], {'weights': 'weights'}), '(particles, weights=weights)\n', (515, 543), True, 'import numpy as np\n'), ((559, 611), 'numpy.average', 'np.average', (['((particles - mean) ** 2)'], {'weights': 'weights'}), '((particles - mean) ** 2, weights=weights)\n', (569, 61... |
import numpy as np
from ml.model import NumberRecognizeNN
from ml.data_processor import DataProcessor
class ModelAPI():
def __init__(self, resource):
self.resource = resource
self.model = NumberRecognizeNN(resource.INPUT_SIZE, resource.OUTPUT_SIZE)
resource.load_model(self.model)
... | [
"ml.model.NumberRecognizeNN",
"numpy.array",
"ml.data_processor.DataProcessor",
"numpy.argmax"
] | [((211, 271), 'ml.model.NumberRecognizeNN', 'NumberRecognizeNN', (['resource.INPUT_SIZE', 'resource.OUTPUT_SIZE'], {}), '(resource.INPUT_SIZE, resource.OUTPUT_SIZE)\n', (228, 271), False, 'from ml.model import NumberRecognizeNN\n'), ((390, 416), 'ml.data_processor.DataProcessor', 'DataProcessor', (['means', 'stds'], {}... |
"""
Users can register their rollout func here, with the same parameters list like method `sequential`
and return a Dict-like metric results.
Examples:
>>> def custom_rollout_function(
... agent_interfaces: List[env.AgentInterface],
... env_desc: Dict[str, Any],
... metric_type: str,
..... | [
"ray.remote",
"malib.utils.general.iter_many_dicts_recursively",
"numpy.sum",
"malib.utils.logger.Log.data_feedback",
"malib.rollout.postprocessor.get_postprocessor",
"numpy.zeros",
"malib.envs.vector_env.VectorEnv",
"collections.defaultdict",
"malib.utils.episode.Episode",
"malib.envs.vector_env.... | [((12640, 12684), 'malib.utils.general.iter_many_dicts_recursively', 'iter_many_dicts_recursively', (['*ph'], {'history': '[]'}), '(*ph, history=[])\n', (12667, 12684), False, 'from malib.utils.general import iter_many_dicts_recursively\n'), ((14564, 14612), 'malib.utils.logger.Log.data_feedback', 'Log.data_feedback', ... |
import warnings
from typing import Set, Dict, Optional, List, Tuple
import numpy as np
import pandas as pd
from mdrsl.data_structures.rules.rule_part import Consequent
from mdrsl.evaluation.interpretability.basic_rule_set_stats import BasicRuleSetStatistics, is_valid_fraction
from mdrsl.rule_models.mids.cover.cover_c... | [
"numpy.count_nonzero",
"numpy.zeros",
"mdrsl.utils.value_collection.ValueCollector",
"numpy.logical_or",
"mdrsl.evaluation.interpretability.basic_rule_set_stats.is_valid_fraction",
"warnings.warn"
] | [((9609, 9650), 'numpy.zeros', 'np.zeros', (['nb_of_test_examples'], {'dtype': 'bool'}), '(nb_of_test_examples, dtype=bool)\n', (9617, 9650), True, 'import numpy as np\n'), ((9897, 9936), 'numpy.count_nonzero', 'np.count_nonzero', (['cover_cumulative_mask'], {}), '(cover_cumulative_mask)\n', (9913, 9936), True, 'import... |
import cv2
from PIL import Image, ImageTk
import io
import tensorflow as tf
from dataloader import mask_gen_cs_kar, mask_gen_hor_cs_kar_albedo
import numpy as np
import random
import os
import glob
from html import HTML
import skvideo.io
import argparse
tf.enable_eager_execution()
os.environ["CUDA_VISIBLE_DEVICES"] = '... | [
"tensorflow.meshgrid",
"tensorflow.reduce_sum",
"numpy.random.seed",
"argparse.ArgumentParser",
"cv2.VideoWriter_fourcc",
"tensorflow.identity",
"tensorflow.reshape",
"tensorflow.zeros_like",
"tensorflow.matmul",
"tensorflow.linalg.det",
"tensorflow.linalg.inv",
"numpy.exp",
"tensorflow.GPUO... | [((254, 281), 'tensorflow.enable_eager_execution', 'tf.enable_eager_execution', ([], {}), '()\n', (279, 281), True, 'import tensorflow as tf\n'), ((357, 382), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (380, 382), False, 'import argparse\n'), ((783, 837), 'os.path.join', 'os.path.join', (['... |
import json
from seesaw.query_interface import AccessMethod
import numpy as np
import pandas as pd
from .dataset_manager import GlobalDataManager, SeesawDatasetManager
import os
import time
import numpy as np
import sklearn.metrics
import math
import pyroaring as pr
from dataclasses import dataclass, field
def get_i... | [
"math.ceil",
"pyroaring.FrozenBitMap",
"numpy.clip",
"time.time",
"dataclasses.field",
"pyroaring.BitMap",
"numpy.concatenate"
] | [((997, 1024), 'dataclasses.field', 'field', ([], {'default_factory': 'list'}), '(default_factory=list)\n', (1002, 1024), False, 'from dataclasses import dataclass, field\n'), ((15548, 15595), 'pyroaring.FrozenBitMap', 'pr.FrozenBitMap', (['positive_box_data.dbidx.values'], {}), '(positive_box_data.dbidx.values)\n', (1... |
#
# Plot convergence of reduced models as the non-dimensional conductivity is
# increased. Here "bar" refers to the averaged through-cell model (i.e. DFNCC)
#
import pybamm
import sys
import pickle
import shared
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
# set style
matplotlib.rc_file("_matp... | [
"pybamm.CasadiSolver",
"pybamm.current_collector.EffectiveResistance1D",
"matplotlib.pyplot.show",
"pybamm.Discretisation",
"pybamm.AlgebraicSolver",
"pybamm.Mesh",
"pybamm.set_logging_level",
"shared.make_comsol_model",
"matplotlib.rc_file",
"matplotlib.pyplot.subplots",
"numpy.array",
"sys.s... | [((295, 357), 'matplotlib.rc_file', 'matplotlib.rc_file', (['"""_matplotlibrc"""'], {'use_default_template': '(True)'}), "('_matplotlibrc', use_default_template=True)\n", (313, 357), False, 'import matplotlib\n'), ((413, 442), 'sys.setrecursionlimit', 'sys.setrecursionlimit', (['(100000)'], {}), '(100000)\n', (434, 442... |
from numpy import mat
from math import sin, cos, radians
def rot_y(de):
t = mat([
[ cos(de), 0, sin(de)],
[ 0, 1, 0],
[-sin(de), 0, cos(de)]
])
return t
def rot_z(de):
t = mat([
[cos(de), -... | [
"math.radians",
"numpy.mat",
"math.cos",
"math.sin"
] | [((523, 540), 'math.radians', 'radians', (['a_degree'], {}), '(a_degree)\n', (530, 540), False, 'from math import sin, cos, radians\n'), ((542, 559), 'math.radians', 'radians', (['b_degree'], {}), '(b_degree)\n', (549, 559), False, 'from math import sin, cos, radians\n'), ((680, 719), 'numpy.mat', 'mat', (['[nozzle_len... |
"""resample converts audio samples from one sampling rate to another.
This module contains no actual resampling code; it simply tries a series of
options in descending order of preference, using the best one available.
"""
import numpy as np
import signal
@signal.processor
def resample(clip, new_rate):
# this w... | [
"nnresample.resample",
"samplerate.resample",
"numpy.ceil",
"signal.Clip",
"numpy.frombuffer",
"resampy.resample",
"numpy.iinfo",
"audioop.ratecv"
] | [((472, 499), 'signal.Clip', 'signal.Clip', (['data', 'new_rate'], {}), '(data, new_rate)\n', (483, 499), False, 'import signal\n'), ((1152, 1194), 'resampy.resample', 'resampy.resample', (['data', 'old_rate', 'new_rate'], {}), '(data, old_rate, new_rate)\n', (1168, 1194), False, 'import resampy\n'), ((1359, 1413), 'nn... |
import torch
import numpy as np
from .energy.base import Energy
from .sampling.base import Sampler
from .distribution import CustomDistribution
__all__ = ["ProductEnergy", "ProductSampler", "ProductDistribution"]
class ProductEnergy(Energy):
"""Stack multiple energies together to form an energy on the product... | [
"torch.cat",
"numpy.array",
"torch.stack",
"torch.nn.ModuleList"
] | [((1066, 1097), 'torch.nn.ModuleList', 'torch.nn.ModuleList', (['components'], {}), '(components)\n', (1085, 1097), False, 'import torch\n'), ((2354, 2385), 'torch.nn.ModuleList', 'torch.nn.ModuleList', (['components'], {}), '(components)\n', (2373, 2385), False, 'import torch\n'), ((4087, 4112), 'numpy.array', 'np.arr... |
"""
for ssl, use nginx, and get cert as per
https://www.nginx.com/blog/using-free-ssltls-certificates-from-lets-encrypt-with-nginx/
example config
server {
server_name <url to server here>;
client_max_body_size 200M;
## Main site location.
location / {
proxy... | [
"argparse.Namespace",
"mll.turk.webservice.datetime_utils.datetime_to_str",
"aiohttp_cors.resource_options.ResourceOptions",
"mll.turk.webservice.datetime_utils.str_to_datetime",
"random.randint",
"ruamel.yaml.safe_load",
"mll.turk.webservice.datetime_utils.datetime_diff_seconds",
"numpy.random.Random... | [((14626, 14688), 'sqlalchemy.create_engine', 'sqlalchemy.create_engine', (['"""sqlite:///data/turk.db"""'], {'echo': '(False)'}), "('sqlite:///data/turk.db', echo=False)\n", (14650, 14688), False, 'import sqlalchemy\n'), ((14723, 14748), 'sqlalchemy.orm.sessionmaker', 'sessionmaker', ([], {'bind': 'engine'}), '(bind=e... |
#######################################################################
# Copyright (C) 2017 <NAME>(<EMAIL>) #
# Permission given to modify the code as long as you keep this #
# declaration at the top #
##############################################################... | [
"pickle.dump",
"logging.FileHandler",
"numpy.asarray",
"logging.StreamHandler",
"numpy.ones",
"logging.Formatter",
"numpy.mean",
"logging.getLogger"
] | [((458, 485), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (475, 485), False, 'import logging\n'), ((522, 561), 'logging.FileHandler', 'logging.FileHandler', (["('log/%s.txt' % tag)"], {}), "('log/%s.txt' % tag)\n", (541, 561), False, 'import logging\n'), ((594, 617), 'logging.StreamHan... |
import numpy as np
from scipy.signal import convolve
import cv2
import os
def generateDefocusKernel(diameter, kernelSize=33):
"""
Generate a defocus kernel.
:param diameter: Diameter of the actual generated kernel.
:param kernelSize: Overall size of the kernel image in px.
:return: Generated defocu... | [
"numpy.dstack",
"cv2.circle",
"numpy.sum",
"numpy.float32",
"numpy.zeros",
"scipy.signal.convolve"
] | [((493, 537), 'numpy.zeros', 'np.zeros', (['(kernelSize, kernelSize)', 'np.uint8'], {}), '((kernelSize, kernelSize), np.uint8)\n', (501, 537), True, 'import numpy as np\n'), ((542, 629), 'cv2.circle', 'cv2.circle', (['kern', '(kernelSize, kernelSize)', 'diameter', '(255)', '(-1)', 'cv2.LINE_AA'], {'shift': '(1)'}), '(k... |
#
# Copyright (c) 2018 TECHNICAL UNIVERSITY OF MUNICH, DEPARTMENT OF MECHANICAL ENGINEERING, CHAIR OF APPLIED MECHANICS,
# BOLTZMANNSTRASSE 15, 85748 GARCHING/MUNICH, GERMANY, <EMAIL>.
#
# Distributed under 3-Clause BSD license. See LICENSE file for more information.
#
r"""
This module describes different nonholonomic ... | [
"numpy.zeros",
"numpy.cross",
"numpy.ones",
"numpy.hstack",
"numpy.linalg.det",
"numpy.linalg.norm",
"numpy.array",
"numpy.dot",
"numpy.vstack",
"numpy.concatenate"
] | [((10657, 10683), 'numpy.array', 'np.array', (['[1]'], {'dtype': 'float'}), '([1], dtype=float)\n', (10665, 10683), True, 'import numpy as np\n'), ((15100, 15137), 'numpy.array', 'np.array', (['[0.0]'], {'dtype': 'float', 'ndmin': '(1)'}), '([0.0], dtype=float, ndmin=1)\n', (15108, 15137), True, 'import numpy as np\n')... |
"""Provides a class to allow for lazy transposing and slicing operations on h5py datasets and zarr arrays
## Usage:
from lazy_ops import DatasetView
# h5py #
import h5py
dsetview = DatasetView(dataset) # dataset is an instance of h5py.Dataset
view1 = dsetview.lazy_slice[1:40:2,:,0:50:5].lazy_transpose([2,0,1]).lazy_... | [
"numpy.empty",
"h5py.Dataset.__init__"
] | [((16211, 16264), 'numpy.empty', 'np.empty', ([], {'shape': 'reversed_dest_shape', 'dtype': 'dest.dtype'}), '(shape=reversed_dest_shape, dtype=dest.dtype)\n', (16219, 16264), True, 'import numpy as np\n'), ((17188, 17228), 'h5py.Dataset.__init__', 'h5py.Dataset.__init__', (['_self', 'dataset.id'], {}), '(_self, dataset... |
import io
import pytest
import os
import h5py
import tempfile
import warnings
from contextlib import contextmanager
import numpy as np
from numpy.testing import assert_allclose
from numpy.testing import assert_raises
from keras import backend as K
from keras.models import Model, Sequential
from keras.layers import Den... | [
"keras.models.load_model",
"os.remove",
"numpy.abs",
"numpy.ones",
"keras.models.Model",
"pytest.main",
"keras.layers.Input",
"numpy.zeros_like",
"os.path.exists",
"warnings.catch_warnings",
"numpy.testing.assert_allclose",
"keras.losses.MeanSquaredError",
"io.BytesIO",
"h5py.File",
"num... | [((828, 840), 'keras.models.Sequential', 'Sequential', ([], {}), '()\n', (838, 840), False, 'from keras.models import Model, Sequential\n'), ((1179, 1203), 'numpy.random.random', 'np.random.random', (['(1, 3)'], {}), '((1, 3))\n', (1195, 1203), True, 'import numpy as np\n'), ((1212, 1239), 'numpy.random.random', 'np.ra... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.