code stringlengths 22 1.05M | apis listlengths 1 3.31k | extract_api stringlengths 75 3.25M |
|---|---|---|
# Generated by Django 2.2.6 on 2019-10-15 04:47
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('meet', '0002_auto_20191010_0543'),
]
operations = [
migrations.AlterField(... | [
"django.db.models.ForeignKey",
"django.db.models.DateTimeField"
] | [((407, 537), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'related_name': '"""mailboxes_passive"""', 'to': 'settings.AUTH_USER_MODEL'}), "(on_delete=django.db.models.deletion.CASCADE, related_name\n ='mailboxes_passive', to=settings.AUTH_USER_MODEL)\n",... |
from collections import OrderedDict
import copy
from typing import Dict
from typing import Optional
import optuna
from optuna.distributions import BaseDistribution
from optuna.study import BaseStudy
class IntersectionSearchSpace(object):
"""A class to calculate the intersection search space of a :class:`~optuna.... | [
"copy.deepcopy",
"copy.copy"
] | [((3491, 3518), 'copy.deepcopy', 'copy.deepcopy', (['search_space'], {}), '(search_space)\n', (3504, 3518), False, 'import copy\n'), ((2781, 2811), 'copy.copy', 'copy.copy', (['trial.distributions'], {}), '(trial.distributions)\n', (2790, 2811), False, 'import copy\n')] |
from flee import flee, SimulationSettings
from datamanager import handle_refugee_data
from datamanager import DataTable #DataTable.subtract_dates()
from flee import InputGeography
import numpy as np
import outputanalysis.analysis as a
import sys
import visualization.vis
from datetime import datetime
from datetime impor... | [
"outputanalysis.analysis.abs_error",
"flee.flee.Ecosystem",
"flee.InputGeography.InputGeography",
"numpy.sum",
"datamanager.handle_refugee_data.RefugeeTable",
"datamanager.DataTable.subtract_dates",
"datetime.datetime",
"datetime.timedelta",
"outputanalysis.analysis.rel_error",
"flee.flee.Simulati... | [((614, 658), 'datamanager.DataTable.subtract_dates', 'DataTable.subtract_dates', (['date', '"""2013-12-01"""'], {}), "(date, '2013-12-01')\n", (638, 658), False, 'from datamanager import DataTable\n'), ((1104, 1120), 'flee.flee.Ecosystem', 'flee.Ecosystem', ([], {}), '()\n', (1118, 1120), False, 'from flee import flee... |
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import matplotlib.patches as mpatches
#importing dataset and converting to datasframe
data = pd.read_csv('heart.csv', header=None)
df = pd.DataFrame(data) #data frame
y = df.iloc[:, 13]
y = y-1
def chol_age():
x = df.iloc[:, 0:5]
x = x.drop(x.... | [
"matplotlib.pyplot.title",
"pandas.DataFrame",
"matplotlib.pyplot.show",
"matplotlib.pyplot.plot",
"matplotlib.patches.Rectangle",
"pandas.read_csv",
"matplotlib.pyplot.scatter",
"matplotlib.pyplot.bar",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.pie",
"matplotlib.pyplot.ylabel",
"matplotl... | [((165, 202), 'pandas.read_csv', 'pd.read_csv', (['"""heart.csv"""'], {'header': 'None'}), "('heart.csv', header=None)\n", (176, 202), True, 'import pandas as pd\n'), ((209, 227), 'pandas.DataFrame', 'pd.DataFrame', (['data'], {}), '(data)\n', (221, 227), True, 'import pandas as pd\n'), ((2018, 2028), 'matplotlib.pyplo... |
from misc import dp, bot
from features.mainFunctions import \
createQR, uploadInputFileToTelegram,\
escapeMarkdown #
from aiogram.types import \
InlineQuery, inline_keyboard, \
InlineQueryResultPhoto, ChosenInlineResult, \
InputMediaPhoto #
from aiogram.utils import markdown
from os import remove
from time im... | [
"misc.bot.edit_message_reply_markup",
"features.mainFunctions.createQR",
"os.remove",
"misc.bot.answer_inline_query",
"aiogram.utils.markdown.italic",
"aiogram.types.inline_keyboard.InlineKeyboardButton",
"aiogram.types.InputMediaPhoto",
"time.time",
"features.mainFunctions.uploadInputFileToTelegram... | [((344, 385), 'misc.dp.inline_handler', 'dp.inline_handler', ([], {'regexp': '"""(?i)^qr\\\\b.+$"""'}), "(regexp='(?i)^qr\\\\b.+$')\n", (361, 385), False, 'from misc import dp, bot\n'), ((458, 535), 'aiogram.types.inline_keyboard.InlineKeyboardButton', 'inline_keyboard.InlineKeyboardButton', (['"""Ожидайте..."""'], {'c... |
from __future__ import annotations
from collections import defaultdict
from collections.abc import Callable, Iterable, Iterator, Mapping, MutableMapping
from itertools import chain
from typing import Generic, TypeVar
from zict.common import KT, VT, ZictBase, close, flush
MKT = TypeVar("MKT")
class Sieve(ZictBase[K... | [
"collections.defaultdict",
"typing.TypeVar"
] | [((281, 295), 'typing.TypeVar', 'TypeVar', (['"""MKT"""'], {}), "('MKT')\n", (288, 295), False, 'from typing import Generic, TypeVar\n'), ((2345, 2362), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (2356, 2362), False, 'from collections import defaultdict\n')] |
import models.tscBaseItem as tscBaseItem
import logging
# setup logger for module
_log = logging.getLogger(__name__)
class TSC_Item(tscBaseItem.TSC_Base_Item):
__server = tscBaseItem.TSC_Base_Item()
__item = object()
__name = str()
__id = str()
@property
def name(self):
... | [
"models.tscBaseItem.TSC_Base_Item",
"logging.getLogger"
] | [((93, 120), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (110, 120), False, 'import logging\n'), ((181, 208), 'models.tscBaseItem.TSC_Base_Item', 'tscBaseItem.TSC_Base_Item', ([], {}), '()\n', (206, 208), True, 'import models.tscBaseItem as tscBaseItem\n')] |
import requests
session = requests.Session()
if __name__ == '__main__':
pass
| [
"requests.Session"
] | [((27, 45), 'requests.Session', 'requests.Session', ([], {}), '()\n', (43, 45), False, 'import requests\n')] |
import json
import re
import pytest # type: ignore
# from custom_types.alternative_string_types import Kaki, URL
from modules import wanikani
from testing.dict_typing import FullTestDict
from testing.dicts import TEST_DICTS
from utils import convert_dict_str_keys_to_kaki, convert_list_of_str_to_kaki
# For each te... | [
"modules.wanikani.get_api_response",
"modules.wanikani.main",
"modules.wanikani.get_url",
"modules.wanikani.call_api",
"pytest.fixture",
"re.match",
"json.dumps",
"modules.wanikani.build_result_dict",
"utils.convert_dict_str_keys_to_kaki",
"utils.convert_list_of_str_to_kaki"
] | [((359, 415), 'pytest.fixture', 'pytest.fixture', ([], {'params': 'TEST_DICTS', 'ids': "(lambda d: d['id'])"}), "(params=TEST_DICTS, ids=lambda d: d['id'])\n", (373, 415), False, 'import pytest\n'), ((1112, 1159), 'utils.convert_list_of_str_to_kaki', 'convert_list_of_str_to_kaki', (["test_dict['input']"], {}), "(test_d... |
def get_last_version(request):
from Core.models import VersionControl
return {'version': VersionControl.objects.all().last()}
| [
"Core.models.VersionControl.objects.all"
] | [((97, 125), 'Core.models.VersionControl.objects.all', 'VersionControl.objects.all', ([], {}), '()\n', (123, 125), False, 'from Core.models import VersionControl\n')] |
#!/usr/bin/python
# import the necessary packages
import rospy
import speech_recognition as sr
from unidecode import unidecode
# import the necessary msgs. Example with msg type String_Int_Arrays:
from std_msgs.msg import Float32
from std_msgs.msg import String
class voice_recognitor3():
""" Class voice_recogni... | [
"unidecode.unidecode",
"rospy.Subscriber",
"rospy.Publisher",
"speech_recognition.Microphone",
"rospy.on_shutdown",
"rospy.is_shutdown",
"rospy.init_node",
"rospy.spin",
"speech_recognition.Recognizer",
"std_msgs.msg.String"
] | [((666, 726), 'rospy.Subscriber', 'rospy.Subscriber', (['"""recognize_voice3"""', 'Float32', 'self.callback'], {}), "('recognize_voice3', Float32, self.callback)\n", (682, 726), False, 'import rospy\n'), ((786, 835), 'rospy.Publisher', 'rospy.Publisher', (['"""asr_text"""', 'String'], {'queue_size': '(0)'}), "('asr_tex... |
# Copyright 2013 IBM Corp.
# Copyright 2012 OpenStack Foundation
# 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/LIC... | [
"cinder.openstack.common.loopingcall.FixedIntervalLoopingCall",
"cinder.i18n._LW",
"cinder.i18n._LE",
"cinder.volume.volume_types.get_volume_type",
"cinder.exception.InvalidConnectorException",
"cinder.exception.VolumeDriverException",
"cinder.i18n._",
"cinder.volume.drivers.ibm.storwize_svc.helpers.S... | [((2038, 2065), 'cinder.openstack.common.log.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (2055, 2065), True, 'from cinder.openstack.common import log as logging\n'), ((2093, 2204), 'oslo_config.cfg.StrOpt', 'cfg.StrOpt', (['"""storwize_svc_volpool_name"""'], {'default': '"""volpool"""', 'help':... |
import fileinput
import collections
f = fileinput.input()
def build_count(vals):
n = len(vals)
r = [[0 for i in range(n + 1)] for j in range(n + 1)]
r[1][1] = vals[0]
r[1][0] = 1
for i in range(2, n + 1):
r[i][0] = 1
for k in range(1, i + 1):
r[i][k] = r[i - 1][k] + r... | [
"fileinput.input"
] | [((41, 58), 'fileinput.input', 'fileinput.input', ([], {}), '()\n', (56, 58), False, 'import fileinput\n')] |
import os
from zipfile import ZipFile, ZIP_DEFLATED
from shutil import rmtree
from consolemenu import *
from consolemenu.items import *
files_abs_path = []
filenames = []
extracted = []
class Zipper:
@staticmethod
def get_zip_files():
print("FILES:\n")
os.chdir('./')
for item in os.... | [
"os.path.abspath",
"zipfile.ZipFile",
"os.path.isdir",
"os.path.isfile",
"os.chdir",
"shutil.rmtree",
"os.listdir"
] | [((282, 296), 'os.chdir', 'os.chdir', (['"""./"""'], {}), "('./')\n", (290, 296), False, 'import os\n'), ((317, 333), 'os.listdir', 'os.listdir', (['"""./"""'], {}), "('./')\n", (327, 333), False, 'import os\n'), ((900, 925), 'zipfile.ZipFile', 'ZipFile', (['filenames[index]'], {}), '(filenames[index])\n', (907, 925), ... |
import sys
import cx_Oracle
from werkzeug._compat import text_type, to_bytes, to_unicode
DATABASE = 'ORACLE'
NEED_DATABASE_NAME = True
NEED_LOGIN = True
NEED_PASSWORD = True
NEED_ENCODING = False
NEED_HOST = False
NEED_PORT = False
CAN_CHANGE_TYPE = False
CAN_CHANGE_SIZE = False
DDL_ROLLBACK = False
NEED_GENERATOR = T... | [
"werkzeug._compat.to_unicode",
"cx_Oracle.connect"
] | [((951, 1012), 'cx_Oracle.connect', 'cx_Oracle.connect', ([], {'user': 'user', 'password': 'password', 'dsn': 'database'}), '(user=user, password=password, dsn=database)\n', (968, 1012), False, 'import cx_Oracle\n'), ((1047, 1078), 'cx_Oracle.connect', 'cx_Oracle.connect', ([], {'dsn': 'database'}), '(dsn=database)\n',... |
import os
import random
import re
import logging
# PYTHON 2 - py2 - update to ABC direct use rather than __metaclass__ once we drop py2 support
from abc import ABCMeta
from six import string_types
from great_expectations.data_context.store.store_backend import StoreBackend
from great_expectations.data_context.util im... | [
"os.path.isabs",
"boto3.client",
"os.path.dirname",
"boto3.resource",
"google.cloud.storage.Client",
"os.path.normpath",
"re.findall",
"os.path.relpath",
"re.search",
"os.path.split",
"os.path.join",
"logging.getLogger",
"re.compile"
] | [((407, 434), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (424, 434), False, 'import logging\n'), ((8930, 8959), 'os.path.isabs', 'os.path.isabs', (['base_directory'], {}), '(base_directory)\n', (8943, 8959), False, 'import os\n'), ((10021, 10044), 'os.path.split', 'os.path.split', (['... |
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions a... | [
"sys.path.append",
"unittest.main",
"numpy.dtype",
"test_util.get_zero_model_name",
"numpy.random.random",
"numpy.array_equal"
] | [((1545, 1573), 'sys.path.append', 'sys.path.append', (['"""../common"""'], {}), "('../common')\n", (1560, 1573), False, 'import sys\n'), ((6563, 6578), 'unittest.main', 'unittest.main', ([], {}), '()\n', (6576, 6578), False, 'import unittest\n'), ((3541, 3603), 'test_util.get_zero_model_name', 'tu.get_zero_model_name'... |
# coding=utf-8
from __future__ import unicode_literals
import os
import platform
import mock
from decimal import Decimal
import pytest
try:
import setproctitle
except ImportError:
setproctitle = None
from pgcli.main import (
obfuscate_process_password, format_output, PGCli, OutputSettings
)
from utils imp... | [
"mock.patch.object",
"pgcli.main.OutputSettings",
"utils.run",
"os.path.exists",
"setproctitle.setproctitle",
"pgcli.main.obfuscate_process_password",
"pytest.mark.skipif",
"pgcli.main.PGCli",
"setproctitle.getproctitle",
"platform.system",
"pgcli.main.format_output"
] | [((447, 520), 'pytest.mark.skipif', 'pytest.mark.skipif', (['(not setproctitle)'], {'reason': '"""setproctitle not available"""'}), "(not setproctitle, reason='setproctitle not available')\n", (465, 520), False, 'import pytest\n'), ((601, 628), 'setproctitle.getproctitle', 'setproctitle.getproctitle', ([], {}), '()\n',... |
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0
from unittest import TestCase, skipUnless
from commonconf import override_settings
from restclients_core.dao import DAO, MockDAO
from restclients_core.cache import NoCache
from restclients_core.models import MockHTTP, CacheHTTP
from... | [
"commonconf.override_settings",
"restclients_core.models.MockHTTP",
"restclients_core.models.CacheHTTP"
] | [((2450, 2551), 'commonconf.override_settings', 'override_settings', ([], {'RESTCLIENTS_BACKEND_TEST_FOO': '(True)', 'RESTCLIENTS_FOO': '(False)', 'RESTCLIENTS_BAR': '(True)'}), '(RESTCLIENTS_BACKEND_TEST_FOO=True, RESTCLIENTS_FOO=False,\n RESTCLIENTS_BAR=True)\n', (2467, 2551), False, 'from commonconf import overri... |
# This code is part of Qiskit.
#
# (C) Copyright IBM 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | [
"numpy.isreal",
"qiskit.quantum_info.Pauli",
"qiskit.quantum_info.SparsePauliOp.from_operator",
"qiskit.QuantumCircuit"
] | [((10316, 10347), 'qiskit.QuantumCircuit', 'QuantumCircuit', (['self.num_qubits'], {}), '(self.num_qubits)\n', (10330, 10347), False, 'from qiskit import QuantumCircuit\n'), ((11091, 11136), 'qiskit.quantum_info.SparsePauliOp.from_operator', 'SparsePauliOp.from_operator', (['mat_op.primitive'], {}), '(mat_op.primitive)... |
# Generated by Django 2.2.1 on 2020-06-30 06:44
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('webapi', '0030_auto_20200630_1526'),
]
operations = [
migrations.RemoveField(
model_name='datum... | [
"django.db.migrations.RemoveField",
"django.db.models.ForeignKey"
] | [((267, 325), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""datum"""', 'name': '"""process"""'}), "(model_name='datum', name='process')\n", (289, 325), False, 'from django.db import migrations, models\n'), ((468, 566), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'de... |
from json.tool import main
from fastapi import FastAPI
from fastapi.testclient import TestClient
from app.main import app
client = TestClient(app)
def test_read_main():
response = client.get("/plants")
assert response.status_code == 200
assert response.json() == [{"name": "flower"}, {"name": "grass"}] | [
"fastapi.testclient.TestClient"
] | [((133, 148), 'fastapi.testclient.TestClient', 'TestClient', (['app'], {}), '(app)\n', (143, 148), False, 'from fastapi.testclient import TestClient\n')] |
import cv2
import torch
from torchvision import transforms
import math
import numpy as np
import torchvision.models as models
import torch.utils.data as data
from torchvision import transforms
import cv2
import torch.nn.functional as F
from torch.autograd import Variable
import pandas as pd
import os ,torch
import torc... | [
"torchvision.models.resnet18",
"argparse.ArgumentParser",
"torch.load",
"torchvision.transforms.Normalize",
"torchvision.transforms.ToPILImage",
"time.time",
"torchvision.transforms.ToTensor",
"cv2.imread",
"torch.max",
"torch.nn.Linear",
"torch.unsqueeze",
"torchvision.transforms.Resize",
"... | [((1384, 1411), 'torch.load', 'torch.load', (['model_save_path'], {}), '(model_save_path)\n', (1394, 1411), False, 'import os, torch\n'), ((1933, 1979), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Testing"""'}), "(description='Testing')\n", (1956, 1979), False, 'import argparse\n'), (... |
'''
Defines a datapipeline that can be constructed from string.
author: <NAME>
'''
from argonaut import datasets as ds_mod
from argonaut.utils import Summary
class Pipeline():
'''Loads a data pipeline based on string operations and use data for the results.
In general these pipelines have 3 types of operations:... | [
"argonaut.utils.Summary"
] | [((1426, 1435), 'argonaut.utils.Summary', 'Summary', ([], {}), '()\n', (1433, 1435), False, 'from argonaut.utils import Summary\n')] |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: © 2021 Massachusetts Institute of Technology.
# SPDX-FileCopyrightText: © 2021 <NAME> <<EMAIL>>
# NOTICE: authors should document their contributions in concisely in NOTICE
# with details inline in source files... | [
"numpy.sum",
"numpy.angle",
"numpy.random.RandomState",
"numpy.exp",
"wavestate.bunch.Bunch",
"numpy.testing.assert_allclose",
"numpy.all"
] | [((1086, 1195), 'wavestate.bunch.Bunch', 'Bunch', ([], {'generator': 'generator', 'instances': 'instances', 'description': 'description', 'annotation': 'annotation'}), '(generator=generator, instances=instances, description=description,\n annotation=annotation, **kwargs)\n', (1091, 1195), False, 'from wavestate.bunc... |
import torch
import torch.nn as nn
import torch.nn.functional as F
import dgcn
log = dgcn.utils.get_logger()
class Classifier(nn.Module):
def __init__(self, input_dim, hidden_size, tag_size, args):
super(Classifier, self).__init__()
self.emotion_att = MaskedEmotionAtt(input_dim)
... | [
"torch.nn.Dropout",
"torch.zeros_like",
"torch.argmax",
"dgcn.utils.get_logger",
"torch.nn.functional.softmax",
"torch.nn.NLLLoss",
"torch.nn.functional.log_softmax",
"torch.nn.Linear",
"torch.sum",
"torch.tensor"
] | [((93, 116), 'dgcn.utils.get_logger', 'dgcn.utils.get_logger', ([], {}), '()\n', (114, 116), False, 'import dgcn\n'), ((337, 370), 'torch.nn.Linear', 'nn.Linear', (['input_dim', 'hidden_size'], {}), '(input_dim, hidden_size)\n', (346, 370), True, 'import torch.nn as nn\n'), ((392, 418), 'torch.nn.Dropout', 'nn.Dropout'... |
#
# Composite electrolyte potential employing stefan-maxwell
#
import pybamm
from .base_electrolyte_conductivity import BaseElectrolyteConductivity
class Composite(BaseElectrolyteConductivity):
"""Base class for conservation of charge in the electrolyte employing the
Stefan-Maxwell constitutive equations.
... | [
"pybamm.log",
"pybamm.PrimaryBroadcast",
"pybamm.boundary_value",
"pybamm.concatenation"
] | [((2542, 2584), 'pybamm.PrimaryBroadcast', 'pybamm.PrimaryBroadcast', (['T_av', '"""separator"""'], {}), "(T_av, 'separator')\n", (2565, 2584), False, 'import pybamm\n'), ((2602, 2653), 'pybamm.PrimaryBroadcast', 'pybamm.PrimaryBroadcast', (['T_av', '"""positive electrode"""'], {}), "(T_av, 'positive electrode')\n", (2... |
"""
The :mod:`surprise.prediction_algorithms.algo_base` module defines the base
class :class:`AlgoBase` from which every single prediction algorithm has to
inherit.
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import warnings
from six import get_unbo... | [
"warnings.warn",
"six.get_unbound_function"
] | [((1808, 1878), 'warnings.warn', 'warnings.warn', (['"""train() is deprecated. Use fit() instead"""', 'UserWarning'], {}), "('train() is deprecated. Use fit() instead', UserWarning)\n", (1821, 1878), False, 'import warnings\n'), ((1272, 1295), 'six.get_unbound_function', 'guf', (['self.__class__.fit'], {}), '(self.__cl... |
from string import Template
def start_response(resp="text/html"):
return 'Content-type: ' + resp + '\n\n'
def include_header(the_title):
with open('templates/header.html') as headf:
head_text = headf.read()
header = Template(head_text)
return header.substitute(title=the_title)
def include_... | [
"string.Template"
] | [((240, 259), 'string.Template', 'Template', (['head_text'], {}), '(head_text)\n', (248, 259), False, 'from string import Template\n'), ((579, 598), 'string.Template', 'Template', (['foot_text'], {}), '(foot_text)\n', (587, 598), False, 'from string import Template\n')] |
from django.shortcuts import render
from django.http import HttpResponse
from django.contrib.auth.models import User
from commons.permission_controllers import general_permission_controller as PERM_CONT
# Create your views here.
def test(request):
return HttpResponse('In common/views/test.')
def permission_contro... | [
"django.http.HttpResponse",
"django.contrib.auth.models.User.objects.get",
"django.dispatch.receiver",
"django.urls.reverse",
"commons.permission_controllers.general_permission_controller"
] | [((1007, 1045), 'django.dispatch.receiver', 'receiver', (['reset_password_token_created'], {}), '(reset_password_token_created)\n', (1015, 1045), False, 'from django.dispatch import receiver\n'), ((260, 297), 'django.http.HttpResponse', 'HttpResponse', (['"""In common/views/test."""'], {}), "('In common/views/test.')\n... |
import numpy as np
import matplotlib
matplotlib.use('pdf')
import matplotlib.pyplot as plt
import traceback
Fs = 30.72e6
x1 = []
x2=[]
x5=[]
x_comp_0 = []
y_comp_0 = []
x_comp_1 = []
y_comp_1 = []
x_comp_2 = []
y_comp_2 = []
try:
f1 = open("/root/.files/free5GRAN/execution_raw_files/studied_frame.txt", "r")
... | [
"matplotlib.pyplot.title",
"matplotlib.pyplot.specgram",
"traceback.print_exc",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.close",
"matplotlib.pyplot.scatter",
"matplotlib.pyplot.figure",
"matplotlib.use",
"numpy.arange",
"matplotlib.pyplot.savefig"
] | [((37, 58), 'matplotlib.use', 'matplotlib.use', (['"""pdf"""'], {}), "('pdf')\n", (51, 58), False, 'import matplotlib\n'), ((509, 521), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (519, 521), True, 'import matplotlib.pyplot as plt\n'), ((526, 560), 'matplotlib.pyplot.specgram', 'plt.specgram', (['x1'], ... |
# Android Device Testing Framework ("dtf")
# Copyright 2013-2015 <NAME> (@jake_valletta)
#
# 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
#
# Unl... | [
"dtf.core.packagemanager.parse_bash_module",
"dtf.core.compat.raw_input",
"dtf.core.packagemanager.get_repos",
"dtf.core.manifestparser.ExportZip",
"argparse.ArgumentParser",
"dtf.core.packagemanager.get_packages",
"dtf.logging.e",
"dtf.logging.d",
"dtf.core.packagemanager.install_zip",
"os.path.i... | [((2469, 2558), 'argparse.ArgumentParser', 'ArgumentParser', ([], {'prog': '"""pm install"""', 'description': '"""Install a item or DTF ZIP of items."""'}), "(prog='pm install', description=\n 'Install a item or DTF ZIP of items.')\n", (2483, 2558), False, 'from argparse import ArgumentParser\n'), ((5889, 5979), 'ar... |
import unittest
from dlgo.agent.helpers import is_point_an_eye
from dlgo.goboard_fast import Board, GameState, Move
from dlgo.gotypes import Player, Point
from dlgo.encoders.alphago import AlphaGoEncoder
class AlphaGoEncoderTest(unittest.TestCase):
def test_encoder(self):
alphago = AlphaGoEncoder()
... | [
"unittest.main",
"dlgo.encoders.alphago.AlphaGoEncoder",
"dlgo.goboard_fast.GameState.new_game",
"dlgo.gotypes.Point"
] | [((752, 767), 'unittest.main', 'unittest.main', ([], {}), '()\n', (765, 767), False, 'import unittest\n'), ((298, 314), 'dlgo.encoders.alphago.AlphaGoEncoder', 'AlphaGoEncoder', ([], {}), '()\n', (312, 314), False, 'from dlgo.encoders.alphago import AlphaGoEncoder\n'), ((332, 354), 'dlgo.goboard_fast.GameState.new_game... |
import datetime
import itertools
import logging
import os
import tempfile
import time
from collections import Counter
import torch
from fvcore.common.checkpoint import PeriodicCheckpointer as _PeriodicCheckpointer
from fvcore.common.file_io import PathManager
from fvcore.common.timer import Timer
from fvcore.nn.precis... | [
"fvcore.common.timer.Timer",
"tempfile.TemporaryDirectory",
"torch.autograd.profiler.profile",
"fvcore.nn.precise_bn.get_bn_modules",
"collections.Counter",
"time.perf_counter",
"tkdet.evaluation.testing.flatten_results_dict",
"itertools.count",
"fvcore.common.file_io.PathManager.open",
"tkdet.uti... | [((1727, 1734), 'fvcore.common.timer.Timer', 'Timer', ([], {}), '()\n', (1732, 1734), False, 'from fvcore.common.timer import Timer\n'), ((1762, 1781), 'time.perf_counter', 'time.perf_counter', ([], {}), '()\n', (1779, 1781), False, 'import time\n'), ((1810, 1817), 'fvcore.common.timer.Timer', 'Timer', ([], {}), '()\n'... |
from setuptools import setup, find_packages
from distutils.core import setup
setup(name='pyts',
version='0.5',
description='A package for transformation and classification of time series',
classifiers=[
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: MIT License',
... | [
"setuptools.find_packages"
] | [((633, 648), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (646, 648), False, 'from setuptools import setup, find_packages\n')] |
"""Sensor to indicate whether the current day is a workday."""
from datetime import datetime, timedelta
import logging
import holidays
import voluptuous as vol
from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorDevice
from homeassistant.const import CONF_NAME, WEEKDAYS
import homeassistan... | [
"voluptuous.Optional",
"datetime.datetime.today",
"voluptuous.All",
"voluptuous.Required",
"datetime.timedelta",
"voluptuous.In",
"logging.getLogger",
"voluptuous.Coerce"
] | [((365, 392), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (382, 392), False, 'import logging\n'), ((2445, 2471), 'voluptuous.Required', 'vol.Required', (['CONF_COUNTRY'], {}), '(CONF_COUNTRY)\n', (2457, 2471), True, 'import voluptuous as vol\n'), ((2504, 2557), 'voluptuous.Optional', '... |
# -*- coding: utf-8 -*-
r"""
werkzeug.contrib.sessions
~~~~~~~~~~~~~~~~~~~~~~~~~
This module contains some helper classes that help one to add session
support to a python WSGI application. For full client-side session
storage see :mod:`~werkzeug.contrib.securecookie` which implements a
secure,... | [
"os.listdir",
"os.chmod",
"os.unlink",
"tempfile.mkstemp",
"tempfile.gettempdir",
"re.escape",
"time.time",
"random.random",
"pickle.load",
"os.fdopen",
"warnings.warn",
"os.path.join",
"os.urandom",
"re.compile"
] | [((2579, 2794), 'warnings.warn', 'warnings.warn', (['"""\'werkzeug.contrib.sessions\' is deprecated as of version 0.15 and will be removed in version 1.0. It has moved to https://github.com/pallets/secure-cookie."""', 'DeprecationWarning'], {'stacklevel': '(2)'}), '(\n "\'werkzeug.contrib.sessions\' is deprecated as... |
from typing import Dict
import copy
def align_dictionaries(a: Dict, b: Dict) -> Dict:
"""Return dictionary a aligned to dictionary b.
Parameters
---------------------------------
a: Dict,
The dictionary to be aligned to the second one, adding missing keys to values 0 as required.
b: Dict,... | [
"copy.deepcopy"
] | [((451, 467), 'copy.deepcopy', 'copy.deepcopy', (['a'], {}), '(a)\n', (464, 467), False, 'import copy\n')] |
# -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
from functions_scenario import derivatives, sat_conc
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from pandas import DataFrame
# Start hour h2 is for test only - in live version will be current time
h2 = 1095
h1 ... | [
"numpy.quantile",
"numpy.sum",
"matplotlib.pyplot.plot",
"pandas.read_csv",
"matplotlib.pyplot.scatter",
"functions_scenario.derivatives",
"matplotlib.pyplot.yticks",
"numpy.zeros",
"numpy.genfromtxt",
"matplotlib.pyplot.figure",
"numpy.mean",
"numpy.linspace",
"matplotlib.pyplot.subplots_ad... | [((544, 587), 'numpy.genfromtxt', 'np.genfromtxt', (['"""ACH_out.csv"""'], {'delimiter': '""","""'}), "('ACH_out.csv', delimiter=',')\n", (557, 587), True, 'import numpy as np\n'), ((597, 640), 'numpy.genfromtxt', 'np.genfromtxt', (['"""IAS_out.csv"""'], {'delimiter': '""","""'}), "('IAS_out.csv', delimiter=',')\n", (6... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'ipetrash'
"""
Скрипт для уведомления о появлении новых игр серии Spirits of Mystery.
"""
# Чтобы можно было импортировать all_common.py, находящийся уровнем выше
import sys
sys.path.append('..')
# Чтобы импортировать функцию для получения списка игр
sy... | [
"sys.path.append",
"all_common.run_notification_job",
"all_common.make_backslashreplace_console"
] | [((240, 261), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (255, 261), False, 'import sys\n'), ((318, 374), 'sys.path.append', 'sys.path.append', (['"""../../bigfishgames_com__hidden_object"""'], {}), "('../../bigfishgames_com__hidden_object')\n", (333, 374), False, 'import sys\n'), ((504, 535)... |
# Generated by Django 3.2 on 2021-05-11 23:22
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('respostas', '0009_resposta_pergunta_respondida'),
]
operations = [
migrations.RenameField(
model_name='resposta',
old_name='pe... | [
"django.db.migrations.RenameField"
] | [((237, 342), 'django.db.migrations.RenameField', 'migrations.RenameField', ([], {'model_name': '"""resposta"""', 'old_name': '"""pergunta_respondida"""', 'new_name': '"""respondida"""'}), "(model_name='resposta', old_name=\n 'pergunta_respondida', new_name='respondida')\n", (259, 342), False, 'from django.db import... |
import nltk
texto = 'Hello, My name is Victor. How are you?'
#Dividindo uma string em array de substrings quando tiver um ponto . no meio da frase
frases = nltk.tokenize.sent_tokenize(texto)
print(frases)
#Tokenizando uma frase
tokens = nltk.word_tokenize(texto)
print(tokens)
'''Obtendo uma lista de tuplas onde ca... | [
"nltk.pos_tag",
"nltk.tokenize.sent_tokenize",
"nltk.chunk.ne_chunk",
"nltk.word_tokenize"
] | [((158, 192), 'nltk.tokenize.sent_tokenize', 'nltk.tokenize.sent_tokenize', (['texto'], {}), '(texto)\n', (185, 192), False, 'import nltk\n'), ((241, 266), 'nltk.word_tokenize', 'nltk.word_tokenize', (['texto'], {}), '(texto)\n', (259, 266), False, 'import nltk\n'), ((420, 440), 'nltk.pos_tag', 'nltk.pos_tag', (['token... |
__all__ = [
"GUIFrame"
]
from six.moves.tkinter import (
Frame
)
from .tk_unbind import (
unbind
)
class GUIFrame(Frame):
unbind = unbind
def __init__(self, *args, **kwargs):
Frame.__init__(self, *args, **kwargs)
def enqueue(self, co_task):
"Its toplevel must be GUITk."
... | [
"six.moves.tkinter.Frame.__init__"
] | [((206, 243), 'six.moves.tkinter.Frame.__init__', 'Frame.__init__', (['self', '*args'], {}), '(self, *args, **kwargs)\n', (220, 243), False, 'from six.moves.tkinter import Frame\n')] |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from abc import abstractmethod
from copy import deepcopy
from typing import Callable, Dict, Union
from jsonpickle.pickler import Pickler
from botbuilder.core.state_property_accessor import StatePropertyAccessor
from .bot_asse... | [
"copy.deepcopy",
"jsonpickle.pickler.Pickler"
] | [((859, 868), 'jsonpickle.pickler.Pickler', 'Pickler', ([], {}), '()\n', (866, 868), False, 'from jsonpickle.pickler import Pickler\n'), ((11029, 11063), 'copy.deepcopy', 'deepcopy', (['default_value_or_factory'], {}), '(default_value_or_factory)\n', (11037, 11063), False, 'from copy import deepcopy\n')] |
import torch
import torch.nn as nn
from torchinfo import summary
class SimpleConv(nn.Module):
def __init__(self, in_size):
super(SimpleConv, self).__init__()
# 3x3 Convolution with 6 filters ('same' padding)
self.conv = nn.Conv2d(in_size, 6, 3, padding='same')
self.relu = nn.ReLU... | [
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torchinfo.summary",
"torch.nn.Linear",
"torch.nn.Flatten"
] | [((2149, 2189), 'torchinfo.summary', 'summary', (['model'], {'input_size': '(1, 105, 105)'}), '(model, input_size=(1, 105, 105))\n', (2156, 2189), False, 'from torchinfo import summary\n'), ((252, 292), 'torch.nn.Conv2d', 'nn.Conv2d', (['in_size', '(6)', '(3)'], {'padding': '"""same"""'}), "(in_size, 6, 3, padding='sam... |
# Generated by Django 2.2.6 on 2019-10-27 16:03
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Medication',
fields=[
('id', models.AutoFie... | [
"django.db.models.CharField",
"django.db.models.DateTimeField",
"django.db.models.PositiveSmallIntegerField",
"django.db.models.AutoField"
] | [((306, 357), 'django.db.models.AutoField', 'models.AutoField', ([], {'primary_key': '(True)', 'serialize': '(False)'}), '(primary_key=True, serialize=False)\n', (322, 357), False, 'from django.db import migrations, models\n'), ((385, 481), 'django.db.models.CharField', 'models.CharField', ([], {'choices': "[('adderall... |
"""Print summary statistics of DRIAMS spectra.
The purpose of this script is to print some summary statistics about DRIAMS
data sets, stratified by site. This is just a debug script with no usage in
real-world analysis scenarios.
"""
import argparse
import dotenv
import os
import numpy as np
from maldi_learn.driams... | [
"tqdm.tqdm",
"numpy.sum",
"argparse.ArgumentParser",
"maldi_learn.driams.DRIAMSDatasetExplorer",
"maldi_learn.driams.load_driams_dataset",
"dotenv.load_dotenv",
"numpy.min",
"numpy.max",
"os.getenv"
] | [((425, 445), 'dotenv.load_dotenv', 'dotenv.load_dotenv', ([], {}), '()\n', (443, 445), False, 'import dotenv\n'), ((460, 484), 'os.getenv', 'os.getenv', (['"""DRIAMS_ROOT"""'], {}), "('DRIAMS_ROOT')\n", (469, 484), False, 'import os\n'), ((528, 553), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\... |
"""@author: Young
@license: (C) Copyright 2013-2017
@contact: <EMAIL>
@file: main.py
@time: 2018/1/17 10:02
"""
import gc
import gym
from agent.agent import Agent
MAX_EPISODES = 5000
env = gym.make('BipedalWalker-v2')
state_size = env.observation_space.shape[0]
action_size = env.action_space.shape[0]
agent = Agent... | [
"agent.agent.Agent",
"gc.collect",
"gym.make"
] | [((193, 221), 'gym.make', 'gym.make', (['"""BipedalWalker-v2"""'], {}), "('BipedalWalker-v2')\n", (201, 221), False, 'import gym\n'), ((315, 345), 'agent.agent.Agent', 'Agent', (['state_size', 'action_size'], {}), '(state_size, action_size)\n', (320, 345), False, 'from agent.agent import Agent\n'), ((1043, 1055), 'gc.c... |
import sys
if sys.version_info >= (3, 8):
from typing import Dict, Literal, List, Optional, Any
else:
from typing import Dict, List, Optional, Any
from typing_extensions import Literal
import logging
from aiortc import RTCIceServer, RTCPeerConnection, RTCSessionDescription, RTCRtpTransceiver, MediaStreamTr... | [
"logging.debug",
"aiortc.RTCPeerConnection",
"logging.warning",
"sdp_transform.parse",
"sdp_transform.write"
] | [((3255, 3279), 'logging.debug', 'logging.debug', (['"""close()"""'], {}), "('close()')\n", (3268, 3279), False, 'import logging\n'), ((3411, 3454), 'logging.debug', 'logging.debug', (['"""getNativeRtpCapabilities()"""'], {}), "('getNativeRtpCapabilities()')\n", (3424, 3454), False, 'import logging\n'), ((3469, 3488), ... |
from functools import partial
import numpy as np
from keras.preprocessing.image import img_to_array
from keras.preprocessing.image import load_img
from toolbox.image import bicubic_rescale
from toolbox.image import modcrop
from toolbox.paths import data_dir
def load_set(name, lr_sub_size=11, lr_sub_stride=5, scale=... | [
"numpy.stack",
"functools.partial",
"toolbox.image.bicubic_rescale",
"keras.preprocessing.image.img_to_array",
"keras.preprocessing.image.load_img",
"toolbox.image.modcrop"
] | [((421, 489), 'functools.partial', 'partial', (['generate_sub_images'], {'size': 'lr_sub_size', 'stride': 'lr_sub_stride'}), '(generate_sub_images, size=lr_sub_size, stride=lr_sub_stride)\n', (428, 489), False, 'from functools import partial\n'), ((532, 600), 'functools.partial', 'partial', (['generate_sub_images'], {'... |
import logging
from typing import Tuple, Any, List, Dict
import torch
from torch.fx.node import map_aggregate
from .quantization_state import (
AutoQuantizationState,
)
from .utils import (
trace_with_inputs,
is_leaf,
HookType,
get_torch_function_hook_type,
get_module_hook_type,
OpQuantize... | [
"torch.ao.quantization.is_activation_post_process",
"logging.basicConfig",
"torch.fx.node.map_aggregate",
"torch._C.DisableTorchFunction",
"logging.getLogger"
] | [((618, 649), 'logging.getLogger', 'logging.getLogger', (['"""auto_trace"""'], {}), "('auto_trace')\n", (635, 649), False, 'import logging\n'), ((650, 690), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.DEBUG'}), '(level=logging.DEBUG)\n', (669, 690), False, 'import logging\n'), ((8897, 8947), '... |
import datetime
import os
from sagemaker.sklearn import SKLearn
import typer
def run_sklearn_sagemaker(
data_path,
model_path,
job_name_prefix="sklearn",
instance_type="local",
role=os.environ.get("AWS_SAGEMAKER_ROLE"),
min_df: int = 5,
max_ngram: int = 1,
stopwords="english",
los... | [
"os.environ.get",
"typer.run",
"sagemaker.sklearn.SKLearn",
"datetime.datetime.now"
] | [((205, 241), 'os.environ.get', 'os.environ.get', (['"""AWS_SAGEMAKER_ROLE"""'], {}), "('AWS_SAGEMAKER_ROLE')\n", (219, 241), False, 'import os\n'), ((558, 831), 'sagemaker.sklearn.SKLearn', 'SKLearn', ([], {'entry_point': '"""src/train_sklearn.py"""', 'git_config': "{'repo': 'https://github.com/nsorros/sagemaker_examp... |
from datetime import datetime
import numpy as NP
import scipy.optimize
import sympy as SYM
import pylab as PL
def chapman(z, Nm, Hm, H_O, exp=NP.exp):
"""
Return Chapman function electron density at height *z*, maximum
electron density at the F-peak *Nm*, height at the maximum *Hm*,
and the scale hei... | [
"sympy.symbols",
"pylab.show",
"numpy.sum",
"pylab.axis",
"numpy.asarray",
"sympy.diff",
"pylab.ylabel",
"sympy.lambdify",
"datetime.datetime",
"pylab.figure",
"numpy.linspace",
"pylab.xlabel",
"numpy.dot",
"pyglow.pyglow.Point",
"pylab.ticklabel_format",
"pylab.legend",
"pylab.plot"... | [((1769, 1795), 'sympy.symbols', 'SYM.symbols', (['"""z Nm Hm H_O"""'], {}), "('z Nm Hm H_O')\n", (1780, 1795), True, 'import sympy as SYM\n'), ((1848, 1869), 'sympy.diff', 'SYM.diff', (['chapman', 'Nm'], {}), '(chapman, Nm)\n', (1856, 1869), True, 'import sympy as SYM\n'), ((1880, 1901), 'sympy.diff', 'SYM.diff', (['c... |
import asyncio
from contextlib import nullcontext, AsyncExitStack
from typing import Optional, TYPE_CHECKING
from jina.clients.base.helper import HTTPClientlet
from jina.clients.base import BaseClient
from jina.clients.helper import callback_exec, callback_exec_on_error
from jina.excepts import BadClient
from jina.imp... | [
"jina.types.request.data.DataRequest",
"docarray.DocumentArray.from_dict",
"jina.logging.profile.ProgressBar",
"jina.importer.ImportExtensions",
"jina.clients.helper.callback_exec",
"jina.serve.stream.RequestStreamer",
"jina.clients.base.helper.HTTPClientlet",
"contextlib.AsyncExitStack",
"jina.exce... | [((1250, 1281), 'jina.importer.ImportExtensions', 'ImportExtensions', ([], {'required': '(True)'}), '(required=True)\n', (1266, 1281), False, 'from jina.importer import ImportExtensions\n'), ((1416, 1432), 'contextlib.AsyncExitStack', 'AsyncExitStack', ([], {}), '()\n', (1430, 1432), False, 'from contextlib import null... |
# Copyright 2013 Google, Inc. All Rights Reserved.
#
# Google Author(s): <NAME>, <NAME>
from fontTools.ttLib.tables.DefaultTable import DefaultTable
import logging
log = logging.getLogger("fontTools.merge")
def add_method(*clazzes, **kwargs):
"""Returns a decorator function that adds a new method to one or
more ... | [
"logging.getLogger"
] | [((173, 209), 'logging.getLogger', 'logging.getLogger', (['"""fontTools.merge"""'], {}), "('fontTools.merge')\n", (190, 209), False, 'import logging\n')] |
### EXPERIMENT FLAGS ITERATION
flags = {'SC4', 'EPI1', '!AV'}
### EXPERIMENT EXECUTION STUB
import sys
sys.path.append('../../../../PatchSim/')
sys.path.append('../../../../school_closures/')
import patchsim as sim
import pandas as pd
import numpy as np
import multiprocessing
import sc_variants as sc
from copy imp... | [
"sys.path.append",
"copy.deepcopy",
"numpy.random.seed",
"patchsim.load_params",
"patchsim.run_disease_simulation",
"numpy.where",
"patchsim.load_Theta",
"sc_variants.NetInterventionAdaptive",
"multiprocessing.Pool",
"numpy.random.normal",
"patchsim.read_config",
"sc_variants.NetIntervention",... | [((106, 146), 'sys.path.append', 'sys.path.append', (['"""../../../../PatchSim/"""'], {}), "('../../../../PatchSim/')\n", (121, 146), False, 'import sys\n'), ((147, 194), 'sys.path.append', 'sys.path.append', (['"""../../../../school_closures/"""'], {}), "('../../../../school_closures/')\n", (162, 194), False, 'import ... |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2012 OpenStack, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.... | [
"oslo.config.cfg.IntOpt",
"cinder.openstack.common.log.getLogger"
] | [((921, 1022), 'oslo.config.cfg.IntOpt', 'cfg.IntOpt', (['"""osapi_max_request_body_size"""'], {'default': '(114688)', 'help': '"""Max size for body of a request"""'}), "('osapi_max_request_body_size', default=114688, help=\n 'Max size for body of a request')\n", (931, 1022), False, 'from oslo.config import cfg\n'),... |
import io
import textwrap
import traceback
from contextlib import redirect_stdout
from datetime import datetime as dt
import discord
from discord.ext import commands
from main import initial_cogs
class BotSettings(commands.Cog):
def __init__(self, bot):
self.bot = bot
self._last_result = None
... | [
"io.StringIO",
"discord.ext.commands.command",
"discord.ext.commands.has_permissions",
"textwrap.indent",
"discord.Color.teal",
"discord.ext.commands.Cog.listener",
"contextlib.redirect_stdout",
"traceback.format_exc",
"discord.ext.commands.guild_only",
"discord.ext.commands.is_owner"
] | [((324, 347), 'discord.ext.commands.Cog.listener', 'commands.Cog.listener', ([], {}), '()\n', (345, 347), False, 'from discord.ext import commands\n'), ((455, 486), 'discord.ext.commands.command', 'commands.command', ([], {'name': '"""prefix"""'}), "(name='prefix')\n", (471, 486), False, 'from discord.ext import comman... |
from frost import FrostClient
# Store the client globally
client = FrostClient()
| [
"frost.FrostClient"
] | [((68, 81), 'frost.FrostClient', 'FrostClient', ([], {}), '()\n', (79, 81), False, 'from frost import FrostClient\n')] |
import pandas as pd
df_pub = pd.read_csv('tableS4.Refseq.assembly.summary.tsv',sep='\t')
df_pub['ATCC Catalog'] = df_pub['ATCC Catalog'].apply(lambda x: x.upper()) #set all catalogIDs to uppercase #count = 577
df_port = pd.read_csv('tableS4.atcc.assembly.summary.tsv',sep='\t')
portal_catalog = list(set(list((df_port... | [
"pandas.read_csv",
"pandas.merge"
] | [((30, 90), 'pandas.read_csv', 'pd.read_csv', (['"""tableS4.Refseq.assembly.summary.tsv"""'], {'sep': '"""\t"""'}), "('tableS4.Refseq.assembly.summary.tsv', sep='\\t')\n", (41, 90), True, 'import pandas as pd\n'), ((221, 279), 'pandas.read_csv', 'pd.read_csv', (['"""tableS4.atcc.assembly.summary.tsv"""'], {'sep': '"""\... |
import wx
class ErrorDialog(wx.MiniFrame):
def __init__(self, parent, name, errors):
wx.MiniFrame.__init__(self, parent, -1, name)
self.errorbox = wx.TextCtrl(self, -1)
for e in errors:
self.errorbox.AppendText(e)
self.Show() | [
"wx.TextCtrl",
"wx.MiniFrame.__init__"
] | [((98, 143), 'wx.MiniFrame.__init__', 'wx.MiniFrame.__init__', (['self', 'parent', '(-1)', 'name'], {}), '(self, parent, -1, name)\n', (119, 143), False, 'import wx\n'), ((168, 189), 'wx.TextCtrl', 'wx.TextCtrl', (['self', '(-1)'], {}), '(self, -1)\n', (179, 189), False, 'import wx\n')] |
import tensorflow as tf
class FeedForwardNetwork(tf.keras.models.Model):
'''
Transformer 用の Position-wise Feedforward Neural Network です。
'''
def __init__(self, hidden_dim: int, dropout_rate: float, *args, **kwargs) -> None:
super().__init__(*args, **kwargs)
self.hidden_dim = hidden_dim... | [
"tensorflow.keras.layers.Dropout",
"tensorflow.keras.layers.Dense",
"tensorflow.ones_initializer",
"tensorflow.reduce_mean",
"tensorflow.rsqrt",
"tensorflow.square",
"tensorflow.zeros_initializer"
] | [((397, 497), 'tensorflow.keras.layers.Dense', 'tf.keras.layers.Dense', (['(hidden_dim * 4)'], {'use_bias': '(True)', 'activation': 'tf.nn.relu', 'name': '"""filter_layer"""'}), "(hidden_dim * 4, use_bias=True, activation=tf.nn.relu,\n name='filter_layer')\n", (418, 497), True, 'import tensorflow as tf\n'), ((584, 6... |
"""
numpy.ma : a package to handle missing or invalid values.
This package was initially written for numarray by <NAME>
at Lawrence Livermore National Laboratory.
In 2006, the package was completely rewritten by <NAME>
(University of Georgia) to make the MaskedArray class a subclass of ndarray,
and to improve s... | [
"numpy.core.umath.power",
"numpy.core.umath.less",
"numpy.split",
"numpy.void",
"numpy.resize",
"numpy.empty",
"numpy.ones",
"builtins.all",
"numpy.AxisError",
"numpy.shape",
"numpy.isclose",
"numpy.core.umath.less_equal",
"numpy.inner",
"numpy.diag",
"numpy.core.arrayprint.dtype_is_impl... | [((6685, 6708), 'numpy.datetime64', 'np.datetime64', (['"""NaT"""', 'v'], {}), "('NaT', v)\n", (6698, 6708), True, 'import numpy as np\n'), ((6748, 6772), 'numpy.timedelta64', 'np.timedelta64', (['"""NaT"""', 'v'], {}), "('NaT', v)\n", (6762, 6772), True, 'import numpy as np\n'), ((13864, 13880), 'numpy.dtype', 'np.dty... |
import json
class User:
"""
Class User,
emulates a user
"""
def __init__(self, json_obj):
"""Constructor for class User
:param json_obj: The dict with the object data
"""
self.__dict__ = json_obj
def __str__(self):
"""
Returns the object as a s... | [
"json.dumps"
] | [((393, 418), 'json.dumps', 'json.dumps', (['self.__dict__'], {}), '(self.__dict__)\n', (403, 418), False, 'import json\n')] |
"""
Tab art provider code - a tab provider provides all drawing functionality to
the L{AuiNotebook}. This allows the L{AuiNotebook} to have a plugable look-and-feel.
By default, a L{AuiNotebook} uses an instance of this class called L{AuiDefaultTabArt}
which provides bitmap art and a colour scheme that is adapted to t... | [
"wx.Menu",
"wx.Window.FindFocus",
"aui_utilities.BitmapFromBits",
"wx.GetMousePosition",
"wx.SystemSettings_GetColour",
"aui_utilities.DrawMACCloseButton",
"wx.RectPP",
"wx.PyEvtHandler.__init__",
"wx.Colour",
"wx.EmptyBitmap",
"wx.SystemSettings.GetFont",
"aui_utilities.CopyAttributes",
"wx... | [((1112, 1142), 'wx.PyEvtHandler.__init__', 'wx.PyEvtHandler.__init__', (['self'], {}), '(self)\n', (1136, 1142), False, 'import wx\n'), ((4482, 4532), 'wx.SystemSettings_GetFont', 'wx.SystemSettings_GetFont', (['wx.SYS_DEFAULT_GUI_FONT'], {}), '(wx.SYS_DEFAULT_GUI_FONT)\n', (4507, 4532), False, 'import wx\n'), ((4563,... |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
Various retriever utilities.
"""
import regex
import unicodedata
import numpy as np
import scipy.sparse as sp
from ... | [
"unicodedata.normalize",
"numpy.load",
"torch.load",
"torch.save",
"scipy.sparse.csr_matrix",
"regex.match",
"numpy.savez",
"torch.sparse.FloatTensor",
"sklearn.utils.murmurhash3_32"
] | [((908, 934), 'numpy.savez', 'np.savez', (['filename'], {}), '(filename, **data)\n', (916, 934), True, 'import numpy as np\n'), ((1152, 1178), 'torch.save', 'torch.save', (['data', 'filename'], {}), '(data, filename)\n', (1162, 1178), False, 'import torch\n'), ((1225, 1270), 'numpy.load', 'np.load', (["(filename + '.np... |
import logging, traceback, sys, threading
try:
import Queue
except ImportError:
import queue as Queue
from ..log import set_logging
from ..utils import test_connect
from ..storage import templates
logger = logging.getLogger('itchat')
def load_register(core):
core.auto_login = auto_logi... | [
"threading.Thread",
"sys.exit",
"traceback.format_exc",
"logging.getLogger"
] | [((226, 253), 'logging.getLogger', 'logging.getLogger', (['"""itchat"""'], {}), "('itchat')\n", (243, 253), False, 'import logging, traceback, sys, threading\n'), ((743, 753), 'sys.exit', 'sys.exit', ([], {}), '()\n', (751, 753), False, 'import logging, traceback, sys, threading\n'), ((3959, 3992), 'threading.Thread', ... |
#!/usr/bin/env python3
import requests
from lxml import html
from unidecode import unidecode
DEX_BASE_URL = 'https://dexonline.ro'
DEX_API_URL_FORMAT = '{}/{}'.format(DEX_BASE_URL, 'definitie/{}/json')
query = 'fir'
dex_api_url = DEX_API_URL_FORMAT.format(query)
dex_api_request = requests.get(dex_api_url)
dex_ra... | [
"lxml.html.Element",
"lxml.html.fragments_fromstring",
"unidecode.unidecode",
"requests.get"
] | [((287, 312), 'requests.get', 'requests.get', (['dex_api_url'], {}), '(dex_api_url)\n', (299, 312), False, 'import requests\n'), ((562, 612), 'lxml.html.fragments_fromstring', 'html.fragments_fromstring', (['dex_definition_html_rep'], {}), '(dex_definition_html_rep)\n', (587, 612), False, 'from lxml import html\n'), ((... |
from django.shortcuts import render, get_object_or_404
from django.http import HttpResponse
from django.http import FileResponse
# Create your views here.
from posts import urls
from .models import Post
def posts_list(request):
print("------>")
# instance = Post.objects.get(id=100)
queryset = Post.objects... | [
"django.shortcuts.render",
"django.shortcuts.get_object_or_404"
] | [((817, 855), 'django.shortcuts.render', 'render', (['request', '"""index.html"""', 'context'], {}), "(request, 'index.html', context)\n", (823, 855), False, 'from django.shortcuts import render, get_object_or_404\n'), ((1179, 1217), 'django.shortcuts.render', 'render', (['request', '"""index.html"""', 'context'], {}),... |
#!/usr/bin/env python3
##########################################
# Duino-Coin Python PC Miner (v2.2)
# https://github.com/revoxhere/duino-coin
# Distributed under MIT license
# © Duino-Coin Community 2019-2021
##########################################
import socket, statistics, threading, multiprocessing, time... | [
"os.mkdir",
"cpuinfo.get_cpu_info",
"os.execl",
"socket.socket",
"multiprocessing.Value",
"pathlib.Path",
"sys.stdout.flush",
"subprocess.check_call",
"multiprocessing.cpu_count",
"colorama.init",
"pypresence.Presence",
"os.path.exists",
"requests.get",
"configparser.ConfigParser",
"re.s... | [((2416, 2443), 'configparser.ConfigParser', 'configparser.ConfigParser', ([], {}), '()\n', (2441, 2443), False, 'import socket, statistics, threading, multiprocessing, time, re, subprocess, hashlib, configparser, sys, datetime, os\n'), ((3716, 3739), 'signal.signal', 'signal', (['SIGINT', 'handler'], {}), '(SIGINT, ha... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import globalFunctions
import json
import re
import os
import glob
class MangaRock():
def __init__(self, manga_url, download_directory, chapter_range, **kwargs):
current_directory = kwargs.get("current_directory")
conversion = kwargs.get("conversion")... | [
"os.remove",
"os.path.abspath",
"os.makedirs",
"os.path.exists",
"globalFunctions.GlobalFunctions"
] | [((2874, 2893), 'os.remove', 'os.remove', (['mri_file'], {}), '(mri_file)\n', (2883, 2893), False, 'import os\n'), ((3478, 3508), 'os.path.exists', 'os.path.exists', (['directory_path'], {}), '(directory_path)\n', (3492, 3508), False, 'import os\n'), ((3522, 3549), 'os.makedirs', 'os.makedirs', (['directory_path'], {})... |
import itertools
import logging
from bs4 import BeautifulSoup
from chibi.file.temp import Chibi_temp_path
from .episode import Episode
from chibi_dl.site.base.site import Site
logger = logging.getLogger( "chibi_dl.sites.tmo_fans.serie" )
class Serie( Site ):
def __init__( self, url, *args, **kw ):
sup... | [
"bs4.BeautifulSoup",
"pdb.post_mortem",
"logging.getLogger",
"chibi.file.temp.Chibi_temp_path"
] | [((189, 239), 'logging.getLogger', 'logging.getLogger', (['"""chibi_dl.sites.tmo_fans.serie"""'], {}), "('chibi_dl.sites.tmo_fans.serie')\n", (206, 239), False, 'import logging\n'), ((1703, 1745), 'bs4.BeautifulSoup', 'BeautifulSoup', (['page.content', '"""html.parser"""'], {}), "(page.content, 'html.parser')\n", (1716... |
import random as rd
K = int(input())
N = int(input())
x = int(input())
M = int(x*N/10)
print ("p cnf {0} {1}".format(N, M))
for i in range(M):
l = []
avail = [i+1 for i in range(N)]
rd.shuffle(avail)
for j in range(K):
s = rd.randint(0,1)
c = avail[j]
if (s == 0):
... | [
"random.shuffle",
"random.randint"
] | [((197, 214), 'random.shuffle', 'rd.shuffle', (['avail'], {}), '(avail)\n', (207, 214), True, 'import random as rd\n'), ((250, 266), 'random.randint', 'rd.randint', (['(0)', '(1)'], {}), '(0, 1)\n', (260, 266), True, 'import random as rd\n')] |
# Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
import json
import logging
import mock
import os
from .common import BaseTest
from c7n.exceptions import PolicyExecutionError
from c7n.policy import Policy
from c7n import handler
class HandleTest(BaseTest):
def test_init_config_exec... | [
"json.dump",
"c7n.exceptions.PolicyExecutionError",
"mock.patch",
"c7n.handler.dispatch_event",
"c7n.handler.init_config",
"os.path.join"
] | [((3571, 3613), 'mock.patch', 'mock.patch', (['"""c7n.handler.PolicyCollection"""'], {}), "('c7n.handler.PolicyCollection')\n", (3581, 3613), False, 'import mock\n'), ((3241, 3300), 'c7n.handler.dispatch_event', 'handler.dispatch_event', (["{'detail': {'resource': 'xyz'}}", '{}'], {}), "({'detail': {'resource': 'xyz'}}... |
################################################################
# smallGraph.py
#
# Simpler graph class for use with structure confusion
# histograms.
#
# Author: <NAME>
# Copyright (c) 2013-2014 <NAME> and <NAME>
################################################################
# -*- coding: utf-8 -*-
"""
Created o... | [
"cmath.rect",
"compareTools.cmpNodes",
"compareTools.cmpEdges"
] | [((2934, 2984), 'compareTools.cmpNodes', 'compareTools.cmpNodes', (['myLabelsFlat', 'hisLabelsFlat'], {}), '(myLabelsFlat, hisLabelsFlat)\n', (2955, 2984), False, 'import compareTools\n'), ((3772, 3825), 'compareTools.cmpNodes', 'compareTools.cmpNodes', (['self.nodes[my]', 'osg.nodes[his]'], {}), '(self.nodes[my], osg.... |
# Dogs vs Cats Image Classification Without Image Augmentation
# In this database the Images are not of the same size
# The images are also colored, need to get grayscale--- height X width X depth(RGB channels)
# That means we have to use flatten and resize the images to the same dimensions
from __future__ imp... | [
"matplotlib.pyplot.title",
"tensorflow.keras.preprocessing.image.ImageDataGenerator",
"tensorflow.keras.layers.MaxPooling2D",
"tensorflow.keras.layers.Dense",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.tight_layout",
"os.path.join",
"tensorflow.keras.layers.Flatten",
"tensorflow.get_logger",
"... | [((712, 727), 'tensorflow.get_logger', 'tf.get_logger', ([], {}), '()\n', (725, 727), True, 'import tensorflow as tf\n'), ((872, 958), 'tensorflow.keras.utils.get_file', 'tf.keras.utils.get_file', (['"""cats_and_dogs_filterted.zip"""'], {'origin': '_URL', 'extract': '(True)'}), "('cats_and_dogs_filterted.zip', origin=_... |
#!/usr/bin/python
# encoding: utf-8
#pylint: disable=R0904
""" The annotation test class """
# upconvert.py - A universal hardware design file format converter using
# Format: upverter.com/resources/open-json-format/
# Development: github.com/upverter/schematic-file-converter
#
# Copyright 2011 Upverter, Inc.
#... | [
"upconvert.core.annotation.Annotation"
] | [((1303, 1336), 'upconvert.core.annotation.Annotation', 'Annotation', (['"""abc"""', '(0)', '(1)', '(2)', '(False)'], {}), "('abc', 0, 1, 2, False)\n", (1313, 1336), False, 'from upconvert.core.annotation import Annotation\n'), ((1580, 1612), 'upconvert.core.annotation.Annotation', 'Annotation', (['"""foo"""', '(3)', '... |
import re
from django.conf import settings
from wagtail.images import get_image_model
from wagtail.core.models import Collection
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Search
from cms.tagging import TRENDING
pattern = re.compile(r"tat+o+")
class SearchQuery:
@staticmethod
de... | [
"elasticsearch.Elasticsearch",
"wagtail.core.models.Collection.objects.get",
"wagtail.images.get_image_model",
"re.compile"
] | [((252, 272), 're.compile', 're.compile', (['"""tat+o+"""'], {}), "('tat+o+')\n", (262, 272), False, 'import re\n'), ((1321, 1356), 'elasticsearch.Elasticsearch', 'Elasticsearch', (['settings.ELASTIC_URL'], {}), '(settings.ELASTIC_URL)\n', (1334, 1356), False, 'from elasticsearch import Elasticsearch\n'), ((765, 804), ... |
# MIT License
# Copyright (c) 2022 christiandimaio
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge... | [
"NeuralModels.Dataset.MyDataset",
"argparse.ArgumentParser",
"NeuralModels.Vocabulary.Vocabulary",
"os.path.isdir",
"os.path.exists",
"PIL.Image.open",
"sys.exit"
] | [((1382, 1507), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""CLI for C[aA]RNet, some static definition are placed in the VARIABLE.py file"""'}), "(description=\n 'CLI for C[aA]RNet, some static definition are placed in the VARIABLE.py file'\n )\n", (1405, 1507), False, 'import ar... |
"""
Jump search algorithm iterates through a sorted list with a step of n^(1/2),
until the element compared is bigger than the one searched.If the item is not
in the particular step, it shifts the entire step.
It will then perform a linear search on the step until it matches the target.
If not found, it returns -1.
Tim... | [
"math.sqrt"
] | [((633, 645), 'math.sqrt', 'math.sqrt', (['n'], {}), '(n)\n', (642, 645), False, 'import math\n'), ((749, 761), 'math.sqrt', 'math.sqrt', (['n'], {}), '(n)\n', (758, 761), False, 'import math\n')] |
#!/usr/bin/python
# Copyright (c) 2014-2016, Intel Corporation All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright
# notice... | [
"time.time"
] | [((1869, 1880), 'time.time', 'time.time', ([], {}), '()\n', (1878, 1880), False, 'import time\n'), ((1970, 1981), 'time.time', 'time.time', ([], {}), '()\n', (1979, 1981), False, 'import time\n')] |
# 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, soft... | [
"pyrfu.pyrf.optimize_nbins_2d",
"numpy.corrcoef",
"pyrfu.pyrf.gradient",
"scipy.optimize.curve_fit",
"xarray.Dataset",
"numpy.max",
"pyrfu.pyrf.histogram2d",
"numpy.linspace"
] | [((1150, 1171), 'pyrfu.pyrf.gradient', 'gradient', (['b_xyz[:, 0]'], {}), '(b_xyz[:, 0])\n', (1158, 1171), False, 'from pyrfu.pyrf import gradient, histogram2d, optimize_nbins_2d\n'), ((1186, 1224), 'pyrfu.pyrf.optimize_nbins_2d', 'optimize_nbins_2d', (['dbl_dt', 'j_xyz[:, 2]'], {}), '(dbl_dt, j_xyz[:, 2])\n', (1203, 1... |
#!/usr/bin/env python
# Read the encode format files
# -*- python -*-
#BEGIN_LEGAL
#
#Copyright (c) 2019 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://... | [
"nt_func_gen.nt_function_gen_t",
"ins_emit.instruction_codegen_t",
"actions.gen_return_action",
"os.unlink",
"optparse.OptionParser",
"operand_storage.operands_storage_t",
"actions.action_t",
"mbuild.msgb",
"os.path.join",
"os.path.dirname",
"operand_storage.get_op_getter_full_func",
"os.path.... | [((1567, 1578), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (1576, 1578), False, 'import os\n'), ((1881, 1909), 'os.path.dirname', 'os.path.dirname', (['sys.argv[0]'], {}), '(sys.argv[0])\n', (1896, 1909), False, 'import os\n'), ((1977, 2012), 'os.path.exists', 'os.path.exists', (['mbuild_install_path'], {}), '(mbuild_... |
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
# Modifications copyright (C) 2018 Uber Technologies, 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.apa... | [
"horovod.common.rank",
"os.environ.get",
"horovod.common.init",
"horovod.common.size"
] | [((2652, 2662), 'horovod.common.init', 'hvd.init', ([], {}), '()\n', (2660, 2662), True, 'import horovod.common as hvd\n'), ((2674, 2684), 'horovod.common.rank', 'hvd.rank', ([], {}), '()\n', (2682, 2684), True, 'import horovod.common as hvd\n'), ((2852, 2862), 'horovod.common.init', 'hvd.init', ([], {}), '()\n', (2860... |
'''OpenGL extension OES.shader_io_blocks
This module customises the behaviour of the
OpenGL.raw.GLES2.OES.shader_io_blocks to provide a more
Python-friendly API
Overview (from the spec)
This extension extends the functionality of interface blocks to
support input and output interfaces in the OpenGL ES ... | [
"OpenGL.extensions.hasGLExtension"
] | [((1892, 1934), 'OpenGL.extensions.hasGLExtension', 'extensions.hasGLExtension', (['_EXTENSION_NAME'], {}), '(_EXTENSION_NAME)\n', (1917, 1934), False, 'from OpenGL import extensions\n')] |
"""Credential definition admin routes."""
from asyncio import ensure_future, shield
from aiohttp import web
from aiohttp_apispec import (
docs,
match_info_schema,
querystring_schema,
request_schema,
response_schema,
)
from marshmallow import fields
from ...issuer.base import BaseIssuer
from ...l... | [
"marshmallow.fields.Int",
"aiohttp.web.HTTPForbidden",
"aiohttp.web.post",
"marshmallow.fields.Constant",
"aiohttp_apispec.docs",
"marshmallow.fields.Dict",
"aiohttp.web.HTTPInternalServerError",
"marshmallow.fields.Boolean",
"aiohttp.web.json_response",
"aiohttp.web.HTTPBadRequest",
"aiohttp.we... | [((3337, 3433), 'aiohttp_apispec.docs', 'docs', ([], {'tags': "['credential-definition']", 'summary': '"""Sends a credential definition to the ledger"""'}), "(tags=['credential-definition'], summary=\n 'Sends a credential definition to the ledger')\n", (3341, 3433), False, 'from aiohttp_apispec import docs, match_in... |
#!/usr/bin/python
import rospy
import sched, time
import sys, select, termios, tty # For terminal keyboard key press reading
from std_msgs.msg import Float32, Bool, String
from geometry_msgs.msg import Vector3
from math import pi
msg = """
voice_control function descripetion
start listening
CTRL-C to quit
"""
sp... | [
"geometry_msgs.msg.Vector3",
"rospy.Subscriber",
"termios.tcgetattr",
"rospy.Publisher",
"time.sleep",
"rospy.loginfo",
"rospy.is_shutdown",
"rospy.init_node",
"std_msgs.msg.Bool",
"rospy.get_caller_id"
] | [((660, 669), 'geometry_msgs.msg.Vector3', 'Vector3', ([], {}), '()\n', (667, 669), False, 'from geometry_msgs.msg import Vector3\n'), ((808, 814), 'std_msgs.msg.Bool', 'Bool', ([], {}), '()\n', (812, 814), False, 'from std_msgs.msg import Float32, Bool, String\n'), ((966, 972), 'std_msgs.msg.Bool', 'Bool', ([], {}), '... |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | [
"marvin.lib.utils.cleanup_resources",
"marvin.lib.base.NetworkOffering.create",
"marvin.lib.common.get_template",
"marvin.lib.base.Account.create",
"random.choice",
"marvin.lib.base.ServiceOffering.create",
"marvin.lib.base.Network.create",
"marvin.lib.common.list_virtual_machines",
"marvin.lib.comm... | [((4513, 4602), 'nose.plugins.attrib.attr', 'attr', ([], {'tags': "['simulator', 'devcloud', 'basic', 'advanced']", 'required_hardware': '"""false"""'}), "(tags=['simulator', 'devcloud', 'basic', 'advanced'], required_hardware\n ='false')\n", (4517, 4602), False, 'from nose.plugins.attrib import attr\n'), ((1876, 19... |
import logging
import subprocess
import yaml
from cekit.errors import CekitError
from cekit.generator.base import Generator
logger = logging.getLogger('cekit')
class DockerGenerator(Generator):
def __init__(self, descriptor_path, target, builder, overrides, params):
self._params = params
super(... | [
"cekit.errors.CekitError",
"subprocess.check_output",
"yaml.safe_load",
"logging.getLogger"
] | [((135, 161), 'logging.getLogger', 'logging.getLogger', (['"""cekit"""'], {}), "('cekit')\n", (152, 161), False, 'import logging\n'), ((1008, 1036), 'subprocess.check_output', 'subprocess.check_output', (['cmd'], {}), '(cmd)\n', (1031, 1036), False, 'import subprocess\n'), ((1258, 1291), 'yaml.safe_load', 'yaml.safe_lo... |
from pymatgen import Structure
from pymatgen.analysis.chemenv.coordination_environments import coordination_geometries_files as cg_files
from pymatgen.analysis.chemenv.coordination_environments import coordination_geometry_finder as polyfinder
from pymatgen.analysis.chemenv.coordination_environments import chemenv_stra... | [
"unittest.main",
"chemenv_util.find_species_string_ce",
"json.load",
"pymatgen.analysis.chemenv.coordination_environments.coordination_geometry_finder.LocalGeometryFinder",
"pymatgen.Structure.from_file",
"os.path.dirname",
"pymatgen.analysis.chemenv.coordination_environments.chemenv_strategies.Simplest... | [((3609, 3624), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3622, 3624), False, 'import unittest\n'), ((756, 802), 'pymatgen.Structure.from_file', 'Structure.from_file', (['"""LiCoO2.cif"""', '(True)', '(False)'], {}), "('LiCoO2.cif', True, False)\n", (775, 802), False, 'from pymatgen import Structure\n'), ((1... |
# Generated by Django 3.0.3 on 2020-04-07 12:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('backend', '0004_auto_20200406_1401'),
]
operations = [
migrations.RemoveField(
model_name='filter',
name='cameras',
... | [
"django.db.migrations.RemoveField",
"django.db.models.ManyToManyField"
] | [((235, 294), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""filter"""', 'name': '"""cameras"""'}), "(model_name='filter', name='cameras')\n", (257, 294), False, 'from django.db import migrations, models\n'), ((448, 526), 'django.db.models.ManyToManyField', 'models.ManyToManyField... |
from django.conf.urls.defaults import *
from article.views import ArticleListView, ArticleDetailView
urlpatterns = patterns('',
url(r'^(?P<slug>[^/]+)/$', ArticleDetailView.as_view(), name='article-details'),
url(r'^$', ArticleListView.as_view(), name='article-list'),
)
| [
"article.views.ArticleDetailView.as_view",
"article.views.ArticleListView.as_view"
] | [((160, 187), 'article.views.ArticleDetailView.as_view', 'ArticleDetailView.as_view', ([], {}), '()\n', (185, 187), False, 'from article.views import ArticleListView, ArticleDetailView\n'), ((229, 254), 'article.views.ArticleListView.as_view', 'ArticleListView.as_view', ([], {}), '()\n', (252, 254), False, 'from articl... |
from django.contrib import admin
# Register your models here.
from tastybitauth.models import BitAuth
class BitAuthAdmin(admin.ModelAdmin):
list_display = ('user', 'sin',)
raw_id_fields = ('user',)
autocomplete_lookup_fields = {
'fk': ['user_id'],
}
admin.site.register(BitAuth, BitAuthAdmin... | [
"django.contrib.admin.site.register"
] | [((279, 321), 'django.contrib.admin.site.register', 'admin.site.register', (['BitAuth', 'BitAuthAdmin'], {}), '(BitAuth, BitAuthAdmin)\n', (298, 321), False, 'from django.contrib import admin\n')] |
from django.core.exceptions import ImproperlyConfigured
from django.db import models
class ObjectTypeRegistry:
"""
Implements a lookup table for mapping objects to values according to the object type.
The most specific type according to the object's inheritance chain is selected.
"""
def __init__... | [
"django.core.exceptions.ImproperlyConfigured"
] | [((2703, 2821), 'django.core.exceptions.ImproperlyConfigured', 'ImproperlyConfigured', (['"""The \'to\' argument on ModelFieldRegistry.register is only valid for ForeignKey fields"""'], {}), '(\n "The \'to\' argument on ModelFieldRegistry.register is only valid for ForeignKey fields"\n )\n', (2723, 2821), False, ... |
import sys
import time
import tempfile
from ....tests.helper import pytest
from ....utils.data import get_pkg_data_filename
from ..hub import SAMPHubServer
from ..integrated_client import SAMPIntegratedClient
from ..constants import SAMP_STATUS_OK
from ..errors import SAMPClientError, SAMPProxyError
# By default, te... | [
"tempfile.mkdtemp"
] | [((1042, 1060), 'tempfile.mkdtemp', 'tempfile.mkdtemp', ([], {}), '()\n', (1058, 1060), False, 'import tempfile\n')] |
# -*- coding: utf-8 -*-
"""
Script Name: PipelineTool.py
Author: <NAME>/Jimmy - 3D artist.
Description:
This is main UI of PipelineTool.
"""
# -------------------------------------------------------------------------------------------------------------
""" Import """
# PLM
from PLM i... | [
"pyPLM.Gui.LogoIcon",
"PLM.cores.ThreadManager",
"pyPLM.Widgets.Widget",
"pyPLM.damg.DAMGDICT",
"pyPLM.Widgets.GridLayout"
] | [((1109, 1119), 'pyPLM.damg.DAMGDICT', 'DAMGDICT', ([], {}), '()\n', (1117, 1119), False, 'from pyPLM.damg import DAMGDICT\n'), ((1162, 1172), 'pyPLM.damg.DAMGDICT', 'DAMGDICT', ([], {}), '()\n', (1170, 1172), False, 'from pyPLM.damg import DAMGDICT\n'), ((1667, 1693), 'PLM.cores.ThreadManager', 'ThreadManager', (['sel... |
import unittest
from werkzeug.datastructures import MultiDict
from tests.app.app_context_test_case import AppContextTestCase
from app.helpers.form_helper import get_mapped_answers, get_form_for_location, post_form_for_location
from app.questionnaire.location import Location
from app.questionnaire.questionnaire_schema ... | [
"app.data_model.answer_store.AnswerStore",
"app.helpers.form_helper.get_form_for_location",
"werkzeug.datastructures.MultiDict",
"app.questionnaire.questionnaire_schema.QuestionnaireSchema",
"app.helpers.form_helper.get_mapped_answers",
"app.utilities.schema.load_schema_from_params",
"app.questionnaire.... | [((13413, 13430), 'app.data_model.answer_store.AnswerStore', 'AnswerStore', (['None'], {}), '(None)\n', (13424, 13430), False, 'from app.data_model.answer_store import AnswerStore, Answer\n'), ((14891, 14925), 'app.questionnaire.questionnaire_schema.QuestionnaireSchema', 'QuestionnaireSchema', (['questionnaire'], {}), ... |
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.template import TemplateSyntaxError
from django.template.loader import render_to_string
from django.utils.encoding import smart_text
from django.utils.safestring import mark_safe
def inlines(value, return_list=Fals... | [
"django.template.TemplateSyntaxError",
"django.template.loader.render_to_string",
"django.contrib.contenttypes.models.ContentType.objects.get"
] | [((2034, 2096), 'django.contrib.contenttypes.models.ContentType.objects.get', 'ContentType.objects.get', ([], {'app_label': 'app_label', 'model': 'model_name'}), '(app_label=app_label, model=model_name)\n', (2057, 2096), False, 'from django.contrib.contenttypes.models import ContentType\n'), ((1841, 1919), 'django.temp... |
import uuid
from django.db import models
from users.models import User
class normalUserProfile(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
user = models.OneToOneField(User, on_delete=models.CASCADE, related_name='profile')
first_name = models.CharField(max_... | [
"django.db.models.OneToOneField",
"django.db.models.CharField",
"django.db.models.ForeignKey",
"django.db.models.PositiveIntegerField",
"django.db.models.IntegerField",
"django.db.models.UUIDField"
] | [((123, 193), 'django.db.models.UUIDField', 'models.UUIDField', ([], {'primary_key': '(True)', 'default': 'uuid.uuid4', 'editable': '(False)'}), '(primary_key=True, default=uuid.uuid4, editable=False)\n', (139, 193), False, 'from django.db import models\n'), ((205, 281), 'django.db.models.OneToOneField', 'models.OneToO... |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | [
"webob.exc.HTTPBadRequest",
"designer_family.microversion.version_handler",
"designer_family.util.check_accept",
"designer_family.objects.resource_class.get_all",
"oslo_serialization.jsonutils.dumps",
"oslo_utils.timeutils.utcnow",
"designer_family.objects.resource_class.ResourceClass",
"webob.exc.HTT... | [((1907, 1942), 'designer_family.microversion.version_handler', 'microversion.version_handler', (['"""1.2"""'], {}), "('1.2')\n", (1935, 1942), False, 'from designer_family import microversion\n'), ((1944, 1984), 'designer_family.util.require_content', 'util.require_content', (['"""application/json"""'], {}), "('applic... |