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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Scatterpolargl.selected | (self) |
The 'selected' property is an instance of Selected
that may be specified as:
- An instance of :class:`plotly.graph_objs.scatterpolargl.Selected`
- A dict of string/value properties that will be passed
to the Selected constructor
Supported dict properties... |
The 'selected' property is an instance of Selected
that may be specified as:
- An instance of :class:`plotly.graph_objs.scatterpolargl.Selected`
- A dict of string/value properties that will be passed
to the Selected constructor
Supported dict properties... | def selected(self):
"""
The 'selected' property is an instance of Selected
that may be specified as:
- An instance of :class:`plotly.graph_objs.scatterpolargl.Selected`
- A dict of string/value properties that will be passed
to the Selected constructor
... | [
"def",
"selected",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"selected\"",
"]"
] | [
912,
4
] | [
935,
31
] | python | en | ['en', 'error', 'th'] | False |
Scatterpolargl.selectedpoints | (self) |
Array containing integer indices of selected points. Has an
effect only for traces that support selections. Note that an
empty array means an empty selection where the `unselected` are
turned on for all points, whereas, any other non-array values
means no selection all where the... |
Array containing integer indices of selected points. Has an
effect only for traces that support selections. Note that an
empty array means an empty selection where the `unselected` are
turned on for all points, whereas, any other non-array values
means no selection all where the... | def selectedpoints(self):
"""
Array containing integer indices of selected points. Has an
effect only for traces that support selections. Note that an
empty array means an empty selection where the `unselected` are
turned on for all points, whereas, any other non-array values
... | [
"def",
"selectedpoints",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"selectedpoints\"",
"]"
] | [
944,
4
] | [
959,
37
] | python | en | ['en', 'error', 'th'] | False |
Scatterpolargl.showlegend | (self) |
Determines whether or not an item corresponding to this trace
is shown in the legend.
The 'showlegend' property must be specified as a bool
(either True, or False)
Returns
-------
bool
|
Determines whether or not an item corresponding to this trace
is shown in the legend.
The 'showlegend' property must be specified as a bool
(either True, or False) | def showlegend(self):
"""
Determines whether or not an item corresponding to this trace
is shown in the legend.
The 'showlegend' property must be specified as a bool
(either True, or False)
Returns
-------
bool
"""
return self["showle... | [
"def",
"showlegend",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"showlegend\"",
"]"
] | [
968,
4
] | [
980,
33
] | python | en | ['en', 'error', 'th'] | False |
Scatterpolargl.stream | (self) |
The 'stream' property is an instance of Stream
that may be specified as:
- An instance of :class:`plotly.graph_objs.scatterpolargl.Stream`
- A dict of string/value properties that will be passed
to the Stream constructor
Supported dict properties:
... |
The 'stream' property is an instance of Stream
that may be specified as:
- An instance of :class:`plotly.graph_objs.scatterpolargl.Stream`
- A dict of string/value properties that will be passed
to the Stream constructor
Supported dict properties:
... | def stream(self):
"""
The 'stream' property is an instance of Stream
that may be specified as:
- An instance of :class:`plotly.graph_objs.scatterpolargl.Stream`
- A dict of string/value properties that will be passed
to the Stream constructor
Supp... | [
"def",
"stream",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"stream\"",
"]"
] | [
989,
4
] | [
1013,
29
] | python | en | ['en', 'error', 'th'] | False |
Scatterpolargl.subplot | (self) |
Sets a reference between this trace's data coordinates and a
polar subplot. If "polar" (the default value), the data refer
to `layout.polar`. If "polar2", the data refer to
`layout.polar2`, and so on.
The 'subplot' property is an identifier of a particular
subplot, ... |
Sets a reference between this trace's data coordinates and a
polar subplot. If "polar" (the default value), the data refer
to `layout.polar`. If "polar2", the data refer to
`layout.polar2`, and so on.
The 'subplot' property is an identifier of a particular
subplot, ... | def subplot(self):
"""
Sets a reference between this trace's data coordinates and a
polar subplot. If "polar" (the default value), the data refer
to `layout.polar`. If "polar2", the data refer to
`layout.polar2`, and so on.
The 'subplot' property is an identifier of ... | [
"def",
"subplot",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"subplot\"",
"]"
] | [
1022,
4
] | [
1038,
30
] | python | en | ['en', 'error', 'th'] | False |
Scatterpolargl.text | (self) |
Sets text elements associated with each (x,y) pair. If a single
string, the same string appears over all the data points. If an
array of string, the items are mapped in order to the this
trace's (x,y) coordinates. If trace `hoverinfo` contains a
"text" flag and "hovertext" is no... |
Sets text elements associated with each (x,y) pair. If a single
string, the same string appears over all the data points. If an
array of string, the items are mapped in order to the this
trace's (x,y) coordinates. If trace `hoverinfo` contains a
"text" flag and "hovertext" is no... | def text(self):
"""
Sets text elements associated with each (x,y) pair. If a single
string, the same string appears over all the data points. If an
array of string, the items are mapped in order to the this
trace's (x,y) coordinates. If trace `hoverinfo` contains a
"text"... | [
"def",
"text",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"text\"",
"]"
] | [
1047,
4
] | [
1065,
27
] | python | en | ['en', 'error', 'th'] | False |
Scatterpolargl.textfont | (self) |
Sets the text font.
The 'textfont' property is an instance of Textfont
that may be specified as:
- An instance of :class:`plotly.graph_objs.scatterpolargl.Textfont`
- A dict of string/value properties that will be passed
to the Textfont constructor
... |
Sets the text font.
The 'textfont' property is an instance of Textfont
that may be specified as:
- An instance of :class:`plotly.graph_objs.scatterpolargl.Textfont`
- A dict of string/value properties that will be passed
to the Textfont constructor
... | def textfont(self):
"""
Sets the text font.
The 'textfont' property is an instance of Textfont
that may be specified as:
- An instance of :class:`plotly.graph_objs.scatterpolargl.Textfont`
- A dict of string/value properties that will be passed
to the... | [
"def",
"textfont",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"textfont\"",
"]"
] | [
1074,
4
] | [
1121,
31
] | python | en | ['en', 'error', 'th'] | False |
Scatterpolargl.textposition | (self) |
Sets the positions of the `text` elements with respects to the
(x,y) coordinates.
The 'textposition' property is an enumeration that may be specified as:
- One of the following enumeration values:
['top left', 'top center', 'top right', 'middle left',
... |
Sets the positions of the `text` elements with respects to the
(x,y) coordinates.
The 'textposition' property is an enumeration that may be specified as:
- One of the following enumeration values:
['top left', 'top center', 'top right', 'middle left',
... | def textposition(self):
"""
Sets the positions of the `text` elements with respects to the
(x,y) coordinates.
The 'textposition' property is an enumeration that may be specified as:
- One of the following enumeration values:
['top left', 'top center', 'top ... | [
"def",
"textposition",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"textposition\"",
"]"
] | [
1130,
4
] | [
1146,
35
] | python | en | ['en', 'error', 'th'] | False |
Scatterpolargl.textpositionsrc | (self) |
Sets the source reference on Chart Studio Cloud for
textposition .
The 'textpositionsrc' 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
textposition .
The 'textpositionsrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def textpositionsrc(self):
"""
Sets the source reference on Chart Studio Cloud for
textposition .
The 'textpositionsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self[... | [
"def",
"textpositionsrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"textpositionsrc\"",
"]"
] | [
1155,
4
] | [
1167,
38
] | python | en | ['en', 'error', 'th'] | False |
Scatterpolargl.textsrc | (self) |
Sets the source reference on Chart Studio Cloud for text .
The 'textsrc' 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 text .
The 'textsrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def textsrc(self):
"""
Sets the source reference on Chart Studio Cloud for text .
The 'textsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["textsrc"] | [
"def",
"textsrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"textsrc\"",
"]"
] | [
1176,
4
] | [
1187,
30
] | python | en | ['en', 'error', 'th'] | False |
Scatterpolargl.texttemplate | (self) |
Template string used for rendering the information text that
appear on points. Note that this will override `textinfo`.
Variables are inserted using %{variable}, for example "y:
%{y}". Numbers are formatted using d3-format's syntax
%{variable:d3-format}, for example "Price: %{y:... |
Template string used for rendering the information text that
appear on points. Note that this will override `textinfo`.
Variables are inserted using %{variable}, for example "y:
%{y}". Numbers are formatted using d3-format's syntax
%{variable:d3-format}, for example "Price: %{y:... | def texttemplate(self):
"""
Template string used for rendering the information text that
appear on points. Note that this will override `textinfo`.
Variables are inserted using %{variable}, for example "y:
%{y}". Numbers are formatted using d3-format's syntax
%{variable:d... | [
"def",
"texttemplate",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"texttemplate\"",
"]"
] | [
1196,
4
] | [
1222,
35
] | python | en | ['en', 'error', 'th'] | False |
Scatterpolargl.texttemplatesrc | (self) |
Sets the source reference on Chart Studio Cloud for
texttemplate .
The 'texttemplatesrc' 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
texttemplate .
The 'texttemplatesrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def texttemplatesrc(self):
"""
Sets the source reference on Chart Studio Cloud for
texttemplate .
The 'texttemplatesrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self[... | [
"def",
"texttemplatesrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"texttemplatesrc\"",
"]"
] | [
1231,
4
] | [
1243,
38
] | python | en | ['en', 'error', 'th'] | False |
Scatterpolargl.theta | (self) |
Sets the angular coordinates
The 'theta' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Returns
-------
numpy.ndarray
|
Sets the angular coordinates
The 'theta' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series | def theta(self):
"""
Sets the angular coordinates
The 'theta' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Returns
-------
numpy.ndarray
"""
return self["theta"] | [
"def",
"theta",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"theta\"",
"]"
] | [
1252,
4
] | [
1263,
28
] | python | en | ['en', 'error', 'th'] | False |
Scatterpolargl.theta0 | (self) |
Alternate to `theta`. Builds a linear space of theta
coordinates. Use with `dtheta` where `theta0` is the starting
coordinate and `dtheta` the step.
The 'theta0' property accepts values of any type
Returns
-------
Any
|
Alternate to `theta`. Builds a linear space of theta
coordinates. Use with `dtheta` where `theta0` is the starting
coordinate and `dtheta` the step.
The 'theta0' property accepts values of any type | def theta0(self):
"""
Alternate to `theta`. Builds a linear space of theta
coordinates. Use with `dtheta` where `theta0` is the starting
coordinate and `dtheta` the step.
The 'theta0' property accepts values of any type
Returns
-------
Any
""... | [
"def",
"theta0",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"theta0\"",
"]"
] | [
1272,
4
] | [
1284,
29
] | python | en | ['en', 'error', 'th'] | False |
Scatterpolargl.thetasrc | (self) |
Sets the source reference on Chart Studio Cloud for theta .
The 'thetasrc' 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 theta .
The 'thetasrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def thetasrc(self):
"""
Sets the source reference on Chart Studio Cloud for theta .
The 'thetasrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["thetasrc"] | [
"def",
"thetasrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"thetasrc\"",
"]"
] | [
1293,
4
] | [
1304,
31
] | python | en | ['en', 'error', 'th'] | False |
Scatterpolargl.thetaunit | (self) |
Sets the unit of input "theta" values. Has an effect only when
on "linear" angular axes.
The 'thetaunit' property is an enumeration that may be specified as:
- One of the following enumeration values:
['radians', 'degrees', 'gradians']
Returns
---... |
Sets the unit of input "theta" values. Has an effect only when
on "linear" angular axes.
The 'thetaunit' property is an enumeration that may be specified as:
- One of the following enumeration values:
['radians', 'degrees', 'gradians'] | def thetaunit(self):
"""
Sets the unit of input "theta" values. Has an effect only when
on "linear" angular axes.
The 'thetaunit' property is an enumeration that may be specified as:
- One of the following enumeration values:
['radians', 'degrees', 'gradian... | [
"def",
"thetaunit",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"thetaunit\"",
"]"
] | [
1313,
4
] | [
1326,
32
] | python | en | ['en', 'error', 'th'] | False |
Scatterpolargl.uid | (self) |
Assign an id to this trace, Use this to provide object
constancy between traces during animations and transitions.
The 'uid' property is a string and must be specified as:
- A string
- A number that will be converted to a string
Returns
-------
... |
Assign an id to this trace, Use this to provide object
constancy between traces during animations and transitions.
The 'uid' property is a string and must be specified as:
- A string
- A number that will be converted to a string | def uid(self):
"""
Assign an id to this trace, Use this to provide object
constancy between traces during animations and transitions.
The 'uid' property is a string and must be specified as:
- A string
- A number that will be converted to a string
Return... | [
"def",
"uid",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"uid\"",
"]"
] | [
1335,
4
] | [
1348,
26
] | python | en | ['en', 'error', 'th'] | False |
Scatterpolargl.uirevision | (self) |
Controls persistence of some user-driven changes to the trace:
`constraintrange` in `parcoords` traces, as well as some
`editable: true` modifications such as `name` and
`colorbar.title`. Defaults to `layout.uirevision`. Note that
other user-driven trace attribute changes are co... |
Controls persistence of some user-driven changes to the trace:
`constraintrange` in `parcoords` traces, as well as some
`editable: true` modifications such as `name` and
`colorbar.title`. Defaults to `layout.uirevision`. Note that
other user-driven trace attribute changes are co... | def uirevision(self):
"""
Controls persistence of some user-driven changes to the trace:
`constraintrange` in `parcoords` traces, as well as some
`editable: true` modifications such as `name` and
`colorbar.title`. Defaults to `layout.uirevision`. Note that
other user-driv... | [
"def",
"uirevision",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"uirevision\"",
"]"
] | [
1357,
4
] | [
1381,
33
] | python | en | ['en', 'error', 'th'] | False |
Scatterpolargl.unselected | (self) |
The 'unselected' property is an instance of Unselected
that may be specified as:
- An instance of :class:`plotly.graph_objs.scatterpolargl.Unselected`
- A dict of string/value properties that will be passed
to the Unselected constructor
Supported dict pr... |
The 'unselected' property is an instance of Unselected
that may be specified as:
- An instance of :class:`plotly.graph_objs.scatterpolargl.Unselected`
- A dict of string/value properties that will be passed
to the Unselected constructor
Supported dict pr... | def unselected(self):
"""
The 'unselected' property is an instance of Unselected
that may be specified as:
- An instance of :class:`plotly.graph_objs.scatterpolargl.Unselected`
- A dict of string/value properties that will be passed
to the Unselected constructor
... | [
"def",
"unselected",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"unselected\"",
"]"
] | [
1390,
4
] | [
1413,
33
] | python | en | ['en', 'error', 'th'] | False |
Scatterpolargl.visible | (self) |
Determines whether or not this trace is visible. If
"legendonly", the trace is not drawn, but can appear as a
legend item (provided that the legend itself is visible).
The 'visible' property is an enumeration that may be specified as:
- One of the following enumeration va... |
Determines whether or not this trace is visible. If
"legendonly", the trace is not drawn, but can appear as a
legend item (provided that the legend itself is visible).
The 'visible' property is an enumeration that may be specified as:
- One of the following enumeration va... | def visible(self):
"""
Determines whether or not this trace is visible. If
"legendonly", the trace is not drawn, but can appear as a
legend item (provided that the legend itself is visible).
The 'visible' property is an enumeration that may be specified as:
- One o... | [
"def",
"visible",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"visible\"",
"]"
] | [
1422,
4
] | [
1436,
30
] | python | en | ['en', 'error', 'th'] | False |
Scatterpolargl.__init__ | (
self,
arg=None,
connectgaps=None,
customdata=None,
customdatasrc=None,
dr=None,
dtheta=None,
fill=None,
fillcolor=None,
hoverinfo=None,
hoverinfosrc=None,
hoverlabel=None,
hovertemplate=None,
hovertemplates... |
Construct a new Scatterpolargl object
The scatterpolargl trace type encompasses line charts, scatter
charts, and bubble charts in polar coordinates using the WebGL
plotting engine. The data visualized as scatter point or lines
is set in `r` (radial) and `theta` (angular... |
Construct a new Scatterpolargl object
The scatterpolargl trace type encompasses line charts, scatter
charts, and bubble charts in polar coordinates using the WebGL
plotting engine. The data visualized as scatter point or lines
is set in `r` (radial) and `theta` (angular... | def __init__(
self,
arg=None,
connectgaps=None,
customdata=None,
customdatasrc=None,
dr=None,
dtheta=None,
fill=None,
fillcolor=None,
hoverinfo=None,
hoverinfosrc=None,
hoverlabel=None,
hovertemplate=None,
ho... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"connectgaps",
"=",
"None",
",",
"customdata",
"=",
"None",
",",
"customdatasrc",
"=",
"None",
",",
"dr",
"=",
"None",
",",
"dtheta",
"=",
"None",
",",
"fill",
"=",
"None",
",",
"fillcolor... | [
1702,
4
] | [
2252,
34
] | python | en | ['en', 'error', 'th'] | False |
Font.color | (self) |
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
- A named CSS color:
... |
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
- A named CSS color:
... | def color(self):
"""
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
- A name... | [
"def",
"color",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"color\"",
"]"
] | [
15,
4
] | [
63,
28
] | python | en | ['en', 'error', 'th'] | False |
Font.family | (self) |
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts ... |
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts ... | def family(self):
"""
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
prefer... | [
"def",
"family",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"family\"",
"]"
] | [
72,
4
] | [
94,
29
] | python | en | ['en', 'error', 'th'] | False |
Font.size | (self) |
The 'size' property is a number and may be specified as:
- An int or float in the interval [1, inf]
Returns
-------
int|float
|
The 'size' property is a number and may be specified as:
- An int or float in the interval [1, inf] | def size(self):
"""
The 'size' property is a number and may be specified as:
- An int or float in the interval [1, inf]
Returns
-------
int|float
"""
return self["size"] | [
"def",
"size",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"size\"",
"]"
] | [
103,
4
] | [
112,
27
] | python | en | ['en', 'error', 'th'] | False |
Font.__init__ | (self, arg=None, color=None, family=None, size=None, **kwargs) |
Construct a new Font object
Sets this axis' 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 instance o... |
Construct a new Font object
Sets this axis' 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 axis' 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 |
built | (path, version_string=None) |
Check if '.built' flag has been set for that task.
If a version_string is provided, this has to match, or the version is regarded as
not built.
|
Check if '.built' flag has been set for that task. | def built(path, version_string=None):
"""
Check if '.built' flag has been set for that task.
If a version_string is provided, this has to match, or the version is regarded as
not built.
"""
if version_string:
fname = os.path.join(path, '.built')
if not PathManager.exists(fname):... | [
"def",
"built",
"(",
"path",
",",
"version_string",
"=",
"None",
")",
":",
"if",
"version_string",
":",
"fname",
"=",
"os",
".",
"path",
".",
"join",
"(",
"path",
",",
"'.built'",
")",
"if",
"not",
"PathManager",
".",
"exists",
"(",
"fname",
")",
":"... | [
112,
0
] | [
128,
63
] | python | en | ['en', 'error', 'th'] | False |
mark_done | (path, version_string=None) |
Mark this path as prebuilt.
Marks the path as done by adding a '.built' file with the current timestamp
plus a version description string if specified.
:param str path:
The file path to mark as built.
:param str version_string:
The version of this dataset.
|
Mark this path as prebuilt. | def mark_done(path, version_string=None):
"""
Mark this path as prebuilt.
Marks the path as done by adding a '.built' file with the current timestamp
plus a version description string if specified.
:param str path:
The file path to mark as built.
:param str version_string:
The... | [
"def",
"mark_done",
"(",
"path",
",",
"version_string",
"=",
"None",
")",
":",
"with",
"PathManager",
".",
"open",
"(",
"os",
".",
"path",
".",
"join",
"(",
"path",
",",
"'.built'",
")",
",",
"'w'",
")",
"as",
"write",
":",
"write",
".",
"write",
"... | [
131,
0
] | [
147,
46
] | python | en | ['en', 'error', 'th'] | False |
download | (url, path, fname, redownload=False, num_retries=5) |
Download file using `requests`.
If ``redownload`` is set to false, then will not download tar file again if it is
present (default ``False``).
|
Download file using `requests`. | def download(url, path, fname, redownload=False, num_retries=5):
"""
Download file using `requests`.
If ``redownload`` is set to false, then will not download tar file again if it is
present (default ``False``).
"""
outfile = os.path.join(path, fname)
download = not PathManager.exists(outfi... | [
"def",
"download",
"(",
"url",
",",
"path",
",",
"fname",
",",
"redownload",
"=",
"False",
",",
"num_retries",
"=",
"5",
")",
":",
"outfile",
"=",
"os",
".",
"path",
".",
"join",
"(",
"path",
",",
"fname",
")",
"download",
"=",
"not",
"PathManager",
... | [
150,
0
] | [
219,
16
] | python | en | ['en', 'error', 'th'] | False |
make_dir | (path) |
Make the directory and any nonexistent parent directories (`mkdir -p`).
|
Make the directory and any nonexistent parent directories (`mkdir -p`).
| def make_dir(path):
"""
Make the directory and any nonexistent parent directories (`mkdir -p`).
"""
# the current working directory is a fine path
if path != '':
PathManager.mkdirs(path) | [
"def",
"make_dir",
"(",
"path",
")",
":",
"# the current working directory is a fine path",
"if",
"path",
"!=",
"''",
":",
"PathManager",
".",
"mkdirs",
"(",
"path",
")"
] | [
222,
0
] | [
228,
32
] | python | en | ['en', 'error', 'th'] | False |
remove_dir | (path) |
Remove the given directory, if it exists.
|
Remove the given directory, if it exists.
| def remove_dir(path):
"""
Remove the given directory, if it exists.
"""
shutil.rmtree(path, ignore_errors=True) | [
"def",
"remove_dir",
"(",
"path",
")",
":",
"shutil",
".",
"rmtree",
"(",
"path",
",",
"ignore_errors",
"=",
"True",
")"
] | [
231,
0
] | [
235,
43
] | python | en | ['en', 'error', 'th'] | False |
untar | (path, fname, delete=True, flatten_tar=False) |
Unpack the given archive file to the same directory.
:param str path:
The folder containing the archive. Will contain the contents.
:param str fname:
The filename of the archive file.
:param bool delete:
If true, the archive will be deleted after extraction.
|
Unpack the given archive file to the same directory. | def untar(path, fname, delete=True, flatten_tar=False):
"""
Unpack the given archive file to the same directory.
:param str path:
The folder containing the archive. Will contain the contents.
:param str fname:
The filename of the archive file.
:param bool delete:
If true, ... | [
"def",
"untar",
"(",
"path",
",",
"fname",
",",
"delete",
"=",
"True",
",",
"flatten_tar",
"=",
"False",
")",
":",
"if",
"\".zip\"",
"in",
"fname",
":",
"return",
"_unzip",
"(",
"path",
",",
"fname",
",",
"delete",
"=",
"delete",
")",
"else",
":",
... | [
238,
0
] | [
254,
70
] | python | en | ['en', 'error', 'th'] | False |
_untar | (path, fname, delete=True, flatten=False) |
Unpack the given archive file to the same directory.
:param str path:
The folder containing the archive. Will contain the contents.
:param str fname:
The filename of the archive file.
:param bool delete:
If true, the archive will be deleted after extraction.
|
Unpack the given archive file to the same directory. | def _untar(path, fname, delete=True, flatten=False):
"""
Unpack the given archive file to the same directory.
:param str path:
The folder containing the archive. Will contain the contents.
:param str fname:
The filename of the archive file.
:param bool delete:
If true, the... | [
"def",
"_untar",
"(",
"path",
",",
"fname",
",",
"delete",
"=",
"True",
",",
"flatten",
"=",
"False",
")",
":",
"import",
"tarfile",
"logging",
".",
"debug",
"(",
"f'unpacking {fname}'",
")",
"fullpath",
"=",
"os",
".",
"path",
".",
"join",
"(",
"path"... | [
257,
0
] | [
305,
13
] | python | en | ['en', 'error', 'th'] | False |
ungzip | (path, fname, deleteGZip=True) |
Unzips the given gzip compressed file to the same directory.
:param str path:
The folder containing the archive. Will contain the contents.
:param str fname:
The filename of the archive file.
:param bool deleteGZip:
If true, the compressed file will be deleted after extractio... |
Unzips the given gzip compressed file to the same directory. | def ungzip(path, fname, deleteGZip=True):
"""
Unzips the given gzip compressed file to the same directory.
:param str path:
The folder containing the archive. Will contain the contents.
:param str fname:
The filename of the archive file.
:param bool deleteGZip:
If true, th... | [
"def",
"ungzip",
"(",
"path",
",",
"fname",
",",
"deleteGZip",
"=",
"True",
")",
":",
"def",
"_get_output_filename",
"(",
"input_fname",
")",
":",
"GZIP_EXTENSIONS",
"=",
"(",
"'.gz'",
",",
"'.gzip'",
",",
"'.tgz'",
",",
"'.tar'",
")",
"for",
"ext",
"in"... | [
308,
0
] | [
338,
27
] | python | en | ['en', 'error', 'th'] | False |
_unzip | (path, fname, delete=True) |
Unpack the given zip file to the same directory.
:param str path:
The folder containing the archive. Will contain the contents.
:param str fname:
The filename of the archive file.
:param bool delete:
If true, the archive will be deleted after extraction.
|
Unpack the given zip file to the same directory. | def _unzip(path, fname, delete=True):
"""
Unpack the given zip file to the same directory.
:param str path:
The folder containing the archive. Will contain the contents.
:param str fname:
The filename of the archive file.
:param bool delete:
If true, the archive will be de... | [
"def",
"_unzip",
"(",
"path",
",",
"fname",
",",
"delete",
"=",
"True",
")",
":",
"import",
"zipfile",
"logging",
".",
"debug",
"(",
"f'unpacking {fname}'",
")",
"fullpath",
"=",
"os",
".",
"path",
".",
"join",
"(",
"path",
",",
"fname",
")",
"with",
... | [
341,
0
] | [
375,
13
] | python | en | ['en', 'error', 'th'] | False |
download_from_google_drive | (gd_id, destination) |
Use the requests package to download a file from Google Drive.
|
Use the requests package to download a file from Google Drive.
| def download_from_google_drive(gd_id, destination):
"""
Use the requests package to download a file from Google Drive.
"""
URL = 'https://docs.google.com/uc?export=download'
with requests.Session() as session:
response = session.get(URL, params={'id': gd_id}, stream=True)
token = _g... | [
"def",
"download_from_google_drive",
"(",
"gd_id",
",",
"destination",
")",
":",
"URL",
"=",
"'https://docs.google.com/uc?export=download'",
"with",
"requests",
".",
"Session",
"(",
")",
"as",
"session",
":",
"response",
"=",
"session",
".",
"get",
"(",
"URL",
"... | [
385,
0
] | [
405,
24
] | python | en | ['en', 'error', 'th'] | False |
download_models | (
opt,
fnames,
model_folder,
version='v1.0',
path='aws',
use_model_type=False,
flatten_tar=False,
) |
Download models into the ParlAI model zoo from a url.
:param fnames: list of filenames to download
:param model_folder: models will be downloaded into models/model_folder/model_type
:param path: url for downloading models; defaults to downloading from AWS
:param use_model_type: whether models are ... |
Download models into the ParlAI model zoo from a url. | def download_models(
opt,
fnames,
model_folder,
version='v1.0',
path='aws',
use_model_type=False,
flatten_tar=False,
):
"""
Download models into the ParlAI model zoo from a url.
:param fnames: list of filenames to download
:param model_folder: models will be downloaded into ... | [
"def",
"download_models",
"(",
"opt",
",",
"fnames",
",",
"model_folder",
",",
"version",
"=",
"'v1.0'",
",",
"path",
"=",
"'aws'",
",",
"use_model_type",
"=",
"False",
",",
"flatten_tar",
"=",
"False",
",",
")",
":",
"model_type",
"=",
"opt",
".",
"get"... | [
412,
0
] | [
457,
33
] | python | en | ['en', 'error', 'th'] | False |
modelzoo_path | (datapath, path) |
Map pretrain models filenames to their path on disk.
If path starts with 'models:', then we remap it to the model zoo path within the
data directory (default is ParlAI/data/models). We download models from the model
zoo if they are not here yet.
|
Map pretrain models filenames to their path on disk. | def modelzoo_path(datapath, path):
"""
Map pretrain models filenames to their path on disk.
If path starts with 'models:', then we remap it to the model zoo path within the
data directory (default is ParlAI/data/models). We download models from the model
zoo if they are not here yet.
"""
if... | [
"def",
"modelzoo_path",
"(",
"datapath",
",",
"path",
")",
":",
"if",
"path",
"is",
"None",
":",
"return",
"None",
"if",
"(",
"not",
"path",
".",
"startswith",
"(",
"'models:'",
")",
"and",
"not",
"path",
".",
"startswith",
"(",
"'zoo:'",
")",
"and",
... | [
460,
0
] | [
520,
46
] | python | en | ['en', 'error', 'th'] | False |
download_multiprocess | (
urls, path, num_processes=32, chunk_size=100, dest_filenames=None, error_path=None
) |
Download items in parallel (e.g. for an image + dialogue task).
WARNING: may have issues with OS X.
:param urls:
Array of urls to download
:param path:
directory to save items in
:param num_processes:
number of processes to use
:param chunk_size:
chunk size to ... |
Download items in parallel (e.g. for an image + dialogue task). | def download_multiprocess(
urls, path, num_processes=32, chunk_size=100, dest_filenames=None, error_path=None
):
"""
Download items in parallel (e.g. for an image + dialogue task).
WARNING: may have issues with OS X.
:param urls:
Array of urls to download
:param path:
directory... | [
"def",
"download_multiprocess",
"(",
"urls",
",",
"path",
",",
"num_processes",
"=",
"32",
",",
"chunk_size",
"=",
"100",
",",
"dest_filenames",
"=",
"None",
",",
"error_path",
"=",
"None",
")",
":",
"pbar",
"=",
"tqdm",
".",
"tqdm",
"(",
"total",
"=",
... | [
523,
0
] | [
625,
22
] | python | en | ['en', 'error', 'th'] | False |
_download_multiprocess_map_chunk | (pool_tup) |
Helper function for Pool imap_unordered.
Apparently function must be pickable (which apparently means must be
defined at the top level of a module and can't be a lamdba) to be used in
imap_unordered. Has to do with how it's passed to the subprocess.
:param pool_tup: is a tuple where first arg is ... |
Helper function for Pool imap_unordered. | def _download_multiprocess_map_chunk(pool_tup):
"""
Helper function for Pool imap_unordered.
Apparently function must be pickable (which apparently means must be
defined at the top level of a module and can't be a lamdba) to be used in
imap_unordered. Has to do with how it's passed to the subproces... | [
"def",
"_download_multiprocess_map_chunk",
"(",
"pool_tup",
")",
":",
"items",
"=",
"pool_tup",
"[",
"0",
"]",
"path",
"=",
"pool_tup",
"[",
"1",
"]",
"fn",
"=",
"pool_tup",
"[",
"2",
"]",
"return",
"[",
"fn",
"(",
"it",
"[",
"0",
"]",
",",
"path",
... | [
628,
0
] | [
644,
51
] | python | en | ['en', 'error', 'th'] | False |
_download_multiprocess_single | (url, path, dest_fname) |
Helper function to download an individual item.
Unlike download() above, does not deal with downloading chunks of a big
file, does not support retries (and does not fail if retries are exhausted).
:param url: URL to download from
:param path: directory to save in
:param dest_fname: destinatio... |
Helper function to download an individual item. | def _download_multiprocess_single(url, path, dest_fname):
"""
Helper function to download an individual item.
Unlike download() above, does not deal with downloading chunks of a big
file, does not support retries (and does not fail if retries are exhausted).
:param url: URL to download from
:p... | [
"def",
"_download_multiprocess_single",
"(",
"url",
",",
"path",
",",
"dest_fname",
")",
":",
"status",
"=",
"None",
"error_msg",
"=",
"None",
"try",
":",
"# 'User-Agent' header may need to be specified",
"headers",
"=",
"{",
"}",
"# Use smaller timeout to skip errors, ... | [
647,
0
] | [
693,
40
] | python | en | ['en', 'error', 'th'] | False |
DownloadableFile.checksum | (self, dpath) |
Checksum on a given file.
:param dpath: path to the downloaded file.
|
Checksum on a given file. | def checksum(self, dpath):
"""
Checksum on a given file.
:param dpath: path to the downloaded file.
"""
sha256_hash = hashlib.sha256()
with PathManager.open(os.path.join(dpath, self.file_name), "rb") as f:
for byte_block in iter(lambda: f.read(65536), b""):
... | [
"def",
"checksum",
"(",
"self",
",",
"dpath",
")",
":",
"sha256_hash",
"=",
"hashlib",
".",
"sha256",
"(",
")",
"with",
"PathManager",
".",
"open",
"(",
"os",
".",
"path",
".",
"join",
"(",
"dpath",
",",
"self",
".",
"file_name",
")",
",",
"\"rb\"",
... | [
62,
4
] | [
80,
52
] | python | en | ['en', 'error', 'th'] | False |
DownloadableFile.check_header | (self) |
Performs a HEAD request to check if the URL / Google Drive ID is live.
|
Performs a HEAD request to check if the URL / Google Drive ID is live.
| def check_header(self):
"""
Performs a HEAD request to check if the URL / Google Drive ID is live.
"""
session = requests.Session()
if self.from_google:
URL = 'https://docs.google.com/uc?export=download'
response = session.head(URL, params={'id': self.url}... | [
"def",
"check_header",
"(",
"self",
")",
":",
"session",
"=",
"requests",
".",
"Session",
"(",
")",
"if",
"self",
".",
"from_google",
":",
"URL",
"=",
"'https://docs.google.com/uc?export=download'",
"response",
"=",
"session",
".",
"head",
"(",
"URL",
",",
"... | [
93,
4
] | [
109,
28
] | python | en | ['en', 'error', 'th'] | False |
TestExitCodeAndOutput | (command) | Runs the given command and verifies its exit code and output. | Runs the given command and verifies its exit code and output. | def TestExitCodeAndOutput(command):
"""Runs the given command and verifies its exit code and output."""
# Verifies that 'command' exits with code 1.
p = gtest_test_utils.Subprocess(command)
Assert(p.exited)
AssertEq(1, p.exit_code)
Assert('InitGoogleTest' in p.output) | [
"def",
"TestExitCodeAndOutput",
"(",
"command",
")",
":",
"# Verifies that 'command' exits with code 1.",
"p",
"=",
"gtest_test_utils",
".",
"Subprocess",
"(",
"command",
")",
"Assert",
"(",
"p",
".",
"exited",
")",
"AssertEq",
"(",
"1",
",",
"p",
".",
"exit_cod... | [
53,
0
] | [
60,
38
] | python | en | ['en', 'en', 'en'] | True |
Marker.color | (self) |
Sets the marker color of unselected points, applied only when a
selection exists.
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%)')
... |
Sets the marker color of unselected points, applied only when a
selection exists.
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%)')
... | def color(self):
"""
Sets the marker color of unselected points, applied only when a
selection exists.
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 stri... | [
"def",
"color",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"color\"",
"]"
] | [
15,
4
] | [
66,
28
] | python | en | ['en', 'error', 'th'] | False |
Marker.opacity | (self) |
Sets the marker opacity of unselected points, applied only when
a selection exists.
The 'opacity' property is a number and may be specified as:
- An int or float in the interval [0, 1]
Returns
-------
int|float
|
Sets the marker opacity of unselected points, applied only when
a selection exists.
The 'opacity' property is a number and may be specified as:
- An int or float in the interval [0, 1] | def opacity(self):
"""
Sets the marker opacity of unselected points, applied only when
a selection exists.
The 'opacity' property is a number and may be specified as:
- An int or float in the interval [0, 1]
Returns
-------
int|float
"""
... | [
"def",
"opacity",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"opacity\"",
"]"
] | [
75,
4
] | [
87,
30
] | python | en | ['en', 'error', 'th'] | False |
Marker.size | (self) |
Sets the marker size of unselected points, applied only when a
selection exists.
The 'size' property is a number and may be specified as:
- An int or float in the interval [0, inf]
Returns
-------
int|float
|
Sets the marker size of unselected points, applied only when a
selection exists.
The 'size' property is a number and may be specified as:
- An int or float in the interval [0, inf] | def size(self):
"""
Sets the marker size of unselected points, applied only when a
selection exists.
The 'size' property is a number and may be specified as:
- An int or float in the interval [0, inf]
Returns
-------
int|float
"""
r... | [
"def",
"size",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"size\"",
"]"
] | [
96,
4
] | [
108,
27
] | python | en | ['en', 'error', 'th'] | False |
Marker.__init__ | (self, arg=None, color=None, opacity=None, size=None, **kwargs) |
Construct a new Marker object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.scattergeo.unselected.Marker`
color
Sets the marker color of unselecte... |
Construct a new Marker object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.scattergeo.unselected.Marker`
color
Sets the marker color of unselecte... | def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs):
"""
Construct a new Marker object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.sc... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"color",
"=",
"None",
",",
"opacity",
"=",
"None",
",",
"size",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"super",
"(",
"Marker",
",",
"self",
")",
".",
"__init__",
"(",
"\"marke... | [
130,
4
] | [
202,
34
] | python | en | ['en', 'error', 'th'] | False |
Selected.marker | (self) |
The 'marker' property is an instance of Marker
that may be specified as:
- An instance of :class:`plotly.graph_objs.box.selected.Marker`
- A dict of string/value properties that will be passed
to the Marker constructor
Supported dict properties:
... |
The 'marker' property is an instance of Marker
that may be specified as:
- An instance of :class:`plotly.graph_objs.box.selected.Marker`
- A dict of string/value properties that will be passed
to the Marker constructor
Supported dict properties:
... | def marker(self):
"""
The 'marker' property is an instance of Marker
that may be specified as:
- An instance of :class:`plotly.graph_objs.box.selected.Marker`
- A dict of string/value properties that will be passed
to the Marker constructor
Suppor... | [
"def",
"marker",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"marker\"",
"]"
] | [
15,
4
] | [
36,
29
] | python | en | ['en', 'error', 'th'] | False |
Selected.__init__ | (self, arg=None, marker=None, **kwargs) |
Construct a new Selected object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.box.Selected`
marker
:class:`plotly.graph_objects.box.selected.Marker`
... |
Construct a new Selected object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.box.Selected`
marker
:class:`plotly.graph_objects.box.selected.Marker`
... | def __init__(self, arg=None, marker=None, **kwargs):
"""
Construct a new Selected object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.box.Selected`
marker
... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"marker",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"super",
"(",
"Selected",
",",
"self",
")",
".",
"__init__",
"(",
"\"selected\"",
")",
"if",
"\"_parent\"",
"in",
"kwargs",
":",
... | [
52,
4
] | [
109,
34
] | python | en | ['en', 'error', 'th'] | False |
RouteUpdateResponse.__init__ | (self, *, updated: Sequence[RouteUpdated] = None, **kwargs) |
Initialize a RouteUpdateResponse message instance.
Args:
updated: A list of route updates
|
Initialize a RouteUpdateResponse message instance. | def __init__(self, *, updated: Sequence[RouteUpdated] = None, **kwargs):
"""
Initialize a RouteUpdateResponse message instance.
Args:
updated: A list of route updates
"""
super(RouteUpdateResponse, self).__init__(**kwargs)
self.updated = updated or [] | [
"def",
"__init__",
"(",
"self",
",",
"*",
",",
"updated",
":",
"Sequence",
"[",
"RouteUpdated",
"]",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"super",
"(",
"RouteUpdateResponse",
",",
"self",
")",
".",
"__init__",
"(",
"*",
"*",
"kwargs",
")",... | [
27,
4
] | [
36,
36
] | python | en | ['en', 'error', 'th'] | False |
_shared_login | (request) |
Handle the shared login between website and webclient.
|
Handle the shared login between website and webclient. | def _shared_login(request):
"""
Handle the shared login between website and webclient.
"""
csession = request.session
account = request.user
# these can have 3 values:
# None - previously unused (auto-login)
# False - actively logged out (don't auto-login)
# <uid> - logged in ... | [
"def",
"_shared_login",
"(",
"request",
")",
":",
"csession",
"=",
"request",
".",
"session",
"account",
"=",
"request",
".",
"user",
"# these can have 3 values:",
"# None - previously unused (auto-login)",
"# False - actively logged out (don't auto-login)",
"# <uid> - lo... | [
14,
0
] | [
49,
34
] | python | en | ['en', 'error', 'th'] | False |
webclient | (request) |
Webclient page template loading.
|
Webclient page template loading. | def webclient(request):
"""
Webclient page template loading.
"""
# handle webclient-website shared login
_shared_login(request)
# make sure to store the browser session's hash so the webclient can get to it!
pagevars = {'browser_sessid': request.session.session_key}
return render(requ... | [
"def",
"webclient",
"(",
"request",
")",
":",
"# handle webclient-website shared login",
"_shared_login",
"(",
"request",
")",
"# make sure to store the browser session's hash so the webclient can get to it!",
"pagevars",
"=",
"{",
"'browser_sessid'",
":",
"request",
".",
"sess... | [
52,
0
] | [
63,
54
] | python | en | ['en', 'error', 'th'] | False |
Tickfont.color | (self) |
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
- A named CSS color:
... |
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
- A named CSS color:
... | def color(self):
"""
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
- A name... | [
"def",
"color",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"color\"",
"]"
] | [
15,
4
] | [
63,
28
] | python | en | ['en', 'error', 'th'] | False |
Tickfont.family | (self) |
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts ... |
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts ... | def family(self):
"""
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
prefer... | [
"def",
"family",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"family\"",
"]"
] | [
72,
4
] | [
94,
29
] | python | en | ['en', 'error', 'th'] | False |
Tickfont.size | (self) |
The 'size' property is a number and may be specified as:
- An int or float in the interval [1, inf]
Returns
-------
int|float
|
The 'size' property is a number and may be specified as:
- An int or float in the interval [1, inf] | def size(self):
"""
The 'size' property is a number and may be specified as:
- An int or float in the interval [1, inf]
Returns
-------
int|float
"""
return self["size"] | [
"def",
"size",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"size\"",
"]"
] | [
103,
4
] | [
112,
27
] | python | en | ['en', 'error', 'th'] | False |
Tickfont.__init__ | (self, arg=None, color=None, family=None, size=None, **kwargs) |
Construct a new Tickfont object
Sets the color bar's tick label font
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of :class:`plotly.graph_objs.splom.marker.c
olorbar.Tickfont`
c... |
Construct a new Tickfont object
Sets the color bar's tick label font | def __init__(self, arg=None, color=None, family=None, size=None, **kwargs):
"""
Construct a new Tickfont object
Sets the color bar's tick label font
Parameters
----------
arg
dict of properties compatible with this constructor or
an insta... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"color",
"=",
"None",
",",
"family",
"=",
"None",
",",
"size",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"super",
"(",
"Tickfont",
",",
"self",
")",
".",
"__init__",
"(",
"\"tick... | [
143,
4
] | [
226,
34
] | python | en | ['en', 'error', 'th'] | False |
TestHttpTransport.get_application | (self) |
Override the get_app method to return your application.
|
Override the get_app method to return your application.
| async def get_application(self):
"""
Override the get_app method to return your application.
"""
app = web.Application()
app.add_routes([web.post("/", self.receive_message)])
return app | [
"async",
"def",
"get_application",
"(",
"self",
")",
":",
"app",
"=",
"web",
".",
"Application",
"(",
")",
"app",
".",
"add_routes",
"(",
"[",
"web",
".",
"post",
"(",
"\"/\"",
",",
"self",
".",
"receive_message",
")",
"]",
")",
"return",
"app"
] | [
21,
4
] | [
27,
18
] | python | en | ['en', 'error', 'th'] | False |
TestMultiworld.test_with_stream | (self) |
Test that multi-tasking works with datatype train:stream.
|
Test that multi-tasking works with datatype train:stream.
| def test_with_stream(self):
"""
Test that multi-tasking works with datatype train:stream.
"""
task1 = 'integration_tests:infinite_train'
task2 = 'integration_tests:short_fixed'
opt = ParlaiParser(True, True).parse_kwargs(
task=f'{task1},{task2}',
m... | [
"def",
"test_with_stream",
"(",
"self",
")",
":",
"task1",
"=",
"'integration_tests:infinite_train'",
"task2",
"=",
"'integration_tests:short_fixed'",
"opt",
"=",
"ParlaiParser",
"(",
"True",
",",
"True",
")",
".",
"parse_kwargs",
"(",
"task",
"=",
"f'{task1},{task2... | [
83,
4
] | [
112,
37
] | python | en | ['en', 'error', 'th'] | False |
Line.color | (self) |
Sets the line 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%)')
- ... |
Sets the line 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%)')
- ... | def color(self):
"""
Sets the line 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... | [
"def",
"color",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"color\"",
"]"
] | [
15,
4
] | [
65,
28
] | python | en | ['en', 'error', 'th'] | False |
Line.dash | (self) |
Sets the style of the lines.
The 'dash' property is an enumeration that may be specified as:
- One of the following enumeration values:
['solid', 'dot', 'dash', 'longdash', 'dashdot',
'longdashdot']
Returns
-------
Any
|
Sets the style of the lines.
The 'dash' property is an enumeration that may be specified as:
- One of the following enumeration values:
['solid', 'dot', 'dash', 'longdash', 'dashdot',
'longdashdot'] | def dash(self):
"""
Sets the style of the lines.
The 'dash' property is an enumeration that may be specified as:
- One of the following enumeration values:
['solid', 'dot', 'dash', 'longdash', 'dashdot',
'longdashdot']
Returns
-----... | [
"def",
"dash",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"dash\"",
"]"
] | [
74,
4
] | [
87,
27
] | python | en | ['en', 'error', 'th'] | False |
Line.shape | (self) |
Determines the line shape. The values correspond to step-wise
line shapes.
The 'shape' property is an enumeration that may be specified as:
- One of the following enumeration values:
['linear', 'hv', 'vh', 'hvh', 'vhv']
Returns
-------
Any... |
Determines the line shape. The values correspond to step-wise
line shapes.
The 'shape' property is an enumeration that may be specified as:
- One of the following enumeration values:
['linear', 'hv', 'vh', 'hvh', 'vhv'] | def shape(self):
"""
Determines the line shape. The values correspond to step-wise
line shapes.
The 'shape' property is an enumeration that may be specified as:
- One of the following enumeration values:
['linear', 'hv', 'vh', 'hvh', 'vhv']
Returns... | [
"def",
"shape",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"shape\"",
"]"
] | [
96,
4
] | [
109,
28
] | 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\"",
"]"
] | [
118,
4
] | [
129,
28
] | python | en | ['en', 'error', 'th'] | False |
Line.__init__ | (
self, arg=None, color=None, dash=None, shape=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.scattergl.Line`
color
Sets the line color.
dash
Sets... |
Construct a new Line object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.scattergl.Line`
color
Sets the line color.
dash
Sets... | def __init__(
self, arg=None, color=None, dash=None, shape=None, width=None, **kwargs
):
"""
Construct a new Line object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"color",
"=",
"None",
",",
"dash",
"=",
"None",
",",
"shape",
"=",
"None",
",",
"width",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"super",
"(",
"Line",
",",
"self",
")",
".",
... | [
151,
4
] | [
229,
34
] | python | en | ['en', 'error', 'th'] | False |
_msg_err | (receiver, stringtuple) |
Helper function for returning an error to the caller.
Args:
receiver (Object): object to get the error message.
stringtuple (tuple): tuple with two strings - one for the
_IN_GAME_ERRORS mode (with the traceback) and one with the
production string (with a timestamp) to b... |
Helper function for returning an error to the caller. | def _msg_err(receiver, stringtuple):
"""
Helper function for returning an error to the caller.
Args:
receiver (Object): object to get the error message.
stringtuple (tuple): tuple with two strings - one for the
_IN_GAME_ERRORS mode (with the traceback) and one with the
... | [
"def",
"_msg_err",
"(",
"receiver",
",",
"stringtuple",
")",
":",
"string",
"=",
"\"{traceback}\\n{errmsg}\\n(Traceback was logged {timestamp}).\"",
"timestamp",
"=",
"logger",
".",
"timeformat",
"(",
")",
"tracestring",
"=",
"format_exc",
"(",
")",
"logger",
".",
"... | [
139,
0
] | [
161,
64
] | python | en | ['en', 'error', 'th'] | False |
_progressive_cmd_run | (cmd, generator, response=None) |
Progressively call the command that was given in argument. Used
when `yield` is present in the Command's `func()` method.
Args:
cmd (Command): the command itself.
generator (GeneratorType): the generator describing the processing.
reponse (str, optional): the response to send to th... |
Progressively call the command that was given in argument. Used
when `yield` is present in the Command's `func()` method. | def _progressive_cmd_run(cmd, generator, response=None):
"""
Progressively call the command that was given in argument. Used
when `yield` is present in the Command's `func()` method.
Args:
cmd (Command): the command itself.
generator (GeneratorType): the generator describing the process... | [
"def",
"_progressive_cmd_run",
"(",
"cmd",
",",
"generator",
",",
"response",
"=",
"None",
")",
":",
"global",
"_GET_INPUT",
"if",
"not",
"_GET_INPUT",
":",
"from",
"evennia",
".",
"utils",
".",
"evmenu",
"import",
"get_input",
"as",
"_GET_INPUT",
"try",
":"... | [
164,
0
] | [
203,
99
] | python | en | ['en', 'error', 'th'] | False |
_process_input | (caller, prompt, result, cmd, generator) |
Specifically handle the get_input value to send to _progressive_cmd_run as
part of yielding from a Command's `func`.
Args:
caller (Character, Account or Session): the caller.
prompt (basestring): The sent prompt.
result (basestring): The unprocessed answer.
cmd (Command): T... |
Specifically handle the get_input value to send to _progressive_cmd_run as
part of yielding from a Command's `func`. | def _process_input(caller, prompt, result, cmd, generator):
"""
Specifically handle the get_input value to send to _progressive_cmd_run as
part of yielding from a Command's `func`.
Args:
caller (Character, Account or Session): the caller.
prompt (basestring): The sent prompt.
re... | [
"def",
"_process_input",
"(",
"caller",
",",
"prompt",
",",
"result",
",",
"cmd",
",",
"generator",
")",
":",
"# We call it using a Twisted deferLater to make sure the input is properly closed.",
"deferLater",
"(",
"reactor",
",",
"0",
",",
"_progressive_cmd_run",
",",
... | [
206,
0
] | [
224,
16
] | python | en | ['en', 'error', 'th'] | False |
get_and_merge_cmdsets | (caller, session, account, obj, callertype, raw_string) |
Gather all relevant cmdsets and merge them.
Args:
caller (Session, Account or Object): The entity executing the command. Which
type of object this is depends on the current game state; for example
when the user is not logged in, this will be a Session, when being OOC
... |
Gather all relevant cmdsets and merge them. | def get_and_merge_cmdsets(caller, session, account, obj, callertype, raw_string):
"""
Gather all relevant cmdsets and merge them.
Args:
caller (Session, Account or Object): The entity executing the command. Which
type of object this is depends on the current game state; for example
... | [
"def",
"get_and_merge_cmdsets",
"(",
"caller",
",",
"session",
",",
"account",
",",
"obj",
",",
"callertype",
",",
"raw_string",
")",
":",
"try",
":",
"@",
"inlineCallbacks",
"def",
"_get_channel_cmdset",
"(",
"account_or_obj",
")",
":",
"\"\"\"\n Helpe... | [
254,
0
] | [
464,
13
] | python | en | ['en', 'error', 'th'] | False |
cmdhandler | (called_by, raw_string, _testing=False, callertype="session", session=None,
cmdobj=None, cmdobj_key=None, **kwargs) |
This is the main mechanism that handles any string sent to the engine.
Args:
called_by (Session, Account or Object): Object from which this
command was called. which this was called from. What this is
depends on the game state.
raw_string (str): The command string as g... |
This is the main mechanism that handles any string sent to the engine. | def cmdhandler(called_by, raw_string, _testing=False, callertype="session", session=None,
cmdobj=None, cmdobj_key=None, **kwargs):
"""
This is the main mechanism that handles any string sent to the engine.
Args:
called_by (Session, Account or Object): Object from which this
... | [
"def",
"cmdhandler",
"(",
"called_by",
",",
"raw_string",
",",
"_testing",
"=",
"False",
",",
"callertype",
"=",
"\"session\"",
",",
"session",
"=",
"None",
",",
"cmdobj",
"=",
"None",
",",
"cmdobj_key",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
... | [
471,
0
] | [
759,
45
] | python | en | ['en', 'error', 'th'] | False |
TestSettings.test_settings_init | (self) | Test settings initialization. | Test settings initialization. | def test_settings_init(self):
"""Test settings initialization."""
for key in self.test_settings:
assert key in self.test_instance
assert self.test_instance[key] == self.test_settings[key]
assert (
self.test_instance.get_value(self.test_key) == self.tes... | [
"def",
"test_settings_init",
"(",
"self",
")",
":",
"for",
"key",
"in",
"self",
".",
"test_settings",
":",
"assert",
"key",
"in",
"self",
".",
"test_instance",
"assert",
"self",
".",
"test_instance",
"[",
"key",
"]",
"==",
"self",
".",
"test_settings",
"["... | [
13,
4
] | [
22,
41
] | python | en | ['en', 'fy', 'en'] | True |
TestSettings.test_get_formats | (self) | Test retrieval with formatting. | Test retrieval with formatting. | def test_get_formats(self):
"""Test retrieval with formatting."""
self.test_instance["BOOL"] = "true"
assert self.test_instance.get_bool("BOOL") is True
self.test_instance["BOOL"] = "false"
assert self.test_instance.get_bool("BOOL") is False
self.test_instance["INT"] = "5... | [
"def",
"test_get_formats",
"(",
"self",
")",
":",
"self",
".",
"test_instance",
"[",
"\"BOOL\"",
"]",
"=",
"\"true\"",
"assert",
"self",
".",
"test_instance",
".",
"get_bool",
"(",
"\"BOOL\"",
")",
"is",
"True",
"self",
".",
"test_instance",
"[",
"\"BOOL\"",... | [
24,
4
] | [
36,
38
] | python | en | ['en', 'pl', 'en'] | True |
TestSettings.test_remove | (self) | Test value removal. | Test value removal. | def test_remove(self):
"""Test value removal."""
del self.test_instance[self.test_key]
with self.assertRaises(KeyError):
self.test_instance[self.test_key]
self.test_instance[self.test_key] = self.test_value
self.test_instance.clear_value(self.test_key)
with se... | [
"def",
"test_remove",
"(",
"self",
")",
":",
"del",
"self",
".",
"test_instance",
"[",
"self",
".",
"test_key",
"]",
"with",
"self",
".",
"assertRaises",
"(",
"KeyError",
")",
":",
"self",
".",
"test_instance",
"[",
"self",
".",
"test_key",
"]",
"self",
... | [
38,
4
] | [
46,
45
] | python | en | ['nl', 'en', 'en'] | True |
TestSettings.test_set_default | (self) | Test default value. | Test default value. | def test_set_default(self):
"""Test default value."""
self.test_instance.set_default(self.test_key, "RANDOM")
assert self.test_instance[self.test_key] == self.test_value
self.test_instance.set_default("BOOL", "True")
assert self.test_instance["BOOL"] == "True" | [
"def",
"test_set_default",
"(",
"self",
")",
":",
"self",
".",
"test_instance",
".",
"set_default",
"(",
"self",
".",
"test_key",
",",
"\"RANDOM\"",
")",
"assert",
"self",
".",
"test_instance",
"[",
"self",
".",
"test_key",
"]",
"==",
"self",
".",
"test_va... | [
48,
4
] | [
53,
51
] | python | da | ['nl', 'da', 'en'] | False |
Increasing.marker | (self) |
The 'marker' property is an instance of Marker
that may be specified as:
- An instance of :class:`plotly.graph_objs.waterfall.increasing.Marker`
- A dict of string/value properties that will be passed
to the Marker constructor
Supported dict properties:
... |
The 'marker' property is an instance of Marker
that may be specified as:
- An instance of :class:`plotly.graph_objs.waterfall.increasing.Marker`
- A dict of string/value properties that will be passed
to the Marker constructor
Supported dict properties:
... | def marker(self):
"""
The 'marker' property is an instance of Marker
that may be specified as:
- An instance of :class:`plotly.graph_objs.waterfall.increasing.Marker`
- A dict of string/value properties that will be passed
to the Marker constructor
... | [
"def",
"marker",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"marker\"",
"]"
] | [
15,
4
] | [
36,
29
] | python | en | ['en', 'error', 'th'] | False |
Increasing.__init__ | (self, arg=None, marker=None, **kwargs) |
Construct a new Increasing object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.waterfall.Increasing`
marker
:class:`plotly.graph_objects.waterfal... |
Construct a new Increasing object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.waterfall.Increasing`
marker
:class:`plotly.graph_objects.waterfal... | def __init__(self, arg=None, marker=None, **kwargs):
"""
Construct a new Increasing object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.waterfall.Increasing`
... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"marker",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"super",
"(",
"Increasing",
",",
"self",
")",
".",
"__init__",
"(",
"\"increasing\"",
")",
"if",
"\"_parent\"",
"in",
"kwargs",
":... | [
52,
4
] | [
110,
34
] | python | en | ['en', 'error', 'th'] | False |
DifficultyScoreGraphQLView.execute_graphql_request | (
self, request, data, query, variables, operation_name, show_graphiql=False
) |
Largely a copy of GraphQLView execute_graphql_request function, the check has to happen in the middle of its
processing so whole function needs to be replicated here
|
Largely a copy of GraphQLView execute_graphql_request function, the check has to happen in the middle of its
processing so whole function needs to be replicated here
| def execute_graphql_request(
self, request, data, query, variables, operation_name, show_graphiql=False
):
"""
Largely a copy of GraphQLView execute_graphql_request function, the check has to happen in the middle of its
processing so whole function needs to be replicated here
... | [
"def",
"execute_graphql_request",
"(",
"self",
",",
"request",
",",
"data",
",",
"query",
",",
"variables",
",",
"operation_name",
",",
"show_graphiql",
"=",
"False",
")",
":",
"if",
"not",
"query",
":",
"if",
"show_graphiql",
":",
"return",
"None",
"raise",... | [
60,
4
] | [
131,
60
] | python | en | ['en', 'error', 'th'] | False |
DifficultyScoreGraphQLView.calculate_action_weight | (self, selection_set, fragments, depth_level=1) |
For every action, add up the cost of its fields it expects
from its return and then multiply it by its own weight.
|
For every action, add up the cost of its fields it expects
from its return and then multiply it by its own weight.
| def calculate_action_weight(self, selection_set, fragments, depth_level=1):
"""
For every action, add up the cost of its fields it expects
from its return and then multiply it by its own weight.
"""
total_weight = 0
if self.depth_limit and depth_level > self.depth_limit:
... | [
"def",
"calculate_action_weight",
"(",
"self",
",",
"selection_set",
",",
"fragments",
",",
"depth_level",
"=",
"1",
")",
":",
"total_weight",
"=",
"0",
"if",
"self",
".",
"depth_limit",
"and",
"depth_level",
">",
"self",
".",
"depth_limit",
":",
"raise",
"D... | [
133,
4
] | [
159,
27
] | python | en | ['en', 'error', 'th'] | False |
ProblemReport.__init__ | (self, *, problem_code: str = None, explain: str = None, **kwargs) |
Initialize a ProblemReport message instance.
Args:
explain: The localized error explanation
problem_code: The standard error identifier
|
Initialize a ProblemReport message instance. | def __init__(self, *, problem_code: str = None, explain: str = None, **kwargs):
"""
Initialize a ProblemReport message instance.
Args:
explain: The localized error explanation
problem_code: The standard error identifier
"""
super(ProblemReport, self).__in... | [
"def",
"__init__",
"(",
"self",
",",
"*",
",",
"problem_code",
":",
"str",
"=",
"None",
",",
"explain",
":",
"str",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"super",
"(",
"ProblemReport",
",",
"self",
")",
".",
"__init__",
"(",
"*",
"*",
"... | [
31,
4
] | [
41,
40
] | python | en | ['en', 'error', 'th'] | False |
Dimension.axis | (self) |
The 'axis' property is an instance of Axis
that may be specified as:
- An instance of :class:`plotly.graph_objs.splom.dimension.Axis`
- A dict of string/value properties that will be passed
to the Axis constructor
Supported dict properties:
... |
The 'axis' property is an instance of Axis
that may be specified as:
- An instance of :class:`plotly.graph_objs.splom.dimension.Axis`
- A dict of string/value properties that will be passed
to the Axis constructor
Supported dict properties:
... | def axis(self):
"""
The 'axis' property is an instance of Axis
that may be specified as:
- An instance of :class:`plotly.graph_objs.splom.dimension.Axis`
- A dict of string/value properties that will be passed
to the Axis constructor
Supported dic... | [
"def",
"axis",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"axis\"",
"]"
] | [
23,
4
] | [
48,
27
] | python | en | ['en', 'error', 'th'] | False |
Dimension.label | (self) |
Sets the label corresponding to this splom dimension.
The 'label' property is a string and must be specified as:
- A string
- A number that will be converted to a string
Returns
-------
str
|
Sets the label corresponding to this splom dimension.
The 'label' property is a string and must be specified as:
- A string
- A number that will be converted to a string | def label(self):
"""
Sets the label corresponding to this splom dimension.
The 'label' property is a string and must be specified as:
- A string
- A number that will be converted to a string
Returns
-------
str
"""
return self["la... | [
"def",
"label",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"label\"",
"]"
] | [
57,
4
] | [
69,
28
] | python | en | ['en', 'error', 'th'] | False |
Dimension.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\"",
"]"
] | [
78,
4
] | [
96,
27
] | python | en | ['en', 'error', 'th'] | False |
Dimension.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\"",
"]"
] | [
105,
4
] | [
124,
39
] | python | en | ['en', 'error', 'th'] | False |
Dimension.values | (self) |
Sets the dimension values to be plotted.
The 'values' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Returns
-------
numpy.ndarray
|
Sets the dimension values to be plotted.
The 'values' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series | def values(self):
"""
Sets the dimension values to be plotted.
The 'values' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Returns
-------
numpy.ndarray
"""
return self["values"] | [
"def",
"values",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"values\"",
"]"
] | [
133,
4
] | [
144,
29
] | python | en | ['en', 'error', 'th'] | False |
Dimension.valuessrc | (self) |
Sets the source reference on Chart Studio Cloud for values .
The 'valuessrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for values .
The 'valuessrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def valuessrc(self):
"""
Sets the source reference on Chart Studio Cloud for values .
The 'valuessrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["valuessrc"] | [
"def",
"valuessrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"valuessrc\"",
"]"
] | [
153,
4
] | [
164,
32
] | python | en | ['en', 'error', 'th'] | False |
Dimension.visible | (self) |
Determines whether or not this dimension is shown on the graph.
Note that even visible false dimension contribute to the
default grid generate by this splom trace.
The 'visible' property must be specified as a bool
(either True, or False)
Returns
-------
... |
Determines whether or not this dimension is shown on the graph.
Note that even visible false dimension contribute to the
default grid generate by this splom trace.
The 'visible' property must be specified as a bool
(either True, or False) | def visible(self):
"""
Determines whether or not this dimension is shown on the graph.
Note that even visible false dimension contribute to the
default grid generate by this splom trace.
The 'visible' property must be specified as a bool
(either True, or False)
... | [
"def",
"visible",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"visible\"",
"]"
] | [
173,
4
] | [
186,
30
] | python | en | ['en', 'error', 'th'] | False |
Dimension.__init__ | (
self,
arg=None,
axis=None,
label=None,
name=None,
templateitemname=None,
values=None,
valuessrc=None,
visible=None,
**kwargs
) |
Construct a new Dimension object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.splom.Dimension`
axis
:class:`plotly.graph_objects.splom.dimension.... |
Construct a new Dimension object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.splom.Dimension`
axis
:class:`plotly.graph_objects.splom.dimension.... | def __init__(
self,
arg=None,
axis=None,
label=None,
name=None,
templateitemname=None,
values=None,
valuessrc=None,
visible=None,
**kwargs
):
"""
Construct a new Dimension object
Parameters
-----... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"axis",
"=",
"None",
",",
"label",
"=",
"None",
",",
"name",
"=",
"None",
",",
"templateitemname",
"=",
"None",
",",
"values",
"=",
"None",
",",
"valuessrc",
"=",
"None",
",",
"visible",
... | [
233,
4
] | [
357,
34
] | python | en | ['en', 'error', 'th'] | False |
set_game_name_and_slogan | () |
Sets global variables GAME_NAME and GAME_SLOGAN which are used by
general_context.
Notes:
This function is used for unit testing the values of the globals.
|
Sets global variables GAME_NAME and GAME_SLOGAN which are used by
general_context. | def set_game_name_and_slogan():
"""
Sets global variables GAME_NAME and GAME_SLOGAN which are used by
general_context.
Notes:
This function is used for unit testing the values of the globals.
"""
global GAME_NAME, GAME_SLOGAN, SERVER_VERSION
try:
GAME_NAME = settings.SERVERN... | [
"def",
"set_game_name_and_slogan",
"(",
")",
":",
"global",
"GAME_NAME",
",",
"GAME_SLOGAN",
",",
"SERVER_VERSION",
"try",
":",
"GAME_NAME",
"=",
"settings",
".",
"SERVERNAME",
".",
"strip",
"(",
")",
"except",
"AttributeError",
":",
"GAME_NAME",
"=",
"\"Evennia... | [
13,
0
] | [
30,
36
] | python | en | ['en', 'error', 'th'] | False |
set_webclient_settings | () |
As with set_game_name_and_slogan above, this sets global variables pertaining
to webclient settings.
Notes:
Used for unit testing.
|
As with set_game_name_and_slogan above, this sets global variables pertaining
to webclient settings. | def set_webclient_settings():
"""
As with set_game_name_and_slogan above, this sets global variables pertaining
to webclient settings.
Notes:
Used for unit testing.
"""
global WEBCLIENT_ENABLED, WEBSOCKET_CLIENT_ENABLED, WEBSOCKET_PORT, WEBSOCKET_URL
WEBCLIENT_ENABLED = settings.WEB... | [
"def",
"set_webclient_settings",
"(",
")",
":",
"global",
"WEBCLIENT_ENABLED",
",",
"WEBSOCKET_CLIENT_ENABLED",
",",
"WEBSOCKET_PORT",
",",
"WEBSOCKET_URL",
"WEBCLIENT_ENABLED",
"=",
"settings",
".",
"WEBCLIENT_ENABLED",
"WEBSOCKET_CLIENT_ENABLED",
"=",
"settings",
".",
"... | [
44,
0
] | [
60,
49
] | python | en | ['en', 'error', 'th'] | False |
general_context | (request) |
Returns common Evennia-related context stuff, which
is automatically added to context of all views.
|
Returns common Evennia-related context stuff, which
is automatically added to context of all views.
| def general_context(request):
"""
Returns common Evennia-related context stuff, which
is automatically added to context of all views.
"""
return {
'game_name': GAME_NAME,
'game_slogan': GAME_SLOGAN,
'evennia_userapps': ACCOUNT_RELATED,
'evennia_entityapps': GAME_ENTIT... | [
"def",
"general_context",
"(",
"request",
")",
":",
"return",
"{",
"'game_name'",
":",
"GAME_NAME",
",",
"'game_slogan'",
":",
"GAME_SLOGAN",
",",
"'evennia_userapps'",
":",
"ACCOUNT_RELATED",
",",
"'evennia_entityapps'",
":",
"GAME_ENTITIES",
",",
"'evennia_setupapps... | [
64,
0
] | [
81,
5
] | python | en | ['en', 'error', 'th'] | False |
mxp_parse | (text) |
Replaces links to the correct format for MXP.
Args:
text (str): The text to parse.
Returns:
parsed (str): The parsed text.
|
Replaces links to the correct format for MXP. | def mxp_parse(text):
"""
Replaces links to the correct format for MXP.
Args:
text (str): The text to parse.
Returns:
parsed (str): The parsed text.
"""
text = text.replace("&", "&") \
.replace("<", "<") \
.replace(">", ">")
text = L... | [
"def",
"mxp_parse",
"(",
"text",
")",
":",
"text",
"=",
"text",
".",
"replace",
"(",
"\"&\"",
",",
"\"&\"",
")",
".",
"replace",
"(",
"\"<\"",
",",
"\"<\"",
")",
".",
"replace",
"(",
"\">\"",
",",
"\">\"",
")",
"text",
"=",
"LINKS_SUB",
"."... | [
29,
0
] | [
45,
15
] | python | en | ['en', 'error', 'th'] | False |
Mxp.__init__ | (self, protocol) |
Initializes the protocol by checking if the client supports it.
Args:
protocol (Protocol): The active protocol instance.
|
Initializes the protocol by checking if the client supports it. | def __init__(self, protocol):
"""
Initializes the protocol by checking if the client supports it.
Args:
protocol (Protocol): The active protocol instance.
"""
self.protocol = protocol
self.protocol.protocol_flags["MXP"] = False
self.protocol.will(MXP... | [
"def",
"__init__",
"(",
"self",
",",
"protocol",
")",
":",
"self",
".",
"protocol",
"=",
"protocol",
"self",
".",
"protocol",
".",
"protocol_flags",
"[",
"\"MXP\"",
"]",
"=",
"False",
"self",
".",
"protocol",
".",
"will",
"(",
"MXP",
")",
".",
"addCall... | [
54,
4
] | [
64,
70
] | python | en | ['en', 'error', 'th'] | False |
Mxp.no_mxp | (self, option) |
Called when the Client reports to not support MXP.
Args:
option (Option): Not used.
|
Called when the Client reports to not support MXP. | def no_mxp(self, option):
"""
Called when the Client reports to not support MXP.
Args:
option (Option): Not used.
"""
self.protocol.protocol_flags["MXP"] = False
self.protocol.handshake_done() | [
"def",
"no_mxp",
"(",
"self",
",",
"option",
")",
":",
"self",
".",
"protocol",
".",
"protocol_flags",
"[",
"\"MXP\"",
"]",
"=",
"False",
"self",
".",
"protocol",
".",
"handshake_done",
"(",
")"
] | [
66,
4
] | [
75,
38
] | python | en | ['en', 'error', 'th'] | False |
Mxp.do_mxp | (self, option) |
Called when the Client reports to support MXP.
Args:
option (Option): Not used.
|
Called when the Client reports to support MXP. | def do_mxp(self, option):
"""
Called when the Client reports to support MXP.
Args:
option (Option): Not used.
"""
self.protocol.protocol_flags["MXP"] = True
self.protocol.requestNegotiation(MXP, '')
self.protocol.handshake_done() | [
"def",
"do_mxp",
"(",
"self",
",",
"option",
")",
":",
"self",
".",
"protocol",
".",
"protocol_flags",
"[",
"\"MXP\"",
"]",
"=",
"True",
"self",
".",
"protocol",
".",
"requestNegotiation",
"(",
"MXP",
",",
"''",
")",
"self",
".",
"protocol",
".",
"hand... | [
77,
4
] | [
87,
38
] | python | en | ['en', 'error', 'th'] | False |
Domain.column | (self) |
If there is a layout grid, use the domain for this column in
the grid for this indicator trace .
The 'column' property is a integer and may be specified as:
- An int (or float that will be cast to an int)
in the interval [0, 9223372036854775807]
Returns
... |
If there is a layout grid, use the domain for this column in
the grid for this indicator trace .
The 'column' property is a integer and may be specified as:
- An int (or float that will be cast to an int)
in the interval [0, 9223372036854775807] | def column(self):
"""
If there is a layout grid, use the domain for this column in
the grid for this indicator trace .
The 'column' property is a integer and may be specified as:
- An int (or float that will be cast to an int)
in the interval [0, 92233720368547... | [
"def",
"column",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"column\"",
"]"
] | [
15,
4
] | [
28,
29
] | python | en | ['en', 'error', 'th'] | False |
Domain.row | (self) |
If there is a layout grid, use the domain for this row in the
grid for this indicator trace .
The 'row' property is a integer and may be specified as:
- An int (or float that will be cast to an int)
in the interval [0, 9223372036854775807]
Returns
---... |
If there is a layout grid, use the domain for this row in the
grid for this indicator trace .
The 'row' property is a integer and may be specified as:
- An int (or float that will be cast to an int)
in the interval [0, 9223372036854775807] | def row(self):
"""
If there is a layout grid, use the domain for this row in the
grid for this indicator trace .
The 'row' property is a integer and may be specified as:
- An int (or float that will be cast to an int)
in the interval [0, 9223372036854775807]
... | [
"def",
"row",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"row\"",
"]"
] | [
37,
4
] | [
50,
26
] | python | en | ['en', 'error', 'th'] | False |
Domain.x | (self) |
Sets the horizontal domain of this indicator trace (in plot
fraction).
The 'x' property is an info array that may be specified as:
* a list or tuple of 2 elements where:
(0) The 'x[0]' property is a number and may be specified as:
- An int or float in the interva... |
Sets the horizontal domain of this indicator trace (in plot
fraction).
The 'x' property is an info array that may be specified as:
* a list or tuple of 2 elements where:
(0) The 'x[0]' property is a number and may be specified as:
- An int or float in the interva... | def x(self):
"""
Sets the horizontal domain of this indicator trace (in plot
fraction).
The 'x' property is an info array that may be specified as:
* a list or tuple of 2 elements where:
(0) The 'x[0]' property is a number and may be specified as:
- An int... | [
"def",
"x",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"x\"",
"]"
] | [
59,
4
] | [
76,
24
] | python | en | ['en', 'error', 'th'] | False |
Domain.y | (self) |
Sets the vertical domain of this indicator trace (in plot
fraction).
The 'y' property is an info array that may be specified as:
* a list or tuple of 2 elements where:
(0) The 'y[0]' property is a number and may be specified as:
- An int or float in the interval ... |
Sets the vertical domain of this indicator trace (in plot
fraction).
The 'y' property is an info array that may be specified as:
* a list or tuple of 2 elements where:
(0) The 'y[0]' property is a number and may be specified as:
- An int or float in the interval ... | def y(self):
"""
Sets the vertical domain of this indicator trace (in plot
fraction).
The 'y' property is an info array that may be specified as:
* a list or tuple of 2 elements where:
(0) The 'y[0]' property is a number and may be specified as:
- An int o... | [
"def",
"y",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"y\"",
"]"
] | [
85,
4
] | [
102,
24
] | python | en | ['en', 'error', 'th'] | False |
Domain.__init__ | (self, arg=None, column=None, row=None, x=None, y=None, **kwargs) |
Construct a new Domain object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.indicator.Domain`
column
If there is a layout grid, use the domain for... |
Construct a new Domain object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.indicator.Domain`
column
If there is a layout grid, use the domain for... | def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs):
"""
Construct a new Domain object
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.... | [
"def",
"__init__",
"(",
"self",
",",
"arg",
"=",
"None",
",",
"column",
"=",
"None",
",",
"row",
"=",
"None",
",",
"x",
"=",
"None",
",",
"y",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"super",
"(",
"Domain",
",",
"self",
")",
".",
"__i... | [
127,
4
] | [
206,
34
] | python | en | ['en', 'error', 'th'] | False |
precook | (s, n=4, out=False) | Takes a string as input and returns an object that can be given to
either cook_refs or cook_test. This is optional: cook_refs and cook_test
can take string arguments as well. | Takes a string as input and returns an object that can be given to
either cook_refs or cook_test. This is optional: cook_refs and cook_test
can take string arguments as well. | def precook(s, n=4, out=False):
"""Takes a string as input and returns an object that can be given to
either cook_refs or cook_test. This is optional: cook_refs and cook_test
can take string arguments as well."""
words = s.split()
counts = defaultdict(int)
for k in range(1, n + 1):
for i... | [
"def",
"precook",
"(",
"s",
",",
"n",
"=",
"4",
",",
"out",
"=",
"False",
")",
":",
"words",
"=",
"s",
".",
"split",
"(",
")",
"counts",
"=",
"defaultdict",
"(",
"int",
")",
"for",
"k",
"in",
"range",
"(",
"1",
",",
"n",
"+",
"1",
")",
":",... | [
23,
0
] | [
33,
31
] | python | en | ['en', 'en', 'en'] | True |
cook_refs | (refs, eff=None, n=4) | Takes a list of reference sentences for a single segment
and returns an object that encapsulates everything that BLEU
needs to know about them. | Takes a list of reference sentences for a single segment
and returns an object that encapsulates everything that BLEU
needs to know about them. | def cook_refs(refs, eff=None, n=4): ## lhuang: oracle will call with "average"
"""Takes a list of reference sentences for a single segment
and returns an object that encapsulates everything that BLEU
needs to know about them."""
reflen = []
maxcounts = {}
for ref in refs:
rl, counts = ... | [
"def",
"cook_refs",
"(",
"refs",
",",
"eff",
"=",
"None",
",",
"n",
"=",
"4",
")",
":",
"## lhuang: oracle will call with \"average\"",
"reflen",
"=",
"[",
"]",
"maxcounts",
"=",
"{",
"}",
"for",
"ref",
"in",
"refs",
":",
"rl",
",",
"counts",
"=",
"pre... | [
36,
0
] | [
59,
30
] | python | en | ['en', 'en', 'en'] | True |
cook_test | (test, xxx_todo_changeme, eff=None, n=4) | Takes a test sentence and returns an object that
encapsulates everything that BLEU needs to know about it. | Takes a test sentence and returns an object that
encapsulates everything that BLEU needs to know about it. | def cook_test(test, xxx_todo_changeme, eff=None, n=4):
"""Takes a test sentence and returns an object that
encapsulates everything that BLEU needs to know about it."""
(reflen, refmaxcounts) = xxx_todo_changeme
testlen, counts = precook(test, n, True)
result = {}
# Calculate effective referenc... | [
"def",
"cook_test",
"(",
"test",
",",
"xxx_todo_changeme",
",",
"eff",
"=",
"None",
",",
"n",
"=",
"4",
")",
":",
"(",
"reflen",
",",
"refmaxcounts",
")",
"=",
"xxx_todo_changeme",
"testlen",
",",
"counts",
"=",
"precook",
"(",
"test",
",",
"n",
",",
... | [
62,
0
] | [
85,
17
] | 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.