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
ErrorY.arrayminussrc
(self)
Sets the source reference on Chart Studio Cloud for arrayminus . The 'arrayminussrc' 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 arrayminus . The 'arrayminussrc' property must be specified as a string or as a plotly.grid_objs.Column object
def arrayminussrc(self): """ Sets the source reference on Chart Studio Cloud for arrayminus . The 'arrayminussrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["arra...
[ "def", "arrayminussrc", "(", "self", ")", ":", "return", "self", "[", "\"arrayminussrc\"", "]" ]
[ 73, 4 ]
[ 85, 36 ]
python
en
['en', 'error', 'th']
False
ErrorY.arraysrc
(self)
Sets the source reference on Chart Studio Cloud for array . The 'arraysrc' 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 array . The 'arraysrc' property must be specified as a string or as a plotly.grid_objs.Column object
def arraysrc(self): """ Sets the source reference on Chart Studio Cloud for array . The 'arraysrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["arraysrc"]
[ "def", "arraysrc", "(", "self", ")", ":", "return", "self", "[", "\"arraysrc\"", "]" ]
[ 94, 4 ]
[ 105, 31 ]
python
en
['en', 'error', 'th']
False
ErrorY.color
(self)
Sets the stoke color of the error bars. 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%,1...
Sets the stoke color of the error bars. 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%,1...
def color(self): """ Sets the stoke color of the error bars. 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/hsv...
[ "def", "color", "(", "self", ")", ":", "return", "self", "[", "\"color\"", "]" ]
[ 114, 4 ]
[ 164, 28 ]
python
en
['en', 'error', 'th']
False
ErrorY.symmetric
(self)
Determines whether or not the error bars have the same length in both direction (top/bottom for vertical bars, left/right for horizontal bars. The 'symmetric' property must be specified as a bool (either True, or False) Returns ------- bool
Determines whether or not the error bars have the same length in both direction (top/bottom for vertical bars, left/right for horizontal bars. The 'symmetric' property must be specified as a bool (either True, or False)
def symmetric(self): """ Determines whether or not the error bars have the same length in both direction (top/bottom for vertical bars, left/right for horizontal bars. The 'symmetric' property must be specified as a bool (either True, or False) Returns ...
[ "def", "symmetric", "(", "self", ")", ":", "return", "self", "[", "\"symmetric\"", "]" ]
[ 173, 4 ]
[ 186, 32 ]
python
en
['en', 'error', 'th']
False
ErrorY.thickness
(self)
Sets the thickness (in px) of the error bars. The 'thickness' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float
Sets the thickness (in px) of the error bars. The 'thickness' property is a number and may be specified as: - An int or float in the interval [0, inf]
def thickness(self): """ Sets the thickness (in px) of the error bars. The 'thickness' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float """ return self["thickness"]
[ "def", "thickness", "(", "self", ")", ":", "return", "self", "[", "\"thickness\"", "]" ]
[ 195, 4 ]
[ 206, 32 ]
python
en
['en', 'error', 'th']
False
ErrorY.traceref
(self)
The 'traceref' 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 ------- int
The 'traceref' 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 traceref(self): """ The 'traceref' 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 ------- int """ return self["traceref"]
[ "def", "traceref", "(", "self", ")", ":", "return", "self", "[", "\"traceref\"", "]" ]
[ 215, 4 ]
[ 225, 31 ]
python
en
['en', 'error', 'th']
False
ErrorY.tracerefminus
(self)
The 'tracerefminus' 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 ------- int
The 'tracerefminus' 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 tracerefminus(self): """ The 'tracerefminus' 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 ------- int """ return self["tracerefminus"]
[ "def", "tracerefminus", "(", "self", ")", ":", "return", "self", "[", "\"tracerefminus\"", "]" ]
[ 234, 4 ]
[ 244, 36 ]
python
en
['en', 'error', 'th']
False
ErrorY.type
(self)
Determines the rule used to generate the error bars. If *constant`, the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar lengths corr...
Determines the rule used to generate the error bars. If *constant`, the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar lengths corr...
def type(self): """ Determines the rule used to generate the error bars. If *constant`, the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "...
[ "def", "type", "(", "self", ")", ":", "return", "self", "[", "\"type\"", "]" ]
[ 253, 4 ]
[ 271, 27 ]
python
en
['en', 'error', 'th']
False
ErrorY.value
(self)
Sets the value of either the percentage (if `type` is set to "percent") or the constant (if `type` is set to "constant") corresponding to the lengths of the error bars. The 'value' property is a number and may be specified as: - An int or float in the interval [0, inf] ...
Sets the value of either the percentage (if `type` is set to "percent") or the constant (if `type` is set to "constant") corresponding to the lengths of the error bars. The 'value' property is a number and may be specified as: - An int or float in the interval [0, inf]
def value(self): """ Sets the value of either the percentage (if `type` is set to "percent") or the constant (if `type` is set to "constant") corresponding to the lengths of the error bars. The 'value' property is a number and may be specified as: - An int or float...
[ "def", "value", "(", "self", ")", ":", "return", "self", "[", "\"value\"", "]" ]
[ 280, 4 ]
[ 293, 28 ]
python
en
['en', 'error', 'th']
False
ErrorY.valueminus
(self)
Sets the value of either the percentage (if `type` is set to "percent") or the constant (if `type` is set to "constant") corresponding to the lengths of the error bars in the bottom (left) direction for vertical (horizontal) bars The 'valueminus' property is a number and ma...
Sets the value of either the percentage (if `type` is set to "percent") or the constant (if `type` is set to "constant") corresponding to the lengths of the error bars in the bottom (left) direction for vertical (horizontal) bars The 'valueminus' property is a number and ma...
def valueminus(self): """ Sets the value of either the percentage (if `type` is set to "percent") or the constant (if `type` is set to "constant") corresponding to the lengths of the error bars in the bottom (left) direction for vertical (horizontal) bars The 'valuem...
[ "def", "valueminus", "(", "self", ")", ":", "return", "self", "[", "\"valueminus\"", "]" ]
[ 302, 4 ]
[ 316, 33 ]
python
en
['en', 'error', 'th']
False
ErrorY.visible
(self)
Determines whether or not this set of error bars is visible. The 'visible' property must be specified as a bool (either True, or False) Returns ------- bool
Determines whether or not this set of error bars is visible. The 'visible' property must be specified as a bool (either True, or False)
def visible(self): """ Determines whether or not this set of error bars is visible. The 'visible' property must be specified as a bool (either True, or False) Returns ------- bool """ return self["visible"]
[ "def", "visible", "(", "self", ")", ":", "return", "self", "[", "\"visible\"", "]" ]
[ 325, 4 ]
[ 336, 30 ]
python
en
['en', 'error', 'th']
False
ErrorY.width
(self)
Sets the width (in px) of the cross-bar at both ends of the error bars. The 'width' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float
Sets the width (in px) of the cross-bar at both ends of the error bars. The 'width' property is a number and may be specified as: - An int or float in the interval [0, inf]
def width(self): """ Sets the width (in px) of the cross-bar at both ends of the error bars. The 'width' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float """ return s...
[ "def", "width", "(", "self", ")", ":", "return", "self", "[", "\"width\"", "]" ]
[ 345, 4 ]
[ 357, 28 ]
python
en
['en', 'error', 'th']
False
ErrorY.__init__
( self, arg=None, array=None, arrayminus=None, arrayminussrc=None, arraysrc=None, color=None, symmetric=None, thickness=None, traceref=None, tracerefminus=None, type=None, value=None, valueminus=None, ...
Construct a new ErrorY object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scattergl.ErrorY` array Sets the data corresponding the length of each...
Construct a new ErrorY object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scattergl.ErrorY` array Sets the data corresponding the length of each...
def __init__( self, arg=None, array=None, arrayminus=None, arrayminussrc=None, arraysrc=None, color=None, symmetric=None, thickness=None, traceref=None, tracerefminus=None, type=None, value=None, valueminus=N...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "array", "=", "None", ",", "arrayminus", "=", "None", ",", "arrayminussrc", "=", "None", ",", "arraysrc", "=", "None", ",", "color", "=", "None", ",", "symmetric", "=", "None", ",", "thick...
[ 423, 4 ]
[ 601, 34 ]
python
en
['en', 'error', 'th']
False
Tickfont.color
(self)
The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: ...
The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: ...
def color(self): """ The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A name...
[ "def", "color", "(", "self", ")", ":", "return", "self", "[", "\"color\"", "]" ]
[ 15, 4 ]
[ 63, 28 ]
python
en
['en', 'error', 'th']
False
Tickfont.family
(self)
HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts ...
HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts ...
def family(self): """ HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the prefer...
[ "def", "family", "(", "self", ")", ":", "return", "self", "[", "\"family\"", "]" ]
[ 72, 4 ]
[ 94, 29 ]
python
en
['en', 'error', 'th']
False
Tickfont.size
(self)
The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] Returns ------- int|float
The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf]
def size(self): """ The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] Returns ------- int|float """ return self["size"]
[ "def", "size", "(", "self", ")", ":", "return", "self", "[", "\"size\"", "]" ]
[ 103, 4 ]
[ 112, 27 ]
python
en
['en', 'error', 'th']
False
Tickfont.__init__
(self, arg=None, color=None, family=None, size=None, **kwargs)
Construct a new Tickfont object Sets the color bar's tick label font Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.barpolar.marke r.colorbar.Tickfont` ...
Construct a new Tickfont object Sets the color bar's tick label font
def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): """ Construct a new Tickfont object Sets the color bar's tick label font Parameters ---------- arg dict of properties compatible with this constructor or an insta...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "color", "=", "None", ",", "family", "=", "None", ",", "size", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Tickfont", ",", "self", ")", ".", "__init__", "(", "\"tick...
[ 143, 4 ]
[ 226, 34 ]
python
en
['en', 'error', 'th']
False
InvitationRequestHandler.handle
(self, context: RequestContext, responder: BaseResponder)
Message handler implementation.
Message handler implementation.
async def handle(self, context: RequestContext, responder: BaseResponder): """Message handler implementation.""" self._logger.debug("InvitationRequestHandler called with context %s", context) assert isinstance(context.message, InvitationRequest) if not context.connection_ready: ...
[ "async", "def", "handle", "(", "self", ",", "context", ":", "RequestContext", ",", "responder", ":", "BaseResponder", ")", ":", "self", ".", "_logger", ".", "debug", "(", "\"InvitationRequestHandler called with context %s\"", ",", "context", ")", "assert", "isinst...
[ 11, 4 ]
[ 29, 48 ]
python
da
['da', 'da', 'en']
True
TestEvMenu._test_menutree
(self, menu)
This is a automatic tester of the menu tree by recursively progressing through the structure.
This is a automatic tester of the menu tree by recursively progressing through the structure.
def _test_menutree(self, menu): """ This is a automatic tester of the menu tree by recursively progressing through the structure. """ def _depth_first(menu, tree, visited, indent): # we are in a given node here nodename = menu.nodename option...
[ "def", "_test_menutree", "(", "self", ",", "menu", ")", ":", "def", "_depth_first", "(", "menu", ",", "tree", ",", "visited", ",", "indent", ")", ":", "# we are in a given node here", "nodename", "=", "menu", ".", "nodename", "options", "=", "menu", ".", "...
[ 62, 4 ]
[ 159, 60 ]
python
en
['en', 'error', 'th']
False
GatherPoints.forward
(ctx, features: torch.Tensor, indicies: torch.Tensor)
forward. Args: features (Tensor): (B, C, N) features to gather. indicies (Tensor): (B, M) where M is the number of points. Returns: Tensor: (B, C, M) where M is the number of points.
forward.
def forward(ctx, features: torch.Tensor, indicies: torch.Tensor) -> torch.Tensor: """forward. Args: features (Tensor): (B, C, N) features to gather. indicies (Tensor): (B, M) where M is the number of points. Returns: Tensor: (B, C, M) where M...
[ "def", "forward", "(", "ctx", ",", "features", ":", "torch", ".", "Tensor", ",", "indicies", ":", "torch", ".", "Tensor", ")", "->", "torch", ".", "Tensor", ":", "assert", "features", ".", "is_contiguous", "(", ")", "assert", "indicies", ".", "is_contigu...
[ 13, 4 ]
[ 36, 21 ]
python
en
['en', 'cy', 'en']
False
Selected.marker
(self)
The 'marker' property is an instance of Marker that may be specified as: - An instance of :class:`plotly.graph_objs.scattergeo.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.scattergeo.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.scattergeo.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.scattergeo.selected.Textfont` - A dict of string/value properties that will be passed to the Textfont constructor Supported dict prope...
The 'textfont' property is an instance of Textfont that may be specified as: - An instance of :class:`plotly.graph_objs.scattergeo.selected.Textfont` - A dict of string/value properties that will be passed to the Textfont constructor Supported dict prope...
def textfont(self): """ The 'textfont' property is an instance of Textfont that may be specified as: - An instance of :class:`plotly.graph_objs.scattergeo.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.scattergeo.Selected` marker :class:`plotly.graph_objects.scattergeo....
Construct a new Selected object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scattergeo.Selected` marker :class:`plotly.graph_objects.scattergeo....
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.scatterge...
[ "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
ServerConfigManager.conf
(self, key=None, value=None, delete=False, default=None)
Add, retrieve and manipulate config values. Args: key (str, optional): Name of config. value (str, optional): Data to store in this config value. delete (bool, optional): If `True`, delete config with `key`. default (str, optional): Use when retrieving a...
Add, retrieve and manipulate config values.
def conf(self, key=None, value=None, delete=False, default=None): """ Add, retrieve and manipulate config values. Args: key (str, optional): Name of config. value (str, optional): Data to store in this config value. delete (bool, optional): If `True`, delete ...
[ "def", "conf", "(", "self", ",", "key", "=", "None", ",", "value", "=", "None", ",", "delete", "=", "False", ",", "default", "=", "None", ")", ":", "if", "not", "key", ":", "return", "self", ".", "all", "(", ")", "elif", "delete", "is", "True", ...
[ 19, 4 ]
[ 52, 19 ]
python
en
['en', 'error', 'th']
False
Tickformatstop.dtickrange
(self)
range [*min*, *max*], where "min", "max" - dtick values which describe some zoom level, it is possible to omit "min" or "max" value by passing "null" The 'dtickrange' property is an info array that may be specified as: * a list or tuple of 2 elements where: (0) The...
range [*min*, *max*], where "min", "max" - dtick values which describe some zoom level, it is possible to omit "min" or "max" value by passing "null" The 'dtickrange' property is an info array that may be specified as: * a list or tuple of 2 elements where: (0) The...
def dtickrange(self): """ range [*min*, *max*], where "min", "max" - dtick values which describe some zoom level, it is possible to omit "min" or "max" value by passing "null" The 'dtickrange' property is an info array that may be specified as: * a list or tuple...
[ "def", "dtickrange", "(", "self", ")", ":", "return", "self", "[", "\"dtickrange\"", "]" ]
[ 15, 4 ]
[ 31, 33 ]
python
en
['en', 'error', 'th']
False
Tickformatstop.enabled
(self)
Determines whether or not this stop is used. If `false`, this stop is ignored even within its `dtickrange`. The 'enabled' property must be specified as a bool (either True, or False) Returns ------- bool
Determines whether or not this stop is used. If `false`, this stop is ignored even within its `dtickrange`. The 'enabled' property must be specified as a bool (either True, or False)
def enabled(self): """ Determines whether or not this stop is used. If `false`, this stop is ignored even within its `dtickrange`. The 'enabled' property must be specified as a bool (either True, or False) Returns ------- bool """ ret...
[ "def", "enabled", "(", "self", ")", ":", "return", "self", "[", "\"enabled\"", "]" ]
[ 40, 4 ]
[ 52, 30 ]
python
en
['en', 'error', 'th']
False
Tickformatstop.name
(self)
When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` alongside your modifications ...
When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` alongside your modifications ...
def name(self): """ When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` al...
[ "def", "name", "(", "self", ")", ":", "return", "self", "[", "\"name\"", "]" ]
[ 61, 4 ]
[ 79, 27 ]
python
en
['en', 'error', 'th']
False
Tickformatstop.templateitemname
(self)
Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with `templateitemname` matching its `name`, alongside your modifications (includ...
Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with `templateitemname` matching its `name`, alongside your modifications (includ...
def templateitemname(self): """ Used to refer to a named item in this array in the template. Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with `templateitemname` matching its `name`, ...
[ "def", "templateitemname", "(", "self", ")", ":", "return", "self", "[", "\"templateitemname\"", "]" ]
[ 88, 4 ]
[ 107, 39 ]
python
en
['en', 'error', 'th']
False
Tickformatstop.value
(self)
string - dtickformat for described zoom level, the same as "tickformat" The 'value' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str
string - dtickformat for described zoom level, the same as "tickformat" The 'value' property is a string and must be specified as: - A string - A number that will be converted to a string
def value(self): """ string - dtickformat for described zoom level, the same as "tickformat" The 'value' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str "...
[ "def", "value", "(", "self", ")", ":", "return", "self", "[", "\"value\"", "]" ]
[ 116, 4 ]
[ 129, 28 ]
python
en
['en', 'error', 'th']
False
Tickformatstop.__init__
( self, arg=None, dtickrange=None, enabled=None, name=None, templateitemname=None, value=None, **kwargs )
Construct a new Tickformatstop object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.heatmapgl.colo rbar.Tickformatstop` dtickrange range [*min*, *...
Construct a new Tickformatstop object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.heatmapgl.colo rbar.Tickformatstop` dtickrange range [*min*, *...
def __init__( self, arg=None, dtickrange=None, enabled=None, name=None, templateitemname=None, value=None, **kwargs ): """ Construct a new Tickformatstop object Parameters ---------- arg dict...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "dtickrange", "=", "None", ",", "enabled", "=", "None", ",", "name", "=", "None", ",", "templateitemname", "=", "None", ",", "value", "=", "None", ",", "*", "*", "kwargs", ")", ":", "sup...
[ 172, 4 ]
[ 282, 34 ]
python
en
['en', 'error', 'th']
False
multi_gpu_test
(model, data_loader, tmpdir=None, gpu_collect=False)
Test model with multiple gpus. This method tests model with multiple gpus and collects the results under two different modes: gpu and cpu modes. By setting 'gpu_collect=True' it encodes results to gpu tensors and use gpu communication for results collection. On cpu mode it saves the results on differen...
Test model with multiple gpus.
def multi_gpu_test(model, data_loader, tmpdir=None, gpu_collect=False): """Test model with multiple gpus. This method tests model with multiple gpus and collects the results under two different modes: gpu and cpu modes. By setting 'gpu_collect=True' it encodes results to gpu tensors and use gpu communi...
[ "def", "multi_gpu_test", "(", "model", ",", "data_loader", ",", "tmpdir", "=", "None", ",", "gpu_collect", "=", "False", ")", ":", "model", ".", "eval", "(", ")", "results", "=", "[", "]", "dataset", "=", "data_loader", ".", "dataset", "rank", ",", "wo...
[ 65, 0 ]
[ 113, 18 ]
python
en
['en', 'en', 'en']
True
setup_args
()
Setup appropriate args.
Setup appropriate args.
def setup_args(): """ Setup appropriate args. """ parser = ParlaiParser(False, False) parser.add_argument( '-ids', '--run-ids', type=str, default=None, help='Comma-separated list of run IDs to analyze', ) parser.add_argument( '--root-dir', ...
[ "def", "setup_args", "(", ")", ":", "parser", "=", "ParlaiParser", "(", "False", ",", "False", ")", "parser", ".", "add_argument", "(", "'-ids'", ",", "'--run-ids'", ",", "type", "=", "str", ",", "default", "=", "None", ",", "help", "=", "'Comma-separate...
[ 49, 0 ]
[ 88, 17 ]
python
en
['en', 'error', 'th']
False
get_multi_run_analyzer
(opt)
Return an object to analyze the results of multiple runs simultaneously. Load HITs from each run into a separate dataframe, and then pass all dataframes into a separate analyzer class that will concatenate them.
Return an object to analyze the results of multiple runs simultaneously.
def get_multi_run_analyzer(opt) -> MultiRunAcuteAnalyzer: """ Return an object to analyze the results of multiple runs simultaneously. Load HITs from each run into a separate dataframe, and then pass all dataframes into a separate analyzer class that will concatenate them. """ run_ids = opt['r...
[ "def", "get_multi_run_analyzer", "(", "opt", ")", "->", "MultiRunAcuteAnalyzer", ":", "run_ids", "=", "opt", "[", "'run_ids'", "]", ".", "split", "(", "','", ")", "# Define paths", "assert", "(", "opt", "[", "'outdir'", "]", "is", "not", "None", ")", ",", ...
[ 710, 0 ]
[ 742, 64 ]
python
en
['en', 'error', 'th']
False
AcuteAnalyzer.__init__
(self, opt: Dict, remove_failed: bool = True)
Initialize the analyzer. Builds up the dataframe :param opt: opt dict :param remove_failed: Whether to remove ratings from turkers who failed onboarding
Initialize the analyzer.
def __init__(self, opt: Dict, remove_failed: bool = True): """ Initialize the analyzer. Builds up the dataframe :param opt: opt dict :param remove_failed: Whether to remove ratings from turkers who failed onboarding """ assert ',' not in...
[ "def", "__init__", "(", "self", ",", "opt", ":", "Dict", ",", "remove_failed", ":", "bool", "=", "True", ")", ":", "assert", "','", "not", "in", "opt", "[", "'run_ids'", "]", ",", "\"AcuteAnalyzer can only handle one run ID!\"", "self", ".", "run_id", "=", ...
[ 101, 4 ]
[ 150, 34 ]
python
en
['en', 'error', 'th']
False
AcuteAnalyzer._extract_response_by_index
( self, unit_details: Dict[str, Any], idx: int )
Extract response data from task data. :param unit_details: full extracted data from a unit :param idx: index of the singular evaluation within unit_details to extract :return response: Formatted worker's response data from the task
Extract response data from task data.
def _extract_response_by_index( self, unit_details: Dict[str, Any], idx: int ) -> Optional[Dict[str, Any]]: """ Extract response data from task data. :param unit_details: full extracted data from a unit :param idx: index of the singular evaluation wit...
[ "def", "_extract_response_by_index", "(", "self", ",", "unit_details", ":", "Dict", "[", "str", ",", "Any", "]", ",", "idx", ":", "int", ")", "->", "Optional", "[", "Dict", "[", "str", ",", "Any", "]", "]", ":", "task_data", "=", "unit_details", "[", ...
[ 152, 4 ]
[ 207, 23 ]
python
en
['en', 'error', 'th']
False
AcuteAnalyzer._parse_unit
(self, unit: MephistoUnit)
Return data for a given unit. If the data is corrupt for whatever reason, we return None :param unit: MephistoUnit of what should be a completed task by a worker :return data: Optional dict with the task's formatted data
Return data for a given unit.
def _parse_unit(self, unit: MephistoUnit) -> Optional[Dict[str, Any]]: """ Return data for a given unit. If the data is corrupt for whatever reason, we return None :param unit: MephistoUnit of what should be a completed task by a worker :return data: Op...
[ "def", "_parse_unit", "(", "self", ",", "unit", ":", "MephistoUnit", ")", "->", "Optional", "[", "Dict", "[", "str", ",", "Any", "]", "]", ":", "try", ":", "return", "self", ".", "mephisto_data_browser", ".", "get_data_from_unit", "(", "unit", ")", "exce...
[ 209, 4 ]
[ 228, 23 ]
python
en
['en', 'error', 'th']
False
AcuteAnalyzer._extract_to_dataframe
(self)
Extract the data from the run to a pandas dataframe.
Extract the data from the run to a pandas dataframe.
def _extract_to_dataframe(self) -> pd.DataFrame: """ Extract the data from the run to a pandas dataframe. """ units = self.mephisto_data_browser.get_units_for_task_name(self.run_id) responses: List[Dict[str, Any]] = [] for unit in units: unit_details = self._p...
[ "def", "_extract_to_dataframe", "(", "self", ")", "->", "pd", ".", "DataFrame", ":", "units", "=", "self", ".", "mephisto_data_browser", ".", "get_units_for_task_name", "(", "self", ".", "run_id", ")", "responses", ":", "List", "[", "Dict", "[", "str", ",", ...
[ 230, 4 ]
[ 248, 42 ]
python
en
['en', 'error', 'th']
False
AcuteAnalyzer._check_eval_question
(self)
Check that the same eval question has been used for all results.
Check that the same eval question has been used for all results.
def _check_eval_question(self): """ Check that the same eval question has been used for all results. """ if len(set(self.dataframe['question'].unique())) > 1: raise ValueError( 'All results must share the same eval question for consistency!' )
[ "def", "_check_eval_question", "(", "self", ")", ":", "if", "len", "(", "set", "(", "self", ".", "dataframe", "[", "'question'", "]", ".", "unique", "(", ")", ")", ")", ">", "1", ":", "raise", "ValueError", "(", "'All results must share the same eval questio...
[ 250, 4 ]
[ 257, 13 ]
python
en
['en', 'error', 'th']
False
AcuteAnalyzer._remove_failed_onboarding
(self)
Remove workers who failed onboarding.
Remove workers who failed onboarding.
def _remove_failed_onboarding(self): """ Remove workers who failed onboarding. """ df = self.dataframe all_workers_failing_onboarding = df.loc[ df['is_onboarding'] & (df['correct'] == False), 'worker' # noqa: E712 ].values workers_failing_onboarding...
[ "def", "_remove_failed_onboarding", "(", "self", ")", ":", "df", "=", "self", ".", "dataframe", "all_workers_failing_onboarding", "=", "df", ".", "loc", "[", "df", "[", "'is_onboarding'", "]", "&", "(", "df", "[", "'correct'", "]", "==", "False", ")", ",",...
[ 259, 4 ]
[ 278, 9 ]
python
en
['en', 'error', 'th']
False
AcuteAnalyzer.get_reasons
(self)
Return dataframe reasons.
Return dataframe reasons.
def get_reasons(self) -> List[str]: """ Return dataframe reasons. """ return self.dataframe['reason'].values.tolist()
[ "def", "get_reasons", "(", "self", ")", "->", "List", "[", "str", "]", ":", "return", "self", ".", "dataframe", "[", "'reason'", "]", ".", "values", ".", "tolist", "(", ")" ]
[ 360, 4 ]
[ 364, 55 ]
python
en
['en', 'error', 'th']
False
AcuteAnalyzer.get_max_hits_per_worker
(self)
Get max number of hits per worker.
Get max number of hits per worker.
def get_max_hits_per_worker(self) -> List[int]: """ Get max number of hits per worker. """ return self.dataframe.groupby('worker')['run_id'].count().max()
[ "def", "get_max_hits_per_worker", "(", "self", ")", "->", "List", "[", "int", "]", ":", "return", "self", ".", "dataframe", ".", "groupby", "(", "'worker'", ")", "[", "'run_id'", "]", ".", "count", "(", ")", ".", "max", "(", ")" ]
[ 366, 4 ]
[ 370, 71 ]
python
en
['en', 'error', 'th']
False
AcuteAnalyzer.get_wins_per_model_matchup
(self)
Return the wins for each model by matchup.
Return the wins for each model by matchup.
def get_wins_per_model_matchup(self) -> pd.DataFrame: """ Return the wins for each model by matchup. """ self.matchup_total_df = ( self.dataframe.groupby(['eval_choice_0', 'eval_choice_1'])['run_id'] .count() .to_frame('matchup_total') ) ...
[ "def", "get_wins_per_model_matchup", "(", "self", ")", "->", "pd", ".", "DataFrame", ":", "self", ".", "matchup_total_df", "=", "(", "self", ".", "dataframe", ".", "groupby", "(", "[", "'eval_choice_0'", ",", "'eval_choice_1'", "]", ")", "[", "'run_id'", "]"...
[ 372, 4 ]
[ 390, 32 ]
python
en
['en', 'error', 'th']
False
AcuteAnalyzer.get_win_fractions
(self)
Return the joined matchup + win totals, get win fractions. Sorted according to win percentage
Return the joined matchup + win totals, get win fractions.
def get_win_fractions(self) -> pd.DataFrame: """ Return the joined matchup + win totals, get win fractions. Sorted according to win percentage """ if not hasattr(self, 'win_total_df'): self.get_wins_per_model_matchup() self.win_fraction_df = self.matchup_tot...
[ "def", "get_win_fractions", "(", "self", ")", "->", "pd", ".", "DataFrame", ":", "if", "not", "hasattr", "(", "self", ",", "'win_total_df'", ")", ":", "self", ".", "get_wins_per_model_matchup", "(", ")", "self", ".", "win_fraction_df", "=", "self", ".", "m...
[ 392, 4 ]
[ 422, 38 ]
python
en
['en', 'error', 'th']
False
AcuteAnalyzer.get_num_hits_per_matchup
(self)
Return the number of hits per matchup.
Return the number of hits per matchup.
def get_num_hits_per_matchup(self): """ Return the number of hits per matchup. """ matchup_total_1_df = self.matchup_total_df.reset_index() matchup_total_2_df = matchup_total_1_df.rename( columns={'eval_choice_0': 'eval_choice_1', 'eval_choice_1': 'eval_choice_0'} ...
[ "def", "get_num_hits_per_matchup", "(", "self", ")", ":", "matchup_total_1_df", "=", "self", ".", "matchup_total_df", ".", "reset_index", "(", ")", "matchup_total_2_df", "=", "matchup_total_1_df", ".", "rename", "(", "columns", "=", "{", "'eval_choice_0'", ":", "'...
[ 424, 4 ]
[ 439, 43 ]
python
en
['en', 'error', 'th']
False
AcuteAnalyzer._compile_checkbox_stats
(self)
Return the fraction of time that Turkers selected each checkbox. Results are cut both (1) by matchup and winner and (2) by just the winner. Each checkbox represents one reason that the Turkers could have chosen the speaker that they did.
Return the fraction of time that Turkers selected each checkbox.
def _compile_checkbox_stats(self) -> Dict[str, pd.DataFrame]: """ Return the fraction of time that Turkers selected each checkbox. Results are cut both (1) by matchup and winner and (2) by just the winner. Each checkbox represents one reason that the Turkers could have chosen the speake...
[ "def", "_compile_checkbox_stats", "(", "self", ")", "->", "Dict", "[", "str", ",", "pd", ".", "DataFrame", "]", ":", "checkbox_columns", "=", "[", "col", "for", "col", "in", "self", ".", "dataframe", ".", "columns", "if", "col", ".", "startswith", "(", ...
[ 441, 4 ]
[ 474, 33 ]
python
en
['en', 'error', 'th']
False
AcuteAnalyzer._compile_convos_and_reasons
(self)
Create a human-readable string of all pairs of conversations, as well as which conversation each Turker chose and their reason for choosing it.
Create a human-readable string of all pairs of conversations, as well as which conversation each Turker chose and their reason for choosing it.
def _compile_convos_and_reasons(self) -> str: """ Create a human-readable string of all pairs of conversations, as well as which conversation each Turker chose and their reason for choosing it. """ pairing_outputs = [] for _, pairing_sr in self.dataframe.iterrows(): ...
[ "def", "_compile_convos_and_reasons", "(", "self", ")", "->", "str", ":", "pairing_outputs", "=", "[", "]", "for", "_", ",", "pairing_sr", "in", "self", ".", "dataframe", ".", "iterrows", "(", ")", ":", "winning_dialogue", "=", "self", ".", "_dialogue_to_str...
[ 476, 4 ]
[ 508, 39 ]
python
en
['en', 'error', 'th']
False
AcuteAnalyzer._dialogue_to_string
(dialogue: List[dict])
Convert a list of dictionaries into a human-readable conversation. Each dictionary represents one utterance.
Convert a list of dictionaries into a human-readable conversation.
def _dialogue_to_string(dialogue: List[dict]) -> str: """ Convert a list of dictionaries into a human-readable conversation. Each dictionary represents one utterance. """ utterance_strings = [] for utterance_dict in dialogue: if utterance_dict["id"] == "human...
[ "def", "_dialogue_to_string", "(", "dialogue", ":", "List", "[", "dict", "]", ")", "->", "str", ":", "utterance_strings", "=", "[", "]", "for", "utterance_dict", "in", "dialogue", ":", "if", "utterance_dict", "[", "\"id\"", "]", "==", "\"human_evaluator\"", ...
[ 511, 4 ]
[ 525, 43 ]
python
en
['en', 'error', 'th']
False
AcuteAnalyzer.get_matchup_totals_with_significance
(self)
Return dataframe with matchup win totals + significance.
Return dataframe with matchup win totals + significance.
def get_matchup_totals_with_significance(self) -> pd.DataFrame: """ Return dataframe with matchup win totals + significance. """ def _signf_level(p): if p < 0.001: return "***", "p<.001" elif p < 0.01: return "**", "p<.01" ...
[ "def", "get_matchup_totals_with_significance", "(", "self", ")", "->", "pd", ".", "DataFrame", ":", "def", "_signf_level", "(", "p", ")", ":", "if", "p", "<", "0.001", ":", "return", "\"***\"", ",", "\"p<.001\"", "elif", "p", "<", "0.01", ":", "return", ...
[ 527, 4 ]
[ 606, 35 ]
python
en
['en', 'error', 'th']
False
AcuteAnalyzer.save_results
(self, path: str = None)
Save results to a certain path.
Save results to a certain path.
def save_results(self, path: str = None): """ Save results to a certain path. """ if not hasattr(self, 'significance_df'): self.get_matchup_totals_with_significance() if path is None: path = self.outdir # Save raw dataframe self.dataframe....
[ "def", "save_results", "(", "self", ",", "path", ":", "str", "=", "None", ")", ":", "if", "not", "hasattr", "(", "self", ",", "'significance_df'", ")", ":", "self", ".", "get_matchup_totals_with_significance", "(", ")", "if", "path", "is", "None", ":", "...
[ 608, 4 ]
[ 679, 38 ]
python
en
['en', 'error', 'th']
False
MultiRunAcuteAnalyzer.__init__
(self, opt: Dict, dataframes: Dict[str, pd.DataFrame])
Read in and combine the dataframes of other already-analyzed ACUTE-Eval runs.
Read in and combine the dataframes of other already-analyzed ACUTE-Eval runs.
def __init__(self, opt: Dict, dataframes: Dict[str, pd.DataFrame]): """ Read in and combine the dataframes of other already-analyzed ACUTE-Eval runs. """ self.outdir = opt['outdir'] if opt.get('model_ordering') is not None: self.custom_model_ordering = opt['model_ord...
[ "def", "__init__", "(", "self", ",", "opt", ":", "Dict", ",", "dataframes", ":", "Dict", "[", "str", ",", "pd", ".", "DataFrame", "]", ")", ":", "self", ".", "outdir", "=", "opt", "[", "'outdir'", "]", "if", "opt", ".", "get", "(", "'model_ordering...
[ 687, 4 ]
[ 707, 35 ]
python
en
['en', 'error', 'th']
False
accuracy
(pred, target, topk=1, thresh=None)
Calculate accuracy according to the prediction and target. Args: pred (torch.Tensor): The model prediction, shape (N, num_class) target (torch.Tensor): The target of each prediction, shape (N, ) topk (int | tuple[int], optional): If the predictions in ``topk`` matches the target...
Calculate accuracy according to the prediction and target.
def accuracy(pred, target, topk=1, thresh=None): """Calculate accuracy according to the prediction and target. Args: pred (torch.Tensor): The model prediction, shape (N, num_class) target (torch.Tensor): The target of each prediction, shape (N, ) topk (int | tuple[int], optional): If th...
[ "def", "accuracy", "(", "pred", ",", "target", ",", "topk", "=", "1", ",", "thresh", "=", "None", ")", ":", "assert", "isinstance", "(", "topk", ",", "(", "int", ",", "tuple", ")", ")", "if", "isinstance", "(", "topk", ",", "int", ")", ":", "topk...
[ 3, 0 ]
[ 47, 43 ]
python
en
['en', 'en', 'en']
True
Accuracy.__init__
(self, topk=(1, ), thresh=None)
Module to calculate the accuracy. Args: topk (tuple, optional): The criterion used to calculate the accuracy. Defaults to (1,). thresh (float, optional): If not None, predictions with scores under this threshold are considered incorrect. Default to None. ...
Module to calculate the accuracy.
def __init__(self, topk=(1, ), thresh=None): """Module to calculate the accuracy. Args: topk (tuple, optional): The criterion used to calculate the accuracy. Defaults to (1,). thresh (float, optional): If not None, predictions with scores under th...
[ "def", "__init__", "(", "self", ",", "topk", "=", "(", "1", ",", ")", ",", "thresh", "=", "None", ")", ":", "super", "(", ")", ".", "__init__", "(", ")", "self", ".", "topk", "=", "topk", "self", ".", "thresh", "=", "thresh" ]
[ 52, 4 ]
[ 63, 28 ]
python
en
['en', 'en', 'en']
True
Accuracy.forward
(self, pred, target)
Forward function to calculate accuracy. Args: pred (torch.Tensor): Prediction of models. target (torch.Tensor): Target for each prediction. Returns: tuple[float]: The accuracies under different topk criterions.
Forward function to calculate accuracy.
def forward(self, pred, target): """Forward function to calculate accuracy. Args: pred (torch.Tensor): Prediction of models. target (torch.Tensor): Target for each prediction. Returns: tuple[float]: The accuracies under different topk criterions. """...
[ "def", "forward", "(", "self", ",", "pred", ",", "target", ")", ":", "return", "accuracy", "(", "pred", ",", "target", ",", "self", ".", "topk", ",", "self", ".", "thresh", ")" ]
[ 65, 4 ]
[ 75, 61 ]
python
en
['en', 'en', 'en']
True
Title.font
(self)
Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.title.Font` ...
Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.title.Font` ...
def font(self): """ Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute. The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.choroplethma...
[ "def", "font", "(", "self", ")", ":", "return", "self", "[", "\"font\"", "]" ]
[ 15, 4 ]
[ 53, 27 ]
python
en
['en', 'error', 'th']
False
Title.side
(self)
Determines the location of color bar's title with respect to the color bar. Note that the title's location used to be set by the now deprecated `titleside` attribute. The 'side' property is an enumeration that may be specified as: - One of the following enumeration values...
Determines the location of color bar's title with respect to the color bar. Note that the title's location used to be set by the now deprecated `titleside` attribute. The 'side' property is an enumeration that may be specified as: - One of the following enumeration values...
def side(self): """ Determines the location of color bar's title with respect to the color bar. Note that the title's location used to be set by the now deprecated `titleside` attribute. The 'side' property is an enumeration that may be specified as: - One of the f...
[ "def", "side", "(", "self", ")", ":", "return", "self", "[", "\"side\"", "]" ]
[ 62, 4 ]
[ 76, 27 ]
python
en
['en', 'error', 'th']
False
Title.text
(self)
Sets the title of the color bar. Note that before the existence of `title.text`, the title's contents used to be defined as the `title` attribute itself. This behavior has been deprecated. The 'text' property is a string and must be specified as: - A string - A ...
Sets the title of the color bar. Note that before the existence of `title.text`, the title's contents used to be defined as the `title` attribute itself. This behavior has been deprecated. The 'text' property is a string and must be specified as: - A string - A ...
def text(self): """ Sets the title of the color bar. Note that before the existence of `title.text`, the title's contents used to be defined as the `title` attribute itself. This behavior has been deprecated. The 'text' property is a string and must be specified as: ...
[ "def", "text", "(", "self", ")", ":", "return", "self", "[", "\"text\"", "]" ]
[ 85, 4 ]
[ 99, 27 ]
python
en
['en', 'error', 'th']
False
Title.__init__
(self, arg=None, font=None, side=None, text=None, **kwargs)
Construct a new Title object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.choroplethmapb ox.colorbar.Title` font Sets this color bar's title font...
Construct a new Title object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.choroplethmapb ox.colorbar.Title` font Sets this color bar's title font...
def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): """ Construct a new Title object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.choroplethmapb ...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "font", "=", "None", ",", "side", "=", "None", ",", "text", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Title", ",", "self", ")", ".", "__init__", "(", "\"title\"", ...
[ 126, 4 ]
[ 203, 34 ]
python
en
['en', 'error', 'th']
False
FullTeacher.get_extraction_instructions
(self)
If one wants to run extraction themselves on a raw wikipedia dump.
If one wants to run extraction themselves on a raw wikipedia dump.
def get_extraction_instructions(self): """ If one wants to run extraction themselves on a raw wikipedia dump. """ dpath = os.path.join(self.opt['datapath'], 'wikipedia', 'full') fname = 'enwiki-latest-pages-articles.xml.bz2' instructions = ( "To complete the d...
[ "def", "get_extraction_instructions", "(", "self", ")", ":", "dpath", "=", "os", ".", "path", ".", "join", "(", "self", ".", "opt", "[", "'datapath'", "]", ",", "'wikipedia'", ",", "'full'", ")", "fname", "=", "'enwiki-latest-pages-articles.xml.bz2'", "instruc...
[ 59, 4 ]
[ 78, 27 ]
python
en
['en', 'error', 'th']
False
FullSplitTeacher.get_num_samples
(self, opt)
Return the number of samples given the datatype.
Return the number of samples given the datatype.
def get_num_samples(self, opt) -> Tuple[int, int]: """ Return the number of samples given the datatype. """ datatype = opt['datatype'] if 'train' in datatype: return self.TRAINSIZE, self.TRAINSIZE elif 'valid' in datatype: return self.VALIDSIZE, se...
[ "def", "get_num_samples", "(", "self", ",", "opt", ")", "->", "Tuple", "[", "int", ",", "int", "]", ":", "datatype", "=", "opt", "[", "'datatype'", "]", "if", "'train'", "in", "datatype", ":", "return", "self", ".", "TRAINSIZE", ",", "self", ".", "TR...
[ 102, 4 ]
[ 113, 47 ]
python
en
['en', 'error', 'th']
False
FullSplitTeacher.get_fold_chunks
(self, opt)
Return a list of chunk IDs (integer). Given the datatype (train/test/valid), return the list of chunk IDs that correspond to that split.
Return a list of chunk IDs (integer).
def get_fold_chunks(self, opt) -> List[int]: # type: ignore """ Return a list of chunk IDs (integer). Given the datatype (train/test/valid), return the list of chunk IDs that correspond to that split. """ datatype = opt['datatype'] all_chunk_idxs = list(self.chu...
[ "def", "get_fold_chunks", "(", "self", ",", "opt", ")", "->", "List", "[", "int", "]", ":", "# type: ignore", "datatype", "=", "opt", "[", "'datatype'", "]", "all_chunk_idxs", "=", "list", "(", "self", ".", "chunk_idx_to_file", ".", "keys", "(", ")", ")"...
[ 120, 4 ]
[ 134, 39 ]
python
en
['en', 'error', 'th']
False
FullSplitTeacher.load_from_chunk
(self, chunk_idx: int)
Given the chunk index, load examples from that chunk. Return a list of tuples. The function `_create_message` will take these tuples to form the Message object that is returned by the teacher.
Given the chunk index, load examples from that chunk.
def load_from_chunk(self, chunk_idx: int): """ Given the chunk index, load examples from that chunk. Return a list of tuples. The function `_create_message` will take these tuples to form the Message object that is returned by the teacher. """ output = [] chunk_p...
[ "def", "load_from_chunk", "(", "self", ",", "chunk_idx", ":", "int", ")", ":", "output", "=", "[", "]", "chunk_path", "=", "os", ".", "path", ".", "join", "(", "self", ".", "folder", ",", "self", ".", "chunk_idx_to_file", "[", "chunk_idx", "]", ")", ...
[ 136, 4 ]
[ 154, 21 ]
python
en
['en', 'error', 'th']
False
FullSplitTeacher.create_message
(self, queue_output: ChunkOutput, entry_idx=0)
Given the tuple output of the queue, return an act.
Given the tuple output of the queue, return an act.
def create_message(self, queue_output: ChunkOutput, entry_idx=0) -> 'Message': """ Given the tuple output of the queue, return an act. """ title, text = queue_output return Message( {'title': title, 'text': text, 'labels': [''], 'episode_done': True} )
[ "def", "create_message", "(", "self", ",", "queue_output", ":", "ChunkOutput", ",", "entry_idx", "=", "0", ")", "->", "'Message'", ":", "title", ",", "text", "=", "queue_output", "return", "Message", "(", "{", "'title'", ":", "title", ",", "'text'", ":", ...
[ 156, 4 ]
[ 163, 9 ]
python
en
['en', 'error', 'th']
False
framesig
(sig, frame_len, frame_step, winfunc=lambda x: numpy.ones((x,)), stride_trick=True)
Frame a signal into overlapping frames. :param sig: the audio signal to frame. :param frame_len: length of each frame measured in samples. :param frame_step: number of samples after the start of the previous frame that the next frame should begin. :param winfunc: the analysis window to apply to each fr...
Frame a signal into overlapping frames.
def framesig(sig, frame_len, frame_step, winfunc=lambda x: numpy.ones((x,)), stride_trick=True): """Frame a signal into overlapping frames. :param sig: the audio signal to frame. :param frame_len: length of each frame measured in samples. :param frame_step: number of samples after the start of the prev...
[ "def", "framesig", "(", "sig", ",", "frame_len", ",", "frame_step", ",", "winfunc", "=", "lambda", "x", ":", "numpy", ".", "ones", "(", "(", "x", ",", ")", ")", ",", "stride_trick", "=", "True", ")", ":", "slen", "=", "len", "(", "sig", ")", "fra...
[ 20, 0 ]
[ 52, 23 ]
python
en
['en', 'en', 'en']
True
deframesig
(frames, siglen, frame_len, frame_step, winfunc=lambda x: numpy.ones((x,)))
Does overlap-add procedure to undo the action of framesig. :param frames: the array of frames. :param siglen: the length of the desired signal, use 0 if unknown. Output will be truncated to siglen samples. :param frame_len: length of each frame measured in samples. :param frame_step: number of samples ...
Does overlap-add procedure to undo the action of framesig.
def deframesig(frames, siglen, frame_len, frame_step, winfunc=lambda x: numpy.ones((x,))): """Does overlap-add procedure to undo the action of framesig. :param frames: the array of frames. :param siglen: the length of the desired signal, use 0 if unknown. Output will be truncated to siglen samples. :pa...
[ "def", "deframesig", "(", "frames", ",", "siglen", ",", "frame_len", ",", "frame_step", ",", "winfunc", "=", "lambda", "x", ":", "numpy", ".", "ones", "(", "(", "x", ",", ")", ")", ")", ":", "frame_len", "=", "round_half_up", "(", "frame_len", ")", "...
[ 55, 0 ]
[ 87, 31 ]
python
en
['en', 'en', 'en']
True
magspec
(frames, NFFT)
Compute the magnitude spectrum of each frame in frames. If frames is an NxD matrix, output will be Nx(NFFT/2+1). :param frames: the array of frames. Each row is a frame. :param NFFT: the FFT length to use. If NFFT > frame_len, the frames are zero-padded. :returns: If frames is an NxD matrix, output will be...
Compute the magnitude spectrum of each frame in frames. If frames is an NxD matrix, output will be Nx(NFFT/2+1).
def magspec(frames, NFFT): """Compute the magnitude spectrum of each frame in frames. If frames is an NxD matrix, output will be Nx(NFFT/2+1). :param frames: the array of frames. Each row is a frame. :param NFFT: the FFT length to use. If NFFT > frame_len, the frames are zero-padded. :returns: If frame...
[ "def", "magspec", "(", "frames", ",", "NFFT", ")", ":", "if", "numpy", ".", "shape", "(", "frames", ")", "[", "1", "]", ">", "NFFT", ":", "logging", ".", "warn", "(", "'frame length (%d) is greater than FFT size (%d), frame will be truncated. Increase NFFT to avoid....
[ 90, 0 ]
[ 102, 39 ]
python
en
['en', 'en', 'en']
True
powspec
(frames, NFFT)
Compute the power spectrum of each frame in frames. If frames is an NxD matrix, output will be Nx(NFFT/2+1). :param frames: the array of frames. Each row is a frame. :param NFFT: the FFT length to use. If NFFT > frame_len, the frames are zero-padded. :returns: If frames is an NxD matrix, output will be Nx(...
Compute the power spectrum of each frame in frames. If frames is an NxD matrix, output will be Nx(NFFT/2+1).
def powspec(frames, NFFT): """Compute the power spectrum of each frame in frames. If frames is an NxD matrix, output will be Nx(NFFT/2+1). :param frames: the array of frames. Each row is a frame. :param NFFT: the FFT length to use. If NFFT > frame_len, the frames are zero-padded. :returns: If frames is...
[ "def", "powspec", "(", "frames", ",", "NFFT", ")", ":", "return", "1.0", "/", "NFFT", "*", "numpy", ".", "square", "(", "magspec", "(", "frames", ",", "NFFT", ")", ")" ]
[ 105, 0 ]
[ 112, 59 ]
python
en
['en', 'en', 'en']
True
logpowspec
(frames, NFFT, norm=1)
Compute the log power spectrum of each frame in frames. If frames is an NxD matrix, output will be Nx(NFFT/2+1). :param frames: the array of frames. Each row is a frame. :param NFFT: the FFT length to use. If NFFT > frame_len, the frames are zero-padded. :param norm: If norm=1, the log power spectrum is no...
Compute the log power spectrum of each frame in frames. If frames is an NxD matrix, output will be Nx(NFFT/2+1).
def logpowspec(frames, NFFT, norm=1): """Compute the log power spectrum of each frame in frames. If frames is an NxD matrix, output will be Nx(NFFT/2+1). :param frames: the array of frames. Each row is a frame. :param NFFT: the FFT length to use. If NFFT > frame_len, the frames are zero-padded. :param ...
[ "def", "logpowspec", "(", "frames", ",", "NFFT", ",", "norm", "=", "1", ")", ":", "ps", "=", "powspec", "(", "frames", ",", "NFFT", ")", "ps", "[", "ps", "<=", "1e-30", "]", "=", "1e-30", "lps", "=", "10", "*", "numpy", ".", "log10", "(", "ps",...
[ 115, 0 ]
[ 129, 18 ]
python
en
['en', 'en', 'en']
True
preemphasis
(signal, coeff=0.95)
perform preemphasis on the input signal. :param signal: The signal to filter. :param coeff: The preemphasis coefficient. 0 is no filter, default is 0.95. :returns: the filtered signal.
perform preemphasis on the input signal.
def preemphasis(signal, coeff=0.95): """perform preemphasis on the input signal. :param signal: The signal to filter. :param coeff: The preemphasis coefficient. 0 is no filter, default is 0.95. :returns: the filtered signal. """ return numpy.append(signal[0], signal[1:] - coeff * signal[:-1])
[ "def", "preemphasis", "(", "signal", ",", "coeff", "=", "0.95", ")", ":", "return", "numpy", ".", "append", "(", "signal", "[", "0", "]", ",", "signal", "[", "1", ":", "]", "-", "coeff", "*", "signal", "[", ":", "-", "1", "]", ")" ]
[ 132, 0 ]
[ 139, 68 ]
python
en
['en', 'en', 'en']
True
Cells.align
(self)
Sets the horizontal alignment of the `text` within the box. Has an effect only if `text` spans two or more lines (i.e. `text` contains one or more <br> HTML tags) or if an explicit width is set to override the text width. The 'align' property is an enumeration that may be s...
Sets the horizontal alignment of the `text` within the box. Has an effect only if `text` spans two or more lines (i.e. `text` contains one or more <br> HTML tags) or if an explicit width is set to override the text width. The 'align' property is an enumeration that may be s...
def align(self): """ Sets the horizontal alignment of the `text` within the box. Has an effect only if `text` spans two or more lines (i.e. `text` contains one or more <br> HTML tags) or if an explicit width is set to override the text width. The 'align' property is ...
[ "def", "align", "(", "self", ")", ":", "return", "self", "[", "\"align\"", "]" ]
[ 30, 4 ]
[ 46, 28 ]
python
en
['en', 'error', 'th']
False
Cells.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\"", "]" ]
[ 55, 4 ]
[ 66, 31 ]
python
en
['en', 'error', 'th']
False
Cells.fill
(self)
The 'fill' property is an instance of Fill that may be specified as: - An instance of :class:`plotly.graph_objs.table.cells.Fill` - A dict of string/value properties that will be passed to the Fill constructor Supported dict properties: ...
The 'fill' property is an instance of Fill that may be specified as: - An instance of :class:`plotly.graph_objs.table.cells.Fill` - A dict of string/value properties that will be passed to the Fill constructor Supported dict properties: ...
def fill(self): """ The 'fill' property is an instance of Fill that may be specified as: - An instance of :class:`plotly.graph_objs.table.cells.Fill` - A dict of string/value properties that will be passed to the Fill constructor Supported dict pr...
[ "def", "fill", "(", "self", ")", ":", "return", "self", "[", "\"fill\"", "]" ]
[ 75, 4 ]
[ 97, 27 ]
python
en
['en', 'error', 'th']
False
Cells.font
(self)
The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.table.cells.Font` - A dict of string/value properties that will be passed to the Font constructor Supported dict properties: ...
The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.table.cells.Font` - A dict of string/value properties that will be passed to the Font constructor Supported dict properties: ...
def font(self): """ The 'font' property is an instance of Font that may be specified as: - An instance of :class:`plotly.graph_objs.table.cells.Font` - A dict of string/value properties that will be passed to the Font constructor Supported dict pr...
[ "def", "font", "(", "self", ")", ":", "return", "self", "[", "\"font\"", "]" ]
[ 106, 4 ]
[ 151, 27 ]
python
en
['en', 'error', 'th']
False
Cells.format
(self)
Sets the cell value formatting rule using d3 formatting mini- language which is similar to those of Python. See https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format The 'format' property is an array that may be specified as a tuple, list, ...
Sets the cell value formatting rule using d3 formatting mini- language which is similar to those of Python. See https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format The 'format' property is an array that may be specified as a tuple, list, ...
def format(self): """ Sets the cell value formatting rule using d3 formatting mini- language which is similar to those of Python. See https://github.com/d3/d3-3.x-api- reference/blob/master/Formatting.md#d3_format The 'format' property is an array that may be specifi...
[ "def", "format", "(", "self", ")", ":", "return", "self", "[", "\"format\"", "]" ]
[ 160, 4 ]
[ 174, 29 ]
python
en
['en', 'error', 'th']
False
Cells.formatsrc
(self)
Sets the source reference on Chart Studio Cloud for format . The 'formatsrc' 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 format . The 'formatsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def formatsrc(self): """ Sets the source reference on Chart Studio Cloud for format . The 'formatsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["formatsrc"]
[ "def", "formatsrc", "(", "self", ")", ":", "return", "self", "[", "\"formatsrc\"", "]" ]
[ 183, 4 ]
[ 194, 32 ]
python
en
['en', 'error', 'th']
False
Cells.height
(self)
The height of cells. The 'height' property is a number and may be specified as: - An int or float Returns ------- int|float
The height of cells. The 'height' property is a number and may be specified as: - An int or float
def height(self): """ The height of cells. The 'height' property is a number and may be specified as: - An int or float Returns ------- int|float """ return self["height"]
[ "def", "height", "(", "self", ")", ":", "return", "self", "[", "\"height\"", "]" ]
[ 203, 4 ]
[ 214, 29 ]
python
en
['en', 'error', 'th']
False
Cells.line
(self)
The 'line' property is an instance of Line that may be specified as: - An instance of :class:`plotly.graph_objs.table.cells.Line` - A dict of string/value properties that will be passed to the Line constructor Supported dict properties: ...
The 'line' property is an instance of Line that may be specified as: - An instance of :class:`plotly.graph_objs.table.cells.Line` - A dict of string/value properties that will be passed to the Line constructor Supported dict properties: ...
def line(self): """ The 'line' property is an instance of Line that may be specified as: - An instance of :class:`plotly.graph_objs.table.cells.Line` - A dict of string/value properties that will be passed to the Line constructor Supported dict pr...
[ "def", "line", "(", "self", ")", ":", "return", "self", "[", "\"line\"", "]" ]
[ 223, 4 ]
[ 248, 27 ]
python
en
['en', 'error', 'th']
False
Cells.prefix
(self)
Prefix for cell values. The 'prefix' property is a string and must be specified as: - A string - A number that will be converted to a string - A tuple, list, or one-dimensional numpy array of the above Returns ------- str|numpy.ndarray ...
Prefix for cell values. The 'prefix' property is a string and must be specified as: - A string - A number that will be converted to a string - A tuple, list, or one-dimensional numpy array of the above
def prefix(self): """ Prefix for cell values. The 'prefix' property is a string and must be specified as: - A string - A number that will be converted to a string - A tuple, list, or one-dimensional numpy array of the above Returns ------- ...
[ "def", "prefix", "(", "self", ")", ":", "return", "self", "[", "\"prefix\"", "]" ]
[ 257, 4 ]
[ 270, 29 ]
python
en
['en', 'error', 'th']
False
Cells.prefixsrc
(self)
Sets the source reference on Chart Studio Cloud for prefix . The 'prefixsrc' 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 prefix . The 'prefixsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def prefixsrc(self): """ Sets the source reference on Chart Studio Cloud for prefix . The 'prefixsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["prefixsrc"]
[ "def", "prefixsrc", "(", "self", ")", ":", "return", "self", "[", "\"prefixsrc\"", "]" ]
[ 279, 4 ]
[ 290, 32 ]
python
en
['en', 'error', 'th']
False
Cells.suffix
(self)
Suffix for cell values. The 'suffix' property is a string and must be specified as: - A string - A number that will be converted to a string - A tuple, list, or one-dimensional numpy array of the above Returns ------- str|numpy.ndarray ...
Suffix for cell values. The 'suffix' property is a string and must be specified as: - A string - A number that will be converted to a string - A tuple, list, or one-dimensional numpy array of the above
def suffix(self): """ Suffix for cell values. The 'suffix' property is a string and must be specified as: - A string - A number that will be converted to a string - A tuple, list, or one-dimensional numpy array of the above Returns ------- ...
[ "def", "suffix", "(", "self", ")", ":", "return", "self", "[", "\"suffix\"", "]" ]
[ 299, 4 ]
[ 312, 29 ]
python
en
['en', 'error', 'th']
False
Cells.suffixsrc
(self)
Sets the source reference on Chart Studio Cloud for suffix . The 'suffixsrc' 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 suffix . The 'suffixsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def suffixsrc(self): """ Sets the source reference on Chart Studio Cloud for suffix . The 'suffixsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["suffixsrc"]
[ "def", "suffixsrc", "(", "self", ")", ":", "return", "self", "[", "\"suffixsrc\"", "]" ]
[ 321, 4 ]
[ 332, 32 ]
python
en
['en', 'error', 'th']
False
Cells.values
(self)
Cell values. `values[m][n]` represents the value of the `n`th point in column `m`, therefore the `values[m]` vector length for all columns must be the same (longer vectors will be truncated). Each value must be a finite number or a string. The 'values' property is an array ...
Cell values. `values[m][n]` represents the value of the `n`th point in column `m`, therefore the `values[m]` vector length for all columns must be the same (longer vectors will be truncated). Each value must be a finite number or a string. The 'values' property is an array ...
def values(self): """ Cell values. `values[m][n]` represents the value of the `n`th point in column `m`, therefore the `values[m]` vector length for all columns must be the same (longer vectors will be truncated). Each value must be a finite number or a string. The '...
[ "def", "values", "(", "self", ")", ":", "return", "self", "[", "\"values\"", "]" ]
[ 341, 4 ]
[ 355, 29 ]
python
en
['en', 'error', 'th']
False
Cells.valuessrc
(self)
Sets the source reference on Chart Studio Cloud for values . The 'valuessrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for values . The 'valuessrc' property must be specified as a string or as a plotly.grid_objs.Column object
def valuessrc(self): """ Sets the source reference on Chart Studio Cloud for values . The 'valuessrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["valuessrc"]
[ "def", "valuessrc", "(", "self", ")", ":", "return", "self", "[", "\"valuessrc\"", "]" ]
[ 364, 4 ]
[ 375, 32 ]
python
en
['en', 'error', 'th']
False
Cells.__init__
( self, arg=None, align=None, alignsrc=None, fill=None, font=None, format=None, formatsrc=None, height=None, line=None, prefix=None, prefixsrc=None, suffix=None, suffixsrc=None, values=None, v...
Construct a new Cells object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.table.Cells` align Sets the horizontal alignment of the `text` within the ...
Construct a new Cells object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.table.Cells` align Sets the horizontal alignment of the `text` within the ...
def __init__( self, arg=None, align=None, alignsrc=None, fill=None, font=None, format=None, formatsrc=None, height=None, line=None, prefix=None, prefixsrc=None, suffix=None, suffixsrc=None, values=Non...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "align", "=", "None", ",", "alignsrc", "=", "None", ",", "fill", "=", "None", ",", "font", "=", "None", ",", "format", "=", "None", ",", "formatsrc", "=", "None", ",", "height", "=", "...
[ 435, 4 ]
[ 606, 34 ]
python
en
['en', 'error', 'th']
False
InvitationRequest.__init__
(self, *, responder: str = None, message: str = None, **kwargs)
Initialize invitation request object. Args: responder: The name of the agent initiating the introduction message: Comments on the introduction
Initialize invitation request object.
def __init__(self, *, responder: str = None, message: str = None, **kwargs): """ Initialize invitation request object. Args: responder: The name of the agent initiating the introduction message: Comments on the introduction """ super(InvitationRequest, se...
[ "def", "__init__", "(", "self", ",", "*", ",", "responder", ":", "str", "=", "None", ",", "message", ":", "str", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "InvitationRequest", ",", "self", ")", ".", "__init__", "(", "*", "*", ...
[ 23, 4 ]
[ 33, 30 ]
python
en
['en', 'error', 'th']
False
PresentationProposal.__init__
( self, _id: str = None, *, comment: str = None, presentation_proposal: PresentationPreview = None, **kwargs, )
Initialize presentation proposal object. Args: comment: optional human-readable comment presentation_proposal: proposed presentation preview
Initialize presentation proposal object.
def __init__( self, _id: str = None, *, comment: str = None, presentation_proposal: PresentationPreview = None, **kwargs, ): """ Initialize presentation proposal object. Args: comment: optional human-readable comment pr...
[ "def", "__init__", "(", "self", ",", "_id", ":", "str", "=", "None", ",", "*", ",", "comment", ":", "str", "=", "None", ",", "presentation_proposal", ":", "PresentationPreview", "=", "None", ",", "*", "*", "kwargs", ",", ")", ":", "super", "(", ")", ...
[ 27, 4 ]
[ 46, 9 ]
python
en
['en', 'error', 'th']
False
MessageReceipt.__init__
( self, *, connection_id: str = None, direct_response_mode: str = None, in_time: datetime = None, raw_message: str = None, recipient_verkey: str = None, recipient_did: str = None, recipient_did_public: str = None, sender_did: str = None, ...
Initialize the message delivery instance.
Initialize the message delivery instance.
def __init__( self, *, connection_id: str = None, direct_response_mode: str = None, in_time: datetime = None, raw_message: str = None, recipient_verkey: str = None, recipient_did: str = None, recipient_did_public: str = None, sender_did: st...
[ "def", "__init__", "(", "self", ",", "*", ",", "connection_id", ":", "str", "=", "None", ",", "direct_response_mode", ":", "str", "=", "None", ",", "in_time", ":", "datetime", "=", "None", ",", "raw_message", ":", "str", "=", "None", ",", "recipient_verk...
[ 14, 4 ]
[ 38, 35 ]
python
en
['en', 'en', 'en']
True
MessageReceipt.connection_id
(self)
Accessor for the pairwise connection identifier. Returns: This context's connection identifier
Accessor for the pairwise connection identifier.
def connection_id(self) -> str: """ Accessor for the pairwise connection identifier. Returns: This context's connection identifier """ return self._connection_id
[ "def", "connection_id", "(", "self", ")", "->", "str", ":", "return", "self", ".", "_connection_id" ]
[ 41, 4 ]
[ 49, 34 ]
python
en
['en', 'error', 'th']
False
MessageReceipt.connection_id
(self, connection_id: bool)
Setter for the pairwise connection identifier. Args: connection_id: This context's new connection identifier
Setter for the pairwise connection identifier.
def connection_id(self, connection_id: bool): """ Setter for the pairwise connection identifier. Args: connection_id: This context's new connection identifier """ self._connection_id = connection_id
[ "def", "connection_id", "(", "self", ",", "connection_id", ":", "bool", ")", ":", "self", ".", "_connection_id", "=", "connection_id" ]
[ 52, 4 ]
[ 60, 43 ]
python
en
['en', 'error', 'th']
False
MessageReceipt.direct_response_mode
(self)
Accessor for the requested direct response mode. Returns: This context's requested direct response mode
Accessor for the requested direct response mode.
def direct_response_mode(self) -> str: """ Accessor for the requested direct response mode. Returns: This context's requested direct response mode """ return self._direct_response_mode
[ "def", "direct_response_mode", "(", "self", ")", "->", "str", ":", "return", "self", ".", "_direct_response_mode" ]
[ 63, 4 ]
[ 71, 41 ]
python
en
['en', 'error', 'th']
False
MessageReceipt.direct_response_mode
(self, mode: str)
Setter for the requested direct response mode.
Setter for the requested direct response mode.
def direct_response_mode(self, mode: str) -> str: """Setter for the requested direct response mode.""" self._direct_response_mode = mode
[ "def", "direct_response_mode", "(", "self", ",", "mode", ":", "str", ")", "->", "str", ":", "self", ".", "_direct_response_mode", "=", "mode" ]
[ 74, 4 ]
[ 76, 41 ]
python
en
['en', 'en', 'en']
True
MessageReceipt.direct_response_requested
(self)
Accessor for the the state of the direct response mode. Returns: This context's requested direct response mode
Accessor for the the state of the direct response mode.
def direct_response_requested(self) -> str: """ Accessor for the the state of the direct response mode. Returns: This context's requested direct response mode """ return self._direct_response_mode and self._direct_response_mode != "none"
[ "def", "direct_response_requested", "(", "self", ")", "->", "str", ":", "return", "self", ".", "_direct_response_mode", "and", "self", ".", "_direct_response_mode", "!=", "\"none\"" ]
[ 79, 4 ]
[ 87, 82 ]
python
en
['en', 'error', 'th']
False
MessageReceipt.in_time
(self)
Accessor for the datetime the message was received. Returns: This context's received time
Accessor for the datetime the message was received.
def in_time(self) -> str: """ Accessor for the datetime the message was received. Returns: This context's received time """ return self._in_time
[ "def", "in_time", "(", "self", ")", "->", "str", ":", "return", "self", ".", "_in_time" ]
[ 90, 4 ]
[ 98, 28 ]
python
en
['en', 'error', 'th']
False
MessageReceipt.in_time
(self, in_time: datetime)
Setter for the datetime the message was received. Args: in_time: This context's new received time
Setter for the datetime the message was received.
def in_time(self, in_time: datetime): """ Setter for the datetime the message was received. Args: in_time: This context's new received time """ self._in_time = in_time
[ "def", "in_time", "(", "self", ",", "in_time", ":", "datetime", ")", ":", "self", ".", "_in_time", "=", "in_time" ]
[ 101, 4 ]
[ 109, 31 ]
python
en
['en', 'error', 'th']
False
MessageReceipt.raw_message
(self)
Accessor for the raw message text. Returns: The raw message text
Accessor for the raw message text.
def raw_message(self) -> str: """ Accessor for the raw message text. Returns: The raw message text """ return self._raw_message
[ "def", "raw_message", "(", "self", ")", "->", "str", ":", "return", "self", ".", "_raw_message" ]
[ 112, 4 ]
[ 120, 32 ]
python
en
['en', 'error', 'th']
False
MessageReceipt.raw_message
(self, message: str)
Setter for the raw message text. Args: message: The new message text
Setter for the raw message text.
def raw_message(self, message: str): """ Setter for the raw message text. Args: message: The new message text """ self._raw_message = message
[ "def", "raw_message", "(", "self", ",", "message", ":", "str", ")", ":", "self", ".", "_raw_message", "=", "message" ]
[ 123, 4 ]
[ 131, 35 ]
python
en
['en', 'error', 'th']
False
MessageReceipt.recipient_did
(self)
Accessor for the recipient DID which corresponds with the verkey. Returns: The recipient DID
Accessor for the recipient DID which corresponds with the verkey.
def recipient_did(self) -> str: """ Accessor for the recipient DID which corresponds with the verkey. Returns: The recipient DID """ return self._recipient_did
[ "def", "recipient_did", "(", "self", ")", "->", "str", ":", "return", "self", ".", "_recipient_did" ]
[ 134, 4 ]
[ 142, 34 ]
python
en
['en', 'error', 'th']
False
MessageReceipt.recipient_did
(self, did: str)
Setter for the recipient DID which corresponds with the verkey. Args: did: The new recipient DID
Setter for the recipient DID which corresponds with the verkey.
def recipient_did(self, did: str): """ Setter for the recipient DID which corresponds with the verkey. Args: did: The new recipient DID """ self._recipient_did = did
[ "def", "recipient_did", "(", "self", ",", "did", ":", "str", ")", ":", "self", ".", "_recipient_did", "=", "did" ]
[ 145, 4 ]
[ 153, 33 ]
python
en
['en', 'error', 'th']
False
MessageReceipt.recipient_did_public
(self)
Check if the recipient did is public. Indicates whether the message is associated with a public (ledger) recipient DID. Returns: True if the recipient's DID is public, else false
Check if the recipient did is public.
def recipient_did_public(self) -> bool: """ Check if the recipient did is public. Indicates whether the message is associated with a public (ledger) recipient DID. Returns: True if the recipient's DID is public, else false """ return self._recipient...
[ "def", "recipient_did_public", "(", "self", ")", "->", "bool", ":", "return", "self", ".", "_recipient_did_public" ]
[ 156, 4 ]
[ 167, 41 ]
python
en
['en', 'error', 'th']
False
MessageReceipt.recipient_did_public
(self, public: bool)
Setter for the flag indicating the recipient DID is public. Args: public: A boolean value to indicate if the recipient DID is public
Setter for the flag indicating the recipient DID is public.
def recipient_did_public(self, public: bool): """ Setter for the flag indicating the recipient DID is public. Args: public: A boolean value to indicate if the recipient DID is public """ self._recipient_did_public = public
[ "def", "recipient_did_public", "(", "self", ",", "public", ":", "bool", ")", ":", "self", ".", "_recipient_did_public", "=", "public" ]
[ 170, 4 ]
[ 178, 43 ]
python
en
['en', 'error', 'th']
False
MessageReceipt.recipient_verkey
(self)
Accessor for the recipient verkey key used to pack the incoming request. Returns: The recipient verkey
Accessor for the recipient verkey key used to pack the incoming request.
def recipient_verkey(self) -> str: """ Accessor for the recipient verkey key used to pack the incoming request. Returns: The recipient verkey """ return self._recipient_verkey
[ "def", "recipient_verkey", "(", "self", ")", "->", "str", ":", "return", "self", ".", "_recipient_verkey" ]
[ 181, 4 ]
[ 189, 37 ]
python
en
['en', 'error', 'th']
False