code stringlengths 31 1.05M | apis list | extract_api stringlengths 97 1.91M |
|---|---|---|
import json
import os
from os.path import join
from random import shuffle
import numpy as np
from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer
from sklearn.preprocessing import MinMaxScaler, normalize
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import cros... | [
"os.listdir",
"os.path.join",
"sklearn.linear_model.LogisticRegression",
"numpy.squeeze",
"numpy.zeros",
"transformers.BartTokenizer.from_pretrained",
"sklearn.preprocessing.normalize"
] | [((576, 622), 'numpy.zeros', 'np.zeros', (['tokenizer.vocab_size'], {'dtype': 'np.int16'}), '(tokenizer.vocab_size, dtype=np.int16)\n', (584, 622), True, 'import numpy as np\n'), ((1803, 1860), 'transformers.BartTokenizer.from_pretrained', 'BartTokenizer.from_pretrained', (['"""facebook/bart-large-xsum"""'], {}), "('fa... |
# -*- coding: utf-8 -*-
"""
Created on Sat Dec 30 17:03:01 2017
@author: misakawa
"""
from pattern_matching import Match, when, var, T, t, _, overwrite
from numpy.random import randint
@overwrite(var[(t == int) | (t == float)], var[(t == int) | (t == float)])
def add(a, b):
return a + b
@when(var[t == str], v... | [
"pattern_matching.t.when",
"pattern_matching.overwrite",
"pattern_matching.when",
"numpy.random.randint",
"pattern_matching.var.when",
"pattern_matching.Match"
] | [((190, 263), 'pattern_matching.overwrite', 'overwrite', (['var[(t == int) | (t == float)]', 'var[(t == int) | (t == float)]'], {}), '(var[(t == int) | (t == float)], var[(t == int) | (t == float)])\n', (199, 263), False, 'from pattern_matching import Match, when, var, T, t, _, overwrite\n'), ((299, 333), 'pattern_matc... |
"""
Environment for basic obstacle avoidance controlling a robotic arm from UR.
In this environment the obstacle is only moving up and down in a vertical line in front of the robot.
The goal is for the robot to stay within a predefined minimum distance to the moving obstacle.
When feasible the robot should continue to... | [
"numpy.random.default_rng",
"numpy.min",
"robo_gym_server_modules.robot_server.grpc_msgs.python.robot_server_pb2.State",
"numpy.square",
"numpy.array",
"numpy.zeros",
"numpy.linalg.norm",
"robo_gym.envs.simulation_wrapper.Simulation.__init__"
] | [((3080, 3196), 'robo_gym_server_modules.robot_server.grpc_msgs.python.robot_server_pb2.State', 'robot_server_pb2.State', ([], {'state': 'state', 'float_params': 'float_params', 'string_params': 'string_params', 'state_dict': 'rs_state'}), '(state=state, float_params=float_params,\n string_params=string_params, stat... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pyqtgraph as pg
import numpy as np
class CustomWidget(pg.GraphicsWindow):
pg.setConfigOption('background', 'w')
pg.setConfigOption('foreground', 'k')
def __init__(self, parent=None, **kargs):
pg.GraphicsWindow.__init__(self, **kargs)
sel... | [
"pyqtgraph.setConfigOption",
"numpy.zeros",
"pyqtgraph.GraphicsWindow.__init__"
] | [((133, 170), 'pyqtgraph.setConfigOption', 'pg.setConfigOption', (['"""background"""', '"""w"""'], {}), "('background', 'w')\n", (151, 170), True, 'import pyqtgraph as pg\n'), ((175, 212), 'pyqtgraph.setConfigOption', 'pg.setConfigOption', (['"""foreground"""', '"""k"""'], {}), "('foreground', 'k')\n", (193, 212), True... |
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from network import NN
from evaluate import accuracy
def read_data(fpath):
iris = pd.read_csv(fpath)
iris.loc[iris['species'] == 'virginica', 'species'] = 0
iris.loc[iris['species'] == 'versicolor', 'species'] = 1
iris.loc[iris['sp... | [
"numpy.random.shuffle",
"pandas.read_csv",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.scatter",
"matplotlib.pyplot.title",
"evaluate.accuracy",
"numpy.arange",
"matplotlib.pyplot.show"
] | [((159, 177), 'pandas.read_csv', 'pd.read_csv', (['fpath'], {}), '(fpath)\n', (170, 177), True, 'import pandas as pd\n'), ((519, 587), 'matplotlib.pyplot.scatter', 'plt.scatter', (['X[:, 0]', 'X[:, 1]'], {'c': 'y[:, 0]', 's': '(40)', 'cmap': 'plt.cm.Spectral'}), '(X[:, 0], X[:, 1], c=y[:, 0], s=40, cmap=plt.cm.Spectral... |
# -*- coding: utf-8 -*-
"""Linear module for dqn algorithms
- Author: <NAME>
- Contact: <EMAIL>
"""
import math
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from rl_algorithms.common.helper_functions import numpy2floattensor
device = torch.device("cuda:0" if torch.cuda.is_a... | [
"torch.nn.functional.linear",
"numpy.random.normal",
"math.sqrt",
"torch.Tensor",
"torch.cuda.is_available"
] | [((305, 330), 'torch.cuda.is_available', 'torch.cuda.is_available', ([], {}), '()\n', (328, 330), False, 'import torch\n'), ((3051, 3177), 'torch.nn.functional.linear', 'F.linear', (['x', '(self.weight_mu + self.weight_sigma * self.weight_epsilon)', '(self.bias_mu + self.bias_sigma * self.bias_epsilon)'], {}), '(x, sel... |
from numpy import reshape
def vec(x):
return reshape(x, (-1,) + x.shape[2:], order="F")
def unvec(x, shape):
return reshape(x, shape, order="F")
| [
"numpy.reshape"
] | [((51, 93), 'numpy.reshape', 'reshape', (['x', '((-1,) + x.shape[2:])'], {'order': '"""F"""'}), "(x, (-1,) + x.shape[2:], order='F')\n", (58, 93), False, 'from numpy import reshape\n'), ((128, 156), 'numpy.reshape', 'reshape', (['x', 'shape'], {'order': '"""F"""'}), "(x, shape, order='F')\n", (135, 156), False, 'from n... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Jun 17 16:12:56 2020
@author: dylanroyston
"""
# import/configure packages
import numpy as np
import pandas as pd
#import pyarrow as pa
import librosa
import librosa.display
from pathlib import Path
#import Ipython.display as ipd
#import matplotlib.pyp... | [
"pandas.Series",
"librosa.feature.melspectrogram",
"boto3.client",
"audioread.audio_open",
"os.environ.get",
"os.path.abspath",
"pyspark.SparkConf",
"librosa.power_to_db",
"boto3.resource",
"tinytag.TinyTag.get",
"pandas.concat",
"time.time",
"pandas.DataFrame",
"pyspark.SparkContext",
"... | [((833, 854), 'pyspark.SparkContext', 'SparkContext', (['"""local"""'], {}), "('local')\n", (845, 854), False, 'from pyspark import SparkConf, SparkContext, SQLContext\n'), ((1048, 1071), 'pyspark.SparkContext', 'SparkContext', ([], {'conf': 'conf'}), '(conf=conf)\n', (1060, 1071), False, 'from pyspark import SparkConf... |
from typing import Dict
import numpy as np
import tensorflow as tf
import verres as V
class ConstantSchedule(tf.keras.optimizers.schedules.LearningRateSchedule):
def __init__(self, learning_rate: float):
super().__init__()
self.learning_rate = float(learning_rate)
def __call__(self, step):... | [
"numpy.linspace",
"numpy.empty"
] | [((1143, 1205), 'numpy.empty', 'np.empty', (['(self.cycle_length * steps_per_epoch)'], {'dtype': '"""float32"""'}), "(self.cycle_length * steps_per_epoch, dtype='float32')\n", (1151, 1205), True, 'import numpy as np\n'), ((1725, 1801), 'numpy.linspace', 'np.linspace', (['current_lr', 'next_lr'], {'num': 'steps', 'endpo... |
import json
import string
from datetime import datetime
import deap
import numpy as np
import hmm
from discriminator import Discriminator
from ea import EA
import random_search
DEFAULT_PARAMS = {
# Discriminator CNN model
"model": "CNNModel3",
# Algorithm Parameters
"states": 5,
"symbols": 5,
... | [
"discriminator.Discriminator",
"random_search.run",
"hmm.total_l2_diff",
"numpy.array",
"datetime.datetime.now",
"deap.tools.selBest",
"hmm.random_hmm",
"json.dump"
] | [((1444, 1467), 'hmm.random_hmm', 'hmm.random_hmm', (['x', 'y', 's'], {}), '(x, y, s)\n', (1458, 1467), False, 'import hmm\n'), ((1567, 1590), 'hmm.random_hmm', 'hmm.random_hmm', (['x', 'y', 's'], {}), '(x, y, s)\n', (1581, 1590), False, 'import hmm\n'), ((1600, 1746), 'discriminator.Discriminator', 'Discriminator', ([... |
# ----------------------------------------------------------------------------
# Copyright 2014 Nervana Systems Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.o... | [
"logging.getLogger",
"nervanagpu.NervanaGPU",
"numpy.random.normal",
"pycuda.driver.pagelocked_empty",
"pycuda.driver.Stream",
"pycuda.driver.Device",
"pycuda.driver.memcpy_htod_async",
"pycuda.driver.init",
"neon.diagnostics.timing_decorators.FlopsDecorator",
"numpy.random.seed",
"numpy.random.... | [((1219, 1246), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1236, 1246), False, 'import logging\n'), ((1654, 1664), 'pycuda.driver.init', 'drv.init', ([], {}), '()\n', (1662, 1664), True, 'import pycuda.driver as drv\n'), ((1765, 1789), 'atexit.register', 'atexit.register', (['ctx.pop... |
# -*- encoding: utf-8 -*-
import os
import pickle
import sys
import time
import glob
import unittest
import unittest.mock
import numpy as np
import pandas as pd
import sklearn.datasets
from smac.scenario.scenario import Scenario
from smac.facade.roar_facade import ROAR
from autosklearn.util.backend import Backend
fro... | [
"numpy.array",
"autosklearn.util.logging_.get_logger",
"unittest.main",
"unittest.mock.patch",
"autosklearn.pipeline.util.get_dataset",
"os.path.split",
"smac.facade.roar_facade.ROAR",
"os.unlink",
"pandas.DataFrame",
"autosklearn.data.xy_data_manager.XYDataManager",
"numpy.allclose",
"unittes... | [((774, 799), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (789, 799), False, 'import os\n'), ((14263, 14335), 'unittest.mock.patch', 'unittest.mock.patch', (['"""autosklearn.evaluation.ExecuteTaFuncWithQueue.run"""'], {}), "('autosklearn.evaluation.ExecuteTaFuncWithQueue.run')\n", (14282, ... |
"""
This implements an abstrace base class Ring .
Rationale:
Goal is to separate the datatype specification from the algorithms and containers for the following reasons:
1) It allows to directly use the algorithms *without* overhead. E.g. calling mul(z.data, x.data, y.data)
has much le... | [
"numpy.isscalar"
] | [((2205, 2222), 'numpy.isscalar', 'numpy.isscalar', (['x'], {}), '(x)\n', (2219, 2222), False, 'import numpy\n')] |
import pandas as pd
import numpy as np
import csv
import urllib.request
import json
from datetime import datetime
from datetime import timedelta
from sklearn.preprocessing import MinMaxScaler
import web_scrapers
import os
def load_real_estate_data(filename, state_attr, state):
df = pd.read_csv(filename, encoding... | [
"json.loads",
"pandas.read_csv",
"pandas.merge",
"json.dump",
"web_scrapers.add_new_ipo_data_to_csv",
"os.path.isfile",
"json.load",
"numpy.array",
"csv.reader",
"pandas.DataFrame",
"datetime.timedelta",
"sklearn.preprocessing.MinMaxScaler",
"pandas.to_datetime"
] | [((290, 334), 'pandas.read_csv', 'pd.read_csv', (['filename'], {'encoding': '"""ISO-8859-1"""'}), "(filename, encoding='ISO-8859-1')\n", (301, 334), True, 'import pandas as pd\n'), ((1285, 1336), 'pandas.to_datetime', 'pd.to_datetime', (["df['Date Filed']"], {'format': '"""%Y-%m-%d"""'}), "(df['Date Filed'], format='%Y... |
__author__ = '<NAME> - www.tonybeltramelli.com'
# scripted agents taken from PySC2, credits to DeepMind
# https://github.com/deepmind/pysc2/blob/master/pysc2/agents/scripted_agent.py
import numpy as np
import uuid
from pysc2.agents import base_agent
from pysc2.lib import actions
from pysc2.lib import features
_SCREE... | [
"pysc2.lib.actions.FunctionCall",
"pysc2.agents.base_agent.BaseAgent.__init__",
"numpy.argmax",
"uuid.uuid1",
"numpy.stack",
"numpy.array",
"numpy.argmin"
] | [((1168, 1193), 'numpy.stack', 'np.stack', (['screens'], {'axis': '(2)'}), '(screens, axis=2)\n', (1176, 1193), True, 'import numpy as np\n'), ((5072, 5108), 'pysc2.lib.actions.FunctionCall', 'actions.FunctionCall', (['action', 'params'], {}), '(action, params)\n', (5092, 5108), False, 'from pysc2.lib import actions\n'... |
# Copyright 2019 The Keras Tuner Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | [
"numpy.average",
"math.log",
"collections.defaultdict",
"tensorflow.nest.flatten",
"time.time",
"random.randint"
] | [((3247, 3264), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (3258, 3264), False, 'from collections import defaultdict\n'), ((5053, 5070), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (5064, 5070), False, 'from collections import defaultdict\n'), ((7212, 7246), 'math.lo... |
import jax
import elegy
import unittest
import numpy as np
import jax.numpy as jnp
import optax
class MLP(elegy.Module):
"""Standard LeNet-300-100 MLP network."""
n1: int
n2: int
def __init__(self, n1: int = 3, n2: int = 4):
super().__init__()
self.n1 = n1
self.n2 = n2
... | [
"elegy.nn.BatchNormalization",
"optax.adamw",
"jax.nn.relu",
"optax.adam",
"elegy.Optimizer",
"elegy.metrics.SparseCategoricalAccuracy",
"elegy.nn.Linear",
"numpy.allclose",
"numpy.ones",
"optax.sgd",
"elegy.RNGSeq",
"optax.clip",
"jax.numpy.reshape",
"jax.numpy.array",
"numpy.zeros",
... | [((431, 463), 'jax.numpy.reshape', 'jnp.reshape', (['x', '[x.shape[0], -1]'], {}), '(x, [x.shape[0], -1])\n', (442, 463), True, 'import jax.numpy as jnp\n'), ((561, 575), 'jax.nn.relu', 'jax.nn.relu', (['x'], {}), '(x)\n', (572, 575), False, 'import jax\n'), ((629, 643), 'jax.nn.relu', 'jax.nn.relu', (['x'], {}), '(x)\... |
import glob
import os
import torch
from PIL import Image
from tqdm import tqdm
from ssd.config import cfg
from ssd.data.datasets import COCODataset, VOCDataset
from ssd.modeling.predictor import Predictor
from ssd.modeling.vgg_ssd import build_ssd_model
import argparse
import numpy as np
from ssd.utils.viz import dra... | [
"os.path.exists",
"PIL.Image.fromarray",
"PIL.Image.open",
"argparse.ArgumentParser",
"ssd.modeling.vgg_ssd.build_ssd_model",
"os.makedirs",
"tqdm.tqdm",
"ssd.config.cfg.freeze",
"os.path.join",
"ssd.modeling.predictor.Predictor",
"numpy.array",
"ssd.config.cfg.merge_from_file",
"ssd.config.... | [((678, 708), 'torch.device', 'torch.device', (['cfg.MODEL.DEVICE'], {}), '(cfg.MODEL.DEVICE)\n', (690, 708), False, 'import torch\n'), ((721, 741), 'ssd.modeling.vgg_ssd.build_ssd_model', 'build_ssd_model', (['cfg'], {}), '(cfg)\n', (736, 741), False, 'from ssd.modeling.vgg_ssd import build_ssd_model\n'), ((874, 986),... |
"""
Clustar module for fitting-related methods.
This module is designed for the 'ClustarData' object. All listed methods take
an input parameter of a 'ClustarData' object and return a 'ClustarData' object
after processing the method. As a result, all changes are localized within the
'ClustarData' object.
Visit <https... | [
"numpy.abs",
"numpy.mean",
"numpy.average",
"scipy.stats.multivariate_normal",
"numpy.max",
"shapely.geometry.Point",
"numpy.array",
"numpy.linspace",
"shapely.geometry.Polygon",
"numpy.cos",
"numpy.std",
"numpy.sin",
"scipy.ndimage.rotate",
"clustar.graph.critical_points"
] | [((1775, 1805), 'numpy.linspace', 'np.linspace', (['(0)', '(np.pi * 2)', '(360)'], {}), '(0, np.pi * 2, 360)\n', (1786, 1805), True, 'import numpy as np\n'), ((3074, 3126), 'numpy.abs', 'np.abs', (['res.data[res.inside[:, 0], res.inside[:, 1]]'], {}), '(res.data[res.inside[:, 0], res.inside[:, 1]])\n', (3080, 3126), Tr... |
# !/usr/bin/env python
# coding=UTF-8
"""
@Author: <NAME>
@LastEditors: <NAME>
@Description:
@Date: 2021-09-24
@LastEditTime: 2022-04-17
源自OpenAttack的DCESSubstitute
"""
import random
from typing import NoReturn, List, Any, Optional
import numpy as np
from utils.transformations.base import CharSubstitute
from utils... | [
"random.choice",
"numpy.in1d",
"numpy.stack",
"numpy.array",
"utils.assets.fetch"
] | [((739, 752), 'utils.assets.fetch', 'fetch', (['"""dces"""'], {}), "('dces')\n", (744, 752), False, 'from utils.assets import fetch\n'), ((3462, 3479), 'numpy.stack', 'np.stack', (['matches'], {}), '(matches)\n', (3470, 3479), True, 'import numpy as np\n'), ((1286, 1313), 'random.choice', 'random.choice', (['repl_lette... |
#importing necessary modules
from sklearn.linear_model import Perceptron
from sklearn.neighbors import KNeighborsClassifier
from sklearn.metrics import accuracy_score
import numpy as np
# Data and labels
Xtrain = [[182, 80, 34], [176, 70, 33], [161, 60, 28], [154, 55, 27], [166, 63, 30], [189, 90, 36], [175, 63, 28], ... | [
"sklearn.metrics.accuracy_score",
"sklearn.linear_model.Perceptron",
"sklearn.neighbors.KNeighborsClassifier",
"numpy.argmax"
] | [((815, 837), 'sklearn.neighbors.KNeighborsClassifier', 'KNeighborsClassifier', ([], {}), '()\n', (835, 837), False, 'from sklearn.neighbors import KNeighborsClassifier\n'), ((851, 863), 'sklearn.linear_model.Perceptron', 'Perceptron', ([], {}), '()\n', (861, 863), False, 'from sklearn.linear_model import Perceptron\n'... |
from enum import Enum, auto
import funcy as fn
import numpy as np
from monotone_bipartition import rectangles as mdtr
from monotone_bipartition import refine
EPS = 1e-4
class SearchResultType(Enum):
TRIVIALLY_FALSE = auto()
TRIVIALLY_TRUE = auto()
NON_TRIVIAL = auto()
def diagonal_convex_comb(r):
... | [
"enum.auto",
"funcy.pluck",
"funcy.compose",
"numpy.array",
"monotone_bipartition.rectangles.unit_rec"
] | [((226, 232), 'enum.auto', 'auto', ([], {}), '()\n', (230, 232), False, 'from enum import Enum, auto\n'), ((254, 260), 'enum.auto', 'auto', ([], {}), '()\n', (258, 260), False, 'from enum import Enum, auto\n'), ((279, 285), 'enum.auto', 'auto', ([], {}), '()\n', (283, 285), False, 'from enum import Enum, auto\n'), ((65... |
#!/usr/bin/env python3
import matplotlib.pyplot as plt
import numpy as np
convolve_grayscale_padding = __import__(
'2-convolve_grayscale_padding').convolve_grayscale_padding
if __name__ == '__main__':
dataset = np.load('../../supervised_learning/data/MNIST.npz')
images = dataset['X_train']
print(ima... | [
"matplotlib.pyplot.imshow",
"numpy.array",
"numpy.load",
"matplotlib.pyplot.show"
] | [((223, 274), 'numpy.load', 'np.load', (['"""../../supervised_learning/data/MNIST.npz"""'], {}), "('../../supervised_learning/data/MNIST.npz')\n", (230, 274), True, 'import numpy as np\n'), ((344, 390), 'numpy.array', 'np.array', (['[[1, 0, -1], [1, 0, -1], [1, 0, -1]]'], {}), '([[1, 0, -1], [1, 0, -1], [1, 0, -1]])\n'... |
# --------------
#Importing header files
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
#Path of the file
data=pd.read_csv(path)
data.rename(columns={'Total':'Total_Medals'},inplace =True)
data.head(10)
#Code starts here
# --------------
try:
data['Better_Event'] = np.where(... | [
"pandas.Series",
"pandas.read_csv",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xticks",
"numpy.where",
"matplotlib.pyplot.xlabel",
"pandas.DataFrame"
] | [((142, 159), 'pandas.read_csv', 'pd.read_csv', (['path'], {}), '(path)\n', (153, 159), True, 'import pandas as pd\n'), ((2373, 2467), 'pandas.Series', 'pd.Series', (["(data_1['Gold_Total'] * 3 + data_1['Silver_Total'] * 2 + data_1['Bronze_Total']\n )"], {}), "(data_1['Gold_Total'] * 3 + data_1['Silver_Total'] * 2 +... |
# -*- coding: utf-8 -*-
"""User functions to streamline working with selected pymer4 LMER fit
attributes from lme4::lmer and lmerTest for ``fitgrid.lmer`` grids.
"""
import functools
import re
import warnings
import numpy as np
import pandas as pd
import matplotlib as mpl
from matplotlib import pyplot as plt
import f... | [
"fitgrid.lmer",
"matplotlib.ticker.FixedFormatter",
"matplotlib.colors.ListedColormap",
"numpy.zeros",
"functools.partial",
"fitgrid.epochs_from_dataframe",
"warnings.warn",
"re.sub",
"pandas.concat"
] | [((1866, 1907), 'functools.partial', 'functools.partial', (['fitgrid.lmer'], {}), '(fitgrid.lmer, **kwargs)\n', (1883, 1907), False, 'import functools\n'), ((2069, 2106), 'pandas.concat', 'pd.concat', (['coefs'], {'keys': 'levels', 'axis': '(1)'}), '(coefs, keys=levels, axis=1)\n', (2078, 2106), True, 'import pandas as... |
# Copyright (c) 2019 Graphcore Ltd. 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 l... | [
"logging.getLogger",
"os.path.exists",
"subprocess.check_output",
"json.loads",
"pickle.dump",
"os.makedirs",
"os.path.join",
"pickle.load",
"numpy.take",
"numpy.stack",
"numpy.random.randint",
"numpy.concatenate",
"numpy.full",
"numpy.arange"
] | [((1064, 1083), 'logging.getLogger', 'getLogger', (['__name__'], {}), '(__name__)\n', (1073, 1083), False, 'from logging import getLogger\n'), ((6190, 6216), 'os.path.exists', 'os.path.exists', (['cache_file'], {}), '(cache_file)\n', (6204, 6216), False, 'import os\n'), ((9633, 9691), 'os.path.join', 'os.path.join', ([... |
import json
import numpy as np
import pdb
import torch
from ray_utils import get_rays, get_ray_directions, get_ndc_rays
BOX_OFFSETS = torch.tensor([[[i,j,k] for i in [0, 1] for j in [0, 1] for k in [0, 1]]],
device='cuda')
SQR_OFFSETS = torch.tensor([[[i,j] for i in [0, 1] for j in [0,... | [
"numpy.tan",
"torch.all",
"ray_utils.get_rays",
"torch.floor",
"ray_utils.get_ndc_rays",
"torch.tensor",
"pdb.set_trace",
"json.load",
"ray_utils.get_ray_directions",
"torch.FloatTensor",
"torch.clamp"
] | [((137, 231), 'torch.tensor', 'torch.tensor', (['[[[i, j, k] for i in [0, 1] for j in [0, 1] for k in [0, 1]]]'], {'device': '"""cuda"""'}), "([[[i, j, k] for i in [0, 1] for j in [0, 1] for k in [0, 1]]],\n device='cuda')\n", (149, 231), False, 'import torch\n'), ((271, 342), 'torch.tensor', 'torch.tensor', (['[[[i... |
import os
import cv2
import time
import json
import random
import inspect
import argparse
import numpy as np
from tqdm import tqdm
from dataloaders import make_data_loader
from models.sync_batchnorm.replicate import patch_replication_callback
from models.vs_net import *
from utils.loss import loss_dict
from utils.lr_s... | [
"dataloaders.make_data_loader",
"numpy.array",
"numpy.right_shift",
"numpy.mean",
"argparse.ArgumentParser",
"utils.utils.pnp",
"numpy.random.seed",
"torch.autograd.Variable",
"utils.metrics.Evaluator",
"utils.summaries.TensorboardSummary",
"utils.utils.evaluate_vertex_v2",
"os.path.isfile",
... | [((585, 618), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (608, 618), False, 'import warnings\n'), ((13676, 13753), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""PyTorch Landmark Segmentation Training"""'}), "(description='PyTorch Landma... |
import os
import numpy as np
import time
import multiprocessing as mp
import csv
import socket
import datetime
import math
import glob
from pypushexp import PushSim
# # input - [recorded item]
# [weight] : 48
# [height] : 160
# [crouch_angle] (deg)
# [step_length_ratio]
# [halfcycle_duration_rati... | [
"os.path.exists",
"os.makedirs",
"numpy.random.multivariate_normal",
"math.sqrt",
"multiprocessing.Manager",
"numpy.diag",
"pypushexp.PushSim",
"datetime.datetime.now",
"re.findall",
"os.path.abspath",
"socket.gethostname",
"time.time",
"glob.glob",
"numpy.set_printoptions"
] | [((5920, 5956), 'math.sqrt', 'math.sqrt', (['stride_vars[launch_order]'], {}), '(stride_vars[launch_order])\n', (5929, 5956), False, 'import math\n'), ((6255, 6290), 'math.sqrt', 'math.sqrt', (['speed_vars[launch_order]'], {}), '(speed_vars[launch_order])\n', (6264, 6290), False, 'import math\n'), ((9026, 9037), 'time.... |
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
from __future__ import division
import os
import numpy
from io import BytesIO
from matplotlib import pyplot
import requests
import torch
from PIL import Image
from maskrcnn_benchmark.config import cfg
from predictor import COCODemo
from maskrcnn... | [
"torch.jit.trace",
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.show",
"torch.full",
"torch.stack",
"os.path.join",
"io.BytesIO",
"maskrcnn_benchmark.config.cfg.merge_from_list",
"torch.min",
"requests.get",
"torch.tensor",
"predictor.COCODemo",
"numpy.array",
"torch.ops.maskrcnn_benchma... | [((673, 717), 'maskrcnn_benchmark.config.cfg.merge_from_list', 'cfg.merge_from_list', (["['MODEL.DEVICE', 'cpu']"], {}), "(['MODEL.DEVICE', 'cpu'])\n", (692, 717), False, 'from maskrcnn_benchmark.config import cfg\n'), ((722, 734), 'maskrcnn_benchmark.config.cfg.freeze', 'cfg.freeze', ([], {}), '()\n', (732, 734), Fals... |
#!/usr/bin/env python3
# Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
import argparse
import os
import pickle
import shutil
import numpy as np
import PIL.Image
import tensorflow as tf
from tensorflow.contrib.tensorboard.plugins import projector
TB_DIR = os.path.join(os.getcwd(), "gan-tb")
SPRITE_IMA... | [
"os.path.exists",
"tensorflow.device",
"tensorflow.contrib.tensorboard.plugins.projector.ProjectorConfig",
"numpy.sqrt",
"os.makedirs",
"argparse.ArgumentParser",
"tensorflow.Variable",
"tensorflow.contrib.tensorboard.plugins.projector.visualize_embeddings",
"tensorflow.Session",
"pickle.load",
... | [((334, 368), 'os.path.join', 'os.path.join', (['TB_DIR', '"""sprite.png"""'], {}), "(TB_DIR, 'sprite.png')\n", (346, 368), False, 'import os\n'), ((287, 298), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (296, 298), False, 'import os\n'), ((473, 487), 'pickle.load', 'pickle.load', (['f'], {}), '(f)\n', (484, 487), Fals... |
import tvm
import sys
import time
import numpy as np
from tvm.tensor_graph.testing.models import resnet
from tvm.tensor_graph.core import ForwardGraph, BackwardGraph, compute, \
GraphTensor, GraphOp, PyTIRGraph
from tvm.tensor_graph.nn import CELoss, SGD
from tvm.tensor_graph.core.schedul... | [
"tvm.tensor_graph.core.tuner.RandomForwardTuner",
"tvm.tensor_graph.core.schedule_generator.form_cut_candidates",
"tvm.tensor_graph.core.utils.flatten_tir_graph",
"numpy.array",
"tvm.tensor_graph.core.GraphTensor",
"tvm.tensor_graph.core.ForwardGraph",
"tvm.tensor_graph.nn.CELoss",
"tvm.tensor_graph.c... | [((1232, 1265), 'tvm.tensor_graph.testing.models.resnet.resnet50', 'resnet.resnet50', ([], {'num_classes': '(1000)'}), '(num_classes=1000)\n', (1247, 1265), False, 'from tvm.tensor_graph.testing.models import resnet\n'), ((1281, 1330), 'tvm.tensor_graph.core.GraphTensor', 'GraphTensor', (['img_shape'], {'dtype': 'dtype... |
# coding: utf-8
from __future__ import division, print_function
# Standard library
import time
# Third-party
import matplotlib.pyplot as plt
import numpy as np
from scipy.misc import derivative
from astropy.extern.six.moves import cPickle as pickle
import pytest
# Project
from ..io import load
from ..core import C... | [
"numpy.allclose",
"numpy.repeat",
"astropy.extern.six.moves.cPickle.dump",
"pytest.mark.skip",
"numpy.ascontiguousarray",
"scipy.misc.derivative",
"numpy.array",
"numpy.linspace",
"matplotlib.pyplot.close",
"numpy.sum",
"numpy.vstack",
"time.time",
"numpy.meshgrid",
"numpy.all",
"astropy... | [((553, 579), 'numpy.array', 'np.array', (['point'], {'copy': '(True)'}), '(point, copy=True)\n', (561, 579), True, 'import numpy as np\n'), ((658, 700), 'scipy.misc.derivative', 'derivative', (['wraps', 'point[dim_ix]'], {}), '(wraps, point[dim_ix], **kwargs)\n', (668, 700), False, 'from scipy.misc import derivative\n... |
# -*- coding: utf-8 -*-
from argparse import ArgumentParser
import json
import time
import pandas as pd
import tensorflow as tf
import numpy as np
import math
from decimal import Decimal
import matplotlib.pyplot as plt
from agents.ornstein_uhlenbeck import OrnsteinUhlenbeckActionNoise
eps=10e-8
epochs=0... | [
"pandas.Series",
"numpy.mean",
"data.download_data.DataDownloader",
"argparse.ArgumentParser",
"decimal.Decimal",
"agents.Winner.WINNER",
"matplotlib.pyplot.plot",
"numpy.sum",
"agents.UCRP.UCRP",
"numpy.zeros",
"numpy.std",
"json.load",
"math.exp",
"agents.Losser.LOSSER",
"pandas.concat... | [((5269, 5281), 'matplotlib.pyplot.legend', 'plt.legend', ([], {}), '()\n', (5279, 5281), True, 'import matplotlib.pyplot as plt\n'), ((5287, 5297), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (5295, 5297), True, 'import matplotlib.pyplot as plt\n'), ((8870, 8993), 'argparse.ArgumentParser', 'ArgumentParser... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: oesteban
# @Date: 2016-03-16 11:28:27
# @Last Modified by: oesteban
# @Last Modified time: 2016-04-04 13:50:50
"""
Batch export freesurfer results to animated gifs
"""
from __future__ import absolute_import
from __future__ import division
from __future__ im... | [
"os.listdir",
"argparse.ArgumentParser",
"os.makedirs",
"numpy.average",
"nibabel.load",
"os.path.join",
"os.environ.copy",
"os.getcwd",
"numpy.argwhere",
"tempfile.mkdtemp",
"os.path.basename",
"subprocess.call",
"shutil.rmtree",
"os.path.abspath"
] | [((752, 878), 'argparse.ArgumentParser', 'ArgumentParser', ([], {'description': '"""Batch export freesurfer results to animated gifs"""', 'formatter_class': 'RawTextHelpFormatter'}), "(description=\n 'Batch export freesurfer results to animated gifs', formatter_class=\n RawTextHelpFormatter)\n", (766, 878), False... |
# __author__ = 'Dave'
import cv2
from skimage import io
from skimage.transform import probabilistic_hough_line
import matplotlib.pyplot as plt
import os
import warnings
import random
import numpy as np
warnings.filterwarnings('ignore', category=RuntimeWarning)
class CorrectImage(object):
def __init__(self):
... | [
"cv2.imshow",
"numpy.array",
"cv2.destroyAllWindows",
"matplotlib.pyplot.plot",
"numpy.max",
"numpy.min",
"skimage.transform.probabilistic_hough_line",
"numpy.isinf",
"cv2.waitKey",
"skimage.io.imread",
"numpy.isnan",
"cv2.Canny",
"cv2.createTrackbar",
"cv2.namedWindow",
"warnings.filter... | [((205, 263), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {'category': 'RuntimeWarning'}), "('ignore', category=RuntimeWarning)\n", (228, 263), False, 'import warnings\n'), ((601, 631), 'os.path.join', 'os.path.join', (['self.path', 'image'], {}), '(self.path, image)\n', (613, 631), False, ... |
import cv2
import numpy as np
import os
import torch
import torch.nn as nn
import torch.nn.functional as F
def to_cpu(tensor):
return tensor.detach().cpu()
def xywh2xyxy(x):
''' Convert bounding box from [x, y, w, h] to [x1, y1, x2, y2]
:param x: bounding boxes array
:return: Converted bounding box array
'... | [
"numpy.fromfile",
"torch.nn.ZeroPad2d",
"torch.nn.Sequential",
"torch.max",
"torch.exp",
"torch.min",
"torch.from_numpy",
"torch.nn.MSELoss",
"numpy.array",
"torch.sum",
"torch.nn.functional.interpolate",
"torch.arange",
"os.path.exists",
"torch.nn.BatchNorm2d",
"torch.nn.ModuleList",
... | [((1247, 1270), 'torch.max', 'torch.max', (['b1_x1', 'b2_x1'], {}), '(b1_x1, b2_x1)\n', (1256, 1270), False, 'import torch\n'), ((1288, 1311), 'torch.max', 'torch.max', (['b1_y1', 'b2_y1'], {}), '(b1_y1, b2_y1)\n', (1297, 1311), False, 'import torch\n'), ((1329, 1352), 'torch.min', 'torch.min', (['b1_x2', 'b2_x2'], {})... |
"""
Example of usage of the AVB framework to infer a single exponential decay
model.
This uses the Python classes directly to infer the parameters for a single
instance of noisy data constructed as a Numpy array.
"""
import sys
import logging
import numpy as np
from vaby_avb import Avb
import vaby
# Uncomment line ... | [
"numpy.random.normal",
"logging.getLogger",
"logging.StreamHandler",
"numpy.sqrt",
"logging.Formatter",
"vaby.DataModel",
"vaby.get_model_class"
] | [((577, 601), 'numpy.sqrt', 'np.sqrt', (['NOISE_VAR_TRUTH'], {}), '(NOISE_VAR_TRUTH)\n', (584, 601), True, 'import numpy as np\n'), ((1777, 1810), 'logging.StreamHandler', 'logging.StreamHandler', (['sys.stdout'], {}), '(sys.stdout)\n', (1798, 1810), False, 'import logging\n'), ((755, 782), 'vaby.get_model_class', 'vab... |
# SPDX-License-Identifier: Apache-2.0
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import numpy as np
import onnx
from ..base import Base
from . import expect
class Constant(Base):
@staticmethod
def exp... | [
"numpy.random.randn"
] | [((364, 385), 'numpy.random.randn', 'np.random.randn', (['(5)', '(5)'], {}), '(5, 5)\n', (379, 385), True, 'import numpy as np\n')] |
import numpy as np
import matplotlib.pyplot as plt
#grid number on half space (without the origin)
N=150
#total grid number = 2*N + 1 (with origin)
N_g=2*N+1
#finite barrier potential value = 300 (meV)
potential_value=300
#building potential:
def potential(potential_value):
V=np.zeros((1,N_g),dtype=float)
V[0... | [
"numpy.sqrt",
"numpy.linalg.eig",
"numpy.argsort",
"matplotlib.pyplot.figure",
"numpy.linspace",
"numpy.zeros",
"matplotlib.pyplot.show"
] | [((886, 902), 'numpy.linalg.eig', 'np.linalg.eig', (['H'], {}), '(H)\n', (899, 902), True, 'import numpy as np\n'), ((907, 929), 'numpy.argsort', 'np.argsort', (['eigenvalue'], {}), '(eigenvalue)\n', (917, 929), True, 'import numpy as np\n'), ((1004, 1031), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(1... |
import numpy as np
def _check_mne(name):
"""Helper to check if h5py is installed"""
try:
import mne
except ImportError:
raise ImportError('Please install MNE-python to use %s.' % name)
return mne
def raw_to_mask(raw, ixs, events=None, tmin=None, tmax=None):
"""
A function to ... | [
"numpy.array",
"numpy.empty",
"numpy.unique",
"numpy.atleast_1d"
] | [((3066, 3084), 'numpy.atleast_1d', 'np.atleast_1d', (['ixs'], {}), '(ixs)\n', (3079, 3084), True, 'import numpy as np\n'), ((3978, 4002), 'numpy.atleast_1d', 'np.atleast_1d', (['self.tmin'], {}), '(self.tmin)\n', (3991, 4002), True, 'import numpy as np\n'), ((4023, 4047), 'numpy.atleast_1d', 'np.atleast_1d', (['self.t... |
import sys
import numpy
import numpy as np
from snappy import Product
from snappy import ProductData
from snappy import ProductIO
from snappy import ProductUtils
from snappy import FlagCoding
##############
import csv
###############MSVR
from sklearn.svm import SVR
from sklearn.preprocessing import StandardScaler
fro... | [
"snappy.ProductIO.readProduct",
"snappy.ProductUtils.copyGeoCoding",
"snappy.Product",
"snappy.ProductIO.getProductWriter",
"numpy.asarray",
"numpy.column_stack",
"snappy.FlagCoding",
"sklearn.preprocessing.StandardScaler",
"numpy.zeros",
"numpy.array",
"snappy.ProductUtils.copyMetadata",
"csv... | [((520, 547), 'snappy.ProductIO.readProduct', 'ProductIO.readProduct', (['file'], {}), '(file)\n', (541, 547), False, 'from snappy import ProductIO\n'), ((1284, 1318), 'numpy.asarray', 'np.asarray', (['data'], {'dtype': 'np.float32'}), '(data, dtype=np.float32)\n', (1294, 1318), True, 'import numpy as np\n'), ((1389, 1... |
from __future__ import absolute_import, division, print_function
import numpy as np
import wx
from dials.array_family import flex
from dials_viewer_ext import rgb_img
class wxbmp_from_np_array(object):
def __init__(
self, lst_data_in, show_nums=True, palette="black2white", lst_data_mask_in=None
):
... | [
"numpy.amax",
"numpy.amin",
"dials_viewer_ext.rgb_img",
"wx.MemoryDC",
"numpy.size",
"wx.Image",
"numpy.zeros",
"numpy.empty",
"dials.array_family.flex.double"
] | [((345, 354), 'dials_viewer_ext.rgb_img', 'rgb_img', ([], {}), '()\n', (352, 354), False, 'from dials_viewer_ext import rgb_img\n'), ((3055, 3087), 'numpy.zeros', 'np.zeros', (['(ymax, xmax)', '"""double"""'], {}), "((ymax, xmax), 'double')\n", (3063, 3087), True, 'import numpy as np\n'), ((3114, 3146), 'numpy.zeros', ... |
import numpy as np
def check_x_y(x, y):
assert isinstance(x, np.ndarray) and isinstance(y, np.ndarray)
assert np.ndim(x) <= 3 and np.ndim(y) <= 2
assert len(x) == len(y)
| [
"numpy.ndim"
] | [((125, 135), 'numpy.ndim', 'np.ndim', (['x'], {}), '(x)\n', (132, 135), True, 'import numpy as np\n'), ((145, 155), 'numpy.ndim', 'np.ndim', (['y'], {}), '(y)\n', (152, 155), True, 'import numpy as np\n')] |
import numpy as np
from radix import radixConvert
c = radixConvert()
a = np.load("../../data/5/layer4.npy")
print(a.shape)
a = a*128
a = np.around(a).astype(np.int16)
print(a)
a = np.load('../../data/6.npy')
a = a*128
a = np.around(a).astype(np.int8)
print(a.shape)
for i in range(84):
print(i)
print(a[i])
''... | [
"numpy.load",
"numpy.around",
"radix.radixConvert"
] | [((54, 68), 'radix.radixConvert', 'radixConvert', ([], {}), '()\n', (66, 68), False, 'from radix import radixConvert\n'), ((74, 108), 'numpy.load', 'np.load', (['"""../../data/5/layer4.npy"""'], {}), "('../../data/5/layer4.npy')\n", (81, 108), True, 'import numpy as np\n'), ((183, 210), 'numpy.load', 'np.load', (['""".... |
#!/usr/bin/env python
# coding: utf-8
# conda install pytorch>=1.6 cudatoolkit=10.2 -c pytorch
# wandb login XXX
import json
import logging
import os
import re
import sklearn
import time
from itertools import product
import numpy as np
import pandas as pd
import wandb
#from IPython import get_ipython
from keras.prepro... | [
"os.path.exists",
"wandb.log",
"pandas.read_csv",
"sklearn.model_selection.train_test_split",
"itertools.product",
"os.environ.get",
"numpy.argmax",
"numpy.sum",
"pandas.concat",
"os.getpid",
"re.sub",
"logging.info"
] | [((827, 866), 'os.environ.get', 'os.environ.get', (['"""TAG"""', '"""bertsification"""'], {}), "('TAG', 'bertsification')\n", (841, 866), False, 'import os\n'), ((976, 1004), 'os.environ.get', 'os.environ.get', (['"""MODELNAMES"""'], {}), "('MODELNAMES')\n", (990, 1004), False, 'import os\n'), ((3792, 3865), 'sklearn.m... |
from __future__ import print_function, division
import numpy as np
import Nio
import time, os
#
# Creating a file
#
init_time = time.clock()
ncfile = 'test-large.nc'
if (os.path.exists(ncfile)):
os.system("/bin/rm -f " + ncfile)
opt = Nio.options()
opt.Format = "LargeFile"
opt.PreFill = False
file = Nio.open_file(nc... | [
"os.path.exists",
"time.clock",
"numpy.empty",
"Nio.options",
"Nio.open_file",
"os.system"
] | [((129, 141), 'time.clock', 'time.clock', ([], {}), '()\n', (139, 141), False, 'import time, os\n'), ((171, 193), 'os.path.exists', 'os.path.exists', (['ncfile'], {}), '(ncfile)\n', (185, 193), False, 'import time, os\n'), ((238, 251), 'Nio.options', 'Nio.options', ([], {}), '()\n', (249, 251), False, 'import Nio\n'), ... |
###############################################################################
# Author: <NAME>
# Project: ARC-II: Convolutional Matching Model
# Date Created: 7/18/2017
#
# File Description: This script contains ranking evaluation functions.
######################################################################... | [
"torch.sort",
"numpy.log2",
"torch.nonzero"
] | [((708, 746), 'torch.sort', 'torch.sort', (['logits', '(1)'], {'descending': '(True)'}), '(logits, 1, descending=True)\n', (718, 746), False, 'import torch, numpy\n'), ((1603, 1641), 'torch.sort', 'torch.sort', (['logits', '(1)'], {'descending': '(True)'}), '(logits, 1, descending=True)\n', (1613, 1641), False, 'import... |
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | [
"visualize.visualize_pose",
"cv2.imshow",
"numpy.array",
"infer.bench_log",
"os.path.exists",
"infer.get_test_images",
"cv2.VideoWriter",
"paddle.enable_static",
"os.path.split",
"cv2.VideoWriter_fourcc",
"cv2.waitKey",
"utils.get_current_memory_mb",
"cv2.cvtColor",
"det_keypoint_unite_uti... | [((5452, 5494), 'os.path.join', 'os.path.join', (['FLAGS.output_dir', 'video_name'], {}), '(FLAGS.output_dir, video_name)\n', (5464, 5494), False, 'import os\n'), ((5508, 5539), 'cv2.VideoWriter_fourcc', 'cv2.VideoWriter_fourcc', (["*'mp4v'"], {}), "(*'mp4v')\n", (5530, 5539), False, 'import cv2\n'), ((5554, 5609), 'cv... |
import random
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
from mla.base import BaseEstimator
from mla.metrics.distance import euclidean_distance
random.seed(1111)
class KMeans(BaseEstimator):
"""Partition a dataset into K clusters.
Finds clusters by repeatedly assigning each d... | [
"seaborn.set",
"random.choice",
"seaborn.color_palette",
"mla.metrics.distance.euclidean_distance",
"numpy.where",
"random.seed",
"numpy.take",
"numpy.array",
"numpy.empty",
"matplotlib.pyplot.scatter",
"random.random",
"matplotlib.pyplot.show"
] | [((177, 194), 'random.seed', 'random.seed', (['(1111)'], {}), '(1111)\n', (188, 194), False, 'import random\n'), ((2761, 2785), 'numpy.empty', 'np.empty', (['self.n_samples'], {}), '(self.n_samples)\n', (2769, 2785), True, 'import numpy as np\n'), ((4152, 4167), 'random.random', 'random.random', ([], {}), '()\n', (4165... |
# -*- coding: utf-8 -*-
"""
:Author: <NAME>
"""
import logging
import numpy as np
import scipy as sp
import collections
import itertools
from model.modelTemplate import Model
class BPE(Model):
"""The Bayesian predictor model
Attributes
----------
Name : string
The ... | [
"numpy.repeat",
"scipy.stats.dirichlet",
"numpy.array",
"numpy.sum",
"numpy.apply_along_axis"
] | [((2391, 2407), 'numpy.array', 'np.array', (['[0, 1]'], {}), '([0, 1])\n', (2399, 2407), True, 'import numpy as np\n'), ((3481, 3512), 'numpy.array', 'np.array', (['self.recDirichletVals'], {}), '(self.recDirichletVals)\n', (3489, 3512), True, 'import numpy as np\n'), ((8204, 8222), 'numpy.sum', 'np.sum', (['dirVals', ... |
#! /usr/bin/env python
"""Toolbox for unbalanced dataset in machine learning."""
from setuptools import setup, find_packages
import os
import sys
import setuptools
from distutils.command.build_py import build_py
if sys.version_info[0] < 3:
import __builtin__ as builtins
else:
import builtins
descr = """Tool... | [
"os.path.exists",
"setuptools.find_packages",
"numpy.distutils.misc_util.Configuration",
"sys.exit",
"os.remove"
] | [((1708, 1734), 'os.path.exists', 'os.path.exists', (['"""MANIFEST"""'], {}), "('MANIFEST')\n", (1722, 1734), False, 'import os\n'), ((1836, 1881), 'numpy.distutils.misc_util.Configuration', 'Configuration', (['None', 'parent_package', 'top_path'], {}), '(None, parent_package, top_path)\n', (1849, 1881), False, 'from n... |
#!/usr/bin/env python
# coding: utf-8
# In[18]:
# this definition exposes all python module imports that should be available in all subsequent commands
import json
import numpy as np
import pandas as pd
from causalnex.structure import DAGRegressor
from sklearn.model_selection import cross_val_score
from sklear... | [
"pandas.Series",
"numpy.mean",
"pandas.read_csv",
"sklearn.preprocessing.StandardScaler",
"json.load",
"pandas.DataFrame",
"causalnex.structure.DAGRegressor",
"sklearn.model_selection.KFold"
] | [((1022, 1146), 'causalnex.structure.DAGRegressor', 'DAGRegressor', ([], {'alpha': '(0.1)', 'beta': '(0.9)', 'fit_intercept': '(True)', 'hidden_layer_units': 'None', 'dependent_target': '(True)', 'enforce_dag': '(True)'}), '(alpha=0.1, beta=0.9, fit_intercept=True, hidden_layer_units=\n None, dependent_target=True, ... |
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.animation as animation
matplotlib.use('Agg')
import math
import numpy as np
import sys
from os.path import join, isfile
import warnings
warnings.filterwarnings("ignore")
def gda(x, y):
x = x.T
y = y.T
# phi = P(y = 1)
# mu[i] = mea... | [
"warnings.filterwarnings",
"numpy.mean",
"matplotlib.use",
"numpy.log",
"os.path.join",
"numpy.linalg.det",
"numpy.sum",
"numpy.array",
"numpy.linalg.inv",
"numpy.matmul",
"numpy.linspace",
"numpy.outer",
"matplotlib.pyplot.subplots",
"numpy.arange",
"matplotlib.pyplot.show"
] | [((91, 112), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (105, 112), False, 'import matplotlib\n'), ((206, 239), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (229, 239), False, 'import warnings\n'), ((547, 556), 'numpy.sum', 'np.sum', (['y'], {}... |
"""
Routines for the analysis of proton radiographs. These routines can be broadly
classified as either creating synthetic radiographs from prescribed fields or
methods of 'inverting' experimentally created radiographs to reconstruct the
original fields (under some set of assumptions).
"""
__all__ = [
"SyntheticPr... | [
"numpy.clip",
"numpy.log10",
"numpy.sqrt",
"numpy.arccos",
"plasmapy.simulation.particle_integrators.boris_push",
"numpy.logical_not",
"numpy.array",
"numpy.arctan2",
"numpy.isfinite",
"numpy.linalg.norm",
"numpy.sin",
"numpy.moveaxis",
"numpy.mean",
"numpy.cross",
"numpy.where",
"nump... | [((1362, 1373), 'numpy.zeros', 'np.zeros', (['(3)'], {}), '(3)\n', (1370, 1373), True, 'import numpy as np\n'), ((7185, 7220), 'numpy.cross', 'np.cross', (['self.det_hdir', 'self.det_n'], {}), '(self.det_hdir, self.det_n)\n', (7193, 7220), True, 'import numpy as np\n'), ((10017, 10030), 'numpy.zeros', 'np.zeros', (['[8... |
from numpy import array, rad2deg, pi, mgrid, argmin
from matplotlib.pylab import contour
import matplotlib.pyplot as plt
import mplstereonet
from obspy.imaging.beachball import aux_plane
from focal_mech.lib.classify_mechanism import classify, translate_to_sphharm
from focal_mech.io.read_hash import read_demo, read_h... | [
"focal_mech.lib.classify_mechanism.classify",
"focal_mech.util.hash_routines.hash_to_classifier",
"matplotlib.pylab.contour",
"focal_mech.io.read_hash.read_hash_solutions",
"focal_mech.io.read_hash.read_demo",
"numpy.array",
"matplotlib.pyplot.figure",
"obspy.imaging.beachball.aux_plane",
"focal_mec... | [((507, 542), 'focal_mech.io.read_hash.read_hash_solutions', 'read_hash_solutions', (['"""example1.out"""'], {}), "('example1.out')\n", (526, 542), False, 'from focal_mech.io.read_hash import read_demo, read_hash_solutions\n'), ((598, 653), 'focal_mech.io.read_hash.read_demo', 'read_demo', (['"""north1.phase"""', '"""s... |
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import sklearn.ensemble
import sklearn.metrics
import sklearn
import progressbar
import sklearn.model_selection
from plotnine import *
import pdb
import sys
sys.path.append("smooth_rf/")
import smooth_base
import smooth_level
# function
def aver... | [
"numpy.abs",
"sklearn.ensemble.RandomForestRegressor",
"numpy.random.choice",
"sklearn.metrics.mean_squared_error",
"numpy.zeros",
"smooth_base.generate_data",
"pandas.DataFrame",
"sys.path.append"
] | [((229, 258), 'sys.path.append', 'sys.path.append', (['"""smooth_rf/"""'], {}), "('smooth_rf/')\n", (244, 258), False, 'import sys\n'), ((1181, 1219), 'smooth_base.generate_data', 'smooth_base.generate_data', ([], {'large_n': '(650)'}), '(large_n=650)\n', (1206, 1219), False, 'import smooth_base\n'), ((1234, 1329), 'pa... |
"""
Several methods for generating graphs from the stochastic block model.
"""
import itertools
import math
import random
import scipy.sparse
import numpy as np
def _get_num_pos_edges(c1_size, c2_size, same_cluster, self_loops, directed):
"""
Compute the number of possible edges between two clusters.
:pa... | [
"random.randint",
"numpy.random.binomial"
] | [((2449, 2506), 'numpy.random.binomial', 'np.random.binomial', (['possible_edges_between_clusters', 'prob'], {}), '(possible_edges_between_clusters, prob)\n', (2467, 2506), True, 'import numpy as np\n'), ((5081, 5118), 'random.randint', 'random.randint', (['(0)', 'num_possible_edges'], {}), '(0, num_possible_edges)\n',... |
import numpy as np
import shapely.geometry as geom
class Bbox:
def __init__(self, name, part_id, depth_image, xyz, box_size, projection):
if not isinstance(xyz, np.ndarray):
raise ValueError("xyz must be an np.ndarray")
self.name = name
self.id = part_id
self.center = np... | [
"numpy.mean",
"shapely.geometry.box",
"numpy.exp",
"numpy.array",
"numpy.std"
] | [((318, 344), 'numpy.array', 'np.array', (['[xyz[0], xyz[1]]'], {}), '([xyz[0], xyz[1]])\n', (326, 344), True, 'import numpy as np\n'), ((717, 769), 'shapely.geometry.box', 'geom.box', (['self.xmin', 'self.ymin', 'self.xmax', 'self.ymax'], {}), '(self.xmin, self.ymin, self.xmax, self.ymax)\n', (725, 769), True, 'import... |
import os
import numpy as np
import pytest
import vtk
import pyvista
from pyvista import examples
from pyvista.plotting import system_supports_plotting
beam = pyvista.UnstructuredGrid(examples.hexbeamfile)
# create structured grid
x = np.arange(-10, 10, 2)
y = np.arange(-10, 10, 2)
z = np.arange(-10, 10, 2)
x, y, z... | [
"numpy.array",
"pyvista.UnstructuredGrid",
"numpy.arange",
"pyvista.UniformGrid",
"pyvista.plotting.system_supports_plotting",
"pyvista.examples.load_structured",
"numpy.vstack",
"numpy.meshgrid",
"numpy.allclose",
"numpy.any",
"pytest.raises",
"pyvista.examples.load_uniform",
"pyvista.Struc... | [((162, 208), 'pyvista.UnstructuredGrid', 'pyvista.UnstructuredGrid', (['examples.hexbeamfile'], {}), '(examples.hexbeamfile)\n', (186, 208), False, 'import pyvista\n'), ((239, 260), 'numpy.arange', 'np.arange', (['(-10)', '(10)', '(2)'], {}), '(-10, 10, 2)\n', (248, 260), True, 'import numpy as np\n'), ((265, 286), 'n... |
import warnings
warnings.simplefilter('ignore')
import argparse
import pickle
import numpy as np
import pandas as pd
import networkx as nx
import scipy.sparse as sp
from network_propagation_methods import minprop_2
from sklearn.metrics import roc_auc_score, auc
import matplotlib.pyplot as plt
#### Parameters ########... | [
"network_propagation_methods.minprop_2",
"numpy.mean",
"argparse.ArgumentParser",
"sklearn.metrics.auc",
"pickle.load",
"sklearn.metrics.roc_auc_score",
"numpy.append",
"numpy.sum",
"numpy.array",
"numpy.zeros",
"numpy.isnan",
"numpy.dot",
"matplotlib.pyplot.scatter",
"numpy.argsort",
"w... | [((16, 47), 'warnings.simplefilter', 'warnings.simplefilter', (['"""ignore"""'], {}), "('ignore')\n", (37, 47), False, 'import warnings\n'), ((335, 386), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Runs MINProp"""'}), "(description='Runs MINProp')\n", (358, 386), False, 'import argpar... |
########################################################################################################################
# #
# This file is part of kAIvy ... | [
"kivy.graphics.Line",
"kivy.graphics.SmoothLine",
"numpy.linalg.norm",
"numpy.sum",
"numpy.array",
"kivy.graphics.Color"
] | [((3148, 3165), 'numpy.linalg.norm', 'np.linalg.norm', (['n'], {}), '(n)\n', (3162, 3165), True, 'import numpy as np\n'), ((1386, 1402), 'numpy.array', 'np.array', (['points'], {}), '(points)\n', (1394, 1402), True, 'import numpy as np\n'), ((1663, 1676), 'kivy.graphics.Color', 'Color', (['*color'], {}), '(*color)\n', ... |
# Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import openvino.runtime.opset9 as ov
import numpy as np
import pytest
from tests.runtime import get_runtime
from openvino.runtime.utils.types import get_element_type_str
from openvino.runtime.utils.types import get_element_type
@pytes... | [
"numpy.tile",
"numpy.eye",
"pytest.param",
"numpy.array",
"openvino.runtime.utils.types.get_element_type",
"openvino.runtime.opset9.constant",
"openvino.runtime.utils.types.get_element_type_str"
] | [((677, 707), 'numpy.array', 'np.array', (['[num_rows]', 'np.int32'], {}), '([num_rows], np.int32)\n', (685, 707), True, 'import numpy as np\n'), ((732, 765), 'numpy.array', 'np.array', (['[num_columns]', 'np.int32'], {}), '([num_columns], np.int32)\n', (740, 765), True, 'import numpy as np\n'), ((793, 829), 'numpy.arr... |
import numpy as np
import scipy.special as ss
import pathlib
from Particle import Particle
def ql_global(l, particles):
# Keep only particles that have neighbors (this was changed 5/23/2020)
particles = [i for i in particles if len(Particle.data[i].neighs)>0]
neigh_total = sum([len(Particle.data[i].neig... | [
"numpy.array",
"numpy.sqrt"
] | [((1087, 1109), 'numpy.sqrt', 'np.sqrt', (['Qlmbar_mag_sq'], {}), '(Qlmbar_mag_sq)\n', (1094, 1109), True, 'import numpy as np\n'), ((1036, 1084), 'numpy.sqrt', 'np.sqrt', (['(4 * np.pi / (2 * l + 1) * Qlmbar_mag_sq)'], {}), '(4 * np.pi / (2 * l + 1) * Qlmbar_mag_sq)\n', (1043, 1084), True, 'import numpy as np\n'), ((9... |
""" IO Handler for LAS (and compressed LAZ) file format """
import laspy
import numpy as np
from laserchicken import keys
from laserchicken.io.base_io_handler import IOHandler
from laserchicken.io.utils import convert_to_short_type, select_valid_attributes
DEFAULT_LAS_ATTRIBUTES = {
'x',
'y',
'z',
'i... | [
"laspy.create",
"laserchicken.io.utils.convert_to_short_type",
"laserchicken.io.utils.select_valid_attributes",
"laspy.ExtraBytesParams",
"laspy.read",
"numpy.zeros_like"
] | [((757, 778), 'laspy.read', 'laspy.read', (['self.path'], {}), '(self.path)\n', (767, 778), False, 'import laspy\n'), ((993, 1050), 'laserchicken.io.utils.select_valid_attributes', 'select_valid_attributes', (['attributes_available', 'attributes'], {}), '(attributes_available, attributes)\n', (1016, 1050), False, 'from... |
from tensorflow.keras.layers import Conv2D, MaxPooling2D, Flatten, Dense, Dropout, BatchNormalization
from tensorflow.keras.preprocessing.image import ImageDataGenerator
from tensorflow.keras.callbacks import ModelCheckpoint
from tensorflow.keras.models import Sequential
from tensorflow.keras.models import load_model
... | [
"logging.getLogger",
"tensorflow.device",
"logging.StreamHandler",
"tensorflow.random.set_seed",
"argparse.ArgumentParser",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.MaxPooling2D",
"tensorflow.keras.layers.Dropout",
"os.path.join",
"tensorflow.keras.preprocessing.image.ImageDataGe... | [((538, 558), 'numpy.random.seed', 'np.random.seed', (['SEED'], {}), '(SEED)\n', (552, 558), True, 'import numpy as np\n'), ((559, 583), 'tensorflow.random.set_seed', 'tf.random.set_seed', (['SEED'], {}), '(SEED)\n', (577, 583), True, 'import tensorflow as tf\n'), ((609, 639), 'logging.getLogger', 'logging.getLogger', ... |
"""
Thư viện này viết ra phục vụ cho môn học `Các mô hình ngẫu nhiên và ứng dụng`
Sử dụng các thư viện `networkx, pandas, numpy, matplotlib`
"""
import networkx as nx
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.image import imread
import pandas as pd
def _gcd(a, b):
if a == 0:
retu... | [
"pandas.read_csv",
"matplotlib.pyplot.ylabel",
"matplotlib.image.imread",
"numpy.ndarray.tolist",
"matplotlib.pyplot.imshow",
"numpy.delete",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.plot",
"networkx.DiGraph",
"numpy.subtract",
"numpy.matmul",
"pandas.DataFrame",
"matplotlib.pyplot.axi... | [((1247, 1264), 'pandas.read_csv', 'pd.read_csv', (['path'], {}), '(path)\n', (1258, 1264), True, 'import pandas as pd\n'), ((1282, 1300), 'pandas.DataFrame', 'pd.DataFrame', (['data'], {}), '(data)\n', (1294, 1300), True, 'import pandas as pd\n'), ((2356, 2385), 'numpy.matmul', 'np.matmul', (['self.pi', 'self.data'], ... |
# Copyright © 2019. <NAME>. All rights reserved.
import numpy as np
import pandas as pd
from collections import OrderedDict
import math
import warnings
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis as LDA
from sklearn.neighbors import NearestNeighbors
from sklearn.metrics import silhouette_sco... | [
"numpy.invert",
"numpy.argsort",
"numpy.array",
"numpy.linalg.norm",
"numpy.nanmin",
"numpy.cov",
"numpy.arange",
"numpy.random.RandomState",
"numpy.mean",
"numpy.histogram",
"numpy.reshape",
"numpy.where",
"numpy.delete",
"numpy.diff",
"numpy.max",
"numpy.linspace",
"numpy.empty",
... | [((1982, 1996), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (1994, 1996), True, 'import pandas as pd\n'), ((8894, 8918), 'numpy.zeros', 'np.zeros', (['(total_units,)'], {}), '((total_units,))\n', (8902, 8918), True, 'import numpy as np\n'), ((9794, 9818), 'numpy.zeros', 'np.zeros', (['(total_units,)'], {}), '... |
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.gridspec import GridSpec
import copy
from .pdp_calc_utils import _sample_data, _find_onehot_actual, _find_closest
from sklearn.cluster import MiniBatchKMeans, KMeans
def _pdp_plot_title(n_grids, feature_name, ax, multi_flag, whi... | [
"sklearn.cluster.KMeans",
"numpy.log10",
"sklearn.cluster.MiniBatchKMeans",
"numpy.min",
"numpy.max",
"numpy.array",
"matplotlib.gridspec.GridSpec",
"matplotlib.pyplot.figure",
"numpy.linspace",
"copy.deepcopy",
"pandas.DataFrame",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.get_cmap"
] | [((5131, 5171), 'copy.deepcopy', 'copy.deepcopy', (['pdp_isolate_out.ice_lines'], {}), '(pdp_isolate_out.ice_lines)\n', (5144, 5171), False, 'import copy\n'), ((5184, 5218), 'copy.deepcopy', 'copy.deepcopy', (['pdp_isolate_out.pdp'], {}), '(pdp_isolate_out.pdp)\n', (5197, 5218), False, 'import copy\n'), ((11826, 11886)... |
"""Perform normalization on inputs or rewards.
"""
import numpy as np
import torch
from gym.spaces import Box
def normalize_angle(x):
"""Wraps input angle to [-pi, pi].
"""
return ((x + np.pi) % (2 * np.pi)) - np.pi
class RunningMeanStd():
"""Calulates the running mean and std of a data stream.
... | [
"numpy.mean",
"numpy.sqrt",
"numpy.ones",
"numpy.asarray",
"numpy.square",
"numpy.zeros",
"numpy.var"
] | [((787, 814), 'numpy.zeros', 'np.zeros', (['shape', 'np.float64'], {}), '(shape, np.float64)\n', (795, 814), True, 'import numpy as np\n'), ((834, 860), 'numpy.ones', 'np.ones', (['shape', 'np.float64'], {}), '(shape, np.float64)\n', (841, 860), True, 'import numpy as np\n'), ((1094, 1114), 'numpy.mean', 'np.mean', (['... |
import numpy as np
from scipy.special import factorial
from pyapprox.indexing import hash_array
from pyapprox.indexing import compute_hyperbolic_level_indices
def multiply_multivariate_polynomials(indices1,coeffs1,indices2,coeffs2):
"""
TODO: instead of using dictionary to colect terms consider using
uniqu... | [
"numpy.tile",
"numpy.ones",
"numpy.hstack",
"scipy.special.factorial",
"pyapprox.indexing.compute_hyperbolic_level_indices",
"numpy.asarray",
"pyapprox.indexing.hash_array",
"numpy.zeros",
"numpy.empty",
"numpy.vstack",
"numpy.polynomial.polynomial.polypow",
"numpy.zeros_like"
] | [((1047, 1089), 'numpy.empty', 'np.empty', (['(num_vars, max_num_indices)', 'int'], {}), '((num_vars, max_num_indices), int)\n', (1055, 1089), True, 'import numpy as np\n'), ((1101, 1133), 'numpy.empty', 'np.empty', (['max_num_indices', 'float'], {}), '(max_num_indices, float)\n', (1109, 1133), True, 'import numpy as n... |
import numpy as np
import cv2
import os
import math
os.system("fswebcam -r 507x456 --no-banner image11.jpg")
def showImage(capImg):
cv2.imshow('img', capImg)
cv2.waitKey(0)
cv2.destroyAllWindows()
img = cv2.imread('image11.jpg',-1)
height, width, channel = img.shape
topy= height
topx = width
hsv = cv2.cv... | [
"cv2.rectangle",
"cv2.drawContours",
"cv2.threshold",
"cv2.inRange",
"cv2.bitwise_and",
"cv2.contourArea",
"cv2.imshow",
"numpy.array",
"cv2.waitKey",
"cv2.destroyAllWindows",
"cv2.cvtColor",
"cv2.moments",
"cv2.findContours",
"os.system",
"cv2.imread"
] | [((52, 108), 'os.system', 'os.system', (['"""fswebcam -r 507x456 --no-banner image11.jpg"""'], {}), "('fswebcam -r 507x456 --no-banner image11.jpg')\n", (61, 108), False, 'import os\n'), ((217, 246), 'cv2.imread', 'cv2.imread', (['"""image11.jpg"""', '(-1)'], {}), "('image11.jpg', -1)\n", (227, 246), False, 'import cv2... |
"""
Analysis code for plotting vertical flux transport and/or a gif of temperature,
velocity and KE from the merged output of a Dedalus Rayleigh-Bérnard code.
Author: <NAME>
"""
# ====================
# IMPORTS
# ====================
import numpy as np
import h5py
import argparse
import matplotlib.pyplot as plt
import ... | [
"numpy.array",
"imageio.get_writer",
"argparse.ArgumentParser",
"numpy.max",
"os.path.normpath",
"matplotlib.pyplot.close",
"matplotlib.gridspec.GridSpec",
"numpy.linspace",
"numpy.min",
"numpy.meshgrid",
"dedalus.public.Fourier",
"numpy.abs",
"matplotlib.pyplot.savefig",
"h5py.File",
"n... | [((553, 578), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (576, 578), False, 'import argparse\n'), ((1187, 1239), 'dedalus.public.Fourier', 'de.Fourier', (['"""y"""', '(256)'], {'interval': '(0, a)', 'dealias': '(3 / 2)'}), "('y', 256, interval=(0, a), dealias=3 / 2)\n", (1197, 1239), True, ... |
# Copyright (c) 2020 Graphcore Ltd. 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 la... | [
"pytest.mark.ipus",
"numpy.ones",
"numpy.float32",
"tensorflow.compat.v1.Session",
"pathlib.Path",
"tensorflow.placeholder",
"din.din_model.DIN.build_fcn_net",
"tensorflow.global_variables_initializer",
"tensorflow.set_random_seed",
"common.utils.din_attention"
] | [((977, 1001), 'tensorflow.set_random_seed', 'tf.set_random_seed', (['seed'], {}), '(seed)\n', (995, 1001), True, 'import tensorflow as tf\n'), ((1028, 1047), 'pytest.mark.ipus', 'pytest.mark.ipus', (['(1)'], {}), '(1)\n', (1044, 1047), False, 'import pytest\n'), ((1319, 1346), 'numpy.ones', 'np.ones', (['[4, 2]', 'np.... |
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | [
"numpy.random.random",
"numpy.zeros_like",
"paddle.enable_static",
"numpy.array",
"numpy.random.randint",
"paddle.fluid.core.globals",
"unittest.main",
"paddle.NPUPlace",
"sys.path.append"
] | [((670, 691), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (685, 691), False, 'import sys\n'), ((895, 917), 'paddle.enable_static', 'paddle.enable_static', ([], {}), '()\n', (915, 917), False, 'import paddle\n'), ((2536, 2551), 'unittest.main', 'unittest.main', ([], {}), '()\n', (2549, 2551), F... |
import math
import numpy as np
import pandas as pd
class PenmanMonteithDaily(object):
r"""The class *PenmanMonteithDaily* calculates daily potential evapotranspiration according to the Penman-Monteith
method as described in
`FAO 56 <http://www.fao.org/tempref/SD/Reserved/Agromet/PET/FAO_Irrigation_Drainag... | [
"numpy.radians",
"numpy.mean",
"numpy.sqrt",
"numpy.tan",
"numpy.where",
"numpy.log",
"math.log",
"numpy.exp",
"numpy.array",
"numpy.cos",
"numpy.sin",
"math.exp",
"pandas.to_datetime"
] | [((15037, 15055), 'numpy.mean', 'np.mean', (['t'], {'axis': '(0)'}), '(t, axis=0)\n', (15044, 15055), True, 'import numpy as np\n'), ((15924, 15943), 'numpy.mean', 'np.mean', (['sl'], {'axis': '(0)'}), '(sl, axis=0)\n', (15931, 15943), True, 'import numpy as np\n'), ((40204, 40241), 'numpy.where', 'np.where', (['(self.... |
# coding=utf-8
# Copyright 2019 The Google Research Authors.
#
# 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 applicab... | [
"tensorflow.tile",
"neutra.utils.LogAndSaveHParams",
"tensorflow.matrix_diag_part",
"tensorflow.group",
"tensorflow.nn.softplus",
"neutra.utils.LogAndSummarizeMetrics",
"absl.flags.DEFINE_float",
"numpy.arange",
"tensorflow.image.resize_nearest_neighbor",
"tensorflow.gfile.Exists",
"tensorflow.S... | [((7472, 7509), 'gin.configurable', 'gin.configurable', (['"""conv_hier_encoder"""'], {}), "('conv_hier_encoder')\n", (7488, 7509), False, 'import gin\n'), ((8570, 8610), 'gin.configurable', 'gin.configurable', (['"""conv_hier_prior_post"""'], {}), "('conv_hier_prior_post')\n", (8586, 8610), False, 'import gin\n'), ((1... |
# ------------------------------------------------------------------------------------------------ #
# MIT License #
# #
# Copyright (c) 2... | [
"numpy.abs",
"numpy.isclose",
"chex.assert_rank",
"numpy.arange",
"numpy.asarray",
"chex.assert_equal_shape",
"numpy.concatenate",
"numpy.full",
"numpy.maximum",
"numpy.random.RandomState"
] | [((4815, 4850), 'numpy.random.RandomState', 'onp.random.RandomState', (['random_seed'], {}), '(random_seed)\n', (4837, 4850), True, 'import numpy as onp\n'), ((5253, 5299), 'numpy.isclose', 'onp.isclose', (['new_alpha', 'self._alpha'], {'rtol': '(0.01)'}), '(new_alpha, self._alpha, rtol=0.01)\n', (5264, 5299), True, 'i... |
"""
@author: ludvigolsen
"""
from typing import Union
import numpy as np
import pandas as pd
from utipy.utils.check_instance import check_instance
from utipy.utils.convert_to_type import convert_to_type
def blend(x1: Union[list, np.ndarray, pd.Series], x2: Union[list, np.ndarray, pd.Series], amount: float = 0.5) -> ... | [
"utipy.utils.check_instance.check_instance",
"numpy.multiply",
"utipy.utils.convert_to_type.convert_to_type"
] | [((1154, 1172), 'utipy.utils.check_instance.check_instance', 'check_instance', (['x1'], {}), '(x1)\n', (1168, 1172), False, 'from utipy.utils.check_instance import check_instance\n'), ((1192, 1219), 'numpy.multiply', 'np.multiply', (['x1', '(1 - amount)'], {}), '(x1, 1 - amount)\n', (1203, 1219), True, 'import numpy as... |
import numpy as np
import pandas as pd
from bokeh.core.json_encoder import serialize_json
from bokeh.core.properties import List, String
from bokeh.document import Document
from bokeh.layouts import row, column
from bokeh.models import CustomJS, HoverTool, Range1d, Slider, Button
from bokeh.models.widgets import Check... | [
"bokeh.layouts.column",
"bokeh.models.widgets.TextInput",
"numpy.log10",
"bokeh.util.compiler.bundle_all_models",
"bokeh.plotting.figure",
"bokeh.layouts.row",
"skyportal.models.Group.id.in_",
"skyportal.models.Telescope.nickname.label",
"numpy.log",
"bokeh.util.serialization.make_id",
"numpy.is... | [((4916, 4936), 'matplotlib.cm.get_cmap', 'cm.get_cmap', (['"""jet_r"""'], {}), "('jet_r')\n", (4927, 4936), False, 'from matplotlib import cm\n'), ((2656, 2698), 'bokeh.core.properties.List', 'List', (['String'], {'help': '"""List of legend colors"""'}), "(String, help='List of legend colors')\n", (2660, 2698), False,... |
# python
# import warnings
# Third party imports
import numpy as np
# grAdapt
from .base import Initial
from grAdapt.utils.sampling import sample_corner_bounds
class Vertices(Initial):
"""
Samples vertices if n_evals >= 2 ** len(bounds).
Else low discrepancy sequences are sampled.
"""
def __ini... | [
"numpy.vstack",
"grAdapt.utils.sampling.sample_corner_bounds"
] | [((1391, 1424), 'grAdapt.utils.sampling.sample_corner_bounds', 'sample_corner_bounds', (['self.bounds'], {}), '(self.bounds)\n', (1411, 1424), False, 'from grAdapt.utils.sampling import sample_corner_bounds\n'), ((1819, 1860), 'numpy.vstack', 'np.vstack', (['(corner_points, random_points)'], {}), '((corner_points, rand... |
# Copyright 2021 <NAME>
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
#... | [
"numpy.ones",
"numpy.where",
"tqdm.tqdm",
"torch.Tensor",
"h5py.File",
"numpy.zeros"
] | [((6574, 6603), 'h5py.File', 'h5py.File', (['fragment_file', '"""r"""'], {}), "(fragment_file, 'r')\n", (6583, 6603), False, 'import h5py\n'), ((7665, 7694), 'h5py.File', 'h5py.File', (['fragment_file', '"""r"""'], {}), "(fragment_file, 'r')\n", (7674, 7694), False, 'import h5py\n'), ((16271, 16303), 'h5py.File', 'h5py... |
import numpy as np
np.random.seed(123) # for reproducibility
from keras.models import Sequential
from keras.layers import Dense, Dropout, Activation, Flatten
from keras.layers import Convolution2D, MaxPooling2D
from keras.utils import np_utils
from dataset_pothole import pothole
from keras.models import model_from_j... | [
"keras.layers.Convolution2D",
"keras.layers.Flatten",
"keras.layers.MaxPooling2D",
"keras.models.Sequential",
"keras.layers.Dense",
"keras.utils.np_utils.to_categorical",
"numpy.random.seed",
"keras.layers.Activation",
"dataset_pothole.pothole.load_data",
"keras.layers.Dropout"
] | [((19, 38), 'numpy.random.seed', 'np.random.seed', (['(123)'], {}), '(123)\n', (33, 38), True, 'import numpy as np\n'), ((423, 442), 'dataset_pothole.pothole.load_data', 'pothole.load_data', ([], {}), '()\n', (440, 442), False, 'from dataset_pothole import pothole\n'), ((785, 820), 'keras.utils.np_utils.to_categorical'... |
import argparse, time, logging, os, math, random
os.environ["MXNET_USE_OPERATOR_TUNING"] = "0"
import numpy as np
from scipy import stats
import mxnet as mx
from mxnet import gluon, nd
from mxnet import autograd as ag
from mxnet.gluon import nn
from mxnet.gluon.data.vision import transforms
from gluoncv.model_zoo im... | [
"logging.getLogger",
"logging.StreamHandler",
"mxnet.autograd.record",
"mxnet.gluon.nn.Conv2D",
"mxnet.gluon.nn.BatchNorm",
"mxnet.init.Xavier",
"numpy.array",
"mxnet.gluon.nn.MaxPool2D",
"mxnet.gluon.nn.Sequential",
"mxnet.gluon.data.dataset.ArrayDataset",
"mxnet.gluon.nn.Flatten",
"mxnet.glu... | [((622, 647), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (645, 647), False, 'import argparse\n'), ((2619, 2648), 'logging.FileHandler', 'logging.FileHandler', (['args.log'], {}), '(args.log)\n', (2638, 2648), False, 'import argparse, time, logging, os, math, random\n'), ((2665, 2688), 'logg... |
#!/usr/bin/env python
# Copyright 2019 Division of Medical Image Computing, German Cancer Research Center (DKFZ).
#
# 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... | [
"numpy.sqrt",
"numpy.array",
"numpy.arange",
"numpy.mean",
"numpy.flip",
"os.listdir",
"numpy.where",
"numpy.delete",
"numpy.max",
"numpy.stack",
"numpy.concatenate",
"numpy.min",
"numpy.maximum",
"collections.OrderedDict",
"numpy.ceil",
"pickle.load",
"numpy.argmax",
"numpy.floor"... | [((10050, 10078), 'numpy.maximum', 'np.maximum', (['y1[i]', 'y1[order]'], {}), '(y1[i], y1[order])\n', (10060, 10078), True, 'import numpy as np\n'), ((10093, 10121), 'numpy.maximum', 'np.maximum', (['x1[i]', 'x1[order]'], {}), '(x1[i], x1[order])\n', (10103, 10121), True, 'import numpy as np\n'), ((10136, 10164), 'num... |
import math
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
from scipy.stats import ttest_ind
from sklearn.preprocessing import LabelEncoder
def load_data():
questionnaire = pd.read_excel('XAutoML.xlsx')
encoder = LabelEncoder()
encoder.classes_ = np.array([... | [
"sklearn.preprocessing.LabelEncoder",
"seaborn.despine",
"matplotlib.pyplot.xticks",
"seaborn.set_theme",
"pandas.option_context",
"numpy.array",
"scipy.stats.ttest_ind",
"seaborn.violinplot",
"pandas.read_excel",
"pandas.DataFrame",
"matplotlib.pyplot.subplots"
] | [((227, 256), 'pandas.read_excel', 'pd.read_excel', (['"""XAutoML.xlsx"""'], {}), "('XAutoML.xlsx')\n", (240, 256), True, 'import pandas as pd\n'), ((272, 286), 'sklearn.preprocessing.LabelEncoder', 'LabelEncoder', ([], {}), '()\n', (284, 286), False, 'from sklearn.preprocessing import LabelEncoder\n'), ((310, 395), 'n... |
"""
*****************
Specifying Colors
*****************
Matplotlib recognizes the following formats to specify a color:
* an RGB or RGBA (red, green, blue, alpha) tuple of float values in closed
interval ``[0, 1]`` (e.g., ``(0.1, 0.2, 0.5)`` or ``(0.1, 0.2, 0.5, 0.3)``);
* a hex RGB or RGBA string (e.g., ``'#0f0f... | [
"matplotlib.patches.Rectangle",
"numpy.linspace",
"matplotlib.style.use",
"matplotlib.pyplot.figure",
"numpy.cos",
"numpy.sin",
"matplotlib.pyplot.subplots"
] | [((2661, 2691), 'numpy.linspace', 'np.linspace', (['(0)', '(2 * np.pi)', '(128)'], {}), '(0, 2 * np.pi, 128)\n', (2672, 2691), True, 'import numpy as np\n'), ((4251, 4280), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '[4.8, 16]'}), '(figsize=[4.8, 16])\n', (4261, 4280), True, 'import matplotlib.pyplot as... |
import numpy as np
nparr = np.array([i for i in range(10)])
a = np.zeros(10)
f = np.zeros(10,dtype=float)
n = np.full((3,5),44)
r = np.random.randint(0,100,size=(3,5))
r2 = np.random.random((3,5))
x = np.linspace(0,100,50)
print(nparr,a,f,n,r,r2,x) | [
"numpy.random.random",
"numpy.zeros",
"numpy.linspace",
"numpy.random.randint",
"numpy.full"
] | [((66, 78), 'numpy.zeros', 'np.zeros', (['(10)'], {}), '(10)\n', (74, 78), True, 'import numpy as np\n'), ((83, 108), 'numpy.zeros', 'np.zeros', (['(10)'], {'dtype': 'float'}), '(10, dtype=float)\n', (91, 108), True, 'import numpy as np\n'), ((112, 131), 'numpy.full', 'np.full', (['(3, 5)', '(44)'], {}), '((3, 5), 44)\... |
# Copyright (c) 2019-2021, <NAME>, <NAME>, <NAME>, and <NAME>.
#
# Distributed under the 3-clause BSD license, see accompanying file LICENSE
# or https://github.com/scikit-hep/vector for details.
import numpy
import pytest
import vector.backends.numpy_
import vector.backends.object_
def test_xy():
vec = vector.... | [
"pytest.approx",
"numpy.allclose"
] | [((853, 921), 'numpy.allclose', 'numpy.allclose', (['out.x', '[0, 0.9950041652780258, -0.09983341664682815]'], {}), '(out.x, [0, 0.9950041652780258, -0.09983341664682815])\n', (867, 921), False, 'import numpy\n'), ((933, 1000), 'numpy.allclose', 'numpy.allclose', (['out.y', '[0, 0.09983341664682815, 0.9950041652780258]... |
# Copyright 2022 NREL
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distri... | [
"numpy.array",
"numpy.zeros",
"floris.tools.FlorisInterface",
"matplotlib.pyplot.subplots",
"numpy.arange",
"matplotlib.pyplot.show"
] | [((1151, 1185), 'floris.tools.FlorisInterface', 'FlorisInterface', (['"""inputs/gch.yaml"""'], {}), "('inputs/gch.yaml')\n", (1166, 1185), False, 'from floris.tools import FlorisInterface\n'), ((1359, 1379), 'numpy.array', 'np.array', (['[0, D * 6]'], {}), '([0, D * 6])\n', (1367, 1379), True, 'import numpy as np\n'), ... |
import copy
import numpy as np
from scipy.special import wofz
from scipy.integrate import quad
from typing import List, Tuple
import autoarray as aa
from autogalaxy.profiles.mass_profiles import MassProfile
from autogalaxy.profiles.mass_profiles.mass_profiles import (
MassProfileMGE,
MassProfileCSE... | [
"numpy.log10",
"numpy.sqrt",
"autogalaxy.profiles.mass_profiles.mass_profiles.psi_from",
"numpy.add",
"numpy.power",
"scipy.integrate.quad",
"numpy.subtract",
"copy.copy",
"numpy.exp",
"numpy.real",
"numpy.zeros",
"numpy.square",
"numpy.vstack",
"scipy.special.wofz",
"numpy.shape",
"nu... | [((5818, 5847), 'numpy.zeros', 'np.zeros', ([], {'shape': 'grid.shape[0]'}), '(shape=grid.shape[0])\n', (5826, 5847), True, 'import numpy as np\n'), ((6793, 6807), 'numpy.shape', 'np.shape', (['grid'], {}), '(grid)\n', (6801, 6807), True, 'import numpy as np\n'), ((6831, 6875), 'numpy.zeros', 'np.zeros', (['shape_grid[... |
from __future__ import print_function, division, absolute_import
import itertools
import sys
# unittest only added in 3.4 self.subTest()
if sys.version_info[0] < 3 or sys.version_info[1] < 4:
import unittest2 as unittest
else:
import unittest
# unittest.mock is not available in 2.7 (though unittest2 might cont... | [
"numpy.clip",
"numpy.prod",
"imgaug.random.RNG",
"imgaug.parameters.Choice",
"mock.Mock",
"imgaug.parameters.Uniform",
"imgaug.parameters.draw_distributions_grid",
"imgaug.parameters.handle_discrete_param",
"numpy.array",
"six.moves.xrange",
"imgaug.parameters.handle_continuous_param",
"imgaug... | [((422, 443), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (436, 443), False, 'import matplotlib\n'), ((789, 808), 'imgaug.is_np_array', 'ia.is_np_array', (['arr'], {}), '(arr)\n', (803, 808), True, 'import imgaug as ia\n'), ((1005, 1112), 'imgaug.parameters.handle_continuous_param', 'iap.handl... |
import numpy as np
from mpi4py import MPI
from src.imagine.goal_generator.simple_sentence_generator import SentenceGeneratorHeuristic
from src import logger
class GoalSampler:
def __init__(self,
policy_language_model,
reward_language_model,
goal_dim,
... | [
"numpy.random.normal",
"numpy.tile",
"src.logger.info",
"numpy.repeat",
"mpi4py.MPI.COMM_WORLD.bcast",
"numpy.random.choice",
"numpy.random.random",
"numpy.where",
"src.imagine.goal_generator.simple_sentence_generator.SentenceGeneratorHeuristic",
"numpy.array",
"mpi4py.MPI.COMM_WORLD.scatter",
... | [((1608, 1770), 'src.imagine.goal_generator.simple_sentence_generator.SentenceGeneratorHeuristic', 'SentenceGeneratorHeuristic', (["params['train_descriptions']", "params['test_descriptions']"], {'sentences': 'None', 'method': "params['conditions']['imagination_method']"}), "(params['train_descriptions'], params[\n ... |
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import bisect
import numpy as np
from torch.utils.data.dataset import ConcatDataset as _ConcatDataset
class ConcatDataset(_ConcatDataset):
"""
Same as torch.utils.data.dataset.ConcatDataset, but exposes an extra
method for querying t... | [
"torch.utils.data.dataset.ConcatDataset.__init__",
"numpy.random.randint",
"bisect.bisect_right"
] | [((411, 450), 'torch.utils.data.dataset.ConcatDataset.__init__', '_ConcatDataset.__init__', (['self', 'datasets'], {}), '(self, datasets)\n', (434, 450), True, 'from torch.utils.data.dataset import ConcatDataset as _ConcatDataset\n'), ((798, 860), 'numpy.random.randint', 'np.random.randint', (['(0)', '(self.cumulative_... |
# Copyright (C) 2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | [
"numpy.zeros",
"numpy.ones",
"mmdet.datasets.builder.PIPELINES.register_module",
"copy.deepcopy"
] | [((715, 742), 'mmdet.datasets.builder.PIPELINES.register_module', 'PIPELINES.register_module', ([], {}), '()\n', (740, 742), False, 'from mmdet.datasets.builder import PIPELINES\n'), ((2438, 2465), 'mmdet.datasets.builder.PIPELINES.register_module', 'PIPELINES.register_module', ([], {}), '()\n', (2463, 2465), False, 'f... |
import numpy as np
import argparse
from sklearn.svm import LinearSVR
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import StandardScaler
from sklearn.datasets import make_regression
parser = argparse.ArgumentParser()
parser.add_argument('-x', '--datapath', type=str, required=True)
parser.add_a... | [
"argparse.ArgumentParser",
"sklearn.svm.LinearSVR",
"sklearn.preprocessing.StandardScaler",
"numpy.savetxt",
"numpy.load"
] | [((217, 242), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (240, 242), False, 'import argparse\n'), ((538, 579), 'numpy.load', 'np.load', (['args.datapath'], {'allow_pickle': '(True)'}), '(args.datapath, allow_pickle=True)\n', (545, 579), True, 'import numpy as np\n'), ((584, 623), 'numpy.loa... |
#!/usr/bin/env python3
# coding: utf-8
# Adapted from: https://github.com/zpincus/celltool/blob/master/celltool/numerics/image_warp.py
from scipy import ndimage
import numpy as np
from probreg import bcpd
import tifffile
import matplotlib.pyplot as plt
import napari
from magicgui import magic_factory, widgets
from nap... | [
"numpy.sqrt",
"numpy.subtract.outer",
"numpy.ones",
"napari.qt.thread_worker",
"numpy.linalg.pinv",
"numpy.log",
"numpy.asarray",
"numpy.zeros",
"magicgui.widgets.ProgressBar",
"numpy.seterr"
] | [((2818, 2863), 'numpy.subtract.outer', 'np.subtract.outer', (['points[:, 0]', 'points[:, 0]'], {}), '(points[:, 0], points[:, 0])\n', (2835, 2863), True, 'import numpy as np\n'), ((2871, 2916), 'numpy.subtract.outer', 'np.subtract.outer', (['points[:, 1]', 'points[:, 1]'], {}), '(points[:, 1], points[:, 1])\n', (2888,... |
#!/usr/bin/env python
import argparse
from eva import EvaProgram, Input, Output
from eva.ckks import CKKSCompiler
from eva.seal import generate_keys
import numpy as np
import time
from eva.std.numeric import horizontal_sum
def dot(x, y):
return np.dot(x, y)
def generate_inputs_naive(size, label="x"):
inputs... | [
"eva.EvaProgram",
"eva.Output",
"argparse.ArgumentParser",
"numpy.testing.assert_allclose",
"numpy.array",
"numpy.dot",
"eva.ckks.CKKSCompiler",
"numpy.zeros",
"eva.std.numeric.horizontal_sum",
"eva.Input",
"time.time",
"eva.seal.generate_keys"
] | [((251, 263), 'numpy.dot', 'np.dot', (['x', 'y'], {}), '(x, y)\n', (257, 263), True, 'import numpy as np\n'), ((346, 360), 'numpy.zeros', 'np.zeros', (['size'], {}), '(size)\n', (354, 360), True, 'import numpy as np\n'), ((668, 701), 'eva.EvaProgram', 'EvaProgram', (['"""fhe_dot"""'], {'vec_size': '(1)'}), "('fhe_dot',... |
import random
import cv2
import numpy as np
from augraphy.base.augmentation import Augmentation
class NoiseTexturize(Augmentation):
"""Creates a random noise based texture pattern to emulate paper textures.
Consequently applies noise patterns to the original image from big to small.
:param sigma_range:... | [
"numpy.clip",
"numpy.array",
"numpy.stack",
"cv2.resize",
"random.randint",
"random.gauss"
] | [((3150, 3223), 'cv2.resize', 'cv2.resize', (['result'], {'dsize': '(width, height)', 'interpolation': 'cv2.INTER_LINEAR'}), '(result, dsize=(width, height), interpolation=cv2.INTER_LINEAR)\n', (3160, 3223), False, 'import cv2\n'), ((1413, 1469), 'random.randint', 'random.randint', (['self.sigma_range[0]', 'self.sigma_... |
"""
Expression Dataset for analysis of matrix (RNASeq/microarray) data with annotations
"""
import pandas as PD
import numpy as N
from matplotlib import pylab as P
from collections import OrderedDict
from ast import literal_eval
# from ..plot.matrix import matshow_clustered
class ExpressionSet(object):
def... | [
"collections.OrderedDict",
"numpy.isnan",
"pandas.read_table",
"pandas.MultiIndex.from_tuples",
"numpy.arange"
] | [((1227, 1240), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (1238, 1240), False, 'from collections import OrderedDict\n'), ((1862, 1900), 'pandas.read_table', 'PD.read_table', (['fname'], {'skiprows': '(cnt - 1)'}), '(fname, skiprows=cnt - 1)\n', (1875, 1900), True, 'import pandas as PD\n'), ((2481, 251... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.