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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
ColorBar.yanchor | (self) |
Sets this color bar's vertical position anchor This anchor
binds the `y` position to the "top", "middle" or "bottom" of
the color bar.
The 'yanchor' property is an enumeration that may be specified as:
- One of the following enumeration values:
['top', 'mi... |
Sets this color bar's vertical position anchor This anchor
binds the `y` position to the "top", "middle" or "bottom" of
the color bar.
The 'yanchor' property is an enumeration that may be specified as:
- One of the following enumeration values:
['top', 'mi... | def yanchor(self):
"""
Sets this color bar's vertical position anchor This anchor
binds the `y` position to the "top", "middle" or "bottom" of
the color bar.
The 'yanchor' property is an enumeration that may be specified as:
- One of the following enumeration value... | [
"def",
"yanchor",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"yanchor\"",
"]"
] | [
1240,
4
] | [
1254,
30
] | python | en | ['en', 'error', 'th'] | False |
ColorBar.ypad | (self) |
Sets the amount of padding (in px) along the y direction.
The 'ypad' property is a number and may be specified as:
- An int or float in the interval [0, inf]
Returns
-------
int|float
|
Sets the amount of padding (in px) along the y direction.
The 'ypad' property is a number and may be specified as:
- An int or float in the interval [0, inf] | def ypad(self):
"""
Sets the amount of padding (in px) along the y direction.
The 'ypad' property is a number and may be specified as:
- An int or float in the interval [0, inf]
Returns
-------
int|float
"""
return self["ypad"] | [
"def",
"ypad",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"ypad\"",
"]"
] | [
1263,
4
] | [
1274,
27
] | python | en | ['en', 'error', 'th'] | False |
ColorBar.__init__ | (
self,
arg=None,
bgcolor=None,
bordercolor=None,
borderwidth=None,
dtick=None,
exponentformat=None,
len=None,
lenmode=None,
nticks=None,
outlinecolor=None,
outlinewidth=None,
separatethousands=None,
showexpo... |
Construct a new ColorBar object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.histogram2d.ColorBar`
bgcolor
Sets the color of padded area.
... |
Construct a new ColorBar object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.histogram2d.ColorBar`
bgcolor
Sets the color of padded area.
... | def __init__(
self,
arg=None,
bgcolor=None,
bordercolor=None,
borderwidth=None,
dtick=None,
exponentformat=None,
len=None,
lenmode=None,
nticks=None,
outlinecolor=None,
outlinewidth=None,
separatethousands=None,
... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"bgcolor",
"=",
"None",
",",
"bordercolor",
"=",
"None",
",",
"borderwidth",
"=",
"None",
",",
"dtick",
"=",
"None",
",",
"exponentformat",
"=",
"None",
",",
"len",
"=",
"None",
",",
"lenm... | [
1481,
4
] | [
1940,
34
] | python | en | ['en', 'error', 'th'] | False |
Font.color | (self) |
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
- A named CSS color:
... |
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
- A named CSS color:
... | def color(self):
"""
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
- A name... | [
"def",
"color",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"color\"",
"]"
] | [
15,
4
] | [
64,
28
] | python | en | ['en', 'error', 'th'] | False |
Font.colorsrc | (self) |
Sets the source reference on Chart Studio Cloud for color .
The 'colorsrc' 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 color .
The 'colorsrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def colorsrc(self):
"""
Sets the source reference on Chart Studio Cloud for color .
The 'colorsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["colorsrc"] | [
"def",
"colorsrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"colorsrc\"",
"]"
] | [
73,
4
] | [
84,
31
] | python | en | ['en', 'error', 'th'] | False |
Font.family | (self) |
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts ... |
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts ... | def family(self):
"""
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
prefer... | [
"def",
"family",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"family\"",
"]"
] | [
93,
4
] | [
116,
29
] | python | en | ['en', 'error', 'th'] | False |
Font.familysrc | (self) |
Sets the source reference on Chart Studio Cloud for family .
The 'familysrc' 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 family .
The 'familysrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def familysrc(self):
"""
Sets the source reference on Chart Studio Cloud for family .
The 'familysrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["familysrc"] | [
"def",
"familysrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"familysrc\"",
"]"
] | [
125,
4
] | [
136,
32
] | python | en | ['en', 'error', 'th'] | False |
Font.size | (self) |
The 'size' property is a number and may be specified as:
- An int or float in the interval [1, inf]
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
int|float|numpy.ndarray
|
The 'size' property is a number and may be specified as:
- An int or float in the interval [1, inf]
- A tuple, list, or one-dimensional numpy array of the above | def size(self):
"""
The 'size' property is a number and may be specified as:
- An int or float in the interval [1, inf]
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
int|float|numpy.ndarray
"""
return self["size"... | [
"def",
"size",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"size\"",
"]"
] | [
145,
4
] | [
155,
27
] | python | en | ['en', 'error', 'th'] | False |
Font.sizesrc | (self) |
Sets the source reference on Chart Studio Cloud for size .
The 'sizesrc' 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 size .
The 'sizesrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def sizesrc(self):
"""
Sets the source reference on Chart Studio Cloud for size .
The 'sizesrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["sizesrc"] | [
"def",
"sizesrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"sizesrc\"",
"]"
] | [
164,
4
] | [
175,
30
] | python | en | ['en', 'error', 'th'] | False |
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.scatterpolar.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 |
TagForm.__init__ | (self, *args, **kwargs) |
If we have a tag, then we'll prepopulate our instance with the fields we'd expect it
to have based on the tag. tag_key, tag_category, tag_type, and tag_data all refer to
the corresponding tag fields. The initial data of the form fields will similarly be
populated.
|
If we have a tag, then we'll prepopulate our instance with the fields we'd expect it
to have based on the tag. tag_key, tag_category, tag_type, and tag_data all refer to
the corresponding tag fields. The initial data of the form fields will similarly be
populated.
| def __init__(self, *args, **kwargs):
"""
If we have a tag, then we'll prepopulate our instance with the fields we'd expect it
to have based on the tag. tag_key, tag_category, tag_type, and tag_data all refer to
the corresponding tag fields. The initial data of the form fields will sim... | [
"def",
"__init__",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"super",
"(",
"TagForm",
",",
"self",
")",
".",
"__init__",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
"tagkey",
"=",
"None",
"tagcategory",
"=",
"None",
"t... | [
43,
4
] | [
67,
40
] | python | en | ['en', 'error', 'th'] | False |
TagForm.save | (self, commit=True) |
One thing we want to do here is the or None checks, because forms are saved with an empty
string rather than null from forms, usually, and the Handlers may handle empty strings
differently than None objects. So for consistency with how things are handled in game,
we'll try to make sure ... |
One thing we want to do here is the or None checks, because forms are saved with an empty
string rather than null from forms, usually, and the Handlers may handle empty strings
differently than None objects. So for consistency with how things are handled in game,
we'll try to make sure ... | def save(self, commit=True):
"""
One thing we want to do here is the or None checks, because forms are saved with an empty
string rather than null from forms, usually, and the Handlers may handle empty strings
differently than None objects. So for consistency with how things are handled ... | [
"def",
"save",
"(",
"self",
",",
"commit",
"=",
"True",
")",
":",
"# we are spoofing a tag for the Handler that will be called",
"# instance = super(TagForm, self).save(commit=False)",
"instance",
"=",
"self",
".",
"instance",
"instance",
".",
"tag_key",
"=",
"self",
".",... | [
69,
4
] | [
83,
23
] | python | en | ['en', 'error', 'th'] | False |
TagInline.get_formset | (self, request, obj=None, **kwargs) |
get_formset has to return a class, but we need to make the class that we return
know about the related_field that we'll use. Returning the class itself rather than
a proxy isn't threadsafe, since it'd be the base class and would change if multiple
people used the admin at the same time
... |
get_formset has to return a class, but we need to make the class that we return
know about the related_field that we'll use. Returning the class itself rather than
a proxy isn't threadsafe, since it'd be the base class and would change if multiple
people used the admin at the same time
... | def get_formset(self, request, obj=None, **kwargs):
"""
get_formset has to return a class, but we need to make the class that we return
know about the related_field that we'll use. Returning the class itself rather than
a proxy isn't threadsafe, since it'd be the base class and would cha... | [
"def",
"get_formset",
"(",
"self",
",",
"request",
",",
"obj",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"formset",
"=",
"super",
"(",
"TagInline",
",",
"self",
")",
".",
"get_formset",
"(",
"request",
",",
"obj",
",",
"*",
"*",
"kwargs",
")"... | [
138,
4
] | [
150,
27
] | python | en | ['en', 'error', 'th'] | False |
AttributeForm.__init__ | (self, *args, **kwargs) |
If we have an Attribute, then we'll prepopulate our instance with the fields we'd expect it
to have based on the Attribute. attr_key, attr_category, attr_value, attr_strvalue, attr_type,
and attr_lockstring all refer to the corresponding Attribute fields. The initial data of the form fields ... |
If we have an Attribute, then we'll prepopulate our instance with the fields we'd expect it
to have based on the Attribute. attr_key, attr_category, attr_value, attr_strvalue, attr_type,
and attr_lockstring all refer to the corresponding Attribute fields. The initial data of the form fields ... | def __init__(self, *args, **kwargs):
"""
If we have an Attribute, then we'll prepopulate our instance with the fields we'd expect it
to have based on the Attribute. attr_key, attr_category, attr_value, attr_strvalue, attr_type,
and attr_lockstring all refer to the corresponding Attrib... | [
"def",
"__init__",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"super",
"(",
"AttributeForm",
",",
"self",
")",
".",
"__init__",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
"attr_key",
"=",
"None",
"attr_category",
"=",
"N... | [
184,
4
] | [
221,
55
] | python | en | ['en', 'error', 'th'] | False |
AttributeForm.save | (self, commit=True) |
One thing we want to do here is the or None checks, because forms are saved with an empty
string rather than null from forms, usually, and the Handlers may handle empty strings
differently than None objects. So for consistency with how things are handled in game,
we'll try to make sure ... |
One thing we want to do here is the or None checks, because forms are saved with an empty
string rather than null from forms, usually, and the Handlers may handle empty strings
differently than None objects. So for consistency with how things are handled in game,
we'll try to make sure ... | def save(self, commit=True):
"""
One thing we want to do here is the or None checks, because forms are saved with an empty
string rather than null from forms, usually, and the Handlers may handle empty strings
differently than None objects. So for consistency with how things are handled ... | [
"def",
"save",
"(",
"self",
",",
"commit",
"=",
"True",
")",
":",
"# we are spoofing an Attribute for the Handler that will be called",
"instance",
"=",
"self",
".",
"instance",
"instance",
".",
"attr_key",
"=",
"self",
".",
"cleaned_data",
"[",
"'attr_key'",
"]",
... | [
223,
4
] | [
240,
23
] | python | en | ['en', 'error', 'th'] | False |
AttributeForm.clean_attr_value | (self) |
Prevent Sets from being cleaned due to literal_eval failing on them. Otherwise they will be turned into
unicode.
|
Prevent Sets from being cleaned due to literal_eval failing on them. Otherwise they will be turned into
unicode.
| def clean_attr_value(self):
"""
Prevent Sets from being cleaned due to literal_eval failing on them. Otherwise they will be turned into
unicode.
"""
data = self.cleaned_data['attr_value']
initial = self.instance.attr_value
if isinstance(initial, set) or isinstance... | [
"def",
"clean_attr_value",
"(",
"self",
")",
":",
"data",
"=",
"self",
".",
"cleaned_data",
"[",
"'attr_value'",
"]",
"initial",
"=",
"self",
".",
"instance",
".",
"attr_value",
"if",
"isinstance",
"(",
"initial",
",",
"set",
")",
"or",
"isinstance",
"(",
... | [
242,
4
] | [
251,
19
] | python | en | ['en', 'error', 'th'] | False |
AttributeInline.get_formset | (self, request, obj=None, **kwargs) |
get_formset has to return a class, but we need to make the class that we return
know about the related_field that we'll use. Returning the class itself rather than
a proxy isn't threadsafe, since it'd be the base class and would change if multiple
people used the admin at the same time
... |
get_formset has to return a class, but we need to make the class that we return
know about the related_field that we'll use. Returning the class itself rather than
a proxy isn't threadsafe, since it'd be the base class and would change if multiple
people used the admin at the same time
... | def get_formset(self, request, obj=None, **kwargs):
"""
get_formset has to return a class, but we need to make the class that we return
know about the related_field that we'll use. Returning the class itself rather than
a proxy isn't threadsafe, since it'd be the base class and would cha... | [
"def",
"get_formset",
"(",
"self",
",",
"request",
",",
"obj",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"formset",
"=",
"super",
"(",
"AttributeInline",
",",
"self",
")",
".",
"get_formset",
"(",
"request",
",",
"obj",
",",
"*",
"*",
"kwargs",... | [
306,
4
] | [
319,
27
] | python | en | ['en', 'error', 'th'] | False |
allreduce_grads | (params, coalesce=True, bucket_size_mb=-1) | Allreduce gradients.
Args:
params (list[torch.Parameters]): List of parameters of a model
coalesce (bool, optional): Whether allreduce parameters as a whole.
Defaults to True.
bucket_size_mb (int, optional): Size of bucket, the unit is MB.
Defaults to -1.
| Allreduce gradients. | def allreduce_grads(params, coalesce=True, bucket_size_mb=-1):
"""Allreduce gradients.
Args:
params (list[torch.Parameters]): List of parameters of a model
coalesce (bool, optional): Whether allreduce parameters as a whole.
Defaults to True.
bucket_size_mb (int, optional): S... | [
"def",
"allreduce_grads",
"(",
"params",
",",
"coalesce",
"=",
"True",
",",
"bucket_size_mb",
"=",
"-",
"1",
")",
":",
"grads",
"=",
"[",
"param",
".",
"grad",
".",
"data",
"for",
"param",
"in",
"params",
"if",
"param",
".",
"requires_grad",
"and",
"pa... | [
31,
0
] | [
50,
52
] | python | de | ['de', 'la', 'en'] | False |
_py_code | (caller, buf) |
Execute the buffer.
|
Execute the buffer.
| def _py_code(caller, buf):
"""
Execute the buffer.
"""
measure_time = caller.db._py_measure_time
string = "Executing code%s ..." % (
" (measure timing)" if measure_time else "")
caller.msg(string)
_run_code_snippet(caller, buf, mode="exec",
measure_time=measure_... | [
"def",
"_py_code",
"(",
"caller",
",",
"buf",
")",
":",
"measure_time",
"=",
"caller",
".",
"db",
".",
"_py_measure_time",
"string",
"=",
"\"Executing code%s ...\"",
"%",
"(",
"\" (measure timing)\"",
"if",
"measure_time",
"else",
"\"\"",
")",
"caller",
".",
"... | [
128,
0
] | [
139,
15
] | python | en | ['en', 'error', 'th'] | False |
_run_code_snippet | (caller, pycode, mode="eval", measure_time=False,
show_input=True) |
Run code and try to display information to the caller.
Args:
caller (Object): the caller.
pycode (str): the Python code to run.
m_time (bool, optional): should we measure the time of execution?
show_input (bookl, optional): should we display the input?
|
Run code and try to display information to the caller. | def _run_code_snippet(caller, pycode, mode="eval", measure_time=False,
show_input=True):
"""
Run code and try to display information to the caller.
Args:
caller (Object): the caller.
pycode (str): the Python code to run.
m_time (bool, optional): should we measu... | [
"def",
"_run_code_snippet",
"(",
"caller",
",",
"pycode",
",",
"mode",
"=",
"\"eval\"",
",",
"measure_time",
"=",
"False",
",",
"show_input",
"=",
"True",
")",
":",
"# Try to retrieve the session",
"session",
"=",
"caller",
"if",
"hasattr",
"(",
"caller",
",",... | [
147,
0
] | [
212,
50
] | python | en | ['en', 'error', 'th'] | False |
format_script_list | (scripts) | Takes a list of scripts and formats the output. | Takes a list of scripts and formats the output. | def format_script_list(scripts):
"""Takes a list of scripts and formats the output."""
if not scripts:
return "<No scripts>"
table = EvTable("|wdbref|n", "|wobj|n", "|wkey|n", "|wintval|n", "|wnext|n",
"|wrept|n", "|wdb", "|wtypeclass|n", "|wdesc|n",
align='r... | [
"def",
"format_script_list",
"(",
"scripts",
")",
":",
"if",
"not",
"scripts",
":",
"return",
"\"<No scripts>\"",
"table",
"=",
"EvTable",
"(",
"\"|wdbref|n\"",
",",
"\"|wobj|n\"",
",",
"\"|wkey|n\"",
",",
"\"|wintval|n\"",
",",
"\"|wnext|n\"",
",",
"\"|wrept|n\""... | [
275,
0
] | [
305,
23
] | python | en | ['en', 'en', 'en'] | True |
CmdReload.func | (self) |
Reload the system.
|
Reload the system.
| def func(self):
"""
Reload the system.
"""
reason = ""
if self.args:
reason = "(Reason: %s) " % self.args.rstrip(".")
SESSIONS.announce_all(" Server restart initiated %s..." % reason)
SESSIONS.portal_restart_server() | [
"def",
"func",
"(",
"self",
")",
":",
"reason",
"=",
"\"\"",
"if",
"self",
".",
"args",
":",
"reason",
"=",
"\"(Reason: %s) \"",
"%",
"self",
".",
"args",
".",
"rstrip",
"(",
"\".\"",
")",
"SESSIONS",
".",
"announce_all",
"(",
"\" Server restart initiated ... | [
52,
4
] | [
60,
40
] | python | en | ['en', 'error', 'th'] | False |
CmdReset.func | (self) |
Reload the system.
|
Reload the system.
| def func(self):
"""
Reload the system.
"""
SESSIONS.announce_all(" Server resetting/restarting ...")
SESSIONS.portal_reset_server() | [
"def",
"func",
"(",
"self",
")",
":",
"SESSIONS",
".",
"announce_all",
"(",
"\" Server resetting/restarting ...\"",
")",
"SESSIONS",
".",
"portal_reset_server",
"(",
")"
] | [
88,
4
] | [
93,
38
] | python | en | ['en', 'error', 'th'] | False |
CmdShutdown.func | (self) | Define function | Define function | def func(self):
"""Define function"""
# Only allow shutdown if caller has session
if not self.caller.sessions.get():
return
self.msg('Shutting down server ...')
announcement = "\nServer is being SHUT DOWN!\n"
if self.args:
announcement += "%s\n" % ... | [
"def",
"func",
"(",
"self",
")",
":",
"# Only allow shutdown if caller has session",
"if",
"not",
"self",
".",
"caller",
".",
"sessions",
".",
"get",
"(",
")",
":",
"return",
"self",
".",
"msg",
"(",
"'Shutting down server ...'",
")",
"announcement",
"=",
"\"\... | [
110,
4
] | [
121,
34
] | python | da | ['da', 'de', 'en'] | False |
CmdPy.func | (self) | hook function | hook function | def func(self):
"""hook function"""
caller = self.caller
pycode = self.args
if "edit" in self.switches:
caller.db._py_measure_time = "time" in self.switches
EvEditor(self.caller, loadfunc=_py_load, savefunc=_py_code,
quitfunc=_py_quit, key="... | [
"def",
"func",
"(",
"self",
")",
":",
"caller",
"=",
"self",
".",
"caller",
"pycode",
"=",
"self",
".",
"args",
"if",
"\"edit\"",
"in",
"self",
".",
"switches",
":",
"caller",
".",
"db",
".",
"_py_measure_time",
"=",
"\"time\"",
"in",
"self",
".",
"s... | [
251,
4
] | [
269,
82
] | python | en | ['en', 'af', 'en'] | False |
CmdScripts.func | (self) | implement method | implement method | def func(self):
"""implement method"""
caller = self.caller
args = self.args
if args:
if "start" in self.switches:
# global script-start mode
new_script = create.create_script(args)
if new_script:
caller.ms... | [
"def",
"func",
"(",
"self",
")",
":",
"caller",
"=",
"self",
".",
"caller",
"args",
"=",
"self",
".",
"args",
"if",
"args",
":",
"if",
"\"start\"",
"in",
"self",
".",
"switches",
":",
"# global script-start mode",
"new_script",
"=",
"create",
".",
"creat... | [
335,
4
] | [
398,
26
] | python | en | ['en', 'sr', 'en'] | False |
CmdObjects.func | (self) | Implement the command | Implement the command | def func(self):
"""Implement the command"""
caller = self.caller
nlim = int(self.args) if self.args and self.args.isdigit() else 10
nobjs = ObjectDB.objects.count()
base_char_typeclass = settings.BASE_CHARACTER_TYPECLASS
nchars = ObjectDB.objects.filter(db_typeclass_path... | [
"def",
"func",
"(",
"self",
")",
":",
"caller",
"=",
"self",
".",
"caller",
"nlim",
"=",
"int",
"(",
"self",
".",
"args",
")",
"if",
"self",
".",
"args",
"and",
"self",
".",
"args",
".",
"isdigit",
"(",
")",
"else",
"10",
"nobjs",
"=",
"ObjectDB"... | [
417,
4
] | [
457,
26
] | python | en | ['en', 'en', 'en'] | True |
CmdAccounts.func | (self) | List the accounts | List the accounts | def func(self):
"""List the accounts"""
caller = self.caller
if self.args and self.args.isdigit():
nlim = int(self.args)
else:
nlim = 10
naccounts = AccountDB.objects.count()
# typeclass table
dbtotals = AccountDB.objects.object_totals()... | [
"def",
"func",
"(",
"self",
")",
":",
"caller",
"=",
"self",
".",
"caller",
"if",
"self",
".",
"args",
"and",
"self",
".",
"args",
".",
"isdigit",
"(",
")",
":",
"nlim",
"=",
"int",
"(",
"self",
".",
"args",
")",
"else",
":",
"nlim",
"=",
"10",... | [
476,
4
] | [
500,
26
] | python | en | ['en', 'ga', 'en'] | True |
CmdService.func | (self) | Implement command | Implement command | def func(self):
"""Implement command"""
caller = self.caller
switches = self.switches
if switches and switches[0] not in ("list", "start", "stop", "delete"):
caller.msg("Usage: @service/<list|start|stop|delete> [servicename]")
return
# get all services
... | [
"def",
"func",
"(",
"self",
")",
":",
"caller",
"=",
"self",
".",
"caller",
"switches",
"=",
"self",
".",
"switches",
"if",
"switches",
"and",
"switches",
"[",
"0",
"]",
"not",
"in",
"(",
"\"list\"",
",",
"\"start\"",
",",
"\"stop\"",
",",
"\"delete\""... | [
529,
4
] | [
594,
34
] | python | en | ['en', 'en', 'en'] | False |
CmdAbout.func | (self) | Display information about server or target | Display information about server or target | def func(self):
"""Display information about server or target"""
string = """
|cEvennia|n {version}|n
MU* development system
|wLicence|n https://opensource.org/licenses/BSD-3-Clause
|wWeb|n http://www.evennia.com
|wIrc|n #evennia on irc.freenode.net:6667
... | [
"def",
"func",
"(",
"self",
")",
":",
"string",
"=",
"\"\"\"\n |cEvennia|n {version}|n\n MU* development system\n\n |wLicence|n https://opensource.org/licenses/BSD-3-Clause\n |wWeb|n http://www.evennia.com\n |wIrc|n #evennia on irc.freenode.net:6667\n ... | [
612,
4
] | [
635,
31
] | python | en | ['en', 'en', 'en'] | True |
CmdTime.func | (self) | Show server time data in a table. | Show server time data in a table. | def func(self):
"""Show server time data in a table."""
table1 = EvTable("|wServer time", "", align="l", width=78)
table1.add_row("Current uptime", utils.time_format(gametime.uptime(), 3))
table1.add_row("Total runtime", utils.time_format(gametime.runtime(), 2))
table1.add_row("F... | [
"def",
"func",
"(",
"self",
")",
":",
"table1",
"=",
"EvTable",
"(",
"\"|wServer time\"",
",",
"\"\"",
",",
"align",
"=",
"\"l\"",
",",
"width",
"=",
"78",
")",
"table1",
".",
"add_row",
"(",
"\"Current uptime\"",
",",
"utils",
".",
"time_format",
"(",
... | [
653,
4
] | [
667,
65
] | python | en | ['en', 'en', 'en'] | True |
Font.color | (self) |
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
- A named CSS color:
... |
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
- A named CSS color:
... | def color(self):
"""
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
- A name... | [
"def",
"color",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"color\"",
"]"
] | [
15,
4
] | [
63,
28
] | python | en | ['en', 'error', 'th'] | False |
Font.family | (self) |
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts ... |
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts ... | def family(self):
"""
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
prefer... | [
"def",
"family",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"family\"",
"]"
] | [
72,
4
] | [
94,
29
] | python | en | ['en', 'error', 'th'] | False |
Font.size | (self) |
The 'size' property is a number and may be specified as:
- An int or float in the interval [1, inf]
Returns
-------
int|float
|
The 'size' property is a number and may be specified as:
- An int or float in the interval [1, inf] | def size(self):
"""
The 'size' property is a number and may be specified as:
- An int or float in the interval [1, inf]
Returns
-------
int|float
"""
return self["size"] | [
"def",
"size",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"size\"",
"]"
] | [
103,
4
] | [
112,
27
] | python | en | ['en', 'error', 'th'] | False |
Font.__init__ | (self, arg=None, color=None, family=None, size=None, **kwargs) |
Construct a new Font object
Sets the font of the slider step labels.
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.layout.slider.Font`
color
... |
Construct a new Font object
Sets the font of the slider step labels. | def __init__(self, arg=None, color=None, family=None, size=None, **kwargs):
"""
Construct a new Font object
Sets the font of the slider step labels.
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",
"(",
"Font",
",",
"self",
")",
".",
"__init__",
"(",
"\"font\"",... | [
143,
4
] | [
226,
34
] | python | en | ['en', 'error', 'th'] | False |
Font.color | (self) |
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
- A named CSS color:
... |
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
- A named CSS color:
... | def color(self):
"""
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
- A name... | [
"def",
"color",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"color\"",
"]"
] | [
15,
4
] | [
63,
28
] | python | en | ['en', 'error', 'th'] | False |
Font.family | (self) |
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts ... |
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts ... | def family(self):
"""
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
prefer... | [
"def",
"family",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"family\"",
"]"
] | [
72,
4
] | [
94,
29
] | python | en | ['en', 'error', 'th'] | False |
Font.size | (self) |
The 'size' property is a number and may be specified as:
- An int or float in the interval [1, inf]
Returns
-------
int|float
|
The 'size' property is a number and may be specified as:
- An int or float in the interval [1, inf] | def size(self):
"""
The 'size' property is a number and may be specified as:
- An int or float in the interval [1, inf]
Returns
-------
int|float
"""
return self["size"] | [
"def",
"size",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"size\"",
"]"
] | [
103,
4
] | [
112,
27
] | python | en | ['en', 'error', 'th'] | False |
Font.__init__ | (self, arg=None, color=None, family=None, size=None, **kwargs) |
Construct a new Font object
Sets this color bar's title font. Note that the title's font
used to be set by the now deprecated `titlefont` attribute.
Parameters
----------
arg
dict of properties compatible with this constructor or
an inst... |
Construct a new Font object
Sets this color bar's title font. Note that the title's font
used to be set by the now deprecated `titlefont` attribute. | def __init__(self, arg=None, color=None, family=None, size=None, **kwargs):
"""
Construct a new Font object
Sets this color bar's title font. Note that the title's font
used to be set by the now deprecated `titlefont` attribute.
Parameters
----------
arg... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"color",
"=",
"None",
",",
"family",
"=",
"None",
",",
"size",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"super",
"(",
"Font",
",",
"self",
")",
".",
"__init__",
"(",
"\"font\"",... | [
143,
4
] | [
227,
34
] | python | en | ['en', 'error', 'th'] | False |
bbox_overlaps | (bboxes1, bboxes2, mode='iou', is_aligned=False, eps=1e-6) | Calculate overlap between two set of bboxes.
If ``is_aligned`` is ``False``, then calculate the ious between each bbox
of bboxes1 and bboxes2, otherwise the ious between each aligned pair of
bboxes1 and bboxes2.
Args:
bboxes1 (Tensor): shape (m, 4) in <x1, y1, x2, y2> format or empty.
... | Calculate overlap between two set of bboxes. | def bbox_overlaps(bboxes1, bboxes2, mode='iou', is_aligned=False, eps=1e-6):
"""Calculate overlap between two set of bboxes.
If ``is_aligned`` is ``False``, then calculate the ious between each bbox
of bboxes1 and bboxes2, otherwise the ious between each aligned pair of
bboxes1 and bboxes2.
Args:
... | [
"def",
"bbox_overlaps",
"(",
"bboxes1",
",",
"bboxes2",
",",
"mode",
"=",
"'iou'",
",",
"is_aligned",
"=",
"False",
",",
"eps",
"=",
"1e-6",
")",
":",
"assert",
"mode",
"in",
"[",
"'iou'",
",",
"'iof'",
"]",
"# Either the boxes are empty or the length of boxes... | [
38,
0
] | [
129,
15
] | python | en | ['en', 'en', 'en'] | True |
parse_args | () |
Wrapper to parse CLI arguments.
:return: args
|
Wrapper to parse CLI arguments. | def parse_args():
"""
Wrapper to parse CLI arguments.
:return: args
"""
parser = argparse.ArgumentParser()
parser.add_argument(
"-dp", "--datapath", default="/tmp", help="Path where to save data."
)
args = parser.parse_args()
# opts is dic in parlai
args = vars(args)
... | [
"def",
"parse_args",
"(",
")",
":",
"parser",
"=",
"argparse",
".",
"ArgumentParser",
"(",
")",
"parser",
".",
"add_argument",
"(",
"\"-dp\"",
",",
"\"--datapath\"",
",",
"default",
"=",
"\"/tmp\"",
",",
"help",
"=",
"\"Path where to save data.\"",
")",
"args"... | [
9,
0
] | [
24,
15
] | 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.histogram2dcontour.hoverlabel.Font`
- A dict of string/value properties that will be passed
to the Font constr... |
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.histogram2dcontour.hoverlabel.Font`
- A dict of string/value properties that will be passed
to the Font constr... | 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.histogram2dcontour.hoverlabel.Font`
- A dict of string/value properties that will be passed
... | [
"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.histogram2dcon
tour.Hoverlabel`
align
Sets the horizontal alignmen... |
Construct a new Hoverlabel object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.histogram2dcon
tour.Hoverlabel`
align
Sets the horizontal alignmen... | 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 |
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.volume.colorba
r.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.volume.colorba
r.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 |
Hoverlabel.bgcolor | (self) |
Sets the background color of the hover label. By default uses
the annotation's `bgcolor` made opaque, or white if it was
transparent.
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... |
Sets the background color of the hover label. By default uses
the annotation's `bgcolor` made opaque, or white if it was
transparent.
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... | def bgcolor(self):
"""
Sets the background color of the hover label. By default uses
the annotation's `bgcolor` made opaque, or white if it was
transparent.
The 'bgcolor' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rg... | [
"def",
"bgcolor",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"bgcolor\"",
"]"
] | [
15,
4
] | [
67,
30
] | python | en | ['en', 'error', 'th'] | False |
Hoverlabel.bordercolor | (self) |
Sets the border color of the hover label. By default uses
either dark grey or white, for maximum contrast with
`hoverlabel.bgcolor`.
The 'bordercolor' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(25... |
Sets the border color of the hover label. By default uses
either dark grey or white, for maximum contrast with
`hoverlabel.bgcolor`.
The 'bordercolor' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(25... | def bordercolor(self):
"""
Sets the border color of the hover label. By default uses
either dark grey or white, for maximum contrast with
`hoverlabel.bgcolor`.
The 'bordercolor' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
... | [
"def",
"bordercolor",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"bordercolor\"",
"]"
] | [
76,
4
] | [
128,
34
] | python | en | ['en', 'error', 'th'] | False |
Hoverlabel.font | (self) |
Sets the hover label text font. By default uses the global
hover font and size, with color from `hoverlabel.bordercolor`.
The 'font' property is an instance of Font
that may be specified as:
- An instance of :class:`plotly.graph_objs.layout.scene.annotation.hoverlabel.Fon... |
Sets the hover label text font. By default uses the global
hover font and size, with color from `hoverlabel.bordercolor`.
The 'font' property is an instance of Font
that may be specified as:
- An instance of :class:`plotly.graph_objs.layout.scene.annotation.hoverlabel.Fon... | def font(self):
"""
Sets the hover label text font. By default uses the global
hover font and size, with color from `hoverlabel.bordercolor`.
The 'font' property is an instance of Font
that may be specified as:
- An instance of :class:`plotly.graph_objs.layout.scen... | [
"def",
"font",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"font\"",
"]"
] | [
137,
4
] | [
175,
27
] | python | en | ['en', 'error', 'th'] | False |
Hoverlabel.__init__ | (self, arg=None, bgcolor=None, bordercolor=None, font=None, **kwargs) |
Construct a new Hoverlabel object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.layout.scene.a
nnotation.Hoverlabel`
bgcolor
Sets the background c... |
Construct a new Hoverlabel object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.layout.scene.a
nnotation.Hoverlabel`
bgcolor
Sets the background c... | def __init__(self, arg=None, bgcolor=None, bordercolor=None, font=None, **kwargs):
"""
Construct a new Hoverlabel object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.layo... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"bgcolor",
"=",
"None",
",",
"bordercolor",
"=",
"None",
",",
"font",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"super",
"(",
"Hoverlabel",
",",
"self",
")",
".",
"__init__",
"(",
... | [
200,
4
] | [
275,
34
] | python | en | ['en', 'error', 'th'] | False |
_fix_missing_period | (line) |
Adds a period to a line that is missing a period.
|
Adds a period to a line that is missing a period.
| def _fix_missing_period(line):
"""
Adds a period to a line that is missing a period.
"""
dm_single_close_quote = u'\u2019'
dm_double_close_quote = u'\u201d'
END_TOKENS = [
'.',
'!',
'?',
'...',
"'",
"`",
'"',
dm_single_close_quote,
... | [
"def",
"_fix_missing_period",
"(",
"line",
")",
":",
"dm_single_close_quote",
"=",
"u'\\u2019'",
"dm_double_close_quote",
"=",
"u'\\u201d'",
"END_TOKENS",
"=",
"[",
"'.'",
",",
"'!'",
",",
"'?'",
",",
"'...'",
",",
"\"'\"",
",",
"\"`\"",
",",
"'\"'",
",",
"d... | [
16,
0
] | [
36,
21
] | python | en | ['en', 'error', 'th'] | False |
credential_definitions_send_credential_definition | (request: web.BaseRequest) |
Request handler for sending a credential definition to the ledger.
Args:
request: aiohttp request object
Returns:
The credential definition identifier
|
Request handler for sending a credential definition to the ledger. | async def credential_definitions_send_credential_definition(request: web.BaseRequest):
"""
Request handler for sending a credential definition to the ledger.
Args:
request: aiohttp request object
Returns:
The credential definition identifier
"""
context = request.app["request_... | [
"async",
"def",
"credential_definitions_send_credential_definition",
"(",
"request",
":",
"web",
".",
"BaseRequest",
")",
":",
"context",
"=",
"request",
".",
"app",
"[",
"\"request_context\"",
"]",
"body",
"=",
"await",
"request",
".",
"json",
"(",
")",
"schema... | [
93,
0
] | [
117,
84
] | python | en | ['en', 'error', 'th'] | False |
credential_definitions_created | (request: web.BaseRequest) |
Request handler for retrieving credential definitions that current agent created.
Args:
request: aiohttp request object
Returns:
The identifiers of matching credential definitions.
|
Request handler for retrieving credential definitions that current agent created. | async def credential_definitions_created(request: web.BaseRequest):
"""
Request handler for retrieving credential definitions that current agent created.
Args:
request: aiohttp request object
Returns:
The identifiers of matching credential definitions.
"""
context = request.ap... | [
"async",
"def",
"credential_definitions_created",
"(",
"request",
":",
"web",
".",
"BaseRequest",
")",
":",
"context",
"=",
"request",
".",
"app",
"[",
"\"request_context\"",
"]",
"storage",
"=",
"await",
"context",
".",
"inject",
"(",
"BaseStorage",
")",
"fou... | [
133,
0
] | [
156,
5
] | python | en | ['en', 'error', 'th'] | False |
credential_definitions_get_credential_definition | (request: web.BaseRequest) |
Request handler for getting a credential definition from the ledger.
Args:
request: aiohttp request object
Returns:
The credential definition details.
|
Request handler for getting a credential definition from the ledger. | async def credential_definitions_get_credential_definition(request: web.BaseRequest):
"""
Request handler for getting a credential definition from the ledger.
Args:
request: aiohttp request object
Returns:
The credential definition details.
"""
context = request.app["request_c... | [
"async",
"def",
"credential_definitions_get_credential_definition",
"(",
"request",
":",
"web",
".",
"BaseRequest",
")",
":",
"context",
"=",
"request",
".",
"app",
"[",
"\"request_context\"",
"]",
"credential_definition_id",
"=",
"request",
".",
"match_info",
"[",
... | [
164,
0
] | [
185,
78
] | python | en | ['en', 'error', 'th'] | False |
register | (app: web.Application) | Register routes. | Register routes. | async def register(app: web.Application):
"""Register routes."""
app.add_routes(
[
web.post(
"/credential-definitions",
credential_definitions_send_credential_definition,
)
]
)
app.add_routes(
[
web.get(
... | [
"async",
"def",
"register",
"(",
"app",
":",
"web",
".",
"Application",
")",
":",
"app",
".",
"add_routes",
"(",
"[",
"web",
".",
"post",
"(",
"\"/credential-definitions\"",
",",
"credential_definitions_send_credential_definition",
",",
")",
"]",
")",
"app",
"... | [
188,
0
] | [
213,
5
] | python | en | ['en', 'fr', 'en'] | False |
Frame.baseframe | (self) |
The name of the frame into which this frame's properties are
merged before applying. This is used to unify properties and
avoid needing to specify the same values for the same
properties in multiple frames.
The 'baseframe' property is a string and must be specified as:
... |
The name of the frame into which this frame's properties are
merged before applying. This is used to unify properties and
avoid needing to specify the same values for the same
properties in multiple frames.
The 'baseframe' property is a string and must be specified as:
... | def baseframe(self):
"""
The name of the frame into which this frame's properties are
merged before applying. This is used to unify properties and
avoid needing to specify the same values for the same
properties in multiple frames.
The 'baseframe' property is a strin... | [
"def",
"baseframe",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"baseframe\"",
"]"
] | [
15,
4
] | [
30,
32
] | python | en | ['en', 'error', 'th'] | False |
Frame.data | (self) |
A list of traces this frame modifies. The format is identical
to the normal trace definition.
Returns
-------
Any
|
A list of traces this frame modifies. The format is identical
to the normal trace definition. | def data(self):
"""
A list of traces this frame modifies. The format is identical
to the normal trace definition.
Returns
-------
Any
"""
return self["data"] | [
"def",
"data",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"data\"",
"]"
] | [
39,
4
] | [
48,
27
] | python | en | ['en', 'error', 'th'] | False |
Frame.group | (self) |
An identifier that specifies the group to which the frame
belongs, used by animate to select a subset of frames.
The 'group' property is a string and must be specified as:
- A string
- A number that will be converted to a string
Returns
-------
... |
An identifier that specifies the group to which the frame
belongs, used by animate to select a subset of frames.
The 'group' property is a string and must be specified as:
- A string
- A number that will be converted to a string | def group(self):
"""
An identifier that specifies the group to which the frame
belongs, used by animate to select a subset of frames.
The 'group' property is a string and must be specified as:
- A string
- A number that will be converted to a string
Retu... | [
"def",
"group",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"group\"",
"]"
] | [
57,
4
] | [
70,
28
] | python | en | ['en', 'error', 'th'] | False |
Frame.layout | (self) |
Layout properties which this frame modifies. The format is
identical to the normal layout definition.
Returns
-------
Any
|
Layout properties which this frame modifies. The format is
identical to the normal layout definition. | def layout(self):
"""
Layout properties which this frame modifies. The format is
identical to the normal layout definition.
Returns
-------
Any
"""
return self["layout"] | [
"def",
"layout",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"layout\"",
"]"
] | [
79,
4
] | [
88,
29
] | python | en | ['en', 'error', 'th'] | False |
Frame.name | (self) |
A label by which to identify the frame
The 'name' property is a string and must be specified as:
- A string
- A number that will be converted to a string
Returns
-------
str
|
A label by which to identify the frame
The 'name' property is a string and must be specified as:
- A string
- A number that will be converted to a string | def name(self):
"""
A label by which to identify the frame
The 'name' property is a string and must be specified as:
- A string
- A number that will be converted to a string
Returns
-------
str
"""
return self["name"] | [
"def",
"name",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"name\"",
"]"
] | [
97,
4
] | [
109,
27
] | python | en | ['en', 'error', 'th'] | False |
Frame.traces | (self) |
A list of trace indices that identify the respective traces in
the data attribute
The 'traces' property accepts values of any type
Returns
-------
Any
|
A list of trace indices that identify the respective traces in
the data attribute
The 'traces' property accepts values of any type | def traces(self):
"""
A list of trace indices that identify the respective traces in
the data attribute
The 'traces' property accepts values of any type
Returns
-------
Any
"""
return self["traces"] | [
"def",
"traces",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"traces\"",
"]"
] | [
118,
4
] | [
129,
29
] | python | en | ['en', 'error', 'th'] | False |
Frame.__init__ | (
self,
arg=None,
baseframe=None,
data=None,
group=None,
layout=None,
name=None,
traces=None,
**kwargs
) |
Construct a new Frame object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.Frame`
baseframe
The name of the frame into which this frame's
properti... |
Construct a new Frame object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.Frame`
baseframe
The name of the frame into which this frame's
properti... | def __init__(
self,
arg=None,
baseframe=None,
data=None,
group=None,
layout=None,
name=None,
traces=None,
**kwargs
):
"""
Construct a new Frame object
Parameters
----------
arg
dict o... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"baseframe",
"=",
"None",
",",
"data",
"=",
"None",
",",
"group",
"=",
"None",
",",
"layout",
"=",
"None",
",",
"name",
"=",
"None",
",",
"traces",
"=",
"None",
",",
"*",
"*",
"kwargs"... | [
162,
4
] | [
266,
34
] | python | en | ['en', 'error', 'th'] | False |
SessionCmdSet.at_cmdset_creation | (self) | Populate the cmdset | Populate the cmdset | def at_cmdset_creation(self):
"Populate the cmdset"
self.add(account.CmdSessions()) | [
"def",
"at_cmdset_creation",
"(",
"self",
")",
":",
"self",
".",
"add",
"(",
"account",
".",
"CmdSessions",
"(",
")",
")"
] | [
14,
4
] | [
16,
39
] | python | en | ['en', 'zh', 'en'] | True |
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(SteamCog(bot)) | [
"def",
"setup",
"(",
"bot",
")",
":",
"bot",
".",
"add_cog",
"(",
"SteamCog",
"(",
"bot",
")",
")"
] | [
331,
0
] | [
335,
30
] | python | en | ['en', 'error', 'th'] | False |
Font.color | (self) |
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
- A named CSS color:
... |
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
- A named CSS color:
... | def color(self):
"""
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
- A name... | [
"def",
"color",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"color\"",
"]"
] | [
15,
4
] | [
63,
28
] | python | en | ['en', 'error', 'th'] | False |
Font.family | (self) |
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts ... |
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts ... | def family(self):
"""
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
prefer... | [
"def",
"family",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"family\"",
"]"
] | [
72,
4
] | [
94,
29
] | python | en | ['en', 'error', 'th'] | False |
Font.size | (self) |
The 'size' property is a number and may be specified as:
- An int or float in the interval [1, inf]
Returns
-------
int|float
|
The 'size' property is a number and may be specified as:
- An int or float in the interval [1, inf] | def size(self):
"""
The 'size' property is a number and may be specified as:
- An int or float in the interval [1, inf]
Returns
-------
int|float
"""
return self["size"] | [
"def",
"size",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"size\"",
"]"
] | [
103,
4
] | [
112,
27
] | python | en | ['en', 'error', 'th'] | False |
Font.__init__ | (self, arg=None, color=None, family=None, size=None, **kwargs) |
Construct a new Font object
Sets the hover label text font. By default uses the global
hover font and size, with color from `hoverlabel.bordercolor`.
Parameters
----------
arg
dict of properties compatible with this constructor or
an ins... |
Construct a new Font object
Sets the hover label text font. By default uses the global
hover font and size, with color from `hoverlabel.bordercolor`. | def __init__(self, arg=None, color=None, family=None, size=None, **kwargs):
"""
Construct a new Font object
Sets the hover label text font. By default uses the global
hover font and size, with color from `hoverlabel.bordercolor`.
Parameters
----------
ar... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"color",
"=",
"None",
",",
"family",
"=",
"None",
",",
"size",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"super",
"(",
"Font",
",",
"self",
")",
".",
"__init__",
"(",
"\"font\"",... | [
143,
4
] | [
227,
34
] | python | en | ['en', 'error', 'th'] | False |
NAttributeHandler.__init__ | (self, obj) |
Initialized on the object
|
Initialized on the object
| def __init__(self, obj):
"""
Initialized on the object
"""
self._store = {}
self.obj = weakref.proxy(obj) | [
"def",
"__init__",
"(",
"self",
",",
"obj",
")",
":",
"self",
".",
"_store",
"=",
"{",
"}",
"self",
".",
"obj",
"=",
"weakref",
".",
"proxy",
"(",
"obj",
")"
] | [
66,
4
] | [
71,
37
] | python | en | ['en', 'error', 'th'] | False |
NAttributeHandler.has | (self, key) |
Check if object has this attribute or not.
Args:
key (str): The Nattribute key to check.
Returns:
has_nattribute (bool): If Nattribute is set or not.
|
Check if object has this attribute or not. | def has(self, key):
"""
Check if object has this attribute or not.
Args:
key (str): The Nattribute key to check.
Returns:
has_nattribute (bool): If Nattribute is set or not.
"""
return key in self._store | [
"def",
"has",
"(",
"self",
",",
"key",
")",
":",
"return",
"key",
"in",
"self",
".",
"_store"
] | [
73,
4
] | [
84,
33
] | python | en | ['en', 'error', 'th'] | False |
NAttributeHandler.get | (self, key, default=None) |
Get the named key value.
Args:
key (str): The Nattribute key to get.
Returns:
the value of the Nattribute.
|
Get the named key value. | def get(self, key, default=None):
"""
Get the named key value.
Args:
key (str): The Nattribute key to get.
Returns:
the value of the Nattribute.
"""
return self._store.get(key, default) | [
"def",
"get",
"(",
"self",
",",
"key",
",",
"default",
"=",
"None",
")",
":",
"return",
"self",
".",
"_store",
".",
"get",
"(",
"key",
",",
"default",
")"
] | [
86,
4
] | [
97,
44
] | python | en | ['en', 'error', 'th'] | False |
NAttributeHandler.add | (self, key, value) |
Add new key and value.
Args:
key (str): The name of Nattribute to add.
value (any): The value to store.
|
Add new key and value. | def add(self, key, value):
"""
Add new key and value.
Args:
key (str): The name of Nattribute to add.
value (any): The value to store.
"""
self._store[key] = value | [
"def",
"add",
"(",
"self",
",",
"key",
",",
"value",
")",
":",
"self",
".",
"_store",
"[",
"key",
"]",
"=",
"value"
] | [
99,
4
] | [
108,
32
] | python | en | ['en', 'error', 'th'] | False |
NAttributeHandler.remove | (self, key) |
Remove Nattribute from storage.
Args:
key (str): The name of the Nattribute to remove.
|
Remove Nattribute from storage. | def remove(self, key):
"""
Remove Nattribute from storage.
Args:
key (str): The name of the Nattribute to remove.
"""
if key in self._store:
del self._store[key] | [
"def",
"remove",
"(",
"self",
",",
"key",
")",
":",
"if",
"key",
"in",
"self",
".",
"_store",
":",
"del",
"self",
".",
"_store",
"[",
"key",
"]"
] | [
110,
4
] | [
119,
32
] | python | en | ['en', 'error', 'th'] | False |
NAttributeHandler.clear | (self) |
Remove all NAttributes from handler.
|
Remove all NAttributes from handler. | def clear(self):
"""
Remove all NAttributes from handler.
"""
self._store = {} | [
"def",
"clear",
"(",
"self",
")",
":",
"self",
".",
"_store",
"=",
"{",
"}"
] | [
121,
4
] | [
126,
24
] | python | en | ['en', 'error', 'th'] | False |
NAttributeHandler.all | (self, return_tuples=False) |
List the contents of the handler.
Args:
return_tuples (bool, optional): Defines if the Nattributes
are returns as a list of keys or as a list of `(key, value)`.
Returns:
nattributes (list): A list of keys `[key, key, ...]` or a
list of t... |
List the contents of the handler. | def all(self, return_tuples=False):
"""
List the contents of the handler.
Args:
return_tuples (bool, optional): Defines if the Nattributes
are returns as a list of keys or as a list of `(key, value)`.
Returns:
nattributes (list): A list of keys `... | [
"def",
"all",
"(",
"self",
",",
"return_tuples",
"=",
"False",
")",
":",
"if",
"return_tuples",
":",
"return",
"[",
"(",
"key",
",",
"value",
")",
"for",
"(",
"key",
",",
"value",
")",
"in",
"self",
".",
"_store",
".",
"items",
"(",
")",
"if",
"n... | [
128,
4
] | [
144,
70
] | python | en | ['en', 'error', 'th'] | False |
ServerSession.__init__ | (self) | Initiate to avoid AttributeErrors down the line | Initiate to avoid AttributeErrors down the line | def __init__(self):
"""Initiate to avoid AttributeErrors down the line"""
self.puppet = None
self.account = None
self.cmdset_storage_string = ""
self.cmdset = CmdSetHandler(self, True) | [
"def",
"__init__",
"(",
"self",
")",
":",
"self",
".",
"puppet",
"=",
"None",
"self",
".",
"account",
"=",
"None",
"self",
".",
"cmdset_storage_string",
"=",
"\"\"",
"self",
".",
"cmdset",
"=",
"CmdSetHandler",
"(",
"self",
",",
"True",
")"
] | [
162,
4
] | [
167,
47
] | python | en | ['en', 'en', 'en'] | True |
ServerSession.at_sync | (self) |
This is called whenever a session has been resynced with the
portal. At this point all relevant attributes have already
been set and self.account been assigned (if applicable).
Since this is often called after a server restart we need to
set up the session as it was.
|
This is called whenever a session has been resynced with the
portal. At this point all relevant attributes have already
been set and self.account been assigned (if applicable). | def at_sync(self):
"""
This is called whenever a session has been resynced with the
portal. At this point all relevant attributes have already
been set and self.account been assigned (if applicable).
Since this is often called after a server restart we need to
set up th... | [
"def",
"at_sync",
"(",
"self",
")",
":",
"global",
"_ObjectDB",
"if",
"not",
"_ObjectDB",
":",
"from",
"evennia",
".",
"objects",
".",
"models",
"import",
"ObjectDB",
"as",
"_ObjectDB",
"super",
"(",
"ServerSession",
",",
"self",
")",
".",
"at_sync",
"(",
... | [
176,
4
] | [
208,
44
] | python | en | ['en', 'error', 'th'] | False |
ServerSession.at_login | (self, account) |
Hook called by sessionhandler when the session becomes authenticated.
Args:
account (Account): The account associated with the session.
|
Hook called by sessionhandler when the session becomes authenticated. | def at_login(self, account):
"""
Hook called by sessionhandler when the session becomes authenticated.
Args:
account (Account): The account associated with the session.
"""
self.account = account
self.uid = self.account.id
self.uname = self.account.u... | [
"def",
"at_login",
"(",
"self",
",",
"account",
")",
":",
"self",
".",
"account",
"=",
"account",
"self",
".",
"uid",
"=",
"self",
".",
"account",
".",
"id",
"self",
".",
"uname",
"=",
"self",
".",
"account",
".",
"username",
"self",
".",
"logged_in"... | [
210,
4
] | [
232,
47
] | python | en | ['en', 'error', 'th'] | False |
ServerSession.at_disconnect | (self, reason=None) |
Hook called by sessionhandler when disconnecting this session.
|
Hook called by sessionhandler when disconnecting this session. | def at_disconnect(self, reason=None):
"""
Hook called by sessionhandler when disconnecting this session.
"""
if self.logged_in:
account = self.account
if self.puppet:
account.unpuppet_object(self)
uaccount = account
uaccoun... | [
"def",
"at_disconnect",
"(",
"self",
",",
"reason",
"=",
"None",
")",
":",
"if",
"self",
".",
"logged_in",
":",
"account",
"=",
"self",
".",
"account",
"if",
"self",
".",
"puppet",
":",
"account",
".",
"unpuppet_object",
"(",
"self",
")",
"uaccount",
"... | [
234,
4
] | [
257,
47
] | python | en | ['en', 'error', 'th'] | False |
ServerSession.get_account | (self) |
Get the account associated with this session
Returns:
account (Account): The associated Account.
|
Get the account associated with this session | def get_account(self):
"""
Get the account associated with this session
Returns:
account (Account): The associated Account.
"""
return self.logged_in and self.account | [
"def",
"get_account",
"(",
"self",
")",
":",
"return",
"self",
".",
"logged_in",
"and",
"self",
".",
"account"
] | [
259,
4
] | [
267,
46
] | python | en | ['en', 'error', 'th'] | False |
ServerSession.get_puppet | (self) |
Get the in-game character associated with this session.
Returns:
puppet (Object): The puppeted object, if any.
|
Get the in-game character associated with this session. | def get_puppet(self):
"""
Get the in-game character associated with this session.
Returns:
puppet (Object): The puppeted object, if any.
"""
return self.logged_in and self.puppet | [
"def",
"get_puppet",
"(",
"self",
")",
":",
"return",
"self",
".",
"logged_in",
"and",
"self",
".",
"puppet"
] | [
269,
4
] | [
277,
45
] | python | en | ['en', 'error', 'th'] | False |
ServerSession.get_puppet_or_account | (self) |
Get puppet or account.
Returns:
controller (Object or Account): The puppet if one exists,
otherwise return the account.
|
Get puppet or account. | def get_puppet_or_account(self):
"""
Get puppet or account.
Returns:
controller (Object or Account): The puppet if one exists,
otherwise return the account.
"""
if self.logged_in:
return self.puppet if self.puppet else self.account
... | [
"def",
"get_puppet_or_account",
"(",
"self",
")",
":",
"if",
"self",
".",
"logged_in",
":",
"return",
"self",
".",
"puppet",
"if",
"self",
".",
"puppet",
"else",
"self",
".",
"account",
"return",
"None"
] | [
280,
4
] | [
291,
19
] | python | en | ['en', 'error', 'th'] | False |
ServerSession.log | (self, message, channel=True) |
Emits session info to the appropriate outputs and info channels.
Args:
message (str): The message to log.
channel (bool, optional): Log to the CHANNEL_CONNECTINFO channel
in addition to the server log.
|
Emits session info to the appropriate outputs and info channels. | def log(self, message, channel=True):
"""
Emits session info to the appropriate outputs and info channels.
Args:
message (str): The message to log.
channel (bool, optional): Log to the CHANNEL_CONNECTINFO channel
in addition to the server log.
""... | [
"def",
"log",
"(",
"self",
",",
"message",
",",
"channel",
"=",
"True",
")",
":",
"cchan",
"=",
"channel",
"and",
"settings",
".",
"CHANNEL_CONNECTINFO",
"if",
"cchan",
":",
"try",
":",
"cchan",
"=",
"ChannelDB",
".",
"objects",
".",
"get_channel",
"(",
... | [
293,
4
] | [
310,
32
] | python | en | ['en', 'error', 'th'] | False |
ServerSession.get_client_size | (self) |
Return eventual eventual width and height reported by the
client. Note that this currently only deals with a single
client window (windowID==0) as in a traditional telnet session.
|
Return eventual eventual width and height reported by the
client. Note that this currently only deals with a single
client window (windowID==0) as in a traditional telnet session. | def get_client_size(self):
"""
Return eventual eventual width and height reported by the
client. Note that this currently only deals with a single
client window (windowID==0) as in a traditional telnet session.
"""
flags = self.protocol_flags
width = flags.get('S... | [
"def",
"get_client_size",
"(",
"self",
")",
":",
"flags",
"=",
"self",
".",
"protocol_flags",
"width",
"=",
"flags",
".",
"get",
"(",
"'SCREENWIDTH'",
",",
"{",
"}",
")",
".",
"get",
"(",
"0",
",",
"settings",
".",
"CLIENT_DEFAULT_WIDTH",
")",
"height",
... | [
312,
4
] | [
322,
28
] | python | en | ['en', 'error', 'th'] | False |
ServerSession.update_session_counters | (self, idle=False) |
Hit this when the user enters a command in order to update
idle timers and command counters.
|
Hit this when the user enters a command in order to update
idle timers and command counters. | def update_session_counters(self, idle=False):
"""
Hit this when the user enters a command in order to update
idle timers and command counters.
"""
# Idle time used for timeout calcs.
self.cmd_last = time.time()
# Store the timestamp of the user's last command.
... | [
"def",
"update_session_counters",
"(",
"self",
",",
"idle",
"=",
"False",
")",
":",
"# Idle time used for timeout calcs.",
"self",
".",
"cmd_last",
"=",
"time",
".",
"time",
"(",
")",
"# Store the timestamp of the user's last command.",
"if",
"not",
"idle",
":",
"# ... | [
324,
4
] | [
338,
49
] | python | en | ['en', 'error', 'th'] | False |
ServerSession.update_flags | (self, **kwargs) |
Update the protocol_flags and sync them with Portal.
Kwargs:
key, value - A key:value pair to set in the
protocol_flags dictionary.
Notes:
Since protocols can vary, no checking is done
as to the existene of the flag or not. The input
... |
Update the protocol_flags and sync them with Portal. | def update_flags(self, **kwargs):
"""
Update the protocol_flags and sync them with Portal.
Kwargs:
key, value - A key:value pair to set in the
protocol_flags dictionary.
Notes:
Since protocols can vary, no checking is done
as to the e... | [
"def",
"update_flags",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"kwargs",
":",
"self",
".",
"protocol_flags",
".",
"update",
"(",
"kwargs",
")",
"self",
".",
"sessionhandler",
".",
"session_portal_sync",
"(",
"self",
")"
] | [
340,
4
] | [
356,
57
] | python | en | ['en', 'error', 'th'] | False |
ServerSession.data_out | (self, **kwargs) |
Sending data from Evennia->Client
Kwargs:
text (str or tuple)
any (str or tuple): Send-commands identified
by their keys. Or "options", carrying options
for the protocol(s).
|
Sending data from Evennia->Client | def data_out(self, **kwargs):
"""
Sending data from Evennia->Client
Kwargs:
text (str or tuple)
any (str or tuple): Send-commands identified
by their keys. Or "options", carrying options
for the protocol(s).
"""
self.sessi... | [
"def",
"data_out",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"self",
".",
"sessionhandler",
".",
"data_out",
"(",
"self",
",",
"*",
"*",
"kwargs",
")"
] | [
358,
4
] | [
369,
52
] | python | en | ['en', 'error', 'th'] | False |
ServerSession.data_in | (self, **kwargs) |
Receiving data from the client, sending it off to
the respective inputfuncs.
Kwargs:
kwargs (any): Incoming data from protocol on
the form `{"commandname": ((args), {kwargs}),...}`
Notes:
This method is here in order to give the user
... |
Receiving data from the client, sending it off to
the respective inputfuncs. | def data_in(self, **kwargs):
"""
Receiving data from the client, sending it off to
the respective inputfuncs.
Kwargs:
kwargs (any): Incoming data from protocol on
the form `{"commandname": ((args), {kwargs}),...}`
Notes:
This method is her... | [
"def",
"data_in",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"self",
".",
"sessionhandler",
".",
"call_inputfuncs",
"(",
"self",
",",
"*",
"*",
"kwargs",
")"
] | [
371,
4
] | [
385,
59
] | python | en | ['en', 'error', 'th'] | False |
ServerSession.msg | (self, text=None, **kwargs) |
Wrapper to mimic msg() functionality of Objects and Accounts.
Args:
text (str): String input.
Kwargs:
any (str or tuple): Send-commands identified
by their keys. Or "options", carrying options
for the protocol(s).
|
Wrapper to mimic msg() functionality of Objects and Accounts. | def msg(self, text=None, **kwargs):
"""
Wrapper to mimic msg() functionality of Objects and Accounts.
Args:
text (str): String input.
Kwargs:
any (str or tuple): Send-commands identified
by their keys. Or "options", carrying options
... | [
"def",
"msg",
"(",
"self",
",",
"text",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"# this can happen if this is triggered e.g. a command.msg",
"# that auto-adds the session, we'd get a kwarg collision.",
"kwargs",
".",
"pop",
"(",
"\"session\"",
",",
"None",
")",
... | [
387,
4
] | [
407,
35
] | python | en | ['en', 'error', 'th'] | False |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.