code stringlengths 22 1.05M | apis listlengths 1 3.31k | extract_api stringlengths 75 3.25M |
|---|---|---|
from setuptools import setup
setup(
name='ad-ctf-paas-lib',
version='0.0.3',
packages=['checker'],
url='',
license='',
author='ivanh',
author_email='<EMAIL>',
description='Library that help to write checkers'
)
| [
"setuptools.setup"
] | [((30, 218), 'setuptools.setup', 'setup', ([], {'name': '"""ad-ctf-paas-lib"""', 'version': '"""0.0.3"""', 'packages': "['checker']", 'url': '""""""', 'license': '""""""', 'author': '"""ivanh"""', 'author_email': '"""<EMAIL>"""', 'description': '"""Library that help to write checkers"""'}), "(name='ad-ctf-paas-lib', ve... |
#!/usr/bin/env python3
"""Report inactive interface admins."""
# Author : JJMC89
# License: MIT
from functools import lru_cache
from itertools import chain
from typing import Optional, Set, Tuple, Union
import pywikibot
from dateutil.relativedelta import relativedelta
from pywikibot.logentries import LogEntry
PageSo... | [
"pywikibot.Site",
"pywikibot.Page",
"pywikibot.log",
"dateutil.relativedelta.relativedelta",
"pywikibot.handle_args",
"functools.lru_cache"
] | [((1602, 1613), 'functools.lru_cache', 'lru_cache', ([], {}), '()\n', (1611, 1613), False, 'from functools import lru_cache\n'), ((1760, 1771), 'functools.lru_cache', 'lru_cache', ([], {}), '()\n', (1769, 1771), False, 'from functools import lru_cache\n'), ((1922, 1933), 'functools.lru_cache', 'lru_cache', ([], {}), '(... |
from corus.record import Record
from corus.io import (
load_lines,
parse_tsv,
skip_header,
)
class LRWCRecord(Record):
__attributes__ = ['hyponym', 'hypernym', 'genitive', 'judgement', 'confidence']
def __init__(self, hyponym, hypernym, genitive, judgement, confidence):
self.hyponym = hy... | [
"corus.io.load_lines",
"corus.io.skip_header",
"corus.io.parse_tsv"
] | [((1003, 1021), 'corus.io.skip_header', 'skip_header', (['lines'], {}), '(lines)\n', (1014, 1021), False, 'from corus.io import load_lines, parse_tsv, skip_header\n'), ((1036, 1052), 'corus.io.parse_tsv', 'parse_tsv', (['lines'], {}), '(lines)\n', (1045, 1052), False, 'from corus.io import load_lines, parse_tsv, skip_h... |
# -*- coding: utf-8 -*-
from tqdm import tqdm
import pandas as pd
n_samples = 3000
n_jobs = 1
max_len = 100
class sample():
def take_samples(model,n_batch):
n = n_samples
samples = []
with tqdm(total=n_samples, desc='Generating samples') as T:
while n > 0:
current_samples = model.sample(min... | [
"pandas.DataFrame",
"tqdm.tqdm"
] | [((470, 511), 'pandas.DataFrame', 'pd.DataFrame', (['samples'], {'columns': "['SMILES']"}), "(samples, columns=['SMILES'])\n", (482, 511), True, 'import pandas as pd\n'), ((204, 252), 'tqdm.tqdm', 'tqdm', ([], {'total': 'n_samples', 'desc': '"""Generating samples"""'}), "(total=n_samples, desc='Generating samples')\n",... |
#-------关联C++库---------------
import ctypes
import platform
system = platform.system()
if system == "Windows":
pre = "./"
suff = ".dll"
else:
pre = "./lib"
suff = ".so"
libfile = ctypes.cdll.LoadLibrary
filename = pre+"GraphicsAnalyse"+suff
postPro = libfile(filename)
import MainWindow
#--------------------... | [
"MainWindow.script_Properties_streamline_seeds_type",
"MainWindow.script_Properties_scalarBarFontSize",
"MainWindow.script_openFile",
"MainWindow.script_Properties_solidColor",
"MainWindow.script_Properties_view_background2Color",
"MainWindow.script_Properties_show_cubeAxes",
"MainWindow.script_Properti... | [((71, 88), 'platform.system', 'platform.system', ([], {}), '()\n', (86, 88), False, 'import platform\n'), ((405, 447), 'MainWindow.script_openFile', 'MainWindow.script_openFile', (['id', 'type', 'file'], {}), '(id, type, file)\n', (431, 447), False, 'import MainWindow\n'), ((495, 535), 'MainWindow.script_applyClicked'... |
import logging
import operator
import sqlite3
import uritools
from mopidy import backend, models
from mopidy.models import Ref, SearchResult
from . import Extension, schema
logger = logging.getLogger(__name__)
def date_ref(date):
return Ref.directory(
uri=uritools.uricompose("local", None, "directory",... | [
"uritools.urisplit",
"uritools.uricompose",
"operator.attrgetter",
"sqlite3.connect",
"mopidy.models.SearchResult",
"mopidy.models.Ref.directory",
"logging.getLogger"
] | [((185, 212), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (202, 212), False, 'import logging\n'), ((630, 694), 'mopidy.models.Ref.directory', 'models.Ref.directory', ([], {'uri': 'ROOT_DIRECTORY_URI', 'name': '"""Local media"""'}), "(uri=ROOT_DIRECTORY_URI, name='Local media')\n", (650... |
"""
Unit tests to verify utility_rank module.
"""
import unittest
import numpy as np
from pymcdm import weights
from utility_weights import UtilityWeights
class TestUtilityNormalization(unittest.TestCase):
"""
Class used for the verification of implementation of normalization formulas
"""
def setUp(sel... | [
"unittest.main",
"utility_weights.UtilityWeights",
"pymcdm.weights.equal_weights",
"numpy.testing.assert_array_equal",
"numpy.array"
] | [((1788, 1803), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1801, 1803), False, 'import unittest\n'), ((348, 418), 'numpy.array', 'np.array', (['[[1, 1, 2, 3, 3, 1], [2, 3, 1, 2, 1, 2], [4, 5, 3, 1, 2, 3]]'], {}), '([[1, 1, 2, 3, 3, 1], [2, 3, 1, 2, 1, 2], [4, 5, 3, 1, 2, 3]])\n', (356, 418), True, 'import num... |
import datetime
import logging
import multiprocessing as mp
import threading
import wave
from enum import Enum
from multiprocessing import Process
from os.path import dirname
from typing import Dict, List
import numpy as np
import pandas as pd
import pyaudio
# from scipy.io import wavfile # TODO broken
from hipsterp... | [
"sauronx.stamp",
"threading.Thread",
"wave.open",
"logging.exception",
"logging.debug",
"logging.warning",
"os.path.dirname",
"hipsterplot.HipsterPlotter",
"scipy.io.wavfile.read",
"logging.info",
"datetime.datetime.strptime",
"pyaudio.PyAudio",
"datetime.datetime.now"
] | [((2729, 2766), 'threading.Thread', 'threading.Thread', ([], {'target': 'self._record'}), '(target=self._record)\n', (2745, 2766), False, 'import threading\n'), ((5479, 5528), 'logging.info', 'logging.info', (['"""Finished writing microphone data."""'], {}), "('Finished writing microphone data.')\n", (5491, 5528), Fals... |
from distutils.core import setup
with open('README.rst') as f:
readme = f.read()
setup(
name='echo_kernel',
version='1.1',
packages=['echo_kernel'],
description='Simple example kernel for Jupyter',
long_description=readme,
author='<NAME>',
author_email='<EMAIL>',
url='https://githu... | [
"distutils.core.setup"
] | [((87, 537), 'distutils.core.setup', 'setup', ([], {'name': '"""echo_kernel"""', 'version': '"""1.1"""', 'packages': "['echo_kernel']", 'description': '"""Simple example kernel for Jupyter"""', 'long_description': 'readme', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'url': '"""https://github.com/jupyter... |
#! /usr/bin/env python3
# regex_search.py - simple text search utilizing regex engine
import re
from pathlib import Path
def regex_search(regex, path):
"""
Searches text file at path for matches to the specified pattern
:param re.Pattern regex: pattern to search for
:param Path path: path to source ... | [
"pathlib.Path",
"re.compile"
] | [((491, 508), 're.compile', 're.compile', (['regex'], {}), '(regex)\n', (501, 508), False, 'import re\n'), ((871, 1104), 're.compile', 're.compile', (['"""(\n [a-zA-Z0-9._%+-]+ # username\n @ # @ symbol\n [a-zA-Z0-9.-]+ # domain name\n (\\\\.[a-zA-Z]{2,4... |
# -*- coding: utf-8 -*-
# Copyright 2018 IBM RESEARCH. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | [
"numpy.zeros",
"qiskit.converters.circuit_to_dag"
] | [((1402, 1413), 'numpy.zeros', 'np.zeros', (['(4)'], {}), '(4)\n', (1410, 1413), True, 'import numpy as np\n'), ((1471, 1494), 'qiskit.converters.circuit_to_dag', 'circuit_to_dag', (['circuit'], {}), '(circuit)\n', (1485, 1494), False, 'from qiskit.converters import circuit_to_dag\n')] |
"""
References:
-----------
[1] http://2019.icbeb.org/Challenge.html
"""
import math
from typing import Union, Optional, Sequence
from numbers import Real
import numpy as np
__all__ = [
"compute_metrics",
]
def compute_metrics(rpeaks_truths:Sequence[Union[np.ndarray,Sequence[int]]], rpeaks_preds:Sequence[Union... | [
"math.isnan",
"numpy.abs",
"numpy.sum",
"numpy.where",
"numpy.array"
] | [((3230, 3251), 'math.isnan', 'math.isnan', (['hr_ans[i]'], {}), '(hr_ans[i])\n', (3240, 3251), False, 'import math\n'), ((2860, 2880), 'numpy.sum', 'np.sum', (['record_flags'], {}), '(record_flags)\n', (2866, 2880), True, 'import numpy as np\n'), ((4953, 4973), 'numpy.sum', 'np.sum', (['record_flags'], {}), '(record_f... |
from django.contrib import admin
from . import models
from . import actions
class FornecedoresForm(admin.ModelAdmin):
readonly_fields = ['id_user_cad', 'id_user_alt']
search_fields = ['razao_social', 'cnpj', 'email', 'telefone']
list_filter = ['id_user_cad', 'id_user_alt']
actions = [actions.at... | [
"django.contrib.admin.site.register"
] | [((562, 605), 'django.contrib.admin.site.register', 'admin.site.register', (['models.NaturezaDespesa'], {}), '(models.NaturezaDespesa)\n', (581, 605), False, 'from django.contrib import admin\n'), ((607, 643), 'django.contrib.admin.site.register', 'admin.site.register', (['models.Projetos'], {}), '(models.Projetos)\n',... |
import os
from pecan import conf
from pecan.rest import RestController
from wsmeext.pecan import wsexpose
from mailase.api.model import (Mail,
Mailbox,
MailBrief,
MailSearchRecentResult)
import mailase.search.dbapi as search_... | [
"mailase.api.model.MailBrief.inflate",
"mailase.search.dbapi.get_recently_modified",
"mailase.search.dbapi.server_is_reachable",
"mailase.api.model.MailSearchRecentResult",
"mailase.api.model.Mailbox",
"wsmeext.pecan.wsexpose",
"mailase.api.model.Mail.from_id",
"os.listdir"
] | [((503, 522), 'wsmeext.pecan.wsexpose', 'wsexpose', (['[Mailbox]'], {}), '([Mailbox])\n', (511, 522), False, 'from wsmeext.pecan import wsexpose\n'), ((763, 795), 'wsmeext.pecan.wsexpose', 'wsexpose', (['Mailbox', 'str', 'int', 'int'], {}), '(Mailbox, str, int, int)\n', (771, 795), False, 'from wsmeext.pecan import wse... |
"""
Joins two nodes owned by guest0 and splits them again using resources.offcut
to test if the two commands work properly on the basic scale.
"""
#pragma out
import seash
import sys
command_list = [
'loadkeys guest3',
'as guest3',
'browse',
'on browsegood',
'update',
'join',
'on %3',
'split re... | [
"seash.command_loop"
] | [((341, 373), 'seash.command_loop', 'seash.command_loop', (['command_list'], {}), '(command_list)\n', (359, 373), False, 'import seash\n')] |
from django.db import models
import mongoengine
from mongoengine import Document, EmbeddedDocument
from mongoengine.fields import *
import os
# Create your models here.
class Greeting(models.Model):
when = models.DateTimeField('date created', auto_now_add=True)
MONGODB_USER = os.environ.get("DATABASE_USER")
MONG... | [
"os.environ.get",
"mongoengine.connect",
"django.db.models.DateTimeField"
] | [((284, 315), 'os.environ.get', 'os.environ.get', (['"""DATABASE_USER"""'], {}), "('DATABASE_USER')\n", (298, 315), False, 'import os\n'), ((335, 370), 'os.environ.get', 'os.environ.get', (['"""DATABASE_PASSWORD"""'], {}), "('DATABASE_PASSWORD')\n", (349, 370), False, 'import os\n'), ((515, 566), 'mongoengine.connect',... |
from txgsm.service import TxGSMServiceMaker
serviceMaker = TxGSMServiceMaker()
| [
"txgsm.service.TxGSMServiceMaker"
] | [((59, 78), 'txgsm.service.TxGSMServiceMaker', 'TxGSMServiceMaker', ([], {}), '()\n', (76, 78), False, 'from txgsm.service import TxGSMServiceMaker\n')] |
#!/usr/bin/env python3
from __future__ import print_function
from collections import defaultdict, deque
import sys
import time
import math
DIRS = [(0, -1), (1, 0), (0, 1), (-1, 0)]
def add(v1, v2):
return tuple(x + y for x, y in zip(v1, v2))
def main(args):
data = [s.rstrip() for s in sys.stdin]
boar... | [
"collections.defaultdict",
"collections.deque"
] | [((324, 349), 'collections.defaultdict', 'defaultdict', (["(lambda : ' ')"], {}), "(lambda : ' ')\n", (335, 349), False, 'from collections import defaultdict, deque\n'), ((1552, 1572), 'collections.deque', 'deque', (['[(0, source)]'], {}), '([(0, source)])\n', (1557, 1572), False, 'from collections import defaultdict, ... |
import numpy as np
import tensorflow as tf
def weight_ones(shape, name):
initial = tf.constant(1.0, shape=shape, name=name)
return tf.Variable(initial)
def weight_xavi_init(shape, name):
initial = tf.get_variable(name=name, shape=shape,
initializer=tf.contrib.layers.xavier_initializer())
... | [
"tensorflow.contrib.layers.xavier_initializer",
"tensorflow.random_uniform",
"tensorflow.summary.scalar",
"tensorflow.subtract",
"tensorflow.image.random_contrast",
"tensorflow.concat",
"tensorflow.constant",
"tensorflow.image.random_hue",
"tensorflow.placeholder",
"tensorflow.shape",
"tensorflo... | [((88, 128), 'tensorflow.constant', 'tf.constant', (['(1.0)'], {'shape': 'shape', 'name': 'name'}), '(1.0, shape=shape, name=name)\n', (99, 128), True, 'import tensorflow as tf\n'), ((140, 160), 'tensorflow.Variable', 'tf.Variable', (['initial'], {}), '(initial)\n', (151, 160), True, 'import tensorflow as tf\n'), ((383... |
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import atexit
import builtins
import decimal
import functools
import logging
import os
import sys
from .comm import is_master_process as is_master_proc
def _suppress_print():
"""
Suppresses printing from the current process.
"""
d... | [
"logging.Formatter",
"logging.StreamHandler",
"logging.FileHandler",
"logging.getLogger"
] | [((861, 880), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (878, 880), False, 'import logging\n'), ((973, 1046), 'logging.Formatter', 'logging.Formatter', (['"""[%(asctime)s]: %(message)s"""'], {'datefmt': '"""%m/%d %H:%M:%S"""'}), "('[%(asctime)s]: %(message)s', datefmt='%m/%d %H:%M:%S')\n", (990, 1046)... |
# 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... | [
"sqlalchemy.MetaData",
"sqlalchemy.Table",
"sqlalchemy.ForeignKey"
] | [((759, 769), 'sqlalchemy.MetaData', 'MetaData', ([], {}), '()\n', (767, 769), False, 'from sqlalchemy import MetaData, Integer, Table, ForeignKey\n'), ((821, 871), 'sqlalchemy.Table', 'Table', (['"""storage_reservations"""', 'meta'], {'autoload': '(True)'}), "('storage_reservations', meta, autoload=True)\n", (826, 871... |
"""Module for authentication utilities."""
import bcrypt
def hash_password_with_salt(password: str, salt: bytes) -> bytes:
"""Hash a password string with a salt bytes."""
return bcrypt.hashpw(bytes(password.encode()), salt)
def generate_salt_hash_password(password: str) -> (bytes, bytes):
"""Hash a pass... | [
"bcrypt.gensalt"
] | [((422, 438), 'bcrypt.gensalt', 'bcrypt.gensalt', ([], {}), '()\n', (436, 438), False, 'import bcrypt\n')] |
import os
import sys
from .util import get_timestamp
# print to file and std_out simultaneously
class PrintLogger(object):
def __init__(self, log_path):
self.terminal = sys.stdout
self.log = open(os.path.join(log_path, 'output.txt'), 'a')
def write(self, message):
self.t... | [
"tensorboard_logger.Logger",
"os.path.join"
] | [((709, 751), 'os.path.join', 'os.path.join', (['self.log_dir', '"""loss_log.txt"""'], {}), "(self.log_dir, 'loss_log.txt')\n", (721, 751), False, 'import os\n'), ((1046, 1087), 'os.path.join', 'os.path.join', (['self.log_dir', '"""val_log.txt"""'], {}), "(self.log_dir, 'val_log.txt')\n", (1058, 1087), False, 'import o... |
# Copyright (C) 2019 Harvard University. All Rights Reserved. Unauthorized
# copying of this file, via any medium is strictly prohibited Proprietary and
# confidential
# Developed by <NAME> <<EMAIL>>,
# <<EMAIL>>.
# ==================================================================... | [
"keras.layers.Cropping2D",
"unet.ops.up_conv",
"keras.layers.Dropout",
"unet.ops.MaxPoolingND",
"keras.models.Model",
"unet.ops.conv_layer",
"keras.layers.Concatenate",
"keras.layers.Input"
] | [((781, 805), 'keras.layers.Input', 'KL.Input', ([], {'shape': 'im_shape'}), '(shape=im_shape)\n', (789, 805), True, 'import keras.layers as KL\n'), ((1797, 1829), 'keras.models.Model', 'Model', ([], {'inputs': 'x', 'outputs': 'out[-1]'}), '(inputs=x, outputs=out[-1])\n', (1802, 1829), False, 'from keras.models import ... |
from django.forms import (
CharField,
EmailField,
Form,
MultipleChoiceField,
Textarea,
TextInput,
)
from django.forms.widgets import CheckboxSelectMultiple
from django.utils.html import strip_tags
class AdHocEmailForm(Form):
use_required_attribute = False
required_css_class = 'required... | [
"django.forms.widgets.CheckboxSelectMultiple",
"django.forms.TextInput",
"django.forms.EmailField",
"django.forms.Textarea"
] | [((494, 533), 'django.forms.EmailField', 'EmailField', ([], {'required': '(True)', 'label': '"""From"""'}), "(required=True, label='From')\n", (504, 533), False, 'from django.forms import CharField, EmailField, Form, MultipleChoiceField, Textarea, TextInput\n'), ((420, 479), 'django.forms.widgets.CheckboxSelectMultiple... |
from solution import final_count
from solution import final_count2
assert final_count(65, 8921, 5) == 1
print(final_count(679, 771, 40000000))
assert final_count2(65, 8921, 5000000) == 309
print(final_count2(679, 771, 5000000))
| [
"solution.final_count2",
"solution.final_count"
] | [((75, 99), 'solution.final_count', 'final_count', (['(65)', '(8921)', '(5)'], {}), '(65, 8921, 5)\n', (86, 99), False, 'from solution import final_count\n'), ((111, 142), 'solution.final_count', 'final_count', (['(679)', '(771)', '(40000000)'], {}), '(679, 771, 40000000)\n', (122, 142), False, 'from solution import fi... |
# from __future__ import absolute_import
# import os
import git
def get_git_root(path):
git_repo = git.Repo(path, search_parent_directories=True)
git_root = git_repo.git.rev_parse("--show-toplevel")
return git_root
# def get_conda_dir(cfgfile):
# with open(cfgfile) as f:
# directory = f.readli... | [
"git.Repo"
] | [((104, 150), 'git.Repo', 'git.Repo', (['path'], {'search_parent_directories': '(True)'}), '(path, search_parent_directories=True)\n', (112, 150), False, 'import git\n')] |
import os
import time
import pandas as pd
import numpy as np
import tsam.timeseriesaggregation as tsam
def test_segmentation():
raw = pd.read_csv(os.path.join(os.path.dirname(__file__),'..','examples','testdata.csv'), index_col = 0)
orig_raw = pd.read_csv(os.path.join(os.path.dirname(__file__),'..','exam... | [
"numpy.testing.assert_array_almost_equal",
"os.path.dirname",
"tsam.timeseriesaggregation.TimeSeriesAggregation",
"time.time"
] | [((407, 418), 'time.time', 'time.time', ([], {}), '()\n', (416, 418), False, 'import time\n'), ((438, 577), 'tsam.timeseriesaggregation.TimeSeriesAggregation', 'tsam.TimeSeriesAggregation', (['raw'], {'noTypicalPeriods': '(20)', 'hoursPerPeriod': '(24)', 'clusterMethod': '"""hierarchical"""', 'segmentation': '(True)', ... |
#!/usr/bin/env python
from iris_sdk.models.base_resource import BaseData
from iris_sdk.models.maps.lidb_tn_group import LidbTnGroupMap
from iris_sdk.models.data.telephone_number_list import TelephoneNumberList
class LidbTnGroupData(LidbTnGroupMap, BaseData):
def __init__(self):
self.telephone_numbers = T... | [
"iris_sdk.models.data.telephone_number_list.TelephoneNumberList"
] | [((319, 340), 'iris_sdk.models.data.telephone_number_list.TelephoneNumberList', 'TelephoneNumberList', ([], {}), '()\n', (338, 340), False, 'from iris_sdk.models.data.telephone_number_list import TelephoneNumberList\n')] |
"""
===============
=== Purpose ===
===============
A simple wrapper for the `nowcasts` table in the Delphi database.
=======================
=== Data Dictionary ===
=======================
Nowcasts (value and standard deviation) are stored in the `nowcasts` table.
+----------+-------------+------+-----+---------+-... | [
"time.time"
] | [((2315, 2326), 'time.time', 'time.time', ([], {}), '()\n', (2324, 2326), False, 'import time\n')] |
# This file is part of nose-perftest.
#
# Copyright (c) 2012, <NAME> and AUTHORS
# 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 copyrigh... | [
"perfdump.models.TestTime.get_slowest_files",
"perfdump.models.TestTime.get_slowest_tests",
"perfdump.models.SetupTime.get_slowest_files",
"perfdump.models.SetupTime.get_slowest_tests"
] | [((2204, 2234), 'perfdump.models.TestTime.get_slowest_tests', 'TestTime.get_slowest_tests', (['(10)'], {}), '(10)\n', (2230, 2234), False, 'from perfdump.models import TestTime, SetupTime\n'), ((2557, 2587), 'perfdump.models.TestTime.get_slowest_files', 'TestTime.get_slowest_files', (['(10)'], {}), '(10)\n', (2583, 258... |
import time
from asyncio import BufferedProtocol
from typing import Optional, TYPE_CHECKING
from bxcommon.network.abstract_socket_connection_protocol import AbstractSocketConnectionProtocol
from bxcommon.network.ip_endpoint import IpEndpoint
from bxutils import logging
from bxutils.logging import LogRecordType
if TYP... | [
"bxcommon.network.abstract_socket_connection_protocol.AbstractSocketConnectionProtocol.__init__",
"bxutils.logging.get_logger",
"time.time"
] | [((502, 530), 'bxutils.logging.get_logger', 'logging.get_logger', (['__name__'], {}), '(__name__)\n', (520, 530), False, 'from bxutils import logging\n'), ((564, 630), 'bxutils.logging.get_logger', 'logging.get_logger', (['LogRecordType.NetworkTroubleshooting', '__name__'], {}), '(LogRecordType.NetworkTroubleshooting, ... |
###############################################################################
# PyDial: Multi-domain Statistical Spoken Dialogue System Software
###############################################################################
#
# Copyright 2015 - 2018
# Cambridge University Engineering Department Dialogue Systems Grou... | [
"utils.ContextLogger.getLogger"
] | [((1481, 1508), 'utils.ContextLogger.getLogger', 'ContextLogger.getLogger', (['""""""'], {}), "('')\n", (1504, 1508), False, 'from utils import ContextLogger\n')] |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.8 on 2018-05-31 09:44
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('shopping_cart', '0001_initial'),
]
operations = [
migrations.RemoveField(
... | [
"django.db.migrations.RemoveField"
] | [((287, 341), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""order"""', 'name': '"""VAT"""'}), "(model_name='order', name='VAT')\n", (309, 341), False, 'from django.db import migrations\n'), ((386, 452), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_na... |
import unittest
from iso639 import Lang, iter_langs
from iso639.exceptions import InvalidLanguageValue, DeprecatedLanguageValue
class TestLang(unittest.TestCase):
"""Test the Lang class."""
lang_vals = {tg: set(d.keys()) for tg, d in Lang._data.items()}
lang_vals["changed_to"] = {
d["change_to"] ... | [
"unittest.main",
"iso639.Lang._deprecated.values",
"iso639.Lang",
"iso639.Lang._data.items",
"iso639.Lang._deprecated.keys",
"iso639.iter_langs"
] | [((9696, 9711), 'unittest.main', 'unittest.main', ([], {}), '()\n', (9709, 9711), False, 'import unittest\n'), ((413, 436), 'iso639.Lang._deprecated.keys', 'Lang._deprecated.keys', ([], {}), '()\n', (434, 436), False, 'from iso639 import Lang, iter_langs\n'), ((602, 612), 'iso639.Lang', 'Lang', (['"""fr"""'], {}), "('f... |
import collections
from operator import contains, eq, not_
from typing import AbstractSet, Callable, Tuple
from ..exceptions import ForbiddenExpressionError, NeuroLangException
from ..expression_walker import (
ExpressionBasicEvaluator,
ReplaceExpressionsByValues,
add_match,
)
from ..expressions import Con... | [
"collections.defaultdict"
] | [((16169, 16197), 'collections.defaultdict', 'collections.defaultdict', (['int'], {}), '(int)\n', (16192, 16197), False, 'import collections\n'), ((17188, 17216), 'collections.defaultdict', 'collections.defaultdict', (['int'], {}), '(int)\n', (17211, 17216), False, 'import collections\n')] |
"""
{func} beautified_json and {func} plain_json is simple to use, and it is as same as use {std} json with {func} encodable
"""
from collections import namedtuple, defaultdict, OrderedDict
from json import dumps, load as _load, loads as _loads
from re import sub
from Utils import *
JsonObject = object # indicat... | [
"json.load",
"json.loads",
"re.match",
"collections.defaultdict",
"collections.OrderedDict"
] | [((5666, 5692), 'collections.defaultdict', 'defaultdict', (['(lambda : None)'], {}), '(lambda : None)\n', (5677, 5692), False, 'from collections import namedtuple, defaultdict, OrderedDict\n'), ((5587, 5604), 'json.loads', '_loads', (['json_text'], {}), '(json_text)\n', (5593, 5604), True, 'from json import dumps, load... |
import random
from direct.interval import IntervalGlobal as intervals
from .monster import MonsterActor
from . import effects
from . import gamedb
class Combatant:
def __init__(self, monster, parent_node):
gdb = gamedb.get_instance()
self._monster = monster
form = monster.form
se... | [
"direct.interval.IntervalGlobal.Func",
"random.randrange"
] | [((375, 398), 'random.randrange', 'random.randrange', (['(0)', '(10)'], {}), '(0, 10)\n', (391, 398), False, 'import random\n'), ((1956, 2059), 'direct.interval.IntervalGlobal.Func', 'intervals.Func', (['controller.display_message', 'f"""{self.name} is using {ability.name} on {target.name}"""'], {}), "(controller.displ... |
"""
The pipeline for realizing classification. Consists of a data pre-processing pipeline, a training
module for generating and storing classifiers and finally a procedure to load a defined classifer.
Generic pipeline structure:
1. Tokenization
2. Instance feature cleaning
3. Noise removal
4. Feature Extraction
5. C... | [
"pickle.dump",
"pickle.load"
] | [((1208, 1222), 'pickle.load', 'pickle.load', (['f'], {}), '(f)\n', (1219, 1222), False, 'import pickle\n'), ((1334, 1365), 'pickle.dump', 'pickle.dump', (['self.classifier', 'f'], {}), '(self.classifier, f)\n', (1345, 1365), False, 'import pickle\n')] |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import ... | [
"pulumi.get",
"pulumi.getter",
"pulumi.ResourceOptions",
"pulumi.set"
] | [((7140, 7172), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""targetNode"""'}), "(name='targetNode')\n", (7153, 7172), False, 'import pulumi\n'), ((8150, 8184), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""cloneStorage"""'}), "(name='cloneStorage')\n", (8163, 8184), False, 'import pulumi\n'), ((11819, 1185... |
from sklearn.linear_model import LogisticRegression
from modelbase import ModelBase
class SkLogistic(ModelBase):
def __init__(self):
ModelBase.__init__(self)
self.model = LogisticRegression()
| [
"modelbase.ModelBase.__init__",
"sklearn.linear_model.LogisticRegression"
] | [((146, 170), 'modelbase.ModelBase.__init__', 'ModelBase.__init__', (['self'], {}), '(self)\n', (164, 170), False, 'from modelbase import ModelBase\n'), ((192, 212), 'sklearn.linear_model.LogisticRegression', 'LogisticRegression', ([], {}), '()\n', (210, 212), False, 'from sklearn.linear_model import LogisticRegression... |
import pytest
from models.brand import Brand
from models.customer import Customer
from models.giftcard import GiftCard
from service.gift_card_service import GiftCardService
class TestGiftService:
# def setup(self):
# # create brands
# apple = Brand("Apple", 5)
# walmart = Brand("Walmart"... | [
"models.giftcard.GiftCard",
"service.gift_card_service.GiftCardService.run",
"pytest.raises",
"models.brand.Brand",
"models.customer.Customer"
] | [((752, 769), 'models.brand.Brand', 'Brand', (['"""Apple"""', '(5)'], {}), "('Apple', 5)\n", (757, 769), False, 'from models.brand import Brand\n'), ((788, 808), 'models.brand.Brand', 'Brand', (['"""Walmart"""', '(15)'], {}), "('Walmart', 15)\n", (793, 808), False, 'from models.brand import Brand\n'), ((826, 845), 'mod... |
import io
import re
from setuptools import setup
try:
with open('README.md') as f:
readme = f.read()
except IOError:
readme = ''
with io.open('doccov/__init__.py', 'rt', encoding='utf8') as f:
version = re.search(r'__version__ = \'(.*?)\'', f.read()).group(1)
def _requires_from_file(filename):
... | [
"setuptools.setup",
"io.open"
] | [((368, 945), 'setuptools.setup', 'setup', ([], {'name': '"""doc-cov"""', 'version': 'version', 'url': '"""https://github.com/cocodrips/doc-cov"""', 'license': '"""MIT"""', 'author': '"""ku-mu"""', 'author_email': '"""<EMAIL>"""', 'description': '"""doc-cov is a tool for measuring docstring coverage of Python project""... |
from guillotina import configure
from guillotina import app_settings
@configure.vocabulary(name="content_layouts")
class ContentLayoutVocabulary:
def __init__(self, context):
self.context = context
if hasattr(self.context, "context"):
self.values = app_settings["layouts"].get(self.cont... | [
"guillotina.configure.vocabulary"
] | [((72, 116), 'guillotina.configure.vocabulary', 'configure.vocabulary', ([], {'name': '"""content_layouts"""'}), "(name='content_layouts')\n", (92, 116), False, 'from guillotina import configure\n')] |
"""
FieldDefinition
================
"""
from ansys import dpf
from ansys.grpc.dpf import (base_pb2,
field_definition_pb2, field_definition_pb2_grpc)
from ansys.dpf.core.common import natures, shell_layers
from ansys.dpf.core.dimensionality import Dimensionality
class FieldDefinition:
... | [
"ansys.grpc.dpf.field_definition_pb2_grpc.FieldDefinitionServiceStub",
"ansys.dpf.core.common.shell_layers",
"ansys.dpf.core.common.natures",
"ansys.grpc.dpf.field_definition_pb2.FieldDefinitionUpdateRequest",
"ansys.grpc.dpf.base_pb2.Empty",
"ansys.dpf.core._global_server"
] | [((2115, 2146), 'ansys.dpf.core.common.shell_layers', 'shell_layers', (['(enum_val.real - 1)'], {}), '(enum_val.real - 1)\n', (2127, 2146), False, 'from ansys.dpf.core.common import natures, shell_layers\n'), ((3186, 3237), 'ansys.grpc.dpf.field_definition_pb2.FieldDefinitionUpdateRequest', 'field_definition_pb2.FieldD... |
# Generated by Django 3.2.5 on 2021-07-05 10:49
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('manager', '0017_auto_20210629_1650'),
]
operations = [
migrations.AddField(
model_name='shipment',
name='reference',... | [
"django.db.models.CharField"
] | [((339, 394), 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'max_length': '(100)', 'null': '(True)'}), '(blank=True, max_length=100, null=True)\n', (355, 394), False, 'from django.db import migrations, models\n'), ((522, 576), 'django.db.models.CharField', 'models.CharField', ([], {'blank':... |
from prkng.models import ParkingLots, Slots
from flask import jsonify, Blueprint, request, send_from_directory
import os
explorer = Blueprint('explorer', __name__, url_prefix='/explorer')
slot_props = (
'id',
'geojson',
'rules',
'button_locations',
'way_name'
)
def init_explorer(app):
"""
... | [
"prkng.models.Slots.get_byid",
"flask.Blueprint",
"flask.request.args.get",
"os.path.realpath",
"flask.jsonify",
"prkng.models.ParkingLots.get_boundbox",
"flask.send_from_directory",
"os.path.join"
] | [((135, 190), 'flask.Blueprint', 'Blueprint', (['"""explorer"""', '__name__'], {'url_prefix': '"""/explorer"""'}), "('explorer', __name__, url_prefix='/explorer')\n", (144, 190), False, 'from flask import jsonify, Blueprint, request, send_from_directory\n'), ((1015, 1062), 'flask.send_from_directory', 'send_from_direct... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time: 2018/2/28 下午2:05
# @Author: BlackMatrix
# @Site: https://github.com/blackmatrix7
# @File: __init__.py
# @Software: PyCharm
import logging
from .user import *
from .dept import *
from .role import *
from functools import partial
from ..foundation import dingtalk_met... | [
"functools.partial"
] | [((377, 418), 'functools.partial', 'partial', (['dingtalk_method'], {'methods': 'METHODS'}), '(dingtalk_method, methods=METHODS)\n', (384, 418), False, 'from functools import partial\n')] |
from django.db import models
class Artist(models.Model):
"""Database model for the Artists"""
name = models.CharField('Name', max_length=50, unique=True)
artist_poster = models.URLField(blank=True, null=True)
slug = models.SlugField(max_length=50, null=True, blank=True, unique=True)
class Meta:
... | [
"django.db.models.URLField",
"django.db.models.CharField",
"django.db.models.ForeignKey",
"django.db.models.PositiveIntegerField",
"django.db.models.SlugField"
] | [((111, 163), 'django.db.models.CharField', 'models.CharField', (['"""Name"""'], {'max_length': '(50)', 'unique': '(True)'}), "('Name', max_length=50, unique=True)\n", (127, 163), False, 'from django.db import models\n'), ((184, 222), 'django.db.models.URLField', 'models.URLField', ([], {'blank': '(True)', 'null': '(Tr... |
# Copyright (c) 2019, NVIDIA 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://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | [
"os.path.abspath",
"cudf.concat",
"logging.getLogger"
] | [((682, 709), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (699, 709), False, 'import logging\n'), ((1038, 1063), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (1053, 1063), False, 'import os\n'), ((3385, 3431), 'cudf.concat', 'cudf.concat', (['[parsed_datafr... |
#//----------------------------------------------------------------------
#// Copyright 2010-2011 Mentor Graphics Corporation
#// Copyright 2010-2011 Synopsys, Inc
#// Copyright 2019-2020 <NAME> (tpoikela)
#// All Rights Reserved Worldwide
#//
#// Licensed under the Apache License, Version 2.0 (the
#// "Lic... | [
"uvm.uvm_component_utils",
"uvm.UVMTLMTime",
"uvm.UVMTLMBInitiatorSocket"
] | [((1970, 2000), 'uvm.uvm_component_utils', 'uvm_component_utils', (['initiator'], {}), '(initiator)\n', (1989, 2000), False, 'from uvm import UVMComponent, uvm_component_utils, UVMTLMTime, UVMTLMBInitiatorSocket\n'), ((1281, 1317), 'uvm.UVMTLMBInitiatorSocket', 'UVMTLMBInitiatorSocket', (['"""sock"""', 'self'], {}), "(... |
# Generated by Django 2.2.13 on 2020-06-30 12:15
import datetime
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('manast_site', '0001_initial'),
]
operations = [
migrations.CreateModel... | [
"django.db.models.CharField",
"django.db.models.ForeignKey",
"django.db.models.BooleanField",
"django.db.models.AutoField",
"django.db.models.DecimalField",
"django.db.models.IntegerField",
"django.db.models.DateField"
] | [((395, 488), '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", (411, 488), False, 'from django.db import migrations, models\... |
from tensorflow.python.ipu import ipu_infeed_queue
from tensorflow.python.ipu import ipu_outfeed_queue
from tensorflow.python.ipu import loops
from tensorflow.python.ipu import utils
from tensorflow.python.ipu import ipu_strategy
import tensorflow as tf
# The dataset for feeding the graphs
ds = tf.data.Dataset.from_te... | [
"tensorflow.python.ipu.utils.configure_ipu_system",
"tensorflow.python.ipu.loops.repeat",
"tensorflow.python.ipu.utils.create_ipu_config",
"tensorflow.constant",
"tensorflow.python.ipu.utils.auto_select_ipus",
"tensorflow.function",
"tensorflow.python.ipu.ipu_infeed_queue.IPUInfeedQueue",
"tensorflow.... | [((494, 549), 'tensorflow.python.ipu.ipu_infeed_queue.IPUInfeedQueue', 'ipu_infeed_queue.IPUInfeedQueue', (['ds'], {'feed_name': '"""infeed"""'}), "(ds, feed_name='infeed')\n", (525, 549), False, 'from tensorflow.python.ipu import ipu_infeed_queue\n'), ((566, 620), 'tensorflow.python.ipu.ipu_outfeed_queue.IPUOutfeedQue... |
from setuptools import setup
setup(name = 'statDistributions',
version = '1.0',
description = 'Gaussian and Binominal distributions',
packages = ['statDistributions'],
author = '<NAME>',
author_email = '<EMAIL>',
zip_safe = False)
| [
"setuptools.setup"
] | [((30, 226), 'setuptools.setup', 'setup', ([], {'name': '"""statDistributions"""', 'version': '"""1.0"""', 'description': '"""Gaussian and Binominal distributions"""', 'packages': "['statDistributions']", 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'zip_safe': '(False)'}), "(name='statDistributions', ver... |
from local_auth.models import UserProfile
from local_auth.serializers import UserProfileSerializer
from django.contrib.auth.models import User
def get_waiting_register_list():
user_profiles = UserProfile.get_waiting_list()
return UserProfileSerializer(user_profiles, many=True).data
def get_waiting_register_d... | [
"local_auth.serializers.UserProfileSerializer",
"local_auth.models.UserProfile.get_by_user_id",
"django.contrib.auth.models.User.objects.get",
"local_auth.models.UserProfile.get_waiting_list"
] | [((197, 227), 'local_auth.models.UserProfile.get_waiting_list', 'UserProfile.get_waiting_list', ([], {}), '()\n', (225, 227), False, 'from local_auth.models import UserProfile\n'), ((355, 390), 'local_auth.models.UserProfile.get_by_user_id', 'UserProfile.get_by_user_id', (['user_id'], {}), '(user_id)\n', (381, 390), Fa... |
import pyoxenmq
import ss
import time
import base64
import json
from nacl.encoding import HexEncoder, Base64Encoder
from nacl.hash import blake2b
from nacl.signing import VerifyKey
import nacl.exceptions
def test_expire_all(omq, random_mn, sk, exclude):
swarm = ss.get_swarm(omq, random_mn, sk)
mns = ss.random_... | [
"ss.random_swarm_members",
"json.loads",
"json.dumps",
"nacl.signing.VerifyKey",
"base64.b64decode",
"time.time",
"ss.get_swarm",
"ss.store_n"
] | [((267, 299), 'ss.get_swarm', 'ss.get_swarm', (['omq', 'random_mn', 'sk'], {}), '(omq, random_mn, sk)\n', (279, 299), False, 'import ss\n'), ((310, 352), 'ss.random_swarm_members', 'ss.random_swarm_members', (['swarm', '(2)', 'exclude'], {}), '(swarm, 2, exclude)\n', (333, 352), False, 'import ss\n'), ((498, 541), 'ss.... |
from typing import Dict, List, Optional
from credsweeper.file_handler.diff_content_provider import DiffContentProvider
from credsweeper.file_handler.files_provider import FilesProvider
from credsweeper.utils import Util
class PatchProvider(FilesProvider):
"""Provide data from a list of `.patch` files.
Allow... | [
"credsweeper.utils.Util.read_file",
"credsweeper.utils.Util.patch2files_diff",
"credsweeper.file_handler.diff_content_provider.DiffContentProvider"
] | [((1746, 1796), 'credsweeper.utils.Util.patch2files_diff', 'Util.patch2files_diff', (['raw_patch', 'self.change_type'], {}), '(raw_patch, self.change_type)\n', (1767, 1796), False, 'from credsweeper.utils import Util\n'), ((1522, 1547), 'credsweeper.utils.Util.read_file', 'Util.read_file', (['file_path'], {}), '(file_p... |
# Copyright © 2016-2021 <NAME> <<EMAIL>>
#
# Permission to use, copy, modify, and/or distribute this software for
# any purpose with or without fee is hereby granted, provided that the
# above copyright notice and this permission notice appear in all
# copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAI... | [
"os.path.isabs",
"pathlib.Path.home",
"os.environ.get",
"pathlib.Path",
"os.getenv"
] | [((2825, 2849), 'os.environ.get', 'os.environ.get', (['variable'], {}), '(variable)\n', (2839, 2849), False, 'import os\n'), ((3669, 3693), 'os.environ.get', 'os.environ.get', (['variable'], {}), '(variable)\n', (3683, 3693), False, 'import os\n'), ((4997, 5025), 'os.getenv', 'os.getenv', (['"""XDG_RUNTIME_DIR"""'], {}... |
from django.contrib import admin
from .models import Empleado
# Register your models here.
class EmpleadoAdmin(admin.ModelAdmin):
lista = ['nombre_completo', 'email', 'contacto', 'direccion']
admin.site.register(Empleado, EmpleadoAdmin)
| [
"django.contrib.admin.site.register"
] | [((199, 243), 'django.contrib.admin.site.register', 'admin.site.register', (['Empleado', 'EmpleadoAdmin'], {}), '(Empleado, EmpleadoAdmin)\n', (218, 243), False, 'from django.contrib import admin\n')] |
"""
Unittests for command module.
"""
import os
import pytest
from click.testing import CliRunner
import etcd3
import etcdgo.command
@pytest.fixture
def runner(mocker):
"""
Click runner client.
"""
mocker.patch('etcd3.Etcd3Client.__init__', return_value=None)
mocker.patch('etcdgo.config.Config.__i... | [
"click.testing.CliRunner"
] | [((361, 372), 'click.testing.CliRunner', 'CliRunner', ([], {}), '()\n', (370, 372), False, 'from click.testing import CliRunner\n')] |
# Original source here: https://www.kaggle.com/tunguz/logistic-regression-with-words-and-char-n-grams
import argparse
import gc
import pickle
import time
import pandas as pd
import scipy.sparse
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.model_selection import train_test_split
from toxic... | [
"argparse.ArgumentParser",
"pandas.read_csv",
"sklearn.model_selection.train_test_split",
"sklearn.feature_extraction.text.TfidfVectorizer",
"time.time",
"gc.collect",
"willump.evaluation.willump_executor.willump_execute"
] | [((663, 688), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (686, 688), False, 'import argparse\n'), ((814, 1111), 'willump.evaluation.willump_executor.willump_execute', 'willump_execute', ([], {'training_cascades': 'training_cascades', 'willump_train_function': 'willump_train_function', 'will... |
import os
from django.test import TestCase
from actions_api.combat import Combat
from character.models import Character, StatusEffects
class CombatTests(TestCase):
fixtures = [os.path.join("/Users", "Nigel", "HOBBY_PROJECTS", "GAME", "world", "full_backup.json")]
def test_combat_round(self):
"""
... | [
"character.models.Character.objects.get",
"actions_api.combat.Combat",
"character.models.StatusEffects.objects.all",
"character.models.StatusEffects.objects.filter",
"os.path.join",
"character.models.StatusEffects.objects.get"
] | [((184, 274), 'os.path.join', 'os.path.join', (['"""/Users"""', '"""Nigel"""', '"""HOBBY_PROJECTS"""', '"""GAME"""', '"""world"""', '"""full_backup.json"""'], {}), "('/Users', 'Nigel', 'HOBBY_PROJECTS', 'GAME', 'world',\n 'full_backup.json')\n", (196, 274), False, 'import os\n'), ((477, 504), 'character.models.Chara... |
import datetime
from django.test import TestCase
from boating.choices import MONDAY, SATURDAY, SUNDAY
from boating.models import Booking, OpeningTimes, HirePoint, Boat
from boating.views import place_booking
class HirePointMixin(object):
hire_point1 = None
hire_point2 = None
def setUp(self):
hi... | [
"boating.views.place_booking",
"datetime.date",
"datetime.datetime",
"boating.models.Boat.objects.create",
"datetime.timedelta",
"boating.models.HirePoint.objects.create",
"datetime.time"
] | [((332, 399), 'boating.models.HirePoint.objects.create', 'HirePoint.objects.create', ([], {'name': '"""HirePoint 1"""', 'description': '"""Mon-Fri"""'}), "(name='HirePoint 1', description='Mon-Fri')\n", (356, 399), False, 'from boating.models import Booking, OpeningTimes, HirePoint, Boat\n'), ((422, 489), 'boating.mode... |
# -*- coding: utf-8 -*-
# Import modules
import pytest
from google.cloud import bigquery
from tests.spells.base_test_spell import BaseTestSpell, SpellDB
# Import from package
from geomancer.backend.settings import SQLiteConfig
from geomancer.spells import LengthOf
params = [
SpellDB(
spell=LengthOf(
... | [
"geomancer.backend.settings.SQLiteConfig",
"pytest.fixture"
] | [((629, 680), 'pytest.fixture', 'pytest.fixture', ([], {'params': 'params', 'ids': "['roads-sqlite']"}), "(params=params, ids=['roads-sqlite'])\n", (643, 680), False, 'import pytest\n'), ((482, 496), 'geomancer.backend.settings.SQLiteConfig', 'SQLiteConfig', ([], {}), '()\n', (494, 496), False, 'from geomancer.backend.... |
# Generated by Django 2.2.16 on 2021-11-18 18:31
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('posts', '0010_comment'),
]
operations = [
migrations.AlterModelOptions(
name='comment',
... | [
"django.db.migrations.RemoveField",
"django.db.models.DateTimeField",
"django.db.migrations.AlterModelOptions"
] | [((252, 412), 'django.db.migrations.AlterModelOptions', 'migrations.AlterModelOptions', ([], {'name': '"""comment"""', 'options': "{'ordering': ('-pub_date',), 'verbose_name': 'Комментарий',\n 'verbose_name_plural': 'Комментарии'}"}), "(name='comment', options={'ordering': (\n '-pub_date',), 'verbose_name': 'Комм... |
""" Cisco_IOS_XR_group_cfg
This module contains IOS\-XR group YANG data
for flexible cli groups
Copyright (c) 2013\-2016 by Cisco Systems, Inc.
All rights reserved.
"""
from collections import OrderedDict
from ydk.types import Entity, EntityPath, Identity, Enum, YType, YLeaf, YLeafList, YList, LeafDataList, ... | [
"collections.OrderedDict",
"ydk.types.YLeaf",
"ydk.types.YList"
] | [((1124, 1173), 'collections.OrderedDict', 'OrderedDict', (["[('group', ('group', Groups.Group))]"], {}), "([('group', ('group', Groups.Group))])\n", (1135, 1173), False, 'from collections import OrderedDict\n'), ((1196, 1209), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (1207, 1209), False, 'from colle... |
"""Тесты для модуля search"""
import unittest
import search # pylint: disable=E0401
TEST_SEARCH_ONE_SYMBOL = [
('', 'a', False, 'first', 1, None),
('', 'a', True, 'first', 1, None),
('', 'a', False, 'last', 1, None),
('', 'a', True, 'last', 1, None),
('a', 'a', False, 'first', 1, (0, )),
(... | [
"search.search"
] | [((3205, 3271), 'search.search', 'search.search', (['string', 'sub_string', 'case_sensitivity', 'method', 'count'], {}), '(string, sub_string, case_sensitivity, method, count)\n', (3218, 3271), False, 'import search\n'), ((3677, 3743), 'search.search', 'search.search', (['string', 'sub_string', 'case_sensitivity', 'met... |
from __future__ import print_function, unicode_literals
from gratipay import fake_data
from gratipay.testing import Harness
from gratipay.cli.fake_data import main
class TestFakeData(Harness):
def test_fake_data_cli(self):
num_participants = 6
num_tips = 25
num_teams = 5
num_pack... | [
"gratipay.fake_data.fake_participant_identity",
"gratipay.fake_data.fake_team",
"gratipay.cli.fake_data.main"
] | [((337, 403), 'gratipay.cli.fake_data.main', 'main', (['self.db', 'num_participants', 'num_tips', 'num_teams', 'num_packages'], {}), '(self.db, num_participants, num_tips, num_teams, num_packages)\n', (341, 403), False, 'from gratipay.cli.fake_data import main\n'), ((1035, 1079), 'gratipay.fake_data.fake_participant_id... |
# coding: utf-8
#
# Copyright (c) 2020-2021 Hopenly srl.
#
# This file is part of Ilyde.
#
# 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
#
#... | [
"apis_server.util.deserialize_model"
] | [((3890, 3923), 'apis_server.util.deserialize_model', 'util.deserialize_model', (['dikt', 'cls'], {}), '(dikt, cls)\n', (3912, 3923), False, 'from apis_server import util\n')] |
import logging
import os
import sys
import colorlog
from flask import Flask
from dynoscale.wsgi import DynoscaleWsgiApp
# Configure logging
handler = colorlog.StreamHandler(stream=sys.stdout)
handler.setFormatter(
colorlog.ColoredFormatter(
fmt="%(asctime)s.%(msecs)03d %(log_color)s%(levelname)-8s%(reset... | [
"dynoscale.wsgi.DynoscaleWsgiApp",
"flask.Flask",
"colorlog.StreamHandler",
"colorlog.ColoredFormatter",
"os.getenv",
"logging.getLogger"
] | [((153, 194), 'colorlog.StreamHandler', 'colorlog.StreamHandler', ([], {'stream': 'sys.stdout'}), '(stream=sys.stdout)\n', (175, 194), False, 'import colorlog\n'), ((536, 551), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (541, 551), False, 'from flask import Flask\n'), ((804, 834), 'dynoscale.wsgi.Dynos... |
"""
Various data structures used in query construction.
Factored out from django.db.models.query to avoid making the main module very
large and/or so that they can be used by other modules without getting into
circular import difficulties.
"""
import weakref
from django.utils.copycompat import deepcopy
fr... | [
"weakref.ref",
"django.db.backends.util.truncate_name"
] | [((5537, 5569), 'django.db.backends.util.truncate_name', 'util.truncate_name', (['name', '(80)', '(32)'], {}), '(name, 80, 32)\n', (5555, 5569), False, 'from django.db.backends import util\n'), ((2052, 2070), 'weakref.ref', 'weakref.ref', (['model'], {}), '(model)\n', (2063, 2070), False, 'import weakref\n')] |
# -*- coding: utf-8 -*-
# FLEDGE_BEGIN
# See: http://fledge-iot.readthedocs.io/
# FLEDGE_END
import os
import json
from aiohttp import web
from fledge.common import logger
from fledge.common.web.middleware import has_permission
from fledge.services.core import connect
from fledge.common.configuration_manager import... | [
"os.remove",
"fledge.common.logger.setup",
"os.makedirs",
"os.path.join",
"os.walk",
"fledge.services.core.connect.get_storage_async",
"os.path.exists",
"json.dumps",
"aiohttp.web.json_response",
"aiohttp.web.HTTPBadRequest",
"os.path.isfile",
"os.path.expanduser",
"os.listdir",
"fledge.co... | [((983, 1005), 'fledge.common.logger.setup', 'logger.setup', (['__name__'], {}), '(__name__)\n', (995, 1005), False, 'from fledge.common import logger\n'), ((8128, 8151), 'fledge.common.web.middleware.has_permission', 'has_permission', (['"""admin"""'], {}), "('admin')\n", (8142, 8151), False, 'from fledge.common.web.m... |
from time import sleep
from picamera import PiCamera
import datetime
import os
import RPi.GPIO as GPIO
pin1 = 4
pin2 = 17
dir = 'data'
if not os.path.exists(dir):
os.mkdir(dir)
camera = PiCamera()
while datetime.datetime.now() < datetime.datetime(2020, 12, 3, 12):
try:
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(F... | [
"os.mkdir",
"RPi.GPIO.setmode",
"RPi.GPIO.setup",
"os.path.exists",
"datetime.datetime",
"time.sleep",
"RPi.GPIO.output",
"datetime.datetime.now",
"RPi.GPIO.setwarnings",
"picamera.PiCamera"
] | [((190, 200), 'picamera.PiCamera', 'PiCamera', ([], {}), '()\n', (198, 200), False, 'from picamera import PiCamera\n'), ((144, 163), 'os.path.exists', 'os.path.exists', (['dir'], {}), '(dir)\n', (158, 163), False, 'import os\n'), ((166, 179), 'os.mkdir', 'os.mkdir', (['dir'], {}), '(dir)\n', (174, 179), False, 'import ... |
import os
import json
import logging
import gevent
import requests
from feeds.models.subscription import Subscription
from lib.attachment import Attachment
from lib.facebook import upload_attachment, guess_attachment_type
from lib.response import Replyable, SenderTypes
from lib.sent_tracking import UserSentTracking
f... | [
"lib.response.Replyable",
"lib.sent_tracking.UserSentTracking.by_id",
"json.loads",
"lib.sent_tracking.UserSentTracking.set_sent",
"lib.facebook.guess_attachment_type",
"json.dumps",
"os.environ.get",
"feeds.models.subscription.Subscription.collection.delete_many",
"lib.attachment.Attachment.create"... | [((357, 384), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (374, 384), False, 'import logging\n'), ((399, 436), 'os.environ.get', 'os.environ.get', (['"""FB_PAGE_TOKEN"""', '"""na"""'], {}), "('FB_PAGE_TOKEN', 'na')\n", (413, 436), False, 'import os\n'), ((2184, 2249), 'lib.response.Rep... |
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"tensorflow.core.protobuf.saver_pb2.SaverDef",
"tensorflow.python.framework.tensor_spec.TensorSpec",
"tensorflow.python.eager.def_function.function",
"tensorflow.python.framework.ops.control_dependencies",
"tensorflow.python.util.nest.pack_sequence_as",
"tensorflow.python.framework.ops.device",
"tensorf... | [((5261, 5318), 'tensorflow.python.util.nest.pack_sequence_as', 'nest.pack_sequence_as', (['tensor_structure', 'restored_tensors'], {}), '(tensor_structure, restored_tensors)\n', (5282, 5318), False, 'from tensorflow.python.util import nest\n'), ((2163, 2238), 'tensorflow.python.ops.array_ops.placeholder', 'array_ops.p... |
"""
Copyright (c) 2016 Cisco and/or its affiliates.
This software is licensed to you under the terms of the Apache License, Version 2.0
(the "License").
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
The code, technical concepts, and all information contained herein, a... | [
"logging.error",
"tornado_json.application.Application",
"logging.debug",
"tornado.options.options.as_dict",
"logging.warning",
"logging.warn",
"logging.info",
"tornado_json.routes.get_routes",
"logging.getLevelName",
"config.define_options",
"tornado.options.parse_config_file",
"endpoint.Plat... | [((1479, 1591), 'logging.warning', 'logging.warning', (['"""Received shutdown signal for dataset dataset with signal:%s and frame:%s"""', 'sig', 'frame'], {}), "(\n 'Received shutdown signal for dataset dataset with signal:%s and frame:%s',\n sig, frame)\n", (1494, 1591), False, 'import logging\n'), ((1706, 1742)... |
import random
import uuid
class Plant():
def __init__(self, config):
self.id = str(uuid.uuid4())
self.x = None
self.y = None
self.conf = config
self.level = 1
self.max_hp = config.getint('max_hp')
self.current_hp = self.max_hp
self.max_level = config.... | [
"uuid.uuid4"
] | [((96, 108), 'uuid.uuid4', 'uuid.uuid4', ([], {}), '()\n', (106, 108), False, 'import uuid\n')] |
from parlaparser.parser import Parser
parser = Parser()
parser.parse()
| [
"parlaparser.parser.Parser"
] | [((48, 56), 'parlaparser.parser.Parser', 'Parser', ([], {}), '()\n', (54, 56), False, 'from parlaparser.parser import Parser\n')] |
import platform
# İşletim sistemi
print(platform.system())
# İşlemci bilgisi
print(platform.processor())
# Nesil bilgisi
print(platform.release())
# PC Bağlantı adı
print(platform.node())
# Python Versiyonu
print(platform.python_version())
# Python Compiler Bilgisi
print(platform.python_compiler())
| [
"platform.processor",
"platform.python_version",
"platform.node",
"platform.system",
"platform.release",
"platform.python_compiler"
] | [((41, 58), 'platform.system', 'platform.system', ([], {}), '()\n', (56, 58), False, 'import platform\n'), ((85, 105), 'platform.processor', 'platform.processor', ([], {}), '()\n', (103, 105), False, 'import platform\n'), ((130, 148), 'platform.release', 'platform.release', ([], {}), '()\n', (146, 148), False, 'import ... |
import requests as req
print( " _ _ _____ _ ___ ___ ___ ___ ")
print( " | | | | / ____| | | |__ \ / _ \ / _ \ / _ \ ")
print( " | | ___ | | _____ | | __ ___ _ __ ___ _ __ __ _| |_ ___ _ ... | [
"requests.get"
] | [((970, 1022), 'requests.get', 'req.get', (['url'], {'headers': "{'Accept': 'application/json'}"}), "(url, headers={'Accept': 'application/json'})\n", (977, 1022), True, 'import requests as req\n')] |
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: arc_package_specifics.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflec... | [
"google.protobuf.symbol_database.Default",
"google.protobuf.descriptor.FieldDescriptor",
"google.protobuf.descriptor_pb2.FileOptions"
] | [((494, 520), 'google.protobuf.symbol_database.Default', '_symbol_database.Default', ([], {}), '()\n', (518, 520), True, 'from google.protobuf import symbol_database as _symbol_database\n'), ((3322, 3350), 'google.protobuf.descriptor_pb2.FileOptions', 'descriptor_pb2.FileOptions', ([], {}), '()\n', (3348, 3350), False,... |
import os
import logging
from slack_bolt.adapter.socket_mode import SocketModeHandler
from slack_bolt import App
from dotenv import load_dotenv
from commands import incident, sre
from commands.helpers import incident_helper, webhook_helper
from server import bot_middleware, server
from jobs import scheduled_tasks
ser... | [
"slack_bolt.adapter.socket_mode.SocketModeHandler",
"jobs.scheduled_tasks.run_continuously",
"logging.basicConfig",
"jobs.scheduled_tasks.init",
"dotenv.load_dotenv",
"os.environ.get",
"slack_bolt.App"
] | [((346, 385), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO'}), '(level=logging.INFO)\n', (365, 385), False, 'import logging\n'), ((387, 400), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (398, 400), False, 'from dotenv import load_dotenv\n'), ((433, 462), 'os.environ.get', 'os.en... |
"""
Move object from one visual marker to another
"""
import sys
import cv2
import numpy as np
import obj_loader
from utils import (calculate_dist_corners, get_camera_params,
get_matrix, load_ref_images, render, get_homographies_contour)
if __name__ == "__main__":
OBJ_PATH = sys.argv[1]
... | [
"utils.get_camera_params",
"utils.get_matrix",
"cv2.waitKey",
"obj_loader.OBJ",
"utils.calculate_dist_corners",
"cv2.imshow",
"utils.load_ref_images",
"cv2.VideoCapture",
"utils.render",
"numpy.array",
"numpy.dot",
"utils.get_homographies_contour",
"cv2.destroyAllWindows",
"sys.exit"
] | [((326, 363), 'obj_loader.OBJ', 'obj_loader.OBJ', (['OBJ_PATH'], {'swapyz': '(True)'}), '(OBJ_PATH, swapyz=True)\n', (340, 363), False, 'import obj_loader\n'), ((390, 407), 'utils.load_ref_images', 'load_ref_images', ([], {}), '()\n', (405, 407), False, 'from utils import calculate_dist_corners, get_camera_params, get_... |
from pyspark.sql import SparkSession
spark = SparkSession.builder.getOrCreate()
df = spark.read.option("multiLine", True).json("people_multiline.json")
print(df.show()) | [
"pyspark.sql.SparkSession.builder.getOrCreate"
] | [((46, 80), 'pyspark.sql.SparkSession.builder.getOrCreate', 'SparkSession.builder.getOrCreate', ([], {}), '()\n', (78, 80), False, 'from pyspark.sql import SparkSession\n')] |
import sys
import logging
import gensim
from optparse import OptionParser
from docs import config
logging.basicConfig(format="%(asctime)s : %(levelname)s : %(message)s", level=logging.INFO)
# Build this program's option parser
def build_opt_parser():
usage = "usage: %prog [options] <filename> [, <filename>, ...]"... | [
"gensim.models.ldamodel.LdaModel",
"gensim.models.lsimodel.LsiModel",
"optparse.OptionParser",
"logging.basicConfig",
"gensim.corpora.MmCorpus",
"gensim.corpora.Dictionary.load"
] | [((99, 194), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(asctime)s : %(levelname)s : %(message)s"""', 'level': 'logging.INFO'}), "(format='%(asctime)s : %(levelname)s : %(message)s',\n level=logging.INFO)\n", (118, 194), False, 'import logging\n'), ((334, 359), 'optparse.OptionParser', 'Optio... |
from ..models import About
from blog.forms import ContactForm
from blog.models import Category
def about(request):
about = About.objects.all()[0]
category = Category.objects.all()
form = ContactForm()
return {
'about_title': about.title,
'about_text': about.text,
'about_image':... | [
"blog.models.Category.objects.all",
"blog.forms.ContactForm"
] | [((167, 189), 'blog.models.Category.objects.all', 'Category.objects.all', ([], {}), '()\n', (187, 189), False, 'from blog.models import Category\n'), ((201, 214), 'blog.forms.ContactForm', 'ContactForm', ([], {}), '()\n', (212, 214), False, 'from blog.forms import ContactForm\n')] |
"""
# Definition for a Node.
"""
import collections
class Node:
def __init__(self, val: int = 0, left: 'Node' = None, right: 'Node' = None, next: 'Node' = None):
self.val = val
self.left = left
self.right = right
self.next = next
class Solution:
def connect_DFX(self, root) :
... | [
"collections.deque"
] | [((383, 408), 'collections.deque', 'collections.deque', (['[root]'], {}), '([root])\n', (400, 408), False, 'import collections\n'), ((428, 453), 'collections.deque', 'collections.deque', (['[root]'], {}), '([root])\n', (445, 453), False, 'import collections\n'), ((502, 521), 'collections.deque', 'collections.deque', ([... |
import argparse
import os
import torch
from net.model import get_model
from net.file_reader import init_dataset, init_transformer
from net.work import test_file
from net.parser import ConfigParser
from net.loader import init
from net.utils import init_thulac
parser = argparse.ArgumentParser()
parser.add_argument('--m... | [
"net.model.get_model",
"net.loader.init",
"argparse.ArgumentParser",
"net.file_reader.init_transformer",
"torch.load",
"net.file_reader.init_dataset",
"net.parser.ConfigParser",
"net.utils.init_thulac",
"torch.cuda.is_available",
"net.work.test_file"
] | [((270, 295), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (293, 295), False, 'import argparse\n'), ((746, 774), 'net.parser.ConfigParser', 'ConfigParser', (['configFilePath'], {}), '(configFilePath)\n', (758, 774), False, 'from net.parser import ConfigParser\n'), ((959, 979), 'net.file_reade... |
"""The pandas backend is a departure from the typical ibis backend in that it
doesn't compile to anything, and the execution of the ibis expression
is under the purview of ibis itself rather than executing SQL against a server.
Design
------
The pandas backend uses a technique called `multiple dispatch
<https://en.wik... | [
"toolz.keymap",
"ibis.pandas.dispatch.execute.register",
"toolz.merge",
"collections.defaultdict",
"ibis.client.find_backends",
"ibis.pandas.aggcontext.Summarize",
"ibis.pandas.dispatch.post_execute",
"ibis.pandas.dispatch.pre_execute",
"toolz.valmap"
] | [((7852, 7877), 'ibis.pandas.dispatch.execute.register', 'execute.register', (['ir.Expr'], {}), '(ir.Expr)\n', (7868, 7877), False, 'from ibis.pandas.dispatch import execute, execute_first, execute_literal, execute_node, post_execute, pre_execute\n'), ((5392, 5421), 'collections.defaultdict', 'collections.defaultdict',... |
# Copyright 2015: <NAME>
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | [
"os.path.dirname",
"mock.mock_open",
"mock.patch",
"json.dumps",
"profimp.reports._normalize",
"mock.MagicMock",
"profimp.reports.to_json",
"profimp.reports.to_html"
] | [((761, 801), 'mock.patch', 'mock.patch', (['"""profimp.reports._normalize"""'], {}), "('profimp.reports._normalize')\n", (771, 801), False, 'import mock\n'), ((1198, 1235), 'mock.patch', 'mock.patch', (['"""profimp.reports.to_json"""'], {}), "('profimp.reports.to_json')\n", (1208, 1235), False, 'import mock\n'), ((124... |
from src.res50_backbone import resnet50
from torch import nn, Tensor
import torch
from torch.jit.annotations import Optional, List, Dict, Tuple, Module
from src.utils import dboxes300_coco, Encoder, PostProcess
class Backbone(nn.Module):
def __init__(self, pretrain_path=None):
super(Backbone, self).__init... | [
"src.utils.dboxes300_coco",
"torch.nn.ReLU",
"torch.nn.ModuleList",
"torch.load",
"torch.nn.Conv2d",
"torch.nn.CrossEntropyLoss",
"torch.cat",
"src.utils.PostProcess",
"torch.nn.init.xavier_uniform_",
"src.res50_backbone.resnet50",
"torch.jit.annotate",
"torch.nn.BatchNorm2d",
"torch.nn.Smoo... | [((339, 349), 'src.res50_backbone.resnet50', 'resnet50', ([], {}), '()\n', (347, 349), False, 'from src.res50_backbone import resnet50\n'), ((1988, 2022), 'torch.nn.ModuleList', 'nn.ModuleList', (['location_extractors'], {}), '(location_extractors)\n', (2001, 2022), False, 'from torch import nn, Tensor\n'), ((2043, 207... |
from django.db.models import Q
import random
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render, get_object_or_404
from django.views import View
from django.views.generic import TemplateView, ListView, DetailView, CreateView, UpdateView
from django.contrib.auth.decorators imp... | [
"django.contrib.auth.decorators.login_required",
"django.http.HttpResponseRedirect",
"django.shortcuts.render"
] | [((3930, 3965), 'django.contrib.auth.decorators.login_required', 'login_required', ([], {'login_url': '"""/login/"""'}), "(login_url='/login/')\n", (3944, 3965), False, 'from django.contrib.auth.decorators import login_required\n'), ((4869, 4908), 'django.shortcuts.render', 'render', (['request', 'template_name', 'cont... |
#!/usr/bin/env python
import sys
import argparse
import datetime
import logging
from typing import (
Optional, Dict, List, cast, Union, Any, Tuple, Iterable
)
import pandas as pd
import cmd2
from world_rowing import api, dashboard
from world_rowing.utils import first
logger = logging.getLogger('world_rowing.cl... | [
"world_rowing.api.get_most_recent_competition",
"world_rowing.dashboard.Dashboard.from_race_id",
"world_rowing.api.show_next_races",
"cmd2.Settable",
"matplotlib.pyplot.show",
"argparse.ArgumentParser",
"world_rowing.api.get_competition_races",
"world_rowing.dashboard.Dashboard.load_last_race",
"wor... | [((286, 323), 'logging.getLogger', 'logging.getLogger', (['"""world_rowing.cli"""'], {}), "('world_rowing.cli')\n", (303, 323), False, 'import logging\n'), ((339, 431), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Specify which year you want, defaults to current"""'}), "(description=\n... |
# Copyright (c) 2017, Xilinx, 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:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of con... | [
"pynq.lib.RGBLED"
] | [((3506, 3524), 'pynq.lib.RGBLED', 'pynq.lib.RGBLED', (['i'], {}), '(i)\n', (3521, 3524), False, 'import pynq\n')] |
import pytest
import pandas as pd
pytest.importorskip("pyarrow", minversion="0.13.0")
from .arrays import ArrowStringDtype # isort:skip
def test_constructor_from_list():
# GH 27673
result = pd.Series(["E"], dtype=ArrowStringDtype())
assert isinstance(result.dtype, ArrowStringDtype)
| [
"pytest.importorskip"
] | [((40, 91), 'pytest.importorskip', 'pytest.importorskip', (['"""pyarrow"""'], {'minversion': '"""0.13.0"""'}), "('pyarrow', minversion='0.13.0')\n", (59, 91), False, 'import pytest\n')] |
import matplotlib.pyplot as plt
montante_inicial = float(input('Montante inicial igual a: '))
rendimento_periodo = float(input('Rendimento por período igual a(%): '))
valor_aporte = float(input('Valor do aporte igual a: '))
total_periodos = int(input('Total de períodos: '))
def calcular_juros_compostos(montante_... | [
"matplotlib.pyplot.title",
"matplotlib.pyplot.show",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel"
] | [((776, 811), 'matplotlib.pyplot.plot', 'plt.plot', (['periodos', 'montante', '"""p-g"""'], {}), "(periodos, montante, 'p-g')\n", (784, 811), True, 'import matplotlib.pyplot as plt\n'), ((816, 856), 'matplotlib.pyplot.title', 'plt.title', (['"""Evolução do valor acumulado"""'], {}), "('Evolução do valor acumulado')\n",... |
# -*- coding: utf-8 -*-
from __future__ import print_function
from conans import AutoToolsBuildEnvironment, ConanFile, tools, VisualStudioBuildEnvironment
from conans.util import files
import os
class OpusConan(ConanFile):
name = "opus"
version = "1.2.1"
ZIP_FOLDER_NAME = "opus-{}".format(version)
gen... | [
"conans.util.files.mkdir",
"conans.tools.vcvars_command",
"conans.tools.check_sha256",
"os.unlink",
"conans.VisualStudioBuildEnvironment",
"conans.tools.unzip",
"conans.tools.chdir",
"conans.AutoToolsBuildEnvironment",
"conans.tools.environment_append",
"conans.tools.collect_libs"
] | [((2310, 2353), 'conans.tools.check_sha256', 'tools.check_sha256', (['zip_name', 'self.checksum'], {}), '(zip_name, self.checksum)\n', (2328, 2353), False, 'from conans import AutoToolsBuildEnvironment, ConanFile, tools, VisualStudioBuildEnvironment\n'), ((2363, 2384), 'conans.tools.unzip', 'tools.unzip', (['zip_name']... |
#!/usr/bin/env python3
# MIT License
#
# Copyright (c) 2020 FABRIC Testbed
#
# 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 ... | [
"traceback.print_exc",
"argparse.ArgumentParser",
"logging.StreamHandler",
"fim.graph.neo4j_property_graph.Neo4jGraphImporter",
"fabric_cf.actor.core.plugins.db.actor_database.ActorDatabase",
"fim.graph.neo4j_property_graph.Neo4jPropertyGraph",
"fabric_cf.actor.core.util.id.ID",
"logging.handlers.Rota... | [((7376, 7401), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (7399, 7401), False, 'import argparse\n'), ((1678, 1705), 'logging.getLogger', 'logging.getLogger', (['"""db-cli"""'], {}), "('db-cli')\n", (1695, 1705), False, 'import logging\n'), ((1729, 1795), 'logging.handlers.RotatingFileHandl... |
import logging.config
import os
from django.utils.log import DEFAULT_LOGGING
def local_logging_config(**options):
log_root = options.get('LOG_ROOT')
log_level = options.get('LOG_LEVEL')
file_log_level = options.get('FILE_LOG_LEVEL')
sentry_log_level = options.get('SENTRY_LOG_LEVEL')
return loggi... | [
"os.path.join"
] | [((1378, 1414), 'os.path.join', 'os.path.join', (['log_root', '"""django.log"""'], {}), "(log_root, 'django.log')\n", (1390, 1414), False, 'import os\n')] |
#!/usr/bin/env python
#coding:utf-8
# Purpose: base types
# module belongs to package dxfwrite
# Created: 09.02.2010
# Copyright (C) 2010, <NAME>
# License: MIT License
__author__ = "mozman <<EMAIL>>"
from dxfwrite.util import izip, PYTHON3, to_string, is_string, iterflatlist
if PYTHON3:
xrange = range
from dxfw... | [
"dxfwrite.util.to_string",
"dxfwrite.util.is_string",
"dxfwrite.vector3d.unit_vector",
"dxfwrite.util.izip",
"dxfwrite.vector3d.cross_product"
] | [((11309, 11329), 'dxfwrite.vector3d.unit_vector', 'unit_vector', (['zvector'], {}), '(zvector)\n', (11320, 11329), False, 'from dxfwrite.vector3d import cross_product, unit_vector\n'), ((5877, 5896), 'dxfwrite.util.izip', 'izip', (['self', 'dxflist'], {}), '(self, dxflist)\n', (5881, 5896), False, 'from dxfwrite.util ... |