code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
#! /usr/bin/env python # -*- coding: iso-8859-15 -*- ############################################################################## # Copyright 2003 & onward LASMEA UMR 6602 CNRS/Univ. Clermont II # Copyright 2009 & onward LRI UMR 8623 CNRS/Univ Paris Sud XI # # Distributed under the Boost ...
[ "nt2_tb_props.Nt2_tb_props", "files_utils.write", "sys.path.pop", "os.path.realpath", "create_py_doc_base.Create_py_doc_base.__init__", "pprint.PrettyPrinter" ]
[((1530, 1545), 'sys.path.pop', 'sys.path.pop', (['(0)'], {}), '(0)\n', (1542, 1545), False, 'import sys\n'), ((1546, 1561), 'sys.path.pop', 'sys.path.pop', (['(0)'], {}), '(0)\n', (1558, 1561), False, 'import sys\n'), ((3038, 3058), 'nt2_tb_props.Nt2_tb_props', 'Nt2_tb_props', (['"""libc"""'], {}), "('libc')\n", (3050...
import telegram import sqlite3 import function import cardfunction import thread_lock import ast import air import drawmap import os from telegram import InlineKeyboardButton, InlineKeyboardMarkup from telegram.ext import Updater, CommandHandler, CallbackQueryHandler, MessageHandler, Filters org_dir = os.getcwd() cl...
[ "air.air_attack", "air.check_reposition", "cardfunction.c47", "cardfunction.c46", "cardfunction.c41", "cardfunction.c347", "air.air_defense", "function.control_air_space_list", "telegram.InlineKeyboardMarkup", "cardfunction.c52", "cardfunction.play_status", "os.getcwd", "function.control_spa...
[((305, 316), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (314, 316), False, 'import os\n'), ((3678, 3712), 'air.check_reposition', 'air.check_reposition', (['bot', 'session'], {}), '(bot, session)\n', (3698, 3712), False, 'import air\n'), ((30705, 30735), 'telegram.InlineKeyboardMarkup', 'InlineKeyboardMarkup', (['key...
#!/usr/bin/env python # Copyright 2016 Attic Labs, Inc. All rights reserved. # Licensed under the Apache License, version 2.0: # http://www.apache.org/licenses/LICENSE-2.0 # This tool finds all package.json files and runs npm install and npm test in those directories. import argparse import os import subprocess from...
[ "subprocess.check_output", "argparse.ArgumentParser", "subprocess.check_call", "os.getcwd", "os.chdir", "os.path.abspath" ]
[((403, 414), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (412, 414), False, 'import os\n'), ((417, 431), 'os.chdir', 'os.chdir', (['path'], {}), '(path)\n', (425, 431), False, 'import os\n'), ((442, 462), 'os.chdir', 'os.chdir', (['currentDir'], {}), '(currentDir)\n', (450, 462), False, 'import os\n'), ((487, 548), 'a...
import os import re from collections import Counter import pandas as pd import baseline from baseline.reader import TSVSeqLabelReader, register_reader @register_reader(task='classify', name='pandas') class PandasReader(TSVSeqLabelReader): def __init__(self, vectorizers, trim=False, **kwargs): super(Pandas...
[ "baseline.reader.register_reader", "re.split", "os.listdir", "pandas.read_csv", "os.path.join", "collections.Counter", "os.path.isdir", "baseline.data.DictExamples" ]
[((154, 201), 'baseline.reader.register_reader', 'register_reader', ([], {'task': '"""classify"""', 'name': '"""pandas"""'}), "(task='classify', name='pandas')\n", (169, 201), False, 'from baseline.reader import TSVSeqLabelReader, register_reader\n'), ((2144, 2199), 'pandas.read_csv', 'pd.read_csv', (['filename'], {'se...
# -*- coding: utf-8 -*- """ Spyder Editor This is a temporary script file. """ import gym import torch import time import numpy as np import torch.nn as nn from datetime import datetime, timedelta from torch.nn import functional as F from collections import namedtuple hidden_size =128 batch_size = 100 percentile = ...
[ "numpy.mean", "torch.nn.ReLU", "collections.namedtuple", "torch.nn.CrossEntropyLoss", "torch.LongTensor", "time.sleep", "datetime.datetime.now", "gym.make", "numpy.percentile", "torch.nn.Linear", "torch.no_grad", "torch.FloatTensor" ]
[((715, 757), 'collections.namedtuple', 'namedtuple', (['"""Episode"""', "('reward', 'steps')"], {}), "('Episode', ('reward', 'steps'))\n", (725, 757), False, 'from collections import namedtuple\n'), ((764, 810), 'collections.namedtuple', 'namedtuple', (['"""Steps"""', "('observation', 'action')"], {}), "('Steps', ('ob...
# Lint as: python3 # Copyright 2020 DeepMind Technologies Limited. 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 # # ...
[ "os.path.exists", "xmanager.xm.CommandList", "distutils.dir_util.copy_tree", "pathlib.Path", "tempfile.mkdtemp", "cloudpickle.dump", "copy.deepcopy", "xmanager.xm.JobRequirements", "atexit.register" ]
[((2581, 2640), 'atexit.register', 'atexit.register', (['shutil.rmtree', 'tmp_dir'], {'ignore_errors': '(True)'}), '(shutil.rmtree, tmp_dir, ignore_errors=True)\n', (2596, 2640), False, 'import atexit\n'), ((2661, 2699), 'pathlib.Path', 'pathlib.Path', (['tmp_dir', '_DATA_FILE_NAME'], {}), '(tmp_dir, _DATA_FILE_NAME)\n...
# flake8: noqa from .base import * from decouple import config, Csv DEBUG = config('DEBUG', default=True, cast=bool) EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'sqlite3.db', 'USER': '', ...
[ "decouple.config", "decouple.Csv" ]
[((79, 119), 'decouple.config', 'config', (['"""DEBUG"""'], {'default': '(True)', 'cast': 'bool'}), "('DEBUG', default=True, cast=bool)\n", (85, 119), False, 'from decouple import config, Csv\n'), ((895, 900), 'decouple.Csv', 'Csv', ([], {}), '()\n', (898, 900), False, 'from decouple import config, Csv\n')]
from model import Event from geo.geomodel import geotypes def get(handler, response): lat1 = handler.request.get('lat1') lon1 = handler.request.get('lng1') lat2 = handler.request.get('lat2') lon2 = handler.request.get('lng2') response.events = Event.bounding_box_fetch( Event.all(), geotypes.Box(float...
[ "model.Event.all" ]
[((285, 296), 'model.Event.all', 'Event.all', ([], {}), '()\n', (294, 296), False, 'from model import Event\n')]
from frappe import permissions, _dict from frappe.permissions import rights def allow_everything(): ''' returns a dict with access to everything eg. {"read": 1, "write": 1, ...} ''' perm = _dict({ptype: 1 for ptype in rights}) return perm permissions.allow_everything = allow_everything
[ "frappe._dict" ]
[((195, 234), 'frappe._dict', '_dict', (['{ptype: (1) for ptype in rights}'], {}), '({ptype: (1) for ptype in rights})\n', (200, 234), False, 'from frappe import permissions, _dict\n')]
from functools import partial from itertools import chain import pathlib import shutil import jinja2 import markdown from inkblot import converters from inkblot.document import Document from inkblot.document_loader import DocumentLoader def generate(directory: pathlib.Path, config): md = markdown.Markdown() ...
[ "markdown.Markdown", "inkblot.document.Document", "jinja2.ChoiceLoader", "jinja2.select_autoescape", "shutil.rmtree", "inkblot.document_loader.DocumentLoader" ]
[((297, 316), 'markdown.Markdown', 'markdown.Markdown', ([], {}), '()\n', (314, 316), False, 'import markdown\n'), ((681, 705), 'inkblot.document_loader.DocumentLoader', 'DocumentLoader', (['supports'], {}), '(supports)\n', (695, 705), False, 'from inkblot.document_loader import DocumentLoader\n'), ((726, 749), 'inkblo...
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from supra.Utils.Classes import Constants consts = Constants() def getPressure(z): p = 10*101.325*np.exp(-0.00012*z)*100 # in Pa return p def anglescan(S, phi, theta, z_profile, vfreq, P_amb, wind=True, debug=Tru...
[ "numpy.radians", "numpy.sqrt", "matplotlib.pyplot.show", "numpy.exp", "numpy.array", "matplotlib.pyplot.figure", "numpy.isnan", "numpy.cos", "numpy.sin", "supra.Utils.Classes.Constants", "numpy.seterr", "mpl_toolkits.mplot3d.Axes3D", "numpy.arctan" ]
[((145, 156), 'supra.Utils.Classes.Constants', 'Constants', ([], {}), '()\n', (154, 156), False, 'from supra.Utils.Classes import Constants\n'), ((1833, 1848), 'numpy.radians', 'np.radians', (['phi'], {}), '(phi)\n', (1843, 1848), True, 'import numpy as np\n'), ((1861, 1878), 'numpy.radians', 'np.radians', (['theta'], ...
#!/usr/bin/env python # -*- encoding: utf-8 -*- """ Topic: 爬取链接的蜘蛛 Desc : """ import logging from coolscrapy.items import HuxiuItem import scrapy from scrapy.spiders import CrawlSpider, Rule from scrapy.linkextractors import LinkExtractor class CrawlSpider(CrawlSpider): name = "crawl" allowed_domains = ["hux...
[ "scrapy.linkextractors.LinkExtractor", "coolscrapy.items.HuxiuItem", "logging.info" ]
[((958, 969), 'coolscrapy.items.HuxiuItem', 'HuxiuItem', ([], {}), '()\n', (967, 969), False, 'from coolscrapy.items import HuxiuItem\n'), ((1211, 1271), 'logging.info', 'logging.info', (["item['title']", "item['link']", "item['published']"], {}), "(item['title'], item['link'], item['published'])\n", (1223, 1271), Fals...
#!/usr/bin/python3 import numpy as np class Softmax: # Converts Arbitrary Values from layers to probabilties def __init__(self, input_nodes, output_nodes): self.weights = np.random.randn(input_nodes, output_nodes) / input_nodes self.biases = np.zeros(output_nodes) def backprop(self, d_L_d...
[ "numpy.exp", "numpy.sum", "numpy.zeros", "numpy.dot", "numpy.random.randn" ]
[((268, 290), 'numpy.zeros', 'np.zeros', (['output_nodes'], {}), '(output_nodes)\n', (276, 290), True, 'import numpy as np\n'), ((631, 655), 'numpy.exp', 'np.exp', (['self.last_totals'], {}), '(self.last_totals)\n', (637, 655), True, 'import numpy as np\n'), ((698, 711), 'numpy.sum', 'np.sum', (['t_exp'], {}), '(t_exp)...
import Downloading.download from Downloading.scrapper.ScrapperManager import ScrapperManager if __name__ == '__main__': doi = 'https://doi.org/10.1016/j.copsyc.2017.03.030' doi = '10.1111/j.1529-1006.2007.00032.x' doi = 'https://doi.org/10.3389/fpsyg.2019.03050' doi = 'https://doi.org/10.3389/fnint.20...
[ "Downloading.scrapper.ScrapperManager.ScrapperManager" ]
[((997, 1017), 'Downloading.scrapper.ScrapperManager.ScrapperManager', 'ScrapperManager', (['doi'], {}), '(doi)\n', (1012, 1017), False, 'from Downloading.scrapper.ScrapperManager import ScrapperManager\n')]
# coding=utf-8 ######################## # Player Blueprint # # Full route of this blueprint: /music/player/ ######################## import re import logging from quart import Blueprint, request from .web_utilities import with_status, get_json_from_request, process_time, dictify_YoutubeAudio from ._bp_types import Sta...
[ "logging.getLogger", "quart.Blueprint", "re.compile" ]
[((516, 545), 'quart.Blueprint', 'Blueprint', (['"""player"""', '__name__'], {}), "('player', __name__)\n", (525, 545), False, 'from quart import Blueprint, request\n'), ((580, 607), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (597, 607), False, 'import logging\n'), ((644, 685), 're.co...
# -*- coding: utf-8 -*- """Runs the server in uwsgi or http modes. Also supports starting nginx proxy. :copyright: Copyright (c) 2015 RadiaSoft LLC. All Rights Reserved. :license: http://www.apache.org/licenses/LICENSE-2.0.html """ from __future__ import absolute_import, division, print_function from pykern import p...
[ "re.split", "signal.signal", "pykern.pkconfig.channel_in", "pykern.pkio.save_chdir", "importlib.import_module", "pykern.pkcli.command_error", "pykern.pksubprocess.check_call_with_signals", "signal.getsignal", "time.sleep", "pykern.pkjinja.render_resource", "socket.inet_aton", "pyisemail.is_ema...
[((2311, 2329), 'pykern.pkcollections.PKDict', 'PKDict', (['os.environ'], {}), '(os.environ)\n', (2317, 2329), False, 'from pykern.pkcollections import PKDict\n'), ((2860, 2886), 'pykern.pkconfig.channel_in', 'pkconfig.channel_in', (['"""dev"""'], {}), "('dev')\n", (2879, 2886), False, 'from pykern import pkconfig\n'),...
# -*- coding: utf-8 -*- """ ////////////////////////////////////////////////////////////////////////////////////////// // Original author: <NAME> // Github: https://github.com/aritzLizoain // My personal website: https://aritzlizoain.github.io/ // Description: CNN Image Segmentation // Copyright 2020, <NAME>. // Licens...
[ "matplotlib.pyplot.grid", "numpy.array", "astropy.utils.data.get_pkg_data_filename", "matplotlib.pyplot.imshow", "matplotlib.pyplot.style.use", "mask.get_percentages", "mask.output_to_label_one_object", "numpy.squeeze", "matplotlib.patches.Patch", "matplotlib.pyplot.title", "matplotlib.pyplot.le...
[((2433, 2460), 'mask.get_percentages', 'get_percentages', (['all_images'], {}), '(all_images)\n', (2448, 2460), False, 'from mask import get_percentages\n'), ((2976, 3008), 'matplotlib.pyplot.style.use', 'plt.style.use', (['astropy_mpl_style'], {}), '(astropy_mpl_style)\n', (2989, 3008), True, 'import matplotlib.pyplo...
import tensorflow as tf import numpy as np import mnist_data import vae """ parameters """ model_no = '299' IMAGE_SIZE_MNIST = 28 n_hidden = 500 dim_img = IMAGE_SIZE_MNIST**2 # number of pixels for a MNIST image dim_z = 10 """ build graph """ # input placeholders x = tf.placeholder(tf.float32, shape=[None, dim_im...
[ "vae.autoencoder_rec_loss", "tensorflow.InteractiveSession", "numpy.repeat", "tensorflow.placeholder", "tensorflow.train.Saver", "numpy.asarray", "numpy.max", "tensorflow.train.import_meta_graph" ]
[((274, 342), 'tensorflow.placeholder', 'tf.placeholder', (['tf.float32'], {'shape': '[None, dim_img]', 'name': '"""target_img"""'}), "(tf.float32, shape=[None, dim_img], name='target_img')\n", (288, 342), True, 'import tensorflow as tf\n'), ((347, 437), 'tensorflow.placeholder', 'tf.placeholder', (['tf.float32'], {'sh...
from dataset.animeface import ( AnimeFace, AnimeFaceCelebA, AnimeFaceSR, AnimeFaceXDoG, AnimeFaceLabel, AnimeFaceOneHot ) from dataset.portrait import ( DanbooruPortrait, DanbooruPortraitCelebA, DanbooruPortraitSR, DanbooruPortraitXDoG ) from dataset.danbooru import ( Danb...
[ "torch.cuda.is_available", "os.cpu_count", "torch.utils.data.DataLoader" ]
[((674, 688), 'os.cpu_count', 'os.cpu_count', ([], {}), '()\n', (686, 688), False, 'import os\n'), ((711, 736), 'torch.cuda.is_available', 'torch.cuda.is_available', ([], {}), '()\n', (734, 736), False, 'import torch\n'), ((767, 867), 'torch.utils.data.DataLoader', 'DataLoader', (['dataset', 'batch_size'], {'shuffle': ...
import pandas as pd def generarSecuenciaCSV(nombreArchivoSource, nombreArchivoDesnation, delete = False): df = pd.read_csv(nombreArchivoSource, header=None) lista = [] lista.append(0) temporal = 1 flag = False for i in range(9999): lista.append(temporal) if(flag): flag = False temporal...
[ "pandas.read_csv" ]
[((114, 159), 'pandas.read_csv', 'pd.read_csv', (['nombreArchivoSource'], {'header': 'None'}), '(nombreArchivoSource, header=None)\n', (125, 159), True, 'import pandas as pd\n')]
#!/usr/bin/env python3 import sys from testsupport import info, run_project_executable, warn, run, subprocess, find_project_executable def main() -> None: # Replace with the executable you want to test with open("client_output_test_5.txt", "w+") as stdout: try: cmd = find_project_executa...
[ "testsupport.subprocess.Popen", "testsupport.run_project_executable", "testsupport.info", "sys.exit", "testsupport.find_project_executable", "testsupport.warn" ]
[((300, 333), 'testsupport.find_project_executable', 'find_project_executable', (['"""server"""'], {}), "('server')\n", (323, 333), False, 'from testsupport import info, run_project_executable, warn, run, subprocess, find_project_executable\n'), ((369, 422), 'testsupport.info', 'info', (['"""Run multithreaded-server te...
import os import yaml class Config(object): """Script configuration file parser. Attributes ---------- dataset: str Name of the dataset to train on (i.e., 'omniglot'). num_epochs: int Number of training epochs. num_episodes: int Number of episodes per epoch. num_wa...
[ "os.path.exists" ]
[((957, 984), 'os.path.exists', 'os.path.exists', (['config_yaml'], {}), '(config_yaml)\n', (971, 984), False, 'import os\n')]
import tkinter as tk from tkinter import ttk class Subject_window(): def __init__(self, parent): self.frame = ttk.Frame(parent) self.parent = parent self.children = {} def grid(self): self.frame.grid() def add_children(self, **kwargs): for child in kwargs: ...
[ "tkinter.ttk.Frame" ]
[((123, 140), 'tkinter.ttk.Frame', 'ttk.Frame', (['parent'], {}), '(parent)\n', (132, 140), False, 'from tkinter import ttk\n')]
import numpy as np import pandas as pd from spandex import TableLoader, TableFrame from spandex.io import df_to_db import urbansim.sim.simulation as sim import utils loader = TableLoader() staging = loader.tables.staging ## Assumptions. # Use codes were classified manually because the assessor classifications # ...
[ "utils.get_res_type", "utils.get_sqft_per_unit", "pandas.Series", "spandex.io.df_to_db", "utils.get_nonresidential_sqft", "urbansim.sim.simulation.add_table", "utils.get_residential_units", "urbansim.sim.simulation.model", "urbansim.sim.simulation.table", "utils.get_tax_exempt", "spandex.TableFr...
[((178, 191), 'spandex.TableLoader', 'TableLoader', ([], {}), '()\n', (189, 191), False, 'from spandex import TableLoader, TableFrame\n'), ((849, 902), 'spandex.TableFrame', 'TableFrame', (['staging.parcels_ala'], {'index_col': '"""apn_sort"""'}), "(staging.parcels_ala, index_col='apn_sort')\n", (859, 902), False, 'fro...
# (c) Copyright 2014 Cisco Systems Inc. # 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 # # Unl...
[ "oslo_config.cfg.StrOpt", "oslo_utils.importutils.import_object", "oslo_concurrency.processutils.ProcessExecutionError", "unittest.mock.patch.object", "cinder.volume.configuration.Configuration" ]
[((5568, 5632), 'unittest.mock.patch.object', 'mock.patch.object', (['driver.CiscoFCZoneDriver', '"""get_zoning_status"""'], {}), "(driver.CiscoFCZoneDriver, 'get_zoning_status')\n", (5585, 5632), False, 'from unittest import mock\n'), ((5638, 5704), 'unittest.mock.patch.object', 'mock.patch.object', (['driver.CiscoFCZ...
# The whole syntax of aleat3 __all__ = ["InitError", "Aleatoryous", "coinToBinary", "coinToBool", "LIST_EXAMPLE", "COIN_NAME", "DICE_NAME", "ROULETTE_NAME"] import random from typing import Optional if __name__ != "__main__"...
[ "output.init_errors.modal_bug", "output.colored.output_magenta", "output.colored.output_yellow", "output.colored.output_green", "output.colored.output_red", "time.sleep", "output.init_errors.parameter_bug", "random.randint" ]
[((7552, 7612), 'output.colored.output_magenta', '_color.output_magenta', (['"""----Module test: constructor.py----"""'], {}), "('----Module test: constructor.py----')\n", (7573, 7612), True, 'from output import init_errors as IE, colored as _color\n'), ((9313, 9358), 'output.colored.output_magenta', '_color.output_mag...
import numpy import pandas from pathlib import Path def raw_to_dataframe(raw): data = numpy.frombuffer(raw, dtype='int16') data = data.reshape((data.size // 4, 4)) df = pandas.DataFrame(data, columns=['t', 'x', 'y', 'z']) # Center the curve shift = len(df) // 2 - df['x'].idxmin() df = df.rein...
[ "numpy.roll", "pandas.read_csv", "pathlib.Path", "pandas.DataFrame", "numpy.frombuffer" ]
[((92, 128), 'numpy.frombuffer', 'numpy.frombuffer', (['raw'], {'dtype': '"""int16"""'}), "(raw, dtype='int16')\n", (108, 128), False, 'import numpy\n'), ((183, 235), 'pandas.DataFrame', 'pandas.DataFrame', (['data'], {'columns': "['t', 'x', 'y', 'z']"}), "(data, columns=['t', 'x', 'y', 'z'])\n", (199, 235), False, 'im...
import pandas from scipy.stats import zscore from IMLearn.learners import MultivariateGaussian from IMLearn.utils import split_train_test from IMLearn.learners.regressors import LinearRegression from typing import NoReturn, Tuple import numpy as np import pandas as pd import plotly.graph_objects as go import plotly.e...
[ "numpy.mean", "plotly.graph_objects.Layout", "pandas.read_csv", "numpy.asarray", "IMLearn.learners.regressors.LinearRegression", "numpy.array", "plotly.graph_objects.Scatter", "numpy.random.seed", "numpy.std", "pandas.concat", "IMLearn.learners.MultivariateGaussian" ]
[((1514, 1535), 'pandas.read_csv', 'pd.read_csv', (['filename'], {}), '(filename)\n', (1525, 1535), True, 'import pandas as pd\n'), ((3467, 3476), 'numpy.std', 'np.std', (['y'], {}), '(y)\n', (3473, 3476), True, 'import numpy as np\n'), ((4928, 4958), 'numpy.asarray', 'np.asarray', (['test_set[FEATURES]'], {}), '(test_...
import unittest import os import subprocess import shutil import logging import sys import six from src.svn_ignore import SVNIgnore class TestSVNIgnore(unittest.TestCase): def setUp(self): """Checkout the SVN repository""" logging.basicConfig(stream=sys.stdout, format='%(levelname)s: %(message)s...
[ "logging.basicConfig", "subprocess.check_output", "six.assertCountEqual", "os.path.join", "os.path.dirname", "os.path.isdir", "shutil.rmtree", "unittest.main", "src.svn_ignore.SVNIgnore" ]
[((7846, 7861), 'unittest.main', 'unittest.main', ([], {}), '()\n', (7859, 7861), False, 'import unittest\n'), ((247, 349), 'logging.basicConfig', 'logging.basicConfig', ([], {'stream': 'sys.stdout', 'format': '"""%(levelname)s: %(message)s"""', 'level': 'logging.WARNING'}), "(stream=sys.stdout, format='%(levelname)s: ...
import random import os import numpy as np from typing import List, Tuple, Dict, Set, Optional def print_grid(grid: list): for row in grid: row_str = " ".join([str(el) for el in row]) print(row_str) def txt_to_grid(file_name, simple_layout=False, use_curr_workspace=False): if use_curr_works...
[ "os.getcwd", "GlobalObjs.GraphNX.GridGraph", "numpy.zeros", "numpy.random.randint", "numpy.concatenate", "os.path.abspath" ]
[((2628, 2654), 'numpy.zeros', 'np.zeros', (['shape'], {'dtype': 'int'}), '(shape, dtype=int)\n', (2636, 2654), True, 'import numpy as np\n'), ((2942, 2990), 'numpy.concatenate', 'np.concatenate', (['[static_grid, rand_grid]'], {'axis': '(1)'}), '([static_grid, rand_grid], axis=1)\n', (2956, 2990), True, 'import numpy ...
""" Bento, a pythonic packaging solution for python software. Bento is a packaging solution which aims at being simple and extensible, using as little magic as possible. Packages are described in a bento.info file which has a straightforward syntax, and the packaging is driven through bentomaker, the command line inte...
[ "os.path.dirname", "os.path.exists", "sys.path.insert", "os.environ.get" ]
[((1227, 1244), 'os.path.exists', 'op.exists', (['m_path'], {}), '(m_path)\n', (1236, 1244), True, 'import os.path as op\n'), ((1119, 1143), 'os.environ.get', 'os.environ.get', (['v', '(False)'], {}), '(v, False)\n', (1133, 1143), False, 'import os\n'), ((1170, 1190), 'os.path.dirname', 'op.dirname', (['__file__'], {})...
import cv2 import numpy as np import math import os from time import sleep def prewitt(nome): imagem = cv2.imread(nome) imagemNova = cv2.imread(nome) colunas = imagem.shape[1] linhas = imagem.shape[0] sizeMask = 3 flagStop = sizeMask**2 pixelB = 0 pixelG = 0 pixelR = 0 p...
[ "cv2.imwrite", "math.log10", "cv2.imread", "numpy.abs" ]
[((110, 126), 'cv2.imread', 'cv2.imread', (['nome'], {}), '(nome)\n', (120, 126), False, 'import cv2\n'), ((145, 161), 'cv2.imread', 'cv2.imread', (['nome'], {}), '(nome)\n', (155, 161), False, 'import cv2\n'), ((3281, 3328), 'cv2.imwrite', 'cv2.imwrite', (['"""ImagemcomPrewitt.png"""', 'imagemNova'], {}), "('Imagemcom...
import pytest from yamlpath.merger.enums.anchorconflictresolutions import ( AnchorConflictResolutions) class Test_merger_enum_anchorconflictresolutions(): """Tests for the AnchorConflictResolutions enumeration.""" def test_get_names(self): assert AnchorConflictResolutions.get_names() == [ "STOP", "LEFT",...
[ "yamlpath.merger.enums.anchorconflictresolutions.AnchorConflictResolutions.get_choices", "yamlpath.merger.enums.anchorconflictresolutions.AnchorConflictResolutions.from_str", "pytest.mark.parametrize", "pytest.raises", "yamlpath.merger.enums.anchorconflictresolutions.AnchorConflictResolutions.get_names" ]
[((488, 717), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""input,output"""', "[('STOP', AnchorConflictResolutions.STOP), ('LEFT',\n AnchorConflictResolutions.LEFT), ('RIGHT', AnchorConflictResolutions.\n RIGHT), ('RENAME', AnchorConflictResolutions.RENAME)]"], {}), "('input,output', [('STOP', Ancho...
import re import os import posixpath from fabric.api import cd, sudo, puts from fabric.contrib import files from .containers import conf, MissingVarException from .task import Task from .users import list_users from .files import read_file, exists from .utils import home_path, split_lines __all__ = [ 'push_key'...
[ "re.escape", "fabric.contrib.files.contains", "fabric.contrib.files.uncomment", "fabric.contrib.files.comment", "fabric.api.puts", "fabric.api.sudo", "fabric.contrib.files.append", "os.path.expanduser" ]
[((487, 529), 'os.path.expanduser', 'os.path.expanduser', (['self.conf.pub_key_file'], {}), '(self.conf.pub_key_file)\n', (505, 529), False, 'import os\n'), ((2692, 2706), 're.escape', 're.escape', (['key'], {}), '(key)\n', (2701, 2706), False, 'import re\n'), ((2855, 2926), 'fabric.contrib.files.comment', 'files.comme...
# -*- coding: utf-8 -*- # complimentary script to binary-numbers.py # # reads images directory on pythonanywhere.com and outputs a grid of # the images it finds as a temporary gallery placeholder for the # images created until some sort of gallery upload utility is available. # # License: Beerware. For more informati...
[ "os.listdir", "web.header", "PIL.Image.open" ]
[((820, 835), 'os.listdir', 'os.listdir', (['dir'], {}), '(dir)\n', (830, 835), False, 'import os\n'), ((1026, 1052), 'PIL.Image.open', 'Image.open', (['(dir + filename)'], {}), '(dir + filename)\n', (1036, 1052), False, 'from PIL import Image\n'), ((3041, 3108), 'web.header', 'web.header', (['"""Content-Type"""', '"""...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'YOLOV3.ui' # # Created by: PyQt5 UI code generator 5.15.3 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5.QtWidgets import * fro...
[ "os.system", "PyQt5.QtGui.QPixmap" ]
[((1984, 2019), 'os.system', 'os.system', (["('explorer.exe %s' % path)"], {}), "('explorer.exe %s' % path)\n", (1993, 2019), False, 'import os\n'), ((7142, 7152), 'PyQt5.QtGui.QPixmap', 'QPixmap', (['a'], {}), '(a)\n', (7149, 7152), False, 'from PyQt5.QtGui import QIcon, QPixmap\n')]
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`<NAME> (<EMAIL>)` :copyright: © 2013 by the SaltStack Team, see AUTHORS for more details. :license: Apache 2.0, see LICENSE for more details. integration.loader.ext_modules ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Test Salt's loader regarding external ov...
[ "integration.run_tests", "salttesting.helpers.ensure_in_syspath" ]
[((410, 434), 'salttesting.helpers.ensure_in_syspath', 'ensure_in_syspath', (['"""../"""'], {}), "('../')\n", (427, 434), False, 'from salttesting.helpers import ensure_in_syspath\n'), ((1272, 1302), 'integration.run_tests', 'run_tests', (['LoaderOverridesTest'], {}), '(LoaderOverridesTest)\n', (1281, 1302), False, 'fr...
""" Django settings for crealityWS project. Generated by 'django-admin startproject' using Django 2.1.1. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ import os...
[ "os.path.abspath", "os.path.join" ]
[((453, 478), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (468, 478), False, 'import os\n'), ((2473, 2509), 'os.path.join', 'os.path.join', (['BASE_DIR', '"""db.sqlite3"""'], {}), "(BASE_DIR, 'db.sqlite3')\n", (2485, 2509), False, 'import os\n')]
import numpy as np import tensorflow as tf from dps import cfg from dps.updater import DifferentiableUpdater from dps.env.supervised import ClassificationEnv, RegressionEnv from dps.config import DEFAULT_CONFIG from dps.datasets import EmnistDataset, OmniglotDataset def get_differentiable_updater(env): f = cfg.b...
[ "dps.datasets.EmnistDataset", "dps.env.supervised.ClassificationEnv", "dps.updater.DifferentiableUpdater", "dps.datasets.OmniglotDataset", "dps.cfg.build_function" ]
[((315, 335), 'dps.cfg.build_function', 'cfg.build_function', ([], {}), '()\n', (333, 335), False, 'from dps import cfg\n'), ((347, 376), 'dps.updater.DifferentiableUpdater', 'DifferentiableUpdater', (['env', 'f'], {}), '(env, f)\n', (368, 376), False, 'from dps.updater import DifferentiableUpdater\n'), ((466, 543), 'd...
# importing libraries from data_processing import scaler, train, test, x_train, x_test, y_train, y_test, pd, np, plt from sklearn import neighbors from sklearn.model_selection import GridSearchCV # scaling data x_train_scaled = scaler.fit_transform(x_train) x_train = pd.DataFrame(x_train_scaled) x_test_scaled = scaler...
[ "sklearn.model_selection.GridSearchCV", "data_processing.plt.show", "sklearn.neighbors.KNeighborsRegressor", "data_processing.plt.plot", "data_processing.pd.DataFrame", "data_processing.scaler.fit_transform", "data_processing.np.array" ]
[((229, 258), 'data_processing.scaler.fit_transform', 'scaler.fit_transform', (['x_train'], {}), '(x_train)\n', (249, 258), False, 'from data_processing import scaler, train, test, x_train, x_test, y_train, y_test, pd, np, plt\n'), ((269, 297), 'data_processing.pd.DataFrame', 'pd.DataFrame', (['x_train_scaled'], {}), '...
import numpy as np import pandas as pd from statsmodels.sandbox.stats.multicomp import multipletests import regreg.api as rr from ...api import (randomization, glm_group_lasso, multiple_queries) from ...tests.instance import (gaussian_instance, lo...
[ "numpy.sqrt", "numpy.ones", "regreg.api.l1norm", "statsmodels.sandbox.stats.multicomp.multipletests", "numpy.where", "numpy.diag", "regreg.api.glm.logistic", "numpy.sum", "regreg.api.glm.gaussian", "numpy.zeros", "numpy.nonzero", "numpy.arange" ]
[((3690, 3710), 'numpy.sum', 'np.sum', (['active_union'], {}), '(active_union)\n', (3696, 3710), True, 'import numpy as np\n'), ((1940, 1961), 'regreg.api.glm.gaussian', 'rr.glm.gaussian', (['X', 'y'], {}), '(X, y)\n', (1955, 1961), True, 'import regreg.api as rr\n'), ((2131, 2141), 'numpy.sqrt', 'np.sqrt', (['n'], {})...
#!/usr/bin/env python3 from caproto.threading.client import Context prefix = 'TEST:SERVER.' ctx = Context() CMD, = ctx.get_pvs(prefix+'seq.CMD') ACK, = ctx.get_pvs(prefix+'seq.ACK') message, = ctx.get_pvs(prefix+'seq.message') values, = ctx.get_pvs(prefix+'seq.values') example_pv, = ctx.get_pvs(prefix+'example_pv') VA...
[ "caproto.threading.client.Context", "tempfile.gettempdir" ]
[((99, 108), 'caproto.threading.client.Context', 'Context', ([], {}), '()\n', (106, 108), False, 'from caproto.threading.client import Context\n'), ((495, 507), 'tempfile.gettempdir', 'gettempdir', ([], {}), '()\n', (505, 507), False, 'from tempfile import gettempdir\n'), ((567, 579), 'tempfile.gettempdir', 'gettempdir...
"""Test cases for the informationmodel module.""" from typing import List, Union from concepttordf import Concept, Contact from datacatalogtordf import Agent, Location, PeriodOfTime, URI import pytest from pytest_mock import MockFixture from rdflib import Graph, Namespace from skolemizer.testutils import skolemization...
[ "datacatalogtordf.Location", "tests.testutils.assert_isomorphic", "modelldcatnotordf.modelldcatno.InformationModel", "modelldcatnotordf.modelldcatno.Standard", "concepttordf.Contact", "datacatalogtordf.Agent", "datacatalogtordf.URI", "pytest.fail", "rdflib.Graph", "modelldcatnotordf.licensedocumen...
[((1023, 1081), 'modelldcatnotordf.modelldcatno.InformationModel', 'InformationModel', (['"""http://example.com/informationmodels/1"""'], {}), "('http://example.com/informationmodels/1')\n", (1039, 1081), False, 'from modelldcatnotordf.modelldcatno import InformationModel, ModelElement, ObjectType, Standard\n'), ((1614...
# -*- encoding: utf-8 -*- # möpß # # ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42): # <<EMAIL>> wrote this file. As long as you retain # this notice you can do whatever you want with this stuff. If we meet some day, # and you think this stuff is wor...
[ "shelxfile.misc.misc.wrap_line", "shelxfile.shelx.cards.SAME", "sys.exit", "shelxfile.shelx.cards.FLAT", "shelxfile.shelx.cards.ISOR", "shelxfile.shelx.cards.XNPD", "shelxfile.shelx.cards.Restraints", "shelxfile.shelx.cards.MOVE", "shelxfile.shelx.cards.RIGU", "shelxfile.shelx.cards.WIGL", "shel...
[((4212, 4256), 're.compile', 're.compile', (['"""^REM\\\\s+R1\\\\s+="""', 're.IGNORECASE'], {}), "('^REM\\\\s+R1\\\\s+=', re.IGNORECASE)\n", (4222, 4256), False, 'import re\n'), ((4273, 4318), 're.compile', 're.compile', (['"""^REM\\\\s+wR2\\\\s+="""', 're.IGNORECASE'], {}), "('^REM\\\\s+wR2\\\\s+=', re.IGNORECASE)\n"...
from django import template register = template.Library() @register.simple_tag(name='render_field') def render_field(field, **kwargs): field.field.widget.attrs.update(kwargs) return field
[ "django.template.Library" ]
[((41, 59), 'django.template.Library', 'template.Library', ([], {}), '()\n', (57, 59), False, 'from django import template\n')]
from distutils.core import setup, Extension setup( name = 'capture', version = '0.1', author = '<NAME>', author_email = '<EMAIL>', description = 'Capture stdout and/or stderr', license = 'MIT', keywords = 'capture stdout stderr write read', packages = [ ...
[ "distutils.core.setup" ]
[((45, 257), 'distutils.core.setup', 'setup', ([], {'name': '"""capture"""', 'version': '"""0.1"""', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'description': '"""Capture stdout and/or stderr"""', 'license': '"""MIT"""', 'keywords': '"""capture stdout stderr write read"""', 'packages': "['capture']"}), ...
"same as queuetest2.py, but uses threading, not _threads" numconsumers = 2 # how many consumers to start numproducers = 4 # how many producers to start nummessages = 4 # messages per producer to put import threading, queue, time, sys safeprint = threading.Lock() ...
[ "threading.Lock", "queue.Queue", "threading.Thread", "time.sleep" ]
[((301, 317), 'threading.Lock', 'threading.Lock', ([], {}), '()\n', (315, 317), False, 'import threading, queue, time, sys\n'), ((365, 378), 'queue.Queue', 'queue.Queue', ([], {}), '()\n', (376, 378), False, 'import threading, queue, time, sys\n'), ((501, 518), 'time.sleep', 'time.sleep', (['idnum'], {}), '(idnum)\n', ...
#!/usr/bin/python3 import os import itertools as it import unittest import unittest.mock as mock from types import SimpleNamespace import plato_pylib.shared.ucell_class as UCell import plato_fit_integrals.initialise.create_ecurve_workflows as tCode class TestCreateDimerDissocCurveStructs(unittest.TestCase): def s...
[ "unittest.mock.Mock", "types.SimpleNamespace", "plato_fit_integrals.initialise.create_ecurve_workflows.CreateStructEnergiesWorkFlow", "plato_fit_integrals.initialise.create_ecurve_workflows.getSepTwoAtomsInUnitCellStruct", "itertools.zip_longest", "plato_pylib.shared.ucell_class.UnitCell.fromLattVects", ...
[((4007, 4018), 'unittest.mock.Mock', 'mock.Mock', ([], {}), '()\n', (4016, 4018), True, 'import unittest.mock as mock\n'), ((4832, 4937), 'unittest.mock.patch', 'mock.patch', (['"""plato_fit_integrals.initialise.create_ecurve_workflows.platoOut.parsePlatoOutFile"""'], {}), "(\n 'plato_fit_integrals.initialise.creat...
from lupa._lupa import LuaRuntime def SumString(table : list) -> str: """ Connects all the strings in the list to a single string, optimal for the output of JLua.GetLuaString() :param table: A string list like generated by readlines() or GetLuaString() :return: The Connected string """ ...
[ "lupa._lupa.LuaRuntime" ]
[((2411, 2423), 'lupa._lupa.LuaRuntime', 'LuaRuntime', ([], {}), '()\n', (2421, 2423), False, 'from lupa._lupa import LuaRuntime\n'), ((3648, 3660), 'lupa._lupa.LuaRuntime', 'LuaRuntime', ([], {}), '()\n', (3658, 3660), False, 'from lupa._lupa import LuaRuntime\n')]
# Generated by Django 2.1.3 on 2018-12-05 22:31 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('posts', '0004_tag_tag_type'), ] operations = [ migrations.AddField( model_name='ingestlog', name='new', ...
[ "django.db.models.IntegerField" ]
[((326, 356), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'default': '(0)'}), '(default=0)\n', (345, 356), False, 'from django.db import migrations, models\n'), ((516, 546), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'default': '(0)'}), '(default=0)\n', (535, 546), False, 'from djan...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ A module for searching for spectra in a remote archive. A Simple Spectral Access (SSA) service allows a client to search for spectra in an archive whose field of view overlaps with a given cone on the sky. The service responds to a search query with ...
[ "re.match" ]
[((13935, 14047), 're.match', 're.match', (["('\\\\d{4}$|\\\\d{4}-\\\\d{2}$|\\\\d{4}-\\\\d{2}-\\\\d{2}$|' +\n '\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}\\\\:\\\\d{2}\\\\:\\\\d{2}$')"], {}), "('\\\\d{4}$|\\\\d{4}-\\\\d{2}$|\\\\d{4}-\\\\d{2}-\\\\d{2}$|' +\n '\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}\\\\:\\\\d{2}\\\\:\\\\d{2}$'...
"""Hardware interfaces for triggering""" # Authors: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # # License: BSD (3-clause) import sys import numpy as np from ._utils import verbose_dec, string_types, logger class ParallelTrigger(object): """Parallel port and dummy triggering support. .. warning:: When u...
[ "numpy.uint8", "sys.platform.startswith", "numpy.binary_repr", "numpy.any", "numpy.array", "parallel.Parallel", "numpy.arange", "numpy.atleast_1d" ]
[((6159, 6182), 'numpy.array', 'np.array', (['decimals', 'int'], {}), '(decimals, int)\n', (6167, 6182), True, 'import numpy as np\n'), ((6323, 6344), 'numpy.array', 'np.array', (['n_bits', 'int'], {}), '(n_bits, int)\n', (6331, 6344), True, 'import numpy as np\n'), ((7460, 7482), 'numpy.array', 'np.array', (['binary',...
# -*- coding: utf-8 -*- from datetime import timedelta from openprocurement.tender.core.views.cancellation_complaint import TenderCancellationComplaintResource from openprocurement.tender.core.utils import optendersresource, calculate_tender_business_date @optendersresource( name="negotiation:Tender Cancellation...
[ "openprocurement.tender.core.utils.calculate_tender_business_date", "datetime.timedelta", "openprocurement.tender.core.utils.optendersresource" ]
[((260, 610), 'openprocurement.tender.core.utils.optendersresource', 'optendersresource', ([], {'name': '"""negotiation:Tender Cancellation Complaints"""', 'collection_path': '"""/tenders/{tender_id}/cancellations/{cancellation_id}/complaints"""', 'path': '"""/tenders/{tender_id}/cancellations/{cancellation_id}/complai...
from ConfigParser import ConfigParser def parse(filename): config_dir = "" parser = ConfigParser() parser.read(config_dir + filename + ".conf") return parser._sections[filename]
[ "ConfigParser.ConfigParser" ]
[((93, 107), 'ConfigParser.ConfigParser', 'ConfigParser', ([], {}), '()\n', (105, 107), False, 'from ConfigParser import ConfigParser\n')]
# Copyright 2019 The FastEstimator 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 appl...
[ "fastestimator.op.tensorop.Average", "fastestimator.Estimator", "fastestimator.trace.Accuracy", "fastestimator.trace.ModelSaver", "fastestimator.trace.ConfusionMatrix", "tensorflow.keras.datasets.cifar10.load_data", "fastestimator.op.tensorop.AdversarialSample", "fastestimator.op.tensorop.SparseCatego...
[((1194, 1212), 'tempfile.mkdtemp', 'tempfile.mkdtemp', ([], {}), '()\n', (1210, 1212), False, 'import tempfile\n'), ((1258, 1295), 'tensorflow.keras.datasets.cifar10.load_data', 'tf.keras.datasets.cifar10.load_data', ([], {}), '()\n', (1293, 1295), True, 'import tensorflow as tf\n'), ((2724, 2871), 'fastestimator.Esti...
import collections import cirq from qiskit.quantum_info import hellinger_fidelity from supermarq.benchmark import Benchmark class GHZ(Benchmark): """Represents the GHZ state preparation benchmark parameterized by the number of qubits n. Device performance is based on the Hellinger fidelity between ...
[ "cirq.CNOT", "cirq.H", "cirq.LineQubit.range", "cirq.Circuit", "qiskit.quantum_info.hellinger_fidelity", "cirq.measure" ]
[((572, 609), 'cirq.LineQubit.range', 'cirq.LineQubit.range', (['self.num_qubits'], {}), '(self.num_qubits)\n', (592, 609), False, 'import cirq\n'), ((628, 642), 'cirq.Circuit', 'cirq.Circuit', ([], {}), '()\n', (640, 642), False, 'import cirq\n'), ((1565, 1608), 'qiskit.quantum_info.hellinger_fidelity', 'hellinger_fid...
from django.conf.urls import url import coma.views as views urlpatterns = [ url( r'^top_up$', views.start_payment, name="coma_top_up" ), url( r'^top_up_end/(?P<id>\d+)$', views.finish_payment, name="coma_top_up_end" ), url( r'^add', vi...
[ "coma.views.AddToBalanceView.as_view", "coma.views.TransactionMakerView.as_view", "django.conf.urls.url", "coma.views.ProductCreationView.as_view" ]
[((81, 137), 'django.conf.urls.url', 'url', (['"""^top_up$"""', 'views.start_payment'], {'name': '"""coma_top_up"""'}), "('^top_up$', views.start_payment, name='coma_top_up')\n", (84, 137), False, 'from django.conf.urls import url\n'), ((174, 252), 'django.conf.urls.url', 'url', (['"""^top_up_end/(?P<id>\\\\d+)$"""', '...
from enum import Enum import os, sys from colorama import init, Fore from query import get_account_asset from command import transfer_asset class ControlType(Enum): TEXT = "Text" NUMBER = "Number" direct = 'docker/keys' def input_control(name, required = False, type = ControlType.TEXT): value = input(f"Please...
[ "command.transfer_asset", "query.get_account_asset", "os.path.join", "colorama.init" ]
[((1759, 1779), 'colorama.init', 'init', ([], {'autoreset': '(True)'}), '(autoreset=True)\n', (1763, 1779), False, 'from colorama import init, Fore\n'), ((1306, 1348), 'os.path.join', 'os.path.join', (['direct', 'f"""{account_id}.priv"""'], {}), "(direct, f'{account_id}.priv')\n", (1318, 1348), False, 'import os, sys\n...
import json data = ''' [ { "name":"Sister", "count":95 }, { "name":"Sidharth", "count":94 }, { "name":"Ilona", "count":93 }, { "name":"Ruairidh", "count":93 }, { "name":"Virginie", "count":92 }, { "name":"Alan...
[ "json.loads" ]
[((2700, 2716), 'json.loads', 'json.loads', (['data'], {}), '(data)\n', (2710, 2716), False, 'import json\n')]
from tethys_sdk.testing import TethysTestCase import tethys_services.models as service_model from unittest import mock class SpatialDatasetServiceTests(TethysTestCase): def set_up(self): pass def tear_down(self): pass def test__str__(self): sds = service_model.SpatialDatasetServi...
[ "unittest.mock.patch", "tethys_services.models.SpatialDatasetService" ]
[((421, 487), 'unittest.mock.patch', 'mock.patch', (['"""tethys_services.models.GeoServerSpatialDatasetEngine"""'], {}), "('tethys_services.models.GeoServerSpatialDatasetEngine')\n", (431, 487), False, 'from unittest import mock\n'), ((1159, 1206), 'unittest.mock.patch', 'mock.patch', (['"""tethys_services.models.TDSCa...
#!/usr/bin/env python3 import os import random import numpy as np import pandas as pd import numpy as np from numpy.linalg import slogdet import time from experiment_runner.experiment_runner_v2 import run_experiments # from PySSM import Matrix, Vector from PySSM import RBFKernel from PySSM import IVM, FastIVM from...
[ "PySSM.Salsa", "numpy.sqrt", "PySSM.SieveStreaming", "PySSM.RBFKernel", "PySSM.Random", "PySSM.Greedy", "PySSM.IndependentSetImprovement", "PySSM.FastIVM", "PySSM.ThreeSieves", "PySSM.SieveStreamingPP", "numpy.load", "sklearn.preprocessing.MinMaxScaler", "numpy.save", "experiment_runner.ex...
[((2586, 2658), 'numpy.load', 'np.load', (['"""/home/share/fuerBuschjaeger/threesieves/stream51/stream51.npy"""'], {}), "('/home/share/fuerBuschjaeger/threesieves/stream51/stream51.npy')\n", (2593, 2658), True, 'import numpy as np\n'), ((5077, 5107), 'experiment_runner.experiment_runner_v2.run_experiments', 'run_experi...
# Lint as: python3 # Copyright 2020 DeepMind Technologies Limited. 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 # # ...
[ "courier.Server", "absl.logging.info" ]
[((1373, 1420), 'courier.Server', 'courier.Server', (['*courier_args'], {}), '(*courier_args, **courier_kwargs)\n', (1387, 1420), False, 'import courier\n'), ((1609, 1649), 'absl.logging.info', 'logging.info', (['"""Binding: %s"""', 'method_name'], {}), "('Binding: %s', method_name)\n", (1621, 1649), False, 'from absl ...
#En cmd se ejecuta con los siguientes comandos #py -3.1 "C:\Users\juanz\Google Drive\Semestre 6\Laboratorio Electronica Digital\ProyectoTurnero\Clases.py" import sys import time import serial import pygame #-------------------------------------------------------------- #---- Inicia --- ClassTurnosDisponibles...
[ "serial.Serial" ]
[((17748, 17895), 'serial.Serial', 'serial.Serial', ([], {'port': 'NombrePuerto', 'baudrate': '(9600)', 'timeout': '(1)', 'parity': 'serial.PARITY_EVEN', 'stopbits': 'serial.STOPBITS_TWO', 'bytesize': 'serial.EIGHTBITS'}), '(port=NombrePuerto, baudrate=9600, timeout=1, parity=serial.\n PARITY_EVEN, stopbits=serial.S...
""" Test utilities for OAuth access token exchange """ from django.conf import settings from social_django.models import Partial, UserSocialAuth from common.djangoapps.third_party_auth.tests.utils import ThirdPartyOAuthTestMixin TPA_FEATURES_KEY = 'ENABLE_THIRD_PARTY_AUTH' TPA_FEATURE_ENABLED = TPA_FEATURES_KEY in ...
[ "social_django.models.UserSocialAuth.objects.all", "social_django.models.Partial.objects.all" ]
[((3452, 3480), 'social_django.models.UserSocialAuth.objects.all', 'UserSocialAuth.objects.all', ([], {}), '()\n', (3478, 3480), False, 'from social_django.models import Partial, UserSocialAuth\n'), ((3498, 3519), 'social_django.models.Partial.objects.all', 'Partial.objects.all', ([], {}), '()\n', (3517, 3519), False, ...
# Copyright 2018-2021 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or...
[ "inspect.getmodule" ]
[((724, 745), 'inspect.getmodule', 'inspect.getmodule', (['fn'], {}), '(fn)\n', (741, 745), False, 'import inspect\n')]
from django.contrib import admin from .models import Post, Comment, Author, Category, CanSee, FriendRequest, \ Follow, RemoteCommentAuthor # Register your models here. admin.site.register(Author) admin.site.register(RemoteCommentAuthor) admin.site.register(Post) admin.site.register(Comment) admin....
[ "django.contrib.admin.site.register" ]
[((190, 217), 'django.contrib.admin.site.register', 'admin.site.register', (['Author'], {}), '(Author)\n', (209, 217), False, 'from django.contrib import admin\n'), ((218, 258), 'django.contrib.admin.site.register', 'admin.site.register', (['RemoteCommentAuthor'], {}), '(RemoteCommentAuthor)\n', (237, 258), False, 'fro...
from django import forms class mainform(forms.Form): risk=forms.CharField()#required=False riskdesc = forms.CharField() risksol = forms.CharField() consequence = forms.IntegerField() likelihood = forms.IntegerField() def changed_risk(self): pass
[ "django.forms.IntegerField", "django.forms.CharField" ]
[((66, 83), 'django.forms.CharField', 'forms.CharField', ([], {}), '()\n', (81, 83), False, 'from django import forms\n'), ((115, 132), 'django.forms.CharField', 'forms.CharField', ([], {}), '()\n', (130, 132), False, 'from django import forms\n'), ((148, 165), 'django.forms.CharField', 'forms.CharField', ([], {}), '()...
from typing import ( NamedTuple, ) BeaconConfig = NamedTuple( 'BeaconConfig', ( ('BASE_REWARD_QUOTIENT', int), ('DEFAULT_END_DYNASTY', int), ('DEPOSIT_SIZE', int), ('CYCLE_LENGTH', int), ('MIN_COMMITTEE_SIZE', int), ('MIN_DYNASTY_LENGTH', int), ('SHAR...
[ "typing.NamedTuple" ]
[((55, 335), 'typing.NamedTuple', 'NamedTuple', (['"""BeaconConfig"""', "(('BASE_REWARD_QUOTIENT', int), ('DEFAULT_END_DYNASTY', int), (\n 'DEPOSIT_SIZE', int), ('CYCLE_LENGTH', int), ('MIN_COMMITTEE_SIZE', int\n ), ('MIN_DYNASTY_LENGTH', int), ('SHARD_COUNT', int), ('SLOT_DURATION',\n int), ('SQRT_E_DROP_TIME...
import os class Config(object): DEBUG = False TESTING = False SECRET_KEY = os.getenv('SECRET_KEY', 'SUPER_IMPORTANT_KEY') class DevelopmentConfig(Config): DEBUG = True class TestingConfig(Config): TESTING = True
[ "os.getenv" ]
[((88, 134), 'os.getenv', 'os.getenv', (['"""SECRET_KEY"""', '"""SUPER_IMPORTANT_KEY"""'], {}), "('SECRET_KEY', 'SUPER_IMPORTANT_KEY')\n", (97, 134), False, 'import os\n')]
from django.utils.functional import cached_property from redis.exceptions import ConnectionError, ResponseError from experiments.redis_client import get_redis_client COUNTER_CACHE_KEY = 'experiments:participants:%s' COUNTER_FREQ_CACHE_KEY = 'experiments:freq:%s' class Counters(object): @cached_property d...
[ "experiments.utils.grouper", "experiments.redis_client.get_redis_client" ]
[((352, 370), 'experiments.redis_client.get_redis_client', 'get_redis_client', ([], {}), '()\n', (368, 370), False, 'from experiments.redis_client import get_redis_client\n'), ((4321, 4344), 'experiments.utils.grouper', 'grouper', (['key_iter', '(1000)'], {}), '(key_iter, 1000)\n', (4328, 4344), False, 'from experiment...
""" Copyright 2020 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES O...
[ "unittest.main", "time.sleep", "integ_tests.s1aptests.s1ap_utils.SpgwUtil", "integ_tests.s1aptests.s1ap_wrapper.TestWrapper" ]
[((3086, 3101), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3099, 3101), False, 'import unittest\n'), ((889, 962), 'integ_tests.s1aptests.s1ap_wrapper.TestWrapper', 's1ap_wrapper.TestWrapper', ([], {'stateless_mode': 'MagmadUtil.stateless_cmds.ENABLE'}), '(stateless_mode=MagmadUtil.stateless_cmds.ENABLE)\n', (...
import numpy as np import scipy.sparse as sp def get_sparse_mat(a2b, a2idx, b2idx): n = len(a2idx) m = len(b2idx) assoc = np.zeros((n, m)) for a, b_assoc in a2b.iteritems(): if a not in a2idx: continue for b in b_assoc: if b not in b2idx: continu...
[ "numpy.zeros", "scipy.sparse.isspmatrix_coo", "numpy.vstack", "scipy.sparse.coo_matrix" ]
[((136, 152), 'numpy.zeros', 'np.zeros', (['(n, m)'], {}), '((n, m))\n', (144, 152), True, 'import numpy as np\n'), ((377, 397), 'scipy.sparse.coo_matrix', 'sp.coo_matrix', (['assoc'], {}), '(assoc)\n', (390, 397), True, 'import scipy.sparse as sp\n'), ((460, 488), 'scipy.sparse.isspmatrix_coo', 'sp.isspmatrix_coo', ([...
from django.db import models from django.contrib.auth import get_user_model from material.models import MaterialModel, MaterialGroup, Plant, ImportanceLevelModel, TechnologyCode, PurchaseTypeModel, ImportanceLevelModel, GICategoryModel from workflow.models import WorkFlowEntityModel, WorkFlowModel User = get_user_mod...
[ "django.db.models.DateTimeField", "django.contrib.auth.get_user_model", "django.db.models.CharField", "django.db.models.ForeignKey" ]
[((308, 324), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (322, 324), False, 'from django.contrib.auth import get_user_model\n'), ((390, 491), 'django.db.models.CharField', 'models.CharField', (['"""status name"""'], {'max_length': '(100)', 'null': '(True)', 'default': 'None', 'help_text':...
from Compiler_teaching_platform.settings import BASE_DIR import os import time def judge(dir): # dir = "./tiger/code" # 在指定文件目录make代码 # os.system("ls") makePipline = os.popen("sh make.sh " + dir) # makeResult = makePipline.read() # 在指定文件目录执行可执行文件 time.sleep(1) pipline = os.popen("sh run...
[ "os.popen", "time.sleep" ]
[((182, 211), 'os.popen', 'os.popen', (["('sh make.sh ' + dir)"], {}), "('sh make.sh ' + dir)\n", (190, 211), False, 'import os\n'), ((276, 289), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (286, 289), False, 'import time\n'), ((304, 337), 'os.popen', 'os.popen', (["('sh runtiger.sh ' + dir)"], {}), "('sh runti...
import pathlib import pytest from opera.error import ParseError from opera.parser import tosca from opera.storage import Storage class TestLoad: def test_load_minimal_document(self, tmp_path): name = pathlib.PurePath("root.yaml") (tmp_path / name).write_text("tosca_definitions_version: tosca_sim...
[ "pathlib.Path", "pathlib.PurePath", "pytest.mark.parametrize", "pytest.raises", "opera.parser.tosca.load" ]
[((685, 1108), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""typ"""', "[('data_types', 'tosca.datatypes.xml'), ('artifact_types',\n 'tosca.artifacts.Implementation.Bash'), ('capability_types',\n 'tosca.capabilities.Node'), ('relationship_types',\n 'tosca.relationships.HostedOn'), ('interface_type...
from rest_framework import serializers from .models import Profile class ProfileSerializer(serializers.ModelSerializer): username = serializers.CharField(source='user.username') bio = serializers.CharField(allow_blank=True, required=False) avatar = serializers.SerializerMethodField() following = seri...
[ "rest_framework.serializers.CharField", "rest_framework.serializers.SerializerMethodField" ]
[((139, 184), 'rest_framework.serializers.CharField', 'serializers.CharField', ([], {'source': '"""user.username"""'}), "(source='user.username')\n", (160, 184), False, 'from rest_framework import serializers\n'), ((195, 250), 'rest_framework.serializers.CharField', 'serializers.CharField', ([], {'allow_blank': '(True)...
# Copyright 2019 The TensorFlow 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 applica...
[ "tensorflow.compat.v2.TensorSpec", "tensorflow.compat.v2.constant", "tensorflow.compiler.mlir.tensorflow.tests.tf_saved_model.common.do_test", "tensorflow.compat.v2.function" ]
[((1595, 1626), 'tensorflow.compat.v2.function', 'tf.function', ([], {'input_signature': '[]'}), '(input_signature=[])\n', (1606, 1626), True, 'import tensorflow.compat.v2 as tf\n'), ((2166, 2197), 'tensorflow.compat.v2.function', 'tf.function', ([], {'input_signature': '[]'}), '(input_signature=[])\n', (2177, 2197), T...
import locale import os from enum import Enum, IntEnum from functools import lru_cache import gi gi.require_version("Gtk", "3.0") gi.require_version("Gdk", "3.0") gi.require_version("Notify", "0.7") from gi.repository import Gtk, Gdk, Notify from app.settings import Settings, SettingsException, IS_DARWIN # Init not...
[ "os.path.exists", "gi.repository.Gtk.Settings", "locale.bindtextdomain", "os.environ.get", "gi.repository.Gtk.IconTheme.new", "app.settings.Settings.get_instance", "gi.require_version", "gi.repository.Notify.init", "gi.repository.Gtk.IconTheme.get_default", "gi.repository.Notify.Notification.new",...
[((99, 131), 'gi.require_version', 'gi.require_version', (['"""Gtk"""', '"""3.0"""'], {}), "('Gtk', '3.0')\n", (117, 131), False, 'import gi\n'), ((132, 164), 'gi.require_version', 'gi.require_version', (['"""Gdk"""', '"""3.0"""'], {}), "('Gdk', '3.0')\n", (150, 164), False, 'import gi\n'), ((165, 200), 'gi.require_ver...
import tensorflow as tf from tensorflow.keras.layers import Dense, Flatten, BatchNormalization from tensorflow.keras import Model class PolicyNetwork(Model): def __init__(self, input_shape, n_hidden, n_output, n_friend, n_batch=None, dtype=tf.float32): super(PolicyNetwork, self).__init__() assert ...
[ "tensorflow.keras.layers.Dense", "tensorflow.ones", "tensorflow.zeros", "tensorflow.keras.layers.BatchNormalization" ]
[((365, 421), 'tensorflow.keras.layers.BatchNormalization', 'BatchNormalization', ([], {'input_shape': 'input_shape', 'dtype': 'dtype'}), '(input_shape=input_shape, dtype=dtype)\n', (383, 421), False, 'from tensorflow.keras.layers import Dense, Flatten, BatchNormalization\n'), ((566, 594), 'tensorflow.keras.layers.Dens...
__source__ = 'https://leetcode.com/problems/stamping-the-sequence/' # Time: O(N(N-M) # Space: O(N(N-M) # # Description: Leetcode # 936. Stamping The Sequence # # You want to form a target string of lowercase letters. # # At the beginning, your sequence is target.length '?' marks. # You also have a stamp of lowercase l...
[ "unittest.main", "collections.deque" ]
[((3710, 3725), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3723, 3725), False, 'import unittest\n'), ((1961, 1980), 'collections.deque', 'collections.deque', ([], {}), '()\n', (1978, 1980), False, 'import collections\n')]
import pytest from pytest import ( raises, ) from vyper import ( compiler, ) from vyper.exceptions import ( TypeMismatch, ) fail_list = [ """ @public def foo() -> uint256: return extract32(b"cowcowcowcowcowccowcowcowcowcowccowcowcowcowcowccowcowcowcowcowc", 0) """ ] @pytest.mark.parametrize(...
[ "pytest.mark.parametrize", "vyper.compiler.compile_code", "pytest.raises" ]
[((296, 342), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""bad_code"""', 'fail_list'], {}), "('bad_code', fail_list)\n", (319, 342), False, 'import pytest\n'), ((1011, 1059), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""good_code"""', 'valid_list'], {}), "('good_code', valid_list)\n", (103...
import bs4 as bs import urllib.request sauce = urllib.request.urlopen('http://checkip.dyndns.com/').read() soup = bs.BeautifulSoup(sauce, 'lxml') print(soup.body.text)
[ "bs4.BeautifulSoup" ]
[((116, 147), 'bs4.BeautifulSoup', 'bs.BeautifulSoup', (['sauce', '"""lxml"""'], {}), "(sauce, 'lxml')\n", (132, 147), True, 'import bs4 as bs\n')]
from abc import ABC, abstractmethod from typing import List import numpy as np from scipy.stats import t, spearmanr from scipy.special import erfinv from chemprop.uncertainty.uncertainty_calibrator import UncertaintyCalibrator from chemprop.train import evaluate_predictions class UncertaintyEvaluator(ABC): """ ...
[ "numpy.abs", "numpy.mean", "numpy.sqrt", "numpy.log", "numpy.zeros_like", "scipy.special.erfinv", "numpy.square", "numpy.array_split", "numpy.array", "numpy.zeros", "numpy.sum", "numpy.expand_dims", "scipy.stats.t.var", "scipy.stats.spearmanr", "numpy.rec.fromarrays", "numpy.arange" ]
[((4921, 4938), 'numpy.array', 'np.array', (['targets'], {}), '(targets)\n', (4929, 4938), True, 'import numpy as np\n'), ((4963, 4986), 'numpy.array', 'np.array', (['uncertainties'], {}), '(uncertainties)\n', (4971, 4986), True, 'import numpy as np\n'), ((5814, 5842), 'numpy.array', 'np.array', (['targets'], {'dtype':...
import alleviate mode = 'r' def main(): try: open('text.py', mode) except Exception as e: alleviate.exception(e)#, output=alleviate.Output.JSON) main()
[ "alleviate.exception" ]
[((115, 137), 'alleviate.exception', 'alleviate.exception', (['e'], {}), '(e)\n', (134, 137), False, 'import alleviate\n')]
from django.db import connections from django.db.backends.sqlite3.base import DatabaseWrapper from django.core.management.commands.makemigrations import Command as MakeMigrations class Command(MakeMigrations): def execute(self, *args, **options): settings = connections['default'].settings_dict.copy() ...
[ "django.core.management.commands.makemigrations.Command", "django.db.backends.sqlite3.base.DatabaseWrapper" ]
[((498, 523), 'django.db.backends.sqlite3.base.DatabaseWrapper', 'DatabaseWrapper', (['settings'], {}), '(settings)\n', (513, 523), False, 'from django.db.backends.sqlite3.base import DatabaseWrapper\n'), ((539, 555), 'django.core.management.commands.makemigrations.Command', 'MakeMigrations', ([], {}), '()\n', (553, 55...
#!/usr/bin/python3 from PDFCellFit import PDFCellFit as FPDF # Script does not work well with markdown enabled # Styles B,I,U work fine txt_short = 'This text is short enough.' txt_long = 'This text is way too long.' for i in range(2): txt_long+=' ' + txt_long pdf = FPDF() pdf.add_page() pdf.set_fill_color(255...
[ "PDFCellFit.PDFCellFit" ]
[((276, 282), 'PDFCellFit.PDFCellFit', 'FPDF', ([], {}), '()\n', (280, 282), True, 'from PDFCellFit import PDFCellFit as FPDF\n')]
""" Copyright (c) 2019 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import absolute_import import os import shutil import tarfile import tempfile import zipfile from atomic_reactor.constants ...
[ "zipfile.ZipFile", "tarfile.TarFile", "os.path.join", "atomic_reactor.util.has_operator_manifest", "tempfile.NamedTemporaryFile", "tempfile.mkdtemp", "atomic_reactor.util.is_scratch_build", "shutil.rmtree", "platform.machine", "os.walk", "os.path.relpath" ]
[((673, 710), 'os.path.join', 'os.path.join', (['"""/"""', 'MANIFESTS_DIR_NAME'], {}), "('/', MANIFESTS_DIR_NAME)\n", (685, 710), False, 'import os\n'), ((1954, 1972), 'atomic_reactor.util.is_scratch_build', 'is_scratch_build', ([], {}), '()\n', (1970, 1972), False, 'from atomic_reactor.util import is_scratch_build, ha...
from __future__ import division, print_function import argparse import os class Template(object): def __init__(self, includes, excludes, commands): self.includes = includes self.excludes = excludes self.commands = commands TEMPLATES = { "generic": Template( includes=["*"], ...
[ "os.path.dirname" ]
[((1690, 1715), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (1705, 1715), False, 'import os\n')]
# This file is part of the pyMOR project (http://www.pymor.org). # Copyright 2013-2020 pyMOR developers and contributors. All rights reserved. # License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) import numpy as np import pytest from pymor.algorithms.newton import newton, NewtonError from pym...
[ "pymor.vectorarrays.numpy.NumpyVectorSpace.from_numpy", "pymortests.base.runmodule", "pymortests.fixtures.operator.MonomOperator", "pytest.raises", "pymor.algorithms.newton.newton" ]
[((545, 565), 'pymortests.fixtures.operator.MonomOperator', 'MonomOperator', (['order'], {}), '(order)\n', (558, 565), False, 'from pymortests.fixtures.operator import MonomOperator\n'), ((576, 610), 'pymor.vectorarrays.numpy.NumpyVectorSpace.from_numpy', 'NumpyVectorSpace.from_numpy', (['[0.0]'], {}), '([0.0])\n', (60...
import os version = "1.0b6" cwd = os.path.abspath(os.path.dirname(__file__)) graphdb_builder_log = os.path.join(cwd, "graphdb_builder_log.config") graphdb_connector_log = os.path.join(cwd, "graphdb_connector_log.config") report_manager_log = os.path.join(cwd, "report_manager_log.config") connector_config_file = "conn...
[ "os.path.dirname", "os.path.join" ]
[((101, 148), 'os.path.join', 'os.path.join', (['cwd', '"""graphdb_builder_log.config"""'], {}), "(cwd, 'graphdb_builder_log.config')\n", (113, 148), False, 'import os\n'), ((173, 222), 'os.path.join', 'os.path.join', (['cwd', '"""graphdb_connector_log.config"""'], {}), "(cwd, 'graphdb_connector_log.config')\n", (185, ...
from profile import Profile from bockbuild.environment import Environment from bockbuild.util.util import * class UnixProfile (Profile): def attach (self, bockbuild): Profile.attach (self, bockbuild) self.name = 'unix' self.env = Environment(self) self.staged_prefix = bockbuild.st...
[ "profile.Profile.attach", "bockbuild.environment.Environment" ]
[((181, 212), 'profile.Profile.attach', 'Profile.attach', (['self', 'bockbuild'], {}), '(self, bockbuild)\n', (195, 212), False, 'from profile import Profile\n'), ((261, 278), 'bockbuild.environment.Environment', 'Environment', (['self'], {}), '(self)\n', (272, 278), False, 'from bockbuild.environment import Environmen...
# Created by <NAME><<EMAIL> at 2/25/2021 from setuptools import setup setup( name='HMSSearchKit', version='0.1.0', description='HMS Search Kit Python Client', url='https://github.com/shuds13/pyexample', author='<NAME>', author_email='<EMAIL>', license='Apache License', packages=['HMSSea...
[ "setuptools.setup" ]
[((71, 589), 'setuptools.setup', 'setup', ([], {'name': '"""HMSSearchKit"""', 'version': '"""0.1.0"""', 'description': '"""HMS Search Kit Python Client"""', 'url': '"""https://github.com/shuds13/pyexample"""', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'license': '"""Apache License"""', 'packages': "['H...
# Copyright (c) 2019 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...
[ "utils.args.print_arguments", "argparse.ArgumentParser" ]
[((844, 897), 'argparse.ArgumentParser', 'argparse.ArgumentParser', (['"""ERNIE-en model with Paddle"""'], {}), "('ERNIE-en model with Paddle')\n", (867, 897), False, 'import argparse\n'), ((3443, 3464), 'utils.args.print_arguments', 'print_arguments', (['args'], {}), '(args)\n', (3458, 3464), False, 'from utils.args i...
""" Classes for preprocessing input data in various contexts. :author: <NAME> (<EMAIL>) :author: <NAME> (<EMAIL>) :author: <NAME> (<EMAIL>) :organization: ETS """ import logging import re import warnings import numpy as np import pandas as pd from collections import defaultdict from numpy.random import RandomStat...
[ "numpy.isclose", "re.compile", "pandas.merge", "logging.warning", "logging.info", "numpy.array", "numpy.errstate", "numpy.rint", "pandas.to_numeric", "numpy.isnan", "numpy.std", "pandas.DataFrame", "numpy.isinf", "pandas.concat", "numpy.random.RandomState" ]
[((6204, 6244), 'pandas.DataFrame', 'pd.DataFrame', (["{'feature': feature_names}"], {}), "({'feature': feature_names})\n", (6216, 6244), True, 'import pandas as pd\n'), ((12767, 12794), 'pandas.DataFrame', 'pd.DataFrame', (['feature_specs'], {}), '(feature_specs)\n', (12779, 12794), True, 'import pandas as pd\n'), ((1...
from flask import abort, g from keras import backend as K from ..aipcloud.text import sentiment, extraction from ..aipcloud.sound import Speech2Text from ..aipcloud.sound.emotion import SpeechEmotionAnalyzer from ..aipcloud.sound.clustering import SpeakerClusterAnalyzer #from .. import db #from ..initialize_db import I...
[ "keras.backend.set_learning_phase", "nltk.download" ]
[((419, 442), 'keras.backend.set_learning_phase', 'K.set_learning_phase', (['(1)'], {}), '(1)\n', (439, 442), True, 'from keras import backend as K\n'), ((464, 486), 'nltk.download', 'nltk.download', (['"""punkt"""'], {}), "('punkt')\n", (477, 486), False, 'import nltk\n'), ((491, 517), 'nltk.download', 'nltk.download'...
# coding=utf-8 # Copyright 2021 The TensorFlow Datasets Authors and the HuggingFace Datasets 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/LI...
[ "datasets.SplitGenerator", "xml.etree.ElementTree.parse", "datasets.Version", "numpy.argsort", "numpy.array", "os.path.isfile", "datasets.logging.get_logger", "datasets.Value", "datasets.Features" ]
[((779, 816), 'datasets.logging.get_logger', 'datasets.logging.get_logger', (['__name__'], {}), '(__name__)\n', (806, 816), False, 'import datasets\n'), ((13623, 13638), 'numpy.argsort', 'np.argsort', (['key'], {}), '(key)\n', (13633, 13638), True, 'import numpy as np\n'), ((12510, 12704), 'datasets.SplitGenerator', 'd...
"""HPO script.""" import argparse import logging import pathlib import random as rn import sys from enum import Enum from typing import Any, Mapping, Tuple import numpy as np import torch from ray import tune from sklearn.metrics import mean_absolute_error, mean_squared_error from nlkda.data.base import DatasetEnum, ...
[ "logging.getLogger", "logging.StreamHandler", "nlkda.eval.get_model_size", "nlkda.models.base.FormulationWrapperEnum", "sys.exc_info", "torch.cuda.is_available", "nlkda.models.utils.ModelEnum", "torch.random.manual_seed", "nlkda.utils.tune_bool", "nlkda.utils.enum_values", "argparse.ArgumentPars...
[((969, 1011), 'nlkda.utils.tune_q_log_uniform', 'tune_q_log_uniform', ([], {'low': '(1)', 'high': '(n * k)', 'q': '(1)'}), '(low=1, high=n * k, q=1)\n', (987, 1011), False, 'from nlkda.utils import MLFlowClient, enum_values, flatten_dict, save_to_file, tune_bool, tune_enum, tune_q_log_uniform\n'), ((2592, 2619), 'logg...
import hydra import hydra.utils as utils from pathlib import Path import torch import numpy as np from tqdm import tqdm import soundfile as sf from model_encoder import Encoder, Encoder_lf0 from model_decoder import Decoder_ac from model_encoder import SpeakerEncoder as Encoder_spk import os import random from glob...
[ "numpy.log", "hydra.utils.to_absolute_path", "torch.cuda.is_available", "spectrogram.logmelspectrogram", "model_encoder.SpeakerEncoder", "resampy.resample", "numpy.mean", "hydra.main", "model_encoder.Encoder", "subprocess.call", "glob.glob", "numpy.abs", "random.choice", "numpy.nonzero", ...
[((1921, 1966), 'hydra.main', 'hydra.main', ([], {'config_path': '"""config/convert.yaml"""'}), "(config_path='config/convert.yaml')\n", (1931, 1966), False, 'import hydra\n'), ((751, 768), 'soundfile.read', 'sf.read', (['wav_path'], {}), '(wav_path)\n', (758, 768), True, 'import soundfile as sf\n'), ((1035, 1156), 'sp...
import numpy as np from nms import nms import cfg from shapely.geometry import Polygon class Averager(object): """Compute average for torch.Tensor, used for loss average.""" def __init__(self): self.reset() def add(self, v): count = v.data.numel() v = v.data.sum() self.n_...
[ "numpy.amin", "numpy.where", "numpy.argsort", "numpy.array", "shapely.geometry.Polygon", "numpy.sum", "numpy.zeros", "nms.nms", "numpy.exp", "numpy.greater_equal" ]
[((1223, 1233), 'shapely.geometry.Polygon', 'Polygon', (['g'], {}), '(g)\n', (1230, 1233), False, 'from shapely.geometry import Polygon\n'), ((1246, 1256), 'shapely.geometry.Polygon', 'Polygon', (['p'], {}), '(p)\n', (1253, 1256), False, 'from shapely.geometry import Polygon\n'), ((2168, 2187), 'numpy.zeros', 'np.zeros...
# This file is a part of the Pepper project, https://github.com/devosoft/Pepper # (C) Michigan State University, under the MIT License # See LICENSE.txt for more information """ This is the abstract symbol tree for PEPPr. The parser will build the actual tree, so this is really more of a library of nodes that may be ...
[ "pathlib.Path", "pepper.symbol_table.PepperInternalError", "os.path.split", "pepper.symbol_table.TABLE.keys", "typing.cast" ]
[((6243, 6270), 'typing.cast', 'cast', (['str', 'self.children[0]'], {}), '(str, self.children[0])\n', (6247, 6270), False, 'from typing import List, Optional, cast\n'), ((871, 902), 'typing.cast', 'cast', (['List[Node]', 'self.children'], {}), '(List[Node], self.children)\n', (875, 902), False, 'from typing import Lis...