code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # TH...
[ "zope.container.contained.setitem", "zope.interface.implementer", "zope.container.contained.uncontained", "BTrees.OOBTree.OOBTree", "BTrees.Length.Length" ]
[((1063, 1091), 'zope.interface.implementer', 'implementer', (['IBTreeContainer'], {}), '(IBTreeContainer)\n', (1074, 1091), False, 'from zope.interface import implementer\n'), ((1376, 1384), 'BTrees.Length.Length', 'Length', ([], {}), '()\n', (1382, 1384), False, 'from BTrees.Length import Length\n'), ((1729, 1738), '...
#!/usr/bin/env python3 from optparse import OptionParser, make_option import os, sys, logging import dbus, dbus.service, dbus.mainloop.glib from gi.repository import GLib mainloop = None BUF_SIZE = 1024 HSP_AG_UUID = '00001112-0000-1000-8000-00805f9b34fb' HFP_AG_UUID = '0000111f-0000-1000-8000-00805f9b34fb' HF_NREC...
[ "logging.basicConfig", "logging.debug", "dbus.mainloop.glib.DBusGMainLoop", "os.close", "os.write", "gi.repository.GLib.io_add_watch", "gi.repository.GLib.MainLoop", "optparse.OptionParser", "dbus.SystemBus", "dbus.UInt16", "gi.repository.GLib.source_remove", "os.read", "optparse.make_option...
[((2227, 2303), 'dbus.service.method', 'dbus.service.method', (['"""org.bluez.Profile1"""'], {'in_signature': '""""""', 'out_signature': '""""""'}), "('org.bluez.Profile1', in_signature='', out_signature='')\n", (2246, 2303), False, 'import dbus, dbus.service, dbus.mainloop.glib\n'), ((2372, 2448), 'dbus.service.method...
# Copyright (c) 2019-2020 SAP SE or an SAP affiliate company. All rights reserved. This file is # licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the L...
[ "ci.util.not_none", "dacite.from_dict", "concourse.model.base.AttributeSpec.deprecated", "concourse.model.base.ModelValidationError", "dataclasses.dataclass", "dacite.Config", "concourse.model.base.AttributeSpec.optional" ]
[((1186, 1220), 'dataclasses.dataclass', 'dataclasses.dataclass', ([], {'frozen': '(True)'}), '(frozen=True)\n', (1207, 1220), False, 'import dataclasses\n'), ((1423, 1586), 'concourse.model.base.AttributeSpec.optional', 'AttributeSpec.optional', ([], {'name': '"""step"""', 'default': "{'name': DEFAULT_COMPONENT_DESCRI...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ "logging.getLogger", "flask_appbuilder.api.expose", "flask_appbuilder.api.permission_name", "flask_appbuilder.api.rison", "superset.is_feature_enabled", "flask_appbuilder.api.protect", "flask_appbuilder.models.sqla.interface.SQLAInterface" ]
[((1453, 1480), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1470, 1480), False, 'import logging\n'), ((1558, 1591), 'flask_appbuilder.models.sqla.interface.SQLAInterface', 'SQLAInterface', (['ReportExecutionLog'], {}), '(ReportExecutionLog)\n', (1571, 1591), False, 'from flask_appbuil...
from django.db import models from datetime import date from django.template.defaultfilters import slugify from django.db.models.signals import pre_save from django.dispatch import receiver from markdown import markdown from markdown.extensions import fenced_code class Icon(models.Model): name = models.CharField(m...
[ "django.db.models.DateField", "django.db.models.TextField", "markdown.extensions.fenced_code.FencedCodeExtension", "django.db.models.ForeignKey", "django.template.defaultfilters.slugify", "django.db.models.SlugField", "django.dispatch.receiver", "django.db.models.CharField" ]
[((968, 1029), 'django.dispatch.receiver', 'receiver', (['pre_save'], {'sender': 'Note', 'dispatch_uid': '"""pre_save_note"""'}), "(pre_save, sender=Note, dispatch_uid='pre_save_note')\n", (976, 1029), False, 'from django.dispatch import receiver\n'), ((302, 334), 'django.db.models.CharField', 'models.CharField', ([], ...
## Copyright (c) <NAME>, <NAME>. All rights reserved. ## See LICENSE file for details. ## This software is distributed WITHOUT ANY WARRANTY; without even ## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ## PURPOSE. See the above copyright notices for more information. import ...
[ "functools.cmp_to_key", "vtk.numpy_interface.dataset_adapter.WrapDataObject", "morphman.common.vessel_reconstruction_tools.create_parent_artery_patches", "scipy.signal.resample", "scipy.interpolate.splev", "scipy.interpolate.splrep", "morphman.common.vmtkpointselector.vmtkPickPointSeedSelector" ]
[((9993, 10058), 'morphman.common.vessel_reconstruction_tools.create_parent_artery_patches', 'create_parent_artery_patches', (['centerline', 'div_points'], {'siphon': '(True)'}), '(centerline, div_points, siphon=True)\n', (10021, 10058), False, 'from morphman.common.vessel_reconstruction_tools import create_parent_arte...
# -*- coding: utf-8 -*- # # Copyright 2019 Google 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
[ "google.cloud.logging_v2.gapic.transports.logging_service_v2_grpc_transport.LoggingServiceV2GrpcTransport", "google.oauth2.service_account.Credentials.from_service_account_file", "google.cloud.logging_v2.proto.logging_pb2.ListMonitoredResourceDescriptorsRequest", "google.cloud.logging_v2.proto.logging_pb2.Del...
[((1579, 1633), 'pkg_resources.get_distribution', 'pkg_resources.get_distribution', (['"""google-cloud-logging"""'], {}), "('google-cloud-logging')\n", (1609, 1633), False, 'import pkg_resources\n'), ((2571, 2634), 'google.oauth2.service_account.Credentials.from_service_account_file', 'service_account.Credentials.from_...
from pathlib import Path from tqdm import tqdm import numpy as np import zarr import pandas as pd import joblib from sklearn.neighbors import NearestNeighbors from model_repair.override_for_release import get_interface from model_repair.cache42.cached_42 import cache_42 # @cache_42(ignore_args=["gcfg"], force_recom...
[ "numpy.random.choice", "numpy.array", "model_repair.override_for_release.get_interface", "sklearn.neighbors.NearestNeighbors", "model_repair.cache42.cached_42.cache_42" ]
[((332, 362), 'model_repair.cache42.cached_42.cache_42', 'cache_42', ([], {'ignore_args': "['gcfg']"}), "(ignore_args=['gcfg'])\n", (340, 362), False, 'from model_repair.cache42.cached_42 import cache_42\n'), ((774, 812), 'numpy.array', 'np.array', (["z_file_embeds['embedded_nd']"], {}), "(z_file_embeds['embedded_nd'])...
"""Sensor for displaying the number of result from Flume.""" from datetime import timedelta import logging from numbers import Number from pyflume import FlumeData import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.config_entries import SOURCE_IMPORT from homeassis...
[ "logging.getLogger", "voluptuous.Required", "pyflume.FlumeData", "homeassistant.helpers.update_coordinator.DataUpdateCoordinator", "homeassistant.helpers.update_coordinator.UpdateFailed", "datetime.timedelta", "voluptuous.Optional" ]
[((919, 946), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (936, 946), False, 'import logging\n'), ((975, 996), 'datetime.timedelta', 'timedelta', ([], {'seconds': '(15)'}), '(seconds=15)\n', (984, 996), False, 'from datetime import timedelta\n'), ((1013, 1033), 'datetime.timedelta', 't...
from __future__ import (absolute_import, division, print_function) from collections import OrderedDict import numpy as np from .util import extract_vars, get_id, get_iterable, is_mapping, to_np from .py3compat import viewkeys from .latlonutils import _lat_varname, _lon_varname, _ll_to_xy, _xy_to_ll from .metadecorat...
[ "collections.OrderedDict", "numpy.empty", "xarray.DataArray" ]
[((10697, 10733), 'numpy.empty', 'np.empty', (['outdims', 'first_array.dtype'], {}), '(outdims, first_array.dtype)\n', (10705, 10733), True, 'import numpy as np\n'), ((11629, 11660), 'collections.OrderedDict', 'OrderedDict', (['first_array.coords'], {}), '(first_array.coords)\n', (11640, 11660), False, 'from collection...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Generate a correlation matrix plot""" #----------------------------------------------------------------------------- # Boilerplate #----------------------------------------------------------------------------- from __future__ import absolute_import, division, print_func...
[ "matplotlib.collections.LineCollection", "numpy.array", "numpy.arange", "matplotlib.pyplot.Normalize", "numpy.asarray", "numpy.ma.masked_where", "matplotlib.colors.ListedColormap", "numpy.linspace", "matplotlib.cm.ScalarMappable", "scipy.cluster.hierarchy.linkage", "mpl_toolkits.axes_grid1.Image...
[((13743, 13753), 'matplotlib.pyplot.draw', 'plt.draw', ([], {}), '()\n', (13751, 13753), True, 'import matplotlib.pyplot as plt\n'), ((7952, 7987), 'pandas.DataFrame', 'pd.DataFrame', ([], {'data': 'correlation_data'}), '(data=correlation_data)\n', (7964, 7987), True, 'import pandas as pd\n'), ((8665, 8726), 'scipy.cl...
"""Tests for addresses""" import unittest from wallycore import * h2b = hex_to_bytes class AddressTests(unittest.TestCase): def test_b58_address(self): for address, scriptpubkey, network in [ ('mxvewdhKCenLkYgNa8irv1UM2omEWPMdEE', h2b('<KEY>'), WALLY_NETWORK_BITCOIN_TESTNET), # p2pkh ...
[ "unittest.main" ]
[((1154, 1169), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1167, 1169), False, 'import unittest\n')]
import sys import cv2 import numpy as np in_file = sys.argv[1] image = cv2.imread(in_file, cv2.IMREAD_GRAYSCALE) horizontal_sobel = cv2.Sobel(image, cv2.CV_64F, 1, 0, ksize=5) vertical_sobel = cv2.Sobel(image, cv2.CV_64F, 0, 1, ksize=5) laplacian_img = cv2.Laplacian(image, cv2.CV_64F) canny_img = cv2.Canny(image, ...
[ "cv2.Laplacian", "cv2.imshow", "cv2.waitKey", "cv2.Canny", "cv2.imread", "cv2.Sobel" ]
[((72, 113), 'cv2.imread', 'cv2.imread', (['in_file', 'cv2.IMREAD_GRAYSCALE'], {}), '(in_file, cv2.IMREAD_GRAYSCALE)\n', (82, 113), False, 'import cv2\n'), ((134, 177), 'cv2.Sobel', 'cv2.Sobel', (['image', 'cv2.CV_64F', '(1)', '(0)'], {'ksize': '(5)'}), '(image, cv2.CV_64F, 1, 0, ksize=5)\n', (143, 177), False, 'import...
import numpy as np def test_list_indexing(todo_list): try: assert(todo_list[2] == 'REPLACED') except AssertionError as e: print("The element 'TO_REPLACE_1' is not correctly replaced!") raise(e) try: assert(todo_list[-1][-1][-1] == 'REPLACED') except AssertionError...
[ "numpy.random.normal", "numpy.testing.assert_array_almost_equal", "numpy.sqrt", "numpy.testing.assert_array_equal", "numpy.array", "numpy.zeros", "numpy.testing.assert_almost_equal", "numpy.random.seed", "numpy.all", "numpy.arange" ]
[((1025, 1050), 'numpy.zeros', 'np.zeros', (['(2, 3, 5, 3, 7)'], {}), '((2, 3, 5, 3, 7))\n', (1033, 1050), True, 'import numpy as np\n'), ((1867, 1883), 'numpy.arange', 'np.arange', (['(3)', '(25)'], {}), '(3, 25)\n', (1876, 1883), True, 'import numpy as np\n'), ((2229, 2245), 'numpy.zeros', 'np.zeros', (['(3, 3)'], {}...
from scapy.all import * import time from os_detection.fingerprints import Result, FingerPrint from os_detection.sequence_generation.seq import get_seq from os_detection.sequence_generation.t1 import get_t1 SEQ_START = 22000 ACK_START = 44000 SPORT_START = 63000 TCP_PROBES_TIMES = [] # Send TCP probes with given pa...
[ "os_detection.sequence_generation.t1.get_t1", "time.time", "os_detection.fingerprints.Result" ]
[((1390, 1401), 'time.time', 'time.time', ([], {}), '()\n', (1399, 1401), False, 'import time\n'), ((2391, 2415), 'os_detection.fingerprints.Result', 'Result', (['category', 'params'], {}), '(category, params)\n', (2397, 2415), False, 'from os_detection.fingerprints import Result, FingerPrint\n'), ((2810, 2834), 'os_de...
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
[ "tensorflow.compat.v2.control_dependencies", "tensorflow.compat.v2.raw_ops.RandomGammaGrad", "tensorflow.compat.v2.size", "tensorflow_probability.python.internal.tensor_util.convert_nonref_to_tensor", "tensorflow_probability.python.internal.tensorshape_util.is_fully_defined", "tensorflow_probability.pytho...
[((12014, 12055), 'tensorflow_probability.python.distributions.kullback_leibler.RegisterKL', 'kullback_leibler.RegisterKL', (['Gamma', 'Gamma'], {}), '(Gamma, Gamma)\n', (12041, 12055), False, 'from tensorflow_probability.python.distributions import kullback_leibler\n'), ((16841, 16902), 'tensorflow.compat.v2.function'...
# Copyright (c) 2012-2014, <NAME> <<EMAIL>> # Copyright (c) 2017, <NAME> <<EMAIL>> # Copyright (c) 2020, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import copy impo...
[ "traceback.format_exc", "ansible.config.manager.ensure_type", "ansible.module_utils._text.to_bytes", "ansible.module_utils._text.to_native", "copy.deepcopy", "ansible.errors.AnsibleActionFail", "ansible.errors.AnsibleError", "ansible.module_utils._text.to_text" ]
[((1601, 1631), 'copy.deepcopy', 'copy.deepcopy', (['self._task.args'], {}), '(self._task.args)\n', (1614, 1631), False, 'import copy\n'), ((6881, 6931), 'ansible.module_utils._text.to_bytes', 'to_bytes', (['tmp_source'], {'errors': '"""surrogate_or_strict"""'}), "(tmp_source, errors='surrogate_or_strict')\n", (6889, 6...
# urls.py from __future__ import absolute_import from django.conf.urls import include, url from haystack.generic_views import SearchView from haystack.forms import SearchForm from .views import MySearchView import cloud_notes.views # required to set an app name to resolve 'url' in templates with namespacing app_name ...
[ "django.conf.urls.url" ]
[((357, 390), 'django.conf.urls.url', 'url', (['"""^$"""', 'cloud_notes.views.list'], {}), "('^$', cloud_notes.views.list)\n", (360, 390), False, 'from django.conf.urls import include, url\n'), ((397, 437), 'django.conf.urls.url', 'url', (['"""^new/"""', 'cloud_notes.views.new_note'], {}), "('^new/', cloud_notes.views....
from importer.tflite.new_tflite_graph_all import create_graph from graph.manipulations import add_dimensions, calculate_liveness from graph.types import Parameters def verify_steps(steps, cnt): assert len(steps) == cnt assert all(isinstance(step['node'], Parameters) for step in steps) def test_load1(mnist_gra...
[ "importer.tflite.new_tflite_graph_all.create_graph", "graph.manipulations.add_dimensions", "graph.manipulations.calculate_liveness" ]
[((333, 362), 'importer.tflite.new_tflite_graph_all.create_graph', 'create_graph', (['mnist_graph', '{}'], {}), '(mnist_graph, {})\n', (345, 362), False, 'from importer.tflite.new_tflite_graph_all import create_graph\n'), ((411, 437), 'importer.tflite.new_tflite_graph_all.create_graph', 'create_graph', (['ir_graph', '{...
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="discovery_imaging_utils", # Replace with your own username version="v0.1.4", author="<NAME>", author_email="<EMAIL>", description="A package to aid in resting-state fMRI analysis", lon...
[ "setuptools.find_packages" ]
[((573, 599), 'setuptools.find_packages', 'setuptools.find_packages', ([], {}), '()\n', (597, 599), False, 'import setuptools\n')]
"""Plugwise Sensor component for Home Assistant.""" import logging from homeassistant.components.sensor import ( DEVICE_CLASS_BATTERY, DEVICE_CLASS_ENERGY, DEVICE_CLASS_GAS, DEVICE_CLASS_ILLUMINANCE, DEVICE_CLASS_POWER, DEVICE_CLASS_PRESSURE, DEVICE_CLASS_TEMPERATURE, STATE_CLASS_MEASU...
[ "logging.getLogger" ]
[((900, 927), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (917, 927), False, 'import logging\n')]
from guizero import App, TextBox, PushButton, Text def show(): output.value = textbox.value app = App() textbox = TextBox(app, multiline=True, height=10, width=50, scrollbar=True) textbox.value = "hello\ngoodbye\nno way\nthis is a very long stream of text, very long indeed, the best long line of text, its super b...
[ "guizero.PushButton", "guizero.Text", "guizero.App", "guizero.TextBox" ]
[((104, 109), 'guizero.App', 'App', ([], {}), '()\n', (107, 109), False, 'from guizero import App, TextBox, PushButton, Text\n'), ((120, 185), 'guizero.TextBox', 'TextBox', (['app'], {'multiline': '(True)', 'height': '(10)', 'width': '(50)', 'scrollbar': '(True)'}), '(app, multiline=True, height=10, width=50, scrollbar...
# -*- coding:utf-8 -*- import sys import unittest class TestUpload(unittest.TestCase): def test_upload(self): pass def test_remove(self): pass if __name__ == '__main__': unittest.main()
[ "unittest.main" ]
[((208, 223), 'unittest.main', 'unittest.main', ([], {}), '()\n', (221, 223), False, 'import unittest\n')]
import logging import random import time from ..candidate_generation import candidates_per_query, syntactically_relevant_indexes from ..selection_algorithm import DEFAULT_PARAMETER_VALUES, SelectionAlgorithm from ..utils import get_utilized_indexes, mb_to_b # budget_MB: The algorithm can utilize the specified storage...
[ "random.sample", "logging.debug", "random.randrange", "time.time", "logging.info" ]
[((2008, 2057), 'logging.info', 'logging.info', (['"""Calculating best indexes DB2Advis"""'], {}), "('Calculating best indexes DB2Advis')\n", (2020, 2057), False, 'import logging\n'), ((5549, 5622), 'logging.debug', 'logging.debug', (['f"""Try variation for {self.try_variations_seconds} seconds"""'], {}), "(f'Try varia...
import numpy as np from numpy import pi, exp from scipy.special import gamma as gamma_func from scipy.spatial import distance class Distribution: _parameter_names = '' multi = False """Base probability distribution class""" def __init__(self, **kwargs): pass @property def rvs(self): ...
[ "numpy.sqrt", "numpy.random.default_rng", "numpy.log", "numpy.linalg.det", "numpy.exp", "numpy.array", "numpy.linalg.inv", "scipy.special.gamma", "numpy.matrix", "scipy.spatial.distance.mahalanobis" ]
[((2130, 2159), 'numpy.sqrt', 'np.sqrt', (['(self.var + other.var)'], {}), '(self.var + other.var)\n', (2137, 2159), True, 'import numpy as np\n'), ((2358, 2385), 'numpy.random.default_rng', 'np.random.default_rng', (['seed'], {}), '(seed)\n', (2379, 2385), True, 'import numpy as np\n'), ((2828, 2855), 'numpy.random.de...
# coding: utf-8 import logging import shlex import subprocess import sys from argparse import ArgumentParser from pathlib import Path from shutil import make_archive, rmtree from config import CLIENT, LAYER_TEMP, LAYER_ZIP, PYTHON_VERSION, ROOT_DIR # set up logger logger = logging.getLogger() console_handler = loggi...
[ "logging.getLogger", "config.LAYER_ZIP.split", "config.ROOT_DIR.joinpath", "logging.StreamHandler", "sys.exit", "pathlib.Path.exists", "argparse.ArgumentParser", "shlex.split", "logging.Formatter", "pathlib.Path.mkdir", "config.CLIENT.publish_layer_version", "shutil.rmtree" ]
[((277, 296), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (294, 296), False, 'import logging\n'), ((315, 338), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (336, 338), False, 'import logging\n'), ((351, 424), 'logging.Formatter', 'logging.Formatter', (['"""%(asctime)s - %(name)s -...
from __future__ import absolute_import from __future__ import division import torch import torch.nn as nn from torch.autograd import Variable import numpy as np class Conv2d(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride=1, relu=True, same_padding=False, bn=False): super(Con...
[ "torch.nn.BatchNorm2d", "torch.nn.ReLU", "numpy.asarray", "torch.from_numpy", "torch.nn.Conv2d", "h5py.File", "torch.nn.Linear", "torch.no_grad" ]
[((1274, 1300), 'h5py.File', 'h5py.File', (['fname'], {'mode': '"""w"""'}), "(fname, mode='w')\n", (1283, 1300), False, 'import h5py\n'), ((1449, 1475), 'h5py.File', 'h5py.File', (['fname'], {'mode': '"""r"""'}), "(fname, mode='r')\n", (1458, 1475), False, 'import h5py\n'), ((430, 504), 'torch.nn.Conv2d', 'nn.Conv2d', ...
from flask import Blueprint, request, current_app from flask import render_template, redirect, url_for, flash from flask_login import login_required, current_user from webapp import db from webapp.track.forms import AddTrackForm from webapp.track.models import Track blueprint = Blueprint('track', __name__, url_prefix...
[ "flask.render_template", "flask.request.args.get", "webapp.track.models.Track.timestamp.desc", "flask.flash", "webapp.track.forms.AddTrackForm", "flask.url_for", "webapp.track.models.Track", "flask.Blueprint", "webapp.db.session.commit", "webapp.db.session.add" ]
[((281, 331), 'flask.Blueprint', 'Blueprint', (['"""track"""', '__name__'], {'url_prefix': '"""/tracks"""'}), "('track', __name__, url_prefix='/tracks')\n", (290, 331), False, 'from flask import Blueprint, request, current_app\n'), ((460, 474), 'webapp.track.forms.AddTrackForm', 'AddTrackForm', ([], {}), '()\n', (472, ...
from .exceptions import ProtocolError from .definitions import * import simplejson as json import struct from datetime import datetime, timedelta import binascii import time class Pod: def __init__(self): self.lot=0 self.tid=0 self.lastUpdated = None self.progress=PodProgress.Init...
[ "datetime.datetime.utcnow", "binascii.hexlify", "simplejson.load", "struct.unpack", "simplejson.dump", "datetime.timedelta", "time.time" ]
[((6837, 6868), 'struct.unpack', 'struct.unpack', (['""">BII"""', 'response'], {}), "('>BII', response)\n", (6850, 6868), False, 'import struct\n'), ((7610, 7621), 'time.time', 'time.time', ([], {}), '()\n', (7619, 7621), False, 'import time\n'), ((1993, 2051), 'simplejson.dump', 'json.dump', (['self.__dict__', 'stream...
from discord.ext import commands import discord import requests from botlibrary import constants # Anton Rewrite that shit class reddit(commands.Cog): def __init__(self, client): self.client = client self.url = constants.reddit_url @commands.command(name="reddit") async def reddit_comman...
[ "discord.Embed", "discord.ext.commands.command", "requests.get" ]
[((261, 292), 'discord.ext.commands.command', 'commands.command', ([], {'name': '"""reddit"""'}), "(name='reddit')\n", (277, 292), False, 'from discord.ext import commands\n'), ((364, 404), 'requests.get', 'requests.get', (["(self.url + '/' + subreddit)"], {}), "(self.url + '/' + subreddit)\n", (376, 404), False, 'impo...
"""Test the SSDP integration.""" import asyncio from datetime import timedelta from ipaddress import IPv4Address, IPv6Address from unittest.mock import patch import aiohttp from async_upnp_client.search import SSDPListener from async_upnp_client.utils import CaseInsensitiveDict import pytest from homeassistant import...
[ "homeassistant.util.dt.utcnow", "homeassistant.setup.async_setup_component", "tests.common.mock_coro", "homeassistant.components.ssdp.async_get_discovery_info_by_udn_st", "ipaddress.IPv6Address", "ipaddress.IPv4Address", "homeassistant.components.ssdp.async_register_callback", "pytest.mark.parametrize...
[((3068, 3162), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""key"""', '(ssdp.ATTR_UPNP_MANUFACTURER, ssdp.ATTR_UPNP_DEVICE_TYPE)'], {}), "('key', (ssdp.ATTR_UPNP_MANUFACTURER, ssdp.\n ATTR_UPNP_DEVICE_TYPE))\n", (3091, 3162), False, 'import pytest\n'), ((5460, 5535), 'pytest.mark.parametrize', 'pytest...
# -*- coding: utf-8 -*- import unittest from aniso8601.timezone import UTCOffset, build_utcoffset from flask_ask.core import Ask from datetime import datetime, timedelta from mock import patch, MagicMock import json class FakeRequest(object): """ Fake out a Flask request for testing purposes for now """ hea...
[ "datetime.datetime", "datetime.datetime.utcfromtimestamp", "mock.patch", "json.dumps", "flask_ask.core.Ask", "datetime.timedelta", "flask_ask.core.Ask._parse_timestamp", "mock.MagicMock" ]
[((429, 445), 'json.dumps', 'json.dumps', (['data'], {}), '(data)\n', (439, 445), False, 'import json\n'), ((589, 600), 'mock.MagicMock', 'MagicMock', ([], {}), '()\n', (598, 600), False, 'from mock import patch, MagicMock\n'), ((825, 879), 'mock.patch', 'patch', (['"""flask_ask.core.current_app"""'], {'new': 'self.moc...
from rest_framework import serializers from . import models class TransferRequestSerializer(serializers.ModelSerializer): org_name = serializers.CharField(source='organization.org_name') class Meta: model = models.TransferRequest fields = ( 'id', 'str_identify', 'org_name', 'str_t...
[ "rest_framework.serializers.CharField" ]
[((139, 192), 'rest_framework.serializers.CharField', 'serializers.CharField', ([], {'source': '"""organization.org_name"""'}), "(source='organization.org_name')\n", (160, 192), False, 'from rest_framework import serializers\n'), ((558, 619), 'rest_framework.serializers.CharField', 'serializers.CharField', ([], {'sourc...
# # This source file is part of the EdgeDB open source project. # # Copyright 2008-present MagicStack Inc. and the EdgeDB 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...
[ "edb.pgsql.types.pg_type_from_ir_typeref", "edb.pgsql.ast.TupleVar", "edb.pgsql.ast.TupleElementBase", "edb.pgsql.ast.NullTest", "edb.pgsql.ast.ColumnRef", "edb.ir.typeutils.maybe_find_actual_ptrref", "edb.pgsql.ast.TupleElement", "edb.ir.typeutils.find_actual_ptrref", "edb.ir.typeutils.is_id_ptrref...
[((35465, 35520), 'edb.pgsql.ast.ResTarget', 'pgast.ResTarget', ([], {'name': 'alias', 'val': 'refexpr', 'ser_safe': '(True)'}), '(name=alias, val=refexpr, ser_safe=True)\n', (35480, 35520), True, 'from edb.pgsql import ast as pgast\n'), ((35573, 35644), 'edb.pgsql.ast.ColumnRef', 'pgast.ColumnRef', ([], {'name': '[ali...
#!/usr/bin/env Python from __future__ import print_function from collections import OrderedDict import pprint def CPUinfo(): ''' Return the information in /proc/CPUinfo as a dictionary in the following format: CPU_info['proc0']={...} CPU_info['proc1']={...} ''' CPUinfo=OrderedDict() ...
[ "collections.OrderedDict" ]
[((306, 319), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (317, 319), False, 'from collections import OrderedDict\n'), ((334, 347), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (345, 347), False, 'from collections import OrderedDict\n'), ((641, 654), 'collections.OrderedDict', 'OrderedDic...
from __future__ import print_function from sys import stdout, stderr from pepper.framework.abstract import AbstractComponent from pepper.framework.util import Scheduler from pepper.framework.component import SpeechRecognitionComponent from pepper import config import threading import urllib from time import time cl...
[ "threading.active_count", "time.time", "pepper.framework.util.Scheduler" ]
[((2781, 2803), 'pepper.framework.util.Scheduler', 'Scheduler', (['worker', '(0.1)'], {}), '(worker, 0.1)\n', (2790, 2803), False, 'from pepper.framework.util import Scheduler\n'), ((2174, 2180), 'time.time', 'time', ([], {}), '()\n', (2178, 2180), False, 'from time import time\n'), ((2444, 2468), 'threading.active_cou...
# Generated by Django 2.2 on 2021-01-26 16:47 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('openedgar', '0006_tablebookmark'), ] operations = [ migrations.AlterField( model_name='tablebookmark', name='end_index...
[ "django.db.models.IntegerField" ]
[((341, 386), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'db_index': '(True)', 'null': '(True)'}), '(db_index=True, null=True)\n', (360, 386), False, 'from django.db import migrations, models\n')]
"""Bootstrap the agent database.""" import time from arxiv.base import logging from .factory import create_app from .services import database logger = logging.getLogger(__name__) if __name__ == '__main__': app = create_app() with app.app_context(): session = database.db.session wait = 2 ...
[ "arxiv.base.logging.getLogger", "time.sleep" ]
[((153, 180), 'arxiv.base.logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (170, 180), False, 'from arxiv.base import logging\n'), ((562, 578), 'time.sleep', 'time.sleep', (['wait'], {}), '(wait)\n', (572, 578), False, 'import time\n')]
# -*- coding: utf-8 -*- import os import logging import datetime import base64 from qcloud_cos_v5 import CosConfig from qcloud_cos_v5 import CosS3Client from qcloud_cos_v5 import CosServiceError from qcloud_cos_v5 import CosClientError import sys print('Loading function') logging.basicConfig(level=logging.INFO, strea...
[ "logging.basicConfig", "logging.getLogger", "os.listdir", "os.path.join", "qcloud_cos_v5.CosS3Client", "base64.b64decode", "qcloud_cos_v5.CosConfig", "os.path.isfile", "datetime.datetime.now", "os.rmdir", "os.path.isdir", "os.remove" ]
[((275, 333), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO', 'stream': 'sys.stdout'}), '(level=logging.INFO, stream=sys.stdout)\n', (294, 333), False, 'import logging\n'), ((604, 690), 'qcloud_cos_v5.CosConfig', 'CosConfig', ([], {'Secret_id': 'secret_id', 'Secret_key': 'secret_key', 'Regi...
# -*- coding: utf-8 -*- import os import re from .._compat import pjoin from .._globals import IDENTITY, THREAD_LOCAL from .._gae import classobj, gae, ndb, namespace_manager, NDBPolyModel, rdbms from ..objects import Table, Field, Expression, Query from ..helpers.classes import SQLCustomType, SQLALL, \ Reference,...
[ "re.compile" ]
[((661, 704), 're.compile', 're.compile', (['"""^(?P<instance>.*)/(?P<db>.*)$"""'], {}), "('^(?P<instance>.*)/(?P<db>.*)$')\n", (671, 704), False, 'import re\n'), ((3856, 3892), 're.compile', 're.compile', (['""".*://(?P<namespace>.+)"""'], {}), "('.*://(?P<namespace>.+)')\n", (3866, 3892), False, 'import re\n')]
from typing import Dict, Union, Optional from kgx.utils.infores import InfoResContext from kgx.prefix_manager import PrefixManager from kgx.config import get_logger log = get_logger() class Source(object): """ A Source is responsible for reading data as records from a store where the store is a file or ...
[ "kgx.config.get_logger", "kgx.utils.infores.InfoResContext", "kgx.prefix_manager.PrefixManager" ]
[((173, 185), 'kgx.config.get_logger', 'get_logger', ([], {}), '()\n', (183, 185), False, 'from kgx.config import get_logger\n'), ((570, 585), 'kgx.prefix_manager.PrefixManager', 'PrefixManager', ([], {}), '()\n', (583, 585), False, 'from kgx.prefix_manager import PrefixManager\n'), ((7983, 7999), 'kgx.utils.infores.In...
from io import BytesIO from nbtlib import CompoundSchema, File, schema from nbtlib.tag import ( INT, Byte, Float, Int, List, Long, String, read_numeric, write_numeric, ) # fmt: off BedrockLevelData = schema("BedrockLevelData", { "CenterMapsToOrigin": Byte, "Difficulty": Int...
[ "nbtlib.tag.write_numeric", "io.BytesIO", "nbtlib.tag.read_numeric", "nbtlib.schema" ]
[((1022, 1396), 'nbtlib.schema', 'schema', (['"""Abilities"""', "{'attackmobs': Byte, 'attackplayers': Byte, 'buildandmine': Byte,\n 'doorsandswitches': Byte, 'flySpeed': Float, 'flying': Byte,\n 'instabuild': Byte, 'invulnerable': Byte, 'lightning': Byte, 'mayfly':\n Byte, 'op': Byte, 'opencontainers': Byte, ...
import hashlib import os.path import json REQUEST_TIMEOUT = 10 def state_from_json(s): j = json.loads(s) if not "version" in j: return {} return j["states"] def state_to_json(state): final = {"version": 2, "states": state} return json.dumps(final, indent=2, sort_keys=True) def state_f...
[ "json.loads", "json.dumps", "hashlib.sha3_256" ]
[((98, 111), 'json.loads', 'json.loads', (['s'], {}), '(s)\n', (108, 111), False, 'import json\n'), ((263, 306), 'json.dumps', 'json.dumps', (['final'], {'indent': '(2)', 'sort_keys': '(True)'}), '(final, indent=2, sort_keys=True)\n', (273, 306), False, 'import json\n'), ((598, 616), 'hashlib.sha3_256', 'hashlib.sha3_2...
# -*- coding: utf-8 -*- """Parsers for MSig.""" import logging from typing import Iterable, Optional from xml.etree import ElementTree import click from more_click import verbose_option from tqdm import tqdm from ..struct import Obo, Reference, Term, has_part from ..utils.path import ensure_path logger = logging.g...
[ "logging.getLogger", "click.command", "xml.etree.ElementTree.parse" ]
[((311, 338), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (328, 338), False, 'import logging\n'), ((4853, 4868), 'click.command', 'click.command', ([], {}), '()\n', (4866, 4868), False, 'import click\n'), ((1525, 1548), 'xml.etree.ElementTree.parse', 'ElementTree.parse', (['path'], {})...
import os import shutil import pytest from jina.flow import Flow from jina.logging.profile import used_memory from jina.proto import jina_pb2 from tests import random_docs cur_dir = os.path.dirname(os.path.abspath(__file__)) @pytest.mark.parametrize('uses', ['binarypb.yml', 'shelfpb.yml']) def test_shelf_in_flow(u...
[ "jina.proto.jina_pb2.Document", "os.path.join", "tests.random_docs", "jina.flow.Flow", "pytest.mark.parametrize", "shutil.rmtree", "os.path.abspath", "jina.logging.profile.used_memory" ]
[((231, 295), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""uses"""', "['binarypb.yml', 'shelfpb.yml']"], {}), "('uses', ['binarypb.yml', 'shelfpb.yml'])\n", (254, 295), False, 'import pytest\n'), ((201, 226), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (216, 226), False, 'im...
# -*- coding: utf-8 -*- from django.test import TestCase from django.core.urlresolvers import reverse from accounts.models import User from products.models import Product, Purchase from tickets.models import Ticket, Comment class TicketsPageVisitorTest(TestCase): """ Test tickets page for visitors (not logged in)...
[ "products.models.Purchase.objects.create", "tickets.models.Comment.objects.create", "tickets.models.Ticket.objects.create", "products.models.Product.objects.create", "django.core.urlresolvers.reverse", "accounts.models.User.objects.create_user" ]
[((693, 856), 'accounts.models.User.objects.create_user', 'User.objects.create_user', ([], {'username': '"""<EMAIL>"""', 'email': '"""<EMAIL>"""', 'password': '"""<PASSWORD>"""', 'first_name': '"""test"""', 'last_name': '"""test"""', 'company': '"""test"""', 'is_staff': '"""True"""'}), "(username='<EMAIL>', email='<EMA...
import pygame, random, math, sys, sqlite3 # Classes class Bullet(): def __init__(self, type='a', dmg=1, dx=0): self.image = pygame.image.load(type+'.png').convert_alpha() self.dmg = dmg self.dx = dx self.existence = True self.rect = self.image.get_rect() self.rect.x...
[ "pygame.display.set_caption", "sys.exit", "pygame.init", "pygame.mask.from_surface", "pygame.event.get", "pygame.quit", "pygame.display.set_mode", "sqlite3.connect", "pygame.mouse.get_pos", "random.random", "pygame.time.Clock", "pygame.image.load", "pygame.font.Font", "math.sin", "pygame...
[((2740, 2753), 'pygame.init', 'pygame.init', ([], {}), '()\n', (2751, 2753), False, 'import pygame, random, math, sys, sqlite3\n'), ((2763, 2805), 'pygame.display.set_mode', 'pygame.display.set_mode', (['(1280, 800)', '(0)', '(0)'], {}), '((1280, 800), 0, 0)\n', (2786, 2805), False, 'import pygame, random, math, sys, ...
#! /Library/Frameworks/Python.framework/Versions/2.7/bin/python docstr = """ Polyjuice Usage: polyjuice.py (-h | --help) polyjuice.py [-vz] (<input_path> <output_path>) [<config_file>] polyjuice.py [-vzc] [<config_file>] Options: -h --help Show this message and exit -z --zip ...
[ "os.path.exists", "shutil.make_archive", "os.makedirs", "os.path.join", "os.path.isfile", "lumberjack.Lumberjack", "os.path.basename", "csv.reader", "filch.DicomCaretaker", "dicom_image.DicomImage", "docopt.docopt", "os.walk" ]
[((1834, 1850), 'filch.DicomCaretaker', 'DicomCaretaker', ([], {}), '()\n', (1848, 1850), False, 'from filch import DicomCaretaker\n'), ((1859, 1886), 'os.path.isfile', 'os.path.isfile', (['parent_file'], {}), '(parent_file)\n', (1873, 1886), False, 'import os\n'), ((7215, 7229), 'docopt.docopt', 'docopt', (['docstr'],...
# -*- coding: utf-8 -*- # Generated by Django 1.11.8 on 2017-12-08 10:23 from __future__ import unicode_literals from datetime import datetime from django.db import migrations from django.utils.timezone import utc def update_uk_regions(apps, schema_editor): Order = apps.get_model('order', 'Order') release_d...
[ "datetime.datetime", "django.db.migrations.RunPython" ]
[((326, 360), 'datetime.datetime', 'datetime', (['(2017)', '(11)', '(23)'], {'tzinfo': 'utc'}), '(2017, 11, 23, tzinfo=utc)\n', (334, 360), False, 'from datetime import datetime\n'), ((795, 881), 'django.db.migrations.RunPython', 'migrations.RunPython', (['update_uk_regions', 'migrations.RunPython.noop'], {'elidable': ...
from datetime import timezone from dateutil.parser import isoparse from fdbk.utils import timestamp_as_str from fdbk.utils.messages import ( method_not_supported, no_data) from .functions import functions as data_functions, VALUE_FUNCS def _dt_timestamp(data_point): return isoparse(data_point.get('times...
[ "fdbk.utils.messages.method_not_supported", "fdbk.utils.messages.no_data" ]
[((1220, 1229), 'fdbk.utils.messages.no_data', 'no_data', ([], {}), '()\n', (1227, 1229), False, 'from fdbk.utils.messages import method_not_supported, no_data\n'), ((1422, 1458), 'fdbk.utils.messages.method_not_supported', 'method_not_supported', (['aggregate_with'], {}), '(aggregate_with)\n', (1442, 1458), False, 'fr...
import matplotlib.pyplot as plt import numpy as np from DREAM.Settings.Equations.EquationException import EquationException from DREAM.Settings.Equations.IonSpecies import IonSpecies, IONS_PRESCRIBED, IONIZATION_MODE_FLUID, IONIZATION_MODE_KINETIC, IONIZATION_MODE_KINETIC_APPROX_JAC, ION_OPACITY_MODE_TRANSPARENT from ...
[ "DREAM.Settings.Equations.IonSpecies.IonSpecies", "DREAM.Settings.Equations.EquationException.EquationException", "numpy.any", "numpy.sum", "numpy.zeros" ]
[((2623, 2855), 'DREAM.Settings.Equations.IonSpecies.IonSpecies', 'IonSpecies', ([], {'settings': 'self.settings', 'name': 'name', 'Z': 'Z', 'ttype': 'iontype', 'Z0': 'Z0', 'isotope': 'isotope', 'SPIMolarFraction': 'SPIMolarFraction', 'opacity_mode': 'opacity_mode', 'T': 'T', 'n': 'n', 'r': 'r', 't': 't', 'interpr': 's...
""" implementation of criteo dataset """ # pylint: disable=unused-argument,missing-docstring import os import sys import re import random import numpy as np from intel_pytorch_extension import core import inspect # pytorch import torch from torch.utils.data import Dataset, RandomSampler import os # add dlrm code pa...
[ "os.path.exists", "data_loader_terabyte.CriteoBinDataset", "torch.utils.data.DataLoader", "os.path.join", "dlrm_data_pytorch.CriteoDataset", "data_loader_terabyte.CalibDataLoader", "os.path.isfile", "sys.exit", "sys.path.append" ]
[((375, 405), 'sys.path.append', 'sys.path.append', (['dlrm_dir_path'], {}), '(dlrm_dir_path)\n', (390, 405), False, 'import sys\n'), ((514, 525), 'sys.exit', 'sys.exit', (['(0)'], {}), '(0)\n', (522, 525), False, 'import sys\n'), ((1674, 1716), 'os.path.join', 'os.path.join', (['data_path', '"""calibration.npz"""'], {...
from matplotlib.patches import Patch from ....Functions.init_fig import init_fig from ....definitions import config_dict ROTOR_COLOR = config_dict["PLOT"]["COLOR_DICT"]["ROTOR_COLOR"] STATOR_COLOR = config_dict["PLOT"]["COLOR_DICT"]["STATOR_COLOR"] def plot( self, fig=None, ax=None, is_lam_only=Fals...
[ "matplotlib.patches.Patch" ]
[((2693, 2718), 'matplotlib.patches.Patch', 'Patch', ([], {'color': 'STATOR_COLOR'}), '(color=STATOR_COLOR)\n', (2698, 2718), False, 'from matplotlib.patches import Patch\n'), ((2917, 2941), 'matplotlib.patches.Patch', 'Patch', ([], {'color': 'ROTOR_COLOR'}), '(color=ROTOR_COLOR)\n', (2922, 2941), False, 'from matplotl...
''' ./common/lib/xmodule/xmodule/modulestore ''' from django.http import Http404 from xmodule.modulestore.django import modulestore def get_course_by_id(course_key, depth=0): """ Given a course id, return the corresponding course descriptor. If such a course does not exist, raises a 404. depth: Th...
[ "xmodule.modulestore.django.modulestore" ]
[((424, 437), 'xmodule.modulestore.django.modulestore', 'modulestore', ([], {}), '()\n', (435, 437), False, 'from xmodule.modulestore.django import modulestore\n'), ((484, 497), 'xmodule.modulestore.django.modulestore', 'modulestore', ([], {}), '()\n', (495, 497), False, 'from xmodule.modulestore.django import modulest...
#!/usr/bin/python # This script prints the predicted and real body part in the validation dataset (images/test) import os os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" os.environ["CUDA_VISIBLE_DEVICES"] = "0" import numpy as np from keras import optimizers from keras.models import load_model from keras.preprocessin...
[ "tensorflow.unstack", "keras.preprocessing.image.img_to_array", "os.listdir", "keras.models.load_model", "argparse.ArgumentParser", "csv.writer", "numpy.vstack", "numpy.expand_dims", "keras.optimizers.RMSprop", "keras.preprocessing.image.load_img" ]
[((407, 482), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Get prediction on validation dataset"""'}), "(description='Get prediction on validation dataset')\n", (430, 482), False, 'import argparse\n'), ((626, 645), 'csv.writer', 'csv.writer', (['csvFile'], {}), '(csvFile)\n', (636, 645...
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import * import copy import json import os import shutil from lxml import etree from rdflib import RDF, Graph from rdflib.namespace import DCTERMS from ferenda.compat imp...
[ "ferenda.compat.patch", "ferenda.Facet", "os.path.exists", "ferenda.TocPage", "ferenda.compat.MagicMock", "ferenda.DocumentRepository", "lxml.etree.parse", "ferenda.elements.Link", "rdflib.Graph", "os.path.dirname", "copy.deepcopy", "ferenda.util.ensure_dir", "ferenda.compat.Mock" ]
[((3793, 3816), 'ferenda.Facet', 'Facet', ([], {'rdftype': 'RDF.type'}), '(rdftype=RDF.type)\n', (3798, 3816), False, 'from ferenda import Facet, TocPageset, TocPage\n'), ((3832, 3860), 'ferenda.Facet', 'Facet', ([], {'rdftype': 'DCTERMS.title'}), '(rdftype=DCTERMS.title)\n', (3837, 3860), False, 'from ferenda import F...
#!/usr/bin/env python import em import os import shutil import subprocess import sys import tempfile import unittest import movo_upstart class TestBasics(unittest.TestCase): def setUp(self): self.root_dir = tempfile.mkdtemp() def tearDown(self): shutil.rmtree(self.root_dir) # A bi...
[ "os.getenv", "os.path.join", "rosunit.unitrun", "movo_upstart.Job", "tempfile.mkdtemp", "shutil.rmtree" ]
[((3618, 3676), 'rosunit.unitrun', 'rosunit.unitrun', (['"""movo_upstart"""', '"""test_basics"""', 'TestBasics'], {}), "('movo_upstart', 'test_basics', TestBasics)\n", (3633, 3676), False, 'import rosunit\n'), ((224, 242), 'tempfile.mkdtemp', 'tempfile.mkdtemp', ([], {}), '()\n', (240, 242), False, 'import tempfile\n')...
from bs4 import BeautifulSoup from selenium import webdriver chrome_driver_path = r'C:\chromedriver_win32\chromedriver.exe' driver = webdriver.Chrome(executable_path=chrome_driver_path) def get_book_list(): url = 'https://www.amazon.com/s?k=python+programming' driver.get(url) soup = BeautifulSoup(driver.page_sour...
[ "bs4.BeautifulSoup", "selenium.webdriver.Chrome" ]
[((134, 186), 'selenium.webdriver.Chrome', 'webdriver.Chrome', ([], {'executable_path': 'chrome_driver_path'}), '(executable_path=chrome_driver_path)\n', (150, 186), False, 'from selenium import webdriver\n'), ((290, 331), 'bs4.BeautifulSoup', 'BeautifulSoup', (['driver.page_source', '"""lxml"""'], {}), "(driver.page_s...
import torch import torch.nn as nn import torch.nn.functional as F from torch import Tensor import math import os import sys BASE_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append(BASE_DIR) import P4Transformer.pointnet2_utils as pointnet2_utils from typing import List class P4DConv(nn.Module): d...
[ "torch.nn.ReLU", "torch.nn.Sequential", "torch.max", "P4Transformer.pointnet2_utils.three_nn", "torch.nn.BatchNorm1d", "torch.sum", "torch.squeeze", "P4Transformer.pointnet2_utils.ball_query", "sys.path.append", "torch.nn.BatchNorm2d", "torch.mean", "torch.unsqueeze", "P4Transformer.pointnet...
[((180, 205), 'sys.path.append', 'sys.path.append', (['BASE_DIR'], {}), '(BASE_DIR)\n', (195, 205), False, 'import sys\n'), ((153, 178), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (168, 178), False, 'import os\n'), ((1910, 1932), 'torch.nn.Sequential', 'nn.Sequential', (['*conv_d'], {}), ...
import requests from metar import Metar import mysql.connector def insert_metar(cxn, data): cursor = cxn.cursor() query = ''' INSERT INTO `METAR` ( `Type`, `Mode`, `StationID`, `Time`, `Cycle`, `WindDirection`, `WindSpeed`, `WindGust`, `WindDirec...
[ "requests.get", "metar.Metar.Metar" ]
[((4076, 4176), 'requests.get', 'requests.get', (["('http://tgftp.nws.noaa.gov/data/observations/metar/stations/' + icao_code +\n '.TXT')"], {}), "('http://tgftp.nws.noaa.gov/data/observations/metar/stations/' +\n icao_code + '.TXT')\n", (4088, 4176), False, 'import requests\n'), ((5524, 5546), 'metar.Metar.Metar...
from django.core.exceptions import ValidationError from django.utils.module_loading import import_string from django.utils.safestring import SafeText, mark_safe from django.utils.text import slugify from bs4 import BeautifulSoup from v1.atomic_elements import atoms from v1.util.util import get_unique_id try: fr...
[ "django.utils.text.slugify", "wagtail.wagtailcore.blocks.ChoiceBlock", "wagtail.wagtailcore.blocks.CharBlock", "django.utils.safestring.SafeText", "wagtail.wagtailcore.blocks.PageChooserBlock", "django.core.exceptions.ValidationError", "bs4.BeautifulSoup", "v1.atomic_elements.atoms.ImageBasic", "wag...
[((1726, 2006), 'wagtail.wagtailcore.blocks.CharBlock', 'blocks.CharBlock', ([], {'required': '(False)', 'label': '"""ID for this content block"""', 'help_text': '"""\n ID will be auto-generated on save.\n However, you may enter some human-friendly text that\n will be incorporated to ma...
import testinfra.utils.ansible_runner import pytest from time import sleep testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( '.molecule/ansible_inventory').get_hosts('all') @pytest.mark.parametrize("name", [ "celery-worker", "docker", "redis", ]) def test_services_running_and_enabled(Se...
[ "pytest.mark.parametrize", "pytest.mark.skip", "time.sleep" ]
[((195, 264), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""name"""', "['celery-worker', 'docker', 'redis']"], {}), "('name', ['celery-worker', 'docker', 'redis'])\n", (218, 264), False, 'import pytest\n'), ((409, 456), 'pytest.mark.skip', 'pytest.mark.skip', ([], {'reason': '"""needs to be reviewed"""'})...
# /usr/bin/env python3.6 # -*- mode: python -*- # ============================================================================= # @@-COPYRIGHT-START-@@ # # Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification,...
[ "aimet_torch.model_preparer.prepare_model", "torchvision.models.resnet18", "torch.no_grad", "torch.randn", "aimet_torch.quantsim.QuantizationSimModel" ]
[((3360, 3385), 'torchvision.models.resnet18', 'resnet18', ([], {'pretrained': '(True)'}), '(pretrained=True)\n', (3368, 3385), False, 'from torchvision.models import resnet18\n'), ((3514, 3534), 'aimet_torch.model_preparer.prepare_model', 'prepare_model', (['model'], {}), '(model)\n', (3527, 3534), False, 'from aimet_...
""" Figures Celery tasks. Initially this module contains tasks for the ETL pipeline. The higher level task is responsible for error handling of functions it calls """ from __future__ import absolute_import import datetime import time import six from django.contrib.sites.models import Site from django.utils.timezone...
[ "figures.pipeline.mau_pipeline.collect_course_mau", "figures.sites.site_course_ids", "figures.pipeline.site_daily_metrics.SiteDailyMetricsLoader", "celery.utils.log.get_task_logger", "datetime.datetime.utcnow", "django.contrib.sites.models.Site.objects.all", "figures.pipeline.site_monthly_metrics.fill_l...
[((1064, 1089), 'celery.utils.log.get_task_logger', 'get_task_logger', (['__name__'], {}), '(__name__)\n', (1079, 1089), False, 'from celery.utils.log import get_task_logger\n'), ((2134, 2145), 'time.time', 'time.time', ([], {}), '()\n', (2143, 2145), False, 'import time\n'), ((3515, 3536), 'figures.sites.site_course_i...
# Copyright (C) 2022 Mandiant, Inc. All Rights Reserved. import logging from enum import Enum TRACE = logging.DEBUG - 1 setattr(logging, "TRACE", TRACE) logging.addLevelName(TRACE, "TRACE") class DebugLevel(int, Enum): NONE = 0 DEFAULT = 1 TRACE = 2 SUPERTRACE = 3 GREY = "\x1b[38;21m" CYAN = "\x1b...
[ "logging.getLogger", "logging.setLoggerClass", "logging.Formatter", "logging.getLoggerClass", "logging.addLevelName" ]
[((155, 191), 'logging.addLevelName', 'logging.addLevelName', (['TRACE', '"""TRACE"""'], {}), "(TRACE, 'TRACE')\n", (175, 191), False, 'import logging\n'), ((1169, 1193), 'logging.getLoggerClass', 'logging.getLoggerClass', ([], {}), '()\n', (1191, 1193), False, 'import logging\n'), ((1303, 1342), 'logging.setLoggerClas...
# Discord Imports import discord from discord.ext import commands # Other Imports import random class Economy(commands.Cog): def __init__(self, bot): self.bot = bot self.bot.db = bot.db self.START_BAL = 250 @commands.command() async def shop(self, ctx): e = discord.Embed(...
[ "random.choice", "discord.ext.commands.is_owner", "discord.ext.commands.command", "discord.Embed", "random.randint" ]
[((244, 262), 'discord.ext.commands.command', 'commands.command', ([], {}), '()\n', (260, 262), False, 'from discord.ext import commands\n'), ((672, 690), 'discord.ext.commands.command', 'commands.command', ([], {}), '()\n', (688, 690), False, 'from discord.ext import commands\n'), ((1693, 1711), 'discord.ext.commands....
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack 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 # # Unless requ...
[ "keystone.common.serializer.to_xml", "keystone.common.utils.LimitingReader", "keystone.openstack.common.jsonutils.loads", "keystone.exception.RequestTooLarge", "keystone.common.serializer.from_xml", "keystone.exception.Error", "keystone.exception.ValidationError", "keystone.common.wsgi.render_exceptio...
[((925, 952), 'keystone.common.logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (942, 952), False, 'from keystone.common import logging\n'), ((3684, 3774), 'keystone.exception.ValidationError', 'exception.ValidationError', ([], {'attribute': '"""application/json"""', 'target': '"""Content-Ty...
#!/usr/bin/env python3 BASE_URL = 'https://enlighten.enphaseenergy.com' STARTING_URL = BASE_URL + '/login' LOGIN_URL = BASE_URL + '/login/login' LOGIN_SUCCESS_URL = BASE_URL + '/systems' STATE_DIR = '~/.enphase_scraper' import os import errno import http.cookiejar import urllib import urllib.request import urllib.err...
[ "urllib.request.HTTPCookieProcessor", "os.makedirs", "argparse.ArgumentParser", "urllib.request.install_opener", "lxml.html.fromstring", "json.dumps", "getpass.getpass", "urllib.parse.urlencode", "os.path.expanduser" ]
[((516, 541), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (539, 541), False, 'import argparse\n'), ((1079, 1100), 'getpass.getpass', 'getpass', (['"""Password: """'], {}), "('Password: ')\n", (1086, 1100), False, 'from getpass import getpass\n'), ((1433, 1470), 'urllib.request.install_opener...
__author__ = "<NAME>" __copyright__ = "Copyright 2022, <NAME>" __email__ = "<EMAIL>" __license__ = "MIT" from abc import abstractmethod import os import sys import contextlib import time import datetime import json import textwrap import stat import shutil import shlex import threading import concurrent.futures import...
[ "snakemake.common.get_container_image", "kubernetes.client.V1ObjectMeta", "kubernetes.client.V1Secret", "kubernetes.client.V1EnvVarSource", "kubernetes.client.CoreV1Api", "shlex.split", "kubernetes.client.V1SecretKeySelector", "time.sleep", "sys.stdout.write", "snakemake.utils.makedirs", "snakem...
[((30617, 30721), 'collections.namedtuple', 'namedtuple', (['"""GenericClusterJob"""', '"""job jobid callback error_callback jobscript jobfinished jobfailed"""'], {}), "('GenericClusterJob',\n 'job jobid callback error_callback jobscript jobfinished jobfailed')\n", (30627, 30721), False, 'from collections import nam...
import os # Late setting of env so pywtk loads correctly pywtk_cache = os.path.join(os.environ['HOME'], 'dropbox', 'pywtk-data') os.environ['PYWTK_CACHE_DIR'] = pywtk_cache import pandas from pywtk.site_lookup import get_3tiersites_from_wkt from pywtk.wtk_api import get_nc_data, WIND_FCST_DIR, WIND_MET_NC_DIR if __n...
[ "pywtk.wtk_api.get_nc_data", "pandas.Timestamp", "os.path.join", "pywtk.site_lookup.get_3tiersites_from_wkt" ]
[((71, 128), 'os.path.join', 'os.path.join', (["os.environ['HOME']", '"""dropbox"""', '"""pywtk-data"""'], {}), "(os.environ['HOME'], 'dropbox', 'pywtk-data')\n", (83, 128), False, 'import os\n'), ((359, 416), 'os.path.join', 'os.path.join', (["os.environ['HOME']", '"""dropbox"""', '"""pywtk-data"""'], {}), "(os.enviro...
from concurrent import futures import time import grpc import quran.endpoints.grpc.audio_pb2_grpc as audio_rpc import quran.endpoints.grpc.ayah_pb2_grpc as ayah_rpc import quran.endpoints.grpc.edition_pb2_grpc as edition_rpc import quran.endpoints.grpc.image_pb2_grpc as image_rpc import quran.endpoints.grpc.surah_pb2_...
[ "quran.endpoints.services.EditionService.EditionService", "quran.endpoints.services.SurahService.SurahService", "quran.endpoints.services.AyahService.AyahService", "concurrent.futures.ThreadPoolExecutor", "time.sleep", "quran.endpoints.services.AudioService.AudioService", "quran.endpoints.services.Image...
[((876, 918), 'concurrent.futures.ThreadPoolExecutor', 'futures.ThreadPoolExecutor', ([], {'max_workers': '(10)'}), '(max_workers=10)\n', (902, 918), False, 'from concurrent import futures\n'), ((963, 977), 'quran.endpoints.services.AudioService.AudioService', 'AudioService', ([], {}), '()\n', (975, 977), False, 'from ...
# Time: O(nlogk + sqrt(k)^2) = O(nlogk + k) # Space: O(sqrt(k)), number of factors of k is at most sqrt(k) import collections # math, number theory class Solution(object): def countPairs(self, nums, k): """ :type nums: List[int] :type k: int :rtype: int """ def gc...
[ "collections.Counter" ]
[((420, 441), 'collections.Counter', 'collections.Counter', ([], {}), '()\n', (439, 441), False, 'import collections\n'), ((1173, 1194), 'collections.Counter', 'collections.Counter', ([], {}), '()\n', (1192, 1194), False, 'import collections\n')]
import requests from datetime import date import json def parse_response(resp): """Parses given JSON from Otodom API response. :param resp: Dict from API response body. :return: Dict with parsed parameters. """ filter_only = ['url', 'title', 'features', 'status'] parsed_resp = {key: val for k...
[ "datetime.date.today", "requests.get" ]
[((1248, 1265), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (1260, 1265), False, 'import requests\n'), ((403, 415), 'datetime.date.today', 'date.today', ([], {}), '()\n', (413, 415), False, 'from datetime import date\n')]
"""Torch Module for Atomic Convolution Layer""" # pylint: disable= no-member, arguments-differ, invalid-name import numpy as np import torch as th import torch.nn as nn class RadialPooling(nn.Module): r"""Radial pooling from paper `Atomic Convolutional Networks for Predicting Protein-Ligand Binding Affinity <h...
[ "torch.exp", "torch.cos", "torch.nn.Parameter", "torch.einsum", "torch.zeros_like" ]
[((2592, 2625), 'torch.exp', 'th.exp', (['scaled_euclidean_distance'], {}), '(scaled_euclidean_distance)\n', (2598, 2625), True, 'import torch as th\n'), ((2869, 2894), 'torch.zeros_like', 'th.zeros_like', (['cos_values'], {}), '(cos_values)\n', (2882, 2894), True, 'import torch as th\n'), ((7449, 7499), 'torch.nn.Para...
from ast import literal_eval import copy import yaml import numpy as np import os import argparse class AttrDict(dict): def __getattr__(self, name): if name in self.__dict__: return self.__dict__[name] elif name in self: return self[name] else: raise Att...
[ "argparse.ArgumentParser", "yaml.load", "ast.literal_eval", "numpy.array", "os.path.basename", "copy.deepcopy" ]
[((4642, 4667), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (4665, 4667), False, 'import argparse\n'), ((5148, 5160), 'yaml.load', 'yaml.load', (['f'], {}), '(f)\n', (5157, 5160), False, 'import yaml\n'), ((6805, 6822), 'copy.deepcopy', 'copy.deepcopy', (['v_'], {}), '(v_)\n', (6818, 6822), ...
"""Amazon S3 Text Write Module (PRIVATE).""" import csv import logging import uuid from distutils.version import LooseVersion from typing import Any, Dict, List, Optional, Tuple, Union import boto3 import pandas as pd from pandas.io.common import infer_compression from awswrangler import _data_types, _utils, catalog...
[ "logging.getLogger", "awswrangler.s3._write._sanitize", "awswrangler.exceptions.InvalidArgumentCombination", "awswrangler._data_types.athena_types_from_pandas_partitioned", "awswrangler._utils.ensure_session", "awswrangler.exceptions.InvalidArgument", "awswrangler.exceptions.InvalidArgumentValue", "di...
[((650, 677), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (667, 677), False, 'import logging\n'), ((15989, 16239), 'awswrangler.s3._write._validate_args', '_validate_args', ([], {'df': 'df', 'table': 'table', 'database': 'database', 'dataset': 'dataset', 'path': 'path', 'partition_cols...
import unittest import numpy as np import pickle from syft.nn.linear import LinearClassifier from syft.he.paillier import KeyPair, PaillierTensor class PySonarNotebooks(unittest.TestCase): def modelTrainingDemoNotebook(self): """If this test fails, you probably broke the demo notebook located at ...
[ "numpy.ones", "syft.nn.linear.LinearClassifier", "pickle.dumps", "numpy.array", "syft.he.paillier.KeyPair", "pickle.loads" ]
[((497, 565), 'syft.nn.linear.LinearClassifier', 'LinearClassifier', ([], {'desc': '"""DiabetesClassifier"""', 'n_inputs': '(10)', 'n_labels': '(1)'}), "(desc='DiabetesClassifier', n_inputs=10, n_labels=1)\n", (513, 565), False, 'from syft.nn.linear import LinearClassifier\n'), ((1829, 1844), 'pickle.dumps', 'pickle.du...
from flask import Flask from config import Config from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask_login import LoginManager app = Flask(__name__) # Initialize Configurations app.config.from_object(Config) # Initialize Database Connection db = SQLAlchemy(app) migrate = Migrate(app...
[ "flask_sqlalchemy.SQLAlchemy", "flask_login.LoginManager", "flask_migrate.Migrate", "flask.Flask" ]
[((168, 183), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (173, 183), False, 'from flask import Flask\n'), ((283, 298), 'flask_sqlalchemy.SQLAlchemy', 'SQLAlchemy', (['app'], {}), '(app)\n', (293, 298), False, 'from flask_sqlalchemy import SQLAlchemy\n'), ((309, 325), 'flask_migrate.Migrate', 'Migrate',...
"""Semantic Role Labeling related modeling class""" from copy import deepcopy from typing import List, Optional from pororo.tasks.utils.base import PororoFactoryBase, PororoSimpleBase class PororoSrlFactory(PororoFactoryBase): """ Conduct semantic role labeling Korean (`charbert.base.ko.srl`) ...
[ "pororo.models.brainbert.RobertaLabelModel.load_model", "pororo.tasks.PororoPosFactory", "copy.deepcopy" ]
[((3434, 3449), 'copy.deepcopy', 'deepcopy', (['words'], {}), '(words)\n', (3442, 3449), False, 'from copy import deepcopy\n'), ((1879, 1948), 'pororo.tasks.PororoPosFactory', 'PororoPosFactory', ([], {'task': '"""pos"""', 'model': '"""mecab-ko"""', 'lang': 'self.config.lang'}), "(task='pos', model='mecab-ko', lang=sel...
from copy import deepcopy from collections import OrderedDict from quant_sim.stats_mgmt.statistics import Statistics from quant_sim.order_mgmt.order_mngr import Order_Manager from quant_sim.environment import Environment from quant_sim.errors import Date_Not_In_History_Error class Algorithm(object): """ Base ...
[ "quant_sim.stats_mgmt.statistics.Statistics", "quant_sim.order_mgmt.order_mngr.Order_Manager", "quant_sim.environment.Environment", "collections.OrderedDict" ]
[((1796, 1826), 'quant_sim.order_mgmt.order_mngr.Order_Manager', 'Order_Manager', (['*args'], {}), '(*args, **kwargs)\n', (1809, 1826), False, 'from quant_sim.order_mgmt.order_mngr import Order_Manager\n'), ((1853, 1880), 'quant_sim.stats_mgmt.statistics.Statistics', 'Statistics', (['*args'], {}), '(*args, **kwargs)\n'...
""" Script for testing purposes. """ import zmq def run(port=5555): context = zmq.Context() # using zmq.ROUTER socket = context.socket(zmq.ROUTER) # bind socket socket.bind('tcp://*:{}'.format(port)) while True: msg = socket.recv_multipart() print('Received message {}'.format...
[ "zmq.Context" ]
[((83, 96), 'zmq.Context', 'zmq.Context', ([], {}), '()\n', (94, 96), False, 'import zmq\n')]
#! /usr/bin/env python3 """ run_sim.py Run FPGA simulations via Icarus, NCVerilog, Modelsim or Isim. """ import json import os import shlex import subprocess import sys import argparse import string def which(program): """ Find the path to an executable program """ def is_exe(fpath): """ ...
[ "string.Template", "argparse.ArgumentParser", "shlex.split", "subprocess.Popen", "os.access", "os.path.join", "os.path.split", "os.path.isfile", "sys.exit", "json.load" ]
[((672, 694), 'os.path.split', 'os.path.split', (['program'], {}), '(program)\n', (685, 694), False, 'import os\n'), ((1042, 1100), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Run FPGA Simulation"""'}), "(description='Run FPGA Simulation')\n", (1065, 1100), False, 'import argparse\n')...
# -------------------------------------------------------- # Faster R-CNN # Licensed under The MIT License [see LICENSE for details] # Written by <NAME> and <NAME> # -------------------------------------------------------- from __future__ import absolute_import from __future__ import division from __future__ import pri...
[ "numpy.unique", "numpy.hstack", "numpy.where", "model.bbox_transform.clip_boxes", "numpy.zeros", "model.bbox_transform.bbox_transform_inv" ]
[((1137, 1179), 'model.bbox_transform.bbox_transform_inv', 'bbox_transform_inv', (['anchors', 'rpn_bbox_pred'], {}), '(anchors, rpn_bbox_pred)\n', (1155, 1179), False, 'from model.bbox_transform import bbox_transform_inv, clip_boxes\n'), ((1194, 1228), 'model.bbox_transform.clip_boxes', 'clip_boxes', (['proposals', 'im...
import json from typing import List from injector import inject from sqlalchemy import text from infrastructure.dependency.scopes import IScoped from infrastructure.json.JsonConvert import JsonConvert from models.configs.ApplicationConfig import ApplicationConfig @JsonConvert.register class Pagination: def __i...
[ "json.dumps", "sqlalchemy.text" ]
[((5125, 5139), 'sqlalchemy.text', 'text', (['sortable'], {}), '(sortable)\n', (5129, 5139), False, 'from sqlalchemy import text\n'), ((7878, 7905), 'json.dumps', 'json.dumps', (['pagination_json'], {}), '(pagination_json)\n', (7888, 7905), False, 'import json\n')]
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
[ "numpy.random.rand", "mindspore.context.set_context", "mindspore.ops.operations.BroadcastTo", "mindspore.common.tensor.Tensor", "pytest.raises", "numpy.broadcast_to" ]
[((935, 1000), 'mindspore.context.set_context', 'context.set_context', ([], {'mode': 'context.GRAPH_MODE', 'device_target': '"""GPU"""'}), "(mode=context.GRAPH_MODE, device_target='GPU')\n", (954, 1000), True, 'import mindspore.context as context\n'), ((1145, 1173), 'numpy.broadcast_to', 'np.broadcast_to', (['x_np', 's...
from __future__ import print_function, absolute_import, division import json import boto3 def get_lambda_config_property(context, property_name=None): """ Extract JSON properties from the JSON encoded description. Return the value for the property, None if not found, all properties if no name given. ...
[ "json.loads", "boto3.client" ]
[((345, 367), 'boto3.client', 'boto3.client', (['"""lambda"""'], {}), "('lambda')\n", (357, 367), False, 'import boto3\n'), ((622, 645), 'json.loads', 'json.loads', (['description'], {}), '(description)\n', (632, 645), False, 'import json\n')]
""" Tests for simulation smoothing Author: <NAME> License: Simplified-BSD """ import os import numpy as np from numpy.testing import assert_allclose, assert_equal import pandas as pd from statsmodels import datasets from statsmodels.tsa.statespace import mlemodel, sarimax, structural from statsmodels.tsa.statespace....
[ "numpy.testing.assert_equal", "pandas.read_csv", "numpy.log", "numpy.array", "numpy.arange", "pandas.date_range", "numpy.testing.assert_allclose", "numpy.dot", "numpy.random.seed", "numpy.random.normal", "numpy.eye", "numpy.ones", "statsmodels.datasets.macrodata.load_pandas", "numpy.linalg...
[((443, 468), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (458, 468), False, 'import os\n'), ((24681, 24742), 'pandas.date_range', 'pd.date_range', ([], {'start': '"""1959-01-01"""', 'end': '"""2009-7-01"""', 'freq': '"""QS"""'}), "(start='1959-01-01', end='2009-7-01', freq='QS')\n", (2469...
import os import argparse import pandas as pd from models.tf.nlp.bert.bert_models import BertTrainer from util.corpus import train_test_split_from_data_frame from util.label import encode_labels if __name__ == '__main__': parser = argparse.ArgumentParser(description='train cls models on bert.') parser.add...
[ "models.tf.nlp.bert.bert_models.BertTrainer.DataFrameSingleTextInputProcessor", "argparse.ArgumentParser", "os.path.join", "tensorflow.logging.set_verbosity", "util.corpus.train_test_split_from_data_frame", "util.label.encode_labels" ]
[((240, 304), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""train cls models on bert."""'}), "(description='train cls models on bert.')\n", (263, 304), False, 'import argparse\n'), ((760, 796), 'util.corpus.train_test_split_from_data_frame', 'train_test_split_from_data_frame', (['df'], ...
# ############################################################################## # This file is part of df_config # # # # Copyright (C) 2020 <NAME> <<EMAIL>> # # All Rights Res...
[ "df_config.config.fields_providers.PythonConfigFieldsProvider" ]
[((1423, 1495), 'df_config.config.fields_providers.PythonConfigFieldsProvider', 'PythonConfigFieldsProvider', (['"""test_df_config.data.sample_iniconf:MAPPING"""'], {}), "('test_df_config.data.sample_iniconf:MAPPING')\n", (1449, 1495), False, 'from df_config.config.fields_providers import PythonConfigFieldsProvider\n')...
import json import os import sqlite3 import time from local import LOG_DIR from pathlib import Path # Update the list based on the Browsers you use browsers = ['brave','chrome','firefox','safari','edge'] USER_PATH = str(Path.home()) def get_path(browser,browser_params): if browser == 'brave': BRAVE_PATH...
[ "json.dumps", "pathlib.Path.home", "time.strftime", "sqlite3.connect" ]
[((223, 234), 'pathlib.Path.home', 'Path.home', ([], {}), '()\n', (232, 234), False, 'from pathlib import Path\n'), ((4180, 4210), 'time.strftime', 'time.strftime', (['"""%Y%m%d-%H%M%S"""'], {}), "('%Y%m%d-%H%M%S')\n", (4193, 4210), False, 'import time\n'), ((3342, 3386), 'sqlite3.connect', 'sqlite3.connect', (["browse...
# -*- coding: utf-8 -*- from django.conf import settings from wagtail.core.models import Site from .models import Product, ShopSettings, Order, OrderStatus class Cart: """ Shopping cart container """ def __init__(self, request): self.session = request.session self.session['shipping']...
[ "wagtail.core.models.Site.objects.get" ]
[((458, 496), 'wagtail.core.models.Site.objects.get', 'Site.objects.get', ([], {'is_default_site': '(True)'}), '(is_default_site=True)\n', (474, 496), False, 'from wagtail.core.models import Site\n')]
import os import numpy as np import pytest from napari import Viewer, layers from napari._tests.utils import ( add_layer_by_type, check_view_transform_consistency, check_viewer_functioning, layer_test_data, ) from napari.utils._tests.test_naming import eval_with_filename def test_viewer(make_test_vi...
[ "napari.utils._tests.test_naming.eval_with_filename", "napari.Viewer", "numpy.random.rand", "os.getenv", "pytest.mark.run", "numpy.random.random", "napari._tests.utils.check_view_transform_consistency", "napari._tests.utils.check_viewer_functioning", "numpy.count_nonzero", "pytest.mark.parametrize...
[((1213, 1237), 'pytest.mark.run', 'pytest.mark.run', ([], {'order': '(1)'}), '(order=1)\n', (1228, 1237), False, 'import pytest\n'), ((1747, 1814), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""layer_class, data, ndim"""', 'layer_test_data'], {}), "('layer_class, data, ndim', layer_test_data)\n", (1770, ...
import os from dotenv import load_dotenv from opensearchpy import OpenSearch HOST = 'localhost' PORT = 9200 # Create an OpenSearch client instance and put it into Flask shared space for use by the application def get_opensearch(): load_dotenv() auth = ( os.environ.get("OPENSEARCH_USERNAME", None), ...
[ "os.environ.get", "opensearchpy.OpenSearch", "dotenv.load_dotenv" ]
[((237, 250), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (248, 250), False, 'from dotenv import load_dotenv\n'), ((414, 589), 'opensearchpy.OpenSearch', 'OpenSearch', ([], {'hosts': "[{'host': HOST, 'port': PORT}]", 'http_compress': '(True)', 'http_auth': 'auth', 'use_ssl': '(True)', 'verify_certs': '(False...
'''Module to manage and advanced game state''' from collections import defaultdict import numpy as np from . import constants from . import characters from . import utility class ForwardModel(object): """Class for helping with the [forward] modeling of the game state.""" def run(self, num_times...
[ "numpy.where", "numpy.zeros_like", "collections.defaultdict", "numpy.zeros" ]
[((10750, 10766), 'collections.defaultdict', 'defaultdict', (['int'], {}), '(int)\n', (10761, 10766), False, 'from collections import defaultdict\n'), ((10792, 10808), 'collections.defaultdict', 'defaultdict', (['int'], {}), '(int)\n', (10803, 10808), False, 'from collections import defaultdict\n'), ((20273, 20298), 'n...
# coding: utf8 """ This software is licensed under the Apache 2 license, quoted below. Copyright 2014 Crystalnix Limited 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/...
[ "omaha.factories.ApplicationFactory.create", "datetime.datetime", "mock.patch", "omaha.factories.ChannelFactory.create", "omaha.utils.get_id", "omaha.models.Request.objects.get", "datetime.datetime.utcnow", "omaha.tests.utils.temporary_media_root", "django.test.client.Client", "omaha.factories.Pla...
[((1768, 1802), 'freezegun.freeze_time', 'freeze_time', (['"""2014-01-01 15:41:48"""'], {}), "('2014-01-01 15:41:48')\n", (1779, 1802), False, 'from freezegun import freeze_time\n'), ((2252, 2286), 'freezegun.freeze_time', 'freeze_time', (['"""2014-01-01 15:41:48"""'], {}), "('2014-01-01 15:41:48')\n", (2263, 2286), Fa...
import copy from timsconvert import * def run_tims_converter(args): # Load in input data. logging.info(get_timestamp() + ':' + 'Loading input data...') if not args['input'].endswith('.d'): input_files = dot_d_detection(args['input']) elif args['input'].endswith('.d'): input_files = [ar...
[ "copy.deepcopy" ]
[((432, 451), 'copy.deepcopy', 'copy.deepcopy', (['args'], {}), '(args)\n', (445, 451), False, 'import copy\n')]
#  Copyright 2019 LINE Corporation # #  Licensed under the Apache License, Version 2.0 (the "License"); you may #  not use this file except in compliance with the License. You may obtain #  a copy of the License at # #       https://www.apache.org/licenses/LICENSE-2.0 # #  Unless required by applicable law or agreed to...
[ "re.search", "skills.skills_help_text.get", "skills.add_skill", "re.compile" ]
[((756, 860), 'skills.add_skill', 'add_skill', ([], {'pattern': '"""(헬프)|(help)|(도움)|(도와줘)"""', 'help_text': '"""파이콘 한국 2019 도우미 LINE BOT이 제공하는 기능을 알려드립니다."""'}), "(pattern='(헬프)|(help)|(도움)|(도와줘)', help_text=\n '파이콘 한국 2019 도우미 LINE BOT이 제공하는 기능을 알려드립니다.')\n", (765, 860), False, 'from skills import add_skill\n'), (...
from acacia import git, utils import os,sys import plac from pprint import pprint from datetime import datetime GIT_CACHE='/tmp/git-cache-3' def extract_timing_data(commit_id, repo_url, verbose=False, git_cache=GIT_CACHE): if not os.path.exists(git_cache): print('Folder ' + git_cache + ' must exist!'...
[ "os.path.exists", "plac.annotations", "plac.call", "acacia.git.clone_repo", "acacia.utils.execute", "acacia.git.folder_name_from_url" ]
[((1883, 2157), 'plac.annotations', 'plac.annotations', ([], {'repo_url': "('Repository', 'positional', None, str, None, 'REPOSITORY')", 'commit_id': "('Commit', 'positional', None, str, None, 'COMMIT')", 'verbose': "('Verbose', 'flag', 'v', bool)", 'git_cache': "('Git repository dir', 'option', 'g', str, None, 'REPO_D...
# Copyright 2017 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.python.framework.ops.RegisterGradient", "re.escape", "tensorflow.python.ops.gen_array_ops._debug_gradient_identity", "re.compile", "tensorflow.python.debug.lib.debug_data.parse_node_or_tensor_name", "uuid.uuid4" ]
[((12608, 12653), 'tensorflow.python.framework.ops.RegisterGradient', 'ops.RegisterGradient', (['"""DebugGradientIdentity"""'], {}), "('DebugGradientIdentity')\n", (12628, 12653), False, 'from tensorflow.python.framework import ops\n'), ((1230, 1279), 'tensorflow.python.debug.lib.debug_data.parse_node_or_tensor_name', ...
"""Ackley Function https://www.sfu.ca/~ssurjano/ackley.html Description: Dimensions: d The Ackley function is widely used for testing optimization algorithms. In its two-dimensional form, as shown in the plot [at the link above], it is characterized by a nearly flat outer region, and a large hole at the centre. The f...
[ "csaopt.utils.clamp", "csaopt.utils.FakeCuda.jit", "math.sqrt", "math.cos", "math.exp" ]
[((1679, 1713), 'csaopt.utils.FakeCuda.jit', 'cuda.jit', ([], {'device': '(True)', 'inline': '(True)'}), '(device=True, inline=True)\n', (1687, 1713), True, 'from csaopt.utils import FakeCuda as cuda\n'), ((1787, 1808), 'csaopt.utils.FakeCuda.jit', 'cuda.jit', ([], {'device': '(True)'}), '(device=True)\n', (1795, 1808)...