code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
"""AlterRewardsOnUserRewardTable Revision ID: <KEY> Revises: <PASSWORD> Create Date: 2022-03-03 16:12:17.497790 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql # revision identifiers, used by Alembic. revision = '<KEY>' down_revision = '1<PASSWORD>' branch_labels = None depen...
[ "sqlalchemy.DECIMAL", "sqlalchemy.dialects.mysql.INTEGER", "alembic.op.drop_column", "sqlalchemy.dialects.mysql.VARCHAR" ]
[((420, 468), 'alembic.op.drop_column', 'op.drop_column', (['"""airdrop"""', '"""stakable_token_name"""'], {}), "('airdrop', 'stakable_token_name')\n", (434, 468), False, 'from alembic import op\n'), ((555, 586), 'sqlalchemy.dialects.mysql.INTEGER', 'mysql.INTEGER', ([], {'display_width': '(11)'}), '(display_width=11)\...
import os import numpy as np import pandas as pd import networkx as nx def create_polarity_csv(neighbors_csv_path, mcmc_path, user_polarities_paths): """ Merge the neighbors csv with both the neighbourhood-based polarities and the following-based polarities. Input: neighbors_csv_path : path...
[ "pandas.read_csv", "pandas.merge", "networkx.read_gexf", "os.path.join", "os.path.split", "pandas.DataFrame" ]
[((931, 945), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (943, 945), True, 'import pandas as pd\n'), ((1206, 1254), 'pandas.merge', 'pd.merge', (['original_csv', '_users'], {'on': '(1)', 'how': '"""left"""'}), "(original_csv, _users, on=1, how='left')\n", (1214, 1254), True, 'import pandas as pd\n'), ((2137,...
import os from django.db import models from django.conf import settings from django.utils.translation import gettext_lazy as _ from django.db.models.signals import post_save from django.dispatch import receiver from django.contrib.auth import get_user_model # Create your models here. class Profile(models.Model): ...
[ "django.contrib.auth.get_user_model", "django.utils.translation.gettext_lazy", "os.path.splitext" ]
[((459, 471), 'django.utils.translation.gettext_lazy', '_', (['"""company"""'], {}), "('company')\n", (460, 471), True, 'from django.utils.translation import gettext_lazy as _\n'), ((539, 548), 'django.utils.translation.gettext_lazy', '_', (['"""info"""'], {}), "('info')\n", (540, 548), True, 'from django.utils.transla...
from django.contrib import admin from django.contrib.auth import get_user_model from pint.registry import UnitRegistry from .models import Activity, Ingredient, Recipe, RecipeIngredient User = get_user_model() class RecipeIngredientInline(admin.StackedInline): model = RecipeIngredient extra = 0 class Reci...
[ "django.contrib.auth.get_user_model", "django.contrib.admin.site.register" ]
[((195, 211), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (209, 211), False, 'from django.contrib.auth import get_user_model\n'), ((531, 571), 'django.contrib.admin.site.register', 'admin.site.register', (['Recipe', 'RecipeAdmin'], {}), '(Recipe, RecipeAdmin)\n', (550, 571), False, 'from d...
from mock import patch, MagicMock from django.test import TestCase from fondo_api.services.mail import MailService from fondo_api.enums import EmailTemplate class MailServiceTest(TestCase): @patch('boto3.client') def test_send_mail_exception(self, mock): SES = MagicMock() SES.send_email.side_effect = Exc...
[ "mock.patch", "fondo_api.services.mail.MailService", "mock.MagicMock" ]
[((196, 217), 'mock.patch', 'patch', (['"""boto3.client"""'], {}), "('boto3.client')\n", (201, 217), False, 'from mock import patch, MagicMock\n'), ((697, 718), 'mock.patch', 'patch', (['"""boto3.client"""'], {}), "('boto3.client')\n", (702, 718), False, 'from mock import patch, MagicMock\n'), ((2042, 2063), 'mock.patc...
import os, sys from pathlib import Path import torch import torchvision from net_module import loss_functions as loss_func from net_module.net import GridCodec from data_handle import data_handler as dh from data_handle import dataset as ds import pre_load print("Program: training\n") ### Config root_dir = Path(__...
[ "data_handle.data_handler.ToTensor", "pathlib.Path", "pre_load.main_train", "data_handle.data_handler.Rescale", "pre_load.load_param" ]
[((450, 492), 'pre_load.load_param', 'pre_load.load_param', (['root_dir', 'config_file'], {}), '(root_dir, config_file)\n', (469, 492), False, 'import pre_load\n'), ((738, 861), 'pre_load.main_train', 'pre_load.main_train', (['root_dir', 'config_file'], {'Dataset': 'Dataset', 'Net': 'Net', 'zip': 'data_from_zip', 'tran...
#!/usr/bin/env python3 # Copyright (c) 2019, <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 l...
[ "logging.getLogger", "logging.StreamHandler", "constants.overlay.OverlayMode", "patterns.factory.OverlayFactory", "constants.overlay.OverlayLayout", "gui.model.OverlayModel", "patterns.observer.Subscriber", "log.Formatter" ]
[((2212, 2245), 'logging.StreamHandler', 'logging.StreamHandler', (['sys.stdout'], {}), '(sys.stdout)\n', (2233, 2245), False, 'import logging\n'), ((2319, 2346), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (2336, 2346), False, 'import logging\n'), ((2574, 2586), 'patterns.observer.Sub...
import pictureobject_functions as pic_functions class Picture_object(): """Gives an interface to access the colors of a picture.""" def __init__(self, filepath, conf): self.conf = conf self.filepath = filepath self.is_changed = False self.filename = pic_functions.get_filename_...
[ "pictureobject_functions.maxcolors", "pictureobject_functions.percent_threshold", "pictureobject_functions.get_quantize", "pictureobject_functions.get_list_from_file", "pictureobject_functions.get_pixelcount", "pictureobject_functions.get_filename_from_path", "pictureobject_functions.all_colors_to_palet...
[((293, 339), 'pictureobject_functions.get_filename_from_path', 'pic_functions.get_filename_from_path', (['filepath'], {}), '(filepath)\n', (329, 339), True, 'import pictureobject_functions as pic_functions\n'), ((360, 398), 'pictureobject_functions.get_pixelcount', 'pic_functions.get_pixelcount', (['filepath'], {}), '...
#!/usr/bin/env python import fileinput def read_orbit(line): a, b = line.strip().split(')') return a, b def make_orbit_map(orbits): parent = {} for big, small in orbits: parent[small] = big return parent def num_direct_and_indirect(orbit_map, obj): num = 0 while obj in orbit_m...
[ "fileinput.input" ]
[((884, 901), 'fileinput.input', 'fileinput.input', ([], {}), '()\n', (899, 901), False, 'import fileinput\n')]
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys print('y1') def main(filename): raw_data = load_data(filename) # TODO - Clean data print(raw_data[0]) return raw_data def load_data(filename): with open(filename, 'r') as file: raw = file.read() raw_data = frames = raw.split...
[ "os.path.join" ]
[((448, 494), 'os.path.join', 'os.path.join', (['"""sonic_pi_face"""', '"""data"""', 'args[0]'], {}), "('sonic_pi_face', 'data', args[0])\n", (460, 494), False, 'import os\n')]
# Standard Library import copy import gzip import json from typing import List # Third Party from loguru import logger # Local import bel.core.mail import bel.core.settings as settings import bel.core.utils import bel.db.arangodb as arangodb import bel.db.elasticsearch as elasticsearch import bel.resources.namespace ...
[ "loguru.logger.info", "gzip.open" ]
[((4587, 4633), 'loguru.logger.info', 'logger.info', (['"""Finished updating BEL Resources"""'], {}), "('Finished updating BEL Resources')\n", (4598, 4633), False, 'from loguru import logger\n'), ((3886, 3921), 'loguru.logger.info', 'logger.info', (['f"""Resource {resource}"""'], {}), "(f'Resource {resource}')\n", (389...
import asyncio from aiohttp import ClientResponseError from dataclasses_json import dataclass_json, Undefined from ansible_collections.eraga.matrix.plugins.module_utils.client_model import _AnsibleMatrixObject from ansible_collections.eraga.matrix.plugins.module_utils.client_model import * @dataclass_json(undefined...
[ "dataclasses_json.dataclass_json", "markdown.markdown" ]
[((296, 339), 'dataclasses_json.dataclass_json', 'dataclass_json', ([], {'undefined': 'Undefined.EXCLUDE'}), '(undefined=Undefined.EXCLUDE)\n', (310, 339), False, 'from dataclasses_json import dataclass_json, Undefined\n'), ((642, 685), 'dataclasses_json.dataclass_json', 'dataclass_json', ([], {'undefined': 'Undefined....
import requests import json import logging import time # Configure logging logger = logging.getLogger(__name__) graphurl = \ "https://api.thegraph.com/subgraphs/name/getprotocol/get-protocol-subgraph-deprecated" def querygraph(query): retry = 0 maxretry = 20 while True: if retry == maxretry...
[ "logging.getLogger", "json.loads", "requests.post", "time.sleep" ]
[((85, 112), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (102, 112), False, 'import logging\n'), ((498, 544), 'requests.post', 'requests.post', (['graphurl'], {'json': "{'query': query}"}), "(graphurl, json={'query': query})\n", (511, 544), False, 'import requests\n'), ((564, 582), 'js...
#!/home/nitin/Learn/Repositories/Github/WebApps/SimpleIsBetterThanComplex.com/myproject/.env/bin/python3 from django.core import management if __name__ == "__main__": management.execute_from_command_line()
[ "django.core.management.execute_from_command_line" ]
[((172, 210), 'django.core.management.execute_from_command_line', 'management.execute_from_command_line', ([], {}), '()\n', (208, 210), False, 'from django.core import management\n')]
# -*- coding: utf-8 -*- """ @author:XuMing(<EMAIL>) @description: """ import os from transformers import pipeline os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE" bert_model_dir = os.path.expanduser('~/.pycorrector/datasets/bert_models/chinese_finetuned_lm/') print(bert_model_dir) nlp = pipeline("fill-mask", ...
[ "torch.topk", "transformers.AutoModelWithLMHead.from_pretrained", "transformers.AutoTokenizer.from_pretrained", "transformers.pipeline", "os.path.expanduser", "torch.where" ]
[((178, 257), 'os.path.expanduser', 'os.path.expanduser', (['"""~/.pycorrector/datasets/bert_models/chinese_finetuned_lm/"""'], {}), "('~/.pycorrector/datasets/bert_models/chinese_finetuned_lm/')\n", (196, 257), False, 'import os\n'), ((286, 371), 'transformers.pipeline', 'pipeline', (['"""fill-mask"""'], {'model': 'be...
import json import collections import re import attr from clldutils.source import Source from clldutils.licenses import find from ldh.util import REPOS @attr.s class Rights(object): name = attr.ib() url = attr.ib() @attr.s class Creator(object): type = attr.ib(default='PERSON') role = attr.ib(defa...
[ "ldh.util.REPOS.joinpath", "re.match", "clldutils.source.Source", "attr.fields", "collections.defaultdict", "attr.validators.optional", "attr.Factory", "json.load", "attr.ib" ]
[((197, 206), 'attr.ib', 'attr.ib', ([], {}), '()\n', (204, 206), False, 'import attr\n'), ((217, 226), 'attr.ib', 'attr.ib', ([], {}), '()\n', (224, 226), False, 'import attr\n'), ((271, 296), 'attr.ib', 'attr.ib', ([], {'default': '"""PERSON"""'}), "(default='PERSON')\n", (278, 296), False, 'import attr\n'), ((308, 3...
import esphome.codegen as cg import esphome.config_validation as cv from esphome.components import i2c, sensor from esphome.const import ( CONF_COLOR_TEMPERATURE, CONF_GAIN, CONF_ID, CONF_ILLUMINANCE, CONF_GLASS_ATTENUATION_FACTOR, CONF_INTEGRATION_TIME, DEVICE_CLASS_ILLUMINANCE, ICON_LI...
[ "esphome.codegen.new_Pvariable", "esphome.components.sensor.new_sensor", "esphome.codegen.register_component", "esphome.config_validation.polling_component_schema", "esphome.config_validation.Optional", "esphome.components.sensor.sensor_schema", "esphome.components.i2c.register_i2c_device", "esphome.c...
[((613, 648), 'esphome.codegen.esphome_ns.namespace', 'cg.esphome_ns.namespace', (['"""tcs34725"""'], {}), "('tcs34725')\n", (636, 648), True, 'import esphome.codegen as cg\n'), ((2441, 2578), 'esphome.components.sensor.sensor_schema', 'sensor.sensor_schema', ([], {'unit_of_measurement': 'UNIT_PERCENT', 'icon': 'ICON_L...
import yaml import sys import argparse import copy section_labels_list = [ 'Get Data', 'Send Data', 'Collection Operations', 'Expression Tools', 'Text Manipulation', 'Filter and Sort', 'Join, Subtract and Group', 'Convert Formats', 'FASTA/FASTQ', 'FASTQ Quality Control', 'SAM/BAM', 'BED', 'VCF/BCF', 'Nanop...
[ "sys.exit", "yaml.load", "argparse.ArgumentParser", "yaml.dump" ]
[((11794, 11852), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Arguments to parse."""'}), "(description='Arguments to parse.')\n", (11817, 11852), False, 'import argparse\n'), ((13111, 13132), 'yaml.load', 'yaml.load', (['tools_file'], {}), '(tools_file)\n', (13120, 13132), False, 'imp...
"""Utils for dealing with agent configuration. Provides a method to read a protoconf file from a file path into a proto. """ from google.protobuf import text_format from ..config_gen.metric_configuration_pb2 import SidecarConfig # pylint: disable=relative-beyond-top-level def load_config(config_path: str) -> Sidec...
[ "google.protobuf.text_format.Parse" ]
[((733, 777), 'google.protobuf.text_format.Parse', 'text_format.Parse', (['config_data', 'config_proto'], {}), '(config_data, config_proto)\n', (750, 777), False, 'from google.protobuf import text_format\n')]
from flask import Flask, render_template from store import Post, PostStore app = Flask(__name__) dummy_posts = [ Post(id=1, photo_url='https://images.pexels.com/photos/415829/pexels-photo-415829.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=50&w=50', name='Sara', body='Lorem Ipsum'), Post(...
[ "store.PostStore", "store.Post", "flask.Flask" ]
[((82, 97), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (87, 97), False, 'from flask import Flask, render_template\n'), ((528, 539), 'store.PostStore', 'PostStore', ([], {}), '()\n', (537, 539), False, 'from store import Post, PostStore\n'), ((119, 292), 'store.Post', 'Post', ([], {'id': '(1)', 'photo_u...
import asyncio import json import multiprocessing import threading import time from collections import defaultdict import pytest from jina import Client, Document, Executor, requests from jina.enums import PollingType from jina.parsers import set_gateway_parser, set_pod_parser from jina.serve.runtimes.asyncio import ...
[ "multiprocessing.Event", "multiprocessing.Process", "jina.parsers.set_pod_parser", "jina.Client", "jina.parsers.set_gateway_parser", "pytest.mark.parametrize", "jina.serve.runtimes.worker.WorkerRuntime" ]
[((1513, 1579), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""protocol"""', "['grpc', 'http', 'websocket']"], {}), "('protocol', ['grpc', 'http', 'websocket'])\n", (1536, 1579), False, 'import pytest\n'), ((1894, 1969), 'multiprocessing.Process', 'multiprocessing.Process', ([], {'target': '_create_worker_...
#!/usr/bin/python # # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
[ "google.datacatalog_connectors.vertica.scrape.MetadataScraper" ]
[((1047, 1071), 'google.datacatalog_connectors.vertica.scrape.MetadataScraper', 'scrape.MetadataScraper', ([], {}), '()\n', (1069, 1071), False, 'from google.datacatalog_connectors.vertica import scrape\n')]
# -*- coding: utf-8 -*- """ Generates a report for English Wikipedia articles with no Wikidata item Copyright (C) 2015 <NAME> Licensed under MIT License: http://mitlicense.org """ from urllib.parse import quote import pywikibot from project_index import WikiProjectTools def main(): wptools = WikiProjectTools() ...
[ "urllib.parse.quote", "project_index.WikiProjectTools", "pywikibot.Site", "pywikibot.Page" ]
[((301, 319), 'project_index.WikiProjectTools', 'WikiProjectTools', ([], {}), '()\n', (317, 319), False, 'from project_index import WikiProjectTools\n'), ((330, 363), 'pywikibot.Site', 'pywikibot.Site', (['"""en"""', '"""wikipedia"""'], {}), "('en', 'wikipedia')\n", (344, 363), False, 'import pywikibot\n'), ((873, 929)...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from time import sleep from visprotocol.protocol import clandinin_protocol class BaseProtocol(clandinin_protocol.BaseProtocol): def __init__(self, cfg): super().__init__(cfg) self.ptype = 'auditory' def setBackground(self, client): pas...
[ "time.sleep" ]
[((577, 615), 'time.sleep', 'sleep', (["self.run_parameters['pre_time']"], {}), "(self.run_parameters['pre_time'])\n", (582, 615), False, 'from time import sleep\n'), ((676, 715), 'time.sleep', 'sleep', (["self.run_parameters['stim_time']"], {}), "(self.run_parameters['stim_time'])\n", (681, 715), False, 'from time imp...
from collections import deque class Directions(): NORTH = 0 WEST = 1 SOUTH = 2 EAST = 3 class Snake(): def __init__(self, head_starting_position): self.head_i, self.head_j = head_starting_position self.stack = deque() # initialize head self.stack.append(head_startin...
[ "collections.deque" ]
[((248, 255), 'collections.deque', 'deque', ([], {}), '()\n', (253, 255), False, 'from collections import deque\n')]
import cmlkit import cmlkit.regression as cmlr import cmlkit.indices as cmlki import cmlkit.losses as cmll # Load model spec and data spec = cmlkit.ModelSpec.from_yaml('model.spec.yml') data = cmlkit.load_dataset('kaggle') mbtr = cmlkit.MBTR.from_file('kaggle_model.mbtr.npy') # Train/test split train, test = cmlki.tw...
[ "cmlkit.ModelSpec.from_yaml", "cmlkit.losses.pretty_loss", "cmlkit.MBTR.from_file", "cmlkit.regression.idx_compute_loss", "cmlkit.load_dataset", "cmlkit.indices.twoway_split" ]
[((142, 186), 'cmlkit.ModelSpec.from_yaml', 'cmlkit.ModelSpec.from_yaml', (['"""model.spec.yml"""'], {}), "('model.spec.yml')\n", (168, 186), False, 'import cmlkit\n'), ((194, 223), 'cmlkit.load_dataset', 'cmlkit.load_dataset', (['"""kaggle"""'], {}), "('kaggle')\n", (213, 223), False, 'import cmlkit\n'), ((231, 277), ...
""" Helper function: given a manager instance, automatically build a CLI that can be exposed as a package script """ import argparse from pprint import pprint as pp import sys import typing as ty from . import exceptions, manager class AssetCLI: def __init__(self, manager: manager.AssetManager): self._ma...
[ "pprint.pprint", "sys.exit" ]
[((2724, 2787), 'sys.exit', 'sys.exit', (['"""Options "--all" and "--type" are mutually exclusive"""'], {}), '(\'Options "--all" and "--type" are mutually exclusive\')\n', (2732, 2787), False, 'import sys\n'), ((2846, 2956), 'sys.exit', 'sys.exit', (['"""Must specify asset using `--all` or `--type name --tag key1 value...
#!/usr/bin/env python # # Camlistore uploader client for Python. # # Copyright 2010 The Perkeep Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/...
[ "cStringIO.StringIO", "logging.debug", "mimetools.choose_boundary", "urlparse.urlparse", "urllib.urlencode", "base64.encodestring", "simplejson.loads", "hashlib.sha1", "urlparse.urlunparse" ]
[((1592, 1606), 'hashlib.sha1', 'hashlib.sha1', ([], {}), '()\n', (1604, 1606), False, 'import hashlib\n'), ((5115, 5201), 'logging.debug', 'logging.debug', (['"""Preupload HTTP response: %d %s"""', 'response.status', 'response.reason'], {}), "('Preupload HTTP response: %d %s', response.status, response.\n reason)\n...
"""本模块是 {ref}`nonebot.matcher.Matcher.rule` 的类型定义。 每个事件响应器 {ref}`nonebot.matcher.Matcher` 拥有一个匹配规则 {ref}`nonebot.rule.Rule` 其中是 `RuleChecker` 的集合,只有当所有 `RuleChecker` 检查结果为 `True` 时继续运行。 FrontMatter: sidebar_position: 5 description: nonebot.rule 模块 """ import re import shlex from itertools import product from...
[ "re.escape", "pygtrie.CharTrie", "nonebot.params.EventPlainText", "nonebot.params.EventType", "shlex.split", "itertools.product", "typing_extensions.TypedDict", "nonebot.params.Command", "nonebot.get_driver", "nonebot.params.CommandArg", "nonebot.params.EventMessage", "nonebot.params.EventToMe...
[((1100, 1252), 'typing_extensions.TypedDict', 'TypedDict', (['"""CMD_RESULT"""', "{'command': Optional[Tuple[str, ...]], 'raw_command': Optional[str],\n 'command_arg': Optional[Message[MessageSegment]]}"], {}), "('CMD_RESULT', {'command': Optional[Tuple[str, ...]],\n 'raw_command': Optional[str], 'command_arg': ...
# Copyright (C) 2022 <NAME> <<EMAIL>> # SPDX-License-Identifier: MIT # # pylint: disable=invalid-name """Generates argument_specs.yml from variables parsed in role. Usage: vars2specs.py [-c] [-r DIR] Options: -c Parse all roles in a collection [default: no] -r DIR --role_dir=DIR Input r...
[ "yaml.composer.Composer.compose_node", "pathlib.Path", "yaml.dump", "yaml.nodes.ScalarNode", "yaml.load", "ruamel.yaml.YAML", "yaml.indent", "collections.defaultdict", "docopt.docopt", "yaml.constructor.Constructor.construct_mapping" ]
[((6142, 6164), 'docopt.docopt', 'docopt.docopt', (['__doc__'], {}), '(__doc__)\n', (6155, 6164), False, 'import docopt\n'), ((1277, 1319), 'yaml.composer.Composer.compose_node', 'Composer.compose_node', (['self', 'parent', 'index'], {}), '(self, parent, index)\n', (1298, 1319), False, 'from yaml.composer import Compos...
#!/usr/bin/env python """ Handle and move files from the receiver(s) to Overwatch sites and EOS. This simple module is responsible for moving data which is provided by the receiver to other sites. It will retry a few times if sites are unavailable. We take a simple approach of determine which files to transfer, and ...
[ "logging.getLogger", "subprocess.check_output", "os.path.exists", "os.listdir", "os.makedirs", "math.floor", "os.path.join", "future.utils.itervalues", "functools.wraps", "time.sleep", "tempfile.NamedTemporaryFile", "ROOT.TFile.Cp", "future.utils.iteritems" ]
[((1143, 1170), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1160, 1170), False, 'import logging\n'), ((2491, 2508), 'math.floor', 'math.floor', (['tries'], {}), '(tries)\n', (2501, 2508), False, 'import math\n'), ((11293, 11326), 'os.path.join', 'os.path.join', (['directory', 'filenam...
import os import pickle from pprint import pprint import numpy as np import matplotlib.pyplot as plt OUT_PATH = "/Users/lindronics/workspace/4th_year/out/kfold" final_report = {} for path, _, files in os.walk(OUT_PATH): for fname in files: if fname.endswith(".pickle") and "report" in fname: ...
[ "os.path.join", "pickle.load", "numpy.array", "pprint.pprint", "os.walk" ]
[((204, 221), 'os.walk', 'os.walk', (['OUT_PATH'], {}), '(OUT_PATH)\n', (211, 221), False, 'import os\n'), ((916, 936), 'pprint.pprint', 'pprint', (['final_report'], {}), '(final_report)\n', (922, 936), False, 'from pprint import pprint\n'), ((394, 408), 'pickle.load', 'pickle.load', (['f'], {}), '(f)\n', (405, 408), F...
""" Copyright 2020 <NAME> 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...
[ "update.manager.Manager", "signal.signal", "update.logger.getLogger", "sys.exit", "update.logger.initLogger" ]
[((737, 769), 'update.logger.initLogger', 'initLogger', (['mu_conf.Logger.level'], {}), '(mu_conf.Logger.level)\n', (747, 769), False, 'from update.logger import initLogger, getLogger\n'), ((781, 797), 'update.logger.getLogger', 'getLogger', (['"""app"""'], {}), "('app')\n", (790, 797), False, 'from update.logger impor...
""" expire.py Expire from their source lists in ANNIS """ def expire_ingest(expire_ingest_instance): """ Set all texts is_expired value to true """ from texts.models import Text for text in Text.objects.all(): text.is_expired = True text.save()
[ "texts.models.Text.objects.all" ]
[((216, 234), 'texts.models.Text.objects.all', 'Text.objects.all', ([], {}), '()\n', (232, 234), False, 'from texts.models import Text\n')]
import drawing import itertools import numpy as np import matplotlib.pyplot as plt import mpl_toolkits.mplot3d as a3 import matplotlib.animation as animation class PolyhedronExtension: @classmethod def fromBounds(cls, lb, ub): """ Return a new Polyhedron representing an n-dimensional box spanni...
[ "numpy.eye", "numpy.hstack", "matplotlib.pyplot.gca", "drawing.draw_convhull", "numpy.asarray", "matplotlib.animation.ArtistAnimation", "numpy.linspace", "matplotlib.pyplot.figure", "numpy.cos", "itertools.izip", "numpy.sin", "numpy.zeros_like", "mpl_toolkits.mplot3d.Axes3D", "matplotlib.p...
[((366, 398), 'numpy.asarray', 'np.asarray', (['lb'], {'dtype': 'np.float64'}), '(lb, dtype=np.float64)\n', (376, 398), True, 'import numpy as np\n'), ((412, 444), 'numpy.asarray', 'np.asarray', (['ub'], {'dtype': 'np.float64'}), '(ub, dtype=np.float64)\n', (422, 444), True, 'import numpy as np\n'), ((1693, 1756), 'ite...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Contribution', fields=[ ('id', models.AutoField...
[ "django.db.models.AutoField", "django.db.models.PositiveIntegerField", "django.db.models.DateTimeField", "django.db.models.DecimalField", "django.db.models.CharField" ]
[((304, 397), 'django.db.models.AutoField', 'models.AutoField', ([], {'verbose_name': '"""ID"""', 'serialize': '(False)', 'auto_created': '(True)', 'primary_key': '(True)'}), "(verbose_name='ID', serialize=False, auto_created=True,\n primary_key=True)\n", (320, 397), False, 'from django.db import models, migrations\...
# -*- coding: utf-8 -* import re import os, shutil import requests, threading from urllib.request import urlretrieve from pyquery import PyQuery as pq from multiprocessing import Pool class VideoDown: def __init__(self, url): # self.ts_to_mp4() # 拼接全民解析url self.api = 'https://jx.618g.com' ...
[ "os.listdir", "os.makedirs", "re.compile", "pyquery.PyQuery", "requests.get", "os.path.isfile", "multiprocessing.Pool", "shutil.rmtree", "os.system", "re.findall" ]
[((1316, 1324), 'pyquery.PyQuery', 'pq', (['html'], {}), '(html)\n', (1318, 1324), True, 'from pyquery import PyQuery as pq\n'), ((2261, 2286), 're.compile', 're.compile', (['""".*?(.*?).ts"""'], {}), "('.*?(.*?).ts')\n", (2271, 2286), False, 'import re\n'), ((2311, 2336), 're.findall', 're.findall', (['pattern', 'html...
import cv2 import numpy as np from PIL import ImageDraw, JpegImagePlugin def show_bboxes(image, bboxes, landmarks=[]): if isinstance(image, JpegImagePlugin.JpegImageFile): image_copy = image.copy() draw = ImageDraw.Draw(image_copy) for bbox in bboxes: draw.rectangle([(bbox[0],...
[ "cv2.rectangle", "cv2.circle", "PIL.ImageDraw.Draw" ]
[((227, 253), 'PIL.ImageDraw.Draw', 'ImageDraw.Draw', (['image_copy'], {}), '(image_copy)\n', (241, 253), False, 'from PIL import ImageDraw, JpegImagePlugin\n'), ((766, 852), 'cv2.rectangle', 'cv2.rectangle', (['image_copy', '(bbox[0], bbox[1])', '(bbox[2], bbox[3])', '(255, 255, 255)'], {}), '(image_copy, (bbox[0], bb...
import subprocess import os from typing import Any import psutil def get_git_tag() -> str: try: tag = ( subprocess.check_output(["git", "describe", "--tags", "--always"]) .decode("ascii") .strip() ) except Exception: tag = "version_un...
[ "subprocess.check_output" ]
[((141, 207), 'subprocess.check_output', 'subprocess.check_output', (["['git', 'describe', '--tags', '--always']"], {}), "(['git', 'describe', '--tags', '--always'])\n", (164, 207), False, 'import subprocess\n')]
from functools import wraps from typing import Any, Optional from pedantic.type_checking_logic.check_docstring import _check_docstring from pedantic.constants import ReturnType, F from pedantic.models.decorated_function import DecoratedFunction from pedantic.models.function_call import FunctionCall from pedantic.env_v...
[ "pedantic.models.function_call.FunctionCall", "functools.wraps", "pedantic.models.decorated_function.DecoratedFunction", "doctest.testmod", "pedantic.env_var_logic.is_enabled", "pedantic.type_checking_logic.check_docstring._check_docstring" ]
[((3387, 3447), 'doctest.testmod', 'doctest.testmod', ([], {'verbose': '(False)', 'optionflags': 'doctest.ELLIPSIS'}), '(verbose=False, optionflags=doctest.ELLIPSIS)\n', (3402, 3447), False, 'import doctest\n'), ((2342, 2367), 'pedantic.models.decorated_function.DecoratedFunction', 'DecoratedFunction', ([], {'func': 'f...
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2018-02-26 08:02 from __future__ import unicode_literals import datetime from django.db import migrations, models import django.db.models.deletion from django.utils.timezone import utc import django.utils.timezone class Migration(migrations.Migration): dep...
[ "datetime.datetime", "django.db.models.ForeignKey", "django.db.models.IntegerField", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.models.DateTimeField", "django.db.models.CharField" ]
[((1223, 1253), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'default': '(0)'}), '(default=0)\n', (1242, 1253), False, 'from django.db import migrations, models\n'), ((1387, 1421), 'django.db.models.BooleanField', 'models.BooleanField', ([], {'default': '(False)'}), '(default=False)\n', (1406, 1421), F...
from app import jwt, app from werkzeug.exceptions import HTTPException # 处理全局未授权错误 @jwt.unauthorized_loader def handle_unauthorized_error(e): res = { "code": 401, "msg": str(e) } return res @app.errorhandler(Exception) def handle_error(e): code = 500 msg = str(e) if isinstance(e, HTTPException): ...
[ "app.app.errorhandler" ]
[((201, 228), 'app.app.errorhandler', 'app.errorhandler', (['Exception'], {}), '(Exception)\n', (217, 228), False, 'from app import jwt, app\n')]
import torch import torch.nn as nn from torch.autograd import Variable import torch.nn.functional as F import numpy as np from gensim.models.keyedvectors import KeyedVectors from config import params, data, w2v class RNN(nn.Module): def __init__(self, params, data): super(RNN, self).__init__() sel...
[ "torch.nn.Dropout", "gensim.models.keyedvectors.KeyedVectors.load_word2vec_format", "torch.from_numpy", "numpy.array", "numpy.zeros", "numpy.random.uniform", "torch.nn.Linear", "torch.nn.functional.relu", "torch.zeros", "torch.nn.Embedding", "torch.nn.GRU" ]
[((1360, 1446), 'torch.nn.Embedding', 'nn.Embedding', (['self.NUM_EMBEDDINGS', 'self.WORD_DIM'], {'padding_idx': '(self.VOCAB_SIZE + 1)'}), '(self.NUM_EMBEDDINGS, self.WORD_DIM, padding_idx=self.\n VOCAB_SIZE + 1)\n', (1372, 1446), True, 'import torch.nn as nn\n'), ((1577, 1704), 'torch.nn.GRU', 'nn.GRU', (['self.WO...
import matplotlib.pyplot as plt from matplotlib import rc rc('text', usetex=True) fig = plt.figure(figsize=(6,3)) ax1 = fig.add_subplot(1,2,1) x_ind = [2, 4, 6, 8, 10] x_lab = [r'$\mathcal{T}_2$', r'$\mathcal{T}_4$', r'$\mathcal{T}_6$', r'$\mathcal{T}_8$', r'$\mathcal{T}_{{10}}$'] leg = [r'$\mathcal{T}_1$',r'$\mathcal{...
[ "matplotlib.pyplot.savefig", "matplotlib.pyplot.xticks", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.figure", "matplotlib.pyplot.yticks", "matplotlib.rc", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.title", "matplotlib.pyplot.ylim", "matplotlib.pyplot.subp...
[((58, 81), 'matplotlib.rc', 'rc', (['"""text"""'], {'usetex': '(True)'}), "('text', usetex=True)\n", (60, 81), False, 'from matplotlib import rc\n'), ((88, 114), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(6, 3)'}), '(figsize=(6, 3))\n', (98, 114), True, 'import matplotlib.pyplot as plt\n'), ((410, 44...
#!/usr/bin/env python import time import re import unittest import yaml from lib import api from lib import exceptions class TestConoHaAPI(unittest.TestCase): @classmethod def setUpClass(self): self.conoha = api.ConoHaAPI() with open('./tests/conf/server_id.conf', encoding='...
[ "unittest.main", "yaml.safe_load", "lib.api.ConoHaAPI", "time.sleep" ]
[((13731, 13746), 'unittest.main', 'unittest.main', ([], {}), '()\n', (13744, 13746), False, 'import unittest\n'), ((227, 242), 'lib.api.ConoHaAPI', 'api.ConoHaAPI', ([], {}), '()\n', (240, 242), False, 'from lib import api\n'), ((388, 418), 'yaml.safe_load', 'yaml.safe_load', (['server_id_conf'], {}), '(server_id_conf...
########################################################################## # # Copyright (c) 2007, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistribu...
[ "unittest.main", "IECore.IntData", "IECore.CompoundData" ]
[((3341, 3356), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3354, 3356), False, 'import unittest\n'), ((1904, 1921), 'IECore.IntData', 'IECore.IntData', (['(1)'], {}), '(1)\n', (1918, 1921), False, 'import IECore\n'), ((2518, 2535), 'IECore.IntData', 'IECore.IntData', (['(2)'], {}), '(2)\n', (2532, 2535), Fals...
from dataclasses import dataclass from pathlib import Path from enum import Enum, auto from filehandler import is_path_exists_or_creatable import settings class GitProvider(Enum): gitlab = auto() github = auto() @dataclass class Config: token: str owners: list[str] directory: Path method: Gi...
[ "settings.get_save_dir_from_env", "enum.auto", "pathlib.Path" ]
[((195, 201), 'enum.auto', 'auto', ([], {}), '()\n', (199, 201), False, 'from enum import Enum, auto\n'), ((215, 221), 'enum.auto', 'auto', ([], {}), '()\n', (219, 221), False, 'from enum import Enum, auto\n'), ((718, 743), 'pathlib.Path', 'Path', (["config['directory']"], {}), "(config['directory'])\n", (722, 743), Fa...
# Generated by Django 3.0.10 on 2020-09-21 04:56 from django.db import migrations, models import taggit.managers class Migration(migrations.Migration): dependencies = [ ('core', '0022_auto_20200909_0826'), ] operations = [ migrations.AlterModelOptions( name='tag', ...
[ "django.db.migrations.AlterModelOptions", "django.db.migrations.RemoveField", "django.db.models.BooleanField" ]
[((256, 386), 'django.db.migrations.AlterModelOptions', 'migrations.AlterModelOptions', ([], {'name': '"""tag"""', 'options': "{'ordering': ['name'], 'verbose_name': 'Tag', 'verbose_name_plural': 'Tags'}"}), "(name='tag', options={'ordering': ['name'],\n 'verbose_name': 'Tag', 'verbose_name_plural': 'Tags'})\n", (28...
from datetime import datetime import os import math import logging import warnings from visnav.algo.tools import PositioningException warnings.filterwarnings("ignore", module='quaternion', lineno=21) import numpy as np import cv2 import sys from visnav.render.render import RenderEngine from visnav.al...
[ "logging.getLogger", "math.sqrt", "visnav.algo.keypoint.KeypointAlgo", "os.path.exists", "visnav.algo.tools.angle_between_lat_lon_roll", "os.listdir", "visnav.missions.rosetta.RosettaSystemModel", "visnav.render.render.RenderEngine", "numpy.subtract", "numpy.ones", "math.degrees", "numpy.any",...
[((144, 209), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {'module': '"""quaternion"""', 'lineno': '(21)'}), "('ignore', module='quaternion', lineno=21)\n", (167, 209), False, 'import warnings\n'), ((451, 478), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (4...
# # Copyright 2012 <NAME> # # 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, sof...
[ "common.dbhelper.SQLTable", "xlrd.open_workbook", "wiod.config.countries.items", "common.fileutils.getcache" ]
[((1019, 1149), 'common.dbhelper.SQLTable', 'SQLTable', (['tablename', "['year', 'country', 'source', 'units', 'value']", "['int', 'char(3)', 'varchar(15)', 'varchar(4)', 'float']"], {}), "(tablename, ['year', 'country', 'source', 'units', 'value'], ['int',\n 'char(3)', 'varchar(15)', 'varchar(4)', 'float'])\n", (10...
from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from fastapi.responses import ORJSONResponse from .resources import shutdown, startup from .routers import projects routers = [ projects.router, ] origins = [ "http://localhost:8080", ] def create_app() -> FastAPI: app = Fa...
[ "fastapi.FastAPI" ]
[((318, 364), 'fastapi.FastAPI', 'FastAPI', ([], {'default_response_class': 'ORJSONResponse'}), '(default_response_class=ORJSONResponse)\n', (325, 364), False, 'from fastapi import FastAPI\n')]
import os import wandb from wandb import env def sagemaker_auth(overrides=None, path=".", api_key=None): """Write a secrets.env file with the W&B ApiKey and any additional secrets passed. Arguments: overrides (dict, optional): Additional environment variables to write ...
[ "wandb.setup", "os.path.join", "wandb.wandb_lib.apikey.api_key" ]
[((475, 524), 'wandb.wandb_lib.apikey.api_key', 'wandb.wandb_lib.apikey.api_key', ([], {'settings': 'settings'}), '(settings=settings)\n', (505, 524), False, 'import wandb\n'), ((430, 443), 'wandb.setup', 'wandb.setup', ([], {}), '()\n', (441, 443), False, 'import wandb\n'), ((850, 883), 'os.path.join', 'os.path.join',...
import os from setuptools import setup TEST_DEPENDENCIES = [ "black==19.10b0", "flake8==3.7.9", "pytest==5.4.1", "pytest-cov==2.8.1", ] with open(os.path.join(os.path.abspath(os.path.dirname(__file__)), "README.md"), encoding="utf-8") as f: LONG_DESCRIPTION = f.read() setup( name="pytojsonsch...
[ "os.path.dirname", "setuptools.setup" ]
[((292, 940), 'setuptools.setup', 'setup', ([], {'name': '"""pytojsonschema"""', 'description': '"""A package to convert Python type annotations into JSON schemas"""', 'long_description': 'LONG_DESCRIPTION', 'long_description_content_type': '"""text/markdown"""', 'version': '"""1.11.1"""', 'author': '"""Osirium"""', 'a...
#demonstration program #a list of stations within 10 km of the Cambridge city centre (coordinate (52.2053, 0.1218)) #print the names of the stations, listed in alphabetical order from floodsystem.stationdata import build_station_list from floodsystem.geo import stations_within_radius def run(): stations = build_...
[ "floodsystem.stationdata.build_station_list", "floodsystem.geo.stations_within_radius" ]
[((314, 334), 'floodsystem.stationdata.build_station_list', 'build_station_list', ([], {}), '()\n', (332, 334), False, 'from floodsystem.stationdata import build_station_list\n'), ((346, 401), 'floodsystem.geo.stations_within_radius', 'stations_within_radius', (['stations', '(52.2053, 0.1218)', '(10)'], {}), '(stations...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ multiple labels classifier """ import nltk from nltk.stem import WordNetLemmatizer import zipfile import pandas as pd import numpy as np import pickle from collections import Counter import gzip import random import sklearn from wordcloud import WordCloud import matpl...
[ "sklearn.feature_extraction.text.TfidfTransformer", "gzip.open", "matplotlib.pyplot.ylabel", "nltk.classify.scikitlearn.SklearnClassifier", "numpy.array", "numpy.mean", "matplotlib.pyplot.xlabel", "pandas.DataFrame", "random.shuffle", "sklearn.metrics.precision_recall_fscore_support", "pickle.lo...
[((8474, 8490), 'random.seed', 'random.seed', (['(777)'], {}), '(777)\n', (8485, 8490), False, 'import random\n'), ((8495, 8515), 'random.shuffle', 'random.shuffle', (['sets'], {}), '(sets)\n', (8509, 8515), False, 'import random\n'), ((10193, 10248), 'numpy.mean', 'np.mean', (['[(tag in genreslist[id]) for id in genre...
from setuptools import setup setup(name='gesture', version='0.1', description='Learning to gesture', url='https://github.com/ErikEkstedt/Project.git', author='Erik', author_email='<EMAIL>', license='MIT', packages=['gesture'], zip_safe=False)
[ "setuptools.setup" ]
[((30, 257), 'setuptools.setup', 'setup', ([], {'name': '"""gesture"""', 'version': '"""0.1"""', 'description': '"""Learning to gesture"""', 'url': '"""https://github.com/ErikEkstedt/Project.git"""', 'author': '"""Erik"""', 'author_email': '"""<EMAIL>"""', 'license': '"""MIT"""', 'packages': "['gesture']", 'zip_safe': ...
import graphene from graphene_django import DjangoObjectType from cinemanio.api.helpers import global_id from cinemanio.api.utils import DjangoObjectTypeMixin from cinemanio.core.models import Genre, Language, Country, Role from cinemanio.core.utils.languages import translated_fields PROPERTY_FIELDS = ('id',) + trans...
[ "cinemanio.core.utils.languages.translated_fields", "graphene.List", "cinemanio.core.models.Genre.objects.all", "cinemanio.core.models.Genre", "cinemanio.core.models.Country", "cinemanio.core.models.Language.objects.all", "cinemanio.core.models.Role.objects.all", "cinemanio.core.models.Role", "cinem...
[((315, 340), 'cinemanio.core.utils.languages.translated_fields', 'translated_fields', (['"""name"""'], {}), "('name')\n", (332, 340), False, 'from cinemanio.core.utils.languages import translated_fields\n'), ((1185, 1208), 'graphene.List', 'graphene.List', (['RoleNode'], {}), '(RoleNode)\n', (1198, 1208), False, 'impo...
import cv2 import random import numpy as np import os #import redis #from getfile import get_image_size,get_stride,get_image_path,get_image_bs import argparse #path=get_image_path() #stride=get_stride() #image_size=get_image_size() #batch_size=get_image_bs() def parse_args(): parser=argparse.ArgumentParser(descript...
[ "numpy.asarray", "numpy.zeros", "cv2.imread", "argparse.ArgumentParser" ]
[((288, 336), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""inference"""'}), "(description='inference')\n", (311, 336), False, 'import argparse\n'), ((1298, 1314), 'cv2.imread', 'cv2.imread', (['path'], {}), '(path)\n', (1308, 1314), False, 'import cv2\n'), ((1459, 1510), 'numpy.zeros',...
import requests import string import time from bs4 import BeautifulSoup from datetime import date def main(): five_letter_words = [] start_time = time.time() # There are 106 pages at the time of run for page_idx in range(1, 107): response = requests.get("https://www.kbbi.co.id/daftar-kata?pa...
[ "bs4.BeautifulSoup", "datetime.date.today", "time.time" ]
[((157, 168), 'time.time', 'time.time', ([], {}), '()\n', (166, 168), False, 'import time\n'), ((425, 468), 'bs4.BeautifulSoup', 'BeautifulSoup', (['response.text', '"""html.parser"""'], {}), "(response.text, 'html.parser')\n", (438, 468), False, 'from bs4 import BeautifulSoup\n'), ((1170, 1182), 'datetime.date.today',...
""" Defines the BDFCard class that is passed into the various Nastran cards. """ from __future__ import (nested_scopes, generators, division, absolute_import, print_function, unicode_literals) from typing import List, Union, Optional from pyNastran.bdf.field_writer import print_card from pyNastr...
[ "pyNastran.bdf.field_writer.print_card", "pyNastran.bdf.field_writer_16.print_field_16" ]
[((2433, 2486), 'pyNastran.bdf.field_writer.print_card', 'print_card', (['self.card'], {'size': 'size', 'is_double': 'is_double'}), '(self.card, size=size, is_double=is_double)\n', (2443, 2486), False, 'from pyNastran.bdf.field_writer import print_card\n'), ((1258, 1279), 'pyNastran.bdf.field_writer_16.print_field_16',...
import os import requests from dotenv import load_dotenv load_dotenv() BLING_SECRET_KEY = os.getenv("BLING_API_KEY") def list_contacts(page=1): url = f'https://bling.com.br/Api/v2/contatos/page={page}/json/' payload = {'apikey': BLING_SECRET_KEY} if page == 'all': page = 1 all_contacts...
[ "requests.get", "os.getenv", "dotenv.load_dotenv" ]
[((59, 72), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (70, 72), False, 'from dotenv import load_dotenv\n'), ((93, 119), 'os.getenv', 'os.getenv', (['"""BLING_API_KEY"""'], {}), "('BLING_API_KEY')\n", (102, 119), False, 'import os\n'), ((815, 848), 'requests.get', 'requests.get', (['url'], {'params': 'paylo...
"""Defines `TraderAccount` and supporting classes.""" __copyright__ = 'Copyright © 2019, <NAME>, <NAME>, and <NAME>' __license__ = 'MIT' import collections import typing import dispatch # Local package imports duplicated at end of file to resolve circular dependencies if typing.TYPE_CHECKING: from model.stock...
[ "collections.defaultdict" ]
[((5815, 5845), 'collections.defaultdict', 'collections.defaultdict', (['float'], {}), '(float)\n', (5838, 5845), False, 'import collections\n')]
from dataviva.api.hedu.models import Ybu, Ybc_hedu, Yu, Yuc, Yc_hedu, Ybuc from dataviva.api.attrs.models import University as uni, Course_hedu, Bra from dataviva import db from sqlalchemy.sql.expression import func, desc, not_ class University: def __init__(self, university_id): self._hedu = None ...
[ "dataviva.api.hedu.models.Yuc.query.filter", "dataviva.api.hedu.models.Yu.query.filter", "dataviva.api.hedu.models.Ybc_hedu.query.join", "dataviva.api.hedu.models.Ybuc.query.filter", "dataviva.api.hedu.models.Ybc_hedu.bra_id.like", "dataviva.api.hedu.models.Ybu.query.join", "dataviva.api.hedu.models.Ybc...
[((628, 675), 'dataviva.api.hedu.models.Yu.query.filter', 'Yu.query.filter', (['(Yu.year == self.max_year_query)'], {}), '(Yu.year == self.max_year_query)\n', (643, 675), False, 'from dataviva.api.hedu.models import Ybu, Ybc_hedu, Yu, Yuc, Yc_hedu, Ybuc\n'), ((846, 938), 'dataviva.api.hedu.models.Yu.query.filter', 'Yu....
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com <EMAIL> from json import loads, dumps import hashlib import pylibmc from thumbor.storages i...
[ "thumbor.storages.BaseStorage.__init__", "json.loads", "json.dumps", "pylibmc.Client", "hashlib.sha1" ]
[((488, 523), 'thumbor.storages.BaseStorage.__init__', 'BaseStorage.__init__', (['self', 'context'], {}), '(self, context)\n', (508, 523), False, 'from thumbor.storages import BaseStorage\n'), ((548, 692), 'pylibmc.Client', 'pylibmc.Client', (['self.context.config.MEMCACHE_STORAGE_SERVERS'], {'binary': '(True)', 'behav...
import operator, msgpack, nltk, math, sys, os from nltk.corpus import stopwords from datetime import datetime from tqdm import tqdm from argparse import ArgumentParser import numpy as np import dateutil.parser from utils import settings, liwc_keys, lsm_keys, open_for_write, DEFAULT_TIMEZONE from normalizer import e...
[ "utils.liwc_keys.index", "os.listdir", "nltk.corpus.stopwords.words", "argparse.ArgumentParser", "nltk.word_tokenize", "numpy.average", "msgpack.packb", "tqdm.tqdm", "utils.DEFAULT_TIMEZONE.localize", "numpy.array", "sys.exit", "normalizer.expand_text", "utils.open_for_write", "mention_gra...
[((2098, 2124), 'nltk.corpus.stopwords.words', 'stopwords.words', (['"""english"""'], {}), "('english')\n", (2113, 2124), False, 'from nltk.corpus import stopwords\n'), ((3155, 3171), 'argparse.ArgumentParser', 'ArgumentParser', ([], {}), '()\n', (3169, 3171), False, 'from argparse import ArgumentParser\n'), ((5860, 58...
from typing import Optional from common.connect.redis import get_redis from common.enums.entity import Entity from common.enums.failure_bucket import FailureBucket from common.store.scope import AssetScope from oozer.common.job_scope import JobScope failure_bucket_count_map = { # this is the only one that is real...
[ "common.connect.redis.get_redis" ]
[((827, 838), 'common.connect.redis.get_redis', 'get_redis', ([], {}), '()\n', (836, 838), False, 'from common.connect.redis import get_redis\n')]
import json import logging import os import urllib import requests from lxml import etree alma_api_base_url = 'https://api-eu.hosted.exlibrisgroup.com/almaws/v1/' def get_item(mms_id, item_id, holding_id='ALL'): api_key = os.environ['ALMA_SCRIPT_API_KEY'] url = '{}bibs/{}/holdings/{}/items/{}?apikey={}'.for...
[ "requests.post", "json.dumps", "logging.warning", "requests.get", "lxml.etree.fromstring", "logging.info", "urllib.parse.quote_plus" ]
[((391, 452), 'requests.get', 'requests.get', ([], {'url': 'url', 'headers': "{'Accept': 'application/json'}"}), "(url=url, headers={'Accept': 'application/json'})\n", (403, 452), False, 'import requests\n'), ((1076, 1137), 'requests.get', 'requests.get', ([], {'url': 'url', 'headers': "{'Accept': 'application/json'}"}...
"""codeonproject URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/4.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class...
[ "django.urls.include", "django.conf.urls.static.static", "django.urls.path", "django_registration.backends.one_step.views.RegistrationView.as_view" ]
[((1381, 1442), 'django.conf.urls.static.static', 'static', (['settings.MEDIA_URL'], {'document_root': 'settings.MEDIA_ROOT'}), '(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)\n', (1387, 1442), False, 'from django.conf.urls.static import static\n'), ((1458, 1521), 'django.conf.urls.static.static', 'static', ([...
from urllib.request import urlopen from bs4 import BeautifulSoup import re class Scraper(): Newlines = re.compile(r'[\r\n]\s+') def __init__(self): pass def scrape_url_text_content(self,url): return self.__get_page_text_content(url) def __get_page_text_content(self,u...
[ "bs4.BeautifulSoup", "urllib.request.urlopen", "re.compile" ]
[((109, 135), 're.compile', 're.compile', (['"""[\\\\r\\\\n]\\\\s+"""'], {}), "('[\\\\r\\\\n]\\\\s+')\n", (119, 135), False, 'import re\n'), ((457, 491), 'bs4.BeautifulSoup', 'BeautifulSoup', (['data', '"""html.parser"""'], {}), "(data, 'html.parser')\n", (470, 491), False, 'from bs4 import BeautifulSoup\n'), ((380, 39...
import pickle import operator import numpy as np import csv import os.path with open ('y_test', 'rb') as f: y_test=pickle.load(f) dicvocab={} f=open("data/vocab.csv") vocab=csv.reader(f) for word in vocab: if word[0]!='': dicvocab[int(word[0])-1]=word[1] f.close() label_size=y_test.shape[1] topics=["/A...
[ "pickle.load", "csv.reader", "numpy.argmax" ]
[((176, 189), 'csv.reader', 'csv.reader', (['f'], {}), '(f)\n', (186, 189), False, 'import csv\n'), ((760, 785), 'numpy.argmax', 'np.argmax', (['y_test'], {'axis': '(1)'}), '(y_test, axis=1)\n', (769, 785), True, 'import numpy as np\n'), ((117, 131), 'pickle.load', 'pickle.load', (['f'], {}), '(f)\n', (128, 131), False...
########################################## # AI # 2019-12-26 14:08:16 # class hl_dtoken_converter: # Translate programmer friendly dtokens into hardware-level dtokens # RF(WE) -> RF(LWE, HWE) # IMMED(0xFF) -> JUMP(0xFF,0), BUS(IMMED) # # class *_translator: # do translate work # when hl_dtoken_co...
[ "random.choices", "copy.deepcopy" ]
[((6920, 6964), 'random.choices', 'random.choices', (['string.ascii_uppercase'], {'k': '(10)'}), '(string.ascii_uppercase, k=10)\n', (6934, 6964), False, 'import random\n'), ((6701, 6744), 'copy.deepcopy', 'copy.deepcopy', (['self.hl_microinstructions[i]'], {}), '(self.hl_microinstructions[i])\n', (6714, 6744), False, ...
from Bio import pairwise2 from Bio.pairwise2 import format_alignment seqA="ACTACTAGATTACTTACGGATCAGGTACTTTAGAGGCTTGCAACCA" seqB="TACTCACGGATGAGGTACTTTAGAGGC" for a in pairwise2.align.localxx(seqA, seqB): print(format_alignment(*a, full_sequences=True)) for a in pairwise2.align.globalxx(seqA, seqB): print(form...
[ "Bio.pairwise2.format_alignment", "Bio.pairwise2.align.localxx", "Bio.pairwise2.align.globalxx" ]
[((170, 205), 'Bio.pairwise2.align.localxx', 'pairwise2.align.localxx', (['seqA', 'seqB'], {}), '(seqA, seqB)\n', (193, 205), False, 'from Bio import pairwise2\n'), ((270, 306), 'Bio.pairwise2.align.globalxx', 'pairwise2.align.globalxx', (['seqA', 'seqB'], {}), '(seqA, seqB)\n', (294, 306), False, 'from Bio import pair...
import timeit from collections import deque MAX_TURNS = 300000 def get_input(file): with open(file, 'rt', encoding='utf8') as f: return f.read().strip() def rindex(lst, value): # https://stackoverflow.com/a/63834895/1392152 lst.reverse() i = lst.index(value) lst.reverse() return len(l...
[ "timeit.default_timer", "collections.deque" ]
[((717, 731), 'collections.deque', 'deque', (['numbers'], {}), '(numbers)\n', (722, 731), False, 'from collections import deque\n'), ((750, 772), 'timeit.default_timer', 'timeit.default_timer', ([], {}), '()\n', (770, 772), False, 'import timeit\n'), ((1151, 1173), 'timeit.default_timer', 'timeit.default_timer', ([], {...
import logging from lobster import fs from lobster.core.command import Command from lobster.core.unit import UnitStore logger = logging.getLogger('lobster.validate') class Validate(Command): @property def help(self): return 'validate task output and remove output files for failed tasks' def s...
[ "logging.getLogger", "lobster.core.unit.UnitStore", "lobster.fs.ls", "lobster.fs.remove" ]
[((131, 168), 'logging.getLogger', 'logging.getLogger', (['"""lobster.validate"""'], {}), "('lobster.validate')\n", (148, 168), False, 'import logging\n'), ((3979, 4001), 'lobster.core.unit.UnitStore', 'UnitStore', (['args.config'], {}), '(args.config)\n', (3988, 4001), False, 'from lobster.core.unit import UnitStore\n...
from __future__ import print_function, unicode_literals, absolute_import, division from six.moves import range, zip, map, reduce, filter import numpy as np import warnings from zipfile import ZipFile, ZIP_DEFLATED from scipy.ndimage.morphology import distance_transform_edt, binary_fill_holes from scipy.ndimage.measure...
[ "numpy.sqrt", "numpy.argsort", "numpy.sin", "numpy.arange", "numpy.isscalar", "numpy.zeros_like", "numpy.asarray", "numpy.max", "numpy.stack", "numpy.linspace", "numpy.empty", "scipy.ndimage.measurements.find_objects", "warnings.warn", "six.moves.map", "six.moves.zip", "gputools.OCLPro...
[((2365, 2418), 'gputools.OCLArray.empty', 'OCLArray.empty', (['(a.shape + (n_rays,))'], {'dtype': 'np.float32'}), '(a.shape + (n_rays,), dtype=np.float32)\n', (2379, 2418), False, 'from gputools import OCLProgram, OCLArray, OCLImage\n'), ((2431, 2506), 'gputools.OCLProgram', 'OCLProgram', ([], {'src_str': '_ocl_kernel...
# from __future__ import annotations from typing import TYPE_CHECKING import tkinter from tkinter import ttk if TYPE_CHECKING: from pyted.pyted_code.pyted_core import PytedCore class PytedWindow: """The toolbox panel""" def __init__(self, root, pyte_code: PytedCore): self.pyte_code = pyte_code ...
[ "tkinter.Menu", "tkinter.ttk.Style", "tkinter.ttk.Frame", "tkinter.ttk.Label", "tkinter.ttk.Scrollbar", "tkinter.Canvas", "tkinter.ttk.Notebook", "tkinter.ttk.Treeview", "tkinter.ttk.Sizegrip" ]
[((676, 698), 'tkinter.Menu', 'tkinter.Menu', (['self.win'], {}), '(self.win)\n', (688, 698), False, 'import tkinter\n'), ((719, 753), 'tkinter.Menu', 'tkinter.Menu', (['self.menu'], {'tearoff': '(0)'}), '(self.menu, tearoff=0)\n', (731, 753), False, 'import tkinter\n'), ((1838, 1857), 'tkinter.ttk.Frame', 'ttk.Frame',...
from flask import Flask,render_template,request,jsonify,url_for import server.util app = Flask(__name__,template_folder='client/templates',static_folder='client/static') @app.route('/') def index(): return render_template('index.html') @app.route('/predict',methods=['POST','GET']) def predict(): if request.met...
[ "flask.render_template", "flask.Flask" ]
[((90, 177), 'flask.Flask', 'Flask', (['__name__'], {'template_folder': '"""client/templates"""', 'static_folder': '"""client/static"""'}), "(__name__, template_folder='client/templates', static_folder=\n 'client/static')\n", (95, 177), False, 'from flask import Flask, render_template, request, jsonify, url_for\n'),...
from math import floor GRID = 10 TICK_SEC = 20 TICK = 1 / TICK_SEC GAME_TICKS = TICK_SEC * 60 TTL = TICK_SEC * 4 HSPEED = 6.5 VSPEED = 18 GRAVITY = 0.8 DRAG = 0.35 HVEL = HSPEED * (pow(DRAG, 4) + pow(DRAG, 3) + pow(DRAG, 2) + DRAG + 1) class Actor(object): "Character" def __init__(self, x, y): # Posi...
[ "math.floor" ]
[((1638, 1665), 'math.floor', 'floor', (['(self.time / TICK_SEC)'], {}), '(self.time / TICK_SEC)\n', (1643, 1665), False, 'from math import floor\n')]
from json import dumps from .utils import debug_coro from aiohttp import ClientSession from ..logger import get_logger logger = get_logger("LPBv2.Caller") class Caller: def __init__(self): self.headers = { "Content-Type": "application/json", "Accept": "application/json", }...
[ "aiohttp.ClientSession" ]
[((404, 439), 'aiohttp.ClientSession', 'ClientSession', ([], {'headers': 'self.headers'}), '(headers=self.headers)\n', (417, 439), False, 'from aiohttp import ClientSession\n'), ((745, 780), 'aiohttp.ClientSession', 'ClientSession', ([], {'headers': 'self.headers'}), '(headers=self.headers)\n', (758, 780), False, 'from...
''' Provides access to the synapse link protocols. ''' import synapse.common as s_common import synapse.lib.urlhelp as s_urlhelp import synapse.links.ssl as s_ssl import synapse.links.tcp as s_tcp import synapse.links.local as s_local protos = { 'tcp': s_tcp.TcpRelay, 'ssl': s_ssl.SslRelay, 'local': s_lo...
[ "synapse.lib.urlhelp.chopurl", "synapse.common.NoSuchProto" ]
[((1092, 1114), 'synapse.lib.urlhelp.chopurl', 's_urlhelp.chopurl', (['url'], {}), '(url)\n', (1109, 1114), True, 'import synapse.lib.urlhelp as s_urlhelp\n'), ((774, 801), 'synapse.common.NoSuchProto', 's_common.NoSuchProto', (['proto'], {}), '(proto)\n', (794, 801), True, 'import synapse.common as s_common\n')]
"""Classes wrapping :class:`~boto3.resources.base.ServiceResource` objects. The methods and arguments on these classes somtimes differ in name from those in Boto3's Resources to make them easier to understand in this context.. Glossary: service_name: The snake_case name of an AWS service (e.g. ``ec2``) ...
[ "logging.getLogger", "boto3.resources.factory.ResourceFactory", "boto3.session.Session", "botocore.xform_name", "jmespath.search" ]
[((1783, 1810), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1800, 1810), False, 'import logging\n'), ((2329, 2358), 'boto3.resources.factory.ResourceFactory', 'ResourceFactory', (['self.emitter'], {}), '(self.emitter)\n', (2344, 2358), False, 'from boto3.resources.factory import Resou...
# Generated by Django 2.2.24 on 2021-12-28 22:41 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('neighbour', '0019_auto_20211229_0009'), ] operations = [ migrations.AlterModelOptions( name='business', options={'ordering'...
[ "django.db.migrations.AlterModelOptions", "django.db.migrations.RenameField" ]
[((230, 306), 'django.db.migrations.AlterModelOptions', 'migrations.AlterModelOptions', ([], {'name': '"""business"""', 'options': "{'ordering': ['-pk']}"}), "(name='business', options={'ordering': ['-pk']})\n", (258, 306), False, 'from django.db import migrations\n'), ((351, 423), 'django.db.migrations.AlterModelOptio...
# # Copyright 2016 Pixar # # Licensed under the Apache License, Version 2.0 (the "Apache License") # with the following modification; you may not use this file except in # compliance with the Apache License and the following modification to it: # Section 6. Trademarks. is deleted and replaced with: # # 6. Trademarks. T...
[ "json.loads", "maya.cmds.ls", "PySide.QtCore.QMimeData", "PySide.QtGui.QCheckBox", "PySide.QtCore.QByteArray", "json.dumps", "maya.cmds.addAttr", "maya.cmds.setAttr", "PySide.QtGui.QPushButton", "PySide.QtGui.QVBoxLayout", "maya.cmds.deleteAttr", "maya.cmds.attributeQuery", "maya.cmds.script...
[((3032, 3097), 'maya.cmds.getAttr', 'cmds.getAttr', (["('%s.%s' % (nodeName, EXPORTED_ATTRS_MAYA_ATTR_NAME))"], {}), "('%s.%s' % (nodeName, EXPORTED_ATTRS_MAYA_ATTR_NAME))\n", (3044, 3097), False, 'from maya import cmds\n'), ((3171, 3193), 'json.loads', 'json.loads', (['jsonString'], {}), '(jsonString)\n', (3181, 3193...
from copy import deepcopy from typing import Any, List, Optional, Union, Tuple, Dict from networkx import set_node_attributes, graph_edit_distance from fedot.core.dag.graph_node import GraphNode from fedot.core.pipelines.convert import graph_structure_as_nx_graph from fedot.core.utilities.data_structures import ensur...
[ "fedot.core.dag.graph_node.GraphNode", "copy.deepcopy", "fedot.core.utilities.data_structures.remove_items", "networkx.set_node_attributes", "fedot.core.pipelines.convert.graph_structure_as_nx_graph", "networkx.graph_edit_distance" ]
[((1317, 1363), 'fedot.core.utilities.data_structures.remove_items', 'remove_items', (['self._graph.nodes', 'subtree_nodes'], {}), '(self._graph.nodes, subtree_nodes)\n', (1329, 1363), False, 'from fedot.core.utilities.data_structures import ensure_wrapped_in_sequence, remove_items\n'), ((2197, 2215), 'copy.deepcopy', ...
import datetime from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric import ec from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey from cryptography.hazmat.backends import default_backend from cryptography import x509 from cryptography.x50...
[ "cryptography.x509.random_serial_number", "datetime.datetime.utcnow", "cryptography.x509.CertificateBuilder", "cryptography.x509.DNSName", "cryptography.hazmat.primitives.serialization.NoEncryption", "cryptography.hazmat.primitives.asymmetric.ec.SECP256R1", "cryptography.hazmat.primitives.hashes.SHA256"...
[((719, 736), 'cryptography.hazmat.backends.default_backend', 'default_backend', ([], {}), '()\n', (734, 736), False, 'from cryptography.hazmat.backends import default_backend\n'), ((744, 758), 'cryptography.hazmat.primitives.asymmetric.ec.SECP256R1', 'ec.SECP256R1', ([], {}), '()\n', (756, 758), False, 'from cryptogra...
#!/usr/bin/env python3 __author__ = '<NAME>' import argparse import pandas as pd import numpy as np from jiwer import wer from crowdkit.aggregation import TextRASA, TextHRRASA from sentence_transformers import SentenceTransformer from transformers import AutoTokenizer, AutoModel import torch from agreement import ...
[ "transformers.AutoModel.from_pretrained", "argparse.FileType", "sentence_transformers.SentenceTransformer", "argparse.ArgumentParser", "pandas.read_csv", "rover.ROVER", "torch.mean", "crowdkit.aggregation.TextHRRASA", "transformers.AutoTokenizer.from_pretrained", "crowdkit.aggregation.TextRASA", ...
[((915, 940), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (938, 940), False, 'import argparse\n'), ((1278, 1353), 'pandas.read_csv', 'pd.read_csv', (['args.gt'], {'sep': '"""\t"""', 'dtype': 'str', 'names': "('audio', 'transcription')"}), "(args.gt, sep='\\t', dtype=str, names=('audio', 'tra...
# -*- coding: utf-8 -*- import unittest from converter import Converter, ConverterRequest, ConverterResponse from datetime import datetime from .rate_providers import RateProviderInterface class TestConverter(unittest.TestCase): def test_constructor_raises_when_invalid_rate_provider_is_given(self): with...
[ "converter.ConverterRequest", "converter.Converter", "converter.ConverterResponse" ]
[((363, 394), 'converter.Converter', 'Converter', (['"""not a RateProvider"""'], {}), "('not a RateProvider')\n", (372, 394), False, 'from converter import Converter, ConverterRequest, ConverterResponse\n'), ((718, 790), 'converter.ConverterRequest', 'ConverterRequest', (['test_case[0]', 'test_case[1]', 'test_case[2]',...
import unittest import traceback from time import perf_counter class CodeKombatTestRunner(object): def __init__(self): pass def run(self, test): r = CodeKombatTestResult() s = perf_counter() print("\n<DESCRIBE::>Tests") try: test(r) finally: pass ...
[ "traceback.format_exception_only", "traceback.format_tb", "time.perf_counter" ]
[((201, 215), 'time.perf_counter', 'perf_counter', ([], {}), '()\n', (213, 215), False, 'from time import perf_counter\n'), ((690, 704), 'time.perf_counter', 'perf_counter', ([], {}), '()\n', (702, 704), False, 'from time import perf_counter\n'), ((1910, 1947), 'traceback.format_tb', 'traceback.format_tb', (['tb'], {'l...
"""Tests for boolean_inputs_factory method.""" import unittest from tt.definitions import boolean_variables_factory class TestBooleanInputsFactory(unittest.TestCase): def test_str_methods(self): """Test converting to string via __str__ and __repr__.""" factory = boolean_variables_factory(['A', ...
[ "tt.definitions.boolean_variables_factory" ]
[((288, 335), 'tt.definitions.boolean_variables_factory', 'boolean_variables_factory', (["['A', 'B', 'C', 'D']"], {}), "(['A', 'B', 'C', 'D'])\n", (313, 335), False, 'from tt.definitions import boolean_variables_factory\n'), ((646, 694), 'tt.definitions.boolean_variables_factory', 'boolean_variables_factory', (["['op1'...
''' Module that allows to load all the actors and sensors :author: <NAME> ''' import os from GarageDeamon.Common import SensorBase, ActorBase import operator class MainLoader(object): def __init__(self, base='GarageDeamon.Sensors', base_class=SensorBase): self.base = base self.baseClass = base_...
[ "os.path.abspath", "operator.itemgetter", "os.walk" ]
[((2485, 2503), 'os.walk', 'os.walk', (['full_path'], {}), '(full_path)\n', (2492, 2503), False, 'import os\n'), ((1557, 1579), 'operator.itemgetter', 'operator.itemgetter', (['(1)'], {}), '(1)\n', (1576, 1579), False, 'import operator\n'), ((2277, 2302), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__fi...
import boto3 import json def lambda_handler(event, context): dynamodb = boto3.resource('dynamodb') table = dynamodb.Table('BusinessContacts') n = event["Name"] table.update_item( Key={ "EmailAddress": event["EmailAddress"] }, UpdateExpression="SET Address = :val1, Co...
[ "boto3.resource", "json.dumps" ]
[((77, 103), 'boto3.resource', 'boto3.resource', (['"""dynamodb"""'], {}), "('dynamodb')\n", (91, 103), False, 'import boto3\n'), ((728, 768), 'json.dumps', 'json.dumps', (['"""Item successfully updated!"""'], {}), "('Item successfully updated!')\n", (738, 768), False, 'import json\n')]
from adafruit_ble import BLERadio from adafruit_ble.advertising.standard import ProvideServicesAdvertisement from adafruit_ble.services.standard.hid import HIDService from kmk.hid import AbstractHID BLE_APPEARANCE_HID_KEYBOARD = 961 # Hardcoded in CPy MAX_CONNECTIONS = 2 class BLEHID(AbstractHID): def post_init(...
[ "adafruit_ble.advertising.standard.ProvideServicesAdvertisement", "adafruit_ble.BLERadio", "_bleio.adapter.erase_bonding", "adafruit_ble.services.standard.hid.HIDService" ]
[((408, 418), 'adafruit_ble.BLERadio', 'BLERadio', ([], {}), '()\n', (416, 418), False, 'from adafruit_ble import BLERadio\n'), ((471, 483), 'adafruit_ble.services.standard.hid.HIDService', 'HIDService', ([], {}), '()\n', (481, 483), False, 'from adafruit_ble.services.standard.hid import HIDService\n'), ((2796, 2826), ...
#Copyright (c) 2013 Cluster Studio S.C. #------------------------------------------------------- #:author: <NAME> #:organization: Cluster Studio S.C. #:contact: <EMAIL> import sh import logging import traceback from flask import Flask, request, json from logging import Formatter from logging.handlers import SMTPHandl...
[ "traceback.format_exc", "logging.handlers.SMTPHandler", "flask.Flask", "logging.Formatter", "sh.git.bake", "logging.handlers.RotatingFileHandler", "shotgun_api3.shotgun.Shotgun", "flask.request.form.get", "flask.json.loads" ]
[((514, 559), 'shotgun_api3.shotgun.Shotgun', 'Shotgun', (['SERVER_PATH', 'SCRIPT_USER', 'SCRIPT_KEY'], {}), '(SERVER_PATH, SCRIPT_USER, SCRIPT_KEY)\n', (521, 559), False, 'from shotgun_api3.shotgun import Shotgun\n'), ((567, 582), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (572, 582), False, 'from fla...
#imports import pyautogui import time import keyboard ################################################################ #vars IsPressed = False sleep = time.sleep ################################################################ #configs print("Made By Cody666#5618, v1.0.3") print("Enter Amount Of Clicks:") k...
[ "keyboard.is_pressed", "pyautogui.click" ]
[((815, 843), 'keyboard.is_pressed', 'keyboard.is_pressed', (['keyhold'], {}), '(keyhold)\n', (834, 843), False, 'import keyboard\n'), ((931, 959), 'keyboard.is_pressed', 'keyboard.is_pressed', (['keyhold'], {}), '(keyhold)\n', (950, 959), False, 'import keyboard\n'), ((1049, 1081), 'pyautogui.click', 'pyautogui.click'...
import qiskit def cuccaro_adder(c, cin, a, b, cout): def _maj(reg): c.cx(reg[2], reg[1]) c.cx(reg[2], reg[0]) c.ccx(reg[0], reg[1], reg[2]) def _uma_parallel(reg): c.x(reg[1]) c.cx(reg[0], reg[1]) c.toffoli(reg[0], reg[1], reg[2]) c.x(reg[1]) ...
[ "qiskit.circuit.QuantumCircuit" ]
[((844, 876), 'qiskit.circuit.QuantumCircuit', 'qiskit.circuit.QuantumCircuit', (['n'], {}), '(n)\n', (873, 876), False, 'import qiskit\n')]
# Licensed under a 3-clause BSD style license - see LICENSE.rst import logging import numpy as np from astropy import units as u from astropy.coordinates import Angle from astropy.io import fits from astropy.table import Table from gammapy.maps import MapAxis, MapAxes from gammapy.utils.array import array_stats_str fro...
[ "logging.getLogger", "matplotlib.pyplot.ylabel", "numpy.nanmin", "astropy.coordinates.Angle", "numpy.where", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "gammapy.utils.scripts.make_path", "numpy.linspace", "numpy.nanmax", "gammapy.utils.gauss.Gauss2DPDF", "matplotlib.pyplot.ylim", ...
[((516, 543), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (533, 543), False, 'import logging\n'), ((2150, 2162), 'astropy.coordinates.Angle', 'Angle', (['width'], {}), '(width)\n', (2155, 2162), False, 'from astropy.coordinates import Angle\n'), ((2177, 2187), 'astropy.coordinates.Angl...
# Generated by Django 2.2.8 on 2022-02-28 20:52 import django.core.validators from django.db import migrations, models import hknweb.alumni.models class Migration(migrations.Migration): dependencies = [ ('alumni', '0001_squashed_0016_auto_20190219_0832'), ] operations = [ migrations.Alt...
[ "django.db.models.AutoField" ]
[((701, 794), '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", (717, 794), False, 'from django.db import migrations, models\...
# Generated by Django 2.2.3 on 2019-07-29 01:22 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('polls', '0006_auto_20190729_0057'), ] operations = [ migrations.DeleteModel( name='Bar', ), migrations.DeleteModel( ...
[ "django.db.migrations.DeleteModel" ]
[((225, 259), 'django.db.migrations.DeleteModel', 'migrations.DeleteModel', ([], {'name': '"""Bar"""'}), "(name='Bar')\n", (247, 259), False, 'from django.db import migrations\n'), ((292, 327), 'django.db.migrations.DeleteModel', 'migrations.DeleteModel', ([], {'name': '"""Fooo"""'}), "(name='Fooo')\n", (314, 327), Fal...
from setuptools import setup from sapversion import version setup( name = 'sapling', version = version(), author = '<NAME>', author_email = '<EMAIL>', description = 'A git porcelain to manage bidirectional subtree syncing with foreign git ' 'repositories', license = 'Apache ...
[ "sapversion.version" ]
[((105, 114), 'sapversion.version', 'version', ([], {}), '()\n', (112, 114), False, 'from sapversion import version\n')]
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """A continuous builder which runs recipe tests.""" from recipe_engine.recipe_api import Property DEPS = [ 'depot_tools/bot_update', 'depot_tools/gclien...
[ "recipe_engine.recipe_api.Property" ]
[((573, 658), 'recipe_engine.recipe_api.Property', 'Property', ([], {'default': '"""build"""', 'kind': 'str', 'help': '"""luci-config project to run tests for"""'}), "(default='build', kind=str, help='luci-config project to run tests for'\n )\n", (581, 658), False, 'from recipe_engine.recipe_api import Property\n'),...