code stringlengths 31 1.05M | apis list | extract_api stringlengths 97 1.91M |
|---|---|---|
#!/usr/bin/python
import xml.etree.ElementTree as ET
import numpy as np
import os,sys, time
import argparse
import yaml
import matplotlib.pyplot as plt
template_location=os.environ['HOME']+'/simsup_ws/src/simulation_supervised/simulation_supervised_demo/extensions/templates/'
prefab_textures=['Gazebo/Grey','Gazebo... | [
"numpy.random.uniform",
"xml.etree.ElementTree.parse",
"numpy.random.choice",
"numpy.abs",
"os.path.isfile",
"numpy.arange",
"numpy.sign"
] | [((1716, 1757), 'xml.etree.ElementTree.parse', 'ET.parse', (["(template_location + 'panel.xml')"], {}), "(template_location + 'panel.xml')\n", (1724, 1757), True, 'import xml.etree.ElementTree as ET\n'), ((3887, 3934), 'xml.etree.ElementTree.parse', 'ET.parse', (["(model_dir + '/' + name + '/model.sdf')"], {}), "(model... |
# Currently not-thorough testing just to speed validation of the basic library functionality
import numpy as np
import tinygraph as tg
import graph_test_suite
import io
import pytest
suite = graph_test_suite.get_full_suite()
def test_create_graphs_types():
"""
Simple tests to try creating graphs of various d... | [
"graph_test_suite.get_full_suite",
"numpy.dtype",
"tinygraph.TinyGraph",
"pytest.raises",
"numpy.array",
"tinygraph.util.graph_equality",
"numpy.all"
] | [((193, 226), 'graph_test_suite.get_full_suite', 'graph_test_suite.get_full_suite', ([], {}), '()\n', (224, 226), False, 'import graph_test_suite\n'), ((349, 373), 'tinygraph.TinyGraph', 'tg.TinyGraph', (['(5)', 'np.bool'], {}), '(5, np.bool)\n', (361, 373), True, 'import tinygraph as tg\n'), ((481, 506), 'tinygraph.Ti... |
__author__ = "<NAME> (<EMAIL>)"
import numpy as np
import scipy.sparse as spsp
from thread2vec.preprocessing.social_media import anonymized as anonymized_extract
from thread2vec.preprocessing import wrappers
from thread2vec.preprocessing.common import safe_comment_generator
from thread2vec.common import get_p... | [
"thread2vec.common.get_package_path",
"thread2vec.preprocessing.common.safe_comment_generator",
"numpy.empty",
"numpy.float32",
"scipy.sparse.coo_matrix",
"thread2vec.preprocessing.social_media.anonymized.document_generator"
] | [((1137, 1209), 'numpy.empty', 'np.empty', (['(number_of_items, number_of_reddit_features)'], {'dtype': 'np.float32'}), '((number_of_items, number_of_reddit_features), dtype=np.float32)\n', (1145, 1209), True, 'import numpy as np\n'), ((1233, 1305), 'numpy.empty', 'np.empty', (['(number_of_items, number_of_reddit_featu... |
import numpy as np
import soundfile
import librosa
import os
from sklearn import metrics
import logging
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import config
from datetime import datetime
def compute_time_consumed(start_time):
"""
计算训练总耗时
:param start_time:
:return:
"""... | [
"matplotlib.pyplot.title",
"numpy.load",
"logging.Formatter",
"matplotlib.pyplot.figure",
"numpy.mean",
"matplotlib.pyplot.tight_layout",
"os.path.join",
"numpy.std",
"os.path.exists",
"matplotlib.pyplot.rcParams.update",
"matplotlib.ticker.MultipleLocator",
"sklearn.metrics.average_precision_... | [((684, 706), 'os.path.realpath', 'os.path.realpath', (['path'], {}), '(path)\n', (700, 706), False, 'import os\n'), ((977, 1015), 'os.path.join', 'os.path.join', (['log_dir', "('%04d.log' % i1)"], {}), "(log_dir, '%04d.log' % i1)\n", (989, 1015), False, 'import os\n'), ((1020, 1218), 'logging.basicConfig', 'logging.ba... |
"""Extract training samples from OSM."""
import geopandas as gpd
import numpy as np
import pandas as pd
from rasterio import Affine
from rasterio.crs import CRS
from rasterio.features import rasterize
from rasterio.warp import reproject, Resampling
from scipy.ndimage.morphology import distance_transform_edt
from shape... | [
"maupp.utils.reproject_features",
"geopandas.GeoDataFrame.from_features",
"rasterio.warp.reproject",
"numpy.empty",
"rasterio.Affine",
"numpy.logical_not",
"numpy.zeros",
"maupp.utils.iter_geoms",
"shapely.geometry.mapping",
"maupp.utils.filter_features",
"rasterio.crs.CRS",
"maupp.osm.urban_b... | [((465, 486), 'rasterio.crs.CRS', 'CRS', ([], {'init': '"""epsg:4326"""'}), "(init='epsg:4326')\n", (468, 486), False, 'from rasterio.crs import CRS\n'), ((1544, 1600), 'maupp.utils.reproject_features', 'reproject_features', (['features'], {'src_crs': 'WGS84', 'dst_crs': 'crs'}), '(features, src_crs=WGS84, dst_crs=crs)... |
import json
import numpy as np
import subprocess
from my_utils.squad_eval import get_bleu_moses
import os.path
def pred2words(prediction, vocab):
EOS_token = 3
outputs = []
for pred in prediction:
new_pred = pred
for i, x in enumerate(pred):
if int(x) == EOS_token:
... | [
"numpy.asarray",
"subprocess.Popen",
"json.load",
"my_utils.squad_eval.get_bleu_moses"
] | [((1022, 1157), 'subprocess.Popen', 'subprocess.Popen', (["['perl', './bleu_eval/diversity.pl.remove_extension', output_path]"], {'stdin': 'subprocess.PIPE', 'stdout': 'subprocess.PIPE'}), "(['perl', './bleu_eval/diversity.pl.remove_extension',\n output_path], stdin=subprocess.PIPE, stdout=subprocess.PIPE)\n", (1038... |
# -*- coding: utf-8 -*-
#!/usr/bin/env python3.8
# Copyright (c) 2019 <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 ... | [
"read_input.get_all_input_values",
"codecs.open",
"read_input.get_fixed_mapping",
"os.path.isfile",
"numpy.max",
"read_input.get_distance_consistency",
"read_input.get_scenario_and_char_set",
"numpy.min"
] | [((1996, 2043), 'read_input.get_all_input_values', 'read_input.get_all_input_values', (['corpus_weights'], {}), '(corpus_weights)\n', (2027, 2043), False, 'import read_input\n'), ((3976, 4006), 'read_input.get_fixed_mapping', 'read_input.get_fixed_mapping', ([], {}), '()\n', (4004, 4006), False, 'import read_input\n'),... |
# -*- coding: utf-8 -*-
import re, sys
from math import hypot, atan2, degrees, pi as PI
import numpy as np
reload(sys)
sys.setdefaultencoding('utf-8')
class DistMatrix(object):
#vec: array of Point
def __init__(self, vec):
self.vec = vec
self._dist_products()
def _dist_products(se... | [
"math.hypot",
"math.atan2",
"numpy.zeros",
"re.match",
"numpy.where",
"sys.setdefaultencoding",
"re.compile"
] | [((120, 151), 'sys.setdefaultencoding', 'sys.setdefaultencoding', (['"""utf-8"""'], {}), "('utf-8')\n", (142, 151), False, 'import re, sys\n'), ((1018, 1059), 're.compile', 're.compile', (['"""\\\\[(-?[0-9]+),(-?[0-9]+)\\\\]"""'], {}), "('\\\\[(-?[0-9]+),(-?[0-9]+)\\\\]')\n", (1028, 1059), False, 'import re, sys\n'), (... |
r"""
This module provides some tests of the integrator to known integrals.
Note, these are not the transformations, just the plain integrals, :math:`\int_0^\infty f(x) J_\nu(x) dx`
There is a corresponding notebook in devel/ that runs each of these functions through a grid of N and h,
showing the pattern of accuracy... | [
"hankel.HankelTransform",
"scipy.special.gammaincc",
"scipy.special.gammainc",
"numpy.isclose",
"scipy.special.k0",
"numpy.exp",
"pytest.mark.parametrize",
"scipy.special.gamma",
"numpy.sqrt"
] | [((3124, 3273), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""s, nu, N, h"""', '[[0, 1, 50, 0.05], [0, 2, 50, 0.05], [0.5, 1, 50, 0.05], [-2, 2, 600, 10 **\n -2.6], [-0.783, 1, 50, 0.05]]'], {}), "('s, nu, N, h', [[0, 1, 50, 0.05], [0, 2, 50, 0.05],\n [0.5, 1, 50, 0.05], [-2, 2, 600, 10 ** -2.6], [-... |
import time
import numpy as np
from scipy import sparse
import argparse
parser = argparse.ArgumentParser()
from multiprocessing import Pool
from surprise import accuracy, SVD, NormalPredictor, KNNBasic, BaselineOnly
from src.models.cf_utils import *
class Model():
def __init__(self, name, algo, ks):
self.... | [
"surprise.BaselineOnly",
"numpy.load",
"argparse.ArgumentParser",
"scipy.sparse.vstack",
"time.time",
"scipy.sparse.coo_matrix",
"surprise.NormalPredictor",
"surprise.accuracy.mae",
"multiprocessing.Pool",
"surprise.accuracy.rmse",
"surprise.SVD"
] | [((82, 107), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (105, 107), False, 'import argparse\n'), ((4359, 4395), 'scipy.sparse.coo_matrix', 'sparse.coo_matrix', (['unmasked_vals_csr'], {}), '(unmasked_vals_csr)\n', (4376, 4395), False, 'from scipy import sparse\n'), ((480, 491), 'time.time',... |
import array
import functools
import gzip
import io
import logging
import operator
import struct
import urllib.request
from typing import List, BinaryIO
import matplotlib.pyplot as plt
import numpy as np
import alkymi as alk
# Print alkymi logging to stderr
alk.log.addHandler(logging.StreamHandler())
alk.log.setLeve... | [
"alkymi.recipe",
"io.BytesIO",
"matplotlib.pyplot.show",
"gzip.open",
"alkymi.log.setLevel",
"matplotlib.pyplot.imshow",
"logging.StreamHandler",
"struct.unpack",
"functools.reduce",
"numpy.array",
"alkymi.foreach"
] | [((305, 336), 'alkymi.log.setLevel', 'alk.log.setLevel', (['logging.DEBUG'], {}), '(logging.DEBUG)\n', (321, 336), True, 'import alkymi as alk\n'), ((2052, 2064), 'alkymi.recipe', 'alk.recipe', ([], {}), '()\n', (2062, 2064), True, 'import alkymi as alk\n'), ((2511, 2528), 'alkymi.foreach', 'alk.foreach', (['urls'], {}... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import sys
import sqlite3
import datetime
import numpy as np
from . import sql_table_utils as utils
DEFAULT_DATABASE_DIR_NAME = "Crystal_data"
def get_valid_time_stamp():
"""
Get a valid ... | [
"os.mkdir",
"os.path.join",
"os.path.basename",
"os.path.realpath",
"os.path.exists",
"datetime.datetime.now",
"numpy.array",
"os.path.expanduser"
] | [((494, 517), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (515, 517), False, 'import datetime\n'), ((1398, 1427), 'os.path.realpath', 'os.path.realpath', (['sys.argv[0]'], {}), '(sys.argv[0])\n', (1414, 1427), False, 'import os\n'), ((2045, 2068), 'os.path.expanduser', 'os.path.expanduser', (['"... |
import lorm
from lorm.manif import EuclideanSpace
from lorm.funcs import ManifoldObjectiveFunction
from nfft import nfft
import numpy as np
import copy as cp
class plan(ManifoldObjectiveFunction):
def __init__(self, M, N):
'''
plan for computing the (polynomial) L^2 discrepancy for points measures ... | [
"copy.deepcopy",
"nfft.nfft.NFFT3D",
"lorm.manif.EuclideanSpace",
"numpy.power",
"numpy.zeros",
"numpy.ones",
"numpy.mod",
"numpy.linalg.norm"
] | [((478, 501), 'nfft.nfft.NFFT3D', 'nfft.NFFT3D', (['M', 'N', 'N', 'N'], {}), '(M, N, N, N)\n', (489, 501), False, 'from nfft import nfft\n'), ((526, 544), 'numpy.ones', 'np.ones', (['[N, N, N]'], {}), '([N, N, N])\n', (533, 544), True, 'import numpy as np\n'), ((803, 840), 'numpy.zeros', 'np.zeros', (['[N, N, N]'], {'d... |
import sys,argparse,operator
import pandas as pd
import matplotlib.cm as cm
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import matplotlib.text as mtext
from matplotlib import rc
from matplotlib.legend_handler import HandlerPathCollection
from matplotlib.legend import Legend... | [
"argparse.ArgumentParser",
"matplotlib.pyplot.cm.Pastel1",
"matplotlib.pyplot.suptitle",
"matplotlib.pyplot.MultipleLocator",
"collections.defaultdict",
"matplotlib.pyplot.rcParams.update",
"numpy.arange",
"numpy.array",
"functools.wraps",
"matplotlib.pyplot.subplots_adjust",
"matplotlib.pyplot.... | [((415, 439), 'functools.wraps', 'functools.wraps', (['handler'], {}), '(handler)\n', (430, 439), False, 'import functools\n'), ((1193, 1207), 'matplotlib.pyplot.subplots', 'plt.subplots', ([], {}), '()\n', (1205, 1207), True, 'import matplotlib.pyplot as plt\n'), ((2156, 2188), 'matplotlib.pyplot.suptitle', 'plt.supti... |
# height from 9 to 0
# four adjacent locations (up, down, left, and right)
# 21---43210
# 3-878-4-21
# -85678-8-2
# 87678-678-
# -8---65678
import numpy as np
from scipy import ndimage
lines = open("input.txt", "r").readlines()
lines = [line[:-1] for line in lines]
lines = [list(int(item) for item in list(line)) for... | [
"numpy.pad",
"numpy.ndenumerate",
"numpy.zeros",
"scipy.ndimage.label",
"numpy.array",
"numpy.prod"
] | [((353, 406), 'numpy.pad', 'np.pad', (['lines', '(1)'], {'mode': '"""constant"""', 'constant_values': '(10)'}), "(lines, 1, mode='constant', constant_values=10)\n", (359, 406), True, 'import numpy as np\n'), ((491, 511), 'numpy.ndenumerate', 'np.ndenumerate', (['grid'], {}), '(grid)\n', (505, 511), True, 'import numpy ... |
import array
import struct
import numpy as np
from PIL import Image
class MNIST:
""" MNIST dataset is composed of digit images of size 28x28 and its labels """
def __init__(self, data_dir):
self.train_data, self.train_labels = self.parse_images(data_dir + '/train-images-idx3-ubyte'), \
... | [
"PIL.Image.fromarray",
"numpy.array"
] | [((1433, 1455), 'PIL.Image.fromarray', 'Image.fromarray', (['array'], {}), '(array)\n', (1448, 1455), False, 'from PIL import Image\n'), ((960, 991), 'numpy.array', 'np.array', (['images'], {'dtype': 'np.int8'}), '(images, dtype=np.int8)\n', (968, 991), True, 'import numpy as np\n'), ((1322, 1353), 'numpy.array', 'np.a... |
import numpy as np
import time
from random import sample
from some_bandits.utilities import save_to_pickle, load_from_pickle, truncate, convert_conf, calculate_utility
from some_bandits.bandit_options import bandit_args
from some_bandits.bandits.Bandit import Bandit
#formula = "ao"
FORMULA_FUNC = None
CUM_REWARD = ... | [
"numpy.square",
"numpy.log"
] | [((1147, 1164), 'numpy.square', 'np.square', (['reward'], {}), '(reward)\n', (1156, 1164), True, 'import numpy as np\n'), ((1249, 1272), 'numpy.square', 'np.square', (['self.delta_m'], {}), '(self.delta_m)\n', (1258, 1272), True, 'import numpy as np\n'), ((1567, 1593), 'numpy.log', 'np.log', (['(horizon * delta_sq)'], ... |
"""
Created on Friday March 15 16:22 2019
tools to work with tiffs from the GeoTek RXCT scanner
@author: <NAME>
"""
import os
import sys
import glob
import tkinter
from tkinter import filedialog
import numpy as np
import xml.etree.ElementTree
import tifffile
from skimage.transform import downscale_local_mean
from sk... | [
"numpy.abs",
"matplotlib.pyplot.bar",
"numpy.shape",
"matplotlib.pyplot.figure",
"numpy.histogram",
"warnings.simplefilter",
"matplotlib.pyplot.imshow",
"os.path.dirname",
"tkinter.filedialog.askopenfilename",
"warnings.catch_warnings",
"matplotlib.ticker.MultipleLocator",
"matplotlib.pyplot.s... | [((1050, 1072), 'os.path.dirname', 'os.path.dirname', (['fname'], {}), '(fname)\n', (1065, 1072), False, 'import os\n'), ((2020, 2045), 'tifffile.imread', 'tifffile.imread', (['filename'], {}), '(filename)\n', (2035, 2045), False, 'import tifffile\n'), ((2204, 2229), 'os.path.dirname', 'os.path.dirname', (['filename'],... |
#!/usr/bin/env python
import sys, os
import numpy as np
from scipy.signal import find_peaks
from math import ceil
from pylab import detrend,fft,savefig
from matplotlib import pyplot as plt
from mpl_toolkits.mplot3d import axes3d
from scipy.signal import blackman as blk
from glob import glob
import pandas as pd
def fi... | [
"os.remove",
"pandas.read_csv",
"pylab.detrend",
"matplotlib.pyplot.figure",
"scipy.signal.find_peaks",
"numpy.mean",
"glob.glob",
"os.path.join",
"pandas.DataFrame",
"numpy.std",
"matplotlib.pyplot.close",
"os.path.exists",
"numpy.max",
"numpy.loadtxt",
"matplotlib.pyplot.subplots",
"... | [((874, 908), 'scipy.signal.find_peaks', 'find_peaks', (['S[-M:]'], {'height': 'thresUp'}), '(S[-M:], height=thresUp)\n', (884, 908), False, 'from scipy.signal import find_peaks\n'), ((924, 961), 'scipy.signal.find_peaks', 'find_peaks', (['(-S[-M:])'], {'height': '(-thresDwn)'}), '(-S[-M:], height=-thresDwn)\n', (934, ... |
# -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
import numpy as np
sum_a = 0
sum_d = 0
for i in range(1000):
eps = np.finfo(float).eps
data = np.random.uniform(low=-1, high=1.0 + eps, size=(1, 2))
y = np.sin(data*np.pi)
rand_points = np.transpose(np.vstack((d... | [
"numpy.random.uniform",
"numpy.poly1d",
"numpy.roots",
"numpy.polyder",
"numpy.finfo",
"numpy.sin",
"numpy.array",
"numpy.arange",
"numpy.mean",
"numpy.vstack"
] | [((190, 244), 'numpy.random.uniform', 'np.random.uniform', ([], {'low': '(-1)', 'high': '(1.0 + eps)', 'size': '(1, 2)'}), '(low=-1, high=1.0 + eps, size=(1, 2))\n', (207, 244), True, 'import numpy as np\n'), ((253, 273), 'numpy.sin', 'np.sin', (['(data * np.pi)'], {}), '(data * np.pi)\n', (259, 273), True, 'import num... |
import numpy as np
import collections
import pygame
import time
import gym
from gym import error, spaces, utils
from gym.utils import seeding
class SnakeEnv(gym.Env):
metadata = {
'render.modes': ['human']
}
def __init__(self):
self.grid_shape = (15, 15)
self.grid = N... | [
"pygame.display.set_mode",
"pygame.Rect",
"numpy.zeros",
"pygame.init",
"time.sleep",
"pygame.display.flip",
"numpy.where",
"numpy.array",
"numpy.arange",
"numpy.random.choice",
"collections.deque"
] | [((914, 958), 'numpy.array', 'np.array', (['[[-1, 0], [0, -1], [1, 0], [0, 1]]'], {}), '([[-1, 0], [0, -1], [1, 0], [0, 1]])\n', (922, 958), True, 'import numpy as np\n'), ((2631, 2680), 'numpy.zeros', 'np.zeros', (['(self.grid_shape[0] * self.grid_shape[1])'], {}), '(self.grid_shape[0] * self.grid_shape[1])\n', (2639,... |
# Copyright 2019 PIQuIL - All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed ... | [
"torch.dot",
"qucumber._warn_on_missing_gpu",
"torch.zeros_like",
"torch.nn.utils.parameters_to_vector",
"torch.cat",
"torch.nn.functional.linear",
"torch.zeros",
"torch.einsum",
"torch.cuda.is_available",
"torch.device",
"numpy.sign",
"torch.bernoulli",
"torch.matmul",
"torch.sum",
"quc... | [((4344, 4365), 'qucumber.utils.auto_unsqueeze_args', 'auto_unsqueeze_args', ([], {}), '()\n', (4363, 4365), False, 'from qucumber.utils import cplx, auto_unsqueeze_args\n'), ((7097, 7118), 'qucumber.utils.auto_unsqueeze_args', 'auto_unsqueeze_args', ([], {}), '()\n', (7116, 7118), False, 'from qucumber.utils import cp... |
import cv2
import numpy as np
from common import strel
from common import morpho as m
img = cv2.imread('./Images/papier_15.png')
# Canal rouge car feuille verte et ressort mieux :
imgB = img[:, :, 0] #On conserve le canal bleu
cv2.imshow('Feuille B', imgB)
imgV = img[:, :, 1] #On conserve le canal vert
cv2.imshow('Fe... | [
"numpy.sum",
"common.strel.build",
"cv2.waitKey",
"cv2.destroyAllWindows",
"common.morpho.gradient",
"cv2.imread",
"cv2.imshow"
] | [((94, 130), 'cv2.imread', 'cv2.imread', (['"""./Images/papier_15.png"""'], {}), "('./Images/papier_15.png')\n", (104, 130), False, 'import cv2\n'), ((229, 258), 'cv2.imshow', 'cv2.imshow', (['"""Feuille B"""', 'imgB'], {}), "('Feuille B', imgB)\n", (239, 258), False, 'import cv2\n'), ((306, 335), 'cv2.imshow', 'cv2.im... |
import pandas as pd
import numpy as np
data = pd.read_csv("1-5-data.csv")
# TODO: Separate the features and the labels into arrays called X and y
X = np.array(data[['x1', 'x2']])
y = np.array(data['y'])
| [
"pandas.read_csv",
"numpy.array"
] | [((50, 77), 'pandas.read_csv', 'pd.read_csv', (['"""1-5-data.csv"""'], {}), "('1-5-data.csv')\n", (61, 77), True, 'import pandas as pd\n'), ((160, 188), 'numpy.array', 'np.array', (["data[['x1', 'x2']]"], {}), "(data[['x1', 'x2']])\n", (168, 188), True, 'import numpy as np\n'), ((194, 213), 'numpy.array', 'np.array', (... |
import numpy as np
def hinge_loss(x, y, w, b, rho):
# Terms
reg = rho*(np.linalg.norm(w)**2)
cost = 1 - np.multiply(y, np.sum(w.T*x, axis = 1) - b)
return np.mean(np.maximum(0, cost)**2) + reg
def dhinge_loss(x, y, w, b, rho):
# Terms
n = x.shape[0]
cost = 1 - np.multiply(y, np.sum(w.... | [
"numpy.maximum",
"numpy.multiply",
"numpy.linalg.norm",
"numpy.sum"
] | [((80, 97), 'numpy.linalg.norm', 'np.linalg.norm', (['w'], {}), '(w)\n', (94, 97), True, 'import numpy as np\n'), ((132, 155), 'numpy.sum', 'np.sum', (['(w.T * x)'], {'axis': '(1)'}), '(w.T * x, axis=1)\n', (138, 155), True, 'import numpy as np\n'), ((185, 204), 'numpy.maximum', 'np.maximum', (['(0)', 'cost'], {}), '(0... |
import sys
import json
import base64
import numpy as np
from sklearn.metrics.pairwise import cosine_similarity
import db_connection as db_con
def main(argc, argv):
print('Load file')
file = open('../output/groups.json')
print('Load json content')
groups = json.load(file)
group_sugar_values = group... | [
"db_connection.get_db_config",
"numpy.frombuffer",
"json.load",
"db_connection.create_connection"
] | [((274, 289), 'json.load', 'json.load', (['file'], {}), '(file)\n', (283, 289), False, 'import json\n'), ((600, 648), 'db_connection.get_db_config', 'db_con.get_db_config', (['"""../config/db_config.json"""'], {}), "('../config/db_config.json')\n", (620, 648), True, 'import db_connection as db_con\n'), ((664, 699), 'db... |
from __future__ import division
from numpy import (e,pi,meshgrid,arange,sin,sqrt,cos,arccos,exp,
zeros,max,random,argmax,argmin,ones_like,array)
import matplotlib.pyplot as plt
from scipy.ndimage.filters import gaussian_filter
ledang = 20*pi/180 #degrees
ct = cos(ledang) #cosine of theta
leddist =... | [
"scipy.ndimage.filters.gaussian_filter",
"numpy.ones_like",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.ylim",
"numpy.random.rand",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.colorbar",
"matplotlib.pyplot.figure",
"numpy.sin",
"numpy.array",
"numpy.random.poisson",
"numpy.cos",
"matplotli... | [((282, 293), 'numpy.cos', 'cos', (['ledang'], {}), '(ledang)\n', (285, 293), False, 'from numpy import e, pi, meshgrid, arange, sin, sqrt, cos, arccos, exp, zeros, max, random, argmax, argmin, ones_like, array\n'), ((410, 428), 'numpy.array', 'array', (['(1280, 960)'], {}), '((1280, 960))\n', (415, 428), False, 'from ... |
import multiprocessing as mp
import os
import numpy as np
from cv2 import imread, imwrite
import selectivesearch.selectivesearch as selectivesearch
from filters import filter_mask_bbox
imagenet_root = '/D_data/Self/imagenet_root/'
imagenet_root_proposals = '/D_data/Self/imagenet_root_ss_mask_proposals_mp'
split = ... | [
"numpy.zeros_like",
"numpy.save",
"selectivesearch.selectivesearch.selective_search",
"os.path.exists",
"cv2.imread",
"numpy.array",
"os.path.splitext",
"filters.filter_mask_bbox",
"multiprocessing.Process",
"os.path.join"
] | [((551, 585), 'os.path.join', 'os.path.join', (['imagenet_root', 'split'], {}), '(imagenet_root, split)\n', (563, 585), False, 'import os\n'), ((600, 644), 'os.path.join', 'os.path.join', (['imagenet_root_proposals', 'split'], {}), '(imagenet_root_proposals, split)\n', (612, 644), False, 'import os\n'), ((755, 791), 'n... |
import sys
import joblib
import numpy as np
import pandas as pd
from utils.model_utils import get_model
from azureml.core import Model
def parse_args():
model_name_param = [sys.argv[idx+1] for idx,item in enumerate(sys.argv) if item == '--model-name']
if len(model_name_param) == 0:
raise ValueError('mo... | [
"pandas.DataFrame",
"azureml.core.Model.get_model_path",
"utils.model_utils.get_model",
"numpy.array",
"joblib.load",
"numpy.vstack"
] | [((1322, 1447), 'utils.model_utils.get_model', 'get_model', ([], {'model_name': 'model_params[0]', 'model_version': 'model_params[1]', 'tag_name': 'model_params[2]', 'tag_value': 'model_params[3]'}), '(model_name=model_params[0], model_version=model_params[1],\n tag_name=model_params[2], tag_value=model_params[3])\n... |
#############################################
# #
# <NAME> #
# ECE 351-51 #
# Lab 4 #
# 2/18/2020 #
# ... | [
"matplotlib.pyplot.title",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.show",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.legend",
"numpy.zeros",
"matplotlib.pyplot.figure",
"numpy.sin",
"numpy.arange",
"numpy.exp",
"numpy.cos",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel",
... | [((1447, 1480), 'numpy.arange', 'np.arange', (['(-10)', '(10 + steps)', 'steps'], {}), '(-10, 10 + steps, steps)\n', (1456, 1480), True, 'import numpy as np\n'), ((1481, 1508), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(10, 7)'}), '(figsize=(10, 7))\n', (1491, 1508), True, 'import matplotlib.pyplot as... |
import networkx as nx
import numpy as np
import sys
class GraphCleaner(object):
"""docstring for GraphCleaner"""
def __init__(self, handle):
super(GraphCleaner, self).__init__()
self.handle = handle
self.G = nx.read_gpickle('{0} Graph with PWIs.pkl'.format(self.handle))
def run(self):
self.remove_zero_pwi... | [
"numpy.isnan"
] | [((1707, 1718), 'numpy.isnan', 'np.isnan', (['v'], {}), '(v)\n', (1715, 1718), True, 'import numpy as np\n'), ((1522, 1535), 'numpy.isnan', 'np.isnan', (['val'], {}), '(val)\n', (1530, 1535), True, 'import numpy as np\n')] |
import sys
import numpy as np
def main():
args = sys.argv
# args[1]:threshold number word [2]:number of topic
# [3]:cancer_type
K = int(args[2])
if(K <= 9):
topic = '0' + args[2]
else:
topic = args[2]
input_file = 'result/data4_o' + args[1] + '_' + args[3] \
... | [
"numpy.zeros"
] | [((2050, 2067), 'numpy.zeros', 'np.zeros', (['[K, 96]'], {}), '([K, 96])\n', (2058, 2067), True, 'import numpy as np\n')] |
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import logging
import os
import sys
import io
import numpy as np
import torch
import torch.nn.functional as F
from .fairseq_dataset import ... | [
"torch.from_numpy",
"soundfile.read",
"torchvision.transforms.functional.to_tensor",
"torch.LongTensor",
"numpy.lexsort",
"math.floor",
"os.path.exists",
"cv2.imread",
"numpy.array",
"torch.nn.functional.layer_norm",
"fairseq.data.data_utils.load_indexed_dataset",
"pyarrow.array",
"torch.no_... | [((610, 637), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (627, 637), False, 'import logging\n'), ((1400, 1460), 'math.floor', 'math.floor', (['(self.max_sample_size / (self.sample_rate * 0.04))'], {}), '(self.max_sample_size / (self.sample_rate * 0.04))\n', (1410, 1460), False, 'impor... |
###############################################################################
#
# Copyright (c) 2016, <NAME>,
# University of Sao Paulo, Sao Paulo, Brazil
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following condition... | [
"numpy.random.uniform",
"numpy.sum",
"numpy.argmax",
"numpy.zeros",
"numpy.ones",
"numpy.cumsum",
"numpy.array",
"numpy.arange",
"numpy.random.choice",
"numpy.dot",
"numpy.diag"
] | [((3642, 3667), 'numpy.array', 'np.array', (['dynamics_matrix'], {}), '(dynamics_matrix)\n', (3650, 3667), True, 'import numpy as np\n'), ((3706, 3737), 'numpy.array', 'np.array', (['particle_lower_bounds'], {}), '(particle_lower_bounds)\n', (3714, 3737), True, 'import numpy as np\n'), ((3776, 3807), 'numpy.array', 'np... |
import pandas as pd
import numpy as np
from os import makedirs
from Team import Team
# Meaning of these abreviations are in data_abreviation.txt
COLUMNS_TO_KEEP = ['HomeTeam', 'AwayTeam', 'FTHG', 'FTAG', 'HST', 'AST', 'HC', 'AC']
FEATURES_NAME = ['id','HN', 'AN',
'HAR', 'HDR', 'HMR', 'HOR', 'HPKST',... | [
"pandas.DataFrame",
"pandas.DataFrame.from_dict",
"os.makedirs",
"pandas.read_csv",
"Team.Team.compute_differential_statistics",
"Team.Team.compute_differential_streak",
"Team.Team",
"numpy.mean",
"Team.Team.compute_differential_weighted_streak",
"Team.Team.compute_differential_form",
"Team.Team... | [((1946, 2001), 'pandas.read_csv', 'pd.read_csv', (['self._gamesPath'], {'encoding': '"""unicode_escape"""'}), "(self._gamesPath, encoding='unicode_escape')\n", (1957, 2001), True, 'import pandas as pd\n'), ((2059, 2098), 'pandas.DataFrame', 'pd.DataFrame', (['df'], {'columns': 'FEATURES_NAME'}), '(df, columns=FEATURES... |
import unittest
import numpy as np
import h5py
from ..fourigui.fourigui import Gui
class TestGui(unittest.TestCase):
def setUp(self):
# set up gui
self.test_gui = Gui()
# set up test data
self.test_sofq = h5py.File('diffpy/tests/testdata/sofq.h5')['data']
self.test_sofq_c... | [
"unittest.main",
"h5py.File",
"numpy.nan_to_num",
"numpy.allclose"
] | [((4112, 4127), 'unittest.main', 'unittest.main', ([], {}), '()\n', (4125, 4127), False, 'import unittest\n'), ((245, 287), 'h5py.File', 'h5py.File', (['"""diffpy/tests/testdata/sofq.h5"""'], {}), "('diffpy/tests/testdata/sofq.h5')\n", (254, 287), False, 'import h5py\n'), ((334, 389), 'h5py.File', 'h5py.File', (['"""di... |
import argparse
import Models
import queue
import cv2
import numpy as np
from PIL import Image, ImageDraw
#parse parameters
parser = argparse.ArgumentParser()
parser.add_argument("--input_video_path", type=str)
parser.add_argument("--output_video_path", type=str, default = "")
parser.add_argument("--save_weights_path"... | [
"numpy.rollaxis",
"cv2.HoughCircles",
"argparse.ArgumentParser",
"cv2.VideoWriter_fourcc",
"numpy.concatenate",
"cv2.cvtColor",
"cv2.threshold",
"cv2.VideoCapture",
"numpy.array",
"cv2.VideoWriter",
"PIL.Image.fromarray",
"PIL.ImageDraw.Draw",
"cv2.resize",
"queue.deque"
] | [((134, 159), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (157, 159), False, 'import argparse\n'), ((729, 763), 'cv2.VideoCapture', 'cv2.VideoCapture', (['input_video_path'], {}), '(input_video_path)\n', (745, 763), False, 'import cv2\n'), ((1405, 1418), 'queue.deque', 'queue.deque', ([], {}... |
import numpy as np
from sklearn.metrics import classification_report as sk_classification_report
from sklearn.metrics import confusion_matrix
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem import Draw
from utils.molecular_metrics import MolecularMetrics
import tensorflow as tf
from collection... | [
"utils.molecular_metrics.MolecularMetrics.water_octanol_partition_coefficient_scores",
"numpy.argmax",
"utils.molecular_metrics.MolecularMetrics.valid_total_score",
"utils.molecular_metrics.MolecularMetrics.novel_total_score",
"rdkit.Chem.Draw.MolsToGridImage",
"utils.molecular_metrics.MolecularMetrics.un... | [((517, 589), 'rdkit.Chem.Draw.MolsToGridImage', 'Draw.MolsToGridImage', (['mols'], {'molsPerRow': 'molsPerRow', 'subImgSize': '(150, 150)'}), '(mols, molsPerRow=molsPerRow, subImgSize=(150, 150))\n', (537, 589), False, 'from rdkit.Chem import Draw\n'), ((5164, 5177), 'collections.OrderedDict', 'OrderedDict', ([], {}),... |
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
from matplotlib.patches import Ellipse
import pickle
from os.path import dirname, join
import numpy as np
from matplotlib.ticker import MultipleLocator, FormatStrFormatter
from make_parameter import PreParam
plt.style.us... | [
"make_parameter.PreParam",
"matplotlib.pyplot.close",
"matplotlib.pyplot.legend",
"os.path.dirname",
"matplotlib.pyplot.style.use",
"pickle.load",
"numpy.where",
"matplotlib.pyplot.rc",
"matplotlib.ticker.MultipleLocator",
"matplotlib.pyplot.subplots"
] | [((308, 331), 'matplotlib.pyplot.style.use', 'plt.style.use', (['"""ggplot"""'], {}), "('ggplot')\n", (321, 331), True, 'import matplotlib.pyplot as plt\n'), ((333, 360), 'matplotlib.pyplot.rc', 'plt.rc', (['"""text"""'], {'usetex': '(True)'}), "('text', usetex=True)\n", (339, 360), True, 'import matplotlib.pyplot as p... |
from i3Deep import utils
import numpy as np
from tqdm import tqdm
import os
import json
import copy
import shutil
from pathlib import Path
def combine(image_path, prediction_path, chosen_slices_path, save_path, depth):
shutil.rmtree(save_path, ignore_errors=True)
Path(save_path).mkdir(parents=True... | [
"i3Deep.utils.save_nifty",
"tqdm.tqdm",
"numpy.moveaxis",
"json.load",
"copy.deepcopy",
"os.path.basename",
"numpy.asarray",
"pathlib.Path",
"i3Deep.utils.load_nifty",
"shutil.rmtree",
"i3Deep.utils.load_filenames"
] | [((236, 280), 'shutil.rmtree', 'shutil.rmtree', (['save_path'], {'ignore_errors': '(True)'}), '(save_path, ignore_errors=True)\n', (249, 280), False, 'import shutil\n'), ((362, 394), 'i3Deep.utils.load_filenames', 'utils.load_filenames', (['image_path'], {}), '(image_path)\n', (382, 394), False, 'from i3Deep import uti... |
import numpy as np
from scipy import stats
import statsmodels.api as sm
import pandas as pd
import numpy.linalg as npl
import matplotlib.pyplot as plt
import numpy.random as npr
import time
import seaborn as sns
from tqdm import tqdm
from scipy.stats import norm
import scipy.optimize as opt
import math
def fnDataImpor... | [
"matplotlib.pyplot.subplot",
"scipy.optimize.minimize",
"matplotlib.pyplot.show",
"numpy.log",
"matplotlib.pyplot.plot",
"numpy.sum",
"matplotlib.pyplot.legend",
"numpy.zeros",
"pandas.read_excel",
"matplotlib.pyplot.figure",
"numpy.math.factorial",
"numpy.exp",
"numpy.random.normal",
"num... | [((1453, 1469), 'numpy.zeros', 'np.zeros', (['(5, 5)'], {}), '((5, 5))\n', (1461, 1469), True, 'import numpy as np\n'), ((3037, 3053), 'numpy.exp', 'np.exp', (['Xs[:, 1]'], {}), '(Xs[:, 1])\n', (3043, 3053), True, 'import numpy as np\n'), ((3101, 3117), 'numpy.exp', 'np.exp', (['Xs[:, 3]'], {}), '(Xs[:, 3])\n', (3107, ... |
import numpy as np
class Detector:
def __init__(self, subnets, merger):
self.subnets = subnets
self.merger = merger
def detect(self, img):
outputs=[]
for subnet in self.subnets:
outputs.append(subnet.feedforward(img)[0][0])
outputs=np.asarray(ou... | [
"numpy.asarray"
] | [((307, 326), 'numpy.asarray', 'np.asarray', (['outputs'], {}), '(outputs)\n', (317, 326), True, 'import numpy as np\n')] |
"""
General facilities for input (and output).
In order to work with TREPR data, these data need to be imported into the
trepr package. Therefore, the module provides importers for specific file
formats. In case of TREPR spectroscopy, the measurement control software is
often lab-written and specific for a local setup... | [
"numpy.abs",
"os.path.isfile",
"shutil.rmtree",
"os.path.join",
"os.path.exists",
"numpy.append",
"numpy.reshape",
"numpy.linspace",
"numpy.loadtxt",
"re.search",
"io.StringIO",
"datetime.datetime.strptime",
"zipfile.ZipFile",
"os.path.isdir",
"numpy.fromfile",
"numpy.array",
"os.pat... | [((4628, 4654), 'os.path.isdir', 'os.path.isdir', (['self.source'], {}), '(self.source)\n', (4641, 4654), False, 'import os\n'), ((5044, 5073), 'os.path.splitext', 'os.path.splitext', (['self.source'], {}), '(self.source)\n', (5060, 5073), False, 'import os\n'), ((6752, 6764), 'numpy.array', 'np.array', (['[]'], {}), '... |
# example module containing functions for using dask.delayed to lazy load gadget chunks
# and then compute stats across gadget chunks with dask.delayed.
#
# main method to call: selector_stats()
#
# some "features":
# * runs in parallel if a dask Client is running: reading and local by-chunk stats will
# be spre... | [
"h5py.File",
"numpy.empty",
"numpy.min",
"dask.compute",
"dask.array.from_array"
] | [((1019, 1058), 'h5py.File', 'h5py.File', (['data_file.filename'], {'mode': '"""r"""'}), "(data_file.filename, mode='r')\n", (1028, 1058), False, 'import h5py\n'), ((6235, 6255), 'dask.compute', 'dask.compute', (['*stats'], {}), '(*stats)\n', (6247, 6255), False, 'import dask\n'), ((6794, 6809), 'numpy.min', 'np.min', ... |
import math
import numpy as np
from plyfile import PlyData, PlyElement
from random import *
def _gen_noise(noise_range):
r = np.random.randn()
x = noise_range * r
r = np.random.randn()
y = noise_range * r
r = np.random.randn()
z = noise_range * r
return x, y, z
def read_ply(file_name):
... | [
"plyfile.PlyElement.describe",
"math.sqrt",
"numpy.random.randn",
"plyfile.PlyData",
"numpy.array",
"plyfile.PlyData.read"
] | [((131, 148), 'numpy.random.randn', 'np.random.randn', ([], {}), '()\n', (146, 148), True, 'import numpy as np\n'), ((181, 198), 'numpy.random.randn', 'np.random.randn', ([], {}), '()\n', (196, 198), True, 'import numpy as np\n'), ((231, 248), 'numpy.random.randn', 'np.random.randn', ([], {}), '()\n', (246, 248), True,... |
# --------------
# Importing header files
import numpy as np
# Path of the file has been stored in variable called 'path'
data = np.genfromtxt(path, delimiter = ",",skip_header=1 )
print ("\nData: \n\n",data)
#New record
new_record=[[50, 9, 4, 1, 0, 0, 40, 0]]
census = np.concatenate((new_record,data))... | [
"numpy.std",
"numpy.genfromtxt",
"numpy.max",
"numpy.min",
"numpy.array",
"numpy.mean",
"numpy.concatenate"
] | [((134, 183), 'numpy.genfromtxt', 'np.genfromtxt', (['path'], {'delimiter': '""","""', 'skip_header': '(1)'}), "(path, delimiter=',', skip_header=1)\n", (147, 183), True, 'import numpy as np\n'), ((287, 321), 'numpy.concatenate', 'np.concatenate', (['(new_record, data)'], {}), '((new_record, data))\n', (301, 321), True... |
from __future__ import division
import unittest
import numpy as np
from scipy.signal import butter
from wyrm.types import Data
from wyrm.processing import lfilter, spectrum
from wyrm.processing import swapaxes
class TestLFilter(unittest.TestCase):
def setUp(self):
# create some data
fs = 100
... | [
"unittest.main",
"wyrm.processing.spectrum",
"wyrm.processing.lfilter",
"numpy.sin",
"numpy.array",
"numpy.linspace",
"wyrm.processing.swapaxes",
"wyrm.types.Data",
"scipy.signal.butter",
"numpy.concatenate"
] | [((1982, 1997), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1995, 1997), False, 'import unittest\n'), ((405, 432), 'numpy.linspace', 'np.linspace', (['(0)', 'dt', '(fs * dt)'], {}), '(0, dt, fs * dt)\n', (416, 432), True, 'import numpy as np\n'), ((572, 608), 'numpy.concatenate', 'np.concatenate', (['[data, da... |
"""
"""
import os
import numpy as np
from ..nfw_evolution import lgc_vs_lgt, u_lgc_vs_lgt, CONC_MIN
from ..nfw_evolution import CONC_PARAM_BOUNDS, DEFAULT_CONC_PARAMS
from ..nfw_evolution import get_bounded_params, get_unbounded_params
_THIS_DRNAME = os.path.dirname(os.path.abspath(__file__))
DDRN = os.path.join(_THIS... | [
"os.path.abspath",
"numpy.allclose",
"numpy.random.RandomState",
"numpy.linspace",
"numpy.log10",
"os.path.join",
"numpy.all"
] | [((302, 344), 'os.path.join', 'os.path.join', (['_THIS_DRNAME', '"""testing_data"""'], {}), "(_THIS_DRNAME, 'testing_data')\n", (314, 344), False, 'import os\n'), ((268, 293), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (283, 293), False, 'import os\n'), ((505, 534), 'numpy.allclose', 'np.... |
import os
import numpy as np
class DeepDIVADatasetAdapter(object):
"""
Creates a directory & file based training environment that natively works with DeepDIVA CNN implementation.
Symlinks are used to reference files in self.root directory.
"""
def __init__(self, input_dir):
self.root = in... | [
"os.makedirs",
"os.path.basename",
"numpy.array",
"os.path.join",
"os.listdir"
] | [((610, 644), 'os.path.join', 'os.path.join', (['self.root', 'subfolder'], {}), '(self.root, subfolder)\n', (622, 644), False, 'import os\n'), ((687, 711), 'os.listdir', 'os.listdir', (['dataset_root'], {}), '(dataset_root)\n', (697, 711), False, 'import os\n'), ((738, 771), 'os.path.join', 'os.path.join', (['dataset_r... |
# -*- coding: utf-8 -*-
#!/usr/bin/env python
__author__ = "<NAME> (Galarius)"
"""
Генерация условной карты местности,
двух маршрутов и равномерно распределённых
точек, относящихся к одному из двух маршрутов.
Визуализация условной карты местности.
"""
import sys # exit()
import numpy as np # матри... | [
"pylab.plt.savefig",
"pylab.plt.show",
"pylab.plt.title",
"pylab.plt.grid",
"numpy.random.random",
"numpy.array",
"numpy.random.randint",
"pylab.plt.subplots"
] | [((2096, 2110), 'numpy.array', 'np.array', (['data'], {}), '(data)\n', (2104, 2110), True, 'import numpy as np\n'), ((2165, 2179), 'pylab.plt.subplots', 'plt.subplots', ([], {}), '()\n', (2177, 2179), False, 'from pylab import plt\n'), ((2479, 2495), 'pylab.plt.title', 'plt.title', (['"""Map"""'], {}), "('Map')\n", (24... |
"""
Created on Mon Jun 24 10:52:25 2019
Reads a wav file with SDR IQ capture of FM stations located in :
https://mega.nz/#F!3UUUnSiD!WLhWZ3ff4f4Pi7Ko_zcodQ
Also generates IQ stream sampled at 2.4Msps to simulate a similar spectrum
sinusoids, this might be useful in an early stage to use a known si... | [
"matplotlib.pyplot.title",
"wave.open",
"matplotlib.pyplot.subplot",
"numpy.fft.fft",
"numpy.zeros",
"matplotlib.pyplot.figure",
"numpy.fft.fftfreq",
"numpy.array",
"numpy.sin",
"numpy.linspace",
"numpy.cos",
"numpy.random.random",
"matplotlib.pyplot.ylabel",
"numpy.log10",
"matplotlib.p... | [((818, 851), 'wave.open', 'wave.open', (['(folder + filename)', '"""r"""'], {}), "(folder + filename, 'r')\n", (827, 851), False, 'import wave\n'), ((980, 1006), 'numpy.linspace', 'np.linspace', (['(0)', 'timeMax', 'N'], {}), '(0, timeMax, N)\n', (991, 1006), True, 'import numpy as np\n'), ((1026, 1037), 'numpy.zeros'... |
# -*- coding: utf-8 -*-
# ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.11.3
# kernelspec:
# display_name: Python 3
# name: python3
# ---
# + [markdown] id="view-in-github" colab_type="text"
... | [
"pymc3.sample",
"numpy.random.seed",
"matplotlib.pyplot.suptitle",
"arviz.plot_forest",
"pymc3.Deterministic",
"pymc3.Normal",
"pymc3.HalfCauchy",
"numpy.random.randint",
"numpy.random.normal",
"theano.tensor.log",
"numpy.append",
"matplotlib.pyplot.subplots",
"pymc3.Model",
"matplotlib.py... | [((1929, 1946), 'numpy.random.seed', 'np.random.seed', (['(0)'], {}), '(0)\n', (1943, 1946), True, 'import numpy as np\n'), ((2089, 2148), 'numpy.random.randint', 'np.random.randint', ([], {'low': '(3)', 'high': '(10)', 'size': 'n_groups', 'dtype': 'int'}), '(low=3, high=10, size=n_groups, dtype=int)\n', (2106, 2148), ... |
import json
import pandas as pd
from pandas.io.json import json_normalize
import numpy as np
import random
from bokeh.io import output_file, output_notebook, save
from bokeh.plotting import figure, show
from bokeh.models import ColumnDataSource, LabelSet
from bokeh.layouts import row, column, gridplot
from b... | [
"pandas.DataFrame",
"bokeh.models.ColumnDataSource",
"bokeh.plotting.figure",
"json.load",
"pandas.read_csv",
"bokeh.io.output_file",
"numpy.where",
"numpy.unique",
"bokeh.models.LabelSet"
] | [((772, 786), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (784, 786), True, 'import pandas as pd\n'), ((1349, 1370), 'pandas.read_csv', 'pd.read_csv', (['csv_file'], {}), '(csv_file)\n', (1360, 1370), True, 'import pandas as pd\n'), ((2319, 2355), 'bokeh.io.output_file', 'output_file', (['out_html'], {'mode':... |
import numpy as np
import shapely.geometry as shgeo
from .transforms import bbox2type
from .utils import get_bbox_type
def bbox_overlaps(bboxes1, bboxes2, mode='iou', is_aligned=False, eps=1e-6):
assert mode in ['iou', 'iof']
assert get_bbox_type(bboxes1) != 'notype'
assert get_bbox_type(bboxes2) != 'not... | [
"numpy.minimum",
"numpy.maximum",
"numpy.abs",
"shapely.geometry.Polygon",
"numpy.zeros",
"numpy.clip",
"numpy.nonzero",
"numpy.where",
"numpy.array"
] | [((740, 788), 'numpy.maximum', 'np.maximum', (['hbboxes1[..., :2]', 'hbboxes2[..., :2]'], {}), '(hbboxes1[..., :2], hbboxes2[..., :2])\n', (750, 788), True, 'import numpy as np\n'), ((798, 846), 'numpy.minimum', 'np.minimum', (['hbboxes1[..., 2:]', 'hbboxes2[..., 2:]'], {}), '(hbboxes1[..., 2:], hbboxes2[..., 2:])\n', ... |
#!/usr/bin/env python
import collections
import glob
import os
import os.path as osp
import shutil
import numpy as np
here = osp.dirname(osp.abspath(__file__))
def main():
dataset_dir = osp.join(here, 'dataset_data/20180204')
splits_dir = osp.join(here, 'dataset_data/20180204_splits')
if osp.exists(s... | [
"numpy.isin",
"os.path.abspath",
"numpy.load",
"os.makedirs",
"os.path.basename",
"os.path.isdir",
"os.path.exists",
"collections.Counter",
"os.path.join",
"os.listdir",
"numpy.unique"
] | [((141, 162), 'os.path.abspath', 'osp.abspath', (['__file__'], {}), '(__file__)\n', (152, 162), True, 'import os.path as osp\n'), ((196, 235), 'os.path.join', 'osp.join', (['here', '"""dataset_data/20180204"""'], {}), "(here, 'dataset_data/20180204')\n", (204, 235), True, 'import os.path as osp\n'), ((253, 299), 'os.pa... |
import sys
import pygame
import numpy as np
from pygame.locals import *
from env.color import Colors
from env.pixel import Pixel
from env.snake import Snake
from env.apple import Apple
from env.environment import Environment
from env.config import *
class SnakeGame(object):
def __init__(self, is_tick=False):
... | [
"pygame.quit",
"numpy.copy",
"pygame.event.get",
"pygame.display.set_mode",
"env.apple.Apple",
"pygame.Rect",
"pygame.draw.rect",
"pygame.init",
"env.snake.Snake",
"numpy.shape",
"pygame.display.update",
"env.pixel.Pixel",
"pygame.font.Font",
"sys.exit",
"pygame.time.Clock",
"env.envir... | [((324, 337), 'pygame.init', 'pygame.init', ([], {}), '()\n', (335, 337), False, 'import pygame\n'), ((382, 436), 'pygame.display.set_mode', 'pygame.display.set_mode', (['(SCREEN_WIDTH, SCREEN_HEIGHT)'], {}), '((SCREEN_WIDTH, SCREEN_HEIGHT))\n', (405, 436), False, 'import pygame\n'), ((451, 470), 'pygame.time.Clock', '... |
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
data = np.loadtxt("datos.dat")
fig = plt.figure(figsize = (15,7))
plt.subplot(1,2,1)
x = np.arange(0,1,0.01)
y = np.arange(0,1,0.01)
# ax = Axes3D(fig)
# ax.plot_trisurf(x,y, data)
plt.plot(x, data[0:100,0]/100)
plt.subplo... | [
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.figure",
"numpy.arange",
"numpy.loadtxt",
"matplotlib.pyplot.savefig"
] | [((99, 122), 'numpy.loadtxt', 'np.loadtxt', (['"""datos.dat"""'], {}), "('datos.dat')\n", (109, 122), True, 'import numpy as np\n'), ((130, 157), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(15, 7)'}), '(figsize=(15, 7))\n', (140, 157), True, 'import matplotlib.pyplot as plt\n'), ((160, 180), 'matplotli... |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import os
import numpy as np
DELIM = ':'
class HandModel(object):
def __init__(self, parents, base_relatives, inverse_base_absolutes, triangles, base_positions, weights, nbones):
self.nbones = nbones
self.parents = parent... | [
"numpy.zeros",
"numpy.loadtxt",
"os.path.join",
"numpy.ones"
] | [((950, 981), 'os.path.join', 'os.path.join', (['path', '"""bones.txt"""'], {}), "(path, 'bones.txt')\n", (962, 981), False, 'import os\n'), ((1473, 1507), 'os.path.join', 'os.path.join', (['path', '"""vertices.txt"""'], {}), "(path, 'vertices.txt')\n", (1485, 1507), False, 'import os\n'), ((1697, 1719), 'numpy.zeros',... |
# 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... | [
"mindspore.dataset.audio.transforms.Biquad",
"numpy.count_nonzero",
"numpy.abs",
"pytest.raises",
"numpy.array",
"mindspore.dataset.NumpySlicesDataset"
] | [((993, 1024), 'numpy.abs', 'np.abs', (['(data_expected - data_me)'], {}), '(data_expected - data_me)\n', (999, 1024), True, 'import numpy as np\n'), ((1111, 1136), 'numpy.count_nonzero', 'np.count_nonzero', (['greater'], {}), '(greater)\n', (1127, 1136), True, 'import numpy as np\n'), ((1453, 1503), 'numpy.array', 'np... |
import numpy as np
from numpy.testing import assert_raises
from scipy.sparse.linalg import utils
def test_make_system_bad_shape():
assert_raises(ValueError, utils.make_system, np.zeros((5,3)), None, np.zeros(4), np.zeros(4))
| [
"numpy.zeros"
] | [((184, 200), 'numpy.zeros', 'np.zeros', (['(5, 3)'], {}), '((5, 3))\n', (192, 200), True, 'import numpy as np\n'), ((207, 218), 'numpy.zeros', 'np.zeros', (['(4)'], {}), '(4)\n', (215, 218), True, 'import numpy as np\n'), ((220, 231), 'numpy.zeros', 'np.zeros', (['(4)'], {}), '(4)\n', (228, 231), True, 'import numpy a... |
import numpy as np
import matplotlib.pyplot as plt
from utils import load_train, load_valid
from run_knn import run_knn
trainData = load_train()
validData = load_valid()
kRange = [1,3,5,7,9]
results = []
for k in kRange:
temp = run_knn(k, trainData[0],trainData[1],validData[0])
results.append(temp)
def c... | [
"matplotlib.pyplot.show",
"numpy.sum",
"utils.load_train",
"run_knn.run_knn",
"matplotlib.pyplot.subplots",
"utils.load_valid"
] | [((133, 145), 'utils.load_train', 'load_train', ([], {}), '()\n', (143, 145), False, 'from utils import load_train, load_valid\n'), ((158, 170), 'utils.load_valid', 'load_valid', ([], {}), '()\n', (168, 170), False, 'from utils import load_train, load_valid\n'), ((517, 531), 'matplotlib.pyplot.subplots', 'plt.subplots'... |
# SIMULATE KDD1998
import sys
sys.path.insert(0, './src')
from shared_functions import *
from net_designs import *
import os
from scipy import stats as sc
import pandas as ps
import numpy as np
import random
from libpgm.nodedata import NodeData
from libpgm.graphskeleton import GraphSkeleton
from libpgm.discretebay... | [
"pandas.DataFrame",
"numpy.random.uniform",
"h5py.File",
"numpy.random.seed",
"numpy.random.binomial",
"numpy.zeros",
"sys.path.insert",
"numpy.apply_along_axis",
"numpy.random.randint"
] | [((32, 59), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""./src"""'], {}), "(0, './src')\n", (47, 59), False, 'import sys\n'), ((3471, 3498), 'numpy.random.seed', 'np.random.seed', (['RANDOM_SEED'], {}), '(RANDOM_SEED)\n', (3485, 3498), True, 'import numpy as np\n'), ((3963, 4018), 'h5py.File', 'h5py.File', (['"""... |
import cv2
import numpy as np
import socket
import os
import time
def load_model():
model = None
return model
# the input img is an np.array(uint8)
# maybe you need to change img from 0-255 to 0-1
def get_label(model, img):
# label = model(img)
label = 1
return str(label)
def recv_img(sock, cou... | [
"numpy.frombuffer",
"socket.socket",
"cv2.imdecode"
] | [((612, 661), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), '(socket.AF_INET, socket.SOCK_STREAM)\n', (625, 661), False, 'import socket\n'), ((1133, 1168), 'numpy.frombuffer', 'np.frombuffer', (['stringData', 'np.uint8'], {}), '(stringData, np.uint8)\n', (1146, 1168), True, 'import n... |
import codecs
import numpy as np
import matplotlib.pyplot as plt
import re
import ast
##content=codecs.open('Cluster2 Tweets.txt',"r",encoding="utf-8")
##regex = r"\w*crocodile\w*"
##c1=c2=c3=c4=c5=c6=c7=c8=c9=c10=c11=c12=0
##for i in content:
## matches = re.finditer(regex,i)
##
## for match in matches:
## ... | [
"matplotlib.pyplot.show",
"codecs.open",
"matplotlib.pyplot.plot",
"re.finditer",
"matplotlib.pyplot.legend",
"re.findall",
"numpy.arange",
"matplotlib.pyplot.xticks",
"ast.literal_eval",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.subplots"
] | [((5683, 5740), 'codecs.open', 'codecs.open', (['"""Cluster3 Tweets.txt"""', '"""r"""'], {'encoding': '"""utf-8"""'}), "('Cluster3 Tweets.txt', 'r', encoding='utf-8')\n", (5694, 5740), False, 'import codecs\n'), ((8058, 8072), 'matplotlib.pyplot.subplots', 'plt.subplots', ([], {}), '()\n', (8070, 8072), True, 'import m... |
from util import (get_data_from_id,
read_kpt_file)
import glob
import os
import numpy as np
from skimage.io import (imread,
imsave)
from skimage.transform import resize
root_dir = os.environ['DIR_3DFAW']
def prepare_train():
ids = glob.glob("%s/train_img/*.jpg" % root_dir... | [
"os.makedirs",
"os.path.basename",
"numpy.asarray",
"util.get_data_from_id",
"os.path.exists",
"util.read_kpt_file",
"numpy.min",
"numpy.max",
"skimage.transform.resize",
"glob.glob",
"numpy.savez",
"skimage.io.imsave",
"skimage.io.imread"
] | [((279, 321), 'glob.glob', 'glob.glob', (["('%s/train_img/*.jpg' % root_dir)"], {}), "('%s/train_img/*.jpg' % root_dir)\n", (288, 321), False, 'import glob\n'), ((454, 528), 'numpy.savez', 'np.savez', ([], {'file': "('%s/train' % root_dir)", 'y_keypts': 'y_keypts', 'z_keypts': 'z_keypts'}), "(file='%s/train' % root_dir... |
import numpy as np
from datetime import date
import unittest
from rebalance.utils import dates_till_target, fill_price_gaps
##############
class DatesPricesTest(unittest.TestCase):
def test_dates_till_target(self):
act_dates = dates_till_target(days=2, target=date(2016,1,1))
exp_dates ... | [
"rebalance.utils.fill_price_gaps",
"numpy.array",
"datetime.date"
] | [((547, 569), 'numpy.array', 'np.array', (['[[42], [44]]'], {}), '([[42], [44]])\n', (555, 569), True, 'import numpy as np\n'), ((602, 632), 'rebalance.utils.fill_price_gaps', 'fill_price_gaps', (['dates', 'prices'], {}), '(dates, prices)\n', (617, 632), False, 'from rebalance.utils import dates_till_target, fill_price... |
from tkinter import *
from PIL import Image, ImageTk
from numpy import asarray
from skimage.measure import label, regionprops
from skimage import filters
import tkinter as tk
import tkinter.ttk as ttk
import numpy as np
import math
# #####################
# Słowem wstępu
# #####################
# Ta aplikacja była... | [
"tkinter.ttk.Separator",
"PIL.ImageTk.PhotoImage",
"tkinter.Canvas",
"math.sqrt",
"tkinter.Button",
"numpy.asarray",
"PIL.Image.open",
"skimage.measure.label",
"skimage.filters.roberts",
"numpy.array",
"PIL.Image.fromarray",
"tkinter.Tk",
"skimage.measure.regionprops"
] | [((1039, 1077), 'PIL.Image.fromarray', 'Image.fromarray', (['image.imageArray', '"""L"""'], {}), "(image.imageArray, 'L')\n", (1054, 1077), False, 'from PIL import Image, ImageTk\n'), ((1105, 1136), 'PIL.ImageTk.PhotoImage', 'ImageTk.PhotoImage', (['image.image'], {}), '(image.image)\n', (1123, 1136), False, 'from PIL ... |
import unittest
import random
from ephem.stars import stars
import katpoint
import numpy as np
from katacomb.mock_dataset import (MockDataSet,
ANTENNA_DESCRIPTIONS,
DEFAULT_TIMESTAMPS)
from katacomb import (AIPSPath,
KatdalAd... | [
"unittest.main",
"katacomb.AIPSPath",
"katacomb.obit_context",
"numpy.arange",
"katpoint.Target",
"katacomb.tests.test_aips_path.file_cleaner",
"katacomb.uv_factory",
"katacomb.mock_dataset.MockDataSet",
"numpy.all",
"ephem.stars.stars.keys"
] | [((4139, 4154), 'unittest.main', 'unittest.main', ([], {}), '()\n', (4152, 4154), False, 'import unittest\n'), ((869, 899), 'katacomb.AIPSPath', 'AIPSPath', (['"""test"""', '(1)', '"""test"""', '(1)'], {}), "('test', 1, 'test', 1)\n", (877, 899), False, 'from katacomb import AIPSPath, KatdalAdapter, obit_context, uv_fa... |
# -*- coding: utf-8 -*-
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
import plotly.graph_objs as go
import numpy as np
import scipy.stats
from app import app
from apps.commons import gen_header, common_fig_layout
# global variables
x_max = 6.
n_p... | [
"plotly.graph_objs.layout.Title",
"apps.commons.gen_header",
"dash_core_components.Slider",
"dash_html_components.Div",
"dash_html_components.Label",
"dash.dependencies.Input",
"dash_html_components.P",
"dash_html_components.Img",
"numpy.linspace",
"dash_core_components.Graph",
"app.app.run_serv... | [((336, 372), 'numpy.linspace', 'np.linspace', (['(-x_max)', 'x_max', 'n_points'], {}), '(-x_max, x_max, n_points)\n', (347, 372), True, 'import numpy as np\n'), ((431, 510), 'apps.commons.gen_header', 'gen_header', (['"""Cohen\'s d-value"""'], {'logo': '"""/assets/icons8-return-96.png"""', 'href': '"""/toc"""'}), '("C... |
import tensorflow as tf
import numpy as np
import math
def lower_keys(dict):
return { k.lower(): v for k, v in dict.items()}
def printAsTabel(results, split_statics):
total = results[-1]
total_statics = split_statics[-1]
lines = []
for result, statics in zip(results[:-1], split_statics[:-1]):
... | [
"tensorflow.reduce_sum",
"numpy.sum",
"tensorflow.clip_by_value",
"tensorflow.cumsum",
"tensorflow.reshape",
"numpy.ones",
"numpy.mean",
"tensorflow.not_equal",
"tensorflow.nn.relu",
"tensorflow.gather",
"tensorflow.concat",
"tensorflow.cast",
"numpy.max",
"math.cos",
"tensorflow.map_fn"... | [((4007, 4020), 'math.cos', 'math.cos', (['(-rz)'], {}), '(-rz)\n', (4015, 4020), False, 'import math\n'), ((4038, 4051), 'math.sin', 'math.sin', (['(-rz)'], {}), '(-rz)\n', (4046, 4051), False, 'import math\n'), ((4065, 4152), 'numpy.array', 'np.array', (['[[cosYaw, sinYaw, 0], [-sinYaw, cosYaw, 0], [0, 0, 1]]'], {'dt... |
#!/usr/bin/env python
"""
Simple binning search algorithm utilities
"""
__author__ = "<NAME>, <NAME>"
# Python libraries
import os
import glob
import yaml
import numpy as np
#from matplotlib import mlab
import numpy.lib.recfunctions
import healpy as hp
import astropy.io.fits as pyfits # migrate to fitsio
import fitsio... | [
"pylab.close",
"yaml.load",
"healpy.get_all_neighbours",
"pylab.pcolormesh",
"numpy.histogram2d",
"pylab.ylabel",
"os.path.exists",
"sys.exit",
"fitsio.read",
"pylab.savefig",
"pylab.colorbar",
"pylab.ylim",
"numpy.linspace",
"pylab.xlabel",
"pylab.gca",
"pylab.xlim",
"numpy.arctan",... | [((2358, 2384), 'numpy.concatenate', 'np.concatenate', (['data_array'], {}), '(data_array)\n', (2372, 2384), True, 'import numpy as np\n'), ((5919, 5952), 'numpy.linspace', 'np.linspace', (['(-bound)', 'bound', 'steps'], {}), '(-bound, bound, steps)\n', (5930, 5952), True, 'import numpy as np\n'), ((6169, 6224), 'pylab... |
import numpy as np
from scipy.misc import logsumexp
def comp_edge_cts(A, comm_idxs):
"""
Computes the number of edges between the n_comm communities in (multi-)graph with adjacency matrix A
and community memberships comm_idxs.
Used for inference calculations in SBM-type models
:param A: nxn matrix... | [
"numpy.max",
"numpy.sum",
"numpy.zeros",
"numpy.exp"
] | [((607, 633), 'numpy.zeros', 'np.zeros', (['[n_comm, n_comm]'], {}), '([n_comm, n_comm])\n', (615, 633), True, 'import numpy as np\n'), ((1454, 1480), 'numpy.zeros', 'np.zeros', (['[n_comm, n_comm]'], {}), '([n_comm, n_comm])\n', (1462, 1480), True, 'import numpy as np\n'), ((2415, 2439), 'numpy.exp', 'np.exp', (['resc... |
import nibabel as nib
import nrrd
import os
import numpy as np
from nipype.interfaces.base import (
BaseInterface, TraitedSpec,
BaseInterfaceInputSpec, traits,
Directory)
from core.utils.filemanip import split_filename
from skimage.transform import resize
from skimage.filters.thresholding import threshold_o... | [
"numpy.isnan",
"numpy.mean",
"numpy.nanmean",
"os.path.abspath",
"nipype.interfaces.base.traits.File",
"nipype.interfaces.base.Directory",
"nibabel.save",
"numpy.swapaxes",
"nipype.interfaces.base.traits.List",
"nrrd.read",
"nibabel.Nifti1Image",
"skimage.filters.thresholding.threshold_otsu",
... | [((456, 509), 'nipype.interfaces.base.traits.Array', 'traits.Array', ([], {'desc': '"""Tensor to be fed to the network."""'}), "(desc='Tensor to be fed to the network.')\n", (468, 509), False, 'from nipype.interfaces.base import BaseInterface, TraitedSpec, BaseInterfaceInputSpec, traits, Directory\n'), ((527, 591), 'ni... |
#! /usr/bin/python3
# # # # # #
# Please excuse the chaotic code: it was first developed with a different application in mind,
# and then got modified for this project.
# # #
import numpy as np
from time import time
from datetime import datetime
from functions import asciiL, StructuredMotionStimulus, connect_even... | [
"pylab.close",
"matplotlib.rc",
"functions.write_trial_to_file",
"numpy.random.seed",
"argparse.ArgumentParser",
"numpy.sum",
"numpy.iinfo",
"matplotlib.animation.FuncAnimation",
"pylab.get_current_fig_manager",
"numpy.random.randint",
"pylab.figure",
"numpy.arange",
"numpy.mean",
"numpy.d... | [((758, 1000), 'argparse.ArgumentParser', 'ArgumentParser', ([], {'formatter_class': 'RawTextHelpFormatter', 'description': '"""Structured Motion Stimuli for Chicken experiments"""', 'epilog': '"""If using ipython3, indicate end of ipython arg parser via \'--\':\n $ ipython3 play.py -- <args>"""'}), '(formatter_class... |
import argparse
import cv2
import sounddevice as sd
import numpy as np
from wrapify.connect.wrapper import MiddlewareCommunicator
"""
Camera and Microphone listener + publisher
Here we demonstrate
1. Using the Image and AudioChunk messages
2. Single return wrapper functionality in conjunction with synchronous callb... | [
"argparse.ArgumentParser",
"cv2.waitKey",
"wrapify.connect.wrapper.MiddlewareCommunicator.register",
"cv2.VideoCapture",
"sounddevice.InputStream",
"numpy.random.random",
"sounddevice.wait",
"cv2.imshow"
] | [((2167, 2306), 'wrapify.connect.wrapper.MiddlewareCommunicator.register', 'MiddlewareCommunicator.register', (['"""Image"""', '"""CamMic"""', '"""/cam_mic/cam_feed"""'], {'carrier': '""""""', 'width': '"""$img_width"""', 'height': '"""$img_height"""', 'rgb': '(True)'}), "('Image', 'CamMic', '/cam_mic/cam_feed',\n c... |
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import cv2
import tensorflow as tf
from PIL import Image
import os
from sklearn.model_selection import train_test_split
from keras.utils import to_categorical
from keras.models import Sequential, load_model
from keras.layers import Conv2... | [
"matplotlib.pyplot.title",
"pandas.read_csv",
"sklearn.model_selection.train_test_split",
"sklearn.metrics.accuracy_score",
"keras.layers.MaxPool2D",
"matplotlib.pyplot.figure",
"keras.layers.Flatten",
"keras.utils.to_categorical",
"matplotlib.pyplot.show",
"keras.layers.Dropout",
"matplotlib.py... | [((410, 421), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (419, 421), False, 'import os\n'), ((950, 964), 'numpy.array', 'np.array', (['data'], {}), '(data)\n', (958, 964), True, 'import numpy as np\n'), ((975, 991), 'numpy.array', 'np.array', (['labels'], {}), '(labels)\n', (983, 991), True, 'import numpy as np\n'), (... |
import numpy as np
from keras.datasets import mnist
from keras.utils import to_categorical
from hyperactive import SimulatedAnnealingOptimizer
(X_train, y_train), (X_test, y_test) = mnist.load_data()
size = 6000
X_train = X_train[0:size]
y_train = y_train[0:size]
X_train = X_train.reshape(size, 28, 28, 1)
X_test ... | [
"hyperactive.SimulatedAnnealingOptimizer",
"keras.datasets.mnist.load_data",
"numpy.arange",
"keras.utils.to_categorical"
] | [((185, 202), 'keras.datasets.mnist.load_data', 'mnist.load_data', ([], {}), '()\n', (200, 202), False, 'from keras.datasets import mnist\n'), ((366, 389), 'keras.utils.to_categorical', 'to_categorical', (['y_train'], {}), '(y_train)\n', (380, 389), False, 'from keras.utils import to_categorical\n'), ((399, 421), 'kera... |
# -*- coding: utf-8 -*-
from __future__ import print_function, absolute_import
import numpy as np
import shutil
import os
import os.path as osp
import imageio
from skimage import transform
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt # noqa: E402
__all__ = ['visualize_ranked_results']
GRI... | [
"os.makedirs",
"os.path.join",
"os.path.basename",
"matplotlib.pyplot.close",
"imageio.imread",
"numpy.argsort",
"matplotlib.use",
"skimage.transform.resize",
"os.path.splitext",
"matplotlib.pyplot.subplots",
"shutil.copy"
] | [((208, 229), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (222, 229), False, 'import matplotlib\n'), ((1278, 1314), 'os.makedirs', 'os.makedirs', (['save_dir'], {'exist_ok': '(True)'}), '(save_dir, exist_ok=True)\n', (1289, 1314), False, 'import os\n'), ((1457, 1484), 'numpy.argsort', 'np.args... |
import dateutil.parser as dp
import datetime
import requests
import math
import json
import tqdm
import numpy as np
import os
import dateutil.parser as dp
import tensorflow as tf
from keras.models import Sequential
from keras.models import Model, load_model
from keras.layers import Dense
import json
import math
from s... | [
"keras.models.load_model",
"pandas.read_csv",
"sklearn.preprocessing.MinMaxScaler",
"keras.backend.abs",
"keras.backend.less",
"pandas.DataFrame",
"pywt.dwt",
"os.path.exists",
"requests.get",
"dateutil.parser.parse",
"math.ceil",
"pandas.to_datetime",
"datetime.datetime.fromtimestamp",
"n... | [((5015, 5034), 'numpy.array', 'np.array', (['rates_btc'], {}), '(rates_btc)\n', (5023, 5034), True, 'import numpy as np\n'), ((5146, 5212), 'pandas.read_csv', 'pd.read_csv', (['"""../data/bitcoin_historical_hourly_data.csv"""'], {'sep': '""","""'}), "('../data/bitcoin_historical_hourly_data.csv', sep=',')\n", (5157, 5... |
# Classes and functions to read Apollo SouthBay dataset
import os
import numpy as np
import csv
from typing import List
import third_party.pypcd as pypcd
import misc.poses as poses
from misc.point_clouds import PointCloudLoader
class GroundTruthPoses:
def __init__(self, pose_filepath):
assert os.path.is... | [
"numpy.stack",
"misc.poses.q2r",
"csv.reader",
"os.path.isdir",
"third_party.pypcd.PointCloud.from_path",
"numpy.zeros",
"os.path.exists",
"numpy.isnan",
"os.path.isfile",
"numpy.array",
"os.path.splitext",
"numpy.eye",
"os.path.split",
"os.path.join",
"os.listdir"
] | [((310, 339), 'os.path.isfile', 'os.path.isfile', (['pose_filepath'], {}), '(pose_filepath)\n', (324, 339), False, 'import os\n'), ((1949, 1976), 'os.path.isdir', 'os.path.isdir', (['dataset_root'], {}), '(dataset_root)\n', (1962, 1976), False, 'import os\n'), ((2540, 2578), 'os.path.join', 'os.path.join', (['self.data... |
import numpy as np
def features_extract_func(task):
return [task.task_config.cpu, task.task_config.memory,
task.task_config.duration, task.waiting_task_instances_number]
def features_extract_func_ac(task):
return features_extract_func(task) + [task.task_config.instances_number, len(task.running_... | [
"numpy.array"
] | [((516, 560), 'numpy.array', 'np.array', (['[64, 1, 0.23, 0.005, 108.0, 643.5]'], {}), '([64, 1, 0.23, 0.005, 108.0, 643.5])\n', (524, 560), True, 'import numpy as np\n'), ((697, 762), 'numpy.array', 'np.array', (['[64, 1, 0.23, 0.005, 108.0, 643.5, 643.5, 643.5, 643.5]'], {}), '([64, 1, 0.23, 0.005, 108.0, 643.5, 643.... |
#Detect the Aerobic Bacteria
#Blue and red indicator dyes in the plate color the colonies. Count all
#colonies regardless of their size or color intensity.
#result print in the blue dot. total numbers in the consol
#Author <NAME> 2021 Aug
#<EMAIL>
#product code 6478
import cv2 as cv
import numpy as np
img = cv.imrea... | [
"cv2.GaussianBlur",
"cv2.circle",
"numpy.int0",
"cv2.waitKey",
"cv2.imread",
"cv2.split",
"cv2.goodFeaturesToTrack",
"cv2.imshow"
] | [((312, 335), 'cv2.imread', 'cv.imread', (['"""ABC_BR.png"""'], {}), "('ABC_BR.png')\n", (321, 335), True, 'import cv2 as cv\n'), ((336, 360), 'cv2.imshow', 'cv.imshow', (['"""origin"""', 'img'], {}), "('origin', img)\n", (345, 360), True, 'import cv2 as cv\n'), ((422, 454), 'cv2.imshow', 'cv.imshow', (['"""crop"""', '... |
import unittest
from numpy import arange, cos, array, all, isclose, ones
from classification import FastNeuralNetwork as nn
class FastNeuralNetworkTest(unittest.TestCase):
def setUp(self):
self.theta = arange(1, 19) / 10.0
self.il = 2
self.hl = 2
self.nl = 4
X = cos([[1, 2]... | [
"classification.FastNeuralNetwork.reshape_training_set",
"numpy.ones",
"numpy.isclose",
"numpy.array",
"classification.FastNeuralNetwork",
"numpy.cos",
"numpy.arange",
"classification.FastNeuralNetwork.reshape_labels"
] | [((309, 338), 'numpy.cos', 'cos', (['[[1, 2], [3, 4], [5, 6]]'], {}), '([[1, 2], [3, 4], [5, 6]])\n', (312, 338), False, 'from numpy import arange, cos, array, all, isclose, ones\n'), ((356, 382), 'classification.FastNeuralNetwork.reshape_training_set', 'nn.reshape_training_set', (['X'], {}), '(X)\n', (379, 382), True,... |
from graphgen.weighted_undirected_graph_generator import GenerateWeightedUndirectedGraph
from graphgen.unweighted_undirected_graph_generator import GenerateUnweightedUndirectedGraph
from graphgen.weighted_directed_graph_generator import GenerateWeightedDirectedGraph
from graphgen.unweighted_directed_graph_generator imp... | [
"inspect.getfullargspec",
"numpy.zeros",
"graphgen.unweighted_undirected_graph_generator.GenerateUnweightedUndirectedGraph",
"networkx.Graph",
"graphgen.weighted_directed_graph_generator.GenerateWeightedDirectedGraph",
"graphgen.unweighted_directed_graph_generator.GenerateUnweightedDirectedGraph",
"grap... | [((2686, 2917), 'graphgen.weighted_undirected_graph_generator.GenerateWeightedUndirectedGraph', 'GenerateWeightedUndirectedGraph', (['num_nodes', 'average_k', 'max_degree', 'mut', 'muw', 'com_size_min', 'com_size_max', 'seed', 'tau', 'tau2', 'overlapping_nodes', 'overlap_membership', 'fixed_range', 'excess', 'defect', ... |
from typing import Tuple, Union
import numpy as np
import torch
from torchsparse.utils import make_ntuple
__all__ = ['get_kernel_offsets']
def get_kernel_offsets(size: Union[int, Tuple[int, ...]],
stride: Union[int, Tuple[int, ...]] = 1,
dilation: Union[int, Tuple[int,... | [
"numpy.arange",
"numpy.prod",
"torch.tensor",
"torchsparse.utils.make_ntuple"
] | [((404, 429), 'torchsparse.utils.make_ntuple', 'make_ntuple', (['size'], {'ndim': '(3)'}), '(size, ndim=3)\n', (415, 429), False, 'from torchsparse.utils import make_ntuple\n'), ((443, 470), 'torchsparse.utils.make_ntuple', 'make_ntuple', (['stride'], {'ndim': '(3)'}), '(stride, ndim=3)\n', (454, 470), False, 'from tor... |
import numpy as np
import utils
import glob
from natsort import natsorted
import pandas as pd
from scipy.io.wavfile import read
from splices2npz import load_video, process_audio
"""
Pre-processes data considering already spliced video and audio only
Synchronize video and audio
"""
__author__ = "<NAME>"
is... | [
"utils.ensure_dir",
"numpy.transpose",
"utils.project_dir_name",
"numpy.zeros",
"splices2npz.process_audio",
"scipy.io.wavfile.read",
"numpy.shape",
"numpy.savez_compressed",
"numpy.array",
"splices2npz.load_video",
"glob.glob",
"natsort.natsorted"
] | [((4001, 4045), 'numpy.transpose', 'np.transpose', (['frame_hsv_arr', '(0, 1, 4, 2, 3)'], {}), '(frame_hsv_arr, (0, 1, 4, 2, 3))\n', (4013, 4045), True, 'import numpy as np\n'), ((4113, 4167), 'splices2npz.process_audio', 'process_audio', (['audio_arr'], {'pad_size': "params['audio_len']"}), "(audio_arr, pad_size=param... |
# -*- coding: utf-8 -*-
from __future__ import division, print_function
from __future__ import absolute_import, unicode_literals
import scipy.signal as signal
import scipy.optimize as optimize
import numpy as np
import operator
import warnings
# TODO: DOCUMENT
__all__ = [
'LineScan'
]
class LineScan(list):
... | [
"numpy.linsapce",
"numpy.floor",
"numpy.ones",
"numpy.clip",
"numpy.exp",
"numpy.fft.fft",
"numpy.max",
"numpy.linspace",
"numpy.fft.ifft",
"numpy.median",
"numpy.asarray",
"scipy.signal.cspline1d_eval",
"scipy.optimize.curve_fit",
"numpy.min",
"scipy.signal.resample",
"numpy.zeros",
... | [((3839, 3863), 'numpy.array', 'np.array', (['([1.0] * window)'], {}), '([1.0] * window)\n', (3847, 3863), True, 'import numpy as np\n'), ((4746, 4777), 'numpy.array', 'np.array', (['self'], {'dtype': '"""float32"""'}), "(self, dtype='float32')\n", (4754, 4777), True, 'import numpy as np\n'), ((4793, 4804), 'numpy.max'... |
import numpy as np
DATASETS_2D = ['data/dane_2D_1.txt', 'data/dane_2D_2.txt', 'data/dane_2D_3.txt', 'data/dane_2D_4.txt',
'data/dane_2D_5.txt', 'data/dane_2D_6.txt', 'data/dane_2D_7.txt', 'data/dane_2D_8.txt']
DATASETS_2D_Ks = [10, 10, 5, 5, 37, 17, 5, 5]
from sklearn.preprocessing import MinMaxScaler... | [
"sklearn.preprocessing.MinMaxScaler",
"numpy.loadtxt",
"numpy.hsplit"
] | [((367, 387), 'numpy.loadtxt', 'np.loadtxt', (['filename'], {}), '(filename)\n', (377, 387), True, 'import numpy as np\n'), ((399, 420), 'numpy.hsplit', 'np.hsplit', (['data', '[-1]'], {}), '(data, [-1])\n', (408, 420), True, 'import numpy as np\n'), ((517, 537), 'numpy.loadtxt', 'np.loadtxt', (['filename'], {}), '(fil... |
import numpy as np
from scipy.misc import derivative
import scipy.optimize as opt
import scipy.stats as st
def check_grad(mod, p0, dx=1e-3):
"""Compare the gradient from mod.loglikelihood_derivative
against numerical derivative.
Tests that the derivatie codes are correct
Args:
mod: the model... | [
"scipy.optimize.minimize",
"numpy.abs",
"numpy.random.randn",
"emcee.EnsembleSampler",
"numpy.zeros",
"numpy.expand_dims",
"numpy.clip",
"numpy.mean",
"numpy.array",
"numpy.diag",
"numpy.round",
"scipy.stats.chi2.cdf"
] | [((515, 527), 'numpy.array', 'np.array', (['p0'], {}), '(p0)\n', (523, 527), True, 'import numpy as np\n'), ((780, 792), 'numpy.array', 'np.array', (['g0'], {}), '(g0)\n', (788, 792), True, 'import numpy as np\n'), ((3139, 3197), 'emcee.EnsembleSampler', 'emcee.EnsembleSampler', (['nwalkers', 'ndim', 'logProb'], {'args... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Script for benchmarking HadRGD (with no line search) against several commonly
used methods: PGD, Frank-Wolfe (no line search), Mirror Descent.
Using smaller problem sizes as several prior algorithms do not scale well.
Can toggle three solution types:
1. x_true i... | [
"pickle.dump",
"numpy.ceil",
"Riemannian_algs.RGD",
"numpy.zeros",
"copt.utils.Trace",
"time.time",
"numpy.random.randint",
"PGD_Variants.PGD",
"numpy.random.rand",
"numpy.dot",
"numpy.sqrt"
] | [((878, 918), 'numpy.zeros', 'np.zeros', (['(num_dims, num_trials_per_dim)'], {}), '((num_dims, num_trials_per_dim))\n', (886, 918), True, 'import numpy as np\n'), ((930, 970), 'numpy.zeros', 'np.zeros', (['(num_dims, num_trials_per_dim)'], {}), '((num_dims, num_trials_per_dim))\n', (938, 970), True, 'import numpy as n... |
""" This file defines policy optimization for a tensorflow policy. """
import copy
import json
import logging
import os
import pickle
import sys
import tempfile
import time
import traceback
import numpy as np
import tensorflow as tf
from gps.algorithm.policy_opt.config import POLICY_OPT_TF
from gps.algorithm.policy_o... | [
"numpy.argmax",
"tensorflow.get_collection",
"numpy.floor",
"numpy.ones",
"tensorflow.ConfigProto",
"tensorflow.Variable",
"numpy.mean",
"sys.exc_info",
"numpy.diag",
"tensorflow.GPUOptions",
"numpy.prod",
"gps.algorithm.policy_opt.policy_opt.PolicyOpt.__init__",
"tensorflow.placeholder_with... | [((1068, 1096), 'copy.deepcopy', 'copy.deepcopy', (['POLICY_OPT_TF'], {}), '(POLICY_OPT_TF)\n', (1081, 1096), False, 'import copy\n'), ((1299, 1339), 'gps.algorithm.policy_opt.policy_opt.PolicyOpt.__init__', 'PolicyOpt.__init__', (['self', 'config', 'dO', 'dU'], {}), '(self, config, dO, dU)\n', (1317, 1339), False, 'fr... |
import numpy as np
import params
from CommClient import CommClient
from TFTrainer import TFTrainer as TR
def compute_norm(data):
return sum([np.sum(item**2) for item in data])
"""
@brief: 极坐标转欧氏坐标
@param [polar_coordinate]: 要转换的极坐标 | 都是用普通列表表示的坐标
@return: 转换结果(欧氏坐标)
"""
def polar2euclid(polar_coordi... | [
"numpy.math.atan2",
"numpy.sum",
"CommClient.CommClient",
"numpy.math.sqrt",
"numpy.math.cos",
"TFTrainer.TFTrainer",
"numpy.math.sin"
] | [((608, 675), 'numpy.math.sqrt', 'np.math.sqrt', (['(euclid_coordinate[0] ** 2 + euclid_coordinate[1] ** 2)'], {}), '(euclid_coordinate[0] ** 2 + euclid_coordinate[1] ** 2)\n', (620, 675), True, 'import numpy as np\n'), ((673, 730), 'numpy.math.atan2', 'np.math.atan2', (['euclid_coordinate[1]', 'euclid_coordinate[0]'],... |
# Copyright 2018 Recruit Communications 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 a... | [
"cpp_pyqubo.SubH",
"numpy.log2",
"pyqubo.array.Array.create"
] | [((2135, 2199), 'pyqubo.array.Array.create', 'Array.create', (['label'], {'shape': 'self._num_variables', 'vartype': '"""BINARY"""'}), "(label, shape=self._num_variables, vartype='BINARY')\n", (2147, 2199), False, 'from pyqubo.array import Array\n'), ((2404, 2424), 'cpp_pyqubo.SubH', 'SubH', (['express', 'label'], {}),... |
import numpy as np
data_path = "data/problem_11.txt"
# data_path = "data/problem_11_test.txt"
data = []
with open(data_path, "r") as f:
for line in f:
data.append([int(char) for char in line.rstrip()])
data = np.array(data)
print("Initial state:")
def get_neighborhood_view(state, y, x):
# return a v... | [
"numpy.product",
"numpy.where",
"numpy.array"
] | [((223, 237), 'numpy.array', 'np.array', (['data'], {}), '(data)\n', (231, 237), True, 'import numpy as np\n'), ((1289, 1318), 'numpy.product', 'np.product', (['data_part_2.shape'], {}), '(data_part_2.shape)\n', (1299, 1318), True, 'import numpy as np\n'), ((525, 544), 'numpy.where', 'np.where', (['(state > 9)'], {}), ... |
import numpy as np
import pandas as pd
import tensorflow as tf
from matplotlib import pyplot as plt
from tensorflow.keras import layers
pd.options.display.max_rows = 10
pd.options.display.float_format = "{:.1f}".format
tf.keras.backend.set_floatx('float32')
print("Modules Imported")
train_df = pd.read_cs... | [
"tensorflow.keras.layers.Dense",
"pandas.read_csv",
"matplotlib.pyplot.figure",
"tensorflow.keras.models.Sequential",
"tensorflow.keras.metrics.BinaryAccuracy",
"tensorflow.keras.optimizers.RMSprop",
"pandas.DataFrame",
"tensorflow.keras.layers.DenseFeatures",
"tensorflow.keras.metrics.Precision",
... | [((228, 266), 'tensorflow.keras.backend.set_floatx', 'tf.keras.backend.set_floatx', (['"""float32"""'], {}), "('float32')\n", (255, 266), True, 'import tensorflow as tf\n'), ((310, 411), 'pandas.read_csv', 'pd.read_csv', (['"""https://download.mlcc.google.com/mledu-datasets/california_housing_train.csv"""'], {}), "(\n ... |
# -*- encoding: utf-8 -*-
# Module iaptrans
from numpy import *
def iaptrans(f,t):
import numpy as np
g = np.empty(f.shape)
if f.ndim == 1:
W = f.shape[0]
col = arange(W)
g[:] = f[(col-t)%W]
elif f.ndim == 2:
H,W = f.shape
rr,cc = t
row,col = np.indices(f.shape)
... | [
"numpy.empty",
"ia636.iapconv",
"numpy.indices"
] | [((116, 133), 'numpy.empty', 'np.empty', (['f.shape'], {}), '(f.shape)\n', (124, 133), True, 'import numpy as np\n'), ((739, 752), 'ia636.iapconv', 'iapconv', (['f', 'h'], {}), '(f, h)\n', (746, 752), False, 'from ia636 import iapconv\n'), ((297, 316), 'numpy.indices', 'np.indices', (['f.shape'], {}), '(f.shape)\n', (3... |
import solver.solutionInstance as solutionInstance
import numpy as np
import random
def removeBestGroupSpecialistMeeting(self: solutionInstance.SolutionInstance):
groupOverflows = np.sum(self.meetByPeriodByDayBySpecialistByGroup, axis=(2, 3)) - self.classesAndResources.groupsNeeds
maxOverflow = np.max(groupOv... | [
"solver.solutionInstance.SolutionInstance",
"numpy.sum",
"numpy.copy",
"numpy.max",
"numpy.where"
] | [((306, 328), 'numpy.max', 'np.max', (['groupOverflows'], {}), '(groupOverflows)\n', (312, 328), True, 'import numpy as np\n'), ((398, 437), 'numpy.where', 'np.where', (['(groupOverflows == maxOverflow)'], {}), '(groupOverflows == maxOverflow)\n', (406, 437), True, 'import numpy as np\n'), ((658, 752), 'numpy.where', '... |
import os
import time
import s3fs
import boto3
import json
import argparse
import pandas as pd
import numpy as np
import pathlib
import sagemaker
from sagemaker.feature_store.feature_group import FeatureGroup
# Parse argument variables passed via the CreateDataset processing step
parser = argparse.ArgumentParser()
par... | [
"sagemaker.feature_store.feature_group.FeatureGroup",
"json.dump",
"argparse.ArgumentParser",
"boto3.Session",
"boto3.client",
"boto3.setup_default_session",
"pandas.read_csv",
"sagemaker.get_execution_role",
"time.time",
"time.sleep",
"pathlib.Path",
"os._exit",
"numpy.array",
"sagemaker.... | [((291, 316), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (314, 316), False, 'import argparse\n'), ((758, 805), 'boto3.setup_default_session', 'boto3.setup_default_session', ([], {'region_name': 'region'}), '(region_name=region)\n', (785, 805), False, 'import boto3\n'), ((821, 854), 'boto3.S... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 1 10:49:09 2021
@author: user
"""
import numpy as np
from copy import deepcopy
class EKF_JansenRit:
def __init__(self, X, P, Q, R, UT, dt):
self.X = X
self.P = P
self.Q = Q
self.R = R
self.UT = UT
... | [
"numpy.diag",
"copy.deepcopy",
"numpy.log",
"numpy.zeros",
"numpy.hstack",
"numpy.array",
"numpy.linalg.inv",
"numpy.linalg.slogdet",
"numpy.exp",
"numpy.eye",
"numpy.linalg.pinv",
"numpy.vstack"
] | [((1022, 1038), 'numpy.zeros', 'np.zeros', (['(3, 3)'], {}), '((3, 3))\n', (1030, 1038), True, 'import numpy as np\n'), ((1054, 1063), 'numpy.eye', 'np.eye', (['(3)'], {}), '(3)\n', (1060, 1063), True, 'import numpy as np\n'), ((1080, 1113), 'numpy.diag', 'np.diag', (['[-2 * a, -2 * a, -2 * b]'], {}), '([-2 * a, -2 * a... |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# <NAME>
# Created : 2018-12-08
# Last Modified: 2018-12-08
# Vanderbilt University
from __future__ import absolute_import, division, print_function
__author__ = ['<NAME>']
__copyright__ = ["Copyright 2018 <NAME>, "]
__email__ = ['<EMAIL>']
__maintainer__ ... | [
"cosmo_utils.utils.file_utils.File_Exists",
"os.remove",
"numpy.abs",
"argparse.ArgumentParser",
"numpy.sum",
"matplotlib.pyplot.clf",
"pandas.read_csv",
"numpy.floor",
"cosmo_utils.utils.web_utils.url_checker",
"numpy.ones",
"matplotlib.pyplot.figure",
"cosmo_utils.utils.file_utils.Program_Ms... | [((1037, 1058), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (1051, 1058), False, 'import matplotlib\n'), ((1128, 1155), 'matplotlib.pyplot.rc', 'plt.rc', (['"""text"""'], {'usetex': '(True)'}), "('text', usetex=True)\n", (1134, 1155), True, 'import matplotlib.pyplot as plt\n'), ((3661, 3747), ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.