input stringlengths 28 198k | output stringlengths 3 71k | file stringlengths 19 330 | input_tokens int64 5 159k | output_tokens int64 3 9.07k | __index_level_0__ int64 2 449k |
|---|---|---|---|---|---|
LOAD_CONST 'Target class meant to abstract mappings to other objects'
STORE_NAME __doc__
LOAD_BUILD_CLASS
LOAD_CONST <code object Target at 0x7fab82363300, file "f.py", line 4>
LOAD_CONST 'Target'
MAKE_FUNCTION
LOAD_CONST 'Target'
CALL_FUNCTION
STORE_NAME Target
LOAD_CONST None
RETURN_VALUE
LOAD_NAME __name__
STORE_N... | """Target class meant to abstract mappings to other objects"""
class Target:
def __init__(self, id_, target_type):
self.id = id_
self.type = target_type
def __repr__(self):
return "<Target#{id}, {type}>".format(**self.__dict__)
| data/tableauserverclient-0.30/tableauserverclient/models/target.py | 266 | 83 | 380,601 |
LOAD_CONST 0
LOAD_CONST ('get_distribution', 'DistributionNotFound')
IMPORT_NAME pkg_resources
IMPORT_FROM get_distribution
STORE_NAME get_distribution
IMPORT_FROM DistributionNotFound
STORE_NAME DistributionNotFound
POP_TOP
SETUP_EXCEPT to 32
LOAD_NAME get_distribution
LOAD_NAME __name__
CALL_FUNCTION
LOAD_ATTR vers... | from pkg_resources import get_distribution, DistributionNotFound
try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
__version__ = "unknown"
__pypi_url__ = "https://pypi.python.org/pypi/pytest-reporter-html1"
| data/pytest-reporter-html1-0.8.3/pytest_reporter_html1/__init__.py | 162 | 83 | 307,519 |
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME typer
STORE_NAME typer
LOAD_NAME typer
LOAD_METHOD Typer
CALL_METHOD
STORE_NAME app
LOAD_NAME app
LOAD_METHOD command
CALL_METHOD
LOAD_CONST <code object create at 0x7fab641e7030, file "f.py", line 6>
LOAD_CONST 'create'
MAKE_FUNCTION
CALL_FUNCTION
STORE_NAME create
LOAD_NAME... | import typer
app = typer.Typer()
@app.command()
def create():
print("Creating user: Hiro Hamada")
@app.command()
def delete():
print("Deleting user: Hiro Hamada")
if __name__ == "__main__":
app()
| data/typer-0.9.0/docs_src/commands/index/tutorial002.py | 217 | 83 | 224,449 |
LOAD_CONST 0
LOAD_CONST ('mock',)
IMPORT_NAME unittest
IMPORT_FROM mock
STORE_NAME mock
POP_TOP
LOAD_CONST 0
LOAD_CONST ('evaluate_marker',)
IMPORT_NAME pkg_resources
IMPORT_FROM evaluate_marker
STORE_NAME evaluate_marker
POP_TOP
LOAD_NAME mock
LOAD_ATTR patch
LOAD_CONST 'platform.python_version'
LOAD_CONST '2.7.10'
... | from unittest import mock
from pkg_resources import evaluate_marker
@mock.patch("platform.python_version", return_value="2.7.10")
def test_ordering(python_version_mock):
assert evaluate_marker("python_full_version > '2.7.3'") is True
| data/setuptools-69.1.0/pkg_resources/tests/test_markers.py | 197 | 83 | 256,740 |
LOAD_CONST <code object is_instance_by_class_name at 0x7faac03221e0, file "f.py", line 1>
LOAD_CONST 'is_instance_by_class_name'
MAKE_FUNCTION
STORE_NAME is_instance_by_class_name
LOAD_CONST None
RETURN_VALUE
LOAD_GLOBAL issubclass
LOAD_FAST obj
LOAD_ATTR __class__
LOAD_GLOBAL type
CALL_FUNCTION
POP_JUMP_IF_FALSE
LOA... | def is_instance_by_class_name(obj, class_name):
if issubclass(obj.__class__, type):
return obj.__class__.__name__ == class_name
for cls in obj.__class__.mro():
if cls.__name__ == class_name:
return True
return False
| data/dbnd-1.0.21.5/src/dbnd/_core/utils/type_check_utils.py | 184 | 83 | 271,705 |
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME typer
STORE_NAME typer
LOAD_NAME typer
LOAD_METHOD Option
LOAD_CONST False
LOAD_CONST '--force/--no-force'
LOAD_CONST '-f/-F'
CALL_METHOD
BUILD_TUPLE
LOAD_NAME bool
LOAD_CONST ('force',)
BUILD_CONST_KEY_MAP
LOAD_CONST <code object main at 0x7fab700dbe40, file "f.py", line 4>
LO... | import typer
def main(force: bool = typer.Option(False, "--force/--no-force", "-f/-F")):
if force:
print("Forcing operation")
else:
print("Not forcing")
if __name__ == "__main__":
typer.run(main)
| data/typer-0.9.0/docs_src/parameter_types/bool/tutorial003.py | 184 | 83 | 224,493 |
LOAD_CONST 0
LOAD_CONST ('*',)
IMPORT_NAME azure.cli.core.aaz
IMPORT_STAR
LOAD_NAME register_command_group
LOAD_CONST 'monitor log-analytics workspace linked-storage'
CALL_FUNCTION
LOAD_BUILD_CLASS
LOAD_CONST <code object __CMDGroup at 0x7faa763f7ae0, file "f.py", line 4>
LOAD_CONST '__CMDGroup'
MAKE_FUNCTION
LOAD_CO... | from azure.cli.core.aaz import *
@register_command_group(
"monitor log-analytics workspace linked-storage",
)
class __CMDGroup(AAZCommandGroup):
"""Manage linked storage account for log analytics workspace."""
pass
__all__ = ["__CMDGroup"]
| data/azure-cli-2.57.0/azure/cli/command_modules/monitor/aaz/latest/monitor/log_analytics/workspace/linked_storage/__cmd_group.py | 192 | 83 | 374,955 |
LOAD_CONST "Dataset definition for clevr.\n\nDEPRECATED!\nIf you want to use the CLEVR dataset builder class, use:\ntfds.builder_cls('clevr')\n"
STORE_NAME __doc__
LOAD_CONST 0
LOAD_CONST ('lazy_builder_import',)
IMPORT_NAME tensorflow_datasets.core
IMPORT_FROM lazy_builder_import
STORE_NAME lazy_builder_import
POP_TO... | """Dataset definition for clevr.
DEPRECATED!
If you want to use the CLEVR dataset builder class, use:
tfds.builder_cls('clevr')
"""
from tensorflow_datasets.core import lazy_builder_import
CLEVR = lazy_builder_import.LazyBuilderImport("clevr")
| data/tensorflow-datasets-4.9.4/tensorflow_datasets/image/clevr.py | 127 | 83 | 255,267 |
LOAD_CONST '\nModule for the jsonlines data format.\n'
STORE_NAME __doc__
LOAD_CONST 1
LOAD_CONST ('Error', 'InvalidLineError', 'Reader', 'Writer', 'open')
IMPORT_NAME jsonlines
IMPORT_FROM Error
STORE_NAME Error
IMPORT_FROM InvalidLineError
STORE_NAME InvalidLineError
IMPORT_FROM Reader
STORE_NAME Reader
IMPORT_FROM ... | """
Module for the jsonlines data format.
"""
from .jsonlines import (
Error,
InvalidLineError,
Reader,
Writer,
open,
)
__all__ = [
"Error",
"InvalidLineError",
"Reader",
"Writer",
"open",
]
| data/jsonlines-4.0.0/jsonlines/__init__.py | 129 | 83 | 76,551 |
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME typer
STORE_NAME typer
LOAD_CONST 0
LOAD_CONST ('Annotated',)
IMPORT_NAME typing_extensions
IMPORT_FROM Annotated
STORE_NAME Annotated
POP_TOP
LOAD_CONST ('World',)
LOAD_NAME Annotated
LOAD_NAME str
LOAD_NAME typer
LOAD_ATTR Argument
LOAD_CONST 'AWESOME_NAME'
LOAD_CONST ('envv... | import typer
from typing_extensions import Annotated
def main(name: Annotated[str, typer.Argument(envvar="AWESOME_NAME")] = "World"):
print(f"Hello Mr. {name}")
if __name__ == "__main__":
typer.run(main)
| data/typer-0.9.0/docs_src/arguments/envvar/tutorial001_an.py | 205 | 83 | 224,535 |
SETUP_ANNOTATIONS
LOAD_CONST 0
LOAD_CONST ('providers',)
IMPORT_NAME dependency_injector
IMPORT_FROM providers
STORE_NAME providers
POP_TOP
LOAD_NAME providers
LOAD_ATTR DependenciesContainer
LOAD_NAME providers
LOAD_METHOD Provider
CALL_METHOD
LOAD_NAME providers
LOAD_METHOD Provider
CALL_METHOD
LOAD_CONST ('a', 'b... | from dependency_injector import providers
provider1 = providers.DependenciesContainer(
a=providers.Provider(),
b=providers.Provider(),
)
a1: providers.Provider = provider1.a
b1: providers.Provider = provider1.b
c1: providers.ProvidedInstance = provider1.c.provided
| data/dependency-injector-4.41.0/tests/typing/dependencies_container.py | 180 | 83 | 271,464 |
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME inspect
STORE_NAME inspect
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME logging
STORE_NAME logging
LOAD_CONST (None,)
LOAD_CONST <code object get_logger at 0x7fab40ea6300, file "f.py", line 5>
LOAD_CONST 'get_logger'
MAKE_FUNCTION
STORE_NAME get_logger
LOAD_CONST None
RETURN_VALUE... | import inspect
import logging
def get_logger(module, name=None):
logger_fqn = module
if name is not None:
if inspect.isclass(name):
name = name.__name__
logger_fqn += "." + name
return logging.getLogger(logger_fqn)
| data/dramatiq-1.16.0/dramatiq/logging.py | 181 | 83 | 145,466 |
LOAD_CONST 1
LOAD_CONST ('InteractiveSeg',)
IMPORT_NAME interactive_seg
IMPORT_FROM InteractiveSeg
STORE_NAME InteractiveSeg
POP_TOP
LOAD_CONST 1
LOAD_CONST ('RemoveBG',)
IMPORT_NAME remove_bg
IMPORT_FROM RemoveBG
STORE_NAME RemoveBG
POP_TOP
LOAD_CONST 1
LOAD_CONST ('RealESRGANUpscaler',)
IMPORT_NAME realesrgan
IMPOR... | from .interactive_seg import InteractiveSeg
from .remove_bg import RemoveBG
from .realesrgan import RealESRGANUpscaler
from .gfpgan_plugin import GFPGANPlugin
from .restoreformer import RestoreFormerPlugin
from .gif import MakeGIF
from .anime_seg import AnimeSeg
| data/lama-cleaner-1.2.5/lama_cleaner/plugins/__init__.py | 242 | 83 | 13,737 |
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME geocoder
STORE_NAME geocoder
LOAD_CONST '8.8.8.8'
STORE_NAME location
LOAD_CONST <code object test_maxmind at 0x7faa8c241930, file "f.py", line 6>
LOAD_CONST 'test_maxmind'
MAKE_FUNCTION
STORE_NAME test_maxmind
LOAD_CONST None
RETURN_VALUE
LOAD_GLOBAL geocoder
LOAD_METHOD max... | import geocoder
location = "8.8.8.8"
def test_maxmind():
g = geocoder.maxmind(location)
assert g.ok
osm_count, fields_count = g.debug()[0]
assert osm_count >= 1
assert fields_count >= 13
| data/geocoder-1.38.1/tests/test_maxmind.py | 202 | 83 | 271,310 |
LOAD_CONST 0
LOAD_CONST ('*',)
IMPORT_NAME azure.cli.core.aaz
IMPORT_STAR
LOAD_NAME register_command_group
LOAD_CONST 'eventhubs namespace network-rule-set'
CALL_FUNCTION
LOAD_BUILD_CLASS
LOAD_CONST <code object __CMDGroup at 0x7faa53250ed0, file "f.py", line 4>
LOAD_CONST '__CMDGroup'
MAKE_FUNCTION
LOAD_CONST '__CMD... | from azure.cli.core.aaz import *
@register_command_group(
"eventhubs namespace network-rule-set",
)
class __CMDGroup(AAZCommandGroup):
"""Manage Azure EventHubs networkruleset for namespace"""
pass
__all__ = ["__CMDGroup"]
| data/azure-cli-2.57.0/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/namespace/network_rule_set/__cmd_group.py | 192 | 83 | 374,816 |
SETUP_ANNOTATIONS
LOAD_CONST 0
LOAD_CONST ('annotations',)
IMPORT_NAME __future__
IMPORT_FROM annotations
STORE_NAME annotations
POP_TOP
LOAD_CONST 0
LOAD_CONST ('MongoClient',)
IMPORT_NAME pymongo
IMPORT_FROM MongoClient
STORE_NAME MongoClient
POP_TOP
LOAD_NAME MongoClient
CALL_FUNCTION
STORE_NAME client
LOAD_CONST ... | from __future__ import annotations
from pymongo import MongoClient
client: MongoClient = MongoClient()
client.test.test.insert_many(
{"a": 1}
) # error: Dict entry 0 has incompatible type "str": "int"; expected "Mapping[str, Any]": "int"
| data/pymongo-4.6.1/test/mypy_fails/insert_many_dict.py | 125 | 83 | 118,802 |
LOAD_CONST <code object main at 0x7faa7c009150, file "f.py", line 1>
LOAD_CONST 'main'
MAKE_FUNCTION
STORE_NAME main
LOAD_NAME __name__
LOAD_CONST '__main__'
COMPARE_OP ==
POP_JUMP_IF_FALSE
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME argparse
STORE_NAME argparse
LOAD_NAME argparse
LOAD_METHOD ArgumentParser
CALL_METHOD... | def main(dsn):
"Do something on the database"
print(dsn)
if __name__ == "__main__":
import argparse
p = argparse.ArgumentParser()
p.add_argument("dsn")
arg = p.parse_args()
main(arg.dsn)
| data/plac-1.4.2/doc/example2.py | 161 | 83 | 112,204 |
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME uproot
STORE_NAME uproot
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME skhep_testdata
STORE_NAME skhep_testdata
LOAD_CONST <code object test_fix_awkward_form_breadcrumbs at 0x7faa5ec3b1e0, file "f.py", line 5>
LOAD_CONST 'test_fix_awkward_form_breadcrumbs'
MAKE_FUNCTION
STORE_NAME ... | import uproot
import skhep_testdata
def test_fix_awkward_form_breadcrumbs():
file = uproot.open(skhep_testdata.data_path("uproot-issue-880.root"))
tree = file["Z"]
assert tree.num_entries == 116
| data/uproot-5.2.2/tests/test_0886_fix_awkward_form_breadcrumbs.py | 211 | 83 | 372,143 |
LOAD_CONST 0
LOAD_CONST ('*',)
IMPORT_NAME azure.cli.core.aaz
IMPORT_STAR
LOAD_NAME register_command_group
LOAD_CONST 'eventhubs eventhub'
CALL_FUNCTION
LOAD_BUILD_CLASS
LOAD_CONST <code object __CMDGroup at 0x7faa763f7540, file "f.py", line 4>
LOAD_CONST '__CMDGroup'
MAKE_FUNCTION
LOAD_CONST '__CMDGroup'
LOAD_NAME ... | from azure.cli.core.aaz import *
@register_command_group(
"eventhubs eventhub",
)
class __CMDGroup(AAZCommandGroup):
"""Manage Azure EventHubs eventhub and authorization-rule."""
pass
__all__ = ["__CMDGroup"]
| data/azure-cli-2.57.0/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/__cmd_group.py | 193 | 83 | 374,747 |
LOAD_CONST 0
LOAD_CONST ('*',)
IMPORT_NAME azure.cli.core.aaz
IMPORT_STAR
LOAD_NAME register_command_group
LOAD_CONST 'eventhubs namespace authorization-rule'
CALL_FUNCTION
LOAD_BUILD_CLASS
LOAD_CONST <code object __CMDGroup at 0x7fab823bec00, file "f.py", line 4>
LOAD_CONST '__CMDGroup'
MAKE_FUNCTION
LOAD_CONST '__C... | from azure.cli.core.aaz import *
@register_command_group(
"eventhubs namespace authorization-rule",
)
class __CMDGroup(AAZCommandGroup):
"""Manage Azure EventHubs Authorizationrule for Namespace."""
pass
__all__ = ["__CMDGroup"]
| data/azure-cli-2.57.0/azure/cli/command_modules/eventhubs/aaz/profile_2019_03_01_hybrid/eventhubs/namespace/authorization_rule/__cmd_group.py | 191 | 83 | 374,722 |
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME pytest
STORE_NAME pytest
LOAD_CONST 0
LOAD_CONST ('AIOHTTPOpenAPIWebRequest',)
IMPORT_NAME openapi_core.contrib.aiohttp.requests
IMPORT_FROM AIOHTTPOpenAPIWebRequest
STORE_NAME AIOHTTPOpenAPIWebRequest
POP_TOP
LOAD_BUILD_CLASS
LOAD_CONST <code object TestAIOHTTPOpenAPIWebReque... | import pytest
from openapi_core.contrib.aiohttp.requests import AIOHTTPOpenAPIWebRequest
class TestAIOHTTPOpenAPIWebRequest:
def test_type_invalid(self):
with pytest.raises(TypeError):
AIOHTTPOpenAPIWebRequest(None)
| data/openapi_core-0.19.0/tests/unit/contrib/aiohttp/test_aiohttp_requests.py | 325 | 83 | 271,145 |
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME sys
STORE_NAME sys
LOAD_CONST 0
LOAD_CONST ('load_class_extensions',)
IMPORT_NAME interpret.ext.extension_utils
IMPORT_FROM load_class_extensions
STORE_NAME load_class_extensions
POP_TOP
LOAD_CONST 0
LOAD_CONST ('DATA_EXTENSION_KEY', '_is_valid_data_explainer')
IMPORT_NAME int... | import sys
from interpret.ext.extension_utils import load_class_extensions
from interpret.ext.extension import DATA_EXTENSION_KEY, _is_valid_data_explainer
load_class_extensions(
sys.modules[__name__], DATA_EXTENSION_KEY, _is_valid_data_explainer
)
| data/interpret-core-0.5.1/interpret/ext/data/__init__.py | 182 | 83 | 387,974 |
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME tokenize
STORE_NAME tokenize
LOAD_CONST 0
LOAD_CONST ('Container', 'Iterable')
IMPORT_NAME typing
IMPORT_FROM Container
STORE_NAME Container
IMPORT_FROM Iterable
STORE_NAME Iterable
POP_TOP
LOAD_NAME Iterable
LOAD_NAME tokenize
LOAD_ATTR TokenInfo
BINARY_SUBSCR
LOAD_NAME Cont... | import tokenize
from typing import Container, Iterable
def only_contains(
tokens: Iterable[tokenize.TokenInfo],
container: Container[int],
) -> bool:
"""Determines that only tokens from the given list are contained."""
return all(token.exact_type in container for token in tokens)
| data/wemake_python_styleguide-0.18.0/wemake_python_styleguide/logic/tokens/queries.py | 258 | 83 | 214,848 |
LOAD_CONST 1
LOAD_CONST ('allowlist',)
IMPORT_NAME
IMPORT_FROM allowlist
STORE_NAME allowlist
POP_TOP
LOAD_CONST 1
LOAD_CONST ('gibberish',)
IMPORT_NAME
IMPORT_FROM gibberish
STORE_NAME gibberish
POP_TOP
LOAD_CONST 1
LOAD_CONST ('heuristic',)
IMPORT_NAME
IMPORT_FROM heuristic
STORE_NAME heuristic
POP_TOP
LOAD_CONST ... | from . import allowlist # noqa: F401
from . import gibberish # noqa: F401
from . import heuristic # noqa: F401
from . import regex # noqa: F401
from . import wordlist # noqa: F401
| data/bc-detect-secrets-1.5.4/detect_secrets/filters/__init__.py | 130 | 83 | 81,813 |
LOAD_CONST 0
LOAD_CONST ('annotations',)
IMPORT_NAME __future__
IMPORT_FROM annotations
STORE_NAME annotations
POP_TOP
LOAD_CONST 0
LOAD_CONST ('dataclass',)
IMPORT_NAME dataclasses
IMPORT_FROM dataclass
STORE_NAME dataclass
POP_TOP
LOAD_CONST 0
LOAD_CONST ('Tuple',)
IMPORT_NAME typing
IMPORT_FROM Tuple
STORE_NAME Tu... | from __future__ import annotations
from dataclasses import dataclass
from typing import Tuple
@dataclass
class DbmsConnectionInfo:
uri: str
username: str
password: str
def auth(self) -> Tuple[str, str]:
return self.username, self.password
| data/graphdatascience-1.9/graphdatascience/gds_session/dbms_connection_info.py | 334 | 83 | 221,810 |
LOAD_CONST 'Azure IoT Hub Device SDK - Asynchronous\n\nThis SDK provides asynchronous functionality for communicating with the Azure IoT Hub\nas a Device or Module.\n'
STORE_NAME __doc__
LOAD_CONST 1
LOAD_CONST ('IoTHubDeviceClient', 'IoTHubModuleClient')
IMPORT_NAME async_clients
IMPORT_FROM IoTHubDeviceClient
STORE_... | """Azure IoT Hub Device SDK - Asynchronous
This SDK provides asynchronous functionality for communicating with the Azure IoT Hub
as a Device or Module.
"""
from .async_clients import IoTHubDeviceClient, IoTHubModuleClient
__all__ = ["IoTHubDeviceClient", "IoTHubModuleClient"]
| data/azure-iot-device-2.13.0/azure-iot-device/azure/iot/device/iothub/aio/__init__.py | 140 | 83 | 16,148 |
LOAD_CONST 0
LOAD_CONST ('*',)
IMPORT_NAME azure.cli.core.aaz
IMPORT_STAR
LOAD_NAME register_command_group
LOAD_CONST 'servicebus georecovery-alias'
CALL_FUNCTION
LOAD_BUILD_CLASS
LOAD_CONST <code object __CMDGroup at 0x7faa5dedb150, file "f.py", line 4>
LOAD_CONST '__CMDGroup'
MAKE_FUNCTION
LOAD_CONST '__CMDGroup'
... | from azure.cli.core.aaz import *
@register_command_group(
"servicebus georecovery-alias",
)
class __CMDGroup(AAZCommandGroup):
"""Manage Azure Service Bus Geo-Disaster Recovery Configuration Alias."""
pass
__all__ = ["__CMDGroup"]
| data/azure-cli-2.57.0/azure/cli/command_modules/servicebus/aaz/latest/servicebus/georecovery_alias/__cmd_group.py | 191 | 83 | 375,830 |
LOAD_CONST 'hdijupyterutils.filehandler.MagicsFileHandler'
STORE_NAME LOGGING_CONFIG_CLASS_NAME
LOAD_CONST 'hdijupyterutils.eventshandler.EventsHandler'
STORE_NAME EVENTS_HANDLER_CLASS_NAME
LOAD_CONST 'InstanceId'
STORE_NAME INSTANCE_ID
LOAD_CONST 'Timestamp'
STORE_NAME TIMESTAMP
LOAD_CONST 'EventName'
STORE_NAME E... | LOGGING_CONFIG_CLASS_NAME = "hdijupyterutils.filehandler.MagicsFileHandler"
EVENTS_HANDLER_CLASS_NAME = "hdijupyterutils.eventshandler.EventsHandler"
INSTANCE_ID = "InstanceId"
TIMESTAMP = "Timestamp"
EVENT_NAME = "EventName"
| data/hdijupyterutils-0.21.0/hdijupyterutils/constants.py | 104 | 83 | 186,979 |
LOAD_CONST ' Using absolute import, do from module imports.\n\n'
STORE_NAME __doc__
LOAD_CONST 0
LOAD_CONST ('absolute_import', 'print_function')
IMPORT_NAME __future__
IMPORT_FROM absolute_import
STORE_NAME absolute_import
IMPORT_FROM print_function
STORE_NAME print_function
POP_TOP
LOAD_CONST 0
LOAD_CONST ('util',)... | """ Using absolute import, do from module imports.
"""
from __future__ import absolute_import, print_function
from foobar import util
from . import local # pylint: disable=unused-import
class Foobar(object):
def __init__(self):
print(util.someFunction())
| data/Nuitka-2.0.3/tests/programs/absolute_import/foobar/foobar.py | 289 | 83 | 148,258 |
LOAD_CONST <code object <setcomp> at 0x7fab42ab7300, file "f.py", line 1>
LOAD_CONST '<setcomp>'
MAKE_FUNCTION
LOAD_NAME range
LOAD_CONST 3
CALL_FUNCTION
GET_ITER
CALL_FUNCTION
POP_TOP
LOAD_CONST <code object <dictcomp> at 0x7fab40f49270, file "f.py", line 3>
LOAD_CONST '<dictcomp>'
MAKE_FUNCTION
LOAD_NAME enumerate
L... | {y for y in range(3)}
b = {v: k for k, v in enumerate(b3)}
def __new__(classdict):
members = {k: classdict[k] for k in classdict._member_names}
return members
{a for b in bases for a in b.__dict__}
| data/uncompyle6-3.9.0/test/simple_source/comprehension/05_set_comprehension.py | 450 | 83 | 441,926 |
LOAD_CONST '\nThe second argument has type cvxpy.Expression. However, that is not allowed.\nMost likely, you want to call this atom by using cvxpy.hstack to combine the\ntwo arguemnts into a vector.\n'
STORE_NAME SECOND_ARG_SHOULD_NOT_BE_EXPRESSION_ERROR_MESSAGE
LOAD_CONST None
RETURN_VALUE | SECOND_ARG_SHOULD_NOT_BE_EXPRESSION_ERROR_MESSAGE = """
The second argument has type cvxpy.Expression. However, that is not allowed.
Most likely, you want to call this atom by using cvxpy.hstack to combine the
two arguemnts into a vector.
"""
| data/cvxpy-1.4.2/cvxpy/atoms/errormsg.py | 90 | 83 | 273,661 |
LOAD_CONST 0
LOAD_CONST ('*',)
IMPORT_NAME azure.cli.core.aaz
IMPORT_STAR
LOAD_NAME register_command_group
LOAD_CONST 'relay hyco authorization-rule'
CALL_FUNCTION
LOAD_BUILD_CLASS
LOAD_CONST <code object __CMDGroup at 0x7faa53250ed0, file "f.py", line 4>
LOAD_CONST '__CMDGroup'
MAKE_FUNCTION
LOAD_CONST '__CMDGroup'
... | from azure.cli.core.aaz import *
@register_command_group(
"relay hyco authorization-rule",
)
class __CMDGroup(AAZCommandGroup):
"""Manage Azure Relay Service Hybrid Connection Authorization Rule."""
pass
__all__ = ["__CMDGroup"]
| data/azure-cli-2.57.0/azure/cli/command_modules/relay/aaz/latest/relay/hyco/authorization_rule/__cmd_group.py | 192 | 83 | 375,661 |
LOAD_CONST 0
LOAD_CONST ('*',)
IMPORT_NAME azure.cli.core.aaz
IMPORT_STAR
LOAD_NAME register_command_group
LOAD_CONST 'relay wcfrelay'
CALL_FUNCTION
LOAD_BUILD_CLASS
LOAD_CONST <code object __CMDGroup at 0x7fab42062ed0, file "f.py", line 4>
LOAD_CONST '__CMDGroup'
MAKE_FUNCTION
LOAD_CONST '__CMDGroup'
LOAD_NAME AAZC... | from azure.cli.core.aaz import *
@register_command_group(
"relay wcfrelay",
)
class __CMDGroup(AAZCommandGroup):
"""Manage Azure Relay Service WCF Relay and Authorization Rule."""
pass
__all__ = ["__CMDGroup"]
| data/azure-cli-2.57.0/azure/cli/command_modules/relay/aaz/latest/relay/wcfrelay/__cmd_group.py | 192 | 83 | 375,636 |
LOAD_CONST 'Tests for tensorflow_datasets.core.resource_utils.'
STORE_NAME __doc__
LOAD_CONST 0
LOAD_CONST ('resource_utils',)
IMPORT_NAME tensorflow_datasets.core.utils
IMPORT_FROM resource_utils
STORE_NAME resource_utils
POP_TOP
LOAD_CONST <code object test_tfds_path at 0x7fab70027b70, file "f.py", line 6>
LOAD_CON... | """Tests for tensorflow_datasets.core.resource_utils."""
from tensorflow_datasets.core.utils import resource_utils
def test_tfds_path():
"""Test the proper suffix only, since the prefix can vary."""
assert resource_utils.tfds_path().name == "tensorflow_datasets"
| data/tensorflow-datasets-4.9.4/tensorflow_datasets/core/utils/resource_utils_test.py | 168 | 83 | 256,002 |
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME warnings
STORE_NAME warnings
LOAD_BUILD_CLASS
LOAD_CONST <code object FlaskWTFDeprecationWarning at 0x7fab82375810, file "f.py", line 4>
LOAD_CONST 'FlaskWTFDeprecationWarning'
MAKE_FUNCTION
LOAD_CONST 'FlaskWTFDeprecationWarning'
LOAD_NAME DeprecationWarning
CALL_FUNCTION
STOR... | import warnings
class FlaskWTFDeprecationWarning(DeprecationWarning):
pass
warnings.simplefilter("always", FlaskWTFDeprecationWarning)
warnings.filterwarnings(
"ignore", category=FlaskWTFDeprecationWarning, module="wtforms|flask_wtf"
)
| data/flask_wtf-1.2.1/src/flask_wtf/_compat.py | 215 | 83 | 386,640 |
LOAD_CONST 0
LOAD_CONST ('ABC', 'abstractmethod')
IMPORT_NAME abc
IMPORT_FROM ABC
STORE_NAME ABC
IMPORT_FROM abstractmethod
STORE_NAME abstractmethod
POP_TOP
LOAD_BUILD_CLASS
LOAD_CONST <code object StartableBase at 0x7fab4107ca50, file "f.py", line 4>
LOAD_CONST 'StartableBase'
MAKE_FUNCTION
LOAD_CONST 'StartableBase... | from abc import ABC, abstractmethod
class StartableBase(ABC):
"""Abstract base class for Thread- and Process-like objects."""
__slots__ = ()
@abstractmethod
def start(self) -> None:
raise NotImplementedError
__all__ = ["StartableBase"]
| data/reactivex-4.0.4/reactivex/abc/startable.py | 256 | 83 | 143,991 |
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME logging
STORE_NAME logging
LOAD_CONST 0
LOAD_CONST ('app',)
IMPORT_NAME app
IMPORT_FROM app
STORE_NAME app
POP_TOP
LOAD_CONST 0
LOAD_CONST ('ZeroMQServer',)
IMPORT_NAME spyne.server.zeromq
IMPORT_FROM ZeroMQServer
STORE_NAME ZeroMQServer
POP_TOP
LOAD_CONST 'tcp://127.0.0.1:50... | import logging
from app import app
from spyne.server.zeromq import ZeroMQServer
URL = "tcp://127.0.0.1:5001"
logging.info("Listening to %r", URL)
s = ZeroMQServer(app, URL)
s.serve_forever()
| data/spyne-2.14.0/examples/zeromq/server.py | 160 | 83 | 223,601 |
LOAD_CONST <code object format_error at 0x7fab41668540, file "f.py", line 1>
LOAD_CONST 'format_error'
MAKE_FUNCTION
STORE_NAME format_error
LOAD_CONST None
RETURN_VALUE
LOAD_CONST 'message'
LOAD_FAST error
LOAD_ATTR message
BUILD_MAP
STORE_FAST formatted_error
LOAD_FAST error
LOAD_ATTR locations
LOAD_CONST None
COMP... | def format_error(error):
formatted_error = {
"message": error.message,
}
if error.locations is not None:
formatted_error["locations"] = [
{"line": loc.line, "column": loc.column} for loc in error.locations
]
return formatted_error
| data/wandb-0.16.3/wandb/vendor/graphql-core-1.1/wandb_graphql/error/format_error.py | 218 | 83 | 361,014 |
LOAD_CONST 0
LOAD_CONST ('TestCase',)
IMPORT_NAME PyObjCTools.TestSupport
IMPORT_FROM TestCase
STORE_NAME TestCase
POP_TOP
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME WebKit
STORE_NAME WebKit
LOAD_BUILD_CLASS
LOAD_CONST <code object TestDOMHTMLScriptElement at 0x7fab5437dc90, file "f.py", line 5>
LOAD_CONST 'TestDOMHTML... | from PyObjCTools.TestSupport import TestCase
import WebKit
class TestDOMHTMLScriptElement(TestCase):
def testMethods(self):
self.assertResultIsBOOL(WebKit.DOMHTMLScriptElement.defer)
self.assertArgIsBOOL(WebKit.DOMHTMLScriptElement.setDefer_, 0)
| data/pyobjc-framework-WebKit-10.1/PyObjCTest/test_domhtmlscriptelement.py | 273 | 83 | 418,856 |
LOAD_CONST 0
LOAD_CONST ('BlackjackEnv',)
IMPORT_NAME gym.envs.toy_text.blackjack
IMPORT_FROM BlackjackEnv
STORE_NAME BlackjackEnv
POP_TOP
LOAD_CONST 0
LOAD_CONST ('CliffWalkingEnv',)
IMPORT_NAME gym.envs.toy_text.cliffwalking
IMPORT_FROM CliffWalkingEnv
STORE_NAME CliffWalkingEnv
POP_TOP
LOAD_CONST 0
LOAD_CONST ('Fr... | from gym.envs.toy_text.blackjack import BlackjackEnv
from gym.envs.toy_text.cliffwalking import CliffWalkingEnv
from gym.envs.toy_text.frozen_lake import FrozenLakeEnv
from gym.envs.toy_text.taxi import TaxiEnv
| data/gym-0.26.2/gym/envs/toy_text/__init__.py | 179 | 83 | 219,898 |
LOAD_CONST 'Per-prefix data, mapping each prefix to a name.\n\nAuto-generated file, do not edit by hand.\n'
STORE_NAME __doc__
LOAD_CONST 2
LOAD_CONST ('u',)
IMPORT_NAME util
IMPORT_FROM u
STORE_NAME u
POP_TOP
BUILD_MAP
STORE_NAME TIMEZONE_DATA
LOAD_CONST 1
LOAD_CONST ('data',)
IMPORT_NAME data0
IMPORT_FROM data
STO... | """Per-prefix data, mapping each prefix to a name.
Auto-generated file, do not edit by hand.
"""
from ..util import u
TIMEZONE_DATA = {}
from .data0 import data
TIMEZONE_DATA.update(data)
del data
TIMEZONE_LONGEST_PREFIX = 8
| data/phonenumbers-8.13.30/phonenumbers/tzdata/__init__.py | 139 | 83 | 122,997 |
LOAD_CONST 0
LOAD_CONST ('TestCase', 'min_os_level')
IMPORT_NAME PyObjCTools.TestSupport
IMPORT_FROM TestCase
STORE_NAME TestCase
IMPORT_FROM min_os_level
STORE_NAME min_os_level
POP_TOP
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME PhotosUI
STORE_NAME PhotosUI
LOAD_BUILD_CLASS
LOAD_CONST <code object TestPHProjectTypeDes... | from PyObjCTools.TestSupport import TestCase, min_os_level
import PhotosUI
class TestPHProjectTypeDescription(TestCase):
@min_os_level("10.14")
def testMethods(self):
self.assertResultIsBOOL(PhotosUI.PHProjectTypeDescription.canProvideSubtypes)
| data/pyobjc-framework-PhotosUI-10.1/PyObjCTest/test_phprojecttypedescription.py | 281 | 83 | 220,008 |
LOAD_CONST "Dataset definition for opinosis.\n\nDEPRECATED!\nIf you want to use the Opinosis dataset builder class, use:\ntfds.builder_cls('opinosis')\n"
STORE_NAME __doc__
LOAD_CONST 0
LOAD_CONST ('lazy_builder_import',)
IMPORT_NAME tensorflow_datasets.core
IMPORT_FROM lazy_builder_import
STORE_NAME lazy_builder_impo... | """Dataset definition for opinosis.
DEPRECATED!
If you want to use the Opinosis dataset builder class, use:
tfds.builder_cls('opinosis')
"""
from tensorflow_datasets.core import lazy_builder_import
Opinosis = lazy_builder_import.LazyBuilderImport("opinosis")
| data/tensorflow-datasets-4.9.4/tensorflow_datasets/summarization/opinosis.py | 127 | 83 | 256,390 |
LOAD_CONST 0
LOAD_CONST ('Optional',)
IMPORT_NAME typing
IMPORT_FROM Optional
STORE_NAME Optional
POP_TOP
LOAD_CONST 0
LOAD_CONST ('DirectoryObject',)
IMPORT_NAME office365.directory.object
IMPORT_FROM DirectoryObject
STORE_NAME DirectoryObject
POP_TOP
LOAD_BUILD_CLASS
LOAD_CONST <code object PolicyBase at 0x7fab7002... | from typing import Optional
from office365.directory.object import DirectoryObject
class PolicyBase(DirectoryObject):
"""Represents an abstract base type for policy types to inherit from"""
@property
def display_name(self):
"""Display name for this policy"""
return self.properties.get("d... | data/Office365-REST-Python-Client-2.5.5/office365/directory/policies/base.py | 247 | 83 | 188,811 |
LOAD_CONST 0
LOAD_CONST ('TestCase', 'min_sdk_level')
IMPORT_NAME PyObjCTools.TestSupport
IMPORT_FROM TestCase
STORE_NAME TestCase
IMPORT_FROM min_sdk_level
STORE_NAME min_sdk_level
POP_TOP
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME CoreML
STORE_NAME CoreML
LOAD_BUILD_CLASS
LOAD_CONST <code object TestMLComputeDevicePr... | from PyObjCTools.TestSupport import TestCase, min_sdk_level
import CoreML # noqa: F401
class TestMLComputeDeviceProtocol(TestCase):
@min_sdk_level("14.0")
def test_functions(self):
self.assertProtocolExists("MLComputeDeviceProtocol")
| data/pyobjc-framework-CoreML-10.1/PyObjCTest/test_mlcomputedeviceprotocol.py | 278 | 83 | 220,056 |
LOAD_CONST 'Django Template Coverage Plugin'
STORE_NAME __doc__
LOAD_CONST 1
LOAD_CONST ('DjangoTemplatePluginException',)
IMPORT_NAME plugin
IMPORT_FROM DjangoTemplatePluginException
STORE_NAME DjangoTemplatePluginException
POP_TOP
LOAD_CONST 1
LOAD_CONST ('DjangoTemplatePlugin',)
IMPORT_NAME plugin
IMPORT_FROM Djan... | """Django Template Coverage Plugin"""
from .plugin import DjangoTemplatePluginException # noqa
from .plugin import DjangoTemplatePlugin
def coverage_init(reg, options):
plugin = DjangoTemplatePlugin(options)
reg.add_file_tracer(plugin)
reg.add_configurer(plugin)
| data/django_coverage_plugin-3.1.0/django_coverage_plugin/__init__.py | 190 | 83 | 52,150 |
LOAD_CONST 1
LOAD_CONST ('Object',)
IMPORT_NAME object
IMPORT_FROM Object
STORE_NAME Object
POP_TOP
LOAD_BUILD_CLASS
LOAD_CONST <code object List at 0x7faac03228a0, file "f.py", line 4>
LOAD_CONST 'List'
MAKE_FUNCTION
LOAD_CONST 'List'
LOAD_NAME list
CALL_FUNCTION
STORE_NAME List
LOAD_CONST None
RETURN_VALUE
LOAD_NAM... | from .object import Object
class List(list):
__slots__ = []
def __str__(self):
return Object.__str__(self)
def __repr__(self):
return f"pyrogram.types.List([{','.join(Object.__repr__(i) for i in self)}])"
| data/Pyrogram-2.0.106/pyrogram/types/list.py | 368 | 83 | 273,022 |
LOAD_CONST 1
LOAD_CONST ('S3FileSystem',)
IMPORT_NAME core
IMPORT_FROM S3FileSystem
STORE_NAME S3FileSystem
POP_TOP
LOAD_CONST (False, False)
LOAD_CONST <code object S3Map at 0x7fab700dbc00, file "f.py", line 4>
LOAD_CONST 'S3Map'
MAKE_FUNCTION
STORE_NAME S3Map
LOAD_CONST None
RETURN_VALUE
LOAD_FAST s3
JUMP_IF_TRUE_O... | from .core import S3FileSystem
def S3Map(root, s3, check=False, create=False):
"""Mirror previous class, not implemented in fsspec"""
s3 = s3 or S3FileSystem.current()
return s3.get_mapper(root, check=check, create=create)
| data/s3fs-2024.2.0/s3fs/mapping.py | 143 | 83 | 224,007 |
LOAD_CONST 2
LOAD_CONST ('trainers',)
IMPORT_NAME
IMPORT_FROM trainers
STORE_NAME trainers
POP_TOP
LOAD_NAME trainers
LOAD_ATTR Trainer
STORE_NAME Trainer
LOAD_NAME trainers
LOAD_ATTR BpeTrainer
STORE_NAME BpeTrainer
LOAD_NAME trainers
LOAD_ATTR UnigramTrainer
STORE_NAME UnigramTrainer
LOAD_NAME trainers
LOAD_ATTR ... | from .. import trainers
Trainer = trainers.Trainer
BpeTrainer = trainers.BpeTrainer
UnigramTrainer = trainers.UnigramTrainer
WordLevelTrainer = trainers.WordLevelTrainer
WordPieceTrainer = trainers.WordPieceTrainer
| data/tokenizers-0.15.2/bindings/python/py_src/tokenizers/trainers/__init__.py | 121 | 83 | 117,678 |
LOAD_CONST '__'
STORE_NAME DUNDER
LOAD_CONST 'metric_time'
STORE_NAME METRIC_TIME_ELEMENT_NAME
LOAD_NAME str
LOAD_NAME bool
LOAD_CONST ('element_name', 'return')
BUILD_CONST_KEY_MAP
LOAD_CONST <code object is_metric_time_name at 0x7fab540c5150, file "f.py", line 6>
LOAD_CONST 'is_metric_time_name'
MAKE_FUNCTION
STORE... | DUNDER = "__"
METRIC_TIME_ELEMENT_NAME = "metric_time"
def is_metric_time_name(element_name: str) -> bool:
"""Returns True if the given element name corresponds to metric time."""
return element_name == METRIC_TIME_ELEMENT_NAME
| data/dbt_semantic_interfaces-0.4.3/dbt_semantic_interfaces/naming/keywords.py | 139 | 83 | 105,139 |
LOAD_CONST 2
LOAD_CONST ('trainers',)
IMPORT_NAME
IMPORT_FROM trainers
STORE_NAME trainers
POP_TOP
LOAD_NAME trainers
LOAD_ATTR Trainer
STORE_NAME Trainer
LOAD_NAME trainers
LOAD_ATTR BpeTrainer
STORE_NAME BpeTrainer
LOAD_NAME trainers
LOAD_ATTR UnigramTrainer
STORE_NAME UnigramTrainer
LOAD_NAME trainers
LOAD_ATTR ... | from .. import trainers
Trainer = trainers.Trainer
BpeTrainer = trainers.BpeTrainer
UnigramTrainer = trainers.UnigramTrainer
WordLevelTrainer = trainers.WordLevelTrainer
WordPieceTrainer = trainers.WordPieceTrainer
| data/tokenizers-0.15.2/py_src/tokenizers/trainers/__init__.py | 121 | 83 | 117,701 |
LOAD_CONST 0
LOAD_CONST ('setup',)
IMPORT_NAME setuptools
IMPORT_FROM setup
STORE_NAME setup
POP_TOP
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME versioneer
STORE_NAME versioneer
LOAD_NAME setup
LOAD_NAME versioneer
LOAD_METHOD get_version
CALL_METHOD
LOAD_NAME versioneer
LOAD_METHOD get_cmdclass
CALL_METHOD
LOAD_CONS... | from setuptools import setup
import versioneer
setup(
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
zip_safe=True,
packages=["demo"],
package_dir={"": "src"},
scripts=["bin/rundemo"],
)
| data/versioneer-0.29/test/demoapp-pyproject/setup.py | 142 | 83 | 342,612 |
LOAD_CONST 0
LOAD_CONST ('Enum',)
IMPORT_NAME enum
IMPORT_FROM Enum
STORE_NAME Enum
POP_TOP
LOAD_BUILD_CLASS
LOAD_CONST <code object ElevenLabsModel at 0x7fab823c2930, file "f.py", line 4>
LOAD_CONST 'ElevenLabsModel'
MAKE_FUNCTION
LOAD_CONST 'ElevenLabsModel'
LOAD_NAME str
LOAD_NAME Enum
CALL_FUNCTION
STORE_NAME Elev... | from enum import Enum
class ElevenLabsModel(str, Enum):
"""Models available for Eleven Labs Text2Speech."""
MULTI_LINGUAL = "eleven_multilingual_v1"
MONO_LINGUAL = "eleven_monolingual_v1"
| data/langchain_community-0.0.21/langchain_community/tools/eleven_labs/models.py | 207 | 83 | 15,399 |
LOAD_CONST 0
LOAD_CONST ('serializers',)
IMPORT_NAME rest_framework
IMPORT_FROM serializers
STORE_NAME serializers
POP_TOP
LOAD_CONST 0
LOAD_CONST ('TaggitSerializer', 'TagListSerializerField')
IMPORT_NAME taggit.serializers
IMPORT_FROM TaggitSerializer
STORE_NAME TaggitSerializer
IMPORT_FROM TagListSerializerField
ST... | from rest_framework import serializers
from taggit.serializers import TaggitSerializer, TagListSerializerField
from .models import TestModel
class TestModelSerializer(TaggitSerializer, serializers.ModelSerializer):
tags = TagListSerializerField()
class Meta:
model = TestModel
fields = "__al... | data/django-taggit-5.0.1/tests/serializers.py | 323 | 83 | 22,451 |
LOAD_CONST 0
LOAD_CONST ('annotations',)
IMPORT_NAME __future__
IMPORT_FROM annotations
STORE_NAME annotations
POP_TOP
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME impala.dbapi
IMPORT_FROM dbapi
STORE_NAME impyla
POP_TOP
LOAD_CONST 0
LOAD_CONST ('Error',)
IMPORT_NAME impala.error
IMPORT_FROM Error
STORE_NAME ImpylaError
... | from __future__ import annotations
import impala.dbapi as impyla
from impala.error import Error as ImpylaError
from impala.error import HiveServer2Error as HS2Error
__all__ = (
"impyla",
"ImpylaError",
"HS2Error",
)
| data/ibis_framework-8.0.0/ibis/backends/impala/compat.py | 146 | 83 | 161,349 |
LOAD_CONST 1
LOAD_CONST ('BaseStreamState', 'BaseStreamStates', 'UnopenedBaseStreamSt', 'OpeningBaseStreamSt', 'OpenBaseStreamSt', 'CloseBaseStreamSt')
IMPORT_NAME _basestream_states
IMPORT_FROM BaseStreamState
STORE_NAME BaseStreamState
IMPORT_FROM BaseStreamStates
STORE_NAME BaseStreamStates
IMPORT_FROM UnopenedBaseS... | from ._basestream_states import (
BaseStreamState,
BaseStreamStates,
UnopenedBaseStreamSt,
OpeningBaseStreamSt,
OpenBaseStreamSt,
CloseBaseStreamSt,
)
from ._omm_states import OMMStreamStates
from ._stream_states import StreamStates
| data/refinitiv-data-1.6.0/refinitiv/data/delivery/_stream/states/__init__.py | 204 | 83 | 195,953 |
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME ibis
STORE_NAME ibis
LOAD_NAME ibis
LOAD_ATTR table
LOAD_CONST 'star1'
LOAD_CONST 'int32'
LOAD_CONST 'float64'
LOAD_CONST 'string'
LOAD_CONST 'string'
LOAD_CONST ('c', 'f', 'foo_id', 'bar_id')
BUILD_CONST_KEY_MAP
LOAD_CONST ('name', 'schema')
CALL_FUNCTION
STORE_NAME star1
L... | import ibis
star1 = ibis.table(
name="star1",
schema={"c": "int32", "f": "float64", "foo_id": "string", "bar_id": "string"},
)
result = star1.filter(star1.f > 0).limit(10)
| data/ibis_framework-8.0.0/ibis/tests/sql/snapshots/test_select_sql/test_select_sql/filter_then_limit/decompiled.py | 131 | 83 | 161,242 |
LOAD_BUILD_CLASS
LOAD_CONST <code object TodoError at 0x7faac02be030, file "f.py", line 1>
LOAD_CONST 'TodoError'
MAKE_FUNCTION
LOAD_CONST 'TodoError'
LOAD_NAME Exception
CALL_FUNCTION
STORE_NAME TodoError
LOAD_CONST None
RETURN_VALUE
LOAD_NAME __name__
STORE_NAME __module__
LOAD_CONST 'TodoError'
STORE_NAME __qualnam... | class TodoError(Exception):
"""Generic errors."""
def __init__(self, msg):
Exception.__init__(self)
self.msg = msg
def __str__(self):
return self.msg
def __repr__(self):
return "<TodoError - %s>" % self.msg
| data/cement-3.0.8/cement/cli/templates/generate/todo-tutorial/todo/core/exc.py | 325 | 83 | 89,558 |
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME unittest
STORE_NAME unittest
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME pycurl
STORE_NAME pycurl
LOAD_BUILD_CLASS
LOAD_CONST <code object VersionTest at 0x7fab702cd660, file "f.py", line 5>
LOAD_CONST 'VersionTest'
MAKE_FUNCTION
LOAD_CONST 'VersionTest'
LOAD_NAME unittest
LOAD_A... | import unittest
import pycurl
class VersionTest(unittest.TestCase):
def test_pycurl_presence_and_case(self):
assert pycurl.version.startswith("PycURL/")
def test_libcurl_presence(self):
assert "libcurl/" in pycurl.version
| data/pycurl-7.45.3/tests/version_test.py | 338 | 83 | 173,960 |
LOAD_CONST 0
LOAD_CONST ('annotations',)
IMPORT_NAME __future__
IMPORT_FROM annotations
STORE_NAME annotations
POP_TOP
LOAD_CONST 0
LOAD_CONST ('setup',)
IMPORT_NAME skbuild
IMPORT_FROM setup
STORE_NAME setup
POP_TOP
LOAD_NAME setup
LOAD_CONST 'hello'
LOAD_CONST '1.2.3'
LOAD_CONST 'John Doe'
LOAD_CONST 'test@exam... | from __future__ import annotations
from skbuild import setup
setup(
name="hello",
version="1.2.3",
author="John Doe",
author_email="test@example.com",
url="https://example.com",
include_package_data=True,
)
| data/scikit_build-0.17.6/tests/samples/issue-401-sdist-with-symlinks/setup.py | 136 | 83 | 198,920 |
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME networkx
STORE_NAME nx
LOAD_CONST 0
LOAD_CONST ('InstructionSetArchitecture',)
IMPORT_NAME qcs_sdk.qpu.isa
IMPORT_FROM InstructionSetArchitecture
STORE_NAME InstructionSetArchitecture
POP_TOP
LOAD_NAME InstructionSetArchitecture
LOAD_NAME nx
LOAD_ATTR Graph
LOAD_CONST ('isa', ... | import networkx as nx
from qcs_sdk.qpu.isa import InstructionSetArchitecture
def qcs_isa_to_graph(isa: InstructionSetArchitecture) -> nx.Graph:
return nx.from_edgelist(edge.node_ids for edge in isa.architecture.edges)
| data/pyquil-4.6.2/pyquil/quantum_processor/transformers/qcs_isa_to_graph.py | 270 | 83 | 351,484 |
LOAD_CONST 0
LOAD_CONST ('TestCase', 'min_os_level')
IMPORT_NAME PyObjCTools.TestSupport
IMPORT_FROM TestCase
STORE_NAME TestCase
IMPORT_FROM min_os_level
STORE_NAME min_os_level
POP_TOP
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME Social
STORE_NAME Social
LOAD_BUILD_CLASS
LOAD_CONST <code object TestSLComposeServiceView... | from PyObjCTools.TestSupport import TestCase, min_os_level
import Social
class TestSLComposeServiceViewController(TestCase):
@min_os_level("10.10")
def testMethods(self):
self.assertResultIsBOOL(Social.SLComposeServiceViewController.isContentValid)
| data/pyobjc-framework-Social-10.1/PyObjCTest/test_slcomposeserviceviewcontroller.py | 291 | 83 | 366,360 |
LOAD_CONST 0
LOAD_CONST ('AxError',)
IMPORT_NAME ax.exceptions.core
IMPORT_FROM AxError
STORE_NAME AxError
POP_TOP
LOAD_BUILD_CLASS
LOAD_CONST <code object ModelError at 0x7fab82322780, file "f.py", line 4>
LOAD_CONST 'ModelError'
MAKE_FUNCTION
LOAD_CONST 'ModelError'
LOAD_NAME AxError
CALL_FUNCTION
STORE_NAME ModelEr... | from ax.exceptions.core import AxError
class ModelError(AxError):
"""Raised when an error occurs during modeling."""
pass
class CVNotSupportedError(AxError):
"""Raised when cross validation is applied to a model which doesn't
support it.
"""
pass
| data/ax-platform-0.3.6/ax/exceptions/model.py | 280 | 83 | 63,342 |
LOAD_CONST 'AUTOGENERATED. DO NOT EDIT.'
STORE_NAME __doc__
LOAD_CONST 0
LOAD_CONST ('preprocessing',)
IMPORT_NAME tf_keras.api._v1.keras.layers.experimental
IMPORT_FROM preprocessing
STORE_NAME preprocessing
POP_TOP
LOAD_CONST 0
LOAD_CONST ('EinsumDense',)
IMPORT_NAME tf_keras.src.layers.core.einsum_dense
IMPORT_FRO... | """AUTOGENERATED. DO NOT EDIT."""
from tf_keras.api._v1.keras.layers.experimental import preprocessing
from tf_keras.src.layers.core.einsum_dense import EinsumDense
from tf_keras.src.layers.kernelized import RandomFourierFeatures
| data/tf_keras-2.15.0/tf_keras/api/_v1/keras/layers/experimental/__init__.py | 159 | 83 | 354,041 |
LOAD_CONST 0
LOAD_CONST ('StoreException', 'WrappedFun', 'cache', 'merge_linear_aux', 'transformation', 'transformation_with_aux', 'wrap_init')
IMPORT_NAME jax._src.linear_util
IMPORT_FROM StoreException
STORE_NAME StoreException
IMPORT_FROM WrappedFun
STORE_NAME WrappedFun
IMPORT_FROM cache
STORE_NAME cache
IMPORT_FRO... | from jax._src.linear_util import (
StoreException as StoreException,
WrappedFun as WrappedFun,
cache as cache,
merge_linear_aux as merge_linear_aux,
transformation as transformation,
transformation_with_aux as transformation_with_aux,
wrap_init as wrap_init,
)
| data/jax-0.4.24/jax/extend/linear_util.py | 127 | 83 | 328,990 |
LOAD_CONST 0
LOAD_CONST ('iterator',)
IMPORT_NAME keras_preprocessing.image
IMPORT_FROM iterator
STORE_NAME iterator
POP_TOP
LOAD_CONST <code object test_iterator_empty_directory at 0x7fab702a61e0, file "f.py", line 4>
LOAD_CONST 'test_iterator_empty_directory'
MAKE_FUNCTION
STORE_NAME test_iterator_empty_directory
LO... | from keras_preprocessing.image import iterator
def test_iterator_empty_directory():
for batch_size in [0, 32]:
data_iterator = iterator.Iterator(0, batch_size, False, 0)
ret = next(data_iterator.index_generator)
assert ret.size == 0
| data/Keras_Preprocessing-1.1.2/tests/image/iterator_test.py | 207 | 83 | 353,521 |
LOAD_CONST 0
LOAD_CONST ('PlaywrightEvaluator', 'PlaywrightURLLoader', 'UnstructuredHtmlEvaluator')
IMPORT_NAME langchain_community.document_loaders.url_playwright
IMPORT_FROM PlaywrightEvaluator
STORE_NAME PlaywrightEvaluator
IMPORT_FROM PlaywrightURLLoader
STORE_NAME PlaywrightURLLoader
IMPORT_FROM UnstructuredHtmlEv... | from langchain_community.document_loaders.url_playwright import (
PlaywrightEvaluator,
PlaywrightURLLoader,
UnstructuredHtmlEvaluator,
)
__all__ = ["PlaywrightEvaluator", "UnstructuredHtmlEvaluator", "PlaywrightURLLoader"]
| data/langchain-0.1.8/langchain/document_loaders/url_playwright.py | 148 | 83 | 368,534 |
LOAD_CONST 'checksum_deploy'
STORE_NAME CHECKSUM_DEPLOY
LOAD_CONST 'revisions'
STORE_NAME REVISIONS
LOAD_CONST 'oauth_token'
STORE_NAME OAUTH_TOKEN
LOAD_CONST '2.1.0'
STORE_NAME __version__
LOAD_CONST None
RETURN_VALUE | CHECKSUM_DEPLOY = "checksum_deploy" # Only when v2
REVISIONS = "revisions" # Only when enabled in config, not by default look at server_launcher.py
OAUTH_TOKEN = "oauth_token"
__version__ = "2.1.0"
| data/conan-2.1.0/conans/__init__.py | 72 | 83 | 242,276 |
LOAD_CONST 2
LOAD_CONST ('_utilities',)
IMPORT_NAME
IMPORT_FROM _utilities
STORE_NAME _utilities
POP_TOP
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME typing
STORE_NAME typing
LOAD_CONST 1
LOAD_CONST ('*',)
IMPORT_NAME contact
IMPORT_STAR
LOAD_CONST 1
LOAD_CONST ('*',)
IMPORT_NAME document_ai_processor
IMPORT_STAR
LOAD_... | from .. import _utilities
import typing
from .contact import *
from .document_ai_processor import *
from .document_ai_processor_default_version import *
from .document_ai_warehouse_document_schema import *
from .document_ai_warehouse_location import *
from ._inputs import *
from . import outputs
| data/pulumi_gcp-7.9.0/pulumi_gcp/essentialcontacts/__init__.py | 193 | 83 | 446,050 |
LOAD_CONST "Dataset definition for placesfull.\n\nDEPRECATED!\nIf you want to use the Placesfull dataset builder class, use:\ntfds.builder_cls('placesfull')\n"
STORE_NAME __doc__
LOAD_CONST 0
LOAD_CONST ('lazy_builder_import',)
IMPORT_NAME tensorflow_datasets.core
IMPORT_FROM lazy_builder_import
STORE_NAME lazy_builde... | """Dataset definition for placesfull.
DEPRECATED!
If you want to use the Placesfull dataset builder class, use:
tfds.builder_cls('placesfull')
"""
from tensorflow_datasets.core import lazy_builder_import
Placesfull = lazy_builder_import.LazyBuilderImport("placesfull")
| data/tfds-nightly-4.9.4.dev202402210044/tensorflow_datasets/image_classification/placesfull/placesfull.py | 127 | 83 | 238,543 |
LOAD_CONST '\nMake mistletoe runnable as a script with default settings.\n'
STORE_NAME __doc__
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME sys
STORE_NAME sys
LOAD_CONST 0
LOAD_CONST ('cli',)
IMPORT_NAME mistletoe
IMPORT_FROM cli
STORE_NAME cli
POP_TOP
LOAD_CONST <code object main at 0x7fab412574b0, file "f.py", line 9>... | """
Make mistletoe runnable as a script with default settings.
"""
import sys
from mistletoe import cli
def main():
"""
Entry point.
"""
cli.main(sys.argv[1:])
if __name__ == "__main__":
main()
| data/mistletoe-1.3.0/mistletoe/__main__.py | 176 | 83 | 346,104 |
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME sys
STORE_NAME sys
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME os
STORE_NAME os
LOAD_CONST 0
LOAD_CONST ('glob',)
IMPORT_NAME glob
IMPORT_FROM glob
STORE_NAME glob
POP_TOP
LOAD_NAME glob
LOAD_NAME os
LOAD_ATTR path
LOAD_METHOD join
LOAD_NAME sys
LOAD_ATTR argv
LOAD_CONST 1
BINARY... | import sys, os
from glob import glob
files = glob(os.path.join(sys.argv[1], "*.tmp"))
assert len(files) == 1
with open(files[0]) as ifile, open(sys.argv[2], "w") as ofile:
ofile.write(ifile.read())
| data/numpy-1.26.4/vendored-meson/meson/test cases/common/71 ctarget dependency/gen2.py | 220 | 83 | 363,761 |
LOAD_CONST 'Connectivity and cut algorithms\n'
STORE_NAME __doc__
LOAD_CONST 1
LOAD_CONST ('*',)
IMPORT_NAME connectivity
IMPORT_STAR
LOAD_CONST 1
LOAD_CONST ('*',)
IMPORT_NAME cuts
IMPORT_STAR
LOAD_CONST 1
LOAD_CONST ('*',)
IMPORT_NAME edge_augmentation
IMPORT_STAR
LOAD_CONST 1
LOAD_CONST ('*',)
IMPORT_NAME edge_k... | """Connectivity and cut algorithms
"""
from .connectivity import *
from .cuts import *
from .edge_augmentation import *
from .edge_kcomponents import *
from .disjoint_paths import *
from .kcomponents import *
from .kcutsets import *
from .stoerwagner import *
from .utils import *
| data/networkx-3.2.1/networkx/algorithms/connectivity/__init__.py | 182 | 83 | 130,880 |
LOAD_CONST 'OTEL_PYTHON_LOG_CORRELATION'
STORE_NAME OTEL_PYTHON_LOG_CORRELATION
LOAD_CONST 'OTEL_PYTHON_LOG_FORMAT'
STORE_NAME OTEL_PYTHON_LOG_FORMAT
LOAD_CONST 'OTEL_PYTHON_LOG_LEVEL'
STORE_NAME OTEL_PYTHON_LOG_LEVEL
LOAD_CONST None
RETURN_VALUE | OTEL_PYTHON_LOG_CORRELATION = "OTEL_PYTHON_LOG_CORRELATION"
OTEL_PYTHON_LOG_FORMAT = "OTEL_PYTHON_LOG_FORMAT"
OTEL_PYTHON_LOG_LEVEL = "OTEL_PYTHON_LOG_LEVEL"
| data/opentelemetry_instrumentation_logging-0.43b0/src/opentelemetry/instrumentation/logging/environment_variables.py | 98 | 83 | 155,324 |
LOAD_CONST 1
LOAD_CONST ('AsyncClient', 'ReflectionAsyncClient', 'StubAsyncClient', 'get_by_endpoint')
IMPORT_NAME aio
IMPORT_FROM AsyncClient
STORE_NAME AsyncClient
IMPORT_FROM ReflectionAsyncClient
STORE_NAME ReflectionAsyncClient
IMPORT_FROM StubAsyncClient
STORE_NAME StubAsyncClient
IMPORT_FROM get_by_endpoint
STOR... | from .aio import (
AsyncClient,
ReflectionAsyncClient,
StubAsyncClient,
get_by_endpoint as async_get_by_endpoint,
)
from .client import Client, ReflectionClient, StubClient, get_by_endpoint
__version__ = "0.1.15"
| data/grpc_requests-0.1.15/src/grpc_requests/__init__.py | 184 | 83 | 434,141 |
LOAD_CONST 0
LOAD_CONST ('migrations',)
IMPORT_NAME django.db
IMPORT_FROM migrations
STORE_NAME migrations
POP_TOP
LOAD_BUILD_CLASS
LOAD_CONST <code object Migration at 0x7faac0274b70, file "f.py", line 4>
LOAD_CONST 'Migration'
MAKE_FUNCTION
LOAD_CONST 'Migration'
LOAD_NAME migrations
LOAD_ATTR Migration
CALL_FUNCTIO... | from django.db import migrations
class Migration(migrations.Migration):
dependencies = [("axes", "0004_auto_20181024_1538")]
operations = [migrations.RemoveField(model_name="accessattempt", name="trusted")]
| data/django-axes-6.3.0/axes/migrations/0005_remove_accessattempt_trusted.py | 197 | 83 | 362,976 |
LOAD_CONST 'Mini library to provide an easy way to initialize the Python logging module.'
STORE_NAME __doc__
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME logging
STORE_NAME logging
LOAD_NAME logging
LOAD_METHOD getLogger
LOAD_NAME __name__
CALL_METHOD
LOAD_METHOD addHandler
LOAD_NAME logging
LOAD_METHOD NullHandler
CALL_... | """Mini library to provide an easy way to initialize the Python logging module."""
import logging
logging.getLogger(__name__).addHandler(logging.NullHandler())
__author__ = "RWS Datalab"
__email__ = "datalab.codebase@rws.nl"
__version__ = "1.2.0"
| data/logginginitializer-1.2.0/logginginitializer/__init__.py | 125 | 83 | 244,370 |
LOAD_CONST 0
LOAD_CONST ('models',)
IMPORT_NAME django.db
IMPORT_FROM models
STORE_NAME models
POP_TOP
LOAD_CONST 0
LOAD_CONST ('BRCNPJField', 'BRCPFField', 'BRPostalCodeField')
IMPORT_NAME localflavor.br.models
IMPORT_FROM BRCNPJField
STORE_NAME BRCNPJField
IMPORT_FROM BRCPFField
STORE_NAME BRCPFField
IMPORT_FROM BRP... | from django.db import models
from localflavor.br.models import BRCNPJField, BRCPFField, BRPostalCodeField
class BRPersonProfile(models.Model):
cpf = BRCPFField()
cnpj = BRCNPJField()
postal_code = BRPostalCodeField()
| data/django-localflavor-4.0/tests/test_br/models.py | 246 | 83 | 434,820 |
LOAD_CONST 0
LOAD_CONST ('GZipMiddleware',)
IMPORT_NAME django.middleware.gzip
IMPORT_FROM GZipMiddleware
STORE_NAME GZipMiddleware
POP_TOP
LOAD_CONST 0
LOAD_CONST ('decorator_from_middleware',)
IMPORT_NAME django.utils.decorators
IMPORT_FROM decorator_from_middleware
STORE_NAME decorator_from_middleware
POP_TOP
LOAD... | from django.middleware.gzip import GZipMiddleware
from django.utils.decorators import decorator_from_middleware
gzip_page = decorator_from_middleware(GZipMiddleware)
gzip_page.__doc__ = "Decorator for views that gzips pages if the client supports it."
| data/Django-5.0.2/django/views/decorators/gzip.py | 151 | 83 | 326,626 |
LOAD_CONST 1
LOAD_CONST ('SetCriterion', 'flatten_temporal_batch_dims')
IMPORT_NAME criterion
IMPORT_FROM SetCriterion
STORE_NAME SetCriterion
IMPORT_FROM flatten_temporal_batch_dims
STORE_NAME flatten_temporal_batch_dims
POP_TOP
LOAD_CONST 1
LOAD_CONST ('HungarianMatcher',)
IMPORT_NAME matcher
IMPORT_FROM HungarianMa... | from .criterion import SetCriterion, flatten_temporal_batch_dims
from .matcher import HungarianMatcher
from .misc import interpolate, nested_tensor_from_videos_list
from .mttr import MTTR
from .postprocessing import A2DSentencesPostProcess, ReferYoutubeVOSPostProcess
| data/modelscope-1.12.0/modelscope/models/cv/referring_video_object_segmentation/utils/__init__.py | 266 | 83 | 314,613 |
LOAD_CONST 0
LOAD_CONST ('annotations',)
IMPORT_NAME __future__
IMPORT_FROM annotations
STORE_NAME annotations
POP_TOP
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME hmac
STORE_NAME hmac
LOAD_CONST 'bytes'
LOAD_CONST 'bytes'
LOAD_CONST 'bool'
LOAD_CONST ('a', 'b', 'return')
BUILD_CONST_KEY_MAP
LOAD_CONST <code object bytes... | from __future__ import annotations
import hmac
def bytes_eq(a: bytes, b: bytes) -> bool:
if not isinstance(a, bytes) or not isinstance(b, bytes):
raise TypeError("a and b must be bytes.")
return hmac.compare_digest(a, b)
| data/cryptography-42.0.4/src/cryptography/hazmat/primitives/constant_time.py | 193 | 83 | 400,866 |
LOAD_CONST 0
LOAD_CONST ('unique',)
IMPORT_NAME enum
IMPORT_FROM unique
STORE_NAME unique
POP_TOP
LOAD_CONST 5
LOAD_CONST ('StrEnum',)
IMPORT_NAME _base_enum
IMPORT_FROM StrEnum
STORE_NAME StrEnum
POP_TOP
LOAD_NAME unique
LOAD_BUILD_CLASS
LOAD_CONST <code object MarketDataAccessDeniedFallback at 0x7fab7002b420, file ... | from enum import unique
from ....._base_enum import StrEnum
@unique
class MarketDataAccessDeniedFallback(StrEnum):
IGNORE_CONSTITUENTS = "IgnoreConstituents"
RETURN_ERROR = "ReturnError"
USE_DELAYED_DATA = "UseDelayedData"
| data/refinitiv-data-1.6.0/refinitiv/data/content/ipa/curves/_enums/_market_data_access_denied_fallback.py | 234 | 83 | 195,674 |
LOAD_CONST 0
LOAD_CONST ('ApiForget',)
IMPORT_NAME onelogin.paths.api_2_branding_brands.get
IMPORT_FROM ApiForget
STORE_NAME ApiForget
POP_TOP
LOAD_CONST 0
LOAD_CONST ('ApiForpost',)
IMPORT_NAME onelogin.paths.api_2_branding_brands.post
IMPORT_FROM ApiForpost
STORE_NAME ApiForpost
POP_TOP
LOAD_BUILD_CLASS
LOAD_CONST ... | from onelogin.paths.api_2_branding_brands.get import ApiForget
from onelogin.paths.api_2_branding_brands.post import ApiForpost
class Api2BrandingBrands(
ApiForget,
ApiForpost,
):
pass
| data/onelogin-3.1.6/onelogin/apis/paths/api_2_branding_brands.py | 224 | 83 | 397,279 |
LOAD_CONST 0
LOAD_CONST ('cdf', 'logcdf', 'logpdf', 'logsf', 'pdf', 'ppf', 'sf', 'isf')
IMPORT_NAME jax._src.scipy.stats.norm
IMPORT_FROM cdf
STORE_NAME cdf
IMPORT_FROM logcdf
STORE_NAME logcdf
IMPORT_FROM logpdf
STORE_NAME logpdf
IMPORT_FROM logsf
STORE_NAME logsf
IMPORT_FROM pdf
STORE_NAME pdf
IMPORT_FROM ppf
STORE_N... | from jax._src.scipy.stats.norm import (
cdf as cdf,
logcdf as logcdf,
logpdf as logpdf,
logsf as logsf,
pdf as pdf,
ppf as ppf,
sf as sf,
isf as isf,
)
| data/jax-0.4.24/jax/scipy/stats/norm.py | 121 | 83 | 328,967 |
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME pytest
STORE_NAME pytest
LOAD_CONST 0
LOAD_CONST ('ValidationError',)
IMPORT_NAME pydantic
IMPORT_FROM ValidationError
STORE_NAME ValidationError
POP_TOP
LOAD_CONST 0
LOAD_CONST ('DocumentWithPydanticConfig',)
IMPORT_NAME tests.odm.models
IMPORT_FROM DocumentWithPydanticConfig... | import pytest
from pydantic import ValidationError
from tests.odm.models import DocumentWithPydanticConfig
def test_pydantic_config():
doc = DocumentWithPydanticConfig(num_1=2)
with pytest.raises(ValidationError):
doc.num_1 = "wrong"
| data/beanie-1.25.0/tests/odm/documents/test_pydantic_config.py | 232 | 83 | 323,729 |
LOAD_CONST 0
LOAD_CONST ('HttpBearer',)
IMPORT_NAME ninja.security
IMPORT_FROM HttpBearer
STORE_NAME HttpBearer
POP_TOP
LOAD_BUILD_CLASS
LOAD_CONST <code object AuthBearer at 0x7fab4106ce40, file "f.py", line 4>
LOAD_CONST 'AuthBearer'
MAKE_FUNCTION
LOAD_CONST 'AuthBearer'
LOAD_NAME HttpBearer
CALL_FUNCTION
STORE_NAME... | from ninja.security import HttpBearer
class AuthBearer(HttpBearer):
def authenticate(self, request, token):
if token == "supersecret":
return token
@api.get("/bearer", auth=AuthBearer())
def bearer(request):
return {"token": request.auth}
| data/django_ninja-1.1.0/docs/src/tutorial/authentication/bearer01.py | 296 | 83 | 88,647 |
LOAD_CONST 0
LOAD_CONST ('namedtuple',)
IMPORT_NAME collections
IMPORT_FROM namedtuple
STORE_NAME namedtuple
POP_TOP
LOAD_NAME namedtuple
LOAD_CONST 'AtlasRelationship'
LOAD_CONST 'relationshipType'
LOAD_CONST 'entityType1'
LOAD_CONST 'entityQualifiedName1'
LOAD_CONST 'entityType2'
LOAD_CONST 'entityQualifiedNam... | from collections import namedtuple
AtlasRelationship = namedtuple(
"AtlasRelationship",
[
"relationshipType",
"entityType1",
"entityQualifiedName1",
"entityType2",
"entityQualifiedName2",
"attributes",
],
)
| data/amundsen-databuilder-7.4.6/databuilder/models/atlas_relationship.py | 111 | 83 | 27,656 |
LOAD_CONST 1
LOAD_CONST ('_OnPrem',)
IMPORT_NAME
IMPORT_FROM _OnPrem
STORE_NAME _OnPrem
POP_TOP
LOAD_BUILD_CLASS
LOAD_CONST <code object _Compute at 0x7fab81fc6b70, file "f.py", line 4>
LOAD_CONST '_Compute'
MAKE_FUNCTION
LOAD_CONST '_Compute'
LOAD_NAME _OnPrem
CALL_FUNCTION
STORE_NAME _Compute
LOAD_BUILD_CLASS
LOAD_... | from . import _OnPrem
class _Compute(_OnPrem):
_type = "compute"
_icon_dir = "resources/onprem/compute"
class Nomad(_Compute):
_icon = "nomad.png"
class Server(_Compute):
_icon = "server.png"
| data/diagrams-0.23.4/diagrams/onprem/compute.py | 350 | 83 | 205,970 |
LOAD_CONST 0
LOAD_CONST ('run',)
IMPORT_NAME clize
IMPORT_FROM run
STORE_NAME run
POP_TOP
LOAD_CONST '0.2'
STORE_NAME VERSION
LOAD_CONST <code object do_nothing at 0x7fab821eb420, file "f.py", line 7>
LOAD_CONST 'do_nothing'
MAKE_FUNCTION
STORE_NAME do_nothing
LOAD_CONST <code object version at 0x7fab417516f0, file ... | from clize import run
VERSION = "0.2"
def do_nothing():
"""Does nothing"""
return "I did nothing, I swear!"
def version():
"""Show the version"""
return "Do Nothing version {0}".format(VERSION)
run(do_nothing, alt=version)
| data/clize-5.0.2/examples/altcommands.py | 189 | 83 | 347,705 |
LOAD_NAME str
LOAD_CONST ('return',)
BUILD_CONST_KEY_MAP
LOAD_CONST <code object doc_to_text at 0x7f8aac3da780, file "f.py", line 1>
LOAD_CONST 'doc_to_text'
MAKE_FUNCTION
STORE_NAME doc_to_text
LOAD_CONST None
RETURN_VALUE
LOAD_CONST '{}\nQuestion: {} True, False or Neither?\nAnswer:'
LOAD_METHOD format
LOAD_FAST do... | def doc_to_text(doc) -> str:
return "{}\nQuestion: {} True, False or Neither?\nAnswer:".format(
doc["premise"],
doc["hypothesis"].strip()
+ ("" if doc["hypothesis"].strip().endswith(".") else "."),
)
| data/lm_eval-0.4.1/lm_eval/tasks/glue/mnli/utils.py | 174 | 83 | 427,403 |
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME pbr.version
STORE_NAME pbr
LOAD_CONST 0
LOAD_CONST ('api_versions',)
IMPORT_NAME novaclient
IMPORT_FROM api_versions
STORE_NAME api_versions
POP_TOP
LOAD_NAME pbr
LOAD_ATTR version
LOAD_METHOD VersionInfo
LOAD_CONST 'python-novaclient'
CALL_METHOD
LOAD_METHOD version_string
CA... | import pbr.version
from novaclient import api_versions
__version__ = pbr.version.VersionInfo("python-novaclient").version_string()
API_MIN_VERSION = api_versions.APIVersion("2.1")
API_MAX_VERSION = api_versions.APIVersion("2.95")
| data/python-novaclient-18.4.0/novaclient/__init__.py | 141 | 83 | 392,610 |
LOAD_CONST 2
LOAD_CONST ('iso_register',)
IMPORT_NAME registry_tools
IMPORT_FROM iso_register
STORE_NAME iso_register
POP_TOP
LOAD_CONST 1
LOAD_CONST ('UnitedStates',)
IMPORT_NAME core
IMPORT_FROM UnitedStates
STORE_NAME UnitedStates
POP_TOP
LOAD_NAME iso_register
LOAD_CONST 'US-TN'
CALL_FUNCTION
LOAD_BUILD_CLASS
LOA... | from ..registry_tools import iso_register
from .core import UnitedStates
@iso_register("US-TN")
class Tennessee(UnitedStates):
"""Tennessee"""
include_columbus_day = False
include_good_friday = True
include_christmas_eve = True
| data/workalendar-17.0.0/workalendar/usa/tennessee.py | 224 | 83 | 132,079 |
SETUP_EXCEPT to 18
LOAD_CONST 0
LOAD_CONST ('reduce',)
IMPORT_NAME functools
IMPORT_FROM reduce
STORE_NAME reduce
POP_TOP
POP_BLOCK
JUMP_FORWARD to 38
DUP_TOP
LOAD_NAME Exception
COMPARE_OP exception match
POP_JUMP_IF_FALSE
POP_TOP
POP_TOP
POP_TOP
POP_EXCEPT
JUMP_FORWARD to 38
END_FINALLY
SETUP_EXCEPT to 56
LOAD_C... | try:
from functools import reduce # noqa
except Exception:
pass
try:
from .tornado_handler import TornadoHandler # noqa
except ImportError:
pass
from .environmentdump import EnvironmentDump # noqa
from .healthcheck import HealthCheck # noqa
| data/py-healthcheck-1.10.1/healthcheck/__init__.py | 207 | 83 | 94,750 |
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME os
STORE_NAME os
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME zeep
STORE_NAME zeep
LOAD_CONST <code object test_hello_world at 0x7fab640f2d20, file "f.py", line 6>
LOAD_CONST 'test_hello_world'
MAKE_FUNCTION
STORE_NAME test_hello_world
LOAD_CONST None
RETURN_VALUE
LOAD_GLOBAL os
... | import os
import zeep
def test_hello_world():
path = os.path.join(
os.path.dirname(os.path.realpath(__file__)), "hello_world_recursive.wsdl"
)
client = zeep.Client(path)
client.wsdl.dump()
| data/zeep-4.2.1/tests/integration/test_hello_world_recursive.py | 185 | 83 | 156,573 |
LOAD_BUILD_CLASS
LOAD_CONST <code object PaginatedResult at 0x7f8e2fec3420, file "f.py", line 1>
LOAD_CONST 'PaginatedResult'
MAKE_FUNCTION
LOAD_CONST 'PaginatedResult'
LOAD_NAME object
CALL_FUNCTION
STORE_NAME PaginatedResult
LOAD_CONST None
RETURN_VALUE
LOAD_NAME __name__
STORE_NAME __module__
LOAD_CONST 'PaginatedR... | class PaginatedResult(object):
"""
An instance of this class is returned from paginated operations
"""
def __init__(self, total_items, page_size, current_page):
self.total_items = total_items
self.page_size = page_size
self.current_page = current_page
| data/braintree-4.26.0/braintree/paginated_result.py | 225 | 83 | 327,773 |
LOAD_CONST 0
LOAD_CONST ('Enum', 'auto')
IMPORT_NAME enum
IMPORT_FROM Enum
STORE_NAME Enum
IMPORT_FROM auto
STORE_NAME auto
POP_TOP
LOAD_BUILD_CLASS
LOAD_CONST <code object DataType at 0x7fab701ac780, file "f.py", line 4>
LOAD_CONST 'DataType'
MAKE_FUNCTION
LOAD_CONST 'DataType'
LOAD_NAME Enum
CALL_FUNCTION
STORE_NAME... | from enum import Enum, auto
class DataType(Enum):
CFS_BUCKETS = auto()
CFS_FILE_SETS = auto()
CFS_FILES = auto()
CFS_PACKAGES = auto()
CFS_STREAM = auto()
ENDPOINT = auto()
| data/refinitiv-data-1.6.0/refinitiv/data/delivery/_data/_data_type.py | 206 | 83 | 195,997 |
LOAD_CONST 'The model used for HTML rendering.\n\n- :mod:`inscriptis.model.canvas`: classes required for rendering parts of\n the HTML page.\n- :mod:`inscriptis.model.css`: classes required for the CSS support.\n- :mod:`inscriptis.model.table`: support for rendering HTML tables.\n'
STORE_NAME __doc__
LOAD_CONST None
RE... | """The model used for HTML rendering.
- :mod:`inscriptis.model.canvas`: classes required for rendering parts of
the HTML page.
- :mod:`inscriptis.model.css`: classes required for the CSS support.
- :mod:`inscriptis.model.table`: support for rendering HTML tables.
"""
| data/inscriptis-2.4.0.1/src/inscriptis/model/__init__.py | 94 | 83 | 10,034 |
LOAD_CONST 0
LOAD_CONST ('*',)
IMPORT_NAME ppft
IMPORT_STAR
LOAD_CONST 0
LOAD_CONST ('__version__', '__author__', '__doc__', '__license__', '__main__', '_USE_SUBPROCESS', '_Task', '_Worker', '_RWorker', '_Statistics', '_pp')
IMPORT_NAME ppft
IMPORT_FROM __version__
STORE_NAME __version__
IMPORT_FROM __author__
STORE_N... | from ppft import *
from ppft import (
__version__,
__author__,
__doc__,
__license__,
__main__,
_USE_SUBPROCESS,
_Task,
_Worker,
_RWorker,
_Statistics,
_pp,
)
| data/ppft-1.7.6.8/pp/__init__.py | 199 | 83 | 347,989 |
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME os
STORE_NAME os
LOAD_CONST 0
LOAD_CONST None
IMPORT_NAME zeep
STORE_NAME zeep
LOAD_CONST <code object test_hello_world at 0x7fab640f2d20, file "f.py", line 6>
LOAD_CONST 'test_hello_world'
MAKE_FUNCTION
STORE_NAME test_hello_world
LOAD_CONST None
RETURN_VALUE
LOAD_GLOBAL os
... | import os
import zeep
def test_hello_world():
path = os.path.join(
os.path.dirname(os.path.realpath(__file__)), "recursive_schema_main.wsdl"
)
client = zeep.Client(path)
client.wsdl.dump()
| data/zeep-4.2.1/tests/integration/test_recursive_schema.py | 185 | 83 | 156,572 |
LOAD_CONST 0
LOAD_CONST ('unique',)
IMPORT_NAME enum
IMPORT_FROM unique
STORE_NAME unique
POP_TOP
LOAD_CONST 0
LOAD_CONST ('StrEnum',)
IMPORT_NAME refinitiv.data._base_enum
IMPORT_FROM StrEnum
STORE_NAME StrEnum
POP_TOP
LOAD_NAME unique
LOAD_BUILD_CLASS
LOAD_CONST <code object ShiftType at 0x7fab7002b1e0, file "f.py"... | from enum import unique
from refinitiv.data._base_enum import StrEnum
@unique
class ShiftType(StrEnum):
ADDITIVE = "Additive"
RELATIVE = "Relative"
RELATIVE_PERCENT = "RelativePercent"
SCALED = "Scaled"
| data/refinitiv-data-1.6.0/refinitiv/data/content/ipa/_curves/_cross_currency_curves/_curves/_enums/_shift_type.py | 211 | 83 | 195,403 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.