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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
TelnetProtocol.data_in | (self, **kwargs) |
Data User -> Evennia
Kwargs:
kwargs (any): Options from the protocol.
|
Data User -> Evennia | def data_in(self, **kwargs):
"""
Data User -> Evennia
Kwargs:
kwargs (any): Options from the protocol.
"""
# from evennia.server.profiling.timetrace import timetrace # DEBUG
# text = timetrace(text, "telnet.data_in") # DEBUG
self.sessionhandler.da... | [
"def",
"data_in",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"# from evennia.server.profiling.timetrace import timetrace # DEBUG",
"# text = timetrace(text, \"telnet.data_in\") # DEBUG",
"self",
".",
"sessionhandler",
".",
"data_in",
"(",
"self",
",",
"*",
"*",
"kw... | [
268,
4
] | [
279,
51
] | python | en | ['en', 'error', 'th'] | False |
TelnetProtocol.data_out | (self, **kwargs) |
Data Evennia -> User
Kwargs:
kwargs (any): Options to the protocol
|
Data Evennia -> User | def data_out(self, **kwargs):
"""
Data Evennia -> User
Kwargs:
kwargs (any): Options to the protocol
"""
self.sessionhandler.data_out(self, **kwargs) | [
"def",
"data_out",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"self",
".",
"sessionhandler",
".",
"data_out",
"(",
"self",
",",
"*",
"*",
"kwargs",
")"
] | [
281,
4
] | [
288,
52
] | python | en | ['en', 'error', 'th'] | False |
TelnetProtocol.send_text | (self, *args, **kwargs) |
Send text data. This is an in-band telnet operation.
Args:
text (str): The first argument is always the text string to send. No other arguments
are considered.
Kwargs:
options (dict): Send-option flags
- mxp: Enforce MXP link support.
... |
Send text data. This is an in-band telnet operation. | def send_text(self, *args, **kwargs):
"""
Send text data. This is an in-band telnet operation.
Args:
text (str): The first argument is always the text string to send. No other arguments
are considered.
Kwargs:
options (dict): Send-option flags
... | [
"def",
"send_text",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"text",
"=",
"args",
"[",
"0",
"]",
"if",
"args",
"else",
"\"\"",
"if",
"text",
"is",
"None",
":",
"return",
"text",
"=",
"to_str",
"(",
"text",
",",
"force_str... | [
292,
4
] | [
372,
41
] | python | en | ['en', 'error', 'th'] | False |
TelnetProtocol.send_prompt | (self, *args, **kwargs) |
Send a prompt - a text without a line end. See send_text for argument options.
|
Send a prompt - a text without a line end. See send_text for argument options. | def send_prompt(self, *args, **kwargs):
"""
Send a prompt - a text without a line end. See send_text for argument options.
"""
kwargs["options"].update({"send_prompt": True})
self.send_text(*args, **kwargs) | [
"def",
"send_prompt",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"kwargs",
"[",
"\"options\"",
"]",
".",
"update",
"(",
"{",
"\"send_prompt\"",
":",
"True",
"}",
")",
"self",
".",
"send_text",
"(",
"*",
"args",
",",
"*",
"*",... | [
374,
4
] | [
380,
39
] | python | en | ['en', 'error', 'th'] | False |
TelnetProtocol.send_default | (self, cmdname, *args, **kwargs) |
Send other oob data
|
Send other oob data
| def send_default(self, cmdname, *args, **kwargs):
"""
Send other oob data
"""
if not cmdname == "options":
self.oob.data_out(cmdname, *args, **kwargs) | [
"def",
"send_default",
"(",
"self",
",",
"cmdname",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"not",
"cmdname",
"==",
"\"options\"",
":",
"self",
".",
"oob",
".",
"data_out",
"(",
"cmdname",
",",
"*",
"args",
",",
"*",
"*",
"kwargs... | [
382,
4
] | [
387,
55
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorModel._get_initial_forced_decoder_input | (self, bsz: int, inputs: torch.LongTensor) |
Return initial input to the decoder.
:param bsz:
batchsize
:param inputs:
inputs to decode
:return initial_input:
initial input for the decoder.
|
Return initial input to the decoder. | def _get_initial_forced_decoder_input(self, bsz: int, inputs: torch.LongTensor):
"""
Return initial input to the decoder.
:param bsz:
batchsize
:param inputs:
inputs to decode
:return initial_input:
initial input for the decoder.
"""
... | [
"def",
"_get_initial_forced_decoder_input",
"(",
"self",
",",
"bsz",
":",
"int",
",",
"inputs",
":",
"torch",
".",
"LongTensor",
")",
":",
"return",
"torch",
".",
"cat",
"(",
"[",
"self",
".",
"START",
".",
"detach",
"(",
")",
".",
"expand",
"(",
"bsz"... | [
148,
4
] | [
160,
73
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorModel.decode_forced | (self, encoder_states, ys) |
Decode with a fixed, true sequence, computing loss.
Useful for training, or ranking fixed candidates.
:param ys:
the prediction targets. Contains both the start and end tokens.
:type ys:
LongTensor[bsz, time]
:param encoder_states:
Output ... |
Decode with a fixed, true sequence, computing loss. | def decode_forced(self, encoder_states, ys):
"""
Decode with a fixed, true sequence, computing loss.
Useful for training, or ranking fixed candidates.
:param ys:
the prediction targets. Contains both the start and end tokens.
:type ys:
LongTensor[bsz, t... | [
"def",
"decode_forced",
"(",
"self",
",",
"encoder_states",
",",
"ys",
")",
":",
"bsz",
"=",
"ys",
".",
"size",
"(",
"0",
")",
"seqlen",
"=",
"ys",
".",
"size",
"(",
"1",
")",
"inputs",
"=",
"ys",
".",
"narrow",
"(",
"1",
",",
"0",
",",
"seqlen... | [
162,
4
] | [
200,
28
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorModel.reorder_encoder_states | (self, encoder_states, indices) |
Reorder encoder states according to a new set of indices.
This is an abstract method, and *must* be implemented by the user.
Its purpose is to provide beam search with a model-agnostic interface for
beam search. For example, this method is used to sort hypotheses,
expand beams... |
Reorder encoder states according to a new set of indices. | def reorder_encoder_states(self, encoder_states, indices):
"""
Reorder encoder states according to a new set of indices.
This is an abstract method, and *must* be implemented by the user.
Its purpose is to provide beam search with a model-agnostic interface for
beam search. For... | [
"def",
"reorder_encoder_states",
"(",
"self",
",",
"encoder_states",
",",
"indices",
")",
":",
"pass"
] | [
203,
4
] | [
249,
12
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorModel.reorder_decoder_incremental_state | (self, incremental_state, inds) |
Reorder incremental state for the decoder.
Used to expand selected beams in beam search. Unlike reorder_encoder_states,
implementing this method is optional. However, without incremental decoding,
decoding a single beam becomes O(n^2) instead of O(n), which can make
beam search... |
Reorder incremental state for the decoder. | def reorder_decoder_incremental_state(self, incremental_state, inds):
"""
Reorder incremental state for the decoder.
Used to expand selected beams in beam search. Unlike reorder_encoder_states,
implementing this method is optional. However, without incremental decoding,
decoding... | [
"def",
"reorder_decoder_incremental_state",
"(",
"self",
",",
"incremental_state",
",",
"inds",
")",
":",
"pass"
] | [
252,
4
] | [
282,
12
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorModel.forward | (self, *xs, ys=None, prev_enc=None, maxlen=None, bsz=None) |
Get output predictions from the model.
:param xs:
input to the encoder
:type xs:
LongTensor[bsz, seqlen]
:param ys:
Expected output from the decoder. Used
for teacher forcing to calculate loss.
:type ys:
LongTensor[bsz... |
Get output predictions from the model. | def forward(self, *xs, ys=None, prev_enc=None, maxlen=None, bsz=None):
"""
Get output predictions from the model.
:param xs:
input to the encoder
:type xs:
LongTensor[bsz, seqlen]
:param ys:
Expected output from the decoder. Used
f... | [
"def",
"forward",
"(",
"self",
",",
"*",
"xs",
",",
"ys",
"=",
"None",
",",
"prev_enc",
"=",
"None",
",",
"maxlen",
"=",
"None",
",",
"bsz",
"=",
"None",
")",
":",
"assert",
"ys",
"is",
"not",
"None",
",",
"\"Greedy decoding in TGModel.forward no longer ... | [
284,
4
] | [
329,
44
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorAgent.add_cmdline_args | (
cls, parser: ParlaiParser, partial_opt: Optional[Opt] = None
) |
Add command line arguments.
|
Add command line arguments.
| def add_cmdline_args(
cls, parser: ParlaiParser, partial_opt: Optional[Opt] = None
) -> ParlaiParser:
"""
Add command line arguments.
"""
agent = parser.add_argument_group('Torch Generator Agent')
agent.add_argument(
'--beam-size',
type=int,
... | [
"def",
"add_cmdline_args",
"(",
"cls",
",",
"parser",
":",
"ParlaiParser",
",",
"partial_opt",
":",
"Optional",
"[",
"Opt",
"]",
"=",
"None",
")",
"->",
"ParlaiParser",
":",
"agent",
"=",
"parser",
".",
"add_argument_group",
"(",
"'Torch Generator Agent'",
")"... | [
383,
4
] | [
473,
20
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorAgent.build_criterion | (self) |
Construct and return the loss function.
By default torch.nn.CrossEntropyLoss.
If overridden, this model should produce a sum that can be used for a per-token loss.
|
Construct and return the loss function. | def build_criterion(self):
"""
Construct and return the loss function.
By default torch.nn.CrossEntropyLoss.
If overridden, this model should produce a sum that can be used for a per-token loss.
"""
if not self.fp16:
return torch.nn.CrossEntropyLoss(
... | [
"def",
"build_criterion",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"fp16",
":",
"return",
"torch",
".",
"nn",
".",
"CrossEntropyLoss",
"(",
"ignore_index",
"=",
"self",
".",
"NULL_IDX",
",",
"reduction",
"=",
"'none'",
")",
"else",
":",
"# FP16 s... | [
555,
4
] | [
569,
85
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorAgent._v2t | (self, vec) |
Convert token indices to string of tokens.
|
Convert token indices to string of tokens.
| def _v2t(self, vec):
"""
Convert token indices to string of tokens.
"""
new_vec = []
if hasattr(vec, 'cpu'):
vec = vec.cpu()
for i in vec:
if i == self.END_IDX:
break
elif i != self.START_IDX:
new_vec.app... | [
"def",
"_v2t",
"(",
"self",
",",
"vec",
")",
":",
"new_vec",
"=",
"[",
"]",
"if",
"hasattr",
"(",
"vec",
",",
"'cpu'",
")",
":",
"vec",
"=",
"vec",
".",
"cpu",
"(",
")",
"for",
"i",
"in",
"vec",
":",
"if",
"i",
"==",
"self",
".",
"END_IDX",
... | [
571,
4
] | [
583,
41
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorAgent.set_interactive_mode | (self, mode, shared=False) |
Turn on interactive mode.
|
Turn on interactive mode.
| def set_interactive_mode(self, mode, shared=False):
"""
Turn on interactive mode.
"""
super().set_interactive_mode(mode, shared)
if mode:
self.skip_generation = False
else:
self.skip_generation = self.opt.get('skip_generation', False) | [
"def",
"set_interactive_mode",
"(",
"self",
",",
"mode",
",",
"shared",
"=",
"False",
")",
":",
"super",
"(",
")",
".",
"set_interactive_mode",
"(",
"mode",
",",
"shared",
")",
"if",
"mode",
":",
"self",
".",
"skip_generation",
"=",
"False",
"else",
":",... | [
585,
4
] | [
593,
73
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorAgent._dummy_batch | (self, batchsize, maxlen) |
Create a dummy batch.
This is used to preinitialize the cuda buffer, or otherwise force a
null backward pass after an OOM.
If your model uses additional inputs beyond text_vec and label_vec,
you will need to override it to add additional fields.
|
Create a dummy batch. | def _dummy_batch(self, batchsize, maxlen):
"""
Create a dummy batch.
This is used to preinitialize the cuda buffer, or otherwise force a
null backward pass after an OOM.
If your model uses additional inputs beyond text_vec and label_vec,
you will need to override it to ... | [
"def",
"_dummy_batch",
"(",
"self",
",",
"batchsize",
",",
"maxlen",
")",
":",
"text_vec",
"=",
"(",
"torch",
".",
"arange",
"(",
"1",
",",
"maxlen",
"+",
"1",
")",
"# need it as long as specified",
".",
"clamp",
"(",
"max",
"=",
"3",
")",
"# cap at 3 fo... | [
595,
4
] | [
622,
9
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorAgent._init_cuda_buffer | (self, batchsize, maxlen, force=False) |
Pre-initialize CUDA buffer by doing fake forward pass.
This is also used in distributed mode to force a worker to sync with others.
|
Pre-initialize CUDA buffer by doing fake forward pass. | def _init_cuda_buffer(self, batchsize, maxlen, force=False):
"""
Pre-initialize CUDA buffer by doing fake forward pass.
This is also used in distributed mode to force a worker to sync with others.
"""
if self.use_cuda and (force or not hasattr(self, 'buffer_initialized')):
... | [
"def",
"_init_cuda_buffer",
"(",
"self",
",",
"batchsize",
",",
"maxlen",
",",
"force",
"=",
"False",
")",
":",
"if",
"self",
".",
"use_cuda",
"and",
"(",
"force",
"or",
"not",
"hasattr",
"(",
"self",
",",
"'buffer_initialized'",
")",
")",
":",
"try",
... | [
624,
4
] | [
647,
27
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorAgent.reset_metrics | (self) |
Reset metrics for reporting loss and perplexity.
|
Reset metrics for reporting loss and perplexity.
| def reset_metrics(self):
"""
Reset metrics for reporting loss and perplexity.
"""
super().reset_metrics() | [
"def",
"reset_metrics",
"(",
"self",
")",
":",
"super",
"(",
")",
".",
"reset_metrics",
"(",
")"
] | [
649,
4
] | [
653,
31
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorAgent.share | (self) |
Share internal states between parent and child instances.
|
Share internal states between parent and child instances.
| def share(self):
"""
Share internal states between parent and child instances.
"""
shared = super().share()
shared['beam_block_list'] = self.beam_block_list
if hasattr(self, 'optimizer'):
shared['optimizer'] = self.optimizer
return shared | [
"def",
"share",
"(",
"self",
")",
":",
"shared",
"=",
"super",
"(",
")",
".",
"share",
"(",
")",
"shared",
"[",
"'beam_block_list'",
"]",
"=",
"self",
".",
"beam_block_list",
"if",
"hasattr",
"(",
"self",
",",
"'optimizer'",
")",
":",
"shared",
"[",
... | [
655,
4
] | [
663,
21
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorAgent.vectorize | (self, *args, **kwargs) |
Override vectorize for generative models.
|
Override vectorize for generative models.
| def vectorize(self, *args, **kwargs):
"""
Override vectorize for generative models.
"""
kwargs['add_start'] = False # model does this in module code
kwargs['add_end'] = True # we do want this
return super().vectorize(*args, **kwargs) | [
"def",
"vectorize",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"kwargs",
"[",
"'add_start'",
"]",
"=",
"False",
"# model does this in module code",
"kwargs",
"[",
"'add_end'",
"]",
"=",
"True",
"# we do want this",
"return",
"super",
"... | [
665,
4
] | [
671,
49
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorAgent._model_input | (self, batch) |
Create the input (x) value for the model.
Must return a tuple. This will be passed directly into the model via
`*args`, i.e.,
>>> model(*_model_input(batch))
This is intentionally overridable so that richer models can pass the
additional inputs.
|
Create the input (x) value for the model. | def _model_input(self, batch):
"""
Create the input (x) value for the model.
Must return a tuple. This will be passed directly into the model via
`*args`, i.e.,
>>> model(*_model_input(batch))
This is intentionally overridable so that richer models can pass the
... | [
"def",
"_model_input",
"(",
"self",
",",
"batch",
")",
":",
"return",
"(",
"batch",
".",
"text_vec",
",",
")"
] | [
673,
4
] | [
685,
32
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorAgent._encoder_input | (self, batch) |
Create the input (x) value for the encoder.
Must return a tuple. This will be passed directly into the encoder via
`*args`, i.e.,
>>> model.encoder(*_encoder_input(batch))
This is intentionally overridable so that richer models can pass the
additional inputs directly... |
Create the input (x) value for the encoder. | def _encoder_input(self, batch):
"""
Create the input (x) value for the encoder.
Must return a tuple. This will be passed directly into the encoder via
`*args`, i.e.,
>>> model.encoder(*_encoder_input(batch))
This is intentionally overridable so that richer models can... | [
"def",
"_encoder_input",
"(",
"self",
",",
"batch",
")",
":",
"return",
"self",
".",
"_model_input",
"(",
"batch",
")"
] | [
687,
4
] | [
699,
39
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorAgent.compute_loss | (self, batch, return_output=False) |
Compute and return the loss for the given batch.
Easily overridable for customized loss functions.
If return_output is True, the full output from the call to self.model()
is also returned, via a (loss, model_output) pair.
|
Compute and return the loss for the given batch. | def compute_loss(self, batch, return_output=False):
"""
Compute and return the loss for the given batch.
Easily overridable for customized loss functions.
If return_output is True, the full output from the call to self.model()
is also returned, via a (loss, model_output) pair.
... | [
"def",
"compute_loss",
"(",
"self",
",",
"batch",
",",
"return_output",
"=",
"False",
")",
":",
"if",
"batch",
".",
"label_vec",
"is",
"None",
":",
"raise",
"ValueError",
"(",
"'Cannot compute loss without a label.'",
")",
"model_output",
"=",
"self",
".",
"mo... | [
701,
4
] | [
733,
23
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorAgent.train_step | (self, batch) |
Train on a single batch of examples.
|
Train on a single batch of examples.
| def train_step(self, batch):
"""
Train on a single batch of examples.
"""
# helps with memory usage
# note we want to use the opt's batchsize instead of the observed batch size
# in case dynamic batching is in use
self._init_cuda_buffer(self.opt['batchsize'], self... | [
"def",
"train_step",
"(",
"self",
",",
"batch",
")",
":",
"# helps with memory usage",
"# note we want to use the opt's batchsize instead of the observed batch size",
"# in case dynamic batching is in use",
"self",
".",
"_init_cuda_buffer",
"(",
"self",
".",
"opt",
"[",
"'batch... | [
735,
4
] | [
772,
46
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorAgent._compute_fairseq_bleu | (self, batch: Batch, preds) |
Compute BLEU score between text and label, using the FAIRSeq BLEU Scorer.
:param batch:
Batch of observations
:param texts:
list of string predictions
|
Compute BLEU score between text and label, using the FAIRSeq BLEU Scorer. | def _compute_fairseq_bleu(self, batch: Batch, preds):
"""
Compute BLEU score between text and label, using the FAIRSeq BLEU Scorer.
:param batch:
Batch of observations
:param texts:
list of string predictions
"""
all_results = []
label_vec... | [
"def",
"_compute_fairseq_bleu",
"(",
"self",
",",
"batch",
":",
"Batch",
",",
"preds",
")",
":",
"all_results",
"=",
"[",
"]",
"label_vec",
"=",
"batch",
".",
"label_vec",
"assert",
"label_vec",
"is",
"not",
"None",
",",
"\"label_vec must exist for fairseq bleu\... | [
793,
4
] | [
819,
76
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorAgent._compute_nltk_bleu | (self, batch: Batch, texts: List[str]) |
Compute BLEU score between text and label(s), using the NLTK BLEU Scorer.
Note this differs from BLEU in ParlAI metrics in that the answers
are unnormalized (no removal of stop words, etc.)
:param batch:
Batch of observations
:param texts:
list of strin... |
Compute BLEU score between text and label(s), using the NLTK BLEU Scorer. | def _compute_nltk_bleu(self, batch: Batch, texts: List[str]):
"""
Compute BLEU score between text and label(s), using the NLTK BLEU Scorer.
Note this differs from BLEU in ParlAI metrics in that the answers
are unnormalized (no removal of stop words, etc.)
:param batch:
... | [
"def",
"_compute_nltk_bleu",
"(",
"self",
",",
"batch",
":",
"Batch",
",",
"texts",
":",
"List",
"[",
"str",
"]",
")",
":",
"results",
":",
"Dict",
"[",
"int",
",",
"List",
"[",
"Metric",
"]",
"]",
"=",
"{",
"}",
"observations",
"=",
"batch",
".",
... | [
821,
4
] | [
857,
65
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorAgent._add_generation_metrics | (self, batch, preds) |
Can be overridden to allow for some metrics on the generations calculated at
eval.
|
Can be overridden to allow for some metrics on the generations calculated at
eval.
| def _add_generation_metrics(self, batch, preds):
"""
Can be overridden to allow for some metrics on the generations calculated at
eval.
"""
pass | [
"def",
"_add_generation_metrics",
"(",
"self",
",",
"batch",
",",
"preds",
")",
":",
"pass"
] | [
859,
4
] | [
864,
12
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorAgent.eval_step | (self, batch) |
Evaluate a single batch of examples.
|
Evaluate a single batch of examples.
| def eval_step(self, batch):
"""
Evaluate a single batch of examples.
"""
if batch.text_vec is None and batch.image is None:
return
if batch.text_vec is not None:
bsz = batch.text_vec.size(0)
else:
bsz = len(batch.image)
self.mod... | [
"def",
"eval_step",
"(",
"self",
",",
"batch",
")",
":",
"if",
"batch",
".",
"text_vec",
"is",
"None",
"and",
"batch",
".",
"image",
"is",
"None",
":",
"return",
"if",
"batch",
".",
"text_vec",
"is",
"not",
"None",
":",
"bsz",
"=",
"batch",
".",
"t... | [
866,
4
] | [
939,
21
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorAgent._get_context | (self, batch, batch_idx) |
Set the beam context for n-gram context blocking.
Intentionally overridable for more complex model histories.
|
Set the beam context for n-gram context blocking. | def _get_context(self, batch, batch_idx):
"""
Set the beam context for n-gram context blocking.
Intentionally overridable for more complex model histories.
"""
ctxt = batch.text_vec[batch_idx]
if self.beam_block_full_context:
full_ctxt = batch.observations[ba... | [
"def",
"_get_context",
"(",
"self",
",",
"batch",
",",
"batch_idx",
")",
":",
"ctxt",
"=",
"batch",
".",
"text_vec",
"[",
"batch_idx",
"]",
"if",
"self",
".",
"beam_block_full_context",
":",
"full_ctxt",
"=",
"batch",
".",
"observations",
"[",
"batch_idx",
... | [
1011,
4
] | [
1023,
19
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorAgent._get_initial_decoder_input | (
self, bsz: int, beam_size: int, dev: torch.device
) |
Return initial input to the decoder.
:param bsz:
batchsize
:param beam_size:
beam size
:param dev:
device to send input to.
:return initial_input:
initial input for the decoder
|
Return initial input to the decoder. | def _get_initial_decoder_input(
self, bsz: int, beam_size: int, dev: torch.device
) -> torch.LongTensor:
"""
Return initial input to the decoder.
:param bsz:
batchsize
:param beam_size:
beam size
:param dev:
device to send input to... | [
"def",
"_get_initial_decoder_input",
"(",
"self",
",",
"bsz",
":",
"int",
",",
"beam_size",
":",
"int",
",",
"dev",
":",
"torch",
".",
"device",
")",
"->",
"torch",
".",
"LongTensor",
":",
"return",
"(",
"torch",
".",
"LongTensor",
"(",
"[",
"self",
".... | [
1025,
4
] | [
1045,
9
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorAgent._get_next_decoder_input | (
self,
prev_input: torch.LongTensor,
selection: torch.LongTensor,
incr_state_inds: torch.LongTensor,
) |
Return next decoder input.
:param prev_input:
previous input to decoder
:param selection:
token selections for current timestep
:param inds:
incremental state indices
:return decoder input:
return decoder input for next timestep
... |
Return next decoder input. | def _get_next_decoder_input(
self,
prev_input: torch.LongTensor,
selection: torch.LongTensor,
incr_state_inds: torch.LongTensor,
) -> torch.LongTensor:
"""
Return next decoder input.
:param prev_input:
previous input to decoder
:param sele... | [
"def",
"_get_next_decoder_input",
"(",
"self",
",",
"prev_input",
":",
"torch",
".",
"LongTensor",
",",
"selection",
":",
"torch",
".",
"LongTensor",
",",
"incr_state_inds",
":",
"torch",
".",
"LongTensor",
",",
")",
"->",
"torch",
".",
"LongTensor",
":",
"p... | [
1047,
4
] | [
1068,
28
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorAgent._generate | (
self,
batch: Batch,
beam_size: int,
max_ts: int,
prefix_tokens: Optional[torch.LongTensor] = None,
) |
Generate an output with beam search.
Depending on the options, this may perform greedy/topk/nucleus generation.
:param Batch batch:
Batch structure with input and labels
:param int beam_size:
Size of each beam during the search
:param int max_ts:
... |
Generate an output with beam search. | def _generate(
self,
batch: Batch,
beam_size: int,
max_ts: int,
prefix_tokens: Optional[torch.LongTensor] = None,
):
"""
Generate an output with beam search.
Depending on the options, this may perform greedy/topk/nucleus generation.
:param Ba... | [
"def",
"_generate",
"(",
"self",
",",
"batch",
":",
"Batch",
",",
"beam_size",
":",
"int",
",",
"max_ts",
":",
"int",
",",
"prefix_tokens",
":",
"Optional",
"[",
"torch",
".",
"LongTensor",
"]",
"=",
"None",
",",
")",
":",
"model",
"=",
"self",
".",
... | [
1070,
4
] | [
1189,
39
] | python | en | ['en', 'error', 'th'] | False |
TorchGeneratorAgent._load_beam_block_list | (self) |
Load the beam block_list.
:return: a dict mapping ngram length to different ngrams
|
Load the beam block_list. | def _load_beam_block_list(self) -> SearchBlocklist:
"""
Load the beam block_list.
:return: a dict mapping ngram length to different ngrams
"""
block_list = SearchBlocklist(self.dict)
if not self.opt.get('beam_block_list_filename'):
return block_list
... | [
"def",
"_load_beam_block_list",
"(",
"self",
")",
"->",
"SearchBlocklist",
":",
"block_list",
"=",
"SearchBlocklist",
"(",
"self",
".",
"dict",
")",
"if",
"not",
"self",
".",
"opt",
".",
"get",
"(",
"'beam_block_list_filename'",
")",
":",
"return",
"block_list... | [
1191,
4
] | [
1210,
25
] | python | en | ['en', 'error', 'th'] | False |
TreeSearch.__init__ | (
self,
beam_size,
block_ngram=-1,
context_block_ngram=-1,
padding_token=0,
bos_token=1,
eos_token=2,
min_length=3,
device='cpu',
length_penalty=0.65,
) |
Instantiate Beam object.
:param beam_size:
number of hypothesis in the beam
:param block_ngram:
size of ngrams to block.
:param context_block_ngram:
size of context ngrams to block
:param padding_token:
padding token ID
:p... |
Instantiate Beam object. | def __init__(
self,
beam_size,
block_ngram=-1,
context_block_ngram=-1,
padding_token=0,
bos_token=1,
eos_token=2,
min_length=3,
device='cpu',
length_penalty=0.65,
):
"""
Instantiate Beam object.
:param beam_size... | [
"def",
"__init__",
"(",
"self",
",",
"beam_size",
",",
"block_ngram",
"=",
"-",
"1",
",",
"context_block_ngram",
"=",
"-",
"1",
",",
"padding_token",
"=",
"0",
",",
"bos_token",
"=",
"1",
",",
"eos_token",
"=",
"2",
",",
"min_length",
"=",
"3",
",",
... | [
1237,
4
] | [
1295,
66
] | python | en | ['en', 'error', 'th'] | False |
TreeSearch.set_context | (self: TSType, context: torch.LongTensor) |
Set the internal context representation and return self.
:param context:
a LongTensor representing the input context; used for context
ngram blocking, if supplied
|
Set the internal context representation and return self. | def set_context(self: TSType, context: torch.LongTensor) -> TSType:
"""
Set the internal context representation and return self.
:param context:
a LongTensor representing the input context; used for context
ngram blocking, if supplied
"""
self.context = c... | [
"def",
"set_context",
"(",
"self",
":",
"TSType",
",",
"context",
":",
"torch",
".",
"LongTensor",
")",
"->",
"TSType",
":",
"self",
".",
"context",
"=",
"context",
".",
"tolist",
"(",
")",
"return",
"self"
] | [
1297,
4
] | [
1306,
19
] | python | en | ['en', 'error', 'th'] | False |
TreeSearch.get_output_from_current_step | (self) |
Get the outputput at the current step.
|
Get the outputput at the current step.
| def get_output_from_current_step(self):
"""
Get the outputput at the current step.
"""
return self.outputs[-1] | [
"def",
"get_output_from_current_step",
"(",
"self",
")",
":",
"return",
"self",
".",
"outputs",
"[",
"-",
"1",
"]"
] | [
1312,
4
] | [
1316,
31
] | python | en | ['en', 'error', 'th'] | False |
TreeSearch.get_backtrack_from_current_step | (self) |
Get the backtrack at the current step.
|
Get the backtrack at the current step.
| def get_backtrack_from_current_step(self):
"""
Get the backtrack at the current step.
"""
return self.bookkeep[-1] | [
"def",
"get_backtrack_from_current_step",
"(",
"self",
")",
":",
"return",
"self",
".",
"bookkeep",
"[",
"-",
"1",
"]"
] | [
1318,
4
] | [
1322,
32
] | python | en | ['en', 'error', 'th'] | False |
TreeSearch.select_paths | (self, logprobs, prior_scores, current_length) |
Select the next vocabulary item in these beams.
:param logprobs:
a (beamsize x vocab) tensor of log probabilities. If this is the first
turn in the dialogue, it will be a (1 x vocab) tensor.
:param prior_scores:
a (beamsize) tensor of weights with the cumula... |
Select the next vocabulary item in these beams. | def select_paths(self, logprobs, prior_scores, current_length):
"""
Select the next vocabulary item in these beams.
:param logprobs:
a (beamsize x vocab) tensor of log probabilities. If this is the first
turn in the dialogue, it will be a (1 x vocab) tensor.
:par... | [
"def",
"select_paths",
"(",
"self",
",",
"logprobs",
",",
"prior_scores",
",",
"current_length",
")",
":",
"pass"
] | [
1325,
4
] | [
1347,
12
] | python | en | ['en', 'error', 'th'] | False |
TreeSearch._block_ngrams | (
self, ngram_size: int, logprobs: torch.Tensor, source: torch.LongTensor = None
) |
Hard block ngrams from the logprobs, based on the source.
:param ngram_size:
The length of ngrams to block. Must be > 0.
:param logprobs:
Float or HalfTensor, representing the log-probabilities. This is
modified in place.
:param source:
S... |
Hard block ngrams from the logprobs, based on the source. | def _block_ngrams(
self, ngram_size: int, logprobs: torch.Tensor, source: torch.LongTensor = None
):
"""
Hard block ngrams from the logprobs, based on the source.
:param ngram_size:
The length of ngrams to block. Must be > 0.
:param logprobs:
Float or... | [
"def",
"_block_ngrams",
"(",
"self",
",",
"ngram_size",
":",
"int",
",",
"logprobs",
":",
"torch",
".",
"Tensor",
",",
"source",
":",
"torch",
".",
"LongTensor",
"=",
"None",
")",
":",
"for",
"beam_id",
",",
"hyp",
"in",
"enumerate",
"(",
"self",
".",
... | [
1349,
4
] | [
1373,
23
] | python | en | ['en', 'error', 'th'] | False |
TreeSearch.advance | (self, logprobs) |
Advance the beam one step.
|
Advance the beam one step.
| def advance(self, logprobs):
"""
Advance the beam one step.
"""
current_length = len(self.all_scores) - 1
if current_length < self.min_length:
# penalize all eos probs to make it decode longer
for hyp_id in range(logprobs.size(0)):
logprobs... | [
"def",
"advance",
"(",
"self",
",",
"logprobs",
")",
":",
"current_length",
"=",
"len",
"(",
"self",
".",
"all_scores",
")",
"-",
"1",
"if",
"current_length",
"<",
"self",
".",
"min_length",
":",
"# penalize all eos probs to make it decode longer",
"for",
"hyp_i... | [
1387,
4
] | [
1453,
55
] | python | en | ['en', 'error', 'th'] | False |
TreeSearch.is_done | (self) |
Return whether beam search is complete.
|
Return whether beam search is complete.
| def is_done(self):
"""
Return whether beam search is complete.
"""
return self.eos_top and self.n_best_counter >= self.beam_size | [
"def",
"is_done",
"(",
"self",
")",
":",
"return",
"self",
".",
"eos_top",
"and",
"self",
".",
"n_best_counter",
">=",
"self",
".",
"beam_size"
] | [
1455,
4
] | [
1459,
69
] | python | en | ['en', 'error', 'th'] | False |
TreeSearch._find_ngrams | (self, input_list, n) |
Find ngrams of size n in input list.
|
Find ngrams of size n in input list.
| def _find_ngrams(self, input_list, n):
"""
Find ngrams of size n in input list.
"""
return list(zip(*[input_list[i:] for i in range(n)])) | [
"def",
"_find_ngrams",
"(",
"self",
",",
"input_list",
",",
"n",
")",
":",
"return",
"list",
"(",
"zip",
"(",
"*",
"[",
"input_list",
"[",
"i",
":",
"]",
"for",
"i",
"in",
"range",
"(",
"n",
")",
"]",
")",
")"
] | [
1461,
4
] | [
1465,
61
] | python | en | ['en', 'error', 'th'] | False |
TreeSearch._get_hyp_from_finished | (self, hypothesis_tail) |
Extract hypothesis ending with EOS at timestep with hyp_id.
:param timestep:
timestep with range up to len(self.outputs) - 1
:param hyp_id:
id with range up to beam_size - 1
:return:
hypothesis sequence
|
Extract hypothesis ending with EOS at timestep with hyp_id. | def _get_hyp_from_finished(self, hypothesis_tail):
"""
Extract hypothesis ending with EOS at timestep with hyp_id.
:param timestep:
timestep with range up to len(self.outputs) - 1
:param hyp_id:
id with range up to beam_size - 1
:return:
hyp... | [
"def",
"_get_hyp_from_finished",
"(",
"self",
",",
"hypothesis_tail",
")",
":",
"hyp_idx",
"=",
"[",
"]",
"endback",
"=",
"hypothesis_tail",
".",
"hypid",
"for",
"i",
"in",
"range",
"(",
"hypothesis_tail",
".",
"timestep",
",",
"-",
"1",
",",
"-",
"1",
"... | [
1467,
4
] | [
1493,
22
] | python | en | ['en', 'error', 'th'] | False |
TreeSearch._get_pretty_hypothesis | (self, list_of_hypotails) |
Return hypothesis as a tensor of token ids.
|
Return hypothesis as a tensor of token ids.
| def _get_pretty_hypothesis(self, list_of_hypotails):
"""
Return hypothesis as a tensor of token ids.
"""
return torch.stack([ht.tokenid for ht in reversed(list_of_hypotails)]) | [
"def",
"_get_pretty_hypothesis",
"(",
"self",
",",
"list_of_hypotails",
")",
":",
"return",
"torch",
".",
"stack",
"(",
"[",
"ht",
".",
"tokenid",
"for",
"ht",
"in",
"reversed",
"(",
"list_of_hypotails",
")",
"]",
")"
] | [
1495,
4
] | [
1499,
78
] | python | en | ['en', 'error', 'th'] | False |
TreeSearch.get_rescored_finished | (self, n_best=None) |
Return finished hypotheses according to adjusted scores.
Score adjustment is done according to the Google NMT paper, which
penalizes long utterances.
:param n_best:
number of finalized hypotheses to return
:return:
list of (tokens, score) pairs, in sor... |
Return finished hypotheses according to adjusted scores. | def get_rescored_finished(self, n_best=None):
"""
Return finished hypotheses according to adjusted scores.
Score adjustment is done according to the Google NMT paper, which
penalizes long utterances.
:param n_best:
number of finalized hypotheses to return
:... | [
"def",
"get_rescored_finished",
"(",
"self",
",",
"n_best",
"=",
"None",
")",
":",
"# if we never actually finished, force one",
"if",
"not",
"self",
".",
"finished",
":",
"self",
".",
"outputs",
"[",
"-",
"1",
"]",
"[",
"0",
"]",
"=",
"self",
".",
"eos",
... | [
1501,
4
] | [
1564,
26
] | python | en | ['en', 'error', 'th'] | False |
BeamSearch.select_paths | (self, logprobs, prior_scores, current_length) |
Select the next vocabulary item in these beams.
|
Select the next vocabulary item in these beams.
| def select_paths(self, logprobs, prior_scores, current_length):
"""
Select the next vocabulary item in these beams.
"""
# if numel is 1, then this is the first time step, only one hyp is expanded
if prior_scores.numel() == 1:
logprobs = logprobs[0:1]
# beam s... | [
"def",
"select_paths",
"(",
"self",
",",
"logprobs",
",",
"prior_scores",
",",
"current_length",
")",
":",
"# if numel is 1, then this is the first time step, only one hyp is expanded",
"if",
"prior_scores",
".",
"numel",
"(",
")",
"==",
"1",
":",
"logprobs",
"=",
"lo... | [
1592,
4
] | [
1611,
46
] | 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.layout.ternary
.aaxis.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.layout.ternary
.aaxis.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 |
testTimeoutWorks | (nodeSet, looper, monkeypatch, tconf) |
Checks that after some timeout upgrade is marked as failed if
it not started
|
Checks that after some timeout upgrade is marked as failed if
it not started
| def testTimeoutWorks(nodeSet, looper, monkeypatch, tconf):
"""
Checks that after some timeout upgrade is marked as failed if
it not started
"""
async def mock(*x):
return None
# patch get_timeout not to wait one whole minute
monkeypatch.setattr(Upgrader, 'get_timeout', lambda self, ... | [
"def",
"testTimeoutWorks",
"(",
"nodeSet",
",",
"looper",
",",
"monkeypatch",
",",
"tconf",
")",
":",
"async",
"def",
"mock",
"(",
"*",
"x",
")",
":",
"return",
"None",
"# patch get_timeout not to wait one whole minute",
"monkeypatch",
".",
"setattr",
"(",
"Upgr... | [
12,
0
] | [
47,
31
] | 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
] | [
64,
28
] | python | en | ['en', 'error', 'th'] | False |
Font.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 |
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\"",
"]"
] | [
93,
4
] | [
116,
29
] | python | en | ['en', 'error', 'th'] | False |
Font.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 |
Font.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 |
Font.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 |
Font.__init__ | (
self,
arg=None,
color=None,
colorsrc=None,
family=None,
familysrc=None,
size=None,
sizesrc=None,
**kwargs
) |
Construct a new Font object
Sets the font used in hover labels.
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.histogram.hoverlabel.Font`
color
... |
Construct a new Font object
Sets the font used in hover labels. | def __init__(
self,
arg=None,
color=None,
colorsrc=None,
family=None,
familysrc=None,
size=None,
sizesrc=None,
**kwargs
):
"""
Construct a new Font object
Sets the font used in hover labels.
Parameters
... | [
"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 |
BaseLedger.__aenter__ | (self) |
Context manager entry.
Returns:
The current instance
|
Context manager entry. | async def __aenter__(self) -> "BaseLedger":
"""
Context manager entry.
Returns:
The current instance
"""
return self | [
"async",
"def",
"__aenter__",
"(",
"self",
")",
"->",
"\"BaseLedger\"",
":",
"return",
"self"
] | [
11,
4
] | [
19,
19
] | python | en | ['en', 'error', 'th'] | False |
BaseLedger.__aexit__ | (self, exc_type, exc, tb) | Context manager exit. | Context manager exit. | async def __aexit__(self, exc_type, exc, tb):
"""Context manager exit.""" | [
"async",
"def",
"__aexit__",
"(",
"self",
",",
"exc_type",
",",
"exc",
",",
"tb",
")",
":"
] | [
21,
4
] | [
22,
35
] | python | en | ['da', 'en', 'en'] | True |
BaseLedger.get_key_for_did | (self, did: str) | Fetch the verkey for a ledger DID.
Args:
did: The DID to look up on the ledger or in the cache
| Fetch the verkey for a ledger DID. | async def get_key_for_did(self, did: str) -> str:
"""Fetch the verkey for a ledger DID.
Args:
did: The DID to look up on the ledger or in the cache
""" | [
"async",
"def",
"get_key_for_did",
"(",
"self",
",",
"did",
":",
"str",
")",
"->",
"str",
":"
] | [
25,
4
] | [
30,
11
] | python | en | ['en', 'en', 'en'] | True |
BaseLedger.get_endpoint_for_did | (self, did: str) | Fetch the endpoint for a ledger DID.
Args:
did: The DID to look up on the ledger or in the cache
| Fetch the endpoint for a ledger DID. | async def get_endpoint_for_did(self, did: str) -> str:
"""Fetch the endpoint for a ledger DID.
Args:
did: The DID to look up on the ledger or in the cache
""" | [
"async",
"def",
"get_endpoint_for_did",
"(",
"self",
",",
"did",
":",
"str",
")",
"->",
"str",
":"
] | [
33,
4
] | [
38,
11
] | python | en | ['en', 'en', 'en'] | True |
BaseLedger.update_endpoint_for_did | (self, did: str, endpoint: str) | Check and update the endpoint on the ledger.
Args:
did: The ledger DID
endpoint: The endpoint address
| Check and update the endpoint on the ledger. | async def update_endpoint_for_did(self, did: str, endpoint: str) -> bool:
"""Check and update the endpoint on the ledger.
Args:
did: The ledger DID
endpoint: The endpoint address
""" | [
"async",
"def",
"update_endpoint_for_did",
"(",
"self",
",",
"did",
":",
"str",
",",
"endpoint",
":",
"str",
")",
"->",
"bool",
":"
] | [
41,
4
] | [
47,
11
] | python | en | ['en', 'en', 'en'] | True |
BaseLedger.register_nym | (self, did: str, verkey: str, alias: str = None,
role: str = None) |
Register a nym on the ledger.
Args:
did: DID to register on the ledger.
verkey: The verification key of the keypair.
alias: Human-friendly alias to assign to the DID.
role: For permissioned ledgers, what role should the new DID have.
|
Register a nym on the ledger. | async def register_nym(self, did: str, verkey: str, alias: str = None,
role: str = None):
"""
Register a nym on the ledger.
Args:
did: DID to register on the ledger.
verkey: The verification key of the keypair.
alias: Human-friendly... | [
"async",
"def",
"register_nym",
"(",
"self",
",",
"did",
":",
"str",
",",
"verkey",
":",
"str",
",",
"alias",
":",
"str",
"=",
"None",
",",
"role",
":",
"str",
"=",
"None",
")",
":"
] | [
50,
4
] | [
60,
11
] | python | en | ['en', 'error', 'th'] | False |
BaseLedger.nym_to_did | (self, nym: str) | Format a nym with the ledger's DID prefix. | Format a nym with the ledger's DID prefix. | def nym_to_did(self, nym: str) -> str:
"""Format a nym with the ledger's DID prefix.""" | [
"def",
"nym_to_did",
"(",
"self",
",",
"nym",
":",
"str",
")",
"->",
"str",
":"
] | [
63,
4
] | [
64,
56
] | python | en | ['en', 'en', 'en'] | True |
BaseLedger.did_to_nym | (self, did: str) | Remove the ledger's DID prefix to produce a nym. | Remove the ledger's DID prefix to produce a nym. | def did_to_nym(self, did: str) -> str:
"""Remove the ledger's DID prefix to produce a nym."""
if did:
return re.sub(r"^did:\w+:", "", did) | [
"def",
"did_to_nym",
"(",
"self",
",",
"did",
":",
"str",
")",
"->",
"str",
":",
"if",
"did",
":",
"return",
"re",
".",
"sub",
"(",
"r\"^did:\\w+:\"",
",",
"\"\"",
",",
"did",
")"
] | [
66,
4
] | [
69,
48
] | python | en | ['en', 'en', 'en'] | True |
alphahull | (self) |
Determines how the mesh surface triangles are derived from the
set of vertices (points) represented by the `x`, `y` and `z`
arrays, if the `i`, `j`, `k` arrays are not supplied. For
general use of `mesh3d` it is preferred that `i`, `j`, `k` are
supplied. If "-1", Delaunay triang... |
Determines how the mesh surface triangles are derived from the
set of vertices (points) represented by the `x`, `y` and `z`
arrays, if the `i`, `j`, `k` arrays are not supplied. For
general use of `mesh3d` it is preferred that `i`, `j`, `k` are
supplied. If "-1", Delaunay triang... | def alphahull(self):
"""
Determines how the mesh surface triangles are derived from the
set of vertices (points) represented by the `x`, `y` and `z`
arrays, if the `i`, `j`, `k` arrays are not supplied. For
general use of `mesh3d` it is preferred that `i`, `j`, `k` are
su... | [
"def",
"alphahull",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"alphahull\"",
"]"
] | [
80,
4
] | [
106,
32
] | python | en | ['en', 'error', 'th'] | False |
autocolorscale | (self) |
Determines whether the colorscale is a default palette
(`autocolorscale: true`) or the palette determined by
`colorscale`. In case `colorscale` is unspecified or
`autocolorscale` is true, the default palette will be chosen
according to whether numbers in the `color` array are a... |
Determines whether the colorscale is a default palette
(`autocolorscale: true`) or the palette determined by
`colorscale`. In case `colorscale` is unspecified or
`autocolorscale` is true, the default palette will be chosen
according to whether numbers in the `color` array are a... | def autocolorscale(self):
"""
Determines whether the colorscale is a default palette
(`autocolorscale: true`) or the palette determined by
`colorscale`. In case `colorscale` is unspecified or
`autocolorscale` is true, the default palette will be chosen
according to wheth... | [
"def",
"autocolorscale",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"autocolorscale\"",
"]"
] | [
115,
4
] | [
131,
37
] | python | en | ['en', 'error', 'th'] | False |
cauto | (self) |
Determines whether or not the color domain is computed with
respect to the input data (here `intensity`) or the bounds set
in `cmin` and `cmax` Defaults to `false` when `cmin` and
`cmax` are set by the user.
The 'cauto' property must be specified as a bool
(either ... |
Determines whether or not the color domain is computed with
respect to the input data (here `intensity`) or the bounds set
in `cmin` and `cmax` Defaults to `false` when `cmin` and
`cmax` are set by the user.
The 'cauto' property must be specified as a bool
(either ... | def cauto(self):
"""
Determines whether or not the color domain is computed with
respect to the input data (here `intensity`) or the bounds set
in `cmin` and `cmax` Defaults to `false` when `cmin` and
`cmax` are set by the user.
The 'cauto' property must be specifie... | [
"def",
"cauto",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"cauto\"",
"]"
] | [
140,
4
] | [
154,
28
] | python | en | ['en', 'error', 'th'] | False |
cmax | (self) |
Sets the upper bound of the color domain. Value should have the
same units as `intensity` and if set, `cmin` must be set as
well.
The 'cmax' property is a number and may be specified as:
- An int or float
Returns
-------
int|float
|
Sets the upper bound of the color domain. Value should have the
same units as `intensity` and if set, `cmin` must be set as
well.
The 'cmax' property is a number and may be specified as:
- An int or float | def cmax(self):
"""
Sets the upper bound of the color domain. Value should have the
same units as `intensity` and if set, `cmin` must be set as
well.
The 'cmax' property is a number and may be specified as:
- An int or float
Returns
-------
... | [
"def",
"cmax",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"cmax\"",
"]"
] | [
163,
4
] | [
176,
27
] | python | en | ['en', 'error', 'th'] | False |
cmid | (self) |
Sets the mid-point of the color domain by scaling `cmin` and/or
`cmax` to be equidistant to this point. Value should have the
same units as `intensity`. Has no effect when `cauto` is
`false`.
The 'cmid' property is a number and may be specified as:
- An int or flo... |
Sets the mid-point of the color domain by scaling `cmin` and/or
`cmax` to be equidistant to this point. Value should have the
same units as `intensity`. Has no effect when `cauto` is
`false`.
The 'cmid' property is a number and may be specified as:
- An int or flo... | def cmid(self):
"""
Sets the mid-point of the color domain by scaling `cmin` and/or
`cmax` to be equidistant to this point. Value should have the
same units as `intensity`. Has no effect when `cauto` is
`false`.
The 'cmid' property is a number and may be specified as... | [
"def",
"cmid",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"cmid\"",
"]"
] | [
185,
4
] | [
199,
27
] | python | en | ['en', 'error', 'th'] | False |
cmin | (self) |
Sets the lower bound of the color domain. Value should have the
same units as `intensity` and if set, `cmax` must be set as
well.
The 'cmin' property is a number and may be specified as:
- An int or float
Returns
-------
int|float
|
Sets the lower bound of the color domain. Value should have the
same units as `intensity` and if set, `cmax` must be set as
well.
The 'cmin' property is a number and may be specified as:
- An int or float | def cmin(self):
"""
Sets the lower bound of the color domain. Value should have the
same units as `intensity` and if set, `cmax` must be set as
well.
The 'cmin' property is a number and may be specified as:
- An int or float
Returns
-------
... | [
"def",
"cmin",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"cmin\"",
"]"
] | [
208,
4
] | [
221,
27
] | python | en | ['en', 'error', 'th'] | False |
color | (self) |
Sets the color of the whole mesh
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
... |
Sets the color of the whole mesh
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
... | def color(self):
"""
Sets the color of the whole mesh
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 strin... | [
"def",
"color",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"color\"",
"]"
] | [
230,
4
] | [
282,
28
] | python | en | ['en', 'error', 'th'] | False |
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\"",
"]"
] | [
291,
4
] | [
309,
32
] | python | en | ['en', 'error', 'th'] | False |
colorbar | (self) |
The 'colorbar' property is an instance of ColorBar
that may be specified as:
- An instance of :class:`plotly.graph_objs.mesh3d.ColorBar`
- A dict of string/value properties that will be passed
to the ColorBar constructor
Supported dict properties:
... |
The 'colorbar' property is an instance of ColorBar
that may be specified as:
- An instance of :class:`plotly.graph_objs.mesh3d.ColorBar`
- A dict of string/value properties that will be passed
to the ColorBar constructor
Supported dict properties:
... | def colorbar(self):
"""
The 'colorbar' property is an instance of ColorBar
that may be specified as:
- An instance of :class:`plotly.graph_objs.mesh3d.ColorBar`
- A dict of string/value properties that will be passed
to the ColorBar constructor
Su... | [
"def",
"colorbar",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"colorbar\"",
"]"
] | [
318,
4
] | [
544,
31
] | python | en | ['en', 'error', 'th'] | False |
colorscale | (self) |
Sets the colorscale. 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 (1) values are required. For example,
`[[0, 'rgb(0,0,255)'], [1, 'rgb(255... |
Sets the colorscale. 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 (1) values are required. For example,
`[[0, 'rgb(0,0,255)'], [1, 'rgb(255... | def colorscale(self):
"""
Sets the colorscale. 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 (1) values are required. For example,
`[... | [
"def",
"colorscale",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"colorscale\"",
"]"
] | [
553,
4
] | [
596,
33
] | python | en | ['en', 'error', 'th'] | False |
contour | (self) |
The 'contour' property is an instance of Contour
that may be specified as:
- An instance of :class:`plotly.graph_objs.mesh3d.Contour`
- A dict of string/value properties that will be passed
to the Contour constructor
Supported dict properties:
... |
The 'contour' property is an instance of Contour
that may be specified as:
- An instance of :class:`plotly.graph_objs.mesh3d.Contour`
- A dict of string/value properties that will be passed
to the Contour constructor
Supported dict properties:
... | def contour(self):
"""
The 'contour' property is an instance of Contour
that may be specified as:
- An instance of :class:`plotly.graph_objs.mesh3d.Contour`
- A dict of string/value properties that will be passed
to the Contour constructor
Support... | [
"def",
"contour",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"contour\"",
"]"
] | [
605,
4
] | [
627,
30
] | python | en | ['en', 'error', 'th'] | False |
customdata | (self) |
Assigns extra data each datum. This may be useful when
listening to hover, click and selection events. Note that,
"scatter" traces also appends customdata items in the markers
DOM elements
The 'customdata' property is an array that may be specified as a tuple,
list,... |
Assigns extra data each datum. This may be useful when
listening to hover, click and selection events. Note that,
"scatter" traces also appends customdata items in the markers
DOM elements
The 'customdata' property is an array that may be specified as a tuple,
list,... | def customdata(self):
"""
Assigns extra data each datum. This may be useful when
listening to hover, click and selection events. Note that,
"scatter" traces also appends customdata items in the markers
DOM elements
The 'customdata' property is an array that may be sp... | [
"def",
"customdata",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"customdata\"",
"]"
] | [
636,
4
] | [
650,
33
] | python | en | ['en', 'error', 'th'] | False |
customdatasrc | (self) |
Sets the source reference on Chart Studio Cloud for customdata
.
The 'customdatasrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for customdata
.
The 'customdatasrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def customdatasrc(self):
"""
Sets the source reference on Chart Studio Cloud for customdata
.
The 'customdatasrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["cust... | [
"def",
"customdatasrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"customdatasrc\"",
"]"
] | [
659,
4
] | [
671,
36
] | python | en | ['en', 'error', 'th'] | False |
delaunayaxis | (self) |
Sets the Delaunay axis, which is the axis that is perpendicular
to the surface of the Delaunay triangulation. It has an effect
if `i`, `j`, `k` are not provided and `alphahull` is set to
indicate Delaunay triangulation.
The 'delaunayaxis' property is an enumeration that may... |
Sets the Delaunay axis, which is the axis that is perpendicular
to the surface of the Delaunay triangulation. It has an effect
if `i`, `j`, `k` are not provided and `alphahull` is set to
indicate Delaunay triangulation.
The 'delaunayaxis' property is an enumeration that may... | def delaunayaxis(self):
"""
Sets the Delaunay axis, which is the axis that is perpendicular
to the surface of the Delaunay triangulation. It has an effect
if `i`, `j`, `k` are not provided and `alphahull` is set to
indicate Delaunay triangulation.
The 'delaunayaxis' ... | [
"def",
"delaunayaxis",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"delaunayaxis\"",
"]"
] | [
680,
4
] | [
695,
35
] | python | en | ['en', 'error', 'th'] | False |
facecolor | (self) |
Sets the color of each face Overrides "color" and
"vertexcolor".
The 'facecolor' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Returns
-------
numpy.ndarray
|
Sets the color of each face Overrides "color" and
"vertexcolor".
The 'facecolor' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series | def facecolor(self):
"""
Sets the color of each face Overrides "color" and
"vertexcolor".
The 'facecolor' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Returns
-------
numpy.ndarray
"""
ret... | [
"def",
"facecolor",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"facecolor\"",
"]"
] | [
704,
4
] | [
716,
32
] | python | en | ['en', 'error', 'th'] | False |
facecolorsrc | (self) |
Sets the source reference on Chart Studio Cloud for facecolor
.
The 'facecolorsrc' 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 facecolor
.
The 'facecolorsrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def facecolorsrc(self):
"""
Sets the source reference on Chart Studio Cloud for facecolor
.
The 'facecolorsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["facecol... | [
"def",
"facecolorsrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"facecolorsrc\"",
"]"
] | [
725,
4
] | [
737,
35
] | python | en | ['en', 'error', 'th'] | False |
flatshading | (self) |
Determines whether or not normal smoothing is applied to the
meshes, creating meshes with an angular, low-poly look via flat
reflections.
The 'flatshading' property must be specified as a bool
(either True, or False)
Returns
-------
bool
|
Determines whether or not normal smoothing is applied to the
meshes, creating meshes with an angular, low-poly look via flat
reflections.
The 'flatshading' property must be specified as a bool
(either True, or False) | def flatshading(self):
"""
Determines whether or not normal smoothing is applied to the
meshes, creating meshes with an angular, low-poly look via flat
reflections.
The 'flatshading' property must be specified as a bool
(either True, or False)
Returns
... | [
"def",
"flatshading",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"flatshading\"",
"]"
] | [
746,
4
] | [
759,
34
] | python | en | ['en', 'error', 'th'] | False |
hoverinfo | (self) |
Determines which trace information appear on hover. If `none`
or `skip` are set, no information is displayed upon hovering.
But, if `none` is set, click and hover events are still fired.
The 'hoverinfo' property is a flaglist and may be specified
as a string containing:
... |
Determines which trace information appear on hover. If `none`
or `skip` are set, no information is displayed upon hovering.
But, if `none` is set, click and hover events are still fired.
The 'hoverinfo' property is a flaglist and may be specified
as a string containing:
... | def hoverinfo(self):
"""
Determines which trace information appear on hover. If `none`
or `skip` are set, no information is displayed upon hovering.
But, if `none` is set, click and hover events are still fired.
The 'hoverinfo' property is a flaglist and may be specified
... | [
"def",
"hoverinfo",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"hoverinfo\"",
"]"
] | [
768,
4
] | [
785,
32
] | python | en | ['en', 'error', 'th'] | False |
hoverinfosrc | (self) |
Sets the source reference on Chart Studio Cloud for hoverinfo
.
The 'hoverinfosrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for hoverinfo
.
The 'hoverinfosrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def hoverinfosrc(self):
"""
Sets the source reference on Chart Studio Cloud for hoverinfo
.
The 'hoverinfosrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["hoverin... | [
"def",
"hoverinfosrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"hoverinfosrc\"",
"]"
] | [
794,
4
] | [
806,
35
] | python | en | ['en', 'error', 'th'] | False |
hoverlabel | (self) |
The 'hoverlabel' property is an instance of Hoverlabel
that may be specified as:
- An instance of :class:`plotly.graph_objs.mesh3d.Hoverlabel`
- A dict of string/value properties that will be passed
to the Hoverlabel constructor
Supported dict properties... |
The 'hoverlabel' property is an instance of Hoverlabel
that may be specified as:
- An instance of :class:`plotly.graph_objs.mesh3d.Hoverlabel`
- A dict of string/value properties that will be passed
to the Hoverlabel constructor
Supported dict properties... | def hoverlabel(self):
"""
The 'hoverlabel' property is an instance of Hoverlabel
that may be specified as:
- An instance of :class:`plotly.graph_objs.mesh3d.Hoverlabel`
- A dict of string/value properties that will be passed
to the Hoverlabel constructor
... | [
"def",
"hoverlabel",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"hoverlabel\"",
"]"
] | [
815,
4
] | [
865,
33
] | python | en | ['en', 'error', 'th'] | False |
hovertemplate | (self) |
Template string used for rendering the information that appear
on hover box. Note that this will override `hoverinfo`.
Variables are inserted using %{variable}, for example "y:
%{y}". Numbers are formatted using d3-format's syntax
%{variable:d3-format}, for example "Price: %{y:$... |
Template string used for rendering the information that appear
on hover box. Note that this will override `hoverinfo`.
Variables are inserted using %{variable}, for example "y:
%{y}". Numbers are formatted using d3-format's syntax
%{variable:d3-format}, for example "Price: %{y:$... | def hovertemplate(self):
"""
Template string used for rendering the information that appear
on hover box. Note that this will override `hoverinfo`.
Variables are inserted using %{variable}, for example "y:
%{y}". Numbers are formatted using d3-format's syntax
%{variable:d... | [
"def",
"hovertemplate",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"hovertemplate\"",
"]"
] | [
874,
4
] | [
906,
36
] | python | en | ['en', 'error', 'th'] | False |
hovertemplatesrc | (self) |
Sets the source reference on Chart Studio Cloud for
hovertemplate .
The 'hovertemplatesrc' 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
hovertemplate .
The 'hovertemplatesrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def hovertemplatesrc(self):
"""
Sets the source reference on Chart Studio Cloud for
hovertemplate .
The 'hovertemplatesrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return se... | [
"def",
"hovertemplatesrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"hovertemplatesrc\"",
"]"
] | [
915,
4
] | [
927,
39
] | python | en | ['en', 'error', 'th'] | False |
hovertext | (self) |
Same as `text`.
The 'hovertext' 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
|
Same as `text`.
The 'hovertext' 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 hovertext(self):
"""
Same as `text`.
The 'hovertext' 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",
"hovertext",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"hovertext\"",
"]"
] | [
936,
4
] | [
949,
32
] | python | en | ['en', 'error', 'th'] | False |
hovertextsrc | (self) |
Sets the source reference on Chart Studio Cloud for hovertext
.
The 'hovertextsrc' 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 hovertext
.
The 'hovertextsrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def hovertextsrc(self):
"""
Sets the source reference on Chart Studio Cloud for hovertext
.
The 'hovertextsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["hoverte... | [
"def",
"hovertextsrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"hovertextsrc\"",
"]"
] | [
958,
4
] | [
970,
35
] | python | en | ['en', 'error', 'th'] | False |
i | (self) |
A vector of vertex indices, i.e. integer values between 0 and
the length of the vertex vectors, representing the "first"
vertex of a triangle. For example, `{i[m], j[m], k[m]}`
together represent face m (triangle m) in the mesh, where `i[m]
= n` points to the triplet `{x[n], y[n... |
A vector of vertex indices, i.e. integer values between 0 and
the length of the vertex vectors, representing the "first"
vertex of a triangle. For example, `{i[m], j[m], k[m]}`
together represent face m (triangle m) in the mesh, where `i[m]
= n` points to the triplet `{x[n], y[n... | def i(self):
"""
A vector of vertex indices, i.e. integer values between 0 and
the length of the vertex vectors, representing the "first"
vertex of a triangle. For example, `{i[m], j[m], k[m]}`
together represent face m (triangle m) in the mesh, where `i[m]
= n` points to... | [
"def",
"i",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"i\"",
"]"
] | [
979,
4
] | [
996,
24
] | python | en | ['en', 'error', 'th'] | False |
ids | (self) |
Assigns id labels to each datum. These ids for object constancy
of data points during animation. Should be an array of strings,
not numbers or any other type.
The 'ids' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Retur... |
Assigns id labels to each datum. These ids for object constancy
of data points during animation. Should be an array of strings,
not numbers or any other type.
The 'ids' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series | def ids(self):
"""
Assigns id labels to each datum. These ids for object constancy
of data points during animation. Should be an array of strings,
not numbers or any other type.
The 'ids' property is an array that may be specified as a tuple,
list, numpy array, or pa... | [
"def",
"ids",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"ids\"",
"]"
] | [
1005,
4
] | [
1018,
26
] | python | en | ['en', 'error', 'th'] | False |
idssrc | (self) |
Sets the source reference on Chart Studio Cloud for ids .
The 'idssrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
|
Sets the source reference on Chart Studio Cloud for ids .
The 'idssrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def idssrc(self):
"""
Sets the source reference on Chart Studio Cloud for ids .
The 'idssrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["idssrc"] | [
"def",
"idssrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"idssrc\"",
"]"
] | [
1027,
4
] | [
1038,
29
] | python | en | ['en', 'error', 'th'] | False |
intensity | (self) |
Sets the intensity values for vertices or cells as defined by
`intensitymode`. It can be used for plotting fields on meshes.
The 'intensity' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Returns
-------
numpy.nda... |
Sets the intensity values for vertices or cells as defined by
`intensitymode`. It can be used for plotting fields on meshes.
The 'intensity' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series | def intensity(self):
"""
Sets the intensity values for vertices or cells as defined by
`intensitymode`. It can be used for plotting fields on meshes.
The 'intensity' property is an array that may be specified as a tuple,
list, numpy array, or pandas Series
Returns
... | [
"def",
"intensity",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"intensity\"",
"]"
] | [
1047,
4
] | [
1059,
32
] | python | en | ['en', 'error', 'th'] | False |
intensitymode | (self) |
Determines the source of `intensity` values.
The 'intensitymode' property is an enumeration that may be specified as:
- One of the following enumeration values:
['vertex', 'cell']
Returns
-------
Any
|
Determines the source of `intensity` values.
The 'intensitymode' property is an enumeration that may be specified as:
- One of the following enumeration values:
['vertex', 'cell'] | def intensitymode(self):
"""
Determines the source of `intensity` values.
The 'intensitymode' property is an enumeration that may be specified as:
- One of the following enumeration values:
['vertex', 'cell']
Returns
-------
Any
"""... | [
"def",
"intensitymode",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"intensitymode\"",
"]"
] | [
1068,
4
] | [
1080,
36
] | python | en | ['en', 'error', 'th'] | False |
intensitysrc | (self) |
Sets the source reference on Chart Studio Cloud for intensity
.
The 'intensitysrc' 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 intensity
.
The 'intensitysrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def intensitysrc(self):
"""
Sets the source reference on Chart Studio Cloud for intensity
.
The 'intensitysrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["intensi... | [
"def",
"intensitysrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"intensitysrc\"",
"]"
] | [
1089,
4
] | [
1101,
35
] | python | en | ['en', 'error', 'th'] | False |
isrc | (self) |
Sets the source reference on Chart Studio Cloud for i .
The 'isrc' 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 i .
The 'isrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def isrc(self):
"""
Sets the source reference on Chart Studio Cloud for i .
The 'isrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["isrc"] | [
"def",
"isrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"isrc\"",
"]"
] | [
1110,
4
] | [
1121,
27
] | python | en | ['en', 'error', 'th'] | False |
j | (self) |
A vector of vertex indices, i.e. integer values between 0 and
the length of the vertex vectors, representing the "second"
vertex of a triangle. For example, `{i[m], j[m], k[m]}`
together represent face m (triangle m) in the mesh, where `j[m]
= n` points to the triplet `{x[n], y[... |
A vector of vertex indices, i.e. integer values between 0 and
the length of the vertex vectors, representing the "second"
vertex of a triangle. For example, `{i[m], j[m], k[m]}`
together represent face m (triangle m) in the mesh, where `j[m]
= n` points to the triplet `{x[n], y[... | def j(self):
"""
A vector of vertex indices, i.e. integer values between 0 and
the length of the vertex vectors, representing the "second"
vertex of a triangle. For example, `{i[m], j[m], k[m]}`
together represent face m (triangle m) in the mesh, where `j[m]
= n` points t... | [
"def",
"j",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"j\"",
"]"
] | [
1130,
4
] | [
1147,
24
] | python | en | ['en', 'error', 'th'] | False |
jsrc | (self) |
Sets the source reference on Chart Studio Cloud for j .
The 'jsrc' 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 j .
The 'jsrc' property must be specified as a string or
as a plotly.grid_objs.Column object | def jsrc(self):
"""
Sets the source reference on Chart Studio Cloud for j .
The 'jsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["jsrc"] | [
"def",
"jsrc",
"(",
"self",
")",
":",
"return",
"self",
"[",
"\"jsrc\"",
"]"
] | [
1156,
4
] | [
1167,
27
] | python | en | ['en', 'error', 'th'] | False |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.