code stringlengths 31 1.05M | apis list | extract_api stringlengths 97 1.91M |
|---|---|---|
'''
Class for post-processing measurement data.
'''
from pdata._metadata import __version__
import os
import time
import numpy as np
import types
import re
import logging
import copy
import shutil
import gzip
import tarfile
import itertools
import json
import jsondiff
import datetime
import pytz
from dateutil import ... | [
"numpy.abs",
"numpy.empty",
"json.dumps",
"numpy.isnan",
"os.path.join",
"numpy.unique",
"os.path.abspath",
"os.path.exists",
"numpy.genfromtxt",
"tarfile.open",
"re.search",
"re.match",
"datetime.datetime",
"datetime.datetime.strptime",
"os.listdir",
"numpy.concatenate",
"os.scandir... | [((373, 425), 'datetime.datetime', 'datetime.datetime', (['(1970)', '(1)', '(1)', '(0)', '(0)'], {'tzinfo': 'pytz.utc'}), '(1970, 1, 1, 0, 0, tzinfo=pytz.utc)\n', (390, 425), False, 'import datetime\n'), ((6812, 6855), 'os.path.join', 'os.path.join', (['path', '"""snapshot_diffs.tar.gz"""'], {}), "(path, 'snapshot_diff... |
import numbers
import torch
import torch.nn as nn
import torchvision
import torchvision.transforms as transforms
from numpy import asarray
import numpy as np
from numpy.lib.stride_tricks import as_strided
from skimage import feature
from skimage.filters import threshold_otsu
from sklearn.utils import check_random_stat... | [
"torch.utils.data.ConcatDataset",
"sklearn.utils.check_random_state",
"torch.multinomial",
"torch.utils.data.DataLoader",
"torch.sqrt",
"sklearn.utils.check_array",
"numpy.asarray",
"torch.nn.init.xavier_uniform_",
"torch.DoubleTensor",
"torchvision.datasets.ImageFolder",
"numpy.lib.stride_trick... | [((1540, 1584), 'torchvision.datasets.ImageFolder', 'ImageFolder', (['train_path'], {'transform': 'transform'}), '(train_path, transform=transform)\n', (1551, 1584), False, 'from torchvision.datasets import ImageFolder\n'), ((1630, 1673), 'torchvision.datasets.ImageFolder', 'ImageFolder', (['test_path'], {'transform': ... |
import numpy as np
import keras
from .. import backend
from ..utils import anchors as util_anchors
class Anchors(keras.layers.Layer):
def __init__(self, size, stride, ratios=None, scales=None, *args, **kwargs):
self.size = size
self.stride = stride
self.ratios = ratios
self.scale... | [
"keras.backend.stack",
"keras.backend.expand_dims",
"keras.backend.floatx",
"keras.backend.shape",
"numpy.array",
"numpy.prod"
] | [((3927, 3972), 'keras.backend.stack', 'keras.backend.stack', (['[x1, y1, x2, y2]'], {'axis': '(2)'}), '([x1, y1, x2, y2], axis=2)\n', (3946, 3972), False, 'import keras\n'), ((1176, 1203), 'keras.backend.shape', 'keras.backend.shape', (['inputs'], {}), '(inputs)\n', (1195, 1203), False, 'import keras\n'), ((1469, 1511... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Oct 13 17:13:23 2019
@author: mavro
"""
#%%
import sys
sys.path.remove ('/opt/ros/kinetic/lib/python2.7/dist-packages')
#%%
import numpy as np
import cv2
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
img = mpimg.imread('../test_image... | [
"matplotlib.image.imread",
"sys.path.remove",
"cv2.warpPerspective",
"matplotlib.pyplot.plot",
"cv2.getPerspectiveTransform",
"matplotlib.pyplot.imshow",
"numpy.float32",
"matplotlib.pyplot.subplots"
] | [((122, 185), 'sys.path.remove', 'sys.path.remove', (['"""/opt/ros/kinetic/lib/python2.7/dist-packages"""'], {}), "('/opt/ros/kinetic/lib/python2.7/dist-packages')\n", (137, 185), False, 'import sys\n'), ((293, 336), 'matplotlib.image.imread', 'mpimg.imread', (['"""../test_images/stopsign.jpg"""'], {}), "('../test_imag... |
##################################################
# <NAME> | CMU
# Python classifier
##################################################
# imports
from matplotlib import pyplot as plt
import numpy as np
import os
import csv
import math
##################################################
# Helper Functions
#############... | [
"numpy.flip",
"numpy.tanh",
"csv.reader",
"numpy.random.randn",
"numpy.argmax",
"numpy.zeros",
"numpy.rot90",
"numpy.array",
"numpy.exp",
"numpy.dot",
"numpy.add",
"numpy.delete"
] | [((1051, 1067), 'numpy.array', 'np.array', (['result'], {}), '(result)\n', (1059, 1067), True, 'import numpy as np\n'), ((1081, 1110), 'numpy.rot90', 'np.rot90', (['result'], {'axes': '(0, 1)'}), '(result, axes=(0, 1))\n', (1089, 1110), True, 'import numpy as np\n'), ((1123, 1141), 'numpy.flip', 'np.flip', (['result', ... |
import numpy as np
from skimage.filters import sobel
from skimage.measure import find_contours
from skimage.morphology import binary_closing, binary_opening, dilation
from skimage.transform import rescale
def check_intersection(segments):
def check_xy(a11, a12, a21, a22):
return a21 <= (a11 + a12) / 2 <= ... | [
"skimage.morphology.binary_opening",
"skimage.morphology.binary_closing",
"skimage.transform.rescale",
"numpy.ones",
"skimage.filters.sobel",
"numpy.mean",
"skimage.measure.find_contours",
"skimage.morphology.dilation"
] | [((1173, 1195), 'skimage.transform.rescale', 'rescale', (['binary', 'scale'], {}), '(binary, scale)\n', (1180, 1195), False, 'from skimage.transform import rescale\n'), ((1277, 1292), 'numpy.ones', 'np.ones', (['(8, 8)'], {}), '((8, 8))\n', (1284, 1292), True, 'import numpy as np\n'), ((1306, 1319), 'skimage.filters.so... |
# Test methods with long descriptive names can omit docstrings
# pylint: disable=missing-docstring
import unittest
import numpy as np
from Orange.data import Table
from Orange.regression import MeanLearner
class TestMeanLearner(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.learn = MeanLe... | [
"numpy.average",
"numpy.allclose",
"Orange.regression.MeanLearner",
"numpy.random.randint",
"Orange.data.Table"
] | [((314, 327), 'Orange.regression.MeanLearner', 'MeanLearner', ([], {}), '()\n', (325, 327), False, 'from Orange.regression import MeanLearner\n'), ((406, 445), 'numpy.random.randint', 'np.random.randint', (['(1)', '(4)', '(nrows, ncols)'], {}), '(1, 4, (nrows, ncols))\n', (423, 445), True, 'import numpy as np\n'), ((51... |
from physDBD import Params0Gauss, ImportHelper, Params0GaussTraj
import numpy as np
import os
import tensorflow as tf
class TestParams0Gauss:
fnames = [
"../data_test/0000.txt",
"../data_test/0001.txt",
"../data_test/0002.txt",
"../data_test/0003.txt",
"../data_test/0004.tx... | [
"os.remove",
"physDBD.Params0Gauss.fromData",
"os.path.exists",
"physDBD.Params0GaussTraj.fromFile",
"physDBD.ImportHelper.import_gillespie_ssa_at_time",
"tensorflow.constant",
"numpy.array"
] | [((447, 545), 'physDBD.ImportHelper.import_gillespie_ssa_at_time', 'ImportHelper.import_gillespie_ssa_at_time', ([], {'fnames': 'self.fnames', 'time': 'time', 'species': 'self.species'}), '(fnames=self.fnames, time=time,\n species=self.species)\n', (488, 545), False, 'from physDBD import Params0Gauss, ImportHelper, ... |
import csv
import cv2
import numpy as np
import pandas as pd
"""
转换 SCUT-FBP55000_v2 数据集到csv格式
参考:
https://bbs.huaweicloud.com/blogs/detail/278704
https://github.com/spytensor/prepare_detection_dataset
pip install opencv-python
wget https://raw.githubusercontent.com/opencv/opencv/master/samples/dnn/face_detector/deplo... | [
"pandas.read_csv",
"cv2.dnn.blobFromImage",
"numpy.array",
"cv2.dnn.readNetFromCaffe",
"cv2.CascadeClassifier"
] | [((612, 671), 'cv2.CascadeClassifier', 'cv2.CascadeClassifier', (['"""haarcascade_fontalface_default.xml"""'], {}), "('haarcascade_fontalface_default.xml')\n", (633, 671), False, 'import cv2\n'), ((802, 853), 'cv2.dnn.readNetFromCaffe', 'cv2.dnn.readNetFromCaffe', (['prototxt_path', 'model_path'], {}), '(prototxt_path,... |
import numpy as np
from PolicyEvaluation import policy_eval
def policy_improvement(env, discount_factor=1.0):
"""
Policy Improvement Algorithm. Iteratively evaluates and improves a policy
until an optimal policy is found.
Args:
env: The OpenAI envrionment.
policy_eval_fn: Policy Ev... | [
"numpy.argmax",
"numpy.zeros",
"numpy.ones",
"PolicyEvaluation.policy_eval",
"numpy.all"
] | [((813, 849), 'PolicyEvaluation.policy_eval', 'policy_eval', (['Policy', 'env'], {'theta': '(0.01)'}), '(Policy, env, theta=0.01)\n', (824, 849), False, 'from PolicyEvaluation import policy_eval\n'), ((770, 795), 'numpy.ones', 'np.ones', (['[env.nS, env.nA]'], {}), '([env.nS, env.nA])\n', (777, 795), True, 'import nump... |
import requests, zipfile, io, os, re
import pandas as pd
import numpy as np
import geopandas, astral
import time
from astral.sun import sun
import tabulate
METEO_FOLDER = r"C:/Users/48604/Documents/semestr5/PAG/pag2/Meteo/"
ZAPIS_ZIP = METEO_FOLDER + r"Meteo_"
url = "https://dane.imgw.pl/datastore/getfiledo... | [
"os.mkdir",
"pandas.read_csv",
"astral.sun.sun",
"astral.LocationInfo",
"pandas.DataFrame",
"pandas.merge",
"geopandas.GeoDataFrame",
"requests.get",
"re.search",
"pandas.concat",
"geopandas.read_file",
"io.BytesIO",
"pandas.to_datetime",
"os.listdir",
"tabulate",
"os.path.isdir",
"t... | [((440, 457), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (452, 457), False, 'import requests, zipfile, io, os, re\n'), ((1343, 1414), 'pandas.read_csv', 'pd.read_csv', (['path_parametr'], {'sep': '""";"""', 'index_col': '(False)', 'encoding': '"""cp1250"""'}), "(path_parametr, sep=';', index_col=False, e... |
import logging
from collections import OrderedDict
import numpy as np
from .. import tools
logger = logging.getLogger(__name__)
CONVERTERS = OrderedDict()
@tools.profiling.timeing(f'{__name__}')
def list_converters():
st = ''
for name in CONVERTERS:
st += f'{name}:\n'
for backend in CONVER... | [
"collections.OrderedDict",
"numpy.any",
"logging.getLogger",
"numpy.argwhere"
] | [((103, 130), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (120, 130), False, 'import logging\n'), ((145, 158), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (156, 158), False, 'from collections import OrderedDict\n'), ((2576, 2589), 'numpy.any', 'np.any', (['valid'], {}),... |
""" This example replicates the behaviour of legacy code that creates
data in arrays and then convert them into matrices in order to use in linear
algebra algorithms.
Imagine this implementation hidden inside 10k > lines of code with very
little documentation. Using a function memory monitor you can map the
behaviour ... | [
"numpy.random.random",
"pikos.api.memory_on_functions",
"argparse.ArgumentParser"
] | [((760, 781), 'pikos.api.memory_on_functions', 'memory_on_functions', ([], {}), '()\n', (779, 781), False, 'from pikos.api import memory_on_functions\n'), ((1017, 1038), 'pikos.api.memory_on_functions', 'memory_on_functions', ([], {}), '()\n', (1036, 1038), False, 'from pikos.api import memory_on_functions\n'), ((1260,... |
from model import Word2Vec, ScoringLayer, EmbeddingLayer
from utils import constructBagOfWordsInWindowSize, contextPairToOneHot, OneHotOfAllInVocab
from keras.callbacks import TensorBoard
from dataloader import tokenizeData, performTokenization
import argparse
import datetime
from numpy import save, load
from evaluati... | [
"numpy.load",
"numpy.save",
"utils.constructBagOfWordsInWindowSize",
"argparse.ArgumentParser",
"dataloader.performTokenization",
"evaluation.analogy",
"utils.contextPairToOneHot",
"evaluation.plotEmbeddingsIn2D",
"collections.OrderedDict",
"evaluation.getTenClosestWords",
"evaluation.getSimilar... | [((2478, 2499), 'dataloader.performTokenization', 'performTokenization', ([], {}), '()\n', (2497, 2499), False, 'from dataloader import tokenizeData, performTokenization\n'), ((2521, 2568), 'utils.constructBagOfWordsInWindowSize', 'constructBagOfWordsInWindowSize', (['tokenized_data'], {}), '(tokenized_data)\n', (2552,... |
from pathlib import Path
import numpy as np
def _split_and_remove_whitespace(line):
return ' '.join(line.split()).split(' ')
def read_problem_specs(input_file):
input_file = Path(input_file)
assert input_file.exists(), "Input file: {} does not exist.".format(input_file)
file = open(input_file, 'r')
... | [
"numpy.savetxt",
"pathlib.Path",
"numpy.meshgrid",
"numpy.linspace"
] | [((185, 201), 'pathlib.Path', 'Path', (['input_file'], {}), '(input_file)\n', (189, 201), False, 'from pathlib import Path\n'), ((528, 559), 'numpy.linspace', 'np.linspace', (['start', 'stop', 'cells'], {}), '(start, stop, cells)\n', (539, 559), True, 'import numpy as np\n'), ((568, 599), 'numpy.linspace', 'np.linspace... |
import os
import numpy as np
import sys, traceback
import pyqtgraph as pg
from matplotlib import cm
from scipy.stats import iqr
from collections import defaultdict
from PyQt5 import QtCore, QtWidgets, QtGui
from PyQt5.QtCore import pyqtSlot
from PyQt5.QtGui import QKeySequence
from PyQt5.QtWidgets import QShortcut
fr... | [
"numpy.load",
"PyQt5.QtGui.QKeySequence",
"PyQt5.QtGui.QColor",
"collections.defaultdict",
"PyQt5.QtWidgets.QApplication",
"os.path.exists",
"lib.labeling.get_studies_peter",
"traceback.print_exception",
"lib.labeling.load_pickle",
"scipy.stats.iqr",
"lib.windows.SEQUENCE_WINDOWS.keys",
"PyQt5... | [((7352, 7362), 'PyQt5.QtCore.pyqtSlot', 'pyqtSlot', ([], {}), '()\n', (7360, 7362), False, 'from PyQt5.QtCore import pyqtSlot\n'), ((7624, 7634), 'PyQt5.QtCore.pyqtSlot', 'pyqtSlot', ([], {}), '()\n', (7632, 7634), False, 'from PyQt5.QtCore import pyqtSlot\n'), ((7903, 7913), 'PyQt5.QtCore.pyqtSlot', 'pyqtSlot', ([], ... |
# -*- coding: utf-8 -*-
"""
Created on Wed Feb 15 16:42:48 2012
Show an animated sine function and measure frames per second (FPS)
"""
import sys
sys.ps1 = 'Ciao'
import time
import numpy as np
import matplotlib
matplotlib.use('qt4agg')
import matplotlib.pyplot as plt
x = np.random.randn(10)
print('rea... | [
"matplotlib.pyplot.show",
"matplotlib.pyplot.plot",
"numpy.random.randn",
"time.sleep",
"matplotlib.pyplot.draw",
"matplotlib.use"
] | [((224, 248), 'matplotlib.use', 'matplotlib.use', (['"""qt4agg"""'], {}), "('qt4agg')\n", (238, 248), False, 'import matplotlib\n'), ((289, 308), 'numpy.random.randn', 'np.random.randn', (['(10)'], {}), '(10)\n', (304, 308), True, 'import numpy as np\n'), ((334, 345), 'matplotlib.pyplot.plot', 'plt.plot', (['x'], {}), ... |
from unittest import TestCase
import numpy as np
import tensorflow as tf
from tensorflow.python.keras.models import Sequential, clone_model
from tensorflow.python.keras.layers import Dense, Lambda, BatchNormalization
from tensorflow_fewshot.models.fast_gradients import take_n_gradient_step
class TestGradientUtils(Te... | [
"tensorflow.random.set_seed",
"tensorflow.python.keras.layers.Dense",
"numpy.random.seed",
"tensorflow.keras.layers.Dense",
"tensorflow.python.keras.layers.Lambda",
"numpy.zeros",
"numpy.ones",
"tensorflow_fewshot.models.fast_gradients.take_n_gradient_step",
"numpy.array",
"tensorflow.keras.layers... | [((359, 377), 'numpy.random.seed', 'np.random.seed', (['(37)'], {}), '(37)\n', (373, 377), True, 'import numpy as np\n'), ((386, 408), 'tensorflow.random.set_seed', 'tf.random.set_seed', (['(37)'], {}), '(37)\n', (404, 408), True, 'import tensorflow as tf\n'), ((629, 655), 'tensorflow.python.keras.models.clone_model', ... |
from .global_settings import settings
from .utils import moving_mean
import numpy as np
class SpeedCalculator:
def __init__(self, encoder_data_provider, callback):
self._current_period = []
self._periods = []
self._encoder_data_provider = encoder_data_provider
self._log = open("cor... | [
"numpy.divide",
"numpy.subtract",
"numpy.mean",
"numpy.array",
"numpy.diff",
"numpy.interp"
] | [((1034, 1061), 'numpy.array', 'np.array', (['self._speeds[-3:]'], {}), '(self._speeds[-3:])\n', (1042, 1061), True, 'import numpy as np\n'), ((1086, 1116), 'numpy.mean', 'np.mean', (['latest_speeds'], {'axis': '(0)'}), '(latest_speeds, axis=0)\n', (1093, 1116), True, 'import numpy as np\n'), ((2049, 2071), 'numpy.subt... |
"""
This code is modified from the implementation of https://github.com/iyah4888/SIGGRAPH18SSS
Information about the original and unmodified code:
@author: <NAME> (http://taehyunoh.com, <EMAIL>)
@date: Jul 29, 2018
@description: This is a part of the semantic feature extraction implementation used in
[Semantic S... | [
"os.mkdir",
"tensorflow.image.decode_png",
"tensorflow.ConfigProto",
"tensorflow.split",
"os.path.join",
"tensorflow.pad",
"os.path.exists",
"tensorflow.concat",
"tensorflow.stack",
"tensorflow.image.resize_images",
"tensorflow.Session",
"numpy.squeeze",
"tensorflow.read_file",
"deeplab_re... | [((818, 855), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""./SIGGRAPH18SSS"""'], {}), "(0, './SIGGRAPH18SSS')\n", (833, 855), False, 'import sys\n'), ((1036, 1106), 'numpy.array', 'np.array', (['(104.00698793, 116.66876762, 122.67891434)'], {'dtype': 'np.float32'}), '((104.00698793, 116.66876762, 122.67891434), d... |
# Copyright 2020 <NAME>
#
# 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, soft... | [
"numpy.percentile",
"typing.TypeVar",
"numpy.array"
] | [((770, 782), 'typing.TypeVar', 'TypeVar', (['"""K"""'], {}), "('K')\n", (777, 782), False, 'from typing import Callable, Mapping, Optional, Tuple, TypeVar\n'), ((787, 799), 'typing.TypeVar', 'TypeVar', (['"""V"""'], {}), "('V')\n", (794, 799), False, 'from typing import Callable, Mapping, Optional, Tuple, TypeVar\n'),... |
import torch
from typing import Union, List, Callable
from .map_metric_wrapper import MapMetricWrapper
import torch.nn.functional as F
import numpy as np
import math
def _ncc(x, y):
"""
This function is a torch implementation of the normalized cross correlation
Parameters
----------
x : torch.Tens... | [
"torch.flatten",
"torch.ones",
"torch.mean",
"torch.dot",
"torch.norm",
"math.floor",
"torch.std",
"numpy.prod"
] | [((946, 962), 'torch.flatten', 'torch.flatten', (['x'], {}), '(x)\n', (959, 962), False, 'import torch\n'), ((971, 987), 'torch.flatten', 'torch.flatten', (['y'], {}), '(y)\n', (984, 987), False, 'import torch\n'), ((1002, 1015), 'torch.mean', 'torch.mean', (['x'], {}), '(x)\n', (1012, 1015), False, 'import torch\n'), ... |
import numpy as np
import scipy.linalg as linalg
class RadialLevelSetTopology(object):
"""
References:
Radial basis functions and level set method for structural topology
optimization, by <NAME> and <NAME>, in Numerical Methods in
Engineering Vol. 65(12) 2005.
Level-set methods... | [
"scipy.linalg.solve",
"numpy.atleast_2d",
"numpy.meshgrid",
"numpy.zeros",
"numpy.ones",
"numpy.hstack",
"numpy.arange",
"numpy.tile",
"numpy.exp",
"numpy.linspace",
"numpy.vstack",
"numpy.sqrt"
] | [((1961, 1984), 'numpy.hstack', 'np.hstack', (['(amat, pmat)'], {}), '((amat, pmat))\n', (1970, 1984), True, 'import numpy as np\n'), ((2059, 2082), 'numpy.vstack', 'np.vstack', (['(row1, row2)'], {}), '((row1, row2))\n', (2068, 2082), True, 'import numpy as np\n'), ((2246, 2269), 'numpy.hstack', 'np.hstack', (['(amat,... |
from ipycanvas import MultiCanvas, hold_canvas
from IPython import display as ipydisp
import numpy as np
from time import sleep
class _State():
'''Data structure to store Turtle's state'''
def __init__(self):
canvas_size = 300
self.speed = 4
self.angular_speed_multiplier = 2
sel... | [
"ipycanvas.MultiCanvas",
"numpy.abs",
"ipycanvas.hold_canvas",
"numpy.deg2rad",
"IPython.display.display",
"time.sleep",
"numpy.sin",
"numpy.array",
"numpy.linspace",
"numpy.cos"
] | [((2217, 2254), 'numpy.array', 'np.array', (['[[-1, 1], [-1, -1], [2, 0]]'], {}), '([[-1, 1], [-1, -1], [2, 0]])\n', (2225, 2254), True, 'import numpy as np\n'), ((950, 976), 'IPython.display.display', 'ipydisp.display', (['_s.canvas'], {}), '(_s.canvas)\n', (965, 976), True, 'from IPython import display as ipydisp\n')... |
# -*- coding: utf-8 -*-
import os
import numpy as np
import cv2
import imgproc
from bisect import bisect_right as upper_bound
from PIL import Image
import pytesseract
import statistics
def ocr(image):
try:
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
# write the grayscale image to disk... | [
"os.mkdir",
"os.remove",
"os.getpid",
"cv2.bitwise_and",
"os.path.basename",
"cv2.cvtColor",
"cv2.imwrite",
"numpy.asarray",
"os.walk",
"numpy.zeros",
"os.path.isdir",
"bisect.bisect_right",
"PIL.Image.open",
"numpy.array",
"os.path.splitext",
"cv2.drawContours",
"cv2.boundingRect",
... | [((1019, 1035), 'os.walk', 'os.walk', (['in_path'], {}), '(in_path)\n', (1026, 1035), False, 'import os\n'), ((2764, 2777), 'numpy.array', 'np.array', (['img'], {}), '(img)\n', (2772, 2777), True, 'import numpy as np\n'), ((5074, 5087), 'numpy.array', 'np.array', (['img'], {}), '(img)\n', (5082, 5087), True, 'import nu... |
import numpy as np
import pandas as pd
from ..utils.convert import wh_to_xy
from ..utils.summary_stats import accuracy, accuracy_3d, summarize_accuracy
def evaluate_accuracy(df, df_gt, dist_thr, return_full=False):
df_gt = wh_to_xy(df_gt)
cols = ['x1', 'y1', 'x2', 'y2']
accuracy_df = []
for image_id... | [
"numpy.array",
"pandas.concat"
] | [((432, 491), 'numpy.array', 'np.array', (["df_gt[df_gt['image_id'] == image_id][cols].values"], {}), "(df_gt[df_gt['image_id'] == image_id][cols].values)\n", (440, 491), True, 'import numpy as np\n'), ((988, 1047), 'numpy.array', 'np.array', (["df_gt[df_gt['image_id'] == image_id][cols].values"], {}), "(df_gt[df_gt['i... |
import os
import argparse
from tqdm import tqdm
from lib import vasp
from lib.preprocessing import interpolate, interpolate_normalize
from lib import fake
import numpy as np
from annoy import AnnoyIndex
import matplotlib.pyplot as plt
parser = argparse.ArgumentParser()
parser.add_argument('--width', type=float, defau... | [
"numpy.save",
"argparse.ArgumentParser",
"lib.preprocessing.interpolate_normalize",
"numpy.max",
"numpy.min",
"numpy.concatenate"
] | [((246, 271), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (269, 271), False, 'import argparse\n'), ((2013, 2053), 'numpy.save', 'np.save', (['"""lookuptable_test"""', 'lookuptable'], {}), "('lookuptable_test', lookuptable)\n", (2020, 2053), True, 'import numpy as np\n'), ((1531, 1593), 'lib.... |
from dataclasses import dataclass
from astropy import units as un
from astropy.coordinates import SkyCoord, EarthLocation, AltAz, Angle
import numpy as np
from scipy.special import j1
import scipy.constants as const
import scipy.signal as sig
from astroplan import Observer
from vipy.simulation.utils import single_occur... | [
"numpy.sum",
"torch.sqrt",
"numpy.einsum",
"numpy.ones",
"numpy.sin",
"numpy.meshgrid",
"numexpr.evaluate",
"numpy.append",
"torch.zeros",
"itertools.chain",
"vipy.simulation.utils.single_occurance",
"numpy.vectorize",
"time.sidereal_time",
"torch.einsum",
"astropy.coordinates.EarthLocat... | [((2863, 2886), 'vipy.simulation.utils.get_pairs', 'get_pairs', (['array_layout'], {}), '(array_layout)\n', (2872, 2886), False, 'from vipy.simulation.utils import single_occurance, get_pairs\n'), ((2901, 2926), 'vipy.simulation.utils.single_occurance', 'single_occurance', (['delta_x'], {}), '(delta_x)\n', (2917, 2926)... |
"""
"""
#| - Import Modules
import os
import sys
# print("import pickle")
import pickle
import copy
# import copy
import numpy as np
import pandas as pd
# import plotly.graph_objects as go
import plotly.graph_objs as go
import plotly.express as px
import scipy.integrate as integrate
from pymatgen_diffusion.aimd.v... | [
"pickle.dump",
"numpy.abs",
"pandas.read_csv",
"methods.get_df_coord",
"pymatgen.io.ase.AseAtomsAdaptor",
"scipy.interpolate.interp1d",
"os.path.join",
"pandas.DataFrame",
"os.path.exists",
"numpy.max",
"plotting.my_plotly.my_plotly_plot",
"pandas.concat",
"plotly.graph_objects.Scatter",
"... | [((3586, 3676), 'os.path.join', 'os.path.join', (["os.environ['PROJ_irox_oer']", '"""workflow/enumerate_adsorption"""', '"""out_data"""'], {}), "(os.environ['PROJ_irox_oer'], 'workflow/enumerate_adsorption',\n 'out_data')\n", (3598, 3676), False, 'import os\n'), ((4042, 4059), 'pymatgen.io.ase.AseAtomsAdaptor', 'Ase... |
# Using Word2Vec for prediction: In this example, we will load the CBOW trained embeddings to perform movie review predictions using LR model. From this dataset we will compute/fit the CBOW model using the Word2Vec algorithm
# -----------------------------------------
import tensorflow as tf
import matplotlib.pyplot as... | [
"matplotlib.pyplot.title",
"preprocessor.normalize_text",
"tensorflow.nn.sigmoid_cross_entropy_with_logits",
"tensorflow.matmul",
"numpy.mean",
"tensorflow.python.framework.ops.reset_default_graph",
"preprocessor.load_movie_data",
"numpy.round",
"numpy.transpose",
"tensorflow.placeholder",
"nump... | [((618, 651), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (641, 651), False, 'import warnings\n'), ((693, 718), 'tensorflow.python.framework.ops.reset_default_graph', 'ops.reset_default_graph', ([], {}), '()\n', (716, 718), False, 'from tensorflow.python.framework impor... |
# Copyright 2019 DIVERSIS Software. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law o... | [
"numpy.asarray",
"os.path.abspath",
"pickle.load",
"numpy.zeros"
] | [((851, 887), 'numpy.zeros', 'np.zeros', (['(inputSize, trainDataSize)'], {}), '((inputSize, trainDataSize))\n', (859, 887), True, 'import numpy as np\n'), ((902, 937), 'numpy.zeros', 'np.zeros', (['(classNum, trainDataSize)'], {}), '((classNum, trainDataSize))\n', (910, 937), True, 'import numpy as np\n'), ((1719, 175... |
# pylint: disable=missing-docstring, invalid-name
import unittest
import scipy.ndimage
import numpy as np
class TestMapCoordinates(unittest.TestCase):
def setUp(self):
self.values = np.array([
[0, 1, 2],
[3, 4, 5]
], dtype=np.float)
def test_scipy_ndimage_map_coordinat... | [
"numpy.testing.assert_array_almost_equal",
"numpy.meshgrid",
"numpy.array"
] | [((196, 244), 'numpy.array', 'np.array', (['[[0, 1, 2], [3, 4, 5]]'], {'dtype': 'np.float'}), '([[0, 1, 2], [3, 4, 5]], dtype=np.float)\n', (204, 244), True, 'import numpy as np\n'), ((457, 509), 'numpy.testing.assert_array_almost_equal', 'np.testing.assert_array_almost_equal', (['expect', 'result'], {}), '(expect, res... |
import matplotlib
import os
from termcolor import cprint
import matplotlib.pyplot as plt
import numpy as np
from itertools import chain
from utils import *
from utils_torch_filter import TORCHIEKF
import math
import copy
def normalize_rot(Rot):
# The SVD is commonly written as a = U S V.H.
# The v returned by... | [
"copy.deepcopy",
"numpy.outer",
"numpy.arctan2",
"numpy.abs",
"matplotlib.pyplot.show",
"math.pow",
"matplotlib.pyplot.close",
"numpy.zeros",
"numpy.identity",
"numpy.isclose",
"numpy.linalg.svd",
"numpy.array",
"numpy.linalg.norm",
"numpy.sin",
"numpy.cos",
"numpy.linalg.det",
"matp... | [((367, 406), 'numpy.linalg.svd', 'np.linalg.svd', (['Rot'], {'full_matrices': '(False)'}), '(Rot, full_matrices=False)\n', (380, 406), True, 'import numpy as np\n'), ((416, 430), 'numpy.identity', 'np.identity', (['(3)'], {}), '(3)\n', (427, 430), True, 'import numpy as np\n'), ((605, 624), 'numpy.zeros', 'np.zeros', ... |
from numpy.core.multiarray import dtype
from numpy.core.multiarray import array
def digitize(x, bins, right=False):
x = array(x, dtype=dtype('float'))
bins = array(bins, dtype=dtype('float'))
if len(bins) == 0:
raise ValueError("bins must have non-zero length")
monotonic = check_monotonic(b... | [
"numpy.core.multiarray.dtype"
] | [((142, 156), 'numpy.core.multiarray.dtype', 'dtype', (['"""float"""'], {}), "('float')\n", (147, 156), False, 'from numpy.core.multiarray import dtype\n'), ((187, 201), 'numpy.core.multiarray.dtype', 'dtype', (['"""float"""'], {}), "('float')\n", (192, 201), False, 'from numpy.core.multiarray import dtype\n')] |
#!/usr/local/bin/python3
from robot import robot
import sys, time, threading
import numpy as np
import PyQt5.QtGui as QtGui
import PyQt5.QtCore as QtCore
import pyqtgraph as pg
AXIS_PLOT_SIZE = 400
MEDIAN_LENGTH = 30
class App(QtGui.QMainWindow):
def __init__(self, parent=None):
super(App, self).__init__... | [
"PyQt5.QtGui.QHBoxLayout",
"PyQt5.QtGui.QWidget",
"PyQt5.QtGui.QBoxLayout",
"numpy.histogram",
"pyqtgraph.GraphicsLayoutWidget",
"robot.robot",
"PyQt5.QtGui.QVBoxLayout",
"threading.Lock",
"numpy.linspace",
"PyQt5.QtGui.QApplication",
"PyQt5.QtGui.QLabel",
"threading.Thread",
"PyQt5.QtGui.QL... | [((12025, 12053), 'PyQt5.QtGui.QApplication', 'QtGui.QApplication', (['sys.argv'], {}), '(sys.argv)\n', (12043, 12053), True, 'import PyQt5.QtGui as QtGui\n'), ((337, 369), 'pyqtgraph.setConfigOptions', 'pg.setConfigOptions', ([], {'useOpenGL': '(1)'}), '(useOpenGL=1)\n', (356, 369), True, 'import pyqtgraph as pg\n'), ... |
from os.path import join
import numpy as np
import pandas as pd
from rdkit import Chem
from rdkit.Chem import rdMolDescriptors
from rdkit.Chem import MACCSkeys
from mordred import Calculator, descriptors
from pymudra.mudra import MUDRAEstimator
from sklearn.preprocessing import StandardScaler
from sklearn.model_selec... | [
"numpy.sum",
"sklearn.preprocessing.StandardScaler",
"numpy.argmax",
"pandas.read_csv",
"numpy.corrcoef",
"numpy.triu_indices_from",
"numpy.isfinite",
"numpy.any",
"sklearn.model_selection.StratifiedKFold",
"mordred.Calculator",
"numpy.array",
"numpy.linspace",
"rdkit.Chem.SDMolSupplier",
... | [((971, 994), 'mordred.Calculator', 'Calculator', (['descriptors'], {}), '(descriptors)\n', (981, 994), False, 'from mordred import Calculator, descriptors\n'), ((1011, 1052), 'os.path.join', 'join', (['"""datasets"""', '"""D4_mols_confident.sdf"""'], {}), "('datasets', 'D4_mols_confident.sdf')\n", (1015, 1052), False,... |
import unittest
# TODO: Write a test on gradient computation.
class TestGraphDatastructures(unittest.TestCase):
def test_construct_nodes_edges_simple_graph_np(self):
"""
Tests the construction of some basic datastructures useful for GraphNet computation
"""
n1 = Node(np.random.ra... | [
"tf_gnns.Node",
"tf_gnns.make_keras_simple_agg",
"numpy.abs",
"tensorflow.keras.layers.Dense",
"tensorflow.identity",
"numpy.ones",
"tf_gnns.make_graph_tuple_from_graph_list",
"tf_gnns.graphnet_utils.make_full_graphnet_functions",
"numpy.linalg.norm",
"unittest.main",
"tf_gnns.GraphNet",
"nump... | [((21438, 21464), 'unittest.main', 'unittest.main', ([], {'verbosity': '(2)'}), '(verbosity=2)\n', (21451, 21464), False, 'import unittest\n'), ((434, 456), 'tf_gnns.Graph', 'Graph', (['[n1, n2]', '[e12]'], {}), '([n1, n2], [e12])\n', (439, 456), False, 'from tf_gnns import make_mlp_graphnet_functions, GraphNet, Node, ... |
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
clf = RandomForestClassifier(n_estimators=10)
import classeval as cle
def test_summary():
X, y = cle.load_example('breast')
X_train, X_test, y_train, y_true = train_test_split(X, y, test... | [
"sklearn.ensemble.RandomForestClassifier",
"classeval.eval",
"classeval.confmatrix.eval",
"sklearn.model_selection.train_test_split",
"classeval.plot",
"classeval.load_example",
"numpy.all"
] | [((130, 169), 'sklearn.ensemble.RandomForestClassifier', 'RandomForestClassifier', ([], {'n_estimators': '(10)'}), '(n_estimators=10)\n', (152, 169), False, 'from sklearn.ensemble import RandomForestClassifier\n'), ((227, 253), 'classeval.load_example', 'cle.load_example', (['"""breast"""'], {}), "('breast')\n", (243, ... |
from datetime import datetime as date
import json, random, sys, time
from os import listdir, makedirs, mkdir
from os.path import join as path_join
import imageio
import matplotlib.pyplot as plt
import numpy as np
import torch
from torch.nn.functional import relu as relu_func
from tqdm import tqdm, trange
import wandb
... | [
"wandb.log",
"os.mkdir",
"numpy.random.seed",
"wandb.watch",
"torch.cat",
"torch.set_default_tensor_type",
"torch.randn",
"torch.std",
"numpy.mean",
"torch.no_grad",
"os.path.join",
"torch.isnan",
"torch.ones",
"wandb.Video",
"torch.isinf",
"torch.load",
"numpy.transpose",
"numpy.m... | [((432, 449), 'numpy.random.seed', 'np.random.seed', (['(0)'], {}), '(0)\n', (446, 449), True, 'import numpy as np\n'), ((907, 952), 'torch.reshape', 'torch.reshape', (['inputs', '[-1, inputs.shape[-1]]'], {}), '(inputs, [-1, inputs.shape[-1]])\n', (920, 952), False, 'import torch\n'), ((4337, 4379), 'torch.cat', 'torc... |
#!/usr/bin/env python
import math
import mpmath
import numpy as np
from floripy.mathutils.xform import shift_tensor2_dcm, shift_tensor3_dcm
from .hydrodynamicsbase import HydrodynamicsBase
class Ellipsoids_hydrodynamics(HydrodynamicsBase):
def __init__(self, model, flowfield, kwargs):
self._model = mode... | [
"mpmath.elliprf",
"mpmath.elliprj",
"floripy.mathutils.xform.shift_tensor2_dcm",
"floripy.mathutils.xform.shift_tensor3_dcm",
"numpy.zeros"
] | [((1072, 1182), 'numpy.zeros', 'np.zeros', (['self._num_bodies'], {'dtype': "[('A', 'f8', (3, 3)), ('C', 'f8', (3, 3)), ('H_tilde', 'f8', (3, 3, 3))]"}), "(self._num_bodies, dtype=[('A', 'f8', (3, 3)), ('C', 'f8', (3, 3)),\n ('H_tilde', 'f8', (3, 3, 3))])\n", (1080, 1182), True, 'import numpy as np\n'), ((745, 800),... |
import asyncio
import numpy as np
from poke_env.player.random_player import RandomPlayer
from tabulate import tabulate
from threading import Thread
from poke_env.utils import to_id_str
from poke_env.player.env_player import (
Gen8EnvSinglePlayer,
)
from poke_env.player.utils import cross_evaluate
from poke_env.tea... | [
"numpy.array",
"poke_env.teambuilder.constant_teambuilder.ConstantTeambuilder",
"asyncio.get_event_loop",
"poke_env.utils.to_id_str"
] | [((5016, 5041), 'poke_env.teambuilder.constant_teambuilder.ConstantTeambuilder', 'ConstantTeambuilder', (['team'], {}), '(team)\n', (5035, 5041), False, 'from poke_env.teambuilder.constant_teambuilder import ConstantTeambuilder\n'), ((5270, 5294), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (5... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup, find_packages, Extension
from setuptools.command.build_ext import build_ext as _build_ext
# cython compile
try:
from Cython.Build import cythonize
except ImportError:
def cythonize(*args, **kwargs):
"""cythonize"""
... | [
"Cython.Build.cythonize",
"setuptools.command.build_ext.build_ext.finalize_options",
"numpy.get_include",
"os.path.join",
"setuptools.find_packages"
] | [((506, 539), 'setuptools.command.build_ext.build_ext.finalize_options', '_build_ext.finalize_options', (['self'], {}), '(self)\n', (533, 539), True, 'from setuptools.command.build_ext import build_ext as _build_ext\n'), ((1638, 1653), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (1651, 1653), False, ... |
""" Test functionality to analyse bias triangles."""
import numpy as np
import unittest
from qtt.algorithms.bias_triangles import lever_arm
class TestBiasTriangles(unittest.TestCase):
def test_lever_arm(self):
lever_arm_fit = {
'clicked_points': np.array([[24., 38., 40.], [135., 128., 111.]]... | [
"qtt.algorithms.bias_triangles.lever_arm",
"numpy.array"
] | [((450, 480), 'qtt.algorithms.bias_triangles.lever_arm', 'lever_arm', (['(-800)', 'lever_arm_fit'], {}), '(-800, lever_arm_fit)\n', (459, 480), False, 'from qtt.algorithms.bias_triangles import lever_arm\n'), ((274, 327), 'numpy.array', 'np.array', (['[[24.0, 38.0, 40.0], [135.0, 128.0, 111.0]]'], {}), '([[24.0, 38.0, ... |
# Copyright 2020 IBM 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 writing, ... | [
"argparse.ArgumentParser",
"numpy.std",
"numpy.genfromtxt",
"numpy.hstack",
"numpy.mean",
"numpy.array",
"numpy.concatenate",
"numpy.repeat"
] | [((733, 795), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Quantitative Evaluation"""'}), "(description='Quantitative Evaluation')\n", (756, 795), False, 'import argparse\n'), ((3278, 3328), 'numpy.genfromtxt', 'genfromtxt', (['"""data/Input_credit.csv"""'], {'delimiter': '""","""'}), ... |
# **************************************************************************** #
# #
# ::: :::::::: #
# linear_mse.py :+: :+: :+: ... | [
"pathlib.Path",
"numpy.array",
"ex00.sum.elements",
"ex04.dot.dot"
] | [((2040, 2076), 'numpy.array', 'np.array', (['[0, 15, -9, 7, 12, 3, -21]'], {}), '([0, 15, -9, 7, 12, 3, -21])\n', (2048, 2076), True, 'import numpy as np\n'), ((2085, 2194), 'numpy.array', 'np.array', (['[[-6, -7, -9], [13, -2, 14], [-7, 14, -1], [-8, -4, 6], [-5, -9, 6], [1, -5,\n 11], [9, -11, 8]]'], {}), '([[-6,... |
#!/usr/bin/env python3
"""
Author : <NAME>, <NAME>, <NAME>, <NAME>
Note : Parts of this code was initially developed by the AgPipeline and TERRA-REF teams.
Date : 2020-07-09
Purpose: Convert FLIR .bin files to .tif (Season 11)
"""
import argparse
import os
import sys
import logging
import json
import numpy as np
i... | [
"json.load",
"argparse.ArgumentParser",
"os.makedirs",
"os.path.isdir",
"numpy.dtype",
"numpy.tan",
"terrautils.spatial.scanalyzer_to_latlon",
"numpy.rot90",
"numpy.interp",
"terrautils.formats.create_geotiff"
] | [((649, 767), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Season 11 flir2tif"""', 'formatter_class': 'argparse.ArgumentDefaultsHelpFormatter'}), "(description='Season 11 flir2tif', formatter_class=\n argparse.ArgumentDefaultsHelpFormatter)\n", (672, 767), False, 'import argparse\n'... |
from unittest import TestCase
import numpy as np
from nirmapper.camera import Camera
from nirmapper.model import Texture
class TestTexture(TestCase):
def setUp(self):
# Create Cam1
location = [0, 7, 0]
rotation = [-90, 180, 0]
focal_length = 35
sensor_width = 32
... | [
"numpy.array",
"nirmapper.model.Texture",
"nirmapper.camera.Camera",
"numpy.testing.assert_equal"
] | [((413, 524), 'nirmapper.camera.Camera', 'Camera', (['focal_length', 'screen_width', 'screen_height', 'sensor_width', 'sensor_height', 'location', 'rotation', '"""EULER"""'], {}), "(focal_length, screen_width, screen_height, sensor_width,\n sensor_height, location, rotation, 'EULER')\n", (419, 524), False, 'from nir... |
#!/usr/bin/env python3
# Code for performing reconstruction using pmvs2
import numpy
import pathlib
from pathlib import Path
import os
import inspect
pwd = os.path.dirname(os.path.abspath(inspect.stack()[0][1]))
pmvs2Path = Path(pwd) / 'extern/CMVS-PMVS/program/main/pmvs2'
assert pmvs2Path.is_file(), "pmvs2 binary n... | [
"cv2.cvtColor",
"subprocess.check_output",
"time.time",
"pathlib.Path",
"numpy.reshape",
"PIL.Image.fromarray",
"numpy.dot",
"pathlib.Path.cwd",
"inspect.stack",
"load_camera_info.load_all_camera_parameters"
] | [((227, 236), 'pathlib.Path', 'Path', (['pwd'], {}), '(pwd)\n', (231, 236), False, 'from pathlib import Path\n'), ((6901, 6916), 'pathlib.Path', 'Path', (['"""vis.dat"""'], {}), "('vis.dat')\n", (6905, 6916), False, 'from pathlib import Path\n'), ((8764, 8779), 'pathlib.Path', 'Path', (['"""vis.dat"""'], {}), "('vis.da... |
import numpy as np
def Minax(X,Y):
new_X = np.array(X)
new_Y = np.array(Y)
arg_max = np.argmax(new_Y)
arg_min = np.argmin(new_Y)
y_max,x_max = new_Y[arg_max],new_X[arg_max]
y_min,x_min = new_Y[arg_min],new_X[arg_min]
###
sorted_Y = np.sort(new_Y)
first_min, second_min... | [
"numpy.sort",
"numpy.array",
"numpy.argmin",
"numpy.argmax"
] | [((48, 59), 'numpy.array', 'np.array', (['X'], {}), '(X)\n', (56, 59), True, 'import numpy as np\n'), ((72, 83), 'numpy.array', 'np.array', (['Y'], {}), '(Y)\n', (80, 83), True, 'import numpy as np\n'), ((103, 119), 'numpy.argmax', 'np.argmax', (['new_Y'], {}), '(new_Y)\n', (112, 119), True, 'import numpy as np\n'), ((... |
import numpy as np
import os
import re
import itertools
import json
import requests
import scipy.sparse as sp
import pickle
from collections import Counter
from nltk.corpus import stopwords
from tqdm import tqdm
import ast
from hybrid_xml import arr_length
cachedStopWords = stopwords.words("english")
import pandas as... | [
"os.path.join",
"pandas.read_json",
"scipy.sparse.csr_matrix",
"numpy.array",
"numpy.arange",
"nltk.corpus.stopwords.words",
"itertools.chain",
"ast.literal_eval",
"sklearn.model_selection.ShuffleSplit",
"re.sub"
] | [((277, 303), 'nltk.corpus.stopwords.words', 'stopwords.words', (['"""english"""'], {}), "('english')\n", (292, 303), False, 'from nltk.corpus import stopwords\n'), ((624, 670), 're.sub', 're.sub', (['"""[^A-Za-z0-9(),!?\\\\\'\\\\`]"""', '""" """', 'string'], {}), '("[^A-Za-z0-9(),!?\\\\\'\\\\`]", \' \', string)\n', (6... |
from .setup_scripts import run_setup as run1
from .analysis_scripts import run_analysis as run2
from .community_scripts import run_community as run3
import hydra
from omegaconf import DictConfig, OmegaConf
import logging
import socket
import time
import random
import numpy as np
@hydra.main(config_path="../../data... | [
"omegaconf.OmegaConf.to_yaml",
"numpy.random.seed",
"time.time",
"socket.gethostname",
"random.seed",
"hydra.main",
"logging.getLogger"
] | [((286, 355), 'hydra.main', 'hydra.main', ([], {'config_path': '"""../../data/hydra"""', 'config_name': '"""config.yaml"""'}), "(config_path='../../data/hydra', config_name='config.yaml')\n", (296, 355), False, 'import hydra\n'), ((405, 432), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n',... |
"""
An example of extensible machine behavior. Random noise is added to machine health index
readings and monitored periodically instead of continuously.
"""
import random
import numpy as np
from simantha import Source, Machine, Sink, Maintainer, System, simulation, utils
class SensingEvent(simulation.Event):
... | [
"simantha.Sink",
"simantha.utils.generate_degradation_matrix",
"simantha.System",
"random.seed",
"simantha.Source",
"numpy.random.normal"
] | [((1942, 1992), 'simantha.utils.generate_degradation_matrix', 'utils.generate_degradation_matrix', ([], {'h_max': '(10)', 'p': '(0.1)'}), '(h_max=10, p=0.1)\n', (1975, 1992), False, 'from simantha import Source, Machine, Sink, Maintainer, System, simulation, utils\n'), ((2048, 2056), 'simantha.Source', 'Source', ([], {... |
#!/usr/bin/env python
import sys, os, pdb
import numpy as np
from scipy import special
def GaussianSpot2D(x, y, A, sigma, x0, y0):
term0 = np.square(y - y0) + np.square(x-x0)
z = A*np.exp(-term0/(2*sigma*sigma))
return z
def GaussianLine2D(x, y, A, sigma, x0, y0, L, theta):
term0 = (y-y0)*np.cos(the... | [
"numpy.square",
"scipy.special.erf",
"numpy.sin",
"numpy.exp",
"numpy.cos",
"numpy.sqrt"
] | [((1184, 1247), 'numpy.exp', 'np.exp', (['(-(expterm1 + expterm2 + expterm3 + expterm4) / expdenom)'], {}), '(-(expterm1 + expterm2 + expterm3 + expterm4) / expdenom)\n', (1190, 1247), True, 'import numpy as np\n'), ((1513, 1544), 'scipy.special.erf', 'special.erf', (['(erf1top / erfdenom)'], {}), '(erf1top / erfdenom)... |
####################################################################################################
# CSE 6140 - Fall 2019
# <NAME>
# <NAME>
# <NAME>
# <NAME>
####################################################################################################
"""
This file has the implementation of the Simua... | [
"math.exp",
"random.randint",
"util.calculate_distance_matrix",
"random.shuffle",
"numpy.asarray",
"random.choice",
"time.time",
"util.get_tour_distance",
"random.random",
"util.read_tsp_file",
"random.seed"
] | [((8701, 8725), 'random.seed', 'random.seed', (['random_seed'], {}), '(random_seed)\n', (8712, 8725), False, 'import random\n'), ((8789, 8816), 'util.read_tsp_file', 'ut.read_tsp_file', (['file_path'], {}), '(file_path)\n', (8805, 8816), True, 'import util as ut\n'), ((1461, 1472), 'time.time', 'time.time', ([], {}), '... |
from beluga.bvpsol.BaseAlgorithm import BaseAlgorithm, BVPResult
import numpy as np
import copy
from scipy.optimize import minimize
class Collocation(BaseAlgorithm):
"""
Collocation algorithm for solving boundary-value problems.
:param args: Unused
:param kwargs: Additional parameters accepted by the... | [
"scipy.optimize.minimize",
"copy.deepcopy",
"numpy.ones_like",
"numpy.zeros",
"beluga.bvpsol.BaseAlgorithm.BaseAlgorithm.__init__",
"numpy.array",
"numpy.arange",
"numpy.linspace",
"numpy.interp",
"beluga.bvpsol.BaseAlgorithm.BVPResult",
"numpy.vstack"
] | [((1695, 1740), 'beluga.bvpsol.BaseAlgorithm.BaseAlgorithm.__init__', 'BaseAlgorithm.__init__', (['self', '*args'], {}), '(self, *args, **kwargs)\n', (1717, 1740), False, 'from beluga.bvpsol.BaseAlgorithm import BaseAlgorithm, BVPResult\n'), ((3109, 3131), 'copy.deepcopy', 'copy.deepcopy', (['solinit'], {}), '(solinit)... |
import numpy as np
from menpo.image import Image
from menpofit.base import name_of_callable
from menpofit.aam.fitter import AAMFitter
from menpofit.clm.fitter import CLMFitter
from menpofit.fitter import MultilevelFitter
class SDFitter(MultilevelFitter):
r"""
Abstract Supervised Descent Fitter.
"""
d... | [
"numpy.random.rand",
"menpofit.fitter.MultilevelFitter.fit",
"menpofit.base.name_of_callable"
] | [((1494, 1596), 'menpofit.fitter.MultilevelFitter.fit', 'MultilevelFitter.fit', (['self', 'image', 'initial_shape'], {'max_iters': 'max_iters', 'gt_shape': 'gt_shape'}), '(self, image, initial_shape, max_iters=max_iters,\n gt_shape=gt_shape, **kwargs)\n', (1514, 1596), False, 'from menpofit.fitter import MultilevelF... |
import groot.datasets as datasets_module
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import MinMaxScaler
import numpy as np
datasets = ["banknote-authentication", "blood-transfusion", "breast-cancer", "cylinder-bands", "diabetes", "haberman", "ionosphere", "wine"]
data_dir = "data... | [
"sklearn.model_selection.train_test_split",
"numpy.save",
"sklearn.preprocessing.MinMaxScaler"
] | [((548, 562), 'sklearn.preprocessing.MinMaxScaler', 'MinMaxScaler', ([], {}), '()\n', (560, 562), False, 'from sklearn.preprocessing import MinMaxScaler\n'), ((644, 709), 'sklearn.model_selection.train_test_split', 'train_test_split', (['X', 'y'], {'stratify': 'y', 'test_size': '(0.2)', 'random_state': '(0)'}), '(X, y,... |
# Dataset Size: 46469
# Unique Labels: 195
# Dataset Shape: (46469, 89, 89)
# Labels Shape: (46469,)
import gdown
import numpy as np
import os
np.random.seed(1234)
def get_raw_dataset():
url = 'https://drive.google.com/uc?id=1-IqQIFQ8X2wM0KU1qyIYZOvur8C_KdVh'
output = '../output/dataset.txt'
gdown.downl... | [
"numpy.load",
"numpy.save",
"numpy.random.seed",
"gdown.download",
"os.path.exists"
] | [((145, 165), 'numpy.random.seed', 'np.random.seed', (['(1234)'], {}), '(1234)\n', (159, 165), True, 'import numpy as np\n'), ((309, 336), 'gdown.download', 'gdown.download', (['url', 'output'], {}), '(url, output)\n', (323, 336), False, 'import gdown\n'), ((783, 822), 'numpy.load', 'np.load', (['data_output'], {'allow... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import copy
import cv2 as cv
import numpy as np
import onnxruntime
class MiDaSPredictor(object):
def __init__(
self,
model_path='midas_predictor/midas_v2_1_small.onnx',
model_type='small',
):
if model_type == "large":
s... | [
"onnxruntime.InferenceSession",
"copy.deepcopy",
"numpy.array",
"cv2.resize"
] | [((565, 605), 'onnxruntime.InferenceSession', 'onnxruntime.InferenceSession', (['model_path'], {}), '(model_path)\n', (593, 605), False, 'import onnxruntime\n'), ((795, 815), 'copy.deepcopy', 'copy.deepcopy', (['image'], {}), '(image)\n', (808, 815), False, 'import copy\n'), ((829, 869), 'cv2.resize', 'cv.resize', (['x... |
from CGATReport.Tracker import *
import numpy as np
class AlignmentSummary(TrackerSQL):
'''
class to collect the alignment statistics from
picard
'''
def __call__(self, track, slice=None):
return self.getAll("""SELECT * FROM picard_stats_alignment_summary_metrics""")
class ReadsAligned... | [
"numpy.log2"
] | [((1949, 1964), 'numpy.log2', 'np.log2', (['result'], {}), '(result)\n', (1956, 1964), True, 'import numpy as np\n'), ((2383, 2398), 'numpy.log2', 'np.log2', (['result'], {}), '(result)\n', (2390, 2398), True, 'import numpy as np\n')] |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Nov 23 15:47:55 2020
Analysing the DJS of Fukuchi's paper
@author: nikorose
"""
from DJSFunctions import extract_preprocess_data, ankle_DJS
from plot_dynamics import plot_ankle_DJS
import os
import pandas as pd
import numpy as np
import matplotlib.pyp... | [
"utilities_QS.best_hyper",
"numpy.ravel",
"pandas.read_csv",
"researchpy.summary_cont",
"utilities_QS.create_df",
"statsmodels.api.stats.anova_lm",
"numpy.arange",
"DJSFunctions.ankle_DJS",
"scikit_posthocs.sign_plot",
"pandas.DataFrame",
"scipy.stats.mstats.kruskal",
"matplotlib.pyplot.subplo... | [((1101, 1141), 'seaborn.set_context', 'sns.set_context', (['"""paper"""'], {'font_scale': '(1.5)'}), "('paper', font_scale=1.5)\n", (1116, 1141), True, 'import seaborn as sns\n'), ((1142, 1168), 'seaborn.set_style', 'sns.set_style', (['"""whitegrid"""'], {}), "('whitegrid')\n", (1155, 1168), True, 'import seaborn as s... |
from os.path import join as pjoin
import numpy as np
from gym import utils
from gym.envs.mujoco import mujoco_env
from settings import BASE_DIR
class WalkersOstrichEnv(mujoco_env.MujocoEnv, utils.EzPickle):
def __init__(self):
xml_path = pjoin(BASE_DIR, "environments", "assets", "WalkersOstrich.xml")
... | [
"numpy.abs",
"gym.envs.mujoco.mujoco_env.MujocoEnv.__init__",
"numpy.square",
"numpy.isfinite",
"numpy.clip",
"os.path.join",
"gym.utils.EzPickle.__init__"
] | [((254, 317), 'os.path.join', 'pjoin', (['BASE_DIR', '"""environments"""', '"""assets"""', '"""WalkersOstrich.xml"""'], {}), "(BASE_DIR, 'environments', 'assets', 'WalkersOstrich.xml')\n", (259, 317), True, 'from os.path import join as pjoin\n'), ((327, 375), 'gym.envs.mujoco.mujoco_env.MujocoEnv.__init__', 'mujoco_env... |
'''
Reaction Diffusion : Gray-Scott model
References:
----------
Complex Patterns in a Simple System
<NAME>, Science 261, 5118, 189-192, 1993.
Encode movie
------------
ffmpeg -r 30 -i "tmp-%03d.png" -c:v libx264 -crf 23 -pix_fmt yuv420p bacteria.mp4
'''
import numpy as np
import matplotlib.pyplot as plt
n,k = 100... | [
"matplotlib.pyplot.show",
"matplotlib.pyplot.ioff",
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.yticks",
"numpy.zeros",
"matplotlib.pyplot.draw",
"matplotlib.pyplot.ion",
"matplotlib.pyplot.figure",
"numpy.array",
"matplotlib.pyplot.xticks",
"matplotlib.pyplot.savefig"
] | [((328, 356), 'numpy.zeros', 'np.zeros', (['(n + 2, 2 * n + 2)'], {}), '((n + 2, 2 * n + 2))\n', (336, 356), True, 'import numpy as np\n'), ((361, 370), 'matplotlib.pyplot.ion', 'plt.ion', ([], {}), '()\n', (368, 370), True, 'import matplotlib.pyplot as plt\n'), ((463, 518), 'matplotlib.pyplot.figure', 'plt.figure', ([... |
#!/usr/bin/env python
# coding: utf-8
import numpy as np
import sys, os
from matplotlib import pyplot as plt
from pyDOE import lhs
import torch
from torch.utils.data import TensorDataset, DataLoader
from torch.nn import Linear
import torch.nn as nn
import torch.nn.functional as F
import gpytorch
from gpytorch.means ... | [
"gpytorch.variational.VariationalStrategy",
"gpytorch.distributions.MultivariateNormal",
"gpytorch.settings.fast_computations",
"torch.sqrt",
"gpytorch.kernels.RBFKernel",
"torch.cat",
"torch.randn",
"numpy.array",
"torch.arange",
"gpytorch.means.ConstantMean",
"gpytorch.kernels.LinearKernel",
... | [((1638, 1677), 'numpy.array', 'np.array', (['[0.41, 0.4, 0.37, 0.44, 0.39]'], {}), '([0.41, 0.4, 0.37, 0.44, 0.39])\n', (1646, 1677), True, 'import numpy as np\n'), ((1701, 1790), 'numpy.array', 'np.array', (['[-1854.8214151, 3516.89893646, 221.29346712, 128.12323805, -2010.49422654]'], {}), '([-1854.8214151, 3516.898... |
__author__ = "<NAME>"
"""
This script contains the implementation of submatrices calculation method as used
in Clifford & Clifford version B of the algorithm. C&C algorithm uses Laplace
expansion for the permanents in order to compute the set of probabilities in each
step of the algorithm. Instead of c... | [
"numpy.complex128",
"numpy.array",
"numpy.nonzero"
] | [((3377, 3408), 'numpy.array', 'array', (['input_state'], {'dtype': 'int64'}), '(input_state, dtype=int64)\n', (3382, 3408), False, 'from numpy import complex128, ndarray, int64, array, nonzero, zeros, ones\n'), ((3611, 3643), 'numpy.array', 'array', (['output_state'], {'dtype': 'int64'}), '(output_state, dtype=int64)\... |
import numpy as np
class BinarizationGNN:
"""
Graph Newral Network to classify graphs into two.
parameters
----------
feature_dim : int, optional (default = 8)
Dimension of the feature vectors to each graph node.
learning_rate : float, optional (default = 0.001)
Learning rat... | [
"numpy.zeros_like",
"numpy.sum",
"numpy.maximum",
"numpy.copy",
"numpy.tanh",
"numpy.random.randn",
"numpy.zeros",
"numpy.arange",
"numpy.tile",
"numpy.array",
"numpy.exp",
"numpy.dot"
] | [((5229, 5256), 'numpy.copy', 'np.copy', (['learning_params[0]'], {}), '(learning_params[0])\n', (5236, 5256), True, 'import numpy as np\n'), ((5621, 5652), 'numpy.copy', 'np.copy', (['self.aggregate_feature'], {}), '(self.aggregate_feature)\n', (5628, 5652), True, 'import numpy as np\n'), ((5665, 5683), 'numpy.tile', ... |
import os
import numpy as np
from PIL import Image
import torch
from torch.utils.data import Dataset
from torchvision import transforms
from utils.joint_transforms import Compose, JointResize, RandomHorizontallyFlip, RandomRotate
from utils.misc import construct_print
mean_rgb = np.array([0.447, 0.407, 0.386])
std_r... | [
"os.path.isfile",
"numpy.random.randint",
"torchvision.transforms.Normalize",
"os.path.join",
"os.path.dirname",
"utils.joint_transforms.RandomHorizontallyFlip",
"numpy.max",
"torch.zeros",
"os.path.basename",
"numpy.asarray",
"numpy.min",
"torch.max",
"os.listdir",
"torch.min",
"torchvi... | [((283, 314), 'numpy.array', 'np.array', (['[0.447, 0.407, 0.386]'], {}), '([0.447, 0.407, 0.386])\n', (291, 314), True, 'import numpy as np\n'), ((325, 355), 'numpy.array', 'np.array', (['[0.244, 0.25, 0.253]'], {}), '([0.244, 0.25, 0.253])\n', (333, 355), True, 'import numpy as np\n'), ((929, 966), 'os.path.join', 'o... |
#!/usr/bin/env python
import os
import argparse
import networkx as nx
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
#import pygraphviz
from networkx.drawing.nx_agraph import graphviz_layout
translation = {"NTR": "NTR+",
"LYS": "LYS+",
"ARG": "ARG+",
... | [
"pandas.read_html",
"matplotlib.pyplot.show",
"argparse.ArgumentParser",
"pandas.read_csv",
"pandas.read_excel",
"matplotlib.pyplot.figure",
"numpy.where",
"networkx.draw",
"os.path.splitext",
"networkx.drawing.nx_agraph.graphviz_layout",
"networkx.DiGraph"
] | [((788, 800), 'networkx.DiGraph', 'nx.DiGraph', ([], {}), '()\n', (798, 800), True, 'import networkx as nx\n'), ((1200, 1227), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(12, 8)'}), '(figsize=(12, 8))\n', (1210, 1227), True, 'import matplotlib.pyplot as plt\n'), ((1237, 1255), 'networkx.drawing.nx_agra... |
import os
import time
import random
import argparse
import numpy as np
from tqdm import tqdm
import torch
import torch.nn as nn
import esm
# For DDP
import torch.distributed as dist
from torch.nn.parallel import DistributedDataParallel as DDP
from transformers import AdamW, get_linear_schedule_with_warmup
... | [
"numpy.random.seed",
"argparse.ArgumentParser",
"torch.argmax",
"torch.no_grad",
"torch.utils.data.DataLoader",
"torch.distributed.get_rank",
"torch.nn.parallel.DistributedDataParallel",
"torch.load",
"torch.utils.data.distributed.DistributedSampler",
"random.seed",
"torch.cuda.set_device",
"m... | [((444, 508), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""PPI pretrain model method"""'}), "(description='PPI pretrain model method')\n", (467, 508), False, 'import argparse\n'), ((1033, 1066), 'torch.cuda.set_device', 'torch.cuda.set_device', (['local_rank'], {}), '(local_rank)\n', (... |
#from asyncio.windows_events import NULL
from audioop import add
from re import X
from turtle import title
from urllib import response
from IMLearn.utils import split_train_test
from IMLearn.learners.regressors import LinearRegression
from typing import NoReturn
import numpy as np
import pandas as pd
import plotly.gra... | [
"plotly.graph_objects.Scatter",
"numpy.random.seed",
"pandas.read_csv",
"plotly.graph_objects.Figure",
"numpy.std",
"IMLearn.utils.split_train_test",
"numpy.array",
"numpy.linspace",
"plotly.graph_objects.Layout",
"re.X.drop",
"numpy.cov",
"IMLearn.learners.regressors.LinearRegression"
] | [((497, 530), 're.X.drop', 'X.drop', (["X.index[X['floors'] <= 0]"], {}), "(X.index[X['floors'] <= 0])\n", (503, 530), False, 'from re import X\n'), ((539, 574), 're.X.drop', 'X.drop', (["X.index[X['sqft_lot'] <= 0]"], {}), "(X.index[X['sqft_lot'] <= 0])\n", (545, 574), False, 'from re import X\n'), ((583, 618), 're.X.... |
import os
import argparse
import torch
from torchvision import transforms
from torch.utils.data import DataLoader
from dataset import EfficientdetDataset
from utils import Resizer, Normalizer, collater, iou, area
from utils import colors
import cv2
import shutil
from efficientdet.efficientdet import EfficientDet
from c... | [
"config.get_args_efficientdet",
"utils.iou",
"tqdm.tqdm",
"os.makedirs",
"torch.utils.data.DataLoader",
"torch.stack",
"os.path.isdir",
"torch.argsort",
"utils.Resizer",
"numpy.argsort",
"utils.area",
"numpy.array",
"utils.Normalizer",
"cv2.rectangle",
"shutil.rmtree",
"torch.no_grad",... | [((462, 541), 'numpy.array', 'np.array', (['[0, 1, 2, 3, 3, 2, 3, 2, 3, 3, 4, 0, 2, 2, 2, 2, 0, 1, 0, 2, 3, 3, 2]'], {}), '([0, 1, 2, 3, 3, 2, 3, 2, 3, 3, 4, 0, 2, 2, 2, 2, 0, 1, 0, 2, 3, 3, 2])\n', (470, 541), True, 'import numpy as np\n'), ((1072, 1107), 'torch.utils.data.DataLoader', 'DataLoader', (['test_set'], {})... |
"""
Functions to generate learning curves.
Records performance (error or score) vs training set size.
TODO: move utils.calc_scores to a more local function.
"""
import os
import sys
from pathlib import Path
from collections import OrderedDict
import sklearn
import numpy as np
import pandas as pd
import matplotlib
# ... | [
"ml_models.save_krs_history",
"sklearn.externals.joblib.dump",
"numpy.abs",
"numpy.argmax",
"numpy.logspace",
"sklearn.metrics.r2_score",
"sklearn.metrics.mean_absolute_error",
"pathlib.Path",
"numpy.mean",
"sklearn.metrics.f1_score",
"numpy.arange",
"matplotlib.pyplot.tight_layout",
"pandas... | [((344, 365), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (358, 365), False, 'import matplotlib\n'), ((16633, 16667), 'keras.callbacks.CSVLogger', 'CSVLogger', (["(outdir / 'training.log')"], {}), "(outdir / 'training.log')\n", (16642, 16667), False, 'from keras.callbacks import ModelCheckpoin... |
import torch
import numpy as np
import argparse
from scipy.stats import laplace
from pathlib import Path
import sys
file = Path(__file__). resolve()
package_root_directory = file.parents [1]
sys.path.append(str(package_root_directory))
from Model.model import Model
from scipy.cluster.hierarchy import dendrogram ... | [
"numpy.abs",
"argparse.ArgumentParser",
"numpy.ones",
"pathlib.Path",
"matplotlib.pyplot.tight_layout",
"Model.model.Model",
"torch.load",
"numpy.max",
"seaborn.set",
"matplotlib.pyplot.subplots",
"numpy.save",
"matplotlib.pyplot.get_cmap",
"numpy.min",
"matplotlib.pyplot.subplots_adjust",... | [((517, 537), 'matplotlib.pyplot.get_cmap', 'plt.get_cmap', (['"""Set1"""'], {}), "('Set1')\n", (529, 537), True, 'import matplotlib.pyplot as plt\n'), ((544, 564), 'matplotlib.pyplot.get_cmap', 'plt.get_cmap', (['"""Set2"""'], {}), "('Set2')\n", (556, 564), True, 'import matplotlib.pyplot as plt\n'), ((575, 614), 'arg... |
import numpy as np
import matplotlib.pyplot as plt
def cart2pol(x, y):
rho = np.sqrt(x**2 + y**2)
phi = np.arctan2(y, x)
return(rho, phi)
def pol2cart(rho, phi):
x = rho * np.cos(phi)
y = rho * np.sin(phi)
return(x, y)
def sum2(x, y):
return tuple(map(sum, zip(x,y)))
def sum3(x, y, z):
re... | [
"matplotlib.pyplot.show",
"numpy.arctan2",
"numpy.cross",
"numpy.sin",
"numpy.linalg.norm",
"numpy.cos",
"matplotlib.pyplot.subplots",
"numpy.sqrt"
] | [((82, 106), 'numpy.sqrt', 'np.sqrt', (['(x ** 2 + y ** 2)'], {}), '(x ** 2 + y ** 2)\n', (89, 106), True, 'import numpy as np\n'), ((113, 129), 'numpy.arctan2', 'np.arctan2', (['y', 'x'], {}), '(y, x)\n', (123, 129), True, 'import numpy as np\n'), ((381, 405), 'numpy.sqrt', 'np.sqrt', (['(x ** 2 + y ** 2)'], {}), '(x ... |
# -*- coding: utf-8 -*-
"""
Created on Mon Mar 9 17:12:47 2020
@author: <NAME>
code to run the quadcopter model autonomously on a track using trained CNN model
"""
#import essential libraries
import sim
import sys
#import os
#import matplotlib.pyplot as plt
import cv2
import numpy as np
import time
from keras.models... | [
"keras.models.load_model",
"sim.simxCallScriptFunction",
"numpy.flip",
"sim.simxSetObjectOrientation",
"numpy.argmax",
"time.sleep",
"sim.simxGetObjectOrientation",
"numpy.array",
"sim.simxGetObjectHandle",
"sim.simxGetObjectPosition",
"sim.simxStart",
"sim.simxFinish",
"numpy.squeeze",
"s... | [((432, 474), 'keras.models.load_model', 'load_model', (["(PATH + '/Model/Quad_Net_Wt.h5')"], {}), "(PATH + '/Model/Quad_Net_Wt.h5')\n", (442, 474), False, 'from keras.models import load_model\n'), ((475, 490), 'time.sleep', 'time.sleep', (['(0.5)'], {}), '(0.5)\n', (485, 490), False, 'import time\n'), ((552, 570), 'si... |
# Author: <NAME> (http://falexwolf.de)
# T. Callies
"""Rank genes according to differential expression.
"""
import numpy as np
import pandas as pd
from math import sqrt, floor
from scipy.sparse import issparse
from .. import utils
from .. import settings
from .. import logging as logg
from ..preprocessing imp... | [
"pandas.DataFrame",
"numpy.abs",
"numpy.sum",
"math.sqrt",
"scipy.sparse.issparse",
"numpy.flatnonzero",
"numpy.empty",
"numpy.zeros",
"math.floor",
"numpy.isnan",
"numpy.rec.fromarrays",
"numpy.argsort",
"numpy.argpartition",
"numpy.where",
"numpy.array",
"numpy.arange",
"numpy.sqrt... | [((4116, 4267), 'numpy.array', 'np.array', (['(group_by, reference, test_type, use_raw)'], {'dtype': "[('group_by', 'U50'), ('reference', 'U50'), ('test_type', 'U50'), (\n 'use_raw', np.bool_)]"}), "((group_by, reference, test_type, use_raw), dtype=[('group_by',\n 'U50'), ('reference', 'U50'), ('test_type', 'U50'... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jul 17 16:17:25 2017
@author: jorgemauricio
"""
# librerias
import numpy as np
# Funciones universales
arr = np.arange(11)
# desplegar
arr
# raiz cuadrada
np.sqrt(arr)
# calcular el exponencial (e^)
np.exp(arr)
# Funciones binarias requieren dos ... | [
"numpy.maximum",
"numpy.random.randn",
"numpy.arange",
"numpy.exp",
"numpy.add",
"numpy.sqrt"
] | [((179, 192), 'numpy.arange', 'np.arange', (['(11)'], {}), '(11)\n', (188, 192), True, 'import numpy as np\n'), ((227, 239), 'numpy.sqrt', 'np.sqrt', (['arr'], {}), '(arr)\n', (234, 239), True, 'import numpy as np\n'), ((272, 283), 'numpy.exp', 'np.exp', (['arr'], {}), '(arr)\n', (278, 283), True, 'import numpy as np\n... |
import unittest
import numpy as np
import tensorflow as tf
from monopsr.datasets.kitti import instance_utils
class InstanceUtilsTest(tf.test.TestCase):
def test_get_proj_uv_map(self):
box_2d = np.asarray([0, 10, 10, 20], dtype=np.float32)
roi_size = (10, 10)
proj_uv_map = instance_uti... | [
"numpy.deg2rad",
"numpy.asarray",
"monopsr.datasets.kitti.instance_utils.get_exp_proj_uv_map",
"monopsr.datasets.kitti.instance_utils.tf_inst_xyz_map_local_to_global",
"tensorflow.to_float",
"numpy.linspace",
"numpy.reshape",
"numpy.random.rand",
"numpy.testing.assert_allclose",
"monopsr.datasets.... | [((211, 256), 'numpy.asarray', 'np.asarray', (['[0, 10, 10, 20]'], {'dtype': 'np.float32'}), '([0, 10, 10, 20], dtype=np.float32)\n', (221, 256), True, 'import numpy as np\n'), ((308, 360), 'monopsr.datasets.kitti.instance_utils.get_exp_proj_uv_map', 'instance_utils.get_exp_proj_uv_map', (['box_2d', 'roi_size'], {}), '... |
#!/usr/bin/env python3
'''
!pip3 install -U tensorflow-gpu keras numpy scipy
'''
import os
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
from scipy.io import wavfile
from scipy.linalg.blas import daxpy
from keras import backend as K
from keras.callbacks import EarlyStopping
from keras.lay... | [
"os.remove",
"numpy.fft.rfft",
"numpy.abs",
"scipy.io.wavfile.read",
"tensorflow.ConfigProto",
"os.path.isfile",
"numpy.arange",
"matplotlib.pyplot.specgram",
"numpy.fft.irfft",
"keras.layers.GRU",
"numpy.append",
"numpy.reshape",
"numpy.hanning",
"matplotlib.pyplot.show",
"keras.backend... | [((480, 522), 'scipy.io.wavfile.read', 'wavfile.read', (['"""11_Dialogue_Class_Rank.wav"""'], {}), "('11_Dialogue_Class_Rank.wav')\n", (492, 522), False, 'from scipy.io import wavfile\n'), ((1069, 1115), 'matplotlib.pyplot.specgram', 'plt.specgram', (['data'], {'NFFT': 'window_size', 'Fs': 'slide'}), '(data, NFFT=windo... |
"""
Extract MADIS METAR QC information to the database
"""
from __future__ import print_function
import os
import sys
import datetime
import numpy as np
import pytz
from netCDF4 import chartostring
from pyiem.datatypes import temperature
from pyiem.util import get_dbconn, ncopen
def figure(val, qcval):
if qcval... | [
"pyiem.util.ncopen",
"pyiem.datatypes.temperature",
"datetime.datetime",
"datetime.datetime.utcnow",
"os.path.isfile",
"datetime.timedelta",
"netCDF4.chartostring",
"numpy.ma.is_masked",
"pyiem.util.get_dbconn",
"sys.exit"
] | [((699, 716), 'pyiem.util.get_dbconn', 'get_dbconn', (['"""iem"""'], {}), "('iem')\n", (709, 716), False, 'from pyiem.util import get_dbconn, ncopen\n'), ((979, 989), 'pyiem.util.ncopen', 'ncopen', (['fn'], {}), '(fn)\n', (985, 989), False, 'from pyiem.util import get_dbconn, ncopen\n'), ((1001, 1045), 'netCDF4.chartos... |
import numpy as np
import iminuit
import matplotlib.pyplot as plt
class LogisticRegression(object):
"""
Class for fitting, predicting and estimating error on logistic regression
Quick usage:
- instantiate: m = LogisticRegression()
- fit: m.fit(X, y)
- predict: m.predict(X)
- ... | [
"iminuit.Minuit.from_array_func",
"numpy.sum",
"numpy.abs",
"numpy.log",
"numpy.square",
"numpy.ones",
"numpy.sign",
"numpy.array",
"numpy.tile",
"numpy.random.multivariate_normal",
"numpy.exp",
"numpy.dot",
"numpy.atleast_1d",
"numpy.diag"
] | [((4504, 4551), 'numpy.sum', 'np.sum', (['((y_pred - y)[:, np.newaxis] * X)'], {'axis': '(0)'}), '((y_pred - y)[:, np.newaxis] * X, axis=0)\n', (4510, 4551), True, 'import numpy as np\n'), ((17422, 17433), 'numpy.array', 'np.array', (['X'], {}), '(X)\n', (17430, 17433), True, 'import numpy as np\n'), ((11195, 11446), '... |
import andes
from andes.utils.paths import get_case
case_path = "11BUS_KUNDUR.raw"
dyr_path = "11BUS_KUNDUR_TGOV.dyr"
ss = andes.run(case_path, addfile = dyr_path, routine='eig')
import numpy as np
eigs = ss.EIG.mu
eigs_sorted = np.sort_complex(eigs)
np.savetxt("eigs_tgov_andes.csv", eigs_sorted, delimiter = ",")
#... | [
"andes.run",
"numpy.savetxt",
"numpy.sort_complex"
] | [((125, 178), 'andes.run', 'andes.run', (['case_path'], {'addfile': 'dyr_path', 'routine': '"""eig"""'}), "(case_path, addfile=dyr_path, routine='eig')\n", (134, 178), False, 'import andes\n'), ((233, 254), 'numpy.sort_complex', 'np.sort_complex', (['eigs'], {}), '(eigs)\n', (248, 254), True, 'import numpy as np\n'), (... |
#! /usr/bin/env python
# Copyright (C) 2015 ETH Zurich, Institute for Astronomy
# System imports
from __future__ import print_function, division, absolute_import, unicode_literals
# External modules
import numpy as np
# fastell4py imports
from fastell4py import _fastell
#axis ratio (<=1; <0 means: end)
#arat = 0... | [
"fastell4py._fastell.ellipphi_array",
"numpy.empty",
"fastell4py._fastell.fastellmag_array",
"fastell4py._fastell.fastelldefl_array",
"fastell4py._fastell.fastelldefl"
] | [((1636, 1647), 'numpy.empty', 'np.empty', (['n'], {}), '(n)\n', (1644, 1647), True, 'import numpy as np\n'), ((1660, 1671), 'numpy.empty', 'np.empty', (['n'], {}), '(n)\n', (1668, 1671), True, 'import numpy as np\n'), ((1687, 1698), 'numpy.empty', 'np.empty', (['n'], {}), '(n)\n', (1695, 1698), True, 'import numpy as ... |
import tensorflow as tf
import keras
from reg_cnn import get_model
from datagen import DataGenerator
from matplotlib import pyplot as plt
import os
import numpy as np
np.set_printoptions(precision=2)
import config as cfg
path = os.path.dirname(os.path.abspath(__file__))
train_gen = DataGenerator(path='cat_dog/cats_and... | [
"matplotlib.pyplot.title",
"os.path.abspath",
"numpy.set_printoptions",
"tensorflow.keras.models.load_model",
"matplotlib.pyplot.show",
"matplotlib.pyplot.plot",
"reg_cnn.get_model",
"keras.callbacks.ModelCheckpoint",
"tensorflow.keras.metrics.MeanSquaredError",
"matplotlib.pyplot.legend",
"data... | [((167, 199), 'numpy.set_printoptions', 'np.set_printoptions', ([], {'precision': '(2)'}), '(precision=2)\n', (186, 199), True, 'import numpy as np\n'), ((284, 342), 'datagen.DataGenerator', 'DataGenerator', ([], {'path': '"""cat_dog/cats_and_dogs_filtered/train"""'}), "(path='cat_dog/cats_and_dogs_filtered/train')\n",... |
# -*- coding: utf-8 -*-
from __future__ import annotations
import os
import tempfile
import platform
from abc import ABCMeta, abstractmethod
from typing import cast, List, Optional
from pathlib import Path
from datetime import datetime
from dataclasses import dataclass, field, InitVar
from distutils.dir_util import c... | [
"tempfile.TemporaryDirectory",
"datetime.datetime.today",
"typing.cast",
"os.path.realpath",
"dataclasses.field",
"pathlib.Path",
"numpy.isclose",
"importlib.metadata.version",
"platform.system"
] | [((2939, 3004), 'dataclasses.field', 'field', ([], {'default_factory': "(lambda : ['dx', 'dy', 'simulate_turbines'])"}), "(default_factory=lambda : ['dx', 'dy', 'simulate_turbines'])\n", (2944, 3004), False, 'from dataclasses import dataclass, field, InitVar\n'), ((3205, 3234), 'dataclasses.field', 'field', ([], {'init... |
from engine.geometry import calcs
from engine.geometry.calcs import NoSolutionException
from engine.geometry.obstacle.arcFinder.arcCriticalPoint import ArcCriticalPoint
from engine.geometry.obstacle.arcFinder.arcTarget import ArcTarget
from engine.geometry.obstacle.vertexTarget import VertexTarget
import numpy as np
... | [
"engine.geometry.calcs.unitVectorOfAngle",
"engine.geometry.calcs.getRayCircleIntersections",
"engine.geometry.calcs.cross2",
"numpy.dot",
"engine.geometry.obstacle.vertexTarget.VertexTarget.__init__"
] | [((441, 508), 'engine.geometry.obstacle.vertexTarget.VertexTarget.__init__', 'VertexTarget.__init__', (['self', 'position', 'velocity', 'normal', 'pointAngle'], {}), '(self, position, velocity, normal, pointAngle)\n', (462, 508), False, 'from engine.geometry.obstacle.vertexTarget import VertexTarget\n'), ((729, 819), '... |
""" Redwood Creek Analysis: Landscape generation functions. """
import logging
import os
import pyproj
import numpy as np
import pandas as pd
import cartopy
from cartopy.io.shapereader import Reader
from functools import partial
from shapely.ops import transform
from shapely import geometry
import shapefile
import r... | [
"functools.partial",
"numpy.ceil",
"shapely.geometry.Polygon",
"os.path.realpath",
"raster_tools.find_position_in_raster",
"numpy.zeros",
"shapely.ops.transform",
"numpy.floor",
"logging.info",
"numpy.where",
"pyproj.Proj",
"pyproj.transform",
"Scripts.average_weather.average_mask",
"os.pa... | [((586, 662), 'numpy.zeros', 'np.zeros', (["(host_array.header_vals['nrows'], host_array.header_vals['ncols'])"], {}), "((host_array.header_vals['nrows'], host_array.header_vals['ncols']))\n", (594, 662), True, 'import numpy as np\n'), ((682, 758), 'numpy.zeros', 'np.zeros', (["(host_array.header_vals['nrows'], host_ar... |
# coding: utf-8
# Object Detection Demo
import argparse
import cv2
import numpy as np
import os
import sys
import time
import tensorflow as tf
from distutils.version import StrictVersion
if StrictVersion(tf.__version__) < StrictVersion('1.12.0'):
raise ImportError('Please upgrade your TensorFlow installation to v... | [
"argparse.ArgumentParser",
"distutils.version.StrictVersion",
"numpy.argmax",
"models.selector.select_model",
"tensorflow.ConfigProto",
"matplotlib.pyplot.figure",
"cv2.rectangle",
"cv2.imshow",
"os.path.join",
"cv2.line",
"utils.pairwise",
"chainer.serializers.load_npz",
"hand_dataset.selec... | [((448, 513), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""object_detection_tutorial."""'}), "(description='object_detection_tutorial.')\n", (471, 513), False, 'import argparse\n'), ((848, 858), 'tensorflow.Graph', 'tf.Graph', ([], {}), '()\n', (856, 858), True, 'import tensorflow as t... |
import matplotlib.pyplot as plt
import numpy as np
class SelectMajorCategories:
def __init__(self, columns: list, perc: float = 0.1, minor_label='<other>', dropna=True):
self.columns = columns if columns is not None else []
self.perc = perc
self.major_categories = {}
self.minor_lab... | [
"numpy.isin",
"numpy.sin",
"numpy.cos"
] | [((1065, 1108), 'numpy.cos', 'np.cos', (['(x_array * (2 * np.pi / self.period))'], {}), '(x_array * (2 * np.pi / self.period))\n', (1071, 1108), True, 'import numpy as np\n'), ((1127, 1170), 'numpy.sin', 'np.sin', (['(x_array * (2 * np.pi / self.period))'], {}), '(x_array * (2 * np.pi / self.period))\n', (1133, 1170), ... |
import unittest
import numpy as np
from numcube.experimental import MultiAxis
class MultiAxisTests(unittest.TestCase):
def test_create(self):
values = np.array([(1.5, 1, "x"), (0.5, 1, "y")], dtype=[('A', float), ('B', int), ('C', str)])
a = MultiAxis(values)
self.assertEqual(a.name, ("A... | [
"numcube.experimental.MultiAxis",
"numpy.array"
] | [((167, 258), 'numpy.array', 'np.array', (["[(1.5, 1, 'x'), (0.5, 1, 'y')]"], {'dtype': "[('A', float), ('B', int), ('C', str)]"}), "([(1.5, 1, 'x'), (0.5, 1, 'y')], dtype=[('A', float), ('B', int), (\n 'C', str)])\n", (175, 258), True, 'import numpy as np\n'), ((266, 283), 'numcube.experimental.MultiAxis', 'MultiAx... |
import unittest
from frds.measures import bank
import numpy as np
class AbsorptionRatioCase(unittest.TestCase):
def setUp(self) -> None:
# The data in the doc by <NAME>, <NAME>, and <NAME>
self.data = np.array(
[
[0.015, 0.031, 0.007, 0.034, 0.014, 0.011],
... | [
"frds.measures.bank.distress_insurance_premium",
"frds.measures.bank.cca",
"frds.measures.bank.absorption_ratio",
"frds.measures.bank.marginal_expected_shortfall",
"numpy.random.seed",
"frds.measures.bank.systemic_expected_shortfall",
"numpy.array",
"numpy.random.normal",
"numpy.round"
] | [((223, 369), 'numpy.array', 'np.array', (['[[0.015, 0.031, 0.007, 0.034, 0.014, 0.011], [0.012, 0.063, 0.027, 0.023, \n 0.073, 0.055], [0.072, 0.043, 0.097, 0.078, 0.036, 0.083]]'], {}), '([[0.015, 0.031, 0.007, 0.034, 0.014, 0.011], [0.012, 0.063, 0.027,\n 0.023, 0.073, 0.055], [0.072, 0.043, 0.097, 0.078, 0.03... |
#!/usr/bin/env python
# coding: utf-8
# In[1]:
import numpy as np
# In[16]:
def PairSelection(self, date):
'''Selects the pair of stocks with the maximum Kendall tau value.
It's called on first day of each month'''
if date.month == self.month:
return Universe.Unchanged
symbols = [ Symbo... | [
"numpy.nan_to_num",
"numpy.log",
"numpy.std",
"numpy.mean",
"numpy.exp"
] | [((7129, 7173), 'numpy.log', 'np.log', (['self.closes_by_symbol[self.x_symbol]'], {}), '(self.closes_by_symbol[self.x_symbol])\n', (7135, 7173), True, 'import numpy as np\n'), ((7188, 7232), 'numpy.log', 'np.log', (['self.closes_by_symbol[self.y_symbol]'], {}), '(self.closes_by_symbol[self.y_symbol])\n', (7194, 7232), ... |
# -*- coding: utf-8 -*-
import numpy as np
import inferbeddings.nli.util as util
import logging
import pytest
logger = logging.getLogger(__name__)
def get_train(has_bos, has_eos, has_unk):
train_instances, dev_instances, test_instances = util.SNLI.generate()
all_instances = train_instances + dev_instances ... | [
"logging.basicConfig",
"inferbeddings.nli.util.instances_to_dataset",
"pytest.main",
"inferbeddings.nli.util.SNLI.generate",
"numpy.array",
"logging.getLogger"
] | [((122, 149), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (139, 149), False, 'import logging\n'), ((247, 267), 'inferbeddings.nli.util.SNLI.generate', 'util.SNLI.generate', ([], {}), '()\n', (265, 267), True, 'import inferbeddings.nli.util as util\n'), ((1641, 1842), 'inferbeddings.nli... |
# Copyright (C) 2020-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
from __future__ import absolute_import, division, print_function
import numpy as np
import torch
from torch import nn
from torch.cuda.amp import GradScaler, autocast
from torchreid import metrics
from torchreid.engine.engine import E... | [
"torch.cuda.amp.autocast",
"torchreid.losses.AMBinaryLoss",
"torchreid.metrics.accuracy_multilabel",
"torch.nn.KLDivLoss",
"torchreid.losses.CrossEntropyLoss",
"torchreid.metrics.evaluate_multihead_classification",
"torchreid.losses.AMSoftmaxLoss",
"torchreid.metrics.accuracy",
"torch.cuda.amp.GradS... | [((12411, 12426), 'torch.no_grad', 'torch.no_grad', ([], {}), '()\n', (12424, 12426), False, 'import torch\n'), ((3083, 3116), 'torch.cuda.amp.GradScaler', 'GradScaler', ([], {'enabled': 'mix_precision'}), '(enabled=mix_precision)\n', (3093, 3116), False, 'from torch.cuda.amp import GradScaler, autocast\n'), ((3169, 32... |
from matplotlib import pylab as plt
from numpy import arange, cos, sin
def calculate_split(seisR, seisT, azimuth, plot=False, ax=None):
from numpy import zeros, pi
from numpy.linalg import eig
from scipy.signal import tukey
C = zeros(4).reshape(2, 2)
phis = arange(-pi / 2., pi / 2., 0.05)
dts... | [
"matplotlib.pylab.xticks",
"numpy.zeros",
"numpy.linalg.eig",
"matplotlib.pylab.contour",
"matplotlib.pylab.yticks",
"numpy.sin",
"numpy.arange",
"numpy.cos"
] | [((281, 314), 'numpy.arange', 'arange', (['(-pi / 2.0)', '(pi / 2.0)', '(0.05)'], {}), '(-pi / 2.0, pi / 2.0, 0.05)\n', (287, 314), False, 'from numpy import arange, cos, sin\n'), ((323, 343), 'numpy.arange', 'arange', (['(0.0)', '(4)', '(0.05)'], {}), '(0.0, 4, 0.05)\n', (329, 343), False, 'from numpy import arange, c... |
"""
Auxilary functions for working with persistence diagrams.
"""
import itertools
import numpy as np
def union_vals(A, B):
"""Helper function for summing grid landscapes.
Extends one list to the length of the other by padding with zero lists.
"""
diff = A.shape[0] - B.shape[0]
if diff < 0:
... | [
"numpy.array",
"numpy.abs",
"numpy.pad",
"itertools.zip_longest"
] | [((896, 953), 'itertools.zip_longest', 'itertools.zip_longest', (['A.critical_pairs', 'B.critical_pairs'], {}), '(A.critical_pairs, B.critical_pairs)\n', (917, 953), False, 'import itertools\n'), ((4019, 4036), 'numpy.array', 'np.array', (['snapped'], {}), '(snapped)\n', (4027, 4036), True, 'import numpy as np\n'), ((5... |
"""trainloss.py: runner for minimizing training loss of a model.
This file runs an optimizer over a model, with the objective of reducing
the training loss as much as possible. Multiple learning rates can be
specified, and the one which leads to the lowest loss is selected.
"""
import json
from argparse import Argume... | [
"numpy.random.seed",
"argparse.ArgumentParser",
"eve.exp.utils.get_subclass_names",
"eve.exp.utils.get_subclass_from_name",
"eve.exp.callbacks.BatchLossHistory",
"eve.exp.utils.build_subclass_object",
"eve.exp.utils.save_pkl",
"eve.exp.callbacks.EpochFullLossHistory",
"eve.optim.monitor.EveMonitor"
... | [((392, 416), 'numpy.random.seed', 'np.random.seed', (['EXP_SEED'], {}), '(EXP_SEED)\n', (406, 416), True, 'import numpy as np\n'), ((887, 903), 'argparse.ArgumentParser', 'ArgumentParser', ([], {}), '()\n', (901, 903), False, 'from argparse import ArgumentParser\n'), ((1850, 1915), 'eve.exp.utils.build_subclass_object... |
import numpy as np
from astroquery.vizier import Vizier
from astropy.io import ascii
def get_data(koi_star, nplanets, datatable = 'J/ApJS/217/16/table2'):
obs = []
errs = []
epochs = []
print("Downloading Rowe+15 data from Vizier...")
Vizier.ROW_LIMIT = 10000 #full catalog
cats = Vizier.query_constraints(catalog... | [
"numpy.array"
] | [((580, 616), 'numpy.array', 'np.array', (["cur_dat['tn']"], {'dtype': 'float'}), "(cur_dat['tn'], dtype=float)\n", (588, 616), True, 'import numpy as np\n'), ((627, 665), 'numpy.array', 'np.array', (["cur_dat['TTVn']"], {'dtype': 'float'}), "(cur_dat['TTVn'], dtype=float)\n", (635, 665), True, 'import numpy as np\n'),... |
"""
Utilises the powerful tools of Selenium to safely navigate and collect data from websites without the use of an API.
"""
from typing import Tuple
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import ... | [
"pandas.DataFrame",
"uuid.uuid4",
"time.sleep",
"numpy.append",
"selenium.webdriver.ChromeOptions",
"numpy.array",
"selenium.webdriver.Chrome"
] | [((3508, 3533), 'selenium.webdriver.ChromeOptions', 'webdriver.ChromeOptions', ([], {}), '()\n', (3531, 3533), False, 'from selenium import webdriver\n'), ((5847, 5890), 'time.sleep', 'sleep', (['(5 if self.slow_internet_speed else 2)'], {}), '(5 if self.slow_internet_speed else 2)\n', (5852, 5890), False, 'from time i... |
# Copyright 2017 The TensorFlow 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 applica... | [
"object_detection.protos.hyperparams_pb2.Hyperparams",
"numpy.random.rand",
"tensorflow.compat.v1.test.main",
"object_detection.utils.tf_version.is_tf2",
"google.protobuf.text_format.Merge",
"object_detection.builders.hyperparams_builder.build",
"tensorflow.compat.v1.random_uniform"
] | [((1230, 1249), 'object_detection.utils.tf_version.is_tf2', 'tf_version.is_tf2', ([], {}), '()\n', (1247, 1249), False, 'from object_detection.utils import tf_version\n'), ((6323, 6337), 'tensorflow.compat.v1.test.main', 'tf.test.main', ([], {}), '()\n', (6335, 6337), True, 'import tensorflow.compat.v1 as tf\n'), ((147... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.