code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
""" This program helps you capture data for training easily. It asks you what character you intend to show it and then captures likely character locations and saves in output directory at regular intervals. Please note that module looking for likely character locations isn't perfect and sometimes makes mistakes, so you...
[ "os.makedirs", "os.path.basename", "cv2.waitKey", "cv2.imwrite", "configobj.ConfigObj", "cv2.VideoCapture", "re.findall", "cv2.drawContours", "cv2.imshow", "os.path.join" ]
[((585, 618), 'os.path.join', 'os.path.join', (['dir_path', 'file_name'], {}), '(dir_path, file_name)\n', (597, 618), False, 'import os\n'), ((623, 654), 'cv2.imwrite', 'cv2.imwrite', (['output_path', 'image'], {}), '(output_path, image)\n', (634, 654), False, 'import cv2\n'), ((1150, 1201), 'os.path.join', 'os.path.jo...
import pytest from . import test_bptt_wgan from .. import bptt_cwgan def single_g_step(args): bptt_cwgan.main([ '--iterations', '1', '--truth_size', '1', '--num-models', '2', '--n_bandwidths', '1', '--WGAN_n_critic0', '1', '--seqlen', '4', '--skip-steps', '...
[ "pytest.mark.parametrize" ]
[((384, 544), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""args"""', "[[], ['--num-models', '1'], ['--sample-sites', '0, 0.5'], ['--contrasts',\n '5, 20'], ['--include-inhibitory-neurons']]"], {}), "('args', [[], ['--num-models', '1'], [\n '--sample-sites', '0, 0.5'], ['--contrasts', '5, 20'], [\n ...
# -*- coding: utf-8 -*- # # K2HDKC DBaaS based on Trove # # Copyright 2020 Yahoo Japan Corporation # # K2HDKC DBaaS is a Database as a Service compatible with Trove which # is DBaaS for OpenStack. # Using K2HR3 as backend and incorporating it into Trove to provide # DBaaS functionality. K2HDKC, K2HR3, CHMPX and K2HASH ...
[ "k2hr3client.policy.K2hr3Policy", "logging.getLogger" ]
[((786, 813), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (803, 813), False, 'import logging\n'), ((1581, 1733), 'k2hr3client.policy.K2hr3Policy', 'K2hr3Policy', (['self.token'], {'name': 'self.name', 'effect': 'self.effect', 'action': 'self.action', 'resource': 'self.resource', 'condi...
import decimal from dataclasses import dataclass from typing import TYPE_CHECKING, Any, List, Optional from ...payment.interface import GatewayResponse, PaymentGateway, PaymentMethodInfo if TYPE_CHECKING: from ...app.models import App from ...payment.interface import PaymentData APP_GATEWAY_ID_PREFIX = "app...
[ "decimal.Decimal" ]
[((2502, 2542), 'decimal.Decimal', 'decimal.Decimal', (["response_data['amount']"], {}), "(response_data['amount'])\n", (2517, 2542), False, 'import decimal\n')]
import numpy as np def to_categorical(y, num_classes=None): """Converts a class vector (integers) to binary class matrix. E.g. for use with categorical_crossentropy. # Arguments y: class vector to be converted into a matrix (integers from 0 to num_classes). num_classes: total...
[ "numpy.zeros", "numpy.max", "numpy.arange", "numpy.array", "numpy.reshape" ]
[((465, 489), 'numpy.array', 'np.array', (['y'], {'dtype': '"""int"""'}), "(y, dtype='int')\n", (473, 489), True, 'import numpy as np\n'), ((747, 791), 'numpy.zeros', 'np.zeros', (['(n, num_classes)'], {'dtype': 'np.float32'}), '((n, num_classes), dtype=np.float32)\n', (755, 791), True, 'import numpy as np\n'), ((895, ...
"""ACME protocol messages.""" import datetime from collections.abc import Hashable import json from typing import Any from typing import Dict from typing import Iterator from typing import List from typing import Mapping from typing import MutableMapping from typing import Optional from typing import Tuple from typing ...
[ "acme.util.map_keys", "josepy.b64.b64decode", "acme.challenges.Challenge.from_json", "typing.TypeVar", "josepy.jwk.JWKOct", "josepy.field", "acme.fields.rfc3339", "acme.fields.resource" ]
[((7489, 7545), 'typing.TypeVar', 'TypeVar', (['"""GenericHasResourceType"""'], {'bound': 'HasResourceType'}), "('GenericHasResourceType', bound=HasResourceType)\n", (7496, 7545), False, 'from typing import TypeVar\n'), ((11605, 11657), 'typing.TypeVar', 'TypeVar', (['"""GenericRegistration"""'], {'bound': '"""Registra...
from datetime import datetime from sqlalchemy import select from sqlalchemy.orm import Session from src.PagoModel import Pago from src.config import engine def test_new_registry_between_fecha_range_clone_and_disable_highers_than_new(): PAGOS_TO_INSERT = [ Pago(id_contrato=12, id_cliente=99, fecha=dateti...
[ "sqlalchemy.orm.Session", "sqlalchemy.select", "src.PagoModel.Pago.add_registry", "datetime.datetime" ]
[((604, 619), 'sqlalchemy.orm.Session', 'Session', (['engine'], {}), '(engine)\n', (611, 619), False, 'from sqlalchemy.orm import Session\n'), ((1031, 1046), 'sqlalchemy.orm.Session', 'Session', (['engine'], {}), '(engine)\n', (1038, 1046), False, 'from sqlalchemy.orm import Session\n'), ((1190, 1233), 'src.PagoModel.P...
from datetime import datetime import pandas as pd import numpy as np # 将根目录(execute所在目录)添加到环境变量 from utils.GlobalVar import add_path_to_sys rootdir = add_path_to_sys() # 导入考勤状态判断相关函数和变量 from utils.GlobalVar import COURSE_TIME, LATE_SPAN filenames = ['Auxiliary_Info.xlsx', 'Classroom_Course_Schedule.xls...
[ "utils.GlobalVar.add_path_to_sys", "datetime.datetime", "pandas.read_excel", "datetime.datetime.strptime", "datetime.datetime.now" ]
[((151, 168), 'utils.GlobalVar.add_path_to_sys', 'add_path_to_sys', ([], {}), '()\n', (166, 168), False, 'from utils.GlobalVar import add_path_to_sys\n'), ((450, 505), 'pandas.read_excel', 'pd.read_excel', (["(rootdir + '/development/' + filenames[0])"], {}), "(rootdir + '/development/' + filenames[0])\n", (463, 505), ...
from django.contrib import admin from cover_letter.models import Reference # Entities admin.site.register(Reference)
[ "django.contrib.admin.site.register" ]
[((88, 118), 'django.contrib.admin.site.register', 'admin.site.register', (['Reference'], {}), '(Reference)\n', (107, 118), False, 'from django.contrib import admin\n')]
import asyncio import pickle import typing from aioredis import RedisConnection from dataclasses import dataclass, field from itertools import chain from ._mixins import DisableMethodsMixin from .interfaces import BackendInterface, FactoryInterface __all__ = ("RedisBackend",) @dataclass(order=False, eq=False, repr...
[ "dataclasses.field", "dataclasses.dataclass" ]
[((283, 327), 'dataclasses.dataclass', 'dataclass', ([], {'order': '(False)', 'eq': '(False)', 'repr': '(False)'}), '(order=False, eq=False, repr=False)\n', (292, 327), False, 'from dataclasses import dataclass, field\n'), ((562, 581), 'dataclasses.field', 'field', ([], {'default': 'None'}), '(default=None)\n', (567, 5...
import django from django import template from django.template.defaulttags import url from django.template import Node, TemplateSyntaxError from treemenusplus.models import Menu, MenuItem from treemenusplus.config import APP_LABEL register = template.Library() @register.simple_tag def get_treemenus_static_prefix()...
[ "django.template.Library", "treemenusplus.models.Menu.objects.get", "django.template.base.Token", "django.template.TemplateSyntaxError", "django.templatetags.static.PrefixNode.handle_simple", "django.contrib.admin.templatetags.adminmedia.admin_media_prefix" ]
[((245, 263), 'django.template.Library', 'template.Library', ([], {}), '()\n', (261, 263), False, 'from django import template\n'), ((698, 730), 'treemenusplus.models.Menu.objects.get', 'Menu.objects.get', ([], {'name': 'menu_name'}), '(name=menu_name)\n', (714, 730), False, 'from treemenusplus.models import Menu, Menu...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2019 The FATE 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/lic...
[ "federatedml.statistic.data_overview.check_with_inst_id", "federatedml.statistic.intersect.DhIntersectionHost", "federatedml.util.LOGGER.info", "federatedml.util.abnormal_detection.empty_table_detection", "federatedml.param.intersect_param.IntersectParam", "federatedml.util.consts.OT_HAUCK.lower", "fede...
[((1901, 1921), 'federatedml.statistic.intersect.DhIntersectionHost', 'DhIntersectionHost', ([], {}), '()\n', (1919, 1921), False, 'from federatedml.statistic.intersect import DhIntersectionHost\n'), ((1997, 2037), 'federatedml.param.intersect_param.IntersectParam', 'IntersectParam', ([], {'dh_params': 'self.dh_params'...
import re from pygments.lexer import Lexer, RegexLexer, include, bygroups, using, \ default, words, combined, do_insertions from pygments.util import get_bool_opt, shebang_matches from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ Number, Punctuation, Generic, Other, Error from...
[ "pygments.lexer.combined", "pygments.lexer.default", "pygments.util.shebang_matches", "pygments.lexer.words", "pygments.lexer.bygroups", "pygments.lexer.include" ]
[((11034, 11077), 'pygments.util.shebang_matches', 'shebang_matches', (['text', '"""pythonw?2(\\\\.\\\\d)?"""'], {}), "(text, 'pythonw?2(\\\\.\\\\d)?')\n", (11049, 11077), False, 'from pygments.util import get_bool_opt, shebang_matches\n'), ((2067, 2086), 'pygments.lexer.include', 'include', (['"""keywords"""'], {}), "...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_pymspack ---------------------------------- Tests for `pymspack` module. """ import pymspack import tempfile def test_module(): assert pymspack def test_cabfile(): cab = pymspack.CabFile() assert cab def test_infolist(): import os.path c...
[ "shutil.rmtree", "pymspack.CabFile", "tempfile.mkdtemp", "hashlib.new" ]
[((239, 257), 'pymspack.CabFile', 'pymspack.CabFile', ([], {}), '()\n', (255, 257), False, 'import pymspack\n'), ((916, 934), 'tempfile.mkdtemp', 'tempfile.mkdtemp', ([], {}), '()\n', (932, 934), False, 'import tempfile\n'), ((1085, 1103), 'hashlib.new', 'hashlib.new', (['"""md5"""'], {}), "('md5')\n", (1096, 1103), Fa...
############################################ #Treatment ############################################ import arcpy ##T1## #SA of 300m was identified from existing TX, given they do not reach injection TX. If they reach an injection TX, the SA stops. #Set local variables district = "NAME OF DISTRICT" LV_lines = "PA...
[ "arcpy.management.GetCount", "arcpy.CalculateAreas_stats", "arcpy.Merge_management", "arcpy.SelectLayerByLocation_management", "arcpy.SelectData_management", "arcpy.na.Solve", "arcpy.AddGeometryAttributes_management", "arcpy.MakeFeatureLayer_management", "arcpy.na.AddLocations", "arcpy.SelectLayer...
[((603, 843), 'arcpy.na.MakeServiceAreaLayer', 'arcpy.na.MakeServiceAreaLayer', (['network', '"""Existing_TX Service Area"""', '"""Length"""', '"""TRAVEL_FROM"""', '"""300"""', '"""DETAILED_POLYS"""', '"""MERGE"""', '"""DISKS"""', '"""NO_LINES"""', '"""NON_OVERLAP"""', '"""NO_SPLIT"""', 'Feeders', '""""""', '""""""', '...
# -*- coding: utf-8 -*- from . import __version__ from intake.source.base import DataSource from .rolling_store import OffSetS3Map import xarray def maybe_to_iris(ds): if len(ds.data_vars) == 1: return ds[list(ds.data_vars)[0]].to_iris() return ds class RollingZarrSource(DataSource): """Common ...
[ "xarray.open_zarr" ]
[((1159, 1182), 'xarray.open_zarr', 'xarray.open_zarr', (['store'], {}), '(store)\n', (1175, 1182), False, 'import xarray\n')]
# -*- coding: utf-8 -*- """ Functions relating velocity trend extrapolation """ from __future__ import (absolute_import, division, print_function, unicode_literals) __author__ = "yuhao" import numpy as np from pygeopressure.basic.well_log import Log # from ..well_log import Log v0 = 1600 # t...
[ "numpy.array", "numpy.exp", "pygeopressure.basic.well_log.Log" ]
[((1209, 1226), 'numpy.exp', 'np.exp', (['(x * b - a)'], {}), '(x * b - a)\n', (1215, 1226), True, 'import numpy as np\n'), ((1474, 1479), 'pygeopressure.basic.well_log.Log', 'Log', ([], {}), '()\n', (1477, 1479), False, 'from pygeopressure.basic.well_log import Log\n'), ((1496, 1519), 'numpy.array', 'np.array', (['vel...
#python # Quixel stuff from here: # https://github.com/Quixel/Bridge-Python-Plugin import json, sys, socket, time, threading import lx import lxifc import lxu try: #py3 import queue as q except ImportError: import Queue as q import modo com_listener = None g_bNewMeshAdded = False g_newMaskAdded = False g_mesh...
[ "threading.Thread.__init__", "lx.object.Unknown", "json.loads", "lx.eval", "modo.Mesh", "lx.service.Platform", "Queue.Queue", "socket.socket", "lx.service.Thread", "time.sleep", "lx.bless", "lx.service.Listener", "lxu.command.BasicCommand.__init__", "modo.Item", "modo.Scene", "sys.exc_...
[((370, 379), 'Queue.Queue', 'q.Queue', ([], {}), '()\n', (377, 379), True, 'import Queue as q\n'), ((9252, 9298), 'lx.bless', 'lx.bless', (['StartBridgeCMD', '"""quixelBridge.start"""'], {}), "(StartBridgeCMD, 'quixelBridge.start')\n", (9260, 9298), False, 'import lx\n'), ((9299, 9343), 'lx.bless', 'lx.bless', (['Stop...
import time import numpy as np import matplotlib.pyplot as plt from test_farfield import make_meshes from tectosaur.ops.sparse_integral_op import RegularizedSparseIntegralOp from tectosaur.ops.dense_integral_op import RegularizedDenseIntegralOp from tectosaur.ops.sparse_farfield_op import TriToTriDirectFarfieldOp from ...
[ "numpy.ones", "numpy.isnan", "matplotlib.pyplot.figure", "numpy.exp", "tectosaur.ops.sparse_integral_op.RegularizedSparseIntegralOp", "tectosaur.logger.setLevel", "numpy.full", "tectosaur.ops.dense_integral_op.RegularizedDenseIntegralOp", "numpy.testing.assert_almost_equal", "matplotlib.pyplot.col...
[((1550, 1585), 'numpy.zeros', 'np.zeros', (['(dof_pts.shape[0] * 3, 3)'], {}), '((dof_pts.shape[0] * 3, 3))\n', (1558, 1585), True, 'import numpy as np\n'), ((1863, 1884), 'tectosaur.constraint_builders.find_free_edges', 'find_free_edges', (['m[1]'], {}), '(m[1])\n', (1878, 1884), False, 'from tectosaur.constraint_bui...
# -*- coding: utf-8 -*- """International Site - Industries page""" import logging from requests import Response, Session from directory_tests_shared import PageType, Service, URLs from tests.functional.utils.request import Method, check_response, make_request SERVICE = Service.INTERNATIONAL NAME = "Industries" TYPE ...
[ "tests.functional.utils.request.make_request", "logging.debug", "tests.functional.utils.request.check_response" ]
[((4971, 5017), 'tests.functional.utils.request.make_request', 'make_request', (['Method.GET', 'URL'], {'session': 'session'}), '(Method.GET, URL, session=session)\n', (4983, 5017), False, 'from tests.functional.utils.request import Method, check_response, make_request\n'), ((5064, 5125), 'tests.functional.utils.reques...
import requests PROXY_POOL_URL = 'http://localhost:5556/countavailable' def get_proxy(): try: response = requests.get(PROXY_POOL_URL) if response.status_code == 200: return response.text except ConnectionError: return None if __name__ == '__main__': print(get_proxy())
[ "requests.get" ]
[((119, 147), 'requests.get', 'requests.get', (['PROXY_POOL_URL'], {}), '(PROXY_POOL_URL)\n', (131, 147), False, 'import requests\n')]
# Copyright 2012 Alyseo. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
[ "cookielib.CookieJar", "cinder.openstack.common.gettextutils._", "cinder.exception.CoraidESMBadCredentials", "oslo.config.cfg.StrOpt", "six.moves.urllib.parse.urljoin", "cinder.openstack.common.jsonutils.loads", "urllib2.Request", "cinder.exception.CoraidESMReloginFailed", "cinder.volume.volume_type...
[((1329, 1356), 'cinder.openstack.common.log.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1346, 1356), True, 'from cinder.openstack.common import log as logging\n'), ((1378, 1455), 'oslo.config.cfg.StrOpt', 'cfg.StrOpt', (['"""coraid_esm_address"""'], {'default': '""""""', 'help': '"""IP addres...
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() lut = vtk.vtkLookupTable() lut.SetHueRange(0.6, 0) lut.SetSaturationRange(1.0, 0) lut.SetValueRange(0.5, 1.0) # Read the data: a height field results demReader = vtk.vtkD...
[ "vtk.vtkGreedyTerrainDecimation", "vtk.vtkRenderer", "vtk.vtkRenderWindow", "vtk.util.misc.vtkGetDataRoot", "vtk.vtkLookupTable", "vtk.vtkLODActor", "vtk.vtkDEMReader", "vtk.vtkRenderWindowInteractor", "vtk.vtkPolyDataNormals", "vtk.vtkPolyDataMapper" ]
[((123, 139), 'vtk.util.misc.vtkGetDataRoot', 'vtkGetDataRoot', ([], {}), '()\n', (137, 139), False, 'from vtk.util.misc import vtkGetDataRoot\n'), ((149, 169), 'vtk.vtkLookupTable', 'vtk.vtkLookupTable', ([], {}), '()\n', (167, 169), False, 'import vtk\n'), ((312, 330), 'vtk.vtkDEMReader', 'vtk.vtkDEMReader', ([], {})...
import asyncio from typing import Dict from aiohttp import web from aiohttp.web_exceptions import HTTPBadRequest, HTTPInternalServerError, HTTPOk from config import Config from log import get_logger from src.thread.concurrent_call import ConcurrentCall logger = get_logger() class AiohttpApi: def __init__(self...
[ "aiohttp.web.patch", "asyncio.set_event_loop", "aiohttp.web.TCPSite", "aiohttp.web.json_response", "log.get_logger", "aiohttp.web.get", "aiohttp.web.AppRunner", "aiohttp.web.Application", "asyncio.new_event_loop" ]
[((265, 277), 'log.get_logger', 'get_logger', ([], {}), '()\n', (275, 277), False, 'from log import get_logger\n'), ((375, 392), 'aiohttp.web.Application', 'web.Application', ([], {}), '()\n', (390, 392), False, 'from aiohttp import web\n'), ((676, 699), 'aiohttp.web.AppRunner', 'web.AppRunner', (['self.app'], {}), '(s...
""" @date 30.08.2019 @author Roman.Detinin<EMAIL> @details :copyright: 2003–2019 Acronis International GmbH, Rheinweg 9, 8200 Schaffhausen, Switzerland. All rights reserved. """ import json import logging import os import requests from jsonschema import validate from requests.auth import HTTPBasicAuth ...
[ "jsonschema.validate", "json.load", "tools.handle_error_response", "os.path.dirname", "requests.get", "requests.post", "requests.auth.HTTPBasicAuth" ]
[((3112, 3143), 'tools.handle_error_response', 'handle_error_response', (['response'], {}), '(response)\n', (3133, 3143), False, 'from tools import handle_error_response\n'), ((4668, 4841), 'requests.post', 'requests.post', (['f"""{self.base_url}/api/2/idp/token"""'], {'verify': '(not use_grpm_config)', 'auth': 'auth',...
from tests.test_util import print_objects from tests.libs_for_tests import prepare_yamllist_for_diff from kalc.model.search import HypothesisysNode, OptimisticRun from kalc.model.system.Scheduler import Scheduler from kalc.model.system.globals import GlobalVar from kalc.model.kinds.Service import Service from kalc.mode...
[ "kalc.model.kinds.Node.Node", "tests.test_util.print_objects", "kalc.model.kinds.Service.Service", "kalc.model.kubernetes.KubernetesCluster", "kalc.model.kinds.Pod.Pod", "tests.libs_for_tests.print_plan", "inspect.stack" ]
[((1244, 1249), 'kalc.model.kinds.Pod.Pod', 'Pod', ([], {}), '()\n', (1247, 1249), False, 'from kalc.model.kinds.Pod import Pod\n'), ((1710, 1715), 'kalc.model.kinds.Pod.Pod', 'Pod', ([], {}), '()\n', (1713, 1715), False, 'from kalc.model.kinds.Pod import Pod\n'), ((2840, 2845), 'kalc.model.kinds.Pod.Pod', 'Pod', ([], ...
from rh_logger.api import logger import logging import numpy as np from scipy.optimize import least_squares import pickle import os import time import scipy.sparse as spp from scipy.sparse.linalg import lsqr import scipy.optimize from rh_renderer.models import RigidModel #import common EPS = 0.000001 class Rigid2DOpt...
[ "scipy.sparse.linalg.lsqr", "numpy.zeros_like", "numpy.ones_like", "numpy.sum", "numpy.abs", "numpy.median", "numpy.empty", "numpy.empty_like", "time.time", "numpy.min", "numpy.sin", "pickle.load", "numpy.array", "numpy.cos", "rh_renderer.models.RigidModel", "numpy.mean", "numpy.dot"...
[((939, 952), 'numpy.cos', 'np.cos', (['theta'], {}), '(theta)\n', (945, 952), True, 'import numpy as np\n'), ((973, 986), 'numpy.sin', 'np.sin', (['theta'], {}), '(theta)\n', (979, 986), True, 'import numpy as np\n'), ((1289, 1331), 'numpy.empty', 'np.empty', (['(matches_num,)'], {'dtype': 'np.float32'}), '((matches_n...
import unittest import orca from setup.settings import * from pandas.util.testing import * class FunctionReorderLevelsTest(unittest.TestCase): @classmethod def setUpClass(cls): # connect to a DolphinDB server orca.connect(HOST, PORT, "admin", "123456") def test_function_reshaping_sorting_...
[ "unittest.main", "orca.connect", "orca.DataFrame" ]
[((778, 793), 'unittest.main', 'unittest.main', ([], {}), '()\n', (791, 793), False, 'import unittest\n'), ((235, 278), 'orca.connect', 'orca.connect', (['HOST', 'PORT', '"""admin"""', '"""123456"""'], {}), "(HOST, PORT, 'admin', '123456')\n", (247, 278), False, 'import orca\n'), ((614, 633), 'orca.DataFrame', 'orca.Da...
#!/usr/bin/env python3 # ------------------------------------------------------------- # salt-get-config-dir command # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Project: salt-wrapper # Licence: BSD-2-Clause # ------------------------------------------------------------- ...
[ "json.load", "os.getcwd", "os.environ.get", "os.path.isfile", "sys.exit" ]
[((533, 604), 'os.environ.get', 'os.environ.get', (['"""SALT_WRAPPER_CONF"""', '"""/usr/local/etc/salt-wrapper.conf"""'], {}), "('SALT_WRAPPER_CONF', '/usr/local/etc/salt-wrapper.conf')\n", (547, 604), False, 'import os\n'), ((1415, 1426), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (1423, 1426), False, 'import sys...
import hmac import logging from hashlib import sha256 from typing import TYPE_CHECKING, Dict, List, Optional from django import forms from django.contrib.auth.models import AnonymousUser from oauth2_provider.contrib.rest_framework import TokenHasScope from oauth2_provider.models import get_access_token_model, get_appl...
[ "django.contrib.auth.models.AnonymousUser", "rest_framework.routers.DefaultRouter", "oauth2_provider.models.get_access_token_model", "oauth2_provider.models.get_application_model", "django.forms.ValidationError", "rest_framework.response.Response", "django.forms.CharField", "logging.getLogger", "drf...
[((725, 752), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (742, 752), False, 'import logging\n'), ((769, 792), 'oauth2_provider.models.get_application_model', 'get_application_model', ([], {}), '()\n', (790, 792), False, 'from oauth2_provider.models import get_access_token_model, get_a...
from django.contrib import admin from .models import Notepad, SharedNotepad # Register your models here. admin.site.register(Notepad) admin.site.register(SharedNotepad)
[ "django.contrib.admin.site.register" ]
[((107, 135), 'django.contrib.admin.site.register', 'admin.site.register', (['Notepad'], {}), '(Notepad)\n', (126, 135), False, 'from django.contrib import admin\n'), ((136, 170), 'django.contrib.admin.site.register', 'admin.site.register', (['SharedNotepad'], {}), '(SharedNotepad)\n', (155, 170), False, 'from django.c...
from abc import ABC, abstractmethod, abstractclassmethod from typing import Dict, Optional import pandas as pd import numpy as np from wiseml.models.types.task_type import TaskType from wiseml.models.types.model_type import ModelType class TrainSet: def __init__(self, X: pd.DataFrame, y: pd.Series): if...
[ "numpy.arange" ]
[((434, 455), 'numpy.arange', 'np.arange', (['X.shape[0]'], {}), '(X.shape[0])\n', (443, 455), True, 'import numpy as np\n')]
'''tzinfo timezone information for Africa/Nairobi.''' from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class Nairobi(DstTzInfo): '''Africa/Nairobi timezone definition. See datetime.tzinfo for details''' zone = 'Africa/Nairobi' ...
[ "pytz.tzinfo.memorized_datetime", "pytz.tzinfo.memorized_ttinfo" ]
[((347, 366), 'pytz.tzinfo.memorized_datetime', 'd', (['(1)', '(1)', '(1)', '(0)', '(0)', '(0)'], {}), '(1, 1, 1, 0, 0, 0)\n', (348, 366), True, 'from pytz.tzinfo import memorized_datetime as d\n'), ((363, 389), 'pytz.tzinfo.memorized_datetime', 'd', (['(1928)', '(6)', '(30)', '(21)', '(32)', '(44)'], {}), '(1928, 6, 3...
######################################################################## # $Header: /var/local/cvsroot/4Suite/Ft/Lib/CommandLine/Arguments.py,v 1.4 2005/04/13 23:41:04 jkloth Exp $ """ Classes that support advanced arg processing for command-line scripts Copyright 2004 Fourthought, Inc. (USA). Detailed license and cop...
[ "CommandLineUtil.ArgumentError" ]
[((983, 1047), 'CommandLineUtil.ArgumentError', 'ArgumentError', (['cmd', '("missing required argument \'%s\'" % self.name)'], {}), '(cmd, "missing required argument \'%s\'" % self.name)\n', (996, 1047), False, 'from CommandLineUtil import ArgumentError\n'), ((1977, 2041), 'CommandLineUtil.ArgumentError', 'ArgumentErro...
from typing import Iterable from eth2spec.test.helpers.constants import PHASE0, ALTAIR, BELLATRIX, MINIMAL, MAINNET from eth2spec.test.helpers.typing import SpecForkName, PresetBaseName from eth2spec.test.altair.fork import test_altair_fork_basic, test_altair_fork_random from eth2spec.test.bellatrix.fork import test_b...
[ "eth2spec.gen_helpers.gen_base.gen_typing.TestProvider", "eth2spec.gen_helpers.gen_from_tests.gen.generate_from_tests" ]
[((1006, 1070), 'eth2spec.gen_helpers.gen_base.gen_typing.TestProvider', 'gen_typing.TestProvider', ([], {'prepare': 'prepare_fn', 'make_cases': 'cases_fn'}), '(prepare=prepare_fn, make_cases=cases_fn)\n', (1029, 1070), False, 'from eth2spec.gen_helpers.gen_base import gen_runner, gen_typing\n'), ((776, 914), 'eth2spec...
""" Trainer creates train ops and goes through all data to train or test. Author: <NAME> Date: Fall 2017 """ import tensorflow as tf import time import sys from random import random import numpy as np def magnitude(complex_spec): return tf.sqrt(complex_spec[:,0] ** 2 + complex_spec[:,1] ** 2) class Trainer: ...
[ "tensorflow.random_uniform", "tensorflow.clip_by_value", "tensorflow.losses.mean_squared_error", "tensorflow.get_collection", "tensorflow.nn.ctc_loss", "tensorflow.losses.sigmoid_cross_entropy", "tensorflow.reduce_mean", "tensorflow.train.AdamOptimizer", "time.time", "tensorflow.placeholder", "t...
[((244, 302), 'tensorflow.sqrt', 'tf.sqrt', (['(complex_spec[:, 0] ** 2 + complex_spec[:, 1] ** 2)'], {}), '(complex_spec[:, 0] ** 2 + complex_spec[:, 1] ** 2)\n', (251, 302), True, 'import tensorflow as tf\n'), ((6789, 6820), 'tensorflow.random_uniform', 'tf.random_uniform', (['[]', '(0.0)', '(1.0)'], {}), '([], 0.0, ...
##################################################################### # Copyright (c) The Caleydo Team, http://caleydo.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2....
[ "os.path.dirname", "os.path.join", "os.path.exists" ]
[((986, 1016), 'os.path.join', 'path.join', (['here', '"""config.json"""'], {}), "(here, 'config.json')\n", (995, 1016), False, 'from os import path\n'), ((946, 968), 'os.path.dirname', 'path.dirname', (['__file__'], {}), '(__file__)\n', (958, 968), False, 'from os import path\n'), ((1041, 1065), 'os.path.exists', 'pat...
import os from distutils.dir_util import mkpath from distutils.file_util import copy_file from . import tools from . import plists from .util import copy_tree from .templates import InstallationCheck from .py3k import StringIO, u def write_template(script_strings, dest, mkpath=mkpath): script, strings = script_s...
[ "distutils.dir_util.mkpath", "os.stat", "os.path.exists", "os.path.splitext", "distutils.file_util.copy_file", "os.path.join" ]
[((339, 378), 'os.path.join', 'os.path.join', (['dest', '"""InstallationCheck"""'], {}), "(dest, 'InstallationCheck')\n", (351, 378), False, 'import os\n'), ((525, 560), 'os.path.join', 'os.path.join', (['dest', '"""English.lproj"""'], {}), "(dest, 'English.lproj')\n", (537, 560), False, 'import os\n'), ((565, 578), 'd...
"""Code for AMS 2019 short course.""" import copy import glob import errno import random import os.path import json import pickle import time import calendar import numpy import netCDF4 import keras from keras import backend as K from sklearn.metrics import auc as scikit_learn_auc import matplotlib.colors import matpl...
[ "numpy.sum", "keras.backend.epsilon", "numpy.ones", "keras.models.Model", "numpy.argsort", "numpy.linalg.svd", "numpy.exp", "keras.layers.Input", "netCDF4.Dataset", "keras.layers.Flatten", "numpy.max", "matplotlib.pyplot.rc", "matplotlib.pyplot.subplots", "keras.backend.gradients", "matp...
[((974, 992), 'numpy.full', 'numpy.full', (['(3)', '(0.0)'], {}), '(3, 0.0)\n', (984, 992), False, 'import numpy\n'), ((1080, 1113), 'matplotlib.pyplot.rc', 'pyplot.rc', (['"""font"""'], {'size': 'FONT_SIZE'}), "('font', size=FONT_SIZE)\n", (1089, 1113), True, 'import matplotlib.pyplot as pyplot\n'), ((1114, 1152), 'ma...
# libraries import numpy as np from bio_embeddings.embed import ProtTransT5BFDEmbedder import pandas as pd embedder = ProtTransT5BFDEmbedder() ds = pd.read_csv('Sequences_Predict.csv') sequences_Example = list(ds["Sequence"]) num_seq = len(sequences_Example) i = 0 length = 1000 while i < num_seq: print("Doing", i...
[ "pandas.read_csv", "numpy.asarray", "numpy.savez_compressed", "bio_embeddings.embed.ProtTransT5BFDEmbedder" ]
[((120, 144), 'bio_embeddings.embed.ProtTransT5BFDEmbedder', 'ProtTransT5BFDEmbedder', ([], {}), '()\n', (142, 144), False, 'from bio_embeddings.embed import ProtTransT5BFDEmbedder\n'), ((151, 187), 'pandas.read_csv', 'pd.read_csv', (['"""Sequences_Predict.csv"""'], {}), "('Sequences_Predict.csv')\n", (162, 187), True,...
"""Console script for yandex_checkout_payout.""" import argparse import sys def main(): """Console script for yandex_checkout_payout.""" parser = argparse.ArgumentParser() # parser.add_argument('_', nargs='*') parser.version = '1.0' # parser.add_argument('generate') parser.add_argument('-a', a...
[ "argparse.ArgumentParser" ]
[((156, 181), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (179, 181), False, 'import argparse\n')]
from flask_script import Manager, Shell, Server from app import create_app, logger import os # create the application configuration app = create_app(os.environ.get("FLASK_CONFIG", "default")) PORT = 5000 manager = Manager(app) server = Server(host="127.0.0.1", port=PORT) public_server = Server(host="0.0.0.0", port=PO...
[ "app.logger.debug", "os.path.join", "unittest.TextTestRunner", "coverage.coverage", "flask_script.Manager", "os.path.dirname", "os.environ.get", "unittest.TestLoader", "flask_script.Shell", "werkzeug.contrib.profiler.ProfilerMiddleware", "os.execvp", "flask_script.Server" ]
[((216, 228), 'flask_script.Manager', 'Manager', (['app'], {}), '(app)\n', (223, 228), False, 'from flask_script import Manager, Shell, Server\n'), ((238, 273), 'flask_script.Server', 'Server', ([], {'host': '"""127.0.0.1"""', 'port': 'PORT'}), "(host='127.0.0.1', port=PORT)\n", (244, 273), False, 'from flask_script im...
import asyncio import string import aioredis async def go(r, key, value): await r.set(key, value) val = await r.get(key) print(f"Got {key} -> {val}") async def main(loop): try: r = await aioredis.create_redis_pool( "redis://localhost", minsize=5, maxsize=10, loop=loop ) ...
[ "asyncio.get_event_loop", "aioredis.create_redis_pool" ]
[((642, 666), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (664, 666), False, 'import asyncio\n'), ((216, 302), 'aioredis.create_redis_pool', 'aioredis.create_redis_pool', (['"""redis://localhost"""'], {'minsize': '(5)', 'maxsize': '(10)', 'loop': 'loop'}), "('redis://localhost', minsize=5, max...
# ***************************************************************************** # * Copyright 2019 Amazon.com, Inc. and its affiliates. All Rights Reserved. * # * # Licensed under the Amazon Software License (the "License"). * ...
[ "os.environ.get", "os.path.join", "predict.Predict" ]
[((1918, 1953), 'os.environ.get', 'os.environ.get', (['"""NUM_CLASSES"""', 'None'], {}), "('NUM_CLASSES', None)\n", (1932, 1953), False, 'import os\n'), ((1979, 2021), 'os.environ.get', 'os.environ.get', (['"""MODEL_FACTORY_NAME"""', 'None'], {}), "('MODEL_FACTORY_NAME', None)\n", (1993, 2021), False, 'import os\n'), (...
#!/usr/bin/env python3 import sys import re import argparse from collections import defaultdict # This script loads frequently used words in a language, looks up their # pronunciations in a CMU dictionary, then prints an example word + # pronunciation for each phoneme. def main(): parser = argparse.ArgumentParse...
[ "collections.defaultdict", "re.split", "argparse.ArgumentParser" ]
[((298, 323), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (321, 323), False, 'import argparse\n'), ((768, 785), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (779, 785), False, 'from collections import defaultdict\n'), ((1027, 1052), 're.split', 're.split', (['"""[\\\...
from math import isclose import numpy as np from scipy.spatial.transform.rotation import Rotation from scipy.spatial.distance import cityblock MIN_OVERLAPPING_BEACONS = 12 scanner_positions = [] class Beacon: def __init__(self, x: int, y: int, z: int): self.pos = np.array([x, y, z]) class Scanner: ...
[ "numpy.radians", "scipy.spatial.distance.cityblock", "numpy.array", "math.isclose", "numpy.linalg.norm", "scipy.spatial.transform.rotation.Rotation.from_rotvec" ]
[((2299, 2320), 'numpy.radians', 'np.radians', (['x_degrees'], {}), '(x_degrees)\n', (2309, 2320), True, 'import numpy as np\n'), ((2341, 2360), 'numpy.array', 'np.array', (['[1, 0, 0]'], {}), '([1, 0, 0])\n', (2349, 2360), True, 'import numpy as np\n'), ((2424, 2461), 'scipy.spatial.transform.rotation.Rotation.from_ro...
""" Molecular function callers. A harness for calling functions defined over Molecules. Makes use of the mols/mol_functions.py """ from argparse import Namespace from copy import deepcopy import numpy as np from time import sleep from dragonfly.exd.experiment_caller import CPFunctionCaller from dragonfly.exd.exd_cor...
[ "argparse.Namespace", "mols.mol_domains.MolDomain", "mols.molecule.Molecule", "dragonfly.utils.reporters.get_reporter", "dragonfly.exd.domains.CartesianProductDomain" ]
[((808, 982), 'argparse.Namespace', 'Namespace', ([], {'index_ordering': 'index_ordering', 'kernel_ordering': 'kernel_ordering', 'dim_ordering': 'dim_ordering', 'name_ordering': 'name_ordering', 'raw_name_ordering': 'raw_name_ordering'}), '(index_ordering=index_ordering, kernel_ordering=kernel_ordering,\n dim_orderi...
# This file is part of the Reproducible Open Benchmarks for Data Analysis # Platform (ROB). # # Copyright (C) 2019-2021 NYU. # # ROB is free software; you can redistribute it and/or modify it under the # terms of the MIT License; see LICENSE file for more details. """Helper methods to access configuration parameters. ...
[ "os.environ.get", "os.path.abspath", "robflask.service.service.get" ]
[((1395, 1425), 'robflask.service.service.get', 'service.get', (['FLOWSERV_API_PATH'], {}), '(FLOWSERV_API_PATH)\n', (1406, 1425), False, 'from robflask.service import service\n'), ((1721, 1751), 'os.environ.get', 'os.environ.get', (['ROB_WEBAPI_LOG'], {}), '(ROB_WEBAPI_LOG)\n', (1735, 1751), False, 'import os\n'), ((1...
from jinja2.exceptions import TemplateNotFound from flask import request, render_template from flaskcbv.response import Response from flaskcbv.view import View, TemplateIsAjaxView from flaskcbv.view.mixins import JSONMixin, getArgumentMixin from flaskcbv.conf import settings class DefaultContextVars(object): def ...
[ "flask.render_template" ]
[((1147, 1192), 'flask.render_template', 'render_template', (['"""misc/static.tpl"""'], {}), "('misc/static.tpl', **context)\n", (1162, 1192), False, 'from flask import request, render_template\n')]
import os import sys FILE_DIR = os.path.dirname(os.path.abspath(__file__)) # avoid annoying import errors... sys.path.append(FILE_DIR) from p4z3.base import * from p4z3.expressions import * from p4z3.statements import * from p4z3.parser import * from p4z3.callables import *
[ "sys.path.append", "os.path.abspath" ]
[((110, 135), 'sys.path.append', 'sys.path.append', (['FILE_DIR'], {}), '(FILE_DIR)\n', (125, 135), False, 'import sys\n'), ((48, 73), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (63, 73), False, 'import os\n')]
import pytest import asyncio import collections import contextlib import random import hat.event.common import hat.event.server.common import hat.event.client import hat.event.server.main import hat.gateway.engine from hat.util import aio from test_unit.test_gateway import mock_device @pytest.fixture def event_serv...
[ "asyncio.gather", "asyncio.sleep", "random.Random", "collections.deque", "pytest.mark.parametrize", "hat.util.aio.Group", "hat.util.aio.Queue" ]
[((2359, 2410), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""device_count"""', '[1, 2, 10]'], {}), "('device_count', [1, 2, 10])\n", (2382, 2410), False, 'import pytest\n'), ((5616, 5667), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""device_count"""', '[1, 2, 10]'], {}), "('device_count', ...
#coding=utf-8 import csv import pymysql import DataUtil import xlrd class DBUtil: def __init__(self): print('init DBUtil') def query_mysql(self): # 打开数据库连接 db = pymysql.connect("10.188.40.12", "udata", "123456", "udata_privilege", charset="utf8") # 使用cursor()方法获取操作游标 ...
[ "DataUtil.get_shop_type", "xlrd.open_workbook", "pymysql.connect", "DataUtil.is_in_fence" ]
[((197, 286), 'pymysql.connect', 'pymysql.connect', (['"""10.188.40.12"""', '"""udata"""', '"""123456"""', '"""udata_privilege"""'], {'charset': '"""utf8"""'}), "('10.188.40.12', 'udata', '123456', 'udata_privilege',\n charset='utf8')\n", (212, 286), False, 'import pymysql\n'), ((1170, 1258), 'pymysql.connect', 'pym...
# -*- coding: utf-8 -*- """ Created on July 6 2017 @author: <EMAIL> """ import os import sys import time from osgeo import ogr from osgeo import osr import pandas as pd path = os.path.dirname(os.path.dirname(os.path.dirname(os.path. abspath(__file__)))) if path no...
[ "sys.path.append", "os.path.abspath", "pandas.read_csv", "osgeo.ogr.GetDriverByName", "os.path.exists", "osgeo.ogr.FieldDefn", "osgeo.osr.SpatialReference", "osgeo.ogr.Feature" ]
[((339, 360), 'sys.path.append', 'sys.path.append', (['path'], {}), '(path)\n', (354, 360), False, 'import sys\n'), ((829, 850), 'pandas.read_csv', 'pd.read_csv', (['inputCSV'], {}), '(inputCSV)\n', (840, 850), True, 'import pandas as pd\n'), ((1008, 1045), 'osgeo.ogr.GetDriverByName', 'ogr.GetDriverByName', (['"""ESRI...
from sklearn.datasets import load_boston from tensorflow.keras.optimizers import Adam from tensorflow.keras.optimizers import RMSprop from artificial_neural_network_model_automation.hyper_parameter_tuning import ANNRandomizedSearchConfig from artificial_neural_network_model_automation.hyper_parameter_tuning import ANNR...
[ "artificial_neural_network_model_automation.hyper_parameter_tuning.ANNRandomizedSearch", "artificial_neural_network_model_automation.hyper_parameter_tuning.ANNRandomizedSearchConfig", "sklearn.datasets.load_boston", "tensorflow.keras.optimizers.Adam", "tensorflow.keras.optimizers.RMSprop" ]
[((359, 372), 'sklearn.datasets.load_boston', 'load_boston', ([], {}), '()\n', (370, 372), False, 'from sklearn.datasets import load_boston\n'), ((873, 879), 'tensorflow.keras.optimizers.Adam', 'Adam', ([], {}), '()\n', (877, 879), False, 'from tensorflow.keras.optimizers import Adam\n'), ((893, 917), 'tensorflow.keras...
import logging from flask import Flask from nisse.services.reminder_job import remind from nisse.utils.configs import load_config application = Flask(__name__, instance_relative_config=True) load_config(application) remind(application.logger, application.config)
[ "flask.Flask", "nisse.utils.configs.load_config", "nisse.services.reminder_job.remind" ]
[((145, 191), 'flask.Flask', 'Flask', (['__name__'], {'instance_relative_config': '(True)'}), '(__name__, instance_relative_config=True)\n', (150, 191), False, 'from flask import Flask\n'), ((193, 217), 'nisse.utils.configs.load_config', 'load_config', (['application'], {}), '(application)\n', (204, 217), False, 'from ...
# -*- coding: utf-8 -*- __author__ = 'Jinkey' import time import numpy as np import h5py import matplotlib.pyplot as plt import scipy from PIL import Image from scipy import ndimage from dnn_app_utils import * from keras.models import Sequential, load_model from keras.layers import Dense, Dropout, Activation np.rando...
[ "keras.models.load_model", "h5py.File", "numpy.random.seed", "matplotlib.pyplot.show", "keras.models.Sequential", "matplotlib.pyplot.imshow", "keras.layers.Dense", "scipy.misc.imresize", "numpy.squeeze", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "scipy.ndimage.imread" ]
[((312, 329), 'numpy.random.seed', 'np.random.seed', (['(1)'], {}), '(1)\n', (326, 329), True, 'import numpy as np\n'), ((587, 599), 'keras.models.Sequential', 'Sequential', ([], {}), '()\n', (597, 599), False, 'from keras.models import Sequential, load_model\n'), ((1764, 1781), 'numpy.random.seed', 'np.random.seed', (...
from PyPDF2 import PdfFileMerger, PdfFileReader import os def ask(question, cursor='>> ', default_choice=None): '''This is a shortcut function to ask questions and receive a string answer back. The `question` is a string which is printed out in the console. `cursor` is the delimiter used to prompt the use...
[ "os.getcwd", "os.path.isdir", "PyPDF2.PdfFileReader", "PyPDF2.PdfFileMerger", "os.path.join", "os.listdir" ]
[((2356, 2371), 'PyPDF2.PdfFileMerger', 'PdfFileMerger', ([], {}), '()\n', (2369, 2371), False, 'from PyPDF2 import PdfFileMerger, PdfFileReader\n'), ((2538, 2549), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (2547, 2549), False, 'import os\n'), ((2859, 2895), 'os.path.join', 'os.path.join', (['destination', 'file_name...
''' This module provides database interfaces to postgres SQL (c) Copyright 2013 Mark V Systems Limited, California US, All rights reserved. Mark V copyright applies to this software, which is licensed according to the terms of Arelle(r). ''' import sys, os, io, glob, time, re, datetime from math import isnan, isinf ...
[ "math.isnan", "math.isinf", "os.getpid", "os.path.isabs", "os.path.basename", "os.path.dirname", "time.time", "io.open", "glob.glob", "arelle.PythonUtil.flattenSequence", "re.compile" ]
[((15850, 15861), 'time.time', 'time.time', ([], {}), '()\n', (15859, 15861), False, 'import sys, os, io, glob, time, re, datetime\n'), ((15967, 15992), 'arelle.PythonUtil.flattenSequence', 'flattenSequence', (['ddlFiles'], {}), '(ddlFiles)\n', (15982, 15992), False, 'from arelle.PythonUtil import flattenSequence\n'), ...
""" ******************************************************************************** make figures ******************************************************************************** """ import numpy as np from scipy.interpolate import griddata import matplotlib.pyplot as plt def plt_sol0(XY, u, width, height, cmap): ...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.pcolor", "matplotlib.pyplot.subplot", "numpy.meshgrid", "matplotlib.pyplot.show", "matplotlib.pyplot.colorbar", "matplotlib.pyplot.figure", "numpy.arange", "numpy.linspace", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel" ]
[((376, 405), 'numpy.linspace', 'np.linspace', (['lb[0]', 'ub[0]', 'nx'], {}), '(lb[0], ub[0], nx)\n', (387, 405), True, 'import numpy as np\n'), ((414, 443), 'numpy.linspace', 'np.linspace', (['lb[1]', 'ub[1]', 'nx'], {}), '(lb[1], ub[1], nx)\n', (425, 443), True, 'import numpy as np\n'), ((455, 472), 'numpy.meshgrid'...
"""Functions to assign and manipulate link capacities of a topology. Link capacities can be assigned either deterministically or randomly, according to various models. """ from distutils.version import LooseVersion import networkx as nx from fnss.util import random_from_pdf from fnss.units import capacity_units __...
[ "networkx.edge_betweenness_centrality", "networkx.out_degree_centrality", "networkx.communicability", "networkx.betweenness_centrality", "fnss.util.random_from_pdf", "distutils.version.LooseVersion", "networkx.get_edge_attributes", "networkx.pagerank_numpy", "networkx.eigenvector_centrality", "net...
[((11282, 11350), 'networkx.betweenness_centrality', 'nx.betweenness_centrality', (['topology'], {'normalized': '(False)', 'weight': 'weight'}), '(topology, normalized=False, weight=weight)\n', (11307, 11350), True, 'import networkx as nx\n'), ((13494, 13571), 'networkx.pagerank_numpy', 'nx.pagerank_numpy', (['topology...
from urllib import request, parse data = bytes(parse.urlencode({'word': 'hello'}), encoding='utf8') response = request.urlopen('http://httpbin.org/post', data=data) print(response.read().decode('utf-8'))
[ "urllib.request.urlopen", "urllib.parse.urlencode" ]
[((113, 166), 'urllib.request.urlopen', 'request.urlopen', (['"""http://httpbin.org/post"""'], {'data': 'data'}), "('http://httpbin.org/post', data=data)\n", (128, 166), False, 'from urllib import request, parse\n'), ((48, 82), 'urllib.parse.urlencode', 'parse.urlencode', (["{'word': 'hello'}"], {}), "({'word': 'hello'...
import os, sys, pathlib from dotenv import dotenv_values cwd_path = os.path.join(os.getcwd(), '.env') global_path = os.path.join(pathlib.Path.home(), '.config/tconnectsync/.env') values = {} if os.path.exists(cwd_path): values = dotenv_values(cwd_path) elif os.path.exists(global_path): values = dotenv_values...
[ "pathlib.Path.home", "os.getcwd", "os.path.exists", "dotenv.dotenv_values", "sys.exit" ]
[((197, 221), 'os.path.exists', 'os.path.exists', (['cwd_path'], {}), '(cwd_path)\n', (211, 221), False, 'import os, sys, pathlib\n'), ((82, 93), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (91, 93), False, 'import os, sys, pathlib\n'), ((130, 149), 'pathlib.Path.home', 'pathlib.Path.home', ([], {}), '()\n', (147, 149)...
"Setup.py for GeodesyML Converter" #pylint: disable=line-too-long from distutils.command.build import build from subprocess import check_call from setuptools import setup class GenerateBindings(build): "Generate GeodesyML bindings." def run(self): check_call(['cd GeodesyMLToSiteLog && ./generate-bin...
[ "setuptools.setup", "subprocess.check_call", "distutils.command.build.build.run" ]
[((499, 996), 'setuptools.setup', 'setup', ([], {'name': '"""geodesyml_converter"""', 'version': '"""0.1"""', 'license': '"""Creative Commons 4.0"""', 'packages': "['GeodesyMLToSiteLog', 'SiteLogToGeodesyML']", 'cmdclass': "{'build': GenerateBindings}", 'entry_points': "{'console_scripts': [\n 'geodesyml-to-sitelog=...
#### feed in the obs seq line by line #### quantity becomes all one #### feed with all obs seq import numpy as np import pandas as pd import random from sklearn.model_selection import KFold from hmm_class import hmm from sklearn.preprocessing import normalize import time import matplotlib.pyplot as plt #...
[ "matplotlib.pyplot.title", "numpy.argmax", "hmm_class.hmm", "numpy.ones", "numpy.shape", "matplotlib.pyplot.figure", "numpy.arange", "numpy.unique", "random.randint", "numpy.loadtxt", "matplotlib.pyplot.show", "time.perf_counter", "sklearn.preprocessing.normalize", "matplotlib.pyplot.ylabe...
[((411, 442), 'numpy.loadtxt', 'np.loadtxt', (['filename'], {'dtype': 'int'}), '(filename, dtype=int)\n', (421, 442), True, 'import numpy as np\n'), ((452, 491), 'sklearn.model_selection.KFold', 'KFold', ([], {'n_splits': 'k_splits', 'shuffle': '(False)'}), '(n_splits=k_splits, shuffle=False)\n', (457, 491), False, 'fr...
''' Kattis - prsteni Simple fraction question. Look around for the pattern, the key insight is radius and number of turns are inversely proportional. Just take the ratio of the radius of the first and the ith circle to get the ratio of the turns of the ith circle to the first circle. Time: O(1) Space: O(1) ''' n = int...
[ "fractions.Fraction" ]
[((430, 454), 'fractions.Fraction', 'Fraction', (['arr[0]', 'arr[i]'], {}), '(arr[0], arr[i])\n', (438, 454), False, 'from fractions import Fraction\n')]
# Python Code for object # oriented concepts using # the abstract factory # design patter import random class Cars_avaliable: def __init__(self, Car = None): self.cars = Car def show_car(self): rental = self.cars() print(f'Name of car {rental}') ...
[ "random.choice" ]
[((764, 810), 'random.choice', 'random.choice', (['[BMW_330Ci, Audi_A4, Merc_S550]'], {}), '([BMW_330Ci, Audi_A4, Merc_S550])\n', (777, 810), False, 'import random\n')]
# Copyright 2021, <NAME>, mailto:<EMAIL> # # Python tests originally created or extracted from other peoples work. The # parts were too small to be protected. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # ...
[ "inspect.iscoroutinefunction", "inspect.isasyncgenfunction", "inspect.isgeneratorfunction", "inspect.isfunction" ]
[((1008, 1044), 'inspect.isfunction', 'inspect.isfunction', (['compiledAsyncgen'], {}), '(compiledAsyncgen)\n', (1026, 1044), False, 'import inspect\n'), ((1060, 1105), 'inspect.isgeneratorfunction', 'inspect.isgeneratorfunction', (['compiledAsyncgen'], {}), '(compiledAsyncgen)\n', (1087, 1105), False, 'import inspect\...
"""Provides MacroCheckerFile, a subclassable type that validates a single file in the spec.""" # Copyright (c) 2018-2019 Collabora, Ltd. # # SPDX-License-Identifier: Apache-2.0 # # Author(s): <NAME> <<EMAIL>> import logging import re from collections import OrderedDict, namedtuple from enum import Enum from inspec...
[ "collections.OrderedDict.fromkeys", "collections.namedtuple", "logging.NullHandler", "inspect.currentframe", "logging.getLogger", "re.compile" ]
[((949, 998), 're.compile', 're.compile', (['"""(?P<delim>__+)([a-zA-Z]+)(?P=delim)"""'], {}), "('(?P<delim>__+)([a-zA-Z]+)(?P=delim)')\n", (959, 998), False, 'import re\n'), ((1071, 1272), 're.compile', 're.compile', (['"""include::(?P<directory_traverse>((../){1,4}|\\\\{(INCS-VAR|generated)\\\\}/)(generated/)?)(?P<ge...
import unittest import mock from tethys_apps.cli.list_command import list_command try: from StringIO import StringIO except ImportError: from io import StringIO # noqa: F401 class ListCommandTests(unittest.TestCase): def setUp(self): pass def tearDown(self): pass @mock.patch('...
[ "mock.MagicMock", "tethys_apps.cli.list_command.list_command", "mock.patch" ]
[((308, 356), 'mock.patch', 'mock.patch', (['"""tethys_apps.cli.list_command.print"""'], {}), "('tethys_apps.cli.list_command.print')\n", (318, 356), False, 'import mock\n'), ((362, 436), 'mock.patch', 'mock.patch', (['"""tethys_apps.cli.list_command.get_installed_tethys_extensions"""'], {}), "('tethys_apps.cli.list_co...
from pathlib import Path from fhir.resources.codesystem import CodeSystem from oops_fhir.utils import CodeSystemConcept __all__ = ["v3AcknowledgementType"] _resource = CodeSystem.parse_file(Path(__file__).with_suffix(".json")) class v3AcknowledgementType: """ v3 Code System AcknowledgementType This...
[ "pathlib.Path", "oops_fhir.utils.CodeSystemConcept" ]
[((673, 834), 'oops_fhir.utils.CodeSystemConcept', 'CodeSystemConcept', (["{'code': 'AA', 'definition':\n 'Receiving application successfully processed message.', 'display':\n 'Application Acknowledgement Accept'}"], {}), "({'code': 'AA', 'definition':\n 'Receiving application successfully processed message.',...
from config import get_arguments from SinGAN.manipulate import * from SinGAN.training import * from SinGAN.imresize import imresize from SinGAN.imresize import imresize_to_shape import SinGAN.functions as functions import os import copy def put_mask(image, n_pixels=30, offset_x=None, offset_y=None): image = copy....
[ "SinGAN.functions.adjust_scales2image", "os.mkdir", "copy.deepcopy", "SinGAN.functions.post_config", "os.makedirs", "SinGAN.imresize.imresize", "SinGAN.functions.upsampling", "SinGAN.functions.creat_reals_pyramid", "SinGAN.functions.convert_image_np", "config.get_arguments", "SinGAN.functions.np...
[((315, 335), 'copy.deepcopy', 'copy.deepcopy', (['image'], {}), '(image)\n', (328, 335), False, 'import copy\n'), ((901, 916), 'config.get_arguments', 'get_arguments', ([], {}), '()\n', (914, 916), False, 'from config import get_arguments\n'), ((2867, 2893), 'SinGAN.functions.post_config', 'functions.post_config', (['...
# -*- coding: utf-8 -*- """ Test of the DOS/bandstructure visualizations """ import os import pytest from matplotlib.pyplot import gcf CURRENT_DIR = os.path.dirname(os.path.abspath(__file__)) HDFTEST_DIR = os.path.join(CURRENT_DIR, 'files/hdf5_reader') @pytest.mark.mpl_image_compare(baseline_dir='files/fleur_vis/', ...
[ "os.path.abspath", "masci_tools.io.parsers.hdf5.HDF5Reader", "masci_tools.vis.fleur.plot_fleur_dos", "masci_tools.vis.fleur.plot_fleur_bands_characterize", "pytest.mark.mpl_image_compare", "masci_tools.vis.fleur.plot_fleur_bands", "matplotlib.pyplot.gcf", "os.path.join" ]
[((207, 253), 'os.path.join', 'os.path.join', (['CURRENT_DIR', '"""files/hdf5_reader"""'], {}), "(CURRENT_DIR, 'files/hdf5_reader')\n", (219, 253), False, 'import os\n'), ((257, 355), 'pytest.mark.mpl_image_compare', 'pytest.mark.mpl_image_compare', ([], {'baseline_dir': '"""files/fleur_vis/"""', 'filename': '"""bands_...
# -*- coding: utf-8 -*- from collections import namedtuple from logging import getLogger from kafka.common import OffsetRequest, check_error, OffsetFetchRequest, UnknownTopicOrPartitionError logger = getLogger("offset-fetcher") OffsetsStruct = namedtuple("OffsetsStruct", ["commit", "produced"]) class OffsetsFetcher...
[ "kafka.common.OffsetFetchRequest", "kafka.common.check_error", "kafka.common.OffsetRequest", "collections.namedtuple", "logging.getLogger" ]
[((202, 229), 'logging.getLogger', 'getLogger', (['"""offset-fetcher"""'], {}), "('offset-fetcher')\n", (211, 229), False, 'from logging import getLogger\n'), ((246, 297), 'collections.namedtuple', 'namedtuple', (['"""OffsetsStruct"""', "['commit', 'produced']"], {}), "('OffsetsStruct', ['commit', 'produced'])\n", (256...
import os import pandas as pd import src.utils.metrics as metrics_module from src.utils.metrics import smp_metrics import src.viz.eval as viz_eval_module import torch import wandb def log_to_wandb(figures_dict, phase, train_metrics=None, train_loss=None, val_metrics=None, val_loss=None, test_metrics...
[ "wandb.log", "src.utils.metrics.smp_metrics.get_stats", "pandas.DataFrame.from_dict", "torch.save", "wandb.Image", "wandb.Table", "os.path.join" ]
[((8744, 8778), 'os.path.join', 'os.path.join', (['ckpt_dir', 'model_name'], {}), '(ckpt_dir, model_name)\n', (8756, 8778), False, 'import os\n'), ((8783, 8817), 'torch.save', 'torch.save', (['state_dict', 'model_path'], {}), '(state_dict, model_path)\n', (8793, 8817), False, 'import torch\n'), ((600, 637), 'wandb.log'...
from functools import partial import numpy as np import matplotlib.pyplot as plt from mne.utils import _TempDir from pactools.dar_model import AR, DAR, HAR, StableDAR from pactools.utils.testing import assert_equal, assert_greater from pactools.utils.testing import assert_raises, assert_array_equal from pactools.uti...
[ "functools.partial", "pactools.simulate_pac.simulate_pac", "pactools.utils.testing.assert_raises", "mne.utils._TempDir", "matplotlib.pyplot.close", "pactools.utils.testing.assert_array_equal", "pactools.comodulogram.read_comodulogram", "numpy.zeros", "pactools.utils.testing.assert_equal", "pactool...
[((827, 952), 'pactools.simulate_pac.simulate_pac', 'simulate_pac', ([], {'n_points': 'n_points', 'fs': 'fs', 'high_fq': 'high_fq', 'low_fq': 'low_fq', 'low_fq_width': '(1.0)', 'noise_level': '(0.1)', 'random_state': '(0)'}), '(n_points=n_points, fs=fs, high_fq=high_fq, low_fq=low_fq,\n low_fq_width=1.0, noise_level...
# Copyright (c) 2013 Shotgun Software Inc. # # CONFIDENTIAL AND PROPRIETARY # # This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit # Source Code License included in this distribution package. See LICENSE. # By accessing, using, copying or modifying this work you indicate your # agreement to t...
[ "sgtk.util.get_published_file_entity_type", "os.path.basename", "os.path.exists", "sgtk.TankError", "os.path.splitext", "os.path.getmtime" ]
[((11624, 11681), 'sgtk.util.get_published_file_entity_type', 'sgtk.util.get_published_file_entity_type', (['self.__app.sgtk'], {}), '(self.__app.sgtk)\n', (11664, 11681), False, 'import sgtk\n'), ((20159, 20181), 'os.path.splitext', 'os.path.splitext', (['path'], {}), '(path)\n', (20175, 20181), False, 'import os\n'),...
import os from typing import Dict from enum import Enum from match_pattern import Pattern from zcommon.serialization import DictionarySerializableMixin from zcommon.textops import ( json_dump_with_types, json_load_with_types, yaml_dump_with_types, yaml_load_with_types, ) def is_iterable(obj): """R...
[ "zcommon.textops.json_dump_with_types", "zcommon.textops.yaml_load_with_types", "zcommon.textops.yaml_dump_with_types", "os.environ.get", "match_pattern.Pattern", "zcommon.textops.json_load_with_types" ]
[((2258, 2281), 'match_pattern.Pattern', 'Pattern', (['"""*.yml|*.yaml"""'], {}), "('*.yml|*.yaml')\n", (2265, 2281), False, 'from match_pattern import Pattern\n'), ((2771, 2796), 'zcommon.textops.json_dump_with_types', 'json_dump_with_types', (['val'], {}), '(val)\n', (2791, 2796), False, 'from zcommon.textops import ...
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import enum import os import pathlib from typing import Optional from fbpcs.onedocker_binary_names import OneDockerB...
[ "os.environ.get", "os.getcwd" ]
[((566, 653), 'os.environ.get', 'os.environ.get', (['"""CPP_SHARDER_HASHED_FOR_PID_PATH"""', '"""cpp_bin/sharder_hashed_for_pid"""'], {}), "('CPP_SHARDER_HASHED_FOR_PID_PATH',\n 'cpp_bin/sharder_hashed_for_pid')\n", (580, 653), False, 'import os\n'), ((500, 511), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (509, 511...
#!C:\Users\579860\Desktop\Steer-Clear-Backend-login\env\Scripts\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'distribute==0.6.24','console_scripts','easy_install-2.7' __requires__ = 'distribute==0.6.24' import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.exit( load_entry_point('...
[ "pkg_resources.load_entry_point" ]
[((302, 379), 'pkg_resources.load_entry_point', 'load_entry_point', (['"""distribute==0.6.24"""', '"""console_scripts"""', '"""easy_install-2.7"""'], {}), "('distribute==0.6.24', 'console_scripts', 'easy_install-2.7')\n", (318, 379), False, 'from pkg_resources import load_entry_point\n')]
import os os.environ['CUDA_VISIBLE_DEVICES'] = '3' import onnx import torch import numpy as np from utils import get_path_with_annotation,preprocess_image,postprocess from model import unet_2d import tensorrt as trt from torch2trt import torch2trt class ImageCalibDataset(): def __init__(self, data_list): ...
[ "torch.load", "torch.randn", "utils.preprocess_image", "utils.postprocess", "model.unet_2d", "torch2trt.torch2trt", "utils.get_path_with_annotation" ]
[((858, 911), 'utils.get_path_with_annotation', 'get_path_with_annotation', (['csv_path', '"""path"""', '"""Bladder"""'], {}), "(csv_path, 'path', 'Bladder')\n", (882, 911), False, 'from utils import get_path_with_annotation, preprocess_image, postprocess\n'), ((924, 958), 'model.unet_2d', 'unet_2d', ([], {'n_channels'...
import numpy as np from ..base import NCMBase from sklearn.neighbors import NearestNeighbors class KNeighborsMean(NCMBase): def __init__(self, **sklearn): if "n_neighbors" in sklearn: sklearn["n_neighbors"] += 1 else: sklearn["n_neighbors"] = 6 self.clf = NearestN...
[ "numpy.array", "sklearn.neighbors.NearestNeighbors", "numpy.unique" ]
[((312, 339), 'sklearn.neighbors.NearestNeighbors', 'NearestNeighbors', ([], {}), '(**sklearn)\n', (328, 339), False, 'from sklearn.neighbors import NearestNeighbors\n'), ((1084, 1097), 'numpy.array', 'np.array', (['res'], {}), '(res)\n', (1092, 1097), True, 'import numpy as np\n'), ((768, 802), 'numpy.unique', 'np.uni...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
[ "unittest.main", "os.path.abspath", "azure.cli.testsdk.ResourceGroupPreparer" ]
[((591, 640), 'azure.cli.testsdk.ResourceGroupPreparer', 'ResourceGroupPreparer', ([], {'name_prefix': '"""cli_test_dns"""'}), "(name_prefix='cli_test_dns')\n", (612, 640), False, 'from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer\n'), ((4481, 4530), 'azure.cli.testsdk.ResourceGroupPreparer', 'ResourceG...
########################### # Reset working directory # ########################### import os os.chdir("/home/btrabucco/research/multiattend") ########################### # MultiAttend Package.... # ########################### from multiattend.dataset.io_synthesis.io_synthesis_args import IOSynthesisArgs from multiatte...
[ "multiattend.dataset.io_synthesis.io_synthesis_utils.IOSynthesisUtils", "multiattend.dataset.io_synthesis.io_synthesis_args.IOSynthesisArgs", "os.chdir" ]
[((94, 142), 'os.chdir', 'os.chdir', (['"""/home/btrabucco/research/multiattend"""'], {}), "('/home/btrabucco/research/multiattend')\n", (102, 142), False, 'import os\n'), ((486, 503), 'multiattend.dataset.io_synthesis.io_synthesis_args.IOSynthesisArgs', 'IOSynthesisArgs', ([], {}), '()\n', (501, 503), False, 'from mul...
from wtforms.validators import InputRequired from wtforms.widgets import TextArea from eNMS import app from eNMS.forms import BaseForm from eNMS.forms.fields import ( BooleanField, HiddenField, InstanceField, IntegerField, MultipleInstanceField, PasswordField, SelectField, StringField, ...
[ "wtforms.widgets.TextArea", "wtforms.validators.InputRequired", "eNMS.forms.fields.StringField", "eNMS.forms.fields.MultipleInstanceField", "eNMS.forms.fields.PasswordField", "eNMS.forms.fields.BooleanField", "eNMS.forms.fields.HiddenField", "eNMS.forms.fields.SelectField", "eNMS.forms.fields.Intege...
[((1254, 1294), 'eNMS.forms.fields.HiddenField', 'HiddenField', ([], {'default': '"""device_connection"""'}), "(default='device_connection')\n", (1265, 1294), False, 'from eNMS.forms.fields import BooleanField, HiddenField, InstanceField, IntegerField, MultipleInstanceField, PasswordField, SelectField, StringField\n'),...
#! /usr/bin/env python """ A script to generate a flat subproject directory from a tree of dependency directories """ import os import subprocess import textwrap import json import shutil import sys import warnings def project_name(): return os.path.split( os.getcwd() )[1] def dependency_directory(): """ ...
[ "shutil.ignore_patterns", "subprocess.Popen", "os.makedirs", "os.getcwd", "os.path.isdir", "warnings.warn", "os.path.join", "os.chdir" ]
[((950, 978), 'subprocess.Popen', 'subprocess.Popen', (['invocation'], {}), '(invocation)\n', (966, 978), False, 'import subprocess\n'), ((1524, 1552), 'subprocess.Popen', 'subprocess.Popen', (['invocation'], {}), '(invocation)\n', (1540, 1552), False, 'import subprocess\n'), ((435, 446), 'os.getcwd', 'os.getcwd', ([],...
""" Coursework for Generative Systems for Design, Fall 2019, Carnegie Mellon University Author: <NAME> <EMAIL> L-system with node rewriting This code rewrites the l-system string. The axiom, productions (rules), number of iterations and random seed are defined by user input. Length and angle parameters can...
[ "random.seed", "random.randint" ]
[((583, 600), 'random.seed', 'random.seed', (['seed'], {}), '(seed)\n', (594, 600), False, 'import random\n'), ((631, 651), 'random.randint', 'random.randint', (['(0)', '(9)'], {}), '(0, 9)\n', (645, 651), False, 'import random\n')]
import argparse from ...context import mango from ...fakes import fake_context, fake_model_state, fake_loaded_market, fake_order from decimal import Decimal from mango.marketmaking.orderchain.preventpostonlycrossingbookelement import ( PreventPostOnlyCrossingBookElement, ) # The top bid is the highest price so...
[ "argparse.Namespace", "decimal.Decimal", "mango.marketmaking.orderchain.preventpostonlycrossingbookelement.PreventPostOnlyCrossingBookElement", "mango.marketmaking.orderchain.preventpostonlycrossingbookelement.PreventPostOnlyCrossingBookElement.from_command_line_parameters" ]
[((914, 934), 'argparse.Namespace', 'argparse.Namespace', ([], {}), '()\n', (932, 934), False, 'import argparse\n'), ((994, 1063), 'mango.marketmaking.orderchain.preventpostonlycrossingbookelement.PreventPostOnlyCrossingBookElement.from_command_line_parameters', 'PreventPostOnlyCrossingBookElement.from_command_line_par...
import torch import torch.nn as nn from torch import sigmoid from torch.nn.init import xavier_uniform_, zeros_ def conv(in_planes, out_planes, kernel_size=3): return nn.Sequential( nn.Conv2d(in_planes, out_planes, kernel_size=kernel_size, padding=(kernel_size - 1) // 2, # for half outpu...
[ "torch.nn.ReLU", "torch.nn.ConvTranspose2d", "torch.nn.init.xavier_uniform_", "torch.nn.Conv2d", "torch.nn.init.zeros_" ]
[((195, 299), 'torch.nn.Conv2d', 'nn.Conv2d', (['in_planes', 'out_planes'], {'kernel_size': 'kernel_size', 'padding': '((kernel_size - 1) // 2)', 'stride': '(2)'}), '(in_planes, out_planes, kernel_size=kernel_size, padding=(\n kernel_size - 1) // 2, stride=2)\n', (204, 299), True, 'import torch.nn as nn\n'), ((391, ...
""" .. _pyvista_demo_ref: 3D Visualization with PyVista ============================= The example demonstrates the how to use the VTK interface via the `pyvista library <http://docs.pyvista.org>`__ . To run this example, you will need to `install pyvista <http://docs.pyvista.org/getting-started/installation.html>`__ ...
[ "pyvista.set_plot_theme", "discretize.utils.download", "shelve.open", "pyvista.Plotter", "numpy.loadtxt", "tarfile.open", "discretize.TensorMesh.copy", "pyvista.PolyData" ]
[((794, 823), 'pyvista.set_plot_theme', 'pv.set_plot_theme', (['"""document"""'], {}), "('document')\n", (811, 823), True, 'import pyvista as pv\n'), ((1387, 1433), 'discretize.utils.download', 'discretize.utils.download', (['url'], {'overwrite': '(True)'}), '(url, overwrite=True)\n', (1412, 1433), False, 'import discr...
#!/usr/bin/python # Copyright 2015 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
[ "solar.orchestration.graph.reset_by_uid", "click.option", "click.echo", "sys.stdout.flush", "solar.orchestration.graph.update_graph", "solar.orchestration.graph.set_states", "click.group", "solar.orchestration.graph.show", "click.style", "solar.orchestration.utils.write_graph", "solar.orchestrat...
[((989, 1013), 'click.group', 'click.group', ([], {'name': '"""orch"""'}), "(name='orch')\n", (1000, 1013), False, 'import click\n'), ((1224, 1246), 'click.argument', 'click.argument', (['"""plan"""'], {}), "('plan')\n", (1238, 1246), False, 'import click\n'), ((2798, 2850), 'click.argument', 'click.argument', (['"""ui...
"""Global logging helpers.""" import logging import os import sys from distutils.util import strtobool import colorama from pythonjsonlogger import jsonlogger from six import iteritems CONSOLE_FORMAT = "{}%(levelname)s:{} %(message)s" JSON_FORMAT = "(asctime) (levelname) (message)" def to_bool(string): return ...
[ "logging.Formatter.format", "logging.StreamHandler", "pythonjsonlogger.jsonlogger.JsonFormatter.format", "os.environ.get", "sys.stdout.isatty", "six.iteritems", "logging.getLogger" ]
[((393, 426), 'os.environ.get', 'os.environ.get', (['"""PY_COLORS"""', 'None'], {}), "('PY_COLORS', None)\n", (407, 426), False, 'import os\n'), ((2333, 2356), 'logging.getLogger', 'logging.getLogger', (['name'], {}), '(name)\n', (2350, 2356), False, 'import logging\n'), ((3133, 3166), 'logging.StreamHandler', 'logging...
import os import joblib from a2c_ppo_acktr.multi_agent.utils import plot_statistics, plot_agent_statistics, get_remote_file, remote_listdir # SMOOTH_ARGS = { # "window_length": 53, # "polyorder": 3, # } def plot_full(statistics, max_iter=None): plot_statistics(statistics, "reward", max_iter=max_iter) ...
[ "a2c_ppo_acktr.multi_agent.utils.plot_statistics", "a2c_ppo_acktr.multi_agent.utils.plot_agent_statistics", "a2c_ppo_acktr.multi_agent.utils.remote_listdir", "joblib.load", "a2c_ppo_acktr.multi_agent.utils.get_remote_file", "os.path.join", "os.listdir" ]
[((261, 317), 'a2c_ppo_acktr.multi_agent.utils.plot_statistics', 'plot_statistics', (['statistics', '"""reward"""'], {'max_iter': 'max_iter'}), "(statistics, 'reward', max_iter=max_iter)\n", (276, 317), False, 'from a2c_ppo_acktr.multi_agent.utils import plot_statistics, plot_agent_statistics, get_remote_file, remote_l...
import copy import logging import random from couchbase.bucket import Bucket from couchbase_helper.data import FIRST_NAMES, COUNTRIES from couchbase_helper.documentgenerator import DocumentGenerator from couchbase_helper.tuq_generators import TuqGenerators from couchbase_helper.query_definitions import QueryDefinition...
[ "couchbase.bucket.Bucket", "random.randint", "random.choice", "random.random", "remote.remote_util.RemoteMachineShellConnection", "membase.api.rest_client.RestConnection", "couchbase_helper.tuq_generators.TuqGenerators", "couchbase_helper.query_definitions.QueryDefinition", "logging.getLogger", "c...
[((567, 594), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (584, 594), False, 'import logging\n'), ((18484, 18528), 'couchbase_helper.tuq_generators.TuqGenerators', 'TuqGenerators', (['self.log', 'self.full_docs_list'], {}), '(self.log, self.full_docs_list)\n', (18497, 18528), False, 'f...
import numpy as np # time occ1 occ2 mctdh_data = np.array( [[5.0000000e-01, 1.2083970e-02, 9.8791603e-01], [1.0000000e+00, 4.3008830e-02, 9.5699117e-01], [1.5000000e+00, 7.9675930e-02, 9.2032407e-01], [2.0000000e+00, 1.0804013e-01, 8.9195987e-01], [2.5000000e...
[ "numpy.array" ]
[((76, 8320), 'numpy.array', 'np.array', (['[[0.5, 0.01208397, 0.98791603], [1.0, 0.04300883, 0.95699117], [1.5, \n 0.07967593, 0.92032407], [2.0, 0.10804013, 0.89195987], [2.5, \n 0.11972252, 0.88027748], [3.0, 0.11480491, 0.88519509], [3.5, \n 0.09996381, 0.90003619], [4.0, 0.08391523, 0.91608477], [4.5, \n ...
#MenuTitle: Guides through All Selected Nodes # -*- coding: utf-8 -*- __doc__=""" Creates guides through all selected nodes. """ import math thisFont = Glyphs.font # frontmost font selectedLayers = thisFont.selectedLayers # active layers of selected glyphs def angle( firstPoint, secondPoint ): """ Returns the angl...
[ "math.atan2" ]
[((609, 633), 'math.atan2', 'math.atan2', (['yDiff', 'xDiff'], {}), '(yDiff, xDiff)\n', (619, 633), False, 'import math\n')]
import re import sys keymap = { '2': 'abc', '3': 'def', '4': 'ghi', '5': 'jkl', '6': 'mno', '7': 'pqrs', '8': 'tuv', '9': 'wxyz', } def ask_for_numbers(): while True: response = input('What numbers have you pressed? ').strip() if len(response) < 3: pri...
[ "re.search" ]
[((398, 427), 're.search', 're.search', (['"""[^2-9]"""', 'response'], {}), "('[^2-9]', response)\n", (407, 427), False, 'import re\n')]
#!/usr/bin/env python ############################################################################### # Copyright Kitware Inc. and Contributors # Distributed under the Apache License, 2.0 (apache.org/licenses/LICENSE-2.0) # See accompanying Copyright.txt and LICENSE files for details ##################################...
[ "os.remove", "argparse.ArgumentParser", "numpy.ones", "danesfield.gdal_utils.ogr_open", "ogr.Feature", "danesfield.gdal_utils.gdal_open", "cv2.cvtColor", "danesfield.gdal_utils.ogr_get_layer", "shutil.copyfile", "cv2.resize", "cv2.Canny", "os.path.basename", "ogr.GetDriverByName", "gdal.Ap...
[((717, 754), 'ogr.GetDriverByName', 'ogr.GetDriverByName', (['"""ESRI Shapefile"""'], {}), "('ESRI Shapefile')\n", (736, 754), False, 'import ogr\n'), ((907, 942), 'osr.SpatialReference', 'osr.SpatialReference', (['outProjection'], {}), '(outProjection)\n', (927, 942), False, 'import osr\n'), ((6512, 6673), 'argparse....
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2021 4Paradigm # # 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 ...
[ "libs.ddt.data", "libs.test_loader.load" ]
[((789, 1993), 'libs.ddt.data', 'ddt.data', (["('setlimit', 'Put', 10, 'Set Limit ok')", "('setlimit', 'Put', 0, 'Set Limit ok')", "('setlimit', 'Put', 1, 'Set Limit ok')", "('setlimit', 'Put', 2147483647, 'Set Limit ok')", "('setlimit', 'Put', -1, 'Fail to set limit')", "('setlimit', 'Put', 1.5, 'Bad set limit format'...
#!/usr/bin/env python3 import argparse import enum import json import os.path import re import urllib.request DOC_URL_BASE = "https://raw.githubusercontent.com/mist64/c64ref/master/6502/" doc_files = {f"{DOC_URL_BASE}{filename}":cpu_type for filename, cpu_type in { "cpu_6502.txt" : "6502", "cpu_65c02.txt" : "...
[ "enum.auto", "argparse.ArgumentParser", "re.compile" ]
[((364, 401), 're.compile', 're.compile', (['"""\\\\[(?P<mode_name>.*)\\\\]"""'], {}), "('\\\\[(?P<mode_name>.*)\\\\]')\n", (374, 401), False, 'import re\n'), ((417, 433), 're.compile', 're.compile', (['"""##"""'], {}), "('##')\n", (427, 433), False, 'import re\n'), ((452, 500), 're.compile', 're.compile', (['"""(?P<mn...
# Copyright 2015 Internap. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
[ "netman.api.objects.interface.to_core", "uuid.uuid4", "importlib.import_module", "json.dumps", "netman.api.objects.vlan.to_core", "netman.raw_or_json", "warnings.warn" ]
[((1133, 1255), 'warnings.warn', 'warnings.warn', (['"""Use SwitchFactory.get_switch_by_descriptor directly to instanciate a switch"""', 'DeprecationWarning'], {}), "(\n 'Use SwitchFactory.get_switch_by_descriptor directly to instanciate a switch'\n , DeprecationWarning)\n", (1146, 1255), False, 'import warnings\...