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
Outsidetextfont.color
(self)
The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: ...
The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: ...
def color(self): """ The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A name...
[ "def", "color", "(", "self", ")", ":", "return", "self", "[", "\"color\"", "]" ]
[ 15, 4 ]
[ 64, 28 ]
python
en
['en', 'error', 'th']
False
Outsidetextfont.colorsrc
(self)
Sets the source reference on Chart Studio Cloud for color . The 'colorsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for color . The 'colorsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def colorsrc(self): """ Sets the source reference on Chart Studio Cloud for color . The 'colorsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["colorsrc"]
[ "def", "colorsrc", "(", "self", ")", ":", "return", "self", "[", "\"colorsrc\"", "]" ]
[ 73, 4 ]
[ 84, 31 ]
python
en
['en', 'error', 'th']
False
Outsidetextfont.family
(self)
HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts ...
HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts ...
def family(self): """ HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the prefer...
[ "def", "family", "(", "self", ")", ":", "return", "self", "[", "\"family\"", "]" ]
[ 93, 4 ]
[ 116, 29 ]
python
en
['en', 'error', 'th']
False
Outsidetextfont.familysrc
(self)
Sets the source reference on Chart Studio Cloud for family . The 'familysrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for family . The 'familysrc' property must be specified as a string or as a plotly.grid_objs.Column object
def familysrc(self): """ Sets the source reference on Chart Studio Cloud for family . The 'familysrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["familysrc"]
[ "def", "familysrc", "(", "self", ")", ":", "return", "self", "[", "\"familysrc\"", "]" ]
[ 125, 4 ]
[ 136, 32 ]
python
en
['en', 'error', 'th']
False
Outsidetextfont.size
(self)
The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] - A tuple, list, or one-dimensional numpy array of the above Returns ------- int|float|numpy.ndarray
The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] - A tuple, list, or one-dimensional numpy array of the above
def size(self): """ The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] - A tuple, list, or one-dimensional numpy array of the above Returns ------- int|float|numpy.ndarray """ return self["size"...
[ "def", "size", "(", "self", ")", ":", "return", "self", "[", "\"size\"", "]" ]
[ 145, 4 ]
[ 155, 27 ]
python
en
['en', 'error', 'th']
False
Outsidetextfont.sizesrc
(self)
Sets the source reference on Chart Studio Cloud for size . The 'sizesrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for size . The 'sizesrc' property must be specified as a string or as a plotly.grid_objs.Column object
def sizesrc(self): """ Sets the source reference on Chart Studio Cloud for size . The 'sizesrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["sizesrc"]
[ "def", "sizesrc", "(", "self", ")", ":", "return", "self", "[", "\"sizesrc\"", "]" ]
[ 164, 4 ]
[ 175, 30 ]
python
en
['en', 'error', 'th']
False
Outsidetextfont.__init__
( self, arg=None, color=None, colorsrc=None, family=None, familysrc=None, size=None, sizesrc=None, **kwargs )
Construct a new Outsidetextfont object Sets the font used for `text` lying outside the bar. Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.waterfall.Outsidete...
Construct a new Outsidetextfont object Sets the font used for `text` lying outside the bar.
def __init__( self, arg=None, color=None, colorsrc=None, family=None, familysrc=None, size=None, sizesrc=None, **kwargs ): """ Construct a new Outsidetextfont object Sets the font used for `text` lying outside t...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "color", "=", "None", ",", "colorsrc", "=", "None", ",", "family", "=", "None", ",", "familysrc", "=", "None", ",", "size", "=", "None", ",", "sizesrc", "=", "None", ",", "*", "*", "kw...
[ 215, 4 ]
[ 329, 34 ]
python
en
['en', 'error', 'th']
False
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.scatterternary .unselected.Marker` color Sets the marker color of unse...
Construct a new Marker object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scatterternary .unselected.Marker` color Sets the marker color of unse...
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.scatterternary...
[ "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
Unselected.marker
(self)
The 'marker' property is an instance of Marker that may be specified as: - An instance of :class:`plotly.graph_objs.box.unselected.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.unselected.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.unselected.Marker` - A dict of string/value properties that will be passed to the Marker constructor Supp...
[ "def", "marker", "(", "self", ")", ":", "return", "self", "[", "\"marker\"", "]" ]
[ 15, 4 ]
[ 39, 29 ]
python
en
['en', 'error', 'th']
False
Unselected.__init__
(self, arg=None, marker=None, **kwargs)
Construct a new Unselected object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.box.Unselected` marker :class:`plotly.graph_objects.box.unselected...
Construct a new Unselected object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.box.Unselected` marker :class:`plotly.graph_objects.box.unselected...
def __init__(self, arg=None, marker=None, **kwargs): """ Construct a new Unselected object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.box.Unselected` ...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "marker", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Unselected", ",", "self", ")", ".", "__init__", "(", "\"unselected\"", ")", "if", "\"_parent\"", "in", "kwargs", ":...
[ 55, 4 ]
[ 113, 34 ]
python
en
['en', 'error', 'th']
False
test_new_node_catchup_update_projection
(looper, nodeSet, tconf, tdir, sdk_pool_handle, sdk_wallet_trustee, allPluginsPath, some_transaction...
A node which receives txns from catchup updates both ledger and projection 4 nodes start up and some txns happen, after txns are done, new node joins and starts catching up, the node should not process requests while catchup is in progress. Make sure the new requests are coming from the new NYMs ad...
A node which receives txns from catchup updates both ledger and projection 4 nodes start up and some txns happen, after txns are done, new node joins and starts catching up, the node should not process requests while catchup is in progress. Make sure the new requests are coming from the new NYMs ad...
def test_new_node_catchup_update_projection(looper, nodeSet, tconf, tdir, sdk_pool_handle, sdk_wallet_trustee, allPluginsPath, ...
[ "def", "test_new_node_catchup_update_projection", "(", "looper", ",", "nodeSet", ",", "tconf", ",", "tdir", ",", "sdk_pool_handle", ",", "sdk_wallet_trustee", ",", "allPluginsPath", ",", "some_transactions_done", ")", ":", "# Create a new node and stop it.", "new_steward_wa...
[ 13, 0 ]
[ 135, 24 ]
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.scatter.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.scatter.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.scatter.hoverlabel.Font` - A dict of string/value properties that will be passed to...
[ "def", "font", "(", "self", ")", ":", "return", "self", "[", "\"font\"", "]" ]
[ 230, 4 ]
[ 277, 27 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.namelength
(self)
Sets the default length (in number of characters) of the trace name in the hover labels for all traces. -1 shows the whole name regardless of length. 0-3 shows the first 0-3 characters, and an integer >3 will show the whole name if it is less than that many characters, but if it...
Sets the default length (in number of characters) of the trace name in the hover labels for all traces. -1 shows the whole name regardless of length. 0-3 shows the first 0-3 characters, and an integer >3 will show the whole name if it is less than that many characters, but if it...
def namelength(self): """ Sets the default length (in number of characters) of the trace name in the hover labels for all traces. -1 shows the whole name regardless of length. 0-3 shows the first 0-3 characters, and an integer >3 will show the whole name if it is less than ...
[ "def", "namelength", "(", "self", ")", ":", "return", "self", "[", "\"namelength\"", "]" ]
[ 286, 4 ]
[ 304, 33 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.namelengthsrc
(self)
Sets the source reference on Chart Studio Cloud for namelength . The 'namelengthsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for namelength . The 'namelengthsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def namelengthsrc(self): """ Sets the source reference on Chart Studio Cloud for namelength . The 'namelengthsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["name...
[ "def", "namelengthsrc", "(", "self", ")", ":", "return", "self", "[", "\"namelengthsrc\"", "]" ]
[ 313, 4 ]
[ 325, 36 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.__init__
( self, arg=None, align=None, alignsrc=None, bgcolor=None, bgcolorsrc=None, bordercolor=None, bordercolorsrc=None, font=None, namelength=None, namelengthsrc=None, **kwargs )
Construct a new Hoverlabel object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scatter.Hoverlabel` align Sets the horizontal alignment of the tex...
Construct a new Hoverlabel object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scatter.Hoverlabel` align Sets the horizontal alignment of the tex...
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
Selected.marker
(self)
The 'marker' property is an instance of Marker that may be specified as: - An instance of :class:`plotly.graph_objs.scattergl.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.scattergl.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.scattergl.selected.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
Selected.textfont
(self)
The 'textfont' property is an instance of Textfont that may be specified as: - An instance of :class:`plotly.graph_objs.scattergl.selected.Textfont` - A dict of string/value properties that will be passed to the Textfont constructor Supported dict proper...
The 'textfont' property is an instance of Textfont that may be specified as: - An instance of :class:`plotly.graph_objs.scattergl.selected.Textfont` - A dict of string/value properties that will be passed to the Textfont constructor Supported dict proper...
def textfont(self): """ The 'textfont' property is an instance of Textfont that may be specified as: - An instance of :class:`plotly.graph_objs.scattergl.selected.Textfont` - A dict of string/value properties that will be passed to the Textfont constructor ...
[ "def", "textfont", "(", "self", ")", ":", "return", "self", "[", "\"textfont\"", "]" ]
[ 45, 4 ]
[ 62, 31 ]
python
en
['en', 'error', 'th']
False
Selected.__init__
(self, arg=None, marker=None, textfont=None, **kwargs)
Construct a new Selected object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scattergl.Selected` marker :class:`plotly.graph_objects.scattergl.se...
Construct a new Selected object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scattergl.Selected` marker :class:`plotly.graph_objects.scattergl.se...
def __init__(self, arg=None, marker=None, textfont=None, **kwargs): """ Construct a new Selected object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scattergl...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "marker", "=", "None", ",", "textfont", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Selected", ",", "self", ")", ".", "__init__", "(", "\"selected\"", ")", "if", "\"_p...
[ 81, 4 ]
[ 146, 34 ]
python
en
['en', 'error', 'th']
False
build_task
(task_directory: str)
Build the task with npm.
Build the task with npm.
def build_task(task_directory: str): """ Build the task with npm. """ # Paths frontend_source_dir = os.path.join(task_directory, "webapp") frontend_build_dir = os.path.join(frontend_source_dir, "build") return_dir = os.getcwd() # Build the task os.chdir(frontend_source_dir) if ...
[ "def", "build_task", "(", "task_directory", ":", "str", ")", ":", "# Paths", "frontend_source_dir", "=", "os", ".", "path", ".", "join", "(", "task_directory", ",", "\"webapp\"", ")", "frontend_build_dir", "=", "os", ".", "path", ".", "join", "(", "frontend_...
[ 14, 0 ]
[ 40, 24 ]
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 parcats 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 parcats 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 parcats 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, 9223372036854775...
[ "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 parcats 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 parcats 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 parcats 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 parcats 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 interval ...
Sets the horizontal domain of this parcats 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 interval ...
def x(self): """ Sets the horizontal domain of this parcats 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 o...
[ "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 parcats 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 [0...
Sets the vertical domain of this parcats 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 [0...
def y(self): """ Sets the vertical domain of this parcats 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 ...
[ "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.parcats.Domain` column If there is a layout grid, use the domain for t...
Construct a new Domain object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.parcats.Domain` column If there is a layout grid, use the domain for t...
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
TestCredentialAck.test_init
(self)
Test initializer
Test initializer
def test_init(self): """Test initializer""" credential_ack = CredentialAck()
[ "def", "test_init", "(", "self", ")", ":", "credential_ack", "=", "CredentialAck", "(", ")" ]
[ 9, 4 ]
[ 11, 40 ]
python
de
['de', 'pl', 'en']
False
TestCredentialAck.test_deserialize
(self, mock_credential_ack_schema_load)
Test deserialize
Test deserialize
def test_deserialize(self, mock_credential_ack_schema_load): """ Test deserialize """ obj = CredentialAck() credential_ack = CredentialAck.deserialize(obj) mock_credential_ack_schema_load.assert_called_once_with(obj) assert credential_ack is mock_credential_ack_...
[ "def", "test_deserialize", "(", "self", ",", "mock_credential_ack_schema_load", ")", ":", "obj", "=", "CredentialAck", "(", ")", "credential_ack", "=", "CredentialAck", ".", "deserialize", "(", "obj", ")", "mock_credential_ack_schema_load", ".", "assert_called_once_with...
[ 20, 4 ]
[ 29, 77 ]
python
en
['en', 'error', 'th']
False
TestCredentialAck.test_serialize
(self, mock_credential_ack_schema_dump)
Test serialization.
Test serialization.
def test_serialize(self, mock_credential_ack_schema_dump): """ Test serialization. """ obj = CredentialAck() credential_ack_dict = obj.serialize() mock_credential_ack_schema_dump.assert_called_once_with(obj) assert credential_ack_dict is mock_credential_ack_sche...
[ "def", "test_serialize", "(", "self", ",", "mock_credential_ack_schema_dump", ")", ":", "obj", "=", "CredentialAck", "(", ")", "credential_ack_dict", "=", "obj", ".", "serialize", "(", ")", "mock_credential_ack_schema_dump", ".", "assert_called_once_with", "(", "obj",...
[ 32, 4 ]
[ 41, 82 ]
python
en
['en', 'error', 'th']
False
TestCredentialAckSchema.test_make_model
(self)
Test making model.
Test making model.
def test_make_model(self): """Test making model.""" data = self.credential_ack.serialize() model_instance = CredentialAck.deserialize(data) assert isinstance(model_instance, CredentialAck)
[ "def", "test_make_model", "(", "self", ")", ":", "data", "=", "self", ".", "credential_ack", ".", "serialize", "(", ")", "model_instance", "=", "CredentialAck", ".", "deserialize", "(", "data", ")", "assert", "isinstance", "(", "model_instance", ",", "Credenti...
[ 49, 4 ]
[ 53, 56 ]
python
en
['en', 'no', 'en']
True
test_revert_uncommitted_state
(write_manager, db_manager, constraint_serializer, prepare_request, fake_ordering_service, tmpdir_factory)
Check, that request exist in uncommitted state
Check, that request exist in uncommitted state
def test_revert_uncommitted_state(write_manager, db_manager, constraint_serializer, prepare_request, fake_ordering_service, tmpdir_factory): actio...
[ "def", "test_revert_uncommitted_state", "(", "write_manager", ",", "db_manager", ",", "constraint_serializer", ",", "prepare_request", ",", "fake_ordering_service", ",", "tmpdir_factory", ")", ":", "action", ",", "constraint", ",", "request", "=", "prepare_request", "re...
[ 25, 0 ]
[ 55, 29 ]
python
en
['en', 'error', 'th']
False
Diagonal.visible
(self)
Determines whether or not subplots on the diagonal are displayed. The 'visible' property must be specified as a bool (either True, or False) Returns ------- bool
Determines whether or not subplots on the diagonal are displayed. The 'visible' property must be specified as a bool (either True, or False)
def visible(self): """ Determines whether or not subplots on the diagonal are displayed. The 'visible' property must be specified as a bool (either True, or False) Returns ------- bool """ return self["visible"]
[ "def", "visible", "(", "self", ")", ":", "return", "self", "[", "\"visible\"", "]" ]
[ 15, 4 ]
[ 27, 30 ]
python
en
['en', 'error', 'th']
False
Diagonal.__init__
(self, arg=None, visible=None, **kwargs)
Construct a new Diagonal object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.splom.Diagonal` visible Determines whether or not subplots on the di...
Construct a new Diagonal object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.splom.Diagonal` visible Determines whether or not subplots on the di...
def __init__(self, arg=None, visible=None, **kwargs): """ Construct a new Diagonal object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.splom.Diagonal` ...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "visible", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Diagonal", ",", "self", ")", ".", "__init__", "(", "\"diagonal\"", ")", "if", "\"_parent\"", "in", "kwargs", ":", ...
[ 43, 4 ]
[ 101, 34 ]
python
en
['en', 'error', 'th']
False
get_credentials
()
Returns the credentials that will be sent to plotly.
Returns the credentials that will be sent to plotly.
def get_credentials(): """Returns the credentials that will be sent to plotly.""" credentials = tools.get_credentials_file() session_credentials = session.get_session_credentials() for credentials_key in credentials: # checking for not false, but truthy value here is the desired behavior ...
[ "def", "get_credentials", "(", ")", ":", "credentials", "=", "tools", ".", "get_credentials_file", "(", ")", "session_credentials", "=", "session", ".", "get_session_credentials", "(", ")", "for", "credentials_key", "in", "credentials", ":", "# checking for not false,...
[ 11, 0 ]
[ 21, 22 ]
python
en
['en', 'en', 'en']
True
get_config
()
Returns either module config or file config.
Returns either module config or file config.
def get_config(): """Returns either module config or file config.""" config = tools.get_config_file() session_config = session.get_session_config() for config_key in config: # checking for not false, but truthy value here is the desired behavior session_value = session_config.get(config...
[ "def", "get_config", "(", ")", ":", "config", "=", "tools", ".", "get_config_file", "(", ")", "session_config", "=", "session", ".", "get_session_config", "(", ")", "for", "config_key", "in", "config", ":", "# checking for not false, but truthy value here is the desir...
[ 24, 0 ]
[ 34, 17 ]
python
en
['en', 'en', 'en']
True
create
(body)
Generate an image (which does not get saved on Plotly). :param (dict) body: A mapping of body param names to values. :returns: (requests.Response) Returns response directly from requests.
Generate an image (which does not get saved on Plotly).
def create(body): """ Generate an image (which does not get saved on Plotly). :param (dict) body: A mapping of body param names to values. :returns: (requests.Response) Returns response directly from requests. """ url = build_url(RESOURCE) return request("post", url, json=body)
[ "def", "create", "(", "body", ")", ":", "url", "=", "build_url", "(", "RESOURCE", ")", "return", "request", "(", "\"post\"", ",", "url", ",", "json", "=", "body", ")" ]
[ 8, 0 ]
[ 17, 42 ]
python
en
['en', 'error', 'th']
False
_file_names_compact
(filepath1, filepath2)
Compact the output of filenames with same base dir
Compact the output of filenames with same base dir
def _file_names_compact(filepath1, filepath2): "Compact the output of filenames with same base dir" dirname1 = os.path.dirname(filepath1) dirname2 = os.path.dirname(filepath2) if dirname1 == dirname2: name2 = os.path.basename(filepath2) return "{} and {}".format(filepath1, name2) els...
[ "def", "_file_names_compact", "(", "filepath1", ",", "filepath2", ")", ":", "dirname1", "=", "os", ".", "path", ".", "dirname", "(", "filepath1", ")", "dirname2", "=", "os", ".", "path", ".", "dirname", "(", "filepath2", ")", "if", "dirname1", "==", "dir...
[ 505, 0 ]
[ 513, 56 ]
python
en
['en', 'en', 'en']
True
_print_info
(portal_info_dict, server_info_dict)
Format info dicts from the Portal/Server for display
Format info dicts from the Portal/Server for display
def _print_info(portal_info_dict, server_info_dict): """ Format info dicts from the Portal/Server for display """ ind = " " * 8 def _prepare_dict(dct): out = {} for key, value in dct.iteritems(): if isinstance(value, list): value = "\n{}".format(ind).joi...
[ "def", "_print_info", "(", "portal_info_dict", ",", "server_info_dict", ")", ":", "ind", "=", "\" \"", "*", "8", "def", "_prepare_dict", "(", "dct", ")", ":", "out", "=", "{", "}", "for", "key", ",", "value", "in", "dct", ".", "iteritems", "(", ")", ...
[ 516, 0 ]
[ 547, 51 ]
python
en
['en', 'error', 'th']
False
_parse_status
(response)
Unpack the status information
Unpack the status information
def _parse_status(response): "Unpack the status information" return pickle.loads(response['status'])
[ "def", "_parse_status", "(", "response", ")", ":", "return", "pickle", ".", "loads", "(", "response", "[", "'status'", "]", ")" ]
[ 550, 0 ]
[ 552, 43 ]
python
en
['en', 'la', 'en']
True
_get_twistd_cmdline
(pprofiler, sprofiler)
Compile the command line for starting a Twisted application using the 'twistd' executable.
Compile the command line for starting a Twisted application using the 'twistd' executable.
def _get_twistd_cmdline(pprofiler, sprofiler): """ Compile the command line for starting a Twisted application using the 'twistd' executable. """ portal_cmd = [TWISTED_BINARY, "--python={}".format(PORTAL_PY_FILE)] server_cmd = [TWISTED_BINARY, "--python={}".forma...
[ "def", "_get_twistd_cmdline", "(", "pprofiler", ",", "sprofiler", ")", ":", "portal_cmd", "=", "[", "TWISTED_BINARY", ",", "\"--python={}\"", ".", "format", "(", "PORTAL_PY_FILE", ")", "]", "server_cmd", "=", "[", "TWISTED_BINARY", ",", "\"--python={}\"", ".", "...
[ 555, 0 ]
[ 579, 33 ]
python
en
['en', 'error', 'th']
False
send_instruction
(operation, arguments, callback=None, errback=None)
Send instruction and handle the response.
Send instruction and handle the response.
def send_instruction(operation, arguments, callback=None, errback=None): """ Send instruction and handle the response. """ global AMP_CONNECTION, REACTOR_RUN if None in (AMP_HOST, AMP_PORT, AMP_INTERFACE): print(ERROR_AMP_UNCONFIGURED) sys.exit() def _callback(result): ...
[ "def", "send_instruction", "(", "operation", ",", "arguments", ",", "callback", "=", "None", ",", "errback", "=", "None", ")", ":", "global", "AMP_CONNECTION", ",", "REACTOR_RUN", "if", "None", "in", "(", "AMP_HOST", ",", "AMP_PORT", ",", "AMP_INTERFACE", ")...
[ 649, 0 ]
[ 700, 26 ]
python
en
['en', 'error', 'th']
False
query_status
(callback=None)
Send status ping to portal
Send status ping to portal
def query_status(callback=None): """ Send status ping to portal """ wmap = {True: "RUNNING", False: "NOT RUNNING"} def _callback(response): if callback: callback(response) else: pstatus, sstatus, ppid, spid, pinfo, sinfo = _parse_status(response)...
[ "def", "query_status", "(", "callback", "=", "None", ")", ":", "wmap", "=", "{", "True", ":", "\"RUNNING\"", ",", "False", ":", "\"NOT RUNNING\"", "}", "def", "_callback", "(", "response", ")", ":", "if", "callback", ":", "callback", "(", "response", ")"...
[ 703, 0 ]
[ 728, 56 ]
python
en
['en', 'error', 'th']
False
wait_for_status_reply
(callback)
Wait for an explicit STATUS signal to be sent back from Evennia.
Wait for an explicit STATUS signal to be sent back from Evennia.
def wait_for_status_reply(callback): """ Wait for an explicit STATUS signal to be sent back from Evennia. """ if AMP_CONNECTION: AMP_CONNECTION.wait_for_status(callback) else: print("No Evennia connection established.")
[ "def", "wait_for_status_reply", "(", "callback", ")", ":", "if", "AMP_CONNECTION", ":", "AMP_CONNECTION", ".", "wait_for_status", "(", "callback", ")", "else", ":", "print", "(", "\"No Evennia connection established.\"", ")" ]
[ 731, 0 ]
[ 738, 51 ]
python
en
['en', 'error', 'th']
False
wait_for_status
(portal_running=True, server_running=True, callback=None, errback=None, rate=0.5, retries=20)
Repeat the status ping until the desired state combination is achieved. Args: portal_running (bool or None): Desired portal run-state. If None, any state is accepted. server_running (bool or None): Desired server run-state. If None, any state is accepted. The portal mus...
Repeat the status ping until the desired state combination is achieved.
def wait_for_status(portal_running=True, server_running=True, callback=None, errback=None, rate=0.5, retries=20): """ Repeat the status ping until the desired state combination is achieved. Args: portal_running (bool or None): Desired portal run-state. If None, any state ...
[ "def", "wait_for_status", "(", "portal_running", "=", "True", ",", "server_running", "=", "True", ",", "callback", "=", "None", ",", "errback", "=", "None", ",", "rate", "=", "0.5", ",", "retries", "=", "20", ")", ":", "def", "_callback", "(", "response"...
[ 741, 0 ]
[ 801, 63 ]
python
en
['en', 'error', 'th']
False
start_evennia
(pprofiler=False, sprofiler=False)
This will start Evennia anew by launching the Evennia Portal (which in turn will start the Server)
This will start Evennia anew by launching the Evennia Portal (which in turn will start the Server)
def start_evennia(pprofiler=False, sprofiler=False): """ This will start Evennia anew by launching the Evennia Portal (which in turn will start the Server) """ portal_cmd, server_cmd = _get_twistd_cmdline(pprofiler, sprofiler) def _fail(fail): print(fail) _reactor_stop() d...
[ "def", "start_evennia", "(", "pprofiler", "=", "False", ",", "sprofiler", "=", "False", ")", ":", "portal_cmd", ",", "server_cmd", "=", "_get_twistd_cmdline", "(", "pprofiler", ",", "sprofiler", ")", "def", "_fail", "(", "fail", ")", ":", "print", "(", "fa...
[ 810, 0 ]
[ 860, 73 ]
python
en
['en', 'error', 'th']
False
reload_evennia
(sprofiler=False, reset=False)
This will instruct the Portal to reboot the Server component. We do this manually by telling the server to shutdown (in reload mode) and wait for the portal to report back, at which point we start the server again. This way we control the process exactly.
This will instruct the Portal to reboot the Server component. We do this manually by telling the server to shutdown (in reload mode) and wait for the portal to report back, at which point we start the server again. This way we control the process exactly.
def reload_evennia(sprofiler=False, reset=False): """ This will instruct the Portal to reboot the Server component. We do this manually by telling the server to shutdown (in reload mode) and wait for the portal to report back, at which point we start the server again. This way we control the process...
[ "def", "reload_evennia", "(", "sprofiler", "=", "False", ",", "reset", "=", "False", ")", ":", "_", ",", "server_cmd", "=", "_get_twistd_cmdline", "(", "False", ",", "sprofiler", ")", "def", "_server_restarted", "(", "*", "args", ")", ":", "print", "(", ...
[ 863, 0 ]
[ 900, 73 ]
python
en
['en', 'error', 'th']
False
stop_evennia
()
This instructs the Portal to stop the Server and then itself.
This instructs the Portal to stop the Server and then itself.
def stop_evennia(): """ This instructs the Portal to stop the Server and then itself. """ def _portal_stopped(*args): print("... Portal stopped.\nEvennia shut down.") _reactor_stop() def _server_stopped(*args): print("... Server stopped.\nStopping Portal ...") send_...
[ "def", "stop_evennia", "(", ")", ":", "def", "_portal_stopped", "(", "*", "args", ")", ":", "print", "(", "\"... Portal stopped.\\nEvennia shut down.\"", ")", "_reactor_stop", "(", ")", "def", "_server_stopped", "(", "*", "args", ")", ":", "print", "(", "\"......
[ 903, 0 ]
[ 932, 73 ]
python
en
['en', 'error', 'th']
False
reboot_evennia
(pprofiler=False, sprofiler=False)
This is essentially an evennia stop && evennia start except we make sure the system has successfully shut down before starting it again. If evennia was not running, start it.
This is essentially an evennia stop && evennia start except we make sure the system has successfully shut down before starting it again.
def reboot_evennia(pprofiler=False, sprofiler=False): """ This is essentially an evennia stop && evennia start except we make sure the system has successfully shut down before starting it again. If evennia was not running, start it. """ global AMP_CONNECTION def _portal_stopped(*args): ...
[ "def", "reboot_evennia", "(", "pprofiler", "=", "False", ",", "sprofiler", "=", "False", ")", ":", "global", "AMP_CONNECTION", "def", "_portal_stopped", "(", "*", "args", ")", ":", "print", "(", "\"... Portal stopped. Evennia shut down. Rebooting ...\"", ")", "globa...
[ 935, 0 ]
[ 971, 73 ]
python
en
['en', 'error', 'th']
False
start_server_interactive
()
Start the Server under control of the launcher process (foreground)
Start the Server under control of the launcher process (foreground)
def start_server_interactive(): """ Start the Server under control of the launcher process (foreground) """ def _iserver(): _, server_twistd_cmd = _get_twistd_cmdline(False, False) server_twistd_cmd.append("--nodaemon") print("Starting Server in interactive mode (stop with Ctrl-...
[ "def", "start_server_interactive", "(", ")", ":", "def", "_iserver", "(", ")", ":", "_", ",", "server_twistd_cmd", "=", "_get_twistd_cmdline", "(", "False", ",", "False", ")", "server_twistd_cmd", ".", "append", "(", "\"--nodaemon\"", ")", "print", "(", "\"Sta...
[ 974, 0 ]
[ 989, 61 ]
python
en
['en', 'error', 'th']
False
start_portal_interactive
()
Start the Portal under control of the launcher process (foreground) Notes: In a normal start, the launcher waits for the Portal to start, then tells it to start the Server. Since we can't do this here, we instead start the Server first and then starts the Portal - the Server will ...
Start the Portal under control of the launcher process (foreground)
def start_portal_interactive(): """ Start the Portal under control of the launcher process (foreground) Notes: In a normal start, the launcher waits for the Portal to start, then tells it to start the Server. Since we can't do this here, we instead start the Server first and then st...
[ "def", "start_portal_interactive", "(", ")", ":", "def", "_iportal", "(", "fail", ")", ":", "portal_twistd_cmd", ",", "server_twistd_cmd", "=", "_get_twistd_cmdline", "(", "False", ",", "False", ")", "portal_twistd_cmd", ".", "append", "(", "\"--nodaemon\"", ")", ...
[ 992, 0 ]
[ 1030, 62 ]
python
en
['en', 'error', 'th']
False
stop_server_only
(when_stopped=None, interactive=False)
Only stop the Server-component of Evennia (this is not useful except for debug) Args: when_stopped (callable): This will be called with no arguments when Server has stopped (or if it had already stopped when this is called). interactive (bool, optional): Set if this is called as pa...
Only stop the Server-component of Evennia (this is not useful except for debug)
def stop_server_only(when_stopped=None, interactive=False): """ Only stop the Server-component of Evennia (this is not useful except for debug) Args: when_stopped (callable): This will be called with no arguments when Server has stopped (or if it had already stopped when this is called)...
[ "def", "stop_server_only", "(", "when_stopped", "=", "None", ",", "interactive", "=", "False", ")", ":", "def", "_server_stopped", "(", "*", "args", ")", ":", "if", "when_stopped", ":", "when_stopped", "(", ")", "else", ":", "print", "(", "\"... Server stopp...
[ 1033, 0 ]
[ 1073, 73 ]
python
en
['en', 'error', 'th']
False
query_info
()
Display the info strings from the running Evennia
Display the info strings from the running Evennia
def query_info(): """ Display the info strings from the running Evennia """ def _got_status(status): _, _, _, _, pinfo, sinfo = _parse_status(status) _print_info(pinfo, sinfo) _reactor_stop() def _portal_running(response): query_status(_got_status) def _portal_...
[ "def", "query_info", "(", ")", ":", "def", "_got_status", "(", "status", ")", ":", "_", ",", "_", ",", "_", ",", "_", ",", "pinfo", ",", "sinfo", "=", "_parse_status", "(", "status", ")", "_print_info", "(", "pinfo", ",", "sinfo", ")", "_reactor_stop...
[ 1076, 0 ]
[ 1092, 73 ]
python
en
['en', 'error', 'th']
False
tail_log_files
(filename1, filename2, start_lines1=20, start_lines2=20, rate=1)
Tail two logfiles interactively, combining their output to stdout When first starting, this will display the tail of the log files. After that it will poll the log files repeatedly and display changes. Args: filename1 (str): Path to first log file. filename2 (str): Path to second log ...
Tail two logfiles interactively, combining their output to stdout
def tail_log_files(filename1, filename2, start_lines1=20, start_lines2=20, rate=1): """ Tail two logfiles interactively, combining their output to stdout When first starting, this will display the tail of the log files. After that it will poll the log files repeatedly and display changes. Args: ...
[ "def", "tail_log_files", "(", "filename1", ",", "filename2", ",", "start_lines1", "=", "20", ",", "start_lines2", "=", "20", ",", "rate", "=", "1", ")", ":", "global", "REACTOR_RUN", "def", "_file_changed", "(", "filename", ",", "prev_size", ")", ":", "\"G...
[ 1095, 0 ]
[ 1193, 22 ]
python
en
['en', 'error', 'th']
False
evennia_version
()
Get the Evennia version info from the main package.
Get the Evennia version info from the main package.
def evennia_version(): """ Get the Evennia version info from the main package. """ version = "Unknown" try: version = evennia.__version__ except ImportError: # even if evennia is not found, we should not crash here. pass try: rev = check_output( "...
[ "def", "evennia_version", "(", ")", ":", "version", "=", "\"Unknown\"", "try", ":", "version", "=", "evennia", ".", "__version__", "except", "ImportError", ":", "# even if evennia is not found, we should not crash here.", "pass", "try", ":", "rev", "=", "check_output"...
[ 1203, 0 ]
[ 1222, 18 ]
python
en
['en', 'error', 'th']
False
check_main_evennia_dependencies
()
Checks and imports the Evennia dependencies. This must be done already before the paths are set up. Returns: not_error (bool): True if no dependency error was found.
Checks and imports the Evennia dependencies. This must be done already before the paths are set up.
def check_main_evennia_dependencies(): """ Checks and imports the Evennia dependencies. This must be done already before the paths are set up. Returns: not_error (bool): True if no dependency error was found. """ error = False # Python pversion = ".".join(str(num) for num in s...
[ "def", "check_main_evennia_dependencies", "(", ")", ":", "error", "=", "False", "# Python", "pversion", "=", "\".\"", ".", "join", "(", "str", "(", "num", ")", "for", "num", "in", "sys", ".", "version_info", "if", "isinstance", "(", "num", ",", "int", ")...
[ 1228, 0 ]
[ 1276, 20 ]
python
en
['en', 'error', 'th']
False
set_gamedir
(path)
Set GAMEDIR based on path, by figuring out where the setting file is inside the directory tree. This allows for running the launcher from elsewhere than the top of the gamedir folder.
Set GAMEDIR based on path, by figuring out where the setting file is inside the directory tree. This allows for running the launcher from elsewhere than the top of the gamedir folder.
def set_gamedir(path): """ Set GAMEDIR based on path, by figuring out where the setting file is inside the directory tree. This allows for running the launcher from elsewhere than the top of the gamedir folder. """ global GAMEDIR Ndepth = 10 settings_path = os.path.join("server", "conf...
[ "def", "set_gamedir", "(", "path", ")", ":", "global", "GAMEDIR", "Ndepth", "=", "10", "settings_path", "=", "os", ".", "path", ".", "join", "(", "\"server\"", ",", "\"conf\"", ",", "\"settings.py\"", ")", "os", ".", "chdir", "(", "GAMEDIR", ")", "for", ...
[ 1279, 0 ]
[ 1299, 14 ]
python
en
['en', 'error', 'th']
False
create_secret_key
()
Randomly create the secret key for the settings file
Randomly create the secret key for the settings file
def create_secret_key(): """ Randomly create the secret key for the settings file """ import random import string secret_key = list((string.letters + string.digits + string.punctuation).replace("\\", "") .replace("'", '"').replace("{", "_").replace("...
[ "def", "create_secret_key", "(", ")", ":", "import", "random", "import", "string", "secret_key", "=", "list", "(", "(", "string", ".", "letters", "+", "string", ".", "digits", "+", "string", ".", "punctuation", ")", ".", "replace", "(", "\"\\\\\"", ",", ...
[ 1302, 0 ]
[ 1314, 21 ]
python
en
['en', 'error', 'th']
False
create_settings_file
(init=True, secret_settings=False)
Uses the template settings file to build a working settings file. Args: init (bool): This is part of the normal evennia --init operation. If false, this function will copy a fresh template file in (asking if it already exists). secret_settings (bool, optional): If Fals...
Uses the template settings file to build a working settings file.
def create_settings_file(init=True, secret_settings=False): """ Uses the template settings file to build a working settings file. Args: init (bool): This is part of the normal evennia --init operation. If false, this function will copy a fresh template file in (asking if it...
[ "def", "create_settings_file", "(", "init", "=", "True", ",", "secret_settings", "=", "False", ")", ":", "if", "secret_settings", ":", "settings_path", "=", "os", ".", "path", ".", "join", "(", "GAMEDIR", ",", "\"server\"", ",", "\"conf\"", ",", "\"secret_se...
[ 1317, 0 ]
[ 1361, 32 ]
python
en
['en', 'error', 'th']
False
create_game_directory
(dirname)
Initialize a new game directory named dirname at the current path. This means copying the template directory from evennia's root. Args: dirname (str): The directory name to create.
Initialize a new game directory named dirname at the current path. This means copying the template directory from evennia's root.
def create_game_directory(dirname): """ Initialize a new game directory named dirname at the current path. This means copying the template directory from evennia's root. Args: dirname (str): The directory name to create. """ global GAMEDIR GAMEDIR = os.path.abspath(os.path.join...
[ "def", "create_game_directory", "(", "dirname", ")", ":", "global", "GAMEDIR", "GAMEDIR", "=", "os", ".", "path", ".", "abspath", "(", "os", ".", "path", ".", "join", "(", "CURRENT_DIR", ",", "dirname", ")", ")", "if", "os", ".", "path", ".", "exists",...
[ 1364, 0 ]
[ 1387, 46 ]
python
en
['en', 'error', 'th']
False
create_superuser
()
Create the superuser account
Create the superuser account
def create_superuser(): """ Create the superuser account """ print( "\nCreate a superuser below. The superuser is Account #1, the 'owner' " "account of the server.\n") django.core.management.call_command("createsuperuser", interactive=True)
[ "def", "create_superuser", "(", ")", ":", "print", "(", "\"\\nCreate a superuser below. The superuser is Account #1, the 'owner' \"", "\"account of the server.\\n\"", ")", "django", ".", "core", ".", "management", ".", "call_command", "(", "\"createsuperuser\"", ",", "interac...
[ 1390, 0 ]
[ 1398, 76 ]
python
en
['en', 'error', 'th']
False
check_database
()
Check so the database exists. Returns: exists (bool): `True` if the database exists, otherwise `False`.
Check so the database exists.
def check_database(): """ Check so the database exists. Returns: exists (bool): `True` if the database exists, otherwise `False`. """ # Check so a database exists and is accessible from django.db import connection tables = connection.introspection.get_table_list(connection.cursor())...
[ "def", "check_database", "(", ")", ":", "# Check so a database exists and is accessible", "from", "django", ".", "db", "import", "connection", "tables", "=", "connection", ".", "introspection", ".", "get_table_list", "(", "connection", ".", "cursor", "(", ")", ")", ...
[ 1401, 0 ]
[ 1456, 15 ]
python
en
['en', 'error', 'th']
False
getenv
()
Get current environment and add PYTHONPATH. Returns: env (dict): Environment global dict.
Get current environment and add PYTHONPATH.
def getenv(): """ Get current environment and add PYTHONPATH. Returns: env (dict): Environment global dict. """ sep = ";" if _is_windows() else ":" env = os.environ.copy() env['PYTHONPATH'] = sep.join(sys.path) return env
[ "def", "getenv", "(", ")", ":", "sep", "=", "\";\"", "if", "_is_windows", "(", ")", "else", "\":\"", "env", "=", "os", ".", "environ", ".", "copy", "(", ")", "env", "[", "'PYTHONPATH'", "]", "=", "sep", ".", "join", "(", "sys", ".", "path", ")", ...
[ 1459, 0 ]
[ 1470, 14 ]
python
en
['en', 'error', 'th']
False
get_pid
(pidfile, default=None)
Get the PID (Process ID) by trying to access an PID file. Args: pidfile (str): The path of the pid file. default (int, optional): What to return if file does not exist. Returns: pid (str): The process id or `default`.
Get the PID (Process ID) by trying to access an PID file.
def get_pid(pidfile, default=None): """ Get the PID (Process ID) by trying to access an PID file. Args: pidfile (str): The path of the pid file. default (int, optional): What to return if file does not exist. Returns: pid (str): The process id or `default`. """ if os.p...
[ "def", "get_pid", "(", "pidfile", ",", "default", "=", "None", ")", ":", "if", "os", ".", "path", ".", "exists", "(", "pidfile", ")", ":", "with", "open", "(", "pidfile", ",", "'r'", ")", "as", "f", ":", "pid", "=", "f", ".", "read", "(", ")", ...
[ 1473, 0 ]
[ 1489, 18 ]
python
en
['en', 'error', 'th']
False
del_pid
(pidfile)
The pidfile should normally be removed after a process has finished, but when sending certain signals they remain, so we need to clean them manually. Args: pidfile (str): The path of the pid file.
The pidfile should normally be removed after a process has finished, but when sending certain signals they remain, so we need to clean them manually.
def del_pid(pidfile): """ The pidfile should normally be removed after a process has finished, but when sending certain signals they remain, so we need to clean them manually. Args: pidfile (str): The path of the pid file. """ if os.path.exists(pidfile): os.remove(pidfile)
[ "def", "del_pid", "(", "pidfile", ")", ":", "if", "os", ".", "path", ".", "exists", "(", "pidfile", ")", ":", "os", ".", "remove", "(", "pidfile", ")" ]
[ 1492, 0 ]
[ 1503, 26 ]
python
en
['en', 'error', 'th']
False
kill
(pidfile, component='Server', callback=None, errback=None, killsignal=SIG)
Send a kill signal to a process based on PID. A customized success/error message will be returned. If clean=True, the system will attempt to manually remove the pid file. On Windows, no arguments are useful since Windows has no ability to direct signals except to all children of a console. Arg...
Send a kill signal to a process based on PID. A customized success/error message will be returned. If clean=True, the system will attempt to manually remove the pid file. On Windows, no arguments are useful since Windows has no ability to direct signals except to all children of a console.
def kill(pidfile, component='Server', callback=None, errback=None, killsignal=SIG): """ Send a kill signal to a process based on PID. A customized success/error message will be returned. If clean=True, the system will attempt to manually remove the pid file. On Windows, no arguments are useful since...
[ "def", "kill", "(", "pidfile", ",", "component", "=", "'Server'", ",", "callback", "=", "None", ",", "errback", "=", "None", ",", "killsignal", "=", "SIG", ")", ":", "if", "_is_windows", "(", ")", ":", "# Windows signal sending is very limited.", "from", "wi...
[ 1506, 0 ]
[ 1564, 74 ]
python
en
['en', 'error', 'th']
False
show_version_info
(about=False)
Display version info. Args: about (bool): Include ABOUT info as well as version numbers. Returns: version_info (str): A complete version info string.
Display version info.
def show_version_info(about=False): """ Display version info. Args: about (bool): Include ABOUT info as well as version numbers. Returns: version_info (str): A complete version info string. """ import sys import twisted return VERSION_INFO.format( version=EVEN...
[ "def", "show_version_info", "(", "about", "=", "False", ")", ":", "import", "sys", "import", "twisted", "return", "VERSION_INFO", ".", "format", "(", "version", "=", "EVENNIA_VERSION", ",", "about", "=", "ABOUT_INFO", "if", "about", "else", "\"\"", ",", "os"...
[ 1567, 0 ]
[ 1585, 36 ]
python
en
['en', 'error', 'th']
False
error_check_python_modules
()
Import settings modules in settings. This will raise exceptions on pure python-syntax issues which are hard to catch gracefully with exceptions in the engine (since they are formatting errors in the python source files themselves). Best they fail already here before we get any further.
Import settings modules in settings. This will raise exceptions on pure python-syntax issues which are hard to catch gracefully with exceptions in the engine (since they are formatting errors in the python source files themselves). Best they fail already here before we get any further.
def error_check_python_modules(): """ Import settings modules in settings. This will raise exceptions on pure python-syntax issues which are hard to catch gracefully with exceptions in the engine (since they are formatting errors in the python source files themselves). Best they fail already here ...
[ "def", "error_check_python_modules", "(", ")", ":", "from", "django", ".", "conf", "import", "settings", "def", "_imp", "(", "path", ",", "split", "=", "True", ")", ":", "\"helper method\"", "mod", ",", "fromlist", "=", "path", ",", "\"None\"", "if", "spli...
[ 1588, 0 ]
[ 1637, 40 ]
python
en
['en', 'error', 'th']
False
init_game_directory
(path, check_db=True, need_gamedir=True)
Try to analyze the given path to find settings.py - this defines the game directory and also sets PYTHONPATH as well as the django path. Args: path (str): Path to new game directory, including its name. check_db (bool, optional): Check if the databae exists. need_gamedir (bool,...
Try to analyze the given path to find settings.py - this defines the game directory and also sets PYTHONPATH as well as the django path.
def init_game_directory(path, check_db=True, need_gamedir=True): """ Try to analyze the given path to find settings.py - this defines the game directory and also sets PYTHONPATH as well as the django path. Args: path (str): Path to new game directory, including its name. check_db (b...
[ "def", "init_game_directory", "(", "path", ",", "check_db", "=", "True", ",", "need_gamedir", "=", "True", ")", ":", "# set the GAMEDIR path", "if", "need_gamedir", ":", "set_gamedir", "(", "path", ")", "# Add gamedir to python path", "sys", ".", "path", ".", "i...
[ 1646, 0 ]
[ 1773, 71 ]
python
en
['en', 'error', 'th']
False
run_dummyrunner
(number_of_dummies)
Start an instance of the dummyrunner Args: number_of_dummies (int): The number of dummy accounts to start. Notes: The dummy accounts' behavior can be customized by adding a `dummyrunner_settings.py` config file in the game's conf/ directory.
Start an instance of the dummyrunner
def run_dummyrunner(number_of_dummies): """ Start an instance of the dummyrunner Args: number_of_dummies (int): The number of dummy accounts to start. Notes: The dummy accounts' behavior can be customized by adding a `dummyrunner_settings.py` config file in the game's conf/ ...
[ "def", "run_dummyrunner", "(", "number_of_dummies", ")", ":", "number_of_dummies", "=", "str", "(", "int", "(", "number_of_dummies", ")", ")", "if", "number_of_dummies", "else", "1", "cmdstr", "=", "[", "sys", ".", "executable", ",", "EVENNIA_DUMMYRUNNER", ",", ...
[ 1776, 0 ]
[ 1799, 12 ]
python
en
['en', 'error', 'th']
False
list_settings
(keys)
Display the server settings. We only display the Evennia specific settings here. The result will be printed to the terminal. Args: keys (str or list): Setting key or keys to inspect.
Display the server settings. We only display the Evennia specific settings here. The result will be printed to the terminal.
def list_settings(keys): """ Display the server settings. We only display the Evennia specific settings here. The result will be printed to the terminal. Args: keys (str or list): Setting key or keys to inspect. """ from importlib import import_module from evennia.utils import evta...
[ "def", "list_settings", "(", "keys", ")", ":", "from", "importlib", "import", "import_module", "from", "evennia", ".", "utils", "import", "evtable", "evsettings", "=", "import_module", "(", "SETTINGS_DOTPATH", ")", "if", "len", "(", "keys", ")", "==", "1", "...
[ 1802, 0 ]
[ 1830, 16 ]
python
en
['en', 'error', 'th']
False
run_menu
()
This launches an interactive menu.
This launches an interactive menu.
def run_menu(): """ This launches an interactive menu. """ while True: # menu loop gamedir = "/{}".format(os.path.basename(GAMEDIR)) leninfo = len(gamedir) line = "|" + " " * (61 - leninfo) + gamedir + " " * 2 + "|" print(MENU.format(gameinfo=line)) inp ...
[ "def", "run_menu", "(", ")", ":", "while", "True", ":", "# menu loop", "gamedir", "=", "\"/{}\"", ".", "format", "(", "os", ".", "path", ".", "basename", "(", "GAMEDIR", ")", ")", "leninfo", "=", "len", "(", "gamedir", ")", "line", "=", "\"|\"", "+",...
[ 1833, 0 ]
[ 1908, 14 ]
python
en
['en', 'error', 'th']
False
main
()
Run the evennia launcher main program.
Run the evennia launcher main program.
def main(): """ Run the evennia launcher main program. """ # set up argument parser parser = ArgumentParser(description=CMDLINE_HELP, formatter_class=argparse.RawTextHelpFormatter) parser.add_argument( '--gamedir', nargs=1, action='store', dest='altgamedir', metavar="<path>", ...
[ "def", "main", "(", ")", ":", "# set up argument parser", "parser", "=", "ArgumentParser", "(", "description", "=", "CMDLINE_HELP", ",", "formatter_class", "=", "argparse", ".", "RawTextHelpFormatter", ")", "parser", ".", "add_argument", "(", "'--gamedir'", ",", "...
[ 1911, 0 ]
[ 2148, 21 ]
python
en
['en', 'error', 'th']
False
AMPLauncherProtocol.wait_for_status
(self, callback)
Register a waiter for a status return.
Register a waiter for a status return.
def wait_for_status(self, callback): """ Register a waiter for a status return. """ self.on_status.append(callback)
[ "def", "wait_for_status", "(", "self", ",", "callback", ")", ":", "self", ".", "on_status", ".", "append", "(", "callback", ")" ]
[ 625, 4 ]
[ 630, 39 ]
python
en
['en', 'error', 'th']
False
AMPLauncherProtocol.receive_status_from_portal
(self, status)
Get a status signal from portal - fire next queued callback
Get a status signal from portal - fire next queued callback
def receive_status_from_portal(self, status): """ Get a status signal from portal - fire next queued callback """ try: callback = self.on_status.pop() except IndexError: pass else: status = pickle.loads(status) call...
[ "def", "receive_status_from_portal", "(", "self", ",", "status", ")", ":", "try", ":", "callback", "=", "self", ".", "on_status", ".", "pop", "(", ")", "except", "IndexError", ":", "pass", "else", ":", "status", "=", "pickle", ".", "loads", "(", "status"...
[ 633, 4 ]
[ 646, 29 ]
python
en
['en', 'error', 'th']
False
XBins.end
(self)
Sets the end value for the x axis bins. The last bin may not end exactly at this value, we increment the bin edge by `size` from `start` until we reach or exceed `end`. Defaults to the maximum data value. Like `start`, for dates use a date string, and for category data `end` is ...
Sets the end value for the x axis bins. The last bin may not end exactly at this value, we increment the bin edge by `size` from `start` until we reach or exceed `end`. Defaults to the maximum data value. Like `start`, for dates use a date string, and for category data `end` is ...
def end(self): """ Sets the end value for the x axis bins. The last bin may not end exactly at this value, we increment the bin edge by `size` from `start` until we reach or exceed `end`. Defaults to the maximum data value. Like `start`, for dates use a date string, and f...
[ "def", "end", "(", "self", ")", ":", "return", "self", "[", "\"end\"", "]" ]
[ 15, 4 ]
[ 30, 26 ]
python
en
['en', 'error', 'th']
False
XBins.size
(self)
Sets the size of each x axis bin. Default behavior: If `nbinsx` is 0 or omitted, we choose a nice round bin size such that the number of bins is about the same as the typical number of samples in each bin. If `nbinsx` is provided, we choose a nice round bin size giving no more t...
Sets the size of each x axis bin. Default behavior: If `nbinsx` is 0 or omitted, we choose a nice round bin size such that the number of bins is about the same as the typical number of samples in each bin. If `nbinsx` is provided, we choose a nice round bin size giving no more t...
def size(self): """ Sets the size of each x axis bin. Default behavior: If `nbinsx` is 0 or omitted, we choose a nice round bin size such that the number of bins is about the same as the typical number of samples in each bin. If `nbinsx` is provided, we choose a nice roun...
[ "def", "size", "(", "self", ")", ":", "return", "self", "[", "\"size\"", "]" ]
[ 39, 4 ]
[ 56, 27 ]
python
en
['en', 'error', 'th']
False
XBins.start
(self)
Sets the starting value for the x axis bins. Defaults to the minimum data value, shifted down if necessary to make nice round values and to remove ambiguous bin edges. For example, if most of the data is integers we shift the bin edges 0.5 down, so a `size` of 5 would have a def...
Sets the starting value for the x axis bins. Defaults to the minimum data value, shifted down if necessary to make nice round values and to remove ambiguous bin edges. For example, if most of the data is integers we shift the bin edges 0.5 down, so a `size` of 5 would have a def...
def start(self): """ Sets the starting value for the x axis bins. Defaults to the minimum data value, shifted down if necessary to make nice round values and to remove ambiguous bin edges. For example, if most of the data is integers we shift the bin edges 0.5 down, so a ...
[ "def", "start", "(", "self", ")", ":", "return", "self", "[", "\"start\"", "]" ]
[ 65, 4 ]
[ 84, 28 ]
python
en
['en', 'error', 'th']
False
XBins.__init__
(self, arg=None, end=None, size=None, start=None, **kwargs)
Construct a new XBins object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.histogram2d.XBins` end Sets the end value for the x axis bins. The last...
Construct a new XBins object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.histogram2d.XBins` end Sets the end value for the x axis bins. The last...
def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): """ Construct a new XBins object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.histogr...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "end", "=", "None", ",", "size", "=", "None", ",", "start", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "XBins", ",", "self", ")", ".", "__init__", "(", "\"xbins\"", ...
[ 126, 4 ]
[ 218, 34 ]
python
en
['en', 'error', 'th']
False
SafeLocalHumanAgent.add_cmdline_args
( cls, parser: ParlaiParser, partial_opt: Optional[Opt] = None )
Add command-line arguments specifically for this agent.
Add command-line arguments specifically for this agent.
def add_cmdline_args( cls, parser: ParlaiParser, partial_opt: Optional[Opt] = None ) -> ParlaiParser: """ Add command-line arguments specifically for this agent. """ agent = parser.add_argument_group('Safe Local Human Arguments') agent.add_argument( '--saf...
[ "def", "add_cmdline_args", "(", "cls", ",", "parser", ":", "ParlaiParser", ",", "partial_opt", ":", "Optional", "[", "Opt", "]", "=", "None", ")", "->", "ParlaiParser", ":", "agent", "=", "parser", ".", "add_argument_group", "(", "'Safe Local Human Arguments'", ...
[ 29, 4 ]
[ 44, 21 ]
python
en
['en', 'error', 'th']
False
SafeLocalHumanAgent._init_safety
(self, opt)
Initialize safety modules.
Initialize safety modules.
def _init_safety(self, opt): """ Initialize safety modules. """ if opt['safety'] == 'string_matcher' or opt['safety'] == 'all': self.offensive_string_matcher = OffensiveStringMatcher() if opt['safety'] == 'classifier' or opt['safety'] == 'all': self.offens...
[ "def", "_init_safety", "(", "self", ",", "opt", ")", ":", "if", "opt", "[", "'safety'", "]", "==", "'string_matcher'", "or", "opt", "[", "'safety'", "]", "==", "'all'", ":", "self", ".", "offensive_string_matcher", "=", "OffensiveStringMatcher", "(", ")", ...
[ 51, 4 ]
[ 60, 35 ]
python
en
['en', 'error', 'th']
False
SafeLocalHumanAgent.check_offensive
(self, text)
Check if text is offensive using string matcher and classifier.
Check if text is offensive using string matcher and classifier.
def check_offensive(self, text): """ Check if text is offensive using string matcher and classifier. """ if text == '': return False if ( hasattr(self, 'offensive_string_matcher') and text in self.offensive_string_matcher ): ...
[ "def", "check_offensive", "(", "self", ",", "text", ")", ":", "if", "text", "==", "''", ":", "return", "False", "if", "(", "hasattr", "(", "self", ",", "'offensive_string_matcher'", ")", "and", "text", "in", "self", ".", "offensive_string_matcher", ")", ":...
[ 62, 4 ]
[ 76, 20 ]
python
en
['en', 'error', 'th']
False
SafeLocalHumanAgent.observe
(self, msg)
Observe bot reply if and only if it passes.
Observe bot reply if and only if it passes.
def observe(self, msg): """ Observe bot reply if and only if it passes. """ if self.self_offensive: # User was offensive, they must try again return # Now check if bot was offensive bot_offensive = self.check_offensive(msg.get('text', '')) ...
[ "def", "observe", "(", "self", ",", "msg", ")", ":", "if", "self", ".", "self_offensive", ":", "# User was offensive, they must try again", "return", "# Now check if bot was offensive", "bot_offensive", "=", "self", ".", "check_offensive", "(", "msg", ".", "get", "(...
[ 78, 4 ]
[ 101, 38 ]
python
en
['en', 'error', 'th']
False
convert
(in_file, out_file, num_classes)
Convert keys in checkpoints. There can be some breaking changes during the development of mmdetection, and this tool is used for upgrading checkpoints trained with old versions to the latest one.
Convert keys in checkpoints.
def convert(in_file, out_file, num_classes): """Convert keys in checkpoints. There can be some breaking changes during the development of mmdetection, and this tool is used for upgrading checkpoints trained with old versions to the latest one. """ checkpoint = torch.load(in_file) in_state_d...
[ "def", "convert", "(", "in_file", ",", "out_file", ",", "num_classes", ")", ":", "checkpoint", "=", "torch", ".", "load", "(", "in_file", ")", "in_state_dict", "=", "checkpoint", ".", "pop", "(", "'state_dict'", ")", "out_state_dict", "=", "OrderedDict", "("...
[ 113, 0 ]
[ 175, 36 ]
python
en
['en', 'en', 'en']
True
Hoverlabel.align
(self)
Sets the horizontal alignment of the text content within hover label box. Has an effect only if the hover label text spans more two or more lines The 'align' property is an enumeration that may be specified as: - One of the following enumeration values: ['...
Sets the horizontal alignment of the text content within hover label box. Has an effect only if the hover label text spans more two or more lines The 'align' property is an enumeration that may be specified as: - One of the following enumeration values: ['...
def align(self): """ Sets the horizontal alignment of the text content within hover label box. Has an effect only if the hover label text spans more two or more lines The 'align' property is an enumeration that may be specified as: - One of the following enumeratio...
[ "def", "align", "(", "self", ")", ":", "return", "self", "[", "\"align\"", "]" ]
[ 25, 4 ]
[ 40, 28 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.alignsrc
(self)
Sets the source reference on Chart Studio Cloud for align . The 'alignsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for align . The 'alignsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def alignsrc(self): """ Sets the source reference on Chart Studio Cloud for align . The 'alignsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["alignsrc"]
[ "def", "alignsrc", "(", "self", ")", ":", "return", "self", "[", "\"alignsrc\"", "]" ]
[ 49, 4 ]
[ 60, 31 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.bgcolor
(self)
Sets the background color of the hover labels for this trace The 'bgcolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva str...
Sets the background color of the hover labels for this trace The 'bgcolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva str...
def bgcolor(self): """ Sets the background color of the hover labels for this trace The 'bgcolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)...
[ "def", "bgcolor", "(", "self", ")", ":", "return", "self", "[", "\"bgcolor\"", "]" ]
[ 69, 4 ]
[ 120, 30 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.bgcolorsrc
(self)
Sets the source reference on Chart Studio Cloud for bgcolor . The 'bgcolorsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for bgcolor . The 'bgcolorsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def bgcolorsrc(self): """ Sets the source reference on Chart Studio Cloud for bgcolor . The 'bgcolorsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["bgcolorsrc"]
[ "def", "bgcolorsrc", "(", "self", ")", ":", "return", "self", "[", "\"bgcolorsrc\"", "]" ]
[ 129, 4 ]
[ 140, 33 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.bordercolor
(self)
Sets the border color of the hover labels for this trace. The 'bordercolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva st...
Sets the border color of the hover labels for this trace. The 'bordercolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva st...
def bordercolor(self): """ Sets the border color of the hover labels for this trace. The 'bordercolor' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%...
[ "def", "bordercolor", "(", "self", ")", ":", "return", "self", "[", "\"bordercolor\"", "]" ]
[ 149, 4 ]
[ 200, 34 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.bordercolorsrc
(self)
Sets the source reference on Chart Studio Cloud for bordercolor . The 'bordercolorsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for bordercolor . The 'bordercolorsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def bordercolorsrc(self): """ Sets the source reference on Chart Studio Cloud for bordercolor . The 'bordercolorsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["bo...
[ "def", "bordercolorsrc", "(", "self", ")", ":", "return", "self", "[", "\"bordercolorsrc\"", "]" ]
[ 209, 4 ]
[ 221, 37 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.font
(self)
Sets the font used in hover labels. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.sunburst.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.sunburst.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.sunburst.hoverlabel.Font` - A dict of string/value properties that will be passed t...
[ "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.sunburst.Hoverlabel` align Sets the horizontal alignment of the te...
Construct a new Hoverlabel object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.sunburst.Hoverlabel` align Sets the horizontal alignment of the te...
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