id
int64
0
190k
prompt
stringlengths
21
13.4M
docstring
stringlengths
1
12k
178,430
from __future__ import annotations import hashlib import json from typing import TYPE_CHECKING, Final, cast from streamlit.errors import StreamlitAPIException from streamlit.proto.BokehChart_pb2 import BokehChart as BokehChartProto from streamlit.runtime.metrics_util import gather_metrics from streamlit.util import HAS...
Construct a Bokeh chart object. See DeltaGenerator.bokeh_chart for docs.
178,431
from __future__ import annotations import math from typing import TYPE_CHECKING, Union, cast from typing_extensions import TypeAlias from streamlit.errors import StreamlitAPIException from streamlit.proto.Progress_pb2 import Progress as ProgressProto from streamlit.string_util import clean_text def _check_float_between...
null
178,432
from __future__ import annotations import math from typing import TYPE_CHECKING, Union, cast from typing_extensions import TypeAlias from streamlit.errors import StreamlitAPIException from streamlit.proto.Progress_pb2 import Progress as ProgressProto from streamlit.string_util import clean_text class StreamlitAPIExcep...
null
178,433
from __future__ import annotations import sys from contextvars import ContextVar from copy import deepcopy from typing import ( TYPE_CHECKING, Any, Callable, Final, Hashable, Iterable, Literal, NoReturn, TypeVar, cast, overload, ) from streamlit import ( cli_util, con...
Print a warning if Streamlit is imported but not being run with `streamlit run`. The warning is printed only once, and is printed using the root logger.
178,434
from __future__ import annotations import sys from contextvars import ContextVar from copy import deepcopy from typing import ( TYPE_CHECKING, Any, Callable, Final, Hashable, Iterable, Literal, NoReturn, TypeVar, cast, overload, ) from streamlit import ( cli_util, con...
null
178,435
from __future__ import annotations import sys from contextvars import ContextVar from copy import deepcopy from typing import ( TYPE_CHECKING, Any, Callable, Final, Hashable, Iterable, Literal, NoReturn, TypeVar, cast, overload, ) from streamlit import ( cli_util, con...
null
178,436
from __future__ import annotations import sys from contextvars import ContextVar from copy import deepcopy from typing import ( TYPE_CHECKING, Any, Callable, Final, Hashable, Iterable, Literal, NoReturn, TypeVar, cast, overload, ) from streamlit import ( cli_util, con...
null
178,437
from __future__ import annotations import sys from contextvars import ContextVar from copy import deepcopy from typing import ( TYPE_CHECKING, Any, Callable, Final, Hashable, Iterable, Literal, NoReturn, TypeVar, cast, overload, ) from streamlit import ( cli_util, con...
null
178,438
from __future__ import annotations import sys from contextvars import ContextVar from copy import deepcopy from typing import ( TYPE_CHECKING, Any, Callable, Final, Hashable, Iterable, Literal, NoReturn, TypeVar, cast, overload, ) from streamlit import ( cli_util, con...
Return either value, or None, or dg. This is needed because Widgets have meaningful return values. This is unlike other elements, which always return None. Then we internally replace that None with a DeltaGenerator instance. However, sometimes a widget may want to return None, and in this case it should not be replaced...
178,439
from __future__ import annotations import sys from contextvars import ContextVar from copy import deepcopy from typing import ( TYPE_CHECKING, Any, Callable, Final, Hashable, Iterable, Literal, NoReturn, TypeVar, cast, overload, ) from streamlit import ( cli_util, con...
Enqueues a ForwardMsg proto to send to the app.
178,440
from __future__ import annotations from typing import Iterator, Mapping, NoReturn, Union from streamlit.errors import StreamlitAPIException from streamlit.runtime.scriptrunner import get_script_run_ctx as _get_script_run_ctx from streamlit.runtime.scriptrunner.script_run_context import UserInfo UserInfo: TypeAlias = D...
null
178,441
from __future__ import annotations import re import threading from pathlib import Path from typing import Any, Callable, Final, cast from blinker import Signal from streamlit.logger import get_logger from streamlit.string_util import extract_leading_emoji from streamlit.util import calc_md5 _on_pages_changed = Signal(d...
null
178,442
from __future__ import annotations import ast import contextlib import re import textwrap import traceback from typing import Any, Iterable from streamlit.runtime.metrics_util import gather_metrics code = _main.code empty = _main.empty warning = _main.warning The provided code snippet includes necessary dependencies ...
Use in a `with` block to draw some code on the app, then execute it. Parameters ---------- code_location : "above" or "below" Whether to show the echoed code before or after the results of the executed code block. Example ------- >>> import streamlit as st >>> >>> with st.echo(): >>> st.write('This code will be printed...
178,443
from __future__ import annotations import ast import contextlib import re import textwrap import traceback from typing import Any, Iterable from streamlit.runtime.metrics_util import gather_metrics def _get_indent(line: str) -> int | None: """Get the number of whitespaces at the beginning of the given line. If ...
Return the indent of the first non-empty line in the list. If all lines are empty, return 0.
178,444
from __future__ import annotations import re from typing import Any def extract_args(line: str) -> list[str]: """Parse argument strings from all outer parentheses in a line of code. Parameters ---------- line : str A line of code Returns ------- list of strings Contents of th...
Parse arguments from a stringified arguments list inside parentheses Parameters ---------- args : list A list where it's size matches the expected number of parsed arguments line : str Stringified line of code with method arguments inside parentheses Returns ------- list of strings Parsed arguments Example ------- >>> ...
178,445
from __future__ import annotations import copy import os import secrets import threading from collections import OrderedDict from typing import Any, Callable from blinker import Signal from streamlit import config_util, development, env_util, file_util, util from streamlit.config_option import ConfigOption from streaml...
Set config option. Currently, only the following config options can be set within the script itself: * client.caching * client.displayEnabled * deprecation.* Calling with any other options will raise StreamlitAPIException. Run `streamlit config show` in the terminal to see all available options. Parameters ---------- k...
178,446
from __future__ import annotations import copy import os import secrets import threading from collections import OrderedDict from typing import Any, Callable from blinker import Signal from streamlit import config_util, development, env_util, file_util, util from streamlit.config_option import ConfigOption from streaml...
Create a config section and store it globally in this module.
178,447
from __future__ import annotations import copy import os import secrets import threading from collections import OrderedDict from typing import Any, Callable from blinker import Signal from streamlit import config_util, development, env_util, file_util, util from streamlit.config_option import ConfigOption from streaml...
Create a ConfigOption and store it globally in this module. There are two ways to create a ConfigOption: (1) Simple, constant config options are created as follows: _create_option('section.optionName', description = 'Put the description here.', default_val = 12345) (2) More complex, programmable config options use deco...
178,448
from __future__ import annotations import copy import os import secrets import threading from collections import OrderedDict from typing import Any, Callable from blinker import Signal from streamlit import config_util, development, env_util, file_util, util from streamlit.config_option import ConfigOption from streaml...
Remove a ConfigOption by key from the global store. Only for use in testing.
178,449
from __future__ import annotations import copy import os import secrets import threading from collections import OrderedDict from typing import Any, Callable from blinker import Signal from streamlit import config_util, development, env_util, file_util, util from streamlit.config_option import ConfigOption from streaml...
Are we in development mode. This option defaults to True if and only if Streamlit wasn't installed normally.
178,450
from __future__ import annotations import copy import os import secrets import threading from collections import OrderedDict from typing import Any, Callable from blinker import Signal from streamlit import config_util, development, env_util, file_util, util from streamlit.config_option import ConfigOption from streaml...
Level of logging: 'error', 'warning', 'info', or 'debug'. Default: 'info'
178,451
from __future__ import annotations import copy import os import secrets import threading from collections import OrderedDict from typing import Any, Callable from blinker import Signal from streamlit import config_util, development, env_util, file_util, util from streamlit.config_option import ConfigOption from streaml...
String format for logging messages. If logger.datetimeFormat is set, logger messages will default to `%(asctime)s.%(msecs)03d %(message)s`. See [Python's documentation](https://docs.python.org/2.6/library/logging.html#formatter-objects) for available attributes. Default: "%(asctime)s %(message)s"
178,452
from __future__ import annotations import copy import os import secrets import threading from collections import OrderedDict from typing import Any, Callable from blinker import Signal from streamlit import config_util, development, env_util, file_util, util from streamlit.config_option import ConfigOption from streaml...
Symmetric key used to produce signed cookies. If deploying on multiple replicas, this should be set to the same value across all replicas to ensure they all share the same secret. Default: randomly generated secret key.
178,453
from __future__ import annotations import copy import os import secrets import threading from collections import OrderedDict from typing import Any, Callable from blinker import Signal from streamlit import config_util, development, env_util, file_util, util from streamlit.config_option import ConfigOption from streaml...
If false, will attempt to open a browser window on start. Default: false unless (1) we are on a Linux box where DISPLAY is unset, or (2) we are running in the Streamlit Atom plugin.
178,454
from __future__ import annotations import copy import os import secrets import threading from collections import OrderedDict from typing import Any, Callable from blinker import Signal from streamlit import config_util, development, env_util, file_util, util from streamlit.config_option import ConfigOption from streaml...
The address where the server will listen for client and browser connections. Use this if you want to bind the server to a specific address. If set, the server will only be accessible from this address, and not from any aliases (like localhost). Default: (unset)
178,455
from __future__ import annotations import copy import os import secrets import threading from collections import OrderedDict from typing import Any, Callable from blinker import Signal from streamlit import config_util, development, env_util, file_util, util from streamlit.config_option import ConfigOption from streaml...
Port where users should point their browsers in order to connect to the app. This is used to: - Set the correct URL for XSRF protection purposes. - Show the URL on the terminal (part of `streamlit run`). - Open the browser automatically (part of `streamlit run`). This option is for advanced use cases. To change the por...
178,456
from __future__ import annotations import copy import os import secrets import threading from collections import OrderedDict from typing import Any, Callable from blinker import Signal from streamlit import config_util, development, env_util, file_util, util from streamlit.config_option import ConfigOption from streaml...
null
178,457
from __future__ import annotations import copy import os import secrets import threading from collections import OrderedDict from typing import Any, Callable from blinker import Signal from streamlit import config_util, development, env_util, file_util, util from streamlit.config_option import ConfigOption from streaml...
null
178,458
from __future__ import annotations import copy import os import secrets import threading from collections import OrderedDict from typing import Any, Callable from blinker import Signal from streamlit import config_util, development, env_util, file_util, util from streamlit.config_option import ConfigOption from streaml...
Wait for the config file to be parsed then call func. If the config file has already been parsed, just calls func immediately unless force_connect is set. Parameters ---------- func : Callable[[], None] A function to run on config parse. force_connect : bool Wait until the next config file parse to run func, even if co...
178,459
import inspect import textwrap import streamlit as st The provided code snippet includes necessary dependencies for implementing the `show_code` function. Write a Python function `def show_code(demo)` to solve the following problem: Showing the code of the demo. Here is the function: def show_code(demo): """Show...
Showing the code of the demo.
178,460
from typing import Any import numpy as np import streamlit as st from streamlit.hello.utils import show_code st.set_page_config(page_title="Animation Demo", page_icon="📹") st.markdown("# Animation Demo") st.sidebar.header("Animation Demo") st.write( """This app shows how you can use Streamlit to build cool animati...
null
178,461
import time import numpy as np import streamlit as st from streamlit.hello.utils import show_code st.set_page_config(page_title="Plotting Demo", page_icon="📈") st.markdown("# Plotting Demo") st.sidebar.header("Plotting Demo") st.write( """This demo illustrates a combination of plotting and animation with Streamlit...
null
178,462
from urllib.error import URLError import pandas as pd import pydeck as pdk import streamlit as st from streamlit.hello.utils import show_code st.set_page_config(page_title="Mapping Demo", page_icon="🌍") st.markdown("# Mapping Demo") st.sidebar.header("Mapping Demo") st.write( """This demo shows how to use [`st.pyd...
null
178,463
from urllib.error import URLError import altair as alt import pandas as pd import streamlit as st from streamlit.hello.utils import show_code st.set_page_config(page_title="DataFrame Demo", page_icon="📊") st.markdown("# DataFrame Demo") st.sidebar.header("DataFrame Demo") st.write( """This demo shows how to use `s...
null
178,464
from __future__ import annotations import hashlib import os import time from pathlib import Path from streamlit.util import HASHLIB_KWARGS def _get_file_content_with_blocking_retries(file_path: str) -> bytes: content = b"" # There's a race condition where sometimes file_path no longer exists when # we try t...
Calculate the MD5 checksum of a given path. For a file, this means calculating the md5 of the file's contents. For a directory, we concatenate the directory's path with the names of all the files in it and calculate the md5 of that. IMPORTANT: This method calls time.sleep(), which blocks execution. So you should only u...
178,465
from __future__ import annotations import hashlib import os import time from pathlib import Path from streamlit.util import HASHLIB_KWARGS The provided code snippet includes necessary dependencies for implementing the `path_modification_time` function. Write a Python function `def path_modification_time(path: str, all...
Return the modification time of a path (file or directory). If allow_nonexistent is True and the path does not exist, we return 0.0 to guarantee that any file/dir later created at the path has a later modification time than the last time returned by this function for that path. If allow_nonexistent is False and no file...
178,466
from __future__ import annotations from typing import Callable, Type, Union import streamlit.watcher from streamlit import cli_util, config, env_util from streamlit.watcher.polling_path_watcher import PollingPathWatcher def _is_watchdog_available() -> bool: """Check if the watchdog module is installed.""" try: ...
null
178,467
from __future__ import annotations from typing import Callable, Type, Union import streamlit.watcher from streamlit import cli_util, config, env_util from streamlit.watcher.polling_path_watcher import PollingPathWatcher def _watch_path( path: str, on_path_changed: Callable[[str], None], watcher_type: str | ...
null
178,468
from __future__ import annotations from typing import Callable, Type, Union import streamlit.watcher from streamlit import cli_util, config, env_util from streamlit.watcher.polling_path_watcher import PollingPathWatcher def _watch_path( path: str, on_path_changed: Callable[[str], None], watcher_type: str | ...
null
178,469
from __future__ import annotations from typing import Callable, Type, Union import streamlit.watcher from streamlit import cli_util, config, env_util from streamlit.watcher.polling_path_watcher import PollingPathWatcher PathWatcherType = Union[ Type["streamlit.watcher.event_based_path_watcher.EventBasedPathWatcher"...
Return the class to use for path changes notifications, based on the server.fileWatcherType config option.
178,470
from __future__ import annotations import collections import os import sys import types from typing import Callable, Final from streamlit import config, file_util from streamlit.folder_black_list import FolderBlackList from streamlit.logger import get_logger from streamlit.source_util import get_pages from streamlit.wa...
null
178,471
from __future__ import annotations import os import sys from typing import Any import click import streamlit.runtime.caching as caching import streamlit.runtime.legacy_caching as legacy_caching import streamlit.web.bootstrap as bootstrap from streamlit import config as _config from streamlit.config_option import Config...
Decorator that adds config param keys to click dynamically.
178,472
from __future__ import annotations import os import sys from typing import Any import click import streamlit.runtime.caching as caching import streamlit.runtime.legacy_caching as legacy_caching import streamlit.web.bootstrap as bootstrap from streamlit import config as _config from streamlit.config_option import Config...
Print Streamlit's version number.
178,473
from __future__ import annotations import os import sys from typing import Any import click import streamlit.runtime.caching as caching import streamlit.runtime.legacy_caching as legacy_caching import streamlit.web.bootstrap as bootstrap from streamlit import config as _config from streamlit.config_option import Config...
Show help in browser.
178,474
from __future__ import annotations import os import sys from typing import Any import click import streamlit.runtime.caching as caching import streamlit.runtime.legacy_caching as legacy_caching import streamlit.web.bootstrap as bootstrap from streamlit import config as _config from streamlit.config_option import Config...
Runs the Hello World script.
178,475
from __future__ import annotations import os import sys from typing import Any import click import streamlit.runtime.caching as caching import streamlit.runtime.legacy_caching as legacy_caching import streamlit.web.bootstrap as bootstrap from streamlit import config as _config from streamlit.config_option import Config...
Run a Python script, piping stderr to Streamlit. The script can be local or it can be an url. In the latter case, Streamlit will download the script to a temporary file and runs this file.
178,476
from __future__ import annotations import os import sys from typing import Any import click import streamlit.runtime.caching as caching import streamlit.runtime.legacy_caching as legacy_caching import streamlit.web.bootstrap as bootstrap from streamlit import config as _config from streamlit.config_option import Config...
Manage the Streamlit cache.
178,477
from __future__ import annotations import os import sys from typing import Any import click import streamlit.runtime.caching as caching import streamlit.runtime.legacy_caching as legacy_caching import streamlit.web.bootstrap as bootstrap from streamlit import config as _config from streamlit.config_option import Config...
Clear st.cache, st.cache_data, and st.cache_resource caches.
178,478
from __future__ import annotations import os import sys from typing import Any import click import streamlit.runtime.caching as caching import streamlit.runtime.legacy_caching as legacy_caching import streamlit.web.bootstrap as bootstrap from streamlit import config as _config from streamlit.config_option import Config...
Manage Streamlit's config settings.
178,479
from __future__ import annotations import os import sys from typing import Any import click import streamlit.runtime.caching as caching import streamlit.runtime.legacy_caching as legacy_caching import streamlit.web.bootstrap as bootstrap from streamlit import config as _config from streamlit.config_option import Config...
Show all of Streamlit's config settings.
178,480
from __future__ import annotations import os import sys from typing import Any import click import streamlit.runtime.caching as caching import streamlit.runtime.legacy_caching as legacy_caching import streamlit.web.bootstrap as bootstrap from streamlit import config as _config from streamlit.config_option import Config...
Activate Streamlit by entering your email.
178,481
from __future__ import annotations import os import sys from typing import Any import click import streamlit.runtime.caching as caching import streamlit.runtime.legacy_caching as legacy_caching import streamlit.web.bootstrap as bootstrap from streamlit import config as _config from streamlit.config_option import Config...
Reset Activation Credentials.
178,482
from __future__ import annotations import os import sys from typing import Any import click import streamlit.runtime.caching as caching import streamlit.runtime.legacy_caching as legacy_caching import streamlit.web.bootstrap as bootstrap from streamlit import config as _config from streamlit.config_option import Config...
Assert that the program name is set to `streamlit test`. This is used by our cli-smoke-tests to verify that the program name is set to `streamlit ...` whether the streamlit binary is invoked directly or via `python -m streamlit ...`.
178,483
from __future__ import annotations import os from typing import Final import tornado.web from streamlit import config, file_util from streamlit.logger import get_logger from streamlit.runtime.runtime_util import serialize_forward_msg from streamlit.web.server.server_util import emit_endpoint_deprecation_notice The pro...
True if cross-origin requests are allowed. We only allow cross-origin requests when CORS protection has been disabled with server.enableCORS=False or if using the Node server. When using the Node server, we have a dev and prod port, which count as two origins.
178,484
from __future__ import annotations from typing import Final from urllib.parse import urljoin import tornado.web from streamlit import config, net_util, url_util def _get_server_address_if_manually_set() -> str | None: if config.is_manually_set("browser.serverAddress"): return url_util.get_hostname(config.ge...
Return True if URL is from allowed origins (for CORS purpose). Allowed origins: 1. localhost 2. The internal and external IP addresses of the machine where this function was called from. If `server.enableCORS` is False, this allows all origins.
178,485
from __future__ import annotations from typing import Final from urllib.parse import urljoin import tornado.web from streamlit import config, net_util, url_util The provided code snippet includes necessary dependencies for implementing the `make_url_path_regex` function. Write a Python function `def make_url_path_rege...
Get a regex of the form ^/foo/bar/baz/?$ for a path (foo, bar, baz).
178,486
from __future__ import annotations from typing import Final from urllib.parse import urljoin import tornado.web from streamlit import config, net_util, url_util The provided code snippet includes necessary dependencies for implementing the `emit_endpoint_deprecation_notice` function. Write a Python function `def emit_...
Emits the warning about deprecation of HTTP endpoint in the HTTP header.
178,487
from __future__ import annotations import errno import logging import os import sys from pathlib import Path from typing import TYPE_CHECKING, Any, Awaitable, Final import tornado.concurrent import tornado.locks import tornado.netutil import tornado.web import tornado.websocket from tornado.httpserver import HTTPServer...
Makes the server start listening at the configured port. In case the port is already taken it tries listening to the next available port. It will error after MAX_PORT_SEARCH_RETRIES attempts.
178,488
from __future__ import annotations import errno import logging import os import sys from pathlib import Path from typing import TYPE_CHECKING, Any, Awaitable, Final import tornado.concurrent import tornado.locks import tornado.netutil import tornado.web import tornado.websocket from tornado.httpserver import HTTPServer...
null
178,489
from __future__ import annotations from streamlit import runtime from streamlit.runtime.metrics_util import gather_metrics from streamlit.runtime.scriptrunner import get_script_run_ctx from streamlit.web.server.browser_websocket_handler import BrowserWebSocketHandler class BrowserWebSocketHandler(WebSocketHandler, Ses...
Return a copy of the HTTP request headers for the current session's WebSocket connection. If there's no active session, return None instead. Raise an error if the server is not running. Note to the intrepid: this is an UNSUPPORTED, INTERNAL API. (We don't have plans to remove it without a replacement, but we don't cons...
178,490
from __future__ import annotations from typing import Any from streamlit import util from streamlit.runtime.scriptrunner import get_script_run_ctx def make_delta_path( root_container: int, parent_path: tuple[int, ...], index: int ) -> list[int]: delta_path = [root_container] delta_path.extend(parent_path) ...
null
178,491
from __future__ import annotations from typing import Any from streamlit import util from streamlit.runtime.scriptrunner import get_script_run_ctx class RunningCursor(Cursor): def __init__(self, root_container: int, parent_path: tuple[int, ...] = ()): """A moving pointer to a delta location in the app. ...
Return the top-level RunningCursor for the given container. This is the cursor that is used when user code calls something like `st.foo` (which uses the main container) or `st.sidebar.foo` (which uses the sidebar container).
178,492
from __future__ import annotations import os from typing import Any, Collection, cast The provided code snippet includes necessary dependencies for implementing the `extract_from_dict` function. Write a Python function `def extract_from_dict( keys: Collection[str], source_dict: dict[str, Any] ) -> dict[str, Any]` ...
Extract the specified keys from source_dict and return them in a new dict. Parameters ---------- keys : Collection[str] The keys to extract from source_dict. source_dict : Dict[str, Any] The dict to extract keys from. Note that this function mutates source_dict. Returns ------- Dict[str, Any] A new dict containing the ...
178,493
from __future__ import annotations import os from typing import Any, Collection, cast SNOWSQL_CONNECTION_FILE = "~/.snowsql/config" The provided code snippet includes necessary dependencies for implementing the `load_from_snowsql_config_file` function. Write a Python function `def load_from_snowsql_config_file(connect...
Loads the dictionary from snowsql config file.
178,494
from __future__ import annotations import os from typing import Any, Collection, cast The provided code snippet includes necessary dependencies for implementing the `running_in_sis` function. Write a Python function `def running_in_sis() -> bool` to solve the following problem: Return whether this app is running in Si...
Return whether this app is running in SiS.
178,495
from __future__ import annotations import re from streamlit import cli_util from streamlit.config_option import ConfigOption def _clean(txt: str) -> str: """Replace sequences of multiple spaces with a single space, excluding newlines. Preserves leading and trailing spaces, and does not modify spaces in between ...
Print the given config sections/options to the terminal.
178,496
from __future__ import annotations import datetime import re import textwrap from typing import Any, Callable from streamlit import util from streamlit.case_converters import to_snake_case def _parse_yyyymmdd_str(date_str: str) -> datetime.datetime: year, month, day = (int(token) for token in date_str.split("-", 2...
null
178,497
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize _z_P_L = "P" if _sizeof_Clong < _sizeof_Cvoidp else "L" from gc import get_ob...
Like struct.calcsize() but with 'z' for Py_ssize_t.
178,498
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize from gc import get_objects as _getobjects from gc import get_referents as _ge...
Return iter-/generator, preferably.
178,499
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize from gc import get_objects as _getobjects from gc import get_referents as _ge...
Return True for built-in types as in Python 2.
178,500
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize _NN = "" from gc import get_objects as _getobjects from gc import get_refere...
Object length as a string.
178,501
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize t = hasattr(sys, "gettotalrefcount") del t from gc import get_objects as _get...
Return percentage as string.
178,502
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize _NN = "" from gc import get_objects as _getobjects from gc import get_refere...
Prettify and clip long repr() string.
178,503
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize from gc import get_objects as _getobjects from gc import get_referents as _ge...
Formatted print to sys.stdout or given stream. *print3options* -- some keyword arguments, like Python 3+ print.
178,504
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize from gc import get_objects as _getobjects from gc import get_referents as _ge...
Return size as regular plus SI string.
178,505
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize from gc import get_objects as _getobjects from gc import get_referents as _ge...
Return specific referents of an enumerate object.
178,506
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize from gc import get_objects as _getobjects from gc import get_referents as _ge...
Return specific referents of a file object.
178,507
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize from gc import get_objects as _getobjects from gc import get_referents as _ge...
Return the referent(s) of a generator (expression) object.
178,508
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize from gc import get_objects as _getobjects from gc import get_referents as _ge...
Return the referent(s) of an iterator object.
178,509
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize from gc import get_objects as _getobjects from gc import get_referents as _ge...
Return specific referents of a property object.
178,510
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize from gc import get_objects as _getobjects from gc import get_referents as _ge...
Return specific referents of a frozen/set, list, tuple and xrange object.
178,511
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize from gc import get_objects as _getobjects from gc import get_referents as _ge...
Return referents of a os.stat object.
178,512
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize from gc import get_objects as _getobjects from gc import get_referents as _ge...
Return referents of a os.statvfs object.
178,513
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize from gc import get_objects as _getobjects from gc import get_referents as _ge...
Return specific referents of a traceback object.
178,514
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize from gc import get_objects as _getobjects from gc import get_referents as _ge...
Return specific referents of a type object.
178,515
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize from gc import get_objects as _getobjects from gc import get_referents as _ge...
Return weakly referent object.
178,516
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize from gc import get_objects as _getobjects from gc import get_referents as _ge...
Bytearray size.
178,517
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize from gc import get_objects as _getobjects from gc import get_referents as _ge...
Dict length in items (estimate).
178,518
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize from gc import get_objects as _getobjects from gc import get_referents as _ge...
Length of *int* (multi-precision, formerly long) in Cdigits.
178,519
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize from gc import get_objects as _getobjects from gc import get_referents as _ge...
Length (hint) of an iterator.
178,520
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize from gc import get_objects as _getobjects from gc import get_referents as _ge...
Length of list (estimate).
178,521
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize from gc import get_objects as _getobjects from gc import get_referents as _ge...
Length of frozen/set (estimate).
178,522
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize from gc import get_objects as _getobjects from gc import get_referents as _ge...
Slice length.
178,523
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize from gc import get_objects as _getobjects from gc import get_referents as _ge...
Struct length in bytes.
178,524
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize from gc import get_objects as _getobjects from gc import get_referents as _ge...
Unicode size.
178,525
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize t = hasattr(sys, "gettotalrefcount") del t _Type_type = type(type) from gc i...
Return class and instance keys for a class.
178,526
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize _Not_vari = _NN from gc import get_objects as _getobjects from gc import get...
Add new typedef for both data and code.
178,527
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize from gc import get_objects as _getobjects from gc import get_referents as _ge...
Add new typedef for code only.
178,528
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize from gc import get_objects as _getobjects from gc import get_referents as _ge...
Set/get approximate mapped memory usage as a percentage of the mapped file size. Sets the new percentage if not None and returns the previously set percentage. Applies only to *numpy.memmap* objects.
178,529
import sys import types as Types import warnings import weakref as Weakref from inspect import isbuiltin, isclass, iscode, isframe, isfunction, ismethod, ismodule from math import log from os import curdir, linesep from struct import calcsize t = hasattr(sys, "gettotalrefcount") del t from gc import get_objects as _get...
Return a tuple containing an **Asized** instance for each object passed as positional argument. The available options and defaults are: *above=0* -- threshold for largest objects stats *align=8* -- size alignment *code=False* -- incl. (byte)code size *cutoff=10* -- limit large objects or profiles stats *derive=False* -...