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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Candlestick.xaxis | (self) |
Sets a reference between this trace's x coordinates and a 2D
cartesian x axis. If "x" (the default value), the x coordinates
refer to `layout.xaxis`. If "x2", the x coordinates refer to
`layout.xaxis2`, and so on.
The 'xaxis' property is an identifier of a particular
... |
Sets a reference between this trace's x coordinates and a 2D
cartesian x axis. If "x" (the default value), the x coordinates
refer to `layout.xaxis`. If "x2", the x coordinates refer to
`layout.xaxis2`, and so on.
The 'xaxis' property is an identifier of a particular
... | def xaxis(self):
"""
Sets a reference between this trace's x coordinates and a 2D
cartesian x axis. If "x" (the default value), the x coordinates
refer to `layout.xaxis`. If "x2", the x coordinates refer to
`layout.xaxis2`, and so on.
The 'xaxis' property is an ident... | [
"def",
"xaxis",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"xaxis\"",
"]"
] | [
906,
4
] | [
922,
28
] | python | en | ['en', 'error', 'th'] | False |
Candlestick.xcalendar | (self) |
Sets the calendar system to use with `x` date data.
The 'xcalendar' property is an enumeration that may be specified as:
- One of the following enumeration values:
['gregorian', 'chinese', 'coptic', 'discworld',
'ethiopian', 'hebrew', 'islamic', 'julian', ... |
Sets the calendar system to use with `x` date data.
The 'xcalendar' property is an enumeration that may be specified as:
- One of the following enumeration values:
['gregorian', 'chinese', 'coptic', 'discworld',
'ethiopian', 'hebrew', 'islamic', 'julian', ... | def xcalendar(self):
"""
Sets the calendar system to use with `x` date data.
The 'xcalendar' property is an enumeration that may be specified as:
- One of the following enumeration values:
['gregorian', 'chinese', 'coptic', 'discworld',
'ethiopian',... | [
"def",
"xcalendar",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"xcalendar\"",
"]"
] | [
931,
4
] | [
946,
32
] | python | en | ['en', 'error', 'th'] | False |
Candlestick.xsrc | (self) |
Sets the source reference on Chart Studio Cloud for x .
The 'xsrc' 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 x .
The 'xsrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def xsrc(self):
"""
Sets the source reference on Chart Studio Cloud for x .
The 'xsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["xsrc"] | [
"def",
"xsrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"xsrc\"",
"]"
] | [
955,
4
] | [
966,
27
] | python | en | ['en', 'error', 'th'] | False |
Candlestick.yaxis | (self) |
Sets a reference between this trace's y coordinates and a 2D
cartesian y axis. If "y" (the default value), the y coordinates
refer to `layout.yaxis`. If "y2", the y coordinates refer to
`layout.yaxis2`, and so on.
The 'yaxis' property is an identifier of a particular
... |
Sets a reference between this trace's y coordinates and a 2D
cartesian y axis. If "y" (the default value), the y coordinates
refer to `layout.yaxis`. If "y2", the y coordinates refer to
`layout.yaxis2`, and so on.
The 'yaxis' property is an identifier of a particular
... | def yaxis(self):
"""
Sets a reference between this trace's y coordinates and a 2D
cartesian y axis. If "y" (the default value), the y coordinates
refer to `layout.yaxis`. If "y2", the y coordinates refer to
`layout.yaxis2`, and so on.
The 'yaxis' property is an ident... | [
"def",
"yaxis",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"yaxis\"",
"]"
] | [
975,
4
] | [
991,
28
] | python | en | ['en', 'error', 'th'] | False |
Candlestick.__init__ | (
self,
arg=None,
close=None,
closesrc=None,
customdata=None,
customdatasrc=None,
decreasing=None,
high=None,
highsrc=None,
hoverinfo=None,
hoverinfosrc=None,
hoverlabel=None,
hovertext=None,
hovertextsrc=Non... |
Construct a new Candlestick object
The candlestick is a style of financial chart describing open,
high, low and close for a given `x` coordinate (most likely
time). The boxes represent the spread between the `open` and
`close` values and the lines represent the spread b... |
Construct a new Candlestick object
The candlestick is a style of financial chart describing open,
high, low and close for a given `x` coordinate (most likely
time). The boxes represent the spread between the `open` and
`close` values and the lines represent the spread b... | def __init__(
self,
arg=None,
close=None,
closesrc=None,
customdata=None,
customdatasrc=None,
decreasing=None,
high=None,
highsrc=None,
hoverinfo=None,
hoverinfosrc=None,
hoverlabel=None,
hovertext=None,
hove... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"close",
"=",
"None",
",",
"closesrc",
"=",
"None",
",",
"customdata",
"=",
"None",
",",
"customdatasrc",
"=",
"None",
",",
"decreasing",
"=",
"None",
",",
"high",
"=",
"None",
",",
"highs... | [
1165,
4
] | [
1584,
34
] | python | en | ['en', 'error', 'th'] | False |
ConnectionRequest.__init__ | (
self,
*,
connection: ConnectionDetail = None,
label: str = None,
image_url: str = None,
**kwargs,
) |
Initialize connection request object.
Args:
connection (ConnectionDetail): Connection details object
label: Label for this connection request
image_url: Optional image URL for this connection request
|
Initialize connection request object. | def __init__(
self,
*,
connection: ConnectionDetail = None,
label: str = None,
image_url: str = None,
**kwargs,
):
"""
Initialize connection request object.
Args:
connection (ConnectionDetail): Connection details object
... | [
"def",
"__init__",
"(",
"self",
",",
"*",
",",
"connection",
":",
"ConnectionDetail",
"=",
"None",
",",
"label",
":",
"str",
"=",
"None",
",",
"image_url",
":",
"str",
"=",
"None",
",",
"*",
"*",
"kwargs",
",",
")",
":",
"super",
"(",
"ConnectionRequ... | [
24,
4
] | [
42,
26
] | 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 |
Marker.autocolorscale | (self) |
Determines whether the colorscale is a default palette
(`autocolorscale: true`) or the palette determined by
`marker.colorscale`. Has an effect only if in `marker.color`is
set to a numerical array. In case `colorscale` is unspecified
or `autocolorscale` is true, the default pal... |
Determines whether the colorscale is a default palette
(`autocolorscale: true`) or the palette determined by
`marker.colorscale`. Has an effect only if in `marker.color`is
set to a numerical array. In case `colorscale` is unspecified
or `autocolorscale` is true, the default pal... | def autocolorscale(self):
"""
Determines whether the colorscale is a default palette
(`autocolorscale: true`) or the palette determined by
`marker.colorscale`. Has an effect only if in `marker.color`is
set to a numerical array. In case `colorscale` is unspecified
or `auto... | [
"def",
"autocolorscale",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"autocolorscale\"",
"]"
] | [
40,
4
] | [
57,
37
] | python | en | ['en', 'error', 'th'] | False |
Marker.cauto | (self) |
Determines whether or not the color domain is computed with
respect to the input data (here in `marker.color`) or the
bounds set in `marker.cmin` and `marker.cmax` Has an effect
only if in `marker.color`is set to a numerical array. Defaults
to `false` when `marker.cmin` and `ma... |
Determines whether or not the color domain is computed with
respect to the input data (here in `marker.color`) or the
bounds set in `marker.cmin` and `marker.cmax` Has an effect
only if in `marker.color`is set to a numerical array. Defaults
to `false` when `marker.cmin` and `ma... | def cauto(self):
"""
Determines whether or not the color domain is computed with
respect to the input data (here in `marker.color`) or the
bounds set in `marker.cmin` and `marker.cmax` Has an effect
only if in `marker.color`is set to a numerical array. Defaults
to `false... | [
"def",
"cauto",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"cauto\"",
"]"
] | [
66,
4
] | [
82,
28
] | python | en | ['en', 'error', 'th'] | False |
Marker.cmax | (self) |
Sets the upper bound of the color domain. Has an effect only if
in `marker.color`is set to a numerical array. Value should have
the same units as in `marker.color` and if set, `marker.cmin`
must be set as well.
The 'cmax' property is a number and may be specified as:
... |
Sets the upper bound of the color domain. Has an effect only if
in `marker.color`is set to a numerical array. Value should have
the same units as in `marker.color` and if set, `marker.cmin`
must be set as well.
The 'cmax' property is a number and may be specified as:
... | def cmax(self):
"""
Sets the upper bound of the color domain. Has an effect only if
in `marker.color`is set to a numerical array. Value should have
the same units as in `marker.color` and if set, `marker.cmin`
must be set as well.
The 'cmax' property is a number and ... | [
"def",
"cmax",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"cmax\"",
"]"
] | [
91,
4
] | [
105,
27
] | python | en | ['en', 'error', 'th'] | False |
Marker.cmid | (self) |
Sets the mid-point of the color domain by scaling `marker.cmin`
and/or `marker.cmax` to be equidistant to this point. Has an
effect only if in `marker.color`is set to a numerical array.
Value should have the same units as in `marker.color`. Has no
effect when `marker.cauto` is `... |
Sets the mid-point of the color domain by scaling `marker.cmin`
and/or `marker.cmax` to be equidistant to this point. Has an
effect only if in `marker.color`is set to a numerical array.
Value should have the same units as in `marker.color`. Has no
effect when `marker.cauto` is `... | def cmid(self):
"""
Sets the mid-point of the color domain by scaling `marker.cmin`
and/or `marker.cmax` to be equidistant to this point. Has an
effect only if in `marker.color`is set to a numerical array.
Value should have the same units as in `marker.color`. Has no
effe... | [
"def",
"cmid",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"cmid\"",
"]"
] | [
114,
4
] | [
129,
27
] | python | en | ['en', 'error', 'th'] | False |
Marker.cmin | (self) |
Sets the lower bound of the color domain. Has an effect only if
in `marker.color`is set to a numerical array. Value should have
the same units as in `marker.color` and if set, `marker.cmax`
must be set as well.
The 'cmin' property is a number and may be specified as:
... |
Sets the lower bound of the color domain. Has an effect only if
in `marker.color`is set to a numerical array. Value should have
the same units as in `marker.color` and if set, `marker.cmax`
must be set as well.
The 'cmin' property is a number and may be specified as:
... | def cmin(self):
"""
Sets the lower bound of the color domain. Has an effect only if
in `marker.color`is set to a numerical array. Value should have
the same units as in `marker.color` and if set, `marker.cmax`
must be set as well.
The 'cmin' property is a number and ... | [
"def",
"cmin",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"cmin\"",
"]"
] | [
138,
4
] | [
152,
27
] | python | en | ['en', 'error', 'th'] | False |
Marker.color | (self) |
Sets themarkercolor. It accepts either a specific color or an
array of numbers that are mapped to the colorscale relative to
the max and min values of the array or relative to
`marker.cmin` and `marker.cmax` if set.
The 'color' property is a color and may be specified as:
... |
Sets themarkercolor. It accepts either a specific color or an
array of numbers that are mapped to the colorscale relative to
the max and min values of the array or relative to
`marker.cmin` and `marker.cmax` if set.
The 'color' property is a color and may be specified as:
... | def color(self):
"""
Sets themarkercolor. It accepts either a specific color or an
array of numbers that are mapped to the colorscale relative to
the max and min values of the array or relative to
`marker.cmin` and `marker.cmax` if set.
The 'color' property is a colo... | [
"def",
"color",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"color\"",
"]"
] | [
161,
4
] | [
217,
28
] | python | en | ['en', 'error', 'th'] | False |
Marker.coloraxis | (self) |
Sets a reference to a shared color axis. References to these
shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
etc. Settings for these shared color axes are set in the
layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
Note that multiple color scales can be... |
Sets a reference to a shared color axis. References to these
shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
etc. Settings for these shared color axes are set in the
layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
Note that multiple color scales can be... | def coloraxis(self):
"""
Sets a reference to a shared color axis. References to these
shared color axes are "coloraxis", "coloraxis2", "coloraxis3",
etc. Settings for these shared color axes are set in the
layout, under `layout.coloraxis`, `layout.coloraxis2`, etc.
Note t... | [
"def",
"coloraxis",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"coloraxis\"",
"]"
] | [
226,
4
] | [
244,
32
] | python | en | ['en', 'error', 'th'] | False |
Marker.colorbar | (self) |
The 'colorbar' property is an instance of ColorBar
that may be specified as:
- An instance of :class:`plotly.graph_objs.scatterternary.marker.ColorBar`
- A dict of string/value properties that will be passed
to the ColorBar constructor
Supported dict pro... |
The 'colorbar' property is an instance of ColorBar
that may be specified as:
- An instance of :class:`plotly.graph_objs.scatterternary.marker.ColorBar`
- A dict of string/value properties that will be passed
to the ColorBar constructor
Supported dict pro... | def colorbar(self):
"""
The 'colorbar' property is an instance of ColorBar
that may be specified as:
- An instance of :class:`plotly.graph_objs.scatterternary.marker.ColorBar`
- A dict of string/value properties that will be passed
to the ColorBar constructor
... | [
"def",
"colorbar",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"colorbar\"",
"]"
] | [
253,
4
] | [
480,
31
] | python | en | ['en', 'error', 'th'] | False |
Marker.colorscale | (self) |
Sets the colorscale. Has an effect only if in `marker.color`is
set to a numerical array. The colorscale must be an array
containing arrays mapping a normalized value to an rgb, rgba,
hex, hsl, hsv, or named color string. At minimum, a mapping for
the lowest (0) and highest (1) v... |
Sets the colorscale. Has an effect only if in `marker.color`is
set to a numerical array. The colorscale must be an array
containing arrays mapping a normalized value to an rgb, rgba,
hex, hsl, hsv, or named color string. At minimum, a mapping for
the lowest (0) and highest (1) v... | def colorscale(self):
"""
Sets the colorscale. Has an effect only if in `marker.color`is
set to a numerical array. The colorscale must be an array
containing arrays mapping a normalized value to an rgb, rgba,
hex, hsl, hsv, or named color string. At minimum, a mapping for
... | [
"def",
"colorscale",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"colorscale\"",
"]"
] | [
489,
4
] | [
533,
33
] | python | en | ['en', 'error', 'th'] | False |
Marker.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\"",
"]"
] | [
542,
4
] | [
553,
31
] | python | en | ['en', 'error', 'th'] | False |
Marker.gradient | (self) |
The 'gradient' property is an instance of Gradient
that may be specified as:
- An instance of :class:`plotly.graph_objs.scatterternary.marker.Gradient`
- A dict of string/value properties that will be passed
to the Gradient constructor
Supported dict pro... |
The 'gradient' property is an instance of Gradient
that may be specified as:
- An instance of :class:`plotly.graph_objs.scatterternary.marker.Gradient`
- A dict of string/value properties that will be passed
to the Gradient constructor
Supported dict pro... | def gradient(self):
"""
The 'gradient' property is an instance of Gradient
that may be specified as:
- An instance of :class:`plotly.graph_objs.scatterternary.marker.Gradient`
- A dict of string/value properties that will be passed
to the Gradient constructor
... | [
"def",
"gradient",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"gradient\"",
"]"
] | [
562,
4
] | [
590,
31
] | python | en | ['en', 'error', 'th'] | False |
Marker.line | (self) |
The 'line' property is an instance of Line
that may be specified as:
- An instance of :class:`plotly.graph_objs.scatterternary.marker.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.scatterternary.marker.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.scatterternary.marker.Line`
- A dict of string/value properties that will be passed
to the Line constructor
Support... | [
"def",
"line",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"line\"",
"]"
] | [
599,
4
] | [
702,
27
] | python | en | ['en', 'error', 'th'] | False |
Marker.maxdisplayed | (self) |
Sets a maximum number of points to be drawn on the graph. 0
corresponds to no limit.
The 'maxdisplayed' property is a number and may be specified as:
- An int or float in the interval [0, inf]
Returns
-------
int|float
|
Sets a maximum number of points to be drawn on the graph. 0
corresponds to no limit.
The 'maxdisplayed' property is a number and may be specified as:
- An int or float in the interval [0, inf] | def maxdisplayed(self):
"""
Sets a maximum number of points to be drawn on the graph. 0
corresponds to no limit.
The 'maxdisplayed' property is a number and may be specified as:
- An int or float in the interval [0, inf]
Returns
-------
int|float
... | [
"def",
"maxdisplayed",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"maxdisplayed\"",
"]"
] | [
711,
4
] | [
723,
35
] | python | en | ['en', 'error', 'th'] | False |
Marker.opacity | (self) |
Sets the marker opacity.
The 'opacity' property is a number and may be specified as:
- An int or float in the interval [0, 1]
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
int|float|numpy.ndarray
|
Sets the marker opacity.
The 'opacity' property is a number and may be specified as:
- An int or float in the interval [0, 1]
- A tuple, list, or one-dimensional numpy array of the above | def opacity(self):
"""
Sets the marker opacity.
The 'opacity' property is a number and may be specified as:
- An int or float in the interval [0, 1]
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
int|float|numpy.ndar... | [
"def",
"opacity",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"opacity\"",
"]"
] | [
732,
4
] | [
744,
30
] | python | en | ['en', 'error', 'th'] | False |
Marker.opacitysrc | (self) |
Sets the source reference on Chart Studio Cloud for opacity .
The 'opacitysrc' 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 opacity .
The 'opacitysrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def opacitysrc(self):
"""
Sets the source reference on Chart Studio Cloud for opacity .
The 'opacitysrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["opacitysrc"] | [
"def",
"opacitysrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"opacitysrc\"",
"]"
] | [
753,
4
] | [
764,
33
] | python | en | ['en', 'error', 'th'] | False |
Marker.reversescale | (self) |
Reverses the color mapping if true. Has an effect only if in
`marker.color`is set to a numerical array. If true,
`marker.cmin` will correspond to the last color in the array
and `marker.cmax` will correspond to the first color.
The 'reversescale' property must be specified ... |
Reverses the color mapping if true. Has an effect only if in
`marker.color`is set to a numerical array. If true,
`marker.cmin` will correspond to the last color in the array
and `marker.cmax` will correspond to the first color.
The 'reversescale' property must be specified ... | def reversescale(self):
"""
Reverses the color mapping if true. Has an effect only if in
`marker.color`is set to a numerical array. If true,
`marker.cmin` will correspond to the last color in the array
and `marker.cmax` will correspond to the first color.
The 'revers... | [
"def",
"reversescale",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"reversescale\"",
"]"
] | [
773,
4
] | [
787,
35
] | python | en | ['en', 'error', 'th'] | False |
Marker.showscale | (self) |
Determines whether or not a colorbar is displayed for this
trace. Has an effect only if in `marker.color`is set to a
numerical array.
The 'showscale' property must be specified as a bool
(either True, or False)
Returns
-------
bool
|
Determines whether or not a colorbar is displayed for this
trace. Has an effect only if in `marker.color`is set to a
numerical array.
The 'showscale' property must be specified as a bool
(either True, or False) | def showscale(self):
"""
Determines whether or not a colorbar is displayed for this
trace. Has an effect only if in `marker.color`is set to a
numerical array.
The 'showscale' property must be specified as a bool
(either True, or False)
Returns
------... | [
"def",
"showscale",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"showscale\"",
"]"
] | [
796,
4
] | [
809,
32
] | python | en | ['en', 'error', 'th'] | False |
Marker.size | (self) |
Sets the marker size (in px).
The 'size' property is a number and may be specified as:
- An int or float in the interval [0, inf]
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
int|float|numpy.ndarray
|
Sets the marker size (in px).
The 'size' property is a number and may be specified as:
- An int or float in the interval [0, inf]
- A tuple, list, or one-dimensional numpy array of the above | def size(self):
"""
Sets the marker size (in px).
The 'size' property is a number and may be specified as:
- An int or float in the interval [0, inf]
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
int|float|numpy.nda... | [
"def",
"size",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"size\"",
"]"
] | [
818,
4
] | [
830,
27
] | python | en | ['en', 'error', 'th'] | False |
Marker.sizemin | (self) |
Has an effect only if `marker.size` is set to a numerical
array. Sets the minimum size (in px) of the rendered marker
points.
The 'sizemin' property is a number and may be specified as:
- An int or float in the interval [0, inf]
Returns
-------
in... |
Has an effect only if `marker.size` is set to a numerical
array. Sets the minimum size (in px) of the rendered marker
points.
The 'sizemin' property is a number and may be specified as:
- An int or float in the interval [0, inf] | def sizemin(self):
"""
Has an effect only if `marker.size` is set to a numerical
array. Sets the minimum size (in px) of the rendered marker
points.
The 'sizemin' property is a number and may be specified as:
- An int or float in the interval [0, inf]
Retu... | [
"def",
"sizemin",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"sizemin\"",
"]"
] | [
839,
4
] | [
852,
30
] | python | en | ['en', 'error', 'th'] | False |
Marker.sizemode | (self) |
Has an effect only if `marker.size` is set to a numerical
array. Sets the rule for which the data in `size` is converted
to pixels.
The 'sizemode' property is an enumeration that may be specified as:
- One of the following enumeration values:
['diameter', ... |
Has an effect only if `marker.size` is set to a numerical
array. Sets the rule for which the data in `size` is converted
to pixels.
The 'sizemode' property is an enumeration that may be specified as:
- One of the following enumeration values:
['diameter', ... | def sizemode(self):
"""
Has an effect only if `marker.size` is set to a numerical
array. Sets the rule for which the data in `size` is converted
to pixels.
The 'sizemode' property is an enumeration that may be specified as:
- One of the following enumeration values... | [
"def",
"sizemode",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"sizemode\"",
"]"
] | [
861,
4
] | [
875,
31
] | python | en | ['en', 'error', 'th'] | False |
Marker.sizeref | (self) |
Has an effect only if `marker.size` is set to a numerical
array. Sets the scale factor used to determine the rendered
size of marker points. Use with `sizemin` and `sizemode`.
The 'sizeref' property is a number and may be specified as:
- An int or float
Returns
... |
Has an effect only if `marker.size` is set to a numerical
array. Sets the scale factor used to determine the rendered
size of marker points. Use with `sizemin` and `sizemode`.
The 'sizeref' property is a number and may be specified as:
- An int or float | def sizeref(self):
"""
Has an effect only if `marker.size` is set to a numerical
array. Sets the scale factor used to determine the rendered
size of marker points. Use with `sizemin` and `sizemode`.
The 'sizeref' property is a number and may be specified as:
- An i... | [
"def",
"sizeref",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"sizeref\"",
"]"
] | [
884,
4
] | [
897,
30
] | python | en | ['en', 'error', 'th'] | False |
Marker.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\"",
"]"
] | [
906,
4
] | [
917,
30
] | python | en | ['en', 'error', 'th'] | False |
Marker.symbol | (self) |
Sets the marker symbol type. Adding 100 is equivalent to
appending "-open" to a symbol name. Adding 200 is equivalent to
appending "-dot" to a symbol name. Adding 300 is equivalent to
appending "-open-dot" or "dot-open" to a symbol name.
The 'symbol' property is an enumerat... |
Sets the marker symbol type. Adding 100 is equivalent to
appending "-open" to a symbol name. Adding 200 is equivalent to
appending "-dot" to a symbol name. Adding 300 is equivalent to
appending "-open-dot" or "dot-open" to a symbol name.
The 'symbol' property is an enumerat... | def symbol(self):
"""
Sets the marker symbol type. Adding 100 is equivalent to
appending "-open" to a symbol name. Adding 200 is equivalent to
appending "-dot" to a symbol name. Adding 300 is equivalent to
appending "-open-dot" or "dot-open" to a symbol name.
The 'sy... | [
"def",
"symbol",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"symbol\"",
"]"
] | [
926,
4
] | [
1002,
29
] | python | en | ['en', 'error', 'th'] | False |
Marker.symbolsrc | (self) |
Sets the source reference on Chart Studio Cloud for symbol .
The 'symbolsrc' 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 symbol .
The 'symbolsrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def symbolsrc(self):
"""
Sets the source reference on Chart Studio Cloud for symbol .
The 'symbolsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["symbolsrc"] | [
"def",
"symbolsrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"symbolsrc\"",
"]"
] | [
1011,
4
] | [
1022,
32
] | python | en | ['en', 'error', 'th'] | False |
Marker.__init__ | (
self,
arg=None,
autocolorscale=None,
cauto=None,
cmax=None,
cmid=None,
cmin=None,
color=None,
coloraxis=None,
colorbar=None,
colorscale=None,
colorsrc=None,
gradient=None,
line=None,
maxdisplayed=No... |
Construct a new Marker object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.scatterternary.Marker`
autocolorscale
Determines whether the colorscal... |
Construct a new Marker object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.scatterternary.Marker`
autocolorscale
Determines whether the colorscal... | def __init__(
self,
arg=None,
autocolorscale=None,
cauto=None,
cmax=None,
cmid=None,
cmin=None,
color=None,
coloraxis=None,
colorbar=None,
colorscale=None,
colorsrc=None,
gradient=None,
line=None,
max... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"autocolorscale",
"=",
"None",
",",
"cauto",
"=",
"None",
",",
"cmax",
"=",
"None",
",",
"cmid",
"=",
"None",
",",
"cmin",
"=",
"None",
",",
"color",
"=",
"None",
",",
"coloraxis",
"=",
... | [
1152,
4
] | [
1444,
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.parcoords.line
.colorbar.Tickformatstop`
dtickrange
range [*mi... |
Construct a new Tickformatstop object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.parcoords.line
.colorbar.Tickformatstop`
dtickrange
range [*mi... | 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 |
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.
"""
if bot.is_debug is True:
return
bot.add_cog(TeamRosterCog(bot)) | [
"def",
"setup",
"(",
"bot",
")",
":",
"if",
"bot",
".",
"is_debug",
"is",
"True",
":",
"return",
"bot",
".",
"add_cog",
"(",
"TeamRosterCog",
"(",
"bot",
")",
")"
] | [
620,
0
] | [
626,
35
] | python | en | ['en', 'error', 'th'] | False |
TeamRosterCog.initialize_team_roster | (self, ctx: commands.Context, channel: discord.TextChannel) |
Creates the Team roster messages.
This should not have to be called more than once.
Args:
channel (discord.TextChannel): Id of channel to build the Team roster (can also use name, but id is safer)
Example:
@AntiPetros initialize_team_roster 712054600278081600
... |
Creates the Team roster messages. | async def initialize_team_roster(self, ctx: commands.Context, channel: discord.TextChannel):
"""
Creates the Team roster messages.
This should not have to be called more than once.
Args:
channel (discord.TextChannel): Id of channel to build the Team roster (can also use nam... | [
"async",
"def",
"initialize_team_roster",
"(",
"self",
",",
"ctx",
":",
"commands",
".",
"Context",
",",
"channel",
":",
"discord",
".",
"TextChannel",
")",
":",
"async",
"with",
"ctx",
".",
"typing",
"(",
")",
":",
"teams",
"=",
"COGS_CONFIG",
".",
"ret... | [
357,
4
] | [
396,
53
] | python | en | ['en', 'error', 'th'] | False |
TeamRosterCog.force_update_team_roster | (self, ctx: commands.Context) |
Forces the Team Roster to update.
Can be used often, as there is no negative consequence to it.
It is provided as a fallback if the automation does not trigger.
Example:
@AntiPetros force_update_team_roster
Info:
When this command is used, it logs the... |
Forces the Team Roster to update. | async def force_update_team_roster(self, ctx: commands.Context):
"""
Forces the Team Roster to update.
Can be used often, as there is no negative consequence to it.
It is provided as a fallback if the automation does not trigger.
Example:
@AntiPetros force_update_t... | [
"async",
"def",
"force_update_team_roster",
"(",
"self",
",",
"ctx",
":",
"commands",
".",
"Context",
")",
":",
"for",
"team_item",
"in",
"self",
".",
"team_items",
":",
"try",
":",
"await",
"team_item",
".",
"update",
"(",
")",
"except",
"TeamMemberRoleNotF... | [
401,
4
] | [
424,
49
] | python | en | ['en', 'error', 'th'] | False |
TeamRosterCog.delete_and_redo_team_roster | (self, ctx: commands.Context, channel: discord.TextChannel) |
Deletes the Team roster messages and completely redoes them.
Ultima Ratio version of "force_update_team_roster".
The Channel has to be entered, as this provides is also an option to change the Team roster channel.
Args:
channel (discord.TextChannel): Id of channel to buil... |
Deletes the Team roster messages and completely redoes them. | async def delete_and_redo_team_roster(self, ctx: commands.Context, channel: discord.TextChannel):
"""
Deletes the Team roster messages and completely redoes them.
Ultima Ratio version of "force_update_team_roster".
The Channel has to be entered, as this provides is also an option to ch... | [
"async",
"def",
"delete_and_redo_team_roster",
"(",
"self",
",",
"ctx",
":",
"commands",
".",
"Context",
",",
"channel",
":",
"discord",
".",
"TextChannel",
")",
":",
"for",
"item",
"in",
"self",
".",
"team_items",
":",
"await",
"item",
".",
"delete_messages... | [
429,
4
] | [
449,
55
] | python | en | ['en', 'error', 'th'] | False |
get_cog_paths_from_folder | (folder_name: str, files_to_exclude: list = None) |
gets all relative import paths(only missing the commong import path at the front) for files in a subfolder.
Convinence function, to not have to specify each import path manually.
Args:
folder_name `str`: name of the subfolder.
files_to_exclude `list`: list of files to exclude when collect... |
gets all relative import paths(only missing the commong import path at the front) for files in a subfolder. | def get_cog_paths_from_folder(folder_name: str, files_to_exclude: list = None):
"""
gets all relative import paths(only missing the commong import path at the front) for files in a subfolder.
Convinence function, to not have to specify each import path manually.
Args:
folder_name `str`: name o... | [
"def",
"get_cog_paths_from_folder",
"(",
"folder_name",
":",
"str",
",",
"files_to_exclude",
":",
"list",
"=",
"None",
")",
":",
"import_paths",
"=",
"[",
"]",
"files_to_exclude",
"=",
"[",
"]",
"if",
"files_to_exclude",
"is",
"None",
"else",
"files_to_exclude",... | [
48,
0
] | [
69,
23
] | python | en | ['en', 'error', 'th'] | False |
pad | (val: str) | Pad base64 values if need be: JWT calls to omit trailing padding. | Pad base64 values if need be: JWT calls to omit trailing padding. | def pad(val: str) -> str:
"""Pad base64 values if need be: JWT calls to omit trailing padding."""
return val + "=" * ((len(val) - 1) // 4 * 4 + 4 - len(val)) | [
"def",
"pad",
"(",
"val",
":",
"str",
")",
"->",
"str",
":",
"return",
"val",
"+",
"\"=\"",
"*",
"(",
"(",
"len",
"(",
"val",
")",
"-",
"1",
")",
"//",
"4",
"*",
"4",
"+",
"4",
"-",
"len",
"(",
"val",
")",
")"
] | [
6,
0
] | [
8,
63
] | python | en | ['en', 'en', 'en'] | True |
unpad | (val: str) | Remove padding from base64 values if need be. | Remove padding from base64 values if need be. | def unpad(val: str) -> str:
"""Remove padding from base64 values if need be."""
return val.replace("=", "") | [
"def",
"unpad",
"(",
"val",
":",
"str",
")",
"->",
"str",
":",
"return",
"val",
".",
"replace",
"(",
"\"=\"",
",",
"\"\"",
")"
] | [
11,
0
] | [
13,
31
] | python | en | ['en', 'en', 'en'] | True |
b64_to_bytes | (val: str, urlsafe=False) | Convert a base 64 string to bytes. | Convert a base 64 string to bytes. | def b64_to_bytes(val: str, urlsafe=False) -> bytes:
"""Convert a base 64 string to bytes."""
if urlsafe:
return base64.urlsafe_b64decode(pad(val))
return base64.b64decode(pad(val)) | [
"def",
"b64_to_bytes",
"(",
"val",
":",
"str",
",",
"urlsafe",
"=",
"False",
")",
"->",
"bytes",
":",
"if",
"urlsafe",
":",
"return",
"base64",
".",
"urlsafe_b64decode",
"(",
"pad",
"(",
"val",
")",
")",
"return",
"base64",
".",
"b64decode",
"(",
"pad"... | [
16,
0
] | [
20,
37
] | python | en | ['en', 'en', 'en'] | True |
b64_to_str | (val: str, urlsafe=False, encoding=None) | Convert a base 64 string to string on input encoding (default utf-8). | Convert a base 64 string to string on input encoding (default utf-8). | def b64_to_str(val: str, urlsafe=False, encoding=None) -> str:
"""Convert a base 64 string to string on input encoding (default utf-8)."""
return b64_to_bytes(val, urlsafe).decode(encoding or "utf-8") | [
"def",
"b64_to_str",
"(",
"val",
":",
"str",
",",
"urlsafe",
"=",
"False",
",",
"encoding",
"=",
"None",
")",
"->",
"str",
":",
"return",
"b64_to_bytes",
"(",
"val",
",",
"urlsafe",
")",
".",
"decode",
"(",
"encoding",
"or",
"\"utf-8\"",
")"
] | [
23,
0
] | [
25,
65
] | python | en | ['en', 'en', 'en'] | True |
bytes_to_b64 | (val: bytes, urlsafe=False, pad=True) | Convert a byte string to base 64. | Convert a byte string to base 64. | def bytes_to_b64(val: bytes, urlsafe=False, pad=True) -> str:
"""Convert a byte string to base 64."""
b64 = base64.urlsafe_b64encode(val).decode(
"ascii"
) if urlsafe else base64.b64encode(val).decode("ascii")
return b64 if pad else unpad(b64) | [
"def",
"bytes_to_b64",
"(",
"val",
":",
"bytes",
",",
"urlsafe",
"=",
"False",
",",
"pad",
"=",
"True",
")",
"->",
"str",
":",
"b64",
"=",
"base64",
".",
"urlsafe_b64encode",
"(",
"val",
")",
".",
"decode",
"(",
"\"ascii\"",
")",
"if",
"urlsafe",
"el... | [
28,
0
] | [
33,
37
] | python | en | ['en', 'en', 'en'] | True |
str_to_b64 | (val: str, urlsafe=False, encoding=None, pad=True) | Convert a string to base64 string on input encoding (default utf-8). | Convert a string to base64 string on input encoding (default utf-8). | def str_to_b64(val: str, urlsafe=False, encoding=None, pad=True) -> str:
"""Convert a string to base64 string on input encoding (default utf-8)."""
return bytes_to_b64(val.encode(encoding or "utf-8"), urlsafe, pad) | [
"def",
"str_to_b64",
"(",
"val",
":",
"str",
",",
"urlsafe",
"=",
"False",
",",
"encoding",
"=",
"None",
",",
"pad",
"=",
"True",
")",
"->",
"str",
":",
"return",
"bytes_to_b64",
"(",
"val",
".",
"encode",
"(",
"encoding",
"or",
"\"utf-8\"",
")",
","... | [
36,
0
] | [
38,
70
] | python | en | ['en', 'en', 'en'] | True |
set_urlsafe_b64 | (val: str, urlsafe: bool = True) | Set URL safety in base64 encoding. | Set URL safety in base64 encoding. | def set_urlsafe_b64(val: str, urlsafe: bool = True) -> str:
"""Set URL safety in base64 encoding."""
if urlsafe:
return val.replace("+", "-").replace("/", "_")
return val.replace("-", "+").replace("_", "/") | [
"def",
"set_urlsafe_b64",
"(",
"val",
":",
"str",
",",
"urlsafe",
":",
"bool",
"=",
"True",
")",
"->",
"str",
":",
"if",
"urlsafe",
":",
"return",
"val",
".",
"replace",
"(",
"\"+\"",
",",
"\"-\"",
")",
".",
"replace",
"(",
"\"/\"",
",",
"\"_\"",
"... | [
41,
0
] | [
45,
50
] | python | en | ['en', 'ru-Latn', 'en'] | True |
b58_to_bytes | (val: str) | Convert a base 58 string to bytes. | Convert a base 58 string to bytes. | def b58_to_bytes(val: str) -> bytes:
"""Convert a base 58 string to bytes."""
return base58.b58decode(val) | [
"def",
"b58_to_bytes",
"(",
"val",
":",
"str",
")",
"->",
"bytes",
":",
"return",
"base58",
".",
"b58decode",
"(",
"val",
")"
] | [
48,
0
] | [
50,
32
] | python | en | ['en', 'en', 'en'] | True |
bytes_to_b58 | (val: bytes) | Convert a byte string to base 58. | Convert a byte string to base 58. | def bytes_to_b58(val: bytes) -> str:
"""Convert a byte string to base 58."""
return base58.b58encode(val).decode("ascii") | [
"def",
"bytes_to_b58",
"(",
"val",
":",
"bytes",
")",
"->",
"str",
":",
"return",
"base58",
".",
"b58encode",
"(",
"val",
")",
".",
"decode",
"(",
"\"ascii\"",
")"
] | [
53,
0
] | [
55,
48
] | python | en | ['en', 'en', 'en'] | True |
ExampleBagOfWordsModel.encode_text | (self, text_vecs) |
This function encodes a text_vec to a text encoding.
|
This function encodes a text_vec to a text encoding.
| def encode_text(self, text_vecs):
"""
This function encodes a text_vec to a text encoding.
"""
return self.encoder(text_vecs) | [
"def",
"encode_text",
"(",
"self",
",",
"text_vecs",
")",
":",
"return",
"self",
".",
"encoder",
"(",
"text_vecs",
")"
] | [
32,
4
] | [
36,
38
] | python | en | ['en', 'error', 'th'] | False |
TraAgent.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.
"""
super().add_cmdline_args(parser, partial_opt=partial_opt)
arg_group = parser.add_argument_group('ExampleBagOfWordsModel Arguments')
arg_... | [
"def",
"add_cmdline_args",
"(",
"cls",
",",
"parser",
":",
"ParlaiParser",
",",
"partial_opt",
":",
"Optional",
"[",
"Opt",
"]",
"=",
"None",
")",
"->",
"ParlaiParser",
":",
"super",
"(",
")",
".",
"add_cmdline_args",
"(",
"parser",
",",
"partial_opt",
"="... | [
68,
4
] | [
77,
21
] | python | en | ['en', 'error', 'th'] | False |
TraAgent.score_candidates | (self, batch, cand_vecs, cand_encs=None) |
This function takes in a Batch object as well as a Tensor of candidate vectors.
It must return a list of scores corresponding to the likelihood that the
candidate vector at that index is the proper response. If `cand_encs` is not
None (when we cache the encoding of the candidate vector... |
This function takes in a Batch object as well as a Tensor of candidate vectors. | def score_candidates(self, batch, cand_vecs, cand_encs=None):
"""
This function takes in a Batch object as well as a Tensor of candidate vectors.
It must return a list of scores corresponding to the likelihood that the
candidate vector at that index is the proper response. If `cand_encs... | [
"def",
"score_candidates",
"(",
"self",
",",
"batch",
",",
"cand_vecs",
",",
"cand_encs",
"=",
"None",
")",
":",
"scores",
"=",
"self",
".",
"model",
".",
"forward",
"(",
"batch",
",",
"cand_vecs",
",",
"cand_encs",
")",
"return",
"scores"
] | [
79,
4
] | [
89,
21
] | python | en | ['en', 'error', 'th'] | False |
TraAgent.build_model | (self) |
This function is required to build the model and assign to the object
`self.model`.
|
This function is required to build the model and assign to the object
`self.model`.
| def build_model(self):
"""
This function is required to build the model and assign to the object
`self.model`.
"""
return ExampleBagOfWordsModel(self.opt, self.dict) | [
"def",
"build_model",
"(",
"self",
")",
":",
"return",
"ExampleBagOfWordsModel",
"(",
"self",
".",
"opt",
",",
"self",
".",
"dict",
")"
] | [
91,
4
] | [
96,
58
] | python | en | ['en', 'error', 'th'] | False |
CredentialManager.__init__ | (self, context: InjectionContext) |
Initialize a CredentialManager.
Args:
context: The context for this credential
|
Initialize a CredentialManager. | def __init__(self, context: InjectionContext):
"""
Initialize a CredentialManager.
Args:
context: The context for this credential
"""
self._context = context
self._logger = logging.getLogger(__name__) | [
"def",
"__init__",
"(",
"self",
",",
"context",
":",
"InjectionContext",
")",
":",
"self",
".",
"_context",
"=",
"context",
"self",
".",
"_logger",
"=",
"logging",
".",
"getLogger",
"(",
"__name__",
")"
] | [
34,
4
] | [
42,
50
] | python | en | ['en', 'error', 'th'] | False |
CredentialManager.context | (self) |
Accessor for the current request context.
Returns:
The request context for this connection
|
Accessor for the current request context. | def context(self) -> InjectionContext:
"""
Accessor for the current request context.
Returns:
The request context for this connection
"""
return self._context | [
"def",
"context",
"(",
"self",
")",
"->",
"InjectionContext",
":",
"return",
"self",
".",
"_context"
] | [
45,
4
] | [
53,
28
] | python | en | ['en', 'error', 'th'] | False |
CredentialManager._match_sent_cred_def_id | (self, tag_query: Mapping[str, str]) | Return most recent matching id of cred def that agent sent to ledger. | Return most recent matching id of cred def that agent sent to ledger. | async def _match_sent_cred_def_id(self, tag_query: Mapping[str, str]) -> str:
"""Return most recent matching id of cred def that agent sent to ledger."""
storage: BaseStorage = await self.context.inject(BaseStorage)
found = await storage.search_records(
type_filter=CRED_DEF_SENT_REC... | [
"async",
"def",
"_match_sent_cred_def_id",
"(",
"self",
",",
"tag_query",
":",
"Mapping",
"[",
"str",
",",
"str",
"]",
")",
"->",
"str",
":",
"storage",
":",
"BaseStorage",
"=",
"await",
"self",
".",
"context",
".",
"inject",
"(",
"BaseStorage",
")",
"fo... | [
55,
4
] | [
67,
81
] | python | en | ['en', 'en', 'en'] | True |
CredentialManager.prepare_send | (
self, connection_id: str, credential_proposal: CredentialProposal
) |
Set up a new credential exchange for an automated send.
Args:
connection_id: Connection to create offer for
credential_proposal: The credential proposal with preview on
attribute values to use if auto_issue is enabled
Returns:
A tuple of the... |
Set up a new credential exchange for an automated send. | async def prepare_send(
self, connection_id: str, credential_proposal: CredentialProposal
) -> Tuple[V10CredentialExchange, CredentialOffer]:
"""
Set up a new credential exchange for an automated send.
Args:
connection_id: Connection to create offer for
crede... | [
"async",
"def",
"prepare_send",
"(",
"self",
",",
"connection_id",
":",
"str",
",",
"credential_proposal",
":",
"CredentialProposal",
")",
"->",
"Tuple",
"[",
"V10CredentialExchange",
",",
"CredentialOffer",
"]",
":",
"credential_exchange",
"=",
"V10CredentialExchange... | [
69,
4
] | [
95,
52
] | python | en | ['en', 'error', 'th'] | False |
CredentialManager.create_proposal | (
self,
connection_id: str,
*,
auto_offer: bool = None,
comment: str = None,
credential_preview: CredentialPreview = None,
schema_id: str = None,
schema_issuer_did: str = None,
schema_name: str = None,
schema_version: str = None,
cr... |
Create a credential proposal.
Args:
connection_id: Connection to create proposal for
auto_offer: Should this proposal request automatically be handled to
offer a credential
comment: Optional human-readable comment to include in proposal
c... |
Create a credential proposal. | async def create_proposal(
self,
connection_id: str,
*,
auto_offer: bool = None,
comment: str = None,
credential_preview: CredentialPreview = None,
schema_id: str = None,
schema_issuer_did: str = None,
schema_name: str = None,
schema_versio... | [
"async",
"def",
"create_proposal",
"(",
"self",
",",
"connection_id",
":",
"str",
",",
"*",
",",
"auto_offer",
":",
"bool",
"=",
"None",
",",
"comment",
":",
"str",
"=",
"None",
",",
"credential_preview",
":",
"CredentialPreview",
"=",
"None",
",",
"schema... | [
97,
4
] | [
159,
41
] | python | en | ['en', 'error', 'th'] | False |
CredentialManager.receive_proposal | (self) |
Receive a credential proposal from message in context on manager creation.
Returns:
The resulting credential exchange record, created
|
Receive a credential proposal from message in context on manager creation. | async def receive_proposal(self) -> V10CredentialExchange:
"""
Receive a credential proposal from message in context on manager creation.
Returns:
The resulting credential exchange record, created
"""
# go to cred def via ledger to get authoritative schema id
... | [
"async",
"def",
"receive_proposal",
"(",
"self",
")",
"->",
"V10CredentialExchange",
":",
"# go to cred def via ledger to get authoritative schema id",
"credential_proposal_message",
"=",
"self",
".",
"context",
".",
"message",
"connection_id",
"=",
"self",
".",
"context",
... | [
161,
4
] | [
192,
41
] | python | en | ['en', 'error', 'th'] | False |
CredentialManager.create_offer | (
self, credential_exchange_record: V10CredentialExchange, comment: str = None
) |
Create a credential offer, update credential exchange record.
Args:
credential_exchange_record: Credential exchange to create offer for
comment: optional human-readable comment to set in offer message
Returns:
A tuple (credential exchange record, credential... |
Create a credential offer, update credential exchange record. | async def create_offer(
self, credential_exchange_record: V10CredentialExchange, comment: str = None
) -> Tuple[V10CredentialExchange, CredentialOffer]:
"""
Create a credential offer, update credential exchange record.
Args:
credential_exchange_record: Credential exchang... | [
"async",
"def",
"create_offer",
"(",
"self",
",",
"credential_exchange_record",
":",
"V10CredentialExchange",
",",
"comment",
":",
"str",
"=",
"None",
")",
"->",
"Tuple",
"[",
"V10CredentialExchange",
",",
"CredentialOffer",
"]",
":",
"if",
"credential_exchange_reco... | [
194,
4
] | [
262,
69
] | python | en | ['en', 'error', 'th'] | False |
CredentialManager.receive_offer | (self) |
Receive a credential offer.
Returns:
The credential exchange record, updated
|
Receive a credential offer. | async def receive_offer(self) -> V10CredentialExchange:
"""
Receive a credential offer.
Returns:
The credential exchange record, updated
"""
credential_offer_message: CredentialOffer = self.context.message
connection_id = self.context.connection_record.conne... | [
"async",
"def",
"receive_offer",
"(",
"self",
")",
"->",
"V10CredentialExchange",
":",
"credential_offer_message",
":",
"CredentialOffer",
"=",
"self",
".",
"context",
".",
"message",
"connection_id",
"=",
"self",
".",
"context",
".",
"connection_record",
".",
"co... | [
264,
4
] | [
319,
41
] | python | en | ['en', 'error', 'th'] | False |
CredentialManager.create_request | (
self, credential_exchange_record: V10CredentialExchange, holder_did: str
) |
Create a credential request.
Args:
credential_exchange_record: Credential exchange record
for which to create request
holder_did: holder DID
Returns:
A tuple (credential exchange record, credential request message)
|
Create a credential request. | async def create_request(
self, credential_exchange_record: V10CredentialExchange, holder_did: str
) -> Tuple[V10CredentialExchange, CredentialRequest]:
"""
Create a credential request.
Args:
credential_exchange_record: Credential exchange record
for whic... | [
"async",
"def",
"create_request",
"(",
"self",
",",
"credential_exchange_record",
":",
"V10CredentialExchange",
",",
"holder_did",
":",
"str",
")",
"->",
"Tuple",
"[",
"V10CredentialExchange",
",",
"CredentialRequest",
"]",
":",
"credential_definition_id",
"=",
"crede... | [
321,
4
] | [
397,
69
] | python | en | ['en', 'error', 'th'] | False |
CredentialManager.receive_request | (self) |
Receive a credential request.
Args:
credential_request_message: Credential request to receive
Returns:
credential exchange record, retrieved and updated
|
Receive a credential request. | async def receive_request(self):
"""
Receive a credential request.
Args:
credential_request_message: Credential request to receive
Returns:
credential exchange record, retrieved and updated
"""
credential_request_message = self.context.message
... | [
"async",
"def",
"receive_request",
"(",
"self",
")",
":",
"credential_request_message",
"=",
"self",
".",
"context",
".",
"message",
"assert",
"len",
"(",
"credential_request_message",
".",
"requests_attach",
"or",
"[",
"]",
")",
"==",
"1",
"credential_request",
... | [
399,
4
] | [
427,
41
] | python | en | ['en', 'error', 'th'] | False |
CredentialManager.issue_credential | (
self,
credential_exchange_record: V10CredentialExchange,
*,
comment: str = None,
credential_values: dict,
) |
Issue a credential.
Args:
credential_exchange_record: The credential exchange record
for which to issue a credential
comment: optional human-readable comment pertaining to credential issue
credential_values: dict of credential attribute {name: value}... |
Issue a credential. | async def issue_credential(
self,
credential_exchange_record: V10CredentialExchange,
*,
comment: str = None,
credential_values: dict,
) -> Tuple[V10CredentialExchange, CredentialIssue]:
"""
Issue a credential.
Args:
credential_exchange_rec... | [
"async",
"def",
"issue_credential",
"(",
"self",
",",
"credential_exchange_record",
":",
"V10CredentialExchange",
",",
"*",
",",
"comment",
":",
"str",
"=",
"None",
",",
"credential_values",
":",
"dict",
",",
")",
"->",
"Tuple",
"[",
"V10CredentialExchange",
","... | [
429,
4
] | [
486,
63
] | python | en | ['en', 'error', 'th'] | False |
CredentialManager.receive_credential | (self) |
Receive a credential from an issuer.
Hold in storage potentially to be processed by controller before storing.
Returns:
Credential exchange record, retrieved and updated
|
Receive a credential from an issuer. | async def receive_credential(self) -> V10CredentialExchange:
"""
Receive a credential from an issuer.
Hold in storage potentially to be processed by controller before storing.
Returns:
Credential exchange record, retrieved and updated
"""
credential_message... | [
"async",
"def",
"receive_credential",
"(",
"self",
")",
"->",
"V10CredentialExchange",
":",
"credential_message",
"=",
"self",
".",
"context",
".",
"message",
"assert",
"len",
"(",
"credential_message",
".",
"credentials_attach",
"or",
"[",
"]",
")",
"==",
"1",
... | [
488,
4
] | [
516,
41
] | python | en | ['en', 'error', 'th'] | False |
CredentialManager.store_credential | (
self, credential_exchange_record: V10CredentialExchange
) |
Store a credential in holder wallet; send ack to issuer.
Args:
credential_exchange_record: credential exchange record
with credential to store and ack
Returns:
Tuple: (Updated credential exchange record, credential ack message)
|
Store a credential in holder wallet; send ack to issuer. | async def store_credential(
self, credential_exchange_record: V10CredentialExchange
) -> Tuple[V10CredentialExchange, CredentialAck]:
"""
Store a credential in holder wallet; send ack to issuer.
Args:
credential_exchange_record: credential exchange record
... | [
"async",
"def",
"store_credential",
"(",
"self",
",",
"credential_exchange_record",
":",
"V10CredentialExchange",
")",
"->",
"Tuple",
"[",
"V10CredentialExchange",
",",
"CredentialAck",
"]",
":",
"raw_credential",
"=",
"credential_exchange_record",
".",
"raw_credential",
... | [
518,
4
] | [
567,
67
] | python | en | ['en', 'error', 'th'] | False |
CredentialManager.receive_credential_ack | (self) |
Receive credential ack from holder.
Returns:
credential exchange record, retrieved and updated
|
Receive credential ack from holder. | async def receive_credential_ack(self) -> V10CredentialExchange:
"""
Receive credential ack from holder.
Returns:
credential exchange record, retrieved and updated
"""
credential_ack_message = self.context.message
(
credential_exchange_record
... | [
"async",
"def",
"receive_credential_ack",
"(",
"self",
")",
"->",
"V10CredentialExchange",
":",
"credential_ack_message",
"=",
"self",
".",
"context",
".",
"message",
"(",
"credential_exchange_record",
")",
"=",
"await",
"V10CredentialExchange",
".",
"retrieve_by_connec... | [
569,
4
] | [
592,
41
] | python | en | ['en', 'error', 'th'] | False |
AjaxWebClient._responseFailed | (self, failure, csessid, request) | callback if a request is lost/timed out | callback if a request is lost/timed out | def _responseFailed(self, failure, csessid, request):
"callback if a request is lost/timed out"
try:
del self.requests[csessid]
except KeyError:
# nothing left to delete
pass | [
"def",
"_responseFailed",
"(",
"self",
",",
"failure",
",",
"csessid",
",",
"request",
")",
":",
"try",
":",
"del",
"self",
".",
"requests",
"[",
"csessid",
"]",
"except",
"KeyError",
":",
"# nothing left to delete",
"pass"
] | [
74,
4
] | [
80,
16
] | python | en | ['en', 'en', 'en'] | True |
AjaxWebClient._keepalive | (self) |
Callback for checking the connection is still alive.
|
Callback for checking the connection is still alive.
| def _keepalive(self):
"""
Callback for checking the connection is still alive.
"""
now = time.time()
to_remove = []
keep_alives = ((csessid, remove) for csessid, (t, remove)
in self.last_alive.iteritems() if now - t > _KEEPALIVE)
for csessid... | [
"def",
"_keepalive",
"(",
"self",
")",
":",
"now",
"=",
"time",
".",
"time",
"(",
")",
"to_remove",
"=",
"[",
"]",
"keep_alives",
"=",
"(",
"(",
"csessid",
",",
"remove",
")",
"for",
"csessid",
",",
"(",
"t",
",",
"remove",
")",
"in",
"self",
"."... | [
82,
4
] | [
107,
38
] | python | en | ['en', 'error', 'th'] | False |
AjaxWebClient.at_login | (self) |
Called when this session gets authenticated by the server.
|
Called when this session gets authenticated by the server.
| def at_login(self):
"""
Called when this session gets authenticated by the server.
"""
pass | [
"def",
"at_login",
"(",
"self",
")",
":",
"pass"
] | [
109,
4
] | [
113,
12
] | python | en | ['en', 'error', 'th'] | False |
AjaxWebClient.lineSend | (self, csessid, data) |
This adds the data to the buffer and/or sends it to the client
as soon as possible.
Args:
csessid (int): Session id.
data (list): A send structure [cmdname, [args], {kwargs}].
|
This adds the data to the buffer and/or sends it to the client
as soon as possible. | def lineSend(self, csessid, data):
"""
This adds the data to the buffer and/or sends it to the client
as soon as possible.
Args:
csessid (int): Session id.
data (list): A send structure [cmdname, [args], {kwargs}].
"""
request = self.requests.get... | [
"def",
"lineSend",
"(",
"self",
",",
"csessid",
",",
"data",
")",
":",
"request",
"=",
"self",
".",
"requests",
".",
"get",
"(",
"csessid",
")",
"if",
"request",
":",
"# we have a request waiting. Return immediately.",
"request",
".",
"write",
"(",
"jsonify",
... | [
115,
4
] | [
135,
50
] | python | en | ['en', 'error', 'th'] | False |
AjaxWebClient.client_disconnect | (self, csessid) |
Disconnect session with given csessid.
Args:
csessid (int): Session id.
|
Disconnect session with given csessid. | def client_disconnect(self, csessid):
"""
Disconnect session with given csessid.
Args:
csessid (int): Session id.
"""
if csessid in self.requests:
self.requests[csessid].finish()
del self.requests[csessid]
if csessid in self.databuffe... | [
"def",
"client_disconnect",
"(",
"self",
",",
"csessid",
")",
":",
"if",
"csessid",
"in",
"self",
".",
"requests",
":",
"self",
".",
"requests",
"[",
"csessid",
"]",
".",
"finish",
"(",
")",
"del",
"self",
".",
"requests",
"[",
"csessid",
"]",
"if",
... | [
137,
4
] | [
149,
40
] | python | en | ['en', 'error', 'th'] | False |
AjaxWebClient.mode_init | (self, request) |
This is called by render_POST when the client requests an init
mode operation (at startup)
Args:
request (Request): Incoming request.
|
This is called by render_POST when the client requests an init
mode operation (at startup) | def mode_init(self, request):
"""
This is called by render_POST when the client requests an init
mode operation (at startup)
Args:
request (Request): Incoming request.
"""
csessid = request.args.get('csessid')[0]
remote_addr = request.getClientIP()
... | [
"def",
"mode_init",
"(",
"self",
",",
"request",
")",
":",
"csessid",
"=",
"request",
".",
"args",
".",
"get",
"(",
"'csessid'",
")",
"[",
"0",
"]",
"remote_addr",
"=",
"request",
".",
"getClientIP",
"(",
")",
"host_string",
"=",
"\"%s (%s:%s)\"",
"%",
... | [
151,
4
] | [
185,
64
] | python | en | ['en', 'error', 'th'] | False |
AjaxWebClient.mode_keepalive | (self, request) |
This is called by render_POST when the
client is replying to the keepalive.
|
This is called by render_POST when the
client is replying to the keepalive.
| def mode_keepalive(self, request):
"""
This is called by render_POST when the
client is replying to the keepalive.
"""
csessid = request.args.get('csessid')[0]
self.last_alive[csessid] = (time.time(), False)
return '""' | [
"def",
"mode_keepalive",
"(",
"self",
",",
"request",
")",
":",
"csessid",
"=",
"request",
".",
"args",
".",
"get",
"(",
"'csessid'",
")",
"[",
"0",
"]",
"self",
".",
"last_alive",
"[",
"csessid",
"]",
"=",
"(",
"time",
".",
"time",
"(",
")",
",",
... | [
187,
4
] | [
194,
19
] | python | en | ['en', 'error', 'th'] | False |
AjaxWebClient.mode_input | (self, request) |
This is called by render_POST when the client
is sending data to the server.
Args:
request (Request): Incoming request.
|
This is called by render_POST when the client
is sending data to the server. | def mode_input(self, request):
"""
This is called by render_POST when the client
is sending data to the server.
Args:
request (Request): Incoming request.
"""
csessid = request.args.get('csessid')[0]
self.last_alive[csessid] = (time.time(), False)
... | [
"def",
"mode_input",
"(",
"self",
",",
"request",
")",
":",
"csessid",
"=",
"request",
".",
"args",
".",
"get",
"(",
"'csessid'",
")",
"[",
"0",
"]",
"self",
".",
"last_alive",
"[",
"csessid",
"]",
"=",
"(",
"time",
".",
"time",
"(",
")",
",",
"F... | [
196,
4
] | [
213,
19
] | python | en | ['en', 'error', 'th'] | False |
AjaxWebClient.mode_receive | (self, request) |
This is called by render_POST when the client is telling us
that it is ready to receive data as soon as it is available.
This is the basis of a long-polling (comet) mechanism: the
server will wait to reply until data is available.
Args:
request (Request): Incoming r... |
This is called by render_POST when the client is telling us
that it is ready to receive data as soon as it is available.
This is the basis of a long-polling (comet) mechanism: the
server will wait to reply until data is available. | def mode_receive(self, request):
"""
This is called by render_POST when the client is telling us
that it is ready to receive data as soon as it is available.
This is the basis of a long-polling (comet) mechanism: the
server will wait to reply until data is available.
Arg... | [
"def",
"mode_receive",
"(",
"self",
",",
"request",
")",
":",
"csessid",
"=",
"request",
".",
"args",
".",
"get",
"(",
"'csessid'",
")",
"[",
"0",
"]",
"self",
".",
"last_alive",
"[",
"csessid",
"]",
"=",
"(",
"time",
".",
"time",
"(",
")",
",",
... | [
215,
4
] | [
236,
34
] | python | en | ['en', 'error', 'th'] | False |
AjaxWebClient.mode_close | (self, request) |
This is called by render_POST when the client is signalling
that it is about to be closed.
Args:
request (Request): Incoming request.
|
This is called by render_POST when the client is signalling
that it is about to be closed. | def mode_close(self, request):
"""
This is called by render_POST when the client is signalling
that it is about to be closed.
Args:
request (Request): Incoming request.
"""
csessid = request.args.get('csessid')[0]
try:
sess = self.session... | [
"def",
"mode_close",
"(",
"self",
",",
"request",
")",
":",
"csessid",
"=",
"request",
".",
"args",
".",
"get",
"(",
"'csessid'",
")",
"[",
"0",
"]",
"try",
":",
"sess",
"=",
"self",
".",
"sessionhandler",
".",
"sessions_from_csessid",
"(",
"csessid",
... | [
238,
4
] | [
253,
19
] | python | en | ['en', 'error', 'th'] | False |
AjaxWebClient.render_POST | (self, request) |
This function is what Twisted calls with POST requests coming
in from the ajax client. The requests should be tagged with
different modes depending on what needs to be done, such as
initializing or sending/receving data through the request. It
uses a long-polling mechanism to av... |
This function is what Twisted calls with POST requests coming
in from the ajax client. The requests should be tagged with
different modes depending on what needs to be done, such as
initializing or sending/receving data through the request. It
uses a long-polling mechanism to av... | def render_POST(self, request):
"""
This function is what Twisted calls with POST requests coming
in from the ajax client. The requests should be tagged with
different modes depending on what needs to be done, such as
initializing or sending/receving data through the request. It
... | [
"def",
"render_POST",
"(",
"self",
",",
"request",
")",
":",
"dmode",
"=",
"request",
".",
"args",
".",
"get",
"(",
"'mode'",
",",
"[",
"None",
"]",
")",
"[",
"0",
"]",
"if",
"dmode",
"==",
"'init'",
":",
"# startup. Setup the server.",
"return",
"self... | [
255,
4
] | [
286,
23
] | python | en | ['en', 'error', 'th'] | False |
AjaxWebClientSession.get_client_session | (self) |
Get the Client browser session (used for auto-login based on browser session)
Returns:
csession (ClientSession): This is a django-specific internal representation
of the browser session.
|
Get the Client browser session (used for auto-login based on browser session) | def get_client_session(self):
"""
Get the Client browser session (used for auto-login based on browser session)
Returns:
csession (ClientSession): This is a django-specific internal representation
of the browser session.
"""
if self.csessid:
... | [
"def",
"get_client_session",
"(",
"self",
")",
":",
"if",
"self",
".",
"csessid",
":",
"return",
"_CLIENT_SESSIONS",
"(",
"session_key",
"=",
"self",
".",
"csessid",
")"
] | [
303,
4
] | [
313,
61
] | python | en | ['en', 'error', 'th'] | False |
AjaxWebClientSession.disconnect | (self, reason="Server disconnected.") |
Disconnect from server.
Args:
reason (str): Motivation for the disconnect.
|
Disconnect from server. | def disconnect(self, reason="Server disconnected."):
"""
Disconnect from server.
Args:
reason (str): Motivation for the disconnect.
"""
csession = self.get_client_session()
if csession:
csession["webclient_authenticated_uid"] = None
c... | [
"def",
"disconnect",
"(",
"self",
",",
"reason",
"=",
"\"Server disconnected.\"",
")",
":",
"csession",
"=",
"self",
".",
"get_client_session",
"(",
")",
"if",
"csession",
":",
"csession",
"[",
"\"webclient_authenticated_uid\"",
"]",
"=",
"None",
"csession",
"."... | [
315,
4
] | [
330,
44
] | python | en | ['en', 'error', 'th'] | False |
AjaxWebClientSession.data_out | (self, **kwargs) |
Data Evennia -> User
Kwargs:
kwargs (any): Options to the protocol
|
Data Evennia -> User | def data_out(self, **kwargs):
"""
Data Evennia -> User
Kwargs:
kwargs (any): Options to the protocol
"""
self.sessionhandler.data_out(self, **kwargs) | [
"def",
"data_out",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"self",
".",
"sessionhandler",
".",
"data_out",
"(",
"self",
",",
"*",
"*",
"kwargs",
")"
] | [
338,
4
] | [
345,
52
] | python | en | ['en', 'error', 'th'] | False |
AjaxWebClientSession.send_text | (self, *args, **kwargs) |
Send text data. This will pre-process the text for
color-replacement, conversion to html etc.
Args:
text (str): Text to send.
Kwargs:
options (dict): Options-dict with the following keys understood:
- raw (bool): No parsing at all (leave ansi-to... |
Send text data. This will pre-process the text for
color-replacement, conversion to html etc. | def send_text(self, *args, **kwargs):
"""
Send text data. This will pre-process the text for
color-replacement, conversion to html etc.
Args:
text (str): Text to send.
Kwargs:
options (dict): Options-dict with the following keys understood:
... | [
"def",
"send_text",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"args",
":",
"args",
"=",
"list",
"(",
"args",
")",
"text",
"=",
"args",
"[",
"0",
"]",
"if",
"text",
"is",
"None",
":",
"return",
"else",
":",
"return"... | [
347,
4
] | [
393,
63
] | python | en | ['en', 'error', 'th'] | False |
AjaxWebClientSession.send_default | (self, cmdname, *args, **kwargs) |
Data Evennia -> User.
Args:
cmdname (str): The first argument will always be the oob cmd name.
*args (any): Remaining args will be arguments for `cmd`.
Kwargs:
options (dict): These are ignored for oob commands. Use command
arguments (which ... |
Data Evennia -> User. | def send_default(self, cmdname, *args, **kwargs):
"""
Data Evennia -> User.
Args:
cmdname (str): The first argument will always be the oob cmd name.
*args (any): Remaining args will be arguments for `cmd`.
Kwargs:
options (dict): These are ignored fo... | [
"def",
"send_default",
"(",
"self",
",",
"cmdname",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"not",
"cmdname",
"==",
"\"options\"",
":",
"# print \"ajax.send_default\", cmdname, args, kwargs",
"self",
".",
"client",
".",
"lineSend",
"(",
"sel... | [
399,
4
] | [
415,
71
] | python | en | ['en', 'error', 'th'] | False |
_get_config_directory | () | Find the predefined detector config directory. | Find the predefined detector config directory. | def _get_config_directory():
"""Find the predefined detector config directory."""
try:
# Assume we are running in the source mmdetection3d repo
repo_dpath = dirname(dirname(dirname(__file__)))
except NameError:
# For IPython development when this __file__ is not defined
impor... | [
"def",
"_get_config_directory",
"(",
")",
":",
"try",
":",
"# Assume we are running in the source mmdetection3d repo",
"repo_dpath",
"=",
"dirname",
"(",
"dirname",
"(",
"dirname",
"(",
"__file__",
")",
")",
")",
"except",
"NameError",
":",
"# For IPython development wh... | [
12,
0
] | [
24,
23
] | python | en | ['en', 'en', 'en'] | True |
_get_config_module | (fname) | Load a configuration as a python module. | Load a configuration as a python module. | def _get_config_module(fname):
"""Load a configuration as a python module."""
from mmcv import Config
config_dpath = _get_config_directory()
config_fpath = join(config_dpath, fname)
config_mod = Config.fromfile(config_fpath)
return config_mod | [
"def",
"_get_config_module",
"(",
"fname",
")",
":",
"from",
"mmcv",
"import",
"Config",
"config_dpath",
"=",
"_get_config_directory",
"(",
")",
"config_fpath",
"=",
"join",
"(",
"config_dpath",
",",
"fname",
")",
"config_mod",
"=",
"Config",
".",
"fromfile",
... | [
27,
0
] | [
33,
21
] | python | en | ['en', 'fr', 'en'] | True |
_get_detector_cfg | (fname) | Grab configs necessary to create a detector.
These are deep copied to allow for safe modification of parameters without
influencing other tests.
| Grab configs necessary to create a detector. | def _get_detector_cfg(fname):
"""Grab configs necessary to create a detector.
These are deep copied to allow for safe modification of parameters without
influencing other tests.
"""
config = _get_config_module(fname)
model = copy.deepcopy(config.model)
return model | [
"def",
"_get_detector_cfg",
"(",
"fname",
")",
":",
"config",
"=",
"_get_config_module",
"(",
"fname",
")",
"model",
"=",
"copy",
".",
"deepcopy",
"(",
"config",
".",
"model",
")",
"return",
"model"
] | [
36,
0
] | [
44,
16
] | python | en | ['en', 'en', 'en'] | True |
_demo_mm_inputs | (input_shape=(1, 3, 300, 300),
num_items=None, num_classes=10) | Create a superset of inputs needed to run test or train batches.
Args:
input_shape (tuple):
input batch dimensions
num_items (None | List[int]):
specifies the number of boxes in each batch item
num_classes (int):
number of different labels a box might h... | Create a superset of inputs needed to run test or train batches. | def _demo_mm_inputs(input_shape=(1, 3, 300, 300),
num_items=None, num_classes=10): # yapf: disable
"""Create a superset of inputs needed to run test or train batches.
Args:
input_shape (tuple):
input batch dimensions
num_items (None | List[int]):
sp... | [
"def",
"_demo_mm_inputs",
"(",
"input_shape",
"=",
"(",
"1",
",",
"3",
",",
"300",
",",
"300",
")",
",",
"num_items",
"=",
"None",
",",
"num_classes",
"=",
"10",
")",
":",
"# yapf: disable",
"from",
"mmdet",
".",
"core",
"import",
"BitmapMasks",
"(",
"... | [
141,
0
] | [
206,
20
] | python | en | ['en', 'en', 'en'] | True |
Title.font | (self) |
Sets this color bar's title font. Note that the title's font
used to be set by the now deprecated `titlefont` attribute.
The 'font' property is an instance of Font
that may be specified as:
- An instance of :class:`plotly.graph_objs.funnel.marker.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.funnel.marker.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.funnel.marke... | [
"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.funnel.marker.colorbar.Title`
font
Sets this color bar's title font. No... |
Construct a new Title object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.funnel.marker.colorbar.Title`
font
Sets this color bar's title font. No... | 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.funnel.... | [
"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 |
DriverMenuService.get_active_menu | (
self, connection: ConnectionRecord = None, thread_id: str = None
) |
Render the current menu.
Args:
connection: The active connection record
thread_id: The thread identifier from the requesting message.
|
Render the current menu. | async def get_active_menu(
self, connection: ConnectionRecord = None, thread_id: str = None
) -> Menu:
"""
Render the current menu.
Args:
connection: The active connection record
thread_id: The thread identifier from the requesting message.
"""
... | [
"async",
"def",
"get_active_menu",
"(",
"self",
",",
"connection",
":",
"ConnectionRecord",
"=",
"None",
",",
"thread_id",
":",
"str",
"=",
"None",
")",
"->",
"Menu",
":",
"await",
"self",
".",
"send_webhook",
"(",
"\"get-active-menu\"",
",",
"{",
"\"connect... | [
17,
4
] | [
34,
19
] | python | en | ['en', 'error', 'th'] | False |
DriverMenuService.perform_menu_action | (
self,
action_name: str,
action_params: dict,
connection: ConnectionRecord = None,
thread_id: str = None,
) |
Perform an action defined by the active menu.
Args:
action_name: The unique name of the action being performed
action_params: A collection of parameters for the action
connection: The active connection record
thread_id: The thread identifier from the req... |
Perform an action defined by the active menu. | async def perform_menu_action(
self,
action_name: str,
action_params: dict,
connection: ConnectionRecord = None,
thread_id: str = None,
) -> AgentMessage:
"""
Perform an action defined by the active menu.
Args:
action_name: The unique name... | [
"async",
"def",
"perform_menu_action",
"(",
"self",
",",
"action_name",
":",
"str",
",",
"action_params",
":",
"dict",
",",
"connection",
":",
"ConnectionRecord",
"=",
"None",
",",
"thread_id",
":",
"str",
"=",
"None",
",",
")",
"->",
"AgentMessage",
":",
... | [
36,
4
] | [
61,
19
] | python | en | ['en', 'error', 'th'] | False |
DriverMenuService.send_webhook | (self, topic: str, payload: dict) | Dispatch a webhook through the registered responder. | Dispatch a webhook through the registered responder. | async def send_webhook(self, topic: str, payload: dict):
"""Dispatch a webhook through the registered responder."""
responder = await self._context.inject(BaseResponder, required=False)
if responder:
await responder.send_webhook(topic, payload) | [
"async",
"def",
"send_webhook",
"(",
"self",
",",
"topic",
":",
"str",
",",
"payload",
":",
"dict",
")",
":",
"responder",
"=",
"await",
"self",
".",
"_context",
".",
"inject",
"(",
"BaseResponder",
",",
"required",
"=",
"False",
")",
"if",
"responder",
... | [
63,
4
] | [
67,
56
] | python | en | ['en', 'en', 'en'] | True |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.