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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Polar.radialaxis | (self) |
The 'radialaxis' property is an instance of RadialAxis
that may be specified as:
- An instance of :class:`plotly.graph_objs.layout.polar.RadialAxis`
- A dict of string/value properties that will be passed
to the RadialAxis constructor
Supported dict prop... |
The 'radialaxis' property is an instance of RadialAxis
that may be specified as:
- An instance of :class:`plotly.graph_objs.layout.polar.RadialAxis`
- A dict of string/value properties that will be passed
to the RadialAxis constructor
Supported dict prop... | def radialaxis(self):
"""
The 'radialaxis' property is an instance of RadialAxis
that may be specified as:
- An instance of :class:`plotly.graph_objs.layout.polar.RadialAxis`
- A dict of string/value properties that will be passed
to the RadialAxis constructor
... | [
"def",
"radialaxis",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"radialaxis\"",
"]"
] | [
488,
4
] | [
782,
33
] | python | en | ['en', 'error', 'th'] | False |
Polar.sector | (self) |
Sets angular span of this polar subplot with two angles (in
degrees). Sector are assumed to be spanned in the
counterclockwise direction with 0 corresponding to rightmost
limit of the polar subplot.
The 'sector' property is an info array that may be specified as:
... |
Sets angular span of this polar subplot with two angles (in
degrees). Sector are assumed to be spanned in the
counterclockwise direction with 0 corresponding to rightmost
limit of the polar subplot.
The 'sector' property is an info array that may be specified as:
... | def sector(self):
"""
Sets angular span of this polar subplot with two angles (in
degrees). Sector are assumed to be spanned in the
counterclockwise direction with 0 corresponding to rightmost
limit of the polar subplot.
The 'sector' property is an info array that ma... | [
"def",
"sector",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"sector\"",
"]"
] | [
791,
4
] | [
810,
29
] | python | en | ['en', 'error', 'th'] | False |
Polar.uirevision | (self) |
Controls persistence of user-driven changes in axis attributes,
if not overridden in the individual axes. Defaults to
`layout.uirevision`.
The 'uirevision' property accepts values of any type
Returns
-------
Any
|
Controls persistence of user-driven changes in axis attributes,
if not overridden in the individual axes. Defaults to
`layout.uirevision`.
The 'uirevision' property accepts values of any type | def uirevision(self):
"""
Controls persistence of user-driven changes in axis attributes,
if not overridden in the individual axes. Defaults to
`layout.uirevision`.
The 'uirevision' property accepts values of any type
Returns
-------
Any
"""
... | [
"def",
"uirevision",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"uirevision\"",
"]"
] | [
819,
4
] | [
831,
33
] | python | en | ['en', 'error', 'th'] | False |
Polar.__init__ | (
self,
arg=None,
angularaxis=None,
bargap=None,
barmode=None,
bgcolor=None,
domain=None,
gridshape=None,
hole=None,
radialaxis=None,
sector=None,
uirevision=None,
**kwargs
) |
Construct a new Polar object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.layout.Polar`
angularaxis
:class:`plotly.graph_objects.layout.polar.AngularAxis`
... |
Construct a new Polar object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.layout.Polar`
angularaxis
:class:`plotly.graph_objects.layout.polar.AngularAxis`
... | def __init__(
self,
arg=None,
angularaxis=None,
bargap=None,
barmode=None,
bgcolor=None,
domain=None,
gridshape=None,
hole=None,
radialaxis=None,
sector=None,
uirevision=None,
**kwargs
):
"""
Cons... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"angularaxis",
"=",
"None",
",",
"bargap",
"=",
"None",
",",
"barmode",
"=",
"None",
",",
"bgcolor",
"=",
"None",
",",
"domain",
"=",
"None",
",",
"gridshape",
"=",
"None",
",",
"hole",
... | [
886,
4
] | [
1032,
34
] | python | en | ['en', 'error', 'th'] | False |
Spaceframe.fill | (self) |
Sets the fill ratio of the `spaceframe` elements. The default
fill value is 1 meaning that they are entirely shaded. Applying
a `fill` ratio less than one would allow the creation of
openings parallel to the edges.
The 'fill' property is a number and may be specified as:
... |
Sets the fill ratio of the `spaceframe` elements. The default
fill value is 1 meaning that they are entirely shaded. Applying
a `fill` ratio less than one would allow the creation of
openings parallel to the edges.
The 'fill' property is a number and may be specified as:
... | def fill(self):
"""
Sets the fill ratio of the `spaceframe` elements. The default
fill value is 1 meaning that they are entirely shaded. Applying
a `fill` ratio less than one would allow the creation of
openings parallel to the edges.
The 'fill' property is a number ... | [
"def",
"fill",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"fill\"",
"]"
] | [
15,
4
] | [
29,
27
] | python | en | ['en', 'error', 'th'] | False |
Spaceframe.show | (self) |
Displays/hides tetrahedron shapes between minimum and maximum
iso-values. Often useful when either caps or surfaces are
disabled or filled with values less than 1.
The 'show' property must be specified as a bool
(either True, or False)
Returns
-------
... |
Displays/hides tetrahedron shapes between minimum and maximum
iso-values. Often useful when either caps or surfaces are
disabled or filled with values less than 1.
The 'show' property must be specified as a bool
(either True, or False) | def show(self):
"""
Displays/hides tetrahedron shapes between minimum and maximum
iso-values. Often useful when either caps or surfaces are
disabled or filled with values less than 1.
The 'show' property must be specified as a bool
(either True, or False)
Re... | [
"def",
"show",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"show\"",
"]"
] | [
38,
4
] | [
51,
27
] | python | en | ['en', 'error', 'th'] | False |
Spaceframe.__init__ | (self, arg=None, fill=None, show=None, **kwargs) |
Construct a new Spaceframe object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.volume.Spaceframe`
fill
Sets the fill ratio of the `spaceframe` el... |
Construct a new Spaceframe object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.volume.Spaceframe`
fill
Sets the fill ratio of the `spaceframe` el... | def __init__(self, arg=None, fill=None, show=None, **kwargs):
"""
Construct a new Spaceframe object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.volume.Spacef... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"fill",
"=",
"None",
",",
"show",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"super",
"(",
"Spaceframe",
",",
"self",
")",
".",
"__init__",
"(",
"\"spaceframe\"",
")",
"if",
"\"_par... | [
74,
4
] | [
143,
34
] | python | en | ['en', 'error', 'th'] | False |
Margin.autoexpand | (self) |
Turns on/off margin expansion computations. Legends, colorbars,
updatemenus, sliders, axis rangeselector and rangeslider are
allowed to push the margins by defaults.
The 'autoexpand' property must be specified as a bool
(either True, or False)
Returns
-----... |
Turns on/off margin expansion computations. Legends, colorbars,
updatemenus, sliders, axis rangeselector and rangeslider are
allowed to push the margins by defaults.
The 'autoexpand' property must be specified as a bool
(either True, or False) | def autoexpand(self):
"""
Turns on/off margin expansion computations. Legends, colorbars,
updatemenus, sliders, axis rangeselector and rangeslider are
allowed to push the margins by defaults.
The 'autoexpand' property must be specified as a bool
(either True, or Fals... | [
"def",
"autoexpand",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"autoexpand\"",
"]"
] | [
15,
4
] | [
28,
33
] | python | en | ['en', 'error', 'th'] | False |
Margin.b | (self) |
Sets the bottom margin (in px).
The 'b' property is a number and may be specified as:
- An int or float in the interval [0, inf]
Returns
-------
int|float
|
Sets the bottom margin (in px).
The 'b' property is a number and may be specified as:
- An int or float in the interval [0, inf] | def b(self):
"""
Sets the bottom margin (in px).
The 'b' property is a number and may be specified as:
- An int or float in the interval [0, inf]
Returns
-------
int|float
"""
return self["b"] | [
"def",
"b",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"b\"",
"]"
] | [
37,
4
] | [
48,
24
] | python | en | ['en', 'error', 'th'] | False |
Margin.l | (self) |
Sets the left margin (in px).
The 'l' property is a number and may be specified as:
- An int or float in the interval [0, inf]
Returns
-------
int|float
|
Sets the left margin (in px).
The 'l' property is a number and may be specified as:
- An int or float in the interval [0, inf] | def l(self):
"""
Sets the left margin (in px).
The 'l' property is a number and may be specified as:
- An int or float in the interval [0, inf]
Returns
-------
int|float
"""
return self["l"] | [
"def",
"l",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"l\"",
"]"
] | [
57,
4
] | [
68,
24
] | python | en | ['en', 'error', 'th'] | False |
Margin.pad | (self) |
Sets the amount of padding (in px) between the plotting area
and the axis lines
The 'pad' 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) between the plotting area
and the axis lines
The 'pad' property is a number and may be specified as:
- An int or float in the interval [0, inf] | def pad(self):
"""
Sets the amount of padding (in px) between the plotting area
and the axis lines
The 'pad' property is a number and may be specified as:
- An int or float in the interval [0, inf]
Returns
-------
int|float
"""
retu... | [
"def",
"pad",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"pad\"",
"]"
] | [
77,
4
] | [
89,
26
] | python | en | ['en', 'error', 'th'] | False |
Margin.r | (self) |
Sets the right margin (in px).
The 'r' property is a number and may be specified as:
- An int or float in the interval [0, inf]
Returns
-------
int|float
|
Sets the right margin (in px).
The 'r' property is a number and may be specified as:
- An int or float in the interval [0, inf] | def r(self):
"""
Sets the right margin (in px).
The 'r' property is a number and may be specified as:
- An int or float in the interval [0, inf]
Returns
-------
int|float
"""
return self["r"] | [
"def",
"r",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"r\"",
"]"
] | [
98,
4
] | [
109,
24
] | python | en | ['en', 'error', 'th'] | False |
Margin.t | (self) |
Sets the top margin (in px).
The 't' property is a number and may be specified as:
- An int or float in the interval [0, inf]
Returns
-------
int|float
|
Sets the top margin (in px).
The 't' property is a number and may be specified as:
- An int or float in the interval [0, inf] | def t(self):
"""
Sets the top margin (in px).
The 't' property is a number and may be specified as:
- An int or float in the interval [0, inf]
Returns
-------
int|float
"""
return self["t"] | [
"def",
"t",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"t\"",
"]"
] | [
118,
4
] | [
129,
24
] | python | en | ['en', 'error', 'th'] | False |
Margin.__init__ | (
self,
arg=None,
autoexpand=None,
b=None,
l=None,
pad=None,
r=None,
t=None,
**kwargs
) |
Construct a new Margin object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.layout.Margin`
autoexpand
Turns on/off margin expansion computations. Legends,
... |
Construct a new Margin object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.layout.Margin`
autoexpand
Turns on/off margin expansion computations. Legends,
... | def __init__(
self,
arg=None,
autoexpand=None,
b=None,
l=None,
pad=None,
r=None,
t=None,
**kwargs
):
"""
Construct a new Margin object
Parameters
----------
arg
dict of properties com... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"autoexpand",
"=",
"None",
",",
"b",
"=",
"None",
",",
"l",
"=",
"None",
",",
"pad",
"=",
"None",
",",
"r",
"=",
"None",
",",
"t",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
... | [
158,
4
] | [
258,
34
] | python | en | ['en', 'error', 'th'] | False |
clip_sigmoid | (x, eps=1e-4) | Sigmoid function for input feature.
Args:
x (torch.Tensor): Input feature map with the shape of [B, N, H, W].
eps (float): Lower bound of the range to be clamped to. Defaults
to 1e-4.
Returns:
torch.Tensor: Feature map after sigmoid.
| Sigmoid function for input feature. | def clip_sigmoid(x, eps=1e-4):
"""Sigmoid function for input feature.
Args:
x (torch.Tensor): Input feature map with the shape of [B, N, H, W].
eps (float): Lower bound of the range to be clamped to. Defaults
to 1e-4.
Returns:
torch.Tensor: Feature map after sigmoid.
... | [
"def",
"clip_sigmoid",
"(",
"x",
",",
"eps",
"=",
"1e-4",
")",
":",
"y",
"=",
"torch",
".",
"clamp",
"(",
"x",
".",
"sigmoid_",
"(",
")",
",",
"min",
"=",
"eps",
",",
"max",
"=",
"1",
"-",
"eps",
")",
"return",
"y"
] | [
3,
0
] | [
15,
12
] | python | en | ['en', 'en', 'en'] | True |
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 colorsis set to a
numerical array. In case `colorscale` is unspecified or
`autocolorscale` is true, the default palette will b... |
Determines whether the colorscale is a default palette
(`autocolorscale: true`) or the palette determined by
`marker.colorscale`. Has an effect only if colorsis set to a
numerical array. In case `colorscale` is unspecified or
`autocolorscale` is true, the default palette will b... | 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 colorsis set to a
numerical array. In case `colorscale` is unspecified or
`autocolorscale`... | [
"def",
"autocolorscale",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"autocolorscale\"",
"]"
] | [
31,
4
] | [
48,
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 colors) or the bounds set in
`marker.cmin` and `marker.cmax` Has an effect only if colorsis
set to a numerical array. Defaults to `false` when
`marker.cmin` and `marker.cmax` are set by ... |
Determines whether or not the color domain is computed with
respect to the input data (here colors) or the bounds set in
`marker.cmin` and `marker.cmax` Has an effect only if colorsis
set to a numerical array. Defaults to `false` when
`marker.cmin` and `marker.cmax` are set by ... | def cauto(self):
"""
Determines whether or not the color domain is computed with
respect to the input data (here colors) or the bounds set in
`marker.cmin` and `marker.cmax` Has an effect only if colorsis
set to a numerical array. Defaults to `false` when
`marker.cmin` a... | [
"def",
"cauto",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"cauto\"",
"]"
] | [
57,
4
] | [
72,
28
] | python | en | ['en', 'error', 'th'] | False |
Marker.cmax | (self) |
Sets the upper bound of the color domain. Has an effect only if
colorsis set to a numerical array. Value should have the same
units as colors and if set, `marker.cmin` must be set as well.
The 'cmax' property is a number and may be specified as:
- An int or float
... |
Sets the upper bound of the color domain. Has an effect only if
colorsis set to a numerical array. Value should have the same
units as colors and if set, `marker.cmin` must be set as well.
The 'cmax' property is a number and may be specified as:
- An int or float | def cmax(self):
"""
Sets the upper bound of the color domain. Has an effect only if
colorsis set to a numerical array. Value should have the same
units as colors and if set, `marker.cmin` must be set as well.
The 'cmax' property is a number and may be specified as:
... | [
"def",
"cmax",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"cmax\"",
"]"
] | [
81,
4
] | [
94,
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 colorsis set to a numerical array. Value should
have the same units as colors. Has no effect when
`marker.cauto` is `false`.
T... |
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 colorsis set to a numerical array. Value should
have the same units as colors. Has no effect when
`marker.cauto` is `false`.
T... | 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 colorsis set to a numerical array. Value should
have the same units as colors. Has no effect when
`marker.cauto`... | [
"def",
"cmid",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"cmid\"",
"]"
] | [
103,
4
] | [
118,
27
] | python | en | ['en', 'error', 'th'] | False |
Marker.cmin | (self) |
Sets the lower bound of the color domain. Has an effect only if
colorsis set to a numerical array. Value should have the same
units as colors and if set, `marker.cmax` must be set as well.
The 'cmin' property is a number and may be specified as:
- An int or float
... |
Sets the lower bound of the color domain. Has an effect only if
colorsis set to a numerical array. Value should have the same
units as colors and if set, `marker.cmax` must be set as well.
The 'cmin' property is a number and may be specified as:
- An int or float | def cmin(self):
"""
Sets the lower bound of the color domain. Has an effect only if
colorsis set to a numerical array. Value should have the same
units as colors and if set, `marker.cmax` must be set as well.
The 'cmin' property is a number and may be specified as:
... | [
"def",
"cmin",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"cmin\"",
"]"
] | [
127,
4
] | [
140,
27
] | 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\"",
"]"
] | [
149,
4
] | [
167,
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.treemap.marker.ColorBar`
- A dict of string/value properties that will be passed
to the ColorBar constructor
Supported dict properties... |
The 'colorbar' property is an instance of ColorBar
that may be specified as:
- An instance of :class:`plotly.graph_objs.treemap.marker.ColorBar`
- A dict of string/value properties that will be passed
to the ColorBar constructor
Supported dict properties... | def colorbar(self):
"""
The 'colorbar' property is an instance of ColorBar
that may be specified as:
- An instance of :class:`plotly.graph_objs.treemap.marker.ColorBar`
- A dict of string/value properties that will be passed
to the ColorBar constructor
... | [
"def",
"colorbar",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"colorbar\"",
"]"
] | [
176,
4
] | [
403,
31
] | python | en | ['en', 'error', 'th'] | False |
Marker.colors | (self) |
Sets the color of each sector of this trace. If not specified,
the default trace color set is used to pick the sector colors.
The 'colors' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Returns
-------
numpy.ndarr... |
Sets the color of each sector of this trace. If not specified,
the default trace color set is used to pick the sector colors.
The 'colors' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series | def colors(self):
"""
Sets the color of each sector of this trace. If not specified,
the default trace color set is used to pick the sector colors.
The 'colors' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Returns
... | [
"def",
"colors",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"colors\"",
"]"
] | [
412,
4
] | [
424,
29
] | python | en | ['en', 'error', 'th'] | False |
Marker.colorscale | (self) |
Sets the colorscale. Has an effect only if colorsis 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) values are r... |
Sets the colorscale. Has an effect only if colorsis 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) values are r... | def colorscale(self):
"""
Sets the colorscale. Has an effect only if colorsis 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... | [
"def",
"colorscale",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"colorscale\"",
"]"
] | [
433,
4
] | [
477,
33
] | python | en | ['en', 'error', 'th'] | False |
Marker.colorssrc | (self) |
Sets the source reference on Chart Studio Cloud for colors .
The 'colorssrc' 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 colors .
The 'colorssrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def colorssrc(self):
"""
Sets the source reference on Chart Studio Cloud for colors .
The 'colorssrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["colorssrc"] | [
"def",
"colorssrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"colorssrc\"",
"]"
] | [
486,
4
] | [
497,
32
] | python | en | ['en', 'error', 'th'] | False |
Marker.depthfade | (self) |
Determines if the sector colors are faded towards the
background from the leaves up to the headers. This option is
unavailable when a `colorscale` is present, defaults to false
when `marker.colors` is set, but otherwise defaults to true.
When set to "reversed", the fading direct... |
Determines if the sector colors are faded towards the
background from the leaves up to the headers. This option is
unavailable when a `colorscale` is present, defaults to false
when `marker.colors` is set, but otherwise defaults to true.
When set to "reversed", the fading direct... | def depthfade(self):
"""
Determines if the sector colors are faded towards the
background from the leaves up to the headers. This option is
unavailable when a `colorscale` is present, defaults to false
when `marker.colors` is set, but otherwise defaults to true.
When set ... | [
"def",
"depthfade",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"depthfade\"",
"]"
] | [
506,
4
] | [
525,
32
] | 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.treemap.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.treemap.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.treemap.marker.Line`
- A dict of string/value properties that will be passed
to the Line constructor
Supported dict... | [
"def",
"line",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"line\"",
"]"
] | [
534,
4
] | [
561,
27
] | python | en | ['en', 'error', 'th'] | False |
Marker.pad | (self) |
The 'pad' property is an instance of Pad
that may be specified as:
- An instance of :class:`plotly.graph_objs.treemap.marker.Pad`
- A dict of string/value properties that will be passed
to the Pad constructor
Supported dict properties:
... |
The 'pad' property is an instance of Pad
that may be specified as:
- An instance of :class:`plotly.graph_objs.treemap.marker.Pad`
- A dict of string/value properties that will be passed
to the Pad constructor
Supported dict properties:
... | def pad(self):
"""
The 'pad' property is an instance of Pad
that may be specified as:
- An instance of :class:`plotly.graph_objs.treemap.marker.Pad`
- A dict of string/value properties that will be passed
to the Pad constructor
Supported dict prop... | [
"def",
"pad",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"pad\"",
"]"
] | [
570,
4
] | [
593,
26
] | python | en | ['en', 'error', 'th'] | False |
Marker.reversescale | (self) |
Reverses the color mapping if true. Has an effect only if
colorsis 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 as a bool
... |
Reverses the color mapping if true. Has an effect only if
colorsis 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 as a bool
... | def reversescale(self):
"""
Reverses the color mapping if true. Has an effect only if
colorsis 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' pro... | [
"def",
"reversescale",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"reversescale\"",
"]"
] | [
602,
4
] | [
616,
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 colorsis 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 colorsis 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 colorsis set to a numerical array.
The 'showscale' property must be specified as a bool
(either True, or False)
Returns
-------
bool
... | [
"def",
"showscale",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"showscale\"",
"]"
] | [
625,
4
] | [
637,
32
] | python | en | ['en', 'error', 'th'] | False |
Marker.__init__ | (
self,
arg=None,
autocolorscale=None,
cauto=None,
cmax=None,
cmid=None,
cmin=None,
coloraxis=None,
colorbar=None,
colors=None,
colorscale=None,
colorssrc=None,
depthfade=None,
line=None,
pad=None,
... |
Construct a new Marker object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.treemap.Marker`
autocolorscale
Determines whether the colorscale is a ... |
Construct a new Marker object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.treemap.Marker`
autocolorscale
Determines whether the colorscale is a ... | def __init__(
self,
arg=None,
autocolorscale=None,
cauto=None,
cmax=None,
cmid=None,
cmin=None,
coloraxis=None,
colorbar=None,
colors=None,
colorscale=None,
colorssrc=None,
depthfade=None,
line=None,
... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"autocolorscale",
"=",
"None",
",",
"cauto",
"=",
"None",
",",
"cmax",
"=",
"None",
",",
"cmid",
"=",
"None",
",",
"cmin",
"=",
"None",
",",
"coloraxis",
"=",
"None",
",",
"colorbar",
"=... | [
739,
4
] | [
958,
34
] | python | en | ['en', 'error', 'th'] | False |
Line.color | (self) |
Sets the line color. By default uses either dark grey or white
to increase contrast with background 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 ... |
Sets the line color. By default uses either dark grey or white
to increase contrast with background 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 ... | def color(self):
"""
Sets the line color. By default uses either dark grey or white
to increase contrast with background 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)')
... | [
"def",
"color",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"color\"",
"]"
] | [
15,
4
] | [
66,
28
] | python | en | ['en', 'error', 'th'] | False |
Line.dash | (self) |
Sets the dash style of lines. Set to a dash type string
("solid", "dot", "dash", "longdash", "dashdot", or
"longdashdot") or a dash length list in px (eg
"5px,10px,2px,2px").
The 'dash' property is a string and must be specified as:
- One of the following strings:... |
Sets the dash style of lines. Set to a dash type string
("solid", "dot", "dash", "longdash", "dashdot", or
"longdashdot") or a dash length list in px (eg
"5px,10px,2px,2px").
The 'dash' property is a string and must be specified as:
- One of the following strings:... | def dash(self):
"""
Sets the dash style of lines. Set to a dash type string
("solid", "dot", "dash", "longdash", "dashdot", or
"longdashdot") or a dash length list in px (eg
"5px,10px,2px,2px").
The 'dash' property is a string and must be specified as:
- On... | [
"def",
"dash",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"dash\"",
"]"
] | [
75,
4
] | [
92,
27
] | python | en | ['en', 'error', 'th'] | False |
Line.width | (self) |
Sets the line width (in px).
The 'width' property is a number and may be specified as:
- An int or float in the interval [0, inf]
Returns
-------
int|float
|
Sets the line width (in px).
The 'width' property is a number and may be specified as:
- An int or float in the interval [0, inf] | def width(self):
"""
Sets the line width (in px).
The 'width' property is a number and may be specified as:
- An int or float in the interval [0, inf]
Returns
-------
int|float
"""
return self["width"] | [
"def",
"width",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"width\"",
"]"
] | [
101,
4
] | [
112,
28
] | python | en | ['en', 'error', 'th'] | False |
Line.__init__ | (self, arg=None, color=None, dash=None, width=None, **kwargs) |
Construct a new Line object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.layout.newshape.Line`
color
Sets the line color. By default uses either ... |
Construct a new Line object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.layout.newshape.Line`
color
Sets the line color. By default uses either ... | def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs):
"""
Construct a new Line object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.layout... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"color",
"=",
"None",
",",
"dash",
"=",
"None",
",",
"width",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"super",
"(",
"Line",
",",
"self",
")",
".",
"__init__",
"(",
"\"line\"",
... | [
135,
4
] | [
208,
34
] | 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.pointcloud.hoverlabel.Font`
- A dict of string/value properties that will be passed
to the Font constructor
... |
Sets the font used in hover labels.
The 'font' property is an instance of Font
that may be specified as:
- An instance of :class:`plotly.graph_objs.pointcloud.hoverlabel.Font`
- A dict of string/value properties that will be passed
to the Font constructor
... | def font(self):
"""
Sets the font used in hover labels.
The 'font' property is an instance of Font
that may be specified as:
- An instance of :class:`plotly.graph_objs.pointcloud.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.pointcloud.Hoverlabel`
align
Sets the horizontal alignment of the ... |
Construct a new Hoverlabel object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.pointcloud.Hoverlabel`
align
Sets the horizontal alignment of the ... | 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 |
TestGpt2.test_batchsize | (self) |
Ensures gpt2 provides the same generation results regardless of batchsize.
|
Ensures gpt2 provides the same generation results regardless of batchsize.
| def test_batchsize(self):
"""
Ensures gpt2 provides the same generation results regardless of batchsize.
"""
for add_start_token in [True, False]:
for batchsize in [1, 2, 4]:
with self.subTest(
f'test_batchsize with bs={batchsize} and ast={... | [
"def",
"test_batchsize",
"(",
"self",
")",
":",
"for",
"add_start_token",
"in",
"[",
"True",
",",
"False",
"]",
":",
"for",
"batchsize",
"in",
"[",
"1",
",",
"2",
",",
"4",
"]",
":",
"with",
"self",
".",
"subTest",
"(",
"f'test_batchsize with bs={batchsi... | [
90,
4
] | [
99,
68
] | python | en | ['en', 'error', 'th'] | False |
convert | (src, dst) | Convert keys in pycls pretrained RegNet models to mmdet style. | Convert keys in pycls pretrained RegNet models to mmdet style. | def convert(src, dst):
"""Convert keys in pycls pretrained RegNet models to mmdet style."""
# load caffe model
regnet_model = torch.load(src)
blobs = regnet_model['model_state']
# convert to pytorch style
state_dict = OrderedDict()
converted_names = set()
for key, weight in blobs.items()... | [
"def",
"convert",
"(",
"src",
",",
"dst",
")",
":",
"# load caffe model",
"regnet_model",
"=",
"torch",
".",
"load",
"(",
"src",
")",
"blobs",
"=",
"regnet_model",
"[",
"'model_state'",
"]",
"# convert to pytorch style",
"state_dict",
"=",
"OrderedDict",
"(",
... | [
52,
0
] | [
75,
31
] | 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 range selector button text.
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.layout.xaxis.r
angeselector.Font`
... |
Construct a new Font object
Sets the font of the range selector button text. | def __init__(self, arg=None, color=None, family=None, size=None, **kwargs):
"""
Construct a new Font object
Sets the font of the range selector button text.
Parameters
----------
arg
dict of properties compatible with this constructor or
... | [
"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 |
_write_ply | (points, out_filename) | Write points into ``ply`` format for meshlab visualization.
Args:
points (np.ndarray): Points in shape (N, dim).
out_filename (str): Filename to be saved.
| Write points into ``ply`` format for meshlab visualization. | def _write_ply(points, out_filename):
"""Write points into ``ply`` format for meshlab visualization.
Args:
points (np.ndarray): Points in shape (N, dim).
out_filename (str): Filename to be saved.
"""
N = points.shape[0]
fout = open(out_filename, 'w')
for i in range(N):
i... | [
"def",
"_write_ply",
"(",
"points",
",",
"out_filename",
")",
":",
"N",
"=",
"points",
".",
"shape",
"[",
"0",
"]",
"fout",
"=",
"open",
"(",
"out_filename",
",",
"'w'",
")",
"for",
"i",
"in",
"range",
"(",
"N",
")",
":",
"if",
"points",
".",
"sh... | [
6,
0
] | [
25,
16
] | python | en | ['en', 'en', 'en'] | True |
_write_oriented_bbox | (scene_bbox, out_filename) | Export oriented (around Z axis) scene bbox to meshes.
Args:
scene_bbox(list[ndarray] or ndarray): xyz pos of center and
3 lengths (dx,dy,dz) and heading angle around Z axis.
Y forward, X right, Z upward. heading angle of positive X is 0,
heading angle of positive Y is 90... | Export oriented (around Z axis) scene bbox to meshes. | def _write_oriented_bbox(scene_bbox, out_filename):
"""Export oriented (around Z axis) scene bbox to meshes.
Args:
scene_bbox(list[ndarray] or ndarray): xyz pos of center and
3 lengths (dx,dy,dz) and heading angle around Z axis.
Y forward, X right, Z upward. heading angle of pos... | [
"def",
"_write_oriented_bbox",
"(",
"scene_bbox",
",",
"out_filename",
")",
":",
"def",
"heading2rotmat",
"(",
"heading_angle",
")",
":",
"rotmat",
"=",
"np",
".",
"zeros",
"(",
"(",
"3",
",",
"3",
")",
")",
"rotmat",
"[",
"2",
",",
"2",
"]",
"=",
"1... | [
28,
0
] | [
67,
10
] | python | en | ['en', 'en', 'en'] | True |
show_result | (points, gt_bboxes, pred_bboxes, out_dir, filename, show=True) | Convert results into format that is directly readable for meshlab.
Args:
points (np.ndarray): Points.
gt_bboxes (np.ndarray): Ground truth boxes.
pred_bboxes (np.ndarray): Predicted boxes.
out_dir (str): Path of output directory
filename (str): Filename of the current frame.... | Convert results into format that is directly readable for meshlab. | def show_result(points, gt_bboxes, pred_bboxes, out_dir, filename, show=True):
"""Convert results into format that is directly readable for meshlab.
Args:
points (np.ndarray): Points.
gt_bboxes (np.ndarray): Ground truth boxes.
pred_bboxes (np.ndarray): Predicted boxes.
out_dir ... | [
"def",
"show_result",
"(",
"points",
",",
"gt_bboxes",
",",
"pred_bboxes",
",",
"out_dir",
",",
"filename",
",",
"show",
"=",
"True",
")",
":",
"from",
".",
"open3d_vis",
"import",
"Visualizer",
"if",
"show",
":",
"vis",
"=",
"Visualizer",
"(",
"points",
... | [
70,
0
] | [
111,
75
] | python | en | ['en', 'en', 'en'] | True |
co2_concentration_inside_stomata | (air_co2) |
Equation 9.21
stomata_CO2_concentration = GREENHOUSE_AIR_TO_STOMATA_CO2_CONCENTRATION*CO2
Returns: CO2 concentration inside stomata [µmol {CO2} mol^-1 {air}]
|
Equation 9.21
stomata_CO2_concentration = GREENHOUSE_AIR_TO_STOMATA_CO2_CONCENTRATION*CO2
Returns: CO2 concentration inside stomata [µmol {CO2} mol^-1 {air}]
| def co2_concentration_inside_stomata(air_co2):
"""
Equation 9.21
stomata_CO2_concentration = GREENHOUSE_AIR_TO_STOMATA_CO2_CONCENTRATION*CO2
Returns: CO2 concentration inside stomata [µmol {CO2} mol^-1 {air}]
"""
return GREENHOUSE_AIR_TO_STOMATA_CO2_CONCENTRATION * air_co2 | [
"def",
"co2_concentration_inside_stomata",
"(",
"air_co2",
")",
":",
"return",
"GREENHOUSE_AIR_TO_STOMATA_CO2_CONCENTRATION",
"*",
"air_co2"
] | [
4,
0
] | [
10,
64
] | python | en | ['en', 'error', 'th'] | False |
co2_compensation | (carbohydrate_amount_Leaf, canopy_t) |
Equation 9.23
CO2_compensation_point = (max_canopy_electron_transport_rate_at_25/MAX_LEAF_ELECTRON_TRANSPORT_RATE)*CANOPY_TEMPERATURE_EFFECT * t_Canopy
+ 20*CANOPY_TEMPERATURE_EFFECT*(1-(max_canopy_electron_transport_rate_at_25/MAX_LEAF_ELECTRON_TRANSPORT_RATE))
Returns: CO2 com... |
Equation 9.23
CO2_compensation_point = (max_canopy_electron_transport_rate_at_25/MAX_LEAF_ELECTRON_TRANSPORT_RATE)*CANOPY_TEMPERATURE_EFFECT * t_Canopy
+ 20*CANOPY_TEMPERATURE_EFFECT*(1-(max_canopy_electron_transport_rate_at_25/MAX_LEAF_ELECTRON_TRANSPORT_RATE))
Returns: CO2 com... | def co2_compensation(carbohydrate_amount_Leaf, canopy_t):
"""
Equation 9.23
CO2_compensation_point = (max_canopy_electron_transport_rate_at_25/MAX_LEAF_ELECTRON_TRANSPORT_RATE)*CANOPY_TEMPERATURE_EFFECT * t_Canopy
+ 20*CANOPY_TEMPERATURE_EFFECT*(1-(max_canopy_electron_transport_r... | [
"def",
"co2_compensation",
"(",
"carbohydrate_amount_Leaf",
",",
"canopy_t",
")",
":",
"max_canopy_electron_transport_rate_at_25",
"=",
"max_canopy_electron_transport_at_25",
"(",
"carbohydrate_amount_Leaf",
")",
"return",
"(",
"max_canopy_electron_transport_rate_at_25",
"/",
"MA... | [
13,
0
] | [
22,
119
] | python | en | ['en', 'error', 'th'] | False |
RouteUpdated.__init__ | (
self,
*,
recipient_key: str = None,
action: str = None,
result: str = None,
**kwargs
) |
Initialize a RouteUpdated instance.
Args:
recipient_key: The recipient verkey of the route
action: The requested action to perform
result: The result of the requested action
|
Initialize a RouteUpdated instance. | def __init__(
self,
*,
recipient_key: str = None,
action: str = None,
result: str = None,
**kwargs
):
"""
Initialize a RouteUpdated instance.
Args:
recipient_key: The recipient verkey of the route
action: The requested ... | [
"def",
"__init__",
"(",
"self",
",",
"*",
",",
"recipient_key",
":",
"str",
"=",
"None",
",",
"action",
":",
"str",
"=",
"None",
",",
"result",
":",
"str",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"super",
"(",
"RouteUpdated",
",",
"self",
... | [
20,
4
] | [
40,
28
] | python | en | ['en', 'error', 'th'] | False |
IGCTeacher.add_cmdline_args | (
cls, parser: ParlaiParser, partial_opt: Optional[Opt] = None
) |
Include arg.
for multi-reference labels.
|
Include arg. | def add_cmdline_args(
cls, parser: ParlaiParser, partial_opt: Optional[Opt] = None
) -> ParlaiParser:
"""
Include arg.
for multi-reference labels.
"""
super().add_cmdline_args(parser, partial_opt=partial_opt)
agent = parser.add_argument_group('IGC Arguments')... | [
"def",
"add_cmdline_args",
"(",
"cls",
",",
"parser",
":",
"ParlaiParser",
",",
"partial_opt",
":",
"Optional",
"[",
"Opt",
"]",
"=",
"None",
")",
"->",
"ParlaiParser",
":",
"super",
"(",
")",
".",
"add_cmdline_args",
"(",
"parser",
",",
"partial_opt",
"="... | [
52,
4
] | [
68,
21
] | python | en | ['en', 'error', 'th'] | False |
IGCTeacher.image_id_to_image_path | (self, image_id: str) |
Return image path given image id.
As this function is used in building the image features, and some of the
:param image_id:
image_id key, for IGC this is a str
:return:
the image path associated with the given image key
|
Return image path given image id. | def image_id_to_image_path(self, image_id: str) -> str:
"""
Return image path given image id.
As this function is used in building the image features, and some of the
:param image_id:
image_id key, for IGC this is a str
:return:
the image path associate... | [
"def",
"image_id_to_image_path",
"(",
"self",
",",
"image_id",
":",
"str",
")",
"->",
"str",
":",
"if",
"image_id",
"not",
"in",
"self",
".",
"valid_image_ids",
":",
"image_id",
"=",
"self",
".",
"blank_image_id",
"return",
"os",
".",
"path",
".",
"join",
... | [
70,
4
] | [
84,
68
] | python | en | ['en', 'error', 'th'] | False |
IGCTeacher.get_data_path | (self, opt: Opt) |
Determines path to the data file.
:param opt:
Opt with all options
:return:
the path to the dataset
|
Determines path to the data file. | def get_data_path(self, opt: Opt) -> str:
"""
Determines path to the data file.
:param opt:
Opt with all options
:return:
the path to the dataset
"""
data_path = os.path.join(opt['datapath'], 'igc')
return data_path | [
"def",
"get_data_path",
"(",
"self",
",",
"opt",
":",
"Opt",
")",
"->",
"str",
":",
"data_path",
"=",
"os",
".",
"path",
".",
"join",
"(",
"opt",
"[",
"'datapath'",
"]",
",",
"'igc'",
")",
"return",
"data_path"
] | [
86,
4
] | [
97,
24
] | python | en | ['en', 'error', 'th'] | False |
IGCTeacher.get_image_features_path | (self, task, image_model_name, dt) |
Override so that subclasses can see same image features.
|
Override so that subclasses can see same image features.
| def get_image_features_path(self, task, image_model_name, dt):
"""
Override so that subclasses can see same image features.
"""
# In default implementation, self.data_path already has task name added
image_features_path = os.path.join(self.data_path, 'image_features')
if... | [
"def",
"get_image_features_path",
"(",
"self",
",",
"task",
",",
"image_model_name",
",",
"dt",
")",
":",
"# In default implementation, self.data_path already has task name added",
"image_features_path",
"=",
"os",
".",
"path",
".",
"join",
"(",
"self",
".",
"data_path"... | [
99,
4
] | [
111,
9
] | python | en | ['en', 'error', 'th'] | False |
IGCTeacher.num_episodes | (self) |
Number of episodes.
Iterate through each episode twice, playing each side of the conversation once.
|
Number of episodes. | def num_episodes(self) -> int:
"""
Number of episodes.
Iterate through each episode twice, playing each side of the conversation once.
"""
return 2 * len(self.data) | [
"def",
"num_episodes",
"(",
"self",
")",
"->",
"int",
":",
"return",
"2",
"*",
"len",
"(",
"self",
".",
"data",
")"
] | [
113,
4
] | [
119,
33
] | python | en | ['en', 'error', 'th'] | False |
IGCTeacher.num_examples | (self) |
Number of examples.
There are three turns of dialogue in the IGC task -
Context, Question, Response.
Thus, return 3 * number of data examples.
|
Number of examples. | def num_examples(self) -> int:
"""
Number of examples.
There are three turns of dialogue in the IGC task -
Context, Question, Response.
Thus, return 3 * number of data examples.
"""
return 3 * len(self.data) | [
"def",
"num_examples",
"(",
"self",
")",
"->",
"int",
":",
"return",
"3",
"*",
"len",
"(",
"self",
".",
"data",
")"
] | [
121,
4
] | [
130,
33
] | python | en | ['en', 'error', 'th'] | False |
IGCTeacher.get | (self, episode_idx: int, entry_idx: int = 0) |
Override to handle corrupt images and multi-reference labels.
|
Override to handle corrupt images and multi-reference labels.
| def get(self, episode_idx: int, entry_idx: int = 0) -> dict:
"""
Override to handle corrupt images and multi-reference labels.
"""
entry_idx *= 2
if episode_idx >= len(self.data):
data = self.data[episode_idx % len(self.data)]
entry_idx += 1
else:... | [
"def",
"get",
"(",
"self",
",",
"episode_idx",
":",
"int",
",",
"entry_idx",
":",
"int",
"=",
"0",
")",
"->",
"dict",
":",
"entry_idx",
"*=",
"2",
"if",
"episode_idx",
">=",
"len",
"(",
"self",
".",
"data",
")",
":",
"data",
"=",
"self",
".",
"da... | [
132,
4
] | [
164,
21
] | python | en | ['en', 'error', 'th'] | False |
IGCTeacher.load_data | (self, data_path: str, opt: Opt) |
Override to load CSV files.
|
Override to load CSV files.
| def load_data(self, data_path: str, opt: Opt) -> List[Dict[str, Any]]:
"""
Override to load CSV files.
"""
dt = opt['datatype'].split(':')[0]
dt_str = 'test' if dt == 'test' else 'val'
dp = os.path.join(self.get_data_path(opt), f'IGC_crowd_{dt_str}.csv')
if not o... | [
"def",
"load_data",
"(",
"self",
",",
"data_path",
":",
"str",
",",
"opt",
":",
"Opt",
")",
"->",
"List",
"[",
"Dict",
"[",
"str",
",",
"Any",
"]",
"]",
":",
"dt",
"=",
"opt",
"[",
"'datatype'",
"]",
".",
"split",
"(",
"':'",
")",
"[",
"0",
"... | [
166,
4
] | [
213,
24
] | python | en | ['en', 'error', 'th'] | False |
IGCTeacher._download_images | (self, opt: Opt) |
Download available IGC images.
|
Download available IGC images.
| def _download_images(self, opt: Opt):
"""
Download available IGC images.
"""
urls = []
ids = []
for dt in ['test', 'val']:
df = os.path.join(self.get_data_path(opt), f'IGC_crowd_{dt}.csv')
with PathManager.open(df, newline='\n') as csv_file:
... | [
"def",
"_download_images",
"(",
"self",
",",
"opt",
":",
"Opt",
")",
":",
"urls",
"=",
"[",
"]",
"ids",
"=",
"[",
"]",
"for",
"dt",
"in",
"[",
"'test'",
",",
"'val'",
"]",
":",
"df",
"=",
"os",
".",
"path",
".",
"join",
"(",
"self",
".",
"get... | [
215,
4
] | [
247,
44
] | python | en | ['en', 'error', 'th'] | False |
IGCOneSideTeacher.get_label_key | (self) |
Return key into data dictionary for the label.
|
Return key into data dictionary for the label.
| def get_label_key(self) -> str:
"""
Return key into data dictionary for the label.
"""
pass | [
"def",
"get_label_key",
"(",
"self",
")",
"->",
"str",
":",
"pass"
] | [
281,
4
] | [
285,
12
] | python | en | ['en', 'error', 'th'] | False |
IGCOneSideTeacher.get_text | (self, data) |
Return text for an example.
|
Return text for an example.
| def get_text(self, data) -> str:
"""
Return text for an example.
"""
pass | [
"def",
"get_text",
"(",
"self",
",",
"data",
")",
"->",
"str",
":",
"pass"
] | [
288,
4
] | [
292,
12
] | python | en | ['en', 'error', 'th'] | False |
IGCOneSideTeacher.get | (self, episode_idx: int, entry_idx: int = 0) |
Override to handle one-sided conversation.
|
Override to handle one-sided conversation.
| def get(self, episode_idx: int, entry_idx: int = 0) -> Dict[str, Any]:
"""
Override to handle one-sided conversation.
"""
data = self.data[episode_idx]
image_id = data[self.image_id_key]
if data[self.image_id_key] not in self.valid_image_ids:
data[self.image_... | [
"def",
"get",
"(",
"self",
",",
"episode_idx",
":",
"int",
",",
"entry_idx",
":",
"int",
"=",
"0",
")",
"->",
"Dict",
"[",
"str",
",",
"Any",
"]",
":",
"data",
"=",
"self",
".",
"data",
"[",
"episode_idx",
"]",
"image_id",
"=",
"data",
"[",
"self... | [
294,
4
] | [
319,
21
] | python | en | ['en', 'error', 'th'] | False |
WalletProvider.provide | (self, settings: BaseSettings, injector: BaseInjector) | Create and open the wallet instance. | Create and open the wallet instance. | async def provide(self, settings: BaseSettings, injector: BaseInjector):
"""Create and open the wallet instance."""
wallet_type = settings.get_value("wallet.type", default="basic").lower()
wallet_class = self.WALLET_TYPES.get(wallet_type, wallet_type)
LOGGER.info("Opening wallet type: ... | [
"async",
"def",
"provide",
"(",
"self",
",",
"settings",
":",
"BaseSettings",
",",
"injector",
":",
"BaseInjector",
")",
":",
"wallet_type",
"=",
"settings",
".",
"get_value",
"(",
"\"wallet.type\"",
",",
"default",
"=",
"\"basic\"",
")",
".",
"lower",
"(",
... | [
18,
4
] | [
40,
21
] | python | en | ['en', 'en', 'en'] | True |
NodeVersionFallback.upstream | (self) | Upstream part of the package. | Upstream part of the package. | def upstream(self) -> 'NodeVersionFallback':
""" Upstream part of the package. """
return self | [
"def",
"upstream",
"(",
"self",
")",
"->",
"'NodeVersionFallback'",
":",
"return",
"self"
] | [
68,
4
] | [
70,
19
] | python | en | ['en', 'en', 'en'] | True |
convert_text | (text) |
Normalize text.
|
Normalize text.
| def convert_text(text):
"""
Normalize text.
"""
new_text = text.lower()
for x in gend_utils.CONTRACTION_SPACES:
if x[1] in text:
new_text = new_text.replace(x[1], x[0])
for x in gend_utils.CONTRACTION_LEFT_SPACES:
if x[1] in text:
new_text = new_text.repla... | [
"def",
"convert_text",
"(",
"text",
")",
":",
"new_text",
"=",
"text",
".",
"lower",
"(",
")",
"for",
"x",
"in",
"gend_utils",
".",
"CONTRACTION_SPACES",
":",
"if",
"x",
"[",
"1",
"]",
"in",
"text",
":",
"new_text",
"=",
"new_text",
".",
"replace",
"... | [
26,
0
] | [
41,
19
] | python | en | ['en', 'error', 'th'] | False |
Convai2Teacher.get_gender_annotations | (self, lst) |
Take a list of personas and find the gender.
|
Take a list of personas and find the gender.
| def get_gender_annotations(self, lst):
"""
Take a list of personas and find the gender.
"""
new_lst = sorted([convert_text(persona) for persona in lst])
persona_key = ' '.join(new_lst)
if persona_key in self.persona_map:
return self.persona_map[persona_key]
... | [
"def",
"get_gender_annotations",
"(",
"self",
",",
"lst",
")",
":",
"new_lst",
"=",
"sorted",
"(",
"[",
"convert_text",
"(",
"persona",
")",
"for",
"persona",
"in",
"lst",
"]",
")",
"persona_key",
"=",
"' '",
".",
"join",
"(",
"new_lst",
")",
"if",
"pe... | [
121,
4
] | [
130,
75
] | python | en | ['en', 'error', 'th'] | False |
validate_distplot | (hist_data, curve_type) |
Distplot-specific validations
:raises: (PlotlyError) If hist_data is not a list of lists
:raises: (PlotlyError) If curve_type is not valid (i.e. not 'kde' or
'normal').
|
Distplot-specific validations | def validate_distplot(hist_data, curve_type):
"""
Distplot-specific validations
:raises: (PlotlyError) If hist_data is not a list of lists
:raises: (PlotlyError) If curve_type is not valid (i.e. not 'kde' or
'normal').
"""
hist_data_types = (list,)
if np:
hist_data_types += ... | [
"def",
"validate_distplot",
"(",
"hist_data",
",",
"curve_type",
")",
":",
"hist_data_types",
"=",
"(",
"list",
",",
")",
"if",
"np",
":",
"hist_data_types",
"+=",
"(",
"np",
".",
"ndarray",
",",
")",
"if",
"pd",
":",
"hist_data_types",
"+=",
"(",
"pd",
... | [
17,
0
] | [
48,
73
] | python | en | ['en', 'error', 'th'] | False |
create_distplot | (
hist_data,
group_labels,
bin_size=1.0,
curve_type="kde",
colors=None,
rug_text=None,
histnorm=DEFAULT_HISTNORM,
show_hist=True,
show_curve=True,
show_rug=True,
) |
Function that creates a distplot similar to seaborn.distplot;
**this function is deprecated**, use instead :mod:`plotly.express`
functions, for example
>>> import plotly.express as px
>>> tips = px.data.tips()
>>> fig = px.histogram(tips, x="total_bill", y="tip", color="sex", marginal="rug",
... |
Function that creates a distplot similar to seaborn.distplot;
**this function is deprecated**, use instead :mod:`plotly.express`
functions, for example | def create_distplot(
hist_data,
group_labels,
bin_size=1.0,
curve_type="kde",
colors=None,
rug_text=None,
histnorm=DEFAULT_HISTNORM,
show_hist=True,
show_curve=True,
show_rug=True,
):
"""
Function that creates a distplot similar to seaborn.distplot;
**this function is... | [
"def",
"create_distplot",
"(",
"hist_data",
",",
"group_labels",
",",
"bin_size",
"=",
"1.0",
",",
"curve_type",
"=",
"\"kde\"",
",",
"colors",
"=",
"None",
",",
"rug_text",
"=",
"None",
",",
"histnorm",
"=",
"DEFAULT_HISTNORM",
",",
"show_hist",
"=",
"True"... | [
51,
0
] | [
259,
54
] | python | en | ['en', 'error', 'th'] | False |
_Distplot.make_hist | (self) |
Makes the histogram(s) for FigureFactory.create_distplot().
:rtype (list) hist: list of histogram representations
|
Makes the histogram(s) for FigureFactory.create_distplot(). | def make_hist(self):
"""
Makes the histogram(s) for FigureFactory.create_distplot().
:rtype (list) hist: list of histogram representations
"""
hist = [None] * self.trace_number
for index in range(self.trace_number):
hist[index] = dict(
type="... | [
"def",
"make_hist",
"(",
"self",
")",
":",
"hist",
"=",
"[",
"None",
"]",
"*",
"self",
".",
"trace_number",
"for",
"index",
"in",
"range",
"(",
"self",
".",
"trace_number",
")",
":",
"hist",
"[",
"index",
"]",
"=",
"dict",
"(",
"type",
"=",
"\"hist... | [
315,
4
] | [
341,
19
] | python | en | ['en', 'error', 'th'] | False |
_Distplot.make_kde | (self) |
Makes the kernel density estimation(s) for create_distplot().
This is called when curve_type = 'kde' in create_distplot().
:rtype (list) curve: list of kde representations
|
Makes the kernel density estimation(s) for create_distplot(). | def make_kde(self):
"""
Makes the kernel density estimation(s) for create_distplot().
This is called when curve_type = 'kde' in create_distplot().
:rtype (list) curve: list of kde representations
"""
curve = [None] * self.trace_number
for index in range(self.tra... | [
"def",
"make_kde",
"(",
"self",
")",
":",
"curve",
"=",
"[",
"None",
"]",
"*",
"self",
".",
"trace_number",
"for",
"index",
"in",
"range",
"(",
"self",
".",
"trace_number",
")",
":",
"self",
".",
"curve_x",
"[",
"index",
"]",
"=",
"[",
"self",
".",... | [
343,
4
] | [
377,
20
] | python | en | ['en', 'error', 'th'] | False |
_Distplot.make_normal | (self) |
Makes the normal curve(s) for create_distplot().
This is called when curve_type = 'normal' in create_distplot().
:rtype (list) curve: list of normal curve representations
|
Makes the normal curve(s) for create_distplot(). | def make_normal(self):
"""
Makes the normal curve(s) for create_distplot().
This is called when curve_type = 'normal' in create_distplot().
:rtype (list) curve: list of normal curve representations
"""
curve = [None] * self.trace_number
mean = [None] * self.trac... | [
"def",
"make_normal",
"(",
"self",
")",
":",
"curve",
"=",
"[",
"None",
"]",
"*",
"self",
".",
"trace_number",
"mean",
"=",
"[",
"None",
"]",
"*",
"self",
".",
"trace_number",
"sd",
"=",
"[",
"None",
"]",
"*",
"self",
".",
"trace_number",
"for",
"i... | [
379,
4
] | [
417,
20
] | python | en | ['en', 'error', 'th'] | False |
_Distplot.make_rug | (self) |
Makes the rug plot(s) for create_distplot().
:rtype (list) rug: list of rug plot representations
|
Makes the rug plot(s) for create_distplot(). | def make_rug(self):
"""
Makes the rug plot(s) for create_distplot().
:rtype (list) rug: list of rug plot representations
"""
rug = [None] * self.trace_number
for index in range(self.trace_number):
rug[index] = dict(
type="scatter",
... | [
"def",
"make_rug",
"(",
"self",
")",
":",
"rug",
"=",
"[",
"None",
"]",
"*",
"self",
".",
"trace_number",
"for",
"index",
"in",
"range",
"(",
"self",
".",
"trace_number",
")",
":",
"rug",
"[",
"index",
"]",
"=",
"dict",
"(",
"type",
"=",
"\"scatter... | [
419,
4
] | [
443,
18
] | python | en | ['en', 'error', 'th'] | False |
get_world_module | (world_path) |
Import the module specified by the world_path.
|
Import the module specified by the world_path.
| def get_world_module(world_path):
"""
Import the module specified by the world_path.
"""
run_module = None
try:
run_module = importlib.import_module(world_path)
except Exception as e:
print("Could not import world file {}".format(world_path))
raise e
return run_module | [
"def",
"get_world_module",
"(",
"world_path",
")",
":",
"run_module",
"=",
"None",
"try",
":",
"run_module",
"=",
"importlib",
".",
"import_module",
"(",
"world_path",
")",
"except",
"Exception",
"as",
"e",
":",
"print",
"(",
"\"Could not import world file {}\"",
... | [
34,
0
] | [
44,
21
] | python | en | ['en', 'error', 'th'] | False |
get_world_fn_attr | (world_module, world_name, fn_name, raise_if_missing=True) |
Import and return the function from world.
:param world_module:
module. a python module encompassing the worlds
:param world_name:
string. the name of the world in the module
:param fn_name:
string. the name of the function in the world
:param raise_if_missing:
bool... |
Import and return the function from world. | def get_world_fn_attr(world_module, world_name, fn_name, raise_if_missing=True):
"""
Import and return the function from world.
:param world_module:
module. a python module encompassing the worlds
:param world_name:
string. the name of the world in the module
:param fn_name:
... | [
"def",
"get_world_fn_attr",
"(",
"world_module",
",",
"world_name",
",",
"fn_name",
",",
"raise_if_missing",
"=",
"True",
")",
":",
"result_fn",
"=",
"None",
"try",
":",
"DesiredWorld",
"=",
"getattr",
"(",
"world_module",
",",
"world_name",
")",
"result_fn",
... | [
47,
0
] | [
71,
20
] | python | en | ['en', 'error', 'th'] | False |
get_eligibility_fn | (world_module, world_name) |
Get eligibility function for a world.
:param world_module:
module. a python module encompassing the worlds
:param world_name:
string. the name of the world in the module
:return:
the eligibility function if available, else None
|
Get eligibility function for a world. | def get_eligibility_fn(world_module, world_name):
"""
Get eligibility function for a world.
:param world_module:
module. a python module encompassing the worlds
:param world_name:
string. the name of the world in the module
:return:
the eligibility function if available, el... | [
"def",
"get_eligibility_fn",
"(",
"world_module",
",",
"world_name",
")",
":",
"return",
"get_world_fn_attr",
"(",
"world_module",
",",
"world_name",
",",
"'eligibility_function'",
",",
"raise_if_missing",
"=",
"False",
")"
] | [
74,
0
] | [
88,
5
] | python | en | ['en', 'error', 'th'] | False |
get_assign_roles_fn | (world_module, world_name) |
Get assign roles function for a world.
:param world_module:
module. a python module encompassing the worlds
:param world_name:
string. the name of the world in the module
:return:
the assign roles function if available, else None
|
Get assign roles function for a world. | def get_assign_roles_fn(world_module, world_name):
"""
Get assign roles function for a world.
:param world_module:
module. a python module encompassing the worlds
:param world_name:
string. the name of the world in the module
:return:
the assign roles function if available,... | [
"def",
"get_assign_roles_fn",
"(",
"world_module",
",",
"world_name",
")",
":",
"return",
"get_world_fn_attr",
"(",
"world_module",
",",
"world_name",
",",
"'assign_roles'",
",",
"raise_if_missing",
"=",
"False",
")"
] | [
91,
0
] | [
105,
5
] | python | en | ['en', 'error', 'th'] | False |
default_assign_roles_fn | (agents) |
Assign agent role.
Default role assignment.
:param:
list of agents
|
Assign agent role. | def default_assign_roles_fn(agents):
"""
Assign agent role.
Default role assignment.
:param:
list of agents
"""
for i, a in enumerate(agents):
a.disp_id = f'Agent_{i}' | [
"def",
"default_assign_roles_fn",
"(",
"agents",
")",
":",
"for",
"i",
",",
"a",
"in",
"enumerate",
"(",
"agents",
")",
":",
"a",
".",
"disp_id",
"=",
"f'Agent_{i}'"
] | [
108,
0
] | [
118,
32
] | python | en | ['en', 'error', 'th'] | False |
BasePointNet.init_weights | (self, pretrained=None) | Initialize the weights of PointNet backbone. | Initialize the weights of PointNet backbone. | def init_weights(self, pretrained=None):
"""Initialize the weights of PointNet backbone."""
# Do not initialize the conv layers
# to follow the original implementation
if isinstance(pretrained, str):
from mmdet3d.utils import get_root_logger
logger = get_root_logg... | [
"def",
"init_weights",
"(",
"self",
",",
"pretrained",
"=",
"None",
")",
":",
"# Do not initialize the conv layers",
"# to follow the original implementation",
"if",
"isinstance",
"(",
"pretrained",
",",
"str",
")",
":",
"from",
"mmdet3d",
".",
"utils",
"import",
"g... | [
12,
4
] | [
19,
74
] | python | en | ['en', 'en', 'en'] | True |
BasePointNet._split_point_feats | (points) | Split coordinates and features of input points.
Args:
points (torch.Tensor): Point coordinates with features,
with shape (B, N, 3 + input_feature_dim).
Returns:
torch.Tensor: Coordinates of input points.
torch.Tensor: Features of input points.
... | Split coordinates and features of input points. | def _split_point_feats(points):
"""Split coordinates and features of input points.
Args:
points (torch.Tensor): Point coordinates with features,
with shape (B, N, 3 + input_feature_dim).
Returns:
torch.Tensor: Coordinates of input points.
tor... | [
"def",
"_split_point_feats",
"(",
"points",
")",
":",
"xyz",
"=",
"points",
"[",
"...",
",",
"0",
":",
"3",
"]",
".",
"contiguous",
"(",
")",
"if",
"points",
".",
"size",
"(",
"-",
"1",
")",
">",
"3",
":",
"features",
"=",
"points",
"[",
"...",
... | [
22,
4
] | [
39,
28
] | python | en | ['en', 'en', '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(DbCaretakerCog(bot)) | [
"def",
"setup",
"(",
"bot",
")",
":",
"bot",
".",
"add_cog",
"(",
"DbCaretakerCog",
"(",
"bot",
")",
")"
] | [
223,
0
] | [
227,
36
] | python | en | ['en', 'error', 'th'] | False |
execute | (argv: Sequence[str] = None) | Execute the help command. | Execute the help command. | def execute(argv: Sequence[str] = None):
"""Execute the help command."""
from . import available_commands, load_command
parser = ArgumentParser()
parser.add_argument(
"-v",
"--version",
action="store_true",
help="print application version and exit",
)
subparsers ... | [
"def",
"execute",
"(",
"argv",
":",
"Sequence",
"[",
"str",
"]",
"=",
"None",
")",
":",
"from",
".",
"import",
"available_commands",
",",
"load_command",
"parser",
"=",
"ArgumentParser",
"(",
")",
"parser",
".",
"add_argument",
"(",
"\"-v\"",
",",
"\"--ver... | [
8,
0
] | [
30,
27
] | python | en | ['en', 'en', 'en'] | True |
gaussian_focal_loss | (pred, gaussian_target, alpha=2.0, gamma=4.0) | `Focal Loss <https://arxiv.org/abs/1708.02002>`_ for targets in gaussian
distribution.
Args:
pred (torch.Tensor): The prediction.
gaussian_target (torch.Tensor): The learning target of the prediction
in gaussian distribution.
alpha (float, optional): A balanced form for Foca... | `Focal Loss <https://arxiv.org/abs/1708.02002>`_ for targets in gaussian
distribution. | def gaussian_focal_loss(pred, gaussian_target, alpha=2.0, gamma=4.0):
"""`Focal Loss <https://arxiv.org/abs/1708.02002>`_ for targets in gaussian
distribution.
Args:
pred (torch.Tensor): The prediction.
gaussian_target (torch.Tensor): The learning target of the prediction
in gau... | [
"def",
"gaussian_focal_loss",
"(",
"pred",
",",
"gaussian_target",
",",
"alpha",
"=",
"2.0",
",",
"gamma",
"=",
"4.0",
")",
":",
"eps",
"=",
"1e-12",
"pos_weights",
"=",
"gaussian_target",
".",
"eq",
"(",
"1",
")",
"neg_weights",
"=",
"(",
"1",
"-",
"g... | [
7,
0
] | [
25,
30
] | python | en | ['en', 'en', 'ur'] | True |
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\"",
"]"
] | [
31,
4
] | [
48,
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\"",
"]"
] | [
57,
4
] | [
73,
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\"",
"]"
] | [
82,
4
] | [
96,
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\"",
"]"
] | [
105,
4
] | [
120,
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\"",
"]"
] | [
129,
4
] | [
143,
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\"",
"]"
] | [
152,
4
] | [
208,
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\"",
"]"
] | [
217,
4
] | [
235,
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.barpolar.marker.ColorBar`
- A dict of string/value properties that will be passed
to the ColorBar constructor
Supported dict propertie... |
The 'colorbar' property is an instance of ColorBar
that may be specified as:
- An instance of :class:`plotly.graph_objs.barpolar.marker.ColorBar`
- A dict of string/value properties that will be passed
to the ColorBar constructor
Supported dict propertie... | def colorbar(self):
"""
The 'colorbar' property is an instance of ColorBar
that may be specified as:
- An instance of :class:`plotly.graph_objs.barpolar.marker.ColorBar`
- A dict of string/value properties that will be passed
to the ColorBar constructor
... | [
"def",
"colorbar",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"colorbar\"",
"]"
] | [
244,
4
] | [
471,
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\"",
"]"
] | [
480,
4
] | [
524,
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\"",
"]"
] | [
533,
4
] | [
544,
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.barpolar.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.barpolar.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.barpolar.marker.Line`
- A dict of string/value properties that will be passed
to the Line constructor
Supported dic... | [
"def",
"line",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"line\"",
"]"
] | [
553,
4
] | [
656,
27
] | 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.