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
Volume.opacityscale
(self)
Sets the opacityscale. The opacityscale must be an array containing arrays mapping a normalized value to an opacity value. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example, `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower values wou...
Sets the opacityscale. The opacityscale must be an array containing arrays mapping a normalized value to an opacity value. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example, `[[0, 1], [0.5, 0.2], [1, 1]]` means that higher/lower values wou...
def opacityscale(self): """ Sets the opacityscale. The opacityscale must be an array containing arrays mapping a normalized value to an opacity value. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example, `[[0, 1], [0.5, 0.2], [1, 1]]`...
[ "def", "opacityscale", "(", "self", ")", ":", "return", "self", "[", "\"opacityscale\"", "]" ]
[ 1118, 4 ]
[ 1136, 35 ]
python
en
['en', 'error', 'th']
False
Volume.reversescale
(self)
Reverses the color mapping if true. If true, `cmin` will correspond to the last color in the array and `cmax` will correspond to the first color. The 'reversescale' property must be specified as a bool (either True, or False) Returns ------- bool ...
Reverses the color mapping if true. If true, `cmin` will correspond to the last color in the array and `cmax` will correspond to the first color. The 'reversescale' property must be specified as a bool (either True, or False)
def reversescale(self): """ Reverses the color mapping if true. If true, `cmin` will correspond to the last color in the array and `cmax` will correspond to the first color. The 'reversescale' property must be specified as a bool (either True, or False) Retu...
[ "def", "reversescale", "(", "self", ")", ":", "return", "self", "[", "\"reversescale\"", "]" ]
[ 1145, 4 ]
[ 1158, 35 ]
python
en
['en', 'error', 'th']
False
Volume.scene
(self)
Sets a reference between this trace's 3D coordinate system and a 3D scene. If "scene" (the default value), the (x,y,z) coordinates refer to `layout.scene`. If "scene2", the (x,y,z) coordinates refer to `layout.scene2`, and so on. The 'scene' property is an identifier of a p...
Sets a reference between this trace's 3D coordinate system and a 3D scene. If "scene" (the default value), the (x,y,z) coordinates refer to `layout.scene`. If "scene2", the (x,y,z) coordinates refer to `layout.scene2`, and so on. The 'scene' property is an identifier of a p...
def scene(self): """ Sets a reference between this trace's 3D coordinate system and a 3D scene. If "scene" (the default value), the (x,y,z) coordinates refer to `layout.scene`. If "scene2", the (x,y,z) coordinates refer to `layout.scene2`, and so on. The 'scene' prop...
[ "def", "scene", "(", "self", ")", ":", "return", "self", "[", "\"scene\"", "]" ]
[ 1167, 4 ]
[ 1183, 28 ]
python
en
['en', 'error', 'th']
False
Volume.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\"", "]" ]
[ 1192, 4 ]
[ 1204, 33 ]
python
en
['en', 'error', 'th']
False
Volume.showscale
(self)
Determines whether or not a colorbar is displayed for this trace. The 'showscale' property must be specified as a bool (either True, or False) Returns ------- bool
Determines whether or not a colorbar is displayed for this trace. The 'showscale' property must be specified as a bool (either True, or False)
def showscale(self): """ Determines whether or not a colorbar is displayed for this trace. The 'showscale' property must be specified as a bool (either True, or False) Returns ------- bool """ return self["showscale"]
[ "def", "showscale", "(", "self", ")", ":", "return", "self", "[", "\"showscale\"", "]" ]
[ 1213, 4 ]
[ 1225, 32 ]
python
en
['en', 'error', 'th']
False
Volume.slices
(self)
The 'slices' property is an instance of Slices that may be specified as: - An instance of :class:`plotly.graph_objs.volume.Slices` - A dict of string/value properties that will be passed to the Slices constructor Supported dict properties: ...
The 'slices' property is an instance of Slices that may be specified as: - An instance of :class:`plotly.graph_objs.volume.Slices` - A dict of string/value properties that will be passed to the Slices constructor Supported dict properties: ...
def slices(self): """ The 'slices' property is an instance of Slices that may be specified as: - An instance of :class:`plotly.graph_objs.volume.Slices` - A dict of string/value properties that will be passed to the Slices constructor Supported di...
[ "def", "slices", "(", "self", ")", ":", "return", "self", "[", "\"slices\"", "]" ]
[ 1234, 4 ]
[ 1258, 29 ]
python
en
['en', 'error', 'th']
False
Volume.spaceframe
(self)
The 'spaceframe' property is an instance of Spaceframe that may be specified as: - An instance of :class:`plotly.graph_objs.volume.Spaceframe` - A dict of string/value properties that will be passed to the Spaceframe constructor Supported dict properties...
The 'spaceframe' property is an instance of Spaceframe that may be specified as: - An instance of :class:`plotly.graph_objs.volume.Spaceframe` - A dict of string/value properties that will be passed to the Spaceframe constructor Supported dict properties...
def spaceframe(self): """ The 'spaceframe' property is an instance of Spaceframe that may be specified as: - An instance of :class:`plotly.graph_objs.volume.Spaceframe` - A dict of string/value properties that will be passed to the Spaceframe constructor ...
[ "def", "spaceframe", "(", "self", ")", ":", "return", "self", "[", "\"spaceframe\"", "]" ]
[ 1267, 4 ]
[ 1293, 33 ]
python
en
['en', 'error', 'th']
False
Volume.stream
(self)
The 'stream' property is an instance of Stream that may be specified as: - An instance of :class:`plotly.graph_objs.volume.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.volume.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.volume.Stream` - A dict of string/value properties that will be passed to the Stream constructor Supported di...
[ "def", "stream", "(", "self", ")", ":", "return", "self", "[", "\"stream\"", "]" ]
[ 1302, 4 ]
[ 1326, 29 ]
python
en
['en', 'error', 'th']
False
Volume.surface
(self)
The 'surface' property is an instance of Surface that may be specified as: - An instance of :class:`plotly.graph_objs.volume.Surface` - A dict of string/value properties that will be passed to the Surface constructor Supported dict properties: ...
The 'surface' property is an instance of Surface that may be specified as: - An instance of :class:`plotly.graph_objs.volume.Surface` - A dict of string/value properties that will be passed to the Surface constructor Supported dict properties: ...
def surface(self): """ The 'surface' property is an instance of Surface that may be specified as: - An instance of :class:`plotly.graph_objs.volume.Surface` - A dict of string/value properties that will be passed to the Surface constructor Support...
[ "def", "surface", "(", "self", ")", ":", "return", "self", "[", "\"surface\"", "]" ]
[ 1335, 4 ]
[ 1376, 30 ]
python
en
['en', 'error', 'th']
False
Volume.text
(self)
Sets the text elements associated with the vertices. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. The 'text' property is a string and must be specified as: - A string - A number that wil...
Sets the text elements associated with the vertices. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. The 'text' property is a string and must be specified as: - A string - A number that wil...
def text(self): """ Sets the text elements associated with the vertices. If trace `hoverinfo` contains a "text" flag and "hovertext" is not set, these elements will be seen in the hover labels. The 'text' property is a string and must be specified as: - A string ...
[ "def", "text", "(", "self", ")", ":", "return", "self", "[", "\"text\"", "]" ]
[ 1385, 4 ]
[ 1400, 27 ]
python
en
['en', 'error', 'th']
False
Volume.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\"", "]" ]
[ 1409, 4 ]
[ 1420, 30 ]
python
en
['en', 'error', 'th']
False
Volume.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\"", "]" ]
[ 1429, 4 ]
[ 1442, 26 ]
python
en
['en', 'error', 'th']
False
Volume.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\"", "]" ]
[ 1451, 4 ]
[ 1475, 33 ]
python
en
['en', 'error', 'th']
False
Volume.value
(self)
Sets the 4th dimension (value) of the vertices. The 'value' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray
Sets the 4th dimension (value) of the vertices. The 'value' property is an array that may be specified as a tuple, list, numpy array, or pandas Series
def value(self): """ Sets the 4th dimension (value) of the vertices. The 'value' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ return self["value"]
[ "def", "value", "(", "self", ")", ":", "return", "self", "[", "\"value\"", "]" ]
[ 1484, 4 ]
[ 1495, 28 ]
python
en
['en', 'error', 'th']
False
Volume.valuesrc
(self)
Sets the source reference on Chart Studio Cloud for value . The 'valuesrc' 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 value . The 'valuesrc' property must be specified as a string or as a plotly.grid_objs.Column object
def valuesrc(self): """ Sets the source reference on Chart Studio Cloud for value . The 'valuesrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["valuesrc"]
[ "def", "valuesrc", "(", "self", ")", ":", "return", "self", "[", "\"valuesrc\"", "]" ]
[ 1504, 4 ]
[ 1515, 31 ]
python
en
['en', 'error', 'th']
False
Volume.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\"", "]" ]
[ 1524, 4 ]
[ 1538, 30 ]
python
en
['en', 'error', 'th']
False
Volume.x
(self)
Sets the X coordinates of the vertices on X axis. The 'x' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray
Sets the X coordinates of the vertices on X axis. The 'x' property is an array that may be specified as a tuple, list, numpy array, or pandas Series
def x(self): """ Sets the X coordinates of the vertices on X axis. The 'x' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ return self["x"]
[ "def", "x", "(", "self", ")", ":", "return", "self", "[", "\"x\"", "]" ]
[ 1547, 4 ]
[ 1558, 24 ]
python
en
['en', 'error', 'th']
False
Volume.xsrc
(self)
Sets the source reference on Chart Studio Cloud for x . The 'xsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for x . The 'xsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def xsrc(self): """ Sets the source reference on Chart Studio Cloud for x . The 'xsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["xsrc"]
[ "def", "xsrc", "(", "self", ")", ":", "return", "self", "[", "\"xsrc\"", "]" ]
[ 1567, 4 ]
[ 1578, 27 ]
python
en
['en', 'error', 'th']
False
Volume.y
(self)
Sets the Y coordinates of the vertices on Y axis. The 'y' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray
Sets the Y coordinates of the vertices on Y axis. The 'y' property is an array that may be specified as a tuple, list, numpy array, or pandas Series
def y(self): """ Sets the Y coordinates of the vertices on Y axis. The 'y' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ return self["y"]
[ "def", "y", "(", "self", ")", ":", "return", "self", "[", "\"y\"", "]" ]
[ 1587, 4 ]
[ 1598, 24 ]
python
en
['en', 'error', 'th']
False
Volume.ysrc
(self)
Sets the source reference on Chart Studio Cloud for y . The 'ysrc' 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 y . The 'ysrc' property must be specified as a string or as a plotly.grid_objs.Column object
def ysrc(self): """ Sets the source reference on Chart Studio Cloud for y . The 'ysrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["ysrc"]
[ "def", "ysrc", "(", "self", ")", ":", "return", "self", "[", "\"ysrc\"", "]" ]
[ 1607, 4 ]
[ 1618, 27 ]
python
en
['en', 'error', 'th']
False
Volume.z
(self)
Sets the Z coordinates of the vertices on Z axis. The 'z' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray
Sets the Z coordinates of the vertices on Z axis. The 'z' property is an array that may be specified as a tuple, list, numpy array, or pandas Series
def z(self): """ Sets the Z coordinates of the vertices on Z axis. The 'z' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ return self["z"]
[ "def", "z", "(", "self", ")", ":", "return", "self", "[", "\"z\"", "]" ]
[ 1627, 4 ]
[ 1638, 24 ]
python
en
['en', 'error', 'th']
False
Volume.zsrc
(self)
Sets the source reference on Chart Studio Cloud for z . The 'zsrc' 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 z . The 'zsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def zsrc(self): """ Sets the source reference on Chart Studio Cloud for z . The 'zsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["zsrc"]
[ "def", "zsrc", "(", "self", ")", ":", "return", "self", "[", "\"zsrc\"", "]" ]
[ 1647, 4 ]
[ 1658, 27 ]
python
en
['en', 'error', 'th']
False
Volume.__init__
( self, arg=None, autocolorscale=None, caps=None, cauto=None, cmax=None, cmid=None, cmin=None, coloraxis=None, colorbar=None, colorscale=None, contour=None, customdata=None, customdatasrc=None, flatsh...
Construct a new Volume object Draws volume trace between iso-min and iso-max values with coordinates given by four 1-dimensional arrays containing the `value`, `x`, `y` and `z` of every vertex of a uniform or non- uniform 3-D grid. Horizontal or vertical slices, caps as...
Construct a new Volume object Draws volume trace between iso-min and iso-max values with coordinates given by four 1-dimensional arrays containing the `value`, `x`, `y` and `z` of every vertex of a uniform or non- uniform 3-D grid. Horizontal or vertical slices, caps as...
def __init__( self, arg=None, autocolorscale=None, caps=None, cauto=None, cmax=None, cmid=None, cmin=None, coloraxis=None, colorbar=None, colorscale=None, contour=None, customdata=None, customdatasrc=None, ...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "autocolorscale", "=", "None", ",", "caps", "=", "None", ",", "cauto", "=", "None", ",", "cmax", "=", "None", ",", "cmid", "=", "None", ",", "cmin", "=", "None", ",", "coloraxis", "=", ...
[ 1926, 4 ]
[ 2507, 34 ]
python
en
['en', 'error', 'th']
False
RnnDocReader.forward
(self, x1, x1_f, x1_mask, x2, x2_mask)
Inputs: x1 = document word indices [batch * len_d] x1_f = document word features indices [batch * len_d * nfeat] x1_mask = document padding mask [batch * len_d] x2 = question word indices [batch * len_q] x2_mask = question padding mask [batc...
Inputs: x1 = document word indices [batch * len_d] x1_f = document word features indices [batch * len_d * nfeat] x1_mask = document padding mask [batch * len_d] x2 = question word indices [batch * len_q] x2_mask = question padding mask [batc...
def forward(self, x1, x1_f, x1_mask, x2, x2_mask): """Inputs: x1 = document word indices [batch * len_d] x1_f = document word features indices [batch * len_d * nfeat] x1_mask = document padding mask [batch * len_d] x2 = question word indices [batch...
[ "def", "forward", "(", "self", ",", "x1", ",", "x1_f", ",", "x1_mask", ",", "x2", ",", "x2_mask", ")", ":", "# Embed both document and question", "x1_emb", "=", "self", ".", "embedding", "(", "x1", ")", "x2_emb", "=", "self", ".", "embedding", "(", "x2",...
[ 89, 4 ]
[ 131, 39 ]
python
de
['de', 'zh', 'en']
False
ConnectionInvitation.__init__
( self, *, label: str = None, did: str = None, recipient_keys: Sequence[str] = None, endpoint: str = None, routing_keys: Sequence[str] = None, image_url: str = None, **kwargs, )
Initialize connection invitation object. Args: label: Optional label for connection did: DID for this connection invitation recipient_keys: List of recipient keys endpoint: Endpoint which this agent can be reached at routing_keys: List of rou...
Initialize connection invitation object.
def __init__( self, *, label: str = None, did: str = None, recipient_keys: Sequence[str] = None, endpoint: str = None, routing_keys: Sequence[str] = None, image_url: str = None, **kwargs, ): """ Initialize connection invitation ...
[ "def", "__init__", "(", "self", ",", "*", ",", "label", ":", "str", "=", "None", ",", "did", ":", "str", "=", "None", ",", "recipient_keys", ":", "Sequence", "[", "str", "]", "=", "None", ",", "endpoint", ":", "str", "=", "None", ",", "routing_keys...
[ 29, 4 ]
[ 56, 72 ]
python
en
['en', 'error', 'th']
False
ConnectionInvitation.to_url
(self, base_url: str = None)
Convert an invitation to URL format for sharing. Returns: An invite url
Convert an invitation to URL format for sharing.
def to_url(self, base_url: str = None) -> str: """ Convert an invitation to URL format for sharing. Returns: An invite url """ c_json = self.to_json() c_i = bytes_to_b64(c_json.encode("ascii"), urlsafe=True) result = urljoin(base_url or self.endpoint...
[ "def", "to_url", "(", "self", ",", "base_url", ":", "str", "=", "None", ")", "->", "str", ":", "c_json", "=", "self", ".", "to_json", "(", ")", "c_i", "=", "bytes_to_b64", "(", "c_json", ".", "encode", "(", "\"ascii\"", ")", ",", "urlsafe", "=", "T...
[ 58, 4 ]
[ 69, 21 ]
python
en
['en', 'error', 'th']
False
ConnectionInvitation.from_url
(cls, url: str)
Parse a URL-encoded invitation into a `ConnectionInvitation` message. Args: url: Url to decode Returns: A `ConnectionInvitation` object.
Parse a URL-encoded invitation into a `ConnectionInvitation` message.
def from_url(cls, url: str) -> "ConnectionInvitation": """ Parse a URL-encoded invitation into a `ConnectionInvitation` message. Args: url: Url to decode Returns: A `ConnectionInvitation` object. """ parts = urlparse(url) query = parse_q...
[ "def", "from_url", "(", "cls", ",", "url", ":", "str", ")", "->", "\"ConnectionInvitation\"", ":", "parts", "=", "urlparse", "(", "url", ")", "query", "=", "parse_qs", "(", "parts", ".", "query", ")", "if", "\"c_i\"", "in", "query", ":", "c_i", "=", ...
[ 72, 4 ]
[ 88, 19 ]
python
en
['en', 'error', 'th']
False
ConnectionInvitationSchema.validate_fields
(self, data, **kwargs)
Validate schema fields. Args: data: The data to validate Raises: ValidationError: If any of the fields do not validate
Validate schema fields.
def validate_fields(self, data, **kwargs): """ Validate schema fields. Args: data: The data to validate Raises: ValidationError: If any of the fields do not validate """ if data.get("did"): if data.get("recipient_keys"): ...
[ "def", "validate_fields", "(", "self", ",", "data", ",", "*", "*", "kwargs", ")", ":", "if", "data", ".", "get", "(", "\"did\"", ")", ":", "if", "data", ".", "get", "(", "\"recipient_keys\"", ")", ":", "raise", "ValidationError", "(", "\"Fields are incom...
[ 132, 4 ]
[ 155, 13 ]
python
en
['en', 'error', 'th']
False
PerformanceCog.report_latency
(self, ctx, with_graph: bool = True)
Reports the latency in the last 24h Args: with_graph (bool, optional): if it should be presented in graph form. Defaults to True. Example: @AntiPetros report_latency yes
Reports the latency in the last 24h
async def report_latency(self, ctx, with_graph: bool = True): """ Reports the latency in the last 24h Args: with_graph (bool, optional): if it should be presented in graph form. Defaults to True. Example: @AntiPetros report_latency yes """ report...
[ "async", "def", "report_latency", "(", "self", ",", "ctx", ",", "with_graph", ":", "bool", "=", "True", ")", ":", "report_data", "=", "await", "self", ".", "general_db", ".", "get_latency_data_last_24_hours", "(", ")", "stat_data", "=", "[", "item", ".", "...
[ 194, 4 ]
[ 216, 47 ]
python
en
['en', 'error', 'th']
False
PerformanceCog.report_memory
(self, ctx, with_graph: bool = True, since_last_hours: int = 24)
Reports the memory use in the last 24h Args: with_graph (bool, optional): if it should be presented in graph form. Defaults to True. Example: @AntiPetros report_memory yes
Reports the memory use in the last 24h
async def report_memory(self, ctx, with_graph: bool = True, since_last_hours: int = 24): """ Reports the memory use in the last 24h Args: with_graph (bool, optional): if it should be presented in graph form. Defaults to True. Example: @AntiPetros report_memory y...
[ "async", "def", "report_memory", "(", "self", ",", "ctx", ",", "with_graph", ":", "bool", "=", "True", ",", "since_last_hours", ":", "int", "=", "24", ")", ":", "initial_memory", "=", "os", ".", "getenv", "(", "'INITIAL_MEMORY_USAGE'", ")", "initial_memory_a...
[ 220, 4 ]
[ 250, 47 ]
python
en
['en', 'error', 'th']
False
PerformanceCog.report_cpu
(self, ctx, with_graph: bool = True)
Reports the cpu use in the last 24h Args: with_graph (bool, optional): if it should be presented in graph form. Defaults to True. Example: @AntiPetros report_cpu yes
Reports the cpu use in the last 24h
async def report_cpu(self, ctx, with_graph: bool = True): """ Reports the cpu use in the last 24h Args: with_graph (bool, optional): if it should be presented in graph form. Defaults to True. Example: @AntiPetros report_cpu yes """ report_data = ...
[ "async", "def", "report_cpu", "(", "self", ",", "ctx", ",", "with_graph", ":", "bool", "=", "True", ")", ":", "report_data", "=", "await", "self", ".", "general_db", ".", "get_cpu_data_last_24_hours", "(", ")", "stat_data", "=", "[", "item", ".", "usage_pe...
[ 254, 4 ]
[ 276, 47 ]
python
en
['en', 'error', 'th']
False
PerformanceCog.performance_statistic
(self, ctx)
Reports all collected metrics as Graph. Example: @AntiPetros report
Reports all collected metrics as Graph.
async def performance_statistic(self, ctx): """ Reports all collected metrics as Graph. Example: @AntiPetros report """ try: await ctx.invoke(self.bot.get_command('report_memory')) await ctx.invoke(self.bot.get_command('report_latency')) ...
[ "async", "def", "performance_statistic", "(", "self", ",", "ctx", ")", ":", "try", ":", "await", "ctx", ".", "invoke", "(", "self", ".", "bot", ".", "get_command", "(", "'report_memory'", ")", ")", "await", "ctx", ".", "invoke", "(", "self", ".", "bot"...
[ 280, 4 ]
[ 293, 91 ]
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.scattergeo.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.scattergeo.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.scattergeo.hoverlabel.Font` - A dict of string/value properties that will be passed ...
[ "def", "font", "(", "self", ")", ":", "return", "self", "[", "\"font\"", "]" ]
[ 230, 4 ]
[ 277, 27 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.namelength
(self)
Sets the default length (in number of characters) of the trace name in the hover labels for all traces. -1 shows the whole name regardless of length. 0-3 shows the first 0-3 characters, and an integer >3 will show the whole name if it is less than that many characters, but if it...
Sets the default length (in number of characters) of the trace name in the hover labels for all traces. -1 shows the whole name regardless of length. 0-3 shows the first 0-3 characters, and an integer >3 will show the whole name if it is less than that many characters, but if it...
def namelength(self): """ Sets the default length (in number of characters) of the trace name in the hover labels for all traces. -1 shows the whole name regardless of length. 0-3 shows the first 0-3 characters, and an integer >3 will show the whole name if it is less than ...
[ "def", "namelength", "(", "self", ")", ":", "return", "self", "[", "\"namelength\"", "]" ]
[ 286, 4 ]
[ 304, 33 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.namelengthsrc
(self)
Sets the source reference on Chart Studio Cloud for namelength . The 'namelengthsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for namelength . The 'namelengthsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def namelengthsrc(self): """ Sets the source reference on Chart Studio Cloud for namelength . The 'namelengthsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["name...
[ "def", "namelengthsrc", "(", "self", ")", ":", "return", "self", "[", "\"namelengthsrc\"", "]" ]
[ 313, 4 ]
[ 325, 36 ]
python
en
['en', 'error', 'th']
False
Hoverlabel.__init__
( self, arg=None, align=None, alignsrc=None, bgcolor=None, bgcolorsrc=None, bordercolor=None, bordercolorsrc=None, font=None, namelength=None, namelengthsrc=None, **kwargs )
Construct a new Hoverlabel object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scattergeo.Hoverlabel` align Sets the horizontal alignment of the ...
Construct a new Hoverlabel object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scattergeo.Hoverlabel` align Sets the horizontal alignment of the ...
def __init__( self, arg=None, align=None, alignsrc=None, bgcolor=None, bgcolorsrc=None, bordercolor=None, bordercolorsrc=None, font=None, namelength=None, namelengthsrc=None, **kwargs ): """ Construct a n...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "align", "=", "None", ",", "alignsrc", "=", "None", ",", "bgcolor", "=", "None", ",", "bgcolorsrc", "=", "None", ",", "bordercolor", "=", "None", ",", "bordercolorsrc", "=", "None", ",", "...
[ 370, 4 ]
[ 502, 34 ]
python
en
['en', 'error', 'th']
False
Pointcloud.customdata
(self)
Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, "scatter" traces also appends customdata items in the markers DOM elements The 'customdata' property is an array that may be specified as a tuple, list,...
Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, "scatter" traces also appends customdata items in the markers DOM elements The 'customdata' property is an array that may be specified as a tuple, list,...
def customdata(self): """ Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, "scatter" traces also appends customdata items in the markers DOM elements The 'customdata' property is an array that may be sp...
[ "def", "customdata", "(", "self", ")", ":", "return", "self", "[", "\"customdata\"", "]" ]
[ 51, 4 ]
[ 65, 33 ]
python
en
['en', 'error', 'th']
False
Pointcloud.customdatasrc
(self)
Sets the source reference on Chart Studio Cloud for customdata . The 'customdatasrc' 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 customdata . The 'customdatasrc' property must be specified as a string or as a plotly.grid_objs.Column object
def customdatasrc(self): """ Sets the source reference on Chart Studio Cloud for customdata . The 'customdatasrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["cust...
[ "def", "customdatasrc", "(", "self", ")", ":", "return", "self", "[", "\"customdatasrc\"", "]" ]
[ 74, 4 ]
[ 86, 36 ]
python
en
['en', 'error', 'th']
False
Pointcloud.hoverinfo
(self)
Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover events are still fired. The 'hoverinfo' property is a flaglist and may be specified as a string containing: ...
Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover events are still fired. The 'hoverinfo' property is a flaglist and may be specified as a string containing: ...
def hoverinfo(self): """ Determines which trace information appear on hover. If `none` or `skip` are set, no information is displayed upon hovering. But, if `none` is set, click and hover events are still fired. The 'hoverinfo' property is a flaglist and may be specified ...
[ "def", "hoverinfo", "(", "self", ")", ":", "return", "self", "[", "\"hoverinfo\"", "]" ]
[ 95, 4 ]
[ 112, 32 ]
python
en
['en', 'error', 'th']
False
Pointcloud.hoverinfosrc
(self)
Sets the source reference on Chart Studio Cloud for hoverinfo . The 'hoverinfosrc' 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 hoverinfo . The 'hoverinfosrc' property must be specified as a string or as a plotly.grid_objs.Column object
def hoverinfosrc(self): """ Sets the source reference on Chart Studio Cloud for hoverinfo . The 'hoverinfosrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["hoverin...
[ "def", "hoverinfosrc", "(", "self", ")", ":", "return", "self", "[", "\"hoverinfosrc\"", "]" ]
[ 121, 4 ]
[ 133, 35 ]
python
en
['en', 'error', 'th']
False
Pointcloud.hoverlabel
(self)
The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - An instance of :class:`plotly.graph_objs.pointcloud.Hoverlabel` - A dict of string/value properties that will be passed to the Hoverlabel constructor Supported dict proper...
The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - An instance of :class:`plotly.graph_objs.pointcloud.Hoverlabel` - A dict of string/value properties that will be passed to the Hoverlabel constructor Supported dict proper...
def hoverlabel(self): """ The 'hoverlabel' property is an instance of Hoverlabel that may be specified as: - An instance of :class:`plotly.graph_objs.pointcloud.Hoverlabel` - A dict of string/value properties that will be passed to the Hoverlabel constructor ...
[ "def", "hoverlabel", "(", "self", ")", ":", "return", "self", "[", "\"hoverlabel\"", "]" ]
[ 142, 4 ]
[ 192, 33 ]
python
en
['en', 'error', 'th']
False
Pointcloud.ids
(self)
Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. The 'ids' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Retur...
Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. The 'ids' property is an array that may be specified as a tuple, list, numpy array, or pandas Series
def ids(self): """ Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type. The 'ids' property is an array that may be specified as a tuple, list, numpy array, or pa...
[ "def", "ids", "(", "self", ")", ":", "return", "self", "[", "\"ids\"", "]" ]
[ 201, 4 ]
[ 214, 26 ]
python
en
['en', 'error', 'th']
False
Pointcloud.idssrc
(self)
Sets the source reference on Chart Studio Cloud for ids . The 'idssrc' 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 ids . The 'idssrc' property must be specified as a string or as a plotly.grid_objs.Column object
def idssrc(self): """ Sets the source reference on Chart Studio Cloud for ids . The 'idssrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["idssrc"]
[ "def", "idssrc", "(", "self", ")", ":", "return", "self", "[", "\"idssrc\"", "]" ]
[ 223, 4 ]
[ 234, 29 ]
python
en
['en', 'error', 'th']
False
Pointcloud.indices
(self)
A sequential value, 0..n, supply it to avoid creating this array inside plotting. If specified, it must be a typed `Int32Array` array. Its length must be equal to or greater than the number of points. For the best performance and memory use, create one large `indices` typed arra...
A sequential value, 0..n, supply it to avoid creating this array inside plotting. If specified, it must be a typed `Int32Array` array. Its length must be equal to or greater than the number of points. For the best performance and memory use, create one large `indices` typed arra...
def indices(self): """ A sequential value, 0..n, supply it to avoid creating this array inside plotting. If specified, it must be a typed `Int32Array` array. Its length must be equal to or greater than the number of points. For the best performance and memory use, create ...
[ "def", "indices", "(", "self", ")", ":", "return", "self", "[", "\"indices\"", "]" ]
[ 243, 4 ]
[ 260, 30 ]
python
en
['en', 'error', 'th']
False
Pointcloud.indicessrc
(self)
Sets the source reference on Chart Studio Cloud for indices . The 'indicessrc' 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 indices . The 'indicessrc' property must be specified as a string or as a plotly.grid_objs.Column object
def indicessrc(self): """ Sets the source reference on Chart Studio Cloud for indices . The 'indicessrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["indicessrc"]
[ "def", "indicessrc", "(", "self", ")", ":", "return", "self", "[", "\"indicessrc\"", "]" ]
[ 269, 4 ]
[ 280, 33 ]
python
en
['en', 'error', 'th']
False
Pointcloud.legendgroup
(self)
Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. The 'legendgroup' property is a string and must be specified as: - A string - A number that will be converted to a string R...
Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. The 'legendgroup' property is a string and must be specified as: - A string - A number that will be converted to a string
def legendgroup(self): """ Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items. The 'legendgroup' property is a string and must be specified as: - A string - A number that will b...
[ "def", "legendgroup", "(", "self", ")", ":", "return", "self", "[", "\"legendgroup\"", "]" ]
[ 289, 4 ]
[ 303, 34 ]
python
en
['en', 'error', 'th']
False
Pointcloud.marker
(self)
The 'marker' property is an instance of Marker that may be specified as: - An instance of :class:`plotly.graph_objs.pointcloud.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.pointcloud.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.pointcloud.Marker` - A dict of string/value properties that will be passed to the Marker constructor Supporte...
[ "def", "marker", "(", "self", ")", ":", "return", "self", "[", "\"marker\"", "]" ]
[ 312, 4 ]
[ 358, 29 ]
python
en
['en', 'error', 'th']
False
Pointcloud.meta
(self)
Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text` `rangeselector`, `updatemenues` and `sliders` `label` text all support `meta`. To acce...
Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text` `rangeselector`, `updatemenues` and `sliders` `label` text all support `meta`. To acce...
def meta(self): """ Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace `name`, graph, axis and colorbar `title.text`, annotation `text` `rangeselector`, `updatemenues` and `sliders` `label` text ...
[ "def", "meta", "(", "self", ")", ":", "return", "self", "[", "\"meta\"", "]" ]
[ 367, 4 ]
[ 386, 27 ]
python
en
['en', 'error', 'th']
False
Pointcloud.metasrc
(self)
Sets the source reference on Chart Studio Cloud for meta . The 'metasrc' 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 meta . The 'metasrc' property must be specified as a string or as a plotly.grid_objs.Column object
def metasrc(self): """ Sets the source reference on Chart Studio Cloud for meta . The 'metasrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["metasrc"]
[ "def", "metasrc", "(", "self", ")", ":", "return", "self", "[", "\"metasrc\"", "]" ]
[ 395, 4 ]
[ 406, 30 ]
python
en
['en', 'error', 'th']
False
Pointcloud.name
(self)
Sets the trace name. The trace name appear as the legend item and on hover. The 'name' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str
Sets the trace name. The trace name appear as the legend item and on hover. The 'name' property is a string and must be specified as: - A string - A number that will be converted to a string
def name(self): """ Sets the trace name. The trace name appear as the legend item and on hover. The 'name' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str ...
[ "def", "name", "(", "self", ")", ":", "return", "self", "[", "\"name\"", "]" ]
[ 415, 4 ]
[ 428, 27 ]
python
en
['en', 'error', 'th']
False
Pointcloud.opacity
(self)
Sets the opacity of the trace. 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 opacity of the trace. 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 opacity of the trace. The 'opacity' property is a number and may be specified as: - An int or float in the interval [0, 1] Returns ------- int|float """ return self["opacity"]
[ "def", "opacity", "(", "self", ")", ":", "return", "self", "[", "\"opacity\"", "]" ]
[ 437, 4 ]
[ 448, 30 ]
python
en
['en', 'error', 'th']
False
Pointcloud.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\"", "]" ]
[ 457, 4 ]
[ 469, 33 ]
python
en
['en', 'error', 'th']
False
Pointcloud.stream
(self)
The 'stream' property is an instance of Stream that may be specified as: - An instance of :class:`plotly.graph_objs.pointcloud.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.pointcloud.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.pointcloud.Stream` - A dict of string/value properties that will be passed to the Stream constructor Supporte...
[ "def", "stream", "(", "self", ")", ":", "return", "self", "[", "\"stream\"", "]" ]
[ 478, 4 ]
[ 502, 29 ]
python
en
['en', 'error', 'th']
False
Pointcloud.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\"", "]" ]
[ 511, 4 ]
[ 529, 27 ]
python
en
['en', 'error', 'th']
False
Pointcloud.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\"", "]" ]
[ 538, 4 ]
[ 549, 30 ]
python
en
['en', 'error', 'th']
False
Pointcloud.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\"", "]" ]
[ 558, 4 ]
[ 571, 26 ]
python
en
['en', 'error', 'th']
False
Pointcloud.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\"", "]" ]
[ 580, 4 ]
[ 604, 33 ]
python
en
['en', 'error', 'th']
False
Pointcloud.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\"", "]" ]
[ 613, 4 ]
[ 627, 30 ]
python
en
['en', 'error', 'th']
False
Pointcloud.x
(self)
Sets the x coordinates. The 'x' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray
Sets the x coordinates. The 'x' property is an array that may be specified as a tuple, list, numpy array, or pandas Series
def x(self): """ Sets the x coordinates. The 'x' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ return self["x"]
[ "def", "x", "(", "self", ")", ":", "return", "self", "[", "\"x\"", "]" ]
[ 636, 4 ]
[ 647, 24 ]
python
en
['en', 'error', 'th']
False
Pointcloud.xaxis
(self)
Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If "x" (the default value), the x coordinates refer to `layout.xaxis`. If "x2", the x coordinates refer to `layout.xaxis2`, and so on. The 'xaxis' property is an identifier of a particular ...
Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If "x" (the default value), the x coordinates refer to `layout.xaxis`. If "x2", the x coordinates refer to `layout.xaxis2`, and so on. The 'xaxis' property is an identifier of a particular ...
def xaxis(self): """ Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If "x" (the default value), the x coordinates refer to `layout.xaxis`. If "x2", the x coordinates refer to `layout.xaxis2`, and so on. The 'xaxis' property is an ident...
[ "def", "xaxis", "(", "self", ")", ":", "return", "self", "[", "\"xaxis\"", "]" ]
[ 656, 4 ]
[ 672, 28 ]
python
en
['en', 'error', 'th']
False
Pointcloud.xbounds
(self)
Specify `xbounds` in the shape of `[xMin, xMax] to avoid looping through the `xy` typed array. Use it in conjunction with `xy` and `ybounds` for the performance benefits. The 'xbounds' property is an array that may be specified as a tuple, list, numpy array, or pandas Serie...
Specify `xbounds` in the shape of `[xMin, xMax] to avoid looping through the `xy` typed array. Use it in conjunction with `xy` and `ybounds` for the performance benefits. The 'xbounds' property is an array that may be specified as a tuple, list, numpy array, or pandas Serie...
def xbounds(self): """ Specify `xbounds` in the shape of `[xMin, xMax] to avoid looping through the `xy` typed array. Use it in conjunction with `xy` and `ybounds` for the performance benefits. The 'xbounds' property is an array that may be specified as a tuple, list...
[ "def", "xbounds", "(", "self", ")", ":", "return", "self", "[", "\"xbounds\"", "]" ]
[ 681, 4 ]
[ 694, 30 ]
python
en
['en', 'error', 'th']
False
Pointcloud.xboundssrc
(self)
Sets the source reference on Chart Studio Cloud for xbounds . The 'xboundssrc' 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 xbounds . The 'xboundssrc' property must be specified as a string or as a plotly.grid_objs.Column object
def xboundssrc(self): """ Sets the source reference on Chart Studio Cloud for xbounds . The 'xboundssrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["xboundssrc"]
[ "def", "xboundssrc", "(", "self", ")", ":", "return", "self", "[", "\"xboundssrc\"", "]" ]
[ 703, 4 ]
[ 714, 33 ]
python
en
['en', 'error', 'th']
False
Pointcloud.xsrc
(self)
Sets the source reference on Chart Studio Cloud for x . The 'xsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for x . The 'xsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def xsrc(self): """ Sets the source reference on Chart Studio Cloud for x . The 'xsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["xsrc"]
[ "def", "xsrc", "(", "self", ")", ":", "return", "self", "[", "\"xsrc\"", "]" ]
[ 723, 4 ]
[ 734, 27 ]
python
en
['en', 'error', 'th']
False
Pointcloud.xy
(self)
Faster alternative to specifying `x` and `y` separately. If supplied, it must be a typed `Float32Array` array that represents points such that `xy[i * 2] = x[i]` and `xy[i * 2 + 1] = y[i]` The 'xy' property is an array that may be specified as a tuple, list, numpy a...
Faster alternative to specifying `x` and `y` separately. If supplied, it must be a typed `Float32Array` array that represents points such that `xy[i * 2] = x[i]` and `xy[i * 2 + 1] = y[i]` The 'xy' property is an array that may be specified as a tuple, list, numpy a...
def xy(self): """ Faster alternative to specifying `x` and `y` separately. If supplied, it must be a typed `Float32Array` array that represents points such that `xy[i * 2] = x[i]` and `xy[i * 2 + 1] = y[i]` The 'xy' property is an array that may be specified as a tup...
[ "def", "xy", "(", "self", ")", ":", "return", "self", "[", "\"xy\"", "]" ]
[ 743, 4 ]
[ 757, 25 ]
python
en
['en', 'error', 'th']
False
Pointcloud.xysrc
(self)
Sets the source reference on Chart Studio Cloud for xy . The 'xysrc' 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 xy . The 'xysrc' property must be specified as a string or as a plotly.grid_objs.Column object
def xysrc(self): """ Sets the source reference on Chart Studio Cloud for xy . The 'xysrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["xysrc"]
[ "def", "xysrc", "(", "self", ")", ":", "return", "self", "[", "\"xysrc\"", "]" ]
[ 766, 4 ]
[ 777, 28 ]
python
en
['en', 'error', 'th']
False
Pointcloud.y
(self)
Sets the y coordinates. The 'y' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray
Sets the y coordinates. The 'y' property is an array that may be specified as a tuple, list, numpy array, or pandas Series
def y(self): """ Sets the y coordinates. The 'y' property is an array that may be specified as a tuple, list, numpy array, or pandas Series Returns ------- numpy.ndarray """ return self["y"]
[ "def", "y", "(", "self", ")", ":", "return", "self", "[", "\"y\"", "]" ]
[ 786, 4 ]
[ 797, 24 ]
python
en
['en', 'error', 'th']
False
Pointcloud.yaxis
(self)
Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If "y" (the default value), the y coordinates refer to `layout.yaxis`. If "y2", the y coordinates refer to `layout.yaxis2`, and so on. The 'yaxis' property is an identifier of a particular ...
Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If "y" (the default value), the y coordinates refer to `layout.yaxis`. If "y2", the y coordinates refer to `layout.yaxis2`, and so on. The 'yaxis' property is an identifier of a particular ...
def yaxis(self): """ Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If "y" (the default value), the y coordinates refer to `layout.yaxis`. If "y2", the y coordinates refer to `layout.yaxis2`, and so on. The 'yaxis' property is an ident...
[ "def", "yaxis", "(", "self", ")", ":", "return", "self", "[", "\"yaxis\"", "]" ]
[ 806, 4 ]
[ 822, 28 ]
python
en
['en', 'error', 'th']
False
Pointcloud.ybounds
(self)
Specify `ybounds` in the shape of `[yMin, yMax] to avoid looping through the `xy` typed array. Use it in conjunction with `xy` and `xbounds` for the performance benefits. The 'ybounds' property is an array that may be specified as a tuple, list, numpy array, or pandas Serie...
Specify `ybounds` in the shape of `[yMin, yMax] to avoid looping through the `xy` typed array. Use it in conjunction with `xy` and `xbounds` for the performance benefits. The 'ybounds' property is an array that may be specified as a tuple, list, numpy array, or pandas Serie...
def ybounds(self): """ Specify `ybounds` in the shape of `[yMin, yMax] to avoid looping through the `xy` typed array. Use it in conjunction with `xy` and `xbounds` for the performance benefits. The 'ybounds' property is an array that may be specified as a tuple, list...
[ "def", "ybounds", "(", "self", ")", ":", "return", "self", "[", "\"ybounds\"", "]" ]
[ 831, 4 ]
[ 844, 30 ]
python
en
['en', 'error', 'th']
False
Pointcloud.yboundssrc
(self)
Sets the source reference on Chart Studio Cloud for ybounds . The 'yboundssrc' 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 ybounds . The 'yboundssrc' property must be specified as a string or as a plotly.grid_objs.Column object
def yboundssrc(self): """ Sets the source reference on Chart Studio Cloud for ybounds . The 'yboundssrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["yboundssrc"]
[ "def", "yboundssrc", "(", "self", ")", ":", "return", "self", "[", "\"yboundssrc\"", "]" ]
[ 853, 4 ]
[ 864, 33 ]
python
en
['en', 'error', 'th']
False
Pointcloud.ysrc
(self)
Sets the source reference on Chart Studio Cloud for y . The 'ysrc' 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 y . The 'ysrc' property must be specified as a string or as a plotly.grid_objs.Column object
def ysrc(self): """ Sets the source reference on Chart Studio Cloud for y . The 'ysrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["ysrc"]
[ "def", "ysrc", "(", "self", ")", ":", "return", "self", "[", "\"ysrc\"", "]" ]
[ 873, 4 ]
[ 884, 27 ]
python
en
['en', 'error', 'th']
False
Pointcloud.__init__
( self, arg=None, customdata=None, customdatasrc=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, ids=None, idssrc=None, indices=None, indicessrc=None, legendgroup=None, marker=None, meta=None, ...
Construct a new Pointcloud object The data visualized as a point cloud set in `x` and `y` using the WebGl plotting engine. Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.gra...
Construct a new Pointcloud object The data visualized as a point cloud set in `x` and `y` using the WebGl plotting engine.
def __init__( self, arg=None, customdata=None, customdatasrc=None, hoverinfo=None, hoverinfosrc=None, hoverlabel=None, ids=None, idssrc=None, indices=None, indicessrc=None, legendgroup=None, marker=None, meta...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "customdata", "=", "None", ",", "customdatasrc", "=", "None", ",", "hoverinfo", "=", "None", ",", "hoverinfosrc", "=", "None", ",", "hoverlabel", "=", "None", ",", "ids", "=", "None", ",", ...
[ 1057, 4 ]
[ 1444, 34 ]
python
en
['en', 'error', 'th']
False
TestDisplayData.test_output
(self)
Does display_data reach the end of the loop?
Does display_data reach the end of the loop?
def test_output(self): """ Does display_data reach the end of the loop? """ str_output, _, _ = testing_utils.display_data( {'num_examples': 1, 'task': 'babi:task1k:1', 'verbose': True} ) self.assertGreater(len(str_output), 0, "Output is empty") self.a...
[ "def", "test_output", "(", "self", ")", ":", "str_output", ",", "_", ",", "_", "=", "testing_utils", ".", "display_data", "(", "{", "'num_examples'", ":", "1", ",", "'task'", ":", "'babi:task1k:1'", ",", "'verbose'", ":", "True", "}", ")", "self", ".", ...
[ 14, 4 ]
[ 24, 74 ]
python
en
['en', 'error', 'th']
False
_cache_lockfuncs
()
Updates the cache.
Updates the cache.
def _cache_lockfuncs(): """ Updates the cache. """ global _LOCKFUNCS _LOCKFUNCS = {} for modulepath in settings.LOCK_FUNC_MODULES: _LOCKFUNCS.update(utils.callables_from_module(modulepath))
[ "def", "_cache_lockfuncs", "(", ")", ":", "global", "_LOCKFUNCS", "_LOCKFUNCS", "=", "{", "}", "for", "modulepath", "in", "settings", ".", "LOCK_FUNC_MODULES", ":", "_LOCKFUNCS", ".", "update", "(", "utils", ".", "callables_from_module", "(", "modulepath", ")", ...
[ 140, 0 ]
[ 147, 66 ]
python
en
['en', 'error', 'th']
False
check_lockstring
(self, accessing_obj, lockstring, no_superuser_bypass=False, default=False, access_type=None)
Do a direct check against a lockstring ('atype:func()..'), without any intermediary storage on the accessed object. Args: accessing_obj (object or None): The object seeking access. Importantly, this can be left unset if the lock functions don't access it, no updating or sto...
Do a direct check against a lockstring ('atype:func()..'), without any intermediary storage on the accessed object.
def check_lockstring(self, accessing_obj, lockstring, no_superuser_bypass=False, default=False, access_type=None): """ Do a direct check against a lockstring ('atype:func()..'), without any intermediary storage on the accessed object. Args: accessing_obj (object or None): T...
[ "def", "check_lockstring", "(", "self", ",", "accessing_obj", ",", "lockstring", ",", "no_superuser_bypass", "=", "False", ",", "default", "=", "False", ",", "access_type", "=", "None", ")", ":", "global", "_LOCKHANDLER", "if", "not", "_LOCKHANDLER", ":", "_LO...
[ 620, 0 ]
[ 650, 49 ]
python
en
['en', 'error', 'th']
False
validate_lockstring
(lockstring)
Validate so lockstring is on a valid form. Args: lockstring (str): Lockstring to validate. Returns: is_valid (bool): If the lockstring is valid or not. error (str or None): A string describing the error, or None if no error was found.
Validate so lockstring is on a valid form.
def validate_lockstring(lockstring): """ Validate so lockstring is on a valid form. Args: lockstring (str): Lockstring to validate. Returns: is_valid (bool): If the lockstring is valid or not. error (str or None): A string describing the error, or None if no error w...
[ "def", "validate_lockstring", "(", "lockstring", ")", ":", "global", "_LOCK_HANDLER", "if", "not", "_LOCK_HANDLER", ":", "_LOCK_HANDLER", "=", "LockHandler", "(", "_ObjDummy", "(", ")", ")", "return", "_LOCK_HANDLER", ".", "validate", "(", "lockstring", ")" ]
[ 653, 0 ]
[ 669, 45 ]
python
en
['en', 'error', 'th']
False
get_all_lockfuncs
()
Get a dict of available lock funcs. Returns: lockfuncs (dict): Mapping {lockfuncname:func}.
Get a dict of available lock funcs.
def get_all_lockfuncs(): """ Get a dict of available lock funcs. Returns: lockfuncs (dict): Mapping {lockfuncname:func}. """ if not _LOCKFUNCS: _cache_lockfuncs() return _LOCKFUNCS
[ "def", "get_all_lockfuncs", "(", ")", ":", "if", "not", "_LOCKFUNCS", ":", "_cache_lockfuncs", "(", ")", "return", "_LOCKFUNCS" ]
[ 672, 0 ]
[ 682, 21 ]
python
en
['en', 'error', 'th']
False
LockHandler.__init__
(self, obj)
Loads and pre-caches all relevant locks and their functions. Args: obj (object): The object on which the lockhandler is defined.
Loads and pre-caches all relevant locks and their functions.
def __init__(self, obj): """ Loads and pre-caches all relevant locks and their functions. Args: obj (object): The object on which the lockhandler is defined. """ if not _LOCKFUNCS: _cache_lockfuncs() self.obj = obj self.locks ...
[ "def", "__init__", "(", "self", ",", "obj", ")", ":", "if", "not", "_LOCKFUNCS", ":", "_cache_lockfuncs", "(", ")", "self", ".", "obj", "=", "obj", "self", ".", "locks", "=", "{", "}", "try", ":", "self", ".", "reset", "(", ")", "except", "LockExce...
[ 172, 4 ]
[ 188, 33 ]
python
en
['en', 'error', 'th']
False
LockHandler._log_error
(self, message)
Try to log errors back to object
Try to log errors back to object
def _log_error(self, message): "Try to log errors back to object" raise LockException(message)
[ "def", "_log_error", "(", "self", ",", "message", ")", ":", "raise", "LockException", "(", "message", ")" ]
[ 193, 4 ]
[ 195, 36 ]
python
en
['en', 'en', 'en']
True
LockHandler._parse_lockstring
(self, storage_lockstring)
Helper function. This is normally only called when the lockstring is cached and does preliminary checking. locks are stored as a string atype:[NOT] lock()[[ AND|OR [NOT] lock()[...]];atype... Args: storage_locksring (str): The lockstring to parse.
Helper function. This is normally only called when the lockstring is cached and does preliminary checking. locks are stored as a string
def _parse_lockstring(self, storage_lockstring): """ Helper function. This is normally only called when the lockstring is cached and does preliminary checking. locks are stored as a string atype:[NOT] lock()[[ AND|OR [NOT] lock()[...]];atype... Args: st...
[ "def", "_parse_lockstring", "(", "self", ",", "storage_lockstring", ")", ":", "locks", "=", "{", "}", "if", "not", "storage_lockstring", ":", "return", "locks", "duplicates", "=", "0", "elist", "=", "[", "]", "# errors", "wlist", "=", "[", "]", "# warnings...
[ 197, 4 ]
[ 262, 20 ]
python
en
['en', 'error', 'th']
False
LockHandler._cache_locks
(self, storage_lockstring)
Store data
Store data
def _cache_locks(self, storage_lockstring): """ Store data """ self.locks = self._parse_lockstring(storage_lockstring)
[ "def", "_cache_locks", "(", "self", ",", "storage_lockstring", ")", ":", "self", ".", "locks", "=", "self", ".", "_parse_lockstring", "(", "storage_lockstring", ")" ]
[ 264, 4 ]
[ 268, 63 ]
python
en
['en', 'error', 'th']
False
LockHandler._save_locks
(self)
Store locks to obj
Store locks to obj
def _save_locks(self): """ Store locks to obj """ self.obj.lock_storage = ";".join([tup[2] for tup in self.locks.values()])
[ "def", "_save_locks", "(", "self", ")", ":", "self", ".", "obj", ".", "lock_storage", "=", "\";\"", ".", "join", "(", "[", "tup", "[", "2", "]", "for", "tup", "in", "self", ".", "locks", ".", "values", "(", ")", "]", ")" ]
[ 270, 4 ]
[ 274, 81 ]
python
en
['en', 'error', 'th']
False
LockHandler.cache_lock_bypass
(self, obj)
We cache superuser bypass checks here for efficiency. This needs to be re-run when an account is assigned to a character. We need to grant access to superusers. We need to check both directly on the object (accounts), through obj.account and using the get_account() method (this ...
We cache superuser bypass checks here for efficiency. This needs to be re-run when an account is assigned to a character. We need to grant access to superusers. We need to check both directly on the object (accounts), through obj.account and using the get_account() method (this ...
def cache_lock_bypass(self, obj): """ We cache superuser bypass checks here for efficiency. This needs to be re-run when an account is assigned to a character. We need to grant access to superusers. We need to check both directly on the object (accounts), through obj.account and ...
[ "def", "cache_lock_bypass", "(", "self", ",", "obj", ")", ":", "self", ".", "lock_bypass", "=", "hasattr", "(", "obj", ",", "\"is_superuser\"", ")", "and", "obj", ".", "is_superuser" ]
[ 276, 4 ]
[ 290, 76 ]
python
en
['en', 'error', 'th']
False
LockHandler.add
(self, lockstring, validate_only=False)
Add a new lockstring to handler. Args: lockstring (str or list): A string on the form `"<access_type>:<functions>"`. Multiple access types should be separated by semicolon (`;`). Alternatively, a list with lockstrings. validate_o...
Add a new lockstring to handler.
def add(self, lockstring, validate_only=False): """ Add a new lockstring to handler. Args: lockstring (str or list): A string on the form `"<access_type>:<functions>"`. Multiple access types should be separated by semicolon (`;`). Alternatively, ...
[ "def", "add", "(", "self", ",", "lockstring", ",", "validate_only", "=", "False", ")", ":", "if", "isinstance", "(", "lockstring", ",", "basestring", ")", ":", "lockdefs", "=", "lockstring", ".", "split", "(", "\";\"", ")", "else", ":", "lockdefs", "=", ...
[ 292, 4 ]
[ 359, 19 ]
python
en
['en', 'error', 'th']
False
LockHandler.validate
(self, lockstring)
Validate lockstring syntactically, without saving it. Args: lockstring (str): Lockstring to validate. Returns: valid (bool): If validation passed or not.
Validate lockstring syntactically, without saving it.
def validate(self, lockstring): """ Validate lockstring syntactically, without saving it. Args: lockstring (str): Lockstring to validate. Returns: valid (bool): If validation passed or not. """ return self.add(lockstring, validate_only=True)
[ "def", "validate", "(", "self", ",", "lockstring", ")", ":", "return", "self", ".", "add", "(", "lockstring", ",", "validate_only", "=", "True", ")" ]
[ 361, 4 ]
[ 371, 55 ]
python
en
['en', 'error', 'th']
False
LockHandler.replace
(self, lockstring)
Replaces the lockstring entirely. Args: lockstring (str): The new lock definition. Return: success (bool): False if an error occurred. Raises: LockException: If a critical error occurred. If so, the old string is recovered. ...
Replaces the lockstring entirely.
def replace(self, lockstring): """ Replaces the lockstring entirely. Args: lockstring (str): The new lock definition. Return: success (bool): False if an error occurred. Raises: LockException: If a critical error occurred. If...
[ "def", "replace", "(", "self", ",", "lockstring", ")", ":", "old_lockstring", "=", "str", "(", "self", ")", "self", ".", "clear", "(", ")", "try", ":", "return", "self", ".", "add", "(", "lockstring", ")", "except", "LockException", ":", "self", ".", ...
[ 373, 4 ]
[ 394, 17 ]
python
en
['en', 'error', 'th']
False
LockHandler.get
(self, access_type=None)
Get the full lockstring or the lockstring of a particular access type. Args: access_type (str, optional): Returns: lockstring (str): The matched lockstring, or the full lockstring if no access_type was given.
Get the full lockstring or the lockstring of a particular access type.
def get(self, access_type=None): """ Get the full lockstring or the lockstring of a particular access type. Args: access_type (str, optional): Returns: lockstring (str): The matched lockstring, or the full lockstring if no access_type was...
[ "def", "get", "(", "self", ",", "access_type", "=", "None", ")", ":", "if", "access_type", ":", "return", "self", ".", "locks", ".", "get", "(", "access_type", ",", "[", "\"\"", ",", "\"\"", ",", "\"\"", "]", ")", "[", "2", "]", "return", "str", ...
[ 396, 4 ]
[ 411, 24 ]
python
en
['en', 'error', 'th']
False
LockHandler.all
(self)
Return all lockstrings Returns: lockstrings (list): All separate lockstrings
Return all lockstrings
def all(self): """ Return all lockstrings Returns: lockstrings (list): All separate lockstrings """ return str(self).split(';')
[ "def", "all", "(", "self", ")", ":", "return", "str", "(", "self", ")", ".", "split", "(", "';'", ")" ]
[ 413, 4 ]
[ 421, 35 ]
python
en
['en', 'error', 'th']
False
LockHandler.remove
(self, access_type)
Remove a particular lock from the handler Args: access_type (str): The type of lock to remove. Returns: success (bool): If the access_type was not found in the lock, this returns `False`.
Remove a particular lock from the handler
def remove(self, access_type): """ Remove a particular lock from the handler Args: access_type (str): The type of lock to remove. Returns: success (bool): If the access_type was not found in the lock, this returns `False`. """ if...
[ "def", "remove", "(", "self", ",", "access_type", ")", ":", "if", "access_type", "in", "self", ".", "locks", ":", "del", "self", ".", "locks", "[", "access_type", "]", "self", ".", "_save_locks", "(", ")", "return", "True", "return", "False" ]
[ 423, 4 ]
[ 439, 20 ]
python
en
['en', 'error', 'th']
False
LockHandler.clear
(self)
Remove all locks in the handler.
Remove all locks in the handler.
def clear(self): """ Remove all locks in the handler. """ self.locks = {} self.lock_storage = "" self._save_locks()
[ "def", "clear", "(", "self", ")", ":", "self", ".", "locks", "=", "{", "}", "self", ".", "lock_storage", "=", "\"\"", "self", ".", "_save_locks", "(", ")" ]
[ 442, 4 ]
[ 449, 26 ]
python
en
['en', 'error', 'th']
False
LockHandler.reset
(self)
Set the reset flag, so the the lock will be re-cached at next checking. This is usually called by @reload.
Set the reset flag, so the the lock will be re-cached at next checking. This is usually called by @reload.
def reset(self): """ Set the reset flag, so the the lock will be re-cached at next checking. This is usually called by @reload. """ self._cache_locks(self.obj.lock_storage) self.cache_lock_bypass(self.obj)
[ "def", "reset", "(", "self", ")", ":", "self", ".", "_cache_locks", "(", "self", ".", "obj", ".", "lock_storage", ")", "self", ".", "cache_lock_bypass", "(", "self", ".", "obj", ")" ]
[ 451, 4 ]
[ 458, 40 ]
python
en
['en', 'error', 'th']
False
LockHandler.append
(self, access_type, lockstring, op='or')
Append a lock definition to access_type if it doesn't already exist. Args: access_type (str): Access type. lockstring (str): A valid lockstring, without the operator to link it to an eventual existing lockstring. op (str): An operator 'and', 'or', 'a...
Append a lock definition to access_type if it doesn't already exist.
def append(self, access_type, lockstring, op='or'): """ Append a lock definition to access_type if it doesn't already exist. Args: access_type (str): Access type. lockstring (str): A valid lockstring, without the operator to link it to an eventual existin...
[ "def", "append", "(", "self", ",", "access_type", ",", "lockstring", ",", "op", "=", "'or'", ")", ":", "old_lockstring", "=", "self", ".", "get", "(", "access_type", ")", "if", "not", "lockstring", ".", "strip", "(", ")", ".", "lower", "(", ")", "in"...
[ 460, 4 ]
[ 480, 32 ]
python
en
['en', 'error', 'th']
False
LockHandler.check
(self, accessing_obj, access_type, default=False, no_superuser_bypass=False)
Checks a lock of the correct type by passing execution off to the lock function(s). Args: accessing_obj (object): The object seeking access. access_type (str): The type of access wanted. default (bool, optional): If no suitable lock type is f...
Checks a lock of the correct type by passing execution off to the lock function(s).
def check(self, accessing_obj, access_type, default=False, no_superuser_bypass=False): """ Checks a lock of the correct type by passing execution off to the lock function(s). Args: accessing_obj (object): The object seeking access. access_type (str): The type of ...
[ "def", "check", "(", "self", ",", "accessing_obj", ",", "access_type", ",", "default", "=", "False", ",", "no_superuser_bypass", "=", "False", ")", ":", "try", ":", "# check if the lock should be bypassed (e.g. superuser status)", "if", "accessing_obj", ".", "locks", ...
[ 482, 4 ]
[ 540, 26 ]
python
en
['en', 'error', 'th']
False
LockHandler._eval_access_type
(self, accessing_obj, locks, access_type)
Helper method for evaluating the access type using eval(). Args: accessing_obj (object): Object seeking access. locks (dict): The pre-parsed representation of all access-types. access_type (str): An access-type key to evaluate.
Helper method for evaluating the access type using eval().
def _eval_access_type(self, accessing_obj, locks, access_type): """ Helper method for evaluating the access type using eval(). Args: accessing_obj (object): Object seeking access. locks (dict): The pre-parsed representation of all access-types. access_type (s...
[ "def", "_eval_access_type", "(", "self", ",", "accessing_obj", ",", "locks", ",", "access_type", ")", ":", "evalstring", ",", "func_tup", ",", "raw_string", "=", "locks", "[", "access_type", "]", "true_false", "=", "tuple", "(", "tup", "[", "0", "]", "(", ...
[ 542, 4 ]
[ 555, 44 ]
python
en
['en', 'error', 'th']
False
LockHandler.check_lockstring
(self, accessing_obj, lockstring, no_superuser_bypass=False, default=False, access_type=None)
Do a direct check against a lockstring ('atype:func()..'), without any intermediary storage on the accessed object. Args: accessing_obj (object or None): The object seeking access. Importantly, this can be left unset if the lock functions don't acces...
Do a direct check against a lockstring ('atype:func()..'), without any intermediary storage on the accessed object.
def check_lockstring(self, accessing_obj, lockstring, no_superuser_bypass=False, default=False, access_type=None): """ Do a direct check against a lockstring ('atype:func()..'), without any intermediary storage on the accessed object. Args: accessing...
[ "def", "check_lockstring", "(", "self", ",", "accessing_obj", ",", "lockstring", ",", "no_superuser_bypass", "=", "False", ",", "default", "=", "False", ",", "access_type", "=", "None", ")", ":", "try", ":", "if", "accessing_obj", ".", "locks", ".", "lock_by...
[ 557, 4 ]
[ 609, 76 ]
python
en
['en', 'error', 'th']
False