Search is not available for this dataset
identifier
stringlengths
1
155
parameters
stringlengths
2
6.09k
docstring
stringlengths
11
63.4k
docstring_summary
stringlengths
0
63.4k
function
stringlengths
29
99.8k
function_tokens
list
start_point
list
end_point
list
language
stringclasses
1 value
docstring_language
stringlengths
2
7
docstring_language_predictions
stringlengths
18
23
is_langid_reliable
stringclasses
2 values
get_command_data
(c, output_file=None, verbose=False)
Runs the Bot to collect data about the commands of all enabled Cogs. Runs without actually connecting to Discord.
Runs the Bot to collect data about the commands of all enabled Cogs.
def get_command_data(c, output_file=None, verbose=False): """ Runs the Bot to collect data about the commands of all enabled Cogs. Runs without actually connecting to Discord. """ output_file = pathmaker(output_file, rev=True) if output_file is not None else output_file command = f"{ANTIPETROS...
[ "def", "get_command_data", "(", "c", ",", "output_file", "=", "None", ",", "verbose", "=", "False", ")", ":", "output_file", "=", "pathmaker", "(", "output_file", ",", "rev", "=", "True", ")", "if", "output_file", "is", "not", "None", "else", "output_file"...
[ 252, 0 ]
[ 265, 29 ]
python
en
['en', 'error', 'th']
False
IndyWallet.__init__
(self, config: dict = None)
Initialize a `IndyWallet` instance. Args: config: {name, key, seed, did, auto-create, auto-remove, storage_type, storage_config, storage_creds}
Initialize a `IndyWallet` instance.
def __init__(self, config: dict = None): """ Initialize a `IndyWallet` instance. Args: config: {name, key, seed, did, auto-create, auto-remove, storage_type, storage_config, storage_creds} """ self.logger = logging.getLogger(__name__) i...
[ "def", "__init__", "(", "self", ",", "config", ":", "dict", "=", "None", ")", ":", "self", ".", "logger", "=", "logging", ".", "getLogger", "(", "__name__", ")", "if", "not", "config", ":", "config", "=", "{", "}", "super", "(", "IndyWallet", ",", ...
[ 31, 4 ]
[ 58, 37 ]
python
en
['en', 'error', 'th']
False
IndyWallet.handle
(self)
Get internal wallet reference. Returns: A handle to the wallet
Get internal wallet reference.
def handle(self): """ Get internal wallet reference. Returns: A handle to the wallet """ return self._handle
[ "def", "handle", "(", "self", ")", ":", "return", "self", ".", "_handle" ]
[ 61, 4 ]
[ 69, 27 ]
python
en
['en', 'error', 'th']
False
IndyWallet.created
(self)
Check whether the wallet was created on the last open call.
Check whether the wallet was created on the last open call.
def created(self) -> bool: """Check whether the wallet was created on the last open call.""" return self._created
[ "def", "created", "(", "self", ")", "->", "bool", ":", "return", "self", ".", "_created" ]
[ 72, 4 ]
[ 74, 28 ]
python
en
['en', 'en', 'en']
True
IndyWallet.opened
(self)
Check whether wallet is currently open. Returns: True if open, else False
Check whether wallet is currently open.
def opened(self) -> bool: """ Check whether wallet is currently open. Returns: True if open, else False """ return bool(self._handle)
[ "def", "opened", "(", "self", ")", "->", "bool", ":", "return", "bool", "(", "self", ".", "_handle", ")" ]
[ 77, 4 ]
[ 85, 33 ]
python
en
['en', 'error', 'th']
False
IndyWallet.name
(self)
Accessor for the wallet name. Returns: The wallet name
Accessor for the wallet name.
def name(self) -> str: """ Accessor for the wallet name. Returns: The wallet name """ return self._name
[ "def", "name", "(", "self", ")", "->", "str", ":", "return", "self", ".", "_name" ]
[ 88, 4 ]
[ 96, 25 ]
python
en
['en', 'error', 'th']
False
IndyWallet.master_secret_id
(self)
Accessor for the master secret id. Returns: The master secret id
Accessor for the master secret id.
def master_secret_id(self) -> str: """ Accessor for the master secret id. Returns: The master secret id """ return self._master_secret_id
[ "def", "master_secret_id", "(", "self", ")", "->", "str", ":", "return", "self", ".", "_master_secret_id" ]
[ 99, 4 ]
[ 107, 37 ]
python
en
['en', 'error', 'th']
False
IndyWallet._wallet_config
(self)
Accessor for the wallet config. Returns: The wallet config
Accessor for the wallet config.
def _wallet_config(self) -> dict: """ Accessor for the wallet config. Returns: The wallet config """ ret = { "id": self._name, "freshness_time": self._freshness_time, "storage_type": self._storage_type, # storage_confi...
[ "def", "_wallet_config", "(", "self", ")", "->", "dict", ":", "ret", "=", "{", "\"id\"", ":", "self", ".", "_name", ",", "\"freshness_time\"", ":", "self", ".", "_freshness_time", ",", "\"storage_type\"", ":", "self", ".", "_storage_type", ",", "# storage_co...
[ 110, 4 ]
[ 126, 18 ]
python
en
['en', 'error', 'th']
False
IndyWallet._wallet_access
(self)
Accessor for the wallet access. Returns: The wallet access
Accessor for the wallet access.
def _wallet_access(self) -> dict: """ Accessor for the wallet access. Returns: The wallet access """ ret = { "key": self._key, "key_derivation_method": self._key_derivation_method, # storage_credentials } if self._...
[ "def", "_wallet_access", "(", "self", ")", "->", "dict", ":", "ret", "=", "{", "\"key\"", ":", "self", ".", "_key", ",", "\"key_derivation_method\"", ":", "self", ".", "_key_derivation_method", ",", "# storage_credentials", "}", "if", "self", ".", "_storage_cr...
[ 129, 4 ]
[ 144, 18 ]
python
en
['en', 'error', 'th']
False
IndyWallet.create
(self, replace: bool = False)
Create a new wallet. Args: replace: Removes the old wallet if True Raises: WalletError: If there was a problem removing the wallet WalletError: IF there was a libindy error
Create a new wallet.
async def create(self, replace: bool = False): """ Create a new wallet. Args: replace: Removes the old wallet if True Raises: WalletError: If there was a problem removing the wallet WalletError: IF there was a libindy error """ if re...
[ "async", "def", "create", "(", "self", ",", "replace", ":", "bool", "=", "False", ")", ":", "if", "replace", ":", "try", ":", "await", "self", ".", "remove", "(", ")", "except", "WalletNotFoundError", ":", "pass", "try", ":", "await", "indy", ".", "w...
[ 146, 4 ]
[ 176, 46 ]
python
en
['en', 'error', 'th']
False
IndyWallet.remove
(self)
Remove an existing wallet. Raises: WalletNotFoundError: If the wallet could not be found WalletError: If there was an libindy error
Remove an existing wallet.
async def remove(self): """ Remove an existing wallet. Raises: WalletNotFoundError: If the wallet could not be found WalletError: If there was an libindy error """ try: await indy.wallet.delete_wallet( config=json.dumps(self._...
[ "async", "def", "remove", "(", "self", ")", ":", "try", ":", "await", "indy", ".", "wallet", ".", "delete_wallet", "(", "config", "=", "json", ".", "dumps", "(", "self", ".", "_wallet_config", ")", ",", "credentials", "=", "json", ".", "dumps", "(", ...
[ 178, 4 ]
[ 195, 42 ]
python
en
['en', 'error', 'th']
False
IndyWallet.open
(self)
Open wallet, removing and/or creating it if so configured. Raises: WalletError: If wallet not found after creation WalletNotFoundError: If the wallet is not found WalletError: If the wallet is already open WalletError: If there is a libindy error ...
Open wallet, removing and/or creating it if so configured.
async def open(self): """ Open wallet, removing and/or creating it if so configured. Raises: WalletError: If wallet not found after creation WalletNotFoundError: If the wallet is not found WalletError: If the wallet is already open WalletError: If...
[ "async", "def", "open", "(", "self", ")", ":", "if", "self", ".", "opened", ":", "return", "self", ".", "_created", "=", "False", "while", "True", ":", "try", ":", "self", ".", "_handle", "=", "await", "indy", ".", "wallet", ".", "open_wallet", "(", ...
[ 197, 4 ]
[ 247, 21 ]
python
en
['en', 'error', 'th']
False
IndyWallet.close
(self)
Close previously-opened wallet, removing it if so configured.
Close previously-opened wallet, removing it if so configured.
async def close(self): """Close previously-opened wallet, removing it if so configured.""" if self._handle: await indy.wallet.close_wallet(self._handle) if self._auto_remove: await self.remove() self._handle = None
[ "async", "def", "close", "(", "self", ")", ":", "if", "self", ".", "_handle", ":", "await", "indy", ".", "wallet", ".", "close_wallet", "(", "self", ".", "_handle", ")", "if", "self", ".", "_auto_remove", ":", "await", "self", ".", "remove", "(", ")"...
[ 249, 4 ]
[ 255, 31 ]
python
en
['en', 'en', 'en']
True
IndyWallet.create_signing_key
( self, seed: str = None, metadata: dict = None )
Create a new public/private signing keypair. Args: seed: Seed for key metadata: Optional metadata to store with the keypair Returns: A `KeyInfo` representing the new record Raises: WalletDuplicateError: If the resulting verkey already e...
Create a new public/private signing keypair.
async def create_signing_key( self, seed: str = None, metadata: dict = None ) -> KeyInfo: """ Create a new public/private signing keypair. Args: seed: Seed for key metadata: Optional metadata to store with the keypair Returns: A `KeyInfo`...
[ "async", "def", "create_signing_key", "(", "self", ",", "seed", ":", "str", "=", "None", ",", "metadata", ":", "dict", "=", "None", ")", "->", "KeyInfo", ":", "args", "=", "{", "}", "if", "seed", ":", "args", "[", "\"seed\"", "]", "=", "bytes_to_b64"...
[ 257, 4 ]
[ 290, 40 ]
python
en
['en', 'error', 'th']
False
IndyWallet.get_signing_key
(self, verkey: str)
Fetch info for a signing keypair. Args: verkey: The verification key of the keypair Returns: A `KeyInfo` representing the keypair Raises: WalletNotFoundError: If no keypair is associated with the verification key WalletError: If there i...
Fetch info for a signing keypair.
async def get_signing_key(self, verkey: str) -> KeyInfo: """ Fetch info for a signing keypair. Args: verkey: The verification key of the keypair Returns: A `KeyInfo` representing the keypair Raises: WalletNotFoundError: If no keypair is asso...
[ "async", "def", "get_signing_key", "(", "self", ",", "verkey", ":", "str", ")", "->", "KeyInfo", ":", "try", ":", "metadata", "=", "await", "indy", ".", "crypto", ".", "get_key_metadata", "(", "self", ".", "handle", ",", "verkey", ")", "except", "IndyErr...
[ 292, 4 ]
[ 314, 72 ]
python
en
['en', 'error', 'th']
False
IndyWallet.replace_signing_key_metadata
(self, verkey: str, metadata: dict)
Replace the metadata associated with a signing keypair. Args: verkey: The verification key of the keypair metadata: The new metadata to store Raises: WalletNotFoundError: if no keypair is associated with the verification key
Replace the metadata associated with a signing keypair.
async def replace_signing_key_metadata(self, verkey: str, metadata: dict): """ Replace the metadata associated with a signing keypair. Args: verkey: The verification key of the keypair metadata: The new metadata to store Raises: WalletNotFoundError: ...
[ "async", "def", "replace_signing_key_metadata", "(", "self", ",", "verkey", ":", "str", ",", "metadata", ":", "dict", ")", ":", "meta_json", "=", "json", ".", "dumps", "(", "metadata", "or", "{", "}", ")", "await", "self", ".", "get_signing_key", "(", "v...
[ 316, 4 ]
[ 330, 74 ]
python
en
['en', 'error', 'th']
False
IndyWallet.create_local_did
( self, seed: str = None, did: str = None, metadata: dict = None )
Create and store a new local DID. Args: seed: Optional seed to use for did did: The DID to use metadata: Metadata to store with DID Returns: A `DIDInfo` instance representing the created DID Raises: WalletDuplicateError: If ...
Create and store a new local DID.
async def create_local_did( self, seed: str = None, did: str = None, metadata: dict = None ) -> DIDInfo: """ Create and store a new local DID. Args: seed: Optional seed to use for did did: The DID to use metadata: Metadata to store with DID ...
[ "async", "def", "create_local_did", "(", "self", ",", "seed", ":", "str", "=", "None", ",", "did", ":", "str", "=", "None", ",", "metadata", ":", "dict", "=", "None", ")", "->", "DIDInfo", ":", "cfg", "=", "{", "}", "if", "seed", ":", "cfg", "[",...
[ 332, 4 ]
[ 369, 45 ]
python
en
['en', 'error', 'th']
False
IndyWallet.get_local_dids
(self)
Get list of defined local DIDs. Returns: A list of locally stored DIDs as `DIDInfo` instances
Get list of defined local DIDs.
async def get_local_dids(self) -> Sequence[DIDInfo]: """ Get list of defined local DIDs. Returns: A list of locally stored DIDs as `DIDInfo` instances """ info_json = await indy.did.list_my_dids_with_meta(self.handle) info = json.loads(info_json) ret...
[ "async", "def", "get_local_dids", "(", "self", ")", "->", "Sequence", "[", "DIDInfo", "]", ":", "info_json", "=", "await", "indy", ".", "did", ".", "list_my_dids_with_meta", "(", "self", ".", "handle", ")", "info", "=", "json", ".", "loads", "(", "info_j...
[ 371, 4 ]
[ 390, 18 ]
python
en
['en', 'error', 'th']
False
IndyWallet.get_local_did
(self, did: str)
Find info for a local DID. Args: did: The DID to get info for Returns: A `DIDInfo` instance representing the found DID Raises: WalletNotFoundError: If the DID is not found WalletError: If there is a libindy error
Find info for a local DID.
async def get_local_did(self, did: str) -> DIDInfo: """ Find info for a local DID. Args: did: The DID to get info for Returns: A `DIDInfo` instance representing the found DID Raises: WalletNotFoundError: If the DID is not found W...
[ "async", "def", "get_local_did", "(", "self", ",", "did", ":", "str", ")", "->", "DIDInfo", ":", "try", ":", "info_json", "=", "await", "indy", ".", "did", ".", "get_my_did_with_meta", "(", "self", ".", "handle", ",", "did", ")", "except", "IndyError", ...
[ 392, 4 ]
[ 420, 9 ]
python
en
['en', 'error', 'th']
False
IndyWallet.get_local_did_for_verkey
(self, verkey: str)
Resolve a local DID from a verkey. Args: verkey: The verkey to get the local DID for Returns: A `DIDInfo` instance representing the found DID Raises: WalletNotFoundError: If the verkey is not found
Resolve a local DID from a verkey.
async def get_local_did_for_verkey(self, verkey: str) -> DIDInfo: """ Resolve a local DID from a verkey. Args: verkey: The verkey to get the local DID for Returns: A `DIDInfo` instance representing the found DID Raises: WalletNotFoundError: ...
[ "async", "def", "get_local_did_for_verkey", "(", "self", ",", "verkey", ":", "str", ")", "->", "DIDInfo", ":", "dids", "=", "await", "self", ".", "get_local_dids", "(", ")", "for", "info", "in", "dids", ":", "if", "info", ".", "verkey", "==", "verkey", ...
[ 422, 4 ]
[ 441, 81 ]
python
en
['en', 'error', 'th']
False
IndyWallet.replace_local_did_metadata
(self, did: str, metadata: dict)
Replace metadata for a local DID. Args: did: The DID to replace metadata for metadata: The new metadata
Replace metadata for a local DID.
async def replace_local_did_metadata(self, did: str, metadata: dict): """ Replace metadata for a local DID. Args: did: The DID to replace metadata for metadata: The new metadata """ meta_json = json.dumps(metadata or {}) await self.get_local_did(...
[ "async", "def", "replace_local_did_metadata", "(", "self", ",", "did", ":", "str", ",", "metadata", ":", "dict", ")", ":", "meta_json", "=", "json", ".", "dumps", "(", "metadata", "or", "{", "}", ")", "await", "self", ".", "get_local_did", "(", "did", ...
[ 443, 4 ]
[ 454, 68 ]
python
en
['en', 'error', 'th']
False
IndyWallet.sign_message
(self, message: bytes, from_verkey: str)
Sign a message using the private key associated with a given verkey. Args: message: Message bytes to sign from_verkey: The verkey to use to sign Returns: A signature Raises: WalletError: If the message is not provided Wallet...
Sign a message using the private key associated with a given verkey.
async def sign_message(self, message: bytes, from_verkey: str) -> bytes: """ Sign a message using the private key associated with a given verkey. Args: message: Message bytes to sign from_verkey: The verkey to use to sign Returns: A signature ...
[ "async", "def", "sign_message", "(", "self", ",", "message", ":", "bytes", ",", "from_verkey", ":", "str", ")", "->", "bytes", ":", "if", "not", "message", ":", "raise", "WalletError", "(", "\"Message not provided\"", ")", "if", "not", "from_verkey", ":", ...
[ 456, 4 ]
[ 481, 21 ]
python
en
['en', 'error', 'th']
False
IndyWallet.verify_message
( self, message: bytes, signature: bytes, from_verkey: str )
Verify a signature against the public key of the signer. Args: message: Message to verify signature: Signature to verify from_verkey: Verkey to use in verification Returns: True if verified, else False Raises: WalletError: I...
Verify a signature against the public key of the signer.
async def verify_message( self, message: bytes, signature: bytes, from_verkey: str ) -> bool: """ Verify a signature against the public key of the signer. Args: message: Message to verify signature: Signature to verify from_verkey: Verkey to use i...
[ "async", "def", "verify_message", "(", "self", ",", "message", ":", "bytes", ",", "signature", ":", "bytes", ",", "from_verkey", ":", "str", ")", "->", "bool", ":", "if", "not", "from_verkey", ":", "raise", "WalletError", "(", "\"Verkey not provided\"", ")",...
[ 483, 4 ]
[ 517, 21 ]
python
en
['en', 'error', 'th']
False
IndyWallet.encrypt_message
( self, message: bytes, to_verkey: str, from_verkey: str = None )
Apply auth_crypt or anon_crypt to a message. Args: message: The binary message content to_verkey: The verkey of the recipient from_verkey: The verkey of the sender. If provided then auth_crypt is used, otherwise anon_crypt is used. Returns: ...
Apply auth_crypt or anon_crypt to a message.
async def encrypt_message( self, message: bytes, to_verkey: str, from_verkey: str = None ) -> bytes: """ Apply auth_crypt or anon_crypt to a message. Args: message: The binary message content to_verkey: The verkey of the recipient from_verkey: The...
[ "async", "def", "encrypt_message", "(", "self", ",", "message", ":", "bytes", ",", "to_verkey", ":", "str", ",", "from_verkey", ":", "str", "=", "None", ")", "->", "bytes", ":", "if", "from_verkey", ":", "try", ":", "result", "=", "await", "indy", ".",...
[ 519, 4 ]
[ 550, 21 ]
python
en
['en', 'error', 'th']
False
IndyWallet.decrypt_message
( self, enc_message: bytes, to_verkey: str, use_auth: bool )
Decrypt a message assembled by auth_crypt or anon_crypt. Args: message: The encrypted message content to_verkey: The verkey of the recipient. If provided then auth_decrypt is used, otherwise anon_decrypt is used. use_auth: True if you would like to a...
Decrypt a message assembled by auth_crypt or anon_crypt.
async def decrypt_message( self, enc_message: bytes, to_verkey: str, use_auth: bool ) -> (bytes, str): """ Decrypt a message assembled by auth_crypt or anon_crypt. Args: message: The encrypted message content to_verkey: The verkey of the recipient. If provide...
[ "async", "def", "decrypt_message", "(", "self", ",", "enc_message", ":", "bytes", ",", "to_verkey", ":", "str", ",", "use_auth", ":", "bool", ")", "->", "(", "bytes", ",", "str", ")", ":", "if", "use_auth", ":", "try", ":", "sender_verkey", ",", "resul...
[ 552, 4 ]
[ 587, 36 ]
python
en
['en', 'error', 'th']
False
IndyWallet.pack_message
( self, message: str, to_verkeys: Sequence[str], from_verkey: str = None )
Pack a message for one or more recipients. Args: message: The message to pack to_verkeys: List of verkeys to pack for from_verkey: Sender verkey to pack from Returns: The resulting packed message bytes Raises: WalletError: I...
Pack a message for one or more recipients.
async def pack_message( self, message: str, to_verkeys: Sequence[str], from_verkey: str = None ) -> bytes: """ Pack a message for one or more recipients. Args: message: The message to pack to_verkeys: List of verkeys to pack for from_verkey: Sende...
[ "async", "def", "pack_message", "(", "self", ",", "message", ":", "str", ",", "to_verkeys", ":", "Sequence", "[", "str", "]", ",", "from_verkey", ":", "str", "=", "None", ")", "->", "bytes", ":", "if", "message", "is", "None", ":", "raise", "WalletErro...
[ 589, 4 ]
[ 616, 21 ]
python
en
['en', 'error', 'th']
False
IndyWallet.unpack_message
(self, enc_message: bytes)
Unpack a message. Args: enc_message: The packed message bytes Returns: A tuple: (message, from_verkey, to_verkey) Raises: WalletError: If the message is not provided WalletError: If a libindy error occurs
Unpack a message.
async def unpack_message(self, enc_message: bytes) -> (str, str, str): """ Unpack a message. Args: enc_message: The packed message bytes Returns: A tuple: (message, from_verkey, to_verkey) Raises: WalletError: If the message is not provided ...
[ "async", "def", "unpack_message", "(", "self", ",", "enc_message", ":", "bytes", ")", "->", "(", "str", ",", "str", ",", "str", ")", ":", "if", "not", "enc_message", ":", "raise", "WalletError", "(", "\"Message not provided\"", ")", "try", ":", "unpacked_j...
[ 618, 4 ]
[ 643, 46 ]
python
en
['en', 'error', 'th']
False
IndyWallet.get_credential_definition_tag_policy
(self, credential_definition_id: str)
Return the tag policy for a given credential definition ID.
Return the tag policy for a given credential definition ID.
async def get_credential_definition_tag_policy(self, credential_definition_id: str): """Return the tag policy for a given credential definition ID.""" policy_json = await indy.anoncreds.prover_get_credential_attr_tag_policy( self.handle, credential_definition_id ) return json...
[ "async", "def", "get_credential_definition_tag_policy", "(", "self", ",", "credential_definition_id", ":", "str", ")", ":", "policy_json", "=", "await", "indy", ".", "anoncreds", ".", "prover_get_credential_attr_tag_policy", "(", "self", ".", "handle", ",", "credentia...
[ 645, 4 ]
[ 650, 63 ]
python
en
['en', 'en', 'en']
True
IndyWallet.set_credential_definition_tag_policy
( self, credential_definition_id: str, taggables: Sequence[str] = None, retroactive: bool = True, )
Set the tag policy for a given credential definition ID. Args: credential_definition_id: The ID of the credential definition taggables: A sequence of string values representing attribute names retroactive: Whether to apply the policy to previously-stored credentials...
Set the tag policy for a given credential definition ID.
async def set_credential_definition_tag_policy( self, credential_definition_id: str, taggables: Sequence[str] = None, retroactive: bool = True, ): """ Set the tag policy for a given credential definition ID. Args: credential_definition_id: The ID ...
[ "async", "def", "set_credential_definition_tag_policy", "(", "self", ",", "credential_definition_id", ":", "str", ",", "taggables", ":", "Sequence", "[", "str", "]", "=", "None", ",", "retroactive", ":", "bool", "=", "True", ",", ")", ":", "if", "taggables", ...
[ 652, 4 ]
[ 678, 82 ]
python
en
['en', 'error', 'th']
False
IndyWallet.generate_wallet_key
(self, seed: str = None)
Generate a raw Indy wallet key.
Generate a raw Indy wallet key.
async def generate_wallet_key(self, seed: str = None) -> str: """Generate a raw Indy wallet key.""" return await indy.wallet.generate_wallet_key(seed)
[ "async", "def", "generate_wallet_key", "(", "self", ",", "seed", ":", "str", "=", "None", ")", "->", "str", ":", "return", "await", "indy", ".", "wallet", ".", "generate_wallet_key", "(", "seed", ")" ]
[ 681, 4 ]
[ 683, 58 ]
python
en
['en', 'en', 'en']
True
Stream.maxpoints
(self)
Sets the maximum number of points to keep on the plots from an incoming stream. If `maxpoints` is set to 50, only the newest 50 points will be displayed on the plot. The 'maxpoints' property is a number and may be specified as: - An int or float in the interval [0, 10000]...
Sets the maximum number of points to keep on the plots from an incoming stream. If `maxpoints` is set to 50, only the newest 50 points will be displayed on the plot. The 'maxpoints' property is a number and may be specified as: - An int or float in the interval [0, 10000]
def maxpoints(self): """ Sets the maximum number of points to keep on the plots from an incoming stream. If `maxpoints` is set to 50, only the newest 50 points will be displayed on the plot. The 'maxpoints' property is a number and may be specified as: - An int or ...
[ "def", "maxpoints", "(", "self", ")", ":", "return", "self", "[", "\"maxpoints\"", "]" ]
[ 15, 4 ]
[ 28, 32 ]
python
en
['en', 'error', 'th']
False
Stream.token
(self)
The stream id number links a data trace on a plot with a stream. See https://chart-studio.plotly.com/settings for more details. The 'token' property is a string and must be specified as: - A non-empty string Returns ------- str
The stream id number links a data trace on a plot with a stream. See https://chart-studio.plotly.com/settings for more details. The 'token' property is a string and must be specified as: - A non-empty string
def token(self): """ The stream id number links a data trace on a plot with a stream. See https://chart-studio.plotly.com/settings for more details. The 'token' property is a string and must be specified as: - A non-empty string Returns ------- ...
[ "def", "token", "(", "self", ")", ":", "return", "self", "[", "\"token\"", "]" ]
[ 37, 4 ]
[ 50, 28 ]
python
en
['en', 'error', 'th']
False
Stream.__init__
(self, arg=None, maxpoints=None, token=None, **kwargs)
Construct a new Stream object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scattergeo.Stream` maxpoints Sets the maximum number of points to keep...
Construct a new Stream object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scattergeo.Stream` maxpoints Sets the maximum number of points to keep...
def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): """ Construct a new Stream object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scattergeo....
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "maxpoints", "=", "None", ",", "token", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Stream", ",", "self", ")", ".", "__init__", "(", "\"stream\"", ")", "if", "\"_paren...
[ 72, 4 ]
[ 140, 34 ]
python
en
['en', 'error', 'th']
False
validate_annotated_heatmap
(z, x, y, annotation_text)
Annotated-heatmap-specific validations Check that if a text matrix is supplied, it has the same dimensions as the z matrix. See FigureFactory.create_annotated_heatmap() for params :raises: (PlotlyError) If z and text matrices do not have the same dimensions.
Annotated-heatmap-specific validations
def validate_annotated_heatmap(z, x, y, annotation_text): """ Annotated-heatmap-specific validations Check that if a text matrix is supplied, it has the same dimensions as the z matrix. See FigureFactory.create_annotated_heatmap() for params :raises: (PlotlyError) If z and text matrices do no...
[ "def", "validate_annotated_heatmap", "(", "z", ",", "x", ",", "y", ",", "annotation_text", ")", ":", "if", "annotation_text", "is", "not", "None", "and", "isinstance", "(", "annotation_text", ",", "list", ")", ":", "utils", ".", "validate_equal_length", "(", ...
[ 12, 0 ]
[ 46, 13 ]
python
en
['en', 'error', 'th']
False
create_annotated_heatmap
( z, x=None, y=None, annotation_text=None, colorscale="Plasma", font_colors=None, showscale=False, reversescale=False, **kwargs )
Function that creates annotated heatmaps This function adds annotations to each cell of the heatmap. :param (list[list]|ndarray) z: z matrix to create heatmap. :param (list) x: x axis labels. :param (list) y: y axis labels. :param (list[list]|ndarray) annotation_text: Text strings for ...
Function that creates annotated heatmaps
def create_annotated_heatmap( z, x=None, y=None, annotation_text=None, colorscale="Plasma", font_colors=None, showscale=False, reversescale=False, **kwargs ): """ Function that creates annotated heatmaps This function adds annotations to each cell of the heatmap. :p...
[ "def", "create_annotated_heatmap", "(", "z", ",", "x", "=", "None", ",", "y", "=", "None", ",", "annotation_text", "=", "None", ",", "colorscale", "=", "\"Plasma\"", ",", "font_colors", "=", "None", ",", "showscale", "=", "False", ",", "reversescale", "=",...
[ 49, 0 ]
[ 145, 54 ]
python
en
['en', 'error', 'th']
False
_AnnotatedHeatmap.get_text_color
(self)
Get font color for annotations. The annotated heatmap can feature two text colors: min_text_color and max_text_color. The min_text_color is applied to annotations for heatmap values < (max_value - min_value)/2. The user can define these two colors. Otherwise the colors are defi...
Get font color for annotations.
def get_text_color(self): """ Get font color for annotations. The annotated heatmap can feature two text colors: min_text_color and max_text_color. The min_text_color is applied to annotations for heatmap values < (max_value - min_value)/2. The user can define these two ...
[ "def", "get_text_color", "(", "self", ")", ":", "# Plotly colorscales ranging from a lighter shade to a darker shade", "colorscales", "=", "[", "\"Greys\"", ",", "\"Greens\"", ",", "\"Blues\"", ",", "\"YIGnBu\"", ",", "\"YIOrRd\"", ",", "\"RdBu\"", ",", "\"Picnic\"", ",...
[ 191, 4 ]
[ 264, 45 ]
python
en
['en', 'error', 'th']
False
_AnnotatedHeatmap.get_z_mid
(self)
Get the mid value of z matrix :rtype (float) z_avg: average val from z matrix
Get the mid value of z matrix
def get_z_mid(self): """ Get the mid value of z matrix :rtype (float) z_avg: average val from z matrix """ if np and isinstance(self.z, np.ndarray): z_min = np.amin(self.z) z_max = np.amax(self.z) else: z_min = min([v for row in self.z...
[ "def", "get_z_mid", "(", "self", ")", ":", "if", "np", "and", "isinstance", "(", "self", ".", "z", ",", "np", ".", "ndarray", ")", ":", "z_min", "=", "np", ".", "amin", "(", "self", ".", "z", ")", "z_max", "=", "np", ".", "amax", "(", "self", ...
[ 266, 4 ]
[ 279, 20 ]
python
en
['en', 'error', 'th']
False
_AnnotatedHeatmap.make_annotations
(self)
Get annotations for each cell of the heatmap with graph_objs.Annotation :rtype (list[dict]) annotations: list of annotations for each cell of the heatmap
Get annotations for each cell of the heatmap with graph_objs.Annotation
def make_annotations(self): """ Get annotations for each cell of the heatmap with graph_objs.Annotation :rtype (list[dict]) annotations: list of annotations for each cell of the heatmap """ min_text_color, max_text_color = _AnnotatedHeatmap.get_text_color(self) ...
[ "def", "make_annotations", "(", "self", ")", ":", "min_text_color", ",", "max_text_color", "=", "_AnnotatedHeatmap", ".", "get_text_color", "(", "self", ")", "z_mid", "=", "_AnnotatedHeatmap", ".", "get_z_mid", "(", "self", ")", "annotations", "=", "[", "]", "...
[ 281, 4 ]
[ 305, 26 ]
python
en
['en', 'error', 'th']
False
Lightposition.x
(self)
Numeric vector, representing the X coordinate for each vertex. The 'x' property is a number and may be specified as: - An int or float in the interval [-100000, 100000] Returns ------- int|float
Numeric vector, representing the X coordinate for each vertex. The 'x' property is a number and may be specified as: - An int or float in the interval [-100000, 100000]
def x(self): """ Numeric vector, representing the X coordinate for each vertex. The 'x' property is a number and may be specified as: - An int or float in the interval [-100000, 100000] Returns ------- int|float """ return self["x"]
[ "def", "x", "(", "self", ")", ":", "return", "self", "[", "\"x\"", "]" ]
[ 15, 4 ]
[ 26, 24 ]
python
en
['en', 'error', 'th']
False
Lightposition.y
(self)
Numeric vector, representing the Y coordinate for each vertex. The 'y' property is a number and may be specified as: - An int or float in the interval [-100000, 100000] Returns ------- int|float
Numeric vector, representing the Y coordinate for each vertex. The 'y' property is a number and may be specified as: - An int or float in the interval [-100000, 100000]
def y(self): """ Numeric vector, representing the Y coordinate for each vertex. The 'y' property is a number and may be specified as: - An int or float in the interval [-100000, 100000] Returns ------- int|float """ return self["y"]
[ "def", "y", "(", "self", ")", ":", "return", "self", "[", "\"y\"", "]" ]
[ 35, 4 ]
[ 46, 24 ]
python
en
['en', 'error', 'th']
False
Lightposition.z
(self)
Numeric vector, representing the Z coordinate for each vertex. The 'z' property is a number and may be specified as: - An int or float in the interval [-100000, 100000] Returns ------- int|float
Numeric vector, representing the Z coordinate for each vertex. The 'z' property is a number and may be specified as: - An int or float in the interval [-100000, 100000]
def z(self): """ Numeric vector, representing the Z coordinate for each vertex. The 'z' property is a number and may be specified as: - An int or float in the interval [-100000, 100000] Returns ------- int|float """ return self["z"]
[ "def", "z", "(", "self", ")", ":", "return", "self", "[", "\"z\"", "]" ]
[ 55, 4 ]
[ 66, 24 ]
python
en
['en', 'error', 'th']
False
Lightposition.__init__
(self, arg=None, x=None, y=None, z=None, **kwargs)
Construct a new Lightposition object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.streamtube.Lightposition` x Numeric vector, representing the X ...
Construct a new Lightposition object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.streamtube.Lightposition` x Numeric vector, representing the X ...
def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): """ Construct a new Lightposition object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.streamtu...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "x", "=", "None", ",", "y", "=", "None", ",", "z", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Lightposition", ",", "self", ")", ".", "__init__", "(", "\"lightpositi...
[ 88, 4 ]
[ 160, 34 ]
python
en
['en', 'error', 'th']
False
Font.color
(self)
The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: ...
The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: ...
def color(self): """ The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A name...
[ "def", "color", "(", "self", ")", ":", "return", "self", "[", "\"color\"", "]" ]
[ 15, 4 ]
[ 63, 28 ]
python
en
['en', 'error', 'th']
False
Font.family
(self)
HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts ...
HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts ...
def family(self): """ HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the prefer...
[ "def", "family", "(", "self", ")", ":", "return", "self", "[", "\"family\"", "]" ]
[ 72, 4 ]
[ 94, 29 ]
python
en
['en', 'error', 'th']
False
Font.size
(self)
The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] Returns ------- int|float
The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf]
def size(self): """ The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] Returns ------- int|float """ return self["size"]
[ "def", "size", "(", "self", ")", ":", "return", "self", "[", "\"size\"", "]" ]
[ 103, 4 ]
[ 112, 27 ]
python
en
['en', 'error', 'th']
False
Font.__init__
(self, arg=None, color=None, family=None, size=None, **kwargs)
Construct a new Font object Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute. Parameters ---------- arg dict of properties compatible with this constructor or an inst...
Construct a new Font object Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute.
def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): """ Construct a new Font object Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute. Parameters ---------- arg...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "color", "=", "None", ",", "family", "=", "None", ",", "size", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Font", ",", "self", ")", ".", "__init__", "(", "\"font\"",...
[ 143, 4 ]
[ 227, 34 ]
python
en
['en', 'error', 'th']
False
PresentationRequestHandler.handle
(self, context: RequestContext, responder: BaseResponder)
Message handler logic for Aries#0037 v1.0 presentation requests. Args: context: request context responder: responder callback
Message handler logic for Aries#0037 v1.0 presentation requests.
async def handle(self, context: RequestContext, responder: BaseResponder): """ Message handler logic for Aries#0037 v1.0 presentation requests. Args: context: request context responder: responder callback """ self._logger.debug("PresentationRequestHandle...
[ "async", "def", "handle", "(", "self", ",", "context", ":", "RequestContext", ",", "responder", ":", "BaseResponder", ")", ":", "self", ".", "_logger", ".", "debug", "(", "\"PresentationRequestHandler called with context %s\"", ",", "context", ")", "assert", "isin...
[ 20, 4 ]
[ 90, 60 ]
python
en
['en', 'error', 'th']
False
bbox2delta
(proposals, gt, means=(0., 0., 0., 0.), stds=(1., 1., 1., 1.))
Compute deltas of proposals w.r.t. gt. We usually compute the deltas of x, y, w, h of proposals w.r.t ground truth bboxes to get regression target. This is the inverse function of :func:`delta2bbox`. Args: proposals (Tensor): Boxes to be transformed, shape (N, ..., 4) gt (Tensor): Gt b...
Compute deltas of proposals w.r.t. gt.
def bbox2delta(proposals, gt, means=(0., 0., 0., 0.), stds=(1., 1., 1., 1.)): """Compute deltas of proposals w.r.t. gt. We usually compute the deltas of x, y, w, h of proposals w.r.t ground truth bboxes to get regression target. This is the inverse function of :func:`delta2bbox`. Args: pro...
[ "def", "bbox2delta", "(", "proposals", ",", "gt", ",", "means", "=", "(", "0.", ",", "0.", ",", "0.", ",", "0.", ")", ",", "stds", "=", "(", "1.", ",", "1.", ",", "1.", ",", "1.", ")", ")", ":", "assert", "proposals", ".", "size", "(", ")", ...
[ 73, 0 ]
[ 115, 17 ]
python
en
['en', 'fr', 'it']
False
delta2bbox
(rois, deltas, means=(0., 0., 0., 0.), stds=(1., 1., 1., 1.), max_shape=None, wh_ratio_clip=16 / 1000)
Apply deltas to shift/scale base boxes. Typically the rois are anchor or proposed bounding boxes and the deltas are network outputs used to shift/scale those boxes. This is the inverse function of :func:`bbox2delta`. Args: rois (Tensor): Boxes to be transformed. Has shape (N, 4) deltas...
Apply deltas to shift/scale base boxes.
def delta2bbox(rois, deltas, means=(0., 0., 0., 0.), stds=(1., 1., 1., 1.), max_shape=None, wh_ratio_clip=16 / 1000): """Apply deltas to shift/scale base boxes. Typically the rois are anchor or proposed bounding boxes and the deltas are...
[ "def", "delta2bbox", "(", "rois", ",", "deltas", ",", "means", "=", "(", "0.", ",", "0.", ",", "0.", ",", "0.", ")", ",", "stds", "=", "(", "1.", ",", "1.", ",", "1.", ",", "1.", ")", ",", "max_shape", "=", "None", ",", "wh_ratio_clip", "=", ...
[ 118, 0 ]
[ 196, 17 ]
python
en
['en', 'en', 'en']
True
require_auth
(func)
Secure method decorator
Secure method decorator
def require_auth(func): """ Secure method decorator """ @wraps(func) def wrapper(*args, **kwargs): # Verify if User is Authenticated # Authentication logic goes here if request.headers.get('authorization'): return func(*args, **kwargs) else: r...
[ "def", "require_auth", "(", "func", ")", ":", "@", "wraps", "(", "func", ")", "def", "wrapper", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "# Verify if User is Authenticated\r", "# Authentication logic goes here\r", "if", "request", ".", "headers", "...
[ 6, 0 ]
[ 16, 18 ]
python
en
['es', 'ro', 'en']
False
ForwardInvitationHandler.handle
(self, context: RequestContext, responder: BaseResponder)
Message handler implementation.
Message handler implementation.
async def handle(self, context: RequestContext, responder: BaseResponder): """Message handler implementation.""" self._logger.debug("ForwardInvitationHandler called with context %s", context) assert isinstance(context.message, ForwardInvitation) if not context.connection_ready: ...
[ "async", "def", "handle", "(", "self", ",", "context", ":", "RequestContext", ",", "responder", ":", "BaseResponder", ")", ":", "self", ".", "_logger", ".", "debug", "(", "\"ForwardInvitationHandler called with context %s\"", ",", "context", ")", "assert", "isinst...
[ 17, 4 ]
[ 36, 81 ]
python
da
['da', 'da', 'en']
True
get_style_labeled_data_path
(opt: Opt, base_task: str)
Return the filepath for the specified datatype of the specified base task, with an Image-Chat personality attached to each example.
Return the filepath for the specified datatype of the specified base task, with an Image-Chat personality attached to each example.
def get_style_labeled_data_path(opt: Opt, base_task: str) -> str: """ Return the filepath for the specified datatype of the specified base task, with an Image-Chat personality attached to each example. """ build_style_labeled_datasets(opt) # Build the data if it doesn't exist. dt = opt['data...
[ "def", "get_style_labeled_data_path", "(", "opt", ":", "Opt", ",", "base_task", ":", "str", ")", "->", "str", ":", "build_style_labeled_datasets", "(", "opt", ")", "# Build the data if it doesn't exist.", "dt", "=", "opt", "[", "'datatype'", "]", ".", "split", "...
[ 20, 0 ]
[ 30, 5 ]
python
en
['en', 'error', 'th']
False
get_personality_list_path
(opt: Opt)
Return the path to a list of personalities in the Image-Chat train set.
Return the path to a list of personalities in the Image-Chat train set.
def get_personality_list_path(opt: Opt) -> str: """ Return the path to a list of personalities in the Image-Chat train set. """ build_personality_list(opt) # Build the data if it doesn't exist. return os.path.join(opt['datapath'], TASK_FOLDER_NAME, 'personality_list.txt')
[ "def", "get_personality_list_path", "(", "opt", ":", "Opt", ")", "->", "str", ":", "build_personality_list", "(", "opt", ")", "# Build the data if it doesn't exist.", "return", "os", ".", "path", ".", "join", "(", "opt", "[", "'datapath'", "]", ",", "TASK_FOLDER...
[ 33, 0 ]
[ 39, 82 ]
python
en
['en', 'error', 'th']
False
PrevCurrUttStyleTeacher._edit_action
(self, act: Message)
Edit the fields of the action manually.
Edit the fields of the action manually.
def _edit_action(self, act: Message) -> Message: """ Edit the fields of the action manually. """ if 'labels' in act: labels = act['labels'] if len(labels) != 1: raise ValueError( f'{type(self).__name__} can only be used with one...
[ "def", "_edit_action", "(", "self", ",", "act", ":", "Message", ")", "->", "Message", ":", "if", "'labels'", "in", "act", ":", "labels", "=", "act", "[", "'labels'", "]", "if", "len", "(", "labels", ")", "!=", "1", ":", "raise", "ValueError", "(", ...
[ 108, 4 ]
[ 125, 18 ]
python
en
['en', 'error', 'th']
False
TestInvitationRequest.test_init
(self)
Test initialization.
Test initialization.
def test_init(self): """Test initialization.""" assert self.request.responder == self.test_responder assert self.request.message == self.test_message
[ "def", "test_init", "(", "self", ")", ":", "assert", "self", ".", "request", ".", "responder", "==", "self", ".", "test_responder", "assert", "self", ".", "request", ".", "message", "==", "self", ".", "test_message" ]
[ 18, 4 ]
[ 21, 56 ]
python
co
['es', 'co', 'en']
False
TestInvitationRequest.test_deserialize
(self, mock_invitation_schema_load)
Test deserialization.
Test deserialization.
def test_deserialize(self, mock_invitation_schema_load): """ Test deserialization. """ obj = {"obj": "obj"} request = InvitationRequest.deserialize(obj) mock_invitation_schema_load.assert_called_once_with(obj) assert request is mock_invitation_schema_load.return...
[ "def", "test_deserialize", "(", "self", ",", "mock_invitation_schema_load", ")", ":", "obj", "=", "{", "\"obj\"", ":", "\"obj\"", "}", "request", "=", "InvitationRequest", ".", "deserialize", "(", "obj", ")", "mock_invitation_schema_load", ".", "assert_called_once_w...
[ 31, 4 ]
[ 40, 66 ]
python
en
['en', 'error', 'th']
False
TestInvitationRequest.test_serialize
(self, mock_invitation_schema_dump)
Test serialization.
Test serialization.
def test_serialize(self, mock_invitation_schema_dump): """ Test serialization. """ request_dict = self.request.serialize() mock_invitation_schema_dump.assert_called_once_with(self.request) assert request_dict is mock_invitation_schema_dump.return_value
[ "def", "test_serialize", "(", "self", ",", "mock_invitation_schema_dump", ")", ":", "request_dict", "=", "self", ".", "request", ".", "serialize", "(", ")", "mock_invitation_schema_dump", ".", "assert_called_once_with", "(", "self", ".", "request", ")", "assert", ...
[ 46, 4 ]
[ 53, 71 ]
python
en
['en', 'error', 'th']
False
Selected.marker
(self)
The 'marker' property is an instance of Marker that may be specified as: - An instance of :class:`plotly.graph_objs.scattercarpet.selected.Marker` - A dict of string/value properties that will be passed to the Marker constructor Supported dict properties...
The 'marker' property is an instance of Marker that may be specified as: - An instance of :class:`plotly.graph_objs.scattercarpet.selected.Marker` - A dict of string/value properties that will be passed to the Marker constructor Supported dict properties...
def marker(self): """ The 'marker' property is an instance of Marker that may be specified as: - An instance of :class:`plotly.graph_objs.scattercarpet.selected.Marker` - A dict of string/value properties that will be passed to the Marker constructor ...
[ "def", "marker", "(", "self", ")", ":", "return", "self", "[", "\"marker\"", "]" ]
[ 15, 4 ]
[ 36, 29 ]
python
en
['en', 'error', 'th']
False
Selected.textfont
(self)
The 'textfont' property is an instance of Textfont that may be specified as: - An instance of :class:`plotly.graph_objs.scattercarpet.selected.Textfont` - A dict of string/value properties that will be passed to the Textfont constructor Supported dict pr...
The 'textfont' property is an instance of Textfont that may be specified as: - An instance of :class:`plotly.graph_objs.scattercarpet.selected.Textfont` - A dict of string/value properties that will be passed to the Textfont constructor Supported dict pr...
def textfont(self): """ The 'textfont' property is an instance of Textfont that may be specified as: - An instance of :class:`plotly.graph_objs.scattercarpet.selected.Textfont` - A dict of string/value properties that will be passed to the Textfont constructor ...
[ "def", "textfont", "(", "self", ")", ":", "return", "self", "[", "\"textfont\"", "]" ]
[ 45, 4 ]
[ 62, 31 ]
python
en
['en', 'error', 'th']
False
Selected.__init__
(self, arg=None, marker=None, textfont=None, **kwargs)
Construct a new Selected object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scattercarpet.Selected` marker :class:`plotly.graph_objects.scatterc...
Construct a new Selected object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scattercarpet.Selected` marker :class:`plotly.graph_objects.scatterc...
def __init__(self, arg=None, marker=None, textfont=None, **kwargs): """ Construct a new Selected object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scatterca...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "marker", "=", "None", ",", "textfont", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Selected", ",", "self", ")", ".", "__init__", "(", "\"selected\"", ")", "if", "\"_p...
[ 81, 4 ]
[ 146, 34 ]
python
en
['en', 'error', 'th']
False
Button.count
(self)
Sets the number of steps to take to update the range. Use with `step` to specify the update interval. The 'count' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float
Sets the number of steps to take to update the range. Use with `step` to specify the update interval. The 'count' property is a number and may be specified as: - An int or float in the interval [0, inf]
def count(self): """ Sets the number of steps to take to update the range. Use with `step` to specify the update interval. The 'count' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|floa...
[ "def", "count", "(", "self", ")", ":", "return", "self", "[", "\"count\"", "]" ]
[ 23, 4 ]
[ 35, 28 ]
python
en
['en', 'error', 'th']
False
Button.label
(self)
Sets the text label to appear on the button. The 'label' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str
Sets the text label to appear on the button. The 'label' property is a string and must be specified as: - A string - A number that will be converted to a string
def label(self): """ Sets the text label to appear on the button. The 'label' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str """ return self["label"]
[ "def", "label", "(", "self", ")", ":", "return", "self", "[", "\"label\"", "]" ]
[ 44, 4 ]
[ 56, 28 ]
python
en
['en', 'error', 'th']
False
Button.name
(self)
When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` alongside your modifications ...
When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` alongside your modifications ...
def name(self): """ When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` al...
[ "def", "name", "(", "self", ")", ":", "return", "self", "[", "\"name\"", "]" ]
[ 65, 4 ]
[ 83, 27 ]
python
en
['en', 'error', 'th']
False
Button.step
(self)
The unit of measurement that the `count` value will set the range by. The 'step' property is an enumeration that may be specified as: - One of the following enumeration values: ['month', 'year', 'day', 'hour', 'minute', 'second', 'all'] Re...
The unit of measurement that the `count` value will set the range by. The 'step' property is an enumeration that may be specified as: - One of the following enumeration values: ['month', 'year', 'day', 'hour', 'minute', 'second', 'all']
def step(self): """ The unit of measurement that the `count` value will set the range by. The 'step' property is an enumeration that may be specified as: - One of the following enumeration values: ['month', 'year', 'day', 'hour', 'minute', 'second', ...
[ "def", "step", "(", "self", ")", ":", "return", "self", "[", "\"step\"", "]" ]
[ 92, 4 ]
[ 106, 27 ]
python
en
['en', 'error', 'th']
False
Button.stepmode
(self)
Sets the range update mode. If "backward", the range update shifts the start of range back "count" times "step" milliseconds. If "todate", the range update shifts the start of range back to the first timestamp from "count" times "step" milliseconds back. For example, with `step`...
Sets the range update mode. If "backward", the range update shifts the start of range back "count" times "step" milliseconds. If "todate", the range update shifts the start of range back to the first timestamp from "count" times "step" milliseconds back. For example, with `step`...
def stepmode(self): """ Sets the range update mode. If "backward", the range update shifts the start of range back "count" times "step" milliseconds. If "todate", the range update shifts the start of range back to the first timestamp from "count" times "step" milliseconds...
[ "def", "stepmode", "(", "self", ")", ":", "return", "self", "[", "\"stepmode\"", "]" ]
[ 115, 4 ]
[ 135, 31 ]
python
en
['en', 'error', 'th']
False
Button.templateitemname
(self)
Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with `templateitemname` matching its `name`, alongside your modifications (includ...
Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with `templateitemname` matching its `name`, alongside your modifications (includ...
def templateitemname(self): """ Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with `templateitemname` matching its `name`, ...
[ "def", "templateitemname", "(", "self", ")", ":", "return", "self", "[", "\"templateitemname\"", "]" ]
[ 144, 4 ]
[ 163, 39 ]
python
en
['en', 'error', 'th']
False
Button.visible
(self)
Determines whether or not this button is visible. The 'visible' property must be specified as a bool (either True, or False) Returns ------- bool
Determines whether or not this button is visible. The 'visible' property must be specified as a bool (either True, or False)
def visible(self): """ Determines whether or not this button is visible. The 'visible' property must be specified as a bool (either True, or False) Returns ------- bool """ return self["visible"]
[ "def", "visible", "(", "self", ")", ":", "return", "self", "[", "\"visible\"", "]" ]
[ 172, 4 ]
[ 183, 30 ]
python
en
['en', 'error', 'th']
False
Button.__init__
( self, arg=None, count=None, label=None, name=None, step=None, stepmode=None, templateitemname=None, visible=None, **kwargs )
Construct a new Button object Sets the specifications for each buttons. By default, a range selector comes with no buttons. Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.gr...
Construct a new Button object Sets the specifications for each buttons. By default, a range selector comes with no buttons.
def __init__( self, arg=None, count=None, label=None, name=None, step=None, stepmode=None, templateitemname=None, visible=None, **kwargs ): """ Construct a new Button object Sets the specifications for e...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "count", "=", "None", ",", "label", "=", "None", ",", "name", "=", "None", ",", "step", "=", "None", ",", "stepmode", "=", "None", ",", "templateitemname", "=", "None", ",", "visible", "...
[ 236, 4 ]
[ 369, 34 ]
python
en
['en', 'error', 'th']
False
Font.color
(self)
The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: ...
The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: ...
def color(self): """ The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A name...
[ "def", "color", "(", "self", ")", ":", "return", "self", "[", "\"color\"", "]" ]
[ 15, 4 ]
[ 63, 28 ]
python
en
['en', 'error', 'th']
False
Font.family
(self)
HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts ...
HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts ...
def family(self): """ HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the prefer...
[ "def", "family", "(", "self", ")", ":", "return", "self", "[", "\"family\"", "]" ]
[ 72, 4 ]
[ 94, 29 ]
python
en
['en', 'error', 'th']
False
Font.size
(self)
The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] Returns ------- int|float
The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf]
def size(self): """ The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] Returns ------- int|float """ return self["size"]
[ "def", "size", "(", "self", ")", ":", "return", "self", "[", "\"size\"", "]" ]
[ 103, 4 ]
[ 112, 27 ]
python
en
['en', 'error', 'th']
False
Font.__init__
(self, arg=None, color=None, family=None, size=None, **kwargs)
Construct a new Font object Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute. Parameters ---------- arg dict of properties compatible with this constructor or an inst...
Construct a new Font object Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute.
def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): """ Construct a new Font object Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute. Parameters ---------- arg...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "color", "=", "None", ",", "family", "=", "None", ",", "size", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Font", ",", "self", ")", ".", "__init__", "(", "\"font\"",...
[ 143, 4 ]
[ 227, 34 ]
python
en
['en', 'error', 'th']
False
_get_config_directory
()
Find the predefined detector config directory.
Find the predefined detector config directory.
def _get_config_directory(): """Find the predefined detector config directory.""" try: # Assume we are running in the source mmdetection repo repo_dpath = dirname(dirname(dirname(__file__))) except NameError: # For IPython development when this __file__ is not defined import ...
[ "def", "_get_config_directory", "(", ")", ":", "try", ":", "# Assume we are running in the source mmdetection repo", "repo_dpath", "=", "dirname", "(", "dirname", "(", "dirname", "(", "__file__", ")", ")", ")", "except", "NameError", ":", "# For IPython development when...
[ 9, 0 ]
[ 21, 23 ]
python
en
['en', 'en', 'en']
True
_get_config_module
(fname)
Load a configuration as a python module.
Load a configuration as a python module.
def _get_config_module(fname): """Load a configuration as a python module.""" from mmcv import Config config_dpath = _get_config_directory() config_fpath = join(config_dpath, fname) config_mod = Config.fromfile(config_fpath) return config_mod
[ "def", "_get_config_module", "(", "fname", ")", ":", "from", "mmcv", "import", "Config", "config_dpath", "=", "_get_config_directory", "(", ")", "config_fpath", "=", "join", "(", "config_dpath", ",", "fname", ")", "config_mod", "=", "Config", ".", "fromfile", ...
[ 24, 0 ]
[ 30, 21 ]
python
en
['en', 'fr', 'en']
True
_get_detector_cfg
(fname)
Grab configs necessary to create a detector. These are deep copied to allow for safe modification of parameters without influencing other tests.
Grab configs necessary to create a detector.
def _get_detector_cfg(fname): """Grab configs necessary to create a detector. These are deep copied to allow for safe modification of parameters without influencing other tests. """ import mmcv config = _get_config_module(fname) model = copy.deepcopy(config.model) train_cfg = mmcv.Confi...
[ "def", "_get_detector_cfg", "(", "fname", ")", ":", "import", "mmcv", "config", "=", "_get_config_module", "(", "fname", ")", "model", "=", "copy", ".", "deepcopy", "(", "config", ".", "model", ")", "train_cfg", "=", "mmcv", ".", "Config", "(", "copy", "...
[ 33, 0 ]
[ 44, 37 ]
python
en
['en', 'en', 'en']
True
_demo_mm_inputs
(input_shape=(1, 3, 300, 300), num_items=None, num_classes=10)
Create a superset of inputs needed to run test or train batches. Args: input_shape (tuple): input batch dimensions num_items (None | List[int]): specifies the number of boxes in each batch item num_classes (int): number of different labels a box might h...
Create a superset of inputs needed to run test or train batches.
def _demo_mm_inputs(input_shape=(1, 3, 300, 300), num_items=None, num_classes=10): # yapf: disable """Create a superset of inputs needed to run test or train batches. Args: input_shape (tuple): input batch dimensions num_items (None | List[int]): sp...
[ "def", "_demo_mm_inputs", "(", "input_shape", "=", "(", "1", ",", "3", ",", "300", ",", "300", ")", ",", "num_items", "=", "None", ",", "num_classes", "=", "10", ")", ":", "# yapf: disable", "from", "mmdet", ".", "core", "import", "BitmapMasks", "(", "...
[ 274, 0 ]
[ 339, 20 ]
python
en
['en', 'en', 'en']
True
Controller.__init__
(self, protocol: str)
Initialize the controller.
Initialize the controller.
def __init__(self, protocol: str): """Initialize the controller."""
[ "def", "__init__", "(", "self", ",", "protocol", ":", "str", ")", ":" ]
[ 12, 4 ]
[ 13, 40 ]
python
en
['en', 'en', 'en']
True
Controller.determine_roles
(self, context: InjectionContext)
Determine what action menu roles are defined.
Determine what action menu roles are defined.
async def determine_roles(self, context: InjectionContext) -> Sequence[str]: """Determine what action menu roles are defined.""" service = await context.inject(BaseMenuService, required=False) if service: return ["provider"]
[ "async", "def", "determine_roles", "(", "self", ",", "context", ":", "InjectionContext", ")", "->", "Sequence", "[", "str", "]", ":", "service", "=", "await", "context", ".", "inject", "(", "BaseMenuService", ",", "required", "=", "False", ")", "if", "serv...
[ 15, 4 ]
[ 20, 31 ]
python
en
['en', 'en', 'en']
True
Newshape.drawdirection
(self)
When `dragmode` is set to "drawrect", "drawline" or "drawcircle" this limits the drag to be horizontal, vertical or diagonal. Using "diagonal" there is no limit e.g. in drawing lines in any direction. "ortho" limits the draw to be either horizontal or vertical. "horizontal" allo...
When `dragmode` is set to "drawrect", "drawline" or "drawcircle" this limits the drag to be horizontal, vertical or diagonal. Using "diagonal" there is no limit e.g. in drawing lines in any direction. "ortho" limits the draw to be either horizontal or vertical. "horizontal" allo...
def drawdirection(self): """ When `dragmode` is set to "drawrect", "drawline" or "drawcircle" this limits the drag to be horizontal, vertical or diagonal. Using "diagonal" there is no limit e.g. in drawing lines in any direction. "ortho" limits the draw to be either horiz...
[ "def", "drawdirection", "(", "self", ")", ":", "return", "self", "[", "\"drawdirection\"", "]" ]
[ 22, 4 ]
[ 39, 36 ]
python
en
['en', 'error', 'th']
False
Newshape.fillcolor
(self)
Sets the color filling new shapes' interior. Please note that if using a fillcolor with alpha greater than half, drag inside the active shape starts moving the shape underneath, otherwise a new shape could be started over. The 'fillcolor' property is a color and may be spec...
Sets the color filling new shapes' interior. Please note that if using a fillcolor with alpha greater than half, drag inside the active shape starts moving the shape underneath, otherwise a new shape could be started over. The 'fillcolor' property is a color and may be spec...
def fillcolor(self): """ Sets the color filling new shapes' interior. Please note that if using a fillcolor with alpha greater than half, drag inside the active shape starts moving the shape underneath, otherwise a new shape could be started over. The 'fillcolor' pro...
[ "def", "fillcolor", "(", "self", ")", ":", "return", "self", "[", "\"fillcolor\"", "]" ]
[ 48, 4 ]
[ 101, 32 ]
python
en
['en', 'error', 'th']
False
Newshape.fillrule
(self)
Determines the path's interior. For more info please visit https://developer.mozilla.org/en- US/docs/Web/SVG/Attribute/fill-rule The 'fillrule' property is an enumeration that may be specified as: - One of the following enumeration values: ['evenodd', 'non...
Determines the path's interior. For more info please visit https://developer.mozilla.org/en- US/docs/Web/SVG/Attribute/fill-rule The 'fillrule' property is an enumeration that may be specified as: - One of the following enumeration values: ['evenodd', 'non...
def fillrule(self): """ Determines the path's interior. For more info please visit https://developer.mozilla.org/en- US/docs/Web/SVG/Attribute/fill-rule The 'fillrule' property is an enumeration that may be specified as: - One of the following enumeration values: ...
[ "def", "fillrule", "(", "self", ")", ":", "return", "self", "[", "\"fillrule\"", "]" ]
[ 110, 4 ]
[ 124, 31 ]
python
en
['en', 'error', 'th']
False
Newshape.layer
(self)
Specifies whether new shapes are drawn below or above traces. The 'layer' property is an enumeration that may be specified as: - One of the following enumeration values: ['below', 'above'] Returns ------- Any
Specifies whether new shapes are drawn below or above traces. The 'layer' property is an enumeration that may be specified as: - One of the following enumeration values: ['below', 'above']
def layer(self): """ Specifies whether new shapes are drawn below or above traces. The 'layer' property is an enumeration that may be specified as: - One of the following enumeration values: ['below', 'above'] Returns ------- Any ""...
[ "def", "layer", "(", "self", ")", ":", "return", "self", "[", "\"layer\"", "]" ]
[ 133, 4 ]
[ 145, 28 ]
python
en
['en', 'error', 'th']
False
Newshape.line
(self)
The 'line' property is an instance of Line that may be specified as: - An instance of :class:`plotly.graph_objs.layout.newshape.Line` - A dict of string/value properties that will be passed to the Line constructor Supported dict properties: ...
The 'line' property is an instance of Line that may be specified as: - An instance of :class:`plotly.graph_objs.layout.newshape.Line` - A dict of string/value properties that will be passed to the Line constructor Supported dict properties: ...
def line(self): """ The 'line' property is an instance of Line that may be specified as: - An instance of :class:`plotly.graph_objs.layout.newshape.Line` - A dict of string/value properties that will be passed to the Line constructor Supported dic...
[ "def", "line", "(", "self", ")", ":", "return", "self", "[", "\"line\"", "]" ]
[ 154, 4 ]
[ 180, 27 ]
python
en
['en', 'error', 'th']
False
Newshape.opacity
(self)
Sets the opacity of new shapes. The 'opacity' property is a number and may be specified as: - An int or float in the interval [0, 1] Returns ------- int|float
Sets the opacity of new shapes. The 'opacity' property is a number and may be specified as: - An int or float in the interval [0, 1]
def opacity(self): """ Sets the opacity of new shapes. The 'opacity' property is a number and may be specified as: - An int or float in the interval [0, 1] Returns ------- int|float """ return self["opacity"]
[ "def", "opacity", "(", "self", ")", ":", "return", "self", "[", "\"opacity\"", "]" ]
[ 189, 4 ]
[ 200, 30 ]
python
en
['en', 'error', 'th']
False
Newshape.__init__
( self, arg=None, drawdirection=None, fillcolor=None, fillrule=None, layer=None, line=None, opacity=None, **kwargs )
Construct a new Newshape object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.Newshape` drawdirection When `dragmode` is set to "drawrect",...
Construct a new Newshape object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.Newshape` drawdirection When `dragmode` is set to "drawrect",...
def __init__( self, arg=None, drawdirection=None, fillcolor=None, fillrule=None, layer=None, line=None, opacity=None, **kwargs ): """ Construct a new Newshape object Parameters ---------- arg ...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "drawdirection", "=", "None", ",", "fillcolor", "=", "None", ",", "fillrule", "=", "None", ",", "layer", "=", "None", ",", "line", "=", "None", ",", "opacity", "=", "None", ",", "*", "*"...
[ 239, 4 ]
[ 350, 34 ]
python
en
['en', 'error', 'th']
False
Pages.first_page
(self)
goes to the first page
goes to the first page
async def first_page(self): """goes to the first page""" await self.show_page(1)
[ "async", "def", "first_page", "(", "self", ")", ":", "await", "self", ".", "show_page", "(", "1", ")" ]
[ 133, 4 ]
[ 135, 31 ]
python
en
['en', 'en', 'en']
True
Pages.last_page
(self)
goes to the last page
goes to the last page
async def last_page(self): """goes to the last page""" await self.show_page(self.maximum_pages)
[ "async", "def", "last_page", "(", "self", ")", ":", "await", "self", ".", "show_page", "(", "self", ".", "maximum_pages", ")" ]
[ 137, 4 ]
[ 139, 48 ]
python
en
['en', 'en', 'en']
True
Pages.next_page
(self)
goes to the next page
goes to the next page
async def next_page(self): """goes to the next page""" await self.checked_show_page(self.current_page + 1)
[ "async", "def", "next_page", "(", "self", ")", ":", "await", "self", ".", "checked_show_page", "(", "self", ".", "current_page", "+", "1", ")" ]
[ 141, 4 ]
[ 143, 59 ]
python
en
['en', 'en', 'en']
True
Pages.previous_page
(self)
goes to the previous page
goes to the previous page
async def previous_page(self): """goes to the previous page""" await self.checked_show_page(self.current_page - 1)
[ "async", "def", "previous_page", "(", "self", ")", ":", "await", "self", ".", "checked_show_page", "(", "self", ".", "current_page", "-", "1", ")" ]
[ 145, 4 ]
[ 147, 59 ]
python
en
['en', 'en', 'en']
True
Pages.numbered_page
(self)
lets you type a page number to go to
lets you type a page number to go to
async def numbered_page(self): """lets you type a page number to go to""" to_delete = [] to_delete.append(await self.channel.send('What page do you want to go to?')) def message_check(m): return m.author == self.author and \ self.channel == m.channel and \ ...
[ "async", "def", "numbered_page", "(", "self", ")", ":", "to_delete", "=", "[", "]", "to_delete", ".", "append", "(", "await", "self", ".", "channel", ".", "send", "(", "'What page do you want to go to?'", ")", ")", "def", "message_check", "(", "m", ")", ":...
[ 153, 4 ]
[ 180, 16 ]
python
en
['en', 'en', 'en']
True
Pages.show_help
(self)
shows this message
shows this message
async def show_help(self): """shows this message""" self.clear_embed() self.embed.title = 'Welcome to the interactive paginator!' self.embed.description = 'This interactively allows you to see pages of text by navigating with reactions.' messages = [f'{emoji} {func.__doc__}' f...
[ "async", "def", "show_help", "(", "self", ")", ":", "self", ".", "clear_embed", "(", ")", "self", ".", "embed", ".", "title", "=", "'Welcome to the interactive paginator!'", "self", ".", "embed", ".", "description", "=", "'This interactively allows you to see pages ...
[ 182, 4 ]
[ 200, 60 ]
python
en
['en', 'en', 'en']
True
Pages.stop_pages
(self)
stops the interactive pagination session
stops the interactive pagination session
async def stop_pages(self): """stops the interactive pagination session""" await self.message.delete() self.paginating = False
[ "async", "def", "stop_pages", "(", "self", ")", ":", "await", "self", ".", "message", ".", "delete", "(", ")", "self", ".", "paginating", "=", "False" ]
[ 202, 4 ]
[ 205, 31 ]
python
en
['en', 'en', 'en']
True
Pages.paginate
(self)
Actually paginate the entries and run the interactive loop if necessary.
Actually paginate the entries and run the interactive loop if necessary.
async def paginate(self): """Actually paginate the entries and run the interactive loop if necessary.""" first_page = self.show_page(1, first=True) if not self.paginating: await first_page else: # allow us to react to reactions right away if we're paginating ...
[ "async", "def", "paginate", "(", "self", ")", ":", "first_page", "=", "self", ".", "show_page", "(", "1", ",", "first", "=", "True", ")", "if", "not", "self", ".", "paginating", ":", "await", "first_page", "else", ":", "# allow us to react to reactions right...
[ 226, 4 ]
[ 252, 30 ]
python
en
['en', 'en', 'en']
True
HelpPaginator.show_bot_help
(self)
shows how to use the bot
shows how to use the bot
async def show_bot_help(self): """shows how to use the bot""" self.clear_embed() self.embed.title = 'Using the bot' self.embed.description = 'Hello! Welcome to the help page.' entries = ( ('<argument>', 'This means the argument is __**required**__.'), (...
[ "async", "def", "show_bot_help", "(", "self", ")", ":", "self", ".", "clear_embed", "(", ")", "self", ".", "embed", ".", "title", "=", "'Using the bot'", "self", ".", "embed", ".", "description", "=", "'Hello! Welcome to the help page.'", "entries", "=", "(", ...
[ 473, 4 ]
[ 502, 60 ]
python
en
['en', 'en', 'en']
True
Stream.maxpoints
(self)
Sets the maximum number of points to keep on the plots from an incoming stream. If `maxpoints` is set to 50, only the newest 50 points will be displayed on the plot. The 'maxpoints' property is a number and may be specified as: - An int or float in the interval [0, 10000]...
Sets the maximum number of points to keep on the plots from an incoming stream. If `maxpoints` is set to 50, only the newest 50 points will be displayed on the plot. The 'maxpoints' property is a number and may be specified as: - An int or float in the interval [0, 10000]
def maxpoints(self): """ Sets the maximum number of points to keep on the plots from an incoming stream. If `maxpoints` is set to 50, only the newest 50 points will be displayed on the plot. The 'maxpoints' property is a number and may be specified as: - An int or ...
[ "def", "maxpoints", "(", "self", ")", ":", "return", "self", "[", "\"maxpoints\"", "]" ]
[ 15, 4 ]
[ 28, 32 ]
python
en
['en', 'error', 'th']
False
Stream.token
(self)
The stream id number links a data trace on a plot with a stream. See https://chart-studio.plotly.com/settings for more details. The 'token' property is a string and must be specified as: - A non-empty string Returns ------- str
The stream id number links a data trace on a plot with a stream. See https://chart-studio.plotly.com/settings for more details. The 'token' property is a string and must be specified as: - A non-empty string
def token(self): """ The stream id number links a data trace on a plot with a stream. See https://chart-studio.plotly.com/settings for more details. The 'token' property is a string and must be specified as: - A non-empty string Returns ------- ...
[ "def", "token", "(", "self", ")", ":", "return", "self", "[", "\"token\"", "]" ]
[ 37, 4 ]
[ 50, 28 ]
python
en
['en', 'error', 'th']
False
Stream.__init__
(self, arg=None, maxpoints=None, token=None, **kwargs)
Construct a new Stream object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.carpet.Stream` maxpoints Sets the maximum number of points to keep on the plots ...
Construct a new Stream object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.carpet.Stream` maxpoints Sets the maximum number of points to keep on the plots ...
def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): """ Construct a new Stream object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.carpet.Stream` ...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "maxpoints", "=", "None", ",", "token", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Stream", ",", "self", ")", ".", "__init__", "(", "\"stream\"", ")", "if", "\"_paren...
[ 72, 4 ]
[ 139, 34 ]
python
en
['en', 'error', 'th']
False
PickledWidget.render
(self, name, value, attrs=None)
Display of the PickledField in django admin
Display of the PickledField in django admin
def render(self, name, value, attrs=None): """Display of the PickledField in django admin""" value = repr(value) try: # necessary to convert it back after repr(), otherwise validation errors will mutate it value = literal_eval(value) except ValueError: ...
[ "def", "render", "(", "self", ",", "name", ",", "value", ",", "attrs", "=", "None", ")", ":", "value", "=", "repr", "(", "value", ")", "try", ":", "# necessary to convert it back after repr(), otherwise validation errors will mutate it", "value", "=", "literal_eval"...
[ 121, 4 ]
[ 139, 33 ]
python
en
['en', 'af', 'en']
True
PickledObjectField.get_default
(self)
Returns the default value for this field. The default implementation on models.Field calls force_unicode on the default, which means you can't set arbitrary Python objects as the default. To fix this, we just return the value without calling force_unicode on it. Note that if yo...
Returns the default value for this field.
def get_default(self): """ Returns the default value for this field. The default implementation on models.Field calls force_unicode on the default, which means you can't set arbitrary Python objects as the default. To fix this, we just return the value without calling fo...
[ "def", "get_default", "(", "self", ")", ":", "if", "self", ".", "has_default", "(", ")", ":", "if", "callable", "(", "self", ".", "default", ")", ":", "return", "self", ".", "default", "(", ")", "return", "self", ".", "default", "# If the field doesn't h...
[ 190, 4 ]
[ 207, 60 ]
python
en
['en', 'error', 'th']
False
PickledObjectField.from_db_value
(self, value, *args)
B64decode and unpickle the object, optionally decompressing it. If an error is raised in de-pickling and we're sure the value is a definite pickle, the error is allowed to propagate. If we aren't sure if the value is a pickle or not, then we catch the error and return the origi...
B64decode and unpickle the object, optionally decompressing it.
def from_db_value(self, value, *args): """ B64decode and unpickle the object, optionally decompressing it. If an error is raised in de-pickling and we're sure the value is a definite pickle, the error is allowed to propagate. If we aren't sure if the value is a pickle or not, th...
[ "def", "from_db_value", "(", "self", ",", "value", ",", "*", "args", ")", ":", "if", "value", "is", "not", "None", ":", "try", ":", "value", "=", "dbsafe_decode", "(", "value", ",", "self", ".", "compress", ")", "except", "Exception", ":", "# If the va...
[ 210, 4 ]
[ 231, 20 ]
python
en
['en', 'error', 'th']
False