code
stringlengths
20
1.04M
apis
list
extract_api
stringlengths
75
9.94M
from django.contrib import admin # Register your models here. from pruebas.models import Category, Page class CategoryAdmin(admin.ModelAdmin): prepopulated_fields = {'slug':('name',)} # Update the registeration to include this customised interface admin.site.register(Category, CategoryAdmin) admin.site.register(...
[ "django.contrib.admin.site.register" ]
[((255, 299), 'django.contrib.admin.site.register', 'admin.site.register', (['Category', 'CategoryAdmin'], {}), '(Category, CategoryAdmin)\n', (274, 299), False, 'from django.contrib import admin\n'), ((300, 325), 'django.contrib.admin.site.register', 'admin.site.register', (['Page'], {}), '(Page)\n', (319, 325), False...
from __future__ import unicode_literals from django.db import models from django.core.urlresolvers import reverse # Create your models here. # MVC MODEL VIEW CONTROLLER class Post(models.Model): title = models.CharField(max_length=120) content = models.TextField() updated = models.DateTimeField(auto_now=T...
[ "django.db.models.CharField", "django.db.models.TextField", "django.db.models.DateTimeField", "django.core.urlresolvers.reverse" ]
[((209, 241), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(120)'}), '(max_length=120)\n', (225, 241), False, 'from django.db import models\n'), ((256, 274), 'django.db.models.TextField', 'models.TextField', ([], {}), '()\n', (272, 274), False, 'from django.db import models\n'), ((289, 344), '...
from flask import Flask, request import json import urllib import pandas as pd from feature_selection.RFE import RFE_selector from feature_selection.backward_elimination import backward_elimination from feature_selection.LASSO import LASSO app = Flask(__name__) @app.route('/', methods=['GET']) def index(): retu...
[ "pandas.DataFrame", "flask.request.args.get", "feature_selection.backward_elimination.backward_elimination", "flask.Flask", "urllib.request.urlopen", "feature_selection.RFE.RFE_selector", "flask.request.args.getlist", "feature_selection.LASSO.LASSO" ]
[((248, 263), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (253, 263), False, 'from flask import Flask, request\n'), ((1400, 1436), 'flask.request.args.getlist', 'request.args.getlist', (['"""experimentid"""'], {}), "('experimentid')\n", (1420, 1436), False, 'from flask import Flask, request\n'), ((1456,...
#!/usr/bin/env python # coding: utf-8 # Copyright 2020 TWO SIGMA OPEN SOURCE, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
[ "functools.partial", "subprocess.check_call", "os.path.dirname", "subprocess.list2cmdline", "os.path.join", "sys.exit" ]
[((1631, 1655), 'os.path.join', 'os.path.join', (['root', '"""./"""'], {}), "(root, './')\n", (1643, 1655), False, 'import os\n'), ((1533, 1561), 'os.path.dirname', 'os.path.dirname', (['sys.argv[0]'], {}), '(sys.argv[0])\n', (1548, 1561), False, 'import os\n'), ((1586, 1615), 'os.path.join', 'os.path.join', (['here', ...
import copy, random, json, time, os, shutil, logging from flask import ( Flask, Blueprint, render_template, request, redirect, url_for, jsonify, flash, ) from flask_babel import lazy_gettext as _ from flask_login import login_required, current_user from flask import current_app as app f...
[ "os.path.expanduser", "flask.current_app.specter.node_manager.add_node", "flask.flash", "flask.Blueprint", "random.randint", "flask.redirect", "flask.request.form.get", "flask.current_app.specter.node_manager.get_by_alias", "flask.current_app.specter.update_active_node", "time.sleep", "flask.cur...
[((493, 520), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (510, 520), False, 'import copy, random, json, time, os, shutil, logging\n'), ((529, 553), 'random.randint', 'random.randint', (['(0)', '(1e+32)'], {}), '(0, 1e+32)\n', (543, 553), False, 'import copy, random, json, time, os, sh...
import os import sys if len(sys.argv) < 2: print('Need argument of base path. quitting.') sys.exit(1) walk_dir = sys.argv[1] print('Base path: ' + os.path.abspath(walk_dir)) dependency_def = "requirements.txt" for root, subdirs, files in os.walk(walk_dir): if dependency_def in files: os.system(...
[ "os.path.abspath", "os.walk", "sys.exit" ]
[((251, 268), 'os.walk', 'os.walk', (['walk_dir'], {}), '(walk_dir)\n', (258, 268), False, 'import os\n'), ((99, 110), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (107, 110), False, 'import sys\n'), ((158, 183), 'os.path.abspath', 'os.path.abspath', (['walk_dir'], {}), '(walk_dir)\n', (173, 183), False, 'import os\...
# (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import os from datadog_checks.dev import get_docker_hostname PORT = '8500' HOST = get_docker_hostname() URL = 'http://{}:{}'.format(HOST, PORT) CHECK_NAME = 'consul' HERE = os.path.dirname(os.path.ab...
[ "os.path.abspath", "os.getenv", "datadog_checks.dev.get_docker_hostname" ]
[((200, 221), 'datadog_checks.dev.get_docker_hostname', 'get_docker_hostname', ([], {}), '()\n', (219, 221), False, 'from datadog_checks.dev import get_docker_hostname\n'), ((355, 382), 'os.getenv', 'os.getenv', (['"""CONSUL_VERSION"""'], {}), "('CONSUL_VERSION')\n", (364, 382), False, 'import os\n'), ((310, 335), 'os....
from git_repo_master.azure_devops.request import AzureGitRequest class BranchLocker: def __init__(self, organization, project, token): self.__request = AzureGitRequest() \ .with_organization(organization) \ .with_project(project) \ .with_resource('refs') \ ....
[ "git_repo_master.azure_devops.request.AzureGitRequest" ]
[((166, 183), 'git_repo_master.azure_devops.request.AzureGitRequest', 'AzureGitRequest', ([], {}), '()\n', (181, 183), False, 'from git_repo_master.azure_devops.request import AzureGitRequest\n')]
from conans import ConanFile, CMake, tools from conans.errors import ConanInvalidConfiguration import os required_conan_version = ">=1.33.0" class CubicInterpolationConan(ConanFile): name = "cubicinterpolation" homepage = "https://github.com/MaxSac/cubic_interpolation" license = "MIT" url = "https://...
[ "conans.tools.get", "conans.tools.Version", "conans.errors.ConanInvalidConfiguration", "conans.CMake", "conans.tools.check_min_cppstd", "os.path.join" ]
[((2754, 2865), 'conans.tools.get', 'tools.get', ([], {'destination': 'self._source_subfolder', 'strip_root': '(True)'}), "(**self.conan_data['sources'][self.version], destination=self.\n _source_subfolder, strip_root=True)\n", (2763, 2865), False, 'from conans import ConanFile, CMake, tools\n'), ((2989, 3000), 'con...
""" A program to initialize all fonts used in Kivy Cupertino """ from kivycupertino import fonts_path from kivy.core.text import LabelBase fonts = [ { 'name': 'San Francisco', 'fn_regular': fonts_path + 'sf.otf', 'fn_italic': fonts_path + 'sf-italic.otf', 'fn_bold': fonts_path + 's...
[ "kivy.core.text.LabelBase.register" ]
[((763, 789), 'kivy.core.text.LabelBase.register', 'LabelBase.register', ([], {}), '(**font)\n', (781, 789), False, 'from kivy.core.text import LabelBase\n')]
import pygame from Gina import Gina from Otis import Otis from Player import Player from fight_screen import FightScreen class CharacterSelect(): def __init__(self, mode): """ Initializes the important variables for the the character selection screen. The select.image holds the menu screen...
[ "pygame.transform.flip", "fight_screen.FightScreen", "pygame.quit", "pygame.Surface", "pygame.event.get", "pygame.display.flip", "pygame.time.wait", "Gina.Gina", "pygame.font.Font", "pygame.image.load", "pygame.time.Clock", "pygame.key.get_pressed", "pygame.mixer.Sound" ]
[((665, 714), 'pygame.image.load', 'pygame.image.load', (['"""Sprites/character_select.png"""'], {}), "('Sprites/character_select.png')\n", (682, 714), False, 'import pygame\n'), ((741, 783), 'pygame.image.load', 'pygame.image.load', (['"""Sprites/p1_cursor.png"""'], {}), "('Sprites/p1_cursor.png')\n", (758, 783), Fals...
from time import sleep import serial with open("config.txt", "r") as reader: conts = reader.readlines() try: ser = serial.Serial(conts[0], 9600) except: from config import * def encourage(data): if data == 1: ser.write(str(chr(33)).encode()) sleep(0.1) if data == 0: ser.w...
[ "serial.Serial", "time.sleep" ]
[((125, 154), 'serial.Serial', 'serial.Serial', (['conts[0]', '(9600)'], {}), '(conts[0], 9600)\n', (138, 154), False, 'import serial\n'), ((278, 288), 'time.sleep', 'sleep', (['(0.1)'], {}), '(0.1)\n', (283, 288), False, 'from time import sleep\n'), ((356, 366), 'time.sleep', 'sleep', (['(0.1)'], {}), '(0.1)\n', (361,...
# Copyright 2020 Dragonchain, Inc. # Licensed under the Apache License, Version 2.0 (the "Apache License") # with the following modification; you may not use this file except in # compliance with the Apache License and the following modification to it: # Section 6. Trademarks. is deleted and replaced with: # 6. Tr...
[ "dragonchain.lib.interfaces.local.disk.select_transaction", "dragonchain.lib.interfaces.local.disk.delete_directory", "dragonchain.lib.interfaces.local.disk.get", "json.loads", "dragonchain.lib.interfaces.local.disk.does_object_exist", "dragonchain.logger.get_logger", "json.dumps", "time.time", "dra...
[((1350, 1369), 'dragonchain.logger.get_logger', 'logger.get_logger', ([], {}), '()\n', (1367, 1369), False, 'from dragonchain import logger\n'), ((3560, 3601), 'dragonchain.lib.interfaces.local.disk.put', 'storage.put', (['STORAGE_LOCATION', 'key', 'value'], {}), '(STORAGE_LOCATION, key, value)\n', (3571, 3601), True,...
import os import krakenex import logging from decimal import Decimal from pykrakenapi import KrakenAPI from typing import Tuple from automate_crypto.util.util import setup_decimal, qDecimal class Kraken: def __init__(self): self.api = KrakenAPI( krakenex.API( key=os.getenv("K...
[ "logging.error", "automate_crypto.util.util.qDecimal", "decimal.Decimal", "logging.warning", "logging.info", "automate_crypto.util.util.setup_decimal", "os.getenv" ]
[((416, 465), 'automate_crypto.util.util.setup_decimal', 'setup_decimal', ([], {'prec': '(16)', 'decimal_prec': '"""1.00000000"""'}), "(prec=16, decimal_prec='1.00000000')\n", (429, 465), False, 'from automate_crypto.util.util import setup_decimal, qDecimal\n'), ((3159, 3208), 'automate_crypto.util.util.qDecimal', 'qDe...
""" JSON API Python client https://github.com/qvantel/jsonapi-client (see JSON API specification in http://jsonapi.org/) Copyright (c) 2017, Qvantel All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: ...
[ "re.sub", "logging.getLogger" ]
[((2029, 2056), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (2046, 2056), False, 'import logging\n'), ((17428, 17469), 're.sub', 're.sub', (['"""(?<!^)(?=[A-Z])"""', '"""_"""', 'self.type'], {}), "('(?<!^)(?=[A-Z])', '_', self.type)\n", (17434, 17469), False, 'import re\n'), ((17645, 1...
# 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 applic...
[ "paddle.to_tensor", "paddle.distributed.get_world_size", "argparse.ArgumentParser", "dataset.data_generator_rgnn.DataGenerator", "utils.load_model", "os.path.join", "paddle.distributed.get_rank", "pgl.utils.logger.log.info", "utils.save_model", "paddle.no_grad", "dataset.data_generator_rgnn.MAG2...
[((4538, 4554), 'paddle.no_grad', 'paddle.no_grad', ([], {}), '()\n', (4552, 4554), False, 'import paddle\n'), ((5664, 5680), 'paddle.no_grad', 'paddle.no_grad', ([], {}), '()\n', (5678, 5680), False, 'import paddle\n'), ((1257, 1293), 'paddle.to_tensor', 'paddle.to_tensor', (['x'], {'dtype': '"""float32"""'}), "(x, dt...
from django.db import models from django.utils.text import slugify class News(models.Model): title = models.CharField(max_length=120) summary = models.TextField() image = models.ImageField(upload_to="Edu_News", height_field=None, width_field=None, max_length=None, blank=Tr...
[ "django.db.models.TextField", "django.db.models.CharField", "django.db.models.SlugField", "django.utils.text.slugify", "django.db.models.ImageField", "django.db.models.IntegerField", "django.db.models.DateTimeField" ]
[((118, 150), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(120)'}), '(max_length=120)\n', (134, 150), False, 'from django.db import models\n'), ((175, 193), 'django.db.models.TextField', 'models.TextField', ([], {}), '()\n', (191, 193), False, 'from django.db import models\n'), ((218, 327), '...
import socket import time import config import crac_status import gui from gui_constants import GuiLabel, GuiKey from logger import LoggerClient from status import Status from status import CurtainsStatus from status import TelescopeStatus from status import ButtonStatus from status import TrackingStatus from status im...
[ "config.Config.getInt", "socket.socket", "gui_constants.GuiLabel.ALERT_TELESCOPE_OPERATIVE.format", "crac_status.CracStatus", "config.Config.getValue", "logger.LoggerClient.getLogger", "gui.Gui" ]
[((12029, 12067), 'config.Config.getValue', 'config.Config.getValue', (['"""ip"""', '"""server"""'], {}), "('ip', 'server')\n", (12051, 12067), False, 'import config\n'), ((12113, 12151), 'config.Config.getInt', 'config.Config.getInt', (['"""port"""', '"""server"""'], {}), "('port', 'server')\n", (12133, 12151), False,...
from flask_restful import Resource, reqparse from flask_jwt import jwt_required from models.campsite import CampsiteModel from models.weather_forecast import WeatherForecastModel from models.travel_time import TravelTimeModel from models.zipcode import ZipcodeModel import requests # resources used to map endpoints (...
[ "models.zipcode.ZipcodeModel.find_by_zipcode", "models.campsite.CampsiteModel.find_by_duration", "models.campsite.CampsiteModel", "flask_restful.reqparse.RequestParser", "models.campsite.CampsiteModel.query.all", "models.campsite.CampsiteModel.find_by_id" ]
[((577, 601), 'flask_restful.reqparse.RequestParser', 'reqparse.RequestParser', ([], {}), '()\n', (599, 601), False, 'from flask_restful import Resource, reqparse\n'), ((3105, 3129), 'flask_restful.reqparse.RequestParser', 'reqparse.RequestParser', ([], {}), '()\n', (3127, 3129), False, 'from flask_restful import Resou...
from django.db import models # Create your models here. class User(models.Model): #user_id = models.IntegerField(primary_key=True, max_length=30) user_id = models.PositiveIntegerField(primary_key=True)
[ "django.db.models.PositiveIntegerField" ]
[((165, 210), 'django.db.models.PositiveIntegerField', 'models.PositiveIntegerField', ([], {'primary_key': '(True)'}), '(primary_key=True)\n', (192, 210), False, 'from django.db import models\n')]
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # ================================================================= # ================================================================= from __future__ import print_function import paxes_cinder.k2aclient.k2asample as k2asample from paxes_cinder.k2aclient.v1 import k2uom f...
[ "paxes_cinder.k2aclient.v1.k2uom.LogicalPartition", "uuid.uuid4", "logging.exception", "paxes_cinder.k2aclient.v1.k2uom.VirtualSCSIServerAdapter", "paxes_cinder.k2aclient.v1.k2uom.LogicalPartitionMemoryConfiguration", "paxes_cinder.k2aclient.v1.k2uom.LogicalPartitionProfileDedicatedProcessorConfiguration"...
[((1644, 1700), 'paxes_cinder.k2aclient.v1.k2uom.LogicalPartitionProfileDedicatedProcessorConfiguration', 'LogicalPartitionProfileDedicatedProcessorConfiguration', ([], {}), '()\n', (1698, 1700), False, 'from paxes_cinder.k2aclient.v1.k2uom import VirtualSCSIMapping, VirtualSCSIServerAdapter, VirtualSCSIClientAdapter, ...
# Copyright 1999-2021 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
[ "json.loads", "tensorflow.keras.layers.Dense", "mars.learn.contrib.tensorflow.gen_tensorflow_dataset", "tensorflow.keras.optimizers.Adam", "tensorflow.keras.Sequential", "tensorflow.distribute.experimental.MultiWorkerMirroredStrategy" ]
[((848, 869), 'tensorflow.keras.Sequential', 'tf.keras.Sequential', ([], {}), '()\n', (867, 869), True, 'import tensorflow as tf\n'), ((1289, 1327), 'mars.learn.contrib.tensorflow.gen_tensorflow_dataset', 'gen_tensorflow_dataset', (['(data, labels)'], {}), '((data, labels))\n', (1311, 1327), False, 'from mars.learn.con...
from pyomo.environ import ConcreteModel from pyomo.environ import Set,Param,Var,Objective,Constraint from pyomo.environ import NonNegativeReals, Reals from pyomo.environ import SolverFactory, minimize from pyomo.environ import value from pyomo.core.base.param import SimpleParam import numpy as np from sys import exit ...
[ "pyomo.environ.SolverFactory", "pyomo.environ.Constraint", "pyomo.environ.Var", "pyomo.environ.value", "pyomo.environ.Objective", "pyomo.environ.Param", "pyomo.environ.ConcreteModel", "pyomo.environ.Set", "sys.exit" ]
[((662, 677), 'pyomo.environ.ConcreteModel', 'ConcreteModel', ([], {}), '()\n', (675, 677), False, 'from pyomo.environ import ConcreteModel\n'), ((705, 765), 'pyomo.environ.Set', 'Set', ([], {'dimen': '(1)', 'ordered': '(True)', 'initialize': "model_data[None]['T']"}), "(dimen=1, ordered=True, initialize=model_data[Non...
"""Shows USD/PLN pair based on Polish Central Bank (NBP) fixing exchange rate.""" from datetime import date import json import xml.etree.ElementTree as ET import requests class ExchangeRateToPLN: # pylint: disable=too-few-public-methods """Retrieve exchange rates from Polish NBP.""" __RATE_TO_PLN_XPATH = '...
[ "json.loads", "requests.get", "xml.etree.ElementTree.fromstring" ]
[((699, 722), 'xml.etree.ElementTree.fromstring', 'ET.fromstring', (['response'], {}), '(response)\n', (712, 722), True, 'import xml.etree.ElementTree as ET\n'), ((1260, 1280), 'json.loads', 'json.loads', (['response'], {}), '(response)\n', (1270, 1280), False, 'import json\n'), ((627, 662), 'requests.get', 'requests.g...
import aiohttp import json from botsdk.tool.Error import printTraceBack async def get(url, proxy = None, headers = None, byte = None): try: async with aiohttp.ClientSession(headers = headers if headers is not None else None) as session: async with session.get(url, proxy = proxy if proxy is not ...
[ "aiohttp.ClientSession", "botsdk.tool.Error.printTraceBack", "json.dumps" ]
[((164, 235), 'aiohttp.ClientSession', 'aiohttp.ClientSession', ([], {'headers': '(headers if headers is not None else None)'}), '(headers=headers if headers is not None else None)\n', (185, 235), False, 'import aiohttp\n'), ((521, 537), 'botsdk.tool.Error.printTraceBack', 'printTraceBack', ([], {}), '()\n', (535, 537)...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import print_function, division from astropy.units import Quantity from ...utils.testing import assert_quantity from ...spectrum import diffuse_gamma_ray_flux def test_diffuse_gamma_ray_flux(): energy = Quantity(1, 'TeV') actual =...
[ "astropy.units.Quantity" ]
[((289, 307), 'astropy.units.Quantity', 'Quantity', (['(1)', '"""TeV"""'], {}), "(1, 'TeV')\n", (297, 307), False, 'from astropy.units import Quantity\n'), ((428, 467), 'astropy.units.Quantity', 'Quantity', (['(1.0)', '"""m^-2 s^-1 sr^-1 TeV^-1"""'], {}), "(1.0, 'm^-2 s^-1 sr^-1 TeV^-1')\n", (436, 467), False, 'from as...
import json, time from vlib.automation.web.Driver import Driver class Browser(Driver): def __init__(self, browser, **kwargs): super().__init__(browser, **kwargs) def get(self, url, repeat=False, sleep=0): return super()._get(url, repeat, sleep) def scroll(self, until=-1, spe...
[ "time.sleep" ]
[((1595, 1612), 'time.sleep', 'time.sleep', (['sleep'], {}), '(sleep)\n', (1605, 1612), False, 'import json, time\n'), ((1813, 1830), 'time.sleep', 'time.sleep', (['sleep'], {}), '(sleep)\n', (1823, 1830), False, 'import json, time\n'), ((1034, 1049), 'time.sleep', 'time.sleep', (['(0.1)'], {}), '(0.1)\n', (1044, 1049)...
from banes import ddc_blocked_email from banes.records import AccountOperationRecord EMAIL_PATH = 'digital-debit-card-blocked-email.html' def test_is_matching(load_email): """it should be able to match a digital debit card blocked email""" html = load_email(EMAIL_PATH) assert ddc_blocked_email.is_matchi...
[ "banes.records.AccountOperationRecord", "banes.ddc_blocked_email.is_matching", "banes.ddc_blocked_email.scrape" ]
[((293, 328), 'banes.ddc_blocked_email.is_matching', 'ddc_blocked_email.is_matching', (['html'], {}), '(html)\n', (322, 328), False, 'from banes import ddc_blocked_email\n'), ((480, 510), 'banes.ddc_blocked_email.scrape', 'ddc_blocked_email.scrape', (['html'], {}), '(html)\n', (504, 510), False, 'from banes import ddc_...
from rules.contrib.views import PermissionRequiredMixin, permission_required, objectgetter from django.urls import reverse from django.contrib import messages from django.views.generic import ListView from django.db.models import ProtectedError from django.http import HttpResponseRedirect from django.views.generic.det...
[ "frequencia.vinculos.models.Vinculo.objects.get", "django.shortcuts.redirect", "django.contrib.messages.error", "django.urls.reverse", "django.shortcuts.get_object_or_404", "django.contrib.messages.info", "rules.contrib.views.objectgetter", "django.shortcuts.render" ]
[((1667, 1700), 'django.shortcuts.get_object_or_404', 'get_object_or_404', (['Maquina'], {'pk': 'pk'}), '(Maquina, pk=pk)\n', (1684, 1700), False, 'from django.shortcuts import render, get_object_or_404, redirect\n'), ((1912, 1941), 'django.shortcuts.redirect', 'redirect', (['"""registro:maquinas"""'], {}), "('registro...
"""MIT License. Copyright (c) 2020-2021 Faholan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, ...
[ "discord.ext.commands.command", "discord.Colour.red", "discord.Embed", "asyncio.sleep", "discord.Colour.blue", "discord.ext.commands.check", "lavalink.models.AudioTrack", "lavalink.utils.format_time", "discord.Colour.blurple", "discord.ext.commands.cooldown", "lavalink.Client", "discord.ext.ta...
[((1262, 1282), 're.compile', 're.compile', (['"""[0-9]+"""'], {}), "('[0-9]+')\n", (1272, 1282), False, 'import re\n'), ((1292, 1332), 're.compile', 're.compile', (['"""https?:\\\\/\\\\/(?:www\\\\.)?.+"""'], {}), "('https?:\\\\/\\\\/(?:www\\\\.)?.+')\n", (1302, 1332), False, 'import re\n'), ((3704, 3725), 'discord.ext...
import pandas as pd import os from xbbg import const from xbbg.io import files, logs from xbbg.core import utils, overrides PKG_PATH = files.abspath(__file__, 1) def bar_file(ticker: str, dt, typ='TRADE') -> str: """ Data file location for Bloomberg historical data Args: ticker: ticker name ...
[ "xbbg.io.files.abspath", "xbbg.io.logs.get_logger", "pandas.Timestamp", "pandas.date_range", "xbbg.io.files.create_folder", "xbbg.core.utils.to_str", "xbbg.core.utils.cur_time", "os.environ.get", "xbbg.const.market_timing", "xbbg.io.files.exists", "pandas.Timedelta", "xbbg.const.exch_info" ]
[((138, 164), 'xbbg.io.files.abspath', 'files.abspath', (['__file__', '(1)'], {}), '(__file__, 1)\n', (151, 164), False, 'from xbbg.io import files, logs\n'), ((5936, 5976), 'xbbg.io.logs.get_logger', 'logs.get_logger', (['save_intraday'], {}), '(save_intraday, **kwargs)\n', (5951, 5976), False, 'from xbbg.io import fi...
from __future__ import print_function import mxnet as mx import mxnext as X from mxnext.backbone.resnet_v2 import Builder bn_count = [10000] class TridentResNetV2Builder(Builder): def __init__(self): super(TridentResNetV2Builder, self).__init__() @staticmethod def bn_shared(data, name, normaliz...
[ "mxnext.normalizer_factory", "mxnext.conv", "mxnext.var", "mxnext.fixbn", "mxnext.to_fp16", "mxnet.symbol.Reshape", "mxnet.symbol.stack", "mxnext.relu", "mxnet.contrib.symbol.DeformableConvolution" ]
[((451, 473), 'mxnext.var', 'X.var', (["(name + '_gamma')"], {}), "(name + '_gamma')\n", (456, 473), True, 'import mxnext as X\n'), ((489, 510), 'mxnext.var', 'X.var', (["(name + '_beta')"], {}), "(name + '_beta')\n", (494, 510), True, 'import mxnext as X\n'), ((533, 561), 'mxnext.var', 'X.var', (["(name + '_moving_mea...
""" Cisco_IOS_XR_ip_rib_cfg This module contains a collection of YANG definitions for Cisco IOS\-XR ip\-rib package configuration. This module contains definitions for the following management objects\: rib\: RIB configuration. This YANG module augments the Cisco\-IOS\-XR\-infra\-rsi\-cfg module with configurat...
[ "collections.OrderedDict", "ydk.types.YLeaf" ]
[((1489, 1526), 'collections.OrderedDict', 'OrderedDict', (["[('af', ('af', Rib.Af))]"], {}), "([('af', ('af', Rib.Af))])\n", (1500, 1526), False, 'from collections import OrderedDict\n'), ((1562, 1577), 'collections.OrderedDict', 'OrderedDict', (['[]'], {}), '([])\n', (1573, 1577), False, 'from collections import Orde...
#!/usr/bin/env python3 # 10.05.21 # Assignment lab 07 # Master Class: Machine Learning (5MI2018) # Faculty of Economic Science # University of Neuchatel (Switzerland) # Lab 7, see ML21_Exercise_7.pdf for more information # https://github.com/RomainClaret/msc.ml.labs # Authors: # - <NAME> @RomainClaret # - <NAME> @N...
[ "pandas.DataFrame", "sklearn.preprocessing.FunctionTransformer", "sklearn.preprocessing.StandardScaler", "sklearn.model_selection.train_test_split", "sklearn.metrics.r2_score", "sklearn.neural_network.MLPRegressor", "pandas.read_stata", "sklearn.preprocessing.Normalizer", "pandas.concat" ]
[((872, 899), 'pandas.read_stata', 'pd.read_stata', (['"""pwt100.dta"""'], {}), "('pwt100.dta')\n", (885, 899), True, 'import pandas as pd\n'), ((1464, 1493), 'sklearn.preprocessing.FunctionTransformer', 'FunctionTransformer', (['np.log1p'], {}), '(np.log1p)\n', (1483, 1493), False, 'from sklearn.preprocessing import F...
import itertools import discord from bot.utils import wrap_in_code from discord.ext import commands class HelpCommand(commands.HelpCommand): def __init__(self, **options): options.setdefault("command_attrs", {}).setdefault( "help", "Shows help on how to use the bot and its commands" )...
[ "bot.utils.wrap_in_code", "discord.Embed" ]
[((547, 574), 'discord.Embed', 'discord.Embed', ([], {'title': '"""Help"""'}), "(title='Help')\n", (560, 574), False, 'import discord\n'), ((1247, 1270), 'bot.utils.wrap_in_code', 'wrap_in_code', (['signature'], {}), '(signature)\n', (1259, 1270), False, 'from bot.utils import wrap_in_code\n'), ((1339, 1359), 'bot.util...
import os import pyfastaq from clockwork import contam_remover, cortex, utils class Error (Exception): pass class ReferenceDir: def __init__(self, pipeline_references_root_dir=None, reference_id=None, directory=None): self.pipeline_references_root_dir = pipeline_references_root_dir self.reference...
[ "os.path.abspath", "os.makedirs", "clockwork.utils.rsync_and_md5", "clockwork.utils.syscall", "os.path.exists", "clockwork.contam_remover.ContamRemover._load_metadata_file", "pyfastaq.tasks.lengths_from_fai", "clockwork.cortex.make_run_calls_index_files", "os.path.join" ]
[((887, 922), 'os.path.join', 'os.path.join', (['self.directory', '"""ref"""'], {}), "(self.directory, 'ref')\n", (899, 922), False, 'import os\n'), ((1067, 1125), 'os.path.join', 'os.path.join', (['self.directory', '"""remove_contam_metadata.tsv"""'], {}), "(self.directory, 'remove_contam_metadata.tsv')\n", (1079, 112...
import functools import cv2 from typing import Callable, Iterable from dataclasses import dataclass import numpy as np from vuba import imio @dataclass class TrackbarMethod: """ Container for a trackbar method and it's associated variables. Parameters ---------- id : str Identification s...
[ "cv2.createTrackbar", "cv2.waitKey", "cv2.imshow", "vuba.imio.open_video", "functools.wraps", "cv2.destroyAllWindows", "cv2.namedWindow" ]
[((2003, 2030), 'cv2.namedWindow', 'cv2.namedWindow', (['self.title'], {}), '(self.title)\n', (2018, 2030), False, 'import cv2\n'), ((5980, 6001), 'functools.wraps', 'functools.wraps', (['func'], {}), '(func)\n', (5995, 6001), False, 'import functools\n'), ((6394, 6420), 'cv2.imshow', 'cv2.imshow', (['gui.title', 'img'...
import json from django.http import JsonResponse from django.views import View from django.views.decorators.csrf import csrf_exempt from api.models import Company, Vacancy @csrf_exempt def company_list(request): if request.method == 'GET': companies = Company.objects.all() companies_json = [c.to...
[ "api.models.Company.objects.all", "json.loads", "api.models.Company.objects.get", "django.http.JsonResponse", "api.models.Vacancy.objects.all", "api.models.Vacancy.objects.filter", "api.models.Vacancy.objects.get" ]
[((268, 289), 'api.models.Company.objects.all', 'Company.objects.all', ([], {}), '()\n', (287, 289), False, 'from api.models import Company, Vacancy\n'), ((363, 403), 'django.http.JsonResponse', 'JsonResponse', (['companies_json'], {'safe': '(False)'}), '(companies_json, safe=False)\n', (375, 403), False, 'from django....
from django.urls import path from news import views app_name = 'news' urlpatterns = [ path('add/', views.AddNews.as_view(), name='add'), path('<int:pk>/', views.NewsDetail.as_view(), name='detail'), path('', views.NewsList.as_view(), name='list'), ]
[ "news.views.AddNews.as_view", "news.views.NewsList.as_view", "news.views.NewsDetail.as_view" ]
[((105, 128), 'news.views.AddNews.as_view', 'views.AddNews.as_view', ([], {}), '()\n', (126, 128), False, 'from news import views\n'), ((165, 191), 'news.views.NewsDetail.as_view', 'views.NewsDetail.as_view', ([], {}), '()\n', (189, 191), False, 'from news import views\n'), ((222, 246), 'news.views.NewsList.as_view', '...
import numpy as np import cv2 import math from parameters import Parameters # from src.parameters import Parameters p = Parameters() def warp_image(img): image_size = (img.shape[1], img.shape[0]) warped_img = cv2.warpPerspective(img, p.perspective_transform, image_size, flags=cv2.INTER_LINEAR) retur...
[ "cv2.warpPerspective", "parameters.Parameters" ]
[((121, 133), 'parameters.Parameters', 'Parameters', ([], {}), '()\n', (131, 133), False, 'from parameters import Parameters\n'), ((224, 314), 'cv2.warpPerspective', 'cv2.warpPerspective', (['img', 'p.perspective_transform', 'image_size'], {'flags': 'cv2.INTER_LINEAR'}), '(img, p.perspective_transform, image_size, flag...
import numpy as np import logging from tprmp.demonstrations.quaternion import q_log_map, q_exp_map, q_parallel_transport from tprmp.demonstrations.euclidean import e_log_map, e_exp_map, e_parallel_transport from tprmp.demonstrations.probability import ManifoldGaussian class Manifold(object): """ Riemannian ma...
[ "numpy.average", "numpy.sum", "numpy.abs", "numpy.zeros", "numpy.ones", "numpy.array", "tprmp.demonstrations.probability.ManifoldGaussian", "numpy.linalg.inv", "numpy.eye", "numpy.cov", "numpy.sqrt", "logging.getLogger", "numpy.linalg.cholesky" ]
[((974, 1001), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (991, 1001), False, 'import logging\n'), ((6282, 6315), 'tprmp.demonstrations.probability.ManifoldGaussian', 'ManifoldGaussian', (['self', 'mu', 'sigma'], {}), '(self, mu, sigma)\n', (6298, 6315), False, 'from tprmp.demonstrati...
# -*- coding: utf-8 -*- # Copyright (c) 2021-2022 the DerivX authors # All rights reserved. # # The project sponsor and lead author is <NAME>. # E-mail: <EMAIL>, QQ: 277195007, WeChat: ustc_xrd # See the contributors file for names of other contributors. # # Commercial use of this code in source and binary forms is #...
[ "numpy.array" ]
[((1051, 1063), 'numpy.array', 'np.array', (['[]'], {}), '([])\n', (1059, 1063), True, 'import numpy as np\n'), ((2119, 2131), 'numpy.array', 'np.array', (['[]'], {}), '([])\n', (2127, 2131), True, 'import numpy as np\n'), ((2241, 2253), 'numpy.array', 'np.array', (['[]'], {}), '([])\n', (2249, 2253), True, 'import num...
import metronome_loop def five_sec_prin(): print("five_sec") one_sec = metronome_loop.metronome(1000, lambda: print("one_sec")) five_sec = metronome_loop.metronome(5000, five_sec_prin) ten_sec = metronome_loop.metronome(10000) while True: one_sec.loop() five_sec.loop() if ten_sec.loop(): ...
[ "metronome_loop.metronome" ]
[((147, 192), 'metronome_loop.metronome', 'metronome_loop.metronome', (['(5000)', 'five_sec_prin'], {}), '(5000, five_sec_prin)\n', (171, 192), False, 'import metronome_loop\n'), ((203, 234), 'metronome_loop.metronome', 'metronome_loop.metronome', (['(10000)'], {}), '(10000)\n', (227, 234), False, 'import metronome_loo...
from datetime import datetime from typing import Optional from pydantic import BaseSettings, HttpUrl from sqlmodel import Field, SQLModel # pyright: ignore[reportUnknownVariableType] class Post(SQLModel): id: int text: Optional[str] photos: list[HttpUrl] date: datetime class PostDB(SQLModel, table...
[ "sqlmodel.Field" ]
[((342, 379), 'sqlmodel.Field', 'Field', ([], {'default': 'None', 'primary_key': '(True)'}), '(default=None, primary_key=True)\n', (347, 379), False, 'from sqlmodel import Field, SQLModel\n')]
import amazonscraper import pytest _MAX_PRODUCT_NB = 10 def test_amazonscraper_get_products_with_keywords(): products = amazonscraper.search( keywords="Python", max_product_nb=_MAX_PRODUCT_NB) assert len(products) == _MAX_PRODUCT_NB def test_...
[ "amazonscraper.search", "pytest.raises" ]
[((127, 198), 'amazonscraper.search', 'amazonscraper.search', ([], {'keywords': '"""Python"""', 'max_product_nb': '_MAX_PRODUCT_NB'}), "(keywords='Python', max_product_nb=_MAX_PRODUCT_NB)\n", (147, 198), False, 'import amazonscraper\n'), ((473, 541), 'amazonscraper.search', 'amazonscraper.search', ([], {'search_url': '...
from app import db from app.api.user.model import User, UserSchema from app.api.group.model import Group, GroupSchema from marshmallow import Schema, fields class Invitation(db.Document): inviter = db.ReferenceField(User, required=True) invitee = db.ReferenceField(User, required=True, unique_with=['inviter',...
[ "app.db.ReferenceField", "marshmallow.fields.String", "marshmallow.fields.Nested" ]
[((205, 243), 'app.db.ReferenceField', 'db.ReferenceField', (['User'], {'required': '(True)'}), '(User, required=True)\n', (222, 243), False, 'from app import db\n'), ((258, 330), 'app.db.ReferenceField', 'db.ReferenceField', (['User'], {'required': '(True)', 'unique_with': "['inviter', 'group']"}), "(User, required=Tr...
""" File: ex_omni.py Description: Basic example of plotting OMNI data. """ import pyspedas import pytplot def ex_omni(): # Delete any existing pytplot variables pytplot.del_data() # Download OMNI data for 2015-12-31 trange = ['2015-12-31 00:00:00', '2015-12-31 23:59:59'] pyspedas.omni...
[ "pytplot.tplot_options", "pyspedas.omni.load", "pytplot.tplot", "pytplot.del_data" ]
[((183, 201), 'pytplot.del_data', 'pytplot.del_data', ([], {}), '()\n', (199, 201), False, 'import pytplot\n'), ((307, 357), 'pyspedas.omni.load', 'pyspedas.omni.load', ([], {'trange': 'trange', 'datatype': '"""1min"""'}), "(trange=trange, datatype='1min')\n", (325, 357), False, 'import pyspedas\n'), ((374, 434), 'pytp...
#!/usr/bin/env python3 __authors__ = '<NAME>' __license__ = '3-clause BSD' __maintainer__ = '<NAME>' __email__ = '<EMAIL>' # import numpy modules import numpy as np # plotting tools import matplotlib.pyplot as plt # writing to excel import xlsxwriter def write_to_excel(params): ''' Writes the monthly buying...
[ "matplotlib.pyplot.show", "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "xlsxwriter.Workbook", "numpy.zeros", "numpy.array", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.tight_layout", "numpy.repeat" ]
[((636, 675), 'xlsxwriter.Workbook', 'xlsxwriter.Workbook', (['"""rent_vs_buy.xlsx"""'], {}), "('rent_vs_buy.xlsx')\n", (655, 675), False, 'import xlsxwriter\n'), ((4309, 4398), 'matplotlib.pyplot.plot', 'plt.plot', (["params['mon']", "params['mon_worth_buy_sell']"], {'label': '"""Buying"""', 'linestyle': '"""--"""'}),...
""" A proxy object for field descriptors, usually living as ds.fields. """ import weakref import textwrap import inspect from yt.fields.derived_field import \ DerivedField def _fill_values(values): value = '<div class="rendered_html jp-RenderedHTMLCommon">' + \ '<table><thead><tr><th>Name</th><th>...
[ "IPython.display.display", "ipywidgets.Output", "ipywidgets.Tab", "weakref.proxy", "ipywidgets.Layout", "inspect.getclosurevars", "ipywidgets.HTML" ]
[((710, 727), 'weakref.proxy', 'weakref.proxy', (['ds'], {}), '(ds)\n', (723, 727), False, 'import weakref\n'), ((2066, 2099), 'ipywidgets.Tab', 'ipywidgets.Tab', ([], {'children': 'children'}), '(children=children)\n', (2080, 2099), False, 'import ipywidgets\n'), ((2182, 2195), 'IPython.display.display', 'display', ([...
from .read import read_stems from .read import read_info from .read import Info from .write import write_stems from .write import check_available_aac_encoders import re import os import subprocess as sp from os import path as op import soundfile as sf import argparse import pkg_resources import shutil import platform ...
[ "argparse.ArgumentParser", "os.makedirs", "subprocess.check_output", "os.path.exists", "shutil.which", "pkg_resources.resource_filename", "re.findall", "os.path.splitext", "soundfile.write", "platform.system", "os.path.split", "os.path.join" ]
[((1250, 1343), 'pkg_resources.resource_filename', 'pkg_resources.resource_filename', (['__name__', '"""data/The Easton Ellises - Falcon 69.stem.mp4"""'], {}), "(__name__,\n 'data/The Easton Ellises - Falcon 69.stem.mp4')\n", (1281, 1343), False, 'import pkg_resources\n'), ((1588, 1608), 'subprocess.check_output', '...
"""Define the models in the database.""" from flask_sqlalchemy import SQLAlchemy from sqlalchemy import MetaData from sqlalchemy.dialects.postgresql import JSONB from sqlalchemy_json import mutable_json_type from .exceptions import DoesNotExist metadata = MetaData() db = SQLAlchemy(metadata=metadata) class BaseMixi...
[ "sqlalchemy.MetaData", "sqlalchemy_json.mutable_json_type", "flask_sqlalchemy.SQLAlchemy" ]
[((258, 268), 'sqlalchemy.MetaData', 'MetaData', ([], {}), '()\n', (266, 268), False, 'from sqlalchemy import MetaData\n'), ((274, 303), 'flask_sqlalchemy.SQLAlchemy', 'SQLAlchemy', ([], {'metadata': 'metadata'}), '(metadata=metadata)\n', (284, 303), False, 'from flask_sqlalchemy import SQLAlchemy\n'), ((3565, 3610), '...
import unittest import mock from biokbase.narrative.contents.kbasewsmanager import KBaseWSManager from narrative_mock.mockclients import get_mock_client from biokbase.narrative.common.narrative_ref import NarrativeRef from tornado.web import HTTPError from biokbase.narrative.common.exceptions import WorkspaceError cla...
[ "biokbase.narrative.common.narrative_ref.NarrativeRef", "mock.patch" ]
[((369, 455), 'mock.patch', 'mock.patch', (['"""biokbase.narrative.common.narrative_ref.clients.get"""', 'get_mock_client'], {}), "('biokbase.narrative.common.narrative_ref.clients.get',\n get_mock_client)\n", (379, 455), False, 'import mock\n'), ((882, 968), 'mock.patch', 'mock.patch', (['"""biokbase.narrative.comm...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
[ "azure.core.polling.NoPolling", "azure.core.exceptions.HttpResponseError", "azure.mgmt.core.polling.arm_polling.ARMPolling", "azure.core.polling.LROPoller.from_continuation_token", "azure.core.polling.LROPoller", "azure.core.exceptions.map_error", "typing.TypeVar" ]
[((1143, 1155), 'typing.TypeVar', 'TypeVar', (['"""T"""'], {}), "('T')\n", (1150, 1155), False, 'from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union\n'), ((7943, 8031), 'azure.core.exceptions.map_error', 'map_error', ([], {'status_code': 'response.status_code', 'response': 'response', 'error_map':...
import base64 import os import re from functools import lru_cache from unittest.mock import Mock from urllib.parse import parse_qs, quote, urlencode, urlsplit import pytest from django.http import HttpRequest from django.http.cookie import SimpleCookie from django.urls import reverse, reverse_lazy from django.utils im...
[ "os.path.abspath", "os.path.join", "urllib.parse.urlencode", "sso.user.models.User.objects.count", "django.urls.reverse_lazy", "freezegun.freeze_time", "unittest.mock.Mock", "django.http.HttpRequest", "django.utils.timezone.now", "django.urls.reverse", "urllib.parse.quote", "sso.user.models.Us...
[((627, 638), 'functools.lru_cache', 'lru_cache', ([], {}), '()\n', (636, 638), False, 'from functools import lru_cache\n'), ((1156, 1189), 'django.urls.reverse_lazy', 'reverse_lazy', (['"""saml2_login_start"""'], {}), "('saml2_login_start')\n", (1168, 1189), False, 'from django.urls import reverse, reverse_lazy\n'), (...
"""Support for Plaato devices.""" import asyncio from datetime import timedelta import logging from aiohttp import web from pyplaato.models.airlock import PlaatoAirlock from pyplaato.plaato import ( ATTR_ABV, ATTR_BATCH_VOLUME, ATTR_BPM, ATTR_BUBBLES, ATTR_CO2_VOLUME, ATTR_DEVICE_ID, ATTR_...
[ "pyplaato.plaato.Plaato", "aiohttp.web.Response", "pyplaato.models.airlock.PlaatoAirlock.from_web_hook", "homeassistant.helpers.dispatcher.async_dispatcher_send", "voluptuous.Any", "homeassistant.helpers.aiohttp_client.async_get_clientsession", "voluptuous.Required", "datetime.timedelta", "logging.g...
[((1355, 1382), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1372, 1382), False, 'import logging\n'), ((6205, 6238), 'pyplaato.models.airlock.PlaatoAirlock.from_web_hook', 'PlaatoAirlock.from_web_hook', (['data'], {}), '(data)\n', (6232, 6238), False, 'from pyplaato.models.airlock impo...
from tkinter import Tk, Canvas class GUI(object): def __init__(self, world): self.ticks = 0 self.world = world self.width = world.width self.height = world.height self.root = Tk() self.root.title("Mars Explorer") window_x, window_y = self._compute_window_co...
[ "tkinter.Canvas", "tkinter.Tk" ]
[((222, 226), 'tkinter.Tk', 'Tk', ([], {}), '()\n', (224, 226), False, 'from tkinter import Tk, Canvas\n'), ((484, 539), 'tkinter.Canvas', 'Canvas', (['self.root'], {'width': 'self.width', 'height': 'self.height'}), '(self.root, width=self.width, height=self.height)\n', (490, 539), False, 'from tkinter import Tk, Canva...
import pandas as pd from ast import literal_eval def parse(path, columns=[]): data = pd.read_csv(path) for column in columns: data[column] = data[column].apply(literal_eval) return data
[ "pandas.read_csv" ]
[((91, 108), 'pandas.read_csv', 'pd.read_csv', (['path'], {}), '(path)\n', (102, 108), True, 'import pandas as pd\n')]
# Copyright (C) 2003-2007 <NAME> <<EMAIL>> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) ...
[ "weakref.ref" ]
[((2514, 2540), 'weakref.ref', 'weakref.ref', (['obj', 'callback'], {}), '(obj, callback)\n', (2525, 2540), False, 'import weakref\n')]
# -*- coding: future_fstrings -*- # # Copyright 2019 <NAME> <<EMAIL>> # # This file is part of Salus # (see https://github.com/SymbioticLab/Salus). # # 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 Lice...
[ "benchmarks.driver.utils.UsageError", "benchmarks.exps.maybe_forced_preset", "benchmarks.driver.workload.WTL.from_name", "time.sleep", "absl.flags.DEFINE_string", "benchmarks.driver.workload.WTL.known_workloads.items", "absl.flags.DEFINE_integer", "benchmarks.driver.workload.RunConfig", "benchmarks....
[((1500, 1527), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1517, 1527), False, 'import logging\n'), ((1529, 1625), 'absl.flags.DEFINE_integer', 'flags.DEFINE_integer', (['"""concurrent_jobs"""', '(2)', '"""Maximum concurrent running jobs"""'], {'lower_bound': '(1)'}), "('concurrent_j...
import unittest import pandas as pd import numpy as np from scipy.cluster.hierarchy import ward from skbio import TreeNode, DistanceMatrix from gneiss.plot._radial import radialplot from gneiss.plot._dendrogram import UnrootedDendrogram import numpy.testing as npt class TestRadial(unittest.TestCase): def setUp(s...
[ "unittest.main", "pandas.DataFrame", "gneiss.plot._radial.radialplot", "numpy.random.seed", "numpy.abs", "unittest.skip", "numpy.array", "numpy.random.rand", "gneiss.plot._dendrogram.UnrootedDendrogram.from_tree" ]
[((763, 809), 'unittest.skip', 'unittest.skip', (['"""Visualizations are deprecated"""'], {}), "('Visualizations are deprecated')\n", (776, 809), False, 'import unittest\n'), ((4320, 4335), 'unittest.main', 'unittest.main', ([], {}), '()\n', (4333, 4335), False, 'import unittest\n'), ((349, 684), 'pandas.DataFrame', 'p...
# -*- coding: utf-8 -*-from fastapi import APIRouter from fastapi import APIRouter from integrations.sageoneclient import SageOneAPIClient from investec.client import OpenAPIClient from utils import get_config import dateutil.parser import datetime import re router = APIRouter() @router.get("/companies") def get_sage...
[ "re.compile", "utils.get_config", "fastapi.APIRouter" ]
[((269, 280), 'fastapi.APIRouter', 'APIRouter', ([], {}), '()\n', (278, 280), False, 'from fastapi import APIRouter\n'), ((411, 423), 'utils.get_config', 'get_config', ([], {}), '()\n', (421, 423), False, 'from utils import get_config\n'), ((854, 866), 'utils.get_config', 'get_config', ([], {}), '()\n', (864, 866), Fal...
import pytest import handler class TestGetFiles: def test_get_files(self): path = 'tests/data/input/pre' result = handler.get_files(path) assert len(result) == 4 def test_no_files(self): with pytest.raises(AssertionError): handler.get_files('tests/data/empty_test...
[ "pytest.raises", "handler.get_files" ]
[((138, 161), 'handler.get_files', 'handler.get_files', (['path'], {}), '(path)\n', (155, 161), False, 'import handler\n'), ((237, 266), 'pytest.raises', 'pytest.raises', (['AssertionError'], {}), '(AssertionError)\n', (250, 266), False, 'import pytest\n'), ((280, 326), 'handler.get_files', 'handler.get_files', (['"""t...
# Haktoberfest @ 10/13/2018 :D! import traceback, sys def get_trace_and_log(error): """(str: error) -> str Returns a distinct traceback with the offending line and logs the error with the time and date.""" logf = open("errors.log", "a") trace = traceback.extract_tb(sys.exc_info()[-1], limit=1)[-1][1] ...
[ "sys.exc_info" ]
[((284, 298), 'sys.exc_info', 'sys.exc_info', ([], {}), '()\n', (296, 298), False, 'import traceback, sys\n')]
# # ============LICENSE_START========================================== # org.onap.vvp/engagementmgr # =================================================================== # Copyright © 2017 AT&T Intellectual Property. All rights reserved. # =================================================================== # # Unless ...
[ "jenkins.Jenkins" ]
[((2419, 2492), 'jenkins.Jenkins', 'jenkins.Jenkins', (['self.url'], {'username': 'self.username', 'password': 'self.password'}), '(self.url, username=self.username, password=self.password)\n', (2434, 2492), False, 'import jenkins\n')]
from praw import Reddit import os from dotenv import load_dotenv load_dotenv() secret = os.getenv("REDDIT_SECRET") client = os.getenv("REDDIT_CLIENT") class RedditClient: def __init__(self): self.api = Reddit( client_id=client, client_secret=secret, user_agent="*", ...
[ "dotenv.load_dotenv", "praw.Reddit", "os.getenv" ]
[((66, 79), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (77, 79), False, 'from dotenv import load_dotenv\n'), ((90, 116), 'os.getenv', 'os.getenv', (['"""REDDIT_SECRET"""'], {}), "('REDDIT_SECRET')\n", (99, 116), False, 'import os\n'), ((126, 152), 'os.getenv', 'os.getenv', (['"""REDDIT_CLIENT"""'], {}), "('...
import logging from urllib.parse import urlparse import socket import json import urllib3 import requests from parsedmarc import __version__ from parsedmarc.utils import human_timestamp_to_timestamp urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) logger = logging.getLogger("parsedmarc") class ...
[ "requests.Session", "parsedmarc.utils.human_timestamp_to_timestamp", "logging.getLogger", "json.dumps", "socket.getfqdn", "urllib3.disable_warnings", "urllib.parse.urlparse" ]
[((202, 269), 'urllib3.disable_warnings', 'urllib3.disable_warnings', (['urllib3.exceptions.InsecureRequestWarning'], {}), '(urllib3.exceptions.InsecureRequestWarning)\n', (226, 269), False, 'import urllib3\n'), ((280, 311), 'logging.getLogger', 'logging.getLogger', (['"""parsedmarc"""'], {}), "('parsedmarc')\n", (297,...
#!/usr/bin/env python # -*- coding: utf-8 -*- # code for python2 import rospy import serial import time import signal import sys from std_msgs.msg import Int16, Bool from kondo_b3mservo_rosdriver.msg import Multi_servo_command from kondo_b3mservo_rosdriver.msg import Multi_servo_info import drive_function as Drive # g...
[ "rospy.Subscriber", "drive_function.get_servo_Current", "drive_function.reset_encoder_total_count", "serial.Serial", "rospy.logwarn", "drive_function.enFreeServo", "rospy.init_node", "drive_function.control_servo_by_position_without_time", "rospy.logfatal", "drive_function.control_servo_by_Torque"...
[((914, 970), 'serial.Serial', 'serial.Serial', (['"""/dev/Kondo_USB-RS485_converter"""', '(1500000)'], {}), "('/dev/Kondo_USB-RS485_converter', 1500000)\n", (927, 970), False, 'import serial\n'), ((971, 986), 'time.sleep', 'time.sleep', (['(0.1)'], {}), '(0.1)\n', (981, 986), False, 'import time\n'), ((9528, 9586), 's...
from bin.service import ShoutOutStorage, Logger, NotificationStorage, UserStorage, AchievementStorage class ShoutOut: def __init__(self): self.so_storage = ShoutOutStorage.ShoutOutStorage() self.notification_storage = NotificationStorage.NotificationStorage() self.logger = Logger.Logger()...
[ "bin.service.NotificationStorage.NotificationStorage", "bin.service.AchievementStorage.AchievementStorage", "bin.service.Logger.Logger", "bin.service.ShoutOutStorage.ShoutOutStorage", "bin.service.UserStorage.UserStorage" ]
[((171, 204), 'bin.service.ShoutOutStorage.ShoutOutStorage', 'ShoutOutStorage.ShoutOutStorage', ([], {}), '()\n', (202, 204), False, 'from bin.service import ShoutOutStorage, Logger, NotificationStorage, UserStorage, AchievementStorage\n'), ((241, 282), 'bin.service.NotificationStorage.NotificationStorage', 'Notificati...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2016-2022 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Test CLI.""" import uuid from click.testing import CliRunner from invenio_db imp...
[ "invenio_search.current_search_client.search", "uuid.uuid4", "invenio_indexer.api.RecordIndexer", "invenio_search.current_search.delete", "invenio_search.current_search_client.indices.exists", "invenio_records.Record.get_record", "invenio_db.db.session.commit", "invenio_pidstore.models.PersistentIdent...
[((1038, 1050), 'uuid.uuid4', 'uuid.uuid4', ([], {}), '()\n', (1048, 1050), False, 'import uuid\n'), ((1065, 1077), 'uuid.uuid4', 'uuid.uuid4', ([], {}), '()\n', (1075, 1077), False, 'import uuid\n'), ((1230, 1358), 'invenio_pidstore.models.PersistentIdentifier.create', 'PersistentIdentifier.create', ([], {'pid_type': ...
import numpy as np import h5py import pickle from glob import glob import os from tqdm import tqdm import tensorflow as tf #General def get_filename(path, keyword, extension=None): if extension is None: return [full_path.split('\\')[-1] for full_path in glob(path+'*') if keyword in full_path] return [...
[ "h5py.File", "numpy.sum", "tensorflow.keras.models.load_model", "os.makedirs", "os.path.exists", "numpy.hstack", "numpy.histogram", "numpy.diff", "numpy.where", "numpy.array", "glob.glob", "numpy.sqrt" ]
[((3107, 3131), 'h5py.File', 'h5py.File', (['filename', '"""a"""'], {}), "(filename, 'a')\n", (3116, 3131), False, 'import h5py\n'), ((6878, 6899), 'numpy.sum', 'np.sum', (['binary_output'], {}), '(binary_output)\n', (6884, 6899), True, 'import numpy as np\n'), ((7066, 7079), 'numpy.diff', 'np.diff', (['bins'], {}), '(...
from django.contrib import admin # Register your models here. from django.contrib import admin from django.contrib.admin import helpers from django.contrib.admin.checks import ModelAdminChecks from .models import Comment admin.site.site_header = "Blog博客-Joker" admin.site.index_title = "Blog博客-Joker" class CommentA...
[ "django.contrib.admin.site.register" ]
[((573, 615), 'django.contrib.admin.site.register', 'admin.site.register', (['Comment', 'CommentAdmin'], {}), '(Comment, CommentAdmin)\n', (592, 615), False, 'from django.contrib import admin\n')]
# -*- coding: utf-8 -*- """ Created on Sat Feb 16 21:14:20 2019 @author: <NAME> """ from flask import Flask, render_template, make_response, request, redirect, url_for, flash, send_file, session, escape import sqlite3 as sql import csv import time application = Flask(__name__) application.secret_key = 'C...
[ "flask.flash", "flask.session.pop", "csv.writer", "flask.Flask", "flask.url_for", "sqlite3.connect", "flask.render_template", "flask.send_file" ]
[((276, 291), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (281, 291), False, 'from flask import Flask, render_template, make_response, request, redirect, url_for, flash, send_file, session, escape\n'), ((737, 760), 'sqlite3.connect', 'sql.connect', (['"""FBLA2.db"""'], {}), "('FBLA2.db')\n", (748, 760),...
__author__ = 'surya' from Mysql_queries import MySqlConnection def getAlldata_fromDatabase(Query,cnx,query_val='Null',append=False): if not cnx.is_connected(): cnx = MySqlConnection.connectSql() dic={} cursor3 = cnx.cursor() if query_val!="Null": cursor3.execute(Query,query_val) e...
[ "Mysql_queries.MySqlConnection.connectSql" ]
[((181, 209), 'Mysql_queries.MySqlConnection.connectSql', 'MySqlConnection.connectSql', ([], {}), '()\n', (207, 209), False, 'from Mysql_queries import MySqlConnection\n'), ((748, 776), 'Mysql_queries.MySqlConnection.connectSql', 'MySqlConnection.connectSql', ([], {}), '()\n', (774, 776), False, 'from Mysql_queries imp...
"""Synchronous ProtocolEngine client module.""" from typing import cast, Optional from opentrons.types import MountType from .. import commands from ..state import StateView from ..types import DeckSlotLocation, PipetteName, WellLocation from .transports import AbstractSyncTransport class SyncClient: """Synchro...
[ "typing.cast" ]
[((1226, 1266), 'typing.cast', 'cast', (['commands.LoadLabwareResult', 'result'], {}), '(commands.LoadLabwareResult, result)\n', (1230, 1266), False, 'from typing import cast, Optional\n'), ((1735, 1775), 'typing.cast', 'cast', (['commands.LoadPipetteResult', 'result'], {}), '(commands.LoadPipetteResult, result)\n', (1...
# import json import pandas as pd from tqdm import tqdm # from pygments import highlight # from pygments.lexers import JsonLexer # from pygments.formatters import TerminalFormatter from google_play_scraper import Sort, reviews, app app_packages = ['com.saveo.saveomedical','com.ionicframework.mobilemfp973648','com.me...
[ "pandas.DataFrame", "tqdm.tqdm", "google_play_scraper.reviews" ]
[((452, 470), 'tqdm.tqdm', 'tqdm', (['app_packages'], {}), '(app_packages)\n', (456, 470), False, 'from tqdm import tqdm\n'), ((1578, 1603), 'pandas.DataFrame', 'pd.DataFrame', (['app_reviews'], {}), '(app_reviews)\n', (1590, 1603), True, 'import pandas as pd\n'), ((590, 683), 'google_play_scraper.reviews', 'reviews', ...
def write_out(outpath, output): print('Writing out file: %s' % outpath) with open(outpath, 'w') as OUT: OUT.write('\n'.join(output)) def sort_dictionary_by_value(d): ''' returns two sorted lists ''' tkeys = list(d.keys()) tvalues = [d[n] for n in tkeys] # *sorted would be i...
[ "os.path.split" ]
[((7593, 7621), 'os.path.split', 'os.path.split', (['NFRgfflist[0]'], {}), '(NFRgfflist[0])\n', (7606, 7621), False, 'import os\n')]
""" """ import pyrewrite # We'd like to be just be able to quote these rules inline... ala # Mython. #------------------------------------------------------------------------ # Constant Folding #------------------------------------------------------------------------ const = """ cfold: Add(Const(n), Const(m)) ->...
[ "pyrewrite.module" ]
[((725, 748), 'pyrewrite.module', 'pyrewrite.module', (['const'], {}), '(const)\n', (741, 748), False, 'import pyrewrite\n'), ((1196, 1218), 'pyrewrite.module', 'pyrewrite.module', (['cond'], {}), '(cond)\n', (1212, 1218), False, 'import pyrewrite\n')]
""" AppResources :Authors: <NAME> """ import os from AppVars import AppVars from core.elastix import ParameterList class AppResources(object): """ AppResources is a static class that can be used to find common resources easily. Just provide a name to the imageNamed() method and it will return the correct path....
[ "AppVars.AppVars.transformationsPath", "AppVars.AppVars.imagePath", "core.elastix.ParameterList" ]
[((682, 701), 'AppVars.AppVars.imagePath', 'AppVars.imagePath', ([], {}), '()\n', (699, 701), False, 'from AppVars import AppVars\n'), ((897, 926), 'AppVars.AppVars.transformationsPath', 'AppVars.transformationsPath', ([], {}), '()\n', (924, 926), False, 'from AppVars import AppVars\n'), ((1049, 1064), 'core.elastix.Pa...
import tweepy import pandas as pd import csv import sys import re import string import preprocessor as p DELHI_WOE_ID = 20070458 consumer_key = "" consumer_secret = "" access_key = "" access_secret = "" fileName = sys.argv[1] fn1 = open(fileName, 'r') auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth....
[ "csv.writer", "tweepy.OAuthHandler", "tweepy.API" ]
[((264, 314), 'tweepy.OAuthHandler', 'tweepy.OAuthHandler', (['consumer_key', 'consumer_secret'], {}), '(consumer_key, consumer_secret)\n', (283, 314), False, 'import tweepy\n'), ((370, 411), 'tweepy.API', 'tweepy.API', (['auth'], {'wait_on_rate_limit': '(True)'}), '(auth, wait_on_rate_limit=True)\n', (380, 411), False...
import sys import os from rosie.testing.TestAgent import TestAgent # Lookup $ROSIE_HOME environment variable [REQUIRED] rosie_home = "" if "ROSIE_HOME" in os.environ: rosie_home = os.environ["ROSIE_HOME"] else: print("ERROR: Requires ROSIE_HOME environment variable set") sys.exit(0) # Argument 1: The tes...
[ "sys.exit", "rosie.testing.TestAgent.TestAgent" ]
[((660, 872), 'rosie.testing.TestAgent.TestAgent', 'TestAgent', ([], {'config_filename': "(rosie_home + '/test-agents/task-tests/' + test_name + '/agent/rosie.' +\n test_name + '.config')", 'write_to_stdout': 'print_output', 'source_output': "('summary' if print_output else 'none')"}), "(config_filename=rosie_home +...
import os from collections import Callable from unittest import TestCase from config import ROOT_DIR from corai_util.tools.src.function_dict import parameter_product, replace_function_names_to_functions, \ retrieve_parameters_by_index_from_json from corai_util.tools.src.function_writer import list_of_dicts_to_json...
[ "corai_util.tools.src.function_dict.replace_function_names_to_functions", "os.path.join", "corai_util.tools.src.function_dict.parameter_product", "corai_util.tools.src.function_dict.retrieve_parameters_by_index_from_json" ]
[((329, 407), 'os.path.join', 'os.path.join', (['ROOT_DIR', '"""corai_util"""', '"""tools"""', '"""tests"""', '"""generated_test_files"""'], {}), "(ROOT_DIR, 'corai_util', 'tools', 'tests', 'generated_test_files')\n", (341, 407), False, 'import os\n'), ((1088, 1117), 'corai_util.tools.src.function_dict.parameter_produc...
from django.contrib.auth.models import AbstractUser from django.db.models import CharField, BooleanField, IntegerField from django.urls import reverse from django.utils.translation import ugettext_lazy as _ class User(AbstractUser): name = CharField(_("Name of User"), blank=True, max_length=255) karma = Inte...
[ "django.urls.reverse", "django.db.models.IntegerField", "django.utils.translation.ugettext_lazy", "django.db.models.BooleanField" ]
[((316, 339), 'django.db.models.IntegerField', 'IntegerField', ([], {'default': '(0)'}), '(default=0)\n', (328, 339), False, 'from django.db.models import CharField, BooleanField, IntegerField\n'), ((369, 396), 'django.db.models.BooleanField', 'BooleanField', ([], {'default': '(False)'}), '(default=False)\n', (381, 396...
from flask import render_template, request, redirect, url_for from .. import app from ..handler.session import auth_in, auth_out, login_required, is_auth_in from ..model import Operator @app.route("/auth/in", methods=['POST', 'GET']) def page_auth_in(): if request.method == 'GET': return render_template(...
[ "flask.render_template", "flask.url_for", "flask.redirect" ]
[((763, 776), 'flask.redirect', 'redirect', (['"""/"""'], {}), "('/')\n", (771, 776), False, 'from flask import render_template, request, redirect, url_for\n'), ((555, 606), 'flask.render_template', 'render_template', (['"""auth_in.html"""'], {'msg': '"""邮箱不存在,请重新输入!"""'}), "('auth_in.html', msg='邮箱不存在,请重新输入!')\n", (57...
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2019-08-01 01:39 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('commercialoperator', '0001_initial'), ] operations = [ migrations.AddField(...
[ "django.db.models.DecimalField" ]
[((417, 524), 'django.db.models.DecimalField', 'models.DecimalField', ([], {'decimal_places': '(2)', 'default': '(100.0)', 'max_digits': '(6)', 'verbose_name': '"""Licence Fee (1 Year)"""'}), "(decimal_places=2, default=100.0, max_digits=6,\n verbose_name='Licence Fee (1 Year)')\n", (436, 524), False, 'from django.d...
from . import BaseCommand import dart.common from termcolor import colored from datetime import datetime import urllib.parse import traceback class ProcessesCommand(BaseCommand): def run(self, **kwargs): try: print(colored("{:<80}".format("Processes"), "grey", "on_white", attrs=["bold"])) ...
[ "termcolor.colored", "datetime.datetime.strptime", "datetime.datetime.now", "traceback.format_exc" ]
[((3335, 3349), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (3347, 3349), False, 'from datetime import datetime\n'), ((3121, 3143), 'traceback.format_exc', 'traceback.format_exc', ([], {}), '()\n', (3141, 3143), False, 'import traceback\n'), ((19491, 19513), 'traceback.format_exc', 'traceback.format_exc'...
""" HOW TO TEST $ export PYTHON_VERSION=3.9 $ docker-compose up --biuld ...testing # press ctrl + C to stop docker containers. $ docker-compose down """ import unittest from typing import List, Tuple, Optional import sqlalchemy from sqlalchemy.engine.base import Engine # import docker from pathlib import Path im...
[ "unittest.main", "twinsqla.autopk", "twinsqla.TWinSQLA", "twinsqla.select", "pathlib.Path", "sqlalchemy.create_engine", "twinsqla.table" ]
[((901, 924), 'twinsqla.table', 'twinsqla.table', (['"""staff"""'], {}), "('staff')\n", (915, 924), False, 'import twinsqla\n'), ((966, 1004), 'twinsqla.table', 'twinsqla.table', (['"""staff"""'], {'pk': '"""staff_id"""'}), "('staff', pk='staff_id')\n", (980, 1004), False, 'import twinsqla\n'), ((30974, 30989), 'unitte...
#!/usr/bin/env python import os from setuptools import setup # work around the combination of http://bugs.python.org/issue8876 and # https://www.virtualbox.org/ticket/818 since it doesn't really have ill # effects and there will be a lot of virtualbox users. del os.link setup( name='libweasyl', description=...
[ "setuptools.setup" ]
[((275, 874), 'setuptools.setup', 'setup', ([], {'name': '"""libweasyl"""', 'description': '"""common code across weasyl projects"""', 'author': '"""We<NAME>"""', 'packages': "['libweasyl', 'libweasyl.models', 'libweasyl.test', 'libweasyl.models.test']", 'package_data': "{'libweasyl': ['alembic/*.py', 'alembic/script.p...
# Authors: <NAME> <<EMAIL>> # simplified BSD-3 license import os.path as op import warnings import numpy as np from numpy.testing import assert_array_almost_equal, assert_array_equal from nose.tools import assert_true, assert_raises, assert_equal from mne import find_events, pick_types, concatenate_raws f...
[ "mne.io.read_raw_egi", "warnings.simplefilter", "mne.utils._TempDir", "mne.io.Raw", "mne.pick_types", "os.path.realpath", "nose.tools.assert_true", "nose.tools.assert_equal", "mne.find_events", "numpy.array", "warnings.catch_warnings", "nose.tools.assert_raises", "numpy.testing.assert_array_...
[((429, 460), 'warnings.simplefilter', 'warnings.simplefilter', (['"""always"""'], {}), "('always')\n", (450, 460), False, 'import warnings\n'), ((577, 610), 'os.path.join', 'op.join', (['base_dir', '"""test_egi.raw"""'], {}), "(base_dir, 'test_egi.raw')\n", (584, 610), True, 'import os.path as op\n'), ((714, 724), 'mn...
############################################################################## # Copyright 2018 Rigetti Computing # # 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://ww...
[ "asyncio.get_event_loop", "rpcq._base.from_msgpack", "rpcq._base.to_msgpack", "rpcq._spec.RPCSpec", "zmq.auth.asyncio.AsyncioAuthenticator", "asyncio.wait", "datetime.datetime.now", "logging.getLogger" ]
[((1227, 1254), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1244, 1254), False, 'import logging\n'), ((11914, 11943), 'zmq.auth.asyncio.AsyncioAuthenticator', 'AsyncioAuthenticator', (['context'], {}), '(context)\n', (11934, 11943), False, 'from zmq.auth.asyncio import AsyncioAuthenti...
import numpy as np import matplotlib.pyplot as plt from repgen import Report from tabulate import tabulate from datetime import date import markdown import weasyprint """! --- title: Example report date: {{ date }} --- # Example report This is example report, showing how to include text, tables, figures and inline ...
[ "repgen.Report", "matplotlib.pyplot.plot", "datetime.date.today", "markdown.markdown", "matplotlib.pyplot.figure", "numpy.sin", "tabulate.tabulate", "weasyprint.HTML", "numpy.linspace", "numpy.random.rand" ]
[((523, 531), 'repgen.Report', 'Report', ([], {}), '()\n', (529, 531), False, 'from repgen import Report\n'), ((874, 894), 'numpy.random.rand', 'np.random.rand', (['(5)', '(5)'], {}), '(5, 5)\n', (888, 894), True, 'import numpy as np\n'), ((903, 934), 'tabulate.tabulate', 'tabulate', (['rand'], {'tablefmt': '"""html"""...
from .base import SamplingMethod import numpy as np class EntropyAL(SamplingMethod): """https://www.aclweb.org/anthology/C08-1143.pdf""" def __init__(self, threshold): super().__init__() self.threshold = threshold self.entropy = None def update_threshold(self, threshold): ...
[ "numpy.sum", "numpy.log", "numpy.nan_to_num", "numpy.argsort", "numpy.where", "numpy.array" ]
[((581, 602), 'numpy.array', 'np.array', (['y_pred_prob'], {}), '(y_pred_prob)\n', (589, 602), True, 'import numpy as np\n'), ((866, 895), 'numpy.nan_to_num', 'np.nan_to_num', (['entropy', '(1e-06)'], {}), '(entropy, 1e-06)\n', (879, 895), True, 'import numpy as np\n'), ((814, 833), 'numpy.log', 'np.log', (['y_pred_pro...
"""Movies package. Top-level package of movies library. This package contains IoC container of movies module component providers - ``MoviesModule``. It is recommended to use movies library functionality by fetching required instances from ``MoviesModule`` providers. ``MoviesModule.finder`` is a factory that provides ...
[ "dependency_injector.providers.AbstractFactory", "dependency_injector.providers.Factory" ]
[((840, 878), 'dependency_injector.providers.Factory', 'providers.Factory', (['movies.models.Movie'], {}), '(movies.models.Movie)\n', (857, 878), True, 'import dependency_injector.providers as providers\n'), ((893, 979), 'dependency_injector.providers.AbstractFactory', 'providers.AbstractFactory', (['movies.finders.Mov...
import pytest import numpy as np from gsMk import PCE def test_order1(): pce = PCE(nvar=3, nord=2) orders = [[0, 0, 0], [1, 0, 0], [0, 1, 0], [0, 0, 1], [2, 0, 0], [0, 2, 0], [0, 0, 2], [1, 1, 0], [...
[ "gsMk.PCE", "math.factorial" ]
[((85, 104), 'gsMk.PCE', 'PCE', ([], {'nvar': '(3)', 'nord': '(2)'}), '(nvar=3, nord=2)\n', (88, 104), False, 'from gsMk import PCE\n'), ((509, 537), 'gsMk.PCE', 'PCE', ([], {'nvar': '(3)', 'nord': '(2)', 'jtmax': '(1)'}), '(nvar=3, nord=2, jtmax=1)\n', (512, 537), False, 'from gsMk import PCE\n'), ((867, 897), 'gsMk.P...
from typing import DefaultDict, Union from anchore_engine.analyzers.utils import merge_nested_dict from anchore_engine.subsys import logger def save_entry_to_findings( findings: Union[dict, DefaultDict], entry: dict, pkg_type: str, pkg_key: str ) -> None: """ Intended to be used to save entries to the an...
[ "anchore_engine.analyzers.utils.merge_nested_dict", "anchore_engine.subsys.logger.warn" ]
[((1222, 1352), 'anchore_engine.subsys.logger.warn', 'logger.warn', (['"""%s package already present under %s in the analysis report and will not be overwritten"""', 'pkg_key', 'pkg_type'], {}), "(\n '%s package already present under %s in the analysis report and will not be overwritten'\n , pkg_key, pkg_type)\n"...
from setuptools import setup try: import pypandoc long_description = pypandoc.convert('README.md', 'rst') except(IOError, ImportError): long_description = open('README.md').read() setup( name='shachange', version='1.2', description='Change an image sha signature', long_description=long_des...
[ "pypandoc.convert", "setuptools.setup" ]
[((194, 1012), 'setuptools.setup', 'setup', ([], {'name': '"""shachange"""', 'version': '"""1.2"""', 'description': '"""Change an image sha signature"""', 'long_description': 'long_description', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'url': '"""https://github.com/gabfl/shachange"""', 'license': '"""...
import math import time from FSMConstants import * async def compute_next_state(currentState, ballX, ballY, rod, stop, ball_hidden, kick_timer, currentDisplacement, currentAngle): if stop: return "Stop" elif abs(ballX - rod["rodX"]) > IDLE_RANGE or ballX == -1: return "Idle" elif (currentSt...
[ "math.radians", "time.perf_counter" ]
[((3935, 3982), 'math.radians', 'math.radians', (['((goalY - ballY) / (goalX - ballX))'], {}), '((goalY - ballY) / (goalX - ballX))\n', (3947, 3982), False, 'import math\n'), ((4200, 4247), 'math.radians', 'math.radians', (['((goalY - ballY) / (goalX - ballX))'], {}), '((goalY - ballY) / (goalX - ballX))\n', (4212, 424...
# Copyright 2018 <NAME> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope th...
[ "numpy.random.seed", "numpy.sum", "numpy.abs", "numpy.random.randint", "matplotlib.pylab.close", "april.generation.NoneAnomaly", "numpy.round", "matplotlib.pylab.show", "matplotlib.pylab.figure", "numpy.max", "numpy.random.choice", "networkx.drawing.nx_agraph.graphviz_layout", "itertools.pro...
[((5858, 5870), 'networkx.DiGraph', 'nx.DiGraph', ([], {}), '()\n', (5868, 5870), True, 'import networkx as nx\n'), ((9387, 9400), 'april.generation.NoneAnomaly', 'NoneAnomaly', ([], {}), '()\n', (9398, 9400), False, 'from april.generation import NoneAnomaly\n'), ((10586, 10607), 'april.processmining.log.EventLog', 'Ev...
from pypy.interpreter.error import OperationError from pypy.interpreter.gateway import app2interp from pypy.conftest import gettestobjspace class TestW_StdObjSpace: def test_wrap_wrap(self): raises(TypeError, self.space.wrap, self.space.wrap(0)) def...
[ "pypy.objspace.std.stdtypedef.multimethods_defined_on", "pypy.rpython.lltypesystem.rffi.cast", "pypy.conftest.gettestobjspace" ]
[((1027, 1064), 'pypy.objspace.std.stdtypedef.multimethods_defined_on', 'multimethods_defined_on', (['W_ListObject'], {}), '(W_ListObject)\n', (1050, 1064), False, 'from pypy.objspace.std.stdtypedef import multimethods_defined_on\n'), ((2789, 2821), 'pypy.conftest.gettestobjspace', 'gettestobjspace', ([], {'withstrbuf'...
# # Copyright 2016, 2020 <NAME> # 2018, 2020 <NAME> # 2018, 2020 <NAME> # 2015-2016 <NAME> # # ### MIT license # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software ...
[ "pickle.loads", "os.path.realpath", "NuMPI.MPI.COMM_WORLD.Get_size", "SurfaceTopography.UniformLineScan", "pytest.raises", "numpy.sin", "numpy.array", "numpy.arange", "numpy.linspace", "numpy.random.normal", "numpy.testing.assert_allclose", "pytest.deprecated_call", "pickle.dumps" ]
[((1636, 1661), 'numpy.array', 'np.array', (['(0, 1, 2, 3, 4)'], {}), '((0, 1, 2, 3, 4))\n', (1644, 1661), True, 'import numpy as np\n'), ((1684, 1705), 'SurfaceTopography.UniformLineScan', 'UniformLineScan', (['h', '(5)'], {}), '(h, 5)\n', (1699, 1705), False, 'from SurfaceTopography import UniformLineScan\n'), ((1758...
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2019 TH<NAME> Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in c...
[ "django.dispatch.receiver", "gcloud.taskflow3.models.TaskFlowInstance.objects.get", "gcloud.taskflow3.signals.taskflow_finished.send", "gcloud.commons.message.send_task_flow_message", "logging.getLogger" ]
[((1084, 1111), 'logging.getLogger', 'logging.getLogger', (['"""celery"""'], {}), "('celery')\n", (1101, 1111), False, 'import logging\n'), ((1115, 1159), 'django.dispatch.receiver', 'receiver', (['post_save'], {'sender': 'PipelineInstance'}), '(post_save, sender=PipelineInstance)\n', (1123, 1159), False, 'from django....