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
Currentvalue.offset
(self)
The amount of space, in pixels, between the current value label and the slider. The 'offset' property is a number and may be specified as: - An int or float Returns ------- int|float
The amount of space, in pixels, between the current value label and the slider. The 'offset' property is a number and may be specified as: - An int or float
def offset(self): """ The amount of space, in pixels, between the current value label and the slider. The 'offset' property is a number and may be specified as: - An int or float Returns ------- int|float """ return self["offset"]
[ "def", "offset", "(", "self", ")", ":", "return", "self", "[", "\"offset\"", "]" ]
[ 61, 4 ]
[ 73, 29 ]
python
en
['en', 'error', 'th']
False
Currentvalue.prefix
(self)
When currentvalue.visible is true, this sets the prefix of the label. The 'prefix' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str
When currentvalue.visible is true, this sets the prefix of the label. The 'prefix' property is a string and must be specified as: - A string - A number that will be converted to a string
def prefix(self): """ When currentvalue.visible is true, this sets the prefix of the label. The 'prefix' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str "...
[ "def", "prefix", "(", "self", ")", ":", "return", "self", "[", "\"prefix\"", "]" ]
[ 82, 4 ]
[ 95, 29 ]
python
en
['en', 'error', 'th']
False
Currentvalue.suffix
(self)
When currentvalue.visible is true, this sets the suffix of the label. The 'suffix' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str
When currentvalue.visible is true, this sets the suffix of the label. The 'suffix' property is a string and must be specified as: - A string - A number that will be converted to a string
def suffix(self): """ When currentvalue.visible is true, this sets the suffix of the label. The 'suffix' property is a string and must be specified as: - A string - A number that will be converted to a string Returns ------- str "...
[ "def", "suffix", "(", "self", ")", ":", "return", "self", "[", "\"suffix\"", "]" ]
[ 104, 4 ]
[ 117, 29 ]
python
en
['en', 'error', 'th']
False
Currentvalue.visible
(self)
Shows the currently-selected value above the slider. The 'visible' property must be specified as a bool (either True, or False) Returns ------- bool
Shows the currently-selected value above the slider. The 'visible' property must be specified as a bool (either True, or False)
def visible(self): """ Shows the currently-selected value above the slider. The 'visible' property must be specified as a bool (either True, or False) Returns ------- bool """ return self["visible"]
[ "def", "visible", "(", "self", ")", ":", "return", "self", "[", "\"visible\"", "]" ]
[ 126, 4 ]
[ 137, 30 ]
python
en
['en', 'error', 'th']
False
Currentvalue.xanchor
(self)
The alignment of the value readout relative to the length of the slider. The 'xanchor' property is an enumeration that may be specified as: - One of the following enumeration values: ['left', 'center', 'right'] Returns ------- Any
The alignment of the value readout relative to the length of the slider. The 'xanchor' property is an enumeration that may be specified as: - One of the following enumeration values: ['left', 'center', 'right']
def xanchor(self): """ The alignment of the value readout relative to the length of the slider. The 'xanchor' property is an enumeration that may be specified as: - One of the following enumeration values: ['left', 'center', 'right'] Returns ...
[ "def", "xanchor", "(", "self", ")", ":", "return", "self", "[", "\"xanchor\"", "]" ]
[ 146, 4 ]
[ 159, 30 ]
python
en
['en', 'error', 'th']
False
Currentvalue.__init__
( self, arg=None, font=None, offset=None, prefix=None, suffix=None, visible=None, xanchor=None, **kwargs )
Construct a new Currentvalue object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.slider.Currentvalue` font Sets the font of the current va...
Construct a new Currentvalue object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.layout.slider.Currentvalue` font Sets the font of the current va...
def __init__( self, arg=None, font=None, offset=None, prefix=None, suffix=None, visible=None, xanchor=None, **kwargs ): """ Construct a new Currentvalue object Parameters ---------- arg ...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "font", "=", "None", ",", "offset", "=", "None", ",", "prefix", "=", "None", ",", "suffix", "=", "None", ",", "visible", "=", "None", ",", "xanchor", "=", "None", ",", "*", "*", "kwarg...
[ 188, 4 ]
[ 289, 34 ]
python
en
['en', 'error', 'th']
False
WizardDictAgent.tokenize
(self, text, building=False)
Returns a sequence of tokens from the iterable.
Returns a sequence of tokens from the iterable.
def tokenize(self, text, building=False): """ Returns a sequence of tokens from the iterable. """ if self.lower: text = text.lower() if self.tokenizer == 're': return self.re_tokenize(text) elif self.tokenizer == 'whitespace': return ...
[ "def", "tokenize", "(", "self", ",", "text", ",", "building", "=", "False", ")", ":", "if", "self", ".", "lower", ":", "text", "=", "text", ".", "lower", "(", ")", "if", "self", ".", "tokenizer", "==", "'re'", ":", "return", "self", ".", "re_tokeni...
[ 64, 4 ]
[ 91, 26 ]
python
en
['en', 'error', 'th']
False
WizardDictAgent.re_tokenize
(self, text)
This splits along whitespace and punctuation and keeps the newline as a token in the returned list.
This splits along whitespace and punctuation and keeps the newline as a token in the returned list.
def re_tokenize(self, text): """ This splits along whitespace and punctuation and keeps the newline as a token in the returned list. """ return RETOK.findall(text)
[ "def", "re_tokenize", "(", "self", ",", "text", ")", ":", "return", "RETOK", ".", "findall", "(", "text", ")" ]
[ 93, 4 ]
[ 98, 34 ]
python
en
['en', 'error', 'th']
False
CmdUnconnectedConnect.func
(self)
Uses the Django admin api. Note that unlogged-in commands have a unique position in that their `func()` receives a session object instead of a `source_object` like all other types of logged-in commands (this is because there is no object yet before the account has logged in) ...
Uses the Django admin api. Note that unlogged-in commands have a unique position in that their `func()` receives a session object instead of a `source_object` like all other types of logged-in commands (this is because there is no object yet before the account has logged in) ...
def func(self): """ Uses the Django admin api. Note that unlogged-in commands have a unique position in that their `func()` receives a session object instead of a `source_object` like all other types of logged-in commands (this is because there is no object yet before the...
[ "def", "func", "(", "self", ")", ":", "session", "=", "self", ".", "caller", "arglist", "=", "self", ".", "arglist", "if", "not", "arglist", "or", "len", "(", "arglist", ")", "<", "2", ":", "session", ".", "msg", "(", "\"\\n\\r Usage (without <>): connec...
[ 73, 4 ]
[ 117, 54 ]
python
en
['en', 'error', 'th']
False
CmdUnconnectedCreate.parse
(self)
The parser must handle the multiple-word account name enclosed in quotes: connect "Long name with many words" my@myserv.com mypassw
The parser must handle the multiple-word account name enclosed in quotes: connect "Long name with many words" my
def parse(self): """ The parser must handle the multiple-word account name enclosed in quotes: connect "Long name with many words" my@myserv.com mypassw """ super(CmdUnconnectedCreate, self).parse() self.accountinfo = [] if len(self.arglist) < 3: ...
[ "def", "parse", "(", "self", ")", ":", "super", "(", "CmdUnconnectedCreate", ",", "self", ")", ".", "parse", "(", ")", "self", ".", "accountinfo", "=", "[", "]", "if", "len", "(", "self", ".", "arglist", ")", "<", "3", ":", "return", "if", "len", ...
[ 134, 4 ]
[ 156, 57 ]
python
en
['en', 'error', 'th']
False
CmdUnconnectedCreate.func
(self)
Do checks and create account
Do checks and create account
def func(self): """Do checks and create account""" session = self.caller try: accountname, email, password = self.accountinfo except ValueError: string = "\n\r Usage (without <>): create \"<accountname>\" <email> <password>" session.msg(string) ...
[ "def", "func", "(", "self", ")", ":", "session", "=", "self", ".", "caller", "try", ":", "accountname", ",", "email", ",", "password", "=", "self", ".", "accountinfo", "except", "ValueError", ":", "string", "=", "\"\\n\\r Usage (without <>): create \\\"<accountn...
[ 158, 4 ]
[ 239, 17 ]
python
en
['en', 'mi', 'en']
True
CmdUnconnectedQuit.func
(self)
Simply close the connection.
Simply close the connection.
def func(self): """Simply close the connection.""" session = self.caller session.sessionhandler.disconnect(session, "Good bye! Disconnecting.")
[ "def", "func", "(", "self", ")", ":", "session", "=", "self", ".", "caller", "session", ".", "sessionhandler", ".", "disconnect", "(", "session", ",", "\"Good bye! Disconnecting.\"", ")" ]
[ 252, 4 ]
[ 255, 78 ]
python
en
['en', 'en', 'en']
True
CmdUnconnectedLook.func
(self)
Show the connect screen.
Show the connect screen.
def func(self): """Show the connect screen.""" self.caller.msg(CONNECTION_SCREEN)
[ "def", "func", "(", "self", ")", ":", "self", ".", "caller", ".", "msg", "(", "CONNECTION_SCREEN", ")" ]
[ 269, 4 ]
[ 271, 42 ]
python
en
['en', 'en', 'en']
True
UnloggedinCmdSet.at_cmdset_creation
(self)
Populate the cmdset
Populate the cmdset
def at_cmdset_creation(self): """Populate the cmdset""" self.add(CmdUnconnectedConnect()) self.add(CmdUnconnectedCreate()) self.add(CmdUnconnectedQuit()) self.add(CmdUnconnectedLook()) self.add(CmdUnconnectedHelp())
[ "def", "at_cmdset_creation", "(", "self", ")", ":", "self", ".", "add", "(", "CmdUnconnectedConnect", "(", ")", ")", "self", ".", "add", "(", "CmdUnconnectedCreate", "(", ")", ")", "self", ".", "add", "(", "CmdUnconnectedQuit", "(", ")", ")", "self", "."...
[ 325, 4 ]
[ 331, 38 ]
python
en
['en', 'zh', 'en']
True
Textfont.color
(self)
The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: ...
The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: ...
def color(self): """ The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A name...
[ "def", "color", "(", "self", ")", ":", "return", "self", "[", "\"color\"", "]" ]
[ 15, 4 ]
[ 64, 28 ]
python
en
['en', 'error', 'th']
False
Textfont.colorsrc
(self)
Sets the source reference on Chart Studio Cloud for color . The 'colorsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for color . The 'colorsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def colorsrc(self): """ Sets the source reference on Chart Studio Cloud for color . The 'colorsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["colorsrc"]
[ "def", "colorsrc", "(", "self", ")", ":", "return", "self", "[", "\"colorsrc\"", "]" ]
[ 73, 4 ]
[ 84, 31 ]
python
en
['en', 'error', 'th']
False
Textfont.family
(self)
HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts ...
HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts ...
def family(self): """ HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the prefer...
[ "def", "family", "(", "self", ")", ":", "return", "self", "[", "\"family\"", "]" ]
[ 93, 4 ]
[ 116, 29 ]
python
en
['en', 'error', 'th']
False
Textfont.familysrc
(self)
Sets the source reference on Chart Studio Cloud for family . The 'familysrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for family . The 'familysrc' property must be specified as a string or as a plotly.grid_objs.Column object
def familysrc(self): """ Sets the source reference on Chart Studio Cloud for family . The 'familysrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["familysrc"]
[ "def", "familysrc", "(", "self", ")", ":", "return", "self", "[", "\"familysrc\"", "]" ]
[ 125, 4 ]
[ 136, 32 ]
python
en
['en', 'error', 'th']
False
Textfont.size
(self)
The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] - A tuple, list, or one-dimensional numpy array of the above Returns ------- int|float|numpy.ndarray
The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] - A tuple, list, or one-dimensional numpy array of the above
def size(self): """ The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] - A tuple, list, or one-dimensional numpy array of the above Returns ------- int|float|numpy.ndarray """ return self["size"...
[ "def", "size", "(", "self", ")", ":", "return", "self", "[", "\"size\"", "]" ]
[ 145, 4 ]
[ 155, 27 ]
python
en
['en', 'error', 'th']
False
Textfont.sizesrc
(self)
Sets the source reference on Chart Studio Cloud for size . The 'sizesrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for size . The 'sizesrc' property must be specified as a string or as a plotly.grid_objs.Column object
def sizesrc(self): """ Sets the source reference on Chart Studio Cloud for size . The 'sizesrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["sizesrc"]
[ "def", "sizesrc", "(", "self", ")", ":", "return", "self", "[", "\"sizesrc\"", "]" ]
[ 164, 4 ]
[ 175, 30 ]
python
en
['en', 'error', 'th']
False
Textfont.__init__
( self, arg=None, color=None, colorsrc=None, family=None, familysrc=None, size=None, sizesrc=None, **kwargs )
Construct a new Textfont object Sets the font used for `textinfo`. Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.funnelarea.Textfont` color ...
Construct a new Textfont object Sets the font used for `textinfo`.
def __init__( self, arg=None, color=None, colorsrc=None, family=None, familysrc=None, size=None, sizesrc=None, **kwargs ): """ Construct a new Textfont object Sets the font used for `textinfo`. Paramete...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "color", "=", "None", ",", "colorsrc", "=", "None", ",", "family", "=", "None", ",", "familysrc", "=", "None", ",", "size", "=", "None", ",", "sizesrc", "=", "None", ",", "*", "*", "kw...
[ 215, 4 ]
[ 329, 34 ]
python
en
['en', 'error', 'th']
False
register_ledger_nym
(request: web.BaseRequest)
Request handler for registering a NYM with the ledger. Args: request: aiohttp request object
Request handler for registering a NYM with the ledger.
async def register_ledger_nym(request: web.BaseRequest): """ Request handler for registering a NYM with the ledger. Args: request: aiohttp request object """ context = request.app["request_context"] ledger = await context.inject(BaseLedger, required=False) if not ledger: rai...
[ "async", "def", "register_ledger_nym", "(", "request", ":", "web", ".", "BaseRequest", ")", ":", "context", "=", "request", ".", "app", "[", "\"request_context\"", "]", "ledger", "=", "await", "context", ".", "inject", "(", "BaseLedger", ",", "required", "="...
[ 23, 0 ]
[ 48, 50 ]
python
en
['en', 'error', 'th']
False
get_did_verkey
(request: web.BaseRequest)
Request handler for getting a verkey for a DID from the ledger. Args: request: aiohttp request object
Request handler for getting a verkey for a DID from the ledger.
async def get_did_verkey(request: web.BaseRequest): """ Request handler for getting a verkey for a DID from the ledger. Args: request: aiohttp request object """ context = request.app["request_context"] ledger = await context.inject(BaseLedger, required=False) if not ledger: ...
[ "async", "def", "get_did_verkey", "(", "request", ":", "web", ".", "BaseRequest", ")", ":", "context", "=", "request", ".", "app", "[", "\"request_context\"", "]", "ledger", "=", "await", "context", ".", "inject", "(", "BaseLedger", ",", "required", "=", "...
[ 58, 0 ]
[ 76, 43 ]
python
en
['en', 'error', 'th']
False
get_did_endpoint
(request: web.BaseRequest)
Request handler for getting a verkey for a DID from the ledger. Args: request: aiohttp request object
Request handler for getting a verkey for a DID from the ledger.
async def get_did_endpoint(request: web.BaseRequest): """ Request handler for getting a verkey for a DID from the ledger. Args: request: aiohttp request object """ context = request.app["request_context"] ledger = await context.inject(BaseLedger, required=False) if not ledger: ...
[ "async", "def", "get_did_endpoint", "(", "request", ":", "web", ".", "BaseRequest", ")", ":", "context", "=", "request", ".", "app", "[", "\"request_context\"", "]", "ledger", "=", "await", "context", ".", "inject", "(", "BaseLedger", ",", "required", "=", ...
[ 86, 0 ]
[ 104, 45 ]
python
en
['en', 'error', 'th']
False
register
(app: web.Application)
Register routes.
Register routes.
async def register(app: web.Application): """Register routes.""" app.add_routes( [ web.post("/ledger/register-nym", register_ledger_nym), web.get("/ledger/did-verkey", get_did_verkey), web.get("/ledger/did-endpoint", get_did_endpoint) ] )
[ "async", "def", "register", "(", "app", ":", "web", ".", "Application", ")", ":", "app", ".", "add_routes", "(", "[", "web", ".", "post", "(", "\"/ledger/register-nym\"", ",", "register_ledger_nym", ")", ",", "web", ".", "get", "(", "\"/ledger/did-verkey\"",...
[ 107, 0 ]
[ 116, 5 ]
python
en
['en', 'fr', 'en']
False
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.streamtube.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.streamtube.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.streamtube.c...
[ "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.streamtube.colorbar.Title` font Sets this color bar's title font. Note ...
Construct a new Title object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.streamtube.colorbar.Title` font Sets this color bar's title font. Note ...
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.streamt...
[ "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
Dashboard.get_box
(self, box_id)
Returns box from box_id number.
Returns box from box_id number.
def get_box(self, box_id): """Returns box from box_id number.""" box_ids_to_path = self._compute_box_ids() loc_in_dashboard = self["layout"] if box_id not in box_ids_to_path.keys(): raise _plotly_utils.exceptions.PlotlyError(ID_NOT_VALID_MESSAGE) for first_second in ...
[ "def", "get_box", "(", "self", ",", "box_id", ")", ":", "box_ids_to_path", "=", "self", ".", "_compute_box_ids", "(", ")", "loc_in_dashboard", "=", "self", "[", "\"layout\"", "]", "if", "box_id", "not", "in", "box_ids_to_path", ".", "keys", "(", ")", ":", ...
[ 327, 4 ]
[ 336, 31 ]
python
en
['en', 'en', 'en']
True
Dashboard.get_preview
(self)
Returns JSON or HTML respresentation of the dashboard. If IPython is not imported, returns a pretty print of the dashboard dict. Otherwise, returns an IPython.core.display.HTML display of the dashboard. The algorithm used to build the HTML preview involves going through ...
Returns JSON or HTML respresentation of the dashboard.
def get_preview(self): """ Returns JSON or HTML respresentation of the dashboard. If IPython is not imported, returns a pretty print of the dashboard dict. Otherwise, returns an IPython.core.display.HTML display of the dashboard. The algorithm used to build the HTML pre...
[ "def", "get_preview", "(", "self", ")", ":", "if", "IPython", "is", "None", ":", "pprint", ".", "pprint", "(", "self", ")", "return", "elif", "self", "[", "\"layout\"", "]", "is", "None", ":", "return", "IPython", ".", "display", ".", "HTML", "(", "d...
[ 338, 4 ]
[ 466, 48 ]
python
en
['en', 'error', 'th']
False
Dashboard.insert
(self, box, side="above", box_id=None, fill_percent=50)
Insert a box into your dashboard layout. :param (dict) box: the box you are inserting into the dashboard. :param (str) side: specifies where your new box is going to be placed relative to the given 'box_id'. Valid values are 'above', 'below', 'left', and 'right'. ...
Insert a box into your dashboard layout.
def insert(self, box, side="above", box_id=None, fill_percent=50): """ Insert a box into your dashboard layout. :param (dict) box: the box you are inserting into the dashboard. :param (str) side: specifies where your new box is going to be placed relative to the given 'box_i...
[ "def", "insert", "(", "self", ",", "box", ",", "side", "=", "\"above\"", ",", "box_id", "=", "None", ",", "fill_percent", "=", "50", ")", ":", "box_ids_to_path", "=", "self", ".", "_compute_box_ids", "(", ")", "# doesn't need box_id or side specified for first b...
[ 468, 4 ]
[ 564, 34 ]
python
en
['en', 'error', 'th']
False
Dashboard.remove
(self, box_id)
Remove a box from the dashboard by its box_id. Example: ``` import plotly.dashboard_objs as dashboard box_a = { 'type': 'box', 'boxType': 'plot', 'fileId': 'username:some#', 'title': 'box a' } my_dboard = dashboa...
Remove a box from the dashboard by its box_id.
def remove(self, box_id): """ Remove a box from the dashboard by its box_id. Example: ``` import plotly.dashboard_objs as dashboard box_a = { 'type': 'box', 'boxType': 'plot', 'fileId': 'username:some#', 'title': 'box a' ...
[ "def", "remove", "(", "self", ",", "box_id", ")", ":", "box_ids_to_path", "=", "self", ".", "_compute_box_ids", "(", ")", "if", "box_id", "not", "in", "box_ids_to_path", ":", "raise", "_plotly_utils", ".", "exceptions", ".", "PlotlyError", "(", "ID_NOT_VALID_M...
[ 566, 4 ]
[ 604, 34 ]
python
en
['en', 'error', 'th']
False
Dashboard.swap
(self, box_id_1, box_id_2)
Swap two boxes with their specified ids. Example: ``` import plotly.dashboard_objs as dashboard box_a = { 'type': 'box', 'boxType': 'plot', 'fileId': 'username:first#', 'title': 'box a' } box_b = { 't...
Swap two boxes with their specified ids.
def swap(self, box_id_1, box_id_2): """ Swap two boxes with their specified ids. Example: ``` import plotly.dashboard_objs as dashboard box_a = { 'type': 'box', 'boxType': 'plot', 'fileId': 'username:first#', 'title': 'box...
[ "def", "swap", "(", "self", ",", "box_id_1", ",", "box_id_2", ")", ":", "box_ids_to_path", "=", "self", ".", "_compute_box_ids", "(", ")", "box_a", "=", "self", ".", "get_box", "(", "box_id_1", ")", "box_b", "=", "self", ".", "get_box", "(", "box_id_2", ...
[ 606, 4 ]
[ 653, 53 ]
python
en
['en', 'error', 'th']
False
Projection.x
(self)
The 'x' property is an instance of X that may be specified as: - An instance of :class:`plotly.graph_objs.scatter3d.projection.X` - A dict of string/value properties that will be passed to the X constructor Supported dict properties: ...
The 'x' property is an instance of X that may be specified as: - An instance of :class:`plotly.graph_objs.scatter3d.projection.X` - A dict of string/value properties that will be passed to the X constructor Supported dict properties: ...
def x(self): """ The 'x' property is an instance of X that may be specified as: - An instance of :class:`plotly.graph_objs.scatter3d.projection.X` - A dict of string/value properties that will be passed to the X constructor Supported dict properti...
[ "def", "x", "(", "self", ")", ":", "return", "self", "[", "\"x\"", "]" ]
[ 15, 4 ]
[ 38, 24 ]
python
en
['en', 'error', 'th']
False
Projection.y
(self)
The 'y' property is an instance of Y that may be specified as: - An instance of :class:`plotly.graph_objs.scatter3d.projection.Y` - A dict of string/value properties that will be passed to the Y constructor Supported dict properties: ...
The 'y' property is an instance of Y that may be specified as: - An instance of :class:`plotly.graph_objs.scatter3d.projection.Y` - A dict of string/value properties that will be passed to the Y constructor Supported dict properties: ...
def y(self): """ The 'y' property is an instance of Y that may be specified as: - An instance of :class:`plotly.graph_objs.scatter3d.projection.Y` - A dict of string/value properties that will be passed to the Y constructor Supported dict properti...
[ "def", "y", "(", "self", ")", ":", "return", "self", "[", "\"y\"", "]" ]
[ 47, 4 ]
[ 70, 24 ]
python
en
['en', 'error', 'th']
False
Projection.z
(self)
The 'z' property is an instance of Z that may be specified as: - An instance of :class:`plotly.graph_objs.scatter3d.projection.Z` - A dict of string/value properties that will be passed to the Z constructor Supported dict properties: ...
The 'z' property is an instance of Z that may be specified as: - An instance of :class:`plotly.graph_objs.scatter3d.projection.Z` - A dict of string/value properties that will be passed to the Z constructor Supported dict properties: ...
def z(self): """ The 'z' property is an instance of Z that may be specified as: - An instance of :class:`plotly.graph_objs.scatter3d.projection.Z` - A dict of string/value properties that will be passed to the Z constructor Supported dict properti...
[ "def", "z", "(", "self", ")", ":", "return", "self", "[", "\"z\"", "]" ]
[ 79, 4 ]
[ 102, 24 ]
python
en
['en', 'error', 'th']
False
Projection.__init__
(self, arg=None, x=None, y=None, z=None, **kwargs)
Construct a new Projection object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scatter3d.Projection` x :class:`plotly.graph_objects.scatter3d.pro...
Construct a new Projection object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scatter3d.Projection` x :class:`plotly.graph_objects.scatter3d.pro...
def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): """ Construct a new Projection object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scatter3d.P...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "x", "=", "None", ",", "y", "=", "None", ",", "z", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Projection", ",", "self", ")", ".", "__init__", "(", "\"projection\"",...
[ 124, 4 ]
[ 196, 34 ]
python
en
['en', 'error', 'th']
False
doesCommitteeExist
(committee)
Args: committee: list of information about a committee. Returns: boolean which is true if and only if the committee is in the CSV file.
Args: committee: list of information about a committee.
def doesCommitteeExist(committee): """ Args: committee: list of information about a committee. Returns: boolean which is true if and only if the committee is in the CSV file. """ emailFile = CSVHandler(EMAIL_FILE_LOCATION) contents = emailFile.read() isInList = False...
[ "def", "doesCommitteeExist", "(", "committee", ")", ":", "emailFile", "=", "CSVHandler", "(", "EMAIL_FILE_LOCATION", ")", "contents", "=", "emailFile", ".", "read", "(", ")", "isInList", "=", "False", "print", "(", "committee", ")", "for", "x", "in", "conten...
[ 9, 0 ]
[ 26, 19 ]
python
en
['en', 'error', 'th']
False
SelfFeedingModel.encode_dia_y
(self, y_vecs)
Encodes a tensor of vectorized candidates. :param y_vecs: a [bs, seq_len] or [bs, num_cands, seq_len](?) of vectorized candidates
Encodes a tensor of vectorized candidates.
def encode_dia_y(self, y_vecs): """ Encodes a tensor of vectorized candidates. :param y_vecs: a [bs, seq_len] or [bs, num_cands, seq_len](?) of vectorized candidates """ if y_vecs.dim() == 2: y_enc = self.y_dia_head(self.y_dia_encoder(y_vecs)) eli...
[ "def", "encode_dia_y", "(", "self", ",", "y_vecs", ")", ":", "if", "y_vecs", ".", "dim", "(", ")", "==", "2", ":", "y_enc", "=", "self", ".", "y_dia_head", "(", "self", ".", "y_dia_encoder", "(", "y_vecs", ")", ")", "elif", "y_vecs", ".", "dim", "(...
[ 131, 4 ]
[ 145, 20 ]
python
en
['en', 'error', 'th']
False
SelfFeedingModel.score_similarity
(self, context_h, cand_h)
Returns the dot product of encoded contexts and encoded candidates.
Returns the dot product of encoded contexts and encoded candidates.
def score_similarity(self, context_h, cand_h): """ Returns the dot product of encoded contexts and encoded candidates. """ if self.opt['normalize_sent_emb']: context_h /= context_h.norm(2, dim=1, keepdim=True) cand_h /= cand_h.norm(2, dim=1, keepdim=True) ...
[ "def", "score_similarity", "(", "self", ",", "context_h", ",", "cand_h", ")", ":", "if", "self", ".", "opt", "[", "'normalize_sent_emb'", "]", ":", "context_h", "/=", "context_h", ".", "norm", "(", "2", ",", "dim", "=", "1", ",", "keepdim", "=", "True"...
[ 155, 4 ]
[ 174, 21 ]
python
en
['en', 'error', 'th']
False
test_n_minus_f_pool_processes_attrib
(looper, nodeSet, sdk_pool_handle, sdk_wallet_steward)
The pool N-f nodes should be able to process ATTRIB txn. https://jira.hyperledger.org/browse/INDY-245
The pool N-f nodes should be able to process ATTRIB txn. https://jira.hyperledger.org/browse/INDY-245
def test_n_minus_f_pool_processes_attrib(looper, nodeSet, sdk_pool_handle, sdk_wallet_steward): """ The pool N-f nodes should be able to process ATTRIB txn. https://jira.hyperledger.org/browse/INDY-245 """ make_pool_n_...
[ "def", "test_n_minus_f_pool_processes_attrib", "(", "looper", ",", "nodeSet", ",", "sdk_pool_handle", ",", "sdk_wallet_steward", ")", ":", "make_pool_n_minus_f_nodes", "(", "looper", ",", "nodeSet", ")", "sdk_add_raw_attribute", "(", "looper", ",", "sdk_pool_handle", ",...
[ 4, 0 ]
[ 13, 84 ]
python
en
['en', 'error', 'th']
False
Font.color
(self)
The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: ...
The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A named CSS color: ...
def color(self): """ The 'color' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - A name...
[ "def", "color", "(", "self", ")", ":", "return", "self", "[", "\"color\"", "]" ]
[ 15, 4 ]
[ 63, 28 ]
python
en
['en', 'error', 'th']
False
Font.family
(self)
HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts ...
HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts ...
def family(self): """ HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the prefer...
[ "def", "family", "(", "self", ")", ":", "return", "self", "[", "\"family\"", "]" ]
[ 72, 4 ]
[ 94, 29 ]
python
en
['en', 'error', 'th']
False
Font.size
(self)
The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] Returns ------- int|float
The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf]
def size(self): """ The 'size' property is a number and may be specified as: - An int or float in the interval [1, inf] Returns ------- int|float """ return self["size"]
[ "def", "size", "(", "self", ")", ":", "return", "self", "[", "\"size\"", "]" ]
[ 103, 4 ]
[ 112, 27 ]
python
en
['en', 'error', 'th']
False
Font.__init__
(self, arg=None, color=None, family=None, size=None, **kwargs)
Construct a new Font object Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute. Parameters ---------- arg dict of properties compatible with this constructor or an inst...
Construct a new Font object Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute.
def __init__(self, arg=None, color=None, family=None, size=None, **kwargs): """ Construct a new Font object Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute. Parameters ---------- arg...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "color", "=", "None", ",", "family", "=", "None", ",", "size", "=", "None", ",", "*", "*", "kwargs", ")", ":", "super", "(", "Font", ",", "self", ")", ".", "__init__", "(", "\"font\"",...
[ 143, 4 ]
[ 227, 34 ]
python
en
['en', 'error', 'th']
False
Line.autocolorscale
(self)
Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by `marker.line.colorscale`. Has an effect only if in `marker.line.color`is set to a numerical array. In case `colorscale` is unspecified or `autocolorscale` is true, the ...
Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by `marker.line.colorscale`. Has an effect only if in `marker.line.color`is set to a numerical array. In case `colorscale` is unspecified or `autocolorscale` is true, the ...
def autocolorscale(self): """ Determines whether the colorscale is a default palette (`autocolorscale: true`) or the palette determined by `marker.line.colorscale`. Has an effect only if in `marker.line.color`is set to a numerical array. In case `colorscale` is unspecifie...
[ "def", "autocolorscale", "(", "self", ")", ":", "return", "self", "[", "\"autocolorscale\"", "]" ]
[ 27, 4 ]
[ 44, 37 ]
python
en
['en', 'error', 'th']
False
Line.cauto
(self)
Determines whether or not the color domain is computed with respect to the input data (here in `marker.line.color`) or the bounds set in `marker.line.cmin` and `marker.line.cmax` Has an effect only if in `marker.line.color`is set to a numerical array. Defaults to `false` when `...
Determines whether or not the color domain is computed with respect to the input data (here in `marker.line.color`) or the bounds set in `marker.line.cmin` and `marker.line.cmax` Has an effect only if in `marker.line.color`is set to a numerical array. Defaults to `false` when `...
def cauto(self): """ Determines whether or not the color domain is computed with respect to the input data (here in `marker.line.color`) or the bounds set in `marker.line.cmin` and `marker.line.cmax` Has an effect only if in `marker.line.color`is set to a numerical array...
[ "def", "cauto", "(", "self", ")", ":", "return", "self", "[", "\"cauto\"", "]" ]
[ 53, 4 ]
[ 69, 28 ]
python
en
['en', 'error', 'th']
False
Line.cmax
(self)
Sets the upper bound of the color domain. Has an effect only if in `marker.line.color`is set to a numerical array. Value should have the same units as in `marker.line.color` and if set, `marker.line.cmin` must be set as well. The 'cmax' property is a number and may be speci...
Sets the upper bound of the color domain. Has an effect only if in `marker.line.color`is set to a numerical array. Value should have the same units as in `marker.line.color` and if set, `marker.line.cmin` must be set as well. The 'cmax' property is a number and may be speci...
def cmax(self): """ Sets the upper bound of the color domain. Has an effect only if in `marker.line.color`is set to a numerical array. Value should have the same units as in `marker.line.color` and if set, `marker.line.cmin` must be set as well. The 'cmax' property i...
[ "def", "cmax", "(", "self", ")", ":", "return", "self", "[", "\"cmax\"", "]" ]
[ 78, 4 ]
[ 92, 27 ]
python
en
['en', 'error', 'th']
False
Line.cmid
(self)
Sets the mid-point of the color domain by scaling `marker.line.cmin` and/or `marker.line.cmax` to be equidistant to this point. Has an effect only if in `marker.line.color`is set to a numerical array. Value should have the same units as in `marker.line.color`. Has no effect when...
Sets the mid-point of the color domain by scaling `marker.line.cmin` and/or `marker.line.cmax` to be equidistant to this point. Has an effect only if in `marker.line.color`is set to a numerical array. Value should have the same units as in `marker.line.color`. Has no effect when...
def cmid(self): """ Sets the mid-point of the color domain by scaling `marker.line.cmin` and/or `marker.line.cmax` to be equidistant to this point. Has an effect only if in `marker.line.color`is set to a numerical array. Value should have the same units as in `marker.line...
[ "def", "cmid", "(", "self", ")", ":", "return", "self", "[", "\"cmid\"", "]" ]
[ 101, 4 ]
[ 117, 27 ]
python
en
['en', 'error', 'th']
False
Line.cmin
(self)
Sets the lower bound of the color domain. Has an effect only if in `marker.line.color`is set to a numerical array. Value should have the same units as in `marker.line.color` and if set, `marker.line.cmax` must be set as well. The 'cmin' property is a number and may be speci...
Sets the lower bound of the color domain. Has an effect only if in `marker.line.color`is set to a numerical array. Value should have the same units as in `marker.line.color` and if set, `marker.line.cmax` must be set as well. The 'cmin' property is a number and may be speci...
def cmin(self): """ Sets the lower bound of the color domain. Has an effect only if in `marker.line.color`is set to a numerical array. Value should have the same units as in `marker.line.color` and if set, `marker.line.cmax` must be set as well. The 'cmin' property i...
[ "def", "cmin", "(", "self", ")", ":", "return", "self", "[", "\"cmin\"", "]" ]
[ 126, 4 ]
[ 140, 27 ]
python
en
['en', 'error', 'th']
False
Line.color
(self)
Sets themarker.linecolor. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.line.cmin` and `marker.line.cmax` if set. The 'color' property is a color and may be ...
Sets themarker.linecolor. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.line.cmin` and `marker.line.cmax` if set. The 'color' property is a color and may be ...
def color(self): """ Sets themarker.linecolor. It accepts either a specific color or an array of numbers that are mapped to the colorscale relative to the max and min values of the array or relative to `marker.line.cmin` and `marker.line.cmax` if set. The 'color' pro...
[ "def", "color", "(", "self", ")", ":", "return", "self", "[", "\"color\"", "]" ]
[ 149, 4 ]
[ 205, 28 ]
python
en
['en', 'error', 'th']
False
Line.coloraxis
(self)
Sets a reference to a shared color axis. References to these shared color axes are "coloraxis", "coloraxis2", "coloraxis3", etc. Settings for these shared color axes are set in the layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. Note that multiple color scales can be...
Sets a reference to a shared color axis. References to these shared color axes are "coloraxis", "coloraxis2", "coloraxis3", etc. Settings for these shared color axes are set in the layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. Note that multiple color scales can be...
def coloraxis(self): """ Sets a reference to a shared color axis. References to these shared color axes are "coloraxis", "coloraxis2", "coloraxis3", etc. Settings for these shared color axes are set in the layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. Note t...
[ "def", "coloraxis", "(", "self", ")", ":", "return", "self", "[", "\"coloraxis\"", "]" ]
[ 214, 4 ]
[ 232, 32 ]
python
en
['en', 'error', 'th']
False
Line.colorscale
(self)
Sets the colorscale. Has an effect only if in `marker.line.color`is set to a numerical array. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest ...
Sets the colorscale. Has an effect only if in `marker.line.color`is set to a numerical array. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest ...
def colorscale(self): """ Sets the colorscale. Has an effect only if in `marker.line.color`is set to a numerical array. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mappin...
[ "def", "colorscale", "(", "self", ")", ":", "return", "self", "[", "\"colorscale\"", "]" ]
[ 241, 4 ]
[ 286, 33 ]
python
en
['en', 'error', 'th']
False
Line.colorsrc
(self)
Sets the source reference on Chart Studio Cloud for color . The 'colorsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str
Sets the source reference on Chart Studio Cloud for color . The 'colorsrc' property must be specified as a string or as a plotly.grid_objs.Column object
def colorsrc(self): """ Sets the source reference on Chart Studio Cloud for color . The 'colorsrc' property must be specified as a string or as a plotly.grid_objs.Column object Returns ------- str """ return self["colorsrc"]
[ "def", "colorsrc", "(", "self", ")", ":", "return", "self", "[", "\"colorsrc\"", "]" ]
[ 295, 4 ]
[ 306, 31 ]
python
en
['en', 'error', 'th']
False
Line.reversescale
(self)
Reverses the color mapping if true. Has an effect only if in `marker.line.color`is set to a numerical array. If true, `marker.line.cmin` will correspond to the last color in the array and `marker.line.cmax` will correspond to the first color. The 'reversescale' prop...
Reverses the color mapping if true. Has an effect only if in `marker.line.color`is set to a numerical array. If true, `marker.line.cmin` will correspond to the last color in the array and `marker.line.cmax` will correspond to the first color. The 'reversescale' prop...
def reversescale(self): """ Reverses the color mapping if true. Has an effect only if in `marker.line.color`is set to a numerical array. If true, `marker.line.cmin` will correspond to the last color in the array and `marker.line.cmax` will correspond to the first color. ...
[ "def", "reversescale", "(", "self", ")", ":", "return", "self", "[", "\"reversescale\"", "]" ]
[ 315, 4 ]
[ 330, 35 ]
python
en
['en', 'error', 'th']
False
Line.width
(self)
Sets the width (in px) of the lines bounding the marker points. 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 lines bounding the marker points. 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 lines bounding the marker points. The 'width' property is a number and may be specified as: - An int or float in the interval [0, inf] Returns ------- int|float """ return self["width"]
[ "def", "width", "(", "self", ")", ":", "return", "self", "[", "\"width\"", "]" ]
[ 339, 4 ]
[ 350, 28 ]
python
en
['en', 'error', 'th']
False
Line.__init__
( self, arg=None, autocolorscale=None, cauto=None, cmax=None, cmid=None, cmin=None, color=None, coloraxis=None, colorscale=None, colorsrc=None, reversescale=None, width=None, **kwargs )
Construct a new Line object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scatter3d.marker.Line` autocolorscale Determines whether the colorscale ...
Construct a new Line object Parameters ---------- arg dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.scatter3d.marker.Line` autocolorscale Determines whether the colorscale ...
def __init__( self, arg=None, autocolorscale=None, cauto=None, cmax=None, cmid=None, cmin=None, color=None, coloraxis=None, colorscale=None, colorsrc=None, reversescale=None, width=None, **kwargs ): ...
[ "def", "__init__", "(", "self", ",", "arg", "=", "None", ",", "autocolorscale", "=", "None", ",", "cauto", "=", "None", ",", "cmax", "=", "None", ",", "cmid", "=", "None", ",", "cmin", "=", "None", ",", "color", "=", "None", ",", "coloraxis", "=", ...
[ 439, 4 ]
[ 625, 34 ]
python
en
['en', 'error', 'th']
False
ConnectionManager.__init__
(self, context: InjectionContext)
Initialize a ConnectionManager. Args: context: The context for this connection manager
Initialize a ConnectionManager.
def __init__(self, context: InjectionContext): """ Initialize a ConnectionManager. Args: context: The context for this connection manager """ self._context = context self._logger = logging.getLogger(__name__)
[ "def", "__init__", "(", "self", ",", "context", ":", "InjectionContext", ")", ":", "self", ".", "_context", "=", "context", "self", ".", "_logger", "=", "logging", ".", "getLogger", "(", "__name__", ")" ]
[ 43, 4 ]
[ 51, 50 ]
python
en
['en', 'error', 'th']
False
ConnectionManager.context
(self)
Accessor for the current injection context. Returns: The injection context for this connection manager
Accessor for the current injection context.
def context(self) -> InjectionContext: """ Accessor for the current injection context. Returns: The injection context for this connection manager """ return self._context
[ "def", "context", "(", "self", ")", "->", "InjectionContext", ":", "return", "self", ".", "_context" ]
[ 54, 4 ]
[ 62, 28 ]
python
en
['en', 'error', 'th']
False
ConnectionManager.create_invitation
( self, my_label: str = None, my_endpoint: str = None, their_role: str = None, accept: str = None, public: bool = False, multi_use: bool = False, alias: str = None, )
Generate new connection invitation. This interaction represents an out-of-band communication channel. In the future and in practice, these sort of invitations will be received over any number of channels such as SMS, Email, QR Code, NFC, etc. Structure of an invite message: ...
Generate new connection invitation.
async def create_invitation( self, my_label: str = None, my_endpoint: str = None, their_role: str = None, accept: str = None, public: bool = False, multi_use: bool = False, alias: str = None, ) -> Tuple[ConnectionRecord, ConnectionInvitation]: ...
[ "async", "def", "create_invitation", "(", "self", ",", "my_label", ":", "str", "=", "None", ",", "my_endpoint", ":", "str", "=", "None", ",", "their_role", ":", "str", "=", "None", ",", "accept", ":", "str", "=", "None", ",", "public", ":", "bool", "...
[ 64, 4 ]
[ 178, 37 ]
python
en
['en', 'error', 'th']
False
ConnectionManager.receive_invitation
( self, invitation: ConnectionInvitation, their_role: str = None, accept: str = None, alias: str = None, )
Create a new connection record to track a received invitation. Args: invitation: The `ConnectionInvitation` to store their_role: The role assigned to this connection accept: set to 'auto' to auto-accept the invitation alias: optional alias to set on the ...
Create a new connection record to track a received invitation.
async def receive_invitation( self, invitation: ConnectionInvitation, their_role: str = None, accept: str = None, alias: str = None, ) -> ConnectionRecord: """ Create a new connection record to track a received invitation. Args: invitation...
[ "async", "def", "receive_invitation", "(", "self", ",", "invitation", ":", "ConnectionInvitation", ",", "their_role", ":", "str", "=", "None", ",", "accept", ":", "str", "=", "None", ",", "alias", ":", "str", "=", "None", ",", ")", "->", "ConnectionRecord"...
[ 180, 4 ]
[ 243, 25 ]
python
en
['en', 'error', 'th']
False
ConnectionManager.create_request
( self, connection: ConnectionRecord, my_label: str = None, my_endpoint: str = None, )
Create a new connection request for a previously-received invitation. Args: connection: The `ConnectionRecord` representing the invitation to accept my_label: My label my_endpoint: My endpoint Returns: A new `ConnectionRequest` message to send t...
Create a new connection request for a previously-received invitation.
async def create_request( self, connection: ConnectionRecord, my_label: str = None, my_endpoint: str = None, ) -> ConnectionRequest: """ Create a new connection request for a previously-received invitation. Args: connection: The `ConnectionRecord`...
[ "async", "def", "create_request", "(", "self", ",", "connection", ":", "ConnectionRecord", ",", "my_label", ":", "str", "=", "None", ",", "my_endpoint", ":", "str", "=", "None", ",", ")", "->", "ConnectionRequest", ":", "wallet", ":", "BaseWallet", "=", "a...
[ 245, 4 ]
[ 291, 22 ]
python
en
['en', 'error', 'th']
False
ConnectionManager.receive_request
( self, request: ConnectionRequest, receipt: MessageReceipt )
Receive and store a connection request. Args: request: The `ConnectionRequest` to accept receipt: The message receipt Returns: The new or updated `ConnectionRecord` instance
Receive and store a connection request.
async def receive_request( self, request: ConnectionRequest, receipt: MessageReceipt ) -> ConnectionRecord: """ Receive and store a connection request. Args: request: The `ConnectionRequest` to accept receipt: The message receipt Returns: ...
[ "async", "def", "receive_request", "(", "self", ",", "request", ":", "ConnectionRequest", ",", "receipt", ":", "MessageReceipt", ")", "->", "ConnectionRecord", ":", "ConnectionRecord", ".", "log_state", "(", "self", ".", "context", ",", "\"Receiving connection reque...
[ 293, 4 ]
[ 413, 25 ]
python
en
['en', 'error', 'th']
False
ConnectionManager.create_response
( self, connection: ConnectionRecord, my_endpoint: str = None )
Create a connection response for a received connection request. Args: connection: The `ConnectionRecord` with a pending connection request my_endpoint: The endpoint I can be reached at Returns: A tuple of the updated `ConnectionRecord` new `ConnectionRespon...
Create a connection response for a received connection request.
async def create_response( self, connection: ConnectionRecord, my_endpoint: str = None ) -> ConnectionResponse: """ Create a connection response for a received connection request. Args: connection: The `ConnectionRecord` with a pending connection request my_e...
[ "async", "def", "create_response", "(", "self", ",", "connection", ":", "ConnectionRecord", ",", "my_endpoint", ":", "str", "=", "None", ")", "->", "ConnectionResponse", ":", "ConnectionRecord", ".", "log_state", "(", "self", ".", "context", ",", "\"Creating con...
[ 415, 4 ]
[ 475, 23 ]
python
en
['en', 'error', 'th']
False
ConnectionManager.accept_response
( self, response: ConnectionResponse, receipt: MessageReceipt )
Accept a connection response. Process a ConnectionResponse message by looking up the connection request and setting up the pairwise connection. Args: response: The `ConnectionResponse` to accept receipt: The message receipt Returns: The upd...
Accept a connection response.
async def accept_response( self, response: ConnectionResponse, receipt: MessageReceipt ) -> ConnectionRecord: """ Accept a connection response. Process a ConnectionResponse message by looking up the connection request and setting up the pairwise connection. Args: ...
[ "async", "def", "accept_response", "(", "self", ",", "response", ":", "ConnectionResponse", ",", "receipt", ":", "MessageReceipt", ")", "->", "ConnectionRecord", ":", "connection", "=", "None", "if", "response", ".", "_thread", ":", "# identify the request by the th...
[ 477, 4 ]
[ 550, 25 ]
python
en
['en', 'error', 'th']
False
ConnectionManager.create_static_connection
( self, my_did: str = None, my_seed: str = None, their_did: str = None, their_seed: str = None, their_verkey: str = None, their_endpoint: str = None, their_role: str = None, alias: str = None, )
Register a new static connection (for use by the test suite). Args: my_did: override the DID used in the connection my_seed: provide a seed used to generate our DID and keys their_did: provide the DID used by the other party their_seed: provide a seed us...
Register a new static connection (for use by the test suite).
async def create_static_connection( self, my_did: str = None, my_seed: str = None, their_did: str = None, their_seed: str = None, their_verkey: str = None, their_endpoint: str = None, their_role: str = None, alias: str = None, ) -> ConnectionRe...
[ "async", "def", "create_static_connection", "(", "self", ",", "my_did", ":", "str", "=", "None", ",", "my_seed", ":", "str", "=", "None", ",", "their_did", ":", "str", "=", "None", ",", "their_seed", ":", "str", "=", "None", ",", "their_verkey", ":", "...
[ 552, 4 ]
[ 613, 25 ]
python
en
['en', 'error', 'th']
False
ConnectionManager.find_connection
( self, their_did: str, my_did: str = None, my_verkey: str = None, auto_complete=False, )
Look up existing connection information for a sender verkey. Args: their_did: Their DID my_did: My DID my_verkey: My verkey auto_complete: Should this connection automatically be promoted to active Returns: The located `ConnectionRec...
Look up existing connection information for a sender verkey.
async def find_connection( self, their_did: str, my_did: str = None, my_verkey: str = None, auto_complete=False, ) -> ConnectionRecord: """ Look up existing connection information for a sender verkey. Args: their_did: Their DID ...
[ "async", "def", "find_connection", "(", "self", ",", "their_did", ":", "str", ",", "my_did", ":", "str", "=", "None", ",", "my_verkey", ":", "str", "=", "None", ",", "auto_complete", "=", "False", ",", ")", "->", "ConnectionRecord", ":", "# self._log_state...
[ 615, 4 ]
[ 668, 25 ]
python
en
['en', 'error', 'th']
False
ConnectionManager.find_inbound_connection
( self, receipt: MessageReceipt )
Deserialize an incoming message and further populate the request context. Args: receipt: The message receipt Returns: The `ConnectionRecord` associated with the expanded message, if any
Deserialize an incoming message and further populate the request context.
async def find_inbound_connection( self, receipt: MessageReceipt ) -> ConnectionRecord: """ Deserialize an incoming message and further populate the request context. Args: receipt: The message receipt Returns: The `ConnectionRecord` associated with t...
[ "async", "def", "find_inbound_connection", "(", "self", ",", "receipt", ":", "MessageReceipt", ")", "->", "ConnectionRecord", ":", "cache_key", "=", "None", "connection", "=", "None", "resolved", "=", "False", "if", "receipt", ".", "sender_verkey", "and", "recei...
[ 670, 4 ]
[ 718, 25 ]
python
en
['en', 'error', 'th']
False
ConnectionManager.resolve_inbound_connection
( self, receipt: MessageReceipt )
Populate the receipt DID information and find the related `ConnectionRecord`. Args: receipt: The message receipt Returns: The `ConnectionRecord` associated with the expanded message, if any
Populate the receipt DID information and find the related `ConnectionRecord`.
async def resolve_inbound_connection( self, receipt: MessageReceipt ) -> ConnectionRecord: """ Populate the receipt DID information and find the related `ConnectionRecord`. Args: receipt: The message receipt Returns: The `ConnectionRecord` associated...
[ "async", "def", "resolve_inbound_connection", "(", "self", ",", "receipt", ":", "MessageReceipt", ")", "->", "ConnectionRecord", ":", "if", "receipt", ".", "sender_verkey", ":", "try", ":", "receipt", ".", "sender_did", "=", "await", "self", ".", "find_did_for_k...
[ 720, 4 ]
[ 766, 9 ]
python
en
['en', 'error', 'th']
False
ConnectionManager.create_did_document
( self, did_info: DIDInfo, inbound_connection_id: str = None, svc_endpoints: Sequence[str] = [], )
Create our DID document for a given DID. Args: did_info: The DID information (DID and verkey) used in the connection inbound_connection_id: The ID of the inbound routing connection to use svc_endpoints: Custom endpoints for the DID Document Returns: The ...
Create our DID document for a given DID.
async def create_did_document( self, did_info: DIDInfo, inbound_connection_id: str = None, svc_endpoints: Sequence[str] = [], ) -> DIDDoc: """Create our DID document for a given DID. Args: did_info: The DID information (DID and verkey) used in the connect...
[ "async", "def", "create_did_document", "(", "self", ",", "did_info", ":", "DIDInfo", ",", "inbound_connection_id", ":", "str", "=", "None", ",", "svc_endpoints", ":", "Sequence", "[", "str", "]", "=", "[", "]", ",", ")", "->", "DIDDoc", ":", "did_doc", "...
[ 768, 4 ]
[ 848, 22 ]
python
en
['en', 'en', 'en']
True
ConnectionManager.fetch_did_document
(self, did: str)
Retrieve a DID Document for a given DID. Args: did: The DID to search for
Retrieve a DID Document for a given DID.
async def fetch_did_document(self, did: str) -> DIDDoc: """Retrieve a DID Document for a given DID. Args: did: The DID to search for """ storage: BaseStorage = await self.context.inject(BaseStorage) record = await storage.search_records( self.RECORD_TYPE_...
[ "async", "def", "fetch_did_document", "(", "self", ",", "did", ":", "str", ")", "->", "DIDDoc", ":", "storage", ":", "BaseStorage", "=", "await", "self", ".", "context", ".", "inject", "(", "BaseStorage", ")", "record", "=", "await", "storage", ".", "sea...
[ 850, 4 ]
[ 860, 45 ]
python
en
['en', 'en', 'en']
True
ConnectionManager.store_did_document
(self, did_doc: DIDDoc)
Store a DID document. Args: did_doc: The `DIDDoc` instance to be persisted
Store a DID document.
async def store_did_document(self, did_doc: DIDDoc): """Store a DID document. Args: did_doc: The `DIDDoc` instance to be persisted """ assert did_doc.did storage: BaseStorage = await self.context.inject(BaseStorage) try: record = await self.fetch_...
[ "async", "def", "store_did_document", "(", "self", ",", "did_doc", ":", "DIDDoc", ")", ":", "assert", "did_doc", ".", "did", "storage", ":", "BaseStorage", "=", "await", "self", ".", "context", ".", "inject", "(", "BaseStorage", ")", "try", ":", "record", ...
[ 862, 4 ]
[ 882, 66 ]
python
en
['en', 'en', 'en']
True
ConnectionManager.add_key_for_did
(self, did: str, key: str)
Store a verkey for lookup against a DID. Args: did: The DID to associate with this key key: The verkey to be added
Store a verkey for lookup against a DID.
async def add_key_for_did(self, did: str, key: str): """Store a verkey for lookup against a DID. Args: did: The DID to associate with this key key: The verkey to be added """ record = StorageRecord(self.RECORD_TYPE_DID_KEY, key, {"did": did, "key": key}) ...
[ "async", "def", "add_key_for_did", "(", "self", ",", "did", ":", "str", ",", "key", ":", "str", ")", ":", "record", "=", "StorageRecord", "(", "self", ".", "RECORD_TYPE_DID_KEY", ",", "key", ",", "{", "\"did\"", ":", "did", ",", "\"key\"", ":", "key", ...
[ 884, 4 ]
[ 893, 40 ]
python
en
['en', 'en', 'en']
True
ConnectionManager.find_did_for_key
(self, key: str)
Find the DID previously associated with a key. Args: key: The verkey to look up
Find the DID previously associated with a key.
async def find_did_for_key(self, key: str) -> str: """Find the DID previously associated with a key. Args: key: The verkey to look up """ storage: BaseStorage = await self.context.inject(BaseStorage) record = await storage.search_records( self.RECORD_TYPE...
[ "async", "def", "find_did_for_key", "(", "self", ",", "key", ":", "str", ")", "->", "str", ":", "storage", ":", "BaseStorage", "=", "await", "self", ".", "context", ".", "inject", "(", "BaseStorage", ")", "record", "=", "await", "storage", ".", "search_r...
[ 895, 4 ]
[ 905, 33 ]
python
en
['en', 'en', 'en']
True
ConnectionManager.remove_keys_for_did
(self, did: str)
Remove all keys associated with a DID. Args: did: The DID to remove keys for
Remove all keys associated with a DID.
async def remove_keys_for_did(self, did: str): """Remove all keys associated with a DID. Args: did: The DID to remove keys for """ storage: BaseStorage = await self.context.inject(BaseStorage) keys = await storage.search_records( self.RECORD_TYPE_DID_KEY,...
[ "async", "def", "remove_keys_for_did", "(", "self", ",", "did", ":", "str", ")", ":", "storage", ":", "BaseStorage", "=", "await", "self", ".", "context", ".", "inject", "(", "BaseStorage", ")", "keys", "=", "await", "storage", ".", "search_records", "(", ...
[ 907, 4 ]
[ 918, 47 ]
python
en
['en', 'en', 'en']
True
ConnectionManager.get_connection_targets
( self, *, connection_id: str = None, connection: ConnectionRecord = None )
Create a connection target from a `ConnectionRecord`. Args: connection_id: The connection ID to search for connection: The connection record itself, if already available
Create a connection target from a `ConnectionRecord`.
async def get_connection_targets( self, *, connection_id: str = None, connection: ConnectionRecord = None ): """Create a connection target from a `ConnectionRecord`. Args: connection_id: The connection ID to search for connection: The connection record itself, if alr...
[ "async", "def", "get_connection_targets", "(", "self", ",", "*", ",", "connection_id", ":", "str", "=", "None", ",", "connection", ":", "ConnectionRecord", "=", "None", ")", ":", "if", "not", "connection_id", ":", "connection_id", "=", "connection", ".", "co...
[ 920, 4 ]
[ 948, 22 ]
python
en
['en', 'en', 'en']
True
ConnectionManager.fetch_connection_targets
( self, connection: ConnectionRecord )
Get a list of connection target from a `ConnectionRecord`. Args: connection: The connection record (with associated `DIDDoc`) used to generate the connection target
Get a list of connection target from a `ConnectionRecord`.
async def fetch_connection_targets( self, connection: ConnectionRecord ) -> Sequence[ConnectionTarget]: """Get a list of connection target from a `ConnectionRecord`. Args: connection: The connection record (with associated `DIDDoc`) used to generate the connectio...
[ "async", "def", "fetch_connection_targets", "(", "self", ",", "connection", ":", "ConnectionRecord", ")", "->", "Sequence", "[", "ConnectionTarget", "]", ":", "if", "not", "connection", ".", "my_did", ":", "self", ".", "_logger", ".", "debug", "(", "\"No local...
[ 950, 4 ]
[ 1011, 22 ]
python
en
['en', 'en', 'en']
True
ConnectionManager.diddoc_connection_targets
( self, doc: DIDDoc, sender_verkey: str, their_label: str = None )
Get a list of connection targets from a DID Document. Args: doc: The DID Document to create the target from sender_verkey: The verkey we are using their_label: The connection label they are using
Get a list of connection targets from a DID Document.
def diddoc_connection_targets( self, doc: DIDDoc, sender_verkey: str, their_label: str = None ) -> Sequence[ConnectionTarget]: """Get a list of connection targets from a DID Document. Args: doc: The DID Document to create the target from sender_verkey: The verkey we ...
[ "def", "diddoc_connection_targets", "(", "self", ",", "doc", ":", "DIDDoc", ",", "sender_verkey", ":", "str", ",", "their_label", ":", "str", "=", "None", ")", "->", "Sequence", "[", "ConnectionTarget", "]", ":", "if", "not", "doc", ":", "raise", "Connecti...
[ 1013, 4 ]
[ 1048, 22 ]
python
en
['en', 'en', 'en']
True
ConnectionManager.establish_inbound
( self, connection: ConnectionRecord, inbound_connection_id: str, outbound_handler )
Assign the inbound routing connection for a connection record. Returns: the current routing state (request or done)
Assign the inbound routing connection for a connection record.
async def establish_inbound( self, connection: ConnectionRecord, inbound_connection_id: str, outbound_handler ) -> str: """Assign the inbound routing connection for a connection record. Returns: the current routing state (request or done) """ # The connection must have a v...
[ "async", "def", "establish_inbound", "(", "self", ",", "connection", ":", "ConnectionRecord", ",", "inbound_connection_id", ":", "str", ",", "outbound_handler", ")", "->", "str", ":", "# The connection must have a verkey, but in the case of a received", "# invitation we might...
[ 1050, 4 ]
[ 1090, 39 ]
python
en
['en', 'en', 'en']
True
ConnectionManager.update_inbound
( self, inbound_connection_id: str, recip_verkey: str, routing_state: str )
Activate connections once a route has been established. Looks up pending connections associated with the inbound routing connection and marks the routing as complete.
Activate connections once a route has been established.
async def update_inbound( self, inbound_connection_id: str, recip_verkey: str, routing_state: str ): """Activate connections once a route has been established. Looks up pending connections associated with the inbound routing connection and marks the routing as complete. """ ...
[ "async", "def", "update_inbound", "(", "self", ",", "inbound_connection_id", ":", "str", ",", "recip_verkey", ":", "str", ",", "routing_state", ":", "str", ")", ":", "conns", "=", "await", "ConnectionRecord", ".", "query", "(", "self", ".", "context", ",", ...
[ 1092, 4 ]
[ 1112, 51 ]
python
en
['en', 'en', 'en']
True
_make_argparse_table
(class_)
Build the reStructuredText table containing the args and descriptions.
Build the reStructuredText table containing the args and descriptions.
def _make_argparse_table(class_): """ Build the reStructuredText table containing the args and descriptions. """ readme = [] parser = ParlaiParser(False, False) class_.add_cmdline_args(parser, partial_opt=None) # group by whatever ArgumentGroups there are for ag in parser._action_groups:...
[ "def", "_make_argparse_table", "(", "class_", ")", ":", "readme", "=", "[", "]", "parser", "=", "ParlaiParser", "(", "False", ",", "False", ")", "class_", ".", "add_cmdline_args", "(", "parser", ",", "partial_opt", "=", "None", ")", "# group by whatever Argume...
[ 21, 0 ]
[ 79, 17 ]
python
en
['en', 'error', 'th']
False
prepare_agent_readme
(agent)
Load agent readme, add title if necessary. :param agent: string indicating agent module :return: agent's readme
Load agent readme, add title if necessary.
def prepare_agent_readme(agent): """ Load agent readme, add title if necessary. :param agent: string indicating agent module :return: agent's readme """ readme_path = f'{os.path.join(parlai.agents.__path__[0], agent)}/README.md' if not os.path.exists(readme_path): r...
[ "def", "prepare_agent_readme", "(", "agent", ")", ":", "readme_path", "=", "f'{os.path.join(parlai.agents.__path__[0], agent)}/README.md'", "if", "not", "os", ".", "path", ".", "exists", "(", "readme_path", ")", ":", "raise", "RuntimeError", "(", "f'Agent {agent} must h...
[ 82, 0 ]
[ 129, 17 ]
python
en
['en', 'error', 'th']
False
write_all_agents
()
Write list of agents to fout. :param fout: file object to write to
Write list of agents to fout.
def write_all_agents(): """ Write list of agents to fout. :param fout: file object to write to """ os.makedirs('agent_refs', exist_ok=True) agents = [name for _, name, _ in pkgutil.iter_modules(parlai.agents.__path__)] for agent in agents: with open(f'agent_refs/{agent}.md',...
[ "def", "write_all_agents", "(", ")", ":", "os", ".", "makedirs", "(", "'agent_refs'", ",", "exist_ok", "=", "True", ")", "agents", "=", "[", "name", "for", "_", ",", "name", ",", "_", "in", "pkgutil", ".", "iter_modules", "(", "parlai", ".", "agents", ...
[ 132, 0 ]
[ 143, 60 ]
python
en
['en', 'error', 'th']
False
roles
(request)
Combination of all roles. Example: - roles=[A, B, C] ==> [(A), (B), (C), (A, B), (A, C), (B, C), (A, B, C)]
Combination of all roles.
def roles(request): ''' Combination of all roles. Example: - roles=[A, B, C] ==> [(A), (B), (C), (A, B), (A, C), (B, C), (A, B, C)] ''' return request.param
[ "def", "roles", "(", "request", ")", ":", "return", "request", ".", "param" ]
[ 46, 0 ]
[ 54, 24 ]
python
en
['en', 'error', 'th']
False
signatures
(request, roles)
Combinations of all signature types and signature count. Example: - roles=[A, B] - sig_count=1..3 =>[(), (A: 1), (B:1), (A: 2), (B: 2), (A: 3), (B: 3), (A:1, B: 1), (A:2, B: 1), (A:1, B: 2), (A:2, B: 2), (A:1, B: 3), (A:3, B: 1), (A:3, B: 3), ...
Combinations of all signature types and signature count.
def signatures(request, roles): ''' Combinations of all signature types and signature count. Example: - roles=[A, B] - sig_count=1..3 =>[(), (A: 1), (B:1), (A: 2), (B: 2), (A: 3), (B: 3), (A:1, B: 1), (A:2, B: 1), (A:1, B: 2), (A:2, B: 2), (A:1, B: 3)...
[ "def", "signatures", "(", "request", ",", "roles", ")", ":", "max_sig_count", "=", "getValueFromModule", "(", "request", ",", "\"MAX_SIG_COUNT\"", ",", "3", ")", "all_sigs_count", "=", "list", "(", "range", "(", "1", ",", "max_sig_count", ")", ")", "return",...
[ 58, 0 ]
[ 76, 5 ]
python
en
['en', 'error', 'th']
False
GetGTestRootDir
(gmock_root)
Returns the root directory of Google Test.
Returns the root directory of Google Test.
def GetGTestRootDir(gmock_root): """Returns the root directory of Google Test.""" return os.path.join(gmock_root, '../googletest')
[ "def", "GetGTestRootDir", "(", "gmock_root", ")", ":", "return", "os", ".", "path", ".", "join", "(", "gmock_root", ",", "'../googletest'", ")" ]
[ 90, 0 ]
[ 93, 50 ]
python
en
['en', 'en', 'en']
True
ValidateGMockRootDir
(gmock_root)
Makes sure gmock_root points to a valid gmock root directory. The function aborts the program on failure.
Makes sure gmock_root points to a valid gmock root directory.
def ValidateGMockRootDir(gmock_root): """Makes sure gmock_root points to a valid gmock root directory. The function aborts the program on failure. """ gtest.ValidateGTestRootDir(GetGTestRootDir(gmock_root)) gtest.VerifyFileExists(gmock_root, GMOCK_H_SEED) gtest.VerifyFileExists(gmock_root, GMOCK_ALL_CC_SE...
[ "def", "ValidateGMockRootDir", "(", "gmock_root", ")", ":", "gtest", ".", "ValidateGTestRootDir", "(", "GetGTestRootDir", "(", "gmock_root", ")", ")", "gtest", ".", "VerifyFileExists", "(", "gmock_root", ",", "GMOCK_H_SEED", ")", "gtest", ".", "VerifyFileExists", ...
[ 96, 0 ]
[ 104, 55 ]
python
en
['en', 'en', 'en']
True
ValidateOutputDir
(output_dir)
Makes sure output_dir points to a valid output directory. The function aborts the program on failure.
Makes sure output_dir points to a valid output directory.
def ValidateOutputDir(output_dir): """Makes sure output_dir points to a valid output directory. The function aborts the program on failure. """ gtest.VerifyOutputFile(output_dir, gtest.GTEST_H_OUTPUT) gtest.VerifyOutputFile(output_dir, GMOCK_H_OUTPUT) gtest.VerifyOutputFile(output_dir, GMOCK_GTEST_ALL_CC_...
[ "def", "ValidateOutputDir", "(", "output_dir", ")", ":", "gtest", ".", "VerifyOutputFile", "(", "output_dir", ",", "gtest", ".", "GTEST_H_OUTPUT", ")", "gtest", ".", "VerifyOutputFile", "(", "output_dir", ",", "GMOCK_H_OUTPUT", ")", "gtest", ".", "VerifyOutputFile...
[ 107, 0 ]
[ 115, 63 ]
python
en
['en', 'en', 'en']
True
FuseGMockH
(gmock_root, output_dir)
Scans folder gmock_root to generate gmock/gmock.h in output_dir.
Scans folder gmock_root to generate gmock/gmock.h in output_dir.
def FuseGMockH(gmock_root, output_dir): """Scans folder gmock_root to generate gmock/gmock.h in output_dir.""" output_file = file(os.path.join(output_dir, GMOCK_H_OUTPUT), 'w') processed_files = sets.Set() # Holds all gmock headers we've processed. def ProcessFile(gmock_header_path): """Processes the giv...
[ "def", "FuseGMockH", "(", "gmock_root", ",", "output_dir", ")", ":", "output_file", "=", "file", "(", "os", ".", "path", ".", "join", "(", "output_dir", ",", "GMOCK_H_OUTPUT", ")", ",", "'w'", ")", "processed_files", "=", "sets", ".", "Set", "(", ")", ...
[ 118, 0 ]
[ 155, 21 ]
python
en
['en', 'en', 'en']
True
FuseGMockAllCcToFile
(gmock_root, output_file)
Scans folder gmock_root to fuse gmock-all.cc into output_file.
Scans folder gmock_root to fuse gmock-all.cc into output_file.
def FuseGMockAllCcToFile(gmock_root, output_file): """Scans folder gmock_root to fuse gmock-all.cc into output_file.""" processed_files = sets.Set() def ProcessFile(gmock_source_file): """Processes the given gmock source file.""" # We don't process the same #included file twice. if gmock_source_fil...
[ "def", "FuseGMockAllCcToFile", "(", "gmock_root", ",", "output_file", ")", ":", "processed_files", "=", "sets", ".", "Set", "(", ")", "def", "ProcessFile", "(", "gmock_source_file", ")", ":", "\"\"\"Processes the given gmock source file.\"\"\"", "# We don't process the sa...
[ 158, 0 ]
[ 200, 32 ]
python
en
['en', 'en', 'en']
True
FuseGMockGTestAllCc
(gmock_root, output_dir)
Scans folder gmock_root to generate gmock-gtest-all.cc in output_dir.
Scans folder gmock_root to generate gmock-gtest-all.cc in output_dir.
def FuseGMockGTestAllCc(gmock_root, output_dir): """Scans folder gmock_root to generate gmock-gtest-all.cc in output_dir.""" output_file = file(os.path.join(output_dir, GMOCK_GTEST_ALL_CC_OUTPUT), 'w') # First, fuse gtest-all.cc into gmock-gtest-all.cc. gtest.FuseGTestAllCcToFile(GetGTestRootDir(gmock_root), o...
[ "def", "FuseGMockGTestAllCc", "(", "gmock_root", ",", "output_dir", ")", ":", "output_file", "=", "file", "(", "os", ".", "path", ".", "join", "(", "output_dir", ",", "GMOCK_GTEST_ALL_CC_OUTPUT", ")", ",", "'w'", ")", "# First, fuse gtest-all.cc into gmock-gtest-all...
[ 203, 0 ]
[ 211, 21 ]
python
en
['en', 'en', 'en']
True
FuseGMock
(gmock_root, output_dir)
Fuses gtest.h, gmock.h, and gmock-gtest-all.h.
Fuses gtest.h, gmock.h, and gmock-gtest-all.h.
def FuseGMock(gmock_root, output_dir): """Fuses gtest.h, gmock.h, and gmock-gtest-all.h.""" ValidateGMockRootDir(gmock_root) ValidateOutputDir(output_dir) gtest.FuseGTestH(GetGTestRootDir(gmock_root), output_dir) FuseGMockH(gmock_root, output_dir) FuseGMockGTestAllCc(gmock_root, output_dir)
[ "def", "FuseGMock", "(", "gmock_root", ",", "output_dir", ")", ":", "ValidateGMockRootDir", "(", "gmock_root", ")", "ValidateOutputDir", "(", "output_dir", ")", "gtest", ".", "FuseGTestH", "(", "GetGTestRootDir", "(", "gmock_root", ")", ",", "output_dir", ")", "...
[ 214, 0 ]
[ 222, 45 ]
python
en
['en', 'en', 'en']
True
QueuedOutboundMessage.__init__
( self, context: InjectionContext, message: OutboundMessage, target: ConnectionTarget, transport_id: str, )
Initialize the queued outbound message.
Initialize the queued outbound message.
def __init__( self, context: InjectionContext, message: OutboundMessage, target: ConnectionTarget, transport_id: str, ): """Initialize the queued outbound message.""" self.context = context self.endpoint = target and target.endpoint self.error:...
[ "def", "__init__", "(", "self", ",", "context", ":", "InjectionContext", ",", "message", ":", "OutboundMessage", ",", "target", ":", "ConnectionTarget", ",", "transport_id", ":", "str", ",", ")", ":", "self", ".", "context", "=", "context", "self", ".", "e...
[ 39, 4 ]
[ 57, 45 ]
python
en
['en', 'en', 'en']
True
OutboundTransportManager.__init__
( self, context: InjectionContext, handle_not_delivered: Callable = None )
Initialize a `OutboundTransportManager` instance. Args: context: The application context handle_not_delivered: An optional handler for undelivered messages
Initialize a `OutboundTransportManager` instance.
def __init__( self, context: InjectionContext, handle_not_delivered: Callable = None ): """ Initialize a `OutboundTransportManager` instance. Args: context: The application context handle_not_delivered: An optional handler for undelivered messages ""...
[ "def", "__init__", "(", "self", ",", "context", ":", "InjectionContext", ",", "handle_not_delivered", ":", "Callable", "=", "None", ")", ":", "self", ".", "context", "=", "context", "self", ".", "loop", "=", "asyncio", ".", "get_event_loop", "(", ")", "sel...
[ 63, 4 ]
[ 84, 47 ]
python
en
['en', 'error', 'th']
False
OutboundTransportManager.setup
(self)
Perform setup operations.
Perform setup operations.
async def setup(self): """Perform setup operations.""" outbound_transports = ( self.context.settings.get("transport.outbound_configs") or [] ) for outbound_transport in outbound_transports: self.register(outbound_transport)
[ "async", "def", "setup", "(", "self", ")", ":", "outbound_transports", "=", "(", "self", ".", "context", ".", "settings", ".", "get", "(", "\"transport.outbound_configs\"", ")", "or", "[", "]", ")", "for", "outbound_transport", "in", "outbound_transports", ":"...
[ 86, 4 ]
[ 92, 45 ]
python
en
['en', 'bg', 'en']
True
OutboundTransportManager.register
(self, module: str)
Register a new outbound transport by module path. Args: module: Module name to register Raises: OutboundTransportRegistrationError: If the imported class cannot be located OutboundTransportRegistrationError: If the imported class does not ...
Register a new outbound transport by module path.
def register(self, module: str) -> str: """ Register a new outbound transport by module path. Args: module: Module name to register Raises: OutboundTransportRegistrationError: If the imported class cannot be located OutboundTransportR...
[ "def", "register", "(", "self", ",", "module", ":", "str", ")", "->", "str", ":", "try", ":", "imported_class", "=", "ClassLoader", ".", "load_subclass_of", "(", "BaseOutboundTransport", ",", "module", ",", "MODULE_BASE_PATH", ")", "except", "(", "ModuleLoadEr...
[ 94, 4 ]
[ 119, 50 ]
python
en
['en', 'error', 'th']
False
OutboundTransportManager.register_class
( self, transport_class: Type[BaseOutboundTransport], transport_id: str = None )
Register a new outbound transport class. Args: transport_class: Transport class to register Raises: OutboundTransportRegistrationError: If the imported class does not specify a schemes attribute OutboundTransportRegistrationError: If the sch...
Register a new outbound transport class.
def register_class( self, transport_class: Type[BaseOutboundTransport], transport_id: str = None ) -> str: """ Register a new outbound transport class. Args: transport_class: Transport class to register Raises: OutboundTransportRegistrationError: If ...
[ "def", "register_class", "(", "self", ",", "transport_class", ":", "Type", "[", "BaseOutboundTransport", "]", ",", "transport_id", ":", "str", "=", "None", ")", "->", "str", ":", "try", ":", "schemes", "=", "transport_class", ".", "schemes", "except", "Attri...
[ 121, 4 ]
[ 161, 27 ]
python
en
['en', 'error', 'th']
False
OutboundTransportManager.start_transport
(self, transport_id: str)
Start a registered transport.
Start a registered transport.
async def start_transport(self, transport_id: str): """Start a registered transport.""" transport = self.registered_transports[transport_id]() transport.collector = await self.context.inject(Collector, required=False) await transport.start() self.running_transports[transport_id] ...
[ "async", "def", "start_transport", "(", "self", ",", "transport_id", ":", "str", ")", ":", "transport", "=", "self", ".", "registered_transports", "[", "transport_id", "]", "(", ")", "transport", ".", "collector", "=", "await", "self", ".", "context", ".", ...
[ 163, 4 ]
[ 168, 57 ]
python
en
['en', 'da', 'en']
True
OutboundTransportManager.start
(self)
Start all transports and feed messages from the queue.
Start all transports and feed messages from the queue.
async def start(self): """Start all transports and feed messages from the queue.""" for transport_id in self.registered_transports: self.task_queue.run(self.start_transport(transport_id))
[ "async", "def", "start", "(", "self", ")", ":", "for", "transport_id", "in", "self", ".", "registered_transports", ":", "self", ".", "task_queue", ".", "run", "(", "self", ".", "start_transport", "(", "transport_id", ")", ")" ]
[ 170, 4 ]
[ 173, 67 ]
python
en
['en', 'en', 'en']
True