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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
BaseWireFormat.parse_message | (
self, context: InjectionContext, message_body: Union[str, bytes],
) |
Deserialize an incoming message and further populate the request context.
Args:
context: The injection context for settings and services
message_body: The body of the message
Returns:
A tuple of the parsed message and a message receipt instance
Rai... |
Deserialize an incoming message and further populate the request context. | async def parse_message(
self, context: InjectionContext, message_body: Union[str, bytes],
) -> Tuple[dict, MessageReceipt]:
"""
Deserialize an incoming message and further populate the request context.
Args:
context: The injection context for settings and services
... | [
"async",
"def",
"parse_message",
"(",
"self",
",",
"context",
":",
"InjectionContext",
",",
"message_body",
":",
"Union",
"[",
"str",
",",
"bytes",
"]",
",",
")",
"->",
"Tuple",
"[",
"dict",
",",
"MessageReceipt",
"]",
":"
] | [
24,
4
] | [
40,
11
] | python | en | ['en', 'error', 'th'] | False |
BaseWireFormat.encode_message | (
self,
context: InjectionContext,
message_json: Union[str, bytes],
recipient_keys: Sequence[str],
routing_keys: Sequence[str],
sender_key: str,
) |
Encode an outgoing message for transport.
Args:
context: The injection context for settings and services
message_json: The message body to serialize
recipient_keys: A sequence of recipient verkeys
routing_keys: A sequence of routing verkeys
s... |
Encode an outgoing message for transport. | async def encode_message(
self,
context: InjectionContext,
message_json: Union[str, bytes],
recipient_keys: Sequence[str],
routing_keys: Sequence[str],
sender_key: str,
) -> Union[str, bytes]:
"""
Encode an outgoing message for transport.
Args... | [
"async",
"def",
"encode_message",
"(",
"self",
",",
"context",
":",
"InjectionContext",
",",
"message_json",
":",
"Union",
"[",
"str",
",",
"bytes",
"]",
",",
"recipient_keys",
":",
"Sequence",
"[",
"str",
"]",
",",
"routing_keys",
":",
"Sequence",
"[",
"s... | [
43,
4
] | [
67,
11
] | python | en | ['en', 'error', 'th'] | False |
JsonWireFormat.parse_message | (
self, context: InjectionContext, message_body: Union[str, bytes],
) |
Deserialize an incoming message and further populate the request context.
Args:
context: The injection context for settings and services
message_body: The body of the message
Returns:
A tuple of the parsed message and a message receipt instance
Rai... |
Deserialize an incoming message and further populate the request context. | async def parse_message(
self, context: InjectionContext, message_body: Union[str, bytes],
) -> Tuple[dict, MessageReceipt]:
"""
Deserialize an incoming message and further populate the request context.
Args:
context: The injection context for settings and services
... | [
"async",
"def",
"parse_message",
"(",
"self",
",",
"context",
":",
"InjectionContext",
",",
"message_body",
":",
"Union",
"[",
"str",
",",
"bytes",
"]",
",",
")",
"->",
"Tuple",
"[",
"dict",
",",
"MessageReceipt",
"]",
":",
"receipt",
"=",
"MessageReceipt"... | [
74,
4
] | [
121,
36
] | python | en | ['en', 'error', 'th'] | False |
JsonWireFormat.encode_message | (
self,
context: InjectionContext,
message_json: Union[str, bytes],
recipient_keys: Sequence[str],
routing_keys: Sequence[str],
sender_key: str,
) |
Encode an outgoing message for transport.
Args:
context: The injection context for settings and services
message_json: The message body to serialize
recipient_keys: A sequence of recipient verkeys
routing_keys: A sequence of routing verkeys
s... |
Encode an outgoing message for transport. | async def encode_message(
self,
context: InjectionContext,
message_json: Union[str, bytes],
recipient_keys: Sequence[str],
routing_keys: Sequence[str],
sender_key: str,
) -> Union[str, bytes]:
"""
Encode an outgoing message for transport.
Args... | [
"async",
"def",
"encode_message",
"(",
"self",
",",
"context",
":",
"InjectionContext",
",",
"message_json",
":",
"Union",
"[",
"str",
",",
"bytes",
"]",
",",
"recipient_keys",
":",
"Sequence",
"[",
"str",
"]",
",",
"routing_keys",
":",
"Sequence",
"[",
"s... | [
124,
4
] | [
149,
27
] | python | en | ['en', 'error', 'th'] | False |
create_guest_account | (session) |
Creates a guest account/character for this session, if one is available.
Args:
session (Session): the session which will use the guest account/character.
Returns:
GUEST_ENABLED (boolean), account (Account):
the boolean is whether guest accounts are enabled at all.
... |
Creates a guest account/character for this session, if one is available. | def create_guest_account(session):
"""
Creates a guest account/character for this session, if one is available.
Args:
session (Session): the session which will use the guest account/character.
Returns:
GUEST_ENABLED (boolean), account (Account):
the boolean is whether guest... | [
"def",
"create_guest_account",
"(",
"session",
")",
":",
"# check if guests are enabled.",
"if",
"not",
"settings",
".",
"GUEST_ENABLED",
":",
"return",
"False",
",",
"None",
"# Check IP bans.",
"bans",
"=",
"ServerConfig",
".",
"objects",
".",
"conf",
"(",
"\"ser... | [
34,
0
] | [
88,
13
] | python | en | ['en', 'error', 'th'] | False |
create_normal_account | (session, name, password) |
Creates an account with the given name and password.
Args:
session (Session): the session which is requesting to create an account.
name (str): the name that the account wants to use for login.
password (str): the password desired by this account, for login.
Returns:
accou... |
Creates an account with the given name and password. | def create_normal_account(session, name, password):
"""
Creates an account with the given name and password.
Args:
session (Session): the session which is requesting to create an account.
name (str): the name that the account wants to use for login.
password (str): the password desi... | [
"def",
"create_normal_account",
"(",
"session",
",",
"name",
",",
"password",
")",
":",
"# check for too many login errors too quick.",
"address",
"=",
"session",
".",
"address",
"if",
"isinstance",
"(",
"address",
",",
"tuple",
")",
":",
"address",
"=",
"address"... | [
91,
0
] | [
137,
18
] | python | en | ['en', 'error', 'th'] | False |
_create_account | (session, accountname, password, permissions, typeclass=None, email=None) |
Helper function, creates an account of the specified typeclass.
|
Helper function, creates an account of the specified typeclass.
| def _create_account(session, accountname, password, permissions, typeclass=None, email=None):
"""
Helper function, creates an account of the specified typeclass.
"""
try:
new_account = create.create_account(accountname, email, password, permissions=permissions, typeclass=typeclass)
except E... | [
"def",
"_create_account",
"(",
"session",
",",
"accountname",
",",
"password",
",",
"permissions",
",",
"typeclass",
"=",
"None",
",",
"email",
"=",
"None",
")",
":",
"try",
":",
"new_account",
"=",
"create",
".",
"create_account",
"(",
"accountname",
",",
... | [
514,
0
] | [
536,
22
] | python | en | ['en', 'error', 'th'] | False |
_create_character | (session, new_account, typeclass, home, permissions) |
Helper function, creates a character based on an account's name.
This is meant for Guest and MULTISESSION_MODE < 2 situations.
|
Helper function, creates a character based on an account's name.
This is meant for Guest and MULTISESSION_MODE < 2 situations.
| def _create_character(session, new_account, typeclass, home, permissions):
"""
Helper function, creates a character based on an account's name.
This is meant for Guest and MULTISESSION_MODE < 2 situations.
"""
try:
new_character = create.create_object(typeclass, key=new_account.key, home=hom... | [
"def",
"_create_character",
"(",
"session",
",",
"new_account",
",",
"typeclass",
",",
"home",
",",
"permissions",
")",
":",
"try",
":",
"new_character",
"=",
"create",
".",
"create_object",
"(",
"typeclass",
",",
"key",
"=",
"new_account",
".",
"key",
",",
... | [
539,
0
] | [
560,
26
] | python | en | ['en', 'error', 'th'] | False |
CmdUnconnectedConnect.func | (self) |
Uses the Django admin api. Note that unlogged-in commands
have a unique position in that their func() receives
a session object instead of a source_object like all
other types of logged-in commands (this is because
there is no object yet before the account has logged in)
... |
Uses the Django admin api. Note that unlogged-in commands
have a unique position in that their func() receives
a session object instead of a source_object like all
other types of logged-in commands (this is because
there is no object yet before the account has logged in)
... | def func(self):
"""
Uses the Django admin api. Note that unlogged-in commands
have a unique position in that their func() receives
a session object instead of a source_object like all
other types of logged-in commands (this is because
there is no object yet before the acc... | [
"def",
"func",
"(",
"self",
")",
":",
"session",
"=",
"self",
".",
"caller",
"# check for too many login errors too quick.",
"address",
"=",
"session",
".",
"address",
"if",
"isinstance",
"(",
"address",
",",
"tuple",
")",
":",
"address",
"=",
"address",
"[",
... | [
157,
4
] | [
198,
58
] | python | en | ['en', 'error', 'th'] | False |
CmdUnconnectedCreate.func | (self) | Do checks and create account | Do checks and create account | def func(self):
"""Do checks and create account"""
session = self.caller
args = self.args.strip()
# Rate-limit account creation.
address = session.address
if isinstance(address, tuple):
address = address[0]
if CREATION_THROTTLE.check(address):
... | [
"def",
"func",
"(",
"self",
")",
":",
"session",
"=",
"self",
".",
"caller",
"args",
"=",
"self",
".",
"args",
".",
"strip",
"(",
")",
"# Rate-limit account creation.",
"address",
"=",
"session",
".",
"address",
"if",
"isinstance",
"(",
"address",
",",
"... | [
218,
4
] | [
313,
30
] | python | en | ['en', 'mi', 'en'] | True |
CmdUnconnectedQuit.func | (self) | Simply close the connection. | Simply close the connection. | def func(self):
"""Simply close the connection."""
session = self.caller
session.sessionhandler.disconnect(session, "Good bye! Disconnecting.") | [
"def",
"func",
"(",
"self",
")",
":",
"session",
"=",
"self",
".",
"caller",
"session",
".",
"sessionhandler",
".",
"disconnect",
"(",
"session",
",",
"\"Good bye! Disconnecting.\"",
")"
] | [
331,
4
] | [
334,
78
] | python | en | ['en', 'en', 'en'] | True |
CmdUnconnectedLook.func | (self) | Show the connect screen. | Show the connect screen. | def func(self):
"""Show the connect screen."""
connection_screen = utils.random_string_from_module(CONNECTION_SCREEN_MODULE)
if not connection_screen:
connection_screen = "No connection screen found. Please contact an admin."
self.caller.msg(connection_screen) | [
"def",
"func",
"(",
"self",
")",
":",
"connection_screen",
"=",
"utils",
".",
"random_string_from_module",
"(",
"CONNECTION_SCREEN_MODULE",
")",
"if",
"not",
"connection_screen",
":",
"connection_screen",
"=",
"\"No connection screen found. Please contact an admin.\"",
"sel... | [
353,
4
] | [
358,
42
] | python | en | ['en', 'en', 'en'] | True |
CmdUnconnectedEncoding.func | (self) |
Sets the encoding.
|
Sets the encoding.
| def func(self):
"""
Sets the encoding.
"""
if self.session is None:
return
sync = False
if 'clear' in self.switches:
# remove customization
old_encoding = self.session.protocol_flags.get("ENCODING", None)
if old_encoding:
... | [
"def",
"func",
"(",
"self",
")",
":",
"if",
"self",
".",
"session",
"is",
"None",
":",
"return",
"sync",
"=",
"False",
"if",
"'clear'",
"in",
"self",
".",
"switches",
":",
"# remove customization",
"old_encoding",
"=",
"self",
".",
"session",
".",
"proto... | [
427,
4
] | [
471,
39
] | python | en | ['en', 'error', 'th'] | False |
CmdUnconnectedScreenreader.func | (self) | Flips screenreader setting. | Flips screenreader setting. | def func(self):
"""Flips screenreader setting."""
new_setting = not self.session.protocol_flags.get("SCREENREADER", False)
self.session.protocol_flags["SCREENREADER"] = new_setting
string = "Screenreader mode turned |w%s|n." % ("on" if new_setting else "off")
self.caller.msg(stri... | [
"def",
"func",
"(",
"self",
")",
":",
"new_setting",
"=",
"not",
"self",
".",
"session",
".",
"protocol_flags",
".",
"get",
"(",
"\"SCREENREADER\"",
",",
"False",
")",
"self",
".",
"session",
".",
"protocol_flags",
"[",
"\"SCREENREADER\"",
"]",
"=",
"new_s... | [
487,
4
] | [
493,
69
] | python | en | ['en', 'no', 'en'] | True |
Title.font | (self) |
Sets this color bar's title font. Note that the title's font
used to be set by the now deprecated `titlefont` attribute.
The 'font' property is an instance of Font
that may be specified as:
- An instance of :class:`plotly.graph_objs.parcoords.line.colorbar.title.Font`
... |
Sets this color bar's title font. Note that the title's font
used to be set by the now deprecated `titlefont` attribute.
The 'font' property is an instance of Font
that may be specified as:
- An instance of :class:`plotly.graph_objs.parcoords.line.colorbar.title.Font`
... | def font(self):
"""
Sets this color bar's title font. Note that the title's font
used to be set by the now deprecated `titlefont` attribute.
The 'font' property is an instance of Font
that may be specified as:
- An instance of :class:`plotly.graph_objs.parcoords.li... | [
"def",
"font",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"font\"",
"]"
] | [
15,
4
] | [
53,
27
] | python | en | ['en', 'error', 'th'] | False |
Title.side | (self) |
Determines the location of color bar's title with respect to
the color bar. Note that the title's location used to be set by
the now deprecated `titleside` attribute.
The 'side' property is an enumeration that may be specified as:
- One of the following enumeration values... |
Determines the location of color bar's title with respect to
the color bar. Note that the title's location used to be set by
the now deprecated `titleside` attribute.
The 'side' property is an enumeration that may be specified as:
- One of the following enumeration values... | def side(self):
"""
Determines the location of color bar's title with respect to
the color bar. Note that the title's location used to be set by
the now deprecated `titleside` attribute.
The 'side' property is an enumeration that may be specified as:
- One of the f... | [
"def",
"side",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"side\"",
"]"
] | [
62,
4
] | [
76,
27
] | python | en | ['en', 'error', 'th'] | False |
Title.text | (self) |
Sets the title of the color bar. Note that before the existence
of `title.text`, the title's contents used to be defined as the
`title` attribute itself. This behavior has been deprecated.
The 'text' property is a string and must be specified as:
- A string
- A ... |
Sets the title of the color bar. Note that before the existence
of `title.text`, the title's contents used to be defined as the
`title` attribute itself. This behavior has been deprecated.
The 'text' property is a string and must be specified as:
- A string
- A ... | def text(self):
"""
Sets the title of the color bar. Note that before the existence
of `title.text`, the title's contents used to be defined as the
`title` attribute itself. This behavior has been deprecated.
The 'text' property is a string and must be specified as:
... | [
"def",
"text",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"text\"",
"]"
] | [
85,
4
] | [
99,
27
] | python | en | ['en', 'error', 'th'] | False |
Title.__init__ | (self, arg=None, font=None, side=None, text=None, **kwargs) |
Construct a new Title object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.parcoords.line
.colorbar.Title`
font
Sets this color bar's title font. ... |
Construct a new Title object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.parcoords.line
.colorbar.Title`
font
Sets this color bar's title font. ... | def __init__(self, arg=None, font=None, side=None, text=None, **kwargs):
"""
Construct a new Title object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.parcoords.line
... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"font",
"=",
"None",
",",
"side",
"=",
"None",
",",
"text",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"super",
"(",
"Title",
",",
"self",
")",
".",
"__init__",
"(",
"\"title\"",
... | [
126,
4
] | [
203,
34
] | python | en | ['en', 'error', 'th'] | False |
UnixCommandParser.__init__ | (self, prog, description="", epilog="", command=None, **kwargs) |
Build a UnixCommandParser with a link to the command using it.
Args:
prog (str): the program name (usually the command key).
description (str): a very brief line to show in the usage text.
epilog (str): the epilog to show below options.
command (Command)... |
Build a UnixCommandParser with a link to the command using it. | def __init__(self, prog, description="", epilog="", command=None, **kwargs):
"""
Build a UnixCommandParser with a link to the command using it.
Args:
prog (str): the program name (usually the command key).
description (str): a very brief line to show in the usage text.
... | [
"def",
"__init__",
"(",
"self",
",",
"prog",
",",
"description",
"=",
"\"\"",
",",
"epilog",
"=",
"\"\"",
",",
"command",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"prog",
"=",
"prog",
"or",
"command",
".",
"key",
"super",
"(",
"UnixCommandPars... | [
90,
4
] | [
125,
58
] | python | en | ['en', 'error', 'th'] | False |
UnixCommandParser.format_usage | (self) | Return the usage line.
Note:
This method is present to return the raw-escaped usage line,
in order to avoid unintentional color codes.
| Return the usage line. | def format_usage(self):
"""Return the usage line.
Note:
This method is present to return the raw-escaped usage line,
in order to avoid unintentional color codes.
"""
return raw(super(UnixCommandParser, self).format_usage()) | [
"def",
"format_usage",
"(",
"self",
")",
":",
"return",
"raw",
"(",
"super",
"(",
"UnixCommandParser",
",",
"self",
")",
".",
"format_usage",
"(",
")",
")"
] | [
127,
4
] | [
135,
65
] | python | en | ['en', 'bs', 'en'] | True |
UnixCommandParser.format_help | (self) | Return the parser help, including its epilog.
Note:
This method is present to return the raw-escaped help,
in order to avoid unintentional color codes. Color codes
in the epilog (the command docstring) are supported.
| Return the parser help, including its epilog. | def format_help(self):
"""Return the parser help, including its epilog.
Note:
This method is present to return the raw-escaped help,
in order to avoid unintentional color codes. Color codes
in the epilog (the command docstring) are supported.
"""
au... | [
"def",
"format_help",
"(",
"self",
")",
":",
"autohelp",
"=",
"raw",
"(",
"super",
"(",
"UnixCommandParser",
",",
"self",
")",
".",
"format_help",
"(",
")",
")",
"return",
"\"\\n\"",
"+",
"autohelp",
"+",
"\"\\n\"",
"+",
"self",
".",
"post_help"
] | [
137,
4
] | [
147,
54
] | python | en | ['en', 'da', 'en'] | True |
UnixCommandParser.print_usage | (self, file=None) | Print the usage to the caller.
Args:
file (file-object): not used here, the caller is used.
Note:
This method will override `argparse.ArgumentParser`'s in order
to not display the help on stdout or stderr, but to the
command's caller.
| Print the usage to the caller. | def print_usage(self, file=None):
"""Print the usage to the caller.
Args:
file (file-object): not used here, the caller is used.
Note:
This method will override `argparse.ArgumentParser`'s in order
to not display the help on stdout or stderr, but to the
... | [
"def",
"print_usage",
"(",
"self",
",",
"file",
"=",
"None",
")",
":",
"if",
"self",
".",
"command",
":",
"self",
".",
"command",
".",
"msg",
"(",
"self",
".",
"format_usage",
"(",
")",
".",
"strip",
"(",
")",
")"
] | [
149,
4
] | [
162,
57
] | python | en | ['en', 'en', 'en'] | True |
UnixCommandParser.print_help | (self, file=None) | Print the help to the caller.
Args:
file (file-object): not used here, the caller is used.
Note:
This method will override `argparse.ArgumentParser`'s in order
to not display the help on stdout or stderr, but to the
command's caller.
| Print the help to the caller. | def print_help(self, file=None):
"""Print the help to the caller.
Args:
file (file-object): not used here, the caller is used.
Note:
This method will override `argparse.ArgumentParser`'s in order
to not display the help on stdout or stderr, but to the
... | [
"def",
"print_help",
"(",
"self",
",",
"file",
"=",
"None",
")",
":",
"if",
"self",
".",
"command",
":",
"self",
".",
"command",
".",
"msg",
"(",
"self",
".",
"format_help",
"(",
")",
".",
"strip",
"(",
")",
")"
] | [
164,
4
] | [
177,
56
] | python | en | ['en', 'en', 'en'] | True |
HelpAction.__call__ | (self, parser, namespace, values, option_string=None) | If asked for help, display to the caller. | If asked for help, display to the caller. | def __call__(self, parser, namespace, values, option_string=None):
"""If asked for help, display to the caller."""
if parser.command:
parser.command.msg(parser.format_help().strip())
parser.exit(0, "") | [
"def",
"__call__",
"(",
"self",
",",
"parser",
",",
"namespace",
",",
"values",
",",
"option_string",
"=",
"None",
")",
":",
"if",
"parser",
".",
"command",
":",
"parser",
".",
"command",
".",
"msg",
"(",
"parser",
".",
"format_help",
"(",
")",
".",
... | [
190,
4
] | [
194,
30
] | python | en | ['en', 'en', 'en'] | True |
UnixCommand.__init__ | (self, **kwargs) |
The lockhandler works the same as for objects.
optional kwargs will be set as properties on the Command at runtime,
overloading evential same-named class properties.
|
The lockhandler works the same as for objects.
optional kwargs will be set as properties on the Command at runtime,
overloading evential same-named class properties. | def __init__(self, **kwargs):
"""
The lockhandler works the same as for objects.
optional kwargs will be set as properties on the Command at runtime,
overloading evential same-named class properties.
"""
super(UnixCommand, self).__init__(**kwargs)
# Create the e... | [
"def",
"__init__",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"super",
"(",
"UnixCommand",
",",
"self",
")",
".",
"__init__",
"(",
"*",
"*",
"kwargs",
")",
"# Create the empty UnixCommandParser, inheriting argparse.ArgumentParser",
"lines",
"=",
"dedent",
"... | [
229,
4
] | [
245,
26
] | python | en | ['en', 'error', 'th'] | False |
UnixCommand.init_parser | (self) |
Configure the argument parser, adding in options.
Note:
This method is to be overridden in order to add options
to the argument parser. Use `self.parser`, which contains
the `argparse.ArgumentParser`. You can, for instance,
use its `add_argument` metho... |
Configure the argument parser, adding in options. | def init_parser(self):
"""
Configure the argument parser, adding in options.
Note:
This method is to be overridden in order to add options
to the argument parser. Use `self.parser`, which contains
the `argparse.ArgumentParser`. You can, for instance,
... | [
"def",
"init_parser",
"(",
"self",
")",
":",
"pass"
] | [
247,
4
] | [
258,
12
] | python | en | ['en', 'error', 'th'] | False |
UnixCommand.func | (self) | Override to handle the command execution. | Override to handle the command execution. | def func(self):
"""Override to handle the command execution."""
pass | [
"def",
"func",
"(",
"self",
")",
":",
"pass"
] | [
260,
4
] | [
262,
12
] | python | en | ['en', 'en', 'en'] | True |
UnixCommand.get_help | (self, caller, cmdset) |
Return the help message for this command and this caller.
Args:
caller (Object or Player): the caller asking for help on the command.
cmdset (CmdSet): the command set (if you need additional commands).
Returns:
docstring (str): the help text to provide the ... |
Return the help message for this command and this caller. | def get_help(self, caller, cmdset):
"""
Return the help message for this command and this caller.
Args:
caller (Object or Player): the caller asking for help on the command.
cmdset (CmdSet): the command set (if you need additional commands).
Returns:
... | [
"def",
"get_help",
"(",
"self",
",",
"caller",
",",
"cmdset",
")",
":",
"return",
"self",
".",
"parser",
".",
"format_help",
"(",
")"
] | [
264,
4
] | [
276,
40
] | python | en | ['en', 'error', 'th'] | False |
UnixCommand.parse | (self) |
Process arguments provided in `self.args`.
Note:
You should not override this method. Consider overriding
`init_parser` instead.
|
Process arguments provided in `self.args`. | def parse(self):
"""
Process arguments provided in `self.args`.
Note:
You should not override this method. Consider overriding
`init_parser` instead.
"""
try:
self.opts = self.parser.parse_args(shlex.split(self.args))
except ParseErr... | [
"def",
"parse",
"(",
"self",
")",
":",
"try",
":",
"self",
".",
"opts",
"=",
"self",
".",
"parser",
".",
"parse_args",
"(",
"shlex",
".",
"split",
"(",
"self",
".",
"args",
")",
")",
"except",
"ParseError",
"as",
"err",
":",
"msg",
"=",
"str",
"(... | [
278,
4
] | [
293,
34
] | 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.bar.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.bar.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.bar.selected.Marker`
- A dict of string/value properties that will be passed
to the Marker constructor
Suppor... | [
"def",
"marker",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"marker\"",
"]"
] | [
15,
4
] | [
34,
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.bar.selected.Textfont`
- A dict of string/value properties that will be passed
to the Textfont constructor
Supported dict properties:
... |
The 'textfont' property is an instance of Textfont
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.selected.Textfont`
- A dict of string/value properties that will be passed
to the Textfont constructor
Supported dict properties:
... | def textfont(self):
"""
The 'textfont' property is an instance of Textfont
that may be specified as:
- An instance of :class:`plotly.graph_objs.bar.selected.Textfont`
- A dict of string/value properties that will be passed
to the Textfont constructor
... | [
"def",
"textfont",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"textfont\"",
"]"
] | [
43,
4
] | [
60,
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.bar.Selected`
marker
:class:`plotly.graph_objects.bar.selected.Marker`
... |
Construct a new Selected object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.bar.Selected`
marker
:class:`plotly.graph_objects.bar.selected.Marker`
... | 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.bar.Selected`
... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"marker",
"=",
"None",
",",
"textfont",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"super",
"(",
"Selected",
",",
"self",
")",
".",
"__init__",
"(",
"\"selected\"",
")",
"if",
"\"_p... | [
79,
4
] | [
143,
34
] | python | en | ['en', 'error', 'th'] | False |
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.ohlc.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.ohlc.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.ohlc.Stream`
ma... | [
"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 |
restart_scripts_after_flush | () | After instances are flushed, validate scripts so they're not dead for a long period of time | After instances are flushed, validate scripts so they're not dead for a long period of time | def restart_scripts_after_flush():
"""After instances are flushed, validate scripts so they're not dead for a long period of time"""
global FLUSHING_INSTANCES
ScriptDB.objects.validate()
FLUSHING_INSTANCES = False | [
"def",
"restart_scripts_after_flush",
"(",
")",
":",
"global",
"FLUSHING_INSTANCES",
"ScriptDB",
".",
"objects",
".",
"validate",
"(",
")",
"FLUSHING_INSTANCES",
"=",
"False"
] | [
24,
0
] | [
28,
30
] | python | en | ['en', 'en', 'en'] | True |
ExtendedLoopingCall.start | (self, interval, now=True, start_delay=None, count_start=0) |
Start running function every interval seconds.
This overloads the LoopingCall default by offering the
start_delay keyword and ability to repeat.
Args:
interval (int): Repeat interval in seconds.
now (bool, optional): Whether to start immediately or after
... |
Start running function every interval seconds. | def start(self, interval, now=True, start_delay=None, count_start=0):
"""
Start running function every interval seconds.
This overloads the LoopingCall default by offering the
start_delay keyword and ability to repeat.
Args:
interval (int): Repeat interval in second... | [
"def",
"start",
"(",
"self",
",",
"interval",
",",
"now",
"=",
"True",
",",
"start_delay",
"=",
"None",
",",
"count_start",
"=",
"0",
")",
":",
"assert",
"not",
"self",
".",
"running",
",",
"(",
"\"Tried to start an already running \"",
"\"ExtendedLoopingCall.... | [
40,
4
] | [
97,
23
] | python | en | ['en', 'error', 'th'] | False |
ExtendedLoopingCall.__call__ | (self) |
Tick one step. We update callcount (tracks number of calls) as
well as null start_delay (needed in order to correctly
estimate next_call_time at all times).
|
Tick one step. We update callcount (tracks number of calls) as
well as null start_delay (needed in order to correctly
estimate next_call_time at all times). | def __call__(self):
"""
Tick one step. We update callcount (tracks number of calls) as
well as null start_delay (needed in order to correctly
estimate next_call_time at all times).
"""
self.callcount += 1
if self.start_delay:
self.start_delay = None
... | [
"def",
"__call__",
"(",
"self",
")",
":",
"self",
".",
"callcount",
"+=",
"1",
"if",
"self",
".",
"start_delay",
":",
"self",
".",
"start_delay",
"=",
"None",
"self",
".",
"starttime",
"=",
"self",
".",
"clock",
".",
"seconds",
"(",
")",
"LoopingCall",... | [
99,
4
] | [
110,
34
] | python | en | ['en', 'error', 'th'] | False |
ExtendedLoopingCall.force_repeat | (self) |
Force-fire the callback
Raises:
AssertionError: When trying to force a task that is not
running.
|
Force-fire the callback | def force_repeat(self):
"""
Force-fire the callback
Raises:
AssertionError: When trying to force a task that is not
running.
"""
assert self.running, ("Tried to fire an ExtendedLoopingCall "
"that was not running.")
... | [
"def",
"force_repeat",
"(",
"self",
")",
":",
"assert",
"self",
".",
"running",
",",
"(",
"\"Tried to fire an ExtendedLoopingCall \"",
"\"that was not running.\"",
")",
"self",
".",
"call",
".",
"cancel",
"(",
")",
"self",
".",
"call",
"=",
"None",
"self",
"."... | [
112,
4
] | [
126,
14
] | python | en | ['en', 'error', 'th'] | False |
ExtendedLoopingCall.next_call_time | (self) |
Get the next call time. This also takes the eventual effect
of start_delay into account.
Returns:
next (int or None): The time in seconds until the next call. This
takes `start_delay` into account. Returns `None` if
the task is not running.
|
Get the next call time. This also takes the eventual effect
of start_delay into account. | def next_call_time(self):
"""
Get the next call time. This also takes the eventual effect
of start_delay into account.
Returns:
next (int or None): The time in seconds until the next call. This
takes `start_delay` into account. Returns `None` if
... | [
"def",
"next_call_time",
"(",
"self",
")",
":",
"if",
"self",
".",
"running",
":",
"total_runtime",
"=",
"self",
".",
"clock",
".",
"seconds",
"(",
")",
"-",
"self",
".",
"starttime",
"interval",
"=",
"self",
".",
"start_delay",
"or",
"self",
".",
"int... | [
128,
4
] | [
143,
19
] | python | en | ['en', 'error', 'th'] | False |
ScriptBase.__eq__ | (self, other) |
Compares two Scripts. Compares dbids.
Args:
other (Script): A script to compare with.
|
Compares two Scripts. Compares dbids. | def __eq__(self, other):
"""
Compares two Scripts. Compares dbids.
Args:
other (Script): A script to compare with.
"""
try:
return other.dbid == self.dbid
except Exception:
return False | [
"def",
"__eq__",
"(",
"self",
",",
"other",
")",
":",
"try",
":",
"return",
"other",
".",
"dbid",
"==",
"self",
".",
"dbid",
"except",
"Exception",
":",
"return",
"False"
] | [
154,
4
] | [
165,
24
] | python | en | ['en', 'error', 'th'] | False |
ScriptBase._start_task | (self) |
Start task runner.
|
Start task runner. | def _start_task(self):
"""
Start task runner.
"""
self.ndb._task = ExtendedLoopingCall(self._step_task)
if self.db._paused_time:
# the script was paused; restarting
callcount = self.db._paused_callcount or 0
self.ndb._task.start(self.db_inte... | [
"def",
"_start_task",
"(",
"self",
")",
":",
"self",
".",
"ndb",
".",
"_task",
"=",
"ExtendedLoopingCall",
"(",
"self",
".",
"_step_task",
")",
"if",
"self",
".",
"db",
".",
"_paused_time",
":",
"# the script was paused; restarting",
"callcount",
"=",
"self",
... | [
167,
4
] | [
187,
61
] | python | en | ['en', 'error', 'th'] | False |
ScriptBase._stop_task | (self) |
Stop task runner
|
Stop task runner | def _stop_task(self):
"""
Stop task runner
"""
task = self.ndb._task
if task and task.running:
task.stop() | [
"def",
"_stop_task",
"(",
"self",
")",
":",
"task",
"=",
"self",
".",
"ndb",
".",
"_task",
"if",
"task",
"and",
"task",
".",
"running",
":",
"task",
".",
"stop",
"(",
")"
] | [
189,
4
] | [
196,
23
] | python | en | ['en', 'error', 'th'] | False |
ScriptBase._step_errback | (self, e) |
Callback for runner errors
|
Callback for runner errors | def _step_errback(self, e):
"""
Callback for runner errors
"""
cname = self.__class__.__name__
estring = _("Script %(key)s(#%(dbid)s) of type '%(cname)s': at_repeat() error '%(err)s'.") % \
{"key": self.key, "dbid": self.dbid, "cname": cname,
"err": e.ge... | [
"def",
"_step_errback",
"(",
"self",
",",
"e",
")",
":",
"cname",
"=",
"self",
".",
"__class__",
".",
"__name__",
"estring",
"=",
"_",
"(",
"\"Script %(key)s(#%(dbid)s) of type '%(cname)s': at_repeat() error '%(err)s'.\"",
")",
"%",
"{",
"\"key\"",
":",
"self",
".... | [
198,
4
] | [
212,
31
] | python | en | ['en', 'error', 'th'] | False |
ScriptBase._step_callback | (self) |
Step task runner. No try..except needed due to defer wrap.
|
Step task runner. No try..except needed due to defer wrap. | def _step_callback(self):
"""
Step task runner. No try..except needed due to defer wrap.
"""
if not self.is_valid():
self.stop()
return
# call hook
self.at_repeat()
# check repeats
callcount = self.ndb._task.callcount
ma... | [
"def",
"_step_callback",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"is_valid",
"(",
")",
":",
"self",
".",
"stop",
"(",
")",
"return",
"# call hook",
"self",
".",
"at_repeat",
"(",
")",
"# check repeats",
"callcount",
"=",
"self",
".",
"ndb",
".... | [
214,
4
] | [
231,
23
] | python | en | ['en', 'error', 'th'] | False |
ScriptBase._step_task | (self) |
Step task. This groups error handling.
|
Step task. This groups error handling.
| def _step_task(self):
"""
Step task. This groups error handling.
"""
try:
return maybeDeferred(self._step_callback).addErrback(self._step_errback)
except Exception:
logger.log_trace()
return None | [
"def",
"_step_task",
"(",
"self",
")",
":",
"try",
":",
"return",
"maybeDeferred",
"(",
"self",
".",
"_step_callback",
")",
".",
"addErrback",
"(",
"self",
".",
"_step_errback",
")",
"except",
"Exception",
":",
"logger",
".",
"log_trace",
"(",
")",
"return... | [
233,
4
] | [
241,
19
] | python | en | ['en', 'error', 'th'] | False |
ScriptBase.at_script_creation | (self) |
Should be overridden in child.
|
Should be overridden in child. | def at_script_creation(self):
"""
Should be overridden in child.
"""
pass | [
"def",
"at_script_creation",
"(",
"self",
")",
":",
"pass"
] | [
243,
4
] | [
248,
12
] | python | en | ['en', 'error', 'th'] | False |
ScriptBase.at_first_save | (self, **kwargs) |
This is called after very first time this object is saved.
Generally, you don't need to overload this, but only the hooks
called by this method.
Args:
**kwargs (dict): Arbitrary, optional arguments for users
overriding the call (unused by default).
|
This is called after very first time this object is saved.
Generally, you don't need to overload this, but only the hooks
called by this method. | def at_first_save(self, **kwargs):
"""
This is called after very first time this object is saved.
Generally, you don't need to overload this, but only the hooks
called by this method.
Args:
**kwargs (dict): Arbitrary, optional arguments for users
over... | [
"def",
"at_first_save",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"self",
".",
"at_script_creation",
"(",
")",
"if",
"hasattr",
"(",
"self",
",",
"\"_createdict\"",
")",
":",
"# this will only be set if the utils.create_script",
"# function was used to create th... | [
250,
4
] | [
315,
20
] | python | en | ['en', 'error', 'th'] | False |
DefaultScript.at_script_creation | (self) |
Only called once, when script is first created.
|
Only called once, when script is first created. | def at_script_creation(self):
"""
Only called once, when script is first created.
"""
pass | [
"def",
"at_script_creation",
"(",
"self",
")",
":",
"pass"
] | [
326,
4
] | [
331,
12
] | python | en | ['en', 'error', 'th'] | False |
DefaultScript.time_until_next_repeat | (self) |
Get time until the script fires it `at_repeat` hook again.
Returns:
next (int): Time in seconds until the script runs again.
If not a timed script, return `None`.
Notes:
This hook is not used in any way by the script's stepping
system; it's ... |
Get time until the script fires it `at_repeat` hook again. | def time_until_next_repeat(self):
"""
Get time until the script fires it `at_repeat` hook again.
Returns:
next (int): Time in seconds until the script runs again.
If not a timed script, return `None`.
Notes:
This hook is not used in any way by th... | [
"def",
"time_until_next_repeat",
"(",
"self",
")",
":",
"task",
"=",
"self",
".",
"ndb",
".",
"_task",
"if",
"task",
":",
"try",
":",
"return",
"int",
"(",
"round",
"(",
"task",
".",
"next_call_time",
"(",
")",
")",
")",
"except",
"TypeError",
":",
"... | [
334,
4
] | [
354,
19
] | python | en | ['en', 'error', 'th'] | False |
DefaultScript.remaining_repeats | (self) |
Get the number of returning repeats for limited Scripts.
Returns:
remaining (int or `None`): The number of repeats
remaining until the Script stops. Returns `None`
if it has unlimited repeats.
|
Get the number of returning repeats for limited Scripts. | def remaining_repeats(self):
"""
Get the number of returning repeats for limited Scripts.
Returns:
remaining (int or `None`): The number of repeats
remaining until the Script stops. Returns `None`
if it has unlimited repeats.
"""
task... | [
"def",
"remaining_repeats",
"(",
"self",
")",
":",
"task",
"=",
"self",
".",
"ndb",
".",
"_task",
"if",
"task",
":",
"return",
"max",
"(",
"0",
",",
"self",
".",
"db_repeats",
"-",
"task",
".",
"callcount",
")",
"return",
"None"
] | [
356,
4
] | [
369,
19
] | python | en | ['en', 'error', 'th'] | False |
DefaultScript.at_idmapper_flush | (self) | If we're flushing this object, make sure the LoopingCall is gone too | If we're flushing this object, make sure the LoopingCall is gone too | def at_idmapper_flush(self):
"""If we're flushing this object, make sure the LoopingCall is gone too"""
ret = super(DefaultScript, self).at_idmapper_flush()
if ret and self.ndb._task:
try:
from twisted.internet import reactor
global FLUSHING_INSTANCES
... | [
"def",
"at_idmapper_flush",
"(",
"self",
")",
":",
"ret",
"=",
"super",
"(",
"DefaultScript",
",",
"self",
")",
".",
"at_idmapper_flush",
"(",
")",
"if",
"ret",
"and",
"self",
".",
"ndb",
".",
"_task",
":",
"try",
":",
"from",
"twisted",
".",
"internet... | [
371,
4
] | [
390,
18
] | python | en | ['en', 'en', 'en'] | True |
DefaultScript.start | (self, force_restart=False) |
Called every time the script is started (for persistent
scripts, this is usually once every server start)
Args:
force_restart (bool, optional): Normally an already
started script will not be started again. if
`force_restart=True`, the script will alw... |
Called every time the script is started (for persistent
scripts, this is usually once every server start) | def start(self, force_restart=False):
"""
Called every time the script is started (for persistent
scripts, this is usually once every server start)
Args:
force_restart (bool, optional): Normally an already
started script will not be started again. if
... | [
"def",
"start",
"(",
"self",
",",
"force_restart",
"=",
"False",
")",
":",
"if",
"self",
".",
"is_active",
"and",
"not",
"force_restart",
":",
"# The script is already running, but make sure we have a _task if this is after a cache flush",
"if",
"not",
"self",
".",
"ndb... | [
392,
4
] | [
451,
16
] | python | en | ['en', 'error', 'th'] | False |
DefaultScript.stop | (self, kill=False) |
Called to stop the script from running. This also deletes the
script.
Args:
kill (bool, optional): - Stop the script without
calling any relevant script hooks.
Returns:
result (int): 0 if the script failed to stop, 1 otherwise.
... |
Called to stop the script from running. This also deletes the
script. | def stop(self, kill=False):
"""
Called to stop the script from running. This also deletes the
script.
Args:
kill (bool, optional): - Stop the script without
calling any relevant script hooks.
Returns:
result (int): 0 if the script failed... | [
"def",
"stop",
"(",
"self",
",",
"kill",
"=",
"False",
")",
":",
"if",
"not",
"kill",
":",
"try",
":",
"self",
".",
"at_stop",
"(",
")",
"except",
"Exception",
":",
"logger",
".",
"log_trace",
"(",
")",
"self",
".",
"_stop_task",
"(",
")",
"try",
... | [
453,
4
] | [
480,
16
] | python | en | ['en', 'error', 'th'] | False |
DefaultScript.pause | (self, manual_pause=True) |
This stops a running script and stores its active state.
It WILL NOT call the `at_stop()` hook.
|
This stops a running script and stores its active state.
It WILL NOT call the `at_stop()` hook. | def pause(self, manual_pause=True):
"""
This stops a running script and stores its active state.
It WILL NOT call the `at_stop()` hook.
"""
self.db._manual_pause = manual_pause
if not self.db._paused_time:
# only allow pause if not already paused
... | [
"def",
"pause",
"(",
"self",
",",
"manual_pause",
"=",
"True",
")",
":",
"self",
".",
"db",
".",
"_manual_pause",
"=",
"manual_pause",
"if",
"not",
"self",
".",
"db",
".",
"_paused_time",
":",
"# only allow pause if not already paused",
"task",
"=",
"self",
... | [
482,
4
] | [
496,
34
] | python | en | ['en', 'error', 'th'] | False |
DefaultScript.unpause | (self, manual_unpause=True) |
Restart a paused script. This WILL call the `at_start()` hook.
Args:
manual_unpause (bool, optional): This is False if unpause is
called by the server reload/reset mechanism.
Returns:
result (bool): True if unpause was triggered, False otherwise.
... |
Restart a paused script. This WILL call the `at_start()` hook. | def unpause(self, manual_unpause=True):
"""
Restart a paused script. This WILL call the `at_start()` hook.
Args:
manual_unpause (bool, optional): This is False if unpause is
called by the server reload/reset mechanism.
Returns:
result (bool): True... | [
"def",
"unpause",
"(",
"self",
",",
"manual_unpause",
"=",
"True",
")",
":",
"if",
"not",
"manual_unpause",
"and",
"self",
".",
"db",
".",
"_manual_pause",
":",
"# if this script was paused manually (by a direct call of pause),",
"# it cannot be automatically unpaused (e.g.... | [
498,
4
] | [
533,
23
] | python | en | ['en', 'error', 'th'] | False |
DefaultScript.restart | (self, interval=None, repeats=None, start_delay=None) |
Restarts an already existing/running Script from the
beginning, optionally using different settings. This will
first call the stop hooks, and then the start hooks again.
Args:
interval (int, optional): Allows for changing the interval
of the Script. Given in... |
Restarts an already existing/running Script from the
beginning, optionally using different settings. This will
first call the stop hooks, and then the start hooks again. | def restart(self, interval=None, repeats=None, start_delay=None):
"""
Restarts an already existing/running Script from the
beginning, optionally using different settings. This will
first call the stop hooks, and then the start hooks again.
Args:
interval (int, option... | [
"def",
"restart",
"(",
"self",
",",
"interval",
"=",
"None",
",",
"repeats",
"=",
"None",
",",
"start_delay",
"=",
"None",
")",
":",
"try",
":",
"self",
".",
"at_stop",
"(",
")",
"except",
"Exception",
":",
"logger",
".",
"log_trace",
"(",
")",
"self... | [
535,
4
] | [
568,
20
] | python | en | ['en', 'error', 'th'] | False |
DefaultScript.reset_callcount | (self, value=0) |
Reset the count of the number of calls done.
Args:
value (int, optional): The repeat value to reset to. Default
is to set it all the way back to 0.
Notes:
This is only useful if repeats != 0.
|
Reset the count of the number of calls done. | def reset_callcount(self, value=0):
"""
Reset the count of the number of calls done.
Args:
value (int, optional): The repeat value to reset to. Default
is to set it all the way back to 0.
Notes:
This is only useful if repeats != 0.
"""
... | [
"def",
"reset_callcount",
"(",
"self",
",",
"value",
"=",
"0",
")",
":",
"task",
"=",
"self",
".",
"ndb",
".",
"_task",
"if",
"task",
":",
"task",
".",
"callcount",
"=",
"max",
"(",
"0",
",",
"int",
"(",
"value",
")",
")"
] | [
570,
4
] | [
584,
47
] | python | en | ['en', 'error', 'th'] | False |
DefaultScript.force_repeat | (self) |
Fire a premature triggering of the script callback. This
will reset the timer and count down repeats as if the script
had fired normally.
|
Fire a premature triggering of the script callback. This
will reset the timer and count down repeats as if the script
had fired normally.
| def force_repeat(self):
"""
Fire a premature triggering of the script callback. This
will reset the timer and count down repeats as if the script
had fired normally.
"""
task = self.ndb._task
if task:
task.force_repeat() | [
"def",
"force_repeat",
"(",
"self",
")",
":",
"task",
"=",
"self",
".",
"ndb",
".",
"_task",
"if",
"task",
":",
"task",
".",
"force_repeat",
"(",
")"
] | [
586,
4
] | [
594,
31
] | python | en | ['en', 'error', 'th'] | False |
DefaultScript.is_valid | (self) |
Is called to check if the script is valid to run at this time.
Should return a boolean. The method is assumed to collect all
needed information from its related self.obj.
|
Is called to check if the script is valid to run at this time.
Should return a boolean. The method is assumed to collect all
needed information from its related self.obj. | def is_valid(self):
"""
Is called to check if the script is valid to run at this time.
Should return a boolean. The method is assumed to collect all
needed information from its related self.obj.
"""
return not self._is_deleted | [
"def",
"is_valid",
"(",
"self",
")",
":",
"return",
"not",
"self",
".",
"_is_deleted"
] | [
596,
4
] | [
603,
35
] | python | en | ['en', 'error', 'th'] | False |
DefaultScript.at_start | (self, **kwargs) |
Called whenever the script is started, which for persistent
scripts is at least once every server start. It will also be
called when starting again after a pause (such as after a
server reload)
Args:
**kwargs (dict): Arbitrary, optional arguments for users
... |
Called whenever the script is started, which for persistent
scripts is at least once every server start. It will also be
called when starting again after a pause (such as after a
server reload) | def at_start(self, **kwargs):
"""
Called whenever the script is started, which for persistent
scripts is at least once every server start. It will also be
called when starting again after a pause (such as after a
server reload)
Args:
**kwargs (dict): Arbitrar... | [
"def",
"at_start",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"pass"
] | [
605,
4
] | [
617,
12
] | python | en | ['en', 'error', 'th'] | False |
DefaultScript.at_repeat | (self, **kwargs) |
Called repeatedly if this Script is set to repeat regularly.
Args:
**kwargs (dict): Arbitrary, optional arguments for users
overriding the call (unused by default).
|
Called repeatedly if this Script is set to repeat regularly. | def at_repeat(self, **kwargs):
"""
Called repeatedly if this Script is set to repeat regularly.
Args:
**kwargs (dict): Arbitrary, optional arguments for users
overriding the call (unused by default).
"""
pass | [
"def",
"at_repeat",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"pass"
] | [
619,
4
] | [
628,
12
] | python | en | ['en', 'error', 'th'] | False |
DefaultScript.at_stop | (self, **kwargs) |
Called whenever when it's time for this script to stop (either
because is_valid returned False or it runs out of iterations)
Args
**kwargs (dict): Arbitrary, optional arguments for users
overriding the call (unused by default).
|
Called whenever when it's time for this script to stop (either
because is_valid returned False or it runs out of iterations) | def at_stop(self, **kwargs):
"""
Called whenever when it's time for this script to stop (either
because is_valid returned False or it runs out of iterations)
Args
**kwargs (dict): Arbitrary, optional arguments for users
overriding the call (unused by default)... | [
"def",
"at_stop",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"pass"
] | [
630,
4
] | [
640,
12
] | python | en | ['en', 'error', 'th'] | False |
DefaultScript.at_server_reload | (self) |
This hook is called whenever the server is shutting down for
restart/reboot. If you want to, for example, save
non-persistent properties across a restart, this is the place
to do it.
|
This hook is called whenever the server is shutting down for
restart/reboot. If you want to, for example, save
non-persistent properties across a restart, this is the place
to do it.
| def at_server_reload(self):
"""
This hook is called whenever the server is shutting down for
restart/reboot. If you want to, for example, save
non-persistent properties across a restart, this is the place
to do it.
"""
pass | [
"def",
"at_server_reload",
"(",
"self",
")",
":",
"pass"
] | [
642,
4
] | [
649,
12
] | python | en | ['en', 'error', 'th'] | False |
DefaultScript.at_server_shutdown | (self) |
This hook is called whenever the server is shutting down fully
(i.e. not for a restart).
|
This hook is called whenever the server is shutting down fully
(i.e. not for a restart).
| def at_server_shutdown(self):
"""
This hook is called whenever the server is shutting down fully
(i.e. not for a restart).
"""
pass | [
"def",
"at_server_shutdown",
"(",
"self",
")",
":",
"pass"
] | [
651,
4
] | [
656,
12
] | python | en | ['en', 'error', 'th'] | False |
DoNothing.at_script_creation | (self) |
Setup the script
|
Setup the script
| def at_script_creation(self):
"""
Setup the script
"""
self.key = "sys_do_nothing"
self.desc = "This is an empty placeholder script." | [
"def",
"at_script_creation",
"(",
"self",
")",
":",
"self",
".",
"key",
"=",
"\"sys_do_nothing\"",
"self",
".",
"desc",
"=",
"\"This is an empty placeholder script.\""
] | [
666,
4
] | [
671,
58
] | python | en | ['en', 'error', 'th'] | False |
Store.at_script_creation | (self) |
Setup the script
|
Setup the script
| def at_script_creation(self):
"""
Setup the script
"""
self.key = "sys_storage"
self.desc = "This is a generic storage container." | [
"def",
"at_script_creation",
"(",
"self",
")",
":",
"self",
".",
"key",
"=",
"\"sys_storage\"",
"self",
".",
"desc",
"=",
"\"This is a generic storage container.\""
] | [
679,
4
] | [
684,
58
] | python | en | ['en', 'error', 'th'] | False |
Header.align | (self) |
Sets the horizontal alignment of the `text` within the box. Has
an effect only if `text` spans two or more lines (i.e. `text`
contains one or more <br> HTML tags) or if an explicit width is
set to override the text width.
The 'align' property is an enumeration that may be s... |
Sets the horizontal alignment of the `text` within the box. Has
an effect only if `text` spans two or more lines (i.e. `text`
contains one or more <br> HTML tags) or if an explicit width is
set to override the text width.
The 'align' property is an enumeration that may be s... | def align(self):
"""
Sets the horizontal alignment of the `text` within the box. Has
an effect only if `text` spans two or more lines (i.e. `text`
contains one or more <br> HTML tags) or if an explicit width is
set to override the text width.
The 'align' property is ... | [
"def",
"align",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"align\"",
"]"
] | [
30,
4
] | [
46,
28
] | python | en | ['en', 'error', 'th'] | False |
Header.alignsrc | (self) |
Sets the source reference on Chart Studio Cloud for align .
The 'alignsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for align .
The 'alignsrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def alignsrc(self):
"""
Sets the source reference on Chart Studio Cloud for align .
The 'alignsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["alignsrc"] | [
"def",
"alignsrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"alignsrc\"",
"]"
] | [
55,
4
] | [
66,
31
] | python | en | ['en', 'error', 'th'] | False |
Header.fill | (self) |
The 'fill' property is an instance of Fill
that may be specified as:
- An instance of :class:`plotly.graph_objs.table.header.Fill`
- A dict of string/value properties that will be passed
to the Fill constructor
Supported dict properties:
... |
The 'fill' property is an instance of Fill
that may be specified as:
- An instance of :class:`plotly.graph_objs.table.header.Fill`
- A dict of string/value properties that will be passed
to the Fill constructor
Supported dict properties:
... | def fill(self):
"""
The 'fill' property is an instance of Fill
that may be specified as:
- An instance of :class:`plotly.graph_objs.table.header.Fill`
- A dict of string/value properties that will be passed
to the Fill constructor
Supported dict p... | [
"def",
"fill",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"fill\"",
"]"
] | [
75,
4
] | [
97,
27
] | python | en | ['en', 'error', 'th'] | False |
Header.font | (self) |
The 'font' property is an instance of Font
that may be specified as:
- An instance of :class:`plotly.graph_objs.table.header.Font`
- A dict of string/value properties that will be passed
to the Font constructor
Supported dict properties:
... |
The 'font' property is an instance of Font
that may be specified as:
- An instance of :class:`plotly.graph_objs.table.header.Font`
- A dict of string/value properties that will be passed
to the Font constructor
Supported dict properties:
... | def font(self):
"""
The 'font' property is an instance of Font
that may be specified as:
- An instance of :class:`plotly.graph_objs.table.header.Font`
- A dict of string/value properties that will be passed
to the Font constructor
Supported dict p... | [
"def",
"font",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"font\"",
"]"
] | [
106,
4
] | [
151,
27
] | python | en | ['en', 'error', 'th'] | False |
Header.format | (self) |
Sets the cell value formatting rule using d3 formatting mini-
language which is similar to those of Python. See
https://github.com/d3/d3-3.x-api-
reference/blob/master/Formatting.md#d3_format
The 'format' property is an array that may be specified as a tuple,
list, ... |
Sets the cell value formatting rule using d3 formatting mini-
language which is similar to those of Python. See
https://github.com/d3/d3-3.x-api-
reference/blob/master/Formatting.md#d3_format
The 'format' property is an array that may be specified as a tuple,
list, ... | def format(self):
"""
Sets the cell value formatting rule using d3 formatting mini-
language which is similar to those of Python. See
https://github.com/d3/d3-3.x-api-
reference/blob/master/Formatting.md#d3_format
The 'format' property is an array that may be specifi... | [
"def",
"format",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"format\"",
"]"
] | [
160,
4
] | [
174,
29
] | python | en | ['en', 'error', 'th'] | False |
Header.formatsrc | (self) |
Sets the source reference on Chart Studio Cloud for format .
The 'formatsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for format .
The 'formatsrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def formatsrc(self):
"""
Sets the source reference on Chart Studio Cloud for format .
The 'formatsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["formatsrc"] | [
"def",
"formatsrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"formatsrc\"",
"]"
] | [
183,
4
] | [
194,
32
] | python | en | ['en', 'error', 'th'] | False |
Header.height | (self) |
The height of cells.
The 'height' property is a number and may be specified as:
- An int or float
Returns
-------
int|float
|
The height of cells.
The 'height' property is a number and may be specified as:
- An int or float | def height(self):
"""
The height of cells.
The 'height' property is a number and may be specified as:
- An int or float
Returns
-------
int|float
"""
return self["height"] | [
"def",
"height",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"height\"",
"]"
] | [
203,
4
] | [
214,
29
] | python | en | ['en', 'error', 'th'] | False |
Header.line | (self) |
The 'line' property is an instance of Line
that may be specified as:
- An instance of :class:`plotly.graph_objs.table.header.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.table.header.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.table.header.Line`
- A dict of string/value properties that will be passed
to the Line constructor
Supported dict p... | [
"def",
"line",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"line\"",
"]"
] | [
223,
4
] | [
248,
27
] | python | en | ['en', 'error', 'th'] | False |
Header.prefix | (self) |
Prefix for cell values.
The 'prefix' property is a string and must be specified as:
- A string
- A number that will be converted to a string
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
str|numpy.ndarray
... |
Prefix for cell values.
The 'prefix' property is a string and must be specified as:
- A string
- A number that will be converted to a string
- A tuple, list, or one-dimensional numpy array of the above | def prefix(self):
"""
Prefix for cell values.
The 'prefix' property is a string and must be specified as:
- A string
- A number that will be converted to a string
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
... | [
"def",
"prefix",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"prefix\"",
"]"
] | [
257,
4
] | [
270,
29
] | python | en | ['en', 'error', 'th'] | False |
Header.prefixsrc | (self) |
Sets the source reference on Chart Studio Cloud for prefix .
The 'prefixsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for prefix .
The 'prefixsrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def prefixsrc(self):
"""
Sets the source reference on Chart Studio Cloud for prefix .
The 'prefixsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["prefixsrc"] | [
"def",
"prefixsrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"prefixsrc\"",
"]"
] | [
279,
4
] | [
290,
32
] | python | en | ['en', 'error', 'th'] | False |
Header.suffix | (self) |
Suffix for cell values.
The 'suffix' property is a string and must be specified as:
- A string
- A number that will be converted to a string
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
str|numpy.ndarray
... |
Suffix for cell values.
The 'suffix' property is a string and must be specified as:
- A string
- A number that will be converted to a string
- A tuple, list, or one-dimensional numpy array of the above | def suffix(self):
"""
Suffix for cell values.
The 'suffix' property is a string and must be specified as:
- A string
- A number that will be converted to a string
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
... | [
"def",
"suffix",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"suffix\"",
"]"
] | [
299,
4
] | [
312,
29
] | python | en | ['en', 'error', 'th'] | False |
Header.suffixsrc | (self) |
Sets the source reference on Chart Studio Cloud for suffix .
The 'suffixsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for suffix .
The 'suffixsrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def suffixsrc(self):
"""
Sets the source reference on Chart Studio Cloud for suffix .
The 'suffixsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["suffixsrc"] | [
"def",
"suffixsrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"suffixsrc\"",
"]"
] | [
321,
4
] | [
332,
32
] | python | en | ['en', 'error', 'th'] | False |
Header.values | (self) |
Header cell values. `values[m][n]` represents the value of the
`n`th point in column `m`, therefore the `values[m]` vector
length for all columns must be the same (longer vectors will be
truncated). Each value must be a finite number or a string.
The 'values' property is an... |
Header cell values. `values[m][n]` represents the value of the
`n`th point in column `m`, therefore the `values[m]` vector
length for all columns must be the same (longer vectors will be
truncated). Each value must be a finite number or a string.
The 'values' property is an... | def values(self):
"""
Header cell values. `values[m][n]` represents the value of the
`n`th point in column `m`, therefore the `values[m]` vector
length for all columns must be the same (longer vectors will be
truncated). Each value must be a finite number or a string.
... | [
"def",
"values",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"values\"",
"]"
] | [
341,
4
] | [
355,
29
] | python | en | ['en', 'error', 'th'] | False |
Header.valuessrc | (self) |
Sets the source reference on Chart Studio Cloud for values .
The 'valuessrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for values .
The 'valuessrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def valuessrc(self):
"""
Sets the source reference on Chart Studio Cloud for values .
The 'valuessrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["valuessrc"] | [
"def",
"valuessrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"valuessrc\"",
"]"
] | [
364,
4
] | [
375,
32
] | python | en | ['en', 'error', 'th'] | False |
Header.__init__ | (
self,
arg=None,
align=None,
alignsrc=None,
fill=None,
font=None,
format=None,
formatsrc=None,
height=None,
line=None,
prefix=None,
prefixsrc=None,
suffix=None,
suffixsrc=None,
values=None,
v... |
Construct a new Header object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.table.Header`
align
Sets the horizontal alignment of the `text` within the
... |
Construct a new Header object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.table.Header`
align
Sets the horizontal alignment of the `text` within the
... | def __init__(
self,
arg=None,
align=None,
alignsrc=None,
fill=None,
font=None,
format=None,
formatsrc=None,
height=None,
line=None,
prefix=None,
prefixsrc=None,
suffix=None,
suffixsrc=None,
values=Non... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"align",
"=",
"None",
",",
"alignsrc",
"=",
"None",
",",
"fill",
"=",
"None",
",",
"font",
"=",
"None",
",",
"format",
"=",
"None",
",",
"formatsrc",
"=",
"None",
",",
"height",
"=",
"... | [
435,
4
] | [
606,
34
] | python | en | ['en', 'error', 'th'] | False |
canopy_heat_capacity | (states: ClimateStates) | The heat capacity of the canopy
Equation 8.20
:return: [J K^(-1) m^(-2)]
| The heat capacity of the canopy
Equation 8.20 | def canopy_heat_capacity(states: ClimateStates) -> float:
"""The heat capacity of the canopy
Equation 8.20
:return: [J K^(-1) m^(-2)]
"""
return CAP_LEAF * states.leaf_area_index | [
"def",
"canopy_heat_capacity",
"(",
"states",
":",
"ClimateStates",
")",
"->",
"float",
":",
"return",
"CAP_LEAF",
"*",
"states",
".",
"leaf_area_index"
] | [
7,
0
] | [
13,
44
] | python | en | ['en', 'mg', 'en'] | True |
internal_external_canopy_heat_capacity | (lumped_cover_heat_capacity: float) | The heat capacity of the canopy
Equation 8.21
:param lumped_cover_heat_capacity: the total heat capacity of the lumped cover
:return: [J K^(-1) m^(-2)]
| The heat capacity of the canopy
Equation 8.21 | def internal_external_canopy_heat_capacity(lumped_cover_heat_capacity: float) -> float:
"""The heat capacity of the canopy
Equation 8.21
:param lumped_cover_heat_capacity: the total heat capacity of the lumped cover
:return: [J K^(-1) m^(-2)]
"""
return 0.1 * lumped_cover_heat_capacity | [
"def",
"internal_external_canopy_heat_capacity",
"(",
"lumped_cover_heat_capacity",
":",
"float",
")",
"->",
"float",
":",
"return",
"0.1",
"*",
"lumped_cover_heat_capacity"
] | [
16,
0
] | [
23,
43
] | python | en | ['en', 'mg', 'en'] | True |
remaining_object_heat_capacity | (height_obj, density_obj, heat_cap_obj) |
Equation 8.23
Args:
height_obj: mean height of the greenhouse object [m]
density_obj: density of the greenhouse object [kg m-3]
heat_cap_obj: specific heat capacity of the object [J K-1 kg-1]
Returns: [J K^-1 m^-2]
|
Equation 8.23
Args:
height_obj: mean height of the greenhouse object [m]
density_obj: density of the greenhouse object [kg m-3]
heat_cap_obj: specific heat capacity of the object [J K-1 kg-1] | def remaining_object_heat_capacity(height_obj, density_obj, heat_cap_obj):
"""
Equation 8.23
Args:
height_obj: mean height of the greenhouse object [m]
density_obj: density of the greenhouse object [kg m-3]
heat_cap_obj: specific heat capacity of the object [J K-1 kg-1]
Returns:... | [
"def",
"remaining_object_heat_capacity",
"(",
"height_obj",
",",
"density_obj",
",",
"heat_cap_obj",
")",
":",
"return",
"height_obj",
"*",
"density_obj",
"*",
"heat_cap_obj"
] | [
41,
0
] | [
51,
50
] | python | en | ['en', 'error', 'th'] | False |
Hoverlabel.align | (self) |
Sets the horizontal alignment of the text content within hover
label box. Has an effect only if the hover label text spans
more two or more lines
The 'align' property is an enumeration that may be specified as:
- One of the following enumeration values:
['... |
Sets the horizontal alignment of the text content within hover
label box. Has an effect only if the hover label text spans
more two or more lines
The 'align' property is an enumeration that may be specified as:
- One of the following enumeration values:
['... | def align(self):
"""
Sets the horizontal alignment of the text content within hover
label box. Has an effect only if the hover label text spans
more two or more lines
The 'align' property is an enumeration that may be specified as:
- One of the following enumeratio... | [
"def",
"align",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"align\"",
"]"
] | [
25,
4
] | [
40,
28
] | python | en | ['en', 'error', 'th'] | False |
Hoverlabel.alignsrc | (self) |
Sets the source reference on Chart Studio Cloud for align .
The 'alignsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for align .
The 'alignsrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def alignsrc(self):
"""
Sets the source reference on Chart Studio Cloud for align .
The 'alignsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["alignsrc"] | [
"def",
"alignsrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"alignsrc\"",
"]"
] | [
49,
4
] | [
60,
31
] | python | en | ['en', 'error', 'th'] | False |
Hoverlabel.bgcolor | (self) |
Sets the background color of the hover labels for this trace
The 'bgcolor' 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 str... |
Sets the background color of the hover labels for this trace
The 'bgcolor' 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 str... | def bgcolor(self):
"""
Sets the background color of the hover labels for this trace
The 'bgcolor' 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%)... | [
"def",
"bgcolor",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"bgcolor\"",
"]"
] | [
69,
4
] | [
120,
30
] | python | en | ['en', 'error', 'th'] | False |
Hoverlabel.bgcolorsrc | (self) |
Sets the source reference on Chart Studio Cloud for bgcolor .
The 'bgcolorsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for bgcolor .
The 'bgcolorsrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def bgcolorsrc(self):
"""
Sets the source reference on Chart Studio Cloud for bgcolor .
The 'bgcolorsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["bgcolorsrc"] | [
"def",
"bgcolorsrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"bgcolorsrc\"",
"]"
] | [
129,
4
] | [
140,
33
] | python | en | ['en', 'error', 'th'] | False |
Hoverlabel.bordercolor | (self) |
Sets the border color of the hover labels for this trace.
The 'bordercolor' 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 st... |
Sets the border color of the hover labels for this trace.
The 'bordercolor' 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 st... | def bordercolor(self):
"""
Sets the border color of the hover labels for this trace.
The 'bordercolor' 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%... | [
"def",
"bordercolor",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"bordercolor\"",
"]"
] | [
149,
4
] | [
200,
34
] | python | en | ['en', 'error', 'th'] | False |
Hoverlabel.bordercolorsrc | (self) |
Sets the source reference on Chart Studio Cloud for
bordercolor .
The 'bordercolorsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for
bordercolor .
The 'bordercolorsrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def bordercolorsrc(self):
"""
Sets the source reference on Chart Studio Cloud for
bordercolor .
The 'bordercolorsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["bo... | [
"def",
"bordercolorsrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"bordercolorsrc\"",
"]"
] | [
209,
4
] | [
221,
37
] | python | en | ['en', 'error', 'th'] | False |
Hoverlabel.font | (self) |
Sets the font used in hover labels.
The 'font' property is an instance of Font
that may be specified as:
- An instance of :class:`plotly.graph_objs.pie.hoverlabel.Font`
- A dict of string/value properties that will be passed
to the Font constructor
... |
Sets the font used in hover labels.
The 'font' property is an instance of Font
that may be specified as:
- An instance of :class:`plotly.graph_objs.pie.hoverlabel.Font`
- A dict of string/value properties that will be passed
to the Font constructor
... | def font(self):
"""
Sets the font used in hover labels.
The 'font' property is an instance of Font
that may be specified as:
- An instance of :class:`plotly.graph_objs.pie.hoverlabel.Font`
- A dict of string/value properties that will be passed
to the... | [
"def",
"font",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"font\"",
"]"
] | [
230,
4
] | [
277,
27
] | python | en | ['en', 'error', 'th'] | False |
Hoverlabel.namelength | (self) |
Sets the default length (in number of characters) of the trace
name in the hover labels for all traces. -1 shows the whole
name regardless of length. 0-3 shows the first 0-3 characters,
and an integer >3 will show the whole name if it is less than
that many characters, but if it... |
Sets the default length (in number of characters) of the trace
name in the hover labels for all traces. -1 shows the whole
name regardless of length. 0-3 shows the first 0-3 characters,
and an integer >3 will show the whole name if it is less than
that many characters, but if it... | def namelength(self):
"""
Sets the default length (in number of characters) of the trace
name in the hover labels for all traces. -1 shows the whole
name regardless of length. 0-3 shows the first 0-3 characters,
and an integer >3 will show the whole name if it is less than
... | [
"def",
"namelength",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"namelength\"",
"]"
] | [
286,
4
] | [
304,
33
] | python | en | ['en', 'error', 'th'] | False |
Hoverlabel.namelengthsrc | (self) |
Sets the source reference on Chart Studio Cloud for namelength
.
The 'namelengthsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for namelength
.
The 'namelengthsrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def namelengthsrc(self):
"""
Sets the source reference on Chart Studio Cloud for namelength
.
The 'namelengthsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["name... | [
"def",
"namelengthsrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"namelengthsrc\"",
"]"
] | [
313,
4
] | [
325,
36
] | python | en | ['en', 'error', 'th'] | False |
Hoverlabel.__init__ | (
self,
arg=None,
align=None,
alignsrc=None,
bgcolor=None,
bgcolorsrc=None,
bordercolor=None,
bordercolorsrc=None,
font=None,
namelength=None,
namelengthsrc=None,
**kwargs
) |
Construct a new Hoverlabel object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.pie.Hoverlabel`
align
Sets the horizontal alignment of the text co... |
Construct a new Hoverlabel object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.pie.Hoverlabel`
align
Sets the horizontal alignment of the text co... | def __init__(
self,
arg=None,
align=None,
alignsrc=None,
bgcolor=None,
bgcolorsrc=None,
bordercolor=None,
bordercolorsrc=None,
font=None,
namelength=None,
namelengthsrc=None,
**kwargs
):
"""
Construct a n... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"align",
"=",
"None",
",",
"alignsrc",
"=",
"None",
",",
"bgcolor",
"=",
"None",
",",
"bgcolorsrc",
"=",
"None",
",",
"bordercolor",
"=",
"None",
",",
"bordercolorsrc",
"=",
"None",
",",
"... | [
370,
4
] | [
502,
34
] | python | en | ['en', 'error', 'th'] | False |
process_erc20 | (coins_dict) | Make sure that:
* orphaned ERC20 support info is cleared out
* duplicate ERC20 tokens are not listed as supported
* non-duplicate ERC20 tokens are cleared out from the unsupported list
| Make sure that:
* orphaned ERC20 support info is cleared out
* duplicate ERC20 tokens are not listed as supported
* non-duplicate ERC20 tokens are cleared out from the unsupported list
| def process_erc20(coins_dict):
"""Make sure that:
* orphaned ERC20 support info is cleared out
* duplicate ERC20 tokens are not listed as supported
* non-duplicate ERC20 tokens are cleared out from the unsupported list
"""
erc20_dict = {
key: coin.get("duplicate", False)
for key,... | [
"def",
"process_erc20",
"(",
"coins_dict",
")",
":",
"erc20_dict",
"=",
"{",
"key",
":",
"coin",
".",
"get",
"(",
"\"duplicate\"",
",",
"False",
")",
"for",
"key",
",",
"coin",
"in",
"coins_dict",
".",
"items",
"(",
")",
"if",
"coin_info",
".",
"is_tok... | [
155,
0
] | [
194,
38
] | python | en | ['en', 'fil', 'en'] | True |
fix | (dry_run) | Fix expected problems.
Prunes orphaned keys and ensures that ERC20 duplicate info matches support info.
| Fix expected problems. | def fix(dry_run):
"""Fix expected problems.
Prunes orphaned keys and ensures that ERC20 duplicate info matches support info.
"""
all_coins, buckets = coin_info.coin_info_with_duplicates()
clear_erc20_mixed_buckets(buckets)
coins_dict = all_coins.as_dict()
orphaned = find_orphaned_support_k... | [
"def",
"fix",
"(",
"dry_run",
")",
":",
"all_coins",
",",
"buckets",
"=",
"coin_info",
".",
"coin_info_with_duplicates",
"(",
")",
"clear_erc20_mixed_buckets",
"(",
"buckets",
")",
"coins_dict",
"=",
"all_coins",
".",
"as_dict",
"(",
")",
"orphaned",
"=",
"fin... | [
214,
0
] | [
231,
28
] | python | en | ['fr', 'en', 'en'] | True |
check | (check_tokens, ignore_missing) | Check validity of support information.
Ensures that `support.json` data is well formed, there are no keys without
corresponding coins, and there are no coins without corresponding keys.
If `--check-tokens` is specified, the check will also take into account ERC20 tokens
without support info. This is d... | Check validity of support information. | def check(check_tokens, ignore_missing):
"""Check validity of support information.
Ensures that `support.json` data is well formed, there are no keys without
corresponding coins, and there are no coins without corresponding keys.
If `--check-tokens` is specified, the check will also take into account ... | [
"def",
"check",
"(",
"check_tokens",
",",
"ignore_missing",
")",
":",
"all_coins",
",",
"buckets",
"=",
"coin_info",
".",
"coin_info_with_duplicates",
"(",
")",
"clear_erc20_mixed_buckets",
"(",
"buckets",
")",
"coins_dict",
"=",
"all_coins",
".",
"as_dict",
"(",
... | [
239,
0
] | [
288,
19
] | python | en | ['en', 'en', 'en'] | True |
release | (
ctx,
device: str,
version,
git_tag,
release_missing,
dry_run,
soon,
force,
add_all,
verbose,
) | Release a new Trezor firmware.
Update support infos so that all coins have a clear support status.
By default, marks duplicate tokens as unsupported, and all coins that either
don't have support info, or they are supported "soon", are set to the
released firmware version.
Optionally tags the repos... | Release a new Trezor firmware. | def release(
ctx,
device: str,
version,
git_tag,
release_missing,
dry_run,
soon,
force,
add_all,
verbose,
):
"""Release a new Trezor firmware.
Update support infos so that all coins have a clear support status.
By default, marks duplicate tokens as unsupported, and a... | [
"def",
"release",
"(",
"ctx",
",",
"device",
":",
"str",
",",
"version",
",",
"git_tag",
",",
"release_missing",
",",
"dry_run",
",",
"soon",
",",
"force",
",",
"add_all",
",",
"verbose",
",",
")",
":",
"# check condition(s)",
"if",
"soon",
"and",
"git_t... | [
304,
0
] | [
439,
35
] | python | en | ['en', 'en', 'en'] | True |
show | (keyword) | Show support status of specified coins.
Keywords match against key, name or shortcut (ticker symbol) of coin.
| Show support status of specified coins. | def show(keyword):
"""Show support status of specified coins.
Keywords match against key, name or shortcut (ticker symbol) of coin.
"""
defs, _ = coin_info.coin_info_with_duplicates()
for kw in keyword:
for coin in coin_info.search(defs, kw):
print_support(coin) | [
"def",
"show",
"(",
"keyword",
")",
":",
"defs",
",",
"_",
"=",
"coin_info",
".",
"coin_info_with_duplicates",
"(",
")",
"for",
"kw",
"in",
"keyword",
":",
"for",
"coin",
"in",
"coin_info",
".",
"search",
"(",
"defs",
",",
"kw",
")",
":",
"print_suppor... | [
444,
0
] | [
453,
31
] | python | en | ['en', 'en', 'en'] | True |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.