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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Font.__init__ | (
self,
arg=None,
color=None,
colorsrc=None,
family=None,
familysrc=None,
size=None,
sizesrc=None,
**kwargs
) |
Construct a new Font object
Sets the font used in hover labels.
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.waterfall.hoverlabel.Font`
color
... |
Construct a new Font object
Sets the font used in hover labels. | def __init__(
self,
arg=None,
color=None,
colorsrc=None,
family=None,
familysrc=None,
size=None,
sizesrc=None,
**kwargs
):
"""
Construct a new Font object
Sets the font used in hover labels.
Parameters
... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"color",
"=",
"None",
",",
"colorsrc",
"=",
"None",
",",
"family",
"=",
"None",
",",
"familysrc",
"=",
"None",
",",
"size",
"=",
"None",
",",
"sizesrc",
"=",
"None",
",",
"*",
"*",
"kw... | [
215,
4
] | [
329,
34
] | python | en | ['en', 'error', 'th'] | False |
setup | (bot) |
Mandatory function to add the Cog to the bot.
|
Mandatory function to add the Cog to the bot.
| def setup(bot):
"""
Mandatory function to add the Cog to the bot.
"""
bot.add_cog(AdministrationCog(bot)) | [
"def",
"setup",
"(",
"bot",
")",
":",
"bot",
".",
"add_cog",
"(",
"AdministrationCog",
"(",
"bot",
")",
")"
] | [
300,
0
] | [
304,
39
] | python | en | ['en', 'error', 'th'] | False |
AdministrationCog.delete_msg | (self, ctx, *msgs: discord.Message) |
Deletes messages.
Can take several message Ids as input, as long as they are seperated by a single space.
Example:
@AntiPetros delete_msg 837700676872044604 837488218567475200
|
Deletes messages. | async def delete_msg(self, ctx, *msgs: discord.Message):
"""
Deletes messages.
Can take several message Ids as input, as long as they are seperated by a single space.
Example:
@AntiPetros delete_msg 837700676872044604 837488218567475200
"""
for msg in msgs:
... | [
"async",
"def",
"delete_msg",
"(",
"self",
",",
"ctx",
",",
"*",
"msgs",
":",
"discord",
".",
"Message",
")",
":",
"for",
"msg",
"in",
"msgs",
":",
"await",
"msg",
".",
"delete",
"(",
")",
"await",
"ctx",
".",
"message",
".",
"delete",
"(",
")"
] | [
114,
4
] | [
126,
34
] | python | en | ['en', 'error', 'th'] | False |
AdministrationCog.the_bots_new_clothes | (self, ctx: commands.Context, delete_after: int = None) |
Sends about a page worth of empty message to a channel, looks like channel got purged.
Optional deletes the empty message after specified seconds (defaults to not deleting)
Args:
delete_after (int, optional): time in seconds after which to delete the empty message. Defaults to Non... |
Sends about a page worth of empty message to a channel, looks like channel got purged. | async def the_bots_new_clothes(self, ctx: commands.Context, delete_after: int = None):
"""
Sends about a page worth of empty message to a channel, looks like channel got purged.
Optional deletes the empty message after specified seconds (defaults to not deleting)
Args:
dele... | [
"async",
"def",
"the_bots_new_clothes",
"(",
"self",
",",
"ctx",
":",
"commands",
".",
"Context",
",",
"delete_after",
":",
"int",
"=",
"None",
")",
":",
"msg",
"=",
"ZERO_WIDTH",
"*",
"20",
"+",
"'\\n'",
"await",
"ctx",
".",
"send",
"(",
"'THE BOTS NEW ... | [
130,
4
] | [
145,
49
] | python | en | ['en', 'error', 'th'] | False |
AdministrationCog.write_message | (self, ctx: commands.Context, channel: discord.TextChannel, *, message: str) |
Writes a message as the bot to a specific channel.
Args:
channel (discord.TextChannel): name or id of channel. Preferably use Id as it is failsafe.
message (str): The message you want to write, does not need any quotes and can be multiline
Example:
@AntiPe... |
Writes a message as the bot to a specific channel. | async def write_message(self, ctx: commands.Context, channel: discord.TextChannel, *, message: str):
"""
Writes a message as the bot to a specific channel.
Args:
channel (discord.TextChannel): name or id of channel. Preferably use Id as it is failsafe.
message (str): Th... | [
"async",
"def",
"write_message",
"(",
"self",
",",
"ctx",
":",
"commands",
".",
"Context",
",",
"channel",
":",
"discord",
".",
"TextChannel",
",",
"*",
",",
"message",
":",
"str",
")",
":",
"await",
"channel",
".",
"send",
"(",
"message",
",",
"allowe... | [
149,
4
] | [
162,
34
] | python | en | ['en', 'error', 'th'] | False |
AdministrationCog.edit_message | (self, ctx: commands.Context, channel: discord.TextChannel, msg_id: int, *, content: str) |
Writes a message as the bot to a specific channel.
Args:
channel (discord.TextChannel): name or id of channel. Preferably use Id as it is failsafe.
message (str): The message you want to write, does not need any quotes and can be multiline
Example:
@AntiPe... |
Writes a message as the bot to a specific channel. | async def edit_message(self, ctx: commands.Context, channel: discord.TextChannel, msg_id: int, *, content: str):
"""
Writes a message as the bot to a specific channel.
Args:
channel (discord.TextChannel): name or id of channel. Preferably use Id as it is failsafe.
messa... | [
"async",
"def",
"edit_message",
"(",
"self",
",",
"ctx",
":",
"commands",
".",
"Context",
",",
"channel",
":",
"discord",
".",
"TextChannel",
",",
"msg_id",
":",
"int",
",",
"*",
",",
"content",
":",
"str",
")",
":",
"to_edit_msg",
"=",
"await",
"chann... | [
166,
4
] | [
180,
34
] | python | en | ['en', 'error', 'th'] | False |
AdministrationCog.make_embed | (self, ctx: commands.Context, channel: discord.TextChannel, **flags) |
Creates a simple embed message in the specified channel.
No support for embed fields, as input would be to complicated.
Args:
channel (discord.TextChannel): either channel name or channel id (prefered), where the message should be posted.
--title (str):
--d... |
Creates a simple embed message in the specified channel. | async def make_embed(self, ctx: commands.Context, channel: discord.TextChannel, **flags):
"""
Creates a simple embed message in the specified channel.
No support for embed fields, as input would be to complicated.
Args:
channel (discord.TextChannel): either channel name or ... | [
"async",
"def",
"make_embed",
"(",
"self",
",",
"ctx",
":",
"commands",
".",
"Context",
",",
"channel",
":",
"discord",
".",
"TextChannel",
",",
"*",
"*",
"flags",
")",
":",
"allowed_mentions",
"=",
"discord",
".",
"AllowedMentions",
".",
"none",
"(",
")... | [
198,
4
] | [
241,
49
] | python | en | ['en', 'error', 'th'] | False |
AdministrationCog.all_guild_emojis | (self, ctx: commands.Context) |
Collects all Guild emojis and sends them as zipped file.
Example:
@AntiPetros all_guild_emojis
|
Collects all Guild emojis and sends them as zipped file. | async def all_guild_emojis(self, ctx: commands.Context):
"""
Collects all Guild emojis and sends them as zipped file.
Example:
@AntiPetros all_guild_emojis
"""
async with ctx.typing():
start_message = await ctx.send('Please wait this could take a minute o... | [
"async",
"def",
"all_guild_emojis",
"(",
"self",
",",
"ctx",
":",
"commands",
".",
"Context",
")",
":",
"async",
"with",
"ctx",
".",
"typing",
"(",
")",
":",
"start_message",
"=",
"await",
"ctx",
".",
"send",
"(",
"'Please wait this could take a minute or more... | [
244,
4
] | [
264,
48
] | python | en | ['en', 'error', 'th'] | False |
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.scatterpolargl.marker.colorbar.title.Fo... |
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.scatterpolargl.marker.colorbar.title.Fo... | 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.scatterpolar... | [
"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.scatterpolargl
.marker.colorbar.Title`
font
Sets this color bar's title... |
Construct a new Title object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.scatterpolargl
.marker.colorbar.Title`
font
Sets this color bar's title... | 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.scatterpolargl
... | [
"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 |
BaseDenseHead.loss | (self, **kwargs) | Compute losses of the head. | Compute losses of the head. | def loss(self, **kwargs):
"""Compute losses of the head."""
pass | [
"def",
"loss",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"pass"
] | [
12,
4
] | [
14,
12
] | python | en | ['en', 'en', 'en'] | True |
BaseDenseHead.get_bboxes | (self, **kwargs) | Transform network output for a batch into bbox predictions. | Transform network output for a batch into bbox predictions. | def get_bboxes(self, **kwargs):
"""Transform network output for a batch into bbox predictions."""
pass | [
"def",
"get_bboxes",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"pass"
] | [
17,
4
] | [
19,
12
] | python | en | ['en', 'en', 'en'] | True |
BaseDenseHead.forward_train | (self,
x,
img_metas,
gt_bboxes,
gt_labels=None,
gt_bboxes_ignore=None,
proposal_cfg=None,
**kwargs) |
Args:
x (list[Tensor]): Features from FPN.
img_metas (list[dict]): Meta information of each image, e.g.,
image size, scaling factor, etc.
gt_bboxes (Tensor): Ground truth bboxes of the image,
shape (num_gts, 4).
gt_labels (Tensor):... |
Args:
x (list[Tensor]): Features from FPN.
img_metas (list[dict]): Meta information of each image, e.g.,
image size, scaling factor, etc.
gt_bboxes (Tensor): Ground truth bboxes of the image,
shape (num_gts, 4).
gt_labels (Tensor):... | def forward_train(self,
x,
img_metas,
gt_bboxes,
gt_labels=None,
gt_bboxes_ignore=None,
proposal_cfg=None,
**kwargs):
"""
Args:
x (list[Te... | [
"def",
"forward_train",
"(",
"self",
",",
"x",
",",
"img_metas",
",",
"gt_bboxes",
",",
"gt_labels",
"=",
"None",
",",
"gt_bboxes_ignore",
"=",
"None",
",",
"proposal_cfg",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"outs",
"=",
"self",
"(",
"x",
... | [
21,
4
] | [
58,
40
] | python | en | ['en', 'error', 'th'] | False |
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.histogram2dcontour.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.histogram2dcontour.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.histogram2dc... | [
"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.histogram2dcon
tour.colorbar.Title`
font
Sets this color bar's title fo... |
Construct a new Title object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.histogram2dcon
tour.colorbar.Title`
font
Sets this color bar's title fo... | 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.histogram2dcon
... | [
"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 |
MockDict.__init__ | (self, opt, shared=None) |
Initialize idx for incremental indexing.
|
Initialize idx for incremental indexing.
| def __init__(self, opt, shared=None):
"""
Initialize idx for incremental indexing.
"""
self.idx = 0 | [
"def",
"__init__",
"(",
"self",
",",
"opt",
",",
"shared",
"=",
"None",
")",
":",
"self",
".",
"idx",
"=",
"0"
] | [
35,
4
] | [
39,
20
] | python | en | ['en', 'error', 'th'] | False |
MockDict.__getitem__ | (self, key) |
Return index of special token or return the token.
|
Return index of special token or return the token.
| def __getitem__(self, key):
"""
Return index of special token or return the token.
"""
if key == self.null_token:
return self.NULL_IDX
elif key == self.start_token:
return self.BEG_IDX
elif key == self.end_token:
return self.END_IDX
... | [
"def",
"__getitem__",
"(",
"self",
",",
"key",
")",
":",
"if",
"key",
"==",
"self",
".",
"null_token",
":",
"return",
"self",
".",
"NULL_IDX",
"elif",
"key",
"==",
"self",
".",
"start_token",
":",
"return",
"self",
".",
"BEG_IDX",
"elif",
"key",
"==",
... | [
41,
4
] | [
57,
27
] | python | en | ['en', 'error', 'th'] | False |
MockDict.add_cmdline_args | (
cls, parser: ParlaiParser, partial_opt: Optional[Opt] = None
) |
Add CLI args.
|
Add CLI args.
| def add_cmdline_args(
cls, parser: ParlaiParser, partial_opt: Optional[Opt] = None
) -> ParlaiParser:
"""
Add CLI args.
"""
pass
return parser | [
"def",
"add_cmdline_args",
"(",
"cls",
",",
"parser",
":",
"ParlaiParser",
",",
"partial_opt",
":",
"Optional",
"[",
"Opt",
"]",
"=",
"None",
")",
"->",
"ParlaiParser",
":",
"pass",
"return",
"parser"
] | [
66,
4
] | [
73,
21
] | python | en | ['en', 'error', 'th'] | False |
MockDict.txt2vec | (self, txt) |
Return index of special tokens or range from 1 for each token.
|
Return index of special tokens or range from 1 for each token.
| def txt2vec(self, txt):
"""
Return index of special tokens or range from 1 for each token.
"""
self.idx = 0
return [self[tok] for tok in txt.split()] | [
"def",
"txt2vec",
"(",
"self",
",",
"txt",
")",
":",
"self",
".",
"idx",
"=",
"0",
"return",
"[",
"self",
"[",
"tok",
"]",
"for",
"tok",
"in",
"txt",
".",
"split",
"(",
")",
"]"
] | [
75,
4
] | [
80,
49
] | python | en | ['en', 'error', 'th'] | False |
MockDict.save | (self, path, sort=False) |
Override to do nothing.
|
Override to do nothing.
| def save(self, path, sort=False):
"""
Override to do nothing.
"""
pass | [
"def",
"save",
"(",
"self",
",",
"path",
",",
"sort",
"=",
"False",
")",
":",
"pass"
] | [
82,
4
] | [
86,
12
] | python | en | ['en', 'error', 'th'] | False |
MockTorchAgent.dictionary_class | () |
Replace normal dictionary class with mock one.
|
Replace normal dictionary class with mock one.
| def dictionary_class():
"""
Replace normal dictionary class with mock one.
"""
return MockDict | [
"def",
"dictionary_class",
"(",
")",
":",
"return",
"MockDict"
] | [
95,
4
] | [
99,
23
] | python | en | ['en', 'error', 'th'] | False |
MockTorchAgent.train_step | (self, batch) |
Return confirmation of training.
|
Return confirmation of training.
| def train_step(self, batch):
"""
Return confirmation of training.
"""
return Output(['Training {}!'.format(i) for i in range(len(batch.text_vec))]) | [
"def",
"train_step",
"(",
"self",
",",
"batch",
")",
":",
"return",
"Output",
"(",
"[",
"'Training {}!'",
".",
"format",
"(",
"i",
")",
"for",
"i",
"in",
"range",
"(",
"len",
"(",
"batch",
".",
"text_vec",
")",
")",
"]",
")"
] | [
112,
4
] | [
116,
85
] | python | en | ['en', 'error', 'th'] | False |
MockTorchAgent.eval_step | (self, batch) |
Return confirmation of evaluation.
|
Return confirmation of evaluation.
| def eval_step(self, batch):
"""
Return confirmation of evaluation.
"""
return Output(
[
'Evaluating {} (responding to {})!'.format(
i, batch.observations[i]['text']
)
for i in range(len(batch.text_vec))
... | [
"def",
"eval_step",
"(",
"self",
",",
"batch",
")",
":",
"return",
"Output",
"(",
"[",
"'Evaluating {} (responding to {})!'",
".",
"format",
"(",
"i",
",",
"batch",
".",
"observations",
"[",
"i",
"]",
"[",
"'text'",
"]",
")",
"for",
"i",
"in",
"range",
... | [
118,
4
] | [
129,
9
] | python | en | ['en', 'error', 'th'] | False |
SilentTorchAgent.dictionary_class | () |
Replace normal dictionary class with mock one.
|
Replace normal dictionary class with mock one.
| def dictionary_class():
"""
Replace normal dictionary class with mock one.
"""
return MockDict | [
"def",
"dictionary_class",
"(",
")",
":",
"return",
"MockDict"
] | [
138,
4
] | [
142,
23
] | python | en | ['en', 'error', 'th'] | False |
SilentTorchAgent.train_step | (self, batch) |
Null output.
|
Null output.
| def train_step(self, batch):
"""
Null output.
"""
return Output() | [
"def",
"train_step",
"(",
"self",
",",
"batch",
")",
":",
"return",
"Output",
"(",
")"
] | [
155,
4
] | [
159,
23
] | python | en | ['en', 'error', 'th'] | False |
SilentTorchAgent.eval_step | (self, batch) |
Null output.
|
Null output.
| def eval_step(self, batch):
"""
Null output.
"""
return Output() | [
"def",
"eval_step",
"(",
"self",
",",
"batch",
")",
":",
"return",
"Output",
"(",
")"
] | [
161,
4
] | [
165,
23
] | python | en | ['en', 'error', 'th'] | False |
Tickfont.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 |
Tickfont.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 |
Tickfont.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 |
Tickfont.__init__ | (self, arg=None, color=None, family=None, size=None, **kwargs) |
Construct a new Tickfont object
Sets the color bar's tick label font
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.cone.colorbar.Tickfont`
color
... |
Construct a new Tickfont object
Sets the color bar's tick label font | def __init__(self, arg=None, color=None, family=None, size=None, **kwargs):
"""
Construct a new Tickfont object
Sets the color bar's tick label font
Parameters
----------
arg
dict of properties compatible with this constructor or
an insta... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"color",
"=",
"None",
",",
"family",
"=",
"None",
",",
"size",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"super",
"(",
"Tickfont",
",",
"self",
")",
".",
"__init__",
"(",
"\"tick... | [
143,
4
] | [
226,
34
] | python | en | ['en', 'error', 'th'] | False |
CredentialProposal.__init__ | (
self,
_id: str = None,
*,
comment: str = None,
credential_proposal: CredentialPreview = None,
schema_id: str = None,
schema_issuer_did: str = None,
schema_name: str = None,
schema_version: str = None,
cred_def_id: str = None,
issu... |
Initialize credential proposal object.
Args:
comment: optional human-readable comment
credential_proposal: proposed credential preview
schema_id: schema identifier
schema_issuer_did: schema issuer DID
schema_name: schema name
sche... |
Initialize credential proposal object. | def __init__(
self,
_id: str = None,
*,
comment: str = None,
credential_proposal: CredentialPreview = None,
schema_id: str = None,
schema_issuer_did: str = None,
schema_name: str = None,
schema_version: str = None,
cred_def_id: str = None,
... | [
"def",
"__init__",
"(",
"self",
",",
"_id",
":",
"str",
"=",
"None",
",",
"*",
",",
"comment",
":",
"str",
"=",
"None",
",",
"credential_proposal",
":",
"CredentialPreview",
"=",
"None",
",",
"schema_id",
":",
"str",
"=",
"None",
",",
"schema_issuer_did"... | [
33,
4
] | [
70,
36
] | python | en | ['en', 'error', 'th'] | False |
Increasing.fillcolor | (self) |
Sets the fill color. Defaults to a half-transparent variant of
the line color, marker color, or marker line color, whichever
is available.
The 'fillcolor' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rg... |
Sets the fill color. Defaults to a half-transparent variant of
the line color, marker color, or marker line color, whichever
is available.
The 'fillcolor' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rg... | def fillcolor(self):
"""
Sets the fill color. Defaults to a half-transparent variant of
the line color, marker color, or marker line color, whichever
is available.
The 'fillcolor' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
... | [
"def",
"fillcolor",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"fillcolor\"",
"]"
] | [
15,
4
] | [
67,
32
] | python | en | ['en', 'error', 'th'] | False |
Increasing.line | (self) |
The 'line' property is an instance of Line
that may be specified as:
- An instance of :class:`plotly.graph_objs.candlestick.increasing.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.candlestick.increasing.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.candlestick.increasing.Line`
- A dict of string/value properties that will be passed
to the Line constructor
Suppor... | [
"def",
"line",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"line\"",
"]"
] | [
76,
4
] | [
96,
27
] | python | en | ['en', 'error', 'th'] | False |
Increasing.__init__ | (self, arg=None, fillcolor=None, line=None, **kwargs) |
Construct a new Increasing object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.candlestick.Increasing`
fillcolor
Sets the fill color. Defaults to... |
Construct a new Increasing object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.candlestick.Increasing`
fillcolor
Sets the fill color. Defaults to... | def __init__(self, arg=None, fillcolor=None, line=None, **kwargs):
"""
Construct a new Increasing object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.candlest... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"fillcolor",
"=",
"None",
",",
"line",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"super",
"(",
"Increasing",
",",
"self",
")",
".",
"__init__",
"(",
"\"increasing\"",
")",
"if",
"\... | [
116,
4
] | [
182,
34
] | python | en | ['en', 'error', 'th'] | False |
imshow | (
img,
zmin=None,
zmax=None,
origin=None,
labels={},
x=None,
y=None,
color_continuous_scale=None,
color_continuous_midpoint=None,
range_color=None,
title=None,
template=None,
width=None,
height=None,
aspect=None,
) |
Display an image, i.e. data on a 2D regular raster.
Parameters
----------
img: array-like image, or xarray
The image data. Supported array shapes are
- (M, N): an image with scalar data. The data is visualized
using a colormap.
- (M, N, 3): an image with RGB values.... |
Display an image, i.e. data on a 2D regular raster. | def imshow(
img,
zmin=None,
zmax=None,
origin=None,
labels={},
x=None,
y=None,
color_continuous_scale=None,
color_continuous_midpoint=None,
range_color=None,
title=None,
template=None,
width=None,
height=None,
aspect=None,
):
"""
Display an image, i.e.... | [
"def",
"imshow",
"(",
"img",
",",
"zmin",
"=",
"None",
",",
"zmax",
"=",
"None",
",",
"origin",
"=",
"None",
",",
"labels",
"=",
"{",
"}",
",",
"x",
"=",
"None",
",",
"y",
"=",
"None",
",",
"color_continuous_scale",
"=",
"None",
",",
"color_continu... | [
65,
0
] | [
293,
14
] | python | en | ['en', 'error', 'th'] | False |
TestInjector.test_settings_init | (self) | Test settings initialization. | Test settings initialization. | def test_settings_init(self):
"""Test settings initialization."""
for key in self.test_settings:
assert key in self.test_instance.settings
assert self.test_instance.settings[key] == self.test_settings[key] | [
"def",
"test_settings_init",
"(",
"self",
")",
":",
"for",
"key",
"in",
"self",
".",
"test_settings",
":",
"assert",
"key",
"in",
"self",
".",
"test_instance",
".",
"settings",
"assert",
"self",
".",
"test_instance",
".",
"settings",
"[",
"key",
"]",
"==",... | [
36,
4
] | [
40,
78
] | python | en | ['en', 'fy', 'en'] | True |
TestInjector.test_inject_simple | (self) | Test a basic injection. | Test a basic injection. | async def test_inject_simple(self):
"""Test a basic injection."""
assert (await self.test_instance.inject(str, required=False)) is None
with self.assertRaises(InjectorError):
await self.test_instance.inject(str)
with self.assertRaises(ValueError):
await self.test_... | [
"async",
"def",
"test_inject_simple",
"(",
"self",
")",
":",
"assert",
"(",
"await",
"self",
".",
"test_instance",
".",
"inject",
"(",
"str",
",",
"required",
"=",
"False",
")",
")",
"is",
"None",
"with",
"self",
".",
"assertRaises",
"(",
"InjectorError",
... | [
42,
4
] | [
50,
72
] | python | en | ['sl', 'en', 'en'] | True |
TestInjector.test_inject_provider | (self) | Test a provider injection. | Test a provider injection. | async def test_inject_provider(self):
"""Test a provider injection."""
mock_provider = MockProvider(self.test_value)
self.test_instance.bind_provider(str, mock_provider)
assert self.test_instance.get_provider(str) is mock_provider
override_settings = {self.test_key: "NEWVAL"}
... | [
"async",
"def",
"test_inject_provider",
"(",
"self",
")",
":",
"mock_provider",
"=",
"MockProvider",
"(",
"self",
".",
"test_value",
")",
"self",
".",
"test_instance",
".",
"bind_provider",
"(",
"str",
",",
"mock_provider",
")",
"assert",
"self",
".",
"test_in... | [
52,
4
] | [
62,
59
] | python | en | ['hr', 'en', 'en'] | True |
TestInjector.test_bad_provider | (self) | Test empty and invalid provider results. | Test empty and invalid provider results. | async def test_bad_provider(self):
"""Test empty and invalid provider results."""
self.test_instance.bind_provider(str, MockProvider(None))
with self.assertRaises(InjectorError):
await self.test_instance.inject(str)
await self.test_instance.inject(str, required=False)
... | [
"async",
"def",
"test_bad_provider",
"(",
"self",
")",
":",
"self",
".",
"test_instance",
".",
"bind_provider",
"(",
"str",
",",
"MockProvider",
"(",
"None",
")",
")",
"with",
"self",
".",
"assertRaises",
"(",
"InjectorError",
")",
":",
"await",
"self",
".... | [
64,
4
] | [
74,
48
] | python | en | ['en', 'en', 'en'] | True |
TestInjector.test_inject_class | (self) | Test a provider class injection. | Test a provider class injection. | async def test_inject_class(self):
"""Test a provider class injection."""
provider = ClassProvider(MockInstance, self.test_value, async_init="open")
self.test_instance.bind_provider(MockInstance, provider)
assert self.test_instance.get_provider(MockInstance) is provider
instance ... | [
"async",
"def",
"test_inject_class",
"(",
"self",
")",
":",
"provider",
"=",
"ClassProvider",
"(",
"MockInstance",
",",
"self",
".",
"test_value",
",",
"async_init",
"=",
"\"open\"",
")",
"self",
".",
"test_instance",
".",
"bind_provider",
"(",
"MockInstance",
... | [
76,
4
] | [
84,
30
] | python | en | ['hr', 'en', 'en'] | True |
TestInjector.test_inject_class_name | (self) | Test a provider class injection with a named class. | Test a provider class injection with a named class. | async def test_inject_class_name(self):
"""Test a provider class injection with a named class."""
provider = ClassProvider("aries_cloudagent.config.settings.Settings")
self.test_instance.bind_provider(BaseSettings, provider)
instance = await self.test_instance.inject(BaseSettings)
... | [
"async",
"def",
"test_inject_class_name",
"(",
"self",
")",
":",
"provider",
"=",
"ClassProvider",
"(",
"\"aries_cloudagent.config.settings.Settings\"",
")",
"self",
".",
"test_instance",
".",
"bind_provider",
"(",
"BaseSettings",
",",
"provider",
")",
"instance",
"="... | [
86,
4
] | [
94,
9
] | python | en | ['en', 'en', 'en'] | True |
TestInjector.test_inject_class_dependency | (self) | Test a provider class injection with a dependency. | Test a provider class injection with a dependency. | async def test_inject_class_dependency(self):
"""Test a provider class injection with a dependency."""
test_str = "TEST"
test_int = 1
self.test_instance.bind_instance(str, test_str)
self.test_instance.bind_instance(int, test_int)
provider = ClassProvider(
Mock... | [
"async",
"def",
"test_inject_class_dependency",
"(",
"self",
")",
":",
"test_str",
"=",
"\"TEST\"",
"test_int",
"=",
"1",
"self",
".",
"test_instance",
".",
"bind_instance",
"(",
"str",
",",
"test_str",
")",
"self",
".",
"test_instance",
".",
"bind_instance",
... | [
96,
4
] | [
108,
51
] | python | en | ['en', 'en', 'en'] | True |
TestInjector.test_inject_cached | (self) | Test a provider class injection. | Test a provider class injection. | async def test_inject_cached(self):
"""Test a provider class injection."""
with self.assertRaises(ValueError):
CachedProvider(None)
provider = ClassProvider(MockInstance, self.test_value, async_init="open")
cached = CachedProvider(provider)
self.test_instance.bind_pro... | [
"async",
"def",
"test_inject_cached",
"(",
"self",
")",
":",
"with",
"self",
".",
"assertRaises",
"(",
"ValueError",
")",
":",
"CachedProvider",
"(",
"None",
")",
"provider",
"=",
"ClassProvider",
"(",
"MockInstance",
",",
"self",
".",
"test_value",
",",
"as... | [
110,
4
] | [
126,
23
] | python | en | ['hr', 'en', 'en'] | True |
set_prefs | (prefs) | This function is called before opening the project | This function is called before opening the project | def set_prefs(prefs):
"""This function is called before opening the project"""
# Specify which files and folders to ignore in the project.
# Changes to ignored resources are not added to the history and
# VCSs. Also they are not returned in `Project.get_files()`.
# Note that ``?`` and ``*`` match ... | [
"def",
"set_prefs",
"(",
"prefs",
")",
":",
"# Specify which files and folders to ignore in the project.",
"# Changes to ignored resources are not added to the history and",
"# VCSs. Also they are not returned in `Project.get_files()`.",
"# Note that ``?`` and ``*`` match all characters but slash... | [
4,
0
] | [
108,
73
] | python | en | ['en', 'en', 'en'] | True |
project_opened | (project) | This function is called after opening the project | This function is called after opening the project | def project_opened(project):
"""This function is called after opening the project""" | [
"def",
"project_opened",
"(",
"project",
")",
":"
] | [
111,
0
] | [
112,
59
] | python | en | ['en', 'en', 'en'] | True |
CameraInstance3DBoxes.height | (self) | torch.Tensor: A vector with height of each box. | torch.Tensor: A vector with height of each box. | def height(self):
"""torch.Tensor: A vector with height of each box."""
return self.tensor[:, 4] | [
"def",
"height",
"(",
"self",
")",
":",
"return",
"self",
".",
"tensor",
"[",
":",
",",
"4",
"]"
] | [
73,
4
] | [
75,
32
] | python | en | ['en', 'en', 'en'] | True |
CameraInstance3DBoxes.top_height | (self) | torch.Tensor: A vector with the top height of each box. | torch.Tensor: A vector with the top height of each box. | def top_height(self):
"""torch.Tensor: A vector with the top height of each box."""
# the positive direction is down rather than up
return self.bottom_height - self.height | [
"def",
"top_height",
"(",
"self",
")",
":",
"# the positive direction is down rather than up",
"return",
"self",
".",
"bottom_height",
"-",
"self",
".",
"height"
] | [
78,
4
] | [
81,
47
] | python | en | ['en', 'en', 'en'] | True |
CameraInstance3DBoxes.bottom_height | (self) | torch.Tensor: A vector with bottom's height of each box. | torch.Tensor: A vector with bottom's height of each box. | def bottom_height(self):
"""torch.Tensor: A vector with bottom's height of each box."""
return self.tensor[:, 1] | [
"def",
"bottom_height",
"(",
"self",
")",
":",
"return",
"self",
".",
"tensor",
"[",
":",
",",
"1",
"]"
] | [
84,
4
] | [
86,
32
] | python | en | ['en', 'en', 'en'] | True |
CameraInstance3DBoxes.gravity_center | (self) | torch.Tensor: A tensor with center of each box. | torch.Tensor: A tensor with center of each box. | def gravity_center(self):
"""torch.Tensor: A tensor with center of each box."""
bottom_center = self.bottom_center
gravity_center = torch.zeros_like(bottom_center)
gravity_center[:, [0, 2]] = bottom_center[:, [0, 2]]
gravity_center[:, 1] = bottom_center[:, 1] - self.tensor[:, 4] ... | [
"def",
"gravity_center",
"(",
"self",
")",
":",
"bottom_center",
"=",
"self",
".",
"bottom_center",
"gravity_center",
"=",
"torch",
".",
"zeros_like",
"(",
"bottom_center",
")",
"gravity_center",
"[",
":",
",",
"[",
"0",
",",
"2",
"]",
"]",
"=",
"bottom_ce... | [
89,
4
] | [
95,
29
] | python | en | ['en', 'en', 'en'] | True |
CameraInstance3DBoxes.corners | (self) | torch.Tensor: Coordinates of corners of all the boxes in
shape (N, 8, 3).
Convert the boxes to in clockwise order, in the form of
(x0y0z0, x0y0z1, x0y1z1, x0y1z0, x1y0z0, x1y0z1, x1y1z1, x1y1z0)
.. code-block:: none
front z
... | torch.Tensor: Coordinates of corners of all the boxes in
shape (N, 8, 3). | def corners(self):
"""torch.Tensor: Coordinates of corners of all the boxes in
shape (N, 8, 3).
Convert the boxes to in clockwise order, in the form of
(x0y0z0, x0y0z1, x0y1z1, x0y1z0, x1y0z0, x1y0z1, x1y1z1, x1y1z0)
.. code-block:: none
... | [
"def",
"corners",
"(",
"self",
")",
":",
"# TODO: rotation_3d_in_axis function do not support",
"# empty tensor currently.",
"assert",
"len",
"(",
"self",
".",
"tensor",
")",
"!=",
"0",
"dims",
"=",
"self",
".",
"dims",
"corners_norm",
"=",
"torch",
".",
"from_nu... | [
98,
4
] | [
138,
22
] | python | en | ['en', 'en', 'en'] | True |
CameraInstance3DBoxes.bev | (self) | torch.Tensor: A n x 5 tensor of 2D BEV box of each box
with rotation in XYWHR format. | torch.Tensor: A n x 5 tensor of 2D BEV box of each box
with rotation in XYWHR format. | def bev(self):
"""torch.Tensor: A n x 5 tensor of 2D BEV box of each box
with rotation in XYWHR format."""
return self.tensor[:, [0, 2, 3, 5, 6]] | [
"def",
"bev",
"(",
"self",
")",
":",
"return",
"self",
".",
"tensor",
"[",
":",
",",
"[",
"0",
",",
"2",
",",
"3",
",",
"5",
",",
"6",
"]",
"]"
] | [
141,
4
] | [
144,
46
] | python | en | ['en', 'vi', 'en'] | True |
CameraInstance3DBoxes.nearest_bev | (self) | torch.Tensor: A tensor of 2D BEV box of each box
without rotation. | torch.Tensor: A tensor of 2D BEV box of each box
without rotation. | def nearest_bev(self):
"""torch.Tensor: A tensor of 2D BEV box of each box
without rotation."""
# Obtain BEV boxes with rotation in XZWHR format
bev_rotated_boxes = self.bev
# convert the rotation to a valid range
rotations = bev_rotated_boxes[:, -1]
normed_rotati... | [
"def",
"nearest_bev",
"(",
"self",
")",
":",
"# Obtain BEV boxes with rotation in XZWHR format",
"bev_rotated_boxes",
"=",
"self",
".",
"bev",
"# convert the rotation to a valid range",
"rotations",
"=",
"bev_rotated_boxes",
"[",
":",
",",
"-",
"1",
"]",
"normed_rotations... | [
147,
4
] | [
165,
24
] | python | en | ['en', 'vi', 'en'] | True |
CameraInstance3DBoxes.rotate | (self, angle, points=None) | Rotate boxes with points (optional) with the given angle.
Args:
angle (float, torch.Tensor): Rotation angle.
points (torch.Tensor, numpy.ndarray, :obj:`BasePoints`, optional):
Points to rotate. Defaults to None.
Returns:
tuple or None: When ``points`... | Rotate boxes with points (optional) with the given angle. | def rotate(self, angle, points=None):
"""Rotate boxes with points (optional) with the given angle.
Args:
angle (float, torch.Tensor): Rotation angle.
points (torch.Tensor, numpy.ndarray, :obj:`BasePoints`, optional):
Points to rotate. Defaults to None.
R... | [
"def",
"rotate",
"(",
"self",
",",
"angle",
",",
"points",
"=",
"None",
")",
":",
"if",
"not",
"isinstance",
"(",
"angle",
",",
"torch",
".",
"Tensor",
")",
":",
"angle",
"=",
"self",
".",
"tensor",
".",
"new_tensor",
"(",
"angle",
")",
"rot_sin",
... | [
167,
4
] | [
201,
36
] | python | en | ['en', 'en', 'en'] | True |
CameraInstance3DBoxes.flip | (self, bev_direction='horizontal', points=None) | Flip the boxes in BEV along given BEV direction.
In CAM coordinates, it flips the x (horizontal) or z (vertical) axis.
Args:
bev_direction (str): Flip direction (horizontal or vertical).
points (torch.Tensor, numpy.ndarray, :obj:`BasePoints`, None):
Points to fl... | Flip the boxes in BEV along given BEV direction. | def flip(self, bev_direction='horizontal', points=None):
"""Flip the boxes in BEV along given BEV direction.
In CAM coordinates, it flips the x (horizontal) or z (vertical) axis.
Args:
bev_direction (str): Flip direction (horizontal or vertical).
points (torch.Tensor, n... | [
"def",
"flip",
"(",
"self",
",",
"bev_direction",
"=",
"'horizontal'",
",",
"points",
"=",
"None",
")",
":",
"assert",
"bev_direction",
"in",
"(",
"'horizontal'",
",",
"'vertical'",
")",
"if",
"bev_direction",
"==",
"'horizontal'",
":",
"self",
".",
"tensor"... | [
203,
4
] | [
235,
25
] | python | en | ['en', 'da', 'en'] | True |
CameraInstance3DBoxes.in_range_bev | (self, box_range) | Check whether the boxes are in the given range.
Args:
box_range (list | torch.Tensor): The range of box
(x_min, z_min, x_max, z_max).
Note:
The original implementation of SECOND checks whether boxes in
a range by checking whether the points are in a ... | Check whether the boxes are in the given range. | def in_range_bev(self, box_range):
"""Check whether the boxes are in the given range.
Args:
box_range (list | torch.Tensor): The range of box
(x_min, z_min, x_max, z_max).
Note:
The original implementation of SECOND checks whether boxes in
a ... | [
"def",
"in_range_bev",
"(",
"self",
",",
"box_range",
")",
":",
"in_range_flags",
"=",
"(",
"(",
"self",
".",
"tensor",
"[",
":",
",",
"0",
"]",
">",
"box_range",
"[",
"0",
"]",
")",
"&",
"(",
"self",
".",
"tensor",
"[",
":",
",",
"2",
"]",
">"... | [
237,
4
] | [
257,
29
] | python | en | ['en', 'en', 'en'] | True |
CameraInstance3DBoxes.height_overlaps | (cls, boxes1, boxes2, mode='iou') | Calculate height overlaps of two boxes.
This function calculates the height overlaps between ``boxes1`` and
``boxes2``, where ``boxes1`` and ``boxes2`` should be in the same type.
Args:
boxes1 (:obj:`CameraInstance3DBoxes`): Boxes 1 contain N boxes.
boxes2 (:obj:`Camera... | Calculate height overlaps of two boxes. | def height_overlaps(cls, boxes1, boxes2, mode='iou'):
"""Calculate height overlaps of two boxes.
This function calculates the height overlaps between ``boxes1`` and
``boxes2``, where ``boxes1`` and ``boxes2`` should be in the same type.
Args:
boxes1 (:obj:`CameraInstance3DB... | [
"def",
"height_overlaps",
"(",
"cls",
",",
"boxes1",
",",
"boxes2",
",",
"mode",
"=",
"'iou'",
")",
":",
"assert",
"isinstance",
"(",
"boxes1",
",",
"CameraInstance3DBoxes",
")",
"assert",
"isinstance",
"(",
"boxes2",
",",
"CameraInstance3DBoxes",
")",
"boxes1... | [
260,
4
] | [
288,
25
] | python | en | ['en', 'en', 'en'] | True |
CameraInstance3DBoxes.convert_to | (self, dst, rt_mat=None) | Convert self to ``dst`` mode.
Args:
dst (:obj:`BoxMode`): The target Box mode.
rt_mat (np.dnarray | torch.Tensor): The rotation and translation
matrix between different coordinates. Defaults to None.
The conversion from ``src`` coordinates to ``dst`` coor... | Convert self to ``dst`` mode. | def convert_to(self, dst, rt_mat=None):
"""Convert self to ``dst`` mode.
Args:
dst (:obj:`BoxMode`): The target Box mode.
rt_mat (np.dnarray | torch.Tensor): The rotation and translation
matrix between different coordinates. Defaults to None.
The ... | [
"def",
"convert_to",
"(",
"self",
",",
"dst",
",",
"rt_mat",
"=",
"None",
")",
":",
"from",
".",
"box_3d_mode",
"import",
"Box3DMode",
"return",
"Box3DMode",
".",
"convert",
"(",
"box",
"=",
"self",
",",
"src",
"=",
"Box3DMode",
".",
"CAM",
",",
"dst",... | [
290,
4
] | [
307,
64
] | python | en | ['en', 'en', 'en'] | True |
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.funnel.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.funnel.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.funnel.hoverlabel.Font`
- A dict of string/value properties that will be passed
to ... | [
"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.funnel.Hoverlabel`
align
Sets the horizontal alignment of the text... |
Construct a new Hoverlabel object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.funnel.Hoverlabel`
align
Sets the horizontal alignment of the text... | 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 |
_case_sensitive_replace | (string, old, new) |
Replace text, retaining exact case.
Args:
string (str): String in which to perform replacement.
old (str): Word or substring to replace.
new (str): What to replace `old` with.
Returns:
repl_string (str): Version of string where instances of
`old` has been repla... |
Replace text, retaining exact case. | def _case_sensitive_replace(string, old, new):
"""
Replace text, retaining exact case.
Args:
string (str): String in which to perform replacement.
old (str): Word or substring to replace.
new (str): What to replace `old` with.
Returns:
repl_string (str): Version of stri... | [
"def",
"_case_sensitive_replace",
"(",
"string",
",",
"old",
",",
"new",
")",
":",
"def",
"repl",
"(",
"match",
")",
":",
"current",
"=",
"match",
".",
"group",
"(",
")",
"# treat multi-word sentences word-by-word",
"old_words",
"=",
"current",
".",
"split",
... | [
10,
0
] | [
58,
34
] | python | en | ['en', 'error', 'th'] | False |
_get_corner_points | (x0, y0, x1, y1) |
Returns the corner points of a scatter rectangle
:param x0: x-start
:param y0: y-lower
:param x1: x-end
:param y1: y-upper
:return: ([x], [y]), tuple of lists containing the x and y values
|
Returns the corner points of a scatter rectangle | def _get_corner_points(x0, y0, x1, y1):
"""
Returns the corner points of a scatter rectangle
:param x0: x-start
:param y0: y-lower
:param x1: x-end
:param y1: y-upper
:return: ([x], [y]), tuple of lists containing the x and y values
"""
return ([x0, x1, x1, x0], [y0, y0, y1, y1]) | [
"def",
"_get_corner_points",
"(",
"x0",
",",
"y0",
",",
"x1",
",",
"y1",
")",
":",
"return",
"(",
"[",
"x0",
",",
"x1",
",",
"x1",
",",
"x0",
"]",
",",
"[",
"y0",
",",
"y0",
",",
"y1",
",",
"y1",
"]",
")"
] | [
16,
0
] | [
27,
47
] | python | en | ['en', 'error', 'th'] | False |
validate_gantt | (df) |
Validates the inputted dataframe or list
|
Validates the inputted dataframe or list
| def validate_gantt(df):
"""
Validates the inputted dataframe or list
"""
if pd and isinstance(df, pd.core.frame.DataFrame):
# validate that df has all the required keys
for key in REQUIRED_GANTT_KEYS:
if key not in df:
raise exceptions.PlotlyError(
... | [
"def",
"validate_gantt",
"(",
"df",
")",
":",
"if",
"pd",
"and",
"isinstance",
"(",
"df",
",",
"pd",
".",
"core",
".",
"frame",
".",
"DataFrame",
")",
":",
"# validate that df has all the required keys",
"for",
"key",
"in",
"REQUIRED_GANTT_KEYS",
":",
"if",
... | [
30,
0
] | [
66,
13
] | python | en | ['en', 'error', 'th'] | False |
gantt | (
chart,
colors,
title,
bar_width,
showgrid_x,
showgrid_y,
height,
width,
tasks=None,
task_names=None,
data=None,
group_tasks=False,
show_hover_fill=True,
show_colorbar=True,
) |
Refer to create_gantt() for docstring
|
Refer to create_gantt() for docstring
| def gantt(
chart,
colors,
title,
bar_width,
showgrid_x,
showgrid_y,
height,
width,
tasks=None,
task_names=None,
data=None,
group_tasks=False,
show_hover_fill=True,
show_colorbar=True,
):
"""
Refer to create_gantt() for docstring
"""
if tasks is Non... | [
"def",
"gantt",
"(",
"chart",
",",
"colors",
",",
"title",
",",
"bar_width",
",",
"showgrid_x",
",",
"showgrid_y",
",",
"height",
",",
"width",
",",
"tasks",
"=",
"None",
",",
"task_names",
"=",
"None",
",",
"data",
"=",
"None",
",",
"group_tasks",
"="... | [
69,
0
] | [
253,
14
] | python | en | ['en', 'error', 'th'] | False |
gantt_colorscale | (
chart,
colors,
title,
index_col,
show_colorbar,
bar_width,
showgrid_x,
showgrid_y,
height,
width,
tasks=None,
task_names=None,
data=None,
group_tasks=False,
show_hover_fill=True,
) |
Refer to FigureFactory.create_gantt() for docstring
|
Refer to FigureFactory.create_gantt() for docstring
| def gantt_colorscale(
chart,
colors,
title,
index_col,
show_colorbar,
bar_width,
showgrid_x,
showgrid_y,
height,
width,
tasks=None,
task_names=None,
data=None,
group_tasks=False,
show_hover_fill=True,
):
"""
Refer to FigureFactory.create_gantt() for do... | [
"def",
"gantt_colorscale",
"(",
"chart",
",",
"colors",
",",
"title",
",",
"index_col",
",",
"show_colorbar",
",",
"bar_width",
",",
"showgrid_x",
",",
"showgrid_y",
",",
"height",
",",
"width",
",",
"tasks",
"=",
"None",
",",
"task_names",
"=",
"None",
",... | [
256,
0
] | [
595,
14
] | python | en | ['en', 'error', 'th'] | False |
gantt_dict | (
chart,
colors,
title,
index_col,
show_colorbar,
bar_width,
showgrid_x,
showgrid_y,
height,
width,
tasks=None,
task_names=None,
data=None,
group_tasks=False,
show_hover_fill=True,
) |
Refer to FigureFactory.create_gantt() for docstring
|
Refer to FigureFactory.create_gantt() for docstring
| def gantt_dict(
chart,
colors,
title,
index_col,
show_colorbar,
bar_width,
showgrid_x,
showgrid_y,
height,
width,
tasks=None,
task_names=None,
data=None,
group_tasks=False,
show_hover_fill=True,
):
"""
Refer to FigureFactory.create_gantt() for docstrin... | [
"def",
"gantt_dict",
"(",
"chart",
",",
"colors",
",",
"title",
",",
"index_col",
",",
"show_colorbar",
",",
"bar_width",
",",
"showgrid_x",
",",
"showgrid_y",
",",
"height",
",",
"width",
",",
"tasks",
"=",
"None",
",",
"task_names",
"=",
"None",
",",
"... | [
598,
0
] | [
799,
14
] | python | en | ['en', 'error', 'th'] | False |
create_gantt | (
df,
colors=None,
index_col=None,
show_colorbar=False,
reverse_colors=False,
title="Gantt Chart",
bar_width=0.2,
showgrid_x=False,
showgrid_y=False,
height=600,
width=None,
tasks=None,
task_names=None,
data=None,
group_tasks=False,
show_hover_fill=True,
) |
Returns figure for a gantt chart
:param (array|list) df: input data for gantt chart. Must be either a
a dataframe or a list. If dataframe, the columns must include
'Task', 'Start' and 'Finish'. Other columns can be included and
used for indexing. If a list, its elements must be diction... |
Returns figure for a gantt chart | def create_gantt(
df,
colors=None,
index_col=None,
show_colorbar=False,
reverse_colors=False,
title="Gantt Chart",
bar_width=0.2,
showgrid_x=False,
showgrid_y=False,
height=600,
width=None,
tasks=None,
task_names=None,
data=None,
group_tasks=False,
show_ho... | [
"def",
"create_gantt",
"(",
"df",
",",
"colors",
"=",
"None",
",",
"index_col",
"=",
"None",
",",
"show_colorbar",
"=",
"False",
",",
"reverse_colors",
"=",
"False",
",",
"title",
"=",
"\"Gantt Chart\"",
",",
"bar_width",
"=",
"0.2",
",",
"showgrid_x",
"="... | [
802,
0
] | [
1032,
22
] | python | en | ['en', 'error', 'th'] | False |
Tickformatstop.dtickrange | (self) |
range [*min*, *max*], where "min", "max" - dtick values which
describe some zoom level, it is possible to omit "min" or "max"
value by passing "null"
The 'dtickrange' property is an info array that may be specified as:
* a list or tuple of 2 elements where:
(0) The... |
range [*min*, *max*], where "min", "max" - dtick values which
describe some zoom level, it is possible to omit "min" or "max"
value by passing "null"
The 'dtickrange' property is an info array that may be specified as:
* a list or tuple of 2 elements where:
(0) The... | def dtickrange(self):
"""
range [*min*, *max*], where "min", "max" - dtick values which
describe some zoom level, it is possible to omit "min" or "max"
value by passing "null"
The 'dtickrange' property is an info array that may be specified as:
* a list or tuple... | [
"def",
"dtickrange",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"dtickrange\"",
"]"
] | [
15,
4
] | [
31,
33
] | python | en | ['en', 'error', 'th'] | False |
Tickformatstop.enabled | (self) |
Determines whether or not this stop is used. If `false`, this
stop is ignored even within its `dtickrange`.
The 'enabled' property must be specified as a bool
(either True, or False)
Returns
-------
bool
|
Determines whether or not this stop is used. If `false`, this
stop is ignored even within its `dtickrange`.
The 'enabled' property must be specified as a bool
(either True, or False) | def enabled(self):
"""
Determines whether or not this stop is used. If `false`, this
stop is ignored even within its `dtickrange`.
The 'enabled' property must be specified as a bool
(either True, or False)
Returns
-------
bool
"""
ret... | [
"def",
"enabled",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"enabled\"",
"]"
] | [
40,
4
] | [
52,
30
] | python | en | ['en', 'error', 'th'] | False |
Tickformatstop.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\"",
"]"
] | [
61,
4
] | [
79,
27
] | python | en | ['en', 'error', 'th'] | False |
Tickformatstop.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\"",
"]"
] | [
88,
4
] | [
107,
39
] | python | en | ['en', 'error', 'th'] | False |
Tickformatstop.value | (self) |
string - dtickformat for described zoom level, the same as
"tickformat"
The 'value' property is a string and must be specified as:
- A string
- A number that will be converted to a string
Returns
-------
str
|
string - dtickformat for described zoom level, the same as
"tickformat"
The 'value' property is a string and must be specified as:
- A string
- A number that will be converted to a string | def value(self):
"""
string - dtickformat for described zoom level, the same as
"tickformat"
The 'value' property is a string and must be specified as:
- A string
- A number that will be converted to a string
Returns
-------
str
"... | [
"def",
"value",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"value\"",
"]"
] | [
116,
4
] | [
129,
28
] | python | en | ['en', 'error', 'th'] | False |
Tickformatstop.__init__ | (
self,
arg=None,
dtickrange=None,
enabled=None,
name=None,
templateitemname=None,
value=None,
**kwargs
) |
Construct a new Tickformatstop object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.cone.colorbar.Tickformatstop`
dtickrange
range [*min*, *max*],... |
Construct a new Tickformatstop object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.cone.colorbar.Tickformatstop`
dtickrange
range [*min*, *max*],... | def __init__(
self,
arg=None,
dtickrange=None,
enabled=None,
name=None,
templateitemname=None,
value=None,
**kwargs
):
"""
Construct a new Tickformatstop object
Parameters
----------
arg
dict... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"dtickrange",
"=",
"None",
",",
"enabled",
"=",
"None",
",",
"name",
"=",
"None",
",",
"templateitemname",
"=",
"None",
",",
"value",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"sup... | [
172,
4
] | [
282,
34
] | python | en | ['en', 'error', 'th'] | False |
BaseIntroductionService.__init__ | (self, context: RequestContext) | Init admin service. | Init admin service. | def __init__(self, context: RequestContext):
"""Init admin service."""
self._context = context | [
"def",
"__init__",
"(",
"self",
",",
"context",
":",
"RequestContext",
")",
":",
"self",
".",
"_context",
"=",
"context"
] | [
17,
4
] | [
19,
31
] | python | en | ['en', 'it', 'en'] | True |
BaseIntroductionService.service_handler | (cls) | Quick accessor for conductor to use. | Quick accessor for conductor to use. | def service_handler(cls):
"""Quick accessor for conductor to use."""
async def get_instance(context: RequestContext):
"""Return registered server."""
return cls(context)
return get_instance | [
"def",
"service_handler",
"(",
"cls",
")",
":",
"async",
"def",
"get_instance",
"(",
"context",
":",
"RequestContext",
")",
":",
"\"\"\"Return registered server.\"\"\"",
"return",
"cls",
"(",
"context",
")",
"return",
"get_instance"
] | [
22,
4
] | [
29,
27
] | python | en | ['en', 'en', 'en'] | True |
BaseIntroductionService.start_introduction | (
self,
init_connection_id: str,
target_connection_id: str,
outbound_handler,
message: str = None,
) |
Start the introduction process between two connections.
Args:
init_connection_id: The connection initiating the request
target_connection_id: The connection which is asked for an invitation
outbound_handler: The outbound handler coroutine for sending a message
... |
Start the introduction process between two connections. | async def start_introduction(
self,
init_connection_id: str,
target_connection_id: str,
outbound_handler,
message: str = None,
):
"""
Start the introduction process between two connections.
Args:
init_connection_id: The connection initiati... | [
"async",
"def",
"start_introduction",
"(",
"self",
",",
"init_connection_id",
":",
"str",
",",
"target_connection_id",
":",
"str",
",",
"outbound_handler",
",",
"message",
":",
"str",
"=",
"None",
",",
")",
":"
] | [
32,
4
] | [
47,
11
] | python | en | ['en', 'error', 'th'] | False |
BaseIntroductionService.return_invitation | (
self, target_connection_id: str, invitation: Invitation, outbound_handler
) |
Handle the forwarding of an invitation to the responder.
Args:
target_connection_id: The ID of the connection sending the Invitation
invitation: The received Invitation message
outbound_handler: The outbound handler coroutine for sending a message
|
Handle the forwarding of an invitation to the responder. | async def return_invitation(
self, target_connection_id: str, invitation: Invitation, outbound_handler
):
"""
Handle the forwarding of an invitation to the responder.
Args:
target_connection_id: The ID of the connection sending the Invitation
invitation: The ... | [
"async",
"def",
"return_invitation",
"(",
"self",
",",
"target_connection_id",
":",
"str",
",",
"invitation",
":",
"Invitation",
",",
"outbound_handler",
")",
":"
] | [
50,
4
] | [
60,
11
] | python | en | ['en', 'error', 'th'] | False |
TestMenu.test_init | (self) | Test initialization. | Test initialization. | def test_init(self):
"""Test initialization."""
assert self.menu.title == self.test_menu_message["title"]
assert self.menu.description == self.test_menu_message["description"]
assert len(self.menu.options) == len(self.test_menu_message["options"]) | [
"def",
"test_init",
"(",
"self",
")",
":",
"assert",
"self",
".",
"menu",
".",
"title",
"==",
"self",
".",
"test_menu_message",
"[",
"\"title\"",
"]",
"assert",
"self",
".",
"menu",
".",
"description",
"==",
"self",
".",
"test_menu_message",
"[",
"\"descri... | [
49,
4
] | [
53,
79
] | python | co | ['es', 'co', 'en'] | False |
TestMenu.test_deserialize | (self, mock_menu_schema_load) |
Test deserialization.
|
Test deserialization.
| def test_deserialize(self, mock_menu_schema_load):
"""
Test deserialization.
"""
obj = {"obj": "obj"}
menu = Menu.deserialize(obj)
mock_menu_schema_load.assert_called_once_with(obj)
assert menu is mock_menu_schema_load.return_value | [
"def",
"test_deserialize",
"(",
"self",
",",
"mock_menu_schema_load",
")",
":",
"obj",
"=",
"{",
"\"obj\"",
":",
"\"obj\"",
"}",
"menu",
"=",
"Menu",
".",
"deserialize",
"(",
"obj",
")",
"mock_menu_schema_load",
".",
"assert_called_once_with",
"(",
"obj",
")",... | [
60,
4
] | [
69,
57
] | python | en | ['en', 'error', 'th'] | False |
TestMenu.test_serialize | (self, mock_menu_schema_dump) |
Test serialization.
|
Test serialization.
| def test_serialize(self, mock_menu_schema_dump):
"""
Test serialization.
"""
menu_dict = self.menu.serialize()
mock_menu_schema_dump.assert_called_once_with(self.menu)
assert menu_dict is mock_menu_schema_dump.return_value | [
"def",
"test_serialize",
"(",
"self",
",",
"mock_menu_schema_dump",
")",
":",
"menu_dict",
"=",
"self",
".",
"menu",
".",
"serialize",
"(",
")",
"mock_menu_schema_dump",
".",
"assert_called_once_with",
"(",
"self",
".",
"menu",
")",
"assert",
"menu_dict",
"is",
... | [
72,
4
] | [
78,
62
] | python | en | ['en', 'error', 'th'] | False |
Match.report_live_scores | (self, scores_csv: str) | report scores without giving a winner yet
|methcoro|
Args:
scores_csv: Comma separated set/game scores with player 1 score first (e.g. "1-3,3-0,3-2")
Raises:
ValueError: scores_csv has a wrong format
APIException
| report scores without giving a winner yet | async def report_live_scores(self, scores_csv: str):
""" report scores without giving a winner yet
|methcoro|
Args:
scores_csv: Comma separated set/game scores with player 1 score first (e.g. "1-3,3-0,3-2")
Raises:
ValueError: scores_csv has a wrong format
... | [
"async",
"def",
"report_live_scores",
"(",
"self",
",",
"scores_csv",
":",
"str",
")",
":",
"await",
"self",
".",
"_report",
"(",
"scores_csv",
")"
] | [
72,
4
] | [
85,
38
] | python | en | ['en', 'en', 'en'] | True |
Match.report_winner | (self, winner: Participant, scores_csv: str) | report scores and give a winner
|methcoro|
Args:
winner: :class:Participant instance
scores_csv: Comma separated set/game scores with player 1 score first (e.g. "1-3,3-0,3-2")
Raises:
ValueError: scores_csv has a wrong format
APIException
... | report scores and give a winner | async def report_winner(self, winner: Participant, scores_csv: str):
""" report scores and give a winner
|methcoro|
Args:
winner: :class:Participant instance
scores_csv: Comma separated set/game scores with player 1 score first (e.g. "1-3,3-0,3-2")
Raises:
... | [
"async",
"def",
"report_winner",
"(",
"self",
",",
"winner",
":",
"Participant",
",",
"scores_csv",
":",
"str",
")",
":",
"await",
"self",
".",
"_report",
"(",
"scores_csv",
",",
"winner",
".",
"_id",
")"
] | [
87,
4
] | [
101,
50
] | python | en | ['en', 'en', 'en'] | True |
Match.report_tie | (self, scores_csv: str) | report tie if applicable (Round Robin and Swiss)
|methcoro|
Args:
scores_csv: Comma separated set/game scores with player 1 score first (e.g. "1-3,3-0,3-2")
Raises:
APIException
| report tie if applicable (Round Robin and Swiss) | async def report_tie(self, scores_csv: str):
""" report tie if applicable (Round Robin and Swiss)
|methcoro|
Args:
scores_csv: Comma separated set/game scores with player 1 score first (e.g. "1-3,3-0,3-2")
Raises:
APIException
"""
await self._r... | [
"async",
"def",
"report_tie",
"(",
"self",
",",
"scores_csv",
":",
"str",
")",
":",
"await",
"self",
".",
"_report",
"(",
"scores_csv",
",",
"'tie'",
")"
] | [
103,
4
] | [
115,
45
] | python | en | ['en', 'en', 'en'] | True |
Match.reopen | (self) | Reopens a match that was marked completed, automatically resetting matches that follow it
|methcoro|
Raises:
APIException
| Reopens a match that was marked completed, automatically resetting matches that follow it | async def reopen(self):
""" Reopens a match that was marked completed, automatically resetting matches that follow it
|methcoro|
Raises:
APIException
"""
res = await self.connection('POST', 'tournaments/{}/matches/{}/reopen'.format(self._tournament_id, self._id))
... | [
"async",
"def",
"reopen",
"(",
"self",
")",
":",
"res",
"=",
"await",
"self",
".",
"connection",
"(",
"'POST'",
",",
"'tournaments/{}/matches/{}/reopen'",
".",
"format",
"(",
"self",
".",
"_tournament_id",
",",
"self",
".",
"_id",
")",
")",
"self",
".",
... | [
117,
4
] | [
127,
36
] | python | en | ['en', 'en', 'en'] | True |
Match.mark_as_underway | (self) | Marks the match as underway
|methcoro|
Raises:
APIException
| Marks the match as underway | async def mark_as_underway(self):
""" Marks the match as underway
|methcoro|
Raises:
APIException
"""
res = await self.connection('POST', 'tournaments/{}/matches/{}/mark_as_underway'.format(self._tournament_id, self._id))
self._refresh_from_json(res) | [
"async",
"def",
"mark_as_underway",
"(",
"self",
")",
":",
"res",
"=",
"await",
"self",
".",
"connection",
"(",
"'POST'",
",",
"'tournaments/{}/matches/{}/mark_as_underway'",
".",
"format",
"(",
"self",
".",
"_tournament_id",
",",
"self",
".",
"_id",
")",
")",... | [
129,
4
] | [
139,
36
] | python | en | ['en', 'en', 'en'] | True |
Match.unmark_as_underway | (self) | Unmarks the match as underway
|methcoro|
Raises:
APIException
| Unmarks the match as underway | async def unmark_as_underway(self):
""" Unmarks the match as underway
|methcoro|
Raises:
APIException
"""
res = await self.connection('POST', 'tournaments/{}/matches/{}/unmark_as_underway'.format(self._tournament_id, self._id))
self._refresh_from_json(res) | [
"async",
"def",
"unmark_as_underway",
"(",
"self",
")",
":",
"res",
"=",
"await",
"self",
".",
"connection",
"(",
"'POST'",
",",
"'tournaments/{}/matches/{}/unmark_as_underway'",
".",
"format",
"(",
"self",
".",
"_tournament_id",
",",
"self",
".",
"_id",
")",
... | [
141,
4
] | [
151,
36
] | python | en | ['en', 'en', 'en'] | True |
Match.change_votes | (self, player1_votes: int = None, player2_votes: int = None, add: bool = False) | change the votes for either player
|methcoro|
The votes will be overriden by default,
If `add` is set to True, another API request call will be made to ensure the local is up to date with
the Challonge server. Then the votes given in argument will be added to those on the server
... | change the votes for either player | async def change_votes(self, player1_votes: int = None, player2_votes: int = None, add: bool = False):
""" change the votes for either player
|methcoro|
The votes will be overriden by default,
If `add` is set to True, another API request call will be made to ensure the local is up to da... | [
"async",
"def",
"change_votes",
"(",
"self",
",",
"player1_votes",
":",
"int",
"=",
"None",
",",
"player2_votes",
":",
"int",
"=",
"None",
",",
"add",
":",
"bool",
"=",
"False",
")",
":",
"assert_or_raise",
"(",
"player1_votes",
"is",
"not",
"None",
"or"... | [
153,
4
] | [
193,
36
] | python | en | ['en', 'en', 'en'] | True |
Match.attach_file | (self, file_path: str, description: str = None) | add a file as an attachment
|methcoro|
Warning:
|unstable|
Args:
file_path: path to the file you want to add
description: *optional* description for your attachment
Returns:
Attachment:
Raises:
ValueError: file_pat... | add a file as an attachment | async def attach_file(self, file_path: str, description: str = None) -> Attachment:
""" add a file as an attachment
|methcoro|
Warning:
|unstable|
Args:
file_path: path to the file you want to add
description: *optional* description for your attachm... | [
"async",
"def",
"attach_file",
"(",
"self",
",",
"file_path",
":",
"str",
",",
"description",
":",
"str",
"=",
"None",
")",
"->",
"Attachment",
":",
"with",
"open",
"(",
"file_path",
",",
"'rb'",
")",
"as",
"f",
":",
"return",
"await",
"self",
".",
"... | [
205,
4
] | [
226,
60
] | python | en | ['en', 'en', 'en'] | True |
Match.attach_url | (self, url: str, description: str = None) | add an url as an attachment
|methcoro|
Args:
url: url you want to add
description: *optional* description for your attachment
Returns:
Attachment:
Raises:
ValueError: url must not be None
APIException
| add an url as an attachment | async def attach_url(self, url: str, description: str = None) -> Attachment:
""" add an url as an attachment
|methcoro|
Args:
url: url you want to add
description: *optional* description for your attachment
Returns:
Attachment:
Raises:
... | [
"async",
"def",
"attach_url",
"(",
"self",
",",
"url",
":",
"str",
",",
"description",
":",
"str",
"=",
"None",
")",
"->",
"Attachment",
":",
"return",
"await",
"self",
".",
"_attach",
"(",
"url",
"=",
"url",
",",
"description",
"=",
"description",
")"... | [
228,
4
] | [
245,
67
] | python | en | ['en', 'lb', 'en'] | True |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.