code
stringlengths
20
1.04M
apis
list
extract_api
stringlengths
75
9.94M
from flask import Flask, render_template app = Flask(__name__) # flask에서는 render_template를 사용하여 HTML을 불러올 수 있다 @app.route('/') def flaskworld(): return render_template('render_ex.html') if __name__=='__main__': app.run(port=5100)
[ "flask.Flask", "flask.render_template" ]
[((48, 63), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (53, 63), False, 'from flask import Flask, render_template\n'), ((158, 191), 'flask.render_template', 'render_template', (['"""render_ex.html"""'], {}), "('render_ex.html')\n", (173, 191), False, 'from flask import Flask, render_template\n')]
from conftest import assertdir, create_filesystem from organize.cli import main def test_codepost_usecase(tmp_path): create_filesystem( tmp_path, files=[ "Devonte-Betts.txt", "Alaina-Cornish.txt", "Dimitri-Bean.txt", "Lowri-Frey.txt", "So...
[ "organize.cli.main", "conftest.assertdir", "conftest.create_filesystem" ]
[((123, 853), 'conftest.create_filesystem', 'create_filesystem', (['tmp_path'], {'files': "['Devonte-Betts.txt', 'Alaina-Cornish.txt', 'Dimitri-Bean.txt',\n 'Lowri-Frey.txt', 'Someunknown-User.txt']", 'config': '"""\n rules:\n - folders: files\n filters:\n - extension: txt\n ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages with open('README.md') as f: readme = f.read() with open('LICENSE') as f: license = f.read() setup( name='kinda', version='0.2', description='Kinetic DNA strand-displacement Analyzer', long_description=...
[ "setuptools.find_packages" ]
[((778, 793), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (791, 793), False, 'from setuptools import setup, find_packages\n')]
from textwrap import dedent import pytest from pylox.lox import Lox # Base cases from https://github.com/munificent/craftinginterpreters/blob/master/test/field/on_instance.lox TEST_SRC = dedent( """\ class Foo {} var foo = Foo(); print foo.bar = "bar value"; // expect: bar value print foo.baz =...
[ "textwrap.dedent", "pylox.lox.Lox" ]
[((190, 447), 'textwrap.dedent', 'dedent', (['""" class Foo {}\n\n var foo = Foo();\n\n print foo.bar = "bar value"; // expect: bar value\n print foo.baz = "baz value"; // expect: baz value\n\n print foo.bar; // expect: bar value\n print foo.baz; // expect: baz value\n """'], {}), '(\n """ cl...
import os pwd = os.getcwd() ######################OCR模型###################### ##是否启用LSTM crnn模型 ##OCR模型是否调用LSTM层 GPU = True LSTMFLAG = False ##模型选择 True:中英文模型 False:英文模型 ocrFlag = 'torch'##ocr模型 支持 keras torch版本 chinsesModel = True ocrModelKeras = os.path.join(pwd,"models","convert/ocr-dense-keras.h5")##keras版本OCR,暂时支...
[ "os.getcwd", "os.path.join" ]
[((16, 27), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (25, 27), False, 'import os\n'), ((249, 306), 'os.path.join', 'os.path.join', (['pwd', '"""models"""', '"""convert/ocr-dense-keras.h5"""'], {}), "(pwd, 'models', 'convert/ocr-dense-keras.h5')\n", (261, 306), False, 'import os\n'), ((568, 614), 'os.path.join', 'os....
#!/usr/bin/python # ---------------------------------------------------------------------------- # cocos "luacompile" plugin # # Copyright 2013 (C) Intel # # License: MIT # ---------------------------------------------------------------------------- ''' "luacompile" plugin for cocos command line tool ''' __docformat_...
[ "cocos.os_is_linux", "os.path.isfile", "os.path.join", "shutil.copy", "os.path.abspath", "os.path.dirname", "os.path.exists", "os.path.normpath", "struct.unpack", "MultiLanguage.MultiLanguage.get_string", "os.listdir", "os.path.isabs", "cocos.os_is_win32", "os.makedirs", "os.path.isdir",...
[((1031, 1066), 'struct.unpack', 'struct.unpack', (["('<%iL' % (m >> 2))", 's'], {}), "('<%iL' % (m >> 2), s)\n", (1044, 1066), False, 'import struct\n'), ((2868, 2912), 'MultiLanguage.MultiLanguage.get_string', 'MultiLanguage.get_string', (['"""LUACOMPILE_BRIEF"""'], {}), "('LUACOMPILE_BRIEF')\n", (2892, 2912), False,...
import logging from brownie import chain from cachetools.func import ttl_cache from yearn.exceptions import PriceError, UnsupportedNetwork from yearn.networks import Network from yearn.prices.aave import aave from yearn.prices.band import band from yearn.prices.chainlink import chainlink from yearn.prices.compound imp...
[ "yearn.prices.fixed_forex.fixed_forex.get_price", "yearn.prices.uniswap.v2.uniswap_v2.get_price", "yearn.prices.curve.curve.get_price", "yearn.prices.uniswap.v2.uniswap_v2.lp_price", "yearn.prices.balancer.get_price", "yearn.prices.chainlink.chainlink.get_price", "yearn.exceptions.PriceError", "yearn....
[((673, 700), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (690, 700), False, 'import logging\n'), ((705, 721), 'cachetools.func.ttl_cache', 'ttl_cache', (['(10000)'], {}), '(10000)\n', (714, 721), False, 'from cachetools.func import ttl_cache\n'), ((1363, 1401), 'yearn.prices.compound....
from django.db import models from django.contrib.auth import get_user_model User = get_user_model() class WebRequest(models.Model): time = models.DateTimeField(auto_now_add=True) host = models.CharField(max_length=1000) path = models.CharField(max_length=1000) method = models.CharField(max_length=50) uri =...
[ "django.db.models.TextField", "django.db.models.CharField", "django.db.models.ForeignKey", "django.contrib.auth.get_user_model", "django.db.models.BooleanField", "django.db.models.IntegerField", "django.db.models.GenericIPAddressField", "django.db.models.DateTimeField" ]
[((85, 101), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (99, 101), False, 'from django.contrib.auth import get_user_model\n'), ((144, 183), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now_add': '(True)'}), '(auto_now_add=True)\n', (164, 183), False, 'from django....
# -*- coding: utf-8 -*- # This file is part of h5py, a Python interface to the HDF5 library. # # http://www.h5py.org # # Copyright 2008-2013 <NAME> and contributors # # License: Standard 3-clause BSD; see "license.txt" for full license terms # and contributor agreement. """ Group test module. Tests...
[ "h5py._hl.compat.filename_encode", "h5py.h5r.Reference", "os.unlink", "h5py.highlevel.File", "h5py.special_dtype", "h5py.highlevel.Group", "numpy.dtype", "numpy.ones", "h5py.highlevel.SoftLink", "h5py.highlevel.ExternalLink", "h5py.SoftLink", "h5py.ExternalLink", "numpy.array", "tempfile.m...
[((959, 980), 'h5py._hl.compat.filename_encode', 'filename_encode', (['u"""α"""'], {}), "(u'α')\n", (974, 980), False, 'from h5py._hl.compat import filename_encode\n'), ((3392, 3418), 'numpy.ones', 'np.ones', (['(4, 4)'], {'dtype': '"""f"""'}), "((4, 4), dtype='f')\n", (3399, 3418), True, 'import numpy as np\n'), ((376...
import datetime from django.test import TestCase from schedule.templatetags.scheduletags import querystring_for_date class TestTemplateTags(TestCase): def test_querystring_for_datetime(self): date = datetime.datetime(2008,1,1,0,0,0) query_string=querystring_for_date(date) self.assert...
[ "schedule.templatetags.scheduletags.querystring_for_date", "datetime.datetime" ]
[((219, 257), 'datetime.datetime', 'datetime.datetime', (['(2008)', '(1)', '(1)', '(0)', '(0)', '(0)'], {}), '(2008, 1, 1, 0, 0, 0)\n', (236, 257), False, 'import datetime\n'), ((274, 300), 'schedule.templatetags.scheduletags.querystring_for_date', 'querystring_for_date', (['date'], {}), '(date)\n', (294, 300), False, ...
import sys import os sys.path.insert(0, os.path.abspath("../doc_switch")) def pytest_sessionfinish(session, exitstatus): if exitstatus == 5: session.exitstatus = 0
[ "os.path.abspath" ]
[((41, 73), 'os.path.abspath', 'os.path.abspath', (['"""../doc_switch"""'], {}), "('../doc_switch')\n", (56, 73), False, 'import os\n')]
import time from collections import defaultdict from c4.board import DRAW from c4.evaluate import INF from c4.engine.greedy import GreedyEngine class NegamaxEngine(GreedyEngine): FORMAT_STAT = ( 'score: {score} [time: {time:0.3f}s, pv: {pv}]\n' + 'nps: {nps}, nodes: {nodes}, leaves: {leaves}, dra...
[ "collections.defaultdict", "time.time" ]
[((701, 712), 'time.time', 'time.time', ([], {}), '()\n', (710, 712), False, 'import time\n'), ((744, 760), 'collections.defaultdict', 'defaultdict', (['int'], {}), '(int)\n', (755, 760), False, 'from collections import defaultdict\n'), ((969, 980), 'time.time', 'time.time', ([], {}), '()\n', (978, 980), False, 'import...
__author__ = 'ziyan.yin' import copy import datetime import itertools from dataclasses import is_dataclass, fields from .model import BaseModel from .aiodriver import AsyncDriver from .driver import sql_params BatchInsertError = IndexError('批量数组为空') def table_name(table: str): def wrapper(cls): if is_d...
[ "copy.deepcopy", "dataclasses.is_dataclass", "dataclasses.fields", "itertools.chain", "datetime.datetime.now" ]
[((670, 687), 'dataclasses.is_dataclass', 'is_dataclass', (['cls'], {}), '(cls)\n', (682, 687), False, 'from dataclasses import is_dataclass, fields\n'), ((3349, 3371), 'copy.deepcopy', 'copy.deepcopy', (['updates'], {}), '(updates)\n', (3362, 3371), False, 'import copy\n'), ((3386, 3409), 'datetime.datetime.now', 'dat...
from inspect import signature, isgenerator from collections.abc import Mapping from ruamel.yaml import Node from .macro_options import get_macro_options from .util import apply, run_coroutine from .compat.typing import Callable from .custom_constructor import CustomConstructor from .types import MacroType def get_m...
[ "inspect.signature", "inspect.isgenerator" ]
[((1897, 1916), 'inspect.isgenerator', 'isgenerator', (['result'], {}), '(result)\n', (1908, 1916), False, 'from inspect import signature, isgenerator\n'), ((804, 823), 'inspect.signature', 'signature', (['function'], {}), '(function)\n', (813, 823), False, 'from inspect import signature, isgenerator\n')]
from RLTest import Env import time class testExample(): ''' run all tests on a single env without taking env down between tests ''' def __init__(self): self.env = Env() def setUp(self): self.env.debugPrint('setUp', True) self.env.cmd('set', 'foo', 'bar') d...
[ "time.sleep", "RLTest.Env" ]
[((1005, 1046), 'RLTest.Env', 'Env', ([], {'testDescription': '"""this is an example"""'}), "(testDescription='this is an example')\n", (1008, 1046), False, 'from RLTest import Env\n'), ((1222, 1227), 'RLTest.Env', 'Env', ([], {}), '()\n', (1225, 1227), False, 'from RLTest import Env\n'), ((1521, 1551), 'RLTest.Env', '...
import pytest import numpy as np from dkulib.dku_config.custom_check import CustomCheck, CustomCheckError class TestCustomCheck: def test_init(self): custom_check = CustomCheck( type='exists' ) assert custom_check.type == 'exists' with pytest.raises(CustomCheckError): ...
[ "pytest.raises", "dkulib.dku_config.custom_check.CustomCheck" ]
[((179, 205), 'dkulib.dku_config.custom_check.CustomCheck', 'CustomCheck', ([], {'type': '"""exists"""'}), "(type='exists')\n", (190, 205), False, 'from dkulib.dku_config.custom_check import CustomCheck, CustomCheckError\n'), ((449, 475), 'dkulib.dku_config.custom_check.CustomCheck', 'CustomCheck', ([], {'type': '"""ex...
# from tg_lib.tg_policy import TGPolicy import pickle import numpy as np from scipy.signal import butter, filtfilt import sys import rospkg rospack = rospkg.RosPack() sys.path.append(rospack.get_path('qd_kinematics')) from include.spotmini_kinematics.GaitGenerator.Bezier import BezierGait from include.spotmini_kinemat...
[ "copy.deepcopy", "pickle.dump", "numpy.random.seed", "numpy.tanh", "scipy.signal.filtfilt", "numpy.random.randn", "rospkg.RosPack", "numpy.zeros", "include.spotmini_kinematics.util.gui.GUI", "numpy.clip", "pickle.load", "numpy.array", "scipy.signal.butter", "numpy.sqrt" ]
[((151, 167), 'rospkg.RosPack', 'rospkg.RosPack', ([], {}), '()\n', (165, 167), False, 'import rospkg\n'), ((577, 594), 'numpy.random.seed', 'np.random.seed', (['(0)'], {}), '(0)\n', (591, 594), True, 'import numpy as np\n'), ((1406, 1461), 'scipy.signal.butter', 'butter', (['order', 'normal_cutoff'], {'btype': '"""low...
import inspect from django.utils.module_loading import import_string from docutils.parsers.rst import roles from django_docutils.references.rst.roles import XRefRole from ..settings import BASED_LIB_RST def register_based_roles(): """Register all roles, exists to avoid race conditions / pulling in deps. T...
[ "docutils.parsers.rst.roles.register_local_role", "django.utils.module_loading.import_string", "inspect.isclass" ]
[((4125, 4151), 'django.utils.module_loading.import_string', 'import_string', (['role_cb_str'], {}), '(role_cb_str)\n', (4138, 4151), False, 'from django.utils.module_loading import import_string\n'), ((4508, 4530), 'inspect.isclass', 'inspect.isclass', (['role_'], {}), '(role_)\n', (4523, 4530), False, 'import inspect...
import json import pytest from pathlib import Path from dbt_cloud.command import ( DbtCloudJobGetCommand, DbtCloudJobListCommand, DbtCloudJobCreateCommand, DbtCloudJobDeleteCommand, DbtCloudJobRunCommand, DbtCloudRunGetCommand, DbtCloudRunListArtifactsCommand, DbtCloudRunGetArtifactComma...
[ "json.loads", "dbt_cloud.command.DbtCloudRunGetCommand", "dbt_cloud.command.DbtCloudJobDeleteCommand", "dbt_cloud.command.DbtCloudRunListArtifactsCommand", "dbt_cloud.command.DbtCloudJobGetCommand", "dbt_cloud.command.DbtCloudRunGetArtifactCommand", "pathlib.Path", "dbt_cloud.command.DbtCloudJobListCo...
[((676, 701), 'json.loads', 'json.loads', (['response_json'], {}), '(response_json)\n', (686, 701), False, 'import json\n'), ((1154, 1239), 'dbt_cloud.command.DbtCloudJobGetCommand', 'DbtCloudJobGetCommand', ([], {'api_token': 'API_TOKEN', 'account_id': 'ACCOUNT_ID', 'job_id': 'JOB_ID'}), '(api_token=API_TOKEN, account...
from flask_restful import Resource from flask.json import jsonify from flask import request from src.utilities.utils import FileOperation from src.resources.response_gen import Response from src.errors.error_validator import ValidationResponse from src.errors.errors_exception import FormatError from src.utilities.model...
[ "src.utilities.utils.FileOperation", "src.resources.response_gen.Response", "src.errors.error_validator.ValidationResponse", "anuvaad_auditor.loghandler.log_info", "flask.json.jsonify", "time.time", "anuvaad_auditor.loghandler.log_error", "flask.request.get_json", "src.utilities.app_context.init" ]
[((552, 567), 'src.utilities.utils.FileOperation', 'FileOperation', ([], {}), '()\n', (565, 567), False, 'from src.utilities.utils import FileOperation\n'), ((824, 852), 'flask.request.get_json', 'request.get_json', ([], {'force': '(True)'}), '(force=True)\n', (840, 852), False, 'from flask import request\n'), ((861, 8...
#!/usr/bin/env python from test.core_tests.test_scan import TestIris, TestCancer, TestLoadDatasets if __name__ == '__main__': # TODO describe what all this does TestCancer().test_linear_method() TestCancer().test_reverse_method() TestIris().test_scan_iris_explicit_validation_set() TestIris().tes...
[ "test.core_tests.test_scan.TestIris", "test.core_tests.test_scan.TestCancer", "test.core_tests.test_scan.TestLoadDatasets" ]
[((477, 495), 'test.core_tests.test_scan.TestLoadDatasets', 'TestLoadDatasets', ([], {}), '()\n', (493, 495), False, 'from test.core_tests.test_scan import TestIris, TestCancer, TestLoadDatasets\n'), ((173, 185), 'test.core_tests.test_scan.TestCancer', 'TestCancer', ([], {}), '()\n', (183, 185), False, 'from test.core_...
import os from setuptools import setup, find_packages with open(os.path.join(os.getcwd(), 'configs/__VERSION__')) as fp: __VERSION__ = str(fp.read()) def readme(): with open('README.md') as f: README = f.read() return README with open('requirements.txt') as f: required = f.read().splitlines()...
[ "os.getcwd", "setuptools.find_packages" ]
[((857, 924), 'setuptools.find_packages', 'find_packages', ([], {'exclude': "['*.tests', '*.tests.*', 'tests.*', 'tests']"}), "(exclude=['*.tests', '*.tests.*', 'tests.*', 'tests'])\n", (870, 924), False, 'from setuptools import setup, find_packages\n'), ((78, 89), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (87, 89), ...
from modulos.menu3 import grabcam from modulos.menu5 import lazybee import sys import random from Zawiencom import * from menu1 import * from menu2 import * from menu3 import * from menu4 import * from menu5 import * from autoinstalador import * def pedido_1_pt(): os.system("clear") print (" [1] N...
[ "modulos.menu5.lazybee", "random.choice", "modulos.menu3.grabcam" ]
[((1363, 1392), 'random.choice', 'random.choice', (['dicas_menu1_pt'], {}), '(dicas_menu1_pt)\n', (1376, 1392), False, 'import random\n'), ((3793, 3822), 'random.choice', 'random.choice', (['dicas_menu2_pt'], {}), '(dicas_menu2_pt)\n', (3806, 3822), False, 'import random\n'), ((9321, 9330), 'modulos.menu5.lazybee', 'la...
import RPi.GPIO as GPIO import time GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) GPIO.setup(16,GPIO.OUT) GPIO.setup(19,GPIO.OUT) GPIO.setup(20,GPIO.OUT) GPIO.setup(21,GPIO.OUT) GPIO.output(16,1) GPIO.output(19,1) GPIO.output(20,1) GPIO.output(21,1) time.sleep(1) #wait 1 second GPIO.output(16,0) #blue on time.slee...
[ "RPi.GPIO.setmode", "RPi.GPIO.cleanup", "RPi.GPIO.setup", "time.sleep", "RPi.GPIO.output", "RPi.GPIO.setwarnings" ]
[((36, 59), 'RPi.GPIO.setwarnings', 'GPIO.setwarnings', (['(False)'], {}), '(False)\n', (52, 59), True, 'import RPi.GPIO as GPIO\n'), ((60, 82), 'RPi.GPIO.setmode', 'GPIO.setmode', (['GPIO.BCM'], {}), '(GPIO.BCM)\n', (72, 82), True, 'import RPi.GPIO as GPIO\n'), ((84, 108), 'RPi.GPIO.setup', 'GPIO.setup', (['(16)', 'GP...
# Lint as: python3 # Copyright 2018 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 ...
[ "lingvo.core.summary_utils.scalar", "lingvo.compat.ragged.boolean_mask", "lingvo.compat.range", "lingvo.compat.expand_dims", "lingvo.compat.math.equal", "lingvo.core.ops.apply_packing", "lingvo.core.summary_utils.histogram", "lingvo.compat.stack", "lingvo.compat.math.maximum", "lingvo.compat.strin...
[((14085, 14123), 'lingvo.compat.cast', 'tf.cast', (['(weights * ret)'], {'dtype': 'tf.int32'}), '(weights * ret, dtype=tf.int32)\n', (14092, 14123), True, 'import lingvo.compat as tf\n'), ((14256, 14290), 'google.protobuf.descriptor_pb2.FileDescriptorSet', 'descriptor_pb2.FileDescriptorSet', ([], {}), '()\n', (14288, ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Jan 18 00:46:15 2021 @author: selenm """ import csv import numpy as np fil_name = 'Data_exp1' #example = np.zeros((2,3,4)) x = x.tolist() with open(fil_name+'.csv', 'w', newline='') as csvfile: writer = csv.writer(csvfile, delimiter=',') writ...
[ "csv.reader", "csv.writer" ]
[((277, 311), 'csv.writer', 'csv.writer', (['csvfile'], {'delimiter': '""","""'}), "(csvfile, delimiter=',')\n", (287, 311), False, 'import csv\n'), ((386, 399), 'csv.reader', 'csv.reader', (['f'], {}), '(f)\n', (396, 399), False, 'import csv\n')]
# Generated by Django 2.2.8 on 2021-04-17 09:50 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('shortlinks', '0003_auto_20210407_1409'), ] operations = [ migrations.AddField( model_name='link', ...
[ "django.db.models.DateTimeField" ]
[((374, 448), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now_add': '(True)', 'default': 'django.utils.timezone.now'}), '(auto_now_add=True, default=django.utils.timezone.now)\n', (394, 448), False, 'from django.db import migrations, models\n'), ((607, 681), 'django.db.models.DateTimeField', '...
#!/usr/bin/env python3 # Copyright 2021 <NAME> # See LICENSE file for licensing details. # # Learn more at: https://juju.is/docs/sdk """Charm the service. Refer to the following post for a quick-start guide that will help you develop a new k8s charm using the Operator Framework: https://discourse.charmhub.io/t/4...
[ "ops.model.WaitingStatus", "charms.prometheus.v1.prometheus.PrometheusConsumer", "ops.model.BlockedStatus", "ops.model.ActiveStatus", "logging.getLogger", "ops.main.main" ]
[((588, 615), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (605, 615), False, 'import logging\n'), ((4635, 4665), 'ops.main.main', 'main', (['KubeStateMetricsOperator'], {}), '(KubeStateMetricsOperator)\n', (4639, 4665), False, 'from ops.main import main\n'), ((780, 843), 'charms.promet...
# automatically generated by the FlatBuffers compiler, do not modify # namespace: import flatbuffers from flatbuffers.compat import import_numpy np = import_numpy() class Attribute(object): __slots__ = ["_tab"] @classmethod def GetRootAsAttribute(cls, buf, offset): n = flatbuffers.encode.Get(f...
[ "flatbuffers.util.BufferHasIdentifier", "flatbuffers.number_types.UOffsetTFlags.py_type", "flatbuffers.encode.Get", "flatbuffers.compat.import_numpy", "flatbuffers.table.Table" ]
[((153, 167), 'flatbuffers.compat.import_numpy', 'import_numpy', ([], {}), '()\n', (165, 167), False, 'from flatbuffers.compat import import_numpy\n'), ((296, 359), 'flatbuffers.encode.Get', 'flatbuffers.encode.Get', (['flatbuffers.packer.uoffset', 'buf', 'offset'], {}), '(flatbuffers.packer.uoffset, buf, offset)\n', (...
from PyQt5.QtWidgets import (QLineEdit, QDialog, QFormLayout) from PyQt5.QtCore import (Qt, QEvent) from PyQt5.QtGui import QKeySequence from PyMangaLogger import log from ui_hotkey import Ui_HotkeyDialog class HotkeyLineEdit(QLineEdit): key_sequence = None def __init__(self, parent=None): super(Hotk...
[ "PyMangaLogger.log.info", "PyQt5.QtCore.Qt.Key", "ui_hotkey.Ui_HotkeyDialog", "PyQt5.QtGui.QKeySequence" ]
[((448, 462), 'PyQt5.QtGui.QKeySequence', 'QKeySequence', ([], {}), '()\n', (460, 462), False, 'from PyQt5.QtGui import QKeySequence\n'), ((805, 828), 'PyMangaLogger.log.info', 'log.info', (['"""Mouse press"""'], {}), "('Mouse press')\n", (813, 828), False, 'from PyMangaLogger import log\n'), ((969, 990), 'PyMangaLogge...
import json # File format import matplotlib.pyplot as plt # Visualisation import numpy as np # Linear Algebra import pandas as pd # Data Wrangling import random # Random sampling import seaborn as sns # Visualisations import sys # Deep learning import torch import torch.nn.functional as F # Machine learning metrics ...
[ "seaborn.heatmap", "sklearn.metrics.accuracy_score", "matplotlib.pyplot.figure", "numpy.mean", "scipy.stats.kendalltau", "torch.no_grad", "sys.path.append", "numpy.isfinite", "statistics.mode", "seaborn.set", "torch.mean", "torch.topk", "matplotlib.pyplot.show", "sklearn.metrics.recall_sco...
[((701, 758), 'sys.path.append', 'sys.path.append', (['"""/projects/../../PythonNotebooks/model/"""'], {}), "('/projects/../../PythonNotebooks/model/')\n", (716, 758), False, 'import sys\n'), ((5253, 5268), 'torch.no_grad', 'torch.no_grad', ([], {}), '()\n', (5266, 5268), False, 'import torch\n'), ((5822, 5837), 'torch...
""" This creates the app and initializes all the components in the right order. """ import os from flask import Flask def create_app(test_config=None): # create the flask object app = Flask( __name__, instance_relative_config=True, template_folder='views', static_folder='static...
[ "drink_robot.controllers.init_all_blueprints", "os.makedirs", "flask.Flask", "drink_robot.models.init_db", "os.path.join", "drink_robot.controllers.init_pins" ]
[((194, 320), 'flask.Flask', 'Flask', (['__name__'], {'instance_relative_config': '(True)', 'template_folder': '"""views"""', 'static_folder': '"""static"""', 'static_url_path': '"""/static"""'}), "(__name__, instance_relative_config=True, template_folder='views',\n static_folder='static', static_url_path='/static')...
""" This module contains the github backend. """ import logging import webbrowser import keyring from .base import BaseBackend from ..formatters.markdown import MardownFormatter from ..qt import QtGui, QtCore, QtWidgets from .._dialogs.gh_login import DlgGitHubLogin from .._extlibs import github GH_MARK_NORMAL = ':...
[ "webbrowser.open", "keyring.get_password", "keyring.set_password", "logging.getLogger" ]
[((414, 441), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (431, 441), False, 'import logging\n'), ((3533, 3634), 'webbrowser.open', 'webbrowser.open', (["('https://github.com/%s/%s/issues/%d' % (self.gh_owner, self.gh_repo,\n issue_nbr))"], {}), "('https://github.com/%s/%s/issues/%d...
from torch import nn class FullyConnectedNetwork(nn.Module): """Builds a fully connected estimate network with the specified layer sizes""" def __init__(self, input_size, hidden_sizes, output_size): super(FullyConnectedNetwork, self).__init__() layers = [] # add input and hidden lay...
[ "torch.nn.Linear", "torch.nn.ReLU", "torch.nn.Sequential" ]
[((669, 691), 'torch.nn.Sequential', 'nn.Sequential', (['*layers'], {}), '(*layers)\n', (682, 691), False, 'from torch import nn\n'), ((590, 621), 'torch.nn.Linear', 'nn.Linear', (['size_in', 'output_size'], {}), '(size_in, output_size)\n', (599, 621), False, 'from torch import nn\n'), ((417, 445), 'torch.nn.Linear', '...
import os import sys BASE_DIR = os.path.dirname(os.path.abspath(__file__)) ROOT_DIR = os.path.dirname(BASE_DIR) sys.path.append(os.path.join(ROOT_DIR, 'utils')) sys.path.append(os.path.join(ROOT_DIR, 'tf_ops/grouping')) sys.path.append(os.path.join(ROOT_DIR, 'tf_ops/3d_interpolation')) sys.path.append(os.path.join(ROOT...
[ "tf_util.conv1d", "os.path.abspath", "tensorflow.reduce_sum", "tf_interpolate.three_interpolate", "tf_interpolate.three_nn", "tensorflow.maximum", "os.path.dirname", "tensorflow.reduce_max", "tensorflow.reduce_mean", "tensorflow.concat", "tensorflow.variable_scope", "tf_util.conv2d", "tf_gro...
[((86, 111), 'os.path.dirname', 'os.path.dirname', (['BASE_DIR'], {}), '(BASE_DIR)\n', (101, 111), False, 'import os\n'), ((48, 73), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (63, 73), False, 'import os\n'), ((128, 159), 'os.path.join', 'os.path.join', (['ROOT_DIR', '"""utils"""'], {}), ...
from typing import List, TextIO from prompt_toolkit.cursor_shapes import CursorShape from prompt_toolkit.data_structures import Size from prompt_toolkit.styles import Attrs from .base import Output from .color_depth import ColorDepth from .flush_stdout import flush_stdout __all__ = ["PlainTextOutput"] class PlainT...
[ "prompt_toolkit.data_structures.Size" ]
[((3077, 3102), 'prompt_toolkit.data_structures.Size', 'Size', ([], {'rows': '(40)', 'columns': '(80)'}), '(rows=40, columns=80)\n', (3081, 3102), False, 'from prompt_toolkit.data_structures import Size\n')]
from datetime import datetime import uuid import structlog from structlog.contextvars import clear_contextvars, bind_contextvars from servicelayer.jobs import Dataset from servicelayer.worker import Worker from servicelayer.extensions import get_entry_point from servicelayer.logs import apply_task_context from aleph ...
[ "servicelayer.extensions.get_entry_point", "aleph.core.db.session.remove", "aleph.logic.alerts.check_alerts", "aleph.queues.get_dataset_collection_id", "aleph.logic.collections.compute_collections", "aleph.logic.roles.update_roles", "aleph.logic.export.delete_expired_exports", "aleph.model.Collection....
[((988, 1018), 'structlog.get_logger', 'structlog.get_logger', (['__name__'], {}), '(__name__)\n', (1008, 1018), False, 'import structlog\n'), ((1025, 1080), 'aleph.core.create_app', 'create_app', ([], {'config': "{'SERVER_NAME': settings.APP_UI_URL}"}), "(config={'SERVER_NAME': settings.APP_UI_URL})\n", (1035, 1080), ...
import os from torch.utils.data import Dataset from skimage import metrics from torch.utils.data.dataset import Dataset from torchvision.transforms import ToTensor import random import matplotlib.pyplot as plt import torch import numpy as np import h5py from torch.utils.data import DataLoader from utils import * clas...
[ "h5py.File", "torch.utils.data.DataLoader", "numpy.transpose", "random.random", "os.listdir", "torchvision.transforms.ToTensor" ]
[((5673, 5688), 'random.random', 'random.random', ([], {}), '()\n', (5686, 5688), False, 'import random\n'), ((5791, 5806), 'random.random', 'random.random', ([], {}), '()\n', (5804, 5806), False, 'import random\n'), ((5909, 5924), 'random.random', 'random.random', ([], {}), '()\n', (5922, 5924), False, 'import random\...
#!/usr/bin/env python from future import standard_library standard_library.install_aliases() import sys import os if os.environ.get('LC_CTYPE', '') == 'UTF-8': os.environ['LC_CTYPE'] = 'en_US.UTF-8' import cli def main(): return cli.main() if __name__ == '__main__': sys.exit(main())
[ "os.environ.get", "future.standard_library.install_aliases", "cli.main" ]
[((59, 93), 'future.standard_library.install_aliases', 'standard_library.install_aliases', ([], {}), '()\n', (91, 93), False, 'from future import standard_library\n'), ((120, 150), 'os.environ.get', 'os.environ.get', (['"""LC_CTYPE"""', '""""""'], {}), "('LC_CTYPE', '')\n", (134, 150), False, 'import os\n'), ((241, 251...
"""The Samsung TV integration.""" from __future__ import annotations from collections.abc import Mapping from functools import partial import socket from typing import Any import getmac import voluptuous as vol from homeassistant import config_entries from homeassistant.config_entries import ConfigEntry from homeass...
[ "functools.partial", "homeassistant.helpers.config_validation.deprecated", "voluptuous.Optional", "voluptuous.Required", "homeassistant.exceptions.ConfigEntryAuthFailed", "voluptuous.Unique", "homeassistant.exceptions.ConfigEntryNotReady" ]
[((1138, 1180), 'voluptuous.Unique', 'vol.Unique', (['"""duplicate host entries found"""'], {}), "('duplicate host entries found')\n", (1148, 1180), True, 'import voluptuous as vol\n'), ((3212, 3288), 'homeassistant.exceptions.ConfigEntryAuthFailed', 'ConfigEntryAuthFailed', (['"""Token and session id are required in e...
# Copyright (c) 2016 <NAME> # 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 ap...
[ "tempest.lib.decorators.idempotent_id", "tempest.lib.common.utils.data_utils.rand_name", "tempest.common.utils.requires_ext", "netaddr.IPNetwork" ]
[((1250, 1321), 'tempest.common.utils.requires_ext', 'utils.requires_ext', ([], {'extension': '"""router-interface-fip"""', 'service': '"""network"""'}), "(extension='router-interface-fip', service='network')\n", (1268, 1321), False, 'from tempest.common import utils\n'), ((1413, 1477), 'tempest.lib.decorators.idempote...
from bb.web.host import * from bb.core.game import * from bb.core.load import * from bb.ai.bots import RandomBot # Create a game host host = Host() def new_game(away_team_id, home_team_id, away_agent=None, home_agent=None, config_name="ff-11.json"): assert away_agent is not None assert home_agent is not None...
[ "bb.ai.bots.RandomBot" ]
[((1551, 1574), 'bb.ai.bots.RandomBot', 'RandomBot', (['"""Random Bot"""'], {}), "('Random Bot')\n", (1560, 1574), False, 'from bb.ai.bots import RandomBot\n')]
#!/usr/bin/env python # # Copyright (C) 2016-2020 Wason Technology, 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 required ...
[ "math.fmod", "math.fabs", "math.sin", "time.sleep", "math.cos" ]
[((832, 867), 'math.fmod', 'math.fmod', (['(q + math.pi)', '(2 * math.pi)'], {}), '(q + math.pi, 2 * math.pi)\n', (841, 867), False, 'import math\n'), ((984, 997), 'math.sin', 'math.sin', (['q_2'], {}), '(q_2)\n', (992, 997), False, 'import math\n'), ((1005, 1018), 'math.cos', 'math.cos', (['q_2'], {}), '(q_2)\n', (101...
#!/usr/bin/env python3 # # CGI application that queries DBLP for publications in a given venue and # year range, and displays authors with Greek names. # # Copyright 2013 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # ...
[ "threading.Thread", "subprocess.Popen", "cgitb.enable", "json.loads", "sys.stdout.close", "cgi.FieldStorage", "cgi.escape", "re.sub", "queue.Queue" ]
[((929, 947), 'sys.stdout.close', 'sys.stdout.close', ([], {}), '()\n', (945, 947), False, 'import sys\n'), ((993, 1007), 'cgitb.enable', 'cgitb.enable', ([], {}), '()\n', (1005, 1007), False, 'import cgitb\n'), ((4356, 4374), 'cgi.FieldStorage', 'cgi.FieldStorage', ([], {}), '()\n', (4372, 4374), False, 'import cgi\n'...
from setuptools import setup setup(name='captionbot', version='0.1.4', description='Simple API wrapper for https://www.captionbot.ai/', url='http://github.com/krikunts/captionbot', author='<NAME>', author_email='<EMAIL>', license='MIT', packages=['captionbot'], install_r...
[ "setuptools.setup" ]
[((30, 329), 'setuptools.setup', 'setup', ([], {'name': '"""captionbot"""', 'version': '"""0.1.4"""', 'description': '"""Simple API wrapper for https://www.captionbot.ai/"""', 'url': '"""http://github.com/krikunts/captionbot"""', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'license': '"""MIT"""', 'packag...
"""Testing utils for rule plugins.""" from sqlfluff.core import Linter from sqlfluff.core.errors import SQLParseError, SQLTemplaterError from sqlfluff.core.rules import get_ruleset from sqlfluff.core.config import FluffConfig from typing import Tuple, List, NamedTuple, Optional, Set from glob import glob import pytest...
[ "sqlfluff.core.Linter", "pytest.fail", "yaml.dump", "pytest.skip", "sqlfluff.core.rules.get_ruleset", "sqlfluff.core.config.FluffConfig", "yaml.safe_load", "glob.glob" ]
[((1934, 1989), 'sqlfluff.core.config.FluffConfig', 'FluffConfig', ([], {'configs': 'configs', 'overrides': "{'rules': code}"}), "(configs=configs, overrides={'rules': code})\n", (1945, 1989), False, 'from sqlfluff.core.config import FluffConfig\n'), ((3453, 3481), 'sqlfluff.core.config.FluffConfig', 'FluffConfig', ([]...
import json import snapshottest from assertpy import assert_that from graphene_django.utils import GraphQLTestCase from rest_framework.test import APIClient from reservations.models import AgeGroup class AgeGroupsGraphQLTestCase(GraphQLTestCase, snapshottest.TestCase): @classmethod def setUpTestData(cls): ...
[ "assertpy.assert_that", "reservations.models.AgeGroup.objects.create", "rest_framework.test.APIClient", "json.loads" ]
[((344, 355), 'rest_framework.test.APIClient', 'APIClient', ([], {}), '()\n', (353, 355), False, 'from rest_framework.test import APIClient\n'), ((404, 451), 'reservations.models.AgeGroup.objects.create', 'AgeGroup.objects.create', ([], {'minimum': '(18)', 'maximum': '(30)'}), '(minimum=18, maximum=30)\n', (427, 451), ...
from argparse import ArgumentParser from ecdsa import SECP256k1, VerifyingKey from hashlib import sha256 from os import path parser = ArgumentParser() parser.add_argument("-s", "--signature", help="signature") parser.add_argument("-m", "--message", help="message or file containing message") parser.add_argument("-k", "...
[ "os.path.exists", "argparse.ArgumentParser" ]
[((135, 151), 'argparse.ArgumentParser', 'ArgumentParser', ([], {}), '()\n', (149, 151), False, 'from argparse import ArgumentParser\n'), ((2573, 2598), 'os.path.exists', 'path.exists', (['args.message'], {}), '(args.message)\n', (2584, 2598), False, 'from os import path\n')]
#!/usr/bin/env python # -*- coding: utf-8 -*- import jax.numpy as np import numpy import re def log_add_exp(lhs, rhs): return np.log(np.add(np.exp(lhs), np.exp(rhs))) def log_sum_exp(data, axis=None): return np.log(np.sum(np.exp(data), axis=axis)) class DummyBackend: add = np.add sub = np.subtrac...
[ "numpy.argsort", "jax.numpy.transpose", "re.split", "jax.numpy.exp" ]
[((1254, 1276), 're.split', 're.split', (['"""\\\\W+"""', 'spec'], {}), "('\\\\W+', spec)\n", (1262, 1276), False, 'import re\n'), ((1464, 1487), 'numpy.argsort', 'numpy.argsort', (['lhs_spec'], {}), '(lhs_spec)\n', (1477, 1487), False, 'import numpy\n'), ((1498, 1526), 'jax.numpy.transpose', 'np.transpose', (['lhs', '...
# Copyright 2017 DataCentred 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 ag...
[ "pecan.abort", "pecan.request.GET.keys", "sentinel.utils.check_permissions", "functools.wraps" ]
[((797, 818), 'functools.wraps', 'functools.wraps', (['func'], {}), '(func)\n', (812, 818), False, 'import functools\n'), ((1278, 1299), 'functools.wraps', 'functools.wraps', (['func'], {}), '(func)\n', (1293, 1299), False, 'import functools\n'), ((1952, 1987), 'sentinel.utils.check_permissions', 'utils.check_permissio...
import re import pandas as pd def get_setup_parameters(matl_file): """ :param matl_file: full path to output from olympus run (matl.omp2info) :return: dictionary with parameters from run """ results = dict() file = open(matl_file, "r") for line in file.readlines(): if 'matl:ov...
[ "pandas.DataFrame", "re.search" ]
[((1709, 1727), 'pandas.DataFrame', 'pd.DataFrame', (['rows'], {}), '(rows)\n', (1721, 1727), True, 'import pandas as pd\n'), ((373, 425), 're.search', 're.search', (['"""<matl:overlap>(.*)</matl:overlap>"""', 'line'], {}), "('<matl:overlap>(.*)</matl:overlap>', line)\n", (382, 425), False, 'import re\n'), ((670, 726),...
#!/usr/bin/env python import sys import json import yaml # Replace title by place holder data = yaml.safe_load(json.dumps(json.loads(open(sys.argv[1]).read()))) data['titles'] = ["CMIP6 <institution_id> <source_id> <experiment_id> model output"] # Delete DRS subject (will be filled in by the JSON-Generator) del data...
[ "yaml.dump" ]
[((555, 596), 'yaml.dump', 'yaml.dump', (['data'], {'default_flow_style': '(False)'}), '(data, default_flow_style=False)\n', (564, 596), False, 'import yaml\n')]
from argparse import ArgumentParser from unittest.mock import patch import pytest from brain_brew.configuration.argument_reader import BBArgumentReader @pytest.fixture() def arg_reader_test1(): return BBArgumentReader() def test_constructor(arg_reader_test1): assert isinstance(arg_reader_test1, BBArgument...
[ "unittest.mock.patch.object", "brain_brew.configuration.argument_reader.BBArgumentReader", "pytest.fixture", "pytest.raises", "pytest.mark.parametrize" ]
[((157, 173), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (171, 173), False, 'import pytest\n'), ((209, 227), 'brain_brew.configuration.argument_reader.BBArgumentReader', 'BBArgumentReader', ([], {}), '()\n', (225, 227), False, 'from brain_brew.configuration.argument_reader import BBArgumentReader\n'), ((412,...
from __future__ import annotations from typing import Optional, List, Set, Dict from dataclasses import dataclass from copy import deepcopy class Edge: """ An edge of a graph Fields ====== node_one: str The label of one of the nodes in the edge node_two: str The label of th...
[ "copy.deepcopy" ]
[((7359, 7387), 'copy.deepcopy', 'deepcopy', (['self.node_to_edges'], {}), '(self.node_to_edges)\n', (7367, 7387), False, 'from copy import deepcopy\n')]
import asyncio from cDatabase.DB_Users import DB_Users from helper.User import User db_users = DB_Users('db_users') # ------------------ [ my_background_task__Role_Management() ] ------------------ # # Runs after the bot becomes online # Checks that each user in the user database of the bot has the correct ro...
[ "cDatabase.DB_Users.DB_Users", "asyncio.sleep", "helper.User.User" ]
[((96, 116), 'cDatabase.DB_Users.DB_Users', 'DB_Users', (['"""db_users"""'], {}), "('db_users')\n", (104, 116), False, 'from cDatabase.DB_Users import DB_Users\n'), ((538, 554), 'asyncio.sleep', 'asyncio.sleep', (['(2)'], {}), '(2)\n', (551, 554), False, 'import asyncio\n'), ((701, 752), 'helper.User.User', 'User', ([]...
from django.urls import reverse from workshops.tests.base import TestBase from workshops.lookups import urlpatterns class TestLookups(TestBase): """Test suite for Django-Autocomplete-Light lookups.""" def setUp(self): # prepare urlpatterns; only include lookup views that are restricted # to ...
[ "django.urls.reverse" ]
[((720, 741), 'django.urls.reverse', 'reverse', (['pattern.name'], {}), '(pattern.name)\n', (727, 741), False, 'from django.urls import reverse\n'), ((930, 951), 'django.urls.reverse', 'reverse', (['pattern.name'], {}), '(pattern.name)\n', (937, 951), False, 'from django.urls import reverse\n')]
import os import sqlite3 from coverage import Coverage from coverage.numbits import register_sqlite_functions def get_coverage_config(): cov = Coverage() return cov.config def get_data_file(): config = get_coverage_config() return config.data_file def db_exists(): return os.path.exists(get_da...
[ "coverage.numbits.register_sqlite_functions", "coverage.Coverage" ]
[((150, 160), 'coverage.Coverage', 'Coverage', ([], {}), '()\n', (158, 160), False, 'from coverage import Coverage\n'), ((409, 446), 'coverage.numbits.register_sqlite_functions', 'register_sqlite_functions', (['connection'], {}), '(connection)\n', (434, 446), False, 'from coverage.numbits import register_sqlite_functio...
# BSD Licence # Copyright (c) 2009, Science & Technology Facilities Council (STFC) # All rights reserved. # # See the LICENSE file in the source distribution of this software for # the full license text. """ An implementation of model.WebMapService driven from a CSML file. @author: <NAME> """ from model import WebMa...
[ "os.remove", "csml.parser.Dataset", "tempfile.mkstemp", "cdms.open", "wms_cdms.CdmsGrid", "tempfile.mkdtemp", "os.close", "os.rmdir" ]
[((1464, 1487), 'os.rmdir', 'os.rmdir', (['self._tempdir'], {}), '(self._tempdir)\n', (1472, 1487), False, 'import tempfile, os, sys\n'), ((1985, 2006), 'cdms.open', 'cdms.open', (['ncfilename'], {}), '(ncfilename)\n', (1994, 2006), False, 'import cdms, csml\n'), ((3953, 3966), 'wms_cdms.CdmsGrid', 'CdmsGrid', (['var']...
from __future__ import print_function import sys sys.path.append(r"../..") import sys from pytestqt import qtbot from lxml import etree from PyQt5.QtWidgets import QWidget, QComboBox from pymdwizard.gui import Status def test_status_from_xml(qtbot): widget = Status.Status() qtbot.addWidget(widget) tes...
[ "sys.path.append", "pymdwizard.gui.Status.Status", "pytestqt.qtbot.addWidget", "lxml.etree.parse", "lxml.etree.tostring" ]
[((50, 74), 'sys.path.append', 'sys.path.append', (['"""../.."""'], {}), "('../..')\n", (65, 74), False, 'import sys\n'), ((268, 283), 'pymdwizard.gui.Status.Status', 'Status.Status', ([], {}), '()\n', (281, 283), False, 'from pymdwizard.gui import Status\n'), ((288, 311), 'pytestqt.qtbot.addWidget', 'qtbot.addWidget',...
from pathlib import Path import click import requests @click.command() @click.argument('username') def cmd_api_client(username): r = requests.get('http://127.0.1.1:5000/api/post/{}'.format(username)) if r.status_code != 200: click.echo('Some error ocurred. Status Code: {}'.format(r.status_code)) ...
[ "click.argument", "click.command" ]
[((58, 73), 'click.command', 'click.command', ([], {}), '()\n', (71, 73), False, 'import click\n'), ((75, 101), 'click.argument', 'click.argument', (['"""username"""'], {}), "('username')\n", (89, 101), False, 'import click\n')]
import pandapower as pp from pandapower import runpp from pandapower.plotting import simple_plotly, pf_res_plotly import pandapower.networks as networks from citylearn import CityLearn from gridlearn import GridLearn from agent import RBC_Agent, Do_Nothing_Agent, Randomized_Agent import numpy as np import pandas as pd ...
[ "pandapower.plotting.pf_res_plotly", "agent.Do_Nothing_Agent", "gridlearn.GridLearn" ]
[((894, 1151), 'gridlearn.GridLearn', 'GridLearn', (['data_path', 'building_attributes', 'weather_file', 'solar_profile', 'building_ids', 'hourly_steps'], {'buildings_states_actions': 'building_state_actions', 'cost_function': 'objective_function', 'verbose': '(1)', 'n_buildings_per_bus': '(1)', 'pv_penetration': '(1)'...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Routines here are for getting any NULL-terminated sequence of bytes evaluated intact by any shell. This includes all variants of quotes, whitespace, and non-printable characters. Supported Shells ---------------- The following shells have been evaluated: - Ubuntu (...
[ "pwnlib.log.getLogger", "pwnlib.util.misc.which", "six.int2byte", "pwnlib.tubes.process.process", "six.b" ]
[((9583, 9602), 'pwnlib.log.getLogger', 'getLogger', (['__name__'], {}), '(__name__)\n', (9592, 9602), False, 'from pwnlib.log import getLogger\n'), ((10718, 10747), 'six.b', 'six.b', (["('/bin/echo %s' % input)"], {}), "('/bin/echo %s' % input)\n", (10723, 10747), False, 'import six\n'), ((9723, 9738), 'six.int2byte',...
# Copyright 2016 Huawei Technologies India Pvt. 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...
[ "neutron_dynamic_routing.services.bgp.driver.utils.BgpMultiSpeakerCache" ]
[((956, 984), 'neutron_dynamic_routing.services.bgp.driver.utils.BgpMultiSpeakerCache', 'utils.BgpMultiSpeakerCache', ([], {}), '()\n', (982, 984), False, 'from neutron_dynamic_routing.services.bgp.driver import utils\n')]
from django.conf.urls import url from .views import library_view, album_view, photo_view urlpatterns = [ url(r'library/$', library_view), url(r'album/(?P<album_id>\d+)$', album_view), url(r'photos/(?P<photo_id>\d+)$', photo_view) ]
[ "django.conf.urls.url" ]
[((110, 140), 'django.conf.urls.url', 'url', (['"""library/$"""', 'library_view'], {}), "('library/$', library_view)\n", (113, 140), False, 'from django.conf.urls import url\n'), ((147, 191), 'django.conf.urls.url', 'url', (['"""album/(?P<album_id>\\\\d+)$"""', 'album_view'], {}), "('album/(?P<album_id>\\\\d+)$', album...
import itk import pydicom import numpy as np from scipy.signal import find_peaks from skimage.morphology import disk from skimage.morphology import dilation import skimage.filters import itkpocus.util import skvideo.io '''Preprocessing and device-specific IO for the Sonoque.''' def _find_spacing(npimg): ''' F...
[ "pydicom.dcmread", "numpy.sum", "numpy.logical_and", "itk.image_from_array", "skimage.morphology.disk", "numpy.min", "numpy.mean", "numpy.array", "numpy.logical_or", "numpy.max", "numpy.argwhere" ]
[((1022, 1047), 'numpy.sum', 'np.sum', (['(npimg > 0)'], {'axis': '(0)'}), '(npimg > 0, axis=0)\n', (1028, 1047), True, 'import numpy as np\n'), ((2223, 2251), 'numpy.argwhere', 'np.argwhere', (['(stuff_cols == 0)'], {}), '(stuff_cols == 0)\n', (2234, 2251), True, 'import numpy as np\n'), ((2513, 2563), 'numpy.sum', 'n...
import urllib3 import common.config as config import common.data as data import common.errors as errors import common.test_setup as setup from locust import HttpUser, task server_public_key = setup.loadServerPublicKey() setup.disable_no_cert_warnings(server_public_key, urllib3) eob_ids = data.load_bene_ids() client_c...
[ "common.errors.no_data_stop_test", "common.test_setup.disable_no_cert_warnings", "common.test_setup.loadServerPublicKey", "common.data.load_bene_ids", "common.test_setup.getClientCert", "common.config.load" ]
[((193, 220), 'common.test_setup.loadServerPublicKey', 'setup.loadServerPublicKey', ([], {}), '()\n', (218, 220), True, 'import common.test_setup as setup\n'), ((221, 279), 'common.test_setup.disable_no_cert_warnings', 'setup.disable_no_cert_warnings', (['server_public_key', 'urllib3'], {}), '(server_public_key, urllib...
""" noah_nus2.py ----------- Script to set up NUS for NOAH experiments. To turn on NUS, run `noah_nus2` from the TopSpin command line. To disable NUS on a dataset where it was previously enabled, run `noah_nus2 off`. v: 2.0.20 <NAME> & <NAME>, University of Oxford <NAME>, Bruker UK modified from original Python script...
[ "os.listdir", "random.randint", "de.bruker.nmr.prsc.dbxml.ParfileLocator.getParfileDirs", "java.lang.System.getProperty", "os.system", "os.path.isfile", "os.path.join", "de.bruker.nmr.mfw.root.UtilPath.getTopspinHome" ]
[((1786, 1803), 'de.bruker.nmr.prsc.dbxml.ParfileLocator.getParfileDirs', 'getParfileDirs', (['(0)'], {}), '(0)\n', (1800, 1803), False, 'from de.bruker.nmr.prsc.dbxml.ParfileLocator import getParfileDirs\n'), ((3135, 3151), 'de.bruker.nmr.mfw.root.UtilPath.getTopspinHome', 'getTopspinHome', ([], {}), '()\n', (3149, 31...
import datetime def timecommitcheck(end_date): today = datetime.datetime.now() end_date = datetime.datetime(end_date.year, end_date.month, end_date.day) # end_date가 오늘날짜보다 나중이면 True를 반환 if end_date > today: return True else: return False
[ "datetime.datetime.now", "datetime.datetime" ]
[((61, 84), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (82, 84), False, 'import datetime\n'), ((100, 162), 'datetime.datetime', 'datetime.datetime', (['end_date.year', 'end_date.month', 'end_date.day'], {}), '(end_date.year, end_date.month, end_date.day)\n', (117, 162), False, 'import datetime\...
# Generated by Django 2.0.2 on 2018-09-20 20:02 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Match_Regi', fields=[ ('id', models.AutoFie...
[ "django.db.models.CharField", "django.db.models.IntegerField", "django.db.models.AutoField" ]
[((306, 399), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (322, 399), False, 'from django.db import migrations, models\...
""" low level ebuild processor This basically is a coprocessor that controls a bash daemon for actual ebuild execution. Via this, the bash side can reach into the python side (and vice versa), enabling remote trees (piping data from python side into bash side for example). A couple of processors are left lingering wh...
[ "os.remove", "snakeoil.osutils.pjoin", "snakeoil.process.spawn.is_userpriv_capable", "os.close", "snakeoil.process.spawn.is_sandbox_capable", "os.waitpid", "traceback.print_exc", "snakeoil.klass.alias_attr", "snakeoil.process.spawn.atexit_register", "os.path.exists", "snakeoil.bash.ansi_escape_r...
[((1187, 1203), 'threading.Lock', 'threading.Lock', ([], {}), '()\n', (1201, 1203), False, 'import threading\n'), ((2127, 2173), 'snakeoil.process.spawn.atexit_register', 'spawn.atexit_register', (['shutdown_all_processors'], {}), '(shutdown_all_processors)\n', (2148, 2173), False, 'from snakeoil.process import spawn\n...
# a simple example about how to use the library import os, sys currentdir = os.path.dirname(os.path.realpath(__file__)) parentdir = os.path.dirname(currentdir) sys.path.append(os.path.join(parentdir, 'src')) # import the functions and Classes we will use # the import now is a little troublesome to find where the func...
[ "CTL.tensor.contract.optimalContract.contractAndCostWithSequence", "os.path.dirname", "os.path.realpath", "CTL.tensor.contract.optimalContract.generateOptimalSequence", "CTL.tensor.contract.optimalContract.contractWithSequence", "numpy.ones", "CTL.tensor.contract.link.makeLink", "CTL.tensor.contract.o...
[((133, 160), 'os.path.dirname', 'os.path.dirname', (['currentdir'], {}), '(currentdir)\n', (148, 160), False, 'import os, sys\n'), ((93, 119), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (109, 119), False, 'import os, sys\n'), ((177, 207), 'os.path.join', 'os.path.join', (['parentdir', ...
"""Module: Creates a WeatherProcessor class to prompt user interaction.""" import urllib.request import datetime from scrape_weather import WeatherScraper from db_operations import DBOperations from plot_operations import PlotOperations class WeatherProcessor(): """This class is for user interaction.""" def ...
[ "plot_operations.PlotOperations", "datetime.datetime.now", "scrape_weather.WeatherScraper", "db_operations.DBOperations" ]
[((757, 773), 'scrape_weather.WeatherScraper', 'WeatherScraper', ([], {}), '()\n', (771, 773), False, 'from scrape_weather import WeatherScraper\n'), ((804, 827), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (825, 827), False, 'import datetime\n'), ((2103, 2117), 'db_operations.DBOperations', 'DB...
import sqlalchemy as db from tqdm import tqdm from dagster import AssetKey, seven from dagster.core.events.log import EventLogEntry from dagster.serdes import deserialize_json_to_dagster_namedtuple from dagster.utils import utc_datetime_from_timestamp SECONDARY_INDEX_ASSET_KEY = "asset_key_table" # builds the asset ...
[ "tqdm.tqdm", "dagster.seven.json.dumps", "dagster.serdes.deserialize_json_to_dagster_namedtuple", "sqlalchemy.select", "dagster.serdes.serialize_dagster_namedtuple", "dagster.AssetKey.from_db_string", "dagster.utils.utc_datetime_from_timestamp" ]
[((2475, 2490), 'tqdm.tqdm', 'tqdm', (['to_insert'], {}), '(to_insert)\n', (2479, 2490), False, 'from tqdm import tqdm\n'), ((3768, 3781), 'tqdm.tqdm', 'tqdm', (['results'], {}), '(results)\n', (3772, 3781), False, 'from tqdm import tqdm\n'), ((3972, 4010), 'dagster.AssetKey.from_db_string', 'AssetKey.from_db_string', ...
import torch import numpy as np import random import json import logging import os import pickle import pandas as pd import importlib from tqdm import tqdm # %matplotlib inline from matplotlib import pyplot as plt import seaborn as sns import model from sklearn.model_selection import train_test_split from sklearn impo...
[ "numpy.random.seed", "sklearn.metrics.accuracy_score", "sklearn.metrics.f1_score", "torch.device", "numpy.round", "torch.load", "random.seed", "torch.cuda.set_device", "torch.manual_seed", "sklearn.metrics.roc_auc_score", "sklearn.metrics.precision_recall_curve", "torch.cuda.is_available", "...
[((483, 500), 'random.seed', 'random.seed', (['SEED'], {}), '(SEED)\n', (494, 500), False, 'import random\n'), ((501, 521), 'numpy.random.seed', 'np.random.seed', (['SEED'], {}), '(SEED)\n', (515, 521), True, 'import numpy as np\n'), ((522, 545), 'torch.manual_seed', 'torch.manual_seed', (['SEED'], {}), '(SEED)\n', (53...
import numpy as np from scipy.special import logsumexp from sklearn.cluster import KMeans from scipy.stats import multivariate_normal from hmm_stock_forecast.hmm.ihmm import IHMM from hmm_stock_forecast.hmm.utils import (normalise, log_mask_zero) MIN_COVAR = 1e-3 class HMM(IHMM): """ Gaussian HMM implementa...
[ "numpy.linalg.eigvals", "numpy.abs", "numpy.maximum", "numpy.ones", "numpy.exp", "scipy.special.logsumexp", "numpy.diag", "numpy.full", "numpy.zeros_like", "sklearn.cluster.KMeans", "numpy.cov", "numpy.asarray", "scipy.stats.multivariate_normal.pdf", "hmm_stock_forecast.hmm.utils.normalise...
[((1421, 1441), 'scipy.special.logsumexp', 'logsumexp', (['alpha[-1]'], {}), '(alpha[-1])\n', (1430, 1441), False, 'from scipy.special import logsumexp\n'), ((1792, 1808), 'numpy.zeros', 'np.zeros', (['self.N'], {}), '(self.N)\n', (1800, 1808), True, 'import numpy as np\n'), ((1969, 2013), 'numpy.asarray', 'np.asarray'...
"""Unit test for persistent_list.py""" __author__ = "<NAME> (<EMAIL>)" __version__ = "$Rev$" __date__ = "$Date$" __license__ = "GPL" from persistent_list import * import os import os.path import unittest class TestConditions(unittest.TestCase): def setUp(self): self.table = "persistent_list_test" ...
[ "unittest.main", "os.remove", "os.path.exists" ]
[((2105, 2120), 'unittest.main', 'unittest.main', ([], {}), '()\n', (2118, 2120), False, 'import unittest\n'), ((371, 394), 'os.path.exists', 'os.path.exists', (['self.db'], {}), '(self.db)\n', (385, 394), False, 'import os\n'), ((464, 487), 'os.path.exists', 'os.path.exists', (['self.db'], {}), '(self.db)\n', (478, 48...
import tqdm import os import logging from torchvision import transforms import copy import matplotlib.pyplot as plt import numpy as np import skimage.transform import matplotlib.cm as cm import math from sklearn.manifold import TSNE import matplotlib.pyplot as plt import umap import omegaconf import seaborn as sns sns...
[ "matplotlib.pyplot.figure", "matplotlib.pyplot.tight_layout", "os.path.join", "numpy.unique", "logging.error", "matplotlib.pyplot.imshow", "matplotlib.pyplot.close", "torchvision.transforms.ToPILImage", "matplotlib.pyplot.colorbar", "matplotlib.pyplot.set_cmap", "seaborn.set_theme", "numpy.ran...
[((317, 348), 'seaborn.set_theme', 'sns.set_theme', ([], {'style': '"""darkgrid"""'}), "(style='darkgrid')\n", (330, 348), True, 'import seaborn as sns\n'), ((837, 862), 'copy.deepcopy', 'copy.deepcopy', (['dl.dataset'], {}), '(dl.dataset)\n', (850, 862), False, 'import copy\n'), ((1204, 1239), 'os.makedirs', 'os.maked...
#!/usr/bin/env python from __future__ import print_function from collections import OrderedDict import numpy as np from kernel_tuner import tune_kernel, run_kernel from scipy.misc import imread from context import get_kernel_path, get_testdata_path def tune_zeromean(): with open(get_kernel_path()+'zeromeantota...
[ "context.get_kernel_path", "numpy.zeros", "kernel_tuner.tune_kernel", "context.get_testdata_path", "numpy.int32", "collections.OrderedDict" ]
[((454, 478), 'numpy.int32', 'np.int32', (['image.shape[0]'], {}), '(image.shape[0])\n', (462, 478), True, 'import numpy as np\n'), ((491, 515), 'numpy.int32', 'np.int32', (['image.shape[1]'], {}), '(image.shape[1])\n', (499, 515), True, 'import numpy as np\n'), ((934, 947), 'collections.OrderedDict', 'OrderedDict', ([...
from django.db import models # Create your models here. class Customer(models.Model): customerName = models.CharField(max_length=120) customerPhoto = models.CharField(max_length=120) customerAddress = models.CharField(max_length=250) customerCity = models.CharField(max_length=120) customerPhone = m...
[ "django.db.models.CharField", "django.db.models.DateTimeField", "django.db.models.ForeignKey", "django.db.models.DateField" ]
[((106, 138), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(120)'}), '(max_length=120)\n', (122, 138), False, 'from django.db import models\n'), ((159, 191), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(120)'}), '(max_length=120)\n', (175, 191), False, 'from django.d...
import os import sys import tempfile from pyftpdlib.handlers import FTPHandler from pyftpdlib.servers import FTPServer from pyftpdlib.authorizers import DummyAuthorizer from pyftpdlib.filesystems import UnixFilesystem def on_file_received(handler, file): print('remove file:'+file) os.remove(file) def main(po...
[ "os.remove", "pyftpdlib.authorizers.DummyAuthorizer", "tempfile.TemporaryDirectory", "pyftpdlib.servers.FTPServer" ]
[((292, 307), 'os.remove', 'os.remove', (['file'], {}), '(file)\n', (301, 307), False, 'import os\n'), ((414, 443), 'tempfile.TemporaryDirectory', 'tempfile.TemporaryDirectory', ([], {}), '()\n', (441, 443), False, 'import tempfile\n'), ((480, 497), 'pyftpdlib.authorizers.DummyAuthorizer', 'DummyAuthorizer', ([], {}), ...
# # file: fxy_gaussian_algs.py # # RTK, 19-Jun-2020 # Last update: 22-Jun-2020 # ################################################################ import time import os import sys sys.path.append("../") import numpy as np import matplotlib.pylab as plt from RO import * from PSO import * from Jaya import * from G...
[ "sys.path.append", "matplotlib.pylab.savefig", "numpy.random.seed", "matplotlib.pylab.legend", "numpy.zeros", "matplotlib.pylab.ylabel", "matplotlib.pylab.close", "numpy.arange", "numpy.exp", "matplotlib.pylab.tight_layout", "matplotlib.pylab.xlabel", "numpy.sqrt" ]
[((185, 207), 'sys.path.append', 'sys.path.append', (['"""../"""'], {}), "('../')\n", (200, 207), False, 'import sys\n'), ((722, 746), 'numpy.random.seed', 'np.random.seed', (['(73939133)'], {}), '(73939133)\n', (736, 746), True, 'import numpy as np\n'), ((863, 886), 'numpy.zeros', 'np.zeros', (['(runs, miter)'], {}), ...
import numpy as np from utils.generators import generate_random_distribution, generate_midpoint_displacement parameters = { 'y_start_range': (50, 400), 'y_end_range': (50, 400), 'x_start_range': (0, 1), 'x_end_range': (400, 1000), 'rough_range': (0.7, 1.5), 'vertical_displacement_range':...
[ "numpy.random.uniform", "numpy.max", "numpy.min" ]
[((1076, 1137), 'numpy.random.uniform', 'np.random.uniform', (['error_bar_min', 'error_bar_max'], {'size': 'X.shape'}), '(error_bar_min, error_bar_max, size=X.shape)\n', (1093, 1137), True, 'import numpy as np\n'), ((1391, 1400), 'numpy.max', 'np.max', (['y'], {}), '(y)\n', (1397, 1400), True, 'import numpy as np\n'), ...
import os import cv2 import numpy as np from detect_bounding_boxes import YOLO_detector ''' 对于原始数据集,使用 detect_bounding_boxes.py 预测出每张图片的 bounding boxes 信息, 对于每张图片的每个目标,其预测边界框由 4 个 int 表达,分别是 (Xmin, Ymin) - (Xmax, Ymax) PS:一行 存储一张图片中的 所有 边界框坐标,Test:741 行 以 .npy 格式保存在 ./predict YOLO.npy ''' ...
[ "numpy.save", "os.makedirs", "os.path.exists", "numpy.array", "os.listdir" ]
[((538, 569), 'os.listdir', 'os.listdir', (['original_image_path'], {}), '(original_image_path)\n', (548, 569), False, 'import os\n'), ((950, 975), 'numpy.array', 'np.array', (['save_predict_bb'], {}), '(save_predict_bb)\n', (958, 975), True, 'import numpy as np\n'), ((981, 1033), 'numpy.save', 'np.save', (['(save_path...
# jsb/plugs/core/uniq.py # # """ used in a pipeline .. unique elements. """ __author__ = "Wijnand 'tehmaze' Modderman - http://tehmaze.com" __license__ = 'BSD' ## jsb imports from jsb.lib.examples import examples from jsb.lib.commands import cmnds from jsb.utils.generic import waitforqueue ## basic imports import...
[ "jsb.lib.commands.cmnds.add", "jsb.lib.examples.examples.add", "time.sleep" ]
[((621, 678), 'jsb.lib.commands.cmnds.add', 'cmnds.add', (['"""uniq"""', 'handle_uniq', "['OPER', 'USER', 'GUEST']"], {}), "('uniq', handle_uniq, ['OPER', 'USER', 'GUEST'])\n", (630, 678), False, 'from jsb.lib.commands import cmnds\n'), ((679, 744), 'jsb.lib.examples.examples.add', 'examples.add', (['"""uniq"""', '"""s...
import os import platform import pprint import shutil if 'PROGRAMFILES(X86)' in os.environ: bits = '64bit' else: bits = '32bit' windbg_folders64 = [] windbg_folders32 = [] python_folders64 = [] python_folders32 = [] pykd_folder = r'\Lib\site-packages\pykd' if bits == '64bit': windbg_folders64.append(os....
[ "os.path.isdir", "os.path.join" ]
[((1234, 1262), 'os.path.isdir', 'os.path.isdir', (['windbg_folder'], {}), '(windbg_folder)\n', (1247, 1262), False, 'import os\n'), ((1347, 1375), 'os.path.isdir', 'os.path.isdir', (['python_folder'], {}), '(python_folder)\n', (1360, 1375), False, 'import os\n'), ((1914, 1951), 'os.path.join', 'os.path.join', (['windb...
import pytest import re import sys import io import pandas as pd from datenguidepy import Field, Query from datenguidepy.query_execution import ( FieldMetaDict, TypeMetaData, GraphQlSchemaMetaDataProvider, ) @pytest.fixture def mock_graphqlschemaprovider(monkeypatch): def mock_meta_data(self, return_t...
[ "io.StringIO", "datenguidepy.Query.all_regions", "datenguidepy.Query.region", "datenguidepy.query_execution.TypeMetaData", "datenguidepy.query_execution.FieldMetaDict", "datenguidepy.Field", "re.sub" ]
[((5694, 5771), 'datenguidepy.Field', 'Field', (['"""WAHL09"""'], {'args': "{'year': 2017}", 'fields': "['PART04']", 'return_type': '"""WAHL09"""'}), "('WAHL09', args={'year': 2017}, fields=['PART04'], return_type='WAHL09')\n", (5699, 5771), False, 'from datenguidepy import Field, Query\n'), ((5822, 5866), 'datenguidep...
# -*- coding: utf-8 -*- # (c) Copyright 2020 Sensirion AG, Switzerland ############################################################################## ############################################################################## # _____ _ _ _______ _____ ____ _ _ # / ____| ...
[ "struct.pack", "struct.unpack", "logging.getLogger" ]
[((1167, 1194), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1184, 1194), False, 'import logging\n'), ((2746, 2769), 'struct.unpack', 'unpack', (['""">B"""', 'data[0:1]'], {}), "('>B', data[0:1])\n", (2752, 2769), False, 'from struct import pack, unpack\n'), ((2400, 2425), 'struct.pack...
import hashlib import os import json def sha512(fname): hash = hashlib.sha512() with open(fname, 'rb') as f: for chunk in iter(lambda: f.read(4096), b""): hash.update(chunk) return hash.hexdigest() def fullToRelative(projectPath, fullPath): projectPath = projectPath.replace('/', ...
[ "json.loads", "os.path.basename", "os.walk", "json.dumps", "hashlib.sha512" ]
[((68, 84), 'hashlib.sha512', 'hashlib.sha512', ([], {}), '()\n', (82, 84), False, 'import hashlib\n'), ((688, 711), 'json.loads', 'json.loads', (['client_data'], {}), '(client_data)\n', (698, 711), False, 'import json\n'), ((844, 865), 'os.walk', 'os.walk', (['project_path'], {}), '(project_path)\n', (851, 865), False...
### # Copyright (c) 2018, <NAME> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of conditions, and t...
[ "supybot.i18n.PluginInternationalization", "collections.namedtuple", "supybot.callbacks.tokenize" ]
[((1832, 1875), 'supybot.i18n.PluginInternationalization', 'PluginInternationalization', (['"""SilenceErrors"""'], {}), "('SilenceErrors')\n", (1858, 1875), False, 'from supybot.i18n import PluginInternationalization\n'), ((2394, 2421), 'supybot.callbacks.tokenize', 'callbacks.tokenize', (['command'], {}), '(command)\n...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
[ "openstack_dashboard.api.neutron.profile_get", "django.utils.datastructures.SortedDict", "openstack_dashboard.api.keystone.tenant_list", "openstack_dashboard.api.neutron.profile_bindings_list", "openstack_dashboard.api.neutron.profile_list", "horizon.exceptions.handle", "django.utils.translation.ugettex...
[((1093, 1120), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1110, 1120), False, 'import logging\n'), ((1375, 1430), 'django.utils.datastructures.SortedDict', 'datastructures.SortedDict', (['[(t.id, t) for t in tenants]'], {}), '([(t.id, t) for t in tenants])\n', (1400, 1430), False, '...
from rpython.jit.backend.test import zll_stress def test_stress_1(): zll_stress.do_test_stress(1)
[ "rpython.jit.backend.test.zll_stress.do_test_stress" ]
[((74, 102), 'rpython.jit.backend.test.zll_stress.do_test_stress', 'zll_stress.do_test_stress', (['(1)'], {}), '(1)\n', (99, 102), False, 'from rpython.jit.backend.test import zll_stress\n')]
#!/usr/bin/env python import rospy from nav_msgs.msg import Path import random import math from shapely.geometry import LineString, Point import matplotlib.pyplot as plt from nav_msgs.msg import Path from geometry_msgs.msg import PoseStamped def control(): global path_new while not rospy.is_shutdown(): ...
[ "geometry_msgs.msg.PoseStamped", "shapely.geometry.Point", "rospy.Subscriber", "matplotlib.pyplot.show", "nav_msgs.msg.Path", "math.sqrt", "random.uniform", "matplotlib.pyplot.clf", "rospy.Publisher", "shapely.geometry.LineString", "rospy.is_shutdown", "rospy.init_node", "matplotlib.pyplot.C...
[((8810, 8841), 'rospy.init_node', 'rospy.init_node', (['"""path_planner"""'], {}), "('path_planner')\n", (8825, 8841), False, 'import rospy\n'), ((8848, 8892), 'rospy.Subscriber', 'rospy.Subscriber', (['"""obstacle"""', 'Path', 'callback'], {}), "('obstacle', Path, callback)\n", (8864, 8892), False, 'import rospy\n'),...
from typing import List, DefaultDict, cast from collections import defaultdict from ..ir import Op, TealOp, TealLabel, TealComponent, TealBlock, TealSimpleBlock, TealConditionalBlock from ..errors import TealInternalError def flattenBlocks(blocks: List[TealBlock]) -> List[TealComponent]: """Lowers a list of TealB...
[ "collections.defaultdict", "typing.cast" ]
[((473, 489), 'collections.defaultdict', 'defaultdict', (['int'], {}), '(int)\n', (484, 489), False, 'from collections import defaultdict\n'), ((769, 797), 'typing.cast', 'cast', (['TealSimpleBlock', 'block'], {}), '(TealSimpleBlock, block)\n', (773, 797), False, 'from typing import List, DefaultDict, cast\n'), ((1149,...
#!/usr/bin/env python import os import argparse # Requirements # bedtools makewindows parser = argparse.ArgumentParser(description='prints sequence header and lengths') parser.add_argument('-i', required= True, help='input') parser.add_argument('-o', required= True, help='output') parser.add_argument('-n', required= ...
[ "argparse.ArgumentParser" ]
[((97, 170), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""prints sequence header and lengths"""'}), "(description='prints sequence header and lengths')\n", (120, 170), False, 'import argparse\n')]
#!/usr/bin/env python from setuptools import setup, find_packages requirements = [ "requests>2,<3", "google-auth-httplib2<1", "google-api-python-client>1,<2", ] test_requirements = ["pytest", "pytest-cov", "pytest-mock", "coverage"] with open("README.md", "r") as readme_file: readme = readme_file.read...
[ "setuptools.find_packages" ]
[((717, 749), 'setuptools.find_packages', 'find_packages', ([], {'exclude': "['tests']"}), "(exclude=['tests'])\n", (730, 749), False, 'from setuptools import setup, find_packages\n')]
#!/usr/bin/env python # -*- coding: utf-8 -*- """Simple client for GiGA Genie AI Makers Kit""" from __future__ import print_function from __future__ import absolute_import import gkit import time # set your client key information on gkit.config(CONFIG FILE) def onButtonHandler(): print ("Button was pressed") ...
[ "gkit.getVoice2Text", "gkit.get_button", "gkit.tts_play" ]
[((334, 354), 'gkit.getVoice2Text', 'gkit.getVoice2Text', ([], {}), '()\n', (352, 354), False, 'import gkit\n'), ((407, 430), 'gkit.tts_play', 'gkit.tts_play', (['stt_text'], {}), '(stt_text)\n', (420, 430), False, 'import gkit\n'), ((468, 485), 'gkit.get_button', 'gkit.get_button', ([], {}), '()\n', (483, 485), False,...
# -*- coding: utf-8 -*- # Copyright (c) 2020, <NAME> and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _, throw from frappe.utils import (flt, cstr) from frappe.model.document import Document class BSCObjective(Document): def v...
[ "frappe.utils.flt", "frappe.db.exists", "frappe.db.sql", "frappe.get_doc", "frappe._" ]
[((1309, 1364), 'frappe.get_doc', 'frappe.get_doc', (['"""BSC Perspective"""', 'self.bsc_perspective'], {}), "('BSC Perspective', self.bsc_perspective)\n", (1323, 1364), False, 'import frappe\n'), ((537, 578), 'frappe.db.exists', 'frappe.db.exists', (['self.doctype', 'self.name'], {}), '(self.doctype, self.name)\n', (5...
import rich import json import click import secrets from typing import Union from typing import Callable from flask import Flask from flask import request from flask import redirect from flask import Response from flask.views import View from werkzeug.security import generate_password_hash from flask_login import ...
[ "click.argument", "flask.redirect", "secrets.token_hex", "rich.print", "flask.request.form.to_dict", "flask.request.get_json", "werkzeug.security.generate_password_hash" ]
[((4396, 4419), 'click.argument', 'click.argument', (['"""email"""'], {}), "('email')\n", (4410, 4419), False, 'import click\n'), ((4425, 4451), 'click.argument', 'click.argument', (['"""username"""'], {}), "('username')\n", (4439, 4451), False, 'import click\n'), ((4457, 4483), 'click.argument', 'click.argument', (['"...
import re import esphome.codegen as cg import esphome.config_validation as cv from esphome import automation from esphome.automation import LambdaAction from esphome.const import ( CONF_ARGS, CONF_BAUD_RATE, CONF_DEASSERT_RTS_DTR, CONF_FORMAT, CONF_HARDWARE_UART, CONF_ID, CONF_LEVEL, CO...
[ "esphome.codegen.add_build_flag", "esphome.config_validation.SplitDefault", "esphome.config_validation.GenerateID", "esphome.config_validation.Optional", "esphome.automation.register_action", "esphome.config_validation.Required", "re.findall", "esphome.config_validation.All", "esphome.codegen.Pvaria...
[((743, 776), 'esphome.codegen.esphome_ns.namespace', 'cg.esphome_ns.namespace', (['"""logger"""'], {}), "('logger')\n", (766, 776), True, 'import esphome.codegen as cg\n'), ((2526, 2560), 'esphome.config_validation.one_of', 'cv.one_of', (['*LOG_LEVELS'], {'upper': '(True)'}), '(*LOG_LEVELS, upper=True)\n', (2535, 2560...
# # This file is part of LiteX. # # Copyright (c) 2015 <NAME> <<EMAIL>> # Copyright (c) 2016-2019 Tim 'mithro' Ansell <<EMAIL>> # SPDX-License-Identifier: BSD-2-Clause """ The event manager provides a systematic way to generate standard interrupt controllers. """ from functools import reduce from operator import or_ ...
[ "functools.reduce", "migen.fhdl.tracer.get_obj_var_name", "migen.util.misc.xdir" ]
[((1480, 1502), 'migen.fhdl.tracer.get_obj_var_name', 'get_obj_var_name', (['name'], {}), '(name)\n', (1496, 1502), False, 'from migen.fhdl.tracer import get_obj_var_name\n'), ((8403, 8420), 'functools.reduce', 'reduce', (['or_', 'irqs'], {}), '(or_, irqs)\n', (8409, 8420), False, 'from functools import reduce\n'), ((8...