code stringlengths 31 1.05M | apis list | extract_api stringlengths 97 1.91M |
|---|---|---|
import os
import numpy as np
from PIL import Image
import tensorflow as tf
import matplotlib.pyplot as plt
import logging
import src.util.segment as segment
from src.util.util import intlist2str
def plot(list_img, pred_string):
numb_img = len(list_img)
for i, img in enumerate(list_img):
plt.subplot(str... | [
"matplotlib.pyplot.title",
"numpy.argmax",
"tensorflow.reset_default_graph",
"tensorflow.ConfigProto",
"os.path.join",
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.yticks",
"src.util.segment.Image",
"matplotlib.pyplot.xticks",
"tensorflow.train.get_checkpoint_state",
"matplotlib.pyplot.show",
... | [((498, 537), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO'}), '(level=logging.INFO)\n', (517, 537), False, 'import logging\n'), ((576, 610), 'os.path.join', 'os.path.join', (['DIR_DATASET', '"""image"""'], {}), "(DIR_DATASET, 'image')\n", (588, 610), False, 'import os\n'), ((652, 690), 'o... |
import numpy as np
import logging
from scipy.special import gammaln
from scipy.stats import norm
log = logging.getLogger(__name__)
class numpy_backend(object):
"""NumPy backend for pyhf"""
def __init__(self, **kwargs):
self.name = 'numpy'
def clip(self, tensor_in, min, max):
"""
... | [
"numpy.sum",
"numpy.abs",
"numpy.einsum",
"numpy.ones",
"numpy.clip",
"numpy.product",
"numpy.exp",
"numpy.power",
"numpy.isfinite",
"scipy.stats.norm.cdf",
"numpy.reshape",
"numpy.broadcast_arrays",
"numpy.stack",
"numpy.divide",
"numpy.asarray",
"numpy.concatenate",
"numpy.outer",
... | [((104, 131), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (121, 131), False, 'import logging\n'), ((987, 1015), 'numpy.clip', 'np.clip', (['tensor_in', 'min', 'max'], {}), '(tensor_in, min, max)\n', (994, 1015), True, 'import numpy as np\n'), ((1388, 1422), 'numpy.outer', 'np.outer', (... |
"""
Miscellaneous functions that do not fit anywhere else.
"""
import ast
import asttokens
import numpy as np
from typing import Any, _GenericAlias, Union, Type # type: ignore
from typeguard import check_type
def isinstance_types(obj: Any,
expected: Union[_GenericAlias, Type]) -> bool:
"""... | [
"asttokens.ASTTokens",
"numpy.repeat",
"typeguard.check_type",
"ast.walk"
] | [((2645, 2681), 'asttokens.ASTTokens', 'asttokens.ASTTokens', (['src'], {'parse': '(True)'}), '(src, parse=True)\n', (2664, 2681), False, 'import asttokens\n'), ((2699, 2718), 'ast.walk', 'ast.walk', (['atok.tree'], {}), '(atok.tree)\n', (2707, 2718), False, 'import ast\n'), ((950, 982), 'typeguard.check_type', 'check_... |
from __future__ import (absolute_import, division, print_function)
import os
import pytest
import numpy as np
from lmfit.lineshapes import lorentzian
from qef.models.tabulatedmodel import TabulatedModel
def test_tabulatedmodel():
x_sim = np.arange(-1.0, 1.0, 0.0003) # energy domain, in meV
y_sim = lorentzia... | [
"qef.models.tabulatedmodel.TabulatedModel",
"os.path.abspath",
"numpy.arange",
"lmfit.lineshapes.lorentzian"
] | [((245, 273), 'numpy.arange', 'np.arange', (['(-1.0)', '(1.0)', '(0.0003)'], {}), '(-1.0, 1.0, 0.0003)\n', (254, 273), True, 'import numpy as np\n'), ((311, 364), 'lmfit.lineshapes.lorentzian', 'lorentzian', (['x_sim'], {'amplitude': '(1)', 'center': '(0)', 'sigma': '(0.042)'}), '(x_sim, amplitude=1, center=0, sigma=0.... |
import cvl_labs.lab3 as lab
import matplotlib.pyplot as plt
import numpy as np
from goldStandard import goldStandAlg
from ransac import ransacAlg
roisize = 15
block_size = 5
kernel_size = 5
supress_of_max = 0.01
supress_size = 7
thresh = 1000
img1,img2 = lab.load_stereo_pair()
# interest points for img1
H1 = lab.har... | [
"cvl_labs.lab3.fmatrix_residuals",
"cvl_labs.lab3.joint_min",
"cvl_labs.lab3.harris",
"cvl_labs.lab3.show_corresp",
"matplotlib.pyplot.show",
"goldStandard.goldStandAlg",
"cvl_labs.lab3.cut_out_rois",
"numpy.zeros",
"cvl_labs.lab3.non_max_suppression",
"cvl_labs.lab3.project",
"matplotlib.pyplot... | [((258, 280), 'cvl_labs.lab3.load_stereo_pair', 'lab.load_stereo_pair', ([], {}), '()\n', (278, 280), True, 'import cvl_labs.lab3 as lab\n'), ((313, 354), 'cvl_labs.lab3.harris', 'lab.harris', (['img1', 'block_size', 'kernel_size'], {}), '(img1, block_size, kernel_size)\n', (323, 354), True, 'import cvl_labs.lab3 as la... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This is a sciprt for unit cell optimization using VASP
from os import system, chdir
from numpy import linspace
nodes=24
POSCAR = open('POSCAR_initial','r').readlines() # Read POSCAR
with open("worklist", "w+") as w:
w.write("label ax ay az bx ... | [
"os.system",
"numpy.linspace",
"os.chdir"
] | [((1903, 1966), 'os.system', 'system', (["('yhbatch -n %d -p TH_NET1 -J wyt.opt ./run.sh ' % nodes)"], {}), "('yhbatch -n %d -p TH_NET1 -J wyt.opt ./run.sh ' % nodes)\n", (1909, 1966), False, 'from os import system, chdir\n'), ((463, 486), 'numpy.linspace', 'linspace', (['(4.57)', '(4.59)', '(3)'], {}), '(4.57, 4.59, 3... |
import argparse
import json
import os
from os.path import join
from data import CelebA
import torch
import torch.utils.data as data
import torchvision.utils as vutils
import numpy as np
import cv2
from attgan import AttGAN
from data import check_attribute_conflict
import torch.nn.functional as F
def pa... | [
"attgan.AttGAN",
"argparse.Namespace",
"numpy.uint8",
"os.makedirs",
"torch.utils.data.DataLoader",
"argparse.ArgumentParser",
"torch.cat",
"data.CelebA",
"data.check_attribute_conflict",
"numpy.append",
"cv2.applyColorMap",
"torch.nn.functional.interpolate",
"torch.no_grad",
"os.path.join... | [((1434, 1509), 'data.CelebA', 'CelebA', (['args.data_path', 'args.attr_path', 'args.img_size', '"""mytest"""', 'args.attrs'], {}), "(args.data_path, args.attr_path, args.img_size, 'mytest', args.attrs)\n", (1440, 1509), False, 'from data import CelebA\n'), ((1529, 1638), 'torch.utils.data.DataLoader', 'data.DataLoader... |
import os
import functools
import numpy as np
import torch.multiprocessing as mp
from pyblaze.utils.stdmp import terminate
class Vectorizer:
"""
The Vectorizer class ought to be used in cases where a result tensor of size N is filled with
values computed in some complex way. The computation of these N comp... | [
"functools.partial",
"pyblaze.utils.stdmp.terminate",
"os.cpu_count",
"torch.multiprocessing.Event",
"numpy.arange",
"torch.multiprocessing.Process",
"torch.multiprocessing.Queue"
] | [((3505, 3515), 'torch.multiprocessing.Event', 'mp.Event', ([], {}), '()\n', (3513, 3515), True, 'import torch.multiprocessing as mp\n'), ((4180, 4238), 'functools.partial', 'functools.partial', (['self._shutdown_batches', 'processes', 'done'], {}), '(self._shutdown_batches, processes, done)\n', (4197, 4238), False, 'i... |
import numpy as np
from PIL import Image
from io import BytesIO
import logging
logger = logging.getLogger(__name__)
logging.getLogger("PIL").setLevel(logging.WARNING)
logging.getLogger("numpy").setLevel(logging.WARNING)
def chunks(l, n):
# generator of chunks of size l for a iterable n
for i in range(0, len(... | [
"io.BytesIO",
"numpy.sum",
"numpy.asarray",
"numpy.zeros",
"logging.getLogger",
"numpy.hstack",
"PIL.Image.fromarray",
"numpy.vstack"
] | [((89, 116), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (106, 116), False, 'import logging\n'), ((1463, 1490), 'numpy.vstack', 'np.vstack', (['list_comb_arrays'], {}), '(list_comb_arrays)\n', (1472, 1490), True, 'import numpy as np\n'), ((1507, 1533), 'PIL.Image.fromarray', 'Image.fro... |
# coding=utf8
import numpy as np
def bbreg(bbox):
'''
Refine bounding box
:param bbox:
:return:
'''
height = bbox[:, 2:3] - bbox[:, 0:1] + 1
width = bbox[:, 3:4] - bbox[:, 1:2] + 1
bbox[:, 0:4] = np.round(
bbox[:, 0:4] + bbox[:, 5:9] *
np.concatenate((height, width, hei... | [
"numpy.concatenate"
] | [((286, 340), 'numpy.concatenate', 'np.concatenate', (['(height, width, height, width)'], {'axis': '(1)'}), '((height, width, height, width), axis=1)\n', (300, 340), True, 'import numpy as np\n')] |
import matplotlib.pyplot as plt
import numpy as np
import csv
from snakeGame.screen import Screen
from learningModels.process import LearningProcess, compute_avg_return, points_history
from learningModels.typesSnakeGame import SnakeAI, SnakeAIBorders
from learningModels.GameEnv import SnakeGameEnv
from uti... | [
"learningModels.GameEnv.SnakeGameEnv",
"numpy.matrix",
"learningModels.process.points_history",
"snakeGame.screen.Screen",
"learningModels.process.LearningProcess",
"matplotlib.pyplot.show",
"csv.writer",
"csv.reader",
"numpy.ravel",
"learningModels.typesSnakeGame.SnakeAI",
"numpy.transpose",
... | [((386, 403), 'learningModels.typesSnakeGame.SnakeAI', 'SnakeAI', (['[30, 30]'], {}), '([30, 30])\n', (393, 403), False, 'from learningModels.typesSnakeGame import SnakeAI, SnakeAIBorders\n'), ((428, 453), 'learningModels.GameEnv.SnakeGameEnv', 'SnakeGameEnv', (['snake', '(-100)'], {}), '(snake, -100)\n', (440, 453), F... |
import numpy as np
# Generate data (Static, i.i.d.)
def dgp_static_iid(n, b, m):
'''
Function to generate static i.i.d. data.
Inputs:
n (int): The sample size.
b (list): The parameters to the generation function.
m (int): The number of variables to generate.
'''
... | [
"numpy.random.uniform",
"numpy.empty",
"numpy.append",
"numpy.random.normal",
"numpy.concatenate"
] | [((326, 357), 'numpy.random.uniform', 'np.random.uniform', (['(0)', '(1)', '(m, n)'], {}), '(0, 1, (m, n))\n', (343, 357), True, 'import numpy as np\n'), ((367, 394), 'numpy.random.normal', 'np.random.normal', (['(0)', '(0.5)', 'n'], {}), '(0, 0.5, n)\n', (383, 394), True, 'import numpy as np\n'), ((542, 573), 'numpy.c... |
"""
Copyright (c) 2018 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... | [
"numpy.size",
"numpy.isnan",
"numpy.shape",
"pathlib.Path",
"numpy.array",
"os.strerror",
"itertools.chain"
] | [((759, 782), 'itertools.chain', 'itertools.chain', (['*lists'], {}), '(*lists)\n', (774, 782), False, 'import itertools\n'), ((5412, 5427), 'numpy.isnan', 'np.isnan', (['value'], {}), '(value)\n', (5420, 5427), True, 'import numpy as np\n'), ((5771, 5790), 'numpy.shape', 'np.shape', (['container'], {}), '(container)\n... |
import numpy as np
def func(x1, x2):
return 0.75 * np.exp(-(9 * x1-2) ** 2 / 4 - (9 * x2-2) ** 2 / 4) + 0.75 * np.exp(
-(9 * x1 + 1) ** 2 / 49 - (9 * x2 + 1) / 10) + \
0.5 * np.exp(-(9 * x1 - 7) ** 2 / 4 - (9 * x2 - 3) ** 2 / 4) - 0.2 * np.exp(
-(9 * x1 - 4) ** 2 - (9 * x2 - 7) ** 2)
| [
"numpy.exp"
] | [((262, 308), 'numpy.exp', 'np.exp', (['(-(9 * x1 - 4) ** 2 - (9 * x2 - 7) ** 2)'], {}), '(-(9 * x1 - 4) ** 2 - (9 * x2 - 7) ** 2)\n', (268, 308), True, 'import numpy as np\n'), ((199, 253), 'numpy.exp', 'np.exp', (['(-(9 * x1 - 7) ** 2 / 4 - (9 * x2 - 3) ** 2 / 4)'], {}), '(-(9 * x1 - 7) ** 2 / 4 - (9 * x2 - 3) ** 2 /... |
from sklearn import datasets
import numpy
n_samples = 100
centers = [[1, 1], [-1, -1], [1, -1]]
X, labels = datasets.make_blobs(n_samples=n_samples, centers=centers, cluster_std=0.4, random_state=0)
numpy.savetxt("./train.mat", X, fmt="%.3f", delimiter=" ")
numpy.savetxt("./train.label", labels, fmt="%.0f", delimiter=... | [
"numpy.savetxt",
"sklearn.datasets.make_blobs"
] | [((109, 203), 'sklearn.datasets.make_blobs', 'datasets.make_blobs', ([], {'n_samples': 'n_samples', 'centers': 'centers', 'cluster_std': '(0.4)', 'random_state': '(0)'}), '(n_samples=n_samples, centers=centers, cluster_std=0.4,\n random_state=0)\n', (128, 203), False, 'from sklearn import datasets\n'), ((200, 258), ... |
import os
import numpy as np
import tensorflow as tf
import pandas as pd
import matplotlib.pyplot as plt
import sys
#You have freedom of using eager execution in tensorflow
plt.rcParams['figure.figsize'] = (10.0, 8.0) # set default size of plots
plt.rcParams['image.interpolation'] = 'nearest'
plt.rcParams['image.c... | [
"matplotlib.pyplot.title",
"numpy.random.seed",
"numpy.argmax",
"pandas.read_csv",
"matplotlib.pyplot.figure",
"numpy.mean",
"matplotlib.pyplot.contourf",
"numpy.arange",
"tensorflow.cast",
"tensorflow.exp",
"matplotlib.pyplot.show",
"tensorflow.random.normal",
"tensorflow.constant",
"tens... | [((2747, 2771), 'numpy.random.seed', 'np.random.seed', (['(21131186)'], {}), '(21131186)\n', (2761, 2771), True, 'import numpy as np\n'), ((2889, 2919), 'pandas.read_csv', 'pd.read_csv', (['path'], {'header': 'None'}), '(path, header=None)\n', (2900, 2919), True, 'import pandas as pd\n'), ((3101, 3119), 'numpy.array', ... |
import nibabel as nib
import os
import numpy as np
import random
import argparse
import cv2
from scipy import ndimage
from skimage import measure
from matplotlib import pyplot as plt
import SimpleITK as sitk
def volume_registration(fixed_image, moving_image, mask=None):
fixed_image = sitk.GetImageFromArray(fixed... | [
"os.mkdir",
"numpy.random.seed",
"numpy.sum",
"random.shuffle",
"numpy.ones",
"numpy.argsort",
"SimpleITK.ImageRegistrationMethod",
"skimage.measure.label",
"numpy.mean",
"numpy.arange",
"SimpleITK.Cast",
"skimage.measure.regionprops",
"cv2.imwrite",
"SimpleITK.GetArrayFromImage",
"numpy... | [((4429, 4447), 'numpy.random.seed', 'np.random.seed', (['(42)'], {}), '(42)\n', (4443, 4447), True, 'import numpy as np\n'), ((4448, 4463), 'random.seed', 'random.seed', (['(42)'], {}), '(42)\n', (4459, 4463), False, 'import random\n'), ((4625, 4643), 'numpy.array', 'np.array', (['[50, 25]'], {}), '([50, 25])\n', (463... |
"""
Write flow file
According to the matlab code of Deqing Sun and c++ source code of <NAME>
Contact: <EMAIL>
Contact: <EMAIL>
Updated to python3.7 etc. by <NAME>
Contact: <EMAIL>
Original author: <NAME>, Technical University Munich
Contact: <EMAIL>
For more information, check http://vision.middlebury.edu/flow/
"""
f... | [
"numpy.array",
"numpy.zeros",
"numpy.arange"
] | [((1045, 1079), 'numpy.zeros', 'np.zeros', (['(height, width * nBands)'], {}), '((height, width * nBands))\n', (1053, 1079), True, 'import numpy as np\n'), ((1086, 1102), 'numpy.arange', 'np.arange', (['width'], {}), '(width)\n', (1095, 1102), True, 'import numpy as np\n'), ((942, 957), 'numpy.array', 'np.array', (['wi... |
import numpy as np
from mushroom.algorithms.policy_search import *
from mushroom.approximators import Regressor
from mushroom.approximators.parametric import LinearApproximator
from mushroom.core import Core
from mushroom.environments.lqr import LQR
from mushroom.policy.gaussian_policy import StateStdGaussianPolicy
fr... | [
"mushroom.core.Core",
"mushroom.utils.parameters.AdaptiveParameter",
"numpy.ones",
"mushroom.approximators.Regressor",
"mushroom.environments.lqr.LQR.generate",
"numpy.arange",
"numpy.array",
"mushroom.policy.gaussian_policy.StateStdGaussianPolicy"
] | [((381, 407), 'mushroom.environments.lqr.LQR.generate', 'LQR.generate', ([], {'dimensions': '(1)'}), '(dimensions=1)\n', (393, 407), False, 'from mushroom.environments.lqr import LQR\n'), ((495, 644), 'mushroom.approximators.Regressor', 'Regressor', (['LinearApproximator'], {'input_shape': 'mdp.info.observation_space.s... |
import os.path as op
import numpy as np
import PIL
from PIL import Image
import json
from utils.util_class import MyExceptionToCatch
from tfrecords.readers.reader_base import DataReaderBase
from tfrecords.tfr_util import resize_depth_map, depth_map_to_point_cloud
# pre-crop range to remove vehicle and blurred region ... | [
"config.opts.get_raw_data_path",
"tensorflow.linalg.inv",
"numpy.mean",
"tfrecords.tfr_util.depth_map_to_point_cloud",
"cv2.imshow",
"os.path.join",
"json.loads",
"cv2.cvtColor",
"tensorflow.concat",
"config.opts.get_img_shape",
"utils.util_funcs.to_uint8_image",
"tfrecords.tfr_util.resize_dep... | [((7063, 7092), 'zipfile.ZipFile', 'zipfile.ZipFile', (['srcfile', '"""r"""'], {}), "(srcfile, 'r')\n", (7078, 7092), False, 'import zipfile\n'), ((9328, 9376), 'os.path.join', 'op.join', (['opts.DATAPATH_TFR', '"""cityscapes_train__"""'], {}), "(opts.DATAPATH_TFR, 'cityscapes_train__')\n", (9335, 9376), True, 'import ... |
import logging
import pickle
from argparse import ArgumentParser
from collections import defaultdict
from functools import partial
from pathlib import Path
from typing import List, Tuple, Callable, Optional, Dict, Union
import joblib
import numpy as np
import optuna
import pandas as pd
from tqdm import tqdm
from mila... | [
"functools.partial",
"pickle.dump",
"tqdm.tqdm",
"logging.debug",
"argparse.ArgumentParser",
"pandas.DataFrame.from_dict",
"optuna.create_study",
"collections.defaultdict",
"logging.info",
"pathlib.Path",
"numpy.apply_along_axis",
"numpy.mean",
"numpy.array",
"numpy.vstack"
] | [((19564, 19580), 'argparse.ArgumentParser', 'ArgumentParser', ([], {}), '()\n', (19578, 19580), False, 'from argparse import ArgumentParser\n'), ((4637, 4715), 'logging.info', 'logging.info', (['"""============================ Best ============================"""'], {}), "('============================ Best ==========... |
# -*- coding: utf-8 -*-
"""
Coursework 1: Linear regression
"""
import numpy as np
from pandas.io.parsers import read_csv
from matplotlib import cm
import matplotlib.pyplot as plt
# Download data
def carga_csv(file_name):
valores=read_csv(file_name,header=None).values
return valores.astype(float)
# Normal eq... | [
"numpy.abs",
"numpy.logspace",
"numpy.ones",
"numpy.shape",
"matplotlib.pyplot.figure",
"numpy.mean",
"numpy.arange",
"numpy.linalg.norm",
"numpy.linalg.pinv",
"numpy.meshgrid",
"numpy.std",
"numpy.transpose",
"numpy.linspace",
"matplotlib.pyplot.legend",
"numpy.hstack",
"numpy.dot",
... | [((1817, 1839), 'numpy.linspace', 'np.linspace', (['(0)', '(23)', '(23)'], {}), '(0, 23, 23)\n', (1828, 1839), True, 'import numpy as np\n'), ((1838, 1867), 'matplotlib.pyplot.scatter', 'plt.scatter', (['X[:, 1]', 'Y'], {'s': '(15)'}), '(X[:, 1], Y, s=15)\n', (1849, 1867), True, 'import matplotlib.pyplot as plt\n'), ((... |
from pyitab.io.loader import DataLoader
from pyitab.analysis.linear_model import LinearModel
from pyitab.preprocessing.pipelines import PreprocessingPipeline
from pyitab.preprocessing.normalizers import FeatureZNormalizer, SampleZNormalizer
from pyitab.preprocessing.functions import SampleAttributeTransformer, Target... | [
"pyitab.preprocessing.functions.SampleAttributeTransformer",
"numpy.zeros_like",
"warnings.filterwarnings",
"numpy.isnan",
"sklearn.linear_model.LinearRegression",
"pyitab.preprocessing.slicers.FeatureSlicer",
"pyitab.preprocessing.pipelines.PreprocessingPipeline",
"pyitab.io.loader.DataLoader",
"py... | [((725, 758), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (748, 758), False, 'import warnings\n'), ((880, 1141), 'pyitab.io.loader.DataLoader', 'DataLoader', ([], {'configuration_file': 'conf_file', 'data_path': 'data_path', 'subjects': '"""/media/robbis/DATA/meg/vivian... |
import numpy as np
from multiprocessing import Pool, Queue, Lock, Process
from scipy import ndimage
import time
import os
import urllib
from tqdm import tqdm
import tarfile
import gzip
import zipfile
def as_tuple(x, N, t=None):
"""
Coerce a value to a tuple of given length (and possibly given type).
Par... | [
"numpy.abs",
"multiprocessing.Lock",
"numpy.empty",
"numpy.greater",
"multiprocessing.Queue",
"os.path.join",
"matplotlib.colors.LinearSegmentedColormap.from_list",
"numpy.meshgrid",
"os.path.exists",
"numpy.random.RandomState",
"tarfile.open",
"numpy.roll",
"numpy.asarray",
"urllib.reques... | [((1733, 1796), 'matplotlib.colors.LinearSegmentedColormap.from_list', 'matplotlib.colors.LinearSegmentedColormap.from_list', (['""""""', 'tuples'], {}), "('', tuples)\n", (1784, 1796), False, 'import matplotlib\n'), ((2413, 2464), 'numpy.empty', 'np.empty', (['(x.shape[:-1] + (n_windows, window_length))'], {}), '(x.sh... |
import numpy as np
from sklearn import preprocessing
# Example labels
labels = np.array([1, 5, 3, 2, 1, 4, 2, 1, 3])
# Create the encoder
lb = preprocessing.LabelBinarizer()
# Here the encoder finds the classes and assigns one-hot vectors
lb.fit(labels)
# And finally, transform the labels into one-hot encoded vecto... | [
"sklearn.preprocessing.LabelBinarizer",
"numpy.array"
] | [((80, 117), 'numpy.array', 'np.array', (['[1, 5, 3, 2, 1, 4, 2, 1, 3]'], {}), '([1, 5, 3, 2, 1, 4, 2, 1, 3])\n', (88, 117), True, 'import numpy as np\n'), ((145, 175), 'sklearn.preprocessing.LabelBinarizer', 'preprocessing.LabelBinarizer', ([], {}), '()\n', (173, 175), False, 'from sklearn import preprocessing\n')] |
"""
Making 15s utterances for 1s i-vec blstm training, 5s and 15s for evaluation.
Procedure: Sample 15s from large files in the ratio of number of files for each class to make the data-set balanced.
"""
from collections import Counter
from os.path import join
from tqdm import tqdm
import config.blstm_config as... | [
"numpy.random.choice",
"numpy.load",
"numpy.genfromtxt",
"numpy.array",
"multiprocessing.Pool",
"collections.Counter",
"numpy.delete"
] | [((903, 941), 'numpy.genfromtxt', 'np.genfromtxt', (['one_sec_list'], {'dtype': 'str'}), '(one_sec_list, dtype=str)\n', (916, 941), True, 'import numpy as np\n'), ((2223, 2243), 'collections.Counter', 'Counter', (['full_labels'], {}), '(full_labels)\n', (2230, 2243), False, 'from collections import Counter\n'), ((2360,... |
# LICENSE
#
# _This file is Copyright 2018 by the Image Processing and Analysis Group (BioImage Suite Team). Dept. of Radiology & Biomedical Imaging, Yale School of Medicine._
#
# BioImage Suite Web is licensed under the Apache License, Version 2.0 (the "License");
#
# - you may not use this software except in compl... | [
"biswebpython.core.bis_objects.bisImage",
"numpy.transpose",
"numpy.zeros",
"numpy.expand_dims",
"biswebpython.core.bis_baseutils.getImageToImageOutputs",
"biswebpython.core.bis_baseutils.getDebugParam",
"biswebpython.core.bis_objects.bisMatrix",
"numpy.squeeze",
"numpy.random.random_integers"
] | [((5075, 5117), 'numpy.zeros', 'np.zeros', (['(num_patches, 4)'], {'dtype': 'np.int32'}), '((num_patches, 4), dtype=np.int32)\n', (5083, 5117), True, 'import numpy as np\n'), ((7548, 7590), 'numpy.zeros', 'np.zeros', (['(num_patches, 4)'], {'dtype': 'np.int32'}), '((num_patches, 4), dtype=np.int32)\n', (7556, 7590), Tr... |
from __future__ import division
import numpy as np
import tensorflow as tf
from SIDLoader import SIDLoader
from ModelBuilder import ModelBuilder
from Experiment import Experiment
import time,datetime,os,glob
path_prefix = '.'
checkpoint_dir = path_prefix+'/chk'
dataset_dir = path_prefix+'/dataset'
black_level = 512
se... | [
"SIDLoader.SIDLoader",
"Experiment.Experiment",
"numpy.random.seed"
] | [((394, 414), 'numpy.random.seed', 'np.random.seed', (['seed'], {}), '(seed)\n', (408, 414), True, 'import numpy as np\n'), ((443, 530), 'SIDLoader.SIDLoader', 'SIDLoader', (['dataset_dir'], {'patch_fn': 'None', 'keep_raw': '(False)', 'keep_gt': '(True)', 'set_id': '"""test"""'}), "(dataset_dir, patch_fn=None, keep_raw... |
import string
from scipy.special import comb
from scipy.stats import chi2
import numpy as np
from collections import Counter
import math
import textwrap
import pandas as pd
def bits_test(s: list):
ones = s.count('1')
if 9725 < ones < 10275:
print(f"BITS TEST: PASSED, Value of test {ones}")
else:
... | [
"scipy.stats.chi2.isf",
"textwrap.wrap",
"scipy.special.comb",
"numpy.arange",
"collections.Counter"
] | [((2105, 2124), 'textwrap.wrap', 'textwrap.wrap', (['s', '(4)'], {}), '(s, 4)\n', (2118, 2124), False, 'import textwrap\n'), ((2945, 2960), 'numpy.arange', 'np.arange', (['(0)', 'k'], {}), '(0, k)\n', (2954, 2960), True, 'import numpy as np\n'), ((3265, 3275), 'collections.Counter', 'Counter', (['n'], {}), '(n)\n', (32... |
from os import path
import keras
import numpy as np
import pyvips
from keras.applications.xception import Xception
from keras.layers import *
from keras.models import Model
from keras.utils import Sequence
from keras.utils import plot_model
from sklearn.preprocessing import OneHotEncoder
class PaintingModel:
"""... | [
"keras.applications.xception.Xception",
"sklearn.preprocessing.OneHotEncoder",
"numpy.zeros",
"keras.models.Model",
"keras.utils.plot_model",
"numpy.array",
"os.path.join",
"numpy.repeat"
] | [((860, 907), 'keras.applications.xception.Xception', 'Xception', ([], {'include_top': '(False)', 'weights': '"""imagenet"""'}), "(include_top=False, weights='imagenet')\n", (868, 907), False, 'from keras.applications.xception import Xception\n'), ((1324, 1402), 'keras.models.Model', 'Model', ([], {'inputs': 'base_mode... |
from __future__ import annotations
from typing import Tuple, NoReturn
import numpy as np
from itertools import product
from IMLearn import BaseEstimator
class DecisionStump(BaseEstimator):
"""
A decision stump classifier for {-1,1} labels according to the CART algorithm
Attributes
----------
sel... | [
"numpy.full",
"numpy.absolute",
"numpy.abs",
"numpy.where",
"numpy.sign"
] | [((2479, 2545), 'numpy.where', 'np.where', (['(X[:, self.j_] < self.threshold_)', '(-self.sign_)', 'self.sign_'], {}), '(X[:, self.j_] < self.threshold_, -self.sign_, self.sign_)\n', (2487, 2545), True, 'import numpy as np\n'), ((3871, 3921), 'numpy.full', 'np.full', ([], {'shape': '(values.shape[0],)', 'fill_value': '... |
'''
Run Gene Set Enrichment Analysis for each node.
Operons are used as gene sets and the weight
vector connect genes to a node is used as ranked
gene list.
'''
import sys
sys.path.insert(0,'Data_collection_processing/')
from pcl import PCLfile
import numpy
import os
def read_weight_matrix(data_file, network_file):
... | [
"pcl.PCLfile",
"os.system",
"numpy.array",
"sys.path.insert"
] | [((174, 223), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""Data_collection_processing/"""'], {}), "(0, 'Data_collection_processing/')\n", (189, 223), False, 'import sys\n'), ((466, 496), 'pcl.PCLfile', 'PCLfile', (['data_file'], {'skip_col': '(0)'}), '(data_file, skip_col=0)\n', (473, 496), False, 'from pcl impor... |
'''
beta_NMF.py
'''
import time
import numpy as np
import tensorflow as tf
from librosa import load, stft, istft
from librosa.output import write_wav
class beta_NMF(object):
"""docstring for beta_NMF"""
def __init__(self, frequencies, time_steps, sources):
super(beta_NMF, self).__init__()
self... | [
"numpy.abs",
"tensorflow.summary.audio",
"tensorflow.reshape",
"numpy.ones",
"tensorflow.matmul",
"tensorflow.placeholder",
"tensorflow.summary.histogram",
"tensorflow.summary.FileWriter",
"tensorflow.name_scope",
"librosa.stft",
"tensorflow.summary.merge_all",
"tensorflow.summary.scalar",
"... | [((3786, 3880), 'librosa.load', 'load', (['"""/home/tinus/Workspace/tensorflow_ws/Source_separation/NMF/H_T_200Mic1NNE.wav"""'], {}), "(\n '/home/tinus/Workspace/tensorflow_ws/Source_separation/NMF/H_T_200Mic1NNE.wav'\n )\n", (3790, 3880), False, 'from librosa import load, stft, istft\n'), ((3879, 3930), 'librosa... |
from unittest import TestCase
import numpy as np
import sketch.pps_quant
from storyboard.query_cy import CDFSketch
class TestPPSQuantSketch(TestCase):
def test_tiny(self):
np.random.seed(0)
xs1 = np.linspace(0,1,1000)
xs2 = np.linspace(1,2,1000)
gk = sketch.pps_quant.PPSQuantSketc... | [
"numpy.random.seed",
"numpy.linspace"
] | [((187, 204), 'numpy.random.seed', 'np.random.seed', (['(0)'], {}), '(0)\n', (201, 204), True, 'import numpy as np\n'), ((219, 242), 'numpy.linspace', 'np.linspace', (['(0)', '(1)', '(1000)'], {}), '(0, 1, 1000)\n', (230, 242), True, 'import numpy as np\n'), ((255, 278), 'numpy.linspace', 'np.linspace', (['(1)', '(2)',... |
# import what you need
import cv2
import numpy as np
import skimage.feature
import skimage.measure
import matplotlib.pyplot as plt
from Application.Frame.global_variables import JobInitStateReturn
from Application.Frame.transferJobPorts import get_port_from_wave
from Utils.log_handler import log_to_console, l... | [
"Application.Config.util.get_module_name_from_file",
"Application.Config.util.transform_port_size_lvl",
"config_main.PYRAMID_LEVEL.add_level",
"Utils.log_handler.log_to_file",
"Application.Frame.transferJobPorts.get_port_from_wave",
"Application.Config.create_config.jobs_dict.append",
"Application.Confi... | [((2789, 2813), 'Application.Frame.global_variables.JobInitStateReturn', 'JobInitStateReturn', (['(True)'], {}), '(True)\n', (2807, 2813), False, 'from Application.Frame.global_variables import JobInitStateReturn\n'), ((12605, 12661), 'Application.Config.util.transform_port_name_lvl', 'transform_port_name_lvl', ([], {'... |
from numpy import zeros, int8, log
from pylab import random
import sys
import jieba
import re
import time
import codecs
# segmentation, stopwords filtering and document-word matrix generating
# [return]:
# N : number of documents
# M : length of dictionary
# word2id : a map mapping terms to their corresponding ids
# i... | [
"codecs.open",
"numpy.log",
"jieba.cut",
"numpy.zeros",
"time.time",
"pylab.random",
"re.search"
] | [((5902, 5916), 'pylab.random', 'random', (['[N, K]'], {}), '([N, K])\n', (5908, 5916), False, 'from pylab import random\n'), ((5951, 5965), 'pylab.random', 'random', (['[K, M]'], {}), '([K, M])\n', (5957, 5965), False, 'from pylab import random\n'), ((5998, 6014), 'numpy.zeros', 'zeros', (['[N, M, K]'], {}), '([N, M, ... |
######################################################################
# (c) Copyright EFC of NICS, Tsinghua University. All rights reserved.
# Author: <NAME>
# Email : <EMAIL>
#
# Create Date : 2020.08.16
# File Name : read_results.py
# Description : read the config of train and test accuracy data from
# ... | [
"pandas.DataFrame",
"os.mkdir",
"h5py.File",
"numpy.abs",
"argparse.ArgumentParser",
"matplotlib.pyplot.hist",
"matplotlib.pyplot.clf",
"numpy.log2",
"os.path.exists",
"matplotlib.pyplot.figure",
"numpy.where",
"pandas.concat",
"os.path.join",
"os.listdir",
"matplotlib.pyplot.savefig"
] | [((6778, 6802), 'h5py.File', 'h5py.File', (['filename', '"""r"""'], {}), "(filename, 'r')\n", (6787, 6802), False, 'import h5py\n'), ((8370, 8395), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (8393, 8395), False, 'import argparse\n'), ((9775, 9791), 'os.listdir', 'os.listdir', (['"""./"""'],... |
import glob
import math
import os
import numpy as np
import torch
import torch.nn as nn
import sys
import paho.mqtt.client as mqtt
torch.backends.cudnn.benchmark = True
current_path = os.path.dirname(os.path.realpath(__file__))
PROJECT_HOME = os.path.abspath(os.path.join(current_path, os.pardir, os.pardir, os.pardir,... | [
"sys.path.append",
"os.remove",
"os.path.realpath",
"numpy.convolve",
"math.floor",
"numpy.asarray",
"sys.stdout.flush",
"numpy.linspace",
"paho.mqtt.client.Client",
"sys.stderr.flush",
"os.path.join",
"sys.exit"
] | [((202, 228), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (218, 228), False, 'import os\n'), ((261, 331), 'os.path.join', 'os.path.join', (['current_path', 'os.pardir', 'os.pardir', 'os.pardir', 'os.pardir'], {}), '(current_path, os.pardir, os.pardir, os.pardir, os.pardir)\n', (273, 331)... |
"""
Utility functions for various tasks.
"""
from warnings import warn
from json import JSONEncoder
from typing import List
from math import inf
import numpy as np
def get_random_velocities(noa: int, temperature: float, mass: float):
"""Draw velocities from the Maxwell-Boltzmann distribution, assuming a
fixe... | [
"numpy.sum",
"numpy.zeros",
"numpy.array",
"numpy.random.normal",
"numpy.sqrt"
] | [((770, 805), 'numpy.sqrt', 'np.sqrt', (['(kb * temperature / mass_md)'], {}), '(kb * temperature / mass_md)\n', (777, 805), True, 'import numpy as np\n'), ((823, 865), 'numpy.random.normal', 'np.random.normal', ([], {'scale': 'std', 'size': '(noa, 3)'}), '(scale=std, size=(noa, 3))\n', (839, 865), True, 'import numpy ... |
#!/usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt
import scipy.special, scipy.interpolate, scipy.integrate
import scipy.optimize
from scipy import special
plt.ion()
binprec = '>f4'
#% ================ CONST =========================================
H = -500 ... | [
"numpy.meshgrid",
"numpy.arctan2",
"numpy.floor",
"numpy.ones",
"matplotlib.pyplot.ion",
"numpy.where",
"numpy.sin",
"numpy.exp",
"numpy.linspace",
"numpy.cos",
"numpy.diff",
"numpy.arange",
"numpy.gradient",
"numpy.sqrt"
] | [((180, 189), 'matplotlib.pyplot.ion', 'plt.ion', ([], {}), '()\n', (187, 189), True, 'import matplotlib.pyplot as plt\n'), ((785, 803), 'numpy.floor', 'np.floor', (['(si_x / 2)'], {}), '(si_x / 2)\n', (793, 803), True, 'import numpy as np\n'), ((818, 836), 'numpy.floor', 'np.floor', (['(si_y / 2)'], {}), '(si_y / 2)\n... |
import re
import os
import time
import sys
import data_parser
from gensim.models import KeyedVectors
from pg_model import PolicyGradientDialogue
import tensorflow as tf
import numpy as np
from convert_checkpoint import convert_checkpoint
default_model_path = 'model/model-56-3000/model-56-3000' #Path to Trained model... | [
"convert_checkpoint.convert_checkpoint",
"tensorflow.train.Saver",
"tensorflow.reset_default_graph",
"numpy.zeros",
"numpy.where",
"numpy.array",
"gensim.models.KeyedVectors.load_word2vec_format",
"data_parser.refine",
"tensorflow.InteractiveSession",
"numpy.random.normal",
"data_parser.preProBu... | [((763, 787), 'tensorflow.reset_default_graph', 'tf.reset_default_graph', ([], {}), '()\n', (785, 787), True, 'import tensorflow as tf\n'), ((799, 822), 'tensorflow.InteractiveSession', 'tf.InteractiveSession', ([], {}), '()\n', (820, 822), True, 'import tensorflow as tf\n'), ((963, 1034), 'gensim.models.KeyedVectors.l... |
# !/usr/bin/env python3
# -*- coding:utf-8 -*-
#
# Author: <NAME> - <EMAIL>
# Blog: zhouyichu.com
#
# Python release: 3.6.0
#
# Date: 2020-02-18 11:05:08
# Last modified: 2021-04-08 09:31:29
"""
Applying the probing process.
"""
import logging
from typing import Tuple
import torch
import numpy as np
from tqdm import... | [
"tqdm.tqdm",
"numpy.copy",
"torch.nonzero",
"numpy.array",
"directprobe.space.Space",
"directprobe.clusters.Cluster.merge",
"logging.getLogger",
"directprobe.distanceQ.DistanceQ"
] | [((497, 524), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (514, 524), False, 'import logging\n'), ((1061, 1078), 'directprobe.space.Space', 'Space', (['self._args'], {}), '(self._args)\n', (1066, 1078), False, 'from directprobe.space import Space\n'), ((2905, 2921), 'numpy.array', 'np.... |
# -*- coding: utf-8 -*-
"""
MIT License
Copyright (c) 2020 <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 limitation the rights
to use, copy, modify,... | [
"scripts.approx_distortion.estimateReprojectionErrorDistortion",
"scripts.normalise_coorespondances.normalize_points",
"scripts.camera_extrinsic_param.estimateExtrinsicParams",
"scripts.homography_refined.h_refined",
"scripts.visualisation.visualize_pts",
"numpy.array",
"scripts.homography.compute_view_... | [((1895, 1944), 'scripts.chess_board_corners.getChessboardCorners', 'getChessboardCorners', ([], {'images': 'None', 'visualize': '(True)'}), '(images=None, visualize=True)\n', (1915, 1944), False, 'from scripts.chess_board_corners import getChessboardCorners\n'), ((2065, 2109), 'scripts.normalise_coorespondances.normal... |
#
# Copyright (c) 2020 Saarland University.
#
# This file is part of AM Parser
# (see https://github.com/coli-saar/am-parser/).
#
# 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://... | [
"allennlp.data.iterators.data_iterator.DataIterator.register",
"numpy.sum",
"allennlp.common.util.is_lazy",
"math.ceil",
"collections.defaultdict",
"allennlp.data.iterators.BucketIterator",
"logging.getLogger"
] | [((1183, 1210), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1200, 1210), False, 'import logging\n'), ((1498, 1537), 'allennlp.data.iterators.data_iterator.DataIterator.register', 'DataIterator.register', (['"""same_formalism"""'], {}), "('same_formalism')\n", (1519, 1537), False, 'fro... |
import glob
import igraph as gr
import numpy as np
import pandas as pd
from functools import wraps
import time
def timefn(fn):
"""wrapper to time the enclosed function"""
@wraps(fn)
def measure_time(*args, **kwargs):
t1 = time.time()
result = fn(*args, **kwargs)
t2 = time.time()... | [
"pandas.DataFrame",
"igraph.Graph.vcount",
"pandas.DataFrame.from_dict",
"igraph.Graph.decompose",
"numpy.median",
"pandas.read_csv",
"time.time",
"igraph.Graph.ecount",
"functools.wraps",
"glob.glob",
"pandas.concat"
] | [((185, 194), 'functools.wraps', 'wraps', (['fn'], {}), '(fn)\n', (190, 194), False, 'from functools import wraps\n'), ((2759, 2785), 'glob.glob', 'glob.glob', (['search_criteria'], {}), '(search_criteria)\n', (2768, 2785), False, 'import glob\n'), ((8007, 8045), 'igraph.Graph.decompose', 'gr.Graph.decompose', (['igrap... |
import numpy as np
from geometry import hpt
from core import GraphicalObject, DrawContext
from util import this_source_rgb
from .point import PointLike, as_ndarray
class Polygon(GraphicalObject):
def __init__(self, name: str, *points: PointLike):
t = tuple((as_ndarray(p) for p in points))
super().... | [
"geometry.hpt",
"util.this_source_rgb",
"numpy.vstack"
] | [((371, 388), 'numpy.vstack', 'np.vstack', (['points'], {}), '(points)\n', (380, 388), True, 'import numpy as np\n'), ((1230, 1241), 'geometry.hpt', 'hpt', (['x0', 'y0'], {}), '(x0, y0)\n', (1233, 1241), False, 'from geometry import hpt\n'), ((1243, 1254), 'geometry.hpt', 'hpt', (['x1', 'y0'], {}), '(x1, y0)\n', (1246,... |
import numpy as np
from matplotlib.ticker import AutoMinorLocator
import params
asda = {'names': ('r', 'u'),
'formats': ('f4', 'f4')}
def plot(plt):
from matplotlib import rc
rc('font', **{'family': 'serif', 'serif': ['Roboto']})
rc('text', usetex=True)
rc('text.latex', unicode=True)
data... | [
"matplotlib.rc",
"numpy.loadtxt"
] | [((194, 248), 'matplotlib.rc', 'rc', (['"""font"""'], {}), "('font', **{'family': 'serif', 'serif': ['Roboto']})\n", (196, 248), False, 'from matplotlib import rc\n'), ((253, 276), 'matplotlib.rc', 'rc', (['"""text"""'], {'usetex': '(True)'}), "('text', usetex=True)\n", (255, 276), False, 'from matplotlib import rc\n')... |
import sympy
import numpy as np
from scipy.optimize import fsolve
import matplotlib.pyplot as plt
import time
"""
Obecny popis metody tecen
x_k+1 = x_k - f(x_k) / f_diff(x_k)
"""
def tested_function(x):
"""
Testovaci funkce
"""
return x**2 + 2 * x - 20
# poridim si symboly se kterymi budu racovat
x ... | [
"sympy.symbols",
"sympy.solve",
"matplotlib.pyplot.show",
"sympy.diff",
"time.perf_counter",
"sympy.lambdify",
"numpy.array",
"numpy.linspace",
"matplotlib.pyplot.subplots"
] | [((322, 340), 'sympy.symbols', 'sympy.symbols', (['"""x"""'], {}), "('x')\n", (335, 340), False, 'import sympy\n'), ((353, 394), 'sympy.symbols', 'sympy.symbols', (['"""f, f_diff"""'], {'function': '(True)'}), "('f, f_diff', function=True)\n", (366, 394), False, 'import sympy\n'), ((402, 421), 'time.perf_counter', 'tim... |
import torch
import numpy as np
import torch.nn.functional as F
SMOOTH = 1e-6
classes = ["car", "motorcycle", "bus", "bicycle", "truck", "pedestrian", "other_vehicle", "animal", "emergency_vehicle"]
def iou_pytorch(pred, target, n_classes = 9, print_table = True):
"""
PyTorch IoU implementation
... | [
"numpy.sum",
"torch.nn.functional.one_hot",
"numpy.rint",
"numpy.mean",
"numpy.array",
"torch.Tensor",
"numpy.arange",
"torch.tensor",
"numpy.nanmean"
] | [((3113, 3191), 'numpy.array', 'np.array', (['[[1.1, 1.4, 5.3, 0], [2.1, 4.6, 2.3, 0], [0, 0, 0, 0], [0, 0, 0, 0]]'], {}), '([[1.1, 1.4, 5.3, 0], [2.1, 4.6, 2.3, 0], [0, 0, 0, 0], [0, 0, 0, 0]])\n', (3121, 3191), True, 'import numpy as np\n'), ((3259, 3325), 'numpy.array', 'np.array', (['[[1, 1, 5, 4], [2, 2, 1, 1], [7... |
"""
Main Function of Matlego 1.5, depend mainly on ase and pyqtgraph.
MatLego:1.5
Finish time: 2019/3/5
Main function: to build up model for hetero-junction, especially 2D electron Devices.
"""
from src.window_main_gui import *
from src.database import *
from src.window_others_gui import *
from PyQt5.QtWid... | [
"os.walk",
"pyqtgraph.opengl.GLGridItem",
"pymatgen.core.structure.Structure",
"PyQt5.QtWidgets.QFileDialog.getOpenFileName",
"pymatgen.io.cif.CifWriter",
"numpy.sin",
"numpy.linalg.norm",
"pyqtgraph.opengl.MeshData.cylinder",
"fractions.Fraction",
"numpy.linalg.solve",
"numpy.sqrt",
"os.path.... | [((22951, 23012), 'PyQt5.QtWidgets.QFileDialog.getOpenFileName', 'QFileDialog.getOpenFileName', (['self', '"""选择文件"""', '""""""', '"""files(*.cif)"""'], {}), "(self, '选择文件', '', 'files(*.cif)')\n", (22978, 23012), False, 'from PyQt5.QtWidgets import QFileDialog\n'), ((159538, 159587), 'pyqtgraph.opengl.GLViewWidget.eve... |
__author__ = 'HarperMain'
import numpy as np
import matplotlib.pyplot as plt
from numpy import sqrt, exp, pi
from matplotlib import pyplot
class EuropeanOption(object):
def __init__(self, spot, rate, sigma, sigma2, roe, expiry, dividend = 0.0, N=12, M=10000, flag='c'):
self.matrixengine(spot, rate, sigma,... | [
"matplotlib.pyplot.show",
"matplotlib.pyplot.plot",
"numpy.zeros",
"numpy.cumsum",
"numpy.mean",
"numpy.array",
"numpy.exp",
"numpy.linspace",
"numpy.random.normal",
"numpy.sqrt"
] | [((816, 837), 'numpy.cumsum', 'np.cumsum', (['dW'], {'axis': '(1)'}), '(dW, axis=1)\n', (825, 837), True, 'import numpy as np\n'), ((891, 913), 'numpy.cumsum', 'np.cumsum', (['dW2'], {'axis': '(1)'}), '(dW2, axis=1)\n', (900, 913), True, 'import numpy as np\n'), ((969, 994), 'numpy.linspace', 'np.linspace', (['(0)', 'e... |
# -*- coding: utf-8 -*-
"""
Created on Fri Feb 2 15:31:04 2018
@author: <NAME> & <NAME>
"""
import imageio as imio
import numpy as np
import re
import os
import sys
import pickle
def fingerprint_parser_matrix(index_file_dir, index_file_name):
""" Parser for Precise Biometrics fingerprint database with alignmen... | [
"numpy.save",
"re.split",
"imageio.imread",
"numpy.array",
"numpy.vstack"
] | [((3539, 3573), 'numpy.array', 'np.array', (['person_id'], {'dtype': '"""int32"""'}), "(person_id, dtype='int32')\n", (3547, 3573), True, 'import numpy as np\n'), ((3589, 3623), 'numpy.array', 'np.array', (['finger_id'], {'dtype': '"""int32"""'}), "(finger_id, dtype='int32')\n", (3597, 3623), True, 'import numpy as np\... |
# SPDX-License-Identifier: MIT
# Copyright (c) 2021 ETH Zurich, <NAME>
import numpy as np
import matplotlib.pyplot as plt
from morinth.weno import EquilibriumStencil, OptimalWENO
from morinth.quadrature import GaussLegendre
class SourceTerm:
def __init__(self):
self.needs_edge_source = hasattr(self, "edg... | [
"numpy.zeros_like",
"morinth.quadrature.GaussLegendre",
"morinth.weno.EquilibriumStencil",
"numpy.polyfit",
"numpy.polyval",
"numpy.empty",
"numpy.polyder",
"numpy.empty_like",
"numpy.zeros",
"morinth.weno.OptimalWENO",
"numpy.cumsum",
"numpy.arange"
] | [((1112, 1125), 'morinth.weno.OptimalWENO', 'OptimalWENO', ([], {}), '()\n', (1123, 1125), False, 'from morinth.weno import EquilibriumStencil, OptimalWENO\n'), ((1152, 1168), 'morinth.quadrature.GaussLegendre', 'GaussLegendre', (['(3)'], {}), '(3)\n', (1165, 1168), False, 'from morinth.quadrature import GaussLegendre\... |
#!/usr/bin/env/python
import os,re
import numpy as np
import h5py
from attrdict import AttrMap
import matplotlib as mpl
import matplotlib.cm as cm
import matplotlib.pyplot as plt
import matplotlib.colors as colors
import scipy as scp
import skimage.exposure as exposure
from skimage.io import imread
from skimage.f... | [
"h5py.File",
"numpy.flipud",
"numpy.ones",
"numpy.array",
"skimage.io.imread"
] | [((806, 854), 'numpy.array', 'np.array', (['[0, image.shape[1], 0, image.shape[0]]'], {}), '([0, image.shape[1], 0, image.shape[0]])\n', (814, 854), True, 'import numpy as np\n'), ((873, 903), 'numpy.ones', 'np.ones', (['image.shape', 'np.uint8'], {}), '(image.shape, np.uint8)\n', (880, 903), True, 'import numpy as np\... |
from config import song_file, beta_dir
from config import n_hashtag, f_alpha, v_beta
from os import path
from sys import stdout
import config
import math
import numpy as np
import pickle
def given_beta(alpha, beta, dataset, recom_list, risk):
n_users, n_items, n_rates, indexes, cmpl_rates= dataset
risk_name, ri... | [
"config.provide_recom",
"config.read_data",
"config.complete_rate",
"numpy.flip",
"config.make_file_dir",
"math.sqrt",
"config.compute_t",
"config.eval_wo_error",
"config.solve_k",
"config.count_index",
"sys.stdout.flush",
"os.path.join",
"config.complete_prop"
] | [((2603, 2630), 'config.read_data', 'config.read_data', (['song_file'], {}), '(song_file)\n', (2619, 2630), False, 'import config\n'), ((2644, 2673), 'config.complete_rate', 'config.complete_rate', (['indexes'], {}), '(indexes)\n', (2664, 2673), False, 'import config\n'), ((2744, 2785), 'config.provide_recom', 'config.... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Arm class
"""
# Author: <NAME> (<EMAIL>)
# License: BSD (3-clause)
# importation
import numpy as np
class Arm(object):
def pull(self, theta, sigma_noise):
print('pulling from the parent class')
pass
def get_expected_reward(self, theta):
... | [
"numpy.dot"
] | [((895, 923), 'numpy.dot', 'np.dot', (['self.features', 'theta'], {}), '(self.features, theta)\n', (901, 923), True, 'import numpy as np\n')] |
import typing
import sys
import numpy as np
import numba as nb
@nb.njit
def matrix_identity(n: int) -> np.ndarray:
and_e = (1 << 63) - 1
e = np.zeros((n, n), np.int64)
for i in range(n): e[i, i] = and_e
return e
@nb.njit
def matrix_dot(a: np.ndarray, b: np.ndarray) -> np.ndarray:
n, m = a.shape
h, ... | [
"numpy.empty",
"numba.njit",
"numpy.zeros",
"numpy.eye",
"sys.stdin.readline"
] | [((694, 742), 'numba.njit', 'nb.njit', (['(nb.i8[:], nb.i8[:], nb.i8)'], {'cache': '(True)'}), '((nb.i8[:], nb.i8[:], nb.i8), cache=True)\n', (701, 742), True, 'import numba as nb\n'), ((151, 177), 'numpy.zeros', 'np.zeros', (['(n, n)', 'np.int64'], {}), '((n, n), np.int64)\n', (159, 177), True, 'import numpy as np\n')... |
'''
Functions can be used to generate points to describe a given input
mesh.
Supported mesh formats: All file formats supported by meshio.
(https://github.com/nschloe/meshio)
'''
import numpy as np
import meshio
from pysph.tools.mesh_tools import surface_points, surf_points_uniform
class Mesh:
def __init__(self... | [
"pysph.tools.mesh_tools.surface_points",
"pysph.tools.mesh_tools.surf_points_uniform",
"numpy.cross",
"numpy.zeros",
"meshio.read",
"numpy.linalg.norm",
"numpy.array",
"numpy.concatenate"
] | [((991, 1007), 'numpy.zeros', 'np.zeros', (['(n, 3)'], {}), '((n, 3))\n', (999, 1007), True, 'import numpy as np\n'), ((1181, 1195), 'numpy.cross', 'np.cross', (['a', 'b'], {}), '(a, b)\n', (1189, 1195), True, 'import numpy as np\n'), ((1210, 1241), 'numpy.linalg.norm', 'np.linalg.norm', (['normals'], {'axis': '(1)'}),... |
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
# Import Necessary Libraries
import numpy as np
import time
# Define Fuction to Compute Domiation Count
def computeDominationCount(selected, left, FFMI, FCMI):
tic = time.time()
# Find Number of Selected Feature Till Now
totalSelectedFeature ... | [
"numpy.zeros",
"numpy.sum",
"time.time"
] | [((231, 242), 'time.time', 'time.time', ([], {}), '()\n', (240, 242), False, 'import time\n'), ((1290, 1332), 'numpy.zeros', 'np.zeros', (['(1, totalLeftFeature)'], {'dtype': 'int'}), '((1, totalLeftFeature), dtype=int)\n', (1298, 1332), True, 'import numpy as np\n'), ((1354, 1396), 'numpy.zeros', 'np.zeros', (['(1, to... |
import os
import json
from sklearn.metrics import confusion_matrix
import itertools
import matplotlib.pyplot as plt
import numpy as np
_LABEL_CLASSES = 60
def readtxtdata(filepath):
result = {'labels': [], 'probability': []}
assert os.path.exists(filepath), (
'Can not find data at given directory!!')
... | [
"matplotlib.pyplot.title",
"json.load",
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.matshow",
"os.path.exists",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.colorbar",
"numpy.arange",
"sklearn.metrics.confusion_matrix",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.tight_layout"
] | [((242, 266), 'os.path.exists', 'os.path.exists', (['filepath'], {}), '(filepath)\n', (256, 266), False, 'import os\n'), ((621, 645), 'os.path.exists', 'os.path.exists', (['filepath'], {}), '(filepath)\n', (635, 645), False, 'import os\n'), ((2849, 2899), 'sklearn.metrics.confusion_matrix', 'confusion_matrix', ([], {'y... |
#!/usr/bin/env python3
import os
import sys
sys.path.append(os.getcwd()+'/JinEnv')
from JinEnv import Quadrotor
from casadi import *
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches as patches
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
import math
import time
from pynput import ... | [
"numpy.size",
"pynput.keyboard.Events",
"matplotlib.patches.Rectangle",
"os.getcwd",
"matplotlib.pyplot.close",
"pynput.keyboard.KeyCode",
"matplotlib.pyplot.figure",
"numpy.array",
"matplotlib.pyplot.pause",
"numpy.concatenate",
"numpy.repeat"
] | [((924, 935), 'numpy.array', 'np.array', (['o'], {}), '(o)\n', (932, 935), True, 'import numpy as np\n'), ((60, 71), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (69, 71), False, 'import os\n'), ((1368, 1385), 'numpy.concatenate', 'np.concatenate', (['g'], {}), '(g)\n', (1382, 1385), True, 'import numpy as np\n'), ((200... |
import numpy as np
import scipy.stats as sts
import patsy as pt
from .utils import (check_types, check_commensurate, check_intercept,
check_offset, check_sample_weights, has_converged,
default_X_names, default_y_name)
class GLM:
"""A generalized linear model.
GLMs are... | [
"patsy.dmatrices",
"scipy.stats.norm",
"numpy.sum",
"numpy.asarray",
"patsy.dmatrix",
"numpy.zeros",
"numpy.ones",
"numpy.mean",
"numpy.linalg.inv",
"numpy.dot",
"numpy.linalg.solve",
"numpy.diag"
] | [((8370, 8392), 'numpy.sum', 'np.sum', (['sample_weights'], {}), '(sample_weights)\n', (8376, 8392), True, 'import numpy as np\n'), ((11431, 11459), 'scipy.stats.norm', 'sts.norm', ([], {'loc': '(0.0)', 'scale': '(1.0)'}), '(loc=0.0, scale=1.0)\n', (11439, 11459), True, 'import scipy.stats as sts\n'), ((11686, 11706), ... |
import sys
sys.path.append('../..')
import os
import gc
import logging
import numpy as np
from tqdm.auto import tqdm
from typing import Optional
import torch
from torch.nn import functional as F
from slt.eval import Metric, get_ner_metrics
from slt.chmm.train import CHMMBaseTrainer
from utils.math import get_datase... | [
"sys.path.append",
"slt.chmm.train.CHMMBaseTrainer.initialize_trainer",
"slt.eval.get_ner_metrics",
"torch.sum",
"torch.nn.functional.mse_loss",
"tqdm.auto.tqdm",
"gc.collect",
"torch.save",
"numpy.mean",
"numpy.arange",
"torch.cuda.empty_cache",
"utils.math.get_dataset_wxor",
"torch.zeros",... | [((11, 35), 'sys.path.append', 'sys.path.append', (['"""../.."""'], {}), "('../..')\n", (26, 35), False, 'import sys\n'), ((475, 502), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (492, 502), False, 'import logging\n'), ((1286, 1326), 'slt.chmm.train.CHMMBaseTrainer.initialize_trainer',... |
#!/usr/bin/env python3
# MIT License
#
# Copyright (c) 2021 Packt
#
# 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 limitation the rights
# to use, cop... | [
"pyarrow.RecordBatch.from_arrays",
"numpy.random.randn",
"pyarrow.int16",
"pyarrow.utf8",
"pyarrow.array"
] | [((1336, 1374), 'pyarrow.RecordBatch.from_arrays', 'pa.RecordBatch.from_arrays', (['data', 'cols'], {}), '(data, cols)\n', (1362, 1374), True, 'import pyarrow as pa\n'), ((1979, 2018), 'pyarrow.array', 'pa.array', (['archer_list'], {'type': 'archer_type'}), '(archer_list, type=archer_type)\n', (1987, 2018), True, 'impo... |
# coding: utf-8
# In[1]:
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import load_data
import create_pslist
import Z_direction
from mpl_toolkits.mplot3d import Axes3D
get_ipython().run_line_magic('matplotlib', 'inline')
# In[2]:
def threeDX_slicings(filename, z_dir, lo... | [
"numpy.meshgrid",
"Z_direction.Z_direction",
"matplotlib.pyplot.colorbar",
"matplotlib.pyplot.figure",
"numpy.linspace",
"create_pslist.create_pslist"
] | [((416, 456), 'Z_direction.Z_direction', 'Z_direction.Z_direction', (['filename', 'z_dir'], {}), '(filename, z_dir)\n', (439, 456), False, 'import Z_direction\n'), ((525, 557), 'numpy.linspace', 'np.linspace', (['(0)', 'y_actual', 'y_size'], {}), '(0, y_actual, y_size)\n', (536, 557), True, 'import numpy as np\n'), ((5... |
"""
Mean Embedding Vectorizer
Original code by Vlad, Improved by Xiaochi (George) Li github.com/XC-Li
Can fit in Pipeline_V1 directly as a vectorizer
"""
import gensim
import numpy as np
from numpy import hstack as np_hstack
from scipy.sparse import hstack as sparse_hstack # need this hstack to stack sparse matrix
fro... | [
"tqdm.tqdm_notebook",
"sklearn.decomposition.TruncatedSVD",
"numpy.zeros",
"numpy.hstack",
"numpy.array",
"gensim.models.KeyedVectors.load_word2vec_format",
"scipy.sparse.hstack"
] | [((2230, 2237), 'tqdm.tqdm_notebook', 'tqdm', (['X'], {}), '(X)\n', (2234, 2237), True, 'from tqdm import tqdm_notebook as tqdm\n'), ((2428, 2444), 'numpy.array', 'np.array', (['result'], {}), '(result)\n', (2436, 2444), True, 'import numpy as np\n'), ((1143, 1209), 'gensim.models.KeyedVectors.load_word2vec_format', 'g... |
from . import utils
import collections
import datetime
import glob
import hashlib
import matplotlib
import matplotlib.image
import numpy as np
import os
import pandas as pd
from pathlib import Path
import requests
import struct
import subprocess
import tables
import time
import torch.nn.functional as F
import torch.u... | [
"pathlib.Path",
"tables.open_file",
"numpy.array"
] | [((1460, 1487), 'tables.open_file', 'tables.open_file', (['cell', '"""r"""'], {}), "(cell, 'r')\n", (1476, 1487), False, 'import tables\n'), ((3967, 4008), 'tables.open_file', 'tables.open_file', (["tgt['images_path']", '"""r"""'], {}), "(tgt['images_path'], 'r')\n", (3983, 4008), False, 'import tables\n'), ((1099, 110... |
import numpy as np
def read_bdd_format(
sample_id,
bdd_dict,
categories=('car', 'truck', 'bus', 'person', 'rider', 'bike', 'motor'),
pdq_eval=False):
"""
Reads bdd format from json file output.
output format is described in bdd dataset as:
{
"name": str,
"t... | [
"numpy.array",
"numpy.expand_dims"
] | [((723, 776), 'numpy.array', 'np.array', (["[label['bbox'] for label in frame_elements]"], {}), "([label['bbox'] for label in frame_elements])\n", (731, 776), True, 'import numpy as np\n'), ((806, 923), 'numpy.array', 'np.array', (["[[label['bbox'][1], label['bbox'][0], label['bbox'][3], label['bbox'][2]] for\n labe... |
# Copyright 2021 Peng Cheng Laboratory (http://www.szpclab.com/) and FedLab Authors (smilelab.group)
# 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/LICEN... | [
"os.remove",
"numpy.random.seed",
"fedlab.utils.functional.partition_report",
"os.path.dirname",
"os.path.exists",
"fedlab.utils.functional.load_dict",
"torch.nn.Linear",
"fedlab.utils.functional.save_dict",
"random.random",
"torch.cuda.is_available",
"numpy.random.permutation",
"fedlab.utils.... | [((1193, 1207), 'fedlab.utils.functional.AverageMeter', 'AverageMeter', ([], {}), '()\n', (1205, 1207), False, 'from fedlab.utils.functional import AverageMeter, get_best_gpu, evaluate, save_dict, load_dict\n'), ((2514, 2548), 'fedlab.utils.functional.save_dict', 'save_dict', (['test_dict', '"""./test.pkl"""'], {}), "(... |
from functools import reduce
from multiprocessing import Pool, cpu_count
import numpy as np
def parallel_func(arr, i, proc, func):
return [(i, func(arr[i])) for i in range(i, arr.shape[0], proc)]
class algorithm():
def __init__(self):
self.threshold = 2
def run(self):
arr = np.arange(1... | [
"multiprocessing.Pool",
"numpy.arange",
"multiprocessing.cpu_count"
] | [((309, 322), 'numpy.arange', 'np.arange', (['(10)'], {}), '(10)\n', (318, 322), True, 'import numpy as np\n'), ((339, 350), 'multiprocessing.cpu_count', 'cpu_count', ([], {}), '()\n', (348, 350), False, 'from multiprocessing import Pool, cpu_count\n'), ((366, 376), 'multiprocessing.Pool', 'Pool', (['proc'], {}), '(pro... |
'''
This script is for testing the curve fitting of the perturber mass
'''
import numpy as np; import pandas as pd; import matplotlib.pyplot as plt
import os; from random import choices
pd.options.mode.chained_assignment = None
def gauss(x, h, mu, sigma):
return h*np.exp(-((x-mu)**2)/(2*sigma**2))
G = 1.908e5... | [
"matplotlib.pyplot.show",
"os.getcwd",
"pandas.read_csv",
"numpy.append",
"numpy.array",
"numpy.exp"
] | [((357, 368), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (366, 368), False, 'import os\n'), ((434, 508), 'pandas.read_csv', 'pd.read_csv', (["(cwd + COMPAS_Results_path + '/BSE_Supernovae.csv')"], {'skiprows': '(2)'}), "(cwd + COMPAS_Results_path + '/BSE_Supernovae.csv', skiprows=2)\n", (445, 508), True, 'import panda... |
import logging
import pickle
#pytorch
import torch
#sbi
import sbi.utils as utils
from sbi.inference.base import infer
from .sbiKitMixin import sbiKitMixin
import numpy as np
class sbiKit(sbiKitMixin):
"""
Simulation Based Inference tool kit for convenience
Parameters
----------
UVSpectra:
... | [
"numpy.zeros_like",
"numpy.isinf",
"numpy.isnan",
"pickle.load",
"torch.tensor"
] | [((1789, 1811), 'torch.tensor', 'torch.tensor', (['z[~mask]'], {}), '(z[~mask])\n', (1801, 1811), False, 'import torch\n'), ((1829, 1851), 'torch.tensor', 'torch.tensor', (['b[~mask]'], {}), '(b[~mask])\n', (1841, 1851), False, 'import torch\n'), ((995, 1006), 'numpy.isnan', 'np.isnan', (['z'], {}), '(z)\n', (1003, 100... |
from rdkit.Chem import AllChem
from rdkit.Chem import DataStructs
import numpy as np
def GetMorganFPs(mol, nBits=2048, radius = 2, return_bitInfo = False):
"""
ECFP4: radius=2
"""
bitInfo={}
fp = AllChem.GetMorganFingerprintAsBitVect(mol, radius=radius,
... | [
"rdkit.Chem.DataStructs.ConvertToNumpyArray",
"numpy.zeros",
"rdkit.Chem.AllChem.GetMorganFingerprintAsBitVect"
] | [((223, 314), 'rdkit.Chem.AllChem.GetMorganFingerprintAsBitVect', 'AllChem.GetMorganFingerprintAsBitVect', (['mol'], {'radius': 'radius', 'bitInfo': 'bitInfo', 'nBits': 'nBits'}), '(mol, radius=radius, bitInfo=bitInfo,\n nBits=nBits)\n', (260, 314), False, 'from rdkit.Chem import AllChem\n'), ((371, 400), 'numpy.zer... |
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib.cm import get_cmap
from matplotlib.colors import to_hex
import periodispline.splines.green.univariate as green
from periodispline.splines.ndsplines import UnivariateSpline
plt.style.use('source/custom_style.mplstyle')
# Set co... | [
"matplotlib.pyplot.subplot",
"periodispline.splines.ndsplines.UnivariateSpline",
"periodispline.splines.green.univariate.GreenExponential",
"periodispline.splines.green.univariate.GreenFractionalDerivative",
"periodispline.splines.green.univariate.GreenMatern",
"matplotlib.cm.get_cmap",
"matplotlib.pypl... | [((265, 310), 'matplotlib.pyplot.style.use', 'plt.style.use', (['"""source/custom_style.mplstyle"""'], {}), "('source/custom_style.mplstyle')\n", (278, 310), True, 'import matplotlib.pyplot as plt\n'), ((341, 358), 'matplotlib.cm.get_cmap', 'get_cmap', (['"""tab10"""'], {}), "('tab10')\n", (349, 358), False, 'from matp... |
#!/usr/bin/env python
import numpy
import matplotlib.pyplot as plot
from pyusbtmc import RigolScope
""" Example program to plot the Y-T data from Channel 1"""
# Initialize our scope
test = RigolScope("/dev/usbtmc0")
# Stop data acquisition
test.write(":STOP")
# Grab the data from channel 1
test.write(":WAV:PO... | [
"matplotlib.pyplot.title",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.show",
"matplotlib.pyplot.plot",
"numpy.frombuffer",
"pyusbtmc.RigolScope",
"numpy.arange",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel"
] | [((195, 221), 'pyusbtmc.RigolScope', 'RigolScope', (['"""/dev/usbtmc0"""'], {}), "('/dev/usbtmc0')\n", (205, 221), False, 'from pyusbtmc import RigolScope\n'), ((400, 447), 'numpy.frombuffer', 'numpy.frombuffer', (['rawdata'], {'dtype': '"""B"""', 'offset': '(10)'}), "(rawdata, dtype='B', offset=10)\n", (416, 447), Fal... |
# 一致用系统的时间!经过思考这个是最吼的!
"""
This module provide a VWAPs object tracking multiple tickers trading volume and
predict trading percentage the next time interval.
We first predict the total trading volume, then dynamically predict each interval's
trading volume by an AR1 model. The trading percentage is first predicted ... | [
"numpy.full",
"datetime.datetime.today",
"pandas.read_csv",
"numpy.zeros",
"numpy.ones",
"numpy.any",
"numpy.append",
"numpy.mean",
"datetime.timedelta",
"statsmodels.tsa.arima_model.ARMA",
"numpy.arange",
"warnings.warn",
"os.listdir",
"sklearn.linear_model.Lasso"
] | [((1322, 1332), 'numpy.mean', 'np.mean', (['a'], {}), '(a)\n', (1329, 1332), True, 'import numpy as np\n'), ((1346, 1356), 'numpy.mean', 'np.mean', (['b'], {}), '(b)\n', (1353, 1356), True, 'import numpy as np\n'), ((2436, 2454), 'datetime.timedelta', 'timedelta', ([], {'hours': '(2)'}), '(hours=2)\n', (2445, 2454), Fa... |
# flake8: noqa
import os
from setuptools import setup, Extension, find_packages
import pathlib
# workaround for numpy and Cython install dependency
# the solution is from https://stackoverflow.com/a/54138355
def my_build_ext(pars):
# import delayed:
from setuptools.command.build_ext import build_ext as _build_... | [
"setuptools.Extension",
"os.path.dirname",
"setuptools.command.build_ext.build_ext.finalize_options",
"pathlib.Path",
"numpy.get_include",
"setuptools.find_packages"
] | [((1553, 1767), 'setuptools.Extension', 'Extension', (['"""red_string_grouper.topn.topn"""'], {'sources': "['./red_string_grouper/topn/topn_threaded.pyx',\n './red_string_grouper/topn/topn_parallel.cpp']", 'extra_compile_args': 'extra_compile_args', 'language': '"""c++"""'}), "('red_string_grouper.topn.topn', source... |
import pytest
import numpy as np
import pyomo.environ as pyo
from omlt import OmltBlock
from omlt.neuralnet import ReducedSpaceNeuralNetworkFormulation, NeuralNetworkFormulation, NetworkDefinition
from omlt.neuralnet.layer import InputLayer, DenseLayer
def two_node_network(activation, input_value):
"""
... | [
"pyomo.environ.SolverFactory",
"omlt.neuralnet.layer.InputLayer",
"numpy.asarray",
"omlt.OmltBlock",
"omlt.neuralnet.ReducedSpaceNeuralNetworkFormulation",
"pyomo.environ.Objective",
"pyomo.environ.value",
"omlt.neuralnet.NeuralNetworkFormulation",
"numpy.array",
"pyomo.environ.ConcreteModel",
"... | [((577, 631), 'omlt.neuralnet.NetworkDefinition', 'NetworkDefinition', ([], {'scaled_input_bounds': '[(-10.0, 10.0)]'}), '(scaled_input_bounds=[(-10.0, 10.0)])\n', (594, 631), False, 'from omlt.neuralnet import ReducedSpaceNeuralNetworkFormulation, NeuralNetworkFormulation, NetworkDefinition\n'), ((651, 666), 'omlt.neu... |
# --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by <NAME>
# --------------------------------------------------------
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
# -----... | [
"setuptools.Extension",
"os.path.abspath",
"numpy.get_numpy_include",
"numpy.get_include",
"torch.cuda.is_available",
"os.path.join",
"setuptools.find_packages"
] | [((1741, 1780), 'os.path.join', 'os.path.join', (['this_dir', '"""model"""', '"""csrc"""'], {}), "(this_dir, 'model', 'csrc')\n", (1753, 1780), False, 'import os\n'), ((1001, 1017), 'numpy.get_include', 'np.get_include', ([], {}), '()\n', (1015, 1017), True, 'import numpy as np\n'), ((1125, 1262), 'setuptools.Extension... |
#
# Copyright (c) 2011-2014 Exxeleron GmbH
#
# 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 ... | [
"qpython3.qconnection.QConnection",
"threading.Event",
"sys.stdin.readline",
"numpy.string_"
] | [((963, 980), 'threading.Event', 'threading.Event', ([], {}), '()\n', (978, 980), False, 'import threading\n'), ((1978, 2031), 'qpython3.qconnection.QConnection', 'qconnection.QConnection', ([], {'host': '"""localhost"""', 'port': '(17010)'}), "(host='localhost', port=17010)\n", (2001, 2031), False, 'from qpython3 impo... |
import argparse
import os
import matplotlib.pyplot as plt
import pickle
import torch
import torch.nn as nn
import numpy as np
from sklearn import linear_model
from sklearn.metrics import confusion_matrix
from tqdm import tqdm
import nn_models
from plot_util import plot_l1_path
from train import create_datasets
SCRIP... | [
"pickle.dump",
"numpy.sum",
"argparse.ArgumentParser",
"numpy.logspace",
"nn_models.Mean2d",
"nn_models.NonlinearConvolution",
"torch.cat",
"numpy.diag",
"train.create_datasets",
"nn_models.NonlinearConvolutionNoAbs",
"os.path.join",
"os.path.abspath",
"os.path.dirname",
"torch.load",
"n... | [((328, 353), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (343, 353), False, 'import os\n'), ((364, 391), 'os.path.dirname', 'os.path.dirname', (['SCRIPTPATH'], {}), '(SCRIPTPATH)\n', (379, 391), False, 'import os\n'), ((5113, 5156), 'numpy.repeat', 'np.repeat', (['order_rescaling', 'model... |
from __future__ import print_function
import argparse
import torch
from torchvision import datasets, transforms
from models import vgg, resnet, densenet
import numpy as np
import os
import sys
from tqdm import tqdm
from utils import *
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='MiniImag... | [
"models.resnet.ResNet18",
"argparse.ArgumentParser",
"numpy.sum",
"models.densenet.densenet_cifar",
"numpy.asarray",
"torch.load",
"models.vgg.VGG",
"torchvision.datasets.ImageFolder",
"torch.cuda.is_available",
"sys.exc_info",
"torch.nn.functional.cosine_similarity",
"torchvision.transforms.N... | [((275, 337), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""MiniImagenet Evaluation"""'}), "(description='MiniImagenet Evaluation')\n", (298, 337), False, 'import argparse\n'), ((1102, 1164), 'torchvision.datasets.ImageFolder', 'datasets.ImageFolder', (['args.data_path'], {'transform': ... |
import io
import unittest
import numpy as np
from nose.plugins.attrib import attr
from embryovision.pipeline import (
Pipeline, compress_zona, decompress_zona, predict)
from embryovision.managedata import (
AnnotatedDataset, AnnotatedImage, ImageInfo, FilenameParser as FP)
from embryovision.tests.common impor... | [
"unittest.main",
"embryovision.managedata.AnnotatedImage",
"numpy.random.seed",
"embryovision.pipeline.compress_zona",
"embryovision.managedata.FilenameParser.get_imageinfo_from_filename",
"embryovision.tests.common.get_loadable_filenames",
"embryovision.managedata.FilenameParser.get_partial_filename_fr... | [((355, 367), 'nose.plugins.attrib.attr', 'attr', (['"""slow"""'], {}), "('slow')\n", (359, 367), False, 'from nose.plugins.attrib import attr\n'), ((1047, 1059), 'nose.plugins.attrib.attr', 'attr', (['"""slow"""'], {}), "('slow')\n", (1051, 1059), False, 'from nose.plugins.attrib import attr\n'), ((6098, 6139), 'embry... |
#!/usr/bin/env python3.7
# -*- coding: utf-8 -*-
from au import SimpleRecorder
from au.pitch_analyzer import PitchAnalyzer
from au.volume_analyzer import VolumeAnalyzer
from beat_ import Tempo
from MER.mer2 import MusicEmotionRecognizer
import threading
import numpy as np
import time
import eel
import gevent
print ("p... | [
"au.pitch_analyzer.PitchAnalyzer",
"eel.init",
"numpy.random.randint",
"au.SimpleRecorder",
"eel.start",
"numpy.array",
"MER.mer2.MusicEmotionRecognizer",
"beat_.Tempo"
] | [((1490, 1505), 'eel.init', 'eel.init', (['"""web"""'], {}), "('web')\n", (1498, 1505), False, 'import eel\n'), ((1577, 1593), 'au.SimpleRecorder', 'SimpleRecorder', ([], {}), '()\n', (1591, 1593), False, 'from au import SimpleRecorder\n'), ((1610, 1639), 'au.pitch_analyzer.PitchAnalyzer', 'PitchAnalyzer', ([], {'refre... |
import goenrich
import numpy as np
import pandas as pd
import pkg_resources
import argparse
import pickle
parser = argparse.ArgumentParser("""Command line tool to collect go enrichment stats""")
parser.add_argument('--refName', dest='refName', default='CPTACpancan')
parser.add_argument('--hypha', dest='hyph', help='Or... | [
"argparse.ArgumentParser",
"goenrich.read.gene2go",
"pandas.read_csv",
"pkg_resources.resource_stream",
"pkg_resources.resource_filename",
"numpy.array",
"goenrich.enrich.propagate",
"pandas.concat",
"goenrich.obo.ontology"
] | [((116, 191), 'argparse.ArgumentParser', 'argparse.ArgumentParser', (['"""Command line tool to collect go enrichment stats"""'], {}), "('Command line tool to collect go enrichment stats')\n", (139, 191), False, 'import argparse\n'), ((445, 505), 'pkg_resources.resource_stream', 'pkg_resources.resource_stream', (['__nam... |
# %%
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
sns.set_style("whitegrid")
sns.set_context(None)
sns.set_theme()
# %%
known_agent_name = "SimulatedExactConceder"
file_name = f"real{known_agent_name.split('Exact')[1].lower()}"
agent = known_agent_name.split("Exact")[1]
d... | [
"pandas.DataFrame",
"seaborn.set_style",
"matplotlib.pyplot.title",
"matplotlib.pyplot.show",
"pandas.read_csv",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.figure",
"numpy.arange",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel",
"seaborn.set_context",
"seaborn.set_theme"
] | [((98, 124), 'seaborn.set_style', 'sns.set_style', (['"""whitegrid"""'], {}), "('whitegrid')\n", (111, 124), True, 'import seaborn as sns\n'), ((125, 146), 'seaborn.set_context', 'sns.set_context', (['None'], {}), '(None)\n', (140, 146), True, 'import seaborn as sns\n'), ((147, 162), 'seaborn.set_theme', 'sns.set_theme... |
#!/bin/python
"""This module contains functions to read and plot temperature data."""
# Import the libraries we are using. It is good practice to import all necessary
# libraries in the first lines of a file. Improve this message.
import os
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
def r... | [
"matplotlib.pyplot.show",
"pandas.read_csv",
"matplotlib.pyplot.bar",
"os.path.dirname",
"numpy.genfromtxt",
"numpy.append",
"matplotlib.pyplot.figure",
"numpy.array",
"os.path.join"
] | [((596, 660), 'numpy.genfromtxt', 'np.genfromtxt', (['filename'], {'delimiter': '""","""', 'skip_header': 'header_lines'}), "(filename, delimiter=',', skip_header=header_lines)\n", (609, 660), True, 'import numpy as np\n'), ((767, 805), 'numpy.array', 'np.array', (['text_data[:, :]'], {'dtype': 'float'}), '(text_data[:... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
import clipl.utility.logger as logger
log = logging.getLogger(__name__)
import argparse
import numpy
import os
import ROOT
ROOT.gROOT.SetBatch(True)
ROOT.PyConfig.IgnoreCommandLineOptions = True
ROOT.gErrorIgnoreLevel = ROOT.kError
import clipl.utility.pr... | [
"clipl.utility.progressiterator.ProgressIterator",
"argparse.ArgumentParser",
"os.path.dirname",
"numpy.zeros",
"clipl.utility.logger.initLogger",
"ROOT.gROOT.SetBatch",
"clipl.utility.tfilecontextmanager.TFileContextManager",
"clipl.utility.roottools.RootTools.walk_root_directory",
"logging.getLogg... | [((106, 133), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (123, 133), False, 'import logging\n'), ((187, 212), 'ROOT.gROOT.SetBatch', 'ROOT.gROOT.SetBatch', (['(True)'], {}), '(True)\n', (206, 212), False, 'import ROOT\n'), ((489, 618), 'argparse.ArgumentParser', 'argparse.ArgumentPars... |
""" Module to generate a *large* Cube of MHW events"""
import glob
import os
import numpy as np
from importlib import reload
import sqlalchemy
from datetime import date
import pandas
from mhw_analysis.db import utils
from mhw import marineHeatWaves
from mhw import utils as mhw_utils
import iris
reload(mhw_utils)
rel... | [
"numpy.bool_",
"os.remove",
"numpy.invert",
"numpy.empty",
"iris.load",
"os.path.isfile",
"sqlalchemy.Table",
"numpy.arange",
"glob.glob",
"numpy.meshgrid",
"sqlalchemy.select",
"mhw_analysis.db.utils.grab_t",
"datetime.date.fromordinal",
"pandas.concat",
"pandas.DataFrame.from_dict",
... | [((299, 316), 'importlib.reload', 'reload', (['mhw_utils'], {}), '(mhw_utils)\n', (305, 316), False, 'from importlib import reload\n'), ((317, 340), 'importlib.reload', 'reload', (['marineHeatWaves'], {}), '(marineHeatWaves)\n', (323, 340), False, 'from importlib import reload\n'), ((1527, 1558), 'glob.glob', 'glob.glo... |
import cv2
import numpy as np
HSV_MIN_THRESH_YELLOW = np.array([20, 150, 150]) # Treshold values, colors in HSV
HSV_MAX_THRESH_YELLOW = np.array([35, 210, 255])
# magic values for river
HSV_MIN_THRESH = np.array([82, 0, 150])
HSV_MAX_THRESH = np.array([90, 200, 255])
def _remove_river_from_bin_image(bin_image, nb_c... | [
"cv2.bitwise_and",
"numpy.ones",
"cv2.connectedComponentsWithStats",
"numpy.array",
"cv2.drawContours",
"cv2.inRange",
"cv2.findContours"
] | [((56, 80), 'numpy.array', 'np.array', (['[20, 150, 150]'], {}), '([20, 150, 150])\n', (64, 80), True, 'import numpy as np\n'), ((138, 162), 'numpy.array', 'np.array', (['[35, 210, 255]'], {}), '([35, 210, 255])\n', (146, 162), True, 'import numpy as np\n'), ((206, 228), 'numpy.array', 'np.array', (['[82, 0, 150]'], {}... |
import os
import sys
# Add all the python paths needed to execute when using Python 3.6
sys.path.append(os.path.join(os.path.dirname(__file__), "models"))
sys.path.append(os.path.join(os.path.dirname(__file__), "models/wrn"))
import time
import numpy as np
from datetime import datetime, timedelta
from logger import L... | [
"models.conv_cnn.ConvCNNFactory.createCNN",
"torch.nn.NLLLoss",
"numpy.mean",
"numpy.random.randint",
"torch.device",
"shutil.rmtree",
"banknoteDataLoader.banknoteDataLoader",
"os.path.join",
"option.Options",
"numpy.std",
"os.path.dirname",
"torch.load",
"torch.optim.lr_scheduler.ReduceLROn... | [((1251, 1269), 'ntpath.split', 'ntpath.split', (['path'], {}), '(path)\n', (1263, 1269), False, 'import ntpath\n'), ((1458, 1501), 'sklearn.metrics.roc_curve', 'roc_curve', (['labels', 'predictions'], {'pos_label': '(1)'}), '(labels, predictions, pos_label=1)\n', (1467, 1501), False, 'from sklearn.metrics import accur... |
import torch.nn as nn
import math
import torch.utils.model_zoo as model_zoo
import os
import numpy as np
import torch
#keep same varaible name from Resnet to use imagenet pretrained weight
depths = {18:[2,2,2,2],34:[3,4,6,3],50:[3,4,6,3],101:[3,4,23,3],152:[3,8,36,3],53:[1,2,8,8,4]}
channels = [64,128,256,512]
cahnnels... | [
"torch.nn.Dropout",
"torch.nn.ReLU",
"torch.utils.model_zoo.load_url",
"torch.nn.ModuleList",
"torch.nn.Sequential",
"numpy.fromfile",
"math.sqrt",
"torch.nn.Conv2d",
"torch.nn.Identity",
"torch.nn.BatchNorm2d",
"torch.nn.MaxPool2d",
"torch.nn.LeakyReLU",
"torch.from_numpy"
] | [((840, 933), 'torch.nn.Conv2d', 'nn.Conv2d', (['in_channels', 'out_channels'], {'kernel_size': '(3)', 'stride': 'stride', 'padding': '(1)', 'bias': 'bias'}), '(in_channels, out_channels, kernel_size=3, stride=stride, padding=\n 1, bias=bias)\n', (849, 933), True, 'import torch.nn as nn\n'), ((1021, 1098), 'torch.nn... |
import fnmatch
import os
import random
import re
import threading
import librosa
import numpy as np
import tensorflow as tf
import soundfile as sf
FILE_PATTERN = r'p([0-9]+)_([0-9]+)\.wav'
def get_category_cardinality(files):
id_reg_expression = re.compile(FILE_PATTERN)
min_id = None
max_id = None
fo... | [
"numpy.pad",
"fnmatch.filter",
"threading.Thread",
"soundfile.read",
"numpy.random.randn",
"tensorflow.convert_to_tensor",
"os.walk",
"numpy.nonzero",
"librosa.feature.rmse",
"librosa.resample",
"tensorflow.placeholder",
"librosa.load",
"librosa.core.frames_to_samples",
"os.path.join",
"... | [((253, 277), 're.compile', 're.compile', (['FILE_PATTERN'], {}), '(FILE_PATTERN)\n', (263, 277), False, 'import re\n'), ((914, 932), 'os.walk', 'os.walk', (['directory'], {}), '(directory)\n', (921, 932), False, 'import os\n'), ((1961, 1985), 're.compile', 're.compile', (['FILE_PATTERN'], {}), '(FILE_PATTERN)\n', (197... |
from PIL import Image
import numpy as np
from tensorflow.python.keras.preprocessing.image import random_zoom
import albumentations as ab
from self_supervised_3d_tasks.data.generator_base import DataGeneratorBase
class DataGeneratorUnlabeled2D(DataGeneratorBase):
def __init__(self,
data_path,
... | [
"numpy.stack",
"numpy.asarray",
"PIL.Image.open",
"tensorflow.python.keras.preprocessing.image.random_zoom",
"albumentations.HorizontalFlip",
"albumentations.VerticalFlip"
] | [((1883, 1899), 'numpy.stack', 'np.stack', (['data_x'], {}), '(data_x)\n', (1891, 1899), True, 'import numpy as np\n'), ((1917, 1933), 'numpy.stack', 'np.stack', (['data_y'], {}), '(data_y)\n', (1925, 1933), True, 'import numpy as np\n'), ((994, 1019), 'PIL.Image.open', 'Image.open', (['path_to_image'], {}), '(path_to_... |
#
# Generate pickled data for current tomographer version and store to data files (which are
# to be included in the git repo).
#
# These pickle files are loaded by pytest_pickle.py to make sure that data pickled by
# earlier versions of Tomographer can be successfully loaded, with full backwards
# compatibility.
#
fr... | [
"os.mkdir",
"pickle.dump",
"os.path.abspath",
"logging.basicConfig",
"tomographer.UniformBinsHistogramParams",
"os.path.isdir",
"tomographer.MHRWParams",
"numpy.array",
"tomographer.HistogramParams",
"tomographer.densedm.IndepMeasLLH",
"os.path.join",
"tomographer.densedm.DMTypes"
] | [((429, 469), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.DEBUG'}), '(level=logging.DEBUG)\n', (448, 469), False, 'import logging\n'), ((957, 997), 'os.path.join', 'os.path.join', (['pickledatadirroot', 'version'], {}), '(pickledatadirroot, version)\n', (969, 997), False, 'import os\n'), ((874... |
# this notebook will be used to create a cnn for state indentification for a double dot data set with 3 dimensions.
# CNN for learning!
# learn the states of a double dot
import numpy as np
import tensorflow as tf
import glob
import os
# get the data
data_folder_path = "/wrk/ssk4/dd3d_data/"
files = glob.glob(data_fo... | [
"numpy.load",
"random.shuffle",
"tensorflow.contrib.layers.flatten",
"tensorflow.reshape",
"tensorflow.train.LoggingTensorHook",
"tensorflow.logging.set_verbosity",
"tensorflow.layers.max_pooling2d",
"glob.glob",
"tensorflow.contrib.learn.python.learn.estimators.model_fn.ModelFnOps",
"numpy.random... | [((303, 340), 'glob.glob', 'glob.glob', (["(data_folder_path + '*.npy')"], {}), "(data_folder_path + '*.npy')\n", (312, 340), False, 'import glob\n'), ((406, 427), 'random.shuffle', 'random.shuffle', (['files'], {}), '(files)\n', (420, 427), False, 'import random\n'), ((817, 858), 'tensorflow.logging.set_verbosity', 't... |
import numpy as np
import torchvision
import torchvision.transforms as transforms
import torch.utils.data as data
import torch
from dataset.transforms import TransformTwice, load_transforms
def load_cifar10_default(root, batch_size, n_labeled, transforms_name):
print(f'==> Preparing cifar10')
transform_train... | [
"dataset.transforms.TransformTwice",
"torch.utils.data.DataLoader",
"torchvision.datasets.CIFAR10",
"numpy.where",
"numpy.array",
"dataset.transforms.load_transforms",
"numpy.random.shuffle"
] | [((338, 370), 'dataset.transforms.load_transforms', 'load_transforms', (['transforms_name'], {}), '(transforms_name)\n', (353, 370), False, 'from dataset.transforms import TransformTwice, load_transforms\n'), ((553, 659), 'torch.utils.data.DataLoader', 'data.DataLoader', (['train_labeled_set'], {'batch_size': 'batch_si... |
from Meow_Net import Meow_Net
from CosineAnnealing import CosineAnnealingScheduler
import numpy as np
import math
import matplotlib.pyplot as plt
from pydub import AudioSegment
# Import DataSets
file_list = []
label_list = []
for i in os.listdir('./dataset'):
file_list.append(i)
label_list.append(i.split('_')[... | [
"matplotlib.pyplot.title",
"functools.partial",
"wave.open",
"numpy.stack",
"matplotlib.pyplot.plot",
"CosineAnnealing.CosineAnnealingScheduler",
"sklearn.model_selection.train_test_split",
"matplotlib.pyplot.legend",
"numpy.zeros",
"matplotlib.pyplot.style.use",
"matplotlib.pyplot.figure",
"n... | [((1240, 1289), 'functools.partial', 'partial', (['get_mfcc'], {'n_mfcc': 'n_mfcc', 'padding': 'padding'}), '(get_mfcc, n_mfcc=n_mfcc, padding=padding)\n', (1247, 1289), False, 'from functools import partial\n'), ((1995, 2015), 'numpy.array', 'np.array', (["train['y']"], {}), "(train['y'])\n", (2003, 2015), True, 'impo... |
#
# The MIT License (MIT)
#
# Copyright (c) 2020-2021 <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 limitation the rights
# to use, copy, mod... | [
"numpy.log"
] | [((1718, 1744), 'numpy.log', 'np.log', (['(1 + N / idf_counts)'], {}), '(1 + N / idf_counts)\n', (1724, 1744), True, 'import numpy as np\n')] |
import unittest
import os
import numpy as np
from welib.yams.windturbine import *
from welib.yams.utils import *
import welib.weio as weio
MyDir=os.path.dirname(__file__)
# --------------------------------------------------------------------------------}
# --- TESTS
# -------------------------------------------------... | [
"unittest.main",
"numpy.set_printoptions",
"os.path.dirname",
"numpy.around",
"numpy.array",
"numpy.testing.assert_allclose",
"os.path.join",
"numpy.diag"
] | [((146, 171), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (161, 171), False, 'import os\n'), ((5486, 5533), 'numpy.set_printoptions', 'np.set_printoptions', ([], {'linewidth': '(300)', 'precision': '(5)'}), '(linewidth=300, precision=5)\n', (5505, 5533), True, 'import numpy as np\n'), ((55... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.