code stringlengths 31 1.05M | apis list | extract_api stringlengths 97 1.91M |
|---|---|---|
import os
import numpy as np
import fitsio
from astrometry.util.fits import fits_table
from astrometry.util.ttime import Time
from wise.unwise import get_unwise_tractor_image
import logging
logger = logging.getLogger('legacypipe.unwise')
def info(*args):
from legacypipe.utils import log_info
log_info(logger, ... | [
"fitsio.write",
"numpy.sum",
"numpy.abs",
"numpy.maximum",
"astrometry.util.ttime.Time",
"astrometry.util.util.Tan",
"pkg_resources.resource_filename",
"numpy.clip",
"numpy.arange",
"os.path.join",
"numpy.round",
"unwise_psf.unwise_psf.get_unwise_psf",
"pylab.title",
"traceback.print_exc",... | [((201, 239), 'logging.getLogger', 'logging.getLogger', (['"""legacypipe.unwise"""'], {}), "('legacypipe.unwise')\n", (218, 239), False, 'import logging\n'), ((303, 325), 'legacypipe.utils.log_info', 'log_info', (['logger', 'args'], {}), '(logger, args)\n', (311, 325), False, 'from legacypipe.utils import log_info\n'),... |
from __future__ import absolute_import, division, print_function
import skimage.transform
import numpy as np
def rectify_bboxes(bboxes, height, width):
bboxes = np.maximum(bboxes, 0)
bboxes[:, 2:4] = np.maximum(bboxes[:, 0:2], bboxes[:, 2:4])
bboxes[:, 0] = np.minimum(bboxes[:, 0], width-1)
bboxes[:, ... | [
"numpy.minimum",
"numpy.maximum",
"numpy.floor",
"numpy.zeros",
"numpy.nonzero",
"numpy.min",
"numpy.max",
"numpy.array",
"numpy.round"
] | [((167, 188), 'numpy.maximum', 'np.maximum', (['bboxes', '(0)'], {}), '(bboxes, 0)\n', (177, 188), True, 'import numpy as np\n'), ((210, 252), 'numpy.maximum', 'np.maximum', (['bboxes[:, 0:2]', 'bboxes[:, 2:4]'], {}), '(bboxes[:, 0:2], bboxes[:, 2:4])\n', (220, 252), True, 'import numpy as np\n'), ((272, 307), 'numpy.m... |
import numpy as np
a = np.array([[1,2,3,4], [5,6,7,8], [9,10,11,12]])
print(len(a)) | [
"numpy.array"
] | [((23, 78), 'numpy.array', 'np.array', (['[[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]'], {}), '([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]])\n', (31, 78), True, 'import numpy as np\n')] |
# -*- coding: utf-8 -*-
"""
@author: Thorsten
"""
import numpy as np
from numba import jit
import os
import sys
nb_dir = os.path.split(os.getcwd())[0]
if nb_dir not in sys.path:
sys.path.append(nb_dir)
from lib import bresenham
@jit
def addMeasurement(grid, x, y, pos_sensor, offset, resolution, l_occupied, l_fr... | [
"sys.path.append",
"numba.jit",
"numpy.array",
"os.getcwd"
] | [((987, 1005), 'numba.jit', 'jit', ([], {'nopython': '(True)'}), '(nopython=True)\n', (990, 1005), False, 'from numba import jit\n'), ((1342, 1360), 'numba.jit', 'jit', ([], {'nopython': '(True)'}), '(nopython=True)\n', (1345, 1360), False, 'from numba import jit\n'), ((184, 207), 'sys.path.append', 'sys.path.append', ... |
import numpy as np
import pandas as pd
def AAFT(df, random=np.random.uniform, random_state=None):
"""Amplitude Adjusted Fourier Transform Baseline Generator."""
# set random seed
np.random.seed(random_state)
# Operate on numpy.ndarray
ts = df.values
# 2d time-series format
_ts = ts.reshape... | [
"numpy.empty_like",
"numpy.fft.rfft",
"numpy.random.seed",
"numpy.fft.irfft"
] | [((193, 221), 'numpy.random.seed', 'np.random.seed', (['random_state'], {}), '(random_state)\n', (207, 221), True, 'import numpy as np\n'), ((454, 472), 'numpy.empty_like', 'np.empty_like', (['_ts'], {}), '(_ts)\n', (467, 472), True, 'import numpy as np\n'), ((580, 596), 'numpy.fft.rfft', 'np.fft.rfft', (['tsi'], {}), ... |
import os
import wandb
from copy import deepcopy
from src.systems import audio_systems
from src.utils.utils import load_json
from src.utils.setup import process_config
import random, torch, numpy
import pytorch_lightning as pl
SYSTEM = {
'PretrainExpertInstDiscSystem': audio_systems.PretrainExpertInstDiscSystem,
... | [
"pytorch_lightning.Trainer",
"numpy.random.seed",
"argparse.ArgumentParser",
"torch.manual_seed",
"torch.cuda.manual_seed_all",
"random.seed",
"wandb.init",
"src.utils.setup.process_config",
"os.path.join"
] | [((3220, 3331), 'wandb.init', 'wandb.init', ([], {'project': '"""audio"""', 'entity': '"""viewmaker"""', 'name': 'config.exp_name', 'config': 'config', 'sync_tensorboard': '(True)'}), "(project='audio', entity='viewmaker', name=config.exp_name,\n config=config, sync_tensorboard=True)\n", (3230, 3331), False, 'import... |
# -----------------------------------------
# python modules
# -----------------------------------------
from importlib import import_module
from easydict import EasyDict as edict
import torch.backends.cudnn as cudnn
import sys
import numpy as np
import os
# stop python from writing so much bytecode
sys.dont_write_byt... | [
"numpy.set_printoptions",
"getopt.getopt",
"importlib.import_module",
"os.path.basename",
"os.getcwd",
"os.path.join"
] | [((362, 396), 'numpy.set_printoptions', 'np.set_printoptions', ([], {'suppress': '(True)'}), '(suppress=True)\n', (381, 396), True, 'import numpy as np\n'), ((1609, 1647), 'os.path.join', 'os.path.join', (['"""output"""', 'outdir', '"""data"""'], {}), "('output', outdir, 'data')\n", (1621, 1647), False, 'import os\n'),... |
import scipy
import numpy as np
from scipy.optimize import minimize
def minimize_robust(fun, x0, args=(), methods=None, tries=3, disp=False,
**kwargs):
"""Minimization of scalar function of one or more variables.
This is a wrapper around the `scipy.optimize.minimize` function that
ite... | [
"scipy.optimize.minimize",
"numpy.array",
"scipy.optimize.OptimizeResult",
"iminuit.Minuit",
"iminuit.util.make_func_code"
] | [((3190, 3214), 'iminuit.Minuit', 'iminuit.Minuit', (['mfun', 'x0'], {}), '(mfun, x0)\n', (3204, 3214), False, 'import iminuit\n'), ((3409, 3440), 'scipy.optimize.OptimizeResult', 'scipy.optimize.OptimizeResult', ([], {}), '()\n', (3438, 3440), False, 'import scipy\n'), ((3519, 3540), 'numpy.array', 'np.array', (['mres... |
import glob
import os
import pathlib
import tempfile
import warnings
import logging
from abc import ABC
from pathlib import Path
from shutil import copy
from tempfile import mkstemp
from typing import Union, Dict
from zipfile import ZipFile
import numpy as np
import pandas as pd
from flask import send_from_directory, ... | [
"pandas.DataFrame",
"zipfile.ZipFile",
"tempfile.mkstemp",
"os.path.basename",
"os.path.dirname",
"shapely.geometry.mapping",
"shutil.copy",
"openeo_driver.errors.OpenEOApiException",
"xarray.Dataset",
"pathlib.Path",
"flask.jsonify",
"pandas.to_datetime",
"numpy.swapaxes",
"glob.glob",
... | [((594, 621), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (611, 621), False, 'import logging\n'), ((1944, 1990), 'tempfile.mkstemp', 'tempfile.mkstemp', ([], {'suffix': 'suffix', 'prefix': 'prefix'}), '(suffix=suffix, prefix=prefix)\n', (1960, 1990), False, 'import tempfile\n'), ((9953... |
import math
from collections import OrderedDict
from time import time
import numba
import numpy as np
from sde import SDE
from simulation.strong.explicit.rk import Order_10 as Platen
from simulation.strong.explicit.taylor import Order_05 as Euler
from simulation.strong.explicit.taylor import Order_10 as Milstein
""... | [
"sde.SDE",
"simulation.strong.explicit.taylor.Order_05",
"numpy.ceil",
"numpy.log2",
"numpy.ones",
"time.time",
"simulation.strong.explicit.taylor.Order_10",
"simulation.strong.explicit.rk.Order_10",
"numpy.mean",
"numpy.cumsum",
"numpy.exp",
"collections.OrderedDict"
] | [((1185, 1211), 'collections.OrderedDict', 'OrderedDict', ([], {'mu': '(1)', 'sigma': '(1)'}), '(mu=1, sigma=1)\n', (1196, 1211), False, 'from collections import OrderedDict\n'), ((1602, 1657), 'sde.SDE', 'SDE', (['gbm_drift', 'gbm_diffusion'], {'timerange': '[0, end_point]'}), '(gbm_drift, gbm_diffusion, timerange=[0,... |
import logging
import os
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.utils import check_random_state
from csrank.dataset_reader.dataset_reader import DatasetReader
from csrank.dataset_reader.util import standardize_features
logger = logging.getLogger(__name__)
class MNISTDa... | [
"numpy.load",
"sklearn.utils.check_random_state",
"sklearn.model_selection.train_test_split",
"csrank.dataset_reader.util.standardize_features",
"os.path.join",
"logging.getLogger"
] | [((277, 304), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (294, 304), False, 'import logging\n'), ((791, 823), 'sklearn.utils.check_random_state', 'check_random_state', (['random_state'], {}), '(random_state)\n', (809, 823), False, 'from sklearn.utils import check_random_state\n'), ((1... |
# <NAME>
# Auburn University - CSSE
# June 28 2019
from xcs.environment import Environment
import numpy as np
import logging
class XOREnvironment(Environment):
def __init__(self):
Environment.__init__(self)
logging.info('XOR environment initialized')
self.state = None
self.state_... | [
"numpy.random.uniform",
"logging.info",
"xcs.environment.Environment.__init__"
] | [((195, 221), 'xcs.environment.Environment.__init__', 'Environment.__init__', (['self'], {}), '(self)\n', (215, 221), False, 'from xcs.environment import Environment\n'), ((230, 273), 'logging.info', 'logging.info', (['"""XOR environment initialized"""'], {}), "('XOR environment initialized')\n", (242, 273), False, 'im... |
"""
Approximate Bayesian Computation for Gaussian location parameter
------------------------------------------
Figure 5.29
An example of Approximate Bayesian Computation: estimate the location parameter
for a sample drawn from Gaussian distribution with known scale parameter.
"""
# Author: <NAME>
# License: BSD
# Th... | [
"numpy.random.seed",
"numpy.sum",
"numpy.empty",
"matplotlib.pyplot.figure",
"numpy.mean",
"numpy.random.normal",
"scipy.stats.norm",
"numpy.std",
"numpy.max",
"astroML.plotting.setup_text_plots",
"numpy.linspace",
"numpy.random.choice",
"numpy.size",
"matplotlib.pyplot.show",
"numpy.per... | [((1087, 1128), 'astroML.plotting.setup_text_plots', 'setup_text_plots', ([], {'fontsize': '(8)', 'usetex': '(True)'}), '(fontsize=8, usetex=True)\n', (1103, 1128), False, 'from astroML.plotting import setup_text_plots\n'), ((4695, 4712), 'numpy.random.seed', 'np.random.seed', (['(0)'], {}), '(0)\n', (4709, 4712), True... |
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
import numpy as np
import sys
n = int(input('Enter number of unknowns: '))
a = np.zeros((n,n+1))
x = np.zeros(n)
print('Enter Augmented Matrix Coefficients:')
for i in range(n):
for j in range(n+1):
a[i][j] = float(input( 'a['+str(i)+']['+ str(j)+']='))
for... | [
"numpy.zeros",
"sys.exit"
] | [((130, 150), 'numpy.zeros', 'np.zeros', (['(n, n + 1)'], {}), '((n, n + 1))\n', (138, 150), True, 'import numpy as np\n'), ((152, 163), 'numpy.zeros', 'np.zeros', (['n'], {}), '(n)\n', (160, 163), True, 'import numpy as np\n'), ((367, 403), 'sys.exit', 'sys.exit', (['"""Divide by zero detected!"""'], {}), "('Divide by... |
# -*- coding: utf-8 -*-
"""
Created on Fri Mar 4 15:18:10 2022
This program detects the poses oh human body
@author: <NAME>
"""
import cv2
import pickle
import mediapipe as mp
import numpy as np
mp_drawing = mp.solutions.drawing_utils
mp_drawing_styles = mp.solutions.drawing_styles
mp_pose = mp.solutio... | [
"cv2.cvtColor",
"cv2.waitKey",
"cv2.VideoCapture",
"numpy.around",
"numpy.array",
"cv2.flip"
] | [((358, 377), 'cv2.VideoCapture', 'cv2.VideoCapture', (['(0)'], {}), '(0)\n', (374, 377), False, 'import cv2\n'), ((890, 928), 'cv2.cvtColor', 'cv2.cvtColor', (['image', 'cv2.COLOR_BGR2RGB'], {}), '(image, cv2.COLOR_BGR2RGB)\n', (902, 928), False, 'import cv2\n'), ((1109, 1147), 'cv2.cvtColor', 'cv2.cvtColor', (['image... |
import re
from datetime import timedelta, datetime
from functools import partial
from typing import Callable
import numpy as np
from scipy import stats
from matilda import total_assets, earnings_per_share
from matilda.data_pipeline.db_crud import *
def mean_over_time(metric, how_many_periods=5, geometric=False, int... | [
"scipy.stats.percentileofscore",
"numpy.mean",
"datetime.timedelta",
"scipy.stats.gmean"
] | [((326, 344), 'datetime.timedelta', 'timedelta', ([], {'days': '(90)'}), '(days=90)\n', (335, 344), False, 'from datetime import timedelta, datetime\n'), ((989, 1006), 'datetime.timedelta', 'timedelta', ([], {'days': '(0)'}), '(days=0)\n', (998, 1006), False, 'from datetime import timedelta, datetime\n'), ((844, 860), ... |
#!/usr/bin/env python
# Built-in imports
import sys
# Own imports
import baxter_essentials.baxter_class as bc
# General module imports
import numpy as np
import rospy
from sensor_msgs.msg import JointState
def joint_states_callback(event):
"""
Callback to create a global variable to save current joint_stat... | [
"rospy.Subscriber",
"numpy.array2string",
"rospy.Rate",
"baxter_essentials.baxter_class.BaxterClass",
"rospy.is_shutdown",
"rospy.init_node"
] | [((1136, 1185), 'rospy.init_node', 'rospy.init_node', (['"""baxter_mapping"""'], {'anonymous': '(True)'}), "('baxter_mapping', anonymous=True)\n", (1151, 1185), False, 'import rospy\n'), ((1190, 1264), 'rospy.Subscriber', 'rospy.Subscriber', (['"""/robot/joint_states"""', 'JointState', 'joint_states_callback'], {}), "(... |
#!/usr/bin/env python
# The MIT License (MIT)
# Copyright (c) 2020 <NAME>
# Paper: "Self-Supervised Relational Reasoning for Representation Learning", <NAME> & <NAME>, NeurIPS 2020
# GitHub: https://github.com/mpatacchiola/self-supervised-relational-reasoning
# Manage the linear evaluation phase on different datasets... | [
"methods.standard.StandardModel",
"numpy.random.seed",
"datamanager.DataManager",
"argparse.ArgumentParser",
"torch.manual_seed",
"torch.load",
"torch.cuda.manual_seed",
"backbones.conv4.Conv4",
"torch.cuda.device_count",
"torch.cuda.manual_seed_all",
"random.seed",
"torch.cuda.is_available",
... | [((732, 795), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Linear evaluation script"""'}), "(description='Linear evaluation script')\n", (755, 795), False, 'import argparse\n'), ((3001, 3023), 'datamanager.DataManager', 'DataManager', (['args.seed'], {}), '(args.seed)\n', (3012, 3023),... |
"""Extensions of the scikit-learn Pipelines, so they can be used with Pandas."""
import warnings
import numpy as np
import pandas as pd
from joblib import Parallel, delayed
from scipy import sparse
from sklearn.pipeline import FeatureUnion, _fit_transform_one, _transform_one
class PandasFeatureUnion(FeatureUnion):
... | [
"scipy.sparse.issparse",
"numpy.zeros",
"joblib.Parallel",
"warnings.warn",
"joblib.delayed",
"scipy.sparse.hstack",
"pandas.concat"
] | [((1443, 1484), 'pandas.concat', 'pd.concat', (['Xs'], {'axis': '"""columns"""', 'copy': '(False)'}), "(Xs, axis='columns', copy=False)\n", (1452, 1484), True, 'import pandas as pd\n'), ((962, 987), 'numpy.zeros', 'np.zeros', (['(X.shape[0], 0)'], {}), '((X.shape[0], 0))\n', (970, 987), True, 'import numpy as np\n'), (... |
'''
Created on 22 Jan 2013
.. codeauthor:: jhkwakkel <j.h.kwakkel (at) tudelft (dot) nl>
'''
from __future__ import (absolute_import, print_function, division,
unicode_literals)
import random
import unittest
import numpy as np
from ema_workbench.em_framework.callbacks import DefaultCallback
f... | [
"unittest.main",
"ema_workbench.em_framework.outcomes.ScalarOutcome",
"ema_workbench.em_framework.outcomes.TimeSeriesOutcome",
"numpy.random.rand",
"ema_workbench.em_framework.util.NamedObject",
"ema_workbench.em_framework.parameters.CategoricalParameter",
"ema_workbench.em_framework.parameters.IntegerP... | [((7807, 7822), 'unittest.main', 'unittest.main', ([], {}), '()\n', (7820, 7822), False, 'import unittest\n'), ((1157, 1212), 'ema_workbench.em_framework.callbacks.DefaultCallback', 'DefaultCallback', (['uncs', '[]', 'outcomes'], {'nr_experiments': '(100)'}), '(uncs, [], outcomes, nr_experiments=100)\n', (1172, 1212), ... |
"""
# Fig_X_x (movementID, jointIndex)
# this .py script is suitable for movements and joints as follows:
Fig_7_1 (m01, 18), Fig_7_3 (m02, 18)
Fig_8_1 (m03, 19)
Fig_9_1 (m05, 18)
Fig_10_1 (m07, 7)
Fig_11_1 (m09, 20)
Fig_12_1 (m11, 3)
Fig_13_1 (m12, 20)
... | [
"matplotlib.pyplot.xlim",
"json.load",
"scipy.stats.zscore",
"scipy.signal.filtfilt",
"matplotlib.pyplot.plot",
"numpy.empty",
"matplotlib.font_manager.fontManager.addfont",
"matplotlib.pyplot.figure",
"numpy.mean",
"scipy.interpolate.interp1d",
"numpy.linspace",
"matplotlib.pyplot.ylabel",
... | [((1039, 1070), 'os.listdir', 'os.listdir', (['all_json_files_path'], {}), '(all_json_files_path)\n', (1049, 1070), False, 'import os\n'), ((3178, 3194), 'numpy.empty', 'np.empty', (['(0, 1)'], {}), '((0, 1))\n', (3186, 3194), True, 'import numpy as np\n'), ((5579, 5637), 'scipy.stats.zscore', 'stats.zscore', (['single... |
from csv_parser import Parser
import random
a = Parser('transport_data.csv')
a.open()
dots = a.get_data()
zero = []
first = []
second = []
q = []
for dot in dots:
if dot.label == '0':
zero.append(dot)
if dot.label == '1':
first.append(dot)
if dot.label == '2':
second.append(dot)
... | [
"keras.optimizers.rmsprop",
"numpy.load",
"random.shuffle",
"sklearn.model_selection.train_test_split",
"numpy.linalg.norm",
"sys.stdout.flush",
"keras.layers.Flatten",
"csv_parser.Parser",
"keras.utils.np_utils.to_categorical",
"keras.layers.MaxPooling2D",
"numpy.save",
"matplotlib.pyplot.sho... | [((48, 76), 'csv_parser.Parser', 'Parser', (['"""transport_data.csv"""'], {}), "('transport_data.csv')\n", (54, 76), False, 'from csv_parser import Parser\n'), ((392, 412), 'random.shuffle', 'random.shuffle', (['dots'], {}), '(dots)\n', (406, 412), False, 'import random\n'), ((1747, 1766), 'numpy.load', 'np.load', (['"... |
# external imports
import numpy as np
from scipy.optimize import nnls
def pnnls(A, B, c):
"""
Solves the Partial Non-Negative Least Squares problem min_{u, v} ||A v + B u - c||_2^2 s.t. v >= 0.
(See "Bemporad - A Multiparametric Quadratic Programming Algorithm With Polyhedral Computations Based on Nonnegat... | [
"numpy.zeros",
"numpy.where",
"numpy.linalg.inv",
"numpy.reshape",
"numpy.eye",
"numpy.linalg.pinv",
"numpy.vstack",
"numpy.linalg.cholesky"
] | [((822, 839), 'numpy.linalg.pinv', 'np.linalg.pinv', (['B'], {}), '(B)\n', (836, 839), True, 'import numpy as np\n'), ((1003, 1033), 'numpy.reshape', 'np.reshape', (['v', '(A.shape[1], 1)'], {}), '(v, (A.shape[1], 1))\n', (1013, 1033), True, 'import numpy as np\n'), ((4325, 4349), 'numpy.vstack', 'np.vstack', (['(0.0, ... |
from os.path import splitext
from os import listdir
import numpy as np
from glob import glob
import torch
from torch.utils.data import Dataset
import logging
from PIL import Image
from torchvision import transforms
import random
import cv2
import numpy as np
import matplotlib.pyplot as plt
class BasicDataset(Dataset... | [
"torch.from_numpy",
"cv2.dilate",
"random.sample",
"torch.FloatTensor",
"numpy.ones",
"numpy.expand_dims",
"PIL.Image.open",
"numpy.array",
"os.path.splitext",
"glob.glob",
"cv2.erode",
"os.listdir",
"torchvision.transforms.Resize"
] | [((1695, 1712), 'numpy.array', 'np.array', (['pil_img'], {}), '(pil_img)\n', (1703, 1712), True, 'import numpy as np\n'), ((2088, 2113), 'numpy.ones', 'np.ones', (['(5, 5)', 'np.uint8'], {}), '((5, 5), np.uint8)\n', (2095, 2113), True, 'import numpy as np\n'), ((3282, 3334), 'glob.glob', 'glob', (["(self.masks_dir + id... |
#-*- encoding: utf-8 -*-
'''
Created on Apr 5, 2015
This is the file controller
@author: jiang
'''
from PIL import Image
import numpy
import json
from PyQt4 import QtGui, QtCore
from libs import lepttool
class FileMgr:
def __init__(self,parent = None):
'''
initialize
'''
self.lepto... | [
"json.dump",
"json.load",
"PyQt4.QtGui.QDesktopServices.storageLocation",
"PyQt4.QtCore.QFileInfo",
"PyQt4.QtGui.QFileDialog.getOpenFileName",
"os.path.realpath",
"libs.lepttool.get_leptonica",
"PyQt4.QtGui.QFileDialog.getSaveFileName",
"PIL.Image.open",
"numpy.array"
] | [((327, 351), 'libs.lepttool.get_leptonica', 'lepttool.get_leptonica', ([], {}), '()\n', (349, 351), False, 'from libs import lepttool\n'), ((2830, 2857), 'PIL.Image.open', 'Image.open', (['self.image_name'], {}), '(self.image_name)\n', (2840, 2857), False, 'from PIL import Image\n'), ((2990, 3006), 'numpy.array', 'num... |
import numpy as np
import matplotlib.pyplot as plt
import sys
import random
#data_stream = 'rbf_fast'
N_STREAMS = 10
data_stream_ = 1
streams = ['agrawal', 'hyperplane', 'led', 'rbf_slow', 'rbf_fast', 'sea']
#data_stream = streams[data_stream_]
print('\n\t----------------------------')
print('\tData Stream: === ' + st... | [
"numpy.load",
"matplotlib.pyplot.show",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.legend",
"random.random",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.rcParams.update",
"numpy.mean",
"matplotlib.pyplot.grid"
] | [((1142, 1180), 'matplotlib.pyplot.rcParams.update', 'plt.rcParams.update', (["{'font.size': 20}"], {}), "({'font.size': 20})\n", (1161, 1180), True, 'import matplotlib.pyplot as plt\n'), ((1187, 1215), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(20, 12)'}), '(figsize=(20, 12))\n', (1197, 1215), True, ... |
import vcs, numpy, os, sys, vcs.testing.regression as regression
s = numpy.sin(numpy.arange(100))
s = numpy.reshape(s,(10,10))
s = numpy.ma.masked_greater(s,.5)
x = regression.init()
x.plot(s, bg=1)
regression.run(x, "test_vcs_boxfill_10x10_masked_numpy.png") | [
"vcs.testing.regression.run",
"numpy.ma.masked_greater",
"vcs.testing.regression.init",
"numpy.arange",
"numpy.reshape"
] | [((103, 129), 'numpy.reshape', 'numpy.reshape', (['s', '(10, 10)'], {}), '(s, (10, 10))\n', (116, 129), False, 'import vcs, numpy, os, sys, vcs.testing.regression as regression\n'), ((132, 163), 'numpy.ma.masked_greater', 'numpy.ma.masked_greater', (['s', '(0.5)'], {}), '(s, 0.5)\n', (155, 163), False, 'import vcs, num... |
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 05 22:45:42 2016
@author: roosv_000
Labels per photo are predited with an SVM, this script uses these prediced labels per photo to create a vector (normalized histogram)
respresenting the label predictions per business. The business feature vectors are in the output data... | [
"pandas.DataFrame",
"numpy.load",
"pandas.np.array",
"numpy.sum",
"pandas.read_csv",
"numpy.zeros",
"numpy.amax",
"numpy.where",
"numpy.arange",
"numpy.array"
] | [((447, 583), 'pandas.read_csv', 'pd.read_csv', (['"""C:/Users/roosv_000/Documents/TeamGreaterThanBrains/Scripts/Labels per photo/train_photo_to_biz_ids.csv"""'], {'sep': '""";"""'}), "(\n 'C:/Users/roosv_000/Documents/TeamGreaterThanBrains/Scripts/Labels per photo/train_photo_to_biz_ids.csv'\n , sep=';')\n", (45... |
from abc import *
from pathlib import Path
import pickle
import os
from tqdm import trange
import numpy as np
from collections import Counter
class AbstractNegativeSampler(metaclass=ABCMeta):
def __init__(self, train, val, test, user_count, item_count, sample_size, seed, flag, save_folder):
self.train = t... | [
"pickle.dump",
"numpy.random.seed",
"tqdm.trange",
"pathlib.Path",
"numpy.random.choice",
"collections.Counter",
"os.path.join"
] | [((5532, 5595), 'os.path.join', 'os.path.join', (['FEATURES_ROOT_FOLDER', '"""ml-1m"""', '"""negative_samples"""'], {}), "(FEATURES_ROOT_FOLDER, 'ml-1m', 'negative_samples')\n", (5544, 5595), False, 'import os\n'), ((1131, 1151), 'pathlib.Path', 'Path', (['self.save_path'], {}), '(self.save_path)\n', (1135, 1151), Fals... |
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | [
"unittest.main",
"numpy.random.randn",
"paddlespeech.s2t.models.ds2.DeepSpeech2Model",
"numpy.random.randint",
"numpy.array",
"paddle.set_device",
"paddle.to_tensor"
] | [((3463, 3478), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3476, 3478), False, 'import unittest\n'), ((796, 820), 'paddle.set_device', 'paddle.set_device', (['"""cpu"""'], {}), "('cpu')\n", (813, 820), False, 'import paddle\n'), ((936, 992), 'numpy.random.randn', 'np.random.randn', (['self.batch_size', 'max_l... |
import scipy.ndimage.filters
import pyredner
import numpy as np
import torch
pyredner.set_use_gpu(torch.cuda.is_available())
scene = pyredner.load_mitsuba('scenes/bunny_box.xml')
scene.shapes[-1].vertices += torch.tensor([0, 0.01, 0], device = pyredner.get_device())
args=pyredner.RenderFunction.serialize_scene(\
... | [
"torch.mean",
"pyredner.imread",
"torch.t",
"pyredner.RenderFunction.serialize_scene",
"pyredner.get_device",
"numpy.zeros",
"pyredner.gen_rotate_matrix",
"torch.nn.functional.conv2d",
"torch.optim.Adam",
"subprocess.call",
"torch.cuda.is_available",
"pyredner.load_mitsuba",
"torch.nn.AvgPoo... | [((135, 180), 'pyredner.load_mitsuba', 'pyredner.load_mitsuba', (['"""scenes/bunny_box.xml"""'], {}), "('scenes/bunny_box.xml')\n", (156, 180), False, 'import pyredner\n'), ((276, 365), 'pyredner.RenderFunction.serialize_scene', 'pyredner.RenderFunction.serialize_scene', ([], {'scene': 'scene', 'num_samples': '(1024)',... |
import argparse
import time
import socket
import pickle
import struct
import pprint
import copy
import pdb
import tqdm
import json
import os,sys,inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.join(os.path.dirname(currentdir),'src')
sys.path.insert(0,p... | [
"utils.builder.ExperimentBuilder",
"argparse.ArgumentParser",
"socket.socket",
"json.dumps",
"pprint.pprint",
"utils.utils.set_torch_seed",
"os.path.join",
"utils.utils.set_gpu",
"numpy.unique",
"os.path.abspath",
"utils.utils.get_strategy",
"os.path.dirname",
"struct.pack",
"utils.bunch.b... | [((301, 330), 'sys.path.insert', 'sys.path.insert', (['(0)', 'parentdir'], {}), '(0, parentdir)\n', (316, 330), False, 'import sys\n'), ((266, 293), 'os.path.dirname', 'os.path.dirname', (['currentdir'], {}), '(currentdir)\n', (281, 293), False, 'import os, sys, inspect\n'), ((943, 963), 'os.path.abspath', 'os.path.abs... |
import numpy as np
import pandas as pd
from simulation import LotkaVolterra as LV
import os
lv_simulator = LV(true_param=(2.0, 1.0, 4.0, 1.0),
noise_variance=0.1**2)
states_obs, t_obs = lv_simulator.observe(initial_state=(5.0, 3.0),
initial_time=0.0,
... | [
"numpy.savetxt",
"simulation.LotkaVolterra"
] | [((109, 169), 'simulation.LotkaVolterra', 'LV', ([], {'true_param': '(2.0, 1.0, 4.0, 1.0)', 'noise_variance': '(0.1 ** 2)'}), '(true_param=(2.0, 1.0, 4.0, 1.0), noise_variance=0.1 ** 2)\n', (111, 169), True, 'from simulation import LotkaVolterra as LV\n'), ((738, 767), 'numpy.savetxt', 'np.savetxt', (['"""time.csv"""',... |
'''
Extracting Apple Watch Health Data
'''
import os
from datetime import datetime
from xml.dom import minidom
import numpy as np
import pandas as pd
class AppleWatchData(object):
'''
Object to contain all relevant data access calls for Apple Watch health data.
'''
# TODO: make parsing of xml file a he... | [
"pandas.DataFrame",
"xml.dom.minidom.parse",
"datetime.datetime.strptime",
"numpy.array",
"os.path.expanduser",
"pandas.to_numeric"
] | [((1004, 1033), 'xml.dom.minidom.parse', 'minidom.parse', (['self.file_path'], {}), '(self.file_path)\n', (1017, 1033), False, 'from xml.dom import minidom\n'), ((3462, 3482), 'numpy.array', 'np.array', (['apple_data'], {}), '(apple_data)\n', (3470, 3482), True, 'import numpy as np\n'), ((3808, 3822), 'pandas.DataFrame... |
#!/usr/bin/env python
from __future__ import print_function
import pyaudio
import wave
import numpy as np
import usb.core
import struct
import time
import os
import sys
from contextlib import contextmanager
import stretch_body.hello_utils as hu
hu.print_stretch_re_use()
@contextmanager
def ignore_stderr():
devnul... | [
"wave.open",
"os.open",
"os.dup2",
"os.dup",
"time.sleep",
"os.close",
"pyaudio.PyAudio",
"sys.stderr.flush",
"numpy.fromstring",
"stretch_body.hello_utils.print_stretch_re_use"
] | [((245, 270), 'stretch_body.hello_utils.print_stretch_re_use', 'hu.print_stretch_re_use', ([], {}), '()\n', (268, 270), True, 'import stretch_body.hello_utils as hu\n'), ((8566, 8583), 'pyaudio.PyAudio', 'pyaudio.PyAudio', ([], {}), '()\n', (8581, 8583), False, 'import pyaudio\n'), ((9194, 9211), 'pyaudio.PyAudio', 'py... |
# ---
# jupyter:
# jupytext:
# formats: ipynb,py:light
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.4.2
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
import torch
from PIL imp... | [
"matplotlib.pyplot.title",
"torch.cat",
"matplotlib.pyplot.figure",
"torch.device",
"torch.ones",
"torch.nn.BCELoss",
"torch.squeeze",
"torch.nn.Linear",
"torch.zeros",
"matplotlib.pyplot.show",
"torch.nn.Tanh",
"torch.nn.BatchNorm1d",
"torch.nn.Conv2d",
"torch.nn.BatchNorm2d",
"torch.cu... | [((581, 601), 'torch.device', 'torch.device', (['"""cuda"""'], {}), "('cuda')\n", (593, 601), False, 'import torch\n'), ((613, 672), 'PIL.Image.open', 'Image.open', (['"""../data/processed/img_align_celeba/000002.jpg"""'], {}), "('../data/processed/img_align_celeba/000002.jpg')\n", (623, 672), False, 'from PIL import I... |
import numpy as np
np.random.seed(204)
import time
import os
import psutil
import argparse
# Instantiate the parser
parser = argparse.ArgumentParser(description='Number of processors.')
parser.add_argument('nproc', nargs='?', type=int, default=4,
help='Number of parallel workers')
parser... | [
"numpy.load",
"numpy.save",
"numpy.random.seed",
"argparse.ArgumentParser",
"numpy.std",
"numpy.asarray",
"numpy.allclose",
"numpy.zeros",
"time.time",
"os.path.isfile",
"numpy.mean",
"numpy.arange",
"numpy.array",
"numpy.cos",
"numpy.sin",
"numpy.exp",
"psutil.cpu_count",
"numpy.s... | [((20, 39), 'numpy.random.seed', 'np.random.seed', (['(204)'], {}), '(204)\n', (34, 39), True, 'import numpy as np\n'), ((134, 194), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Number of processors."""'}), "(description='Number of processors.')\n", (157, 194), False, 'import argparse\... |
# -*- coding: utf-8 -*-
"""
Created on Fri Mar 22 15:33:15 2019
@author: salilsharma
"""
import json
import requests
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import time
from localfunctions import*
from clusterAlgorithm import*
import math
from scipy.io import loadmat
... | [
"pandas.read_pickle",
"numpy.floor",
"matplotlib.pyplot.plot",
"pandas.read_excel"
] | [((1238, 1276), 'pandas.read_pickle', 'pd.read_pickle', (["(Masterpath + 'xxx.pkl')"], {}), "(Masterpath + 'xxx.pkl')\n", (1252, 1276), True, 'import pandas as pd\n'), ((2273, 2293), 'numpy.floor', 'np.floor', (["df3['TOA']"], {}), "(df3['TOA'])\n", (2281, 2293), True, 'import numpy as np\n'), ((4893, 4929), 'matplotli... |
import numpy as np
from PIL import Image
from loguru import logger
from src.util.image_util import overlay_image, cut_image
def reposition_horse_texture(RES_R,
dir,
file):
"""
Repositions the elements in the horse textures
:param RES_R:
:para... | [
"src.util.image_util.cut_image",
"loguru.logger.error",
"numpy.zeros",
"PIL.Image.open",
"loguru.logger.info",
"numpy.array",
"PIL.Image.fromarray"
] | [((369, 408), 'loguru.logger.info', 'logger.info', (['f"""Repositioning {file}..."""'], {}), "(f'Repositioning {file}...')\n", (380, 408), False, 'from loguru import logger\n'), ((582, 597), 'numpy.array', 'np.array', (['h_img'], {}), '(h_img)\n', (590, 597), True, 'import numpy as np\n'), ((617, 670), 'numpy.zeros', '... |
#! /usr/bin/env python3
"""
Describe Tub files found in one or more directories.
"""
import os
import time
import argparse
import json
from datetime import datetime
from pathlib import Path
import numpy as np
import donkeycar as dk
from donkeycar.parts.datastore import Tub
from donkeycar.parts.tub_v2 import Tub as Tub... | [
"os.path.expanduser",
"json.load",
"numpy.sum",
"argparse.ArgumentParser",
"os.path.basename",
"os.path.isdir",
"numpy.std",
"os.path.exists",
"donkeycar.parts.tub_v2.Tub",
"donkeycar.parts.datastore.Tub.get_angle_throttle",
"numpy.mean",
"numpy.min",
"numpy.max",
"datetime.datetime.fromti... | [((2207, 2234), 'os.path.basename', 'os.path.basename', (['base_path'], {}), '(base_path)\n', (2223, 2234), False, 'import os\n'), ((4175, 4195), 'os.path.isdir', 'os.path.isdir', (['apath'], {}), '(apath)\n', (4188, 4195), False, 'import os\n'), ((4964, 5121), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([],... |
import base64, cv2, json, flask, time
import numpy as np
# from PIL import Image
from flask import Flask, request
from urllib.parse import unquote
from google.cloud import firestore
from elasticsearch import Elasticsearch
import tflite_runtime.interpreter as tflite
es = Elasticsearch(["http://172.16.58.3:9200/"])
emot... | [
"elasticsearch.Elasticsearch",
"urllib.parse.unquote",
"flask.request.form.getlist",
"numpy.argmax",
"numpy.frombuffer",
"flask.Flask",
"numpy.zeros",
"cv2.imdecode",
"base64.b64decode",
"numpy.expand_dims",
"google.cloud.firestore.Client",
"time.time",
"flask.jsonify",
"numpy.array",
"t... | [((272, 315), 'elasticsearch.Elasticsearch', 'Elasticsearch', (["['http://172.16.58.3:9200/']"], {}), "(['http://172.16.58.3:9200/'])\n", (285, 315), False, 'from elasticsearch import Elasticsearch\n'), ((428, 443), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (433, 443), False, 'from flask import Flask,... |
# Copyright 1999-2021 Alibaba Group Holding 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 a... | [
"pandas.date_range",
"datetime.datetime",
"mars.core.enter_mode",
"pytest.raises",
"numpy.random.rand"
] | [((926, 948), 'mars.core.enter_mode', 'enter_mode', ([], {'build': '(True)'}), '(build=True)\n', (936, 948), False, 'from mars.core import enter_mode\n'), ((837, 857), 'numpy.random.rand', 'np.random.rand', (['(4)', '(3)'], {}), '(4, 3)\n', (851, 857), True, 'import numpy as np\n'), ((893, 913), 'numpy.random.rand', 'n... |
from __future__ import division
from mujoco_py import load_model_from_path, MjSim
import random
import math
import time
import os
import numpy as np
from scipy.misc import imsave
import matplotlib as mpl
from scipy.misc.pilutil import imshow
import logging
import copy
import gym
import cv2
initial_pos = [0.1, -50 / 18... | [
"mujoco_py.MjSim",
"math.isnan",
"mujoco_py.load_model_from_path",
"math.sqrt",
"math.atan2",
"numpy.random.randn",
"math.sin",
"numpy.where",
"math.cos",
"scipy.misc.pilutil.imshow"
] | [((493, 517), 'math.cos', 'math.cos', (['(math.pi * 0.16)'], {}), '(math.pi * 0.16)\n', (501, 517), False, 'import math\n'), ((525, 549), 'math.sin', 'math.sin', (['(math.pi * 0.16)'], {}), '(math.pi * 0.16)\n', (533, 549), False, 'import math\n'), ((582, 606), 'math.cos', 'math.cos', (['(math.pi * 0.18)'], {}), '(math... |
"""
Quadrat statistics for planar point patterns
TODO
- use patch in matplotlib to plot rectangles and hexagons
- plot chi2 statistics in each cell
- delete those cells that do not intersect with the window (study area)
"""
__author__ = "<NAME>, <NAME>, <NAME>"
__all__ = ["RectangleM", "HexagonM", "QStatistic"]
f... | [
"matplotlib.pyplot.show",
"math.ceil",
"numpy.asarray",
"numpy.array",
"math.cos"
] | [((2424, 2445), 'numpy.asarray', 'np.asarray', (['pp.points'], {}), '(pp.points)\n', (2434, 2445), True, 'import numpy as np\n'), ((5667, 5677), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (5675, 5677), True, 'from matplotlib import pyplot as plt\n'), ((6817, 6838), 'numpy.asarray', 'np.asarray', (['pp.poin... |
import random
import pytest
import numpy as np
torch = pytest.importorskip("torch")
from eight_mile.pytorch.layers import VariationalDropout
@pytest.fixture
def input_():
SEQ_LEN = random.randint(20, 101)
BATCH_SIZE = random.randint(5, 21)
FEAT_SIZE = random.choice([128, 256, 300])
return torch.randn... | [
"pytest.importorskip",
"random.randint",
"eight_mile.pytorch.layers.VariationalDropout",
"random.choice",
"numpy.arange"
] | [((56, 84), 'pytest.importorskip', 'pytest.importorskip', (['"""torch"""'], {}), "('torch')\n", (75, 84), False, 'import pytest\n'), ((188, 211), 'random.randint', 'random.randint', (['(20)', '(101)'], {}), '(20, 101)\n', (202, 211), False, 'import random\n'), ((229, 250), 'random.randint', 'random.randint', (['(5)', '... |
import numpy as np
from reframed.core.transformation import disconnected_metabolites
from carveme.reconstruction.utils import create_exchange_reactions, add_biomass_equation, create_sink_reactions, \
add_maintenance_atp
from reframed import simplify
from reframed import save_cbmodel
from carveme.universe.thermodyna... | [
"carveme.reconstruction.utils.add_maintenance_atp",
"numpy.median",
"carveme.universe.thermodynamics.compute_flux_bounds",
"reframed.core.elements.parse_formula",
"reframed.save_cbmodel",
"reframed.simplify",
"carveme.reconstruction.utils.create_sink_reactions",
"carveme.reconstruction.utils.add_bioma... | [((14446, 14513), 'carveme.reconstruction.utils.create_exchange_reactions', 'create_exchange_reactions', (['model'], {'default_lb': '(-1000)', 'default_ub': '(1000)'}), '(model, default_lb=-1000, default_ub=1000)\n', (14471, 14513), False, 'from carveme.reconstruction.utils import create_exchange_reactions, add_biomass... |
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from sparse_ho.utils_plot import configure_plt
configure_plt()
# save_fig = False
# save_fig_grid = True
save_fig_grid = False
# save_fig = True
save_fig_grad = True
# save_fig_grad = False
fig_dir = "../../../CD_SUGAR/tex/slides_qbe_long/prebu... | [
"matplotlib.pyplot.xscale",
"matplotlib.pyplot.tight_layout",
"numpy.load",
"matplotlib.pyplot.show",
"matplotlib.pyplot.yticks",
"sparse_ho.utils_plot.configure_plt",
"seaborn.color_palette",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xticks",
"matplotlib.pyplot.subplots"
] | [((122, 137), 'sparse_ho.utils_plot.configure_plt', 'configure_plt', ([], {}), '()\n', (135, 137), False, 'from sparse_ho.utils_plot import configure_plt\n'), ((414, 445), 'seaborn.color_palette', 'sns.color_palette', (['"""colorblind"""'], {}), "('colorblind')\n", (431, 445), True, 'import seaborn as sns\n'), ((463, 4... |
import unittest
import numpy as np
import numpy.testing as npt
from uts import ema
class TestEMA(unittest.TestCase):
def test_ema_next(self):
values = np.array([[0.0, 0.0], [1.0, 2.0],
[1.2, 4.0], [2.3, 6], [2.9, 8], [5, 10]])
result = ema.next(values, 1.5)
desired = n... | [
"unittest.main",
"uts.ema.linear",
"uts.ema.next",
"numpy.testing.assert_almost_equal",
"numpy.array",
"uts.ema.last"
] | [((1209, 1224), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1222, 1224), False, 'import unittest\n'), ((175, 250), 'numpy.array', 'np.array', (['[[0.0, 0.0], [1.0, 2.0], [1.2, 4.0], [2.3, 6], [2.9, 8], [5, 10]]'], {}), '([[0.0, 0.0], [1.0, 2.0], [1.2, 4.0], [2.3, 6], [2.9, 8], [5, 10]])\n', (183, 250), True, '... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Example code showing light propagating through a set of polarizers
import matplotlib.pyplot as plt
import numpy as np
import time
import macromax
try:
from examples import log
except ImportError:
from macromax import log # Fallback in case this script is not... | [
"macromax.log.info",
"numpy.abs",
"macromax.solve",
"numpy.imag",
"numpy.sin",
"numpy.arange",
"numpy.linalg.norm",
"matplotlib.pyplot.draw",
"numpy.finfo",
"numpy.real",
"matplotlib.pyplot.pause",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.show",
"time.perf_counter",
"numpy.mod",
... | [((861, 890), 'numpy.eye', 'np.eye', (['(3)'], {'dtype': 'np.complex64'}), '(3, dtype=np.complex64)\n', (867, 890), True, 'import numpy as np\n'), ((1548, 1649), 'macromax.bound.LinearBound', 'macromax.bound.LinearBound', (['x_range'], {'thickness': 'boundary_thickness', 'max_extinction_coefficient': '(0.3)'}), '(x_ran... |
# ------------------------------------------------------------------------------
# Copyright (c) Microsoft
# Licensed under the MIT License.
# Written by <NAME> and <NAME>
# Email: <EMAIL>
# siamrpn class
# ------------------------------------------------------------------------------
import torch
import numpy ... | [
"utils.utils.generate_anchor",
"numpy.maximum",
"numpy.expand_dims",
"numpy.ones",
"utils.utils.python2round",
"torch.sigmoid",
"numpy.mean",
"numpy.array",
"numpy.exp",
"utils.utils.get_subwindow_tracking",
"numpy.hanning",
"numpy.sqrt",
"numpy.repeat"
] | [((2069, 2134), 'utils.utils.generate_anchor', 'generate_anchor', (['p.total_stride', 'p.scales', 'p.ratios', 'p.score_size'], {}), '(p.total_stride, p.scales, p.ratios, p.score_size)\n', (2084, 2134), False, 'from utils.utils import load_yaml, get_subwindow_tracking, python2round, generate_anchor\n'), ((2158, 2182), '... |
# Copyright (c) Microsoft Corporation
# Licensed under the MIT License.
import pytest
import numpy as np
from raiwidgets.fairness_metric_calculation import (
compute_wilson_bounds, recall_wilson,
precision_wilson, false_positive_rate_wilson,
true_negative_rate_wilson, false_negative_rate_wilson,
mse_st... | [
"raiwidgets.fairness_metric_calculation.precision_wilson",
"raiwidgets.fairness_metric_calculation.recall_wilson",
"raiwidgets.fairness_metric_calculation.compute_wilson_bounds",
"pytest.fixture",
"raiwidgets.fairness_metric_calculation.false_positive_rate_wilson",
"raiwidgets.fairness_metric_calculation.... | [((359, 375), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (373, 375), False, 'import pytest\n'), ((508, 524), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (522, 524), False, 'import pytest\n'), ((413, 453), 'numpy.array', 'np.array', (['[0, 1, 1, 1, 0, 1, 0, 1, 0, 0]'], {}), '([0, 1, 1, 1, 0, 1, 0, 1... |
from os.path import abspath
import math
import numpy as np
from keras import Sequential
from keras.layers import Dense
from keras.utils.np_utils import to_categorical
from src.learn.BaseLearn import BaseLearn
from src.play.model.Board import EMPTY, BLACK, WHITE
EMPTY_val = 0.45
BLACK_val = -1.35
WHITE_val = 1.05
CE... | [
"os.path.abspath",
"keras.Sequential",
"math.floor",
"keras.utils.np_utils.to_categorical",
"keras.layers.Dense",
"numpy.array",
"numpy.dot"
] | [((327, 344), 'numpy.array', 'np.array', (['[4, -4]'], {}), '([4, -4])\n', (335, 344), True, 'import numpy as np\n'), ((363, 389), 'numpy.array', 'np.array', (['[[1, 0], [0, 1]]'], {}), '([[1, 0], [0, 1]])\n', (371, 389), True, 'import numpy as np\n'), ((405, 432), 'numpy.array', 'np.array', (['[[0, -1], [1, 0]]'], {})... |
import torch
import unittest
import numpy as np
import warp_rnnt._C as warp_rnnt_core
xs = torch.tensor([], dtype=torch.float32)
ys = torch.tensor([], dtype=torch.int)
xn = torch.tensor([], dtype=torch.int)
yn = torch.tensor([], dtype=torch.int)
class WRNNTLossTest(unittest.TestCase):
def test_contiguous(self)... | [
"unittest.main",
"warp_rnnt._C.rnnt_loss",
"numpy.zeros",
"numpy.random.RandomState",
"numpy.array",
"torch.nn.functional.log_softmax",
"torch.tensor"
] | [((93, 130), 'torch.tensor', 'torch.tensor', (['[]'], {'dtype': 'torch.float32'}), '([], dtype=torch.float32)\n', (105, 130), False, 'import torch\n'), ((136, 169), 'torch.tensor', 'torch.tensor', (['[]'], {'dtype': 'torch.int'}), '([], dtype=torch.int)\n', (148, 169), False, 'import torch\n'), ((175, 208), 'torch.tens... |
import numpy as np
from pathlib import Path
import dill
import os
from dotenv import find_dotenv, load_dotenv
dotenv_path = find_dotenv()
load_dotenv(dotenv_path)
FEATURE_EXTRACTOR_DIRECTORY = Path(os.environ.get('FEATURE_EXTRACTOR_DIRECTORY')).expanduser()
PROCESSED_DATA_DIRECTORY = Path(os.environ.get('PROCESSED_DA... | [
"numpy.load",
"dotenv.find_dotenv",
"dill.load",
"dotenv.load_dotenv",
"os.environ.get",
"dill.dump"
] | [((125, 138), 'dotenv.find_dotenv', 'find_dotenv', ([], {}), '()\n', (136, 138), False, 'from dotenv import find_dotenv, load_dotenv\n'), ((139, 163), 'dotenv.load_dotenv', 'load_dotenv', (['dotenv_path'], {}), '(dotenv_path)\n', (150, 163), False, 'from dotenv import find_dotenv, load_dotenv\n'), ((200, 245), 'os.envi... |
import os
import glob
import pickle
import re
# Our numerical workhorses
import numpy as np
import pandas as pd
# Import the project utils
import sys
sys.path.insert(0, '../')
import NB_sortseq_utils as utils
# Import matplotlib stuff for plotting
import matplotlib.pyplot as plt
import matplotlib.cm as cm
from IPyth... | [
"NB_sortseq_utils.set_plotting_style4",
"NB_sortseq_utils.cm2inch",
"pandas.read_csv",
"sys.path.insert",
"numpy.arange",
"numpy.linspace",
"seaborn.set_palette",
"matplotlib.pyplot.tight_layout"
] | [((152, 177), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""../"""'], {}), "(0, '../')\n", (167, 177), False, 'import sys\n'), ((409, 450), 'seaborn.set_palette', 'sns.set_palette', (['"""deep"""'], {'color_codes': '(True)'}), "('deep', color_codes=True)\n", (424, 450), True, 'import seaborn as sns\n'), ((451, 478... |
import cv2
import numpy as np
control=np.array(
[[ 270., 0.],
[ 150., 100.],
[ 200., 200.],
[ 250., 400.],
[ 300., 500.],
[ 300., 600.],
[ 300., 700.],
[ 300., 800.],
[ 250., 800.]])
print(control)
fac=np.ones(30)
for i in range(1, len(fac)):
fac[i] = fac[i-1]*i
def bezier(t):
n=control.shape[0]-1
... | [
"cv2.imwrite",
"numpy.zeros",
"numpy.ones",
"numpy.arange",
"numpy.array"
] | [((38, 200), 'numpy.array', 'np.array', (['[[270.0, 0.0], [150.0, 100.0], [200.0, 200.0], [250.0, 400.0], [300.0, \n 500.0], [300.0, 600.0], [300.0, 700.0], [300.0, 800.0], [250.0, 800.0]]'], {}), '([[270.0, 0.0], [150.0, 100.0], [200.0, 200.0], [250.0, 400.0], [\n 300.0, 500.0], [300.0, 600.0], [300.0, 700.0], [... |
"""Utility functions that are core to calculating physical values."""
from typing import List, Sequence, Tuple
import numpy as np
import periodictable
def get_most_abundant_isotope(
element: periodictable.core.Element,
) -> periodictable.core.Isotope:
most_abundant_isotope = element.isotopes[0]
abundanc... | [
"numpy.zeros",
"numpy.array",
"numpy.sum"
] | [((766, 782), 'numpy.array', 'np.array', (['masses'], {}), '(masses)\n', (774, 782), True, 'import numpy as np\n'), ((916, 930), 'numpy.sum', 'np.sum', (['masses'], {}), '(masses)\n', (922, 930), True, 'import numpy as np\n'), ((947, 995), 'numpy.sum', 'np.sum', (['(coords * masses[..., np.newaxis])'], {'axis': '(0)'})... |
# Copyright (c) 2020-2021, NVIDIA CORPORATION.
import geopandas as gpd
import numpy as np
import pandas as pd
import pytest
from shapely.geometry import (
LineString,
MultiLineString,
MultiPoint,
MultiPolygon,
Point,
Polygon,
)
@pytest.fixture
def gs():
g0 = Point(-1, 0)
g1 = MultiPoi... | [
"shapely.geometry.Point",
"shapely.geometry.MultiPoint",
"shapely.geometry.MultiLineString",
"shapely.geometry.Polygon",
"geopandas.GeoSeries",
"shapely.geometry.MultiPolygon",
"shapely.geometry.LineString",
"geopandas.GeoDataFrame",
"numpy.array",
"numpy.arange",
"pandas.concat",
"numpy.rando... | [((290, 302), 'shapely.geometry.Point', 'Point', (['(-1)', '(0)'], {}), '(-1, 0)\n', (295, 302), False, 'from shapely.geometry import LineString, MultiLineString, MultiPoint, MultiPolygon, Point, Polygon\n'), ((312, 340), 'shapely.geometry.MultiPoint', 'MultiPoint', (['((1, 2), (3, 4))'], {}), '(((1, 2), (3, 4)))\n', (... |
import pytest
import numpy as np
from floodlight import Pitch, XY
@pytest.fixture()
def example_xy_object_kinetics() -> XY:
xy = XY(
xy=np.array(
(
(37.586, 10.144, 32.343, 7.752),
(37.694, 10.144, 32.318, 7.731),
(37.803, 10.145, 32.285, 7.708),... | [
"numpy.array",
"pytest.fixture",
"floodlight.Pitch.from_template"
] | [((69, 85), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (83, 85), False, 'import pytest\n'), ((433, 449), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (447, 449), False, 'import pytest\n'), ((628, 644), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (642, 644), False, 'import pytest\n'), ((816... |
from __future__ import annotations
from dataclasses import dataclass
from typing import Literal
import numpy as np
from numpy.typing import NDArray
from chemex.configuration.data import RelaxationDataSettings
from chemex.configuration.experiment import ExperimentConfig
from chemex.configuration.experiment import Rel... | [
"chemex.experiments.factories.factories.register",
"numpy.full_like",
"chemex.nmr.spectrometer.Spectrometer",
"chemex.experiments.descriptions.descriptions.register",
"chemex.configuration.experiment.ToBeFitted",
"chemex.experiments.factories.Creators",
"chemex.nmr.liouvillian.Basis",
"numpy.array",
... | [((1946, 1982), 'chemex.nmr.liouvillian.Basis', 'Basis', ([], {'type': '"""izsz"""', 'spin_system': '"""nh"""'}), "(type='izsz', spin_system='nh')\n", (1951, 1982), False, 'from chemex.nmr.liouvillian import Basis\n'), ((2001, 2046), 'chemex.nmr.liouvillian.LiouvillianIS', 'LiouvillianIS', (['spin_system', 'basis', 'co... |
"""
Implements some instances of a random optimiser for multi-objective optimisation.
-- <EMAIL>
"""
# pylint: disable=invalid-name
from argparse import Namespace
import numpy as np
# Local
from ..exd.cp_domain_utils import get_processed_func_from_raw_func_for_cp_domain, \
load_cp_... | [
"numpy.random.random"
] | [((2476, 2509), 'numpy.random.random', 'np.random.random', (['self.domain.dim'], {}), '(self.domain.dim)\n', (2492, 2509), True, 'import numpy as np\n')] |
import argparse
import os
import numpy as np
from matplotlib import pyplot as plt
from PIL import Image
import logging
import cv2
import datetime
import os
import re
import shutil
import imageio
import json
import sys
import csv
import sort_people
# tensorflow
import models
import tensorflow as tf
logging.basicConfig... | [
"csv.reader",
"argparse.ArgumentParser",
"cv2.VideoWriter_fourcc",
"tensorflow.constant_initializer",
"tensorflow.reset_default_graph",
"os.path.isfile",
"sort_people.sort",
"cv2.VideoWriter",
"shutil.rmtree",
"os.path.join",
"logging.FileHandler",
"cv2.cvtColor",
"os.path.dirname",
"os.pa... | [((301, 340), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO'}), '(level=logging.INFO)\n', (320, 340), False, 'import logging\n'), ((350, 377), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (367, 377), False, 'import logging\n'), ((405, 433), 'logging.getLogge... |
import pandas as pd
import numpy as np
import pyBigWig
from pybedtools import BedTool
from itertools import islice
from collections import OrderedDict
def open_bigwig_for_parsing(fname,parallel=False):
if not parallel:
return pyBigWig.open(fname)
else:
#pybigwig objects cannot be pickled
... | [
"numpy.full",
"numpy.zeros",
"pybedtools.BedTool",
"pyBigWig.open",
"itertools.islice",
"collections.OrderedDict"
] | [((417, 431), 'pybedtools.BedTool', 'BedTool', (['fname'], {}), '(fname)\n', (424, 431), False, 'from pybedtools import BedTool\n'), ((1648, 1687), 'pybedtools.BedTool', 'BedTool', (['chrom_coords'], {'from_string': '(True)'}), '(chrom_coords, from_string=True)\n', (1655, 1687), False, 'from pybedtools import BedTool\n... |
import numpy as np
x = np.random.random((3,3,3))
print(x.ndim)
| [
"numpy.random.random"
] | [((24, 51), 'numpy.random.random', 'np.random.random', (['(3, 3, 3)'], {}), '((3, 3, 3))\n', (40, 51), True, 'import numpy as np\n')] |
import torch
from torch import nn
from second.pytorch.models.voxel_encoder import get_paddings_indicator
from torchplus.tools import change_default_args
from torchplus.nn import Empty, GroupNorm, Sequential
import numpy as np
from second.pytorch.models.rpn import register_rpn
#Our Coarse-to-Fine network
@register_r... | [
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.cat",
"torch.nn.ZeroPad2d",
"torchplus.tools.change_default_args",
"torch.nn.MaxPool2d",
"numpy.round",
"numpy.prod"
] | [((6911, 6938), 'torch.nn.MaxPool2d', 'nn.MaxPool2d', ([], {'kernel_size': '(2)'}), '(kernel_size=2)\n', (6923, 6938), False, 'from torch import nn\n'), ((6978, 7005), 'torch.nn.MaxPool2d', 'nn.MaxPool2d', ([], {'kernel_size': '(4)'}), '(kernel_size=4)\n', (6990, 7005), False, 'from torch import nn\n'), ((7046, 7073), ... |
"""
Functions to handle
"""
import numpy
def total_dipole_moment(vec):
""" Calculate the total dipole_moment value from the vector. Value
is simply the norm of the vector.
:param vector: dipole_moment vector in XYZ coords (Bohr)
:type vector: tuple
:rtype: float
"""
as... | [
"numpy.sqrt"
] | [((351, 402), 'numpy.sqrt', 'numpy.sqrt', (['(vec[0] ** 2 + vec[1] ** 2 + vec[2] ** 2)'], {}), '(vec[0] ** 2 + vec[1] ** 2 + vec[2] ** 2)\n', (361, 402), False, 'import numpy\n')] |
#
# Copyright 2018 Analytics Zoo Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | [
"pandas.DataFrame",
"pandas.date_range",
"numpy.random.random_sample",
"pytest.main",
"zoo.automl.feature.time_sequence.TimeSequenceFeatureTransformer",
"zoo.zouwu.preprocessing.impute.LastFill.LastFill"
] | [((1804, 1827), 'pytest.main', 'pytest.main', (['[__file__]'], {}), '([__file__])\n', (1815, 1827), False, 'import pytest\n'), ((937, 969), 'zoo.automl.feature.time_sequence.TimeSequenceFeatureTransformer', 'TimeSequenceFeatureTransformer', ([], {}), '()\n', (967, 969), False, 'from zoo.automl.feature.time_sequence imp... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import json
import seaborn as sns
# =============================================================================
# Load and Process Data
# ============================================================... | [
"matplotlib.pyplot.title",
"seaborn.set",
"json.load",
"matplotlib.pyplot.show",
"pandas.DataFrame.from_dict",
"matplotlib.pyplot.get_cmap",
"matplotlib.colors.Normalize",
"pandas.read_csv",
"matplotlib.figure.SubplotParams",
"pandas.read_excel",
"matplotlib.pyplot.colorbar",
"seaborn.boxplot"... | [((828, 894), 'pandas.DataFrame.from_dict', 'pd.DataFrame.from_dict', (["flatmates_dict['listings']"], {'orient': '"""index"""'}), "(flatmates_dict['listings'], orient='index')\n", (850, 894), True, 'import pandas as pd\n'), ((912, 975), 'pandas.DataFrame.from_dict', 'pd.DataFrame.from_dict', (["flatmates_dict['areas']... |
# -*- coding: utf-8 -*-
# Author: <NAME>
# Time : 2019/5/18 0:44
from argparse import Namespace
from pathlib import Path
import numpy as np
import torch
import torch.nn.functional as F
import torch.optim as optim
from nltk.translate import bleu_score
from tqdm import tqdm
from model import Dataset
f... | [
"argparse.Namespace",
"model.Dataset.load_dataset_and_load_vectorizer",
"numpy.random.seed",
"pathlib.Path",
"torch.device",
"nltk.translate.bleu_score.sentence_bleu",
"torch.load",
"torch.optim.lr_scheduler.ReduceLROnPlateau",
"tqdm.tqdm",
"torch.ne",
"torch.manual_seed",
"torch.nn.functional... | [((3369, 3838), 'argparse.Namespace', 'Namespace', ([], {'dataset_csv': '"""data/out_mspars.csv"""', 'vectorizer_file': '"""vectorizer.json"""', 'glove_file': '"""dataset/glove.6b.100d.txt"""', 'model_state_file': '"""model.pth"""', 'save_dir': '"""model_storage_no_unk/"""', 'reload_from_files': '(True)', 'expand_filep... |
# Copyright 2019 AIST
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softwar... | [
"numpy.full",
"numpy.array",
"zmq.Context",
"time.sleep"
] | [((959, 972), 'zmq.Context', 'zmq.Context', ([], {}), '()\n', (970, 972), False, 'import zmq\n'), ((1389, 1415), 'numpy.array', 'np.array', (['[0]'], {'dtype': 'float'}), '([0], dtype=float)\n', (1397, 1415), True, 'import numpy as np\n'), ((1448, 1474), 'numpy.array', 'np.array', (['[0]'], {'dtype': 'float'}), '([0], ... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 22 13:43:34 2018
@author: shirhe-lyh
"""
import cv2
import numpy as np
from captcha.image import ImageCaptcha
def generate_captcha(text='1'):
capt = ImageCaptcha(width=28, height=28, font_sizes=[24])
image = capt.generate_image(text)
... | [
"captcha.image.ImageCaptcha",
"cv2.imwrite",
"numpy.random.randint",
"numpy.array"
] | [((228, 278), 'captcha.image.ImageCaptcha', 'ImageCaptcha', ([], {'width': '(28)', 'height': '(28)', 'font_sizes': '[24]'}), '(width=28, height=28, font_sizes=[24])\n', (240, 278), False, 'from captcha.image import ImageCaptcha\n'), ((329, 360), 'numpy.array', 'np.array', (['image'], {'dtype': 'np.uint8'}), '(image, dt... |
import torch.nn as nn
import torch
import numpy as np
import torch.nn.functional as F
class FCN(nn.Module):
def __init__(self, input_size = 1, fc1_units = 200, fc2_units=200, output_size = 1):
super(FCN, self).__init__()
self.fc1 = nn.Sequential(nn.Linear(input_size, fc1_units), nn.Dropout(0.5), ... | [
"torch.nn.Dropout",
"torch.ones",
"torch.nn.ReLU",
"numpy.log",
"torch.nn.functional.dropout",
"torch.cat",
"torch.nn.Linear",
"torch.zeros",
"torch.log"
] | [((452, 485), 'torch.nn.Linear', 'nn.Linear', (['fc2_units', 'output_size'], {}), '(fc2_units, output_size)\n', (461, 485), True, 'import torch.nn as nn\n'), ((990, 1021), 'torch.nn.Linear', 'nn.Linear', (['input_dim', 'num_units'], {}), '(input_dim, num_units)\n', (999, 1021), True, 'import torch.nn as nn\n'), ((1044,... |
"""
Create a profile plot aka semantic differential
"""
import matplotlib.pyplot as plt
import numpy as np
def plot_sem_diff(data, x_labels, y_labels, **kwargs):
"""
Plot the semantic differential of the values given by `data`
data - sequence containing the data
must be either one- or twodimensi... | [
"matplotlib.pyplot.title",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.show",
"numpy.ceil",
"matplotlib.pyplot.plot",
"numpy.asarray",
"matplotlib.pyplot.yticks",
"matplotlib.pyplot.legend",
"numpy.ndim",
"numpy.isnan",
"numpy.floor",
"numpy.split",
"matplotlib.pyplot.figure",
"numpy.aran... | [((3067, 3079), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (3077, 3079), True, 'import matplotlib.pyplot as plt\n'), ((3223, 3239), 'matplotlib.pyplot.title', 'plt.title', (['title'], {}), '(title)\n', (3232, 3239), True, 'import matplotlib.pyplot as plt\n'), ((3328, 3359), 'matplotlib.pyplot.xticks', ... |
import csv
import pandas as pd
import numpy as np
import os
import matplotlib
import matplotlib.pyplot as plt
from matplotlib.lines import Line2D
import seaborn as sns
#import pickle
def gather_protein_rna_ids(genes, gene_df):
eco_cyc_ids= []
monomer_ids = []
rna_ids = []
for gene in genes:
eco_cyc_ids.append(g... | [
"seaborn.set_style",
"os.path.join",
"matplotlib.pyplot.plot",
"matplotlib.lines.Line2D",
"seaborn.despine",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.tight_layout",
"numpy.unique"
] | [((1490, 1518), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(3, 2.4)'}), '(figsize=(3, 2.4))\n', (1500, 1518), True, 'import matplotlib.pyplot as plt\n'), ((1539, 1561), 'seaborn.set_style', 'sns.set_style', (['"""ticks"""'], {}), "('ticks')\n", (1552, 1561), True, 'import seaborn as sns\n'), ((1574, 15... |
import numpy as np
def processCamMat(strList):
if(len(strList) == 1):
numbers = np.array([strList[0].split(' ')[:9]]).astype(float)
mat = np.reshape(numbers,[3,3], 'C')
else:
mat = np.zeros([3,3])
for idx, line in enumerate(strList):
line = line.rstrip() #rstrip() r... | [
"numpy.array",
"numpy.zeros",
"numpy.reshape"
] | [((160, 192), 'numpy.reshape', 'np.reshape', (['numbers', '[3, 3]', '"""C"""'], {}), "(numbers, [3, 3], 'C')\n", (170, 192), True, 'import numpy as np\n'), ((215, 231), 'numpy.zeros', 'np.zeros', (['[3, 3]'], {}), '([3, 3])\n', (223, 231), True, 'import numpy as np\n'), ((932, 995), 'numpy.array', 'np.array', (['[[fx_r... |
""" Extract patches of data to use for training.
Rather than go to the original GIS data each time, we extract the input
ahead of time and save the data and annotations as pkl files.
"""
import os
import pickle
import time
from logging import debug
import numpy as np
import pandas as pd
import rasterio
from pylab imp... | [
"rasterio.open",
"pickle.dump",
"logging.debug",
"os.makedirs",
"pylab.plt.title",
"pandas.read_csv",
"time.process_time",
"os.path.dirname",
"numpy.zeros",
"logging.warn",
"srp.util.tqdm",
"srp.data.orientedboundingbox.OrientedBoundingBox.from_rot_length_width",
"os.path.isfile",
"skimage... | [((1503, 1519), 'pylab.plt.subplot', 'plt.subplot', (['(131)'], {}), '(131)\n', (1514, 1519), False, 'from pylab import plt\n'), ((1591, 1607), 'pylab.plt.title', 'plt.title', (['"""rgb"""'], {}), "('rgb')\n", (1600, 1607), False, 'from pylab import plt\n'), ((1616, 1632), 'pylab.plt.subplot', 'plt.subplot', (['(132)']... |
"""
This scripts show how to mine parallel (translated) sentences from two list of monolingual sentences.
As input, you specific two text files that have sentences in every line. Then, the
LaBSE model is used to find parallel (translated) across these two files.
The result is written to disc.
A large source for mono... | [
"tqdm.tqdm",
"gzip.open",
"numpy.argsort",
"numpy.linalg.norm",
"sklearn.decomposition.PCA",
"numpy.arange",
"torch.nn.Identity",
"sentence_transformers.SentenceTransformer",
"torch.tensor"
] | [((800, 831), 'sentence_transformers.SentenceTransformer', 'SentenceTransformer', (['model_name'], {}), '(model_name)\n', (819, 831), False, 'from sentence_transformers import SentenceTransformer, models\n'), ((2724, 2756), 'sklearn.decomposition.PCA', 'PCA', ([], {'n_components': 'pca_dimensions'}), '(n_components=pca... |
import scipy.signal
import pandas as pd
import numpy as np
import peakutils
from lmfit import models
import chachifuncs as ccf
import os
import glob
################################
# OVERALL Wrapper Function
################################
def ML_generate(import_filepath):
"""Generates a dataframe containing c... | [
"pandas.DataFrame",
"os.path.join",
"os.path.exists",
"pandas.read_excel",
"chachifuncs.sep_char_dis",
"numpy.min",
"lmfit.models.PolynomialModel",
"numpy.arange",
"lmfit.models.PseudoVoigtModel",
"os.path.split",
"pandas.ExcelWriter",
"pandas.concat",
"pandas.to_numeric"
] | [((558, 589), 'os.path.exists', 'os.path.exists', (['import_filepath'], {}), '(import_filepath)\n', (572, 589), False, 'import os\n'), ((1021, 1054), 'pandas.concat', 'pd.concat', (['[df_ch, df_dc]'], {'axis': '(1)'}), '([df_ch, df_dc], axis=1)\n', (1030, 1054), True, 'import pandas as pd\n'), ((1179, 1210), 'pandas.Ex... |
import numpy as np
import vg
def test_almost_zero():
assert vg.almost_zero(np.array([0.0, 0.0, 0.0])) is True
assert vg.almost_zero(np.array([0.000000000000000001, 0.0, 0.0])) is True
assert vg.almost_zero(np.array([0.0000001, 0.0, 0.0])) is False
| [
"numpy.array"
] | [((81, 106), 'numpy.array', 'np.array', (['[0.0, 0.0, 0.0]'], {}), '([0.0, 0.0, 0.0])\n', (89, 106), True, 'import numpy as np\n'), ((142, 169), 'numpy.array', 'np.array', (['[1e-18, 0.0, 0.0]'], {}), '([1e-18, 0.0, 0.0])\n', (150, 169), True, 'import numpy as np\n'), ((220, 247), 'numpy.array', 'np.array', (['[1e-07, ... |
import cv2
import numpy as np
cap = cv2.VideoCapture(0)
whT = 416
conf_threshold = 0.2
nms_threshold = 0.3
classesFile = "coco.names"
classNames = []
with open(classesFile, 'r') as f:
classNames = f.read().rstrip("\n").split("\n")
# print(classNames)
# print(len(classNames))
modelConfig = "yolov3-320.cfg"
mode... | [
"cv2.dnn.NMSBoxes",
"numpy.argmax",
"cv2.waitKey",
"cv2.dnn.blobFromImage",
"cv2.dnn.readNetFromDarknet",
"cv2.VideoCapture",
"cv2.rectangle",
"cv2.imshow"
] | [((37, 56), 'cv2.VideoCapture', 'cv2.VideoCapture', (['(0)'], {}), '(0)\n', (53, 56), False, 'import cv2\n'), ((356, 409), 'cv2.dnn.readNetFromDarknet', 'cv2.dnn.readNetFromDarknet', (['modelConfig', 'modelWeights'], {}), '(modelConfig, modelWeights)\n', (382, 409), False, 'import cv2\n'), ((1157, 1217), 'cv2.dnn.NMSBo... |
import open3d
from config import get_args
from config import ArgsToConfig
from scipy.io import savemat
import pdb
import sys
from sklearn.cluster import MeanShift
from sklearn.cluster import DBSCAN
import scipy.stats as stats
import scipy
from discriminative import DiscriminativeLoss
#from knn_cuda import KNN
import ... | [
"os.mkdir",
"numpy.load",
"numpy.random.seed",
"numpy.sum",
"numpy.abs",
"torch.argmax",
"open3d.geometry.PointCloud",
"torch.cat",
"numpy.ones",
"open3d.visualization.draw_geometries",
"numpy.mean",
"numpy.arange",
"glob.glob",
"torch_scatter.scatter_add",
"utils.to_origianl_label",
"... | [((1168, 1253), 'numpy.array', 'np.array', (['[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 24, 28, 33, 34, 36, 39]'], {}), '([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 24, 28, 33, 34, 36,\n 39])\n', (1176, 1253), True, 'import numpy as np\n'), ((3040, 3070), 'numpy.zeros', 'np.zeros', (['[labels.shape[0], 3]... |
from environment import Environment as e
import matplotlib.pyplot as plt
import numpy as np
class QLearningAgent(object):
def __init__(self, discount, alpha, T, gamma, rho):
self.discount = discount
self.env = e(alpha, T, gamma)
self.state_count = (T+1) * (T+1) * 3
self.action_coun... | [
"numpy.random.uniform",
"numpy.argmax",
"numpy.zeros",
"environment.Environment",
"numpy.random.choice"
] | [((232, 250), 'environment.Environment', 'e', (['alpha', 'T', 'gamma'], {}), '(alpha, T, gamma)\n', (233, 250), True, 'from environment import Environment as e\n'), ((349, 380), 'numpy.zeros', 'np.zeros', (['(self.state_count, 4)'], {}), '((self.state_count, 4))\n', (357, 380), True, 'import numpy as np\n'), ((936, 955... |
"""
Based on: http://www.wildml.com/2016/08/rnns-in-tensorflow-a-practical-guide-and-undocumented-features/
"""
# Note: check ranges. tf.decode_jpeg=[0,1], ffmpeg=[0,255] (JPEG encodes [0,255] uint8 images)
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
i... | [
"tensorflow.train.Coordinator",
"tensorflow.train.Int64List",
"random.shuffle",
"numpy.clip",
"sys.stdout.flush",
"numpy.arange",
"numpy.asscalar",
"tensorflow.app.flags.DEFINE_integer",
"os.path.join",
"os.path.exists",
"tensorflow.placeholder",
"re.findall",
"random.seed",
"numpy.linspac... | [((596, 696), 'tensorflow.app.flags.DEFINE_string', 'tf.app.flags.DEFINE_string', (['"""videos_directory"""', '"""../../dataset/UCF-101/"""', '"""Video data directory"""'], {}), "('videos_directory', '../../dataset/UCF-101/',\n 'Video data directory')\n", (622, 696), True, 'import tensorflow as tf\n'), ((693, 837), ... |
# MIT License
#
# Copyright (c) 2018 <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, merge, publi... | [
"numpy.load",
"os.path.realpath",
"qml.aglaia.aglaia.ARMP",
"numpy.loadtxt",
"numpy.arange",
"glob.glob",
"numpy.all"
] | [((2032, 2094), 'qml.aglaia.aglaia.ARMP', 'ARMP', ([], {'representation': '"""slatm"""', 'representation_params': 'parameters'}), "(representation='slatm', representation_params=parameters)\n", (2036, 2094), False, 'from qml.aglaia.aglaia import ARMP\n'), ((2415, 2490), 'numpy.loadtxt', 'np.loadtxt', (["(test_dir + '/C... |
import networkx as nx
import numpy as np
from scipy.optimize import linear_sum_assignment
from ._similarity_flooding import similarity_flooding
#####
# Merges graphs
#
# Usage:
#
# from PipelineProfiler._graph_matching import pipeline_to_graph, merge_multiple_graphs
# from PipelineProfiler._plot_pipeline_node_link imp... | [
"networkx.union",
"numpy.fill_diagonal",
"networkx.algorithms.minors.contracted_nodes",
"networkx.algorithms.cycles.find_cycle",
"numpy.zeros",
"numpy.ones",
"numpy.max",
"numpy.mean",
"networkx.DiGraph",
"scipy.optimize.linear_sum_assignment"
] | [((982, 1003), 'networkx.DiGraph', 'nx.DiGraph', ([], {'name': 'name'}), '(name=name)\n', (992, 1003), True, 'import networkx as nx\n'), ((3752, 3794), 'numpy.zeros', 'np.zeros', (['[len_g1_plus_g2, len_g1_plus_g2]'], {}), '([len_g1_plus_g2, len_g1_plus_g2])\n', (3760, 3794), True, 'import numpy as np\n'), ((4086, 4122... |
import cv2
import numpy as np
from PIL import Image, ImageDraw
def transform_roi_to_quad(simg, dimg, src, dst):
'''
Transforms a source rectangle image into a destination quad.
Parameters
----------
simg : ndarray
Source image as generated by `np.asarray(Image.open(...))`
dimg : ndarra... | [
"matplotlib.pyplot.title",
"matplotlib.pyplot.subplot",
"cv2.warpPerspective",
"numpy.zeros_like",
"matplotlib.pyplot.show",
"cv2.getPerspectiveTransform",
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.figure",
"numpy.array",
"numpy.int32",
"PIL.Image.fromarray",
"PIL.ImageDraw.Draw",
"matp... | [((919, 945), 'numpy.array', 'np.array', (['[tl, tr, br, bl]'], {}), '([tl, tr, br, bl])\n', (927, 945), True, 'import numpy as np\n'), ((1102, 1115), 'numpy.array', 'np.array', (['dst'], {}), '(dst)\n', (1110, 1115), True, 'import numpy as np\n'), ((1251, 1292), 'cv2.getPerspectiveTransform', 'cv2.getPerspectiveTransf... |
"""
Code for collecting failure trajectories using Bayesian Optimization for environment Lunar Lander
Project : Policy correction using Bayesian Optimization
Description : The file contains functions for computing failure trajectories given RL policy and
safety specifications
"""
import numpy as... | [
"pickle.dump",
"numpy.random.seed",
"gym.make",
"network.FeedForwardActorNN",
"torch.load",
"eval_policy.display",
"torch.Tensor",
"GPyOpt.methods.BayesianOptimization"
] | [((1530, 1557), 'torch.Tensor', 'torch.Tensor', (['env.env.state'], {}), '(env.env.state)\n', (1542, 1557), False, 'import torch\n'), ((1658, 1690), 'eval_policy.display', 'display', (['obs', 'policy', 'env', '(False)'], {}), '(obs, policy, env, False)\n', (1665, 1690), False, 'from eval_policy import display\n'), ((25... |
__author__ = "<NAME> and <NAME>"
__copyright__ = "Copyright 2018, 3D Perception Lab"
__credits__ = ["<NAME>",
"<NAME>"]
__license__ = "MIT"
__version__ = "1.0"
__maintainer__ = "<NAME>"
__email__ = "<EMAIL>"
__status__ = "Development"
import argparse
import datetime
impor... | [
"torch.utils.data.sampler.SubsetRandomSampler",
"numpy.random.seed",
"argparse.ArgumentParser",
"logging.basicConfig",
"timeit.default_timer",
"numpy.zeros",
"logging.getLogger",
"torch_geometric.data.DataLoader",
"logging.Formatter",
"time.time",
"torch.cuda.is_available",
"torch.nn.functiona... | [((895, 922), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (912, 922), False, 'import logging\n'), ((1848, 1874), 'numpy.random.seed', 'np.random.seed', (['randomSeed'], {}), '(randomSeed)\n', (1862, 1874), True, 'import numpy as np\n'), ((1879, 1905), 'numpy.random.shuffle', 'np.random... |
import sys
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import os
import numpy as np
from PIL import Image
import img2vid as i2v
import glob
from skimage.measure import profile_line
sys.path.append("/home/fionnlagh/forked_amrvac/amrvac/tools/python")
from amrvac_pytools.datfiles.reading import amr... | [
"sys.path.append",
"matplotlib.pyplot.subplot",
"numpy.meshgrid",
"matplotlib.pyplot.show",
"amrvac_pytools.vtkfiles.read.load_vtkfile",
"skimage.measure.profile_line",
"matplotlib.pyplot.close",
"numpy.transpose",
"matplotlib.pyplot.colorbar",
"matplotlib.pyplot.rc",
"numpy.linspace",
"matplo... | [((203, 271), 'sys.path.append', 'sys.path.append', (['"""/home/fionnlagh/forked_amrvac/amrvac/tools/python"""'], {}), "('/home/fionnlagh/forked_amrvac/amrvac/tools/python')\n", (218, 271), False, 'import sys\n'), ((1332, 1363), 'matplotlib.pyplot.rc', 'plt.rc', (['"""font"""'], {'size': 'SMALL_SIZE'}), "('font', size=... |
import numpy
from dpsutil.compression import decompress, decompress_ndarray, compress, compress_ndarray
from dpsutil.media import imdecode, ENCODE_JPEG, DEFAULT_QUALITY, imencode
class Frame(object):
"""
Frame Data
work with vectors, image's frame and numpy.ndarray like.
Support multi-type frame: b... | [
"dpsutil.compression.decompress",
"dpsutil.compression.decompress_ndarray",
"numpy.frombuffer",
"dpsutil.media.imdecode",
"dpsutil.media.imencode",
"dpsutil.compression.compress_ndarray",
"numpy.all",
"dpsutil.compression.compress"
] | [((3578, 3614), 'numpy.all', 'numpy.all', (['(self.frame == other.frame)'], {}), '(self.frame == other.frame)\n', (3587, 3614), False, 'import numpy\n'), ((992, 1016), 'dpsutil.compression.decompress_ndarray', 'decompress_ndarray', (['data'], {}), '(data)\n', (1010, 1016), False, 'from dpsutil.compression import decomp... |
"""
Functional Tolerance Bounds using SRSF
moduleauthor:: <NAME> <<EMAIL>>
"""
import numpy as np
import fdasrsf as fs
import fdasrsf.utility_functions as uf
import fdasrsf.fPCA as fpca
from scipy.stats import chi2
from numpy.linalg import eig
from fdasrsf.boxplots import ampbox, phbox
def bootTB(f, time, a=0.5, p... | [
"numpy.quantile",
"fdasrsf.fdawarp",
"fdasrsf.fPCA.fdajpca",
"fdasrsf.utility_functions.gradient_spline",
"numpy.zeros",
"numpy.hstack",
"fdasrsf.boxplots.phbox",
"numpy.finfo",
"scipy.stats.chi2.rvs",
"scipy.stats.chi2.ppf",
"numpy.arange",
"fdasrsf.boxplots.ampbox",
"numpy.matmul",
"nump... | [((1355, 1374), 'fdasrsf.fdawarp', 'fs.fdawarp', (['f', 'time'], {}), '(f, time)\n', (1365, 1374), True, 'import fdasrsf as fs\n'), ((1619, 1635), 'numpy.zeros', 'np.zeros', (['(M, B)'], {}), '((M, B))\n', (1627, 1635), True, 'import numpy as np\n'), ((1653, 1669), 'numpy.zeros', 'np.zeros', (['(M, B)'], {}), '((M, B))... |
import os
import matplotlib as mpl
if os.environ.get('DISPLAY','') == '':
print('no display found. Using non-interactive Agg backend')
mpl.use('Agg')
import matplotlib.pyplot as plt
import scipy.io as sio
import torch
import torch.nn as nn
import numpy as np
class stats:
def __init__(self, path, start_epo... | [
"matplotlib.pyplot.title",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.close",
"os.environ.get",
"matplotlib.pyplot.figure",
"matplotlib.use",
"numpy.array",
"matplotlib.pyplot.xlabel",
"os.path.join"
] | [((38, 67), 'os.environ.get', 'os.environ.get', (['"""DISPLAY"""', '""""""'], {}), "('DISPLAY', '')\n", (52, 67), False, 'import os\n'), ((143, 157), 'matplotlib.use', 'mpl.use', (['"""Agg"""'], {}), "('Agg')\n", (150, 157), True, 'import matplotlib as mpl\n'), ((3142, 3154), 'matplotlib.pyplot.figure', 'plt.figure', (... |
# stdlib imports
import os
import numpy as np
import urllib
import json
from datetime import timedelta, datetime
import collections
import matplotlib.pyplot as plt
import matplotlib.patches as patches
# import numpy as np
import sqlite3 as lite
import pandas as pd
# local imports
from mapio.shake import getHeaderData... | [
"matplotlib.pyplot.title",
"mapio.gdal.GDALGrid.getFileGeoDict",
"mapio.shake.getHeaderData",
"numpy.abs",
"numpy.nanmedian",
"numpy.argmax",
"mapio.gmt.GMTGrid.getFileType",
"json.dumps",
"mapio.multihaz.MultiHazardGrid.load",
"numpy.isnan",
"matplotlib.patches.Polygon",
"numpy.arange",
"os... | [((1606, 1618), 'numpy.max', 'np.max', (['urat'], {}), '(urat)\n', (1612, 1618), True, 'import numpy as np\n'), ((2659, 2683), 'mapio.shake.getHeaderData', 'getHeaderData', (['shakefile'], {}), '(shakefile)\n', (2672, 2683), False, 'from mapio.shake import getHeaderData\n'), ((9509, 9531), 'os.path.exists', 'os.path.ex... |
import torch
import numpy as np
import random
from sklearn.metrics import precision_recall_fscore_support, accuracy_score
def get_prediction_ids(predictions):
""" Get the label ids from the raw prediction outputs """
tensor = torch.tensor(predictions)
softmax = torch.nn.functional.softmax(tensor, dim=-1)... | [
"numpy.random.seed",
"torch.set_deterministic",
"torch.argmax",
"torch.manual_seed",
"sklearn.metrics.accuracy_score",
"torch.cuda.manual_seed",
"torch.nn.functional.softmax",
"random.seed",
"sklearn.metrics.precision_recall_fscore_support",
"torch.tensor"
] | [((237, 262), 'torch.tensor', 'torch.tensor', (['predictions'], {}), '(predictions)\n', (249, 262), False, 'import torch\n'), ((277, 320), 'torch.nn.functional.softmax', 'torch.nn.functional.softmax', (['tensor'], {'dim': '(-1)'}), '(tensor, dim=-1)\n', (304, 320), False, 'import torch\n'), ((334, 363), 'torch.argmax',... |
# coding:utf-8
import sys
import numpy as np
from scipy import ndimage
from scipy.linalg import inv
from scipy.spatial.distance import cdist
from sklearn.decomposition import PCA, MiniBatchDictionaryLearning
from sklearn.feature_extraction.image import extract_patches_2d
from skimage.transform import rescale
def clip... | [
"sys.stdout.write",
"scipy.spatial.distance.cdist",
"numpy.partition",
"skimage.transform.rescale",
"numpy.zeros",
"scipy.ndimage.convolve",
"numpy.ones",
"sklearn.decomposition.MiniBatchDictionaryLearning",
"numpy.mean",
"numpy.array",
"sys.stdout.flush",
"sklearn.decomposition.PCA",
"sklea... | [((656, 675), 'numpy.zeros', 'np.zeros', (['(h, w, 5)'], {}), '((h, w, 5))\n', (664, 675), True, 'import numpy as np\n'), ((1231, 1255), 'numpy.concatenate', 'np.concatenate', (['features'], {}), '(features)\n', (1245, 1255), True, 'import numpy as np\n'), ((1270, 1293), 'numpy.concatenate', 'np.concatenate', (['patche... |
from copy import copy
import numpy as np
import seawater as sw
from seawater.constants import OMEGA, earth_radius
def sigma_t(s, t, p):
"""
:math:`\\sigma_{t}` is the remainder of subtracting 1000 kg m :sup:`-3`
from the density of a sea water sample at atmospheric pressure.
Parameters
---------... | [
"numpy.abs",
"seawater.dens",
"numpy.polyfit",
"seawater.dens0",
"numpy.isnan",
"numpy.sin",
"numpy.arange",
"numpy.exp",
"pandas.rolling",
"seawater.ptmp",
"numpy.nanmean",
"numpy.zeros_like",
"numpy.polyval",
"numpy.int32",
"numpy.linspace",
"numpy.broadcast_arrays",
"numpy.ones_li... | [((4899, 4919), 'numpy.asanyarray', 'np.asanyarray', (['bvfr2'], {}), '(bvfr2)\n', (4912, 4919), True, 'import numpy as np\n'), ((5907, 5927), 'numpy.asanyarray', 'np.asanyarray', (['bvfr2'], {}), '(bvfr2)\n', (5920, 5927), True, 'import numpy as np\n'), ((7041, 7069), 'numpy.broadcast_arrays', 'np.broadcast_arrays', (... |
"""
FUNÇÕES PARA VISUALIZAÇÃO DA IMAGEM.
# Arguments
object - Required : Imagem para leitura/visualização (String | Object)
# Returns
"""
__version__ = "1.0"
__author__ = """<NAME> (EMERVIN)"""
__data_atualizacao__ = "03/07/2021"
from inspect import stack
import cv2
import n... | [
"matplotlib.pyplot.title",
"matplotlib.pyplot.show",
"cv2.waitKey",
"matplotlib.pyplot.imshow",
"cv2.imshow",
"PIL.ImageFont.truetype",
"numpy.array",
"cv2.rectangle",
"PIL.Image.fromarray",
"PIL.ImageDraw.Draw",
"cv2.destroyAllWindows"
] | [((1376, 1406), 'cv2.imshow', 'cv2.imshow', (['window_name', 'image'], {}), '(window_name, image)\n', (1386, 1406), False, 'import cv2\n'), ((1489, 1503), 'cv2.waitKey', 'cv2.waitKey', (['(0)'], {}), '(0)\n', (1500, 1503), False, 'import cv2\n'), ((1561, 1584), 'cv2.destroyAllWindows', 'cv2.destroyAllWindows', ([], {})... |
import tushare as ts
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import talib
df=ts.get_hist_data('600848',start='2015-01-01',end='2015-12-31')
df=df.sort_index()
df.index=pd.to_datetime(df.index,format='%Y-%m-%d')
#收市股价
close= df.close
highPrice=df.high
lowPrice=df.low
#每天的股价变动百分率
ret=df.p_... | [
"matplotlib.pyplot.title",
"numpy.cumprod",
"matplotlib.pyplot.show",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.legend",
"pandas.to_datetime",
"tushare.get_hist_data",
"pandas.Series",
"numpy.array"
] | [((109, 173), 'tushare.get_hist_data', 'ts.get_hist_data', (['"""600848"""'], {'start': '"""2015-01-01"""', 'end': '"""2015-12-31"""'}), "('600848', start='2015-01-01', end='2015-12-31')\n", (125, 173), True, 'import tushare as ts\n'), ((200, 243), 'pandas.to_datetime', 'pd.to_datetime', (['df.index'], {'format': '"""%... |
import os
import sys
import numpy as np
import torch
from torch import nn
import torch.distributed as dist
if not dist.is_available():
print("Distributed not available, skipping tests", file=sys.stderr)
sys.exit(0)
from torch.distributed.algorithms.ddp_comm_hooks import (
DDPCommHookType,
register_d... | [
"os.remove",
"torch.testing._internal.common_utils.run_tests",
"torch.manual_seed",
"numpy.testing.assert_allclose",
"sys.exit",
"torch.randn",
"torch.cuda.device_count",
"torch.testing._internal.common_distributed.requires_nccl",
"torch.distributed.algorithms.ddp_comm_hooks.register_ddp_comm_hook",... | [((117, 136), 'torch.distributed.is_available', 'dist.is_available', ([], {}), '()\n', (134, 136), True, 'import torch.distributed as dist\n'), ((214, 225), 'sys.exit', 'sys.exit', (['(0)'], {}), '(0)\n', (222, 225), False, 'import sys\n'), ((2682, 2697), 'torch.testing._internal.common_distributed.requires_nccl', 'req... |
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 15 17:59:29 2017
@author: jiahuei
Currently Manager adds the following attributes to the Config object:
'vocab_size', 'max_step', 'split_sizes', 'itow', 'wtoi'
"""
import tensorflow as tf
import numpy as np
import os
import json
import string
import logging
import rando... | [
"numpy.stack",
"common.ops_v1.number_to_base",
"json.load",
"numpy.concatenate",
"random.shuffle",
"logging.getLogger",
"tensorflow.contrib.data.batch_and_drop_remainder",
"tensorflow.shape",
"random.seed",
"numpy.array",
"tensorflow.read_file",
"itertools.chain.from_iterable",
"common.input... | [((510, 537), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (527, 537), False, 'import logging\n'), ((2075, 2099), 'random.seed', 'random.seed', (['c.rand_seed'], {}), '(c.rand_seed)\n', (2086, 2099), False, 'import random\n'), ((18329, 18356), 'numpy.stack', 'np.stack', (['hypos_idx'], ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.