code stringlengths 31 1.05M | apis list | extract_api stringlengths 97 1.91M |
|---|---|---|
"""Plots GridRad domains.
Specifically, plots number of convective days with GridRad data at each grid
point.
"""
import os.path
import argparse
import numpy
import matplotlib
matplotlib.use('agg')
from matplotlib import pyplot
from mpl_toolkits.basemap import Basemap
from gewittergefahr.gg_io import gridrad_io
from ... | [
"gewittergefahr.gg_utils.time_periods.range_and_interval_to_list",
"numpy.array",
"gewittergefahr.gg_utils.grids.create_equidistant_grid",
"gewittergefahr.gg_utils.projections.project_xy_to_latlng",
"gewittergefahr.gg_utils.grids.xy_vectors_to_matrices",
"numpy.mod",
"gewittergefahr.gg_utils.time_conver... | [((178, 199), 'matplotlib.use', 'matplotlib.use', (['"""agg"""'], {}), "('agg')\n", (192, 199), False, 'import matplotlib\n'), ((988, 1006), 'numpy.full', 'numpy.full', (['(3)', '(0.0)'], {}), '(3, 0.0)\n', (998, 1006), False, 'import numpy\n'), ((2059, 2084), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], ... |
import random
import matplotlib.pyplot as plt
import gym
# from agents.actor_critic_agents.A2C import A2C
# from agents.actor_critic_agents.A3C import A3C
# from agents.actor_critic_agents.SAC import SAC
from agents.actor_critic_agents.SAC_Discrete import SAC_Discrete
# from agents.DQN_agents.DQN_HER import DQN_HER
#... | [
"utilities.data_structures.Config.Config",
"torch.manual_seed",
"environments.Cache_server.Cache_server",
"agents.Trainer.Trainer",
"matplotlib.pyplot.plot",
"random.seed",
"numpy.max",
"numpy.random.seed",
"matplotlib.pyplot.show"
] | [((1183, 1197), 'random.seed', 'random.seed', (['(1)'], {}), '(1)\n', (1194, 1197), False, 'import random\n'), ((1198, 1215), 'numpy.random.seed', 'np.random.seed', (['(1)'], {}), '(1)\n', (1212, 1215), True, 'import numpy as np\n'), ((1216, 1236), 'torch.manual_seed', 'torch.manual_seed', (['(1)'], {}), '(1)\n', (1233... |
import flask
from flask import Flask, url_for
from tensorflow.keras.applications.imagenet_utils import preprocess_input, decode_predictions
from tensorflow.keras.models import load_model
from tensorflow.keras.preprocessing import image
import numpy as np
# instantiating a class object
app = Flask(__name__)
model_pat... | [
"tensorflow.keras.preprocessing.image.load_img",
"flask.Flask",
"tensorflow.keras.models.load_model",
"numpy.expand_dims",
"tensorflow.keras.preprocessing.image.img_to_array",
"tensorflow.keras.applications.imagenet_utils.preprocess_input"
] | [((294, 309), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (299, 309), False, 'from flask import Flask, url_for\n'), ((362, 384), 'tensorflow.keras.models.load_model', 'load_model', (['model_path'], {}), '(model_path)\n', (372, 384), False, 'from tensorflow.keras.models import load_model\n'), ((540, 588)... |
#Copyright (c) 2017 <NAME>.
#Cura is released under the terms of the LGPLv3 or higher.
import gc
from UM.Job import Job
from UM.Application import Application
from UM.Mesh.MeshData import MeshData
from UM.Preferences import Preferences
from UM.View.GL.OpenGLContext import OpenGLContext
from UM.Message import Message... | [
"UM.Logger.Logger.log",
"UM.Preferences.Preferences.getInstance",
"cura.Scene.BuildPlateDecorator.BuildPlateDecorator",
"cura.LayerDataDecorator.LayerDataDecorator",
"cura.Scene.CuraSceneNode.CuraSceneNode",
"UM.Job.Job.yieldThread",
"cura.LayerDataBuilder.LayerDataBuilder",
"cura.LayerPolygon.LayerPo... | [((792, 811), 'UM.i18n.i18nCatalog', 'i18nCatalog', (['"""cura"""'], {}), "('cura')\n", (803, 811), False, 'from UM.i18n import i18nCatalog\n'), ((1015, 1081), 'UM.Logger.Logger.log', 'Logger.log', (['"""w"""', '"""Unable to convert color code, returning default"""'], {}), "('w', 'Unable to convert color code, returnin... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed May 25 16:02:58 2022
@author: erri
"""
import os
import numpy as np
import math
from morph_quantities_func_v2 import morph_quantities
import matplotlib.pyplot as plt
# SINGLE RUN NAME
run = 'q07_1'
DoD_name = 'DoD_s1-s0_filt_nozero_rst.txt'
# Step betw... | [
"os.listdir",
"numpy.nanstd",
"math.floor",
"numpy.where",
"morph_quantities_func_v2.morph_quantities",
"os.path.join",
"os.getcwd",
"numpy.append",
"numpy.array",
"numpy.nanmean",
"numpy.isnan",
"numpy.vstack",
"numpy.loadtxt"
] | [((1005, 1016), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (1014, 1016), False, 'import os\n'), ((1052, 1096), 'os.path.join', 'os.path.join', (['home_dir', '"""DoDs"""', "('DoD_' + run)"], {}), "(home_dir, 'DoDs', 'DoD_' + run)\n", (1064, 1096), False, 'import os\n'), ((1192, 1215), 'os.listdir', 'os.listdir', (['DoD... |
#--------------------------------------------------------Import libraries
import pickle
import socket
import struct
import cv2
from stable_baselines import PPO2
import numpy as np
import imageio
#--------------------------------------------------------Establiosh connection
s = socket.socket(socket.AF_INET,socket.SOCK_... | [
"cv2.resizeWindow",
"socket.socket",
"pickle.dumps",
"stable_baselines.PPO2.load",
"numpy.array",
"struct.unpack",
"cv2.cvtColor",
"numpy.frombuffer",
"cv2.waitKey",
"cv2.namedWindow"
] | [((279, 328), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), '(socket.AF_INET, socket.SOCK_STREAM)\n', (292, 328), False, 'import socket\n'), ((446, 487), 'stable_baselines.PPO2.load', 'PPO2.load', (['"""model_output/model_final.zip"""'], {}), "('model_output/model_final.zip')\n", (45... |
import os
from fnmatch import fnmatch
from typing import Iterator, List, Optional, Sequence, Tuple, Union
import numpy as np
from typing_extensions import Literal
from . import lib
from .otf import TemporaryOTF
from .util import PathOrArray, _kwargs_for, imread
def rl_cleanup():
"""Release GPU buffer and cleanu... | [
"numpy.median",
"os.listdir",
"os.path.join",
"numpy.ascontiguousarray",
"os.path.isfile",
"numpy.issubdtype",
"os.path.isdir",
"numpy.empty",
"numpy.empty_like",
"fnmatch.fnmatch"
] | [((4717, 4744), 'numpy.empty_like', 'np.empty_like', (['decon_result'], {}), '(decon_result)\n', (4730, 4744), True, 'import numpy as np\n'), ((4779, 4808), 'numpy.empty', 'np.empty', (['(1)'], {'dtype': 'np.float32'}), '(1, dtype=np.float32)\n', (4787, 4808), True, 'import numpy as np\n'), ((4851, 4885), 'numpy.issubd... |
import numpy as np
from astroquery.hitran import Hitran
from astropy import units as un
from astropy.constants import c, k_B, h, u
def calc_solid_angle(radius,distance):
'''
Convenience function to calculate solid angle from radius and distance, assuming a disk shape.
Parameters
----------
radius ... | [
"numpy.sqrt"
] | [((945, 973), 'numpy.sqrt', 'np.sqrt', (['(solid_angle / np.pi)'], {}), '(solid_angle / np.pi)\n', (952, 973), True, 'import numpy as np\n')] |
# Copyright (c) Facebook, Inc. and its affiliates.
import numpy as np
from termcolor import colored
import logging
import torch.nn as nn
import torch.utils.data
log = logging.getLogger(__name__)
import torch
import numpy as np
import math
class Dataset(torch.utils.data.Dataset):
def __init__(self, x, y):
... | [
"logging.getLogger",
"torch.nn.Tanh",
"numpy.array",
"torch.sum",
"numpy.mean",
"torch.mean",
"torch.zeros_like",
"numpy.random.permutation",
"torch.Tensor",
"torch.autograd.grad",
"torch.cat",
"torch.clamp",
"torch.nn.Softplus",
"math.ceil",
"torch.log",
"torch.stack",
"torch.nn.Lin... | [((169, 196), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (186, 196), False, 'import logging\n'), ((4210, 4239), 'numpy.random.permutation', 'np.random.permutation', (['n_data'], {}), '(n_data)\n', (4231, 4239), True, 'import numpy as np\n'), ((1774, 1795), 'numpy.array', 'np.array', (... |
# -*- coding: utf-8 -*-
"""
# @Time : 24/10/18 2:40 PM
# @Author : <NAME>
# @FileName: plot_result.py
# @Software: PyCharm
# @Github : https://github.com/hzm2016
"""
import collections
import matplotlib.pyplot as plt
import numpy as np
import pickle
import copy as cp
from baselines.deepq.assembly.src.value_funct... | [
"matplotlib.pyplot.subplots_adjust",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.xticks",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.plot",
"pickle.load",
"numpy.array",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.yticks",
"matplotlib.pyplot.tight_layout",
... | [((719, 773), 'numpy.array', 'np.array', (['[40, 40, 0, 5, 5, 5, 542, -36, 188, 5, 5, 5]'], {}), '([40, 40, 0, 5, 5, 5, 542, -36, 188, 5, 5, 5])\n', (727, 773), True, 'import numpy as np\n'), ((780, 844), 'numpy.array', 'np.array', (['[-40, -40, -40, -5, -5, -5, 538, -42, 192, -5, -5, -5]'], {}), '([-40, -40, -40, -5, ... |
#! /usr/bin/env python
from math import factorial
import numpy as np
# test passed
def generate_poly(max_exponent,max_diff,symbol):
f=np.zeros((max_diff+1, max_exponent+1), dtype=float)
for k in range(max_diff+1):
for i in range(max_exponent+1):
if (i - k) >= 0:
f[k,i] = factorial(i)*symbol**(i-k)/facto... | [
"math.factorial",
"numpy.zeros"
] | [((137, 192), 'numpy.zeros', 'np.zeros', (['(max_diff + 1, max_exponent + 1)'], {'dtype': 'float'}), '((max_diff + 1, max_exponent + 1), dtype=float)\n', (145, 192), True, 'import numpy as np\n'), ((315, 331), 'math.factorial', 'factorial', (['(i - k)'], {}), '(i - k)\n', (324, 331), False, 'from math import factorial\... |
from dask.distributed import Client
import dask.dataframe as dd
import pandas as pd
import numpy as np
import os
import matplotlib.pyplot as plt
import matplotlib.cm as cm
from sklearn.manifold import TSNE
from sklearn.decomposition import PCA
from IPython.display import display, HTML
from sklearn.cluster import KMeans... | [
"sklearn.metrics.f1_score",
"numpy.unique",
"pandas.read_csv",
"os.path.join",
"sklearn.metrics.recall_score",
"matplotlib.pyplot.rcParams.update",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.axes",
"functools.partial",
"matplotlib.pyplot.scatter",
"matplotlib.cm.tab20",
"pandas.DataFrame",... | [((2021, 2059), 'matplotlib.pyplot.rcParams.update', 'plt.rcParams.update', (["{'font.size': 14}"], {}), "({'font.size': 14})\n", (2040, 2059), True, 'import matplotlib.pyplot as plt\n'), ((2306, 2333), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(10, 8)'}), '(figsize=(10, 8))\n', (2316, 2333), True, 'i... |
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown copyright. The Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are me... | [
"iris.cube.CubeList",
"numpy.ones",
"improver.synthetic_data.set_up_test_cubes.set_up_variable_cube",
"improver.precipitation_type.shower_condition_probability.ShowerConditionProbability",
"numpy.array",
"numpy.zeros",
"pytest.raises",
"pytest.fixture"
] | [((2584, 2617), 'pytest.fixture', 'pytest.fixture', ([], {'name': '"""test_cubes"""'}), "(name='test_cubes')\n", (2598, 2617), False, 'import pytest\n'), ((2745, 2755), 'iris.cube.CubeList', 'CubeList', ([], {}), '()\n', (2753, 2755), False, 'from iris.cube import CubeList\n'), ((9135, 9171), 'improver.precipitation_ty... |
import tensorflow as tf
import numpy as np
from tqdm.notebook import tqdm
class System():
def __init__(self,
num_part,
dim,
Ansatz=None,
External=None,
Internal=None,
Sampler=None
):
self... | [
"tensorflow.random.uniform",
"tensorflow.reshape",
"tensorflow.reduce_sum",
"tensorflow.math.sqrt",
"numpy.linalg.norm",
"numpy.sum",
"numpy.zeros",
"numpy.random.uniform",
"tensorflow.convert_to_tensor",
"tqdm.notebook.tqdm",
"tensorflow.norm"
] | [((842, 929), 'tensorflow.random.uniform', 'tf.random.uniform', (['(batch_size, dim)'], {'minval': '(-2)', 'maxval': '(2)', 'dtype': 'tf.dtypes.float64'}), '((batch_size, dim), minval=-2, maxval=2, dtype=tf.dtypes.\n float64)\n', (859, 929), True, 'import tensorflow as tf\n'), ((2594, 2617), 'numpy.zeros', 'np.zeros... |
"""
Demonstrates the hover functionality of mpldatacursor as well as point labels
and a custom formatting function. Notice that overlapping points have both
labels displayed.
"""
import string
import matplotlib.pyplot as plt
import numpy as np
from mpldatacursor import datacursor
np.random.seed(1977)
x, y = np.random.... | [
"numpy.random.random",
"numpy.random.seed",
"matplotlib.pyplot.subplots",
"mpldatacursor.datacursor",
"matplotlib.pyplot.show"
] | [((281, 301), 'numpy.random.seed', 'np.random.seed', (['(1977)'], {}), '(1977)\n', (295, 301), True, 'import numpy as np\n'), ((310, 335), 'numpy.random.random', 'np.random.random', (['(2, 26)'], {}), '((2, 26))\n', (326, 335), True, 'import numpy as np\n'), ((379, 393), 'matplotlib.pyplot.subplots', 'plt.subplots', ([... |
import numpy as np
# import matplotlib.pyplot as plt
from scipy.cluster.vq import kmeans
# def plothist(x):
# vmin = x.min()-1
# vmax = x.max()+1
# bins = np.arange(vmin, vmax, (vmax - vmin)/50)
# plt.hist(x, bins=bins)
# plt.show()
# def scatterpred(pred):
# plt.scatter(pred[:,0], pred[:,1])
... | [
"numpy.zeros",
"scipy.cluster.vq.kmeans"
] | [((564, 578), 'numpy.zeros', 'np.zeros', (['nb_c'], {}), '(nb_c)\n', (572, 578), True, 'import numpy as np\n'), ((840, 854), 'numpy.zeros', 'np.zeros', (['nb_c'], {}), '(nb_c)\n', (848, 854), True, 'import numpy as np\n'), ((866, 883), 'numpy.zeros', 'np.zeros', (['c.shape'], {}), '(c.shape)\n', (874, 883), True, 'impo... |
# Import required libraries
import cv2
from os.path import os, dirname
import tensorflow as tf
import numpy as np
from tqdm import tqdm
import random
# List of categories (directories names)
CATEGORIES = ["bad_apple", "bad_grape", "bad_pear", "cherry", "good_apple", "good_avocado", "good_grape", "good_pear", "ripe_avo... | [
"random.shuffle",
"os.path.os.listdir",
"numpy.array",
"tensorflow.keras.models.load_model",
"os.path.os.path.join",
"os.path.os.path.abspath"
] | [((618, 664), 'os.path.os.path.join', 'os.path.join', (['main_dir', '"""database"""', '"""training"""'], {}), "(main_dir, 'database', 'training')\n", (630, 664), False, 'from os.path import os, dirname\n'), ((679, 724), 'os.path.os.path.join', 'os.path.join', (['main_dir', '"""database"""', '"""testing"""'], {}), "(mai... |
"""Covers import of data downloaded from the
`Meadows online behavior platform <https://meadows-research.com/>`_.
For information on available file types see the meadows
`documentation on downloads <https://meadows-research.com/documentation\
/researcher/downloads/>`_.
"""
from os.path import basename
import numpy
fr... | [
"numpy.stack",
"scipy.io.loadmat",
"os.path.basename"
] | [((948, 962), 'scipy.io.loadmat', 'loadmat', (['fpath'], {}), '(fpath)\n', (955, 962), False, 'from scipy.io import loadmat\n'), ((1543, 1583), 'numpy.stack', 'numpy.stack', (['[data[v] for v in utv_vars]'], {}), '([data[v] for v in utv_vars])\n', (1554, 1583), False, 'import numpy\n'), ((3258, 3273), 'os.path.basename... |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# @File : Qrbar_test.py
import cv2
import numpy as np
from pyzbar.pyzbar import decode
img = cv2.imread('qrcode.png')
for barcode in decode(img):
print(barcode.data.decode('utf-8'))
print(barcode.data)
pts = np.array([barcode.polygon], np.int32)
pts = pts.... | [
"pyzbar.pyzbar.decode",
"numpy.array",
"cv2.imread"
] | [((141, 165), 'cv2.imread', 'cv2.imread', (['"""qrcode.png"""'], {}), "('qrcode.png')\n", (151, 165), False, 'import cv2\n'), ((181, 192), 'pyzbar.pyzbar.decode', 'decode', (['img'], {}), '(img)\n', (187, 192), False, 'from pyzbar.pyzbar import decode\n'), ((268, 305), 'numpy.array', 'np.array', (['[barcode.polygon]', ... |
# pommerman/cli/run_battle.py
# pommerman/agents/TensorFlowAgent/pit.py
import atexit
from datetime import datetime
import os
import random
import sys
import time
import argparse
import numpy as np
from pommerman import helpers, make
from TensorFlowAgent import TensorFlowAgent
from pommerman import utility
import ... | [
"tensorflow.reset_default_graph",
"argparse.ArgumentParser",
"tensorflow.Session",
"tensorflow.train.Saver",
"tensorflow.global_variables_initializer",
"numpy.array",
"TensorFlowAgent.TensorFlowAgent",
"numpy.zeros"
] | [((1290, 1314), 'tensorflow.reset_default_graph', 'tf.reset_default_graph', ([], {}), '()\n', (1312, 1314), True, 'import tensorflow as tf\n'), ((1580, 1605), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (1603, 1605), False, 'import argparse\n'), ((701, 717), 'numpy.zeros', 'np.zeros', (['(1,... |
import numpy as np
import tensorflow as tf
import unittest
from xcenternet.model.evaluation.overlap import compute_overlap
from xcenternet.model.evaluation.mean_average_precision import MAP
class TestMeanAveragePrecision(unittest.TestCase):
def setUp(self):
self.map_bboxes = np.array(
[
... | [
"numpy.array",
"tensorflow.constant",
"unittest.main",
"xcenternet.model.evaluation.overlap.compute_overlap",
"xcenternet.model.evaluation.mean_average_precision.MAP"
] | [((4629, 4644), 'unittest.main', 'unittest.main', ([], {}), '()\n', (4642, 4644), False, 'import unittest\n'), ((291, 435), 'numpy.array', 'np.array', (['[[[20, 10, 80, 60], [10, 40, 40, 90], [0, 0, 100, 100]], [[0, 0, 10, 10], [\n 20, 20, 40, 90], [80, 20, 100, 50]]]'], {'dtype': 'np.float64'}), '([[[20, 10, 80, 60... |
import os.path
from typing import Sequence, Optional, Dict
import numpy as np
import pandas as pd
from nk_sent2vec import Sent2Vec as _Sent2Vec
from d3m import container, utils
from d3m.primitive_interfaces.transformer import TransformerPrimitiveBase
from d3m.primitive_interfaces.base import CallResult
from d3m.contai... | [
"d3m.primitive_interfaces.base.CallResult",
"numpy.array",
"nk_sent2vec.Sent2Vec",
"d3m.container.DataFrame"
] | [((5704, 5730), 'd3m.container.DataFrame', 'd3m_DataFrame', (['embedded_df'], {}), '(embedded_df)\n', (5717, 5730), True, 'from d3m.container import DataFrame as d3m_DataFrame\n'), ((5034, 5080), 'nk_sent2vec.Sent2Vec', '_Sent2Vec', ([], {'path': "self.volumes['sent2vec_model']"}), "(path=self.volumes['sent2vec_model']... |
import torch
from torch.optim import lr_scheduler
from tqdm import tqdm
from torchsummary import summary
from torch.utils.tensorboard import SummaryWriter
from apex import amp
from loss import dice
from pathlib import Path
from data import CaseDataset, load_case, save_pred, \
orient_crop_case, regions_crop_case, re... | [
"apex.amp.scale_loss",
"torch.softmax",
"numpy.array",
"apex.amp.initialize",
"transform.crop_pad",
"torch.squeeze",
"transform.pad",
"numpy.arange",
"torch.isnan",
"torch.utils.tensorboard.SummaryWriter",
"apex.amp.load_state_dict",
"pathlib.Path",
"data.resample_normalize_case",
"numpy.t... | [((881, 903), 'transform.pad', 'pad', (['input', 'patch_size'], {}), '(input, patch_size)\n', (884, 903), False, 'from transform import pad, crop_pad, to_numpy, to_tensor, resize\n'), ((958, 998), 'numpy.array', 'np.array', (['[(i // 2) for i in patch_size]'], {}), '([(i // 2) for i in patch_size])\n', (966, 998), True... |
from contextlib import closing
import h5py
import numpy as np
def save_h5(outfile, dictionary):
""" Saves passed dictionary to an h5 file
Parameters
----------
outfile : string
Name of output h5 file
dictionary : dictionary
Dictionary that will be saved
"""
def save_layer(... | [
"numpy.asarray",
"h5py.File"
] | [((1659, 1687), 'h5py.File', 'h5py.File', (['feature_file', '"""r"""'], {}), "(feature_file, 'r')\n", (1668, 1687), False, 'import h5py\n'), ((622, 645), 'h5py.File', 'h5py.File', (['outfile', '"""w"""'], {}), "(outfile, 'w')\n", (631, 645), False, 'import h5py\n'), ((1830, 1848), 'numpy.asarray', 'np.asarray', (['f[ke... |
import numpy
from fdm.geometry import create_close_point_finder
def create_weights_distributor(close_point_finder):
def distribute(point, value):
close_points = close_point_finder(point)
distance_sum = sum(close_points.values())
return dict(
{p: (1. - distance/distance_sum)*va... | [
"fdm.geometry.create_close_point_finder",
"numpy.copy",
"numpy.zeros"
] | [((589, 607), 'numpy.copy', 'numpy.copy', (['matrix'], {}), '(matrix)\n', (599, 607), False, 'import numpy\n'), ((622, 640), 'numpy.copy', 'numpy.copy', (['vector'], {}), '(vector)\n', (632, 640), False, 'import numpy\n'), ((1565, 1585), 'numpy.copy', 'numpy.copy', (['matrix_a'], {}), '(matrix_a)\n', (1575, 1585), Fals... |
from timebox.timebox import TimeBox
from timebox.utils.exceptions import InvalidPandasIndexError
import pandas as pd
import numpy as np
import unittest
import os
import logging
class TestTimeBoxPandas(unittest.TestCase):
def test_save_pandas(self):
file_name = 'save_pandas.npb'
df = pd.read_csv('t... | [
"os.path.exists",
"pandas.read_csv",
"timebox.timebox.TimeBox.save_pandas",
"timebox.timebox.TimeBox",
"numpy.array",
"unittest.main",
"pandas.to_datetime",
"os.remove"
] | [((2124, 2139), 'unittest.main', 'unittest.main', ([], {}), '()\n', (2137, 2139), False, 'import unittest\n'), ((306, 377), 'pandas.read_csv', 'pd.read_csv', (['"""timebox/tests/data/ETH-USD_combined_utc.csv"""'], {'index_col': '(0)'}), "('timebox/tests/data/ETH-USD_combined_utc.csv', index_col=0)\n", (317, 377), True,... |
#!/usr/bin/env python3
"""
Build the demos
Usage: python setup.py build_ext -i
"""
import numpy as np
from distutils.core import setup
from Cython.Build import cythonize
from setuptools.extension import Extension
from os.path import join
extending = Extension("extending",
sources=['extending.py... | [
"Cython.Build.cythonize",
"os.path.join",
"numpy.get_include"
] | [((760, 781), 'Cython.Build.cythonize', 'cythonize', (['extensions'], {}), '(extensions)\n', (769, 781), False, 'from Cython.Build import cythonize\n'), ((361, 377), 'numpy.get_include', 'np.get_include', ([], {}), '()\n', (375, 377), True, 'import numpy as np\n'), ((534, 593), 'os.path.join', 'join', (['""".."""', '""... |
#!/usr/bin/env python3
import sys
def set_path(path: str):
try:
sys.path.index(path)
except ValueError:
sys.path.insert(0, path)
# set programatically the path to 'sim-environment' directory (alternately can also set PYTHONPATH)
set_path('/media/suresh/research/awesome-robotics/active-slam/cat... | [
"torch.manual_seed",
"sys.path.insert",
"pathlib.Path",
"random.seed",
"measurement.Measurement",
"sys.path.index",
"numpy.random.seed",
"torch.cuda.manual_seed",
"numpy.set_printoptions"
] | [((486, 523), 'numpy.random.seed', 'np.random.seed', (['constants.RANDOM_SEED'], {}), '(constants.RANDOM_SEED)\n', (500, 523), True, 'import numpy as np\n'), ((524, 558), 'random.seed', 'random.seed', (['constants.RANDOM_SEED'], {}), '(constants.RANDOM_SEED)\n', (535, 558), False, 'import random\n'), ((559, 604), 'torc... |
import argparse
import os
import json
from torch.utils.tensorboard import SummaryWriter
import random
import numpy as np
import zipfile
import torch
from transformers import AdamW, get_linear_schedule_with_warmup
from LAUG.nlu.jointBERT_new.dataloader import Dataloader
from LAUG.nlu.jointBERT_new.jointBERT im... | [
"torch.manual_seed",
"torch.utils.tensorboard.SummaryWriter",
"os.path.exists",
"LAUG.nlu.jointBERT_new.frames.postprocess.calculateF1",
"argparse.ArgumentParser",
"os.makedirs",
"zipfile.ZipFile",
"transformers.AdamW",
"transformers.get_linear_schedule_with_warmup",
"json.dumps",
"os.path.join"... | [((452, 505), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Train a model."""'}), "(description='Train a model.')\n", (475, 505), False, 'import argparse\n'), ((365, 382), 'random.seed', 'random.seed', (['seed'], {}), '(seed)\n', (376, 382), False, 'import random\n'), ((388, 408), 'nump... |
import pandas as pd
import numpy as np
import yaml
import os
import argparse
from sklearn.impute import KNNImputer
from logger import App_Logger
file_object=open("application_logging/Loggings.txt", 'a+')
logger_object=App_Logger()
def read_params(config_path):
with open(config_path) as yaml_file:
... | [
"argparse.ArgumentParser",
"pandas.read_csv",
"sklearn.impute.KNNImputer",
"yaml.safe_load",
"logger.App_Logger",
"numpy.round"
] | [((228, 240), 'logger.App_Logger', 'App_Logger', ([], {}), '()\n', (238, 240), False, 'from logger import App_Logger\n'), ((4068, 4093), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (4091, 4093), False, 'import argparse\n'), ((332, 357), 'yaml.safe_load', 'yaml.safe_load', (['yaml_file'], {})... |
import numpy as np
import csv as csv
from clean_data import clean_data
from join_columns import join_columns
from fix_decimals import add_int, cut_decimals
def preprocess_dataset():
preprocess_data('train', False)
preprocess_data('test', False)
preprocess_data('train', True)
preprocess_data('test', Tru... | [
"fix_decimals.cut_decimals",
"fix_decimals.add_int",
"numpy.array",
"numpy.savetxt",
"clean_data.clean_data",
"csv.reader",
"join_columns.join_columns"
] | [((586, 599), 'numpy.array', 'np.array', (['raw'], {}), '(raw)\n', (594, 599), True, 'import numpy as np\n'), ((610, 625), 'clean_data.clean_data', 'clean_data', (['raw'], {}), '(raw)\n', (620, 625), False, 'from clean_data import clean_data\n'), ((2508, 2523), 'fix_decimals.add_int', 'add_int', (['raw', '(0)'], {}), '... |
import numpy as np
from napari_plugin_engine import napari_hook_implementation
from napari_tools_menu import register_function
from napari_time_slicer import time_slicer, slice_by_slice
import napari
from napari.types import ImageData, LabelsData
@napari_hook_implementation
def napari_experimental_provide_function()... | [
"mahotas.label",
"mahotas.distance",
"numpy.ones",
"mahotas.close_holes",
"numpy.asarray",
"mahotas.cwatershed",
"scipy.ndimage.convolve",
"numpy.logical_xor",
"mahotas.gaussian_filter",
"mahotas.regmax",
"napari_tools_menu.register_function",
"mahotas.open",
"mahotas.sobel",
"mahotas.otsu... | [((574, 648), 'napari_tools_menu.register_function', 'register_function', ([], {'menu': '"""Filtering / noise removal > Gaussian (n-mahotas)"""'}), "(menu='Filtering / noise removal > Gaussian (n-mahotas)')\n", (591, 648), False, 'from napari_tools_menu import register_function\n'), ((1099, 1198), 'napari_tools_menu.re... |
from __future__ import print_function, division, absolute_import, unicode_literals
from numbers import Number
import numpy as np
from voluptuous import Schema, Required, Any, Range
from mitxgraders.comparers.baseclasses import CorrelatedComparer
from mitxgraders.helpers.calc.mathfuncs import is_nearly_zero
from mitxgra... | [
"numpy.mean",
"voluptuous.Required",
"mitxgraders.exceptions.ConfigError",
"numpy.all",
"numpy.square",
"numpy.array",
"numpy.vstack",
"numpy.linalg.lstsq",
"numpy.linalg.norm",
"mitxgraders.helpers.calc.mathfuncs.is_nearly_zero",
"voluptuous.Range"
] | [((1370, 1401), 'numpy.linalg.lstsq', 'np.linalg.lstsq', (['A', 'y'], {'rcond': '(-1)'}), '(A, y, rcond=-1)\n', (1385, 1401), True, 'import numpy as np\n'), ((2612, 2624), 'numpy.vstack', 'np.vstack', (['x'], {}), '(x)\n', (2621, 2624), True, 'import numpy as np\n'), ((2670, 2701), 'numpy.linalg.lstsq', 'np.linalg.lsts... |
# Copyright 2021 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, ... | [
"jax_cfd.data.xarray_utils.construct_coords",
"jax.numpy.asarray",
"numpy.empty",
"xarray.DataArray",
"xarray.open_dataset"
] | [((2013, 2061), 'numpy.empty', 'np.empty', (['(num_init, num_optspace)'], {'dtype': 'object'}), '((num_init, num_optspace), dtype=object)\n', (2021, 2061), True, 'import numpy as np\n'), ((2931, 2957), 'jax_cfd.data.xarray_utils.construct_coords', 'xru.construct_coords', (['grid'], {}), '(grid)\n', (2951, 2957), True, ... |
# -*- coding: utf-8 -*-
from numpy import log2
from pickle import load
"""
* Clase que se encarga de ver la información mutua que hay entre dos tokens
* sirve para determinar si es colocación o no
"""
class MI:
def __init__(self):
self.words = load(open("./models/words.d",'r'))
self.ngrams = load(open("./models... | [
"numpy.log2"
] | [((722, 737), 'numpy.log2', 'log2', (['(sup / inf)'], {}), '(sup / inf)\n', (726, 737), False, 'from numpy import log2\n')] |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
##
# @file predict_bw_lstm1.py
# @author <NAME> (<NAME> <<EMAIL>>
# @date 2019-04-22
# 2022-03-23 - updated for TensorFlow version 2.6
#
# @brief Predict channel bandwidth.
#
# @remarks This code is based on the nice sample code from:
# ht... | [
"tensorflow.keras.Sequential",
"tensorflow.keras.layers.LSTM",
"tensorflow.keras.layers.Dense",
"numpy.load",
"skimage.util.view_as_windows"
] | [((594, 619), 'numpy.load', 'np.load', (['"""bandwidths.npy"""'], {}), "('bandwidths.npy')\n", (601, 619), True, 'import numpy as np\n'), ((885, 906), 'tensorflow.keras.Sequential', 'tf.keras.Sequential', ([], {}), '()\n', (904, 906), True, 'import tensorflow as tf\n'), ((624, 655), 'skimage.util.view_as_windows', 'vie... |
# author: <NAME>, <NAME>
# title: occasionally trivial support functions for aggregating data for python 2/3 [only numpy as dependency]
# NOTE: these functions are generally tested meant for 1D although they may apply or be easily extended to nd
# license: 3-clause BSD
import numpy as np
flat_max = np.max
flat_min = ... | [
"numpy.abs",
"numpy.argpartition",
"numpy.asarray",
"numpy.argmax",
"numpy.argmin"
] | [((1057, 1073), 'numpy.asarray', 'np.asarray', (['data'], {}), '(data)\n', (1067, 1073), True, 'import numpy as np\n'), ((1089, 1101), 'numpy.abs', 'np.abs', (['data'], {}), '(data)\n', (1095, 1101), True, 'import numpy as np\n'), ((2024, 2040), 'numpy.asarray', 'np.asarray', (['data'], {}), '(data)\n', (2034, 2040), T... |
#!/usr/bin/env python
from __future__ import print_function
import roslib
roslib.load_manifest('begineer_tutorial')
import sys
import rospy
import cv2
import numpy as np
from std_msgs.msg import String
from sensor_msgs.msg import Image
from cv_bridge import CvBridge, CvBridgeError
class image_converter:
def __init_... | [
"rospy.init_node",
"cv2.inRange",
"cv2.bitwise_and",
"roslib.load_manifest",
"cv_bridge.CvBridge",
"numpy.array",
"cv2.imshow",
"cv2.destroyAllWindows",
"rospy.spin",
"cv2.cvtColor",
"rospy.Subscriber"
] | [((75, 116), 'roslib.load_manifest', 'roslib.load_manifest', (['"""begineer_tutorial"""'], {}), "('begineer_tutorial')\n", (95, 116), False, 'import roslib\n'), ((1035, 1085), 'rospy.init_node', 'rospy.init_node', (['"""image_converter"""'], {'anonymous': '(True)'}), "('image_converter', anonymous=True)\n", (1050, 1085... |
import numpy
import numbers
import math
import struct
from six.moves import zip
from .. import SetIntersectionIndexBase, SearchResults, EmptySearchResults
def _check_numpy ():
missing = []
for fn in ("zeros", "empty", "digitize", "resize", "concatenate", "unique", "bincount", "argsort"):
if not getatt... | [
"numpy.digitize",
"math.log",
"numpy.argsort",
"numpy.array",
"numpy.zeros",
"numpy.empty",
"numpy.concatenate",
"struct.Struct",
"numpy.bincount",
"six.moves.zip"
] | [((844, 875), 'numpy.empty', 'numpy.empty', (['(64)'], {'dtype': '"""object"""'}), "(64, dtype='object')\n", (855, 875), False, 'import numpy\n'), ((2111, 2141), 'numpy.digitize', 'numpy.digitize', (['[set_bits]', 'sz'], {}), '([set_bits], sz)\n', (2125, 2141), False, 'import numpy\n'), ((2239, 2272), 'numpy.digitize',... |
import numpy as np
from myutils import *
from easydict import EasyDict as edict
def dcg_at_k(r, k, method=1):
r = np.asfarray(r)[:k]
if r.size:
if method == 0:
return r[0] + np.sum(r[1:] / np.log2(np.arange(2, r.size + 1)))
elif method == 1:
return np.sum(r / np.log2(np.... | [
"numpy.asfarray",
"easydict.EasyDict",
"numpy.array",
"numpy.arange"
] | [((920, 927), 'easydict.EasyDict', 'edict', ([], {}), '()\n', (925, 927), True, 'from easydict import EasyDict as edict\n'), ((6127, 6200), 'easydict.EasyDict', 'edict', ([], {'avg_groups_ETV': 'avg_groups_ETV', 'groups_ETV_scores': 'groups_ETV_scores'}), '(avg_groups_ETV=avg_groups_ETV, groups_ETV_scores=groups_ETV_sc... |
import numpy as np
#Simulater Setting
#------------------------------
MINUTES=60000000000
TIMESTEP = np.timedelta64(10*MINUTES)
PICKUPTIMEWINDOW = np.timedelta64(10*MINUTES)
#It can enable the neighbor car search system to determine the search range according to the set search distance and the size of the grid.
#It u... | [
"numpy.timedelta64"
] | [((102, 130), 'numpy.timedelta64', 'np.timedelta64', (['(10 * MINUTES)'], {}), '(10 * MINUTES)\n', (116, 130), True, 'import numpy as np\n'), ((148, 176), 'numpy.timedelta64', 'np.timedelta64', (['(10 * MINUTES)'], {}), '(10 * MINUTES)\n', (162, 176), True, 'import numpy as np\n')] |
import subprocess
from hop import Stream
from hop.auth import Auth
from hop import auth
from hop.io import StartPosition
from hop.models import GCNCircular
import argparse
import random
import threading
import time
from functools import wraps
import datetime
import numpy
import uuid
from dotenv import load_dotenv
impor... | [
"os.getenv",
"datetime.datetime.utcnow",
"subprocess.Popen",
"time.monotonic",
"threading.Lock",
"numpy.random.exponential",
"functools.wraps",
"dotenv.load_dotenv",
"hop.Stream",
"uuid.uuid4",
"threading.Thread",
"time.time",
"random.randint"
] | [((774, 810), 'dotenv.load_dotenv', 'load_dotenv', ([], {'dotenv_path': '"""./../.env"""'}), "(dotenv_path='./../.env')\n", (785, 810), False, 'from dotenv import load_dotenv\n'), ((981, 990), 'functools.wraps', 'wraps', (['fn'], {}), '(fn)\n', (986, 990), False, 'from functools import wraps\n'), ((1905, 1935), 'numpy.... |
from ConfigSpace import ConfigurationSpace, CategoricalHyperparameter
import time
import warnings
import os
import numpy as np
import pickle as pkl
from sklearn.metrics.scorer import balanced_accuracy_scorer
from solnml.utils.logging_utils import get_logger
from solnml.components.evaluators.base_evaluator import _Base... | [
"solnml.components.feature_engineering.task_space.get_task_hyperparameter_space",
"os.path.exists",
"solnml.components.feature_engineering.parse.parse_config",
"numpy.mean",
"pickle.dump",
"warnings.catch_warnings",
"pickle.load",
"sklearn.model_selection.ShuffleSplit",
"solnml.components.utils.clas... | [((1220, 1266), 'solnml.components.utils.class_loader.get_combined_candidtates', 'get_combined_candidtates', (['_regressors', '_addons'], {}), '(_regressors, _addons)\n', (1244, 1266), False, 'from solnml.components.utils.class_loader import get_combined_candidtates\n'), ((1511, 1557), 'solnml.components.utils.class_lo... |
#!/usr/bin/env python3
import argparse
import gc
import numpy as np
import os
import pandas as pd
import pysam
# Number of SVs to process before resetting pysam (close and re-open file). Avoids a memory leak in pysam.
PYSAM_RESET_INTERVAL = 1000
def get_read_depth(df_subset, bam_file_name, mapq, ref_filename=None)... | [
"numpy.mean",
"argparse.ArgumentParser",
"pysam.AlignmentFile",
"os.path.isfile",
"numpy.zeros",
"pandas.read_table",
"numpy.std",
"gc.collect"
] | [((899, 971), 'pysam.AlignmentFile', 'pysam.AlignmentFile', (['bam_file_name', '"""r"""'], {'reference_filename': 'ref_filename'}), "(bam_file_name, 'r', reference_filename=ref_filename)\n", (918, 971), False, 'import pysam\n'), ((1255, 1295), 'numpy.zeros', 'np.zeros', (['df_subset.shape[0]', 'np.float64'], {}), '(df_... |
import pandas as pd
import numpy as np
function2idx = {"negative": 0, "ferritin": 1, "gpcr": 2, "p450": 3, "protease": 4}
input_dir = '../data/raw/'
data_dir = '../data/processed/'
max_seq_len = 800
def read_and_concat_data():
df_cysteine = pd.read_csv(input_dir + 'uniprot-cysteine+protease+AND+reviewed_yes.tab... | [
"pandas.DataFrame",
"pandas.concat",
"numpy.savetxt",
"pandas.read_csv"
] | [((3531, 3598), 'numpy.savetxt', 'np.savetxt', (["(data_dir + 'sequence.txt')", 'df.sequence.values'], {'fmt': '"""%s"""'}), "(data_dir + 'sequence.txt', df.sequence.values, fmt='%s')\n", (3541, 3598), True, 'import numpy as np\n'), ((3599, 3666), 'numpy.savetxt', 'np.savetxt', (["(data_dir + 'function.txt')", 'df.func... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Apr 13 11:03:51 2019
@author: ivanpauno
"""
import matplotlib.pyplot as plt
import numpy as np
def main():
# A = sqrt(10^(.1*alpha_min-1)/10^(.1*alpha_max-1))
A = np.logspace(np.log10(2), np.log10(100), num=200)
ws_array = [1.1, 1.5, 2, 3... | [
"numpy.ceil",
"numpy.log10",
"numpy.log",
"numpy.arccosh",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.show"
] | [((526, 543), 'numpy.ceil', 'np.ceil', (['n_butter'], {}), '(n_butter)\n', (533, 543), True, 'import numpy as np\n'), ((558, 574), 'numpy.ceil', 'np.ceil', (['n_cheby'], {}), '(n_cheby)\n', (565, 574), True, 'import numpy as np\n'), ((973, 983), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (981, 983), True, ... |
import numpy as np
def eval_rerr(X, X_hat, X0=None):
"""
:param X: tensor, X0 or X0+noise
:param X_hat: output for apporoximation
:param X0: true signal, tensor
:return: the relative error = ||X- X_hat||_F/ ||X_0||_F
"""
if X0 is not None:
error = X0 - X_hat
return np.linalg.... | [
"numpy.size"
] | [((493, 507), 'numpy.size', 'np.size', (['error'], {}), '(error)\n', (500, 507), True, 'import numpy as np\n'), ((561, 571), 'numpy.size', 'np.size', (['X'], {}), '(X)\n', (568, 571), True, 'import numpy as np\n'), ((339, 353), 'numpy.size', 'np.size', (['error'], {}), '(error)\n', (346, 353), True, 'import numpy as np... |
# Author: <NAME>, <NAME>, <NAME>
# Date: 2020/11/27
"""Compare the performance of different classifier and train the best model given cross_validate results .
Usage: src/clf_comparison.py <input_file> <input_file1> <output_file> <output_file1>
Options:
<input_file> Path (including filename and file extension) to ... | [
"sklearn.model_selection.GridSearchCV",
"sklearn.svm.SVC",
"sklearn.metrics.f1_score",
"pandas.read_csv",
"pandas.DataFrame",
"sklearn.model_selection.cross_validate",
"sklearn.neighbors.KNeighborsClassifier",
"sklearn.metrics.make_scorer",
"sklearn.ensemble.RandomForestClassifier",
"sklearn.linea... | [((1218, 1233), 'docopt.docopt', 'docopt', (['__doc__'], {}), '(__doc__)\n', (1224, 1233), False, 'from docopt import docopt\n'), ((1179, 1210), 'warnings.simplefilter', 'warnings.simplefilter', (['"""ignore"""'], {}), "('ignore')\n", (1200, 1210), False, 'import warnings\n'), ((1341, 1364), 'pandas.read_csv', 'pd.read... |
import glob
import os
import numpy as np
import nibabel as nb
import argparse
def get_dir_list(train_path):
fnames = glob.glob(train_path)
list_train = []
for k, f in enumerate(fnames):
list_train.append(os.path.split(f)[0])
return list_train
def ParseData(list_data):
'''
Creates a... | [
"argparse.ArgumentParser",
"nibabel.load",
"os.path.join",
"os.path.split",
"numpy.sum",
"numpy.concatenate",
"numpy.expand_dims",
"numpy.save",
"glob.glob"
] | [((2640, 2665), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (2663, 2665), False, 'import argparse\n'), ((122, 143), 'glob.glob', 'glob.glob', (['train_path'], {}), '(train_path)\n', (131, 143), False, 'import glob\n'), ((1359, 1376), 'nibabel.load', 'nb.load', (['fname[0]'], {}), '(fname[0])... |
from anndata import AnnData
import numpy as np
import pandas as pd
from scipy.sparse import csr_matrix
from joblib import delayed
from tqdm import tqdm
import sys
import igraph
from .utils import ProgressParallel
from .. import logging as logg
from .. import settings
def pseudotime(adata: AnnData, n_jobs: int = 1, ... | [
"pandas.Series",
"numpy.sqrt",
"numpy.apply_along_axis",
"numpy.argwhere",
"joblib.delayed",
"pandas.concat"
] | [((3533, 3565), 'pandas.Series', 'pd.Series', ([], {'index': 'adata.obs_names'}), '(index=adata.obs_names)\n', (3542, 3565), True, 'import pandas as pd\n'), ((7500, 7513), 'pandas.concat', 'pd.concat', (['df'], {}), '(df)\n', (7509, 7513), True, 'import pandas as pd\n'), ((2709, 2751), 'pandas.concat', 'pd.concat', (['... |
# -*- coding: utf-8 -*-
"""
Independent model based on Geodesic Regression model R_G
"""
import torch
from torch import nn, optim
from torch.autograd import Variable
from torch.utils.data import DataLoader
import torch.nn.functional as F
from dataGenerators import ImagesAll, TestImages, my_collate
from axisAngle impo... | [
"poseModels.model_3layer",
"scipy.io.savemat",
"torch.nn.CrossEntropyLoss",
"torch.nn.MSELoss",
"progressbar.ProgressBar",
"tensorboardX.SummaryWriter",
"argparse.ArgumentParser",
"axisAngle.geodesic_loss",
"numpy.stack",
"numpy.concatenate",
"featureModels.resnet_model",
"torch.nn.functional.... | [((620, 681), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Pure Regression Models"""'}), "(description='Pure Regression Models')\n", (643, 681), False, 'import argparse\n'), ((1552, 1590), 'os.path.join', 'os.path.join', (['"""results"""', 'args.save_str'], {}), "('results', args.save_... |
# from sklearn.cluster._kmeans import *
import copy
from typing import Union
import torch
import torch.nn as nn
from sklearn.cluster._robustq import *
from .quantizer import Quantizer
__all__ = ['MiniBatchRobustqTorch', 'RobustqTorch']
class ClusterQuantizerBase(Quantizer):
def __init__(self, n_feature=1, n_cl... | [
"utee.misc.time_measurement",
"module.quantization.quant_functions.linear_quantize",
"module.quantization.quant_functions.compute_integral_part",
"torch.as_tensor",
"numpy.unique",
"torch.set_printoptions",
"torch.device",
"sklearn.show_versions",
"torch.from_numpy",
"torch.tensor",
"torch.cuda.... | [((11625, 11684), 'numpy.set_printoptions', 'np.set_printoptions', ([], {'formatter': "{'float': '{: 0.3f}'.format}"}), "(formatter={'float': '{: 0.3f}'.format})\n", (11644, 11684), True, 'import numpy as np\n'), ((11689, 11714), 'torch.set_printoptions', 'torch.set_printoptions', (['(3)'], {}), '(3)\n', (11711, 11714)... |
# -*- coding: utf-8 -*-
import torch
import argparse
import numpy as np
from model import PointCloudNet
from code.utils import fp_sampling, knn_patch, helper_function
import os
parser = argparse.ArgumentParser()
parser.add_argument('--num_points', default=1024, type=int,
help='Number of points ... | [
"os.path.exists",
"argparse.ArgumentParser",
"torch.mean",
"torch.unsqueeze",
"model.PointCloudNet",
"code.utils.helper_function.get_best_epoch",
"torch.cuda.is_available",
"torch.sum",
"os.mkdir",
"torch.squeeze",
"numpy.loadtxt",
"torch.cat"
] | [((190, 215), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (213, 215), False, 'import argparse\n'), ((1444, 1495), 'torch.mean', 'torch.mean', (['patches[:, :, 0:3]'], {'dim': '(1)', 'keepdim': '(True)'}), '(patches[:, :, 0:3], dim=1, keepdim=True)\n', (1454, 1495), False, 'import torch\n'), ... |
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
from PIL import Image
import pandas as pd
from sklearn.decomposition import PCA
from scipy.spatial.distance import pdist, squareform
from scipy.sparse.linalg import eigs
from numpy import linalg as LA
from mpl_toolkits.mplot3d import Ax... | [
"matplotlib.pyplot.ylabel",
"sklearn.decomposition.PCA",
"matplotlib.pyplot.xlabel",
"matplotlib.image.imread",
"numpy.zeros",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.show"
] | [((419, 457), 'numpy.zeros', 'np.zeros', ([], {'shape': '(numImages, 490 * 490)'}), '(shape=(numImages, 490 * 490))\n', (427, 457), True, 'import numpy as np\n'), ((727, 758), 'sklearn.decomposition.PCA', 'PCA', ([], {'n_components': 'numComponents'}), '(n_components=numComponents)\n', (730, 758), False, 'from sklearn.... |
import torch
import torch.nn.functional as F
from torch import nn
from util.misc import (NestedTensor, nested_tensor_from_tensor_list,
accuracy, get_world_size, interpolate,
is_dist_avail_and_initialized)
from .backbone import build_backbone
from .matcher import build_mat... | [
"torch.nn.ReLU",
"torch.full_like",
"numpy.array",
"torch.cuda.is_available",
"numpy.arange",
"torch.nn.Sigmoid",
"util.misc.get_world_size",
"numpy.meshgrid",
"torch.nn.functional.mse_loss",
"util.misc.is_dist_avail_and_initialized",
"torch.distributed.all_reduce",
"torch.nn.Upsample",
"tor... | [((3171, 3200), 'numpy.meshgrid', 'np.meshgrid', (['shift_x', 'shift_y'], {}), '(shift_x, shift_y)\n', (3182, 3200), True, 'import numpy as np\n'), ((3541, 3570), 'numpy.meshgrid', 'np.meshgrid', (['shift_x', 'shift_y'], {}), '(shift_x, shift_y)\n', (3552, 3570), True, 'import numpy as np\n'), ((596, 662), 'torch.nn.Co... |
from keras.models import load_model
import numpy as np
import pandas as pd
from keras.preprocessing.image import ImageDataGenerator
from sklearn.cluster import KMeans
from time import time
# Takes a pandas dataframe containing the cluster assignment and ground truth for each data point
# and returns the purity of the ... | [
"sklearn.cluster.KMeans",
"keras.models.load_model",
"keras.preprocessing.image.ImageDataGenerator",
"numpy.array",
"pandas.DataFrame",
"numpy.log2",
"time.time"
] | [((1556, 1730), 'pandas.DataFrame', 'pd.DataFrame', (["{'cluster': clusters, 'cluster_size': cluster_sizes, 'most_common_class':\n most_common_classes, 'purity': cluster_purities, 'total_purity':\n total_purity}"], {}), "({'cluster': clusters, 'cluster_size': cluster_sizes,\n 'most_common_class': most_common_c... |
# Exercícios Numpy-27
# *******************
import numpy as np
Z=np.arange((10),dtype=int)
print(Z**Z)
print(Z)
print(2<<Z>>2)
print()
print(Z <- Z)
print()
print(1j*Z)
print()
print(Z/1/1)
print()
#print(Z<Z>Z) | [
"numpy.arange"
] | [((66, 90), 'numpy.arange', 'np.arange', (['(10)'], {'dtype': 'int'}), '(10, dtype=int)\n', (75, 90), True, 'import numpy as np\n')] |
# -*- coding: utf-8 -*-
# @Time : 2019-08-02 18:31
# @Author : <NAME>
# @Email : <EMAIL>
import os
import cv2
import glob
import shutil
from multiprocessing import Pool
from concurrent.futures import ProcessPoolExecutor
from functools import partial
from tqdm import tqdm
import numpy as np
import subprocess
de... | [
"cv2.VideoWriter",
"numpy.zeros",
"functools.partial",
"multiprocessing.Pool",
"numpy.concatenate",
"cv2.VideoWriter_fourcc",
"os.cpu_count",
"os.system",
"cv2.resize",
"concurrent.futures.ProcessPoolExecutor",
"cv2.imread",
"shutil.copy"
] | [((574, 602), 'cv2.imread', 'cv2.imread', (['img_path_list[0]'], {}), '(img_path_list[0])\n', (584, 602), False, 'import cv2\n'), ((719, 750), 'cv2.VideoWriter_fourcc', 'cv2.VideoWriter_fourcc', (["*'XVID'"], {}), "(*'XVID')\n", (741, 750), False, 'import cv2\n'), ((770, 826), 'cv2.VideoWriter', 'cv2.VideoWriter', (['t... |
#!/usr/bin/env python
# Standard imports
import pandas as pd
import numpy as np
# Pytorch
import torch
from torch import nn
# Using sklearn's LASSO implementation
from sklearn.linear_model import Lasso
# Local Files
from models.model_interface import CryptoModel
class LASSO(CryptoModel):
"""Wrapper around the ... | [
"numpy.vstack",
"sklearn.linear_model.Lasso",
"numpy.isin"
] | [((658, 719), 'sklearn.linear_model.Lasso', 'Lasso', ([], {'alpha': 'alpha', 'fit_intercept': '(True)', 'warm_start': 'warm_start'}), '(alpha=alpha, fit_intercept=True, warm_start=warm_start)\n', (663, 719), False, 'from sklearn.linear_model import Lasso\n'), ((1555, 1567), 'numpy.vstack', 'np.vstack', (['X'], {}), '(X... |
# importing libraries
import numpy as np
import pandas as pd
import random
import torch
def set_seeds(seed=1234):
"""[Set seeds for reproducibility.]
Keyword Arguments:
seed {int} -- [The seed value] (default: {1234})
"""
np.random.seed(seed)
random.seed(seed)
torch.manual_seed(seed)
... | [
"torch.manual_seed",
"random.seed",
"torch.cuda.is_available",
"numpy.random.seed",
"torch.cuda.manual_seed"
] | [((247, 267), 'numpy.random.seed', 'np.random.seed', (['seed'], {}), '(seed)\n', (261, 267), True, 'import numpy as np\n'), ((272, 289), 'random.seed', 'random.seed', (['seed'], {}), '(seed)\n', (283, 289), False, 'import random\n'), ((294, 317), 'torch.manual_seed', 'torch.manual_seed', (['seed'], {}), '(seed)\n', (31... |
# Copyright 1999-2021 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | [
"sklearn.decomposition.PCA",
"numpy.testing.assert_allclose",
"sklearn.linear_model.LogisticRegression",
"pytest.raises",
"sklearn.ensemble.GradientBoostingClassifier",
"sklearn.linear_model.LinearRegression",
"sklearn.datasets.make_classification"
] | [((974, 1009), 'sklearn.datasets.make_classification', 'make_classification', ([], {'n_samples': '(1000)'}), '(n_samples=1000)\n', (993, 1009), False, 'from sklearn.datasets import make_classification\n'), ((1651, 1686), 'sklearn.datasets.make_classification', 'make_classification', ([], {'n_samples': '(1000)'}), '(n_s... |
from typing import List, Union
import numpy as np
from .Figure import Figure
def create_position_pdf_plot(*, start_time_sec: np.float32, sampling_frequency: np.float32, pdf: np.ndarray, label: str):
# Nt = pdf.shape[0]
# Np = pdf.shape[1]
A = pdf
B = A / np.reshape(np.repeat(np.max(A, axis=1), A.shape... | [
"numpy.max"
] | [((294, 311), 'numpy.max', 'np.max', (['A'], {'axis': '(1)'}), '(A, axis=1)\n', (300, 311), True, 'import numpy as np\n')] |
# -*- coding: utf-8 -*-
"""
Summarise Sound Scattering Layers (SSLs)
@author: <NAME>
"""
## import packages
import matplotlib.pyplot as plt
import gzip
import pickle
import numpy as np
from pyechoplot.plotting import plot_pseudo_SSL, save_png_plot, plot_Sv
## import pyechometrics modules
from pyechometrics.metrics i... | [
"matplotlib.pyplot.ylabel",
"gzip.open",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.plot",
"pyechometrics.metrics.stats",
"pickle.load",
"pyechometrics.metrics.nasc",
"pyechometrics.metrics.dims",
"pyechoplot.plotting.plot_Sv",
"matplotlib.pyplot.figure",
"numpy.zeros",
"pyechoplot.plottin... | [((703, 716), 'matplotlib.pyplot.figure', 'plt.figure', (['(1)'], {}), '(1)\n', (713, 716), True, 'import matplotlib.pyplot as plt\n'), ((717, 733), 'matplotlib.pyplot.subplot', 'plt.subplot', (['(211)'], {}), '(211)\n', (728, 733), True, 'import matplotlib.pyplot as plt\n'), ((734, 747), 'pyechoplot.plotting.plot_Sv',... |
import os
from tqdm import tqdm
from joblib import Parallel, delayed
try:
import seaborn as sns
except:
pass
import numpy as np
import cv2
from lost_ds.util import get_fs
from lost_ds.geometry.lost_geom import LOSTGeometries
from lost_ds.functional.api import remove_empty
def get_fontscale(fontscale, thic... | [
"seaborn.color_palette",
"numpy.where",
"tqdm.tqdm",
"lost_ds.util.get_fs",
"joblib.Parallel",
"numpy.zeros",
"numpy.array",
"lost_ds.geometry.lost_geom.LOSTGeometries",
"os.path.basename",
"joblib.delayed",
"lost_ds.functional.api.remove_empty"
] | [((1871, 1900), 'lost_ds.functional.api.remove_empty', 'remove_empty', (['df', '"""anno_data"""'], {}), "(df, 'anno_data')\n", (1883, 1900), False, 'from lost_ds.functional.api import remove_empty\n'), ((3667, 3685), 'lost_ds.util.get_fs', 'get_fs', (['filesystem'], {}), '(filesystem)\n', (3673, 3685), False, 'from los... |
import glob
import numpy as np
import os
import pandas as pd
import yaml
from dask_image.imread import imread
from dlclabel import misc
from itertools import groupby
from napari.layers import Shapes
from napari.plugins._builtins import napari_write_shapes
from napari.types import LayerData
from skimage.io import imsave... | [
"pandas.MultiIndex.from_frame",
"dlclabel.misc.DLCHeader",
"os.fspath",
"os.listdir",
"skimage.util.img_as_ubyte",
"os.path.split",
"numpy.issubdtype",
"napari.layers.Shapes",
"os.path.isdir",
"numpy.empty",
"pandas.DataFrame",
"pandas.read_hdf",
"glob.glob",
"os.path.splitext",
"os.path... | [((3236, 3270), 'dlclabel.misc.DLCHeader.from_config', 'misc.DLCHeader.from_config', (['config'], {}), '(config)\n', (3262, 3270), False, 'from dlclabel import misc\n'), ((4235, 4254), 'glob.glob', 'glob.glob', (['filename'], {}), '(filename)\n', (4244, 4254), False, 'import glob\n'), ((5697, 5747), 'pandas.DataFrame',... |
#!/usr/bin/python3
import json
import pprint
import sys
import os
import numpy as np
import traceback
import random
import argparse
import json
import tensorflow
import keras
from keras import optimizers
from keras.models import Sequential
from keras.models import load_model
from keras.layers import Conv2D, MaxPooling... | [
"keras.preprocessing.image.img_to_array",
"keras.layers.Conv2D",
"keras.callbacks.History",
"keras.layers.Activation",
"sys.exit",
"keras.layers.Dense",
"tensorflow.set_random_seed",
"keras.optimizers.Adadelta",
"os.path.exists",
"os.listdir",
"argparse.ArgumentParser",
"json.dumps",
"numpy.... | [((609, 627), 'numpy.random.seed', 'np.random.seed', (['(44)'], {}), '(44)\n', (623, 627), True, 'import numpy as np\n'), ((628, 643), 'random.seed', 'random.seed', (['(22)'], {}), '(22)\n', (639, 643), False, 'import random\n'), ((644, 674), 'tensorflow.set_random_seed', 'tensorflow.set_random_seed', (['(11)'], {}), '... |
from __future__ import print_function
try:
import h5py
WITH_H5PY = True
except ImportError:
WITH_H5PY = False
try:
import zarr
WITH_ZARR = True
from .io import IoZarr
except ImportError:
WITH_ZARR = False
try:
import z5py
WITH_Z5PY = True
from .io import IoN5
except ImportError:
... | [
"toolz.pipe",
"re.compile",
"numpy.array",
"numpy.arange",
"os.path.exists",
"os.listdir",
"z5py.File",
"os.mkdir",
"json.loads",
"dask.delayed",
"random.shuffle",
"dask.compute",
"os.path.splitext",
"h5py.File",
"zarr.open",
"concurrent.futures.ThreadPoolExecutor",
"os.path.join",
... | [((592, 631), 'numpy.arange', 'np.arange', (['(0)', 'shape[0]', 'output_shape[0]'], {}), '(0, shape[0], output_shape[0])\n', (601, 631), True, 'import numpy as np\n'), ((968, 1007), 'numpy.arange', 'np.arange', (['(0)', 'shape[0]', 'output_shape[0]'], {}), '(0, shape[0], output_shape[0])\n', (977, 1007), True, 'import ... |
import random
import os
import logging
import pickle
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.backends.cudnn as cudnn
# import faiss
################################################################################
# General-... | [
"logging.getLogger",
"logging.StreamHandler",
"numpy.nanmean",
"logging.FileHandler",
"numpy.random.seed",
"numpy.bincount",
"torch.cuda.manual_seed_all",
"torch.manual_seed",
"pickle.dump",
"logging.Formatter",
"torch.stack",
"os.path.join",
"torch.nn.DataParallel",
"random.seed",
"nump... | [((539, 558), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (556, 558), False, 'import logging\n'), ((637, 666), 'logging.FileHandler', 'logging.FileHandler', (['log_path'], {}), '(log_path)\n', (656, 666), False, 'import logging\n'), ((841, 864), 'logging.StreamHandler', 'logging.StreamHandler', ([], {})... |
# Copyright 2016, 2017 California Institute of Technology
# Users must agree to abide by the restrictions listed in the
# file "LegalStuff.txt" in the PROPER library directory.
#
# PROPER developed at Jet Propulsion Laboratory/California Inst. Technology
# Original IDL version by <NAME>
# Python translation... | [
"numpy.sqrt",
"math.cos",
"numpy.array",
"proper.prop_cubic_conv",
"proper.prop_get_sampling",
"numpy.arange",
"proper.prop_get_beamradius",
"proper.prop_get_gridsize",
"scipy.signal.fftconvolve",
"numpy.dot",
"numpy.vstack",
"numpy.meshgrid",
"numpy.tile",
"numpy.ones",
"proper.prop_fit... | [((592, 624), 'os.path.dirname', 'os.path.dirname', (['proper.__file__'], {}), '(proper.__file__)\n', (607, 624), False, 'import os\n'), ((4461, 4489), 'proper.prop_get_gridsize', 'proper.prop_get_gridsize', (['wf'], {}), '(wf)\n', (4485, 4489), False, 'import proper\n'), ((4504, 4532), 'proper.prop_get_sampling', 'pro... |
# Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | [
"numpy.array",
"numpy.random.randint",
"numpy.random.randn",
"numpy.zeros"
] | [((866, 892), 'numpy.random.randn', 'np.random.randn', (['*img_size'], {}), '(*img_size)\n', (881, 892), True, 'import numpy as np\n'), ((910, 943), 'numpy.random.randint', 'np.random.randint', (['(0)', 'num_classes'], {}), '(0, num_classes)\n', (927, 943), True, 'import numpy as np\n'), ((1053, 1083), 'numpy.zeros', '... |
# Copyright (c) 2017, IGLU consortium
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# - Redistributions of source code must retain the above copyright notice,
# this list of conditions and... | [
"logging.basicConfig",
"multiprocessing.Process",
"panda3d.core.LVector3f",
"numpy.min",
"time.sleep",
"numpy.max",
"os.path.realpath",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.close",
"home_platform.env.BasicEnvironment",
"unittest.main",
"matplotlib.pyplo... | [((4506, 4545), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.WARN'}), '(level=logging.WARN)\n', (4525, 4545), False, 'import logging\n'), ((4550, 4572), 'numpy.seterr', 'np.seterr', ([], {'all': '"""raise"""'}), "(all='raise')\n", (4559, 4572), True, 'import numpy as np\n'), ((4577, 4592), 'uni... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Generate dummy data for tests/examples
"""
import numpy as np
def dummy_gauss_image(x=None, y=None,
xhalfrng=1.5, yhalfrng=None, xcen=0.5, ycen=0.9,
xnpts=1024, ynpts=None, xsigma=0.55, ysigma=0.25,
nois... | [
"numpy.random.random",
"numpy.exp",
"silx.sx.enable_gui",
"numpy.linspace",
"numpy.meshgrid",
"sloth.gui.plot.plot1D.Plot1D",
"sloth.gui.plot.plot2D.Plot2D"
] | [((1478, 1495), 'numpy.meshgrid', 'np.meshgrid', (['x', 'y'], {}), '(x, y)\n', (1489, 1495), True, 'import numpy as np\n'), ((1509, 1600), 'numpy.exp', 'np.exp', (['(-((xx - xcen) ** 2 / (2 * xsigma ** 2) + (yy - ycen) ** 2 / (2 * ysigma ** 2))\n )'], {}), '(-((xx - xcen) ** 2 / (2 * xsigma ** 2) + (yy - ycen) ** 2 ... |
import numpy as np
from numpy.random import RandomState
from numpy.testing import assert_allclose
from nnlib.l_layer.backward import linear_backward, linear_backward_activation, model_backward
from nnlib.utils.derivative import sigmoid_backward, relu_backward
from nnlib.utils.activation import sigmoid, relu
def test... | [
"nnlib.utils.activation.sigmoid",
"nnlib.l_layer.backward.linear_backward",
"nnlib.utils.activation.relu",
"numpy.testing.assert_allclose",
"numpy.array",
"nnlib.l_layer.backward.model_backward",
"numpy.random.RandomState"
] | [((351, 365), 'numpy.random.RandomState', 'RandomState', (['(1)'], {}), '(1)\n', (362, 365), False, 'from numpy.random import RandomState\n'), ((465, 517), 'nnlib.l_layer.backward.linear_backward', 'linear_backward', (['dZ', '(A, 1, W)'], {'alpha': '(0)', 'keep_prob': '(1)'}), '(dZ, (A, 1, W), alpha=0, keep_prob=1)\n',... |
from typing import Mapping, Any, Sequence
import numpy as np
import heapq
import math
from tqdm import tqdm
import scipy.optimize
import cvxpy as cvx
def n_bias(x_count: np.ndarray, bias: float):
# return np.sum(x_count[x_count >= bias])
clipped = np.clip(x_count - bias, a_min=0, a_max=None)
return n... | [
"numpy.clip",
"cvxpy.Variable",
"cvxpy.Problem",
"cvxpy.pos",
"cvxpy.sum",
"numpy.sum",
"numpy.zeros",
"numpy.array",
"heapq.heappop",
"numpy.argmin",
"numpy.round"
] | [((263, 307), 'numpy.clip', 'np.clip', (['(x_count - bias)'], {'a_min': '(0)', 'a_max': 'None'}), '(x_count - bias, a_min=0, a_max=None)\n', (270, 307), True, 'import numpy as np\n'), ((319, 334), 'numpy.sum', 'np.sum', (['clipped'], {}), '(clipped)\n', (325, 334), True, 'import numpy as np\n'), ((565, 580), 'cvxpy.Var... |
import glob
import matplotlib.pyplot as plt
import numpy as np
import sys
plt.ion()
data_files = list(glob.glob(sys.argv[1]+'/mnist_net_*_train.log'))
valid_data_files = list(glob.glob(sys.argv[1]+'/mnist_net_*_valid.log'))
for fname in data_files:
data = np.loadtxt(fname).reshape(-1, 3)
name = fname.split('/')[... | [
"matplotlib.pyplot.legend",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.ion",
"numpy.loadtxt",
"glob.glob"
] | [((75, 84), 'matplotlib.pyplot.ion', 'plt.ion', ([], {}), '()\n', (82, 84), True, 'import matplotlib.pyplot as plt\n'), ((527, 544), 'matplotlib.pyplot.legend', 'plt.legend', ([], {'loc': '(1)'}), '(loc=1)\n', (537, 544), True, 'import matplotlib.pyplot as plt\n'), ((104, 153), 'glob.glob', 'glob.glob', (["(sys.argv[1]... |
import argparse
import glob
import os
import random
import re
from dataclasses import dataclass
from functools import partial
from math import ceil
from typing import List, Optional
import numpy as np
import torch
from torch.optim.lr_scheduler import ReduceLROnPlateau
from tqdm import tqdm
import util
tqdm.monitor_i... | [
"torch.cuda.manual_seed_all",
"torch.manual_seed",
"util.maybe_mkdir",
"math.ceil",
"torch.optim.lr_scheduler.ReduceLROnPlateau",
"argparse.ArgumentParser",
"util.get_logger",
"torch.load",
"random.seed",
"os.path.isfile",
"torch.cuda.is_available",
"functools.partial",
"numpy.random.seed",
... | [((340, 382), 'functools.partial', 'partial', (['tqdm'], {'bar_format': '"""{l_bar}{r_bar}"""'}), "(tqdm, bar_format='{l_bar}{r_bar}')\n", (347, 382), False, 'from functools import partial\n'), ((682, 699), 'random.seed', 'random.seed', (['seed'], {}), '(seed)\n', (693, 699), False, 'import random\n'), ((704, 724), 'nu... |
import cv2
import argparse
import numpy as np
def gray2bgr565(input_file, output_file):
img = np.fromfile(input_file, dtype=np.uint16)
img = img.reshape(480, 640)
# img = cv2.imread(input_file, cv2.IMREAD_ANYDEPTH)
ratio = np.amax(img) / 256
img8 = (img / ratio).astype('uint8')
img8 = cv2.cvtCo... | [
"cv2.imwrite",
"numpy.fromfile",
"argparse.ArgumentParser",
"cv2.cvtColor",
"numpy.amax"
] | [((99, 139), 'numpy.fromfile', 'np.fromfile', (['input_file'], {'dtype': 'np.uint16'}), '(input_file, dtype=np.uint16)\n', (110, 139), True, 'import numpy as np\n'), ((311, 349), 'cv2.cvtColor', 'cv2.cvtColor', (['img8', 'cv2.COLOR_GRAY2RGB'], {}), '(img8, cv2.COLOR_GRAY2RGB)\n', (323, 349), False, 'import cv2\n'), ((3... |
import math
import numpy as np
import matplotlib.pyplot as plt
import scipy.integrate as integrate
import pdb
import sys
from ilqr.vehicle_model import Model
from ilqr.local_planner import LocalPlanner
from ilqr.constraints import Constraints
class iLQR():
def __init__(self, args, obstacle_bb, verbose=False):
... | [
"ilqr.constraints.Constraints",
"numpy.ones",
"numpy.linalg.eig",
"ilqr.local_planner.LocalPlanner",
"ilqr.vehicle_model.Model",
"numpy.diag",
"numpy.array",
"numpy.zeros",
"numpy.arctan2",
"matplotlib.pyplot.pause"
] | [((574, 592), 'ilqr.local_planner.LocalPlanner', 'LocalPlanner', (['args'], {}), '(args)\n', (586, 592), False, 'from ilqr.local_planner import LocalPlanner\n'), ((622, 633), 'ilqr.vehicle_model.Model', 'Model', (['args'], {}), '(args)\n', (627, 633), False, 'from ilqr.vehicle_model import Model\n'), ((661, 691), 'ilqr... |
import numpy as np
from spacy.pipeline.sentencizer import Sentencizer
from glob import glob
from spacy.lang.en import English
def metrics(a, b):
from sklearn.metrics import f1_score, recall_score, precision_score, accuracy_score
return (accuracy_score(a, b),
recall_score(a, b),
precisi... | [
"hw2.ColgateSBD",
"sklearn.metrics.f1_score",
"spacy.lang.en.English",
"sklearn.metrics.precision_score",
"sklearn.metrics.recall_score",
"numpy.array",
"spacy.pipeline.sentencizer.Sentencizer",
"sklearn.metrics.accuracy_score",
"glob.glob"
] | [((471, 480), 'spacy.lang.en.English', 'English', ([], {}), '()\n', (478, 480), False, 'from spacy.lang.en import English\n'), ((514, 534), 'glob.glob', 'glob', (['"""marked-*.txt"""'], {}), "('marked-*.txt')\n", (518, 534), False, 'from glob import glob\n'), ((247, 267), 'sklearn.metrics.accuracy_score', 'accuracy_sco... |
from modules.mpulib import computeheading, attitudefromCompassGravity, RP_calculate, MadgwickQuaternionUpdate, Euler2Quat, quaternion_to_euler_angle, MPU9250_computeEuler
import socket, traceback
import csv
import struct
import sys, time, string, pygame
import pygame
import pygame.draw
import pygame.time
import numpy ... | [
"pygame.event.poll",
"pygame.init",
"numpy.array",
"numpy.linalg.norm",
"modules.euclid.Quaternion",
"modules.quaternion.QuaternionClass",
"numpy.cross",
"pygame.time.delay",
"modules.a3muse.quatNormalized",
"pygame.display.flip",
"numpy.subtract",
"modules.a3muse.RotMatToQuat",
"numpy.mat",... | [((1012, 1051), 'serial.Serial', 'serial.Serial', (['"""/dev/tty.usbmodem14411"""'], {}), "('/dev/tty.usbmodem14411')\n", (1025, 1051), False, 'import serial\n'), ((1556, 1569), 'pygame.init', 'pygame.init', ([], {}), '()\n', (1567, 1569), False, 'import pygame\n'), ((1580, 1608), 'modules.EuclidObjects.Screen', 'Scree... |
import matplotlib.pyplot as plt
import numpy as np
from gpar.regression import GPARRegressor
from wbml.experiment import WorkingDirectory
import wbml.plot
if __name__ == "__main__":
wd = WorkingDirectory("_experiments", "synthetic", seed=1)
# Create toy data set.
n = 200
x = np.linspace(0, 1, n)
n... | [
"gpar.regression.GPARRegressor",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.fill_between",
"wbml.experiment.WorkingDirectory",
"numpy.linspace",
"matplotlib.pyplot.figure",
"numpy.stack",
"numpy.cos",
"matplotlib.pyplot.tight_layout",
"... | [((192, 245), 'wbml.experiment.WorkingDirectory', 'WorkingDirectory', (['"""_experiments"""', '"""synthetic"""'], {'seed': '(1)'}), "('_experiments', 'synthetic', seed=1)\n", (208, 245), False, 'from wbml.experiment import WorkingDirectory\n'), ((294, 314), 'numpy.linspace', 'np.linspace', (['(0)', '(1)', 'n'], {}), '(... |
#%%
import numpy as np
import pandas as pd
import bokeh.plotting
import bokeh.io
import bokeh.models
import growth.model
import growth.viz
const = growth.model.load_constants()
colors, palette = growth.viz.bokeh_style()
mapper = growth.viz.load_markercolors()
bokeh.io.output_file('../../figures/interactive/interac... | [
"numpy.ones_like",
"numpy.log10",
"numpy.arange",
"pandas.read_csv"
] | [((450, 477), 'numpy.arange', 'np.arange', (['(0.001)', '(50)', '(0.001)'], {}), '(0.001, 50, 0.001)\n', (459, 477), True, 'import numpy as np\n'), ((532, 619), 'pandas.read_csv', 'pd.read_csv', (['"""../../data/main_figure_data/Fig4_ecoli_ribosomal_mass_fractions.csv"""'], {}), "(\n '../../data/main_figure_data/Fig... |
from helpers import poseRt
from frame import Frame
import time
import numpy as np
import g2o
import json
LOCAL_WINDOW = 20
#LOCAL_WINDOW = None
class Point(object):
# A Point is a 3-D point in the world
# Each Point is observed in multiple Frames
def __init__(self, mapp, loc, color, tid=None):
self.pt = np... | [
"numpy.sqrt",
"numpy.array",
"g2o.VertexCam",
"numpy.linalg.norm",
"numpy.mean",
"g2o.SparseOptimizer",
"json.dumps",
"numpy.dot",
"g2o.LinearSolverCholmodSE3",
"frame.Frame",
"g2o.OptimizationAlgorithmLevenberg",
"g2o.EdgeProjectP2MC",
"helpers.poseRt",
"json.loads",
"numpy.eye",
"g2o... | [((318, 331), 'numpy.array', 'np.array', (['loc'], {}), '(loc)\n', (326, 331), True, 'import numpy as np\n'), ((389, 403), 'numpy.copy', 'np.copy', (['color'], {}), '(color)\n', (396, 403), True, 'import numpy as np\n'), ((504, 555), 'numpy.array', 'np.array', (['[self.pt[0], self.pt[1], self.pt[2], 1.0]'], {}), '([sel... |
# -*- coding: utf-8 -*-
import nltk
import os
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import style
#from nltk import pos_tag
from nltk.tag import StanfordNERTagger
from nltk.tokenize import word_tokenize
style.use('fivethirtyeight')
# Process text
raw_text = open("news_article.txt").read... | [
"nltk.pos_tag",
"os.times",
"nltk.ne_chunk",
"nltk.tokenize.word_tokenize",
"matplotlib.style.use",
"nltk.tag.StanfordNERTagger",
"matplotlib.pyplot.subplots",
"numpy.arange",
"matplotlib.pyplot.show"
] | [((233, 261), 'matplotlib.style.use', 'style.use', (['"""fivethirtyeight"""'], {}), "('fivethirtyeight')\n", (242, 261), False, 'from matplotlib import style\n'), ((336, 359), 'nltk.tokenize.word_tokenize', 'word_tokenize', (['raw_text'], {}), '(raw_text)\n', (349, 359), False, 'from nltk.tokenize import word_tokenize\... |
import sys
sys.path.append('../')
sys.path.append('../..')
import cmbnncs.utils as utils
import cmbnncs.spherical as spherical
import cmbnncs.simulator as simulator
import numpy as np
import time
start_time = time.time()
def sim_Dust(dust_seed, frequ, amplitude_randn, spectralIndex_randn, temp_randn):
### ComDust ... | [
"numpy.random.choice",
"cmbnncs.simulator.DustComponents",
"cmbnncs.utils.savenpy",
"numpy.random.seed",
"cmbnncs.spherical.sphere2piecePlane",
"time.time",
"sys.path.append"
] | [((11, 33), 'sys.path.append', 'sys.path.append', (['"""../"""'], {}), "('../')\n", (26, 33), False, 'import sys\n'), ((34, 58), 'sys.path.append', 'sys.path.append', (['"""../.."""'], {}), "('../..')\n", (49, 58), False, 'import sys\n'), ((209, 220), 'time.time', 'time.time', ([], {}), '()\n', (218, 220), False, 'impo... |
from .datafetcher import fetch_measure_levels
from .stationdata import build_station_list, update_water_levels
from .flood import stations_highest_rel_level
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from datetime import datetime, timedelta
from floodsystem.station import inconsistent_typical_... | [
"matplotlib.pyplot.xticks",
"matplotlib.pyplot.ylabel",
"numpy.polyfit",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.plot",
"datetime.timedelta",
"numpy.linspace",
"matplotlib.pyplot.tight_layout",
"numpy.poly1d",
"matplotlib.pyplot.title",
"floodsystem.station.inconsistent_typical_range_stat... | [((714, 759), 'floodsystem.station.inconsistent_typical_range_stations', 'inconsistent_typical_range_stations', (['stations'], {}), '(stations)\n', (749, 759), False, 'from floodsystem.station import inconsistent_typical_range_stations\n'), ((1054, 1098), 'matplotlib.pyplot.plot', 'plt.plot', (['dates', 'levels'], {'la... |
import os
import numpy as np
import pytest
from pennylane import qchem
from openfermion.hamiltonians import MolecularData
ref_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "test_ref_files")
table_1 = np.array(
[
[0.0, 0.0, 0.0, 0.0, 0.68238953],
[0.0, 1.0, 1.0, 0.0, 0.68238953]... | [
"numpy.allclose",
"pennylane.qchem.two_particle",
"os.path.join",
"os.path.realpath",
"numpy.array",
"pytest.mark.parametrize",
"pytest.raises",
"numpy.full"
] | [((222, 1390), 'numpy.array', 'np.array', (['[[0.0, 0.0, 0.0, 0.0, 0.68238953], [0.0, 1.0, 1.0, 0.0, 0.68238953], [1.0, \n 0.0, 0.0, 1.0, 0.68238953], [1.0, 1.0, 1.0, 1.0, 0.68238953], [0.0, 0.0,\n 2.0, 2.0, 0.17900058], [0.0, 1.0, 3.0, 2.0, 0.17900058], [1.0, 0.0, 2.0,\n 3.0, 0.17900058], [1.0, 1.0, 3.0, 3.0,... |
import os
import sys
import time
import torch
import torch.nn as nn
import random
import numpy as np
import torchvision.transforms as transforms
FILE_DIR = os.path.dirname(os.path.abspath(__file__))
DATA_ROOT = os.path.join(FILE_DIR, '../../../data')
sys.path.append(os.path.join(FILE_DIR, '../'))
sys.path.append(os.pa... | [
"utils.Partition",
"os.path.join",
"torchvision.transforms.RandomHorizontalFlip",
"torchvision.transforms.RandomCrop",
"torchvision.transforms.Normalize",
"torch.utils.data.DataLoader",
"os.path.abspath",
"torchvision.transforms.ToTensor",
"numpy.load",
"numpy.arange",
"numpy.random.shuffle"
] | [((212, 251), 'os.path.join', 'os.path.join', (['FILE_DIR', '"""../../../data"""'], {}), "(FILE_DIR, '../../../data')\n", (224, 251), False, 'import os\n'), ((173, 198), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (188, 198), False, 'import os\n'), ((268, 297), 'os.path.join', 'os.path.joi... |
#!/usr/bin/env python
"""SPECFIT.PY - Generic stellar abundance determination software
"""
from __future__ import print_function
__authors__ = '<NAME> <<EMAIL>>'
__version__ = '20200711' # yyyymmdd
import os
import shutil
import contextlib, io, sys
import numpy as np
import warnings
from astropy.io import fits
fr... | [
"numpy.hstack",
"matplotlib.pyplot.ylabel",
"scipy.interpolate.interp1d",
"dlnpyutils.utils.basiclogger",
"numpy.array",
"numpy.argsort",
"dlnpyutils.utils.interp",
"numpy.isfinite",
"copy.deepcopy",
"synple.synple.read_model",
"doppler.rv.tweakcontinuum",
"numpy.arange",
"os.remove",
"os.... | [((681, 702), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (695, 702), False, 'import matplotlib\n'), ((872, 941), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {'message': '"""numpy.dtype size changed"""'}), "('ignore', message='numpy.dtype size changed')\n", (895, 9... |
import numpy as np
import pandas as pd
import nltk
from nltk.corpus import stopwords
from nltk.tokenize import word_tokenize
import matplotlib.pyplot as plt
import contractions # Expanding contractions
from nltk.stem.wordnet import WordNetLemmatizer
from sklearn.model_selection import tr... | [
"pandas.Series",
"numpy.unique",
"pandas.read_csv",
"nltk.corpus.stopwords.words",
"sklearn.model_selection.train_test_split",
"sklearn.metrics.classification_report",
"sklearn.tree.DecisionTreeClassifier",
"sklearn.linear_model.LogisticRegression",
"nltk.tokenize.word_tokenize",
"sklearn.feature_... | [((1164, 1191), 'pandas.read_csv', 'pd.read_csv', (['"""df_truth.csv"""'], {}), "('df_truth.csv')\n", (1175, 1191), True, 'import pandas as pd\n'), ((2005, 2022), 'pandas.Series', 'pd.Series', (['n_text'], {}), '(n_text)\n', (2014, 2022), True, 'import pandas as pd\n'), ((3065, 3095), 'pandas.DataFrame', 'pd.DataFrame'... |
import numpy as np
from scipy import stats
import pandas as pd
from sklearn.cross_decomposition import PLSRegression
def standardize_vector(v, center=True, scale=False):
if center:
v = v - np.mean(v)
if scale:
if np.std(v) == 0:
return v
else:
return (v + 0.0)... | [
"numpy.mean",
"numpy.median",
"pandas.DataFrame",
"numpy.array",
"numpy.std",
"numpy.linalg.svd"
] | [((1965, 2008), 'numpy.linalg.svd', 'np.linalg.svd', (['X_stand'], {'full_matrices': '(False)'}), '(X_stand, full_matrices=False)\n', (1978, 2008), True, 'import numpy as np\n'), ((1770, 1785), 'pandas.DataFrame', 'pd.DataFrame', (['X'], {}), '(X)\n', (1782, 1785), True, 'import pandas as pd\n'), ((2507, 2530), 'numpy.... |
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | [
"numpy.array",
"numpy.linalg.norm",
"matplotlib.pyplot.imshow",
"os.path.exists",
"os.listdir",
"numpy.where",
"os.mkdir",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.title",
"time.time",
"matplotlib.pyplot.show",
"matplotlib.pyplot.text",
"PIL.Image.fromarray",
"os.makedirs",
"time.str... | [((3471, 3498), 'PIL.Image.fromarray', 'Image.fromarray', (['output_img'], {}), '(output_img)\n', (3486, 3498), False, 'from PIL import Image\n'), ((5021, 5033), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (5031, 5033), True, 'import matplotlib.pyplot as plt\n'), ((5039, 5055), 'matplotlib.pyplot.subplo... |
import os
import sys
import matplotlib.pyplot as plt
import numpy as np
import cmasher as cmr
import astropy.units as u
import astropy.coordinates as coord
from astropy.io import ascii
from astropy.io import fits
from astropy.wcs import WCS
from functions import *
plt.rcParams['mathtext.fontset'] = 'cm'
plt.rcParams[... | [
"astropy.coordinates.Angle",
"matplotlib.pyplot.colorbar",
"astropy.coordinates.SkyCoord",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.scatter",
"numpy.loadtxt",
"cmasher.get_sub_cmap",
"matplotlib.pyplot.subplot",
"astropy.wcs.WCS",
"matplotlib.pyplot.rc",
"matplotlib.pyplot.show"
] | [((399, 430), 'matplotlib.pyplot.rc', 'plt.rc', (['"""font"""'], {'size': 'SMALL_SIZE'}), "('font', size=SMALL_SIZE)\n", (405, 430), True, 'import matplotlib.pyplot as plt\n'), ((470, 507), 'matplotlib.pyplot.rc', 'plt.rc', (['"""axes"""'], {'titlesize': 'MEDIUM_SIZE'}), "('axes', titlesize=MEDIUM_SIZE)\n", (476, 507),... |
import numpy as np
import pymc as pm
import networkx as nx
from matplotlib import pyplot as plt
alpha = 0.5
beta = 0.1
L= 9.0
G0 = nx.Graph()
for i in range(1, 10):
for j in range(i + 1, 11):
G0.add_edge(i, j)
#G0.add_path(range(1, 11))
#G0.add_path(range(1, 11))
#G0.remove_edge(2, 3)... | [
"matplotlib.pyplot.hist",
"networkx.is_connected",
"numpy.log",
"networkx.Graph",
"numpy.exp",
"pymc.Metropolis.__init__",
"pymc.MCMC",
"pymc.stochastic",
"networkx.draw",
"matplotlib.pyplot.show"
] | [((142, 152), 'networkx.Graph', 'nx.Graph', ([], {}), '()\n', (150, 152), True, 'import networkx as nx\n'), ((478, 507), 'pymc.stochastic', 'pm.stochastic', ([], {'dtype': 'nx.Graph'}), '(dtype=nx.Graph)\n', (491, 507), True, 'import pymc as pm\n'), ((2567, 2597), 'pymc.MCMC', 'pm.MCMC', (['[cwg, average_degree]'], {})... |
import argparse
import json
import numpy as np
import typing
from blockfs.directory import Directory
import logging
from precomputed_tif.blockfs_stack import BlockfsStack
from precomputed_tif.ngff_stack import NGFFStack
import os
import sys
from spimstitch.ngff import NGFFDirectory
from ..stitch import get_output_siz... | [
"os.path.exists",
"json.loads",
"spimstitch.ngff.NGFFDirectory",
"argparse.ArgumentParser",
"precomputed_tif.blockfs_stack.BlockfsStack",
"numpy.arange",
"os.path.join",
"logging.warning",
"os.path.split",
"os.path.dirname",
"blockfs.directory.Directory",
"os.mkdir",
"os.cpu_count",
"json.... | [((394, 419), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (417, 419), False, 'import argparse\n'), ((4039, 4076), 'os.walk', 'os.walk', (['opts.input'], {'followlinks': '(True)'}), '(opts.input, followlinks=True)\n', (4046, 4076), False, 'import os\n'), ((6213, 6247), 'os.path.join', 'os.pat... |
#!/usr/bin/env python
# coding: utf-8
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Jan 5 2021
@author: <NAME>
based on the Iso-MPS codes
"""
#%% -- IMPORTS --
import sys
sys.path.append("..") # import one subdirectory up in files
# external packages
import numpy as np
import qiskit as qk
import netwo... | [
"mps.mps.MPO",
"tenpy.networks.site.SpinHalfSite",
"networkx.topological_sort",
"networkx.DiGraph",
"networkx.algorithms.dag.is_directed_acyclic_graph",
"numpy.swapaxes",
"tenpy.networks.mps.MPS.from_Bflat",
"mps.mps.MPS",
"qiskit.QuantumCircuit",
"sys.path.append"
] | [((188, 209), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (203, 209), False, 'import sys\n'), ((8075, 8122), 'tenpy.networks.site.SpinHalfSite', 'tenpy.networks.site.SpinHalfSite', ([], {'conserve': 'None'}), '(conserve=None)\n', (8107, 8122), False, 'import tenpy\n'), ((9621, 9677), 'mps.mps.... |
"""
Module for Gemini FLAMINGOS.
.. include:: ../include/links.rst
"""
import os
from pkg_resources import resource_filename
from IPython import embed
import numpy as np
from pypeit import msgs
from pypeit import telescopes
from pypeit.core import framematch
from pypeit.images import detector_container
from pypeit.... | [
"os.path.join",
"pypeit.images.detector_container.DetectorContainer",
"pypeit.telescopes.GeminiSTelescopePar",
"pypeit.core.framematch.check_frame_exptime",
"numpy.atleast_1d"
] | [((517, 549), 'pypeit.telescopes.GeminiSTelescopePar', 'telescopes.GeminiSTelescopePar', ([], {}), '()\n', (547, 549), False, 'from pypeit import telescopes\n'), ((2994, 3047), 'pypeit.images.detector_container.DetectorContainer', 'detector_container.DetectorContainer', ([], {}), '(**detector_dict)\n', (3030, 3047), Fa... |
from precise.skaters.covariance.allcovskaters import ALL_D0_SKATERS
from precise.skaters.covarianceutil.likelihood import cov_skater_loglikelihood
from uuid import uuid4
import os
import json
import pathlib
from pprint import pprint
import traceback
from collections import Counter
from momentum.functions import rvar
fr... | [
"traceback.format_exc",
"numpy.random.rand",
"pathlib.Path",
"json.dump",
"os.path.join",
"time.sleep",
"uuid.uuid4",
"collections.Counter",
"numpy.array",
"precise.skaters.covarianceutil.likelihood.cov_skater_loglikelihood",
"precise.skatertools.data.equity.random_m6_returns",
"pprint.pprint"... | [((1910, 1924), 'pprint.pprint', 'pprint', (['params'], {}), '(params)\n', (1916, 1924), False, 'from pprint import pprint\n'), ((1929, 1942), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (1939, 1942), False, 'import time\n'), ((1992, 2014), 'pprint.pprint', 'pprint', (['ALL_D0_SKATERS'], {}), '(ALL_D0_SKATERS)\... |
#!/usr/bin/env python
# coding: utf-8
# In[1]:
import dask
from dask_kubernetes import KubeCluster
import numpy as np
# In[ ]:
#tag::remote_lb_deploy[]
# In[2]:
# Specify a remote deployment using a load blanacer, necessary for communication with notebook from cluster
dask.config.set({"kubernetes.scheduler-s... | [
"dask.config.set",
"dask_kubernetes.KubeCluster.from_yaml",
"dask.distributed.Client",
"numpy.take",
"dask.array.ones"
] | [((280, 350), 'dask.config.set', 'dask.config.set', (["{'kubernetes.scheduler-service-type': 'LoadBalancer'}"], {}), "({'kubernetes.scheduler-service-type': 'LoadBalancer'})\n", (295, 350), False, 'import dask\n'), ((374, 460), 'dask_kubernetes.KubeCluster.from_yaml', 'KubeCluster.from_yaml', (['"""worker-spec.yaml"""'... |
import collections
import csv
import os
import sys
from enum import Enum
from pathlib import Path
# adapt paths for jupyter
module_path = os.path.abspath(os.path.join('..'))
if module_path not in sys.path:
sys.path.append(module_path)
import face_alignment
from yawn_train.src.blazeface_detector import BlazeFaceD... | [
"yawn_train.src.download_utils.download_blazeface",
"tensorflow.keras.models.load_model",
"cv2.destroyAllWindows",
"yawn_train.src.blazeface_detector.BlazeFaceDetector",
"yawn_train.src.download_utils.download_and_unpack_dlib_68_landmarks",
"sys.path.append",
"os.walk",
"yawn_train.src.ssd_face_detect... | [((1922, 1958), 'os.path.join', 'os.path.join', (['MOUTH_FOLDER', '"""opened"""'], {}), "(MOUTH_FOLDER, 'opened')\n", (1934, 1958), False, 'import os\n'), ((1981, 2017), 'os.path.join', 'os.path.join', (['MOUTH_FOLDER', '"""closed"""'], {}), "(MOUTH_FOLDER, 'closed')\n", (1993, 2017), False, 'import os\n'), ((2624, 268... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.