code stringlengths 31 1.05M | apis list | extract_api stringlengths 97 1.91M |
|---|---|---|
#**
#** Testharness to generate various different types of arrays of integers
#** and then sort them using various sorts.
#**
#** Each sort is run REPEATS times, with the first result discarded,
#** and the last REPEATS-1 runs averaged to give the running time.
#**
#** Author of java version: <NAME> (<EMAIL>)
#** Date:... | [
"timeit.default_timer",
"DSAsorts.mergeSort",
"DSAsorts.insertionSort",
"DSAsorts.quickSort",
"random.random",
"numpy.arange",
"DSAsorts.bubbleSort",
"DSAsorts.selectionSort"
] | [((1424, 1446), 'numpy.arange', 'np.arange', (['(1)', '(n + 1)', '(1)'], {}), '(1, n + 1, 1)\n', (1433, 1446), True, 'import numpy as np\n'), ((2436, 2458), 'DSAsorts.bubbleSort', 'DSAsorts.bubbleSort', (['A'], {}), '(A)\n', (2455, 2458), False, 'import DSAsorts\n'), ((2501, 2526), 'DSAsorts.selectionSort', 'DSAsorts.s... |
# library
# %%
import numpy as np
import pandas as pd
import os
# from PIL import Image
# from wordcloud import WordCloud, STOPWORDS, ImageColorGenerator
# %%
git_dir = '/home/ubuntu/feature-encoding'
fname = os.path.join(git_dir, 'viz', 'pc_loadings', 'twovid_pca.npy')
pca = pd.DataFrame(np.load(fname).T)
print(pca... | [
"pandas.read_csv",
"numpy.load",
"os.path.join"
] | [((212, 273), 'os.path.join', 'os.path.join', (['git_dir', '"""viz"""', '"""pc_loadings"""', '"""twovid_pca.npy"""'], {}), "(git_dir, 'viz', 'pc_loadings', 'twovid_pca.npy')\n", (224, 273), False, 'import os\n'), ((530, 600), 'os.path.join', 'os.path.join', (['git_dir', '"""viz"""', '"""pc_loadings"""', '"""kinetics_40... |
import argparse
from time import time
import os
import cv2
import logging
import numpy as np
from OpenPersonDetector import OpenPersonDetector
logging.basicConfig()
logger = logging.getLogger("DetectorPreviewLog")
logger.setLevel(logging.INFO)
if __name__ == "__main__":
parser = argparse.ArgumentParser(descr... | [
"cv2.resize",
"argparse.ArgumentParser",
"logging.basicConfig",
"cv2.waitKey",
"os.path.realpath",
"time.time",
"cv2.VideoCapture",
"cv2.namedWindow",
"OpenPersonDetector.OpenPersonDetector",
"numpy.array",
"cv2.rectangle",
"cv2.imshow",
"logging.getLogger"
] | [((149, 170), 'logging.basicConfig', 'logging.basicConfig', ([], {}), '()\n', (168, 170), False, 'import logging\n'), ((180, 219), 'logging.getLogger', 'logging.getLogger', (['"""DetectorPreviewLog"""'], {}), "('DetectorPreviewLog')\n", (197, 219), False, 'import logging\n'), ((291, 361), 'argparse.ArgumentParser', 'ar... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@Author : <NAME>
@Contact : <EMAIL>
@Time : 2021/11/25 20:50
@File : cfg.py
@Software: PyCharm
@Desc :
"""
import numpy as np
from alchemy_cat.py_tools import Cfg2Tune, Param2Tune
def func_a(goo):
return goo
def func_b(goo):
return func_a(goo)
... | [
"numpy.array",
"alchemy_cat.py_tools.Cfg2Tune",
"alchemy_cat.py_tools.Param2Tune"
] | [((406, 416), 'alchemy_cat.py_tools.Cfg2Tune', 'Cfg2Tune', ([], {}), '()\n', (414, 416), False, 'from alchemy_cat.py_tools import Cfg2Tune, Param2Tune\n'), ((486, 530), 'alchemy_cat.py_tools.Param2Tune', 'Param2Tune', (['[func_a, func_b, func_c, func_d]'], {}), '([func_a, func_b, func_c, func_d])\n', (496, 530), False,... |
import torch
from torch.utils.data import TensorDataset, DataLoader
import numpy as np
from matplotlib import pyplot as plt
from IPython.display import clear_output
import time
from typing import Dict
from torch_models.pls_ae import PLS_AE
from torch_models.pls_ccm import PLS_CCM
class PLS_AETrainer:
def __ini... | [
"matplotlib.pyplot.show",
"torch.no_grad",
"time.time",
"numpy.array",
"IPython.display.clear_output",
"matplotlib.pyplot.subplots"
] | [((1629, 1676), 'matplotlib.pyplot.subplots', 'plt.subplots', ([], {'nrows': '(1)', 'ncols': '(2)', 'figsize': '(12, 8)'}), '(nrows=1, ncols=2, figsize=(12, 8))\n', (1641, 1676), True, 'from matplotlib import pyplot as plt\n'), ((1685, 1703), 'IPython.display.clear_output', 'clear_output', (['(True)'], {}), '(True)\n',... |
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as func
from torch.utils.data import Dataset
from torchvision.datasets import ImageFolder
from torchsupport.modules.basic import MLP
from torchsupport.training.gan import NormalizedDiversityGANTraining
from torchsupport.training.transla... | [
"torchsupport.training.translation.PairedGANTraining.__init__",
"torchsupport.training.gan.NormalizedDiversityGANTraining.__init__",
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.randn",
"torch.cat",
"torchvision.datasets.ImageFolder",
"torch.nn.functional.adaptive_avg_pool2d",
"torch.nn.BatchNorm2d",
... | [((453, 470), 'torchvision.datasets.ImageFolder', 'ImageFolder', (['path'], {}), '(path)\n', (464, 470), False, 'from torchvision.datasets import ImageFolder\n'), ((859, 903), 'torch.nn.functional.adaptive_max_pool2d', 'func.adaptive_max_pool2d', (['(1 - edge)', '(28, 28)'], {}), '(1 - edge, (28, 28))\n', (883, 903), T... |
#!/usr/bin/python3.5
# -*-coding: utf-8 -*
from collections import defaultdict
import threading
import numpy as np
import copy
from LspAlgorithms.GeneticAlgorithms.Gene import Gene
from LspInputDataReading.LspInputDataInstance import InputDataInstance
import concurrent.futures
from ParameterSearch.ParameterData impor... | [
"collections.defaultdict",
"LspAlgorithms.GeneticAlgorithms.Gene.Gene",
"threading.Lock",
"numpy.array_split"
] | [((372, 398), 'collections.defaultdict', 'defaultdict', (['(lambda : None)'], {}), '(lambda : None)\n', (383, 398), False, 'from collections import defaultdict\n'), ((3615, 3650), 'numpy.array_split', 'np.array_split', (['genesList', 'nThreads'], {}), '(genesList, nThreads)\n', (3629, 3650), True, 'import numpy as np\n... |
# Copyright 2018 <NAME> <<EMAIL>>
#
# SPDX-License-Identifier: MIT
import os
from tempfile import mktemp
import numpy as np
import pytest
from pgimp.GimpScriptRunner import GimpScriptRunner, GimpScriptException, GimpScriptExecutionTimeoutException, \
python2_pythonpath
from pgimp.util import file
gsr = GimpScri... | [
"os.remove",
"os.popen",
"pgimp.util.file.relative_to",
"pytest.raises",
"pgimp.GimpScriptRunner.GimpScriptRunner",
"pgimp.GimpScriptRunner.python2_pythonpath",
"pgimp.util.file.append",
"tempfile.mktemp",
"numpy.all"
] | [((312, 330), 'pgimp.GimpScriptRunner.GimpScriptRunner', 'GimpScriptRunner', ([], {}), '()\n', (328, 330), False, 'from pgimp.GimpScriptRunner import GimpScriptRunner, GimpScriptException, GimpScriptExecutionTimeoutException, python2_pythonpath\n'), ((372, 380), 'tempfile.mktemp', 'mktemp', ([], {}), '()\n', (378, 380)... |
import numpy as np
from flask import Flask, request, jsonify
import keras
from keras.models import Sequential, Model
from keras.preprocessing.text import Tokenizer, text_to_word_sequence
from keras.preprocessing.sequence import pad_sequences
import tensorflow as tf
from load import *
import os, re
app = Flask(__name__)... | [
"keras.preprocessing.sequence.pad_sequences",
"numpy.array2string",
"flask.Flask",
"pickle.load",
"re.compile"
] | [((305, 320), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (310, 320), False, 'from flask import Flask, request, jsonify\n'), ((479, 498), 're.compile', 're.compile', (['"""[\\\\W]"""'], {}), "('[\\\\W]')\n", (489, 498), False, 'import os, re\n'), ((511, 537), 're.compile', 're.compile', (['"""[^a-z0-1\\... |
# Python imports.
from collections import deque
import random
import numpy as np
# Other imports.
from simple_rl.agents.func_approx.ddpg.hyperparameters import BUFFER_SIZE, BATCH_SIZE
class ReplayBuffer(object):
def __init__(self, buffer_size=BUFFER_SIZE, name_buffer='', seed=0):
self.buffer_size = buffer... | [
"random.sample",
"numpy.random.seed",
"random.seed",
"collections.deque"
] | [((373, 398), 'collections.deque', 'deque', ([], {'maxlen': 'buffer_size'}), '(maxlen=buffer_size)\n', (378, 398), False, 'from collections import deque\n'), ((465, 482), 'random.seed', 'random.seed', (['seed'], {}), '(seed)\n', (476, 482), False, 'import random\n'), ((491, 511), 'numpy.random.seed', 'np.random.seed', ... |
import numpy as np
import pandas as pd
__all__ = ['svp', 'comparison_chart', 'reference_table', 'Boegel', 'Bolton', 'Buck', 'Goff1957',
'GoffGratch', 'FOEEWMO', 'HylandWexler', 'IAPWS', 'MurphyKoop', 'Sonntag', 'Wright']
def svp(t, method='HylandWexler', p=None, **kwargs):
"""
Saturation water vap... | [
"numpy.log",
"numpy.tanh",
"numpy.asarray",
"numpy.where",
"numpy.exp",
"numpy.log10"
] | [((2564, 2651), 'numpy.asarray', 'np.asarray', (['[1.0813475449, 38.005139487, 611.15347506, 4246.6883405, 19945.801925]'], {}), '([1.0813475449, 38.005139487, 611.15347506, 4246.6883405, \n 19945.801925])\n', (2574, 2651), True, 'import numpy as np\n'), ((2655, 2708), 'numpy.asarray', 'np.asarray', (['[150, 180, 21... |
import information_theory.config as config
from collections import Counter
import numpy as np
np.seterr(divide='ignore', invalid='ignore')
def entropy(P):
"""
Calculates entropy in probability distribution P.
Args:
P (np.array): Probability distribution.
Returns:
float: Entropy of... | [
"numpy.divide",
"numpy.nansum",
"numpy.multiply",
"numpy.seterr",
"numpy.tensordot",
"numpy.log2",
"numpy.zeros",
"numpy.histogram",
"numpy.digitize"
] | [((97, 141), 'numpy.seterr', 'np.seterr', ([], {'divide': '"""ignore"""', 'invalid': '"""ignore"""'}), "(divide='ignore', invalid='ignore')\n", (106, 141), True, 'import numpy as np\n'), ((1085, 1109), 'numpy.nansum', 'np.nansum', (['P_nan'], {'axis': '(1)'}), '(P_nan, axis=1)\n', (1094, 1109), True, 'import numpy as n... |
"""
IO module for train/test regression datasets
"""
import numpy as np
import pandas as pd
import os
import h5py
import tensorflow as tf
def generate_cubic(x, noise=False):
x = x.astype(np.float32)
y = x**3
if noise:
sigma = 3 * np.ones_like(x)
else:
sigma = np.zeros_like(x)
r =... | [
"h5py.File",
"numpy.zeros_like",
"numpy.ones_like",
"pandas.read_csv",
"tensorflow.convert_to_tensor",
"os.path.dirname",
"numpy.random.RandomState",
"pandas.read_excel",
"numpy.array",
"numpy.random.normal",
"pandas.read_pickle",
"numpy.round",
"numpy.squeeze",
"os.path.join"
] | [((516, 541), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (531, 541), False, 'import os\n'), ((553, 585), 'os.path.join', 'os.path.join', (['vb_dir', '"""data/uci"""'], {}), "(vb_dir, 'data/uci')\n", (565, 585), False, 'import os\n'), ((2296, 2350), 'os.path.join', 'os.path.join', (['data_... |
import numpy as np
from scipy.sparse import csr_matrix
from yaglm.solver.base import GlmSolverWithPath
from yaglm.autoassign import autoassign
from yaglm.opt.algo.zhu_admm import solve
from yaglm.opt.from_config.input_loss import get_glm_input_loss
from yaglm.opt.from_config.mat_and_func import get_mat_and_func
from ... | [
"yaglm.utils.get_shapes_from",
"yaglm.opt.algo.zhu_admm.solve",
"yaglm.utils.is_multi_response",
"yaglm.sparse_utils.safe_hstack",
"numpy.zeros",
"yaglm.opt.utils.decat_coef_inter_vec",
"numpy.ones",
"yaglm.opt.from_config.mat_and_func.get_mat_and_func",
"scipy.sparse.csr_matrix",
"yaglm.opt.utils... | [((2843, 2854), 'numpy.zeros', 'np.zeros', (['(3)'], {}), '(3)\n', (2851, 2854), True, 'import numpy as np\n'), ((2926, 2962), 'yaglm.opt.from_config.input_loss.get_glm_input_loss', 'get_glm_input_loss', ([], {'config': 'loss', 'y': 'y'}), '(config=loss, y=y)\n', (2944, 2962), False, 'from yaglm.opt.from_config.input_l... |
import os
import sys
import random
import numpy as np
import math
import schemasim.simulators.simulator as simulator
class PhysicsSimulator(simulator.Simulator):
# This class should not be used directly; it is a base for PhysicsSimulator3D, PhysicsSimulator2D, which themselves are bases for classes
# interf... | [
"numpy.arange"
] | [((2833, 2889), 'numpy.arange', 'np.arange', (['(mass * (1.0 / 10.0))', '(mass * 30.0)', '(mass / 10.0)'], {}), '(mass * (1.0 / 10.0), mass * 30.0, mass / 10.0)\n', (2842, 2889), True, 'import numpy as np\n'), ((3111, 3136), 'numpy.arange', 'np.arange', (['(0.0)', '(1.0)', '(0.01)'], {}), '(0.0, 1.0, 0.01)\n', (3120, 3... |
import torch
import unittest
from cnns.nnlib.pytorch_layers.round import Round
from cnns.nnlib.utils.arguments import Arguments
import numpy as np
class TestRound(unittest.TestCase):
def test_round(self):
# uncomment the line below to run on gpu
# device = torch.device("conv1D_cuda:0")
#... | [
"unittest.main",
"cnns.nnlib.utils.arguments.Arguments",
"numpy.array",
"cnns.nnlib.pytorch_layers.round.Round",
"torch.device",
"torch.tensor"
] | [((1564, 1579), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1577, 1579), False, 'import unittest\n'), ((424, 435), 'cnns.nnlib.utils.arguments.Arguments', 'Arguments', ([], {}), '()\n', (433, 435), False, 'from cnns.nnlib.utils.arguments import Arguments\n'), ((652, 671), 'torch.device', 'torch.device', (['"""... |
import numpy as np
from PIL import ImageDraw
import os
import os.path as osp
def make_label_dict(path):
"""make label dictionary
Parameters
----------
path : str
path to class names file
Returns
-------
dict
{'person': 0, 'car': 1, ...}
"""
label_dict = d... | [
"PIL.ImageDraw.Draw",
"os.path.join",
"numpy.array",
"numpy.argmax"
] | [((992, 1011), 'PIL.ImageDraw.Draw', 'ImageDraw.Draw', (['img'], {}), '(img)\n', (1006, 1011), False, 'from PIL import ImageDraw\n'), ((340, 354), 'os.path.join', 'osp.join', (['path'], {}), '(path)\n', (348, 354), True, 'import os.path as osp\n'), ((1113, 1137), 'numpy.array', 'np.array', (['confident_bbox'], {}), '(c... |
import matplotlib.pyplot as plt
import numpy as np
import asyncio
import imutils
import typing
import keras
import time
import cv2
import os
from tensorflow.keras.preprocessing.image import img_to_array, load_img, ImageDataGenerator
from tensorflow.keras.layers import AveragePooling2D, Dropout, Flatten, Dense, Input
f... | [
"matplotlib.pyplot.title",
"tensorflow.keras.preprocessing.image.ImageDataGenerator",
"sklearn.preprocessing.LabelBinarizer",
"numpy.argmax",
"tensorflow.keras.layers.Dense",
"sklearn.model_selection.train_test_split",
"tensorflow.keras.applications.mobilenet_v2.preprocess_input",
"matplotlib.pyplot.s... | [((1313, 1324), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (1322, 1324), False, 'import os\n'), ((2173, 2204), 'numpy.array', 'np.array', (['data'], {'dtype': '"""float32"""'}), "(data, dtype='float32')\n", (2181, 2204), True, 'import numpy as np\n'), ((2298, 2377), 'sklearn.model_selection.train_test_split', 'train_t... |
import torch, pickle, scipy.stats, scipy.optimize
import numpy as np
import pandas as pd
import lstm_utils as u
import lstm_constants as c
from torch import nn
from torch.utils.data import Dataset, DataLoader
# for each training example:
# get sentence vectors, if pad or unknown, assign 0 vector
# do linear progra... | [
"lstm_utils.vector_list",
"numpy.nan_to_num",
"numpy.zeros",
"lstm_utils.augmented",
"lstm_utils.embeddings_to_disk",
"numpy.array"
] | [((586, 615), 'lstm_utils.augmented', 'u.augmented', (['c.TRAIN_VAL_PATH'], {}), '(c.TRAIN_VAL_PATH)\n', (597, 615), True, 'import lstm_utils as u\n'), ((710, 732), 'lstm_utils.embeddings_to_disk', 'u.embeddings_to_disk', ([], {}), '()\n', (730, 732), True, 'import lstm_utils as u\n'), ((1170, 1204), 'lstm_utils.vector... |
import pandas as pd
import numpy as np
def get_exam_schedule(filename, trimester, definite_splits=[], restricted_splits=[], infer_splits=True,
number_exam_days=4, number_random_trials=5, random_seed=42):
"""
Creates an exam schedule with few conflicts.
Parameters:
-----------
filename (st... | [
"pandas.read_csv",
"numpy.random.seed"
] | [((1377, 1404), 'numpy.random.seed', 'np.random.seed', (['random_seed'], {}), '(random_seed)\n', (1391, 1404), True, 'import numpy as np\n'), ((2949, 2970), 'pandas.read_csv', 'pd.read_csv', (['filename'], {}), '(filename)\n', (2960, 2970), True, 'import pandas as pd\n')] |
''' This file will read in the Peclet number and give the predicted swim diffusivity '''
import sys
import os
import numpy as np
import math
import matplotlib.pyplot as plt
#pe = float(sys.argv[1])
def swimDiffusivity(peclet):
'''In our implementation Pe = v_p and kT = 1.0'''
'''D_{Swim} = v_{p}^{2} * tau_{R... | [
"numpy.zeros_like",
"matplotlib.pyplot.show",
"matplotlib.pyplot.plot",
"numpy.arange",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel"
] | [((395, 421), 'numpy.arange', 'np.arange', (['(0)', '(500.0)', '(0.001)'], {}), '(0, 500.0, 0.001)\n', (404, 421), True, 'import numpy as np\n'), ((427, 444), 'numpy.zeros_like', 'np.zeros_like', (['xs'], {}), '(xs)\n', (440, 444), True, 'import numpy as np\n'), ((507, 529), 'matplotlib.pyplot.plot', 'plt.plot', (['xs'... |
import pickle
import tensorflow as tf
import numpy as np
import yaml
import json
# import os
def save_pickle_file(outlist, filepath):
"""Save to pickle file."""
with open(filepath, 'wb') as f:
pickle.dump(outlist, f)
def load_pickle_file(filepath):
"""Load pickle file."""
wit... | [
"json.dump",
"pickle.dump",
"json.load",
"yaml.dump",
"pickle.load",
"yaml.safe_load",
"numpy.concatenate"
] | [((222, 245), 'pickle.dump', 'pickle.dump', (['outlist', 'f'], {}), '(outlist, f)\n', (233, 245), False, 'import pickle\n'), ((368, 382), 'pickle.load', 'pickle.load', (['f'], {}), '(f)\n', (379, 382), False, 'import pickle\n'), ((530, 559), 'json.dump', 'json.dump', (['outlist', 'json_file'], {}), '(outlist, json_file... |
# check https://github.com/kuangliu/pytorch-cifar
# TODO --resume
from __future__ import print_function
import argparse
import torch
from tqdm import tqdm
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torchvision import datasets, transforms
from torch.optim.lr_scheduler import S... | [
"os.mkdir",
"torch.optim.lr_scheduler.StepLR",
"argparse.ArgumentParser",
"seaborn.heatmap",
"numpy.sum",
"torch.nn.functional.dropout",
"json.dumps",
"torchvision.datasets.CIFAR10",
"matplotlib.pyplot.figure",
"torch.set_num_threads",
"torch.set_num_interop_threads",
"torch.arange",
"torch.... | [((6771, 6803), 'sklearn.metrics.confusion_matrix', 'confusion_matrix', (['y_true', 'y_pred'], {}), '(y_true, y_pred)\n', (6787, 6803), False, 'from sklearn.metrics import confusion_matrix\n'), ((7430, 7473), 'signal.signal', 'signal.signal', (['signal.SIGINT', 'ctrlc_handler'], {}), '(signal.SIGINT, ctrlc_handler)\n',... |
###########################################################
# #
# Statistics Implementations #
# #
###########################################################
import numpy as np
... | [
"numpy.matrix",
"numpy.std",
"numpy.mean",
"numpy.array",
"numpy.exp",
"numpy.linalg.inv",
"numpy.sqrt"
] | [((3495, 3505), 'numpy.std', 'np.std', (['ri'], {}), '(ri)\n', (3501, 3505), True, 'import numpy as np\n'), ((1372, 1385), 'numpy.mean', 'np.mean', (['data'], {}), '(data)\n', (1379, 1385), True, 'import numpy as np\n'), ((2062, 2075), 'numpy.mean', 'np.mean', (['rsqd'], {}), '(rsqd)\n', (2069, 2075), True, 'import num... |
import numpy as np
import matplotlib.pyplot as plt
from openpyxl import Workbook
from openpyxl import load_workbook
LENGTH_BEGIN = 165
LENGTH_END = 270
LENGTH_STEP = 15
INTENSITY_BEGIN = 60
INTENSITY_END = 100
INTENSITY_STEP = 5
BPM = 70
BAUD_RATE = 115200
REPEATS = 1
RHYTH_STR = "101010"
PARTICIPANT_NUMBERS = [0, 1]
... | [
"matplotlib.pyplot.show",
"numpy.abs",
"numpy.copy",
"openpyxl.load_workbook",
"matplotlib.pyplot.colorbar",
"numpy.add",
"matplotlib.pyplot.subplots"
] | [((1283, 1328), 'openpyxl.load_workbook', 'load_workbook', (['"""2021_11_19_17_48_26_pp2.xlsx"""'], {}), "('2021_11_19_17_48_26_pp2.xlsx')\n", (1296, 1328), False, 'from openpyxl import load_workbook\n'), ((1706, 1729), 'numpy.abs', 'np.abs', (['(data_arr[2] - 6)'], {}), '(data_arr[2] - 6)\n', (1712, 1729), True, 'impo... |
import numpy as np
import scipy.stats as stats
class BS:
def __init__(self, S, K, T, r, sigma, option='call'):
self.S = S
self.K = K
self.T = T
self.r = r
self.sigma = sigma
self.option = option
def simulate(self):
# S: spot price
# K: strike ... | [
"numpy.zeros_like",
"numpy.maximum",
"numpy.log",
"numpy.polyfit",
"numpy.polyval",
"numpy.zeros",
"scipy.stats.norm.cdf",
"numpy.max",
"numpy.mean",
"numpy.exp",
"numpy.concatenate",
"numpy.sqrt"
] | [((1569, 1589), 'numpy.exp', 'np.exp', (['(-self.r * dt)'], {}), '(-self.r * dt)\n', (1575, 1589), True, 'import numpy as np\n'), ((3018, 3033), 'numpy.max', 'np.max', (['V[:, 1]'], {}), '(V[:, 1])\n', (3024, 3033), True, 'import numpy as np\n'), ((1681, 1701), 'numpy.zeros', 'np.zeros', (['(paths, 1)'], {}), '((paths,... |
#!/usr/bin/env python3
# Copyright 2021 by <NAME>, Robotic Systems Lab, ETH Zurich.
# All rights reserved.
# This file is released under the "BSD-3-Clause License".
# Please see the LICENSE file that has been included as part of this package.
import numpy as np
import torch
import numba
class ImageProjectionLayer(tor... | [
"torch.norm",
"torch.atan2",
"numpy.zeros",
"torch.argsort",
"torch.device",
"torch.zeros",
"torch.round",
"torch.from_numpy"
] | [((2615, 2744), 'torch.zeros', 'torch.zeros', (['(point_cloud.shape[0], point_cloud.shape[1] + 1, point_cloud.shape[2])'], {'device': 'self.device', 'requires_grad': '(False)'}), '((point_cloud.shape[0], point_cloud.shape[1] + 1, point_cloud.\n shape[2]), device=self.device, requires_grad=False)\n', (2626, 2744), Fa... |
from flask import Flask, request, jsonify
from flask_cors import CORS
import base64
import numpy as np
import cv2
import angle
from tf_pose.estimator import TfPoseEstimator
from tf_pose.networks import get_graph_path, model_wh
from sklearn.metrics import r2_score
from os.path import join
app = Flask(__name__)
CORS(ap... | [
"numpy.abs",
"tf_pose.networks.get_graph_path",
"flask_cors.CORS",
"flask.Flask",
"cv2.imdecode",
"sklearn.metrics.r2_score",
"numpy.isnan",
"angle.CalAngle",
"flask.jsonify",
"tf_pose.networks.model_wh",
"base64.urlsafe_b64decode",
"os.path.join"
] | [((297, 312), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (302, 312), False, 'from flask import Flask, request, jsonify\n'), ((313, 322), 'flask_cors.CORS', 'CORS', (['app'], {}), '(app)\n', (317, 322), False, 'from flask_cors import CORS\n'), ((404, 420), 'tf_pose.networks.model_wh', 'model_wh', (['res... |
# author: <NAME>
import os
import spacy
import numpy as np
from keras.utils import to_categorical
from .tokenization import FullTokenizer,SpacyTokenizer
from keras_preprocessing.sequence import pad_sequences
from .create_pretraining_data import create_training_instances
def create_pretraining_data_from_docs(docs, save... | [
"keras_preprocessing.sequence.pad_sequences",
"numpy.sum",
"numpy.savez",
"os.path.join",
"keras.utils.to_categorical"
] | [((3919, 3991), 'keras_preprocessing.sequence.pad_sequences', 'pad_sequences', (['tokens_ids'], {'maxlen': '(128)', 'padding': '"""post"""', 'truncating': '"""post"""'}), "(tokens_ids, maxlen=128, padding='post', truncating='post')\n", (3932, 3991), False, 'from keras_preprocessing.sequence import pad_sequences\n'), ((... |
import warnings ; warnings.filterwarnings('ignore')
import os
# os.environ is a mapping object where keys and values are strings that represent the process environments.
# order the GPU device by PCI_BUS_ID
os.environ['CUDA_DEVICE_ORDER']='PCI_BUS_ID'
# set os.environ['CUDA_VISIBLE_DEVICES'] = '0' to only use '/gpu:0... | [
"torch.distributions.Categorical",
"numpy.random.seed",
"numpy.sum",
"os.unlink",
"numpy.logspace",
"gym.wrappers.Monitor",
"torch.cat",
"gc.collect",
"matplotlib.pyplot.style.use",
"numpy.mean",
"torch.multiprocessing.Lock",
"os.path.join",
"IPython.display.HTML",
"numpy.set_printoptions"... | [((18, 51), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (41, 51), False, 'import warnings\n'), ((1712, 1741), 'os.path.join', 'os.path.join', (['""".."""', '"""results"""'], {}), "('..', 'results')\n", (1724, 1741), False, 'import os\n'), ((1829, 1861), 'matplotlib.pypl... |
import time
import os
import numpy as np
import matplotlib.pyplot as plt
from jvm_sys import jvm_sys
from pymemcache.client.base import Client
import traceback
from controltheoreticalmulti import CTControllerScaleXNode
import collections
class systemMnt():
rt = None
def __init__(self):
self.rt=col... | [
"controltheoreticalmulti.CTControllerScaleXNode",
"matplotlib.pyplot.axhline",
"jvm_sys.jvm_sys",
"numpy.sum",
"numpy.abs",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.legend",
"collections.deque",
"numpy.isnan",
"time.sleep",
"numpy.cumsum",
"matplotlib.pyplot.figure",
"pymemcache.client.b... | [((509, 530), 'jvm_sys.jvm_sys', 'jvm_sys', (['"""../"""', 'isCpu'], {}), "('../', isCpu)\n", (516, 530), False, 'from jvm_sys import jvm_sys\n'), ((670, 695), 'pymemcache.client.base.Client', 'Client', (['"""localhost:11211"""'], {}), "('localhost:11211')\n", (676, 695), False, 'from pymemcache.client.base import Clie... |
# pylint: disable=no-self-use,invalid-name
from pytest import approx
from allennlp.common.testing import AllenNlpTestCase
from allennlp.models.archival import load_archive
from allennlp.predictors import Predictor
from allennlp.common.file_utils import cached_path
from allennlp.data.dataset_readers.reading_comprehensi... | [
"allennlp.predictors.Predictor.from_archive",
"allennlp.common.file_utils.cached_path",
"allennlp.models.archival.load_archive",
"numpy.argmax"
] | [((1237, 1293), 'allennlp.common.file_utils.cached_path', 'cached_path', (['"""s3://multiqa/models/CSQA_BERT/base.tar.gz"""'], {}), "('s3://multiqa/models/CSQA_BERT/base.tar.gz')\n", (1248, 1293), False, 'from allennlp.common.file_utils import cached_path\n'), ((1310, 1333), 'allennlp.models.archival.load_archive', 'lo... |
# coding: utf-8
from __future__ import division, print_function, unicode_literals, \
absolute_import
import unittest
import random
import os
import tempfile
import numpy as np
from monty.os.path import which
from pymatgen import Lattice, Structure, Element
from veidt.describer.atomic_describer import \
Bisp... | [
"unittest.main",
"pymatgen.Lattice.cubic",
"os.path.abspath",
"veidt.describer.atomic_describer.BispectrumCoefficients",
"veidt.describer.atomic_describer.BPSymmetryFunctions",
"monty.os.path.which",
"tempfile.mkdtemp",
"numpy.random.randint",
"veidt.describer.atomic_describer.SOAPDescriptor",
"os... | [((6649, 6664), 'unittest.main', 'unittest.main', ([], {}), '()\n', (6662, 6664), False, 'import unittest\n'), ((2342, 2432), 'veidt.describer.atomic_describer.BispectrumCoefficients', 'BispectrumCoefficients', (['(5)', '(3)', 'profile'], {'diagonalstyle': '(2)', 'quadratic': '(False)', 'pot_fit': '(False)'}), '(5, 3, ... |
from pyHalo.pyhalo import pyHalo
from pyHalo.Cosmology.cosmology import Cosmology
from pyHalo.Cosmology.geometry import Geometry
from pyHalo.Halos.lens_cosmo import LensCosmo
from copy import deepcopy
from pyHalo.Cosmology.lensing_mass_function import LensingMassFunction
from pyHalo.Rendering.MassFunctions.mass_functio... | [
"pyHalo.Cosmology.lensing_mass_function.LensingMassFunction",
"copy.deepcopy",
"numpy.polyfit",
"pyHalo.Halos.lens_cosmo.LensCosmo",
"pyHalo.Rendering.MassFunctions.mass_function_utilities.integrate_power_law_analytic",
"numpy.testing.assert_almost_equal",
"pyHalo.Rendering.MassFunctions.mass_function_u... | [((10921, 10934), 'pytest.main', 'pytest.main', ([], {}), '()\n', (10932, 10934), False, 'import pytest\n'), ((2650, 2670), 'copy.deepcopy', 'deepcopy', (['kwargs_cdm'], {}), '(kwargs_cdm)\n', (2658, 2670), False, 'from copy import deepcopy\n'), ((2991, 3013), 'pyHalo.pyhalo.pyHalo', 'pyHalo', (['zlens', 'zsource'], {}... |
#Created by eNAS
#Import GUI interface Libraries
from tkinter import*
import tkinter as tk
from tkinter import ttk
import pickle
import tkinter.messagebox
import tksheet
from tkinter.ttk import *
from tkinter.filedialog import askopenfile
import time
from dissim import *
import os, sys
from tkinter impo... | [
"tkinter.StringVar",
"matplotlib.pyplot.show",
"matplotlib.pyplot.plot",
"numpy.argmax",
"tkinter.Button",
"matplotlib.pyplot.scatter",
"aif360.metrics.BinaryLabelDatasetMetric",
"tkinter.Entry",
"skfuzzy.cluster.cmeans_predict",
"tkinter.filedialog.askopenfile",
"matplotlib.pyplot.subplots",
... | [((2065, 2083), 'tkinter.ttk.Notebook', 'ttk.Notebook', (['root'], {}), '(root)\n', (2077, 2083), False, 'from tkinter import ttk\n'), ((5332, 5395), 'tkinter.Button', 'tk.Button', (['frame1'], {'text': '"""Upload csv file"""', 'command': 'UploadAction'}), "(frame1, text='Upload csv file', command=UploadAction)\n", (53... |
# **********************************************************************************************************************
#
# brief: simple script to plot the hyper parameter optimization results
#
# author: <NAME>
# date: 22.06.2020
#
# **************************************************************************... | [
"matplotlib.rc",
"matplotlib.cm.get_cmap",
"matplotlib.pyplot.margins",
"pandas.read_csv",
"matplotlib.pyplot.style.use",
"numpy.arange",
"hyperopt.plotting.main_plot_vars",
"numpy.unique",
"matplotlib.pyplot.xlabel",
"pandas.DataFrame",
"os.path.abspath",
"hyperopt.plotting.main_plot_history"... | [((655, 680), 'os.path.abspath', 'os.path.abspath', (['"""../../"""'], {}), "('../../')\n", (670, 680), False, 'import os\n'), ((681, 704), 'matplotlib.pyplot.style.use', 'plt.style.use', (['"""ggplot"""'], {}), "('ggplot')\n", (694, 704), True, 'import matplotlib.pyplot as plt\n'), ((757, 788), 'matplotlib.pyplot.rc',... |
from keras.preprocessing import image
import numpy as np
import matplotlib.pyplot as plt
from keras.models import load_model
from keras import models
img_path = "../../datasets/dogs-vs-cats/cats_and_dogs_small/test/cats/cat.1700.jpg"
img = image.load_img(img_path, target_size=(150, 150))
img_tensor = image.img_to_arr... | [
"keras.models.load_model",
"matplotlib.pyplot.show",
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.matshow",
"numpy.expand_dims",
"keras.models.Model",
"keras.preprocessing.image.img_to_array",
"keras.preprocessing.image.load_img"
] | [((242, 290), 'keras.preprocessing.image.load_img', 'image.load_img', (['img_path'], {'target_size': '(150, 150)'}), '(img_path, target_size=(150, 150))\n', (256, 290), False, 'from keras.preprocessing import image\n'), ((304, 327), 'keras.preprocessing.image.img_to_array', 'image.img_to_array', (['img'], {}), '(img)\n... |
from UQpy.inference.evidence_methods.baseclass.EvidenceMethod import EvidenceMethod
import numpy as np
class HarmonicMean(EvidenceMethod):
"""
Class used for the computation of model evidence using the harmonic mean method.
"""
def estimate_evidence(self, inference_model, posterior_samples, log_poster... | [
"numpy.exp"
] | [((470, 499), 'numpy.exp', 'np.exp', (['log_likelihood_values'], {}), '(log_likelihood_values)\n', (476, 499), True, 'import numpy as np\n')] |
import gym
import numpy as np
import copy
import time
from .utils import EnvironmentCreator
class VecEnv():
def __init__(self, env_creator, nbr_parallel_env, single_agent=True, worker_id=None, seed=0, gathering=True):
self.gathering = gathering
self.seed = seed
self.env_creator = env_cre... | [
"copy.deepcopy",
"numpy.array"
] | [((995, 1020), 'copy.deepcopy', 'copy.deepcopy', (['self.dones'], {}), '(self.dones)\n', (1008, 1020), False, 'import copy\n'), ((4044, 4069), 'copy.deepcopy', 'copy.deepcopy', (['self.dones'], {}), '(self.dones)\n', (4057, 4069), False, 'import copy\n'), ((5247, 5283), 'copy.deepcopy', 'copy.deepcopy', (['self.dones[e... |
import numpy as np
import pytest
from stardist import non_maximum_suppression_3d, polyhedron_to_label
from stardist import Rays_GoldenSpiral
from utils import random_image, check_similar
@pytest.mark.parametrize('n_rays, nms_thresh',[(5,0),(14,.2),(22,.4),(32,.6)])
def test_nms(n_rays, nms_thresh):
dist = 10*np.on... | [
"numpy.random.uniform",
"stardist.polyhedron_to_label",
"numpy.random.seed",
"stardist.Rays_GoldenSpiral",
"numpy.ones",
"stardist.non_maximum_suppression_3d",
"pytest.mark.parametrize"
] | [((189, 281), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""n_rays, nms_thresh"""', '[(5, 0), (14, 0.2), (22, 0.4), (32, 0.6)]'], {}), "('n_rays, nms_thresh', [(5, 0), (14, 0.2), (22, 0.4),\n (32, 0.6)])\n", (212, 281), False, 'import pytest\n'), ((353, 392), 'numpy.random.uniform', 'np.random.uniform'... |
"""
pylab_aux - auxiliary functions for plotting with pylab
=======================================================
This module serves as a collection of useful routines for data plotting with
matplotlib.
Generic plotting
----------------
:py:func:`plot_line` - plot a line.
:py:func:`scatter_trend` - plot a sca... | [
"numpy.meshgrid",
"numpy.ravel",
"numpy.array",
"numpy.arange",
"pylab.gcf",
"pylab.xlim",
"pylab.plot"
] | [((2237, 2324), 'pylab.plot', 'pylab.plot', (['[xlim[0], xlim[1]]', '[a * xlim[0] + b, a * xlim[1] + b]', '*args'], {}), '([xlim[0], xlim[1]], [a * xlim[0] + b, a * xlim[1] + b], *args,\n **kwargs)\n', (2247, 2324), False, 'import pylab\n'), ((7070, 7087), 'numpy.meshgrid', 'np.meshgrid', (['x', 'y'], {}), '(x, y)\n... |
import numpy as np
# Functions for use in defining synthetic cost-aware MDPs
goal_state = 2
def r1(s, a):
return s**3
def r2(s, a):
return s + a
def r3(s, a):
return (s % 2) * (a % 2)
def r4(s, a):
return 100 * (s == goal_state)
def r5(s, a):
return 1 * (s % 2 == 0)
def r7(s, a):
return... | [
"numpy.exp"
] | [((569, 579), 'numpy.exp', 'np.exp', (['(-s)'], {}), '(-s)\n', (575, 579), True, 'import numpy as np\n')] |
from signalflow import AudioGraph, AudioOut_Dummy, Buffer, SineOscillator, Line, Constant, Add
from . import process_tree, count_zero_crossings
import pytest
import numpy as np
def test_graph():
graph = AudioGraph()
assert graph
del graph
def test_graph_sample_rate():
graph = AudioGraph()
assert g... | [
"signalflow.Buffer",
"numpy.all",
"signalflow.AudioGraph",
"pytest.raises",
"numpy.linspace",
"signalflow.AudioOut_Dummy",
"signalflow.Add",
"signalflow.SineOscillator",
"signalflow.Line",
"signalflow.Constant"
] | [((208, 220), 'signalflow.AudioGraph', 'AudioGraph', ([], {}), '()\n', (218, 220), False, 'from signalflow import AudioGraph, AudioOut_Dummy, Buffer, SineOscillator, Line, Constant, Add\n'), ((295, 307), 'signalflow.AudioGraph', 'AudioGraph', ([], {}), '()\n', (305, 307), False, 'from signalflow import AudioGraph, Audi... |
# Run this app with `python app.py` and
# visit http://127.0.0.1:8050/ in your web browser.
import dash
import dash_core_components as dcc
import dash_html_components as html
import plotly.express as px
import plotly.graph_objs as go
import pandas as pd
from sqlalchemy import create_engine
import pymysql
import numpy ... | [
"dash.Dash",
"plotly.graph_objs.Scatter",
"dash_html_components.Div",
"numpy.mean",
"dash_html_components.H1",
"pandas.read_sql_query",
"pandas.Timedelta",
"sqlalchemy.create_engine",
"plotly.graph_objs.Figure",
"dash_core_components.Graph",
"plotly.graph_objs.Indicator"
] | [((528, 547), 'dash.Dash', 'dash.Dash', (['__name__'], {}), '(__name__)\n', (537, 547), False, 'import dash\n'), ((668, 764), 'sqlalchemy.create_engine', 'create_engine', (['"""mysql+pymysql://root:@127.0.0.1/face_to_monitor_distance"""'], {'pool_recycle': '(3600)'}), "('mysql+pymysql://root:@127.0.0.1/face_to_monitor_... |
# File for graphical functions
from data import *
from tkinter import *
from PIL import Image, ImageDraw, ImageFont
import numpy as np
import os
root = Tk()
root.geometry('900x556')
root.title('EEG Raw Data')
fftroot = Tk()
fftroot.geometry('900x556')
fftroot.title('EEG FFT Data')
graphing_area = Canvas(root, width=... | [
"PIL.Image.new",
"numpy.fft.rfft",
"PIL.ImageFont.truetype",
"numpy.fft.rfftfreq",
"numpy.array",
"PIL.ImageDraw.Draw",
"os.listdir"
] | [((4936, 4971), 'PIL.ImageFont.truetype', 'ImageFont.truetype', (['"""Arial.ttf"""', '(20)'], {}), "('Arial.ttf', 20)\n", (4954, 4971), False, 'from PIL import Image, ImageDraw, ImageFont\n'), ((4990, 5035), 'PIL.Image.new', 'Image.new', (['"""RGB"""', '(900, 556)', '(255, 255, 255)'], {}), "('RGB', (900, 556), (255, 2... |
"""Visualization tool for linear models."""
from pathlib import Path
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
from matplotlib.ticker import MaxNLocator
def visualize_linear_model(
output_file: Path,
coeff,
intercept,
cov,
x,
y=None,
N=10... | [
"matplotlib.pyplot.title",
"seaborn.heatmap",
"numpy.empty",
"matplotlib.pyplot.figure",
"numpy.mean",
"numpy.arange",
"numpy.savez_compressed",
"matplotlib.pyplot.tight_layout",
"numpy.std",
"matplotlib.pyplot.close",
"matplotlib.ticker.MaxNLocator",
"numpy.linspace",
"matplotlib.pyplot.sub... | [((911, 939), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(16, 12)'}), '(figsize=(16, 12))\n', (921, 939), True, 'import matplotlib.pyplot as plt\n'), ((2310, 2330), 'numpy.empty', 'np.empty', (['(N, T, dY)'], {}), '((N, T, dY))\n', (2318, 2330), True, 'import numpy as np\n'), ((2517, 2536), 'numpy.mean... |
"""Calculations on a unit cell
"""
from __future__ import annotations # before 3.10 for postponed evaluation of annotations
import numpy as np
from ase import Atoms
from ase.build import bulk
from ase.visualize import view
try:
from Morse import MorsePotential
except ModuleNotFoundError:
from .Morse import M... | [
"Morse.MorsePotential",
"ase.visualize.view",
"ase.build.bulk",
"numpy.diag_indices",
"numpy.ones",
"numpy.array"
] | [((747, 781), 'ase.build.bulk', 'bulk', (['"""Cu"""', '"""fcc"""'], {'a': 'a', 'cubic': '(True)'}), "('Cu', 'fcc', a=a, cubic=True)\n", (751, 781), False, 'from ase.build import bulk\n'), ((1876, 1889), 'ase.visualize.view', 'view', (['self.cu'], {}), '(self.cu)\n', (1880, 1889), False, 'from ase.visualize import view\... |
# Copyright 2017 Rice University
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | [
"synthesis.json_synthesis.JSON_Synthesis",
"program_helper.ast.parser.ast_similarity_checker.AstSimilarityChecker",
"synthesis.write_java.Write_Java",
"nltk.tokenize.word_tokenize",
"os.path.join",
"numpy.sum",
"program_helper.program_reverse_map.ProgramRevMapper",
"warnings.filterwarnings",
"nltk.t... | [((1964, 2040), 'trainer_vae.infer.BayesianPredictor', 'BayesianPredictor', (['model_path'], {'batch_size': 'beam_width', 'seed': 'seed', 'depth': 'depth'}), '(model_path, batch_size=beam_width, seed=seed, depth=depth)\n', (1981, 2040), False, 'from trainer_vae.infer import BayesianPredictor\n'), ((2068, 2115), 'progra... |
import numpy as np
from contextlib import contextmanager
class Data:
with open("input.txt") as fd:
array = [i.split(",") for i in fd.read().splitlines()]
i = 0
while array[i] != ['']:
i += 1
points = [(int(x), int(y)) for x, y in array[:i]]
i += 1
array = array[i:]
instruct... | [
"numpy.set_printoptions",
"numpy.zeros",
"numpy.get_printoptions"
] | [((1614, 1639), 'numpy.zeros', 'np.zeros', (['(ver, hor)', 'int'], {}), '((ver, hor), int)\n', (1622, 1639), True, 'import numpy as np\n'), ((2219, 2240), 'numpy.get_printoptions', 'np.get_printoptions', ([], {}), '()\n', (2238, 2240), True, 'import numpy as np\n'), ((2245, 2282), 'numpy.set_printoptions', 'np.set_prin... |
import os
import argparse
import numpy as np
import cv2
import multiprocessing
from shutil import copyfile
from glob import glob
from tqdm import tqdm
from PIL import Image
from utils.system import load_image_in_PIL
try:
from pycocotools.coco import COCO
except ImportError as e:
print(e)
d... | [
"tqdm.tqdm",
"argparse.ArgumentParser",
"os.makedirs",
"os.path.basename",
"numpy.asarray",
"numpy.zeros",
"os.path.exists",
"PIL.Image.open",
"cv2.imread",
"pycocotools.coco.COCO",
"utils.system.load_image_in_PIL",
"multiprocessing.Pool",
"PIL.Image.fromarray",
"shutil.copyfile",
"os.pa... | [((349, 410), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Unify Pretrain Dataset"""'}), "(description='Unify Pretrain Dataset')\n", (372, 410), False, 'import argparse\n'), ((936, 961), 'tqdm.tqdm', 'tqdm', (['src_list'], {'desc': '"""cp"""'}), "(src_list, desc='cp')\n", (940, 961), F... |
import numpy as np
# Parameters
sizes = [2,3,4,5,6]
dim_loc = 3
n_dis = 100
lr = False
spectral_properties = True
evolution = True
Jzz = 1.0
hz = 0.9
phi_vec=(np.pi/6)*np.linspace(0,1,7)
hx_vec = np.linspace(0.10, 0.60, 6)
betas = [1]*(dim_loc-1)
lambdas = [1]*(dim_loc-1)
time_set = np.power(2, np.arange(40))
| [
"numpy.arange",
"numpy.linspace"
] | [((201, 225), 'numpy.linspace', 'np.linspace', (['(0.1)', '(0.6)', '(6)'], {}), '(0.1, 0.6, 6)\n', (212, 225), True, 'import numpy as np\n'), ((172, 192), 'numpy.linspace', 'np.linspace', (['(0)', '(1)', '(7)'], {}), '(0, 1, 7)\n', (183, 192), True, 'import numpy as np\n'), ((303, 316), 'numpy.arange', 'np.arange', (['... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Nov 18 21:06:47 2020
@author: dariograna
"""
import numpy as np
from scipy.stats import multivariate_normal
from scipy import stats
def BayesGaussFaciesClass(data, fprior, muprior, sigmaprior):
"""
BAYES GAUSS FACIES CLASS
Computes the Baye... | [
"numpy.sum",
"numpy.argmax",
"scipy.stats.gaussian_kde",
"numpy.zeros",
"scipy.stats.multivariate_normal.pdf",
"numpy.unique"
] | [((1049, 1066), 'numpy.zeros', 'np.zeros', (['(ns, 1)'], {}), '((ns, 1))\n', (1057, 1066), True, 'import numpy as np\n'), ((1079, 1097), 'numpy.zeros', 'np.zeros', (['(ns, nf)'], {}), '((ns, nf))\n', (1087, 1097), True, 'import numpy as np\n'), ((2371, 2389), 'numpy.zeros', 'np.zeros', (['(nd, nf)'], {}), '((nd, nf))\n... |
""" Deep RL Algorithms for OpenAI Gym environments
"""
import argparse
import os
import sys
import gym
import numpy as np
import pandas as pd
import tensorflow as tf
from keras.backend.tensorflow_backend import set_session
from A3C.a3c import A3C
from gym_ai2thor.envs.ai2thor_env import AI2ThorEnv
from utils.atari_e... | [
"argparse.ArgumentParser",
"os.makedirs",
"gym.make",
"os.path.exists",
"gym.logger.set_level",
"gym_ai2thor.envs.ai2thor_env.AI2ThorEnv",
"utils.atari_environment.AtariEnvironment",
"tensorflow.summary.FileWriter",
"utils.networks.get_session",
"numpy.array",
"A3C.a3c.A3C"
] | [((449, 473), 'gym.logger.set_level', 'gym.logger.set_level', (['(40)'], {}), '(40)\n', (469, 473), False, 'import gym\n'), ((608, 666), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Training parameters"""'}), "(description='Training parameters')\n", (631, 666), False, 'import argparse\... |
# -*- coding: utf-8 -*-
################################################################################
# PROFILE PLOTS #
################################################################################
'''
Max Planck Institute for Astronomy
Planet Genesi... | [
"numpy.abs",
"numpy.argsort",
"matplotlib.pyplot.figure",
"numpy.sin",
"numpy.arange",
"numpy.exp",
"numpy.mean",
"matplotlib.colors.ListedColormap",
"numpy.round",
"numpy.meshgrid",
"numpy.max",
"numpy.linspace",
"numpy.arccos",
"numpy.radians",
"matplotlib.pyplot.show",
"numpy.averag... | [((1614, 1639), 'numpy.vstack', 'np.vstack', (['(lower, upper)'], {}), '((lower, upper))\n', (1623, 1639), True, 'import numpy as np\n'), ((1690, 1769), 'matplotlib.colors.ListedColormap', 'mpl.colors.ListedColormap', (['cmap_viridis'], {'name': '"""MODVIR"""', 'N': 'cmap_viridis.shape[0]'}), "(cmap_viridis, name='MODV... |
"""Implement server code. This will be short, if the server is honest, but a lot can happen for the malicious variants."""
import torch
import numpy as np
from scipy import stats
import copy
from .malicious_modifications import ImprintBlock, SparseImprintBlock, OneShotBlock, CuriousAbandonHonesty
from .malicious_modi... | [
"numpy.sum",
"torch.argmax",
"torch.randn",
"torch.cat",
"numpy.argsort",
"numpy.arange",
"torch.device",
"torch.std_mean",
"torch.no_grad",
"numpy.unique",
"torch.nn.init.dirac_",
"torch.zeros",
"torch.nn.init.orthogonal_",
"scipy.stats.norm.ppf",
"copy.deepcopy",
"torch.nn.init.zeros... | [((1198, 1225), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1215, 1225), False, 'import logging\n'), ((14155, 14177), 'torch.inference_mode', 'torch.inference_mode', ([], {}), '()\n', (14175, 14177), False, 'import torch\n'), ((11711, 11760), 'torch.nn.Sequential', 'torch.nn.Sequentia... |
#!/usr/bin/env python
# CAUTION: Please use SI in the project.
from __future__ import absolute_import, division
import numpy as np
from scipy.optimize import brentq
import isentropic_flow as ise_flow
import normal_shock_wave as nsw
from constants import EPSILON, R
from common import Model, View,... | [
"isentropic_flow.m2p",
"isentropic_flow.a2m",
"isentropic_flow.p2m",
"isentropic_flow.m2a",
"normal_shock_wave.m2p",
"numpy.array",
"isentropic_flow.ap2m",
"normal_shock_wave.p02m"
] | [((1973, 1994), 'isentropic_flow.m2a', 'ise_flow.m2a', (['self.md'], {}), '(self.md)\n', (1985, 1994), True, 'import isentropic_flow as ise_flow\n'), ((4068, 4093), 'isentropic_flow.ap2m', 'ise_flow.ap2m', (['self.ap_34'], {}), '(self.ap_34)\n', (4081, 4093), True, 'import isentropic_flow as ise_flow\n'), ((4432, 4456)... |
# Author: <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# License: BSD 3 clause
import numpy as np
import warnings
from scipy import sparse
from sklearn.exceptions import ConvergenceWarning
from .sparse import celer_sparse
from .dense import celer_dense
def celer(X, y, alpha, beta_init=Non... | [
"numpy.isfortran",
"scipy.sparse.issparse",
"numpy.zeros",
"numpy.asfortranarray",
"warnings.warn"
] | [((2346, 2364), 'scipy.sparse.issparse', 'sparse.issparse', (['X'], {}), '(X)\n', (2361, 2364), False, 'from scipy import sparse\n'), ((2900, 2920), 'numpy.zeros', 'np.zeros', (['n_features'], {}), '(n_features)\n', (2908, 2920), True, 'import numpy as np\n'), ((3705, 3919), 'warnings.warn', 'warnings.warn', (["('Objec... |
"""Format data from the FastMRI Knee Initiative.
Multicoil Knee Dataset::
```bash
# 1. Format train/validation datasets. Can be run simultaneously.
python format_fastmri format --challenge knee_multicoil \
--split train --device <GPU DEVICE ID> --num_workers <NUM WORKERS>
python format_fastmr... | [
"numpy.random.seed",
"argparse.ArgumentParser",
"meddlr.utils.env.get_path_manager",
"getpass.getuser",
"sigpy.Device",
"time.strftime",
"collections.defaultdict",
"torch.no_grad",
"os.path.join",
"numpy.prod",
"sigpy.mri.app.JsenseRecon",
"torch.utils.data.DataLoader",
"os.path.dirname",
... | [((1718, 1743), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (1733, 1743), False, 'import os\n'), ((1960, 1991), 'logging.getLogger', 'logging.getLogger', (['_LOGGER_NAME'], {}), '(_LOGGER_NAME)\n', (1977, 1991), False, 'import logging\n'), ((2763, 2785), 'meddlr.utils.env.get_path_manager'... |
"""
January 2020 <NAME>
"""
import numpy as np
# Initialize terms corresponding to the thetas for faster computation
def setVarphi(n0,L,order):
rea=n0.shape[1]
b=n0.shape[0]
nL=2*L+1
dummy=np.ones((nL,nL))
ind=np.tril_indices_from(dummy)
if order==1:
varphi=np.zero... | [
"numpy.tril_indices",
"numpy.outer",
"numpy.sum",
"numpy.log",
"numpy.round",
"numpy.zeros",
"numpy.ones",
"numpy.transpose",
"numpy.tril_indices_from",
"numpy.linalg.slogdet",
"numpy.exp",
"numpy.diag",
"numpy.ndarray",
"numpy.concatenate"
] | [((214, 231), 'numpy.ones', 'np.ones', (['(nL, nL)'], {}), '((nL, nL))\n', (221, 231), True, 'import numpy as np\n'), ((239, 266), 'numpy.tril_indices_from', 'np.tril_indices_from', (['dummy'], {}), '(dummy)\n', (259, 266), True, 'import numpy as np\n'), ((1104, 1136), 'numpy.ndarray', 'np.ndarray', (['(rea, nbin, samp... |
from os import path
import numpy as np
import matplotlib.pyplot as plt
from enmspring.graphs import Stack
pic_out_folder = '/home/yizaochen/Documents/JPCL_ytc_2021/images/atom_importance'
class StackPlot:
d_atomlist = {'A': ['N1', 'C6', 'C5', 'C4', 'N3', 'C2', 'N6', 'N7', 'C8', 'N9'],
'T': ['C4',... | [
"matplotlib.pyplot.subplots",
"numpy.arange",
"numpy.dot",
"os.path.join",
"enmspring.graphs.Stack"
] | [((1047, 1070), 'enmspring.graphs.Stack', 'Stack', (['host', 'rootfolder'], {}), '(host, rootfolder)\n', (1052, 1070), False, 'from enmspring.graphs import Stack\n'), ((1556, 1659), 'os.path.join', 'path.join', (['"""/home/yizaochen/codes/dna_rna/all_systems"""', 'self.host', '"""bdna+bdna"""', '"""input"""', '"""allat... |
# Copyright (C) 2020 Intel Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | [
"tqdm.tqdm",
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.nn.CrossEntropyLoss",
"numpy.mean",
"openfl.models.pytorch.RepresentationMatchingWrapper",
"torch.nn.Linear",
"torch.nn.MaxPool2d",
"torch.no_grad"
] | [((1728, 1749), 'torch.nn.CrossEntropyLoss', 'nn.CrossEntropyLoss', ([], {}), '()\n', (1747, 1749), True, 'import torch.nn as nn\n'), ((6261, 6276), 'numpy.mean', 'np.mean', (['losses'], {}), '(losses)\n', (6268, 6276), True, 'import numpy as np\n'), ((2605, 2697), 'torch.nn.Conv2d', 'nn.Conv2d', (['(1)', 'conv1_channe... |
#!/usr/bin/env python
import os, numpy as np
import plot_utils
class Attack():
"""
TODO: Write Comment
"""
def __init__(self, args):
"""
TODO: Write Comment
"""
self.args = args
self.VERBOSE = self.args.verbose
s... | [
"networks.imagenet.keras_applications.MobileNetV2",
"pickle.dump",
"networks.imagenet.keras_applications.InceptionV3",
"numpy.argmax",
"networks.cifar.wide_resnet.WideResNet",
"networks.mnist.conv.Conv",
"networks.imagenet.keras_applications.ResnetV250",
"networks.imagenet.keras_applications.ResnetV21... | [((4593, 4619), 'numpy.argmax', 'np.argmax', (['predicted_probs'], {}), '(predicted_probs)\n', (4602, 4619), True, 'import os, numpy as np\n'), ((6662, 6711), 'pandas.DataFrame', 'pd.DataFrame', (['image_results'], {'columns': 'self.columns'}), '(image_results, columns=self.columns)\n', (6674, 6711), True, 'import os, ... |
"""
This script demonstrates initialisation, training, evaluation, and forecasting of ForecastNet. The dataset used for the
time-invariance test in section 6.1 of the ForecastNet paper is used for this demonstration.
Paper:
"ForecastNet: A Time-Variant Deep Feed-Forward Neural Network Architecture for Multi-Step-Ahead... | [
"numpy.random.seed",
"matplotlib.pyplot.show",
"matplotlib.pyplot.plot",
"numpy.std",
"matplotlib.pyplot.legend",
"evaluate.evaluate",
"matplotlib.pyplot.figure",
"numpy.mean",
"numpy.arange",
"pandas.read_parquet",
"train.train",
"forecastNet.forecastNet"
] | [((690, 707), 'numpy.random.seed', 'np.random.seed', (['(1)'], {}), '(1)\n', (704, 707), True, 'import numpy as np\n'), ((1003, 1110), 'pandas.read_parquet', 'pd.read_parquet', (['"""/Users/ryadhkhisb/Dev/workspaces/m/finance-scrape/data/nasdaq100_15min.parquet"""'], {}), "(\n '/Users/ryadhkhisb/Dev/workspaces/m/fin... |
from tensorflow import keras
import numpy as np
from sklearn.utils import shuffle
from random import randint
import json
model = keras.models.load_model("model.h5")
print(model.to_json())
test_samples = []
test_labels = []
# create test data
for i in range(10):
# generate 50 random int btw 13 and 64 then append to... | [
"tensorflow.keras.models.load_model",
"random.randint",
"numpy.argmax",
"sklearn.preprocessing.MinMaxScaler",
"numpy.array",
"sklearn.utils.shuffle"
] | [((129, 164), 'tensorflow.keras.models.load_model', 'keras.models.load_model', (['"""model.h5"""'], {}), "('model.h5')\n", (152, 164), False, 'from tensorflow import keras\n'), ((687, 708), 'numpy.array', 'np.array', (['test_labels'], {}), '(test_labels)\n', (695, 708), True, 'import numpy as np\n'), ((724, 746), 'nump... |
import os, sys, shlex, subprocess, time
import sqlite3
import pandas as pd
import numpy as np
def create_df(path, fformat=".mov",date_fname = "2017-12-18"):
os.chdir(path)
ls0 = shlex.split("ls")
ls = subprocess.run(ls0,stdout=subprocess.PIPE,stderr=subprocess.STDOUT)
output = ls.stdout
output = s... | [
"subprocess.run",
"shlex.split",
"sqlite3.connect",
"numpy.array",
"sys.exit",
"os.chdir",
"subprocess.check_call"
] | [((162, 176), 'os.chdir', 'os.chdir', (['path'], {}), '(path)\n', (170, 176), False, 'import os, sys, shlex, subprocess, time\n'), ((187, 204), 'shlex.split', 'shlex.split', (['"""ls"""'], {}), "('ls')\n", (198, 204), False, 'import os, sys, shlex, subprocess, time\n'), ((215, 284), 'subprocess.run', 'subprocess.run', ... |
import numpy, cv2
from matplotlib import pyplot as plt
def imToLogical(img):
if img is None:
return None
newimg = numpy.zeros(img.shape[:2], numpy.uint8)
newimg.fill(cv2.GC_PR_FGD)
newimg[img == 0] = 0
newimg[img == 255] = 1
#return [1 if i == 255 else i for row in img for i i... | [
"cv2.grabCut",
"cv2.imread",
"numpy.where",
"numpy.zeros"
] | [((137, 176), 'numpy.zeros', 'numpy.zeros', (['img.shape[:2]', 'numpy.uint8'], {}), '(img.shape[:2], numpy.uint8)\n', (148, 176), False, 'import numpy, cv2\n'), ((476, 494), 'cv2.imread', 'cv2.imread', (['imname'], {}), '(imname)\n', (486, 494), False, 'import numpy, cv2\n'), ((756, 791), 'numpy.zeros', 'numpy.zeros', ... |
import os
import pytest
import numpy as np
from numpy.testing import assert_allclose
import emg3d
from emg3d import simulations
from . import alternatives
# Soft dependencies
try:
import xarray
except ImportError:
xarray = None
try:
import discretize
except ImportError:
discretize = None
try:
im... | [
"emg3d.Survey",
"numpy.ones",
"numpy.random.default_rng",
"pytest.mark.skipif",
"numpy.random.randint",
"numpy.arange",
"emg3d.surveys.txrx_coordinates_to_dict",
"emg3d.simulations.Simulation.from_dict",
"emg3d.get_magnetic_field",
"emg3d.TxElectricWire",
"emg3d.Model",
"emg3d.surveys.txrx_lis... | [((402, 425), 'numpy.random.default_rng', 'np.random.default_rng', ([], {}), '()\n', (423, 425), True, 'import numpy as np\n'), ((429, 495), 'pytest.mark.skipif', 'pytest.mark.skipif', (['(xarray is None)'], {'reason': '"""xarray not installed."""'}), "(xarray is None, reason='xarray not installed.')\n", (447, 495), Fa... |
# Authors: <NAME>, <NAME>
import numpy as np
import torch
import torch.nn as nn
from cgnet.feature import (FeatureCombiner, GeometryFeature, GeometryStatistics,
LinearLayer, SchnetFeature, CGBeadEmbedding,
GaussianRBF)
from cgnet.network import (CGnet, ForceLoss, H... | [
"torch.cat",
"cgnet.network.ForceLoss",
"numpy.random.randint",
"cgnet.network.HarmonicLayer",
"numpy.random.randn",
"cgnet.feature.GeometryStatistics",
"torch.randint",
"torch.nn.Tanh",
"numpy.testing.assert_array_equal",
"cgnet.feature.LinearLayer",
"cgnet.feature.FeatureCombiner",
"torch.su... | [((3092, 3121), 'numpy.random.randint', 'np.random.randint', (['(5)'], {'high': '(10)'}), '(5, high=10)\n', (3109, 3121), True, 'import numpy as np\n'), ((3133, 3163), 'numpy.random.randint', 'np.random.randint', (['(10)'], {'high': '(30)'}), '(10, high=30)\n', (3150, 3163), True, 'import numpy as np\n'), ((3179, 3216)... |
import os
import torch
import pickle
import collections
import math
import pandas as pd
import numpy as np
import networkx as nx
from rdkit import Chem
from rdkit.Chem import Descriptors
from rdkit.Chem import AllChem
from rdkit import DataStructs
from rdkit.Chem.rdMolDescriptors import GetMorganFingerprintAsBitVect
fr... | [
"splitters.scaffold_split",
"pandas.read_csv",
"torch.empty",
"rdkit.Chem.Atom",
"rdkit.Chem.RWMol",
"torch_geometric.data.Data",
"pickle.load",
"rdkit.Chem.Descriptors.MolWt",
"os.path.join",
"torch.load",
"rdkit.Chem.AllChem.MolToInchi",
"pandas.Series",
"os.listdir",
"rdkit.Chem.AllChem... | [((4064, 4117), 'torch_geometric.data.Data', 'Data', ([], {'x': 'x', 'edge_index': 'edge_index', 'edge_attr': 'edge_attr'}), '(x=x, edge_index=edge_index, edge_attr=edge_attr)\n', (4068, 4117), False, 'from torch_geometric.data import Data\n'), ((4538, 4550), 'rdkit.Chem.RWMol', 'Chem.RWMol', ([], {}), '()\n', (4548, 4... |
import numpy as np
import matplotlib.pyplot as plt
import random
from sklearn.datasets.samples_generator import make_blobs
#plotting
def pltPer(X, y, W):
f = plt.figure()
for n in range(len(y)):
if y[n] == -1:
plt.plot(X[n,1],X[n,2],'b.')
else:
plt.plot(X[n,1],X[n,2],'r.... | [
"matplotlib.pyplot.title",
"numpy.random.uniform",
"matplotlib.pyplot.show",
"matplotlib.pyplot.plot",
"numpy.zeros",
"numpy.ones",
"numpy.append",
"matplotlib.pyplot.figure",
"numpy.linspace",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel"
] | [((163, 175), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (173, 175), True, 'import matplotlib.pyplot as plt\n'), ((434, 462), 'matplotlib.pyplot.plot', 'plt.plot', (['l', '(m * l + b)', '"""k-"""'], {}), "(l, m * l + b, 'k-')\n", (442, 462), True, 'import matplotlib.pyplot as plt\n'), ((463, 482), 'mat... |
__copyright__ = """
Copyright (C) 2020 <NAME>
Copyright (C) 2020 <NAME>
"""
__license__ = """
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 ... | [
"pandas.DataFrame",
"pydemic.MitigationModel.init_from_kwargs",
"pydemic.GammaDistribution",
"numpy.zeros_like",
"numpy.ones_like",
"numpy.power",
"numpy.zeros",
"numpy.searchsorted",
"pandas.Timedelta",
"numpy.cumsum",
"pydemic.MitigationModel",
"numpy.diff",
"numpy.array",
"numpy.arange"... | [((1907, 1942), 'pydemic.GammaDistribution', 'GammaDistribution', ([], {'mean': '(4)', 'std': '(3.25)'}), '(mean=4, std=3.25)\n', (1924, 1942), False, 'from pydemic import GammaDistribution\n'), ((3594, 3620), 'numpy.array', 'np.array', (['age_distribution'], {}), '(age_distribution)\n', (3602, 3620), True, 'import num... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Last edited 2021-02-10
Anisotropic polycrystal multiphase field: useful functions for rotation matrices,
adapted from phase_field_composites by <NAME>,
https://zenodo.org/record/1188970
This file is part of phase_field_polycrystals based on FEniCS project
(https://f... | [
"os.path.isfile",
"numpy.array",
"numpy.loadtxt"
] | [((1137, 1172), 'os.path.isfile', 'os.path.isfile', (["(neper_mesh + '.ori')"], {}), "(neper_mesh + '.ori')\n", (1151, 1172), False, 'import os\n'), ((3951, 3982), 'numpy.loadtxt', 'np.loadtxt', (["(neper_mesh + '.ori')"], {}), "(neper_mesh + '.ori')\n", (3961, 3982), True, 'import numpy as np\n'), ((1186, 1217), 'nump... |
# -*- coding: utf-8 -*-
#
import numpy
import pytest
import quadpy
from quadpy.nsphere.helpers import integrate_monomial_over_unit_nsphere
from helpers import check_degree
@pytest.mark.parametrize(
"scheme",
[quadpy.nsphere.Dobrodeev1978(n) for n in range(2, 7)]
+ [
quadpy.nsphere.Stroud(n, index... | [
"numpy.zeros",
"quadpy.nsphere.Stroud",
"quadpy.nsphere.Dobrodeev1978",
"quadpy.nsphere.Stroud1967",
"quadpy.nsphere.integrate"
] | [((1134, 1148), 'numpy.zeros', 'numpy.zeros', (['n'], {}), '(n)\n', (1145, 1148), False, 'import numpy\n'), ((1545, 1581), 'quadpy.nsphere.Stroud', 'quadpy.nsphere.Stroud', (['n_', '"""Un 11-1"""'], {}), "(n_, 'Un 11-1')\n", (1566, 1581), False, 'import quadpy\n'), ((1211, 1262), 'quadpy.nsphere.integrate', 'quadpy.nsp... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Functions acting on slowness layers.
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
from future.builtins import * # NOQA
import math
import numpy as np
from .c_wrappers import clibtau
from .helper_cla... | [
"numpy.divide",
"math.isnan",
"math.isinf",
"numpy.ones_like",
"numpy.log",
"numpy.empty",
"numpy.power",
"numpy.zeros",
"numpy.ndim",
"numpy.ones",
"numpy.empty_like",
"numpy.any",
"numpy.isnan",
"numpy.errstate",
"numpy.isinf",
"numpy.array",
"math.log",
"numpy.all"
] | [((1746, 1760), 'numpy.ndim', 'np.ndim', (['layer'], {}), '(layer)\n', (1753, 1760), True, 'import numpy as np\n'), ((1772, 1782), 'numpy.ndim', 'np.ndim', (['p'], {}), '(p)\n', (1779, 1782), True, 'import numpy as np\n'), ((3696, 3710), 'numpy.ndim', 'np.ndim', (['layer'], {}), '(layer)\n', (3703, 3710), True, 'import... |
import numpy as np
def cov2corr(cov):
"""
Given a covariance matrix, it returns its correlation matrix.
:param cov: numpy.array covariance matrix
:return: numpy.array correlation matrix
"""
assert np.all(np.linalg.eigvals(cov) > 0), "'cov' matrix is not positive definite"
assert cov.shape... | [
"numpy.diag",
"numpy.linalg.eigvals",
"numpy.outer"
] | [((389, 401), 'numpy.diag', 'np.diag', (['cov'], {}), '(cov)\n', (396, 401), True, 'import numpy as np\n'), ((420, 438), 'numpy.outer', 'np.outer', (['std', 'std'], {}), '(std, std)\n', (428, 438), True, 'import numpy as np\n'), ((231, 253), 'numpy.linalg.eigvals', 'np.linalg.eigvals', (['cov'], {}), '(cov)\n', (248, 2... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import tensorflow as tf
import time
import os
from sklearn.decomposition import IncrementalPCA
import model as model
BATCH_SIZE = 128
flags = tf.app.flags
FLAGS = flags.FLAGS
flags.DEFINE_... | [
"tensorflow.gfile.Exists",
"numpy.load",
"model.evaluation",
"tensorflow.merge_all_summaries",
"model.inference",
"tensorflow.Variable",
"numpy.mean",
"os.path.join",
"numpy.std",
"tensorflow.placeholder",
"tensorflow.initialize_all_variables",
"tensorflow.gfile.DeleteRecursively",
"numpy.ra... | [((4040, 4066), 'tensorflow.gfile.Exists', 'tf.gfile.Exists', (['"""summary"""'], {}), "('summary')\n", (4055, 4066), True, 'import tensorflow as tf\n'), ((4109, 4137), 'tensorflow.gfile.MakeDirs', 'tf.gfile.MakeDirs', (['"""summary"""'], {}), "('summary')\n", (4126, 4137), True, 'import tensorflow as tf\n'), ((4183, 4... |
"""
This Data generator yields pairs of feature and label samples in model training.
"""
import gzip
import os
import numpy as np
from tensorflow.keras.utils import Sequence
from src.generalutils import helper
class DataGenerator(Sequence):
def __init__(self, feature_files, feature_files_big, label_files, label... | [
"numpy.load",
"numpy.empty",
"numpy.expand_dims",
"src.generalutils.helper.files_match",
"src.generalutils.helper.half_center_matrix",
"numpy.arange",
"gzip.GzipFile",
"os.path.join",
"numpy.random.shuffle"
] | [((2471, 2498), 'numpy.arange', 'np.arange', (['self.num_samples'], {}), '(self.num_samples)\n', (2480, 2498), True, 'import numpy as np\n'), ((6751, 6789), 'os.path.join', 'os.path.join', (['self.files_dir', 'filename'], {}), '(self.files_dir, filename)\n', (6763, 6789), False, 'import os\n'), ((3419, 3495), 'numpy.em... |
import wfdb
from scipy import signal
import numpy as np
from collections import defaultdict
class FeatureExtraction:
channels_map = defaultdict(list)
def extract_features(self, sample_name, samples, window_size, channels_ids=[0, 1]):
self.channels_map.clear()
print("Extracting features for sig... | [
"numpy.divide",
"scipy.signal.filtfilt",
"numpy.asarray",
"numpy.square",
"collections.defaultdict",
"numpy.diff",
"wfdb.rdrecord",
"scipy.signal.butter"
] | [((137, 154), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (148, 154), False, 'from collections import defaultdict\n'), ((366, 392), 'wfdb.rdrecord', 'wfdb.rdrecord', (['sample_name'], {}), '(sample_name)\n', (379, 392), False, 'import wfdb\n'), ((1514, 1530), 'numpy.diff', 'np.diff', (['channe... |
import numpy as np
count = 536870912 # Count of 32-bit integers that would take 2Gb of memory
f_name = "array"
max_value = 4294967295 # max value of uint32
if __name__ == "__main__":
arr = np.random.randint(2, max_value, size=count, dtype=np.dtype('uint32').newbyteorder('B')).byteswap()
with open(f_name, '... | [
"numpy.dtype"
] | [((248, 266), 'numpy.dtype', 'np.dtype', (['"""uint32"""'], {}), "('uint32')\n", (256, 266), True, 'import numpy as np\n')] |
#!/usr/bin/env python3
import argparse
import glob
import shelve
import os.path
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.ticker import FuncFormatter, LogLocator
from matplotlib import cm
from mpl_toolkits.mplot3d import Axes3D
old_names = {'FIFO': 'FIFO',
'PS': 'PS',
... | [
"matplotlib.pyplot.title",
"numpy.zeros_like",
"matplotlib.pyplot.show",
"argparse.ArgumentParser",
"numpy.meshgrid",
"numpy.log2",
"shelve.open",
"matplotlib.pyplot.figure",
"matplotlib.ticker.FuncFormatter",
"numpy.array",
"glob.glob"
] | [((724, 856), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""3d plot: mean sojourn time varying error and shape of job size"""', 'epilog': 'epilog_string'}), "(description=\n '3d plot: mean sojourn time varying error and shape of job size',\n epilog=epilog_string)\n", (747, 856), F... |
import tensorflow as tf
from sklearn.preprocessing import StandardScaler
import numpy as np
import pickle
from pathlib import Path
sc = StandardScaler()
sc_path = Path("source/scaler.pkl")
sc = pickle.load(open(sc_path, "rb"))
model_path = Path("source/my_model")
new_model = tf.keras.models.load_model(model_path)... | [
"numpy.array",
"pathlib.Path",
"sklearn.preprocessing.StandardScaler",
"tensorflow.keras.models.load_model"
] | [((138, 154), 'sklearn.preprocessing.StandardScaler', 'StandardScaler', ([], {}), '()\n', (152, 154), False, 'from sklearn.preprocessing import StandardScaler\n'), ((166, 191), 'pathlib.Path', 'Path', (['"""source/scaler.pkl"""'], {}), "('source/scaler.pkl')\n", (170, 191), False, 'from pathlib import Path\n'), ((245, ... |
import cv2
import numpy as np
def draw_chessboard(row, col, size):
img = np.zeros([(row+1)*size, (col+1)*size])
colors = [0, 255]
for i in range(row+1):
for j in range(col+1):
img[i*size:(i+1)*size, j*size:(j+1)*size] = colors[j % 2]
colors = colors[::-1]
img = n... | [
"numpy.pad",
"cv2.waitKey",
"cv2.imshow",
"numpy.zeros",
"cv2.destroyAllWindows"
] | [((82, 128), 'numpy.zeros', 'np.zeros', (['[(row + 1) * size, (col + 1) * size]'], {}), '([(row + 1) * size, (col + 1) * size])\n', (90, 128), True, 'import numpy as np\n'), ((319, 377), 'numpy.pad', 'np.pad', (['img', '((120, 120), (150, 150))'], {'constant_values': '(255)'}), '(img, ((120, 120), (150, 150)), constant... |
"""
Compare two sorters
====================
This example show how to compare the result of two sorters.
"""
##############################################################################
# Import
import numpy as np
import matplotlib.pyplot as plt
import spikeinterface.extractors as se
import spikeinterface.sorte... | [
"spikeinterface.widgets.plot_agreement_matrix",
"spikeinterface.sorters.run_mountainsort4",
"matplotlib.pyplot.show",
"spikeinterface.sorters.run_klusta",
"numpy.zeros",
"numpy.ones",
"spikeinterface.extractors.example_datasets.toy_example",
"spikeinterface.comparison.compare_two_sorters",
"matplotl... | [((543, 611), 'spikeinterface.extractors.example_datasets.toy_example', 'se.example_datasets.toy_example', ([], {'num_channels': '(4)', 'duration': '(10)', 'seed': '(0)'}), '(num_channels=4, duration=10, seed=0)\n', (574, 611), True, 'import spikeinterface.extractors as se\n'), ((760, 784), 'spikeinterface.sorters.run_... |
# -*- coding: utf-8 -*-
"""
Created on Thu Jul 30 09:35:30 2015
@author: <NAME>
"""
import pandas as pd
import numpy as np
import time
def solve_IO(IO_matrix, energy_demand):
""" Given, the IO_matrix and intermediate demand, solve for final demand
-> Inputs and Outputs are numpy arrays
"""
ident... | [
"numpy.dot",
"pandas.DataFrame.from_csv",
"numpy.linalg.solve"
] | [((536, 567), 'pandas.DataFrame.from_csv', 'pd.DataFrame.from_csv', (['"""IO.csv"""'], {}), "('IO.csv')\n", (557, 567), True, 'import pandas as pd\n'), ((584, 619), 'pandas.DataFrame.from_csv', 'pd.DataFrame.from_csv', (['"""demand.csv"""'], {}), "('demand.csv')\n", (605, 619), True, 'import pandas as pd\n'), ((833, 87... |
import matplotlib.pyplot as plt
import numpy as np
import torch
import torchvision
import torchvision.transforms as transforms
from model import PREPROCESS as preprocess
MNIST_train = torchvision.datasets.MNIST(
root = '/content/drive/MyDrive/Colab Notebooks/',
download = True,
train = True,
transfor... | [
"matplotlib.pyplot.figure",
"numpy.transpose",
"torch.stack",
"torchvision.transforms.ToTensor"
] | [((1035, 1062), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(15, 5)'}), '(figsize=(15, 5))\n', (1045, 1062), True, 'import matplotlib.pyplot as plt\n'), ((1265, 1325), 'torch.stack', 'torch.stack', (['[zeros_images, ones_images, twos_images]'], {'dim': '(1)'}), '([zeros_images, ones_images, twos_images]... |
import sys
import os
import argparse
import glob
import numpy as np
import random
from fr.tagc.rainet.core.util.file.FileUtils import FileUtils
from fr.tagc.rainet.core.util.exception.RainetException import RainetException
from fr.tagc.rainet.core.util.log.Logger import Logger
from fr.tagc.rainet.core.util.time.Time... | [
"os.mkdir",
"os.remove",
"argparse.ArgumentParser",
"numpy.isnan",
"numpy.mean",
"glob.glob",
"fr.tagc.rainet.core.util.file.FileUtils.FileUtils.open_text_r",
"numpy.std",
"os.path.dirname",
"os.path.exists",
"fr.tagc.rainet.core.util.time.Timer.Timer.get_instance",
"numpy.max",
"fr.tagc.rai... | [((4958, 5000), 'fr.tagc.rainet.core.util.file.FileUtils.FileUtils.open_text_r', 'FileUtils.open_text_r', (['self.annotationFile'], {}), '(self.annotationFile)\n', (4979, 5000), False, 'from fr.tagc.rainet.core.util.file.FileUtils import FileUtils\n'), ((8248, 8290), 'fr.tagc.rainet.core.util.file.FileUtils.FileUtils.o... |
from __future__ import division, print_function
import numpy as np
def fast_bin(X, a, b, N, weights=None, cyclic=False):
"""
Fast binning.
:note: cyclic parameter is ignored. Present only for compatibility with fast_linbin
"""
Y = (X - a)
delta = (b-a) / N
Y /= delta
iY = np.floor(Y).a... | [
"numpy.bincount",
"numpy.linspace",
"numpy.floor"
] | [((342, 387), 'numpy.bincount', 'np.bincount', (['iY'], {'weights': 'weights', 'minlength': 'N'}), '(iY, weights=weights, minlength=N)\n', (353, 387), True, 'import numpy as np\n'), ((389, 433), 'numpy.linspace', 'np.linspace', (['(a + delta / 2)', '(b - delta / 2)', 'N'], {}), '(a + delta / 2, b - delta / 2, N)\n', (4... |
from scipy.spatial.distance import cdist
from scipy.sparse import csr_matrix
from utils import data_trans_v2
import numpy as np
class Motion_Analyser:
def __init__(self, raw, fps):
self.centroid, self.head, self.tail, _ = data_trans_v2(raw)
self.platenum = self.centroid.shape[0]
... | [
"scipy.spatial.distance.cdist",
"numpy.zeros_like",
"numpy.abs",
"numpy.nan_to_num",
"numpy.roll",
"numpy.zeros",
"numpy.expand_dims",
"numpy.arcsin",
"utils.data_trans_v2",
"numpy.where",
"numpy.sin",
"scipy.sparse.csr_matrix",
"numpy.cos",
"numpy.arccos",
"numpy.concatenate",
"numpy.... | [((246, 264), 'utils.data_trans_v2', 'data_trans_v2', (['raw'], {}), '(raw)\n', (259, 264), False, 'from utils import data_trans_v2\n'), ((968, 991), 'numpy.expand_dims', 'np.expand_dims', (['x_p', '(-1)'], {}), '(x_p, -1)\n', (982, 991), True, 'import numpy as np\n'), ((1008, 1031), 'numpy.expand_dims', 'np.expand_dim... |
# Copyright (c) 2019 Siphon Contributors.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""Reading National Hurricane Center Data.
======================================
This program is written to pull data from the National Hurricane
Center and return the data in a... | [
"io.StringIO",
"siphon.http_util.session_manager.urlopen",
"datetime.datetime.today",
"pandas.read_csv",
"numpy.unique"
] | [((1314, 1336), 'io.StringIO', 'io.StringIO', (['resp.text'], {}), '(resp.text)\n', (1325, 1336), False, 'import io\n'), ((1358, 1471), 'pandas.read_csv', 'pd.read_csv', (['storm_list'], {'names': 'storm_list_columns', 'header': 'None', 'index_col': '(False)', 'usecols': '[0, 1, 7, 8, 9, 20]'}), '(storm_list, names=sto... |
# -*- coding: utf-8 -*-
from unity_env import init_environment
import numpy as np
import torch
from agent import DDPG
# Unity env executable path
UNITY_EXE_PATH = 'Reacher.exe'
# Init the reacher environment and get agents, state and action info
env, brain_name, n_agents, state_size, action_size = init_environment(UN... | [
"torch.load",
"numpy.zeros",
"unity_env.init_environment",
"numpy.any",
"agent.DDPG"
] | [((301, 333), 'unity_env.init_environment', 'init_environment', (['UNITY_EXE_PATH'], {}), '(UNITY_EXE_PATH)\n', (317, 333), False, 'from unity_env import init_environment\n'), ((342, 410), 'agent.DDPG', 'DDPG', ([], {'state_size': 'state_size', 'action_size': 'action_size', 'random_seed': '(89)'}), '(state_size=state_s... |
from __future__ import division
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import ternary
SQRT3OVER2 = np.sqrt(3) / 2
def project(p):
# project using the same transformation that was used for the triangles
a, b, c = p
x = a/2 + b
y = SQRT3OVER2 * a
return (x, y)
... | [
"ternary.helpers.simplex_iterator",
"numpy.array",
"matplotlib.colorbar.ColorbarBase",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"numpy.sqrt"
] | [((139, 149), 'numpy.sqrt', 'np.sqrt', (['(3)'], {}), '(3)\n', (146, 149), True, 'import numpy as np\n'), ((517, 555), 'matplotlib.pyplot.subplots', 'plt.subplots', (['(1)', '(3)'], {'figsize': '(8.5, 4.5)'}), '(1, 3, figsize=(8.5, 4.5))\n', (529, 555), True, 'import matplotlib.pyplot as plt\n'), ((1766, 1845), 'matplo... |
#!/usr/bin/env python
"""
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
MIT License
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 limita... | [
"torch.mean",
"numpy.maximum",
"numpy.sum",
"numpy.std",
"numpy.zeros",
"numpy.isinf",
"numpy.isnan",
"numpy.mean",
"numpy.reshape",
"torch.is_tensor",
"torch.tensor",
"numpy.sqrt"
] | [((5045, 5081), 'numpy.zeros', 'np.zeros', (['(dim, 1)'], {'dtype': 'np.float32'}), '((dim, 1), dtype=np.float32)\n', (5053, 5081), True, 'import numpy as np\n'), ((5106, 5142), 'numpy.zeros', 'np.zeros', (['(dim, 1)'], {'dtype': 'np.float32'}), '((dim, 1), dtype=np.float32)\n', (5114, 5142), True, 'import numpy as np\... |
import os
import keras
import tensorflow as tf
from keras.datasets import mnist
import numpy as np
import csv
import h5py
from experimental_analysis.Model import MnistModel, MovieModel
output_dir = ''
model_dir = ''
redundancy_output_dir = ''
weak_ts_dir = ""
ts_size = 72601
model_num = 20
mutation_prefix_list = [... | [
"numpy.less_equal",
"numpy.load",
"numpy.save",
"numpy.sum",
"csv.writer",
"h5py.File",
"numpy.logical_and",
"keras.datasets.mnist.load_data",
"numpy.asarray",
"os.walk",
"os.path.exists",
"experimental_analysis.Model.MovieModel",
"numpy.arange",
"numpy.where",
"os.path.join",
"numpy.d... | [((362, 374), 'experimental_analysis.Model.MovieModel', 'MovieModel', ([], {}), '()\n', (372, 374), False, 'from experimental_analysis.Model import MnistModel, MovieModel\n'), ((4666, 4690), 'numpy.asarray', 'np.asarray', (['killing_info'], {}), '(killing_info)\n', (4676, 4690), True, 'import numpy as np\n'), ((4695, 4... |
import numpy as np
from collections import deque, defaultdict
import autograd.grads as gradFn
import graph.api as gpi
class Node(np.ndarray):
def __new__(
subtype, shape, dtype=float, buffer=None, offset=0, strides=None,
order=None
):
obj = np.ndarray.__new__(subtype, shape, dtype, buff... | [
"numpy.abs",
"numpy.copy",
"numpy.ndarray.__new__",
"numpy.transpose",
"numpy.ones",
"graph.api.constant",
"collections.defaultdict",
"numpy.array",
"collections.deque"
] | [((274, 347), 'numpy.ndarray.__new__', 'np.ndarray.__new__', (['subtype', 'shape', 'dtype', 'buffer', 'offset', 'strides', 'order'], {}), '(subtype, shape, dtype, buffer, offset, strides, order)\n', (292, 347), True, 'import numpy as np\n'), ((1918, 1936), 'numpy.transpose', 'np.transpose', (['self'], {}), '(self)\n', ... |
import timeit
import matplotlib.pyplot as plt
import numpy as np
import scipy.optimize
import scipy.special
complexities = {"linear":lambda n:n,
"constant":lambda n:1+n*0,
"quadratic":lambda n:n**2,
"cubic":lambda n:n**3,
"log":lambda n:np.log(n),
... | [
"numpy.sum",
"numpy.log",
"numpy.median",
"numpy.std",
"time.sleep",
"numpy.argsort",
"numpy.max",
"numpy.mean",
"numpy.array",
"matplotlib.pyplot.subplots",
"numpy.sqrt"
] | [((1093, 1114), 'numpy.median', 'np.median', (['ts'], {'axis': '(1)'}), '(ts, axis=1)\n', (1102, 1114), True, 'import numpy as np\n'), ((1131, 1149), 'numpy.std', 'np.std', (['ts'], {'axis': '(1)'}), '(ts, axis=1)\n', (1137, 1149), True, 'import numpy as np\n'), ((1631, 1643), 'numpy.array', 'np.array', (['ns'], {}), '... |
"""
MIT License
Copyright (c) Preferred Networks, Inc.
"""
from collections import OrderedDict
import copy
import numpy as np
BINARY_KEYS = ['forward', 'back', 'left', 'right', 'jump', 'sneak', 'sprint', 'attack']
ENUM_KEYS = ['place', 'equip', 'craft', 'nearbyCraft', 'nearbySmelt']
ALL_ORDERED_KEYS = BINARY_KEYS ... | [
"numpy.ones_like",
"numpy.zeros",
"copy.copy",
"numpy.clip",
"collections.OrderedDict",
"numpy.round"
] | [((483, 510), 'collections.OrderedDict', 'OrderedDict', (["[('place', 2)]"], {}), "([('place', 2)])\n", (494, 510), False, 'from collections import OrderedDict\n'), ((559, 586), 'collections.OrderedDict', 'OrderedDict', (["[('place', 2)]"], {}), "([('place', 2)])\n", (570, 586), False, 'from collections import OrderedD... |
import torch
import random
import numpy as np
import energyflow as ef
from tqdm import tqdm
from itertools import chain
from sklearn.preprocessing import StandardScaler
from torch_geometric.data import Data, DataLoader
import models.models as models
import models.emd_models as emd_models
from util.scaler import Standa... | [
"itertools.chain.from_iterable",
"tqdm.tqdm",
"sklearn.preprocessing.StandardScaler",
"argparse.ArgumentParser",
"random.Random",
"torch.load",
"torch.cat",
"util.scaler.Standardizer",
"torch_geometric.data.DataLoader",
"datagen.graph_data_gae.GraphDataset",
"torch.cuda.is_available",
"util.lo... | [((616, 630), 'util.scaler.Standardizer', 'Standardizer', ([], {}), '()\n', (628, 630), False, 'from util.scaler import Standardizer\n'), ((645, 661), 'sklearn.preprocessing.StandardScaler', 'StandardScaler', ([], {}), '()\n', (659, 661), False, 'from sklearn.preprocessing import StandardScaler\n'), ((825, 859), 'torch... |
#!/usr/bin/env python
# coding: utf-8
# In[33]:
import matplotlib.pyplot as plt
import numpy as np
x = np.arange(0,100)
y = x*2
z = x**2
# In[34]:
fig = plt.figure()
axes1 = fig.add_axes([0,0,1,1])
plt.plot(x,y)
# In[ ]:
# In[40]:
fig2 = plt.figure()
axes1 = fig2.add_axes([0,0,1,1])
axes2 = fig2.add_axe... | [
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.figure",
"numpy.arange",
"matplotlib.pyplot.subplots"
] | [((106, 123), 'numpy.arange', 'np.arange', (['(0)', '(100)'], {}), '(0, 100)\n', (115, 123), True, 'import numpy as np\n'), ((160, 172), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (170, 172), True, 'import matplotlib.pyplot as plt\n'), ((205, 219), 'matplotlib.pyplot.plot', 'plt.plot', (['x', 'y'], {})... |
import os
import time
import cv2
import h5py
import numpy as np
import scipy.io
import scipy.spatial
from scipy.ndimage.filters import gaussian_filter
import math
import torch
import glob
'''change your dataset'''
root = '/home/dkliang/projects/synchronous/dataset/UCF-QNRF_ECCV18'
img_train_path = root + '/Train/'
im... | [
"scipy.ndimage.filters.gaussian_filter",
"h5py.File",
"numpy.sum",
"cv2.imwrite",
"numpy.zeros",
"numpy.hstack",
"cv2.imread",
"numpy.max",
"cv2.applyColorMap",
"os.path.join",
"cv2.resize"
] | [((739, 759), 'cv2.imread', 'cv2.imread', (['img_path'], {}), '(img_path)\n', (749, 759), False, 'import cv2\n'), ((1501, 1549), 'numpy.zeros', 'np.zeros', (['(Img_data.shape[0], Img_data.shape[1])'], {}), '((Img_data.shape[0], Img_data.shape[1]))\n', (1509, 1549), True, 'import numpy as np\n'), ((610, 637), 'os.path.j... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: <NAME>
"""
import os
import time
import re
import io
import torch
import numpy as np
import pandas as pd
from tqdm import trange, tqdm
from sklearn.metrics import roc_curve, precision_recall_curve, \
auc, matthews_corrcoef, accuracy_score, pr... | [
"numpy.sum",
"sklearn.metrics.accuracy_score",
"time.ctime",
"sklearn.metrics.f1_score",
"pandas.DataFrame",
"os.path.exists",
"pandas.Timedelta",
"re.sub",
"sklearn.metrics.recall_score",
"sklearn.metrics.precision_recall_curve",
"pandas.to_datetime",
"pandas.Series",
"utils.pad_sequences",... | [((458, 482), 'os.path.exists', 'os.path.exists', (['log_path'], {}), '(log_path)\n', (472, 482), False, 'import os\n'), ((932, 960), 're.sub', 're.sub', (['"""\\\\[(.*?)\\\\]"""', '""""""', 'x'], {}), "('\\\\[(.*?)\\\\]', '', x)\n", (938, 960), False, 'import re\n'), ((1003, 1029), 're.sub', 're.sub', (['"""[0-9]+\\\\... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.