code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
#!/usr/bin/env python3 import logging import random as rnd import numpy as np import cliffords import copy import itertools import gates from sequence import Sequence log = logging.getLogger('LabberDriver') import os path_currentdir = os.path.dirname(os.path.realpath(__file__)) # curret directory def CheckIdentit...
[ "logging.getLogger", "numpy.sqrt", "os.path.exists", "numpy.matmul", "random.randint", "numpy.abs", "cliffords.strGate_to_Gate", "cliffords.loadData", "itertools.zip_longest", "numpy.kron", "numpy.set_printoptions", "os.makedirs", "os.path.join", "random.seed", "cliffords.get_stabilizer"...
[((177, 210), 'logging.getLogger', 'logging.getLogger', (['"""LabberDriver"""'], {}), "('LabberDriver')\n", (194, 210), False, 'import logging\n'), ((256, 282), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (272, 282), False, 'import os\n'), ((12591, 12610), 'random.seed', 'rnd.seed', (['r...
#----------------------------------------------------------------------------- # Copyright (c) 2013-2019, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this s...
[ "PyInstaller.utils.hooks.collect_data_files" ]
[((826, 881), 'PyInstaller.utils.hooks.collect_data_files', 'collect_data_files', (['"""PyQt5.uic"""', '(True)', '"""widget-plugins"""'], {}), "('PyQt5.uic', True, 'widget-plugins')\n", (844, 881), False, 'from PyInstaller.utils.hooks import collect_data_files\n')]
from collections.__init__ import OrderedDict from functools import partial from ..core.abstract_algebra import _apply_rules from ..core.operator_algebra import Commutator, Operator, OperatorTimes from ..pattern_matching import pattern, wc __all__ = ['expand_commutators_leibniz'] def expand_commutators_leibniz(expr...
[ "functools.partial" ]
[((648, 708), 'functools.partial', 'partial', (['expand_commutators_leibniz'], {'expand_expr': 'expand_expr'}), '(expand_commutators_leibniz, expand_expr=expand_expr)\n', (655, 708), False, 'from functools import partial\n')]
""" Tracking store backends registry """ import logging import typing from typing import List, Optional from dbnd._core.errors import friendly_error from dbnd._core.plugin.dbnd_plugins import assert_web_enabled from dbnd._core.tracking.backends import ( CompositeTrackingStore, ConsoleStore, FileTrackingS...
[ "logging.getLogger", "dbnd._core.tracking.backends.CompositeTrackingStore", "dbnd._core.plugin.dbnd_plugins.assert_web_enabled", "dbnd._core.tracking.backends.tracking_store_composite.build_store_name", "dbnd._core.errors.friendly_error.config.wrong_store_name" ]
[((474, 501), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (491, 501), False, 'import logging\n'), ((2812, 2989), 'dbnd._core.tracking.backends.CompositeTrackingStore', 'CompositeTrackingStore', ([], {'tracking_stores': 'tracking_store_instances', 'max_retires': 'max_retires', 'raise_on...
import unittest from programy.config.file.yaml_file import YamlConfigurationFile from programy.config.sections.brain.dynamic import BrainDynamicsConfiguration from programy.config.sections.client.console import ConsoleConfiguration class BrainDynamicsConfigurationTests(unittest.TestCase): def test_with_data(self...
[ "programy.config.file.yaml_file.YamlConfigurationFile", "programy.config.sections.brain.dynamic.BrainDynamicsConfiguration", "programy.config.sections.client.console.ConsoleConfiguration" ]
[((338, 361), 'programy.config.file.yaml_file.YamlConfigurationFile', 'YamlConfigurationFile', ([], {}), '()\n', (359, 361), False, 'from programy.config.file.yaml_file import YamlConfigurationFile\n'), ((1023, 1051), 'programy.config.sections.brain.dynamic.BrainDynamicsConfiguration', 'BrainDynamicsConfiguration', ([]...
from django.conf import settings from django.contrib import admin from django.urls import include, path from django.conf.urls.static import static urlpatterns = [ path("admin/", admin.site.urls), path("", include("core.urls")), ] if settings.DEBUG: import debug_toolbar urlpatterns += [ path(...
[ "django.conf.urls.static.static", "django.urls.path", "django.urls.include" ]
[((169, 200), 'django.urls.path', 'path', (['"""admin/"""', 'admin.site.urls'], {}), "('admin/', admin.site.urls)\n", (173, 200), False, 'from django.urls import include, path\n'), ((390, 451), 'django.conf.urls.static.static', 'static', (['settings.MEDIA_URL'], {'document_root': 'settings.MEDIA_ROOT'}), '(settings.MED...
#!/usr/bin/python2.5 # ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License Version # 1.1 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # http://w...
[ "re.findall", "re.match", "re.compile" ]
[((5857, 5880), 're.compile', 're.compile', (['opRegExpSrc'], {}), '(opRegExpSrc)\n', (5867, 5880), False, 'import re, sys, types\n'), ((6088, 6200), 're.compile', 're.compile', (['"""^\\\\d+\\\\.\\\\d*(?:[eE][-+]?\\\\d+)?|^\\\\d+(?:\\\\.\\\\d*)?[eE][-+]?\\\\d+|^\\\\.\\\\d+(?:[eE][-+]?\\\\d+)?"""'], {}), "(\n '^\\\\...
import os import re import shutil import subprocess import tempfile from pathlib import Path __all__ = ("get_repo", "clone") GIT_PREFIX = ("git@", "git://", "git+") GIT_POSTFIX = (".git",) RE_GITHUB = re.compile(r"^gh:/?") RE_GITLAB = re.compile(r"^gl:/?") def get_repo(url: str) -> str: url = str(url) # In c...
[ "subprocess.check_call", "re.compile", "pathlib.Path", "os.path.join", "tempfile.mkdtemp", "shutil.rmtree", "re.sub" ]
[((205, 225), 're.compile', 're.compile', (['"""^gh:/?"""'], {}), "('^gh:/?')\n", (215, 225), False, 'import re\n'), ((239, 259), 're.compile', 're.compile', (['"""^gl:/?"""'], {}), "('^gl:/?')\n", (249, 259), False, 'import re\n'), ((508, 553), 're.sub', 're.sub', (['RE_GITHUB', '"""https://github.com/"""', 'url'], {}...
from __future__ import print_function import inspect import logging import os import re from collections import OrderedDict, deque from esphomeyaml import core from esphomeyaml.const import CONF_AVAILABILITY, CONF_COMMAND_TOPIC, CONF_DISCOVERY, \ CONF_INVERTED, \ CONF_MODE, CONF_NUMBER, CONF_PAYLOAD_AVAILABLE...
[ "logging.getLogger", "collections.OrderedDict", "collections.deque", "re.compile", "esphomeyaml.core.HexInt", "os.path.dirname", "colorlog.escape_codes.parse_colors", "esphomeyaml.core.ESPHomeYAMLError", "inspect.isgeneratorfunction", "os.path.expanduser" ]
[((558, 585), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (575, 585), False, 'import logging\n'), ((11369, 11376), 'collections.deque', 'deque', ([], {}), '()\n', (11374, 11376), False, 'from collections import OrderedDict, deque\n'), ((12461, 12494), 'inspect.isgeneratorfunction', 'in...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import csv from typing import Any, TextIO, Tuple from apppath import ensure_existence from draugr import PROJECT_APP_PATH from draugr.writers.writer import Writer __author__ = "<NAME>" __doc__ = """ Created on 27/04/2019 @author: cnheider """ __all__ = ["CSVWriter"] f...
[ "pathlib.Path.home", "csv.writer", "apppath.ensure_existence" ]
[((438, 449), 'pathlib.Path.home', 'Path.home', ([], {}), '()\n', (447, 449), False, 'from pathlib import Path\n'), ((858, 878), 'csv.writer', 'csv.writer', (['csv_file'], {}), '(csv_file)\n', (868, 878), False, 'import csv\n'), ((714, 785), 'apppath.ensure_existence', 'ensure_existence', (['path'], {'overwrite_on_wron...
import matplotlib.pyplot as plt import numpy as np from scipy.integrate import odeint from matplotlib.animation import FuncAnimation from functools import partial #system def kuramoto(theta, t, A, N): difference_matrix = np.column_stack([theta - theta[k] for k in range(N)]) theta_prime = np.array([np.dot(A[:, ...
[ "numpy.dot", "matplotlib.pyplot.grid", "numpy.random.rand", "numpy.sin", "matplotlib.pyplot.plot", "matplotlib.pyplot.axis", "numpy.linspace", "numpy.zeros", "matplotlib.pyplot.figure", "numpy.random.seed", "matplotlib.pyplot.scatter", "matplotlib.pyplot.axes", "numpy.cos", "matplotlib.pyp...
[((1329, 1349), 'numpy.random.seed', 'np.random.seed', (['(1000)'], {}), '(1000)\n', (1343, 1349), True, 'import numpy as np\n'), ((1357, 1377), 'numpy.random.rand', 'np.random.rand', (['N', 'N'], {}), '(N, N)\n', (1371, 1377), True, 'import numpy as np\n'), ((1382, 1398), 'numpy.zeros', 'np.zeros', (['(N, N)'], {}), '...
""" CEASIOMpy: Conceptual Aircraft Design Software Developed for CFS ENGINEERING, 1015 Lausanne, Switzerland This script updates the cpacs file and copy it on the ToolOutput folder. | Works with Python 2.7 | Author: <NAME> | Date of creation: 2018-11-21 | Last modifiction: 2019-08-29 (AJ) """ #=====================...
[ "ceasiompy.utils.cpacsfunctions.open_tixi", "ceasiompy.utils.cpacsfunctions.add_uid", "ceasiompy.utils.cpacsfunctions.create_branch", "ceasiompy.utils.cpacsfunctions.open_tigl", "ceasiompy.utils.cpacsfunctions.close_tixi" ]
[((1852, 1870), 'ceasiompy.utils.cpacsfunctions.open_tixi', 'open_tixi', (['out_xml'], {}), '(out_xml)\n', (1861, 1870), False, 'from ceasiompy.utils.cpacsfunctions import open_tixi, open_tigl, close_tixi, add_uid, create_branch, copy_branch\n'), ((1882, 1897), 'ceasiompy.utils.cpacsfunctions.open_tigl', 'open_tigl', (...
""" django-json-dbindex tests """ import os import json import util from django.test import TestCase class SimpleTest(TestCase): def test_sql_simple(self): """ Return of sql_simple """ idx = {'foo': 'bar'} res = "FOOBAR bar" self.assertEqual(util.sql_simple(idx, 'f...
[ "util.sql_drop_from_json", "util.list_indexes_create", "json.loads", "util.list_indexes_drop", "util.sql_simple", "util.sql_predicat", "util.sql_tablespace", "util.sql_using", "util.sql_create_from_json", "util.sql_unique", "util.sql_columns", "util.list_indexes", "util.list_extensions", "...
[((480, 517), 'util.sql_simple', 'util.sql_simple', (['idx', '"""foo"""', '"""FOOBAR"""'], {}), "(idx, 'foo', 'FOOBAR')\n", (495, 517), False, 'import util\n'), ((1034, 1050), 'json.loads', 'json.loads', (['jstr'], {}), '(jstr)\n', (1044, 1050), False, 'import json\n'), ((3353, 3381), 'util.sql_drop_from_json', 'util.s...
import random import string from robotpt_common_utils import lists import re def random_string(length=8): letters = string.ascii_lowercase return ''.join(random.sample(letters, length)) def wildcard_search_in_list(pattern, list_, wildcard_symbol='*'): list_ = lists.make_sure_is_iterable(list_) idxs ...
[ "random.sample", "robotpt_common_utils.lists.make_sure_is_iterable", "re.search" ]
[((276, 310), 'robotpt_common_utils.lists.make_sure_is_iterable', 'lists.make_sure_is_iterable', (['list_'], {}), '(list_)\n', (303, 310), False, 'from robotpt_common_utils import lists\n'), ((1057, 1081), 're.search', 're.search', (['pattern', 'str_'], {}), '(pattern, str_)\n', (1066, 1081), False, 'import re\n'), ((1...
# coding=utf-8 from __future__ import absolute_import from __future__ import unicode_literals import datetime from mock.mock import MagicMock from custom.intrahealth.tests.utils import YeksiTestCase from custom.intrahealth.reports import FicheConsommationReport2 from dimagi.utils.dates import DateSpan class TestFi...
[ "mock.mock.MagicMock", "custom.intrahealth.reports.FicheConsommationReport2", "datetime.datetime" ]
[((421, 432), 'mock.mock.MagicMock', 'MagicMock', ([], {}), '()\n', (430, 432), False, 'from mock.mock import MagicMock\n'), ((780, 837), 'custom.intrahealth.reports.FicheConsommationReport2', 'FicheConsommationReport2', ([], {'request': 'mock', 'domain': '"""test-pna"""'}), "(request=mock, domain='test-pna')\n", (804,...
import sublime import sublime_plugin import re """ Plugin command for Sublime Text. Should be used after an unsuccessful build through the built in sublime build tool. Plugin extracts the error line from the build results, then searches stackoverflow using that line as a query in the user's default web browser. It is...
[ "sublime.active_window", "webbrowser.open", "sublime.error_message", "re.compile" ]
[((1577, 1605), 're.compile', 're.compile', (['"""[Ee]rror: (.*)"""'], {}), "('[Ee]rror: (.*)')\n", (1587, 1605), False, 'import re\n'), ((2110, 2137), 'webbrowser.open', 'webbrowser.open', (['custom_url'], {}), '(custom_url)\n', (2125, 2137), False, 'import webbrowser\n'), ((945, 1099), 'sublime.error_message', 'subli...
# Copyright 2014-2016 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
[ "tests.unittest.override_config", "synapse.types.UserID.from_string", "unittest.mock.Mock", "tests.test_utils.make_awaitable" ]
[((8436, 8485), 'tests.unittest.override_config', 'unittest.override_config', (["{'max_avatar_size': 50}"], {}), "({'max_avatar_size': 50})\n", (8460, 8485), False, 'from tests import unittest\n'), ((8813, 8862), 'tests.unittest.override_config', 'unittest.override_config', (["{'max_avatar_size': 50}"], {}), "({'max_av...
from pypom import Page, Region from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as expected class Search(Page): _search_box_locator = (By.CLASS_NAME, 'AutoSearchInput-query') _submit_button_locator = (By.CLASS_NAME, 'AutoSearchInput-submit-button') _s...
[ "pages.desktop.details.Detail", "selenium.webdriver.support.expected_conditions.invisibility_of_element_located" ]
[((598, 670), 'selenium.webdriver.support.expected_conditions.invisibility_of_element_located', 'expected.invisibility_of_element_located', (["(By.CLASS_NAME, 'LoadingText')"], {}), "((By.CLASS_NAME, 'LoadingText'))\n", (638, 670), True, 'from selenium.webdriver.support import expected_conditions as expected\n'), ((255...
# Generated by Django 2.2.10 on 2020-03-31 16:37 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("contenttypes", "0002_remove_content_type_name"), ("course_catalog", "0063_intructor_ordering"), ] operations = [ migrations.AlterFi...
[ "django.db.migrations.AlterUniqueTogether", "django.db.migrations.AlterIndexTogether", "django.db.models.CharField" ]
[((471, 565), 'django.db.migrations.AlterUniqueTogether', 'migrations.AlterUniqueTogether', ([], {'name': '"""course"""', 'unique_together': "{('platform', 'course_id')}"}), "(name='course', unique_together={('platform',\n 'course_id')})\n", (501, 565), False, 'from django.db import migrations, models\n'), ((593, 69...
from domain.notification_sender_abstract import NotificationSenderAbstract from domain.notification_types import NotificationType from infrastructure.message_client import MessageClient from domain.validators import PostNotificationValidator, SmsNotificationValidator, EmailNotificationValidator class NotificationSend...
[ "domain.validators.EmailNotificationValidator", "domain.validators.SmsNotificationValidator", "domain.validators.PostNotificationValidator" ]
[((1045, 1072), 'domain.validators.PostNotificationValidator', 'PostNotificationValidator', ([], {}), '()\n', (1070, 1072), False, 'from domain.validators import PostNotificationValidator, SmsNotificationValidator, EmailNotificationValidator\n'), ((1354, 1380), 'domain.validators.SmsNotificationValidator', 'SmsNotifica...
from distutils.core import setup from Cython.Build import cythonize setup( ext_modules=cythonize("model.pyx"), )
[ "Cython.Build.cythonize" ]
[((92, 114), 'Cython.Build.cythonize', 'cythonize', (['"""model.pyx"""'], {}), "('model.pyx')\n", (101, 114), False, 'from Cython.Build import cythonize\n')]
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------- # ipv6 schema # ---------------------------------------------------------------------- # Copyright (C) 2007-2019 The NOC Project # See LICENSE for details # ------------------------------------------------------------------...
[ "noc.core.model.fields.MACField", "django.db.models.DateField", "noc.core.model.fields.CIDRField", "django.db.models.TextField", "noc.core.model.fields.INETField", "django.db.models.ForeignKey", "django.db.models.IntegerField", "noc.core.model.fields.AutoCompleteTagsField", "django.db.models.Boolean...
[((898, 1065), 'django.db.models.CharField', 'models.CharField', (['"""Address Constraint"""'], {'max_length': '(1)', 'choices': "[('V', 'Addresses are unique per VRF'), ('G',\n 'Addresses are unique per VRF Group')]", 'default': '"""V"""'}), "('Address Constraint', max_length=1, choices=[('V',\n 'Addresses are u...
import numpy as np from matplotlib import pyplot as plt from time import time as t def sieve(n): prime = np.array([True for i in range(n+1)]) p = 2 while (p * p <= n): if (prime[p] == True): for i in range(p * p, n+1, p): prime[i] = False p += 1 ...
[ "matplotlib.pyplot.imsave", "time.time", "numpy.zeros" ]
[((2118, 2121), 'time.time', 't', ([], {}), '()\n', (2119, 2121), True, 'from time import time as t\n'), ((2288, 2343), 'matplotlib.pyplot.imsave', 'plt.imsave', (['f"""./pg_tests/pg{grid_size}.pdf"""', 'prime_grid'], {}), "(f'./pg_tests/pg{grid_size}.pdf', prime_grid)\n", (2298, 2343), True, 'from matplotlib import py...
import unittest import os from os.path import exists, join import numpy as np from test_helper import TESTDIR, TESTDATA, TMPDATA import datetime from copy import copy import warnings from karta.vector import shp, read_shapefile from karta.vector.geometry import (Point, Line, Polygon, ...
[ "datetime.datetime", "datetime.time", "karta.vector.geometry.Polygon", "karta.vector.geometry.Line", "karta.vector.geometry.Multiline", "os.path.join", "warnings.catch_warnings", "karta.vector.geometry.Point", "numpy.array", "warnings.simplefilter", "datetime.date", "karta.vector.geometry.Mult...
[((15145, 15160), 'unittest.main', 'unittest.main', ([], {}), '()\n', (15158, 15160), False, 'import unittest\n'), ((1003, 1146), 'karta.vector.geometry.Multipoint', 'Multipoint', (['[(1, 1), (3, 1), (4, 3), (2, 2)]'], {'data': "{'species': ['T. officianale', 'C. tectorum', 'M. alba', 'V. cracca']}", 'crs': 'LonLatWGS8...
import turtle#导入turtle模块 turtle.seth(90)#海龟头朝向北方 turtle.forward(100)#向前移动100,画出气球线 turtle.dot(80,'red')#画出大小是80,颜色是红色的气球 turtle.pu()#抬笔 turtle.goto(-200,-100)#移动到坐标是(-200,-100) turtle.pd()#落笔 turtle.forward(100)#向前移动100,画出气球线 turtle.dot(80,'pale green')#画出大小是80,颜色是绿色的气球 turtle.done()#按下x关闭窗口
[ "turtle.done", "turtle.forward", "turtle.pu", "turtle.seth", "turtle.goto", "turtle.dot", "turtle.pd" ]
[((25, 40), 'turtle.seth', 'turtle.seth', (['(90)'], {}), '(90)\n', (36, 40), False, 'import turtle\n'), ((50, 69), 'turtle.forward', 'turtle.forward', (['(100)'], {}), '(100)\n', (64, 69), False, 'import turtle\n'), ((84, 105), 'turtle.dot', 'turtle.dot', (['(80)', '"""red"""'], {}), "(80, 'red')\n", (94, 105), False,...
#!/usr/bin/python3 import subprocess import re import argparse import logging import sys sysctl_conf_path: str = "/etc/" grub_conf_path: str = "/etc/default/" def run_cmd(cmd: str) -> None: logging.log(logging.INFO, f'Running {cmd}') result = subprocess.run(cmd, shell=True, capture_output=True) if result...
[ "logging.basicConfig", "argparse.ArgumentParser", "subprocess.run", "re.match", "logging.log", "sys.exit" ]
[((197, 240), 'logging.log', 'logging.log', (['logging.INFO', 'f"""Running {cmd}"""'], {}), "(logging.INFO, f'Running {cmd}')\n", (208, 240), False, 'import logging\n'), ((254, 306), 'subprocess.run', 'subprocess.run', (['cmd'], {'shell': '(True)', 'capture_output': '(True)'}), '(cmd, shell=True, capture_output=True)\n...
# coding=utf-8 # Copyright 2020 The HuggingFace Inc. team. # # 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...
[ "argparse.ArgumentParser" ]
[((3907, 3932), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (3930, 3932), False, 'import argparse\n')]
from aiogram.types import CallbackQuery from aiogram.dispatcher import FSMContext from data import sticker from loader import dp, bot from states import Processing from loader import sheet from utils import get_data_chosen_request from utils import notify_someone from utils import notify_in_group_chat from utils impor...
[ "states.Processing.enter_chosen_request_menu.set", "keyboards.create_kb_chosen_request", "keyboards.create_kb_what_blue", "loader.dp.callback_query_handler", "utils.get_data_chosen_request", "utils.updating_log", "loader.bot.delete_message", "keyboards.create_kb_coustom_main_menu", "keyboards.create...
[((587, 658), 'loader.dp.callback_query_handler', 'dp.callback_query_handler', ([], {'state': 'Processing.enter_reserve_to_ready_menu'}), '(state=Processing.enter_reserve_to_ready_menu)\n', (612, 658), False, 'from loader import dp, bot\n'), ((965, 993), 'keyboards.cb_what_sum.parse', 'cb_what_sum.parse', (['call.data'...
import os import re import sys import shutil import filecmp from functools import reduce fcm_types = ['accounts', 'storage', 'topics'] avail_nodes = [] dumps_root_dir = '' investigation_name = 'iss' rounds_avail = {} account_fcm_pattern = re.compile(r'accounts-round(\d+)[.]fcm') first_round_post_iss = 0 def prepare_...
[ "re.compile", "os.path.join", "re.match", "os.mkdir", "sys.exit", "os.path.abspath", "filecmp.cmp", "os.walk" ]
[((241, 281), 're.compile', 're.compile', (['"""accounts-round(\\\\d+)[.]fcm"""'], {}), "('accounts-round(\\\\d+)[.]fcm')\n", (251, 281), False, 'import re\n'), ((1494, 1537), 're.match', 're.match', (['account_fcm_pattern', 'accounts_fcm'], {}), '(account_fcm_pattern, accounts_fcm)\n', (1502, 1537), False, 'import re\...
import sys import asyncio import aiohttp from asyncqt import QEventLoop, asyncSlot, asyncClose # from PyQt5.QtWidgets import ( from PySide2.QtWidgets import ( QApplication, QWidget, QLabel, QLineEdit, QTextEdit, QPushButton, QVBoxLayout) class MainWindow(QWidget): """Main window.""" _DEF_URL = 'htt...
[ "PySide2.QtWidgets.QPushButton", "asyncqt.QEventLoop", "asyncio.get_event_loop", "PySide2.QtWidgets.QTextEdit", "aiohttp.ClientTimeout", "PySide2.QtWidgets.QLineEdit", "asyncqt.asyncSlot", "PySide2.QtWidgets.QApplication", "PySide2.QtWidgets.QLabel", "asyncio.set_event_loop", "PySide2.QtWidgets....
[((1261, 1272), 'asyncqt.asyncSlot', 'asyncSlot', ([], {}), '()\n', (1270, 1272), False, 'from asyncqt import QEventLoop, asyncSlot, asyncClose\n'), ((1793, 1815), 'PySide2.QtWidgets.QApplication', 'QApplication', (['sys.argv'], {}), '(sys.argv)\n', (1805, 1815), False, 'from PySide2.QtWidgets import QApplication, QWid...
""" Utility functions for zipteedo. """ import csv import numpy import logging import json import gzip import argparse from collections import namedtuple, Counter import tqdm def GzipFileType(*args, **kwargs): def _ret(path): try: if path.endswith('.gz'): return gzip.open(path,...
[ "json.loads", "collections.namedtuple", "tqdm.tqdm.write", "gzip.open", "json.dumps", "collections.Counter", "logging.StreamHandler.__init__", "argparse.ArgumentError", "csv.reader" ]
[((947, 982), 'csv.reader', 'csv.reader', (['istream'], {'delimiter': '"""\t"""'}), "(istream, delimiter='\\t')\n", (957, 982), False, 'import csv\n'), ((1064, 1089), 'collections.namedtuple', 'namedtuple', (['"""Row"""', 'header'], {}), "('Row', header)\n", (1074, 1089), False, 'from collections import namedtuple, Cou...
# -*- coding: utf-8 -*- import matplotlib.pyplot as plt from methcomp import mountain # Synthetic data for 3 methods method1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] method2 = [ 1.03, 2.05, 2.79, 3.67, 5.00, 5.82, 7.16, 7.69, 8.53, 10.38, 11...
[ "methcomp.mountain.Mountain", "matplotlib.pyplot.show" ]
[((1096, 1106), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (1104, 1106), True, 'import matplotlib.pyplot as plt\n'), ((763, 817), 'methcomp.mountain.Mountain', 'mountain.Mountain', (['method1', 'method2'], {'n_percentiles': '(500)'}), '(method1, method2, n_percentiles=500)\n', (780, 817), False, 'from meth...
import numpy as np from mapper_0000 import Mapper_0000 class Cartridge: def __init__(self, name: str): # Variables for values about the cartridge self.bImageValid = False self.nMapperID = np.uint8(0) self.nPRGBanks = np.uint8(0) self.nCHRBanks = np.uint8(0) ...
[ "numpy.uint8", "numpy.fromfile", "mapper_0000.Mapper_0000" ]
[((228, 239), 'numpy.uint8', 'np.uint8', (['(0)'], {}), '(0)\n', (236, 239), True, 'import numpy as np\n'), ((266, 277), 'numpy.uint8', 'np.uint8', (['(0)'], {}), '(0)\n', (274, 277), True, 'import numpy as np\n'), ((304, 315), 'numpy.uint8', 'np.uint8', (['(0)'], {}), '(0)\n', (312, 315), True, 'import numpy as np\n')...
from __future__ import absolute_import import time from .ProtectFlags import ProtectFlags from .TimeStamp import TimeStamp from .MetaInfo import MetaInfo from .FSString import FSString TS_FORMAT = "%Y-%m-%d %H:%M:%S" class MetaInfoFSUAE: @staticmethod def is_meta_file(path): return path.lower().end...
[ "time.mktime", "time.strptime" ]
[((1167, 1203), 'time.strptime', 'time.strptime', (['time_stamp', 'TS_FORMAT'], {}), '(time_stamp, TS_FORMAT)\n', (1180, 1203), False, 'import time\n'), ((1227, 1242), 'time.mktime', 'time.mktime', (['ts'], {}), '(ts)\n', (1238, 1242), False, 'import time\n')]
# -*- coding: utf-8 -*- import numpy as np import operator import matplotlib.pyplot as plt from os import listdir # 《机器学习实战》 - 第2章 - k-近邻算法 def classify0(inX, dataSet, labels, k): """ 利用k-近邻算法实现分类,采用欧式距离 inX: 用于分类的输入向量 dataSet: 训练集 labels: 标签向量 k: 选择最近邻数目 """ dataSetSize = dataSet.shap...
[ "numpy.tile", "os.listdir", "numpy.array", "numpy.zeros", "operator.itemgetter", "numpy.shape" ]
[((1504, 1532), 'numpy.zeros', 'np.zeros', (['(numberOfLines, 3)'], {}), '((numberOfLines, 3))\n', (1512, 1532), True, 'import numpy as np\n'), ((3883, 3925), 'numpy.array', 'np.array', (['[ffMiles, percentTats, iceCream]'], {}), '([ffMiles, percentTats, iceCream])\n', (3891, 3925), True, 'import numpy as np\n'), ((454...
#!/usr/bin/env python3 import argparse import itertools import signal import sys import os import subprocess import time from pathlib import Path from threading import Lock def main(): parser = argparse.ArgumentParser(description="A latent motif discovery algorithm.") parser.add_argument("window", type=int, h...
[ "itertools.chain", "signal.signal", "argparse.ArgumentParser", "pathlib.Path", "threading.Lock", "subprocess.Popen", "os.mkfifo", "time.time", "os.remove" ]
[((200, 274), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""A latent motif discovery algorithm."""'}), "(description='A latent motif discovery algorithm.')\n", (223, 274), False, 'import argparse\n'), ((1601, 1612), 'time.time', 'time.time', ([], {}), '()\n', (1610, 1612), False, 'impor...
# -*- coding: utf-8 -*- from configparser import ConfigParser # [WARNING] Don't use any other `cfg` driver. from typing import Optional, Dict, Any from argparse import Namespace from recc.argparse.parser.dict_parse import get_namespace_by_dict def config_parser_to_dict(parser: ConfigParser) -> Dict[str, Dict[str, A...
[ "configparser.ConfigParser" ]
[((910, 924), 'configparser.ConfigParser', 'ConfigParser', ([], {}), '()\n', (922, 924), False, 'from configparser import ConfigParser\n'), ((1155, 1169), 'configparser.ConfigParser', 'ConfigParser', ([], {}), '()\n', (1167, 1169), False, 'from configparser import ConfigParser\n')]
#-*- coding: utf-8 -*- import cv2 import numpy as np import os import pandas as pd import imageio def compose_gif(conf): """讲图片转为gif""" print("start compose gif...") img_paths = [] for i in range(4500,5056): i_path = conf.test_result_path + str(i) +'.jpg.jpg' img_paths.append(i_path) ...
[ "os.listdir", "pandas.read_csv", "config.Config", "cv2.VideoCapture", "imageio.imread", "imageio.mimsave", "cv2.resize" ]
[((422, 479), 'imageio.mimsave', 'imageio.mimsave', (['conf.result_gif_path', 'gif_images'], {'fps': '(20)'}), '(conf.result_gif_path, gif_images, fps=20)\n', (437, 479), False, 'import imageio\n'), ((757, 785), 'cv2.VideoCapture', 'cv2.VideoCapture', (['video_path'], {}), '(video_path)\n', (773, 785), False, 'import c...
"""Australian-specific Form helpers.""" from django.forms.fields import CharField, RegexField, Select from django.utils.translation import gettext_lazy as _ from .au_states import STATE_CHOICES from .validators import AUBusinessNumberFieldValidator, AUCompanyNumberFieldValidator, AUTaxFileNumberFieldValidator class...
[ "django.utils.translation.gettext_lazy" ]
[((545, 575), 'django.utils.translation.gettext_lazy', '_', (['"""Enter a 4 digit postcode."""'], {}), "('Enter a 4 digit postcode.')\n", (546, 575), True, 'from django.utils.translation import gettext_lazy as _\n')]
# -*- coding: utf-8 -*- """ ![LeNet Architecture](lenet.png) Source: <NAME> """ from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf from sklearn.utils import shuffle from tensorflow.keras.datasets import mnist from tensorflow.keras.datasets import fashion_m...
[ "tensorflow.contrib.layers.flatten", "tensorflow.get_default_session", "tensorflow.nn.sparse_softmax_cross_entropy_with_logits", "tensorflow.train.write_graph", "tensorflow.reduce_mean", "tensorflow.cast", "tensorflow.set_random_seed", "os.path.exists", "tensorflow.placeholder", "tensorflow.Sessio...
[((416, 433), 'numpy.random.seed', 'np.random.seed', (['(1)'], {}), '(1)\n', (430, 433), True, 'import numpy as np\n'), ((434, 455), 'tensorflow.set_random_seed', 'tf.set_random_seed', (['(2)'], {}), '(2)\n', (452, 455), True, 'import tensorflow as tf\n'), ((811, 842), 'numpy.expand_dims', 'np.expand_dims', (['X_train'...
# Generated by Django 2.2.13 on 2021-05-17 23:03 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('games', '0029_auto_20210517_0421'), ] operations = [ migrations.AlterField( model_name='game', name='invitation_mod...
[ "django.db.models.CharField" ]
[((342, 586), 'django.db.models.CharField', 'models.CharField', ([], {'choices': "[('INVITE_ONLY', 'Invited Players Only'), ('WORLD_MEMBERS',\n 'World Members Only'), ('ANYONE', 'Any Player'), ('CLOSED',\n 'Closed for RSVPs')]", 'default': "('INVITE_ONLY', 'Invited Players Only')", 'max_length': '(25)'}), "(choic...
from collections import namedtuple class EmptyList: def __str__(self): return '[]' def __repr__(self): return 'EmptyList()' class EmptySet: def __str__(self): return '{}' def __repr__(self): return 'EmptySet()' class EmptyDict: def __str__(self): return '...
[ "collections.namedtuple" ]
[((507, 545), 'collections.namedtuple', 'namedtuple', (['"""SetComp"""', '"""expr, clauses"""'], {}), "('SetComp', 'expr, clauses')\n", (517, 545), False, 'from collections import namedtuple\n'), ((558, 594), 'collections.namedtuple', 'namedtuple', (['"""DictComp"""', '"""expr, rest"""'], {}), "('DictComp', 'expr, rest...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Item', fields=[ ('id', models.AutoField(verbose...
[ "django.db.models.DateTimeField", "django.db.models.AutoField", "django.db.models.CharField", "django.db.models.ForeignKey" ]
[((1155, 1210), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'related_name': '"""items"""', 'to': '"""todo.List"""'}), "(related_name='items', to='todo.List')\n", (1172, 1210), False, 'from django.db import models, migrations\n'), ((296, 389), 'django.db.models.AutoField', 'models.AutoField', ([], {'verbos...
""" Implementation of Exercises/Examples from Chapter 6 of Sutton and Barto's "Reinforcement Learning" """ from gridworld import WindyGridworld import numpy as np import matplotlib.pyplot as plt from tqdm import tqdm #%% def gen_zero_q_table(env): ''' Generate q table with zeros as initial values Returns...
[ "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "numpy.argmax", "matplotlib.pyplot.figure", "gridworld.WindyGridworld", "numpy.random.uniform" ]
[((615, 627), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (625, 627), True, 'import matplotlib.pyplot as plt\n'), ((679, 700), 'matplotlib.pyplot.xlabel', 'plt.xlabel', (['"""Episode"""'], {}), "('Episode')\n", (689, 700), True, 'import matplotlib.pyplot as plt\n'), ((705, 736), 'matplotlib.pyplot.ylabe...
import pytest from math import isclose import sys sys.path.append('/Users/pyann/Dropbox (CEDIA)/srd/Model') import srd from srd import oas year = 2016 @pytest.mark.parametrize('age, inc_oas', [(58, 0), (62, 0), (70, 7000)]) def test_age_oas(age, inc_oas): p = srd.Person(age=70) hh = srd.Hhold(...
[ "math.isclose", "srd.Person", "srd.oas.program", "srd.Hhold", "pytest.mark.parametrize", "sys.path.append" ]
[((55, 112), 'sys.path.append', 'sys.path.append', (['"""/Users/pyann/Dropbox (CEDIA)/srd/Model"""'], {}), "('/Users/pyann/Dropbox (CEDIA)/srd/Model')\n", (70, 112), False, 'import sys\n'), ((167, 238), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""age, inc_oas"""', '[(58, 0), (62, 0), (70, 7000)]'], {}),...
import re import random import os import traceback import importlib from sgFile import SgFile from string import punctuation, ascii_lowercase, ascii_uppercase from entity import Entity from pathlib import Path ''' Surrogate Generation ''' class SurrogateGeneration: def __init__(self, parameters): self.p...
[ "random.choice", "importlib.import_module", "pathlib.Path", "re.compile", "sgFile.SgFile", "os.path.dirname", "entity.Entity", "re.sub", "traceback.print_exc", "random.randint", "os.path.relpath" ]
[((360, 425), 'importlib.import_module', 'importlib.import_module', (["('lang.' + parameters['settings']['lang'])"], {}), "('lang.' + parameters['settings']['lang'])\n", (383, 425), False, 'import importlib\n'), ((8792, 8811), 're.compile', 're.compile', (['"""T\\\\d+"""'], {}), "('T\\\\d+')\n", (8802, 8811), False, 'i...
# Author: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # # License: BSD (3-clause) import numpy as np from ..utils import logger, verbose from ..fixes import Counter from ..parallel import parallel_func from .. import pick_types, pick_info @verbose def compute_ems(epochs, conditions=None, picks=None, n_jobs=1, verbo...
[ "numpy.mean", "numpy.intersect1d", "numpy.where", "numpy.array", "numpy.sum", "numpy.zeros", "sklearn.cross_validation.LeaveOneOut", "numpy.std" ]
[((4052, 4078), 'numpy.array', 'np.array', (['surrogate_trials'], {}), '(surrogate_trials)\n', (4060, 4078), True, 'import numpy as np\n'), ((4100, 4131), 'numpy.mean', 'np.mean', (['spatial_filter'], {'axis': '(0)'}), '(spatial_filter, axis=0)\n', (4107, 4131), True, 'import numpy as np\n'), ((4282, 4304), 'numpy.mean...
""" This script goes along my blog post: 'Keras Cats Dogs Tutorial' (https://jkjung-avt.github.io/keras-tutorial/) """ import argparse import glob import os import sys import numpy as np from keras import backend as K from keras.applications.resnet50 import preprocess_input from keras.models import load_model from k...
[ "keras.preprocessing.image.img_to_array", "keras.models.load_model", "argparse.ArgumentParser", "keras.applications.resnet50.preprocess_input", "os.path.join", "os.path.isdir", "os.path.basename", "numpy.expand_dims", "sys.exit", "glob.glob", "keras.preprocessing.image.load_img" ]
[((423, 448), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (446, 448), False, 'import argparse\n'), ((558, 577), 'os.path.isdir', 'os.path.isdir', (['path'], {}), '(path)\n', (571, 577), False, 'import os\n'), ((1053, 1090), 'keras.models.load_model', 'load_model', (['"""model-resnet50-final....
import numpy.random import milk.unsupervised.pca import numpy as np def test_pca(): numpy.random.seed(123) X = numpy.random.rand(10,4) X[:,1] += numpy.random.rand(10)**2*X[:,0] X[:,1] += numpy.random.rand(10)**2*X[:,0] X[:,2] += numpy.random.rand(10)**2*X[:,0] Y,V = milk.unsupervised.pca(X) ...
[ "numpy.mean", "numpy.random.random_sample", "milk.unsupervised.pdist", "numpy.dot", "numpy.random.seed" ]
[((532, 551), 'numpy.random.seed', 'np.random.seed', (['(232)'], {}), '(232)\n', (546, 551), True, 'import numpy as np\n'), ((596, 628), 'numpy.random.random_sample', 'np.random.random_sample', (['(12, 4)'], {}), '((12, 4))\n', (619, 628), True, 'import numpy as np\n'), ((686, 701), 'milk.unsupervised.pdist', 'pdist', ...
### Code by <NAME> ### ### import pyautogui import PIL def average_image_color(image): """ Code by olooney on GitHub > https://gist.github.com/olooney/1246268 Returns the average color from a given image (PIL) """ i = image h = i.histogram() # split into red, green, blue r = h[0:256] g = h[256:256*2] b = ...
[ "matplotlib.pyplot.title", "numpy.random.random", "matplotlib.pyplot.gcf", "pyautogui.screenshot", "matplotlib.pyplot.eventplot", "matplotlib.pyplot.clf", "matplotlib.pyplot.ion", "os.system", "matplotlib.pyplot.pause" ]
[((731, 779), 'os.system', 'os.system', (["('cls' if os.name == 'nt' else 'clear')"], {}), "('cls' if os.name == 'nt' else 'clear')\n", (740, 779), False, 'import os\n'), ((941, 950), 'matplotlib.pyplot.ion', 'plt.ion', ([], {}), '()\n', (948, 950), True, 'import matplotlib.pyplot as plt\n'), ((962, 971), 'matplotlib.p...
# Generated by Django 3.1 on 2021-02-10 12:03 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='SMS_info', fields=[ ('id', models.AutoField(a...
[ "django.db.models.DateTimeField", "django.db.models.AutoField", "django.db.models.CharField" ]
[((302, 395), '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", (318, 395), False, 'from django.db import migrations, models\...
"""AuthJWTDriver Module.""" import pendulum from ...auth import Auth from ...contracts import AuthContract from ...drivers import BaseDriver from ...exceptions import DriverLibraryNotFound from ...helpers import config, cookie_expire_time from ...request import Request class AuthJwtDriver(BaseDriver, AuthContract): ...
[ "pendulum.parse" ]
[((1380, 1403), 'pendulum.parse', 'pendulum.parse', (['expired'], {}), '(expired)\n', (1394, 1403), False, 'import pendulum\n')]
from django.urls import path from . import views urlpatterns = [ # home page with login/new user path('', views.index, name='index'), # create a new user path('newUser/', views.new_user, name='new_user'), # user page path('myPage/', views.my_page, name='my_page'), # add a game path('add...
[ "django.urls.path" ]
[((106, 141), 'django.urls.path', 'path', (['""""""', 'views.index'], {'name': '"""index"""'}), "('', views.index, name='index')\n", (110, 141), False, 'from django.urls import path\n'), ((171, 220), 'django.urls.path', 'path', (['"""newUser/"""', 'views.new_user'], {'name': '"""new_user"""'}), "('newUser/', views.new_...
# Copyright 2015-2021 SWIM.AI inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
[ "test.utils.CustomString", "swimai.recon._parsers._OutputMessage._create", "swimai.recon._parsers._ReconUtils._is_ident", "swimai.recon._parsers._ReconUtils._is_space", "swimai.recon._parsers._ReconUtils._is_ident_char", "swimai.recon._parsers._ReconUtils._to_ord", "swimai.recon._parsers._ReconUtils._is...
[((881, 924), 'swimai.recon._parsers._ReconUtils._is_ident_start_char', '_ReconUtils._is_ident_start_char', (['character'], {}), '(character)\n', (913, 924), False, 'from swimai.recon._parsers import _ReconUtils, _OutputMessage, _InputMessage\n'), ((1093, 1136), 'swimai.recon._parsers._ReconUtils._is_ident_start_char',...
######################################################################## # # Functions for downloading the Knifey-Spoony data-set from the internet # and loading it into memory. Note that this only loads the file-names # for the images in the data-set and does not load the actual images. # # Implemented in Python 3.5 #...
[ "dataset.load_cached", "os.path.join", "download.maybe_download_and_extract" ]
[((1071, 1103), 'os.path.join', 'os.path.join', (['data_dir', '"""train/"""'], {}), "(data_dir, 'train/')\n", (1083, 1103), False, 'import os\n'), ((1189, 1220), 'os.path.join', 'os.path.join', (['data_dir', '"""test/"""'], {}), "(data_dir, 'test/')\n", (1201, 1220), False, 'import os\n'), ((2275, 2347), 'download.mayb...
#!/usr/bin/env python3 # PROGRAM: WhatsGNU is a Python3 program that ranks protein sequences in a genome # faa file generated from annotation programs based on the number of observed # exact protein matches in a public or private database. # Copyright (C) 2019 <NAME> ##################################################...
[ "logging.StreamHandler", "sys.exit", "logging.info", "logging.error", "os.path.exists", "os.listdir", "argparse.ArgumentParser", "subprocess.Popen", "os.mkdir", "logging.critical", "tempfile.NamedTemporaryFile", "logging.warning", "pickle.load", "time.time", "logging.basicConfig", "pic...
[((1817, 1828), 'time.time', 'time.time', ([], {}), '()\n', (1826, 1828), False, 'import time\n'), ((1839, 2200), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'prog': '"""WhatsGNU_main.py"""', 'description': '"""WhatsGNU v1.0 utilizes the\xa0natural variation in public databases to rank protein sequences...
import os from m2cgen import assemblers, interpreters from tests import utils from tests.e2e.executors.base import BaseExecutor EXECUTOR_CODE_TPL = """ {model_code} void main(List<String> args) {{ List<double> input_ = args.map((x) => double.parse(x)).toList(); {print_code} }} """ EXECUTE_AND_PRINT_SCALAR =...
[ "tests.utils.predict_from_commandline", "m2cgen.interpreters.DartInterpreter", "os.path.join", "m2cgen.assemblers.get_assembler_cls" ]
[((633, 663), 'm2cgen.interpreters.DartInterpreter', 'interpreters.DartInterpreter', ([], {}), '()\n', (661, 663), False, 'from m2cgen import assemblers, interpreters\n'), ((689, 724), 'm2cgen.assemblers.get_assembler_cls', 'assemblers.get_assembler_cls', (['model'], {}), '(model)\n', (717, 724), False, 'from m2cgen im...
# Copyright 2016 Cisco Systems, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
[ "cloud99.logging_setup.LOGGER.error" ]
[((2209, 2265), 'cloud99.logging_setup.LOGGER.error', 'LOGGER.error', (['exception_type', 'exception_value', 'traceback'], {}), '(exception_type, exception_value, traceback)\n', (2221, 2265), False, 'from cloud99.logging_setup import LOGGER\n')]
from django.conf.urls import url from django.contrib import admin from game import views from game.method import in_room from game.method import user, in_game, ready_game urlpatterns = [ url(r'^admin', admin.site.urls), # 系统自带 url(r'^$', views.room_select), # 首页 url(r'^room', views.room), # 游戏页面 ur...
[ "django.conf.urls.url" ]
[((193, 223), 'django.conf.urls.url', 'url', (['"""^admin"""', 'admin.site.urls'], {}), "('^admin', admin.site.urls)\n", (196, 223), False, 'from django.conf.urls import url\n'), ((238, 266), 'django.conf.urls.url', 'url', (['"""^$"""', 'views.room_select'], {}), "('^$', views.room_select)\n", (241, 266), False, 'from ...
from typing import Union from openapi_model_generator.generators.base_filters import ( to_field_name, ) from openapi_model_generator.generators.models.fields import ModelFieldGenerator from openapi_model_generator.renderer import TemplateRenderer class ModelGenerator: TEMPLATE_NAME = 'base_models' FILTER...
[ "openapi_model_generator.generators.models.fields.ModelFieldGenerator", "openapi_model_generator.renderer.TemplateRenderer" ]
[((352, 373), 'openapi_model_generator.generators.models.fields.ModelFieldGenerator', 'ModelFieldGenerator', ([], {}), '()\n', (371, 373), False, 'from openapi_model_generator.generators.models.fields import ModelFieldGenerator\n'), ((480, 530), 'openapi_model_generator.renderer.TemplateRenderer', 'TemplateRenderer', (...
# This file contains all the training functionality including # dataset parsing and snapshot export # Author: <NAME>, 2018, Chemnitz University of Technology import os import operator import time import numpy as np from sklearn.utils import shuffle import config as cfg from model import lasagne_net as birdnet from m...
[ "utils.log.i", "model.lasagne_io.loadModel", "utils.metrics.lrap", "utils.stats.tic", "model.lasagne_io.saveParams", "operator.itemgetter", "model.learning_rate.dynamicLearningRate", "utils.stats.getValue", "numpy.mean", "os.listdir", "model.lasagne_io.saveModel", "model.lasagne_net.build_mode...
[((946, 966), 'config.getRandomState', 'cfg.getRandomState', ([], {}), '()\n', (964, 966), True, 'import config as cfg\n'), ((2207, 2243), 'sklearn.utils.shuffle', 'shuffle', (['images'], {'random_state': 'random'}), '(images, random_state=random)\n', (2214, 2243), False, 'from sklearn.utils import shuffle\n'), ((2758,...
#!/usr/bin/python """Example of a guild - Qt hybrid system. This example shows three ways to connect guild pipelines to Qt objects. Version 1 (preferred) uses a normal guild pipeline with a hybrid (guild/Qt) display object. Version 2 uses a hybrid source and a standard Qt display, which is what you'd do if you don't ...
[ "PyQt4.QtGui.QImage", "PyQt4.QtGui.QApplication", "PyQt4.QtGui.QWidget", "PyQt4.QtCore.pyqtSlot", "PyQt4.QtCore.pyqtSignal", "re.compile", "subprocess.Popen", "PyQt4.QtGui.QPushButton", "time.sleep", "PyQt4.QtGui.QPixmap.fromImage", "PyQt4.QtGui.QApplication.instance", "PyQt4.QtGui.QGridLayout...
[((5790, 5812), 'PyQt4.QtGui.QApplication', 'QtGui.QApplication', (['[]'], {}), '([])\n', (5808, 5812), False, 'from PyQt4 import QtGui, QtCore\n'), ((755, 891), 'subprocess.Popen', 'subprocess.Popen', (["['ffmpeg', '-loglevel', 'info', '-i', file_name]"], {'stdout': 'subprocess.PIPE', 'stderr': 'subprocess.PIPE', 'buf...
from buildtest.tools.stylecheck import run_style_checks def test_run_style_check(): run_style_checks( no_black=False, no_isort=False, no_pyflakes=False, apply_stylechecks=False )
[ "buildtest.tools.stylecheck.run_style_checks" ]
[((90, 186), 'buildtest.tools.stylecheck.run_style_checks', 'run_style_checks', ([], {'no_black': '(False)', 'no_isort': '(False)', 'no_pyflakes': '(False)', 'apply_stylechecks': '(False)'}), '(no_black=False, no_isort=False, no_pyflakes=False,\n apply_stylechecks=False)\n', (106, 186), False, 'from buildtest.tools....
# coding=utf-8 import logging import platform import subprocess from path import path from engineer.conf import settings __author__ = '<NAME> <<EMAIL>>' logger = logging.getLogger(__name__) def convert_less(infile, outfile, minify=True): if minify: preprocessor = str(settings.LESS_PREPROCESSOR) + ' -...
[ "logging.getLogger", "platform.system", "subprocess.check_output", "engineer.conf.settings.ENGINEER.STATIC_DIR.basename" ]
[((167, 194), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (184, 194), False, 'import logging\n'), ((481, 509), 'subprocess.check_output', 'subprocess.check_output', (['cmd'], {}), '(cmd)\n', (504, 509), False, 'import subprocess\n'), ((997, 1014), 'platform.system', 'platform.system', ...
import cv2 import sys import numpy as np import scipy.spatial.distance as ssd from tstab import * def get_bijective_pairs(pairs,costmat): bij_pairs = bij_pairs_one_dim(pairs, costmat,0) bij_pairs = bij_pairs_one_dim(bij_pairs, costmat.T,1) return bij_pairs def bij_pairs_one_dim(pairs, costmat, left_or_right): b...
[ "numpy.mean", "numpy.prod", "numpy.log10", "numpy.roll", "numpy.unique", "numpy.ones", "numpy.average", "scipy.spatial.distance.pdist", "numpy.floor", "numpy.ascontiguousarray", "numpy.array", "numpy.zeros", "numpy.sum", "numpy.arctan2", "numpy.fmod", "numpy.argmin", "numpy.mod", "...
[((347, 381), 'numpy.unique', 'np.unique', (['pairs[:, left_or_right]'], {}), '(pairs[:, left_or_right])\n', (356, 381), True, 'import numpy as np\n'), ((637, 656), 'numpy.array', 'np.array', (['bij_pairs'], {}), '(bij_pairs)\n', (645, 656), True, 'import numpy as np\n'), ((1827, 1851), 'numpy.zeros', 'np.zeros', (['(n...
import unittest from monty.multiprocessing import imap_tqdm from math import sqrt class FuncCase(unittest.TestCase): def test_imap_tqdm(self): results = imap_tqdm(4, sqrt, range(10000)) self.assertEqual(len(results), 10000) self.assertEqual(results[0], 0) self.assertEqual(results[...
[ "unittest.main" ]
[((621, 636), 'unittest.main', 'unittest.main', ([], {}), '()\n', (634, 636), False, 'import unittest\n')]
# # This file is part of LiteX. # # Copyright (c) 2021 <NAME> <<EMAIL>> # SPDX-License-Identifier: BSD-2-Clause import unittest import unittest import random import itertools import sys from migen import * from litex.soc.interconnect.stream import * # Function to iterate over chunks of data, from # https://docs.pyt...
[ "random.Random", "itertools.zip_longest" ]
[((560, 609), 'itertools.zip_longest', 'itertools.zip_longest', (['*args'], {'fillvalue': 'fillvalue'}), '(*args, fillvalue=fillvalue)\n', (581, 609), False, 'import itertools\n'), ((3072, 3091), 'random.Random', 'random.Random', (['seed'], {}), '(seed)\n', (3085, 3091), False, 'import random\n'), ((7253, 7272), 'rando...
import cmocean import matplotlib.pyplot as plt import numpy as np from matplotlib import cm from scipy import interpolate cmap = cm.ScalarMappable(cmap=cmocean.cm.phase) cmap.to_rgba([0., 0.5, 1.]) def make_item(c, f, n=None): theta = [0] clr = cmap.to_rgba(c) if not n: n = np.random.randint(3, 9...
[ "matplotlib.pyplot.box", "numpy.sqrt", "matplotlib.pyplot.savefig", "scipy.interpolate.splprep", "numpy.random.rand", "numpy.sin", "matplotlib.pyplot.tick_params", "matplotlib.pyplot.close", "numpy.array", "numpy.linspace", "matplotlib.cm.ScalarMappable", "scipy.interpolate.splev", "numpy.ra...
[((130, 170), 'matplotlib.cm.ScalarMappable', 'cm.ScalarMappable', ([], {'cmap': 'cmocean.cm.phase'}), '(cmap=cmocean.cm.phase)\n', (147, 170), False, 'from matplotlib import cm\n'), ((654, 691), 'scipy.interpolate.splprep', 'interpolate.splprep', (['[x, y]'], {'s': '(0)', 't': '(1)'}), '([x, y], s=0, t=1)\n', (673, 69...
from typing import List from daos.employee_dao import EmployeeDao from entities.employee import Employee from utils.connection_util import connection class EmployeeDaoPostgres(EmployeeDao): def create_employee(self, emp: Employee) -> Employee: sql = """insert into employee (emp_firstname, emp_lastname, is...
[ "entities.employee.Employee", "utils.connection_util.connection.cursor", "utils.connection_util.connection.commit" ]
[((419, 438), 'utils.connection_util.connection.cursor', 'connection.cursor', ([], {}), '()\n', (436, 438), False, 'from utils.connection_util import connection\n'), ((580, 599), 'utils.connection_util.connection.commit', 'connection.commit', ([], {}), '()\n', (597, 599), False, 'from utils.connection_util import conne...
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = '<NAME>' # built-in modules import logging import argparse # Standard modules import cv2 import numpy as np import skimage import skimage.measure import skimage.segmentation # Custom modules import scripts logger = logging.getLogger('main') def get_masks(im...
[ "logging.getLogger", "cv2.destroyAllWindows", "cv2.getStructuringElement", "numpy.mean", "cv2.erode", "numpy.fft.fft2", "numpy.max", "skimage.img_as_ubyte", "cv2.waitKey", "cv2.add", "numpy.abs", "skimage.measure.regionprops", "cv2.morphologyEx", "scripts.gen_args", "cv2.cvtColor", "nu...
[((276, 301), 'logging.getLogger', 'logging.getLogger', (['"""main"""'], {}), "('main')\n", (293, 301), False, 'import logging\n'), ((549, 622), 'skimage.segmentation.slic', 'skimage.segmentation.slic', (['img'], {'n_segments': 'n_seg', 'compactness': '(10)', 'sigma': '(1)'}), '(img, n_segments=n_seg, compactness=10, s...
# NEON AI (TM) SOFTWARE, Software Development Kit & Application Framework # All trademark and other rights reserved by their respective owners # Copyright 2008-2022 Neongecko.com Inc. # Contributors: <NAME>, <NAME>, <NAME>, <NAME>, # <NAME>, <NAME>, <NAME>, <NAME> # BSD-3 License # Redistribution and use in source and ...
[ "threading.Event", "os.path.dirname", "os.path.realpath", "unittest.main", "ovos_utils.messagebus.FakeBus" ]
[((9404, 9419), 'unittest.main', 'unittest.main', ([], {}), '()\n', (9417, 9419), False, 'import unittest\n'), ((4467, 4476), 'ovos_utils.messagebus.FakeBus', 'FakeBus', ([], {}), '()\n', (4474, 4476), False, 'from ovos_utils.messagebus import FakeBus\n'), ((4517, 4524), 'threading.Event', 'Event', ([], {}), '()\n', (4...
# Use Streamlit in Sagemaker Studio Lab # Author: https://github.com/machinelearnear # import dependencies import streamlit as st import numpy as np import requests import io import json import base64 import matplotlib.pyplot as plt from PIL import Image from pathlib import Path from layers import BilinearUpSampling2...
[ "streamlit.image", "streamlit.button", "io.BytesIO", "streamlit_image_comparison.image_comparison", "tensorflow.keras.models.load_model", "streamlit.text_input", "streamlit.header", "streamlit.title", "matplotlib.pyplot.imshow", "streamlit.cache", "pathlib.Path", "streamlit.warning", "utils....
[((1089, 1125), 'streamlit.cache', 'st.cache', ([], {'allow_output_mutation': '(True)'}), '(allow_output_mutation=True)\n', (1097, 1125), True, 'import streamlit as st\n'), ((568, 588), 'utils.load_images', 'load_images', (['[image]'], {}), '([image])\n', (579, 588), False, 'from utils import load_images, predict\n'), ...
# coding: utf-8 # pylint: disable=too-many-branches """Initialization helper for mxnet""" from __future__ import absolute_import import re import logging import numpy as np from .base import string_types from .ndarray import NDArray, load from . import random class Initializer(object): """Base class for Initializ...
[ "numpy.random.normal", "numpy.prod", "numpy.ceil", "numpy.sqrt", "re.compile", "numpy.array", "numpy.random.uniform", "numpy.linalg.svd", "logging.info" ]
[((2223, 2246), 'numpy.ceil', 'np.ceil', (['(shape[3] / 2.0)'], {}), '(shape[3] / 2.0)\n', (2230, 2246), True, 'import numpy as np\n'), ((2619, 2651), 'numpy.array', 'np.array', (['[1.0, 0, 0, 0, 1.0, 0]'], {}), '([1.0, 0, 0, 0, 1.0, 0])\n', (2627, 2651), True, 'import numpy as np\n'), ((7083, 7105), 'numpy.prod', 'np....
import logging import random from datetime import datetime, timedelta from sys import exit from time import sleep from colorama import Fore, Style from GramAddict.core.config import Config from GramAddict.core.device_facade import create_device, get_device_info from GramAddict.core.filter import load_config as load_f...
[ "logging.getLogger", "GramAddict.core.utils.close_instagram", "GramAddict.core.log.update_log_file_name", "GramAddict.core.utils.ask_for_a_donation", "GramAddict.core.utils.config_examples", "time.sleep", "GramAddict.core.utils.get_value", "sys.exit", "GramAddict.core.log.configure_logger", "datet...
[((1551, 1578), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1568, 1578), False, 'import logging\n'), ((1616, 1648), 'GramAddict.core.config.Config', 'Config', ([], {'first_run': '(True)'}), '(first_run=True, **kwargs)\n', (1622, 1648), False, 'from GramAddict.core.config import Config...
""" ScanNet This file help you generate point clouds from RGB_D images. """ from __future__ import division import numpy as np import os, cv2, time, math, scipy import scipy.io as io import argparse def CameraParameterRead(dir): intrinsic_color_path = dir + 'intrinsic_color.txt' intrinsic_depth_path = dir ...
[ "scipy.io.savemat", "scipy.io.loadmat", "numpy.array", "os.remove", "os.listdir", "numpy.reshape", "numpy.where", "os.path.isdir", "numpy.empty", "numpy.concatenate", "numpy.ones", "os.path.isfile", "numpy.transpose", "cv2.imread", "time.time", "numpy.ones_like", "os.makedirs", "nu...
[((727, 770), 'numpy.array', 'np.array', (['intrinsic_color'], {'dtype': 'np.float32'}), '(intrinsic_color, dtype=np.float32)\n', (735, 770), True, 'import numpy as np\n'), ((944, 987), 'numpy.array', 'np.array', (['intrinsic_depth'], {'dtype': 'np.float32'}), '(intrinsic_depth, dtype=np.float32)\n', (952, 987), True, ...
from qtstrap import * from codex import SerialDevice, NullFilter class ConsoleDevice(SerialDevice): profile_name = "ConsoleDevice" def __init__(self, port=None, baud=115200, device=None): super().__init__(port=port, baud=baud, device=device) self.filter = NullFilter() self.message_tr...
[ "codex.NullFilter" ]
[((284, 296), 'codex.NullFilter', 'NullFilter', ([], {}), '()\n', (294, 296), False, 'from codex import SerialDevice, NullFilter\n')]
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Testing :mod:`astropy.cosmology.parameter`.""" ############################################################################## # IMPORTS # STDLIB import ast import inspect import sys # THIRD PARTY import pytest import numpy as np # LOCAL import ast...
[ "astropy.cosmology.core._COSMOLOGY_CLASSES.pop", "inspect.signature", "astropy.units.mass_energy", "pytest.raises", "pytest.fixture", "astropy.cosmology.parameter.Parameter" ]
[((10616, 10678), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""class"""', 'params': "['Example1', 'Example2']"}), "(scope='class', params=['Example1', 'Example2'])\n", (10630, 10678), False, 'import pytest\n'), ((10793, 10822), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""class"""'}), "(scope='class...
""" head develop/mip_references/grch37_scout_exons_-2017-01-.bed 13 22255179 22255286 13-22255181-22255284 NM_002010 3687 FGF9 1 154306977 154307069 1-154306979-154307067 NM_001005855,NM_020452 13534,13534 ATP8B2,ATP8B2 6 20739748 20739848 6-20739750-20739846 NM_017774,XM_005249202 21050,21050 CDKAL1,CDKAL1 2 228169699...
[ "logging.getLogger" ]
[((811, 838), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (828, 838), False, 'import logging\n')]
import rpy2.robjects.packages as rpackages from spatstat_interface.utils import install_r_package class SpatstatInterface: """See also https://github.com/spatstat/spatstat""" SUBPACKAGES = ("core", "data", "geom", "linnet", "sparse", "spatstat", "utils") EXTENSIONS = ("gui", "Knet", "local", "sphere") ...
[ "spatstat_interface.utils.install_r_package", "rpy2.robjects.packages.importr" ]
[((935, 979), 'spatstat_interface.utils.install_r_package', 'install_r_package', (['"""spatstat"""'], {'update': 'update'}), "('spatstat', update=update)\n", (952, 979), False, 'from spatstat_interface.utils import install_r_package\n'), ((2152, 2189), 'spatstat_interface.utils.install_r_package', 'install_r_package', ...
# Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from coremltools.converters.mil.mil import Builder as mb from coremltools.converters.mil.testing_util...
[ "numpy.random.rand", "coremltools.converters.mil.testing_utils.apply_pass_and_basic_check", "numpy.array", "coremltools.converters.mil.testing_utils.get_op_types_in_program", "coremltools.converters.mil.mil.Builder.TensorSpec", "coremltools.converters.mil.mil.Builder.identity", "numpy.random.seed", "c...
[((499, 519), 'numpy.random.seed', 'np.random.seed', (['(1984)'], {}), '(1984)\n', (513, 519), True, 'import numpy as np\n'), ((1054, 1115), 'coremltools.converters.mil.testing_utils.apply_pass_and_basic_check', 'apply_pass_and_basic_check', (['prog', '"""common::reduce_transposes"""'], {}), "(prog, 'common::reduce_tra...
from PPPForgivenessSDK.client import Client # to run file 'list_dcument_types.py', use valid token (page parameter can be changed ) client = Client( access_token='{{YOUR_TOKEN_HERE}}', vendor_key='{{YOUR_VENDOR_KEY}}', environment='sandbox' ) document_type_api = client.document_types # read first page of...
[ "PPPForgivenessSDK.client.Client" ]
[((142, 245), 'PPPForgivenessSDK.client.Client', 'Client', ([], {'access_token': '"""{{YOUR_TOKEN_HERE}}"""', 'vendor_key': '"""{{YOUR_VENDOR_KEY}}"""', 'environment': '"""sandbox"""'}), "(access_token='{{YOUR_TOKEN_HERE}}', vendor_key='{{YOUR_VENDOR_KEY}}',\n environment='sandbox')\n", (148, 245), False, 'from PPPF...
import unittest import requests from src.config import PYTHON_MODULE_PORT class APIStatusTest(unittest.TestCase): def setUp(self): self.url = f'http://localhost:{PYTHON_MODULE_PORT}/docs' self.status_code = 200 self.response_message = True def test_status_code(self): respons...
[ "requests.get" ]
[((324, 346), 'requests.get', 'requests.get', (['self.url'], {}), '(self.url)\n', (336, 346), False, 'import requests\n')]
import os import cv2 import math import shutil import pytesseract import numpy as np import scipy.stats as stats import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec #Module to detect whether the object in the video sequence is moving or not. def MovementDetection(VideoPath): if(os.path.exists(...
[ "numpy.array", "cv2.HoughLines", "cv2.dnn.NMSBoxes", "os.path.exists", "cv2.threshold", "cv2.erode", "cv2.line", "cv2.contourArea", "cv2.minAreaRect", "numpy.stack", "cv2.dnn.blobFromImage", "cv2.warpAffine", "numpy.argmax", "cv2.morphologyEx", "scipy.stats.zscore", "cv2.cvtColor", "...
[((437, 464), 'cv2.VideoCapture', 'cv2.VideoCapture', (['VideoPath'], {}), '(VideoPath)\n', (453, 464), False, 'import cv2\n'), ((1981, 2014), 'cv2.resize', 'cv2.resize', (['img', 'None'], {'fx': '(1)', 'fy': '(1)'}), '(img, None, fx=1, fy=1)\n', (1991, 2014), False, 'import cv2\n'), ((2067, 2143), 'cv2.dnn.blobFromIma...
# coding: utf-8 from __future__ import division, unicode_literals """ This module defines PDEntry, which wraps information (composition and energy) necessary to create phase diagrams. """ __author__ = "<NAME>" __copyright__ = "Copyright 2011, The Materials Project" __version__ = "1.0" __maintainer__ = "<NAME>" __em...
[ "pymatgen.core.composition.Composition", "monty.string.unicode2str", "io.open", "pymatgen.core.periodic_table.Element", "re.sub", "monty.json.MontyDecoder" ]
[((1696, 1720), 'pymatgen.core.composition.Composition', 'Composition', (['composition'], {}), '(composition)\n', (1707, 1720), False, 'from pymatgen.core.composition import Composition\n'), ((2743, 2772), 'pymatgen.core.composition.Composition', 'Composition', (["d['composition']"], {}), "(d['composition'])\n", (2754,...
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 import json import os from audio_detect import execute_ffmpeg from MediaReplayEnginePluginHelper import OutputHelper from MediaReplayEnginePluginHelper import PluginHelper from MediaReplayEnginePluginHelper import Sta...
[ "MediaReplayEnginePluginHelper.OutputHelper", "MediaReplayEnginePluginHelper.DataPlane", "MediaReplayEnginePluginHelper.PluginHelper", "audio_detect.execute_ffmpeg" ]
[((839, 855), 'MediaReplayEnginePluginHelper.DataPlane', 'DataPlane', (['event'], {}), '(event)\n', (848, 855), False, 'from MediaReplayEnginePluginHelper import DataPlane\n'), ((938, 957), 'MediaReplayEnginePluginHelper.OutputHelper', 'OutputHelper', (['event'], {}), '(event)\n', (950, 957), False, 'from MediaReplayEn...
import json from django.contrib.auth import get_user_model from django.test import TestCase from django.urls import reverse from rest_framework import status from helium.auth.models import UserProfile from helium.auth.models import UserSettings from helium.auth.tests.helpers import userhelper __author__ = "<NAME>" _...
[ "django.contrib.auth.get_user_model", "helium.auth.models.UserSettings.objects.filter", "helium.auth.tests.helpers.userhelper.given_a_user_exists", "json.dumps", "django.urls.reverse", "helium.auth.models.UserProfile.objects.filter", "helium.auth.tests.helpers.userhelper.given_an_inactive_user_exists" ]
[((500, 532), 'helium.auth.tests.helpers.userhelper.given_a_user_exists', 'userhelper.given_a_user_exists', ([], {}), '()\n', (530, 532), False, 'from helium.auth.tests.helpers import userhelper\n'), ((1298, 1330), 'helium.auth.tests.helpers.userhelper.given_a_user_exists', 'userhelper.given_a_user_exists', ([], {}), '...
import os, sys import torch from .models.embedding import FullyConnectedEmbed, SkipLSTM from .models.contact import ContactCNN from .models.interaction import ModelInteraction def build_lm_1(state_dict_path): """ :meta private: """ model = SkipLSTM(21, 100, 1024, 3) state_dict = torch.load(state_...
[ "os.path.exists", "shutil.copyfileobj", "torch.load", "os.path.realpath", "sys.exit" ]
[((303, 330), 'torch.load', 'torch.load', (['state_dict_path'], {}), '(state_dict_path)\n', (313, 330), False, 'import torch\n'), ((656, 683), 'torch.load', 'torch.load', (['state_dict_path'], {}), '(state_dict_path)\n', (666, 683), False, 'import torch\n'), ((1366, 1392), 'os.path.realpath', 'os.path.realpath', (['__f...
#!/usr/bin/env python import paho.mqtt.client as mqtt import json import base64 import struct import binascii import time import datetime import subprocess class LoraMClient(object): """A class to encapsulate MQTT operations between the broker (Conduit) and LoRa motes""" _struct_byte_orders = { 'nat...
[ "logging.getLogger", "subprocess.check_output", "logging.StreamHandler", "datetime.datetime.utcnow", "paho.mqtt.client.Client", "logging.Formatter", "base64.b64decode", "struct.pack", "struct.unpack", "binascii.unhexlify" ]
[((2687, 2700), 'paho.mqtt.client.Client', 'mqtt.Client', ([], {}), '()\n', (2698, 2700), True, 'import paho.mqtt.client as mqtt\n'), ((3712, 3750), 'logging.getLogger', 'logging.getLogger', (['"""loranetworkserver"""'], {}), "('loranetworkserver')\n", (3729, 3750), False, 'import logging\n'), ((3779, 3939), 'logging.F...
#!/usr/bin/env python # coding: utf-8 import numpy as np import pandas as pd from pytorch_transformers import (WEIGHTS_NAME, BertConfig, BertForSequenceClassification, BertTokenizer, XLMConfig, XLMForSequenceClassification, XLMTokenizer, XLNetConfig,...
[ "pandas.read_csv", "torch.cuda.device_count", "numpy.argsort", "numpy.array", "torch.cuda.is_available", "keras.preprocessing.sequence.pad_sequences", "math.exp", "argparse.ArgumentParser", "numpy.empty", "numpy.concatenate", "pickle.load", "torch.utils.data.SequentialSampler", "torch.utils....
[((820, 845), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (843, 845), False, 'import argparse\n'), ((2467, 2523), 'pandas.read_csv', 'pd.read_csv', (['query_doc_file'], {'delimiter': '"""\t"""', 'header': 'None'}), "(query_doc_file, delimiter='\\t', header=None)\n", (2478, 2523), True, 'impo...
from django.urls import include, path from rest_framework.routers import DefaultRouter from bbbs.afisha.views import ( EventAPIView, EventParticipantViewSet, MonthAPIView, ) router = DefaultRouter() router.register( "event-participants", EventParticipantViewSet, basename="event-pa...
[ "bbbs.afisha.views.MonthAPIView.as_view", "bbbs.afisha.views.EventAPIView.as_view", "rest_framework.routers.DefaultRouter", "django.urls.include" ]
[((206, 221), 'rest_framework.routers.DefaultRouter', 'DefaultRouter', ([], {}), '()\n', (219, 221), False, 'from rest_framework.routers import DefaultRouter\n'), ((378, 400), 'bbbs.afisha.views.EventAPIView.as_view', 'EventAPIView.as_view', ([], {}), '()\n', (398, 400), False, 'from bbbs.afisha.views import EventAPIVi...
import rpyc import copy import unittest from rpyc.utils.server import ThreadedServer class MyClass(object): def __add__(self, other): return self.foo() + str(other) def foo(self): return "foo" def bar(self): return "bar" def spam(self): return "spam" def _privy(...
[ "unittest.main", "rpyc.utils.server.ThreadedServer", "rpyc.connect", "copy.copy" ]
[((6727, 6742), 'unittest.main', 'unittest.main', ([], {}), '()\n', (6740, 6742), False, 'import unittest\n'), ((2046, 2071), 'rpyc.utils.server.ThreadedServer', 'ThreadedServer', (['MyService'], {}), '(MyService)\n', (2060, 2071), False, 'from rpyc.utils.server import ThreadedServer\n'), ((2142, 2185), 'rpyc.connect',...
from flask_bootstrap import Bootstrap from flask import Blueprint main = Blueprint('main',__name__) from . import views,error from flask_login import LoginManager login_manager = LoginManager() login_manager.session_protection = 'strong' login_manager.login_view = 'auth.login' def create_app(config_name): app = F...
[ "flask_login.LoginManager", "flask.Blueprint", "flask_bootstrap.Bootstrap" ]
[((73, 100), 'flask.Blueprint', 'Blueprint', (['"""main"""', '__name__'], {}), "('main', __name__)\n", (82, 100), False, 'from flask import Blueprint\n'), ((180, 194), 'flask_login.LoginManager', 'LoginManager', ([], {}), '()\n', (192, 194), False, 'from flask_login import LoginManager\n'), ((570, 584), 'flask_bootstra...
import sys from flask import Flask, render_template from flask_flatpages import FlatPages from flask_frozen import Freezer app = Flask(__name__) app.config.from_pyfile('mysettings.cfg') pages = FlatPages(app) freezer = Freezer(app) @app.route("/") def index(): return render_template('index.html', navigation=True...
[ "flask.render_template", "flask_flatpages.FlatPages", "flask_frozen.Freezer", "flask.Flask" ]
[((131, 146), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (136, 146), False, 'from flask import Flask, render_template\n'), ((196, 210), 'flask_flatpages.FlatPages', 'FlatPages', (['app'], {}), '(app)\n', (205, 210), False, 'from flask_flatpages import FlatPages\n'), ((221, 233), 'flask_frozen.Freezer',...
import re import os import glob import subprocess from subprocess import Popen, PIPE import numpy as np # generates the string with the selected integrator def set_integrator(scene, integrator_str): start = '##INTEGRATOR-DEF-START' end = '##INTEGRATOR-DEF-END' replacement = integrator_str match = re.ma...
[ "os.path.exists", "numpy.sqrt", "os.makedirs", "subprocess.Popen", "re.match", "os.path.isfile", "numpy.array", "subprocess.call", "math.log10" ]
[((315, 383), 're.match', 're.match', (["('(.+%s\\\\s*).+?(\\\\s*%s.+)' % (start, end))", 'scene', 're.DOTALL'], {}), "('(.+%s\\\\s*).+?(\\\\s*%s.+)' % (start, end), scene, re.DOTALL)\n", (323, 383), False, 'import re\n'), ((584, 652), 're.match', 're.match', (["('(.+%s\\\\s*).+?(\\\\s*%s.+)' % (start, end))", 'scene',...
# -*- coding: utf-8 -*- """" CrossFolium Test Module ----------------------- """ import crossfolium as cf def test_true(): c = cf.Crossfilter([]) c._repr_html_()
[ "crossfolium.Crossfilter" ]
[((133, 151), 'crossfolium.Crossfilter', 'cf.Crossfilter', (['[]'], {}), '([])\n', (147, 151), True, 'import crossfolium as cf\n')]
from time import time import googlemaps import populartimes import utils from data_loader import Data from structures import Shop class GoogleMapsHandler: def __init__(self): self._api_key = '<KEY>' self._client = googlemaps.Client(key=self._api_key) def get_shop_info(self, shop: Shop): ...
[ "populartimes.get_id", "utils.current_hour", "utils.current_weekday", "googlemaps.Client", "time.time", "data_loader.Data" ]
[((2037, 2043), 'data_loader.Data', 'Data', ([], {}), '()\n', (2041, 2043), False, 'from data_loader import Data\n'), ((2221, 2227), 'time.time', 'time', ([], {}), '()\n', (2225, 2227), False, 'from time import time\n'), ((237, 273), 'googlemaps.Client', 'googlemaps.Client', ([], {'key': 'self._api_key'}), '(key=self._...
""" Tests for salt.modules.zfs on Solaris """ import pytest import salt.config import salt.loader import salt.modules.zfs as zfs import salt.utils.zfs from tests.support.mock import MagicMock, patch from tests.support.zfs import ZFSMockData @pytest.fixture def utils_patch(): return ZFSMockData().get_patched_util...
[ "tests.support.mock.MagicMock", "tests.support.mock.patch.dict", "salt.modules.zfs.get", "tests.support.zfs.ZFSMockData", "pytest.mark.skip_unless_on_sunos" ]
[((843, 935), 'pytest.mark.skip_unless_on_sunos', 'pytest.mark.skip_unless_on_sunos', ([], {'reason': '"""test to ensure no -t only applies to Solaris"""'}), "(reason=\n 'test to ensure no -t only applies to Solaris')\n", (875, 935), False, 'import pytest\n'), ((1175, 1206), 'tests.support.mock.MagicMock', 'MagicMoc...
import os from fabric.context_managers import settings from refabric.contrib import blueprints from .base import BaseManager from ..project import * from ... import debian from ... import supervisor blueprint = blueprints.get('blues.app') class SupervisorManager(BaseManager): name = 'supervisor' def ins...
[ "os.path.join", "refabric.contrib.blueprints.get", "fabric.context_managers.settings" ]
[((216, 243), 'refabric.contrib.blueprints.get', 'blueprints.get', (['"""blues.app"""'], {}), "('blues.app')\n", (230, 243), False, 'from refabric.contrib import blueprints\n'), ((1802, 1833), 'os.path.join', 'os.path.join', (['destination', 'name'], {}), '(destination, name)\n', (1814, 1833), False, 'import os\n'), ((...
# Copyright 2021- imbus AG # # 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 writi...
[ "TestBenchCliReporter.questions.ask_for_input_path", "TestBenchCliReporter.questions.ask_to_config_import", "TestBenchCliReporter.questions.ask_to_select_cycle", "TestBenchCliReporter.questions.ask_for_output_path", "TestBenchCliReporter.questions.ask_to_select_filters", "zipfile.ZipFile", "TestBenchCli...
[((2365, 2410), 'TestBenchCliReporter.questions.ask_to_select_project', 'questions.ask_to_select_project', (['all_projects'], {}), '(all_projects)\n', (2396, 2410), False, 'from TestBenchCliReporter import questions\n'), ((2434, 2479), 'TestBenchCliReporter.questions.ask_to_select_tov', 'questions.ask_to_select_tov', (...
# -*- coding: utf-8 -*- from django import forms from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ from distriblists.models import DistributionList from categories.models import Category class DistributionListImportForm(forms.Form): required_css_class = ...
[ "django.utils.translation.ugettext_lazy", "django.core.exceptions.ValidationError", "categories.models.Category.objects.all" ]
[((385, 398), 'django.utils.translation.ugettext_lazy', '_', (['"""Category"""'], {}), "('Category')\n", (386, 398), True, 'from django.utils.translation import ugettext_lazy as _\n'), ((417, 439), 'categories.models.Category.objects.all', 'Category.objects.all', ([], {}), '()\n', (437, 439), False, 'from categories.mo...