code stringlengths 31 1.05M | apis list | extract_api stringlengths 97 1.91M |
|---|---|---|
from rsqsim_api.fault.multifault import RsqSimMultiFault, RsqSimSegment
import multiprocessing as mp
from typing import Union
import h5py
import netCDF4 as nc
import numpy as np
import random
sentinel = None
def multiprocess_gf_to_hdf(fault: Union[RsqSimSegment, RsqSimMultiFault], x_range: np.ndarray, y_range: np.nda... | [
"random.shuffle",
"multiprocessing.Process",
"netCDF4.Dataset",
"multiprocessing.cpu_count",
"h5py.File",
"numpy.array",
"numpy.zeros",
"numpy.meshgrid",
"multiprocessing.Queue"
] | [((2635, 2681), 'random.shuffle', 'random.shuffle', (['all_patches_with_write_indices'], {}), '(all_patches_with_write_indices)\n', (2649, 2681), False, 'import random\n'), ((3354, 3364), 'multiprocessing.Queue', 'mp.Queue', ([], {}), '()\n', (3362, 3364), True, 'import multiprocessing as mp\n'), ((4152, 4179), 'h5py.F... |
import numpy as np
import pandas as pd
import pytest
import tabmat as tm
@pytest.fixture()
def X():
df = pd.read_pickle("tests/real_matrix.pkl")
X_split = tm.from_pandas(df, np.float64)
wts = np.ones(df.shape[0]) / df.shape[0]
X_std = X_split.standardize(wts, True, True)[0]
return X_std
def tes... | [
"pandas.read_pickle",
"numpy.random.rand",
"numpy.ones",
"numpy.testing.assert_almost_equal",
"tabmat.from_pandas",
"pytest.fixture",
"numpy.arange"
] | [((77, 93), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (91, 93), False, 'import pytest\n'), ((112, 151), 'pandas.read_pickle', 'pd.read_pickle', (['"""tests/real_matrix.pkl"""'], {}), "('tests/real_matrix.pkl')\n", (126, 151), True, 'import pandas as pd\n'), ((166, 196), 'tabmat.from_pandas', 'tm.from_pandas... |
import gym
import gym.spaces
import json
import numpy as np
import os
import socket
gym_version = tuple(int(x) for x in gym.__version__.split('.'))
class Channel:
def __init__(self):
self.sock = None
self.dirty = False
self._value = None
self.annotations = {}
def set_socket(s... | [
"numpy.copyto",
"socket.socket",
"gym.spaces.MultiDiscrete",
"numpy.memmap",
"os.path.join",
"json.dumps",
"gym.spaces.Box",
"numpy.array",
"numpy.dot",
"gym_remote.exceptions.make",
"gym.__version__.split",
"numpy.full",
"numpy.dtype"
] | [((2072, 2098), 'numpy.array', 'np.array', (['folds'], {'dtype': 'int'}), '(folds, dtype=int)\n', (2080, 2098), True, 'import numpy as np\n'), ((2210, 2249), 'numpy.dot', 'np.dot', (['self.folds', '(value % self.ranges)'], {}), '(self.folds, value % self.ranges)\n', (2216, 2249), True, 'import numpy as np\n'), ((2886, ... |
from __future__ import print_function
# Copyright (c) 2015-2016, Danish Geodata Agency <<EMAIL>>
# Copyright (c) 2016, Danish Agency for Data Supply and Efficiency <<EMAIL>>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that t... | [
"os.path.exists",
"osgeo.gdal.AllRegister",
"numpy.loadtxt",
"numpy.load",
"osgeo.gdal.GetDriverByName"
] | [((1056, 1074), 'osgeo.gdal.AllRegister', 'gdal.AllRegister', ([], {}), '()\n', (1072, 1074), False, 'from osgeo import gdal\n'), ((1084, 1113), 'osgeo.gdal.GetDriverByName', 'gdal.GetDriverByName', (['"""GTiff"""'], {}), "('GTiff')\n", (1104, 1113), False, 'from osgeo import gdal\n'), ((1119, 1140), 'os.path.exists', ... |
"""
===========================
Plotting feature importance
===========================
A simple example showing how to compute and display
feature importances, it is also compared with the
feature importances obtained using random forests.
Feature importance is a measure of the effect of the features
on the outputs.... | [
"sklearn.ensemble.RandomForestRegressor",
"pyearth.Earth",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.figure",
"numpy.random.seed",
"numpy.random.uniform",
"numpy.sin",
"matplotlib.pyplot.title",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.show"
] | [((793, 813), 'numpy.random.seed', 'numpy.random.seed', (['(2)'], {}), '(2)\n', (810, 813), False, 'import numpy\n'), ((836, 869), 'numpy.random.uniform', 'numpy.random.uniform', ([], {'size': '(m, n)'}), '(size=(m, n))\n', (856, 869), False, 'import numpy\n'), ((1093, 1197), 'pyearth.Earth', 'Earth', ([], {'max_degree... |
#!/usr/bin/env python
"""
Displaying large NumPy arrays with TabularEditor
A demonstration of how the TabularEditor can be used to display (large) NumPy
arrays, in this case 100,000 random 3D points from a unit cube.
In addition to showing the coordinates of each point, it also displays the
index of each point in th... | [
"numpy.random.random",
"numpy.sqrt"
] | [((1767, 1786), 'numpy.random.random', 'random', (['(100000, 3)'], {}), '((100000, 3))\n', (1773, 1786), False, 'from numpy.random import random\n'), ((1206, 1260), 'numpy.sqrt', 'sqrt', (['((x - 0.5) ** 2 + (y - 0.5) ** 2 + (z - 0.5) ** 2)'], {}), '((x - 0.5) ** 2 + (y - 0.5) ** 2 + (z - 0.5) ** 2)\n', (1210, 1260), F... |
#=========
import time
import numpy as np
import matplotlib.pyplot as plt
from moviepy.editor import VideoClip
from moviepy.video.io.bindings import mplfig_to_npimage
fps = 2
f_dt = 1/fps
fig, ax = plt.subplots( figsize=(6,6), facecolor=[1,1,1] )
x = np.arange(0, 2*np.pi, 0.01)
line, = ax.plot(x, np.sin(x), lw=3... | [
"moviepy.video.io.bindings.mplfig_to_npimage",
"moviepy.editor.VideoClip",
"numpy.sin",
"time.time",
"matplotlib.pyplot.subplots",
"numpy.arange"
] | [((205, 254), 'matplotlib.pyplot.subplots', 'plt.subplots', ([], {'figsize': '(6, 6)', 'facecolor': '[1, 1, 1]'}), '(figsize=(6, 6), facecolor=[1, 1, 1])\n', (217, 254), True, 'import matplotlib.pyplot as plt\n'), ((258, 287), 'numpy.arange', 'np.arange', (['(0)', '(2 * np.pi)', '(0.01)'], {}), '(0, 2 * np.pi, 0.01)\n'... |
import cPickle as pickle
from shapely.geometry import Point, Polygon
import numpy as np
from netCDF4 import Dataset
from scipy.interpolate import griddata
p_lev = 925
geopotential, longitude_dom, latitude_dom, time_dom, time_hour = pickle.load\
(open('/nfs/a90/eepdw/D... | [
"numpy.unique",
"numpy.where",
"netCDF4.Dataset",
"shapely.geometry.Polygon",
"numpy.min",
"numpy.meshgrid"
] | [((558, 670), 'shapely.geometry.Polygon', 'Polygon', (['((73.0, 21.0), (83.0, 16.0), (87.0, 22.0), (90.0, 22.0), (90.0, 23.8), (\n 83.0, 24.2), (76.3, 28.0))'], {}), '(((73.0, 21.0), (83.0, 16.0), (87.0, 22.0), (90.0, 22.0), (90.0, \n 23.8), (83.0, 24.2), (76.3, 28.0)))\n', (565, 670), False, 'from shapely.geomet... |
# -*- coding: utf-8 -*-
import wx
import ui
import numpy as np
class wxFrame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self,parent=None,title="ABC",size=(600,450))
self.init_ctrls()
self.SetBackgroundColour("#E5E5E5")
self.Show()
def init_ctrls(self):
sel... | [
"wx.Button",
"wx.BoxSizer",
"numpy.column_stack",
"wx.StaticBoxSizer",
"wx.StaticText",
"wx.TextCtrl",
"numpy.array",
"ui.DataGrid",
"wx.Frame.__init__",
"wx.StaticBox",
"wx.App"
] | [((2923, 2931), 'wx.App', 'wx.App', ([], {}), '()\n', (2929, 2931), False, 'import wx\n'), ((121, 187), 'wx.Frame.__init__', 'wx.Frame.__init__', (['self'], {'parent': 'None', 'title': '"""ABC"""', 'size': '(600, 450)'}), "(self, parent=None, title='ABC', size=(600, 450))\n", (138, 187), False, 'import wx\n'), ((328, 3... |
"""Parse different types of camera streams.
This module is used to parse different types of camera streams. The module
provides the StreamParser base class which provides a uniform way of parsing
all camera streams. The module provides different subclasses, each for a
different type of camera streams (e.g. image strea... | [
"urllib2.urlopen",
"numpy.fromstring"
] | [((4874, 4910), 'numpy.fromstring', 'np.fromstring', (['frame'], {'dtype': 'np.uint8'}), '(frame, dtype=np.uint8)\n', (4887, 4910), True, 'import numpy as np\n'), ((5952, 6003), 'urllib2.urlopen', 'urllib2.urlopen', (['self.url'], {'timeout': 'DOWNLOAD_TIMEOUT'}), '(self.url, timeout=DOWNLOAD_TIMEOUT)\n', (5967, 6003),... |
# Copyright 2020 Forschungszentrum Jülich GmbH and Aix-Marseille Université
# "Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; and to You under the Apache License, Version 2.0. "
import tvb.simulator.lab as lab
from nest_elephant_tvb.Tvb.modify_tvb import Interface_c... | [
"numpy.random.rand",
"tvb.simulator.lab.simulator.Simulator",
"numpy.array",
"tvb.simulator.lab.connectivity.Connectivity",
"numpy.sum",
"numpy.empty",
"numpy.random.seed",
"numpy.concatenate",
"numpy.isnan",
"numpy.arange"
] | [((376, 394), 'numpy.random.seed', 'np.random.seed', (['(42)'], {}), '(42)\n', (390, 394), True, 'import numpy as np\n'), ((536, 551), 'numpy.array', 'np.array', (['[4.0]'], {}), '([4.0])\n', (544, 551), True, 'import numpy as np\n'), ((946, 1078), 'tvb.simulator.lab.simulator.Simulator', 'lab.simulator.Simulator', ([]... |
from keras.layers import Flatten, Input
from keras.layers import AveragePooling3D, MaxPooling3D
from keras.models import Model
from keras import backend as K
import numpy as np
import pandas as pd
from sklearn.externals import joblib
def generate_spatial_agg_features(X, input_shape=(11, 11, 11, 256)):
img_inp... | [
"keras.backend.set_image_data_format",
"numpy.dstack",
"keras.layers.Flatten",
"pandas.read_csv",
"numpy.rollaxis",
"keras.layers.Input",
"keras.models.Model",
"sklearn.externals.joblib.dump",
"keras.layers.MaxPooling3D"
] | [((666, 706), 'keras.backend.set_image_data_format', 'K.set_image_data_format', (['"""channels_last"""'], {}), "('channels_last')\n", (689, 706), True, 'from keras import backend as K\n'), ((719, 756), 'pandas.read_csv', 'pd.read_csv', (['"""data/stage1_labels.csv"""'], {}), "('data/stage1_labels.csv')\n", (730, 756), ... |
import argparse
import os
from functools import partial
from multiprocessing.pool import Pool
os.environ["MKL_NUM_THREADS"] = "1"
os.environ["NUMEXPR_NUM_THREADS"] = "1"
os.environ["OMP_NUM_THREADS"] = "1"
from tqdm import tqdm
import cv2
cv2.ocl.setUseOpenCL(False)
cv2.setNumThreads(0)
from preprocessing.utils ... | [
"cv2.ocl.setUseOpenCL",
"os.path.exists",
"PIL.Image.fromarray",
"cv2.setNumThreads",
"os.makedirs",
"argparse.ArgumentParser",
"facenet_pytorch.models.mtcnn.MTCNN",
"os.path.join",
"functools.partial",
"numpy.around",
"os.cpu_count",
"preprocessing.utils.get_original_video_paths",
"cv2.imre... | [((246, 273), 'cv2.ocl.setUseOpenCL', 'cv2.ocl.setUseOpenCL', (['(False)'], {}), '(False)\n', (266, 273), False, 'import cv2\n'), ((274, 294), 'cv2.setNumThreads', 'cv2.setNumThreads', (['(0)'], {}), '(0)\n', (291, 294), False, 'import cv2\n'), ((453, 513), 'facenet_pytorch.models.mtcnn.MTCNN', 'MTCNN', ([], {'margin':... |
#
# Copyright 2013 Quantopian, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | [
"datetime.datetime",
"zipline.finance.risk.RiskMetricsPeriod",
"zipline.utils.factory.create_returns_from_list",
"zipline.utils.factory.create_returns_from_range",
"zipline.finance.risk.RiskReport",
"zipline.finance.trading.TradingEnvironment",
"numpy.testing.assert_almost_equal",
"calendar.isleap",
... | [((1082, 1102), 'zipline.finance.trading.TradingEnvironment', 'TradingEnvironment', ([], {}), '()\n', (1100, 1102), False, 'from zipline.finance.trading import SimulationParameters, TradingEnvironment\n'), ((1213, 1292), 'datetime.datetime', 'datetime.datetime', ([], {'year': '(2006)', 'month': '(1)', 'day': '(1)', 'ho... |
import sys
import numpy
import helper
import bayesianClusterEvaluationLaplacian
import experiments
import baselineMultiLogReg
import pickle
import syntheticDataGeneration
import sklearn.metrics
import constants
def getANMI(allResults, criteriaID):
bestId = numpy.argmax(allResults[:, criteriaID])
return allRes... | [
"helper.getClusterIds",
"numpy.asarray",
"numpy.argmax",
"pickle.load",
"numpy.argsort",
"syntheticDataGeneration.generateData",
"numpy.zeros",
"helper.showAvgAndStd",
"numpy.load"
] | [((263, 302), 'numpy.argmax', 'numpy.argmax', (['allResults[:, criteriaID]'], {}), '(allResults[:, criteriaID])\n', (275, 302), False, 'import numpy\n'), ((447, 488), 'numpy.argsort', 'numpy.argsort', (['(-allResults[:, criteriaID])'], {}), '(-allResults[:, criteriaID])\n', (460, 488), False, 'import numpy\n'), ((1035,... |
# Authors:
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
#
# License: BSD 3 clause
"""
Base element
"""
# pylint: disable=invalid-name
import logging
from abc import ABC, abstractmethod
from six.moves import range
import numpy as np
from .utils import distance_lines, distance_ellipse
__all__ = ['Element', 'BaseCir... | [
"logging.getLogger",
"numpy.allclose",
"six.moves.range",
"numpy.ones",
"numpy.logical_and",
"numpy.asarray",
"numpy.min",
"numpy.max",
"numpy.inner",
"numpy.zeros",
"numpy.linspace",
"numpy.cos",
"numpy.linalg.norm",
"numpy.sin"
] | [((396, 423), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (413, 423), False, 'import logging\n'), ((1546, 1556), 'numpy.ones', 'np.ones', (['(2)'], {}), '(2)\n', (1553, 1556), True, 'import numpy as np\n'), ((2681, 2699), 'numpy.asarray', 'np.asarray', (['center'], {}), '(center)\n', (... |
# importing libraries
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
matplotlib.rcParams["figure.figsize"] = (20,10)
# importing the dataset
dataset = pd.read_csv(r"C:\00git\Bangalore-Real-Estate-Price-Prediction-WebApp-master\dataset\Bengaluru_House_Data.csv")
print(dataset.h... | [
"sklearn.model_selection.GridSearchCV",
"matplotlib.pyplot.hist",
"sklearn.tree.DecisionTreeRegressor",
"pandas.read_csv",
"matplotlib.pyplot.ylabel",
"sklearn.linear_model.Lasso",
"numpy.array",
"numpy.mean",
"numpy.where",
"matplotlib.pyplot.xlabel",
"json.dumps",
"sklearn.model_selection.Sh... | [((194, 317), 'pandas.read_csv', 'pd.read_csv', (['"""C:\\\\00git\\\\Bangalore-Real-Estate-Price-Prediction-WebApp-master\\\\dataset\\\\Bengaluru_House_Data.csv"""'], {}), "(\n 'C:\\\\00git\\\\Bangalore-Real-Estate-Price-Prediction-WebApp-master\\\\dataset\\\\Bengaluru_House_Data.csv'\n )\n", (205, 317), True, 'i... |
import numpy as np
import pandas as pd
class CellDischargeData:
"""
Battery cell data from discharge test.
"""
def __init__(self, path):
"""
Initialize with path to discharge data file.
Parameters
----------
path : str
Path to discharge data file.
... | [
"numpy.where",
"pandas.read_csv"
] | [((717, 734), 'pandas.read_csv', 'pd.read_csv', (['path'], {}), '(path)\n', (728, 734), True, 'import pandas as pd\n'), ((1270, 1296), 'numpy.where', 'np.where', (["(self.data == 'S')"], {}), "(self.data == 'S')\n", (1278, 1296), True, 'import numpy as np\n')] |
import pandas as pd
import numpy as np
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.preprocessing import LabelEncoder
from sklearn.model_selection import train_test_split
from sklearn.feature_selection import SelectFromModel
from sklearn.naive_bayes import MultinomialNB
from sklearn.linear_m... | [
"sklearn.preprocessing.LabelEncoder",
"pandas.read_csv",
"sklearn.model_selection.train_test_split",
"sklearn.ensemble.RandomForestClassifier",
"sklearn.linear_model.LogisticRegression",
"numpy.array",
"sklearn.feature_extraction.text.TfidfVectorizer",
"sklearn.naive_bayes.MultinomialNB"
] | [((446, 479), 'pandas.read_csv', 'pd.read_csv', (['"""airline_tweets.csv"""'], {}), "('airline_tweets.csv')\n", (457, 479), True, 'import pandas as pd\n'), ((1198, 1212), 'sklearn.preprocessing.LabelEncoder', 'LabelEncoder', ([], {}), '()\n', (1210, 1212), False, 'from sklearn.preprocessing import LabelEncoder\n'), ((1... |
import numpy as np
import matplotlib.pylab as plt
from .bipolar import bipolar
from matplotlib.colors import LinearSegmentedColormap
# get colormap
ncolors = 256
color_array = plt.get_cmap('jet')(range(ncolors))
# change alpha values
color_array[:,-1] = np.linspace(0.0, 1.0,ncolors)
# create a colormap object
map_ob... | [
"numpy.abs",
"matplotlib.pylab.subplots",
"matplotlib.pylab.savefig",
"matplotlib.pylab.tight_layout",
"matplotlib.pylab.colorbar",
"numpy.real",
"numpy.linspace",
"matplotlib.pylab.register_cmap",
"matplotlib.pylab.show",
"matplotlib.pylab.close",
"matplotlib.pylab.get_cmap",
"matplotlib.colo... | [((256, 286), 'numpy.linspace', 'np.linspace', (['(0.0)', '(1.0)', 'ncolors'], {}), '(0.0, 1.0, ncolors)\n', (267, 286), True, 'import numpy as np\n'), ((327, 398), 'matplotlib.colors.LinearSegmentedColormap.from_list', 'LinearSegmentedColormap.from_list', ([], {'name': '"""jet_alpha"""', 'colors': 'color_array'}), "(n... |
import time
import numpy as np
import scanpy as sc
from datetime import timedelta, datetime
def record_time(start_time, end_time, step_name, fp):
fp.write("{step} starts at: {time}\n".format(step = step_name, time = datetime.fromtimestamp(start_time)))
fp.write("{step} ends at: {time}\n".format(step = step_nam... | [
"scanpy.pp.normalize_total",
"datetime.datetime.fromtimestamp",
"scanpy.pp.highly_variable_genes",
"scanpy.tl.pca",
"scanpy.read_10x_h5",
"scanpy.pp.scale",
"scanpy.pp.log1p",
"scanpy.pp.filter_cells",
"scanpy.pp.filter_genes",
"scanpy.tl.louvain",
"scanpy.pp.neighbors",
"scanpy.tl.umap",
"n... | [((673, 684), 'time.time', 'time.time', ([], {}), '()\n', (682, 684), False, 'import time\n'), ((693, 734), 'scanpy.read_10x_h5', 'sc.read_10x_h5', (['src_data'], {'genome': '"""GRCh38"""'}), "(src_data, genome='GRCh38')\n", (707, 734), True, 'import scanpy as sc\n'), ((855, 866), 'time.time', 'time.time', ([], {}), '(... |
from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from past.builtins import basestring
from moby2.libactpol import freq_space_waterfall
from moby2.libactpol import time_space_waterfall
from moby2.scripting import products
import numpy
try:
import pylab
ex... | [
"pylab.title",
"numpy.log10",
"numpy.hstack",
"matplotlib.colorbar.ColorbarBase",
"pylab.savefig",
"pylab.xlabel",
"numpy.log",
"numpy.argsort",
"numpy.array",
"moby2.pointing.get_coords",
"matplotlib.pyplot.subplot2grid",
"pylab.gca",
"numpy.mod",
"numpy.arange",
"numpy.mean",
"pylab.... | [((537, 568), 'moby2.pointing.set_bulletin_A', 'moby2.pointing.set_bulletin_A', ([], {}), '()\n', (566, 568), False, 'import moby2\n'), ((737, 771), 'numpy.ones', 'numpy.ones', (['tod.nsamps'], {'dtype': 'bool'}), '(tod.nsamps, dtype=bool)\n', (747, 771), False, 'import numpy\n'), ((873, 931), 'pylab.plot', 'pylab.plot... |
# -*- coding: utf-8 -*-
import click
import logging
from pathlib import Path
import os
from dotenv import find_dotenv, load_dotenv
import json
import pandas as pd
import numpy as np
import urllib
import zipfile
from tqdm import tqdm
from glob import glob
from collections import defaultdict
from src.data.tcia import TCI... | [
"logging.getLogger",
"pandas.read_csv",
"zipfile.ZipFile",
"os.remove",
"os.path.exists",
"os.listdir",
"click.IntRange",
"pathlib.Path",
"pandas.DataFrame.from_dict",
"os.path.isdir",
"numpy.random.seed",
"click.command",
"click.argument",
"dotenv.find_dotenv",
"src.data.tcia.TCIAClient... | [((552, 567), 'click.command', 'click.command', ([], {}), '()\n', (565, 567), False, 'import click\n'), ((622, 730), 'click.argument', 'click.argument', (['"""collection_reference_filename"""'], {'type': 'click.STRING', 'default': '"""collection_files_list.csv"""'}), "('collection_reference_filename', type=click.STRING... |
import numpy as np
import pandas as pd
import re
from joblib import dump, load
from rdflib import Graph, Literal, RDF, URIRef, Namespace
import pathlib
def get_dir(path=''):
"""Return the full path to the provided files in the OpenPredict data folder
Where models and features for runs are stored
"""
re... | [
"numpy.array",
"numpy.multiply",
"pathlib.Path",
"re.search"
] | [((1865, 1901), 're.search', 're.search', (['"""(.*?):(.*)"""', 'input_curie'], {}), "('(.*?):(.*)', input_curie)\n", (1874, 1901), False, 'import re\n'), ((4525, 4542), 'numpy.array', 'np.array', (['classes'], {}), '(classes)\n', (4533, 4542), True, 'import numpy as np\n'), ((4555, 4570), 'numpy.array', 'np.array', ([... |
# -*- coding: utf-8 -*-
"""
computeKey
computes the musical key of an input audio file
Args:
afAudioData: array with floating point audio data.
f_s: sample rate
afWindow: FFT window of length iBlockLength (default: hann)
iBlockLength: internal block length (default: 4096 samples)
iHopLe... | [
"numpy.abs",
"numpy.sqrt",
"numpy.roll",
"argparse.ArgumentParser",
"scipy.signal.spectrogram",
"ToolComputeHann.ToolComputeHann",
"numpy.array",
"numpy.zeros",
"numpy.concatenate",
"FeatureSpectralPitchChroma.FeatureSpectralPitchChroma",
"ToolReadAudio.ToolReadAudio"
] | [((911, 1159), 'numpy.array', 'np.array', (["['C Maj', 'C# Maj', 'D Maj', 'D# Maj', 'E Maj', 'F Maj', 'F# Maj', 'G Maj',\n 'G# Maj', 'A Maj', 'A# Maj', 'B Maj', 'c min', 'c# min', 'd min',\n 'd# min', 'e min', 'f min', 'f# min', 'g min', 'g# min', 'a min',\n 'a# min', 'b min']"], {}), "(['C Maj', 'C# Maj', 'D ... |
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | [
"numpy.random.random",
"moonlight.glyphs.testing.DummyGlyphClassifier",
"numpy.asarray",
"absl.testing.absltest.main",
"moonlight.protobuf.musicscore_pb2.Staff",
"numpy.random.randint",
"moonlight.structure.create_structure",
"copy.deepcopy",
"moonlight.engine.OMREngine"
] | [((3565, 3580), 'absl.testing.absltest.main', 'absltest.main', ([], {}), '()\n', (3578, 3580), False, 'from absl.testing import absltest\n'), ((1251, 1281), 'numpy.random.random', 'np.random.random', (['(2, 3, 5, 6)'], {}), '((2, 3, 5, 6))\n', (1267, 1281), True, 'import numpy as np\n'), ((1299, 1362), 'moonlight.glyph... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests for the photometry module.
"""
import pytest
import numpy as np
from numpy.testing import (assert_allclose, assert_array_equal,
assert_array_less)
from astropy.coordinates import SkyCoord
from astropy.io import fits
f... | [
"numpy.sqrt",
"numpy.array",
"astropy.io.fits.open",
"astropy.nddata.NDData",
"numpy.arange",
"numpy.testing.assert_array_less",
"numpy.testing.assert_allclose",
"astropy.nddata.StdDevUncertainty",
"pytest.mark.skipif",
"numpy.testing.assert_array_equal",
"numpy.ones",
"pytest.warns",
"numpy... | [((1661, 1730), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (["('aperture_class', 'params')", 'TEST_APERTURES'], {}), "(('aperture_class', 'params'), TEST_APERTURES)\n", (1684, 1730), False, 'import pytest\n'), ((2012, 2081), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (["('aperture_class', 'params'... |
from solver import *
from armatures import *
from models import *
import numpy as np
import config
np.random.seed(20160923)
pose_glb = np.zeros([1, 3]) # global rotation
########################## mano settings #########################
n_pose = 12 # number of pose pca coefficients, in mano the maximum is 45
n_shap... | [
"numpy.random.normal",
"numpy.zeros",
"numpy.random.seed"
] | [((101, 125), 'numpy.random.seed', 'np.random.seed', (['(20160923)'], {}), '(20160923)\n', (115, 125), True, 'import numpy as np\n'), ((137, 153), 'numpy.zeros', 'np.zeros', (['[1, 3]'], {}), '([1, 3])\n', (145, 153), True, 'import numpy as np\n'), ((373, 402), 'numpy.random.normal', 'np.random.normal', ([], {'size': '... |
# A sample spatial model with agents eating grass off patches.
# No visualization as of yet
#===============
# SETUP
#===============
from helipad import Helipad
heli = Helipad()
heli.name = 'Grass Eating'
heli.order = 'random'
heli.stages = 5
heli.addParameter('energy', 'Energy from grass', 'slider', dflt=2, opts=... | [
"numpy.mean",
"helipad.Helipad",
"random.randint",
"random.choice"
] | [((172, 181), 'helipad.Helipad', 'Helipad', ([], {}), '()\n', (179, 181), False, 'from helipad import Helipad\n'), ((3782, 3802), 'numpy.mean', 'mean', (['model.deathAge'], {}), '(model.deathAge)\n', (3786, 3802), False, 'from numpy import mean\n'), ((1834, 1851), 'random.choice', 'choice', (['prospects'], {}), '(prosp... |
#================================
# RESEARCH GROUP PROJECT [RGP]
#================================
# This file is part of the COMP3096 Research Group Project.
# System
import logging
# Gym Imports
import gym
from gym.spaces import Box, Discrete, Tuple
# PySC2 Imports
from pysc2.lib.actions import FUNCTIONS, Function... | [
"logging.getLogger",
"gym.spaces.Discrete",
"gym.spaces.Box",
"pysc2.lib.actions.FUNCTIONS.move_unit",
"numpy.unravel_index",
"pysc2.lib.actions.FUNCTIONS.no_op"
] | [((504, 531), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (521, 531), False, 'import logging\n'), ((1190, 1281), 'gym.spaces.Box', 'Box', ([], {'low': '(0)', 'high': 'SCREEN_FEATURES.player_relative.scale', 'shape': 'screen_shape_observation'}), '(low=0, high=SCREEN_FEATURES.player_rel... |
import pandas as pd
import numpy as np
import math
import tkinter as tk
from tkinter import ttk
from PIL import Image, ImageTk
import os
import sqlite3
from sqlite3 import OperationalError
#file = str(os.path.realpath(__file__))
csv_file = "/Users/nedimdrekovic/Python/DB/simplemaps_worldcities/" + "world_cities.csv"
s... | [
"numpy.sqrt",
"sqlite3.connect",
"tkinter.ttk.Button",
"tkinter.Tk",
"numpy.cos",
"tkinter.Label",
"numpy.sin"
] | [((4251, 4287), 'sqlite3.connect', 'sqlite3.connect', (['db_file'], {'timeout': '(10)'}), '(db_file, timeout=10)\n', (4266, 4287), False, 'import sqlite3\n'), ((5661, 5700), 'tkinter.Tk', 'tk.Tk', ([], {'className': '"""AutocompleteCombobox"""'}), "(className='AutocompleteCombobox')\n", (5666, 5700), True, 'import tkin... |
import os
from os import listdir
from os.path import isfile, join
import logging
import numpy as np
from ase import Atoms
import mff
from mff import models, calculators, utility
from mff import configurations as cfg
def get_potential(confs):
pot = 0
for conf in confs:
el1 = conf[:, 3]
el2 = co... | [
"mff.models.TwoThreeEamManySpeciesModel",
"numpy.arccos",
"ase.Atoms",
"numpy.array",
"mff.models.ThreeBodyManySpeciesModel",
"numpy.sin",
"numpy.arange",
"os.listdir",
"mff.calculators.EamSingleSpecies",
"mff.models.TwoBodyManySpeciesModel",
"mff.calculators.EamManySpecies",
"numpy.exp",
"n... | [((605, 618), 'numpy.exp', 'np.exp', (['(-dist)'], {}), '(-dist)\n', (611, 618), True, 'import numpy as np\n'), ((1357, 1400), 'numpy.random.uniform', 'np.random.uniform', (['(0)', '(2 * np.pi)'], {'size': '(n * 2)'}), '(0, 2 * np.pi, size=n * 2)\n', (1374, 1400), True, 'import numpy as np\n'), ((1412, 1448), 'numpy.ra... |
from __future__ import print_function
import torch
import numpy as np
from PIL import Image
import inspect
import re
import numpy as np
import os
import collections
import pickle
# Converts a Tensor into a Numpy array
# |imtype|: the desired type of the converted numpy array
def tensor2im(image_tensor, imtype=np.uint... | [
"torch.sum",
"numpy.linalg.norm",
"numpy.sin",
"re.search",
"os.path.exists",
"numpy.mean",
"numpy.max",
"numpy.dot",
"numpy.concatenate",
"numpy.min",
"numpy.tile",
"torch.abs",
"pickle.load",
"numpy.std",
"numpy.transpose",
"PIL.Image.fromarray",
"numpy.median",
"pickle.dump",
... | [((2424, 2452), 'PIL.Image.fromarray', 'Image.fromarray', (['image_numpy'], {}), '(image_numpy)\n', (2439, 2452), False, 'from PIL import Image\n'), ((462, 493), 'numpy.tile', 'np.tile', (['image_numpy', '(3, 1, 1)'], {}), '(image_numpy, (3, 1, 1))\n', (469, 493), True, 'import numpy as np\n'), ((887, 901), 'pickle.loa... |
# Created on 2018/12
# Author: <NAME>
import os
import time
import numpy as np
import torch
from torch.utils.tensorboard import SummaryWriter
class Solver(object):
def __init__(self, data, model, optimizer, epochs, save_folder, checkpoint, continue_from, model_path, print_freq,
early_stop, max_... | [
"torch.utils.tensorboard.SummaryWriter",
"os.path.exists",
"os.makedirs",
"torch.load",
"torch.stack",
"torch.Tensor",
"os.path.join",
"torch.set_rng_state",
"numpy.zeros",
"torch.get_rng_state",
"torch.save",
"torch.no_grad",
"time.time"
] | [((1354, 1379), 'torch.Tensor', 'torch.Tensor', (['self.epochs'], {}), '(self.epochs)\n', (1366, 1379), False, 'import torch\n'), ((1403, 1428), 'torch.Tensor', 'torch.Tensor', (['self.epochs'], {}), '(self.epochs)\n', (1415, 1428), False, 'import torch\n'), ((1475, 1497), 'torch.utils.tensorboard.SummaryWriter', 'Summ... |
from pathlib import Path
import cv2
import numpy as np
from pfrl.wrappers import atari_wrappers
from matplotlib import pyplot as plt
from sklearn.metrics import accuracy_score
from bovw.utils import prepare_data
from bovw import BOVWClassifier
def get_player_position(ram):
"""
given the ram state, get the p... | [
"bovw.BOVWClassifier",
"cv2.drawKeypoints",
"pathlib.Path",
"pfrl.wrappers.atari_wrappers.make_atari",
"numpy.array",
"cv2.SIFT_create",
"cv2.destroyAllWindows",
"cv2.cvtColor",
"bovw.utils.prepare_data",
"cv2.waitKey",
"sklearn.metrics.accuracy_score",
"cv2.imread"
] | [((2268, 2282), 'pathlib.Path', 'Path', (['save_dir'], {}), '(save_dir)\n', (2272, 2282), False, 'from pathlib import Path\n'), ((3098, 3130), 'bovw.utils.prepare_data', 'prepare_data', (['"""data/monte_train"""'], {}), "('data/monte_train')\n", (3110, 3130), False, 'from bovw.utils import prepare_data\n'), ((3334, 336... |
#!/usr/bin/python
########################################################################################################################
#
# Copyright (c) 2014, Regents of the University of California
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permi... | [
"os.path.exists",
"laygo.GridLayoutGeneratorHelper.generate_power_rails_from_rails_rect",
"laygo.GridLayoutGenerator",
"yaml.load",
"numpy.array",
"numpy.vstack",
"bag.BagProject",
"imp.find_module"
] | [((2218, 2234), 'numpy.array', 'np.array', (['[0, 0]'], {}), '([0, 0])\n', (2226, 2234), True, 'import numpy as np\n'), ((6472, 6488), 'numpy.array', 'np.array', (['[0, 0]'], {}), '([0, 0])\n', (6480, 6488), True, 'import numpy as np\n'), ((9362, 9378), 'numpy.array', 'np.array', (['[0, 0]'], {}), '([0, 0])\n', (9370, ... |
import math
import unittest
from copy import copy
import numpy as np
from omicron.core import talib as ta
class LibTest(unittest.TestCase):
def test_barssince(self):
condition = [False, True]
self.assertEqual(0, ta.barssince(condition))
condition = [True, False]
self.assertEqual... | [
"omicron.core.talib.vcross",
"numpy.testing.assert_array_almost_equal",
"omicron.core.talib.max_drawdown",
"omicron.core.talib.angle",
"omicron.core.talib.relative_error",
"numpy.sqrt",
"omicron.core.talib.cross",
"omicron.core.talib.barssince",
"numpy.array",
"omicron.core.talib.slope",
"omicro... | [((801, 817), 'omicron.core.talib.cross', 'ta.cross', (['y1', 'y2'], {}), '(y1, y2)\n', (809, 817), True, 'from omicron.core import talib as ta\n'), ((911, 927), 'omicron.core.talib.cross', 'ta.cross', (['y2', 'y1'], {}), '(y2, y1)\n', (919, 927), True, 'from omicron.core import talib as ta\n'), ((1112, 1128), 'omicron... |
import matplotlib.pyplot as plt
import numpy as np
with open("RangeN.dat","r") as temp_file:
data = temp_file.readlines()
NN = []
ts = []
tbh = []
for line in data:
NN.append(int(line.split()[0]))
ts.append(float(line.split()[1]))
tbh.append(float(line.split()[2]))
NNl = np.array([np.log(itm) for itm... | [
"matplotlib.pyplot.grid",
"matplotlib.pyplot.savefig",
"numpy.power",
"numpy.log",
"numpy.exp",
"numpy.linspace",
"numpy.linalg.lstsq",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.show"
] | [((720, 749), 'numpy.linspace', 'np.linspace', (['(1000)', '(15848)', '(200)'], {}), '(1000, 15848, 200)\n', (731, 749), True, 'import numpy as np\n'), ((868, 899), 'matplotlib.pyplot.subplots', 'plt.subplots', (['(1)'], {'figsize': '(7, 5)'}), '(1, figsize=(7, 5))\n', (880, 899), True, 'import matplotlib.pyplot as plt... |
import timeit, functools
def dist_test():
pp_sketchlib.queryDatabase("listeria", "listeria", names, names, kmers, 1)
setup = """
import sys
sys.path.insert(0, "build/lib.macosx-10.9-x86_64-3.7")
import pp_sketchlib
"""
#import numpy as np
#
#from __main__ import dist_test
#
#kmers = np.arange(15, 30, 3)
#
#name... | [
"sys.path.insert",
"functools.partial",
"pp_sketchlib.queryDatabase",
"numpy.arange"
] | [((47, 121), 'pp_sketchlib.queryDatabase', 'pp_sketchlib.queryDatabase', (['"""listeria"""', '"""listeria"""', 'names', 'names', 'kmers', '(1)'], {}), "('listeria', 'listeria', names, names, kmers, 1)\n", (73, 121), False, 'import pp_sketchlib\n'), ((624, 678), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""build/l... |
########################################################################################
# Compare two systems using bootstrap resampling #
# adapted from https://github.com/neubig/util-scripts/blob/master/paired-bootstrap.py #
# ... | [
"numpy.random.choice",
"numpy.mean",
"numpy.median"
] | [((2291, 2344), 'numpy.random.choice', 'np.random.choice', (['ids'], {'size': 'sample_size', 'replace': '(True)'}), '(ids, size=sample_size, replace=True)\n', (2307, 2344), True, 'import numpy as np\n'), ((3482, 3504), 'numpy.mean', 'np.mean', (['sys_scores[i]'], {}), '(sys_scores[i])\n', (3489, 3504), True, 'import nu... |
# """Pytorch Dataset object that loads 27x27 patches that contain single cells."""
import os
import random
import scipy.io
import numpy as np
from PIL import Image
import torch
import torch.utils.data as data_utils
import torchvision.transforms as transforms
from torch.nn.functional import pad
import dataloaders.a... | [
"numpy.random.normal",
"dataloaders.additional_transforms.RandomHEStain",
"dataloaders.additional_transforms.RandomVerticalFlip",
"dataloaders.additional_transforms.HistoNormalize",
"random.shuffle",
"dataloaders.additional_transforms.RandomRotate",
"PIL.Image.open",
"torch.stack",
"os.walk",
"tor... | [((8439, 8463), 'torch.stack', 'torch.stack', (['bag_tensors'], {}), '(bag_tensors)\n', (8450, 8463), False, 'import torch\n'), ((5635, 5748), 'numpy.concatenate', 'np.concatenate', (["(mat_inflammatory['detection'], mat_fibroblast['detection'], mat_others[\n 'detection'])"], {'axis': '(0)'}), "((mat_inflammatory['d... |
# ===============================================================================
# Copyright 2013 <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/... | [
"traitsui.api.VGroup",
"PIL.Image.fromarray",
"PIL.Image.blend",
"numpy.asarray",
"numpy.array",
"traitsui.api.Item",
"traits.api.Range",
"pychron.core.ui.image_editor.ImageEditor",
"traits.api.Bool"
] | [((1313, 1328), 'traits.api.Range', 'Range', (['(0.0)', '(1.0)'], {}), '(0.0, 1.0)\n', (1318, 1328), False, 'from traits.api import Array, Event, Range, Bool\n'), ((1369, 1379), 'traits.api.Bool', 'Bool', (['(True)'], {}), '(True)\n', (1373, 1379), False, 'from traits.api import Array, Event, Range, Bool\n'), ((1451, 1... |
'''
Generate instance groundtruth .txt files (for evaluation)
'''
import numpy as np
import glob
import torch
import os
semantic_label_idxs = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 24, 28, 33, 34, 36, 39]
semantic_label_names = ['wall', 'floor', 'cabinet', 'bed', 'chair', 'sofa', 'table', 'door', 'window', '... | [
"os.path.exists",
"numpy.where",
"torch.load",
"os.path.join",
"numpy.zeros",
"os.mkdir"
] | [((588, 601), 'torch.load', 'torch.load', (['i'], {}), '(i)\n', (598, 601), False, 'import torch\n'), ((630, 659), 'os.path.exists', 'os.path.exists', (["(split + '_gt')"], {}), "(split + '_gt')\n", (644, 659), False, 'import os\n'), ((669, 692), 'os.mkdir', 'os.mkdir', (["(split + '_gt')"], {}), "(split + '_gt')\n", (... |
import numpy as np
import matplotlib.pyplot as plt
class ToySquares:
"""A set of squares that grow and shift to the right over time
Parameters
----------
canvas_size : int
size of the canvas on which the toy squares fall, in pixels
n_objects : int
number of toy squares to spawn
... | [
"numpy.minimum",
"numpy.logical_and",
"numpy.ones",
"numpy.random.choice",
"numpy.random.rand",
"numpy.sum",
"numpy.zeros",
"numpy.save",
"numpy.arange"
] | [((1266, 1281), 'numpy.arange', 'np.arange', (['(1)', '(5)'], {}), '(1, 5)\n', (1275, 1281), True, 'import numpy as np\n'), ((1341, 1353), 'numpy.sum', 'np.sum', (['prob'], {}), '(prob)\n', (1347, 1353), True, 'import numpy as np\n'), ((1370, 1444), 'numpy.random.choice', 'np.random.choice', (['allowed_sizes'], {'size'... |
import gym
import numpy as np
import os,sys,time
import math
if 'SUMO_HOME' in os.environ:
tools = os.path.join(os.environ['SUMO_HOME'],'tools')
sys.path.append(tools)
else:
sys.exit("please declare environment variable 'SUMO_HOME'")
import xml.etree.ElementTree as ET
from xml.dom import minidom
... | [
"lib.seeding.np_random",
"math.floor",
"traci.vehicle.getSpeed",
"sys.exit",
"traci.lanearea.getJamLengthVehicle",
"sys.path.append",
"traci.lanearea.getLastStepMeanSpeed",
"traci.vehicle.getPosition",
"traci.lanearea.getLastStepVehicleNumber",
"numpy.mean",
"xml.etree.ElementTree.parse",
"num... | [((108, 154), 'os.path.join', 'os.path.join', (["os.environ['SUMO_HOME']", '"""tools"""'], {}), "(os.environ['SUMO_HOME'], 'tools')\n", (120, 154), False, 'import os, sys, time\n'), ((159, 181), 'sys.path.append', 'sys.path.append', (['tools'], {}), '(tools)\n', (174, 181), False, 'import os, sys, time\n'), ((194, 253)... |
# ----------------------------------------------------------------------
#
# <NAME>, U.S. Geological Survey
# <NAME>, GNS Science
# <NAME>, University of Chicago
#
# This code was developed as part of the Computational Infrastructure
# for Geodynamics (http://geodynamics.org).
#
# Copyright (c) 2010-2018 University of ... | [
"numpy.exp",
"numpy.linspace",
"numpy.ones",
"numpy.zeros"
] | [((1480, 1549), 'numpy.linspace', 'numpy.linspace', (['startTime', 'endTime'], {'num': 'numSteps', 'dtype': 'numpy.float64'}), '(startTime, endTime, num=numSteps, dtype=numpy.float64)\n', (1494, 1549), False, 'import numpy\n'), ((1663, 1738), 'numpy.exp', 'numpy.exp', (['(-p_youngs * timeArray / (6.0 * p_viscosity * (1... |
#### All this code needs to be modified. We need to modify for LiTS.
##### Neeed to probably do some kind of
from promise2012.Vnet.model_vnet3d import Vnet3dModule
from promise2012.Vnet.util import convertMetaModelToPbModel
import numpy as np
import pandas as pd
import cv2
def train():
'''
P... | [
"pandas.read_csv",
"promise2012.Vnet.model_vnet3d.Vnet3dModule",
"promise2012.Vnet.util.convertMetaModelToPbModel",
"cv2.morphologyEx",
"numpy.zeros",
"cv2.getStructuringElement",
"numpy.random.shuffle"
] | [((422, 447), 'pandas.read_csv', 'pd.read_csv', (['"""trainY.csv"""'], {}), "('trainY.csv')\n", (433, 447), True, 'import pandas as pd\n'), ((468, 493), 'pandas.read_csv', 'pd.read_csv', (['"""trainX.csv"""'], {}), "('trainX.csv')\n", (479, 493), True, 'import pandas as pd\n'), ((681, 704), 'numpy.random.shuffle', 'np.... |
# Tencent is pleased to support the open source community by making PocketFlow available.
#
# Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a cop... | [
"learners.channel_pruning.channel_pruner.ChannelPruner",
"tensorflow.get_variable",
"learners.distillation_helper.DistillationHelper",
"numpy.log",
"math.log",
"numpy.array",
"utils.multi_gpu_wrapper.MultiGpuWrapper.DistributedOptimizer",
"tensorflow.control_dependencies",
"tensorflow.Graph",
"ten... | [((1471, 1743), 'tensorflow.app.flags.DEFINE_string', 'tf.app.flags.DEFINE_string', (['"""cp_prune_option"""', '"""auto"""', '"""the action we want to prune the channel you can select one of the following option:\n uniform:\n prune with a uniform compression ratio\n list:\n prune with a list of co... |
import numpy as np
import os
from train import parseArgs
FLAGS = parseArgs()
model_dir = FLAGS.model_dir
from matplotlib import pyplot as plt
import matplotlib
font = {'size' : 8}
matplotlib.rc('font', **font)
fig = plt.figure()
ax = fig.add_subplot(211)
ax.set_title("Actor Loss")
ax.set_xlabel("Train Steps")
ax2 ... | [
"os.path.join",
"numpy.array",
"matplotlib.pyplot.figure",
"matplotlib.rc",
"train.parseArgs",
"numpy.load",
"matplotlib.pyplot.show"
] | [((65, 76), 'train.parseArgs', 'parseArgs', ([], {}), '()\n', (74, 76), False, 'from train import parseArgs\n'), ((183, 212), 'matplotlib.rc', 'matplotlib.rc', (['"""font"""'], {}), "('font', **font)\n", (196, 212), False, 'import matplotlib\n'), ((221, 233), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', ... |
import numpy as np
import gym
from envs.utils import goal_distance, goal_distance_obs
from utils.os_utils import remove_color
class CustomGoalEnv():
def __init__(self, args):
self.args = args
self.env = gym.make(args.env)
self.np_random = self.env.env.np_random
self.distance_thresh... | [
"utils.os_utils.remove_color",
"gym.make",
"numpy.square"
] | [((225, 243), 'gym.make', 'gym.make', (['args.env'], {}), '(args.env)\n', (233, 243), False, 'import gym\n'), ((2223, 2240), 'utils.os_utils.remove_color', 'remove_color', (['key'], {}), '(key)\n', (2235, 2240), False, 'from utils.os_utils import remove_color\n'), ((1775, 1801), 'numpy.square', 'np.square', (['(achieve... |
import numpy
from numpy.testing import assert_raises, assert_equal, assert_allclose
from fuel.datasets import Iris
from tests import skip_if_not_available
def test_iris_all():
skip_if_not_available(datasets=['iris.hdf5'])
dataset = Iris(('all',), load_in_memory=False)
handle = dataset.open()
data, ... | [
"numpy.testing.assert_equal",
"fuel.datasets.Iris",
"numpy.testing.assert_allclose",
"numpy.testing.assert_raises",
"numpy.array",
"tests.skip_if_not_available"
] | [((184, 229), 'tests.skip_if_not_available', 'skip_if_not_available', ([], {'datasets': "['iris.hdf5']"}), "(datasets=['iris.hdf5'])\n", (205, 229), False, 'from tests import skip_if_not_available\n'), ((245, 281), 'fuel.datasets.Iris', 'Iris', (["('all',)"], {'load_in_memory': '(False)'}), "(('all',), load_in_memory=F... |
# coding: utf-8
import base64
from keras import models
import tensorflow as tf
import os
import cv2
import numpy as np
import scipy.fftpack
graph = tf.get_default_graph()
PATH = lambda p: os.path.abspath(
os.path.join(os.path.dirname(__file__), p)
)
TEXT_MODEL = ""
IMG_MODEL = ""
def pretreatment_get_text(img,... | [
"numpy.packbits",
"numpy.median",
"base64.b64decode",
"os.path.dirname",
"cv2.imdecode",
"cv2.cvtColor",
"cv2.resize",
"numpy.fromstring",
"tensorflow.get_default_graph"
] | [((150, 172), 'tensorflow.get_default_graph', 'tf.get_default_graph', ([], {}), '()\n', (170, 172), True, 'import tensorflow as tf\n'), ((423, 478), 'cv2.resize', 'cv2.resize', (['im', '(32, 32)'], {'interpolation': 'cv2.INTER_CUBIC'}), '(im, (32, 32), interpolation=cv2.INTER_CUBIC)\n', (433, 478), False, 'import cv2\n... |
################################################################################
# Numba-DPPY
#
# Copyright 2020-2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain ... | [
"numpy.reshape",
"numpy.random.random",
"numpy.testing.assert_allclose",
"numba.njit",
"dpctl.SyclDevice",
"numba_dppy.tests._helper.dpnp_debug",
"pytest.mark.parametrize",
"dpctl.device_context",
"numpy.empty",
"pytest.fixture"
] | [((1159, 1196), 'pytest.fixture', 'pytest.fixture', ([], {'params': 'list_of_dtypes'}), '(params=list_of_dtypes)\n', (1173, 1196), False, 'import pytest\n'), ((1473, 1509), 'pytest.fixture', 'pytest.fixture', ([], {'params': 'list_of_shape'}), '(params=list_of_shape)\n', (1487, 1509), False, 'import pytest\n'), ((1671,... |
import numpy as np
from skimage import morphology
import hy
# setup tensorflow
import os
os.environ["CUDA_VISIBLE_DEVICES"]=""
import tensorflow as tf
print(f'tensorflow version = {tf.__version__}')
tf_device = '/cpu:0'
setup = {
# based on 3_compare_re_nn.py
'in_size': 64,
'undersample_target': False,
# Number of... | [
"tensorflow.reduce_sum",
"tensorflow.compat.v1.train.AdamOptimizer",
"tensorflow.signal.fft3d",
"tensorflow.compat.v1.Session",
"numpy.save",
"numpy.imag",
"tensorflow.compat.v1.placeholder",
"tensorflow.compat.v1.global_variables_initializer",
"numpy.max",
"numpy.real",
"numpy.min",
"tensorfl... | [((1861, 1899), 'tensorflow.compat.v1.disable_eager_execution', 'tf.compat.v1.disable_eager_execution', ([], {}), '()\n', (1897, 1899), True, 'import tensorflow as tf\n'), ((1603, 1614), 'numpy.abs', 'np.abs', (['obj'], {}), '(obj)\n', (1609, 1614), True, 'import numpy as np\n'), ((2051, 2073), 'numpy.copy', 'np.copy',... |
import numpy as np
def ReLU(x):
return np.maximum(x,0)
def dReLU(x,y):
x[y == 0]=0
return x | [
"numpy.maximum"
] | [((47, 63), 'numpy.maximum', 'np.maximum', (['x', '(0)'], {}), '(x, 0)\n', (57, 63), True, 'import numpy as np\n')] |
from obspy import UTCDateTime
from obspy.clients.fdsn import Client
from obspy.taup import TauPyModel
import numpy as np
import seisutils as su
import os
import shutil
import time
# --------------------------------------------------------------------------------------------------------------
# newFetch.py
#
# This is ... | [
"os.path.exists",
"numpy.abs",
"os.makedirs",
"obspy.taup.TauPyModel",
"numpy.real",
"obspy.UTCDateTime.now",
"numpy.nonzero",
"seisutils.haversine",
"obspy.clients.fdsn.Client",
"time.time",
"numpy.imag"
] | [((1118, 1129), 'time.time', 'time.time', ([], {}), '()\n', (1127, 1129), False, 'import time\n'), ((1273, 1287), 'obspy.clients.fdsn.Client', 'Client', (['"""IRIS"""'], {}), "('IRIS')\n", (1279, 1287), False, 'from obspy.clients.fdsn import Client\n'), ((2050, 2073), 'os.path.exists', 'os.path.exists', (['sac_dir'], {... |
import cv2
import numpy as np
import keras.models
import glob
from datetime import datetime
PATH_TEST = "../image_dataset_keras_color/"
VIDEO_INFERENCE = 0
IMG_INFERNECE = 1
model_color = keras.models.load_model('saved_models/keras_RAS_model_color_3.h5')
color_class = ['Yellow', 'Green', 'Orange', 'Red', 'Blue', 'P... | [
"numpy.argmax",
"cv2.imshow",
"datetime.datetime.now",
"numpy.array",
"cv2.VideoCapture",
"cv2.resize",
"cv2.waitKey",
"glob.glob",
"cv2.imread"
] | [((462, 481), 'cv2.VideoCapture', 'cv2.VideoCapture', (['(0)'], {}), '(0)\n', (478, 481), False, 'import cv2\n'), ((521, 535), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (533, 535), False, 'from datetime import datetime\n'), ((694, 713), 'numpy.array', 'np.array', (['input_img'], {}), '(input_img)\n', (... |
from keras.models import Sequential
from keras.layers.core import Dense
import numpy as np
import time
number_neuron_connections = 3000000
u = list()
for i in range(112):
u.append(np.random.rand(number_neuron_connections, 6).astype(np.float32))
def create_mlp():
model = Sequential()
model.add(Dense(16,... | [
"numpy.random.rand",
"keras.models.Sequential",
"numpy.load",
"time.time",
"keras.layers.core.Dense"
] | [((559, 580), 'numpy.load', 'np.load', (['"""trainX.npy"""'], {}), "('trainX.npy')\n", (566, 580), True, 'import numpy as np\n'), ((590, 611), 'numpy.load', 'np.load', (['"""trainY.npy"""'], {}), "('trainY.npy')\n", (597, 611), True, 'import numpy as np\n'), ((620, 640), 'numpy.load', 'np.load', (['"""testX.npy"""'], {... |
"""
===========
Convex Hull
===========
The convex hull of a binary image is the set of pixels included in the
smallest convex polygon that surround all white pixels in the input.
In this example, we show how the input pixels (white) get filled in by the
convex hull (white and grey).
A good overview of the algorithm... | [
"numpy.copy",
"numpy.array",
"skimage.morphology.convex_hull_image",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.show"
] | [((561, 767), 'numpy.array', 'np.array', (['[[0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 1, 0, \n 1, 0, 0, 0], [0, 0, 1, 0, 0, 0, 1, 0, 0], [0, 1, 0, 0, 0, 0, 0, 1, 0],\n [0, 0, 0, 0, 0, 0, 0, 0, 0]]'], {'dtype': 'float'}), '([[0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0... |
import cv2
import torch
import scipy.special
import numpy as np
import torchvision
import torchvision.transforms as transforms
from PIL import Image
from enum import Enum
from scipy.spatial.distance import cdist
from ultrafastLaneDetector.model import parsingNet
lane_colors = [(0,0,255),(0,255,0),(255,0,0),(0,255,255... | [
"PIL.Image.fromarray",
"numpy.flipud",
"torch.load",
"torchvision.transforms.Resize",
"numpy.argmax",
"numpy.sum",
"numpy.linspace",
"numpy.array",
"cv2.addWeighted",
"cv2.circle",
"cv2.cvtColor",
"torchvision.transforms.Normalize",
"ultrafastLaneDetector.model.parsingNet",
"torch.no_grad"... | [((1814, 1932), 'ultrafastLaneDetector.model.parsingNet', 'parsingNet', ([], {'pretrained': '(False)', 'backbone': '"""18"""', 'cls_dim': '(cfg.griding_num + 1, cfg.cls_num_per_lane, 4)', 'use_aux': '(False)'}), "(pretrained=False, backbone='18', cls_dim=(cfg.griding_num + 1,\n cfg.cls_num_per_lane, 4), use_aux=Fals... |
# -*- coding: utf-8 -*-
"""
Analysis + Visualization functions for planning
"""
# Author: <NAME> <<EMAIL>>
# License: MIT
import warnings
import numpy as np
import matplotlib.pyplot as plt
import opencda.core.plan.drive_profile_plotting as open_plt
class PlanDebugHelper(object):
"""This class aims to save stati... | [
"numpy.mean",
"opencda.core.plan.drive_profile_plotting.draw_velocity_profile_single_plot",
"opencda.core.plan.drive_profile_plotting.draw_ttc_profile_single_plot",
"numpy.array",
"matplotlib.pyplot.figure",
"opencda.core.plan.drive_profile_plotting.draw_acceleration_profile_single_plot",
"numpy.std",
... | [((1584, 1617), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (1607, 1617), False, 'import warnings\n'), ((1678, 1690), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (1688, 1690), True, 'import matplotlib.pyplot as plt\n'), ((1699, 1715), 'matplotlib.pyplot.... |
# -*- coding: utf-8 -*-
import numpy as np
import pprint
from envs.GridWorld import GridworldEnv
pp = pprint.PrettyPrinter(indent=2)
env = GridworldEnv()
import matplotlib.pyplot as pl
def value_iteration(env, theta=0.0001, discount_factor=1.0):
"""
Value Iteration Algorithm.
Args:
env: O... | [
"matplotlib.pyplot.ylabel",
"numpy.array",
"numpy.testing.assert_array_almost_equal",
"envs.GridWorld.GridworldEnv",
"numpy.reshape",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.plot",
"numpy.max",
"pprint.PrettyPrinter",
"numpy.abs",
"matplotlib.pyplot.savefig",
"numpy.argmax",
"matplotl... | [((106, 136), 'pprint.PrettyPrinter', 'pprint.PrettyPrinter', ([], {'indent': '(2)'}), '(indent=2)\n', (126, 136), False, 'import pprint\n'), ((143, 157), 'envs.GridWorld.GridworldEnv', 'GridworldEnv', ([], {}), '()\n', (155, 157), False, 'from envs.GridWorld import GridworldEnv\n'), ((2304, 2376), 'numpy.array', 'np.a... |
import numpy as np
import numba as nb
_signatures = [
(nb.float32[:], nb.float32[:], nb.float32[:]),
(nb.float64[:], nb.float64[:], nb.float64[:]),
]
@nb.njit(_signatures, cache=True)
def _de_castlejau(z, beta, res):
# De Casteljau algorithm, numerically stable
n = len(beta)
if n == 0:
r... | [
"numba.extending.overload",
"numba.njit",
"numba.core.errors.TypingError",
"numba.guvectorize",
"numpy.zeros",
"numpy.empty_like",
"numpy.atleast_1d"
] | [((163, 195), 'numba.njit', 'nb.njit', (['_signatures'], {'cache': '(True)'}), '(_signatures, cache=True)\n', (170, 195), True, 'import numba as nb\n'), ((748, 780), 'numba.njit', 'nb.njit', (['_signatures'], {'cache': '(True)'}), '(_signatures, cache=True)\n', (755, 780), True, 'import numba as nb\n'), ((980, 999), 'n... |
# Experiment script to compare ReLU dAs versus Gaussian-Bernoulli dAs
# Train each with varying amounts of noise,
import numpy
import theano
import theano.tensor as T
from theano.tensor.shared_randomstreams import RandomStreams
from AutoEncoder import AutoEncoder
from AutoEncoder import ReluAutoEncoder
from AutoEnco... | [
"load_shared.load_data_labeled",
"numpy.mean",
"AutoEncoder.ReluAutoEncoder",
"theano.tensor.lscalar",
"theano.function",
"time.clock",
"theano.tensor.matrix",
"optparse.OptionParser",
"extract_datasets.extract_labeled_chunkrange",
"os.getcwd",
"os.chdir",
"datetime.datetime.now",
"os.path.s... | [((1081, 1095), 'optparse.OptionParser', 'OptionParser', ([], {}), '()\n', (1093, 1095), False, 'from optparse import OptionParser\n'), ((1544, 1560), 'datetime.datetime.today', 'datetime.today', ([], {}), '()\n', (1558, 1560), False, 'from datetime import datetime\n'), ((1980, 2035), 'extract_datasets.extract_labeled_... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import sys
from scipy.io import loadmat
import numpy as np
from scipy import linalg
import glob
import pickle
from six.moves import xrange # pylint: disable=redefined-builtin
from six.moves import ... | [
"os.path.exists",
"tensorflow.app.flags.DEFINE_integer",
"numpy.arange",
"os.makedirs",
"numpy.delete",
"scipy.io.loadmat",
"os.path.join",
"tensorflow.app.flags.DEFINE_string",
"six.moves.urllib.request.urlretrieve",
"numpy.concatenate",
"sys.stdout.flush",
"tensorflow.cast",
"numpy.random.... | [((555, 619), 'tensorflow.app.flags.DEFINE_string', 'tf.app.flags.DEFINE_string', (['"""data_dir"""', '"""/cache/vat-tf/svhn"""', '""""""'], {}), "('data_dir', '/cache/vat-tf/svhn', '')\n", (581, 619), True, 'import tensorflow as tf\n'), ((620, 715), 'tensorflow.app.flags.DEFINE_integer', 'tf.app.flags.DEFINE_integer',... |
# -*- coding: utf-8 -*-
"""
Created on Fri May 8 23:00:16 2020
@author: Han
"""
import numpy as np
import seaborn as sns
import matplotlib
import matplotlib.pyplot as plt
from scipy.stats import pearsonr
def softmax(x, softmax_temperature, bias = 0):
# Put the bias outside /sigma to make it comparable acro... | [
"matplotlib.pyplot.setp",
"seaborn.set",
"numpy.random.rand",
"seaborn.despine",
"matplotlib.pyplot.gca",
"numpy.max",
"numpy.exp",
"numpy.nancumsum",
"numpy.sum",
"scipy.stats.pearsonr",
"numpy.cumsum"
] | [((589, 598), 'numpy.max', 'np.max', (['X'], {}), '(X)\n', (595, 598), True, 'import numpy as np\n'), ((1126, 1181), 'seaborn.set', 'sns.set', ([], {'style': '"""ticks"""', 'context': '"""paper"""', 'font_scale': '(1.4)'}), "(style='ticks', context='paper', font_scale=1.4)\n", (1133, 1181), True, 'import seaborn as sns... |
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE
import pytest # noqa: F401
import numpy as np # noqa: F401
import awkward as ak # noqa: F401
numba = pytest.importorskip("numba")
def test_unmasked():
@numba.njit
def find_it(array):
for item in array:
... | [
"awkward.layout.IndexedArray64",
"awkward.Array",
"awkward.layout.UnmaskedArray",
"numpy.array",
"pytest.importorskip"
] | [((195, 223), 'pytest.importorskip', 'pytest.importorskip', (['"""numba"""'], {}), "('numba')\n", (214, 223), False, 'import pytest\n'), ((520, 552), 'awkward.layout.UnmaskedArray', 'ak.layout.UnmaskedArray', (['content'], {}), '(content)\n', (543, 552), True, 'import awkward as ak\n'), ((565, 583), 'awkward.Array', 'a... |
# Import dependencies.
import os
import numpy as np
import cv2
from scipy.io import savemat
# Create labels.
C = np.ones((349,))
N = np.zeros((397,))
labels = np.concatenate((C, N), axis=0)
# Load the datased and resize to imagenet size.
covid = os.listdir('CT_COVID')
n_covid = os.listdir('CT_NonCOVID')
data=[]
for... | [
"os.listdir",
"scipy.io.savemat",
"numpy.ones",
"numpy.array",
"numpy.zeros",
"numpy.concatenate",
"cv2.resize",
"cv2.imread"
] | [((114, 129), 'numpy.ones', 'np.ones', (['(349,)'], {}), '((349,))\n', (121, 129), True, 'import numpy as np\n'), ((134, 150), 'numpy.zeros', 'np.zeros', (['(397,)'], {}), '((397,))\n', (142, 150), True, 'import numpy as np\n'), ((160, 190), 'numpy.concatenate', 'np.concatenate', (['(C, N)'], {'axis': '(0)'}), '((C, N)... |
import inspect
import logging
import hashlib
import gym
import numpy as np
from gym.spaces import Box, Tuple, Dict
from mujoco_py import MjSimState
from mujoco_worldgen.util.types import enforce_is_callable
from mujoco_worldgen.util.sim_funcs import (
empty_get_info,
flatten_get_obs,
false_get_diverged,
... | [
"logging.getLogger",
"numpy.prod",
"numpy.minimum",
"numpy.asarray",
"mujoco_worldgen.util.types.enforce_is_callable",
"gym.spaces.Box",
"inspect.getfile",
"mujoco_py.mjviewer.MjViewer",
"numpy.random.randint",
"numpy.maximum",
"numpy.random.RandomState"
] | [((378, 405), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (395, 405), False, 'import logging\n'), ((2871, 2967), 'mujoco_worldgen.util.types.enforce_is_callable', 'enforce_is_callable', (['get_sim', '"""get_sim should be callable and should return an MjSim object"""'], {}), "(get_sim,\... |
import numpy as np
class Team(object):
def __init__(self,teamId,rank=1000,scored=0):
self.teamId = teamId
self.rank = rank
self.scored = scored
self.new_rank = 0
self.perf = 0
class Match(object):
def __init__(self,matchId,level,homeTeam,awayTeam,homeTeam_goals... | [
"numpy.abs",
"numpy.power"
] | [((1204, 1267), 'numpy.power', 'np.power', (['(10)', '((self.awayTeam.rank - self.homeTeam.rank) / 400.0)'], {}), '(10, (self.awayTeam.rank - self.homeTeam.rank) / 400.0)\n', (1212, 1267), True, 'import numpy as np\n'), ((1905, 1926), 'numpy.abs', 'np.abs', (['self.goalDiff'], {}), '(self.goalDiff)\n', (1911, 1926), Tr... |
from collections import OrderedDict
from functools import partial
import matplotlib.pyplot as plt
from scipy.linalg import toeplitz
import scipy.sparse as sps
import numpy as np
import pandas as pd
import bioframe
import cooler
from .lib.numutils import LazyToeplitz
def make_bin_aligned_windows(binsize, chroms, cen... | [
"numpy.dstack",
"bioframe.tools.tsv",
"numpy.asarray",
"bioframe.tools.bedtools.intersect",
"numpy.any",
"numpy.argsort",
"functools.partial",
"bioframe.parse_region_string",
"numpy.concatenate",
"pandas.DataFrame",
"numpy.full"
] | [((1524, 1542), 'numpy.asarray', 'np.asarray', (['chroms'], {}), '(chroms)\n', (1534, 1542), True, 'import numpy as np\n'), ((1560, 1582), 'numpy.asarray', 'np.asarray', (['centers_bp'], {}), '(centers_bp)\n', (1570, 1582), True, 'import numpy as np\n'), ((1747, 1773), 'numpy.any', 'np.any', (['(left_bp > right_bp)'], ... |
#!/usr/bin/env python
"""
Small demonstration of the hlines and vlines plots.
"""
from matplotlib import pyplot as plt
from numpy import sin, exp, absolute, pi, arange
from numpy.random import normal
def f(t):
s1 = sin(2 * pi * t)
e1 = exp(-t)
return absolute((s1 * e1)) + .05
t = arange(0.0, 5.0, 0.1... | [
"numpy.random.normal",
"numpy.absolute",
"numpy.exp",
"matplotlib.pyplot.figure",
"numpy.sin",
"numpy.arange",
"matplotlib.pyplot.show"
] | [((300, 321), 'numpy.arange', 'arange', (['(0.0)', '(5.0)', '(0.1)'], {}), '(0.0, 5.0, 0.1)\n', (306, 321), False, 'from numpy import sin, exp, absolute, pi, arange\n'), ((374, 401), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(12, 6)'}), '(figsize=(12, 6))\n', (384, 401), True, 'from matplotlib import ... |
import os
import torch
from torchvision.datasets import CelebA, CIFAR10, LSUN, ImageFolder
from torch.utils.data import Dataset, DataLoader, random_split, Subset
from utils import CropTransform
import torchvision.transforms as transforms
import numpy as np
from tqdm import tqdm
import cv2
from PIL import Image
# Chang... | [
"torchvision.transforms.CenterCrop",
"numpy.mean",
"cv2.Laplacian",
"PIL.Image.open",
"cv2.imread",
"utils.CropTransform",
"tqdm.tqdm",
"os.path.join",
"torch.is_tensor",
"numpy.rot90",
"torch.utils.data.DataLoader",
"torchvision.transforms.Resize",
"cv2.resize",
"torchvision.transforms.To... | [((2598, 2649), 'torch.utils.data.DataLoader', 'DataLoader', (['dataset'], {'shuffle': 'shuffle', 'num_workers': '(8)'}), '(dataset, shuffle=shuffle, num_workers=8)\n', (2608, 2649), False, 'from torch.utils.data import Dataset, DataLoader, random_split, Subset\n'), ((1025, 1045), 'torch.is_tensor', 'torch.is_tensor', ... |
"""Dummy Policy for algo tests.."""
import numpy as np
from garage.np.policies import Policy
class DummyPolicy(Policy):
"""Dummy Policy.
Args:
env_spec (garage.envs.env_spec.EnvSpec): Environment specification.
"""
def __init__(self, env_spec):
# pylint: disable=super-init-not-call... | [
"numpy.random.uniform"
] | [((411, 441), 'numpy.random.uniform', 'np.random.uniform', (['(-1)', '(1)', '(1000)'], {}), '(-1, 1, 1000)\n', (428, 441), True, 'import numpy as np\n')] |
# This file contains code from https://github.com/tensorflow/models/blob/master/research/deeplab/deeplab_demo.ipynb
# and was released under an Apache 2 license
import os
import tarfile
import numpy as np
import tensorflow as tf
import warnings
from config import _FULL_MODEL_PATH
from config import _MOBILE_MODEL_PATH
f... | [
"logging.getLogger",
"tensorflow.Graph",
"tarfile.open",
"tensorflow.Session",
"os.environ.get",
"io.BytesIO",
"numpy.asarray",
"os.path.basename",
"tensorflow.import_graph_def",
"warnings.warn",
"flask.abort"
] | [((376, 395), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (393, 395), False, 'import logging\n'), ((498, 544), 'os.environ.get', 'os.environ.get', (['"""MODEL_TYPE"""'], {'default': '"""mobile"""'}), "('MODEL_TYPE', default='mobile')\n", (512, 544), False, 'import os\n'), ((562, 603), 'os.environ.get', ... |
"""
MAP Client Plugin Step
"""
import json
import os
import numpy as np
from mapclientplugins.cimconverterstep.SurfaceExtractor import Subdivision_Surface
from PySide2 import QtGui
from mapclient.mountpoints.workflowstep import WorkflowStepMountPoint
from mapclientplugins.cimconverterstep.configuredialog import Confi... | [
"json.loads",
"mapclientplugins.cimconverterstep.configuredialog.ConfigureDialog",
"os.makedirs",
"json.dumps",
"os.path.join",
"os.path.isdir",
"mapclientplugins.cimconverterstep.SurfaceExtractor.Subdivision_Surface",
"numpy.shape",
"PySide2.QtGui.QImage",
"os.path.abspath"
] | [((789, 846), 'PySide2.QtGui.QImage', 'QtGui.QImage', (['""":/cimconverterstep/images/data-source.png"""'], {}), "(':/cimconverterstep/images/data-source.png')\n", (801, 846), False, 'from PySide2 import QtGui\n'), ((1788, 1822), 'os.path.join', 'os.path.join', (["(input_path + '\\\\csv')"], {}), "(input_path + '\\\\cs... |
"""Client to access DICOM Part10 files through a layer of abstraction."""
import collections
import io
import logging
import math
import os
import re
import sqlite3
import sys
import time
import traceback
from collections import OrderedDict
from enum import Enum
from pathlib import Path
from typing import (
Any,
... | [
"logging.getLogger",
"numpy.product",
"pydicom.filereader.data_element_offset_to_value",
"traceback.format_tb",
"math.floor",
"io.BytesIO",
"pydicom.filewriter.dcmwrite",
"pydicom.valuerep.DA",
"pydicom.dataset.Dataset",
"os.remove",
"pydicom.filereader.dcmread",
"pydicom.dataset.FileMetaDatas... | [((1217, 1244), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1234, 1244), False, 'import logging\n'), ((4090, 4143), 'pydicom.filereader.data_element_offset_to_value', 'data_element_offset_to_value', (['fp.is_implicit_VR', '"""OB"""'], {}), "(fp.is_implicit_VR, 'OB')\n", (4118, 4143), ... |
import math
from skimage import io
from skimage.feature import blob_log
from skimage import exposure
from skimage.morphology import extrema
import cv2
import os
import sys
import numpy as np
# Beware, not giving min/max sigma's prompts skimage to calculate it, which takes at least twice as long, so for largescale use... | [
"skimage.morphology.extrema.local_maxima",
"numpy.mean",
"math.ceil",
"math.floor",
"numpy.logical_or",
"skimage.io.imread",
"numpy.std",
"skimage.feature.blob_log"
] | [((1952, 1973), 'skimage.io.imread', 'io.imread', (['image_path'], {}), '(image_path)\n', (1961, 1973), False, 'from skimage import io\n'), ((1993, 2020), 'skimage.morphology.extrema.local_maxima', 'extrema.local_maxima', (['image'], {}), '(image)\n', (2013, 2020), False, 'from skimage.morphology import extrema\n'), ((... |
import numpy as np
import csv
class Rullo:
def __init__(self,
content,
row_constraints,
column_constraints,):
"""Creates a rullo board
Attributes
----------
content: 2-dim array
Values on the board
row_constrai... | [
"numpy.array",
"numpy.zeros",
"numpy.asarray",
"csv.reader"
] | [((616, 649), 'numpy.asarray', 'np.asarray', (['content'], {'dtype': 'np.int'}), '(content, dtype=np.int)\n', (626, 649), True, 'import numpy as np\n'), ((681, 722), 'numpy.asarray', 'np.asarray', (['row_constraints'], {'dtype': 'np.int'}), '(row_constraints, dtype=np.int)\n', (691, 722), True, 'import numpy as np\n'),... |
#!/usr/bin/env python3
####################################################################################################
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE in the project root for license information.
#############################################... | [
"logging.getLogger",
"accera.tanh",
"sys.path.insert",
"accera.ceil",
"numpy.random.rand",
"accera.Nest",
"sys.platform.startswith",
"accera.Array",
"accera.sqrt",
"accera.log10",
"unittest.main",
"accera.min",
"accera.floor",
"accera.logical_or",
"numpy.flip",
"accera.max",
"pathlib... | [((1515, 1534), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (1532, 1534), False, 'import logging\n'), ((816, 860), 'sys.path.insert', 'sys.path.insert', (['(1)', '"""@CMAKE_INSTALL_PREFIX@"""'], {}), "(1, '@CMAKE_INSTALL_PREFIX@')\n", (831, 860), False, 'import sys\n'), ((55966, 56014), 'unittest.skip',... |
# pylint: disable=no-member, invalid-name, redefined-outer-name
# pylint: disable=too-many-lines
from collections import namedtuple, OrderedDict
import os
from urllib.parse import urlunsplit
import numpy as np
from numpy import ma
import pymc3 as pm
import pytest
from arviz import (
concat,
conve... | [
"numpy.ma.masked_values",
"arviz.load_data",
"arviz.from_pyro",
"arviz.from_pystan",
"numpy.array",
"pymc3.sample",
"emcee.backends.HDFBackend",
"pytest.fixture",
"numpy.arange",
"os.remove",
"pystan.StanModel",
"os.path.exists",
"arviz.convert_to_dataset",
"arviz.from_emcee",
"arviz.lis... | [((1182, 1212), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (1196, 1212), False, 'import pytest\n'), ((1249, 1279), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (1263, 1279), False, 'import pytest\n'), ((1315, 1343), 'pytest.fi... |
import tensorflow as tf
import numpy as np
import input_data
def sample_prob(probs):
return tf.floor(probs + tf.random_uniform(tf.shape(probs), 0, 1))
# return tf.select((tf.random_uniform(tf.shape(probs), 0, 1) - probs) > 0.5, tf.ones(tf.shape(probs)), tf.zeros(tf.shape(probs)))
learning_rate = 0.1
momentum ... | [
"tensorflow.initialize_all_variables",
"tensorflow.shape",
"tensorflow.transpose",
"tensorflow.placeholder",
"tensorflow.Session",
"numpy.zeros",
"tensorflow.matmul",
"tensorflow.reduce_mean",
"input_data.read_data_sets"
] | [((351, 405), 'input_data.read_data_sets', 'input_data.read_data_sets', (['"""MNIST_data/"""'], {'one_hot': '(True)'}), "('MNIST_data/', one_hot=True)\n", (376, 405), False, 'import input_data\n'), ((436, 472), 'tensorflow.placeholder', 'tf.placeholder', (['"""float"""', '[None, 784]'], {}), "('float', [None, 784])\n",... |
import numpy as np
import pandas as pd
from copy import deepcopy
def super_str(x):
if isinstance(x,np.int64):
x=float(x)
if isinstance(x,int):
x=float(x)
ans=str(x)
return ans
def convert_to_array(x):
if isinstance(x, np.ndarray):
return x
else:
return np.a... | [
"pandas.DataFrame",
"numpy.array",
"copy.deepcopy"
] | [((2333, 2354), 'pandas.DataFrame', 'pd.DataFrame', (['pd_dict'], {}), '(pd_dict)\n', (2345, 2354), True, 'import pandas as pd\n'), ((316, 327), 'numpy.array', 'np.array', (['x'], {}), '(x)\n', (324, 327), True, 'import numpy as np\n'), ((2442, 2453), 'numpy.array', 'np.array', (['X'], {}), '(X)\n', (2450, 2453), True,... |
"""
Copyright 2018 <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... | [
"matplotlib.pyplot.ylabel",
"scipy.spatial.distance.pdist",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.colorbar",
"numpy.argmax",
"itertools.product",
"nuart.clustering.DualVigilanceHypersphereART",
"matplotlib.pyplot.figure",
"numpy.zeros",
"matplotlib.pyplot.matsh... | [((1214, 1262), 'numpy.loadtxt', 'np.loadtxt', (['"""data/csv/Target.csv"""'], {'delimiter': '""","""'}), "('data/csv/Target.csv', delimiter=',')\n", (1224, 1262), True, 'import numpy as np\n'), ((1351, 1363), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (1361, 1363), True, 'import matplotlib.pyplot as p... |
from scipy.optimize import minimize
import numpy as np
import pylab as pl
from mpl_toolkits.mplot3d import Axes3D
import math
def f(x):
""" Function that returns x_0^2 + e^{0.5*x_0} + 10*sin(x_1) + x_1^2. """
return x[0] ** 2 + math.exp(0.5 * x[0]) + 10 * math.sin(x[1]) + x[1] ** 2
def fprime(x):
""" The deri... | [
"pylab.close",
"pylab.figure",
"numpy.array",
"numpy.linspace",
"numpy.zeros",
"math.cos",
"numpy.meshgrid",
"math.exp",
"math.sin",
"pylab.show"
] | [((581, 596), 'pylab.close', 'pl.close', (['"""all"""'], {}), "('all')\n", (589, 596), True, 'import pylab as pl\n'), ((613, 631), 'numpy.linspace', 'np.linspace', (['(-r)', 'r'], {}), '(-r, r)\n', (624, 631), True, 'import numpy as np\n'), ((642, 660), 'numpy.linspace', 'np.linspace', (['(-r)', 'r'], {}), '(-r, r)\n',... |
from contextlib import contextmanager
from copy import deepcopy
from functools import partial
import sys
import warnings
import numpy as np
from numpy.testing import assert_equal
import pytest
from numpy.testing import assert_allclose
from expyfun import ExperimentController, visual, _experiment_controller
from expyf... | [
"expyfun._experiment_controller._get_dev_db",
"numpy.testing.assert_equal",
"numpy.random.rand",
"numpy.array",
"copy.deepcopy",
"pytest.mark.timeout",
"expyfun._utils.fake_mouse_click",
"expyfun.ExperimentController",
"numpy.testing.assert_allclose",
"expyfun._utils._new_pyglet",
"expyfun._util... | [((1042, 1089), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""ws"""', '[(2, 1), (1, 1)]'], {}), "('ws', [(2, 1), (1, 1)])\n", (1065, 1089), False, 'import pytest\n'), ((7380, 7403), 'pytest.mark.timeout', 'pytest.mark.timeout', (['(20)'], {}), '(20)\n', (7399, 7403), False, 'import pytest\n'), ((17843, 17... |
import dgl
from . import register_model, BaseModel
import torch.nn as nn
import numpy as np
import dgl.nn.pytorch as dglnn
import torch
import torch.nn.functional as F
@register_model('DMGI')
class DMGI(BaseModel):
r"""
Description
-----------
**Title:** Unsupervised Attributed Multiplex Network E... | [
"torch.nn.Sigmoid",
"dgl.add_self_loop",
"torch.nn.ReLU",
"torch.mean",
"torch.nn.init.xavier_uniform_",
"torch.nn.Bilinear",
"torch.stack",
"dgl.metapath_reachable_graph",
"torch.diag",
"torch.nn.functional.dropout",
"torch.nn.init.xavier_normal_",
"torch.pow",
"torch.nn.Linear",
"torch.s... | [((3781, 3793), 'torch.nn.Sigmoid', 'nn.Sigmoid', ([], {}), '()\n', (3791, 3793), True, 'import torch.nn as nn\n'), ((4589, 4619), 'torch.nn.init.xavier_normal_', 'nn.init.xavier_normal_', (['self.H'], {}), '(self.H)\n', (4611, 4619), True, 'import torch.nn as nn\n'), ((11598, 11622), 'torch.stack', 'torch.stack', (['f... |
# MIT License
#
# Copyright (c) 2019 <NAME>, <NAME>, <NAME>, <NAME>, <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... | [
"PIL.Image.fromarray",
"dpemu.filters.Constant",
"dpemu.filters.Identity",
"dpemu.filters.Subtraction",
"numpy.array",
"dpemu.nodes.Array"
] | [((1437, 1467), 'numpy.array', 'np.array', (['data'], {'dtype': 'np.uint8'}), '(data, dtype=np.uint8)\n', (1445, 1467), True, 'import numpy as np\n'), ((1506, 1534), 'PIL.Image.fromarray', 'Image.fromarray', (['data', '"""RGB"""'], {}), "(data, 'RGB')\n", (1521, 1534), False, 'from PIL import Image\n'), ((1585, 1592), ... |
#!/usr/bin/env python
# coding: utf-8
# In[2]:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
sns.set()
# # Importing dataset
# 1.Since data is in form of excel file we have to use pandas read_excel to load the data.
#
# 2.After loading it is important to check the c... | [
"matplotlib.pyplot.ylabel",
"sklearn.ensemble.ExtraTreesRegressor",
"pandas.read_excel",
"sklearn.metrics.r2_score",
"pandas.to_datetime",
"seaborn.set",
"sklearn.ensemble.RandomForestRegressor",
"seaborn.distplot",
"matplotlib.pyplot.xlabel",
"pandas.set_option",
"numpy.linspace",
"matplotlib... | [((144, 153), 'seaborn.set', 'sns.set', ([], {}), '()\n', (151, 153), True, 'import seaborn as sns\n'), ((755, 859), 'pandas.read_excel', 'pd.read_excel', (['"""/Users/dhanyashreegowda/Desktop/github/Flight-Fare-Prediction/Data_Train.xlsx"""'], {}), "(\n '/Users/dhanyashreegowda/Desktop/github/Flight-Fare-Prediction... |
r"""
Definition
----------
This model provides the form factor for an elliptical cylinder with a
core-shell scattering length density profile. Thus this is a variation
of the core-shell bicelle model, but with an elliptical cylinder for the core.
Outer shells on the rims and flat ends may be of different thicknesses a... | [
"numpy.sin",
"numpy.cos"
] | [((6560, 6573), 'numpy.cos', 'cos', (['(pi / 6.0)'], {}), '(pi / 6.0)\n', (6563, 6573), False, 'from numpy import inf, sin, cos, pi\n'), ((6579, 6592), 'numpy.sin', 'sin', (['(pi / 6.0)'], {}), '(pi / 6.0)\n', (6582, 6592), False, 'from numpy import inf, sin, cos, pi\n')] |
# Copyright 2016-2020 The <NAME> at the California Institute of
# Technology (Caltech), with support from the Paul Allen Family Foundation,
# Google, & National Institutes of Health (NIH) under Grant U24CA224309-01.
# All rights reserved.
#
# Licensed under a modified Apache License, Version 2.0 (the "License");
# you ... | [
"os.path.exists",
"os.listdir",
"os.makedirs",
"os.path.join",
"numpy.sum",
"numpy.zeros",
"os.path.isdir",
"numpy.savez_compressed",
"numpy.load",
"json.dump"
] | [((5320, 5359), 'os.path.join', 'os.path.join', (['save_dir', '"""log_data.json"""'], {}), "(save_dir, 'log_data.json')\n", (5332, 5359), False, 'import os\n'), ((7507, 7622), 'numpy.zeros', 'np.zeros', (['(fov_len, slice_stack_len, num_crops, num_slices, row_crop_size,\n col_crop_size, 1)'], {'dtype': 'label_dtype'... |
"""
Uses generator functions to supply train/test with data.
Image renderings and text are created on the fly each time.
"""
from itertools import groupby
from tensorflow.keras.preprocessing.sequence import pad_sequences
import handwritten_text_recognition.data.preproc as pp
import h5py
import numpy as np
import unic... | [
"handwritten_text_recognition.data.preproc.text_standardize",
"numpy.ceil",
"itertools.groupby",
"tensorflow.keras.preprocessing.sequence.pad_sequences",
"numpy.asarray",
"h5py.File",
"unicodedata.normalize",
"handwritten_text_recognition.data.preproc.normalization",
"handwritten_text_recognition.da... | [((4678, 4697), 'numpy.asarray', 'np.asarray', (['encoded'], {}), '(encoded)\n', (4688, 4697), True, 'import numpy as np\n'), ((4900, 4928), 'handwritten_text_recognition.data.preproc.text_standardize', 'pp.text_standardize', (['decoded'], {}), '(decoded)\n', (4919, 4928), True, 'import handwritten_text_recognition.dat... |
import numpy as np
import infotheory
class bcolors:
HEADER = "\033[95m"
OKBLUE = "\033[94m"
OKGREEN = "\033[92m"
TEST_HEADER = "\033[93m"
FAIL = "\033[91m"
ENDC = "\033[0m"
BOLD = "\033[1m"
UNDERLINE = "\033[4m"
SUCCESS = bcolors.OKGREEN + "SUCCESS" + bcolors.ENDC
FAILED = bcolors.FA... | [
"numpy.random.normal",
"numpy.prod",
"numpy.random.rand",
"numpy.concatenate",
"numpy.random.uniform",
"infotheory.InfoTools",
"numpy.round"
] | [((493, 528), 'numpy.round', 'np.round', (['result'], {'decimals': 'decimals'}), '(result, decimals=decimals)\n', (501, 528), True, 'import numpy as np\n'), ((542, 577), 'numpy.round', 'np.round', (['target'], {'decimals': 'decimals'}), '(target, decimals=decimals)\n', (550, 577), True, 'import numpy as np\n'), ((9607,... |
# -*- coding: utf-8 -*-
"""
@author: clausmichele
"""
import time
import tensorflow as tf
import cv2
import numpy as np
from tqdm import tqdm
def SpatialCNN(input, is_training=False, output_channels=3, reuse=tf.AUTO_REUSE):
with tf.variable_scope('block1',reuse=reuse):
output = tf.layers.conv2d(input, 128, 3, padd... | [
"cv2.imwrite",
"numpy.log10",
"tensorflow.variable_scope",
"tensorflow.placeholder",
"tensorflow.train.Saver",
"numpy.asarray",
"tensorflow.nn.leaky_relu",
"tensorflow.global_variables",
"tensorflow.global_variables_initializer",
"tensorflow.layers.conv2d",
"tensorflow.train.get_checkpoint_state... | [((232, 272), 'tensorflow.variable_scope', 'tf.variable_scope', (['"""block1"""'], {'reuse': 'reuse'}), "('block1', reuse=reuse)\n", (249, 272), True, 'import tensorflow as tf\n'), ((284, 354), 'tensorflow.layers.conv2d', 'tf.layers.conv2d', (['input', '(128)', '(3)'], {'padding': '"""same"""', 'activation': 'tf.nn.rel... |
import igraph as ig
import numpy as np
import random
import time
from collections import defaultdict, Counter, deque
import itertools
MAX_LENGTH = 1000 # maximum random walk length (hyperparameter)
class RandomWalkSingleAttribute(object):
def __init__(self, p_diff, p_same, jump, out, gpre, attr_name='single_attr'... | [
"random.choice",
"numpy.random.randint",
"collections.defaultdict",
"random.random",
"random.randint",
"igraph.Graph"
] | [((549, 581), 'igraph.Graph', 'ig.Graph', ([], {'directed': 'self.directed'}), '(directed=self.directed)\n', (557, 581), True, 'import igraph as ig\n'), ((1121, 1138), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (1132, 1138), False, 'from collections import defaultdict, Counter, deque\n'), ((1... |
import numpy as np
from skimage.io import imread
# import pdb
def add_patch(img,trigger):
flag=False
if img.max()>1.:
img=img/255.
flag=True
if trigger.max()>1.:
trigger=trigger/255.
# x,y=np.random.randint(10,20,size=(2,))
x,y = np.random.choice([3, 28]), np.random.choice(... | [
"numpy.random.choice",
"numpy.argwhere",
"numpy.ones"
] | [((795, 825), 'numpy.argwhere', 'np.argwhere', (['(Y_train == source)'], {}), '(Y_train == source)\n', (806, 825), True, 'import numpy as np\n'), ((276, 301), 'numpy.random.choice', 'np.random.choice', (['[3, 28]'], {}), '([3, 28])\n', (292, 301), True, 'import numpy as np\n'), ((303, 328), 'numpy.random.choice', 'np.r... |
import torch
import torch.nn as nn
from torch import optim
import numpy as np
import nltk
class TreeRecursiveEduNN(nn.Module):
def __init__(self, embed_dict, glove, embed_size, glove_size, hidden_size, use_relations=True):
super(TreeRecursiveEduNN, self).__init__()
self.glove = glove
self.e... | [
"torch.tanh",
"nltk.word_tokenize",
"torch.nn.LSTM",
"numpy.zeros",
"torch.nn.Linear",
"torch.FloatTensor",
"torch.cat"
] | [((573, 618), 'torch.nn.Linear', 'nn.Linear', (['embed_size', 'hidden_size'], {'bias': '(True)'}), '(embed_size, hidden_size, bias=True)\n', (582, 618), True, 'import torch.nn as nn\n'), ((646, 693), 'torch.nn.Linear', 'nn.Linear', (['hidden_size', 'hidden_size'], {'bias': '(False)'}), '(hidden_size, hidden_size, bias=... |
# -*- coding: utf-8 -*-
import os, sys
import numpy as np
import itertools
import matplotlib.pyplot as plt
import torch
import torch.nn.functional as F
from pydaily import filesystem
def get_slide_filenames(slides_dir):
slide_list = []
svs_file_list = filesystem.find_ext_files(slides_dir, "svs")
slide_li... | [
"numpy.ceil",
"itertools.product",
"os.path.splitext",
"numpy.asarray",
"torch.nn.functional.sigmoid",
"numpy.zeros",
"os.path.basename",
"torch.squeeze",
"pydaily.filesystem.find_ext_files",
"numpy.arange"
] | [((263, 307), 'pydaily.filesystem.find_ext_files', 'filesystem.find_ext_files', (['slides_dir', '"""svs"""'], {}), "(slides_dir, 'svs')\n", (288, 307), False, 'from pydaily import filesystem\n'), ((400, 444), 'pydaily.filesystem.find_ext_files', 'filesystem.find_ext_files', (['slides_dir', '"""SVS"""'], {}), "(slides_d... |
import os
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
datapath = '../util/stock_dfs/'
def get_ticker(x):
return x.split('/')[-1].split('.')[0]
def ret(x, y):
return np.log(y/x)
def get_zscore(x):
return (x -x.mean())/x.std()
def make_inputs(filepath):
D = pd.read_cs... | [
"os.listdir",
"pandas.read_csv",
"pandas.qcut",
"numpy.log",
"os.path.join",
"pandas.Index",
"numpy.exp",
"pandas.DataFrame"
] | [((207, 220), 'numpy.log', 'np.log', (['(y / x)'], {}), '(y / x)\n', (213, 220), True, 'import numpy as np\n'), ((447, 461), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (459, 461), True, 'import pandas as pd\n'), ((947, 961), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (959, 961), True, 'import pand... |
#! /usr/bin/env python
# SPDX-FileCopyrightText: Copyright 2022, <NAME> <<EMAIL>>
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-FileType: SOURCE
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the license found in the LICENSE.txt file in the root directory
# of this so... | [
"numpy.random.rand",
"detkit.orthogonalize",
"numpy.linalg.slogdet",
"numpy.linalg.inv",
"numpy.around",
"detkit.loggdet"
] | [((644, 667), 'numpy.random.rand', 'numpy.random.rand', (['n', 'n'], {}), '(n, n)\n', (661, 667), False, 'import numpy\n'), ((676, 699), 'numpy.random.rand', 'numpy.random.rand', (['n', 'm'], {}), '(n, m)\n', (693, 699), False, 'import numpy\n'), ((909, 932), 'numpy.linalg.slogdet', 'numpy.linalg.slogdet', (['A'], {}),... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.